1import{a as oe,b as ee,c as me,d as Be,e as je,f as he,g as ln,h as sn,i as dn,j as cn,k as mn,l as Xt,m as un,n as pn,o as fn,p as Pt,q as hn,r as uo,s as gn}from"./chunk-IKACG7M5.js";import{a as nn,b as an}from"./chunk-QI7GHXLF.js";import{$ as l,$b as st,Aa as v,Ab as ve,Ac as Rt,B as vt,Ba as S,Bb as Jt,Bc as co,C as G,Ca as Gi,Cb as Ji,Cc as mo,D as ni,Da as Li,Db as Zi,Dc as kt,E as ai,Ea as Bi,Eb as Xi,Ec as V,Fa as no,Fb as yt,G as f,Ga as A,Gb as en,Ha as St,Hc as vn,Ia as E,Ib as ro,J as y,Ja as ot,K as T,Ka as u,La as di,Lb as lo,Ma as ci,Mb as tn,N as at,Na as qi,Nb as Ee,O as Dt,Oa as z,P as gt,Pa as U,Q as tt,Qa as H,R as Et,Ra as Ui,Sa as mi,Sb as Tt,T as j,Ta as ao,U as rt,Ua as xe,Ub as so,V as Mt,Va as ye,W as Ue,Wa as de,X as Te,Xa as s,Ya as M,Za as L,_a as Hi,a as oi,aa as io,ac as le,b as ht,ba as ri,bc as R,ca as q,cb as ji,cc as It,d as Ii,da as Pi,db as Re,dc as Ke,e as wi,eb as $i,ec as Q,f as te,fa as $,fb as Ye,fc as on,g as Ni,ga as x,gb as zi,gc as wt,h as B,ha as li,hb as Qi,hc as Nt,i as Fi,ia as De,ib as Wi,ic as Zt,j as Oe,ja as Vi,jb as Ie,jc as Ft,k as Oi,ka as K,kb as we,kc as W,la as Ae,lb as He,lc as rn,m as We,mb as Yi,mc as D,n as Ai,nc as P,o as ii,oa as ze,ob as it,oc as J,p as re,pa as si,pb as F,q as Ri,qa as g,qb as ui,qc as c,ra as C,rb as ge,s as ki,sa as Ge,sb as b,sc as Z,ta as lt,tb as Ct,tc as Ne,u as k,ua as ne,ub as Le,va as ae,vb as Ki,vc as Y,w as Se,wa as m,wb as xt,wc as Me,x as to,xa as a,xc as X,y as oo,ya as r,yc as Ot,za as h,zb as Kt,zc as At}from"./chunk-A3JCXIPB.js";import"./chunk-J6UONIR4.js";import"./chunk-QUJFQN2Y.js";import"./chunk-D2QXPZWH.js";import"./chunk-QG6PEGLO.js";import"./chunk-SHP4ND3R.js";import"./chunk-CEE3YQKQ.js";import"./chunk-RNYCZ223.js";import"./chunk-S3MDNWGF.js";import"./chunk-WIUS5UJB.js";import"./chunk-6D677ZFO.js";import"./chunk-XNDU5ZZL.js";import"./chunk-GXWWUYBK.js";import"./chunk-VZWY4NEG.js";import"./chunk-WI5MSH4N.js";import"./chunk-DGDFF3EP.js";import"./chunk-CKP3SGE2.js";import"./chunk-6N4CUDVL.js";import"./chunk-VXV6LGYV.js";import"./chunk-WCXRWRL6.js";import"./chunk-2TPYN4T3.js";import{a as et,b as ti,h as _e}from"./chunk-HHJ6TDNL.js";var pa=["dialogContainer"];function fa(o,n){if(o&1&&(a(0,"option",13),s(1),r()),o&2){let e=n.$implicit;m("ngValue",e),l(),L(" ",e.nome," ")}}function ha(o,n){o&1&&(a(0,"option",14),s(1,"N\xE3o h\xE1 munic\xEDpio dispon\xEDvel"),r())}function va(o,n){if(o&1&&(a(0,"small",15),s(1),r()),o&2){let e=u(2);l(),M(e.MSG_CAMPO_OBRIGATORIO)}}function ga(o,n){if(o&1&&(a(0,"option",13),s(1),r()),o&2){let e=n.$implicit;m("ngValue",e),l(),L(" ",e.nome," ")}}function Ca(o,n){o&1&&(a(0,"option",14),s(1,"N\xE3o h\xE1 local dispon\xEDvel"),r())}function ba(o,n){if(o&1&&(a(0,"small",15),s(1),r()),o&2){let e=u(3);l(),M(e.MSG_CAMPO_OBRIGATORIO)}}function _a(o,n){if(o&1&&(a(0,"div",10)(1,"label",23,2),s(3,"Local*:"),r(),a(4,"select",24),ne(5,ga,2,2,"option",13,Ge,!1,Ca,2,0,"option",14),r(),g(8,ba,2,1,"small",15),r()),o&2){let e=u(2);l(4),m("ngClass",e.aplicaCssErro("local")),l(),ae(e.localOpcoes()),l(3),C(e.verificaValidTouched("local")?8:-1)}}function Da(o,n){if(o&1&&(a(0,"option",27),s(1),r()),o&2){let e=n.$implicit;m("value",e),l(),L(" ",e," ")}}function Ea(o,n){o&1&&(a(0,"option",14),s(1,"N\xE3o h\xE1 dia dispon\xEDvel"),r())}function Ma(o,n){if(o&1&&(a(0,"small",15),s(1),r()),o&2){let e=u(3);l(),M(e.MSG_CAMPO_OBRIGATORIO)}}function Sa(o,n){if(o&1&&(a(0,"div",10)(1,"label",25,3),s(3,"Dias dispon\xEDveis*:"),r(),a(4,"select",26),ne(5,Da,2,2,"option",27,Ge,!1,Ea,2,0,"option",14),r(),g(8,Ma,2,1,"small",15),r()),o&2){let e=u(2);l(4),m("ngClass",e.aplicaCssErro("dia")),l(),ae(e.diasOpcoes()),l(3),C(e.verificaValidTouched("dia")?8:-1)}}function xa(o,n){if(o&1&&(a(0,"option",27),s(1),r()),o&2){let e=n.$implicit;m("value",e),l(),L(" ",e," ")}}function ya(o,n){o&1&&(a(0,"option",14),s(1,"N\xE3o h\xE1 hor\xE1rio dispon\xEDvel"),r())}function Ta(o,n){if(o&1&&(a(0,"small",15),s(1),r()),o&2){let e=u(3);l(),M(e.MSG_CAMPO_OBRIGATORIO)}}function Ia(o,n){o&1&&(a(0,"div",30)(1,"div",31)(2,"strong",32),h(3,"i",33),s(4," O agendamento est\xE1 fora do prazo de altera\xE7\xE3o ou cancelamento."),r()()())}function wa(o,n){if(o&1&&(a(0,"div",10)(1,"label",28,4),s(3,"Hor\xE1rios dispon\xEDveis*:"),r(),a(4,"select",29),ne(5,xa,2,2,"option",27,Ge,!1,ya,2,0,"option",14),r(),g(8,Ta,2,1,"small",15),r(),g(9,Ia,5,0,"div",30)),o&2){let e=u(2);l(4),m("ngClass",e.aplicaCssErro("horario")),l(),ae(e.horariosOpcoes()),l(3),C(e.verificaValidTouched("horario")?8:-1),l(),C(e.agendamentoModel&&e.agendamentoModel.podeCancelar==0?9:-1)}}function Na(o,n){if(o&1){let e=A();a(0,"app-custom-button",34),E("btnClicked",function(){y(e);let i=u(2);return T(i.cancelarAgendamento())}),r()}if(o&2){let e=u(2);m("cssClass",e.agendamentoModel&&e.agendamentoModel.podeCancelar==0?"btn-secondary rounded-5":"btn-danger-custom")("disabled",e.agendamentoModel&&e.agendamentoModel.podeCancelar==0)}}function Fa(o,n){if(o&1){let e=A();a(0,"form",6)(1,"div",8)(2,"div",9)(3,"div",10)(4,"label",11,1),s(6,"Munic\xEDpio*:"),r(),a(7,"select",12),ne(8,fa,2,2,"option",13,Ge,!1,ha,2,0,"option",14),r(),g(11,va,2,1,"small",15),r(),g(12,_a,9,3,"div",10),g(13,Sa,9,3,"div",10),g(14,wa,10,4),r()(),a(15,"div",16)(16,"div",17)(17,"app-custom-button-voltar",18),E("btnClicked",function(){y(e);let i=u();return T(i.voltarEtapa())}),r()(),a(18,"div",19),s(19,"Etapa 8 de 8"),r(),a(20,"div",20)(21,"app-custom-button-proximo",18),E("btnClicked",function(){y(e);let i=u();return T(i.avancarEtapa())}),r()()(),a(22,"div",16)(23,"div",21),g(24,Na,1,2,"app-custom-button",22),r()()()}if(o&2){let e,t,i,d=u();m("formGroup",d.form),l(7),m("ngClass",d.aplicaCssErro("municipio")),l(),ae(d.municipioOpcoes()),l(3),C(d.verificaValidTouched("municipio")?11:-1),l(),C((e=d.form.get("municipio"))!=null&&e.value?12:-1),l(),C((t=d.form.get("local"))!=null&&t.value?13:-1),l(),C((i=d.form.get("dia"))!=null&&i.value?14:-1),l(10),C(d.dadosCompartilhadosService.getAgendamento()?24:-1)}}var po=class o extends oe{constructor(){super();this.etapaAgendamentoService=f(Nt);this.usuarioService=f(It);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.municipioOpcoes=j([]);this.localOpcoes=j([]);this.diasOpcoes=j([]);this.horariosOpcoes=j([]);this.agendamentoModel=this.activatedRoute.snapshot.data.agendamento,this.agendamentoModelOriginal=et({},this.agendamentoModel),this.previousUrl=this.router.getCurrentNavigation()?.extras.state?.from}ngOnInit(){return _e(this,null,function*(){yield this.carregaMunicipios(),this.criaFormGroup();let e=this.form.controls.municipio?.value;e&&this.carregaLocais(e.nroIntMunicipio)})}criaFormGroup(){this.agendamentoModel?this.carregaFormGroup():this.criaNovoFormGroup()}criaNovoFormGroup(){this.form=this.formBuilder.group({municipio:new c("",[D.required]),local:new c("",[D.required]),dia:new c("",[D.required]),horario:new c("",[D.required])}),this.setMunicipioSeTiverApenasUmaOpcao(),this.comportamentoTelaRN(),this.verificaSeHouveMudancaoNoForm()}carregaFormGroup(){this.form=this.formBuilder.group({municipio:new c({value:this.buscaMunicipioPeloNome(this.agendamentoModel.nomeMu
1nicipio),disabled:this.desabilitaCampo()},[D.required]),local:new c({value:"",disabled:this.desabilitaCampo()},[D.required]),dia:new c({value:"",disabled:this.desabilitaCampo()},[D.required]),horario:new c({value:"",disabled:this.desabilitaCampo()},[D.required])}),this.comportamentoTelaRN(),this.verificaSeHouveMudancaoNoForm()}setMunicipioSeTiverApenasUmaOpcao(){this.municipioOpcoes().length==1&&this.form.controls.municipio.setValue(this.municipioOpcoes()[0])}setLocalSeTiverApenasUmaOpcao(){this.localOpcoes().length==1&&this.form.controls.local.setValue(this.localOpcoes()[0])}comportamentoTelaRN(){this.verificaMudancaMunicipio(),this.verificaMudancaLocal(),this.verificaMudancaDia()}verificaMudancaMunicipio(){this.form.get("municipio")?.valueChanges.pipe(Se(this.destroy$)).subscribe(e=>{e&&this.carregaLocais(e.nroIntMunicipio)})}verificaMudancaLocal(){this.form.get("local")?.valueChanges.pipe(Se(this.destroy$)).subscribe(e=>{e&&this.carregaDias(e.nroIntLocalServico)})}verificaMudancaDia(){this.form.get("dia")?.valueChanges.pipe(Se(this.destroy$)).subscribe(e=>{e&&this.carregaHorarios(e)})}carregaMunicipios(){return _e(this,null,function*(){let e=yield this.etapaAgendamentoService.getMunicipios(this.viewContainerRef);e.data&&this.municipioOpcoes.set(e.data)})}carregaLocais(e){this.etapaAgendamentoService.getLocais(e).subscribe({next:t=>{t&&(this.localOpcoes.set(t),this.setLocalSeTiverApenasUmaOpcao(),this.carregaLocalNoForm())},error:t=>{this.messagesServiceModal.openModal(`Erro ao carregar locais. Tente novamente mais tarde. 2 3`+t.error,this.viewContainerRef)}})}carregaDias(e){this.etapaAgendamentoService.getDias(e).subscribe({next:t=>{t&&(this.diasOpcoes.set(t),this.carregaDataNoForm())},error:t=>{this.messagesServiceModal.openModal(`Erro ao carregar dias dispon\xEDveis. Tente novamente mais tarde. 4 5`+t.error,this.viewContainerRef)}})}carregaHorarios(e){this.etapaAgendamentoService.getHorarios(this.form.get("local")?.value.nroIntLocalServico,e).subscribe({next:t=>{t&&(this.horariosOpcoes.set(t),this.carregaHorarioNoForm())},error:t=>{this.messagesServiceModal.openModal(`Erro ao carregar hor\xE1rios dispon\xEDveis. Tente novamente mais tarde. 6 7`+t.error,this.viewContainerRef)}})}carregaLocalNoForm(){this.form&&this.dadosCompartilhadosService.getAgendamento()&&this.form.controls.local.setValue(this.buscaLocal(this.agendamentoModel.nroIntLocalAtendimento))}carregaDataNoForm(){if(this.form&&this.dadosCompartilhadosService.getAgendamento()){let e=this.agendamentoModel.dataAgendamento.split(" ")[0].replaceAll("-","/");this.adicionaDiaVencidoArray(e),this.form.controls.dia.setValue(e)}}carregaHorarioNoForm(){if(this.form&&this.dadosCompartilhadosService.getAgendamento()){let e=this.agendamentoModel.dataAgendamento.split(" ")[1].substring(0,5);this.horariosOpcoes.update(t=>[e,...t]),this.form.controls.horario.setValue(e)}}adicionaDiaVencidoArray(e){this.diasOpcoes().find(t=>t==e)||this.diasOpcoes.update(t=>[...t,e])}buscaMunicipioPeloNome(e){return this.municipioOpcoes().find(t=>t.nome==e)}buscaLocal(e){return this.localOpcoes().find(t=>t.nroIntLocal==e)}salvaAgendamento(){me.objetoMudou(this.agendamentoModelOriginal,this.agendamentoModel)?this.etapaAgendamentoService.gravaAgendamento(this.agendamentoModel).subscribe({next:e=>{e=="OK"&&this.redirecionaParaProximaPagina()},error:e=>{let t=JSON.parse(e.error);this.messagesServiceModal.openModal(`Erro ao gravar agendamento. 8 9`+t[0].message,this.viewContainerRef)}}):this.redirecionaParaProximaPagina()}redirecionaParaProximaPagina(){this.router.navigate(["etapas","resumo"],{skipLocationChange:!0})}criaAgendamentoModel(){this.agendamentoModel?this.preencheModel():this.criaNovaModel()}criaNovaModel(){let e=this.form.controls.dia?.value.replaceAll("/","-"),t=this.form.controls.horario?.value+":00";this.agendamentoModel={uuidPrecadastro:this.protocoloModel?.uuid??"",nroIntLocalAtendimento:this.form.controls.local?.value.nroIntLocal,dataAgendamento:`${e} ${t}`,nome:this.dadosCompartilhadosService.getDadoGeral()?.nomeCompleto??this.usuarioService.nome(),cpf:this.usuarioService.cpf()??"",nomeMunicipio:this.form.controls.municipio?.value.nome,nroIntLocalRetirada:0},this.dadosCompartilhadosService.setAgendamento(this.agendamentoModel)}preencheModel(){let e=this.form.controls.dia?.value.replaceAll("/","-"),t=this.form.controls.horario?.value+":00";this.agendamentoModel.uuidPrecadastro=this.protocoloModel?.uuid??"",this.agendamentoModel.nroIntLocalAtendimento=this.form.controls.local?.value.nroIntLocal,this.agendamentoModel.dataAgendamento=`${e} ${t}`,this.agendamentoModel.cpf=this.usuarioService.cpf()??"",this.agendamentoModel.nomeMu
9nicipio=this.form.controls.municipio?.value.nome,this.agendamentoModel.nroIntLocalRetirada=0,this.dadosCompartilhadosService.setAgendamento(this.agendamentoModel)}validaFormulario(){return this.formularioValido()}desabilitaCampo(){return this.agendamentoModel.podeCancelar==0}redirecionaPaginaAnterior(){this.dadosCompartilhadosService.getDadoCID()?this.router.navigate(["etapas/informacoes-documentos-5"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCartaoNacionalSaude||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarTipoSanguineoFatorRH?this.router.navigate(["etapas/informacoes-documentos-4"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarIdentidadeProfissional?this.router.navigate(["etapas/informacoes-documentos-3"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCarteiraTrabalho?this.router.navigate(["etapas/informacoes-documentos-2"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarTituloEleitor||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCertidaoMilitar||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCNH?this.router.navigate(["etapas/informacoes-documentos-1"],{skipLocationChange:!0}):this.router.navigate(["etapas/selecao-documentos"],{skipLocationChange:!0}),this.previousUrl=="/tem-pre-cadastro"&&this.router.navigate(["etapas","tem-pre-cadastro"],{skipLocationChange:!0})}avancarEtapa(){this.validaFormulario()&&(this.houveMudancaNoForm?(this.criaAgendamentoModel(),this.salvaAgendamento()):this.redirecionaParaProximaPagina())}voltarEtapa(){this.redirecionaPaginaAnterior()}limpaFormulario(){this.limparForm(this.viewContainerRef)}cancelarAgendamento(){this.messagesServiceModal.openModalConfirmation("<p>Tem certeza que deseja cancelar o agendamento?</p>",this.viewContainerRef,e=>{e==="Sim"&&this.etapaAgendamentoService.deleteAgendamento(this.protocoloModel?.uuid).subscribe({next:t=>{t=="DELETED"&&(this.messagesServiceModal.openModal("Agendamento cancelado.",this.viewContainerRef),this.dadosCompartilhadosService.deleteAgendamento(),this.form.reset())},error:t=>{this.messagesServiceModal.openModal(`Erro excluir agendamento. Tente novamente mais tarde. 10 11`+t.error,this.viewContainerRef)}})})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-agendamento"]],viewQuery:function(t,i){if(t&1&&z(pa,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:6,vars:1,consts:[["dialogContainer",""],["municipio",""],["local",""],["dia",""],["horario",""],[1,"navbar","titulo-navegacao"],[1,"form-horizontal",3,"formGroup"],["id","modal-limpar"],[1,"card"],[1,"card-body"],[1,"mb-3","d-flex","flex-column"],["for","municipio",1,"form-label","w-100"],["id","municipio","formControlName","municipio",1,"form-select",3,"ngClass"],[3,"ngValue"],["value",""],[1,"px-1","text-danger"],[1,"row","justify-content-between","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"col-auto"],["label","Cancelar Agendamento",3,"cssClass","disabled"],["for","local",1,"form-label","w-100"],["id","local","formControlName","local",1,"form-select",3,"ngClass"],["for","dia",1,"form-label","w-100"],["id","dia","formControlName","dia",1,"form-select",3,"ngClass"],[3,"value"],["for","horario",1,"form-label","w-100"],["id","horario","formControlName","horario",1,"form-select",3,"ngClass"],[1,"d-flex","flex-column","text-bg-light","box-shadow","rounded","p-3"],[1,"col","text-danger"],[1,"text-danger"],[1,"bi","bi-exclamation-triangle"],["label","Cancelar Agendamento",3,"btnClicked","cssClass","disabled"]],template:function(t,i){t&1&&(a(0,"nav",5)(1,"span"),s(2," Agendamento Presencial "),r()(),g(3,Fa,25,8,"form",6),h(4,"div",7,0)),t&2&&(l(3),C(i.form?3:-1))},dependencies:[V,Z,At,Rt,Ot,P,J,X,Me,kt,ro,Zi,ee,le,st],styles:[".input-group[_ngcontent-%COMP%]{width:16rem}"]})}};var Cn=()=>{let o=f(Q),n=o.getProtocolo();return o.getAgendamento()?te(o.getAgendamento()):f(Nt).getAgendamento(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("Agendamento n\xE3o encontrado:",e),te(null))))};var ue=class o extends st{static{this.\u0275fac=(()=>{let n;return function(t){return(n||(n=Ue(o)))(t||o)}})()}static{this.\u0275cmp=x({type:o,selectors:[["app-custom-button-limpar"]],features:[K],decls:2,vars:0,consts:[["type","button","title","Limpar",1,"btn","btn-danger-custom",3,"click"]],template:function(e,t){e&1&&(v(0,"button",0),ot("click",function(){return t.btnClickedEmit()}),s(1,` Limpar 12`),S())},styles:[".btn-rounded[_ngcontent-%COMP%]{border-radius:25px;background:#fff;color:#04335d;font-weight:700}.btn-rounded[_ngcontent-%COMP%]:hover{background-color:#467396;color:#fff}.btn-danger-custom[_ngcontent-%COMP%]{border-radius:25px;background:#f99;color:maroon;font-weight:700;position:relative;right:2px}.btn-danger-custom[_ngcontent-%COMP%]:hover{background-color:#fab6b6;color:maroon}"]})}};function Je(o){o||(o=f(gt));let n=new oi(e=>{if(o.destroyed){e.next();return}return o.onDestroy(e.next.bind(e))});return e=>e.pipe(Se(n))}var Oa=["content"],Aa=["scroll"],Ra=["padding"],kn=["*"],eo=o=>({searchTerm:o});function ka(o,n){if(o&1&&(a(0,"div",3),no(1,6),r()),o&2){let e=u();l(),m("ngTemplateOutlet",e.headerTemplate())("ngTemplateOutletContext",Ye(2,eo,e.filterValue()))}}function Pa(o,n){if(o&1&&(a(0,"div",5),no(1,6),r()),o&2){let e=u();l(),m("ngTemplateOutlet",e.footerTemplate())("ngTemplateOutletContext",Ye(2,eo,e.filterValue()))}}var Va=["searchInput"],Ga=["clearButton"],La=(o,n,e)=>({item:o,clear:n,label:e}),Ba=(o,n)=>({items:o,clear:n}),qa=(o,n,e,t)=>({item:o,item$:n,index:e,searchTerm:t});
12function Ua(o,n){if(o&1&&(a(0,"div",21),s(1),r()),o&2){let e=u(2);l(),M(e.placeholder()??e.config.placeholder)}}function Ha(o,n){}function ja(o,n){if(o&1&&Ae(0,Ua,2,1,"ng-template",null,1,He)(2,Ha,0,0,"ng-template",20),o&2){let e=xe(1),t=u();l(2),m("ngTemplateOutlet",t.placeholderTemplate()||e)}}function $a(o,n){if(o&1){let e=A();a(0,"span",24),E("click",function(){y(e);let i=u().$implicit,d=u(2);return T(d.unselect(i))}),s(1,"\xD7"),r(),h(2,"span",25)}if(o&2){let e=u().$implicit,t=u(2);l(2),m("ngItemLabel",e.label)("escape",t.escapeHTML)}}function za(o,n){}function Qa(o,n){if(o&1&&(a(0,"div",23),Ae(1,$a,3,2,"ng-template",null,2,He)(3,za,0,0,"ng-template",12),r()),o&2){let e=n.$implicit,t=xe(2),i=u(2);ye("ng-value-disabled",e.disabled),l(3),m("ngTemplateOutlet",i.labelTemplate()||t)("ngTemplateOutletContext",Qi(4,La,e.value,i.clearItem,e.label))}}function Wa(o,n){if(o&1&&ne(0,Qa,4,8,"div",22,si().trackByOption,!0),o&2){let e=u();ae(e.selectedItems)}}function Ya(o,n){}function Ka(o,n){if(o&1&&Ae(0,Ya,0,0,"ng-template",12),o&2){let e=u();m("ngTemplateOutlet",e.multiLabelTemplate())("ngTemplateOutletContext",zi(2,Ba,e.selectedValues,e.clearItem))}}function Ja(o,n){o&1&&h(0,"div",26)}function Za(o,n){}function Xa(o,n){if(o&1&&Ae(0,Ja,1,0,"ng-template",null,3,He)(2,Za,0,0,"ng-template",20),o&2){let e=xe(1),t=u();l(2),m("ngTemplateOutlet",t.loadingSpinnerTemplate()||e)}}function er(o,n){if(o&1&&no(0,20),o&2){let e=u(2);m("ngTemplateOutlet",e.clearButtonTemplate())}}function tr(o,n){o&1&&(a(0,"span",28),s(1,"\xD7"),r())}function or(o,n){if(o&1){let e=A();a(0,"span",27,4),E("click",function(i){y(e);let d=u();return T(d.handleClearClick(i))}),g(2,er,1,1,"ng-container",20)(3,tr,2,0,"span",28),r()}if(o&2){let e=u();m("title",ji(e.clearAllText()||e.config.clearAllText)),ze("tabindex",e.tabFocusOnClear()?0:-1),l(2),C(e.clearButtonTemplate()?2:3)}}function ir(o,n){if(o&1&&h(0,"span",33),o&2){let e=u().$implicit,t=u(2);m("ngItemLabel",e.label)("escape",t.escapeHTML)}}function nr(o,n){}function ar(o,n){if(o&1){let e=A();a(0,"div",32),E("click",function(){let i=y(e).$implicit,d=u(2);return T(d.toggleItem(i))})("mouseover",function(){let i=y(e).$implicit,d=u(2);return T(d.onItemHover(i))}),Ae(1,ir,1,2,"ng-template",null,5,He)(3,nr,0,0,"ng-template",12),r()}if(o&2){let e=n.$implicit,t=xe(2),i=u(2);ye("ng-option-disabled",e.disabled)("ng-option-selected",e.selected)("ng-optgroup",e.children)("ng-option",!e.children)("ng-option-child",!!e.parent)("ng-option-marked",e===i.itemsList.markedItem),ze("role",e.children?"group":"option")("aria-selected",e.selected)("id",e==null?null:e.htmlId)("aria-setsize",i.itemsList.filteredItems.length)("aria-posinset",e.index+1),l(3),m("ngTemplateOutlet",e.children?i.optgroupTemplate()||t:i.optionTemplate()||t)("ngTemplateOutletContext",Wi(19,qa,e.value,e,e.index,i.searchTerm))}}function rr(o,n){if(o&1&&(a(0,"span")(1,"span",35),s(2),r(),s(3),r()),o&2){let e=u(3);l(2),M(e.addTagText()||e.config.addTagText),l(),L('"',e.searchTerm,'"')}}function lr(o,n){}function sr(o,n){if(o&1){let e=A();a(0,"div",34),E("mouseover",function(){y(e);let i=u(2);return T(i.itemsList.unmarkItem())})("click",function(){y(e);let i=u(2);return T(i.selectTag())}),Ae(1,rr,4,2,"ng-template",null,6,He)(3,lr,0,0,"ng-template",12),r()}if(o&2){let e=xe(2),t=u(2);ye("ng-option-marked",!t.itemsList.markedItem),ze("aria-selected",!1),l(3),m("ngTemplateOutlet",t.tagTemplate()||e)("ngTemplateOutletContext",Ye(5,eo,t.searchTerm))}}function dr(o,n){if(o&1&&(a(0,"div",36),s(1),r()),o&2){let e=u(3);l(),M(e.notFoundText()??e.config.notFoundText)}}function cr(o,n){}function mr(o,n){if(o&1&&Ae(0,dr,2,1,"ng-template",null,7,He)(2,cr,0,0,"ng-template",12),o&2){let e=xe(1),t=u(2);l(2),m("ngTemplateOutlet",t.notFoundTemplate()||e)("ngTemplateOutletContext",Ye(2,eo,t.searchTerm))}}function ur(o,n){if(o&1&&(a(0,"div",36),s(1),r()),o&2){let e=u(3);l(),M(e.typeToSearchText()||e.config.typeToSearchText)}}function pr(o,n){}function fr(o,n){if(o&1&&Ae(0,ur,2,1,"ng-template",null,8,He)(2,pr,0,0,"ng-template",20),o&2){let e=xe(1),t=u(2);l(2),m("ngTemplateOutlet",t.typeToSearchTemplate()||e)}}
12function hr(o,n){if(o&1&&(a(0,"div",36),s(1),r()),o&2){let e=u(3);l(),M(e.loadingText()||e.config.loadingText)}}function vr(o,n){}function gr(o,n){if(o&1&&Ae(0,hr,2,1,"ng-template",null,9,He)(2,vr,0,0,"ng-template",12),o&2){let e=xe(1),t=u(2);l(2),m("ngTemplateOutlet",t.loadingTextTemplate()||e)("ngTemplateOutletContext",Ye(2,eo,t.searchTerm))}}function Cr(o,n){if(o&1){let e=A();a(0,"ng-dropdown-panel",29),E("update",function(i){y(e);let d=u();return T(d.viewPortItems=i)})("scroll",function(i){y(e);let d=u();return T(d.scroll.emit(i))})("scrollToEnd",function(i){y(e);let d=u();return T(d.scrollToEnd.emit(i))})("outsideClick",function(){y(e);let i=u();return T(i.close())}),Li(1),ne(2,ar,4,24,"div",30,si().trackByOption,!0),g(4,sr,4,7,"div",31),Bi(),g(5,mr,3,4),g(6,fr,3,1),g(7,gr,3,4),r()}if(o&2){let e=u(),t=e.appendTo()||e.config.appendTo;de(t?e.ngClass()?e.ngClass():e.classes:null),ye("ng-select-multiple",e.multiple()),m("virtualScroll",e.virtualScroll()??!e.config.disableVirtualScroll??!1)("bufferAmount",e.bufferAmount())("appendTo",t)("position",e.dropdownPosition())("outsideClickEvent",e.outsideClickEvent())("headerTemplate",e.headerTemplate())("footerTemplate",e.footerTemplate())("filterValue",e.searchTerm)("items",e.itemsList.filteredItems)("showAddTag",e.showAddTag)("markedItem",e.itemsList.markedItem)("id",e.dropdownId)("ariaLabelDropdown",e.ariaLabelDropdown()??e.config.ariaLabelDropdown)("popover",e.popover()),l(2),ae(e.viewPortItems),l(2),C(e.showAddTag?4:-1),l(),C(e.showNoItemsFound()?5:-1),l(),C(e.showTypeToSearch()?6:-1),l(),C(e.loading()&&e.itemsList.filteredItems.length===0?7:-1)}}function br(o,n){if(o&1&&s(0),o&2){let e=u();L(" ",e.notFoundText()??e.config.notFoundText," ")}}var Pn=/[&<>"']/g,_r=RegExp(Pn.source),Dr={"&":"&","<":"<",">":">",'"':""","'":"'"};function Er(o){return o&&_r.test(o)?o.replace(Pn,n=>Dr[n]):o}function be(o){return o!=null}function bt(o){return typeof o=="object"&&be(o)}function Mr(o){return o instanceof Promise}function ho(o){return o instanceof Function}var Sr=(()=>{class o{constructor(){this.element=f(Te),this.ngItemLabel=b(),this.escape=b(!0),rt(()=>{this.element.nativeElement.innerHTML=this.escape()?Er(this.ngItemLabel()):this.ngItemLabel()})}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:[1,"ngItemLabel"],escape:[1,"escape"]}})}}return o})(),bn=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-option-tmp",""]]})}}return o})(),_n=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-optgroup-tmp",""]]})}}return o})(),Dn=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-label-tmp",""]]})}}return o})(),En=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-multi-label-tmp",""]]})}}return o})(),Mn=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-header-tmp",""]]})}}return o})(),Sn=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-footer-tmp",""]]})}}return o})(),xn=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-notfound-tmp",""]]})}}return o})(),yn=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-placeholder-tmp",""]]})}}return o})(),Tn=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-typetosearch-tmp",""]]})}}return o}
12)(),In=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-loadingtext-tmp",""]]})}}return o})(),wn=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-tag-tmp",""]]})}}return o})(),Nn=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-loadingspinner-tmp",""]]})}}return o})(),Fn=(()=>{class o{constructor(){this.template=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["","ng-clearbutton-tmp",""]]})}}return o})(),xr=(()=>{class o{constructor(){this.fixedPlaceholder=!0,this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.ariaLabelDropdown="Options List",this.disableVirtualScroll=!0,this.openOnEnter=!0,this.appearance="underline",this.tabFocusOnClear=!0,this.outsideClickEvent="click"}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})(),yr=(()=>{class o{warn(e){console.warn(e)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function Vn(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(Math.random()*16|0).toString(16))}var Tr={"\u24B6":"A",\uFF21:"A",\u00C0:"A",\u00C1:"A",\u00C2:"A",\u1EA6:"A",\u1EA4:"A",\u1EAA:"A",\u1EA8:"A",\u00C3:"A",\u0100:"A",\u0102:"A",\u1EB0:"A",\u1EAE:"A",\u1EB4:"A",\u1EB2:"A",\u0226:"A",\u01E0:"A",\u00C4:"A",\u01DE:"A",\u1EA2:"A",\u00C5:"A",\u01FA:"A",\u01CD:"A",\u0200:"A",\u0202:"A",\u1EA0:"A",\u1EAC:"A",\u1EB6:"A",\u1E00:"A",\u0104:"A","\u023A":"A","\u2C6F":"A","\uA732":"AA",\u00C6:"AE",\u01FC:"AE",\u01E2:"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B",\uFF22:"B",\u1E02:"B",\u1E04:"B",\u1E06:"B","\u0243":"B",\u0182:"B",\u0181:"B","\u24B8":"C",\uFF23:"C",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u00C7:"C",\u1E08:"C",\u0187:"C","\u023B":"C","\uA73E":"C","\u24B9":"D",\uFF24:"D",\u1E0A:"D",\u010E:"D",\u1E0C:"D",\u1E10:"D",\u1E12:"D",\u1E0E:"D",\u0110:"D",\u018B:"D",\u018A:"D",\u0189:"D","\uA779":"D",\u01F1:"DZ",\u01C4:"DZ",\u01F2:"Dz",\u01C5:"Dz","\u24BA":"E",\uFF25:"E",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u1EC0:"E",\u1EBE:"E",\u1EC4:"E",\u1EC2:"E",\u1EBC:"E",\u0112:"E",\u1E14:"E",\u1E16:"E",\u0114:"E",\u0116:"E",\u00CB:"E",\u1EBA:"E",\u011A:"E",\u0204:"E",\u0206:"E",\u1EB8:"E",\u1EC6:"E",\u0228:"E",\u1E1C:"E",\u0118:"E",\u1E18:"E",\u1E1A:"E",\u0190:"E",\u018E:"E","\u24BB":"F",\uFF26:"F",\u1E1E:"F",\u0191:"F","\uA77B":"F","\u24BC":"G",\uFF27:"G",\u01F4:"G",\u011C:"G",\u1E20:"G",\u011E:"G",\u0120:"G",\u01E6:"G",\u0122:"G",\u01E4:"G",\u0193:"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H",\uFF28:"H",\u0124:"H",\u1E22:"H",\u1E26:"H",\u021E:"H",\u1E24:"H",\u1E28:"H",\u1E2A:"H",\u0126:"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I",\uFF29:"I",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u0128:"I",\u012A:"I",\u012C:"I",\u0130:"I",\u00CF:"I",\u1E2E:"I",\u1EC8:"I",\u01CF:"I",\u0208:"I",\u020A:"I",\u1ECA:"I",\u012E:"I",\u1E2C:"I",\u0197:"I","\u24BF":"J",\uFF2A:"J",\u0134:"J","\u0248":"J","\u24C0":"K",\uFF2B:"K",\u1E30:"K",\u01E8:"K",\u1E32:"K",\u0136:"K",\u1E34:"K",\u0198:"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L",\uFF2C:"L",\u013F:"L",\u0139:"L",\u013D:"L",\u1E36:"L",\u1E38:"L",\u013B:"L",\u1E3C:"L",\u1E3A:"L",\u0141:"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L",\u01C7:"LJ",\u01C8:"Lj","\u24C2":"M",\uFF2D:"M",\u1E3E:"M",\u1E40:"M",\u1E42:"M","\u2C6E":"M",\u019C:"M","\u24C3":"N",\uFF2E:"N",\u01F8:"N",\u0143:"N",\u00D1:"N",\u1E44:"N",\u0147:"N",\u1E46:"N",\u0145:"N",\u1E4A:"N",\u1E48:"N","\u0220":"N",\u019D:"N","\uA790":"N","\uA7A4":"N",\u01CA:"NJ",\u01CB:"Nj","\u24C4":"O",\uFF2F:"O",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u1ED2:"O",\u1ED0:"O",\u1ED6:"O",\u1ED4:"O",\u00D5:"O",\u1E4C:"O",\u022C:"O",\u1E4E:"O",\u014C:"O",\u1E50:"O",\u1E52:"O",\u014E:"O",\u022E:"O",\u0230:"O",\u00D6:"O",\u022A:"O",\u1ECE:"O",\u0150:"O",\u01D1:"O",\u020C:"O",\u020E:"O",\u01A0:"O",\u1EDC:"O",\u1EDA:"O",\u1EE0:"O",\u1EDE:"O",\u1EE2:"O",\u1ECC:"O",\u1ED8:"O",\u01EA:"O",\u01EC:"O",\u00D8:"O",\u01FE:"O",\u0186:"O",\u019F:"O","\uA74A":"O","\uA74C":"O",\u01A2:"OI","\uA74E":"OO",\u0222:"OU","\u24C5":"P",\uFF30:"P",\u1E54:"P",\u1E56:"P",\u01A4:"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q",\uFF31:"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R",\uFF32:"R",\u0154:"R",\u1E58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1E5A:"R",\u1E5C:"R",\u0156:"R",\u1E5E:"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S",\uFF33:"S","\u1E9E":"S",\u015A:"S",\u1E64:"S",\u015C:"S",\u1E60:"S",\u0160:"S",\u1E66:"S",\u1E62:"S",\u1E68:"S",\u0218:"S",\u015E:"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T",\uFF34:"T",\u1E6A:"T",\u0164:"T",\u1E6C:"T",\u021A:"T",\u0162:"T",\u1E70:"T",\u1E6E:"T",\u0166:"T",\u01AC:"T",\u01AE:"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U",\uFF35:"U",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u0168:"U",\u1E78:"U",\u016A:"U",\u1E7A:"U",\u016C:"U",\u00DC:"U",\u01DB:"U",\u01D7:"U",\u01D5:"U",\u01D9:"U",\u1EE6:"U",\u016E:"U",\u0170:"U",\u01D3:"U",\u0214:"U",\u0216:"U",\u01AF:"U",\u1EEA:"U",\u1EE8:"U",\u1EEE:"U",\u1EEC:"U",\u1EF0:"U",\u1EE4:"U",\u1E72:"U",\u0172:"U",\u1E76:"U",\u1E74:"U","\u0244":"U","\u24CB":"V",\uFF36:"V",\u1E7C:"V",\u1E7E:"V",\u01B2:"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W",\uFF37:"W",\u1E80:"W",\u1E82:"W",\u0174:"W",\u1E86:"W",\u1E84:"W",\u1E88:"W","\u2C72":"W","\u24CD":"X",\uFF38:"X",\u1E8A:"X",\u1E8C:"X","\u24CE":"Y",\uFF39:"Y",\u1EF2:"Y",\u00DD:"Y",\u0176:"Y",\u1EF8:"Y",\u0232:"Y",\u1E8E:"Y",\u0178:"Y",\u1EF6:"Y",\u1EF4:"Y",\u01B3:"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z",\uFF3A:"Z",\u0179:"Z",\u1E90:"Z",\u017B:"Z",\u017D:"Z",\u1E92:"Z",\u1E94:"Z",\u01B5:"Z",\u0224:"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a",\uFF41:"a",\u1E9A:"a",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u1EA7:"a",\u1EA5:"a",\u1EAB:"a",\u1EA9:"a",\u00E3:"a",\u0101:"a",\u0103:"a",\u1EB1:"a",\u1EAF:"a",\u1EB5:"a",\u1EB3:"a",\u0227:"a",\u01E1:"a",\u00E4:"a",\u01DF:"a",\u1EA3:"a",\u00E5:"a",\u01FB:"a",\u01CE:"a",\u0201:"a",\u0203:"a",\u1EA1:"a",\u1EAD:"a",\u1EB7:"a",\u1E01:"a",\u0105:"a","\u2C65":"a",\u0250:"a","\uA733":"aa",\u00E6:"ae",\u01FD:"ae",\u01E3:"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b",\uFF42:"b",\u1E03:"b",\u1E05:"b",\u1E07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24D2":"c",\uFF43:"c",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u00E7:"c",\u1E09:"c",\u0188:"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d",\uFF44:"d",\u1E0B:"d",\u010F:"d",\u1E0D:"d",\u1E11:"d",\u1E13:"d",\u1E0F:"d",\u0111:"d",\u018C:"d",\u0256:"d",\u0257:"d","\uA77A":"d",\u01F3:"dz",\u01C6:"dz","\u24D4":"e",\uFF45:"e",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u1EC1:"e",\u1EBF:"e",\u1EC5:"e",\u1EC3:"e",\u1EBD:"e",\u0113:"e",\u1E15:"e",\u1E17:"e",\u0115:"e",\u0117:"e",\u00EB:"e",\u1EBB:"e",\u011B:"e",\u0205:"e",\u0207:"e",\u1EB9:"e",\u1EC7:"e",\u0229:"e",\u1E1D:"e",\u0119:"e",\u1E19:"e",\u1E1B:"e","\u0247":"e",\u025B:"e",\u01DD:"e","\u24D5":"f",\uFF46:"f",\u1E1F:"f",\u0192:"f","\uA77C":"f","\u24D6":"g",\uFF47:"g",\u01F5:"g",\u011D:"g",\u1E21:"g",\u011F:"g",\u0121:"g",\u01E7:"g",\u0123:"g",\u01E5:"g",\u0260:"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h",\uFF48:"h",\u0125:"h",\u1E23:"h",\u1E27:"h",\u021F:"h",\u1E25:"h",\u1E29:"h",\u1E2B:"h",\u1E96:"h",\u0127:"h","\u2C68":"h","\u2C76":"h",\u0265:"h",\u0195:"hv","\u24D8":"i",\uFF49:"i",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u0129:"i",\u012B:"i",\u012D:"i",\u00EF:"i",\u1E2F:"i",\u1EC9:"i",\u01D0:"i",\u0209:"i",\u020B:"i",\u1ECB:"i",\u012F:"i",\u1E2D:"i",\u0268:"i",\u0131:"i","\u24D9":"j",\uFF4A:"j",\u0135:"j",\u01F0:"j","\u0249":"j","\u24DA":"k",\uFF4B:"k",\u1E31:"k",\u01E9:"k",\u1E33:"k",\u0137:"k",\u1E35:"k",\u0199:"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l",\uFF4C:"l",\u0140:"l",\u013A:"l",\u013E:"l",\u1E37:"l",\u1E39:"l",\u013C:"l",\u1E3D:"l",\u1E3B:"l",\u017F:"l",\u0142:"l",\u019A:"l",\u026B:"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l",\u01C9:"lj","\u24DC":"m",\uFF4D:"m",\u1E3F:"m",\u1E41:"m",\u1E43:"m",\u0271:"m",\u026F:"m","\u24DD":"n",\uFF4E:"n",\u01F9:"n",\u0144:"n",\u00F1:"n",\u1E45:"n",\u0148:"n",\u1E47:"n",\u0146:"n",\u1E4B:"n",\u1E49:"n",\u019E:"n",\u0272:"n",\u0149:"n","\uA791":"n","\uA7A5":"n",\u01CC:"nj","\u24DE":"o",\uFF4F:"o",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u1ED3:"o",\u1ED1:"o",\u1ED7:"o",\u1ED5:"o",\u00F5:"o",\u1E4D:"o",\u022D:"o",\u1E4F:"o",\u014D:"o",\u1E51:"o",\u1E53:"o",\u014F:"o",\u022F:"o",\u0231:"o",\u00F6:"o",\u022B:"o",\u1ECF:"o",\u0151:"o",\u01D2:"o",\u020D:"o",\u020F:"o",\u01A1:"o",\u1EDD:"o",\u1EDB:"o",\u1EE1:"o",\u1EDF:"o",\u1EE3:"o",\u1ECD:"o",\u1ED9
12:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u0254:"o","\uA74B":"o","\uA74D":"o",\u0275:"o",\u01A3:"oi",\u0223:"ou","\uA74F":"oo","\u24DF":"p",\uFF50:"p",\u1E55:"p",\u1E57:"p",\u01A5:"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q",\uFF51:"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r",\uFF52:"r",\u0155:"r",\u1E59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1E5B:"r",\u1E5D:"r",\u0157:"r",\u1E5F:"r","\u024D":"r",\u027D:"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s",\uFF53:"s",\u00DF:"s",\u015B:"s",\u1E65:"s",\u015D:"s",\u1E61:"s",\u0161:"s",\u1E67:"s",\u1E63:"s",\u1E69:"s",\u0219:"s",\u015F:"s","\u023F":"s","\uA7A9":"s","\uA785":"s",\u1E9B:"s","\u24E3":"t",\uFF54:"t",\u1E6B:"t",\u1E97:"t",\u0165:"t",\u1E6D:"t",\u021B:"t",\u0163:"t",\u1E71:"t",\u1E6F:"t",\u0167:"t",\u01AD:"t",\u0288:"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u",\uFF55:"u",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u0169:"u",\u1E79:"u",\u016B:"u",\u1E7B:"u",\u016D:"u",\u00FC:"u",\u01DC:"u",\u01D8:"u",\u01D6:"u",\u01DA:"u",\u1EE7:"u",\u016F:"u",\u0171:"u",\u01D4:"u",\u0215:"u",\u0217:"u",\u01B0:"u",\u1EEB:"u",\u1EE9:"u",\u1EEF:"u",\u1EED:"u",\u1EF1:"u",\u1EE5:"u",\u1E73:"u",\u0173:"u",\u1E77:"u",\u1E75:"u",\u0289:"u","\u24E5":"v",\uFF56:"v",\u1E7D:"v",\u1E7F:"v",\u028B:"v","\uA75F":"v",\u028C:"v","\uA761":"vy","\u24E6":"w",\uFF57:"w",\u1E81:"w",\u1E83:"w",\u0175:"w",\u1E87:"w",\u1E85:"w",\u1E98:"w",\u1E89:"w","\u2C73":"w","\u24E7":"x",\uFF58:"x",\u1E8B:"x",\u1E8D:"x","\u24E8":"y",\uFF59:"y",\u1EF3:"y",\u00FD:"y",\u0177:"y",\u1EF9:"y",\u0233:"y",\u1E8F:"y",\u00FF:"y",\u1EF7:"y",\u1E99:"y",\u1EF5:"y",\u01B4:"y","\u024F":"y","\u1EFF":"y","\u24E9":"z",\uFF5A:"z",\u017A:"z",\u1E91:"z",\u017C:"z",\u017E:"z",\u1E93:"z",\u1E95:"z",\u01B6:"z",\u0225:"z","\u0240":"z","\u2C6C":"z","\uA763":"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038A:"\u0399",\u03AA:"\u0399",\u038C:"\u039F",\u038E:"\u03A5",\u03AB:"\u03A5",\u038F:"\u03A9",\u03AC:"\u03B1",\u03AD:"\u03B5",\u03AE:"\u03B7",\u03AF:"\u03B9",\u03CA:"\u03B9",\u0390:"\u03B9",\u03CC:"\u03BF",\u03CD:"\u03C5",\u03CB:"\u03C5",\u03B0:"\u03C5",\u03C9:"\u03C9",\u03C2:"\u03C3"};function fo(o){let n=e=>Tr[e]||e;
12return o.replace(/[^\u0000-\u007E]/g,n)}var fi=class{constructor(n,e){this._ngSelect=n,this._selectionModel=e,this._items=[],this._filteredItems=[],this._markedIndex=-1}get items(){return this._items}get filteredItems(){return this._filteredItems}get markedIndex(){return this._markedIndex}get selectedItems(){return this._selectionModel.value}get markedItem(){return this._filteredItems[this._markedIndex]}get noItemsToSelect(){return this._ngSelect.hideSelected()&&this._items.length===this.selectedItems.length}get maxItemsSelected(){return this._ngSelect.multiple()&&this._ngSelect.maxSelectedItems()<=this.selectedItems.length}get lastSelectedItem(){let n=this.selectedItems.length-1;for(;n>=0;n--){let e=this.selectedItems[n];if(!e.disabled)return e}return null}setItems(n){this._items=n.map((t,i)=>this.mapItem(t,i));let e=this._ngSelect.groupBy();e?(this._groups=this._groupBy(this._items,e),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=[...this._items]}select(n){if(n.selected||this.maxItemsSelected)return;let e=this._ngSelect.multiple();e||this.clearSelected(!1),this._selectionModel.select(n,e,this._ngSelect.selectableGroupAsModel()),this._ngSelect.hideSelected()&&this._hideSelected(n)}unselect(n){if(!n.selected)return;let e=this._ngSelect.multiple();this._selectionModel.unselect(n,e),this._ngSelect.hideSelected()&&be(n.index)&&e&&this._showSelected(n)}findItem(n){let e;return this._ngSelect.compareWith()?e=t=>this._ngSelect.compareWith()(t.value,n):this._ngSelect.bindValue()?e=t=>!t.children&&this.resolveNested(t.value,this._ngSelect.bindValue())===n:e=t=>t.value===n||!t.children&&t.label&&t.label===this.resolveNested(n,this._ngSelect.bindLabel()),this._items.find(t=>e(t))}addItem(n){let e=this.mapItem(n,this._items.length);return this._items.push(e),this._filteredItems.push(e),e}clearSelected(n){this._selectionModel.clear(n),this._items.forEach(e=>{e.selected=n&&e.selected&&e.disabled,e.marked=!1}),this._ngSelect.hideSelected()&&this.resetFilteredItems()}findByLabel(n){return n=fo(n).toLocaleLowerCase(),this.filteredItems.find(e=>fo(e.label).toLocaleLowerCase().substr(0,n.length)===n)}filter(n){if(!n){this.resetFilteredItems();return}this._filteredItems=[],n=this._ngSelect.searchFn()?n:fo(n).toLocaleLowerCase();let e=this._ngSelect.searchFn()||this._defaultSearchFn,t=this._ngSelect.hideSelected();for(let i of Array.from(this._groups.keys())){let d=[];for(let p of this._groups.get(i)){if(t&&(p.parent&&p.parent.selected||p.selected))continue;let _=this._ngSelect.searchFn()?p.value:p;e(n,_)&&d.push(p)}if(d.length>0){let[p]=d.slice(-1);if(p.parent){let _=this._items.find(I=>I===p.parent);this._filteredItems.push(_)}this._filteredItems.push(...d)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._ngSelect.hideSelected()&&this.selectedItems.length>0?this._filteredItems=this._items.filter(n=>!n.selected):this._filteredItems=this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(n){this._markedIndex=this._filteredItems.indexOf(n)}markSelectedOrDefault(n){if(this._filteredItems.length===0)return;let e=this._getLastMarkedIndex();e>-1?this._markedIndex=e:this._markedIndex=n?this.filteredItems.findIndex(t=>!t.disabled):-1}resolveNested(n,e){if(!bt(n))return n;if(e.indexOf(".")===-1)return n[e];{let t=e.split("."),i=n;for(let d=0,p=t.length;d<p;++d){if(i==null)return null;i=i[t[d]]}return i}}mapItem(n,e){let t=bt(n)&&"$ngOptionLabel"in n,i=bt(n)&&"$ngOptionValue"in n,d=t?n.$ngOptionLabel:this.resolveNested(n,this._ngSelect.bindLabel()),p=i?n.$ngOptionValue:n;return{index:e,label:be(d)?d.toString():"",value:p,disabled:n&&n.disabled?n.disabled:!1,htmlId:`${this._ngSelect.dropdownId}-${e}`}}mapSelectedItems(){let n=this._ngSelect.multiple();for(let e of this.selectedItems){let t=this._ngSelect.bindValue(),i=t?this.resolveNested(e.value,t):e.value,d=be(i),p=d?this.findItem(i):null;!p&&!d&&this._ngSelect.compareWith()&&(p=this._items.find(_=>this._ngSelect.compareWith()(_.value,e.value))),this._selectionModel.unselect(e,n),this._selectionModel.select(p||e,n,this._ngSelect.selectableGroupAsModel())}this._ngSelect.hideSelected()&&(this._filteredItems=this.filteredItems.filter(e=>this.selectedItems.indexOf(e)===-1))}_showSelected(n){if(this._filteredItems.push(n),n.parent){let e=n.parent;this._filteredItems.find(i=>i===e)||this._filteredItems.push(e)}else if(n.children)for(let e of n.children)e.selected=!1,this._filteredItems.push(e);this._filteredItems=[...this._filteredItems.sort((e,t)=>
12e.index-t.index)]}_hideSelected(n){this._filteredItems=this._filteredItems.filter(e=>e!==n),n.parent?n.parent.children.every(t=>t.selected)&&(this._filteredItems=this._filteredItems.filter(t=>t!==n.parent)):n.children&&(this._filteredItems=this.filteredItems.filter(e=>e.parent!==n))}_defaultSearchFn(n,e){return fo(e.label).toLocaleLowerCase().indexOf(n)>-1}_getNextItemIndex(n){return n>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(n){this._filteredItems.length===0||this._filteredItems.every(e=>e.disabled)||(this._markedIndex=this._getNextItemIndex(n),this.markedItem.disabled&&this._stepToItem(n))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected()||this._markedIndex>-1&&this.markedItem===void 0)return-1;let n=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&n<0?-1:Math.max(this.markedIndex,n)}_groupBy(n,e){let t=new Map;if(n.length===0)return t;let i=n[0].value;if(i!=null&&Array.isArray(i[e])){for(let _ of n){let I=(_.value?.[e]||[]).map((w,ie)=>this.mapItem(w,ie));t.set(_,I)}return t}let d=ho(this._ngSelect.groupBy()),p=_=>{let I=d?e(_.value):_.value?.[e];return be(I)?I:void 0};for(let _ of n){let I=p(_),w=t.get(I);w?w.push(_):t.set(I,[_])}return t}_flatten(n){let e=ho(this._ngSelect.groupBy()),t=[];for(let i of Array.from(n.keys())){let d=t.length;if(i===void 0){let ce=n.get(void 0)||[];t.push(...ce.map(N=>(N.index=d++,N)));continue}let p=bt(i),_={label:p?"":String(i),children:void 0,parent:null,index:d++,disabled:!this._ngSelect.selectableGroup(),htmlId:Vn()},I=e?this._ngSelect.bindLabel():this._ngSelect.groupBy(),w=this._ngSelect.groupValue()||(()=>p?i.value:{[I]:i}),ie=n.get(i).map(ce=>(ce.parent=_,ce.children=void 0,ce.index=d++,ce));_.children=ie,_.value=w(i,ie.map(ce=>ce.value)),t.push(_),t.push(...ie)}return t}},Gn=(()=>{class o{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(e,t,i){let d=this._dimensions,p=d.itemHeight*t,I=Math.max(0,e)/p*t,w=Math.min(t,Math.ceil(I)+(d.itemsPerViewport+1)),ce=Math.max(0,w-d.itemsPerViewport),N=Math.min(ce,Math.floor(I)),fe=d.itemHeight*Math.ceil(N)-d.itemHeight*Math.min(N,i);return fe=isNaN(fe)?0:fe,N=isNaN(N)?-1:N,w=isNaN(w)?-1:w,N-=i,N=Math.max(0,N),w+=i,w=Math.min(t,w),{topPadding:fe,scrollHeight:p,start:N,end:w}}setDimensions(e,t){let i=Math.max(1,Math.floor(t/e));this._dimensions={itemHeight:e,panelHeight:t,itemsPerViewport:i}}getScrollTo(e,t,i){let{panelHeight:d}=this.dimensions,p=e+t,_=i,I=_+d;return d>=p&&i===e?null:p>I?_+p-I:e<=_?e:null}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac})}}return o})(),On=["top","right","bottom","left"],An=typeof requestAnimationFrame<"u"?wi:Ii,pi=(()=>{class o{constructor(){this.items=b([]),this.showAddTag=b(!1,{transform:ve}),this.markedItem=b(void 0),this.position=b("auto"),this.appendTo=b(void 0),this.bufferAmount=b(void 0),this.virtualScroll=b(!1,{transform:ve}),this.headerTemplate=b(void 0),this.footerTemplate=b(void 0),this.filterValue=b(null),this.ariaLabelDropdown=b(null),this.outsideClickEvent=b("click"),this.popover=b(!1,{transform:ve}),this.update=ge(),this.scroll=ge(),this.scrollToEnd=ge(),this.outsideClick=ge(),this._renderer=f(Pi),this._zone=f(Et),this._panelService=f(Gn),this._document=f(Dt,{optional:!0}),this._destroyRef=f(gt),this._dropdown=f(Te).nativeElement,this.contentElementRef=Ct("content",{read:Te}),this.scrollElementRef=Ct("scroll",{read:Te}),this.paddingElementRef=Ct("padding",{read:Te}),this._virtualPadding=it(()=>this.paddingElementRef()?.nativeElement),this._scrollablePanel=it(()=>this.scrollElementRef()?.nativeElement),this._contentPanel=it(()=>this.contentElementRef()?.nativeElement),this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._destroyRef.onDestroy(()=>{this.appendTo()&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)})}get currentPosition(){return this._currentPosition}get itemsLength(){return this._itemsLength}set itemsLength(e){e!==this._itemsLength&&(this._itemsLength=e,this._onItemsLengthChanged())}get _startOffset(){if(this.markedItem()){let{itemHeight:e,panelHeight:t}=this._panelService.dimensions,i=this.markedItem().index*e;return t>i?0:i}return 0}ngOnInit(){this._select=this._dropdown.parentElement,this._handleScroll(),this._handleOutsideClick(),this._appendDropdown(),this._setupMousedownListener(),this._handleWindowScroll(),this._showPopoverIfNeeded()}ngOnChanges(e){if(e.items){let t=e.items;this._onItemsOrShowAddTagChange(t.currentValue,this.showAddTag(),t.firstChange)}if(e.showAddTag){let t=e.showAddTag;this._onItemsOrShowAddTagChange(this.items(),t.currentValue,t.firstChange)}}scrollTo(e,t=!1){if(!e)return;let i=this.items().indexOf(e);if(i<0||i>=this.itemsLength)return;let d;if(this.virtualScroll()){let p=this._panelService.dimensions.itemHeight;d=this._panelService.getScrollTo(i*p,p,this._lastScrollPosition)}else{let p=this._dropdown.querySelector(`#${e.htmlId}`),_=t?p.offsetTop:this._lastScrollPosition;d=this._panelService.getScrollTo(p.offsetTop,p.clientHeight,_)}be(d)&&(this._scrollablePanel().scrollTop=d)}scrollToTag(){let e=this._scrollablePanel();e.scrollTop=e.scrollHeight-e.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),On.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),(this.appendTo()||this.popover())&&this._updateYPosition(),this._dropdown.style.opacity="1"}
12_updateDropdownClass(e){On.forEach(i=>{let d=`ng-select-${i}`;this._renderer.removeClass(this._dropdown,d),this._renderer.removeClass(this._select,d)});let t=`ng-select-${e}`;this._renderer.addClass(this._dropdown,t),this._renderer.addClass(this._select,t)}_handleScroll(){this._zone.runOutsideAngular(()=>{let e=this._scrollablePanel();e&&Oe(e,"scroll").pipe(Je(this._destroyRef),ii(0,An)).subscribe(()=>{e&&"scrollTop"in e&&this._onContentScrolled(e.scrollTop)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{Oe(this._document,this.outsideClickEvent(),{capture:!0}).pipe(Je(this._destroyRef)).subscribe(e=>this._checkToClose(e))})}_checkToClose(e){if(this._select.contains(e.target)||this._dropdown.contains(e.target))return;let t=e.path||e.composedPath&&e.composedPath();e.target&&e.target.shadowRoot&&t&&t[0]&&this._select.contains(t[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsOrShowAddTagChange(e=[],t,i){this._scrollToEndFired=!1,this.itemsLength=e.length,t&&e.length&&this.itemsLength++,this.virtualScroll()?this._updateItemsRange(i):(this._setVirtualHeight(),this._updateItems(i))}_updateItems(e){this.update.emit(this.items()),e!==!1&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{let t=this._scrollablePanel().clientHeight;this._panelService.setDimensions(0,t),this._handleDropdownPosition(),this.scrollTo(this.markedItem(),e)})})}_updateItemsRange(e){this._zone.runOutsideAngular(()=>{this._measureDimensions().then(()=>{e?(this._renderItemsRange(this._startOffset),this._handleDropdownPosition()):this._renderItemsRange()})})}_onContentScrolled(e){this.virtualScroll()&&this._renderItemsRange(e),this._lastScrollPosition=e,this._fireScrollToEnd(e)}_updateVirtualHeight(e){this._updateScrollHeight&&(this._virtualPadding().style.height=`${e}px`,this._updateScrollHeight=!1)}_setVirtualHeight(){this._virtualPadding()&&(this._virtualPadding().style.height="0px")}_onItemsLengthChanged(){this._updateScrollHeight=!0}_renderItemsRange(e=null){if(e&&this._lastScrollPosition===e)return;e=e||this._scrollablePanel().scrollTop;let t=this._panelService.calculateItems(e,this.itemsLength,this.bufferAmount());this._updateVirtualHeight(t.scrollHeight),this._contentPanel().style.transform=`translateY(${t.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items().slice(t.start,t.end)),this.scroll.emit({start:t.start,end:t.end})}),be(e)&&this._lastScrollPosition===0&&(this._scrollablePanel().scrollTop=e,this._lastScrollPosition=e)}_measureDimensions(){if(this._panelService.dimensions.itemHeight>0||this.itemsLength===0)return Promise.resolve(this._panelService.dimensions);let[e]=this.items();return this.update.emit([e]),Promise.resolve().then(()=>{let i=this._dropdown.querySelector(`#${e.htmlId}`).clientHeight;this._virtualPadding().style.height=`${i*this.itemsLength}px`;let d=this._scrollablePanel().clientHeight;return this._panelService.setDimensions(i,d),this._panelService.dimensions})}_fireScrollToEnd(e){if(this._scrollToEndFired||e===0)return;let t=this.virtualScroll()?this._virtualPadding():this._contentPanel();e+this._dropdown.clientHeight>=t.clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(e){let t=this.position();if(t!=="auto")return t;let i=this._select.getBoundingClientRect(),d=document.documentElement.scrollTop||document.body.scrollTop,p=i.top+window.pageYOffset,_=i.height,I=e.getBoundingClientRect().height;return p+_+I>d+document.documentElement.clientHeight?"top":"bottom"}_appendDropdown(){if(this.appendTo()){if(this._parent=this._dropdown.shadowRoot?this._dropdown.shadowRoot.querySelector(this.appendTo()):document.querySelector(this.appendTo()),!this._parent)throw new Error(`appendTo selector ${this.appendTo()} did not found any parent element`);this._updateXPosition(),this._parent.appendChild(this._dropdown)}}_updateXPosition(){let e=this._select.getBoundingClientRect(),t=this._parent.getBoundingClientRect(),i=document.documentElement.dir==="rtl",d=e.left-t.left;if(i){let p=t.right-e.right;this._dropdown.style.right=p+"px",this._dropdown.style.left="auto"}else this._dropdown.style.left=d+"px",this._dropdown.style.right="auto";this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"}_updateYPosition(){let e=this._select.getBoundingClientRect(),t=this._parent.getBoundingClientRect(),d=this._select.querySelector(".ng-select-container")?.getBoundingClientRect()??e;if(this._currentPosition==="top"){let p=t.bottom-d.top;this._dropdown.style.bottom=p+"px",this._dropdown.style.top="auto"}else if(this._currentPosition==="bottom"){let p=d.bottom-t.top;this._dropdown.style.top=p+"px",this._dropdown.style.bottom="auto"}}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{Oe(this._dropdown,"mousedown").pipe(Je(this._destroyRef)).subscribe(e=>{e.target.tagName!=="INPUT"&&e.preventDefault()})})}_handleWindowScroll(){!this.appendTo()&&!this.popover()||this._zone.runOutsideAngular(()=>{Oe(this._document,"scroll",{capture:!0,passive:!0}).pipe(Je(this._destroyRef),ii(0,An)).subscribe(()=>{this._updateXPosition(),this._updateYPosition()})})}_showPopoverIfNeeded(){this.popover()&&typeof this._dropdown.showPopover=="function"&&(this._renderer.setAttribute(this._dropdown,"popover","manual"),this._dropdown.showPopover(),this._parent=globalThis.document.body,this._updateXPosition(),this._updateYPosition())}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["ng-dropdown-panel"]],viewQuery:function(t,i){t&1&&mi(i.contentElementRef,Oa,5,Te)(i.scrollElementRef,Aa,5,Te)(i.paddingElementRef,Ra,5,Te),t&2&&ao(3)},inputs:{items:[1,"items"],showAddTag:[1,"showAddTag"],markedItem:[1,"markedItem"],position:[1,"position"],appendTo:[1,"appendTo"],bufferAmount:[1,"bufferAmount"],virtualScroll:[1,"virtualScroll"],headerTemplate:[1,"headerTemplate"],footerTemplate:[1,"footerTemplate"],filterValue:[1,"filterValue"],ariaLabelDropdown:[1,"ariaLabelDropdown"],outsideClickEvent:[1,"outsideClickEvent"],popover:[1,"popover"]},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[Mt],ngContentSelectors:kn,decls:9,vars:7,consts:[["scroll",""],["padding",""],["content",""],[1,"ng-dropdown-header"],["role","listbox",1,"ng-dropdown-panel-items","scroll-host"],[1,"ng-dropdown-footer"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,i){t&1&&(di(),g(0,k
12a,2,4,"div",3),a(1,"div",4,0),h(3,"div",null,1),a(5,"div",null,2),ci(7),r()(),g(8,Pa,2,4,"div",5)),t&2&&(C(i.headerTemplate()?0:-1),l(),ze("aria-label",i.ariaLabelDropdown()),l(2),ye("total-padding",i.virtualScroll()),l(2),ye("scrollable-content",i.virtualScroll()&&i.items().length),l(3),C(i.footerTemplate()?8:-1))},dependencies:[yt],encapsulation:2,changeDetection:0})}}return o})(),Rn=(()=>{class o{constructor(){this.value=b(),this.disabled=b(!1,{transform:ve}),this.elementRef=f(Te),this.label=j(""),this.isInitialized=j(!1),io(()=>{let e=(this.elementRef.nativeElement.innerHTML||"").trim();e!==this.label()&&this.label.set(e)})}ngOnInit(){this.isInitialized.set(!0)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["ng-option"]],inputs:{value:[1,"value"],disabled:[1,"disabled"]},ngContentSelectors:kn,decls:1,vars:0,template:function(t,i){t&1&&(di(),ci(0))},encapsulation:2,changeDetection:0})}}return o})(),Ze=(function(o){return o.Tab="Tab",o.Enter="Enter",o.Esc="Escape",o.Space=" ",o.ArrowUp="ArrowUp",o.ArrowDown="ArrowDown",o.Backspace="Backspace",o})(Ze||{});function Ir(){return new hi}var hi=class{constructor(){this._selected=[]}get value(){return this._selected}select(n,e,t){if(n.selected=!0,(!n.children||!e&&t)&&this._selected.push(n),e)if(n.parent){let i=n.parent.children.length,d=n.parent.children.filter(p=>p.selected).length;n.parent.selected=i===d}else n.children&&(this._setChildrenSelectedState(n.children,!0),this._removeChildren(n),t&&this._activeChildren(n)?this._selected=[...this._selected.filter(i=>i.parent!==n),n]:this._selected=[...this._selected,...n.children.filter(i=>!i.disabled)])}unselect(n,e){if(this._selected=this._selected.filter(t=>t!==n),n.selected=!1,e)if(n.parent&&n.parent.selected){let t=n.parent.children;this._removeParent(n.parent),this._removeChildren(n.parent),this._selected.push(...t.filter(i=>i!==n&&!i.disabled)),n.parent.selected=!1}else n.children&&(this._setChildrenSelectedState(n.children,!1),this._removeChildren(n))}clear(n){this._selected=n?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(n,e){for(let t of n)t.disabled||(t.selected=e)}_removeChildren(n){this._selected=[...this._selected.filter(e=>e.parent!==n),...n.children.filter(e=>e.parent===n&&e.disabled&&e.selected)]}_removeParent(n){this._selected=this._selected.filter(e=>e!==n)}_activeChildren(n){return n.children.every(e=>!e.disabled||e.selected)}},wr=new ai("ng-select-selection-model"),Ln=(()=>{class o{constructor(){this.classes=f(new ui("class"),{optional:!0}),this.config=f(xr),this._cd=f(Kt),this._console=f(yr),this._destroyRef=f(gt),this._disabled=j(!1),this._ariaLabelDropdown=b(void 0,{alias:"ariaLabelDropdown"}),this.ariaLabelDropdown=F(()=>this._ariaLabelDropdown()),this._ariaLabel=b(void 0,{alias:"ariaLabel"}),this.ariaLabel=F(()=>this._ariaLabel()),this._markFirst=b(!0,{alias:"markFirst",transform:ve}),this.markFirst=F(()=>this._markFirst()),this._placeholder=b(this.config.placeholder,{alias:"placeholder"}),this.placeholder=F(()=>this._placeholder()),this._fixedPlaceholder=b(!0,{alias:"fixedPlaceholder"}),this.fixedPlaceholder=F(()=>this._fixedPlaceholder()),this._notFoundText=b(void 0,{alias:"notFoundText"}),this.notFoundText=F(()=>this._notFoundText()),this._typeToSearchText=b(void 0,{alias:"typeToSearchText"}),this.typeToSearchText=F(()=>this._typeToSearchText()),this._preventToggleOnRightClick=b(!1,{alias:"preventToggleOnRightClick"}),this.preventToggleOnRightClick=F(()=>this._preventToggleOnRightClick()),this._addTagText=b(void 0,{alias:"addTagText"}),this.addTagText=F(()=>this._addTagText()),this._loadingText=b(void 0,{alias:"loadingText"}),this.loadingText=F(()=>this._loadingText()),this._clearAllText=b(void 0,{alias:"clearAllText"}),this.clearAllText=F(()=>this._clearAllText()),this._dropdownPosition=b("auto",{alias:"dropdownPosition"}),this.dropdownPosition=F(()=>this._dropdownPosition()),this._appendTo=b(void 0,{alias:"appendTo"}),this.appendTo=F(()=>this._appendTo()),this._outsideClickEvent=b(this.config.outsideClickEvent,{alias:"outsideClickEvent"}),this.outsideClickEvent=F(()=>this._outsideClickEvent()),this._loading=b(!1,{alias:"loading",transform:ve}),this.loading=F(()=>this._loading()),this._closeOnSelect=b(!0,{alias:"closeOnSelect",transform:ve}),this.closeOnSelect=F(()=>this._closeOnSelect()),this._hideSelected=b(!1,{alias:"hideSelected",transform:ve}),this.hideSelected=F(()=>this._hideSelected()),this._selectOnTab=b(!1,{alias:"selectOnTab",transform:ve}),this.selectOnTab=F(()=>this._selectOnTab()),this._openOnEnter=b(void 0,{alias:"openOnEnter",transform:ve}),this.openOnEnter=F(()=>this._openOnEnter()),this._maxSelectedItems=b(void 0,{alias:"maxSelectedItems",transform:Jt}),this.maxSelectedItems=F(()=>this._maxSelectedItems()),this._groupBy=b(void 0,{alias:"groupBy"}),this.groupBy=F(()=>this._groupBy()),this._groupValue=b(void 0,{alias:"groupValue"}),this.groupValue=F(()=>this._groupValue()),this._bufferAmount=b(4,{alias:"bufferAmount",transform:Jt}),this.bufferAmount=F(()=>this._bufferAmount()),this._virtualScroll=b(void 0,{alias:"virtualScroll",transform:ve}),this.virtualScroll=F(()=>this._virtualScroll()),this._selectableGroup=b(!1,{alias:"selectableGroup",transform:ve}),this.selectableGroup=F(()=>this._selectableGroup()),this._tabFocusOnClearButton=b(void 0,{alias:"tabFocusOnClearButton"}),this.tabFocusOnClearButton=F(()=>this._tabFocusOnClearButton()),this._selectableGroupAsModel=b(!0,{alias:"selectableGroupAsModel",transform:ve}),this.selectableGroupAsModel=F(()=>this._selectableGroupAsModel()),this._searchFn=b(null,{alias:"searchFn"}),this.searchFn=F(()=>this._searchFn()),this._trackByFn=b(null,{alias:"trackByFn"}),this.trackByFn=F(()=>this._trackByFn()),this._clearOnBackspace=b(!0,{alias:"clearOnBackspace",transform:ve}),this.clearOnBackspace=F(()=>this._clearOnBackspace()),this._labelForId=b(null,{alias:"labelForId"}),this.labelForId=F(()=>this._labelForId()),this._inputAttrs=b({},{alias:"inputAttrs"}),this.inputAttrs=F(()=>this._inputAttrs()),this._tabIndex=b(void 0,{alias:"tabIndex",transform:Jt}),this.tabIndex=F(()=>this._tabIndex()),this._readonly=b(!1,{alias:"readonly",transform:ve}),this.readonly=F(()=>this._readonly()),this._searchWhileComposing=b(!0,{alias:"searchWhileComposing",transform:ve}),this.searchWhileComposing=F(()=>this._searchWhileComposing()),this._minTermLength=b(0,{alias:"minTermLength",transform:Jt}),this.minTermLength=F(()=>this._minTermLength()),this._editableSearchTerm=b(!1,{alias:"editableSearchTerm",transform:ve}),this.editableSearchTerm=F(()=>this._editableSearchTerm()),this._ngClass=b(null,{alias:"ngClass"}),this.ngClass=F(()=>this._ngClass()),this._typeahead=b(void 0,{alias:"typeahead"}),this.typeahead=F(()=>this._typeahead()),this._multiple=b(!1,{alias:"multiple",transform:ve}),this.multiple=F(()=>this._multiple()),this._addTag=b(!1,{alias:"addTag"}),this.addTag=F(()=>this._addTag()),this._searchable=b(!0,{alias:"searchable",transform:ve}),this.searchable=F(()=>this._searchable()),this._clearable=b(!0,{alias:"clearable",transform:ve}),this.clearable=F(()=>this._clearable()),this._clearKeepsDisabledOptions=b(!0,{alias:"clearKeepsDisabledOptions",transform:ve}),this.clearKeepsDisabledOptions=F(()=>this._clearKeepsDisabledOptions()),this._deselectOnClick=b(void 0,{alias:"deselectOnClick"}),this.deselectOnClick=F(()=>this._deselectOnClick()),this._clearSearchOnAdd=b(void 0,{alias:"clearSearchOnAdd"}),this.clearSearchOnAdd=F(()=>this._clearSearchOnAdd()),this._compareWith=b(void 0,{alias:"compareWith",transform:d=>{if(d!=null&&!ho(d))throw Error("`compareWith` must be a function.");return d}}),this.compareWith=F(()=>this._compareWith()),this._keyDownFn=b(d=>!0,{alias:"keyDownFn"}),this.keyDownFn=F(()=>this._keyDownFn()),this._popover=b(!1,{alias:"popover",transform:ve}),this.popover=F(()=>this._popover()),this.bindLabel=xt(void 0),this.bindValue=xt(void 0),this.appearance=xt(void 0),this.isOpen=xt(!1),this.items=xt([]),this.blurEvent=ge({alias:"blur"}),this.focusEvent=ge({alias:"focus"}),this.changeEvent=ge({alias:"change"}),this.openEvent=ge({alias:"open"}),this.closeEvent=ge({alias:"close"}),this.searchEvent=ge({alias:"search"}),this.clearEvent=ge({alias:"clear"}),this.addEvent=ge({alias:"add"}),this.removeEvent=ge({alias:"remove"}),this.scroll=ge({alias:"scroll"}),this.scrollToEnd=ge({alias:"scrollToEnd"}),this.disabled=it(()=>this.readonly()||this._disabled()),this.clearSearchOnAddValue=it(()=>be(this.clearSearchOnAdd())?this.clearSearchOnAdd():be(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect()),this.deselectOnClickValue=it(()=>be(this.deselectOnClick())?this.deselectOnClick():be(this.config.deselectOnClick)?this.config.deselectOnClick:this.multiple()),this.optionTemplate=Le(bn,{read:q}),this.optgroupTemplate=Le(_n,{read:q}),this.labelTemplate=Le(Dn,{read:q}),this.multiLabelTemplate=Le(En,{read:q}),this.headerTemplate=Le(Mn,{read:q}),this.footerTemplate=Le(Sn,{read:q}),this.notFoundTemplate=Le(xn,{read:q}),this.placeholderTemplate=Le(yn,{read:q}),this.typeToSearchTemplate=Le(Tn,{read:q}),this.loadingTextTemplate=Le(In,{read:q}),this.tagTemplate=Le(wn,{read:q}),this.loadingSpinnerTemplate=Le(Nn,{read:q}),this.clearButtonTemplate=Le(Fn,{read:q}),this.ngOptions=Ki(Rn,{descendants:!0}),this.dropdownPanel=Ct(vt(()=>pi)),this.searchInput=Ct("searchInput"),this.clearButton=Ct("clearButton"),this.dropdownId=Vn(),this.escapeHTML=!0,this.viewPortItems=[],this.tabFocusOnClear=j(!0),this.autoFocus=f(new ui("autofocus"),{optional:!0}),this._defaultLabel="label",this._editableSearchTermActive=it(()=>this.editableSearchTerm()&&!this.multiple()),this._injector=f(at),this._isComposing=!1,this._keyPress$=new ht,this._pressedKeys=[],this._searchTerm=j(null),this._val
12idTerm=it(()=>{let d=this._searchTerm()?.trim();return d&&d.length>=this.minTermLength()}),this.clearItem=d=>{let p=this.selectedItems.find(_=>_.value===d);this.unselect(p)},this.trackByOption=(d,p)=>this.trackByFn()?this.trackByFn()(p.value):p,this._onChange=d=>{},this._onTouched=()=>{};let e=this.config,t=f(wr,{optional:!0}),i=f(Te);this._mergeGlobalConfig(e),this.itemsList=new fi(this,t?t():Ir()),this.element=i.nativeElement}get filtered(){return!!this.searchTerm&&this.searchable()||this._isComposing}get focused(){return this._focused}get searchTerm(){return this._searchTerm()}get selectedItems(){return this.itemsList.selectedItems}get selectedValues(){return this.selectedItems.map(e=>e.value)}get hasValue(){return this.selectedItems.length>0}get currentPanelPosition(){if(this.dropdownPanel())return this.dropdownPanel().currentPosition}get showAddTag(){if(!this._validTerm())return!1;let e=this.searchTerm.toLowerCase().trim();return this.addTag()&&!this.itemsList.filteredItems.some(t=>t.label.toLowerCase()===e)&&(!this.hideSelected()&&this.isOpen()||!this.selectedItems.some(t=>t.label.toLowerCase()===e))&&!this.loading()}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(e){e.multiple&&this.itemsList.clearSelected(!1),e.items&&(this._itemsAreUsed=!0,this._setItems(e.items.currentValue||[])),e.isOpen&&(this._manualOpen=be(e.isOpen.currentValue)),e.groupBy&&(e.items||this._setItems([...this.items()])),e.inputAttrs&&this._setInputAttributes(),this._setTabFocusOnClear()}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),be(this.autoFocus)&&this.focus()}handleKeyDown(e){let t=e.key;if(Object.values(Ze).includes(t)){if(this.keyDownFn()(e)===!1)return;this.handleKeyCode(e)}else t&&t.length===1&&this._keyPress$.next(t.toLocaleLowerCase())}handleKeyCode(e){let t=e.target;this.clearButton()&&this.clearButton().nativeElement===t?this.handleKeyCodeClear(e):this.handleKeyCodeInput(e)}handleKeyCodeInput(e){switch(e.key){case Ze.ArrowDown:this._handleArrowDown(e);break;case Ze.ArrowUp:this._handleArrowUp(e);break;case Ze.Space:this._handleSpace(e);break;case Ze.Enter:this._handleEnter(e);break;case Ze.Tab:this._handleTab(e);break;case Ze.Esc:this.close(),e.preventDefault();break;case Ze.Backspace:this._handleBackspace();break}}handleKeyCodeClear(e){e.key===Ze.Enter&&(this.handleClearClick(),e.preventDefault())}handleMousedown(e){if(this.disabled())return;if(this.preventToggleOnRightClick()&&e.button===2)return!1;let t=e.target;if(t.tagName!=="INPUT"&&e.preventDefault(),!t.classList.contains("ng-clear-wrapper")){if(t.classList.contains("ng-arrow-wrapper")){this.handleArrowClick();return}t.classList.contains("ng-value-icon")||(this._focused||this.focus(),this.searchable()?this.open():this.toggle())}}handleArrowClick(){this.isOpen()?this.close():this.open()}handleClearClick(e){this.hasValue&&(this.itemsList.clearSelected(this.clearKeepsDisabledOptions()),this._updateNgModel()),this._clearSearch(),this.focus(),this.clearEvent.emit(),this._onSelectionChanged()}clearModel(){this.clearable()&&(this.itemsList.clearSelected(!1),this._updateNgModel())}writeValue(e){this.itemsList.clearSelected(!1),this._handleWriteValue(e),this._editableSearchTermActive()&&this._setSearchTermFromItems(),this._cd.markForCheck()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._disabled.set(e),this._cd.markForCheck()}toggle(){this.isOpen()?this.close():this.open()}open(){this.disabled()||this.isOpen()||this._manualOpen||!this.typeahead()?.observed&&!this.addTag()&&this.itemsList.noItemsToSelect||(this.isOpen.set(!0),this.itemsList.markSelectedOrDefault(this.markFirst()),this.openEvent.emit(),this.searchTerm||this.focus(),this.detectChanges())}close(){!this.isOpen()||this._manualOpen||(this.isOpen.set(!1),this._isComposing=!1,this._editableSearchTermActive()?this.itemsList.resetFilteredItems():this._clearSearch(),this.itemsList.unmarkItem(),this._onTouched(),this.closeEvent.emit(),this.detectChanges())}toggleItem(e){!e||e.disabled||this.disabled()||(this.deselectOnClickValue()&&e.selected?this.unselect(e):this.select(e),this._editableSearchTermActive()&&this._setSearchTermFromItems())}select(e){e.selected||(this.itemsList.select(e),this.clearSearchOnAddValue()&&!this._editableSearchTermActive()&&this._clearSearch(),this._updateNgModel(),this.multiple()&&this.addEvent.emit(e.value)),(this.closeOnSelect()||this.itemsList.noItemsToSelect)&&this.close(),this._onSelectionChanged()}focus(){this.searchInput().nativeElement.focus()}blur(){this.searchInput().nativeElement.blur()}unselect(e){e&&(this.itemsList.unselect(e),this.focus(),this._updateNgModel(),this.removeEvent.emit(e.value),this._onSelectionChanged())}selectTag(){let e;ho(this.addTag())?e=this.addTag()(this.searchTerm):e=this._primitive?this.searchTerm:{[this.bindLabel()]:this.searchTerm};let t=i=>
12this.typeahead()?.observed||!this.isOpen()?this.itemsList.mapItem(i,null):this.itemsList.addItem(i);Mr(e)?e.then(i=>this.select(t(i))).catch(()=>{}):e&&this.select(t(e))}showClear(){return this.clearable()&&(this.hasValue||this.searchTerm)&&!this.disabled()}focusOnClear(){this.blur(),this.clearButton()&&this.clearButton().nativeElement.focus()}showNoItemsFound(){let e=this.itemsList.filteredItems.length===0;return(e&&!this.typeahead()?.observed&&!this.loading()||e&&this.typeahead()?.observed&&this._validTerm()&&!this.loading())&&!this.showAddTag}showTypeToSearch(){return this.itemsList.filteredItems.length===0&&this.typeahead()?.observed&&!this._validTerm()&&!this.loading()}onCompositionStart(){this._isComposing=!0}onCompositionEnd(e){this._isComposing=!1,!this.searchWhileComposing()&&this.filter(e)}filter(e){this._isComposing&&!this.searchWhileComposing()||(this._searchTerm.set(e),this.typeahead()?.observed&&(this._validTerm()||this.minTermLength()===0)&&this.typeahead().next(e),this.typeahead()?.observed||(this.itemsList.filter(e),this.isOpen()&&this.itemsList.markSelectedOrDefault(this.markFirst())),this.searchEvent.emit({term:e,items:this.itemsList.filteredItems.map(t=>t.value)}),this.open())}onInputFocus(e){this._focused||(this._editableSearchTermActive()&&this._setSearchTermFromItems(),this.element.classList.add("ng-select-focused"),this.focusEvent.emit(e),this._focused=!0)}onInputBlur(e){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(e),!this.isOpen()&&!this.disabled()&&this._onTouched(),this._editableSearchTermActive()&&this._setSearchTermFromItems(),this._focused=!1}onItemHover(e){e.disabled||this.itemsList.markItem(e)}detectChanges(){this._cd.destroyed||this._cd.detectChanges()}_setSearchTermFromItems(){let e=this.selectedItems?.[0];this._searchTerm.set(e?.label??null)}_setItems(e){let t=e[0];this.bindLabel.set(this.bindLabel()||this._defaultLabel),this._primitive=be(t)?!bt(t):this._primitive||this.bindLabel()===this._defaultLabel,this.itemsList.setItems(e),e.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen()&&be(this.searchTerm)&&!this.typeahead()?.observed&&this.itemsList.filter(this.searchTerm),(this.typeahead()?.observed||this.isOpen())&&this.itemsList.markSelectedOrDefault(this.markFirst())}_setItemsFromNgOptions(){rt(()=>{let e=this.ngOptions();if(e.length>0&&!e.every(i=>i.isInitialized()))return;this.bindLabel.set(this._defaultLabel);let t=e.map(i=>({$ngOptionValue:i.value(),$ngOptionLabel:i.elementRef.nativeElement.innerHTML,disabled:i.disabled()}))??[];this.items.set(t),this.itemsList.setItems(t),this.hasValue&&this.itemsList.mapSelectedItems(),this._cd.detectChanges(),e.map(i=>({option:i,item:this.itemsList.findItem(i.value())})).filter(({item:i})=>be(i)).forEach(({option:i,item:d})=>{d.disabled=i.disabled(),d.label=i.label()||d.label})},{injector:this._injector})}_isValidWriteValue(e){if(!be(e)||this.multiple()&&e===""||Array.isArray(e)&&e.length===0)return!1;let t=i=>!be(this.compareWith())&&bt(i)&&this.bindValue()?(this._console.warn(`Setting object(${JSON.stringify(i)}) as your model with bindValue is not allowed unless [compareWith] is used.`),!1):!0;return this.multiple()?Array.isArray(e)?e.every(i=>t(i)):(this._console.warn("Multiple select ngModel should be array."),!1):t(e)}_handleWriteValue(e){if(!this._isValidWriteValue(e))return;let t=i=>{let d=this.itemsList.findItem(i);if(d)this.itemsList.select(d);else{let p=bt(i),_=!p&&!this.bindValue();p||_?this.itemsList.select(this.itemsList.mapItem(i,null)):this.bindValue()&&(d={[this.bindLabel()]:null,[this.bindValue()]:i},this.itemsList.select(this.itemsList.mapItem(d,null)))}};this.multiple()?e.forEach(i=>t(i)):t(e)}_handleKeyPresses(){this.searchable()||this._keyPress$.pipe(Je(this._destroyRef),to(e=>this._pressedKeys.push(e)),Ri(200),We(()=>this._pressedKeys.length>0),B(()=>this._pressedKeys.join(""))).subscribe(e=>{let t=this.itemsList.findByLabel(e);t&&(this.isOpen()?t.disabled||(this.itemsList.markItem(t),this._scrollToMarked(),this._cd.markForCheck()):this.select(t)),this._pressedKeys=[]})}_setInputAttributes(){let e=this.searchInput().nativeElement,t=et({type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:"off","aria-controls":this.dropdownId},this.inputAttrs());for(let i of Object.keys(t))e.setAttribute(i,t[i])}_setTabFocusOnClear(){this.tabFocusOnClear.set(be(this.tabFocusOnClearButton())?!!this.tabFocusOnClearButton():this.config.tabFocusOnClear)}_updateNgModel(){let e=[];for(let i of this.selectedItems)if(this.bindValue()){let d=null;if(i.children){let p=this.groupValue()?this.bindValue():this.groupBy();d=i.value[p||this.groupBy()]}else d=this.itemsList.resolveNested(i.value,this.bindValue());e.push(d)}else e.push(i.value);let t=this.selectedItems.map(i=>i.value);this.multiple()?(this._onChange(e),this.changeEvent.emit(t)):(this._onChange(be(e[0])?e[0]:null),this.changeEvent.emit(t[0])),this._cd.markForCheck()}_clearSearch(){this.searchTerm&&(this._changeSearch(null),this.itemsList.resetFilteredItems())}_changeSearch(e){this._searchTerm.set(e),this.typeahead()?.observed&&this.typeahead().next(e)}_scrollToMarked(){!this.isOpen()||!this.dropdownPanel()||this.dropdownPanel().scrollTo(this.itemsList.markedItem)}_scrollToTag(){!this.isOpen()||!this.dropdownPanel()||this.dropdownPanel().scrollToTag()}_onSelectionChanged(){let e=this.appendTo()??this.config.appendTo;this.isOpen()&&this.deselectOnClickValue()&&e&&(this._cd.detectChanges(),this.dropdownPanel().adjustPosition())}_handleTab(e){if(this.isOpen()===!1){if(this.showClear()&&!e.shiftKey&&this.tabFocusOnClear())this.focusOnClear(),e.preventDefault();else if(!this.addTag())return}this.selectOnTab()?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),e.preventDefault()):this.showAddTag?(this.selectTag(),e.preventDefault()):this.close():this.close()}_handleEnter(e){let t=this.openOnEnter()??this.config.openOnEnter;if(this.isOpen()||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else if(t)this.open();else return;e.preventDefault()}_handleSpace(e){this.isOpen()||this._manualOpen||(this.open(),e.preventDefault())}_handleArrowDown(e){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),e.preventDefault()}_handleArrowUp(e){this.isOpen()&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),e.preventDefault())}_nextItemIsTag(e){let t=this.itemsList.markedIndex+e;return this.addTag()&&this.searchTerm&&this.itemsList.markedItem&&(t<0||t===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable()||!this.clearOnBackspace()||!this.hasValue||(this.multiple()?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}_mergeGlobalConfig(e){this.bindValue.set(this.bindValue()||e.bindValue),this.bindLabel.set(this.bindLabel()||e.bindLabel),this.appearance.set(this.appearance()||e.appearance),this._setTabFocusOnClear()}getVirtualScroll(e){return be(this.virtualScroll)?this.virtualScroll():this.isVirtualScrollDisabled(e)}isVirtualScrollDisabled(e){return be(e.disableVirtualScroll)?!e.disableVirtualScroll:!1}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["ng-select"]],contentQueries:function(t,i,d){t&1&&Ui(d,i.optionTemplate,bn,5,q)(d,i.optgroupTemplate,_n,5,q)(d,i.labelTemplate,Dn,5,q)(d,i.multiLabelTemplate,En,5,q)(d,i.headerTemplate,Mn,5,q)(d,i.footerTemplate,Sn,5,q)(d,i.notFoundTemplate,xn,5,q)(d,i.placeholderTemplate,yn,5,q)(d,i.typeToSearchTemplate,Tn,5,q)(d,i.loadingTextTemplate,In,5,q)(d,i.tagTemplate,wn,5,q)(d,i.loadingSpinnerTemplate,Nn,5,q)(d,i.clearButtonTemplate,Fn,5,q)(d,i.ngOptions,Rn,5),t&2&&ao(14)},viewQuery:function(t,i){t&1&&mi(i.dropdownPanel,pi,5)(i.searchInput,Va,5)(i.clearButton,Ga,5),t&2&&ao(3)}
12,hostVars:20,hostBindings:function(t,i){t&1&&E("keydown",function(p){return i.handleKeyDown(p)}),t&2&&ye("ng-select",!0)("ng-select-single",!i.multiple())("ng-select-typeahead",i.typeahead())("ng-select-multiple",i.multiple())("ng-select-taggable",i.addTag())("ng-select-searchable",i.searchable())("ng-select-clearable",i.clearable())("ng-select-opened",i.isOpen())("ng-select-filtered",i.filtered)("ng-select-disabled",i.disabled())},inputs:{_ariaLabelDropdown:[1,"ariaLabelDropdown","_ariaLabelDropdown"],_ariaLabel:[1,"ariaLabel","_ariaLabel"],_markFirst:[1,"markFirst","_markFirst"],_placeholder:[1,"placeholder","_placeholder"],_fixedPlaceholder:[1,"fixedPlaceholder","_fixedPlaceholder"],_notFoundText:[1,"notFoundText","_notFoundText"],_typeToSearchText:[1,"typeToSearchText","_typeToSearchText"],_preventToggleOnRightClick:[1,"preventToggleOnRightClick","_preventToggleOnRightClick"],_addTagText:[1,"addTagText","_addTagText"],_loadingText:[1,"loadingText","_loadingText"],_clearAllText:[1,"clearAllText","_clearAllText"],_dropdownPosition:[1,"dropdownPosition","_dropdownPosition"],_appendTo:[1,"appendTo","_appendTo"],_outsideClickEvent:[1,"outsideClickEvent","_outsideClickEvent"],_loading:[1,"loading","_loading"],_closeOnSelect:[1,"closeOnSelect","_closeOnSelect"],_hideSelected:[1,"hideSelected","_hideSelected"],_selectOnTab:[1,"selectOnTab","_selectOnTab"],_openOnEnter:[1,"openOnEnter","_openOnEnter"],_maxSelectedItems:[1,"maxSelectedItems","_maxSelectedItems"],_groupBy:[1,"groupBy","_groupBy"],_groupValue:[1,"groupValue","_groupValue"],_bufferAmount:[1,"bufferAmount","_bufferAmount"],_virtualScroll:[1,"virtualScroll","_virtualScroll"],_selectableGroup:[1,"selectableGroup","_selectableGroup"],_tabFocusOnClearButton:[1,"tabFocusOnClearButton","_tabFocusOnClearButton"],_selectableGroupAsModel:[1,"selectableGroupAsModel","_selectableGroupAsModel"],_searchFn:[1,"searchFn","_searchFn"],_trackByFn:[1,"trackByFn","_trackByFn"],_clearOnBackspace:[1,"clearOnBackspace","_clearOnBackspace"],_labelForId:[1,"labelForId","_labelForId"],_inputAttrs:[1,"inputAttrs","_inputAttrs"],_tabIndex:[1,"tabIndex","_tabIndex"],_readonly:[1,"readonly","_readonly"],_searchWhileComposing:[1,"searchWhileComposing","_searchWhileComposing"],_minTermLength:[1,"minTermLength","_minTermLength"],_editableSearchTerm:[1,"editableSearchTerm","_editableSearchTerm"],_ngClass:[1,"ngClass","_ngClass"],_typeahead:[1,"typeahead","_typeahead"],_multiple:[1,"multiple","_multiple"],_addTag:[1,"addTag","_addTag"],_searchable:[1,"searchable","_searchable"],_clearable:[1,"clearable","_clearable"],_clearKeepsDisabledOptions:[1,"clearKeepsDisabledOptions","_clearKeepsDisabledOptions"],_deselectOnClick:[1,"deselectOnClick","_deselectOnClick"],_clearSearchOnAdd:[1,"clearSearchOnAdd","_clearSearchOnAdd"],_compareWith:[1,"compareWith","_compareWith"],_keyDownFn:[1,"keyDownFn","_keyDownFn"],_popover:[1,"popover","_popover"],bindLabel:[1,"bindLabel"],bindValue:[1,"bindValue"],appearance:[1,"appearance"],isOpen:[1,"isOpen"],items:[1,"items"]},outputs:{bindLabel:"bindLabelChange",bindValue:"bindValueChange",appearance:"appearanceChange",isOpen:"isOpenChange",items:"itemsChange",blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},exportAs:["ngSelect"],features:[Re([{provide:Zt,useExisting:vt(()=>o),multi:!0},Gn]),Mt],decls:15,vars:22,consts:[["searchInput",""],["defaultPlaceholderTemplate",""],["defaultLabelTemplate",""],["defaultLoadingSpinnerTemplate",""],["clearButton",""],["defaultOptionTemplate",""],["defaultTagTemplate",""],["defaultNotFoundTemplate",""],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""],[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ng-input"],["aria-autocomplete","list","role","combobox",3,"blur","change","compositionend","compositionstart","focus","input","disabled","readOnly","value"],["role","button","tabindex","0",1,"ng-clear-wrapper",3,"title"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],[1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","outsideClickEvent","headerTemplate","footerTemplate","filterValue","items","showAddTag","markedItem","ng-select-multiple","class","id","ariaLabelDropdown","popover"],["aria-atomic","true","aria-live","polite","role","status",1,"ng-visually-hidden"],[3,"ngTemplateOutlet"],[1,"ng-placeholder"],[1,"ng-value",3,"ng-value-disabled"],[1,"ng-value"],["aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label",3,"ngItemLabel","escape"],[1,"ng-spinner-loader"],["role","button","tabindex","0",1,"ng-clear-wrapper",3,"click","title"],["aria-hidden","true",1,"ng-clear"],[1,"ng-dropdown-panel",3,"update","scroll","scrollToEnd","outsideClick","virtualScroll","bufferAmount","appendTo","position","outsideClickEvent","headerTemplate","footerTemplate","filterValue","items","showAddTag","markedItem","id","ariaLabelDropdown","popover"],[1,"ng-option",3,"ng-option-disabled","ng-option-selected","ng-optgroup","ng-option","ng-option-child","ng-option-marked"],["role","option",1,"ng-option",3,"ng-option-marked"],[1,"ng-option",3,"click","mouseover"],[1,"ng-option-label",3,"ngItemLabel","escape"],["role","option",1,"ng-option",3,"mouseover","click"],[1,"ng-tag-label"],[1,"ng-option","ng-option-disabled"]],template:function(t,i){if(t&1){let d=A();a(0,"div",10),E("mousedown",function(_){return i.handleMousedown(_)}),a(1,"div",11),g(2,ja,3,1),g(3,Wa,2,0),g(4,Ka,1,5,null,12),a(5,"div",13)(6,"input",14,0),E("blur",function(_){return i.onInputBlur(_)})("change",function(_){return _.stopPropagation()})("compositionend",function(){y(d);let _=xe(7);return T(i.onCompositionEnd(_.value))})("compositionstart",function(){return i.onCompositionStart()})("focus",function(_){return i.onInputFocus(_)})("input",function(){y(d);let _=xe(7);return T(i.filter(_.value))}),r()()(),g(8,Xa,3,1),g(9,or,4,4,"span",15),a(10,"span",16),h(11,"span",17),r()(),g(12,Cr,8,22,"ng-dropdown-panel",18),a(13,"div",19),g(14,br,1,1),r()}t&2&&(ye("ng-appearance-outline",i.appearance()==="outline")("ng-appearance-fill",i.appearance()==="fill")("ng-has-value",i.hasValue),l(2),C(i.selectedItems.length===0&&!i.searchTerm||(i.fixedPlaceholder()??i.config.fixedPlaceholder)?2:-1),l(),C((!i.multiLabelTemplate()||!i.multiple())&&i.selectedItems.length>0?3:-1),l(),C(i.multiple()&&i.multiLabelTemplate()&&i.selectedValues.length>0?4:-1),l(2),m("disabled",i.disabled())("readOnly",!i.searchable()||i.itemsList.maxItemsSelected)("value",i.searchTerm??""),ze("aria-activedescendant",i.isOpen()?i.itemsList==null||i.itemsList.markedItem==null?null:i.itemsList.markedItem.htmlId:null)("aria-controls",i.isOpen()?i.dropdownId:null)("aria-expanded",i.isOpen())("aria-label",i.ariaLabel())("id",i.labelForId())("tabindex",i.tabIndex()),l(2),C(i.loading()?8:-1),l(),C(i.showClear()?9:-1),l(3),C(i.isOpen()?12:-1),l(2),C(i.isOpen()&&i.showNoItemsFound()?14:-1))},dependencies:[yt,Sr,pi],styles:[`@charset "UTF-8";.ng-select{position:relative;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}
12.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:unset;user-select:unset;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:"\\200b"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}
12.ng-visually-hidden{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0;white-space:nowrap} 13`],encapsulation:2,changeDetection:0})}}return o})();function Nr(o,n){o&1&&(a(0,"small",2),s(1,"Este campo \xE9 obrigat\xF3rio"),r())}var dt=class o{constructor(){this.label=b();this.opcoes=b.required();this.id=b.required();this.bindLabel=b.required();this.formControl=b.required()}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-custom-select-autocomplete"]],inputs:{label:[1,"label"],opcoes:[1,"opcoes"],id:[1,"id"],bindLabel:[1,"bindLabel"],formControl:[1,"formControl"]},decls:4,vars:9,consts:[[1,"form-label",3,"for"],["appendTo","body",3,"id","items","bindLabel","formControl"],[1,"px-1","text-danger"]],template:function(e,t){e&1&&(a(0,"label",0),s(1),r(),h(2,"ng-select",1),g(3,Nr,2,0,"small",2)),e&2&&(m("for",t.id()),l(),M(t.label()),l(),de(t.formControl().invalid&&t.formControl().touched?"custom-invalid":""),m("id",t.id())("items",t.opcoes())("bindLabel",t.bindLabel())("formControl",t.formControl()),l(),C(t.formControl().invalid&&t.formControl().touched?3:-1))},dependencies:[Ln,V,P,Y],styles:[`.ng-select.ng-select-single .ng-select-container{border-radius:20px;height:38px}.ng-select.custom-invalid .ng-select-container{border-color:red;border-radius:50px} 14`],encapsulation:2})}};var vo=class o{constructor(){this.tabelasDominioGeralService=f(Be);this.ufs=j([]);this.carregaUfs()}carregaUfs(){this.tabelasDominioGeralService.getUfs().subscribe({next:n=>{n&&this.ufs.set(n)},error:n=>{console.error(n.error)}})}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}};function Fr(o,n){if(o&1){let e=A();a(0,"i",5),E("click",function(){y(e);let i=u();return T(i.carregaImagem(i.pathImage()))}),r()}}function Or(o,n){if(o&1&&(a(0,"option",3),s(1),r()),o&2){let e=n.$implicit;m("value",e),l(),L(" ",e," ")}}function Ar(o,n){if(o&1&&(a(0,"small",4),s(1),r()),o&2){let e=u();l(),L(" ",e.errorMessage()?e.errorMessage():"Este campo \xE9 obrigat\xF3rio")}}var Fe=class o{constructor(){this.id=b();this.label=b();this.formControl=b.required();this.errorMessage=b();this.pathImage=b();this.viewContainerRef=b();this.getUfs=f(vo);this.messagesServiceModal=f(Ke)}carregaImagem(n){this.viewContainerRef()&&this.messagesServiceModal.openModal("",this.viewContainerRef(),n)}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-custom-select-uf"]],inputs:{id:[1,"id"],label:[1,"label"],formControl:[1,"formControl"],errorMessage:[1,"errorMessage"],pathImage:[1,"pathImage"],viewContainerRef:[1,"viewContainerRef"]},decls:7,vars:8,consts:[[1,"form-label",3,"for"],[1,"bi","bi-info-circle-fill","fs-x-large"],[3,"formControl","id"],[3,"value"],[1,"px-1","text-danger"],[1,"bi","bi-info-circle-fill","fs-x-large",3,"click"]],template:function(e,t){e&1&&(a(0,"label",0),s(1),g(2,Fr,1,0,"i",1),r(),a(3,"select",2),ne(4,Or,2,2,"option",3,lt),r(),g(6,Ar,2,1,"small",4)),e&2&&(m("for",t.id()),l(),L("",t.label()," "),l(),C(t.pathImage()?2:-1),l(),de(t.formControl().invalid&&t.formControl().touched?"form-select is-invalid":"form-select"),m("formControl",t.formControl())("id",t.id()),l(),ae(t.getUfs.ufs()),l(2),C(t.formControl().invalid&&t.formControl().touched?6:-1))},dependencies:[V,At,Rt,Ot,P,Y],encapsulation:2})}};var Vt=class o{constructor(){this.http=f(Ee)}gravaDadoCertidao(n){let e=R.config.serverUrlRemota+"/pre-cadastro/dado-certidao/";return this.http.post(e,n,{responseType:"text"})}getDocumentoCertidao(n){let e=R.config.serverUrlRemota+"/pre-cadastro/dado-certidao/";return this.http.get(e+n)}getTipoNacionalidade(){let n=R.config.serverUrlRemota+"/dominio/tipo-nacionalidade";return this.http.get(n)}getPais(){let n=R.config.serverUrlRemota+"/dominio/tipo-pais";return this.http.get(n)}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}};var Rr=["dialogContainer"],kr=()=>[2,4,5,6];function Pr(o,n){if(o&1&&(a(0,"div",11)(1,"div",6),h(2,"app-custom-select",13),r()()),o&2){let e=u(2);l(2),m("formControl",e.form.controls.pais)("opcoes",e.paisOpcoes())}}function Vr(o,n){if(o&1){let e=A();a(0,"div",14)(1,"div",15)(2,"div",16)(3,"div",6),h(4,"app-custom-select-uf",17),r()()(),a(5,"div",18)(6,"div",16)(7,"div",6)(8,"label",19),s(9," Naturalidade (munic\xEDpio de nascimento)*: "),a(10,"i",20),E("click",function(){y(e);let i=u(2);return T(i.carregaImagem("assets/certidao_nascimento_atualizada_municipio_nascimento_corte.jpg"))}),r()(),h(11,"app-custom-select-autocomplete",21),r()()()(),a(12,"div",22)(13,"span",6)(14,"small"),s(15," Clique no \xEDcone "),h(16,"i",23),s(17," para saber mais "),r()()()}if(o&2){let e=u(2);l(4),m("formControl",e.form.controls.uf)("viewContainerRef",e.viewContainerRef),l(7),m("opcoes",e.municipiosOpcoes())("formControl",e.form.controls.municipio)}}function Gr(o,n){if(o&1&&(a(0,"form",4)(1,"div",11)(2,"div",6),h(3,"app-custom-select",12),r()(),g(4,Pr,3,2,"div",11),g(5,Vr,18,4),r()),o&2){let e=u();m("formGroup",e.form),l(3),m("formControl",e.form.controls.nacionalidade)("opcoes",e.nacionalidadeOpcoes()),l(),C($i(5,kr).includes(e.form.controls.nacionalidade.value==null?null:e.form.controls.nacionalidade.value.codigo)?4:-1),l(),C((e.form.controls.nacionalidade.value==null?null:e.form.controls.nacionalidade.value.codigo)==1?5:-1)}}var go=class o extends oe{constructor(){super();this.dadoCertidaoService=f(Vt);this.tabelasDominioGeralService=f(Be);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.nacionalidadeOpcoes=j([]);this.paisOpcoes=j([]);this.municipiosOpcoes=j([]);this.dadoCertidaoModel=this.activatedRoute.snapshot.data.dadoCertidao}ngOnInit(){Fi({nacionalidade:this.dadoCertidaoService.getTipoNacionalidade(),pais:this.dadoCertidaoService.getPais()}).subscribe({next:({nacionalidade:e,pais:t})=>{e&&t&&(this.nacionalidadeOpcoes.set(e),this.paisOpcoes.set(t)),this.criaFormGroup()},error:e=>{this.messagesServiceModal.openModal(`Erro ao obter dados de nacionalidade e paises. Tente novamente mais tarde. 15 16`+e.error,this.viewContainerRef)}})}criaFormGroup(){this.dadoCertidaoModel?this.dadoCertidaoModel.txtUfNaturalidade?this.carregaMunicipios(this.dadoCertidaoModel.txtUfNaturalidade):this.carregaFormGroup():this.criaNovoFormGroup()}criaNovoFormGroup(){this.form=this.formBuilder.group({nacionalidade:new c(null,[D.required]),pais:new c(null),uf:new c(null),municipio:new c({value:null,disabled:!0})}),this.verificaAlteracaoUf(),this.verificaAlteracaoNacionalidade(),this.setValidatorsMunicipio()}carregaFormGroup(){this.form=this.formBuilder.group({nacionalidade:new c(this.buscaTipoNacionalidade()),pais:new c(this.buscaPais()),uf:new c(this.dadoCertidaoModel.txtUfNaturalidade),municipio:new c(this.buscaMunicipio())}),this.verificaSeDesabilitaNacionalidade(),this.verificaAlteracaoNacionalidade(),this.verificaAlteracaoUf(),this.setValidatorsMunicipio()}setValidatorsMunicipio(){let e=this.form.controls.nacionalidade.value;e&&e.codigo==1?(this.form.controls.municipio.setValidators(D.required),this.form.controls.municipio.updateV
16alueAndValidity()):(this.form.controls.municipio.setValidators([]),this.form.controls.municipio.updateValueAndValidity())}processaOpcaoNacionalidade(){let e=this.form.controls.nacionalidade.value;e&&(e.codigo==1?this.setValidatorsBrasileiroNato():e.codigo==3?this.loggof():[2,4,5,6].includes(this.form.controls.nacionalidade.value?.codTipoNacionalidade)&&this.setValidatorsDemaisOpcoes())}setValidatorsBrasileiroNato(){this.form.controls.pais.setValidators([]),this.form.controls.pais.updateValueAndValidity(),this.form.controls.uf.setValidators(D.required),this.form.controls.uf.updateValueAndValidity(),this.form.controls.municipio.setValidators(D.required),this.form.controls.municipio.updateValueAndValidity()}setValidatorsDemaisOpcoes(){this.form.controls.pais.setValidators(D.required),this.form.controls.pais.updateValueAndValidity(),this.form.controls.uf.setValidators([]),this.form.controls.uf.updateValueAndValidity(),this.form.controls.municipio.setValidators([]),this.form.controls.municipio.updateValueAndValidity()}carregaMunicipios(e){this.tabelasDominioGeralService.getMunicipios(e).subscribe({next:t=>{t&&t.municipios.length>0&&(this.municipiosOpcoes.set(t.municipios),this.form?this.form.controls.municipio.enable():this.carregaFormGroup())},error:t=>{this.messagesServiceModal.openModal(`Erro ao carregar munic\xEDpio. Tente novamente mais tarde. 17 18`+t.error,this.viewContainerRef)}})}setValoresDominio(){this.form.controls.nacionalidade.setValue(this.buscaTipoNacionalidade()),this.form.controls.pais.setValue(this.buscaPais())}buscaMunicipio(){return this.municipiosOpcoes().find(e=>e.nomeMunicA==this.dadoCertidaoModel.txtMunicipioNaturalidade)}buscaTipoNacionalidade(){return this.nacionalidadeOpcoes().find(e=>e.codigo==this.dadoCertidaoModel.codTipoNacionalidade)}buscaPais(){return this.paisOpcoes().find(e=>e.codPais==this.dadoCertidaoModel.codPaisNaturalidade)}verificaSeDesabilitaNacionalidade(){let e=this.form.controls.nacionalidade.value;e&&e.codigo==1&&this.form.controls.nacionalidade.disable()}verificaAlteracaoNacionalidade(){this.form.controls.nacionalidade.valueChanges.subscribe(()=>{this.processaOpcaoNacionalidade()})}verificaAlteracaoUf(){this.form.controls.uf.valueChanges.subscribe(e=>{e&&e.length==2&&(this.form.controls.municipio.setValue(null),this.carregaMunicipios(e))})}criaDadoCertidaoModel(){let e=this.form.controls.nacionalidade.value?.codigo;e===1?this.dadoCertidaoModel={uuidPrecadastro:this.protocoloModel?.uuid??null,codTipoNacionalidade:e,codPaisNaturalidade:null,codMunicipioNaturalidade:this.form.controls.municipio.value?.nroMunic??"",txtDsTipoNacionalidade:this.form.controls.nacionalidade.value?.valor??"",txtUfNaturalidade:this.form.controls.uf.value??"",txtMunicipioNaturalidade:this.form.controls.municipio.value?.nomeMunicA??"",txtDsPaisNaturalidade:""}:[2,4,5,6].includes(e)&&(this.dadoCertidaoModel={uuidPrecadastro:this.protocoloModel?.uuid??null,codTipoNacionalidade:e,codPaisNaturalidade:this.form.controls.pais.value?.codPais??"",codMunicipioNaturalidade:this.form.controls.municipio.value?.nroMunic??"",txtDsTipoNacionalidade:this.form.controls.nacionalidade.value?.valor??"",txtUfNaturalidade:"",txtMunicipioNaturalidade:"",txtDsPaisNaturalidade:this.form.controls.pais.value?.nomePais??""}),this.dadosCompartilhadosService.setDadoCertidao(this.dadoCertidaoModel)}salvaDadoCertidao(){this.dadoCertidaoModel&&this.dadoCertidaoService.gravaDadoCertidao(this.dadoCertidaoModel).subscribe({next:e=>{e=="OK"&&this.redirecionaParaEndereco()},error:e=>{let t=JSON.parse(e.error);this.messagesServiceModal.openModal(`Erro ao gravar dados da certid\xE3o. 19 20`+t[0].message,this.viewContainerRef)}})}loggof(){this.router.navigate(["logoff-estrangeiro"])}redirecionaParaEndereco(){this.router.navigate(["etapas/endereco"],{skipLocationChange:!0})}avancarEtapa(){this.validaFormulario()&&(this.criaDadoCertidaoModel(),this.salvaDadoCertidao())}voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.router.navigate(["etapas/documento-origem"],{skipLocationChange:!0})}):this.router.navigate(["etapas/documento-origem"],{skipLocationChange:!0})}limpaFormulario(){this.messagesServiceModal.openModalConfirmation(this.MSG_LIMPAR,this.viewContainerRef,e=>{e==="Sim"&&(this.form.controls.pais.reset(),this.form.controls.uf.reset(),this.form.controls.municipio.reset(),this.processaOpcaoNacionalidade())})}validaFormulario(){return this.formularioValido()}carregaImagem(e){this.messagesServiceModal.openModal("",this.viewContainerRef,e)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-dado-certidao"]],viewQuery:function(t,i){if(t&1&&z(Rr,5,$),t&2){let d;
20U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:18,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body","overflow-auto"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","justify-content-between","align-items-center","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"row","mt-3"],[1,"row","pb-2"],["id","nacionalidade","label","Nacionalidade*:","identificador","codigo","descricao","valor","ngDefaultControl","",3,"formControl","opcoes"],["id","pais","label","Pa\xEDs de nascimento*:","identificador","codPais","descricao","nomePais","ngDefaultControl","",3,"formControl","opcoes"],[1,"row","pb-2","d-flex","align-items-baseline"],[1,"col-4"],[1,"row"],["id","uf","label","Estado de nascimento*:","pathImage","assets/certidao_nascimento_atualizada_uf_nascimento_corte.jpg","ngDefaultControl","",3,"formControl","viewContainerRef"],[1,"col-8"],["for","municipio",1,"form-label"],[1,"bi","bi-info-circle-fill","fs-x-large",3,"click"],["id","municipio","bindLabel","nomeMunicA","ngDefaultControl","",3,"opcoes","formControl"],[1,"row","text-center","mt-3"],[1,"bi","bi-info-circle-fill","fs-x-small"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"nav",1)(3,"span"),s(4," Dados da Certid\xE3o "),r()(),a(5,"div",2)(6,"div",3),g(7,Gr,6,6,"form",4),r()(),a(8,"div",5)(9,"div",6)(10,"app-custom-button-voltar",7),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(11,"div",8),s(12,"Etapa 4 de 8"),r(),a(13,"div",9)(14,"app-custom-button-proximo",7),E("btnClicked",function(){return i.avancarEtapa()}),r()()(),a(15,"div",10)(16,"div",9)(17,"app-custom-button-limpar",7),E("btnClicked",function(){return i.limpaFormulario()}),r()()()),t&2&&(l(7),C(i.form?7:-1))},dependencies:[V,Z,W,P,J,Y,X,le,ee,ue,dt,je,Fe],encapsulation:2})}};var Bn=()=>{let n=f(Q).getProtocolo();return f(Vt).getDocumentoCertidao(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("Dados de Certid\xE3o n\xE3o encontrado:",e),te(null))))};var Gt=class o{constructor(){this.APIURL=R.config.serverUrlRemota;this.http=f(Ee)}gravaDadoDeclarado(n){return this.http.post(`${this.APIURL}/pre-cadastro/dado-declarado`,n,{responseType:"text"}).pipe(k())}findById(n){return this.http.get(`${this.APIURL}/pre-cadastro/dado-declarado/${n}`).pipe(k())}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}};var Lr=["dialogContainer"];function Br(o,n){if(o&1&&(a(0,"form",4)(1,"div",11)(2,"div",6),h(3,"app-custom-select",12),r()(),a(4,"div",11)(5,"div",6),h(6,"app-custom-select",13),r()(),a(7,"div",11)(8,"div",6),h(9,"app-custom-select",14),r()(),a(10,"div",15)(11,"label",16),s(12,"Altura (em cent\xEDmetros)*:"),r()(),a(13,"div",17),h(14,"app-custom-input",18),r()()),o&2){let e=u();m("formGroup",e.form),l(3),m("formControl",e.form.controls.tipoGrauInstrucao)("opcoes",e.grauInstrucaoOpcoes()),l(3),m("formControl",e.form.controls.tipoCorOlhos)("opcoes",e.corOlhosOpcoes()),l(3),m("formControl",e.form.controls.tipoCorCutis)("opcoes",e.corCutisOpcoes()),l(5),m("formControl",e.form.controls.altura)("id","altura")}}var Co=class o extends oe{constructor(){super();this.dadoDeclaradoService=f(Gt);this.tabelasDominioService=f(Be);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();
20this.grauInstrucaoOpcoes=j([]);this.corOlhosOpcoes=j([]);this.corCutisOpcoes=j([]);this.dadoDeclaradoModel=this.activatedRoute.snapshot.data.dadoDeclarado,this.carregaTipoGrauInstrucao(),this.carregaTipoCorCutis(),this.carregaTipoCorOlhos(),rt(()=>{this.dadoDeclaradoModel&&this.setValoresDominio()})}ngOnInit(){this.criaFormGroup()}criaFormGroup(){this.dadoDeclaradoModel?this.carregaFormGroup():this.criaNovoFormGroup()}carregaFormGroup(){this.form=this.formBuilder.group({tipoGrauInstrucao:new c(null,D.required),tipoCorOlhos:new c(null,D.required),tipoCorCutis:new c(null,D.required),altura:new c(this.dadoDeclaradoModel.nroAltura,D.required)})}criaNovoFormGroup(){this.form=this.formBuilder.group({tipoGrauInstrucao:new c(null,D.required),tipoCorOlhos:new c(null,D.required),tipoCorCutis:new c(null,D.required),altura:new c(null,D.required)})}carregaTipoGrauInstrucao(){this.tabelasDominioService.getTipoInstrucao().subscribe({next:e=>{e&&this.grauInstrucaoOpcoes.set(e)},error:e=>{console.error(e),this.messagesServiceModal.openModal(`N\xE3o foi poss\xEDvel carregar os graus de instru\xE7\xE3o. Tente novamente mais tarde. 21 22`+e.error,this.viewContainerRef)}})}carregaTipoCorOlhos(){this.tabelasDominioService.getTipoCorOlhos().subscribe({next:e=>{e&&this.corOlhosOpcoes.set(e)},error:e=>{console.error(e),this.messagesServiceModal.openModal(`N\xE3o foi poss\xEDvel carregar as cores dos olhos para sele\xE7\xE3o. Tente novamente mais tarde. 23 24`+e.error,this.viewContainerRef)}})}carregaTipoCorCutis(){this.tabelasDominioService.getTipoCorCutis().subscribe({next:e=>{e&&this.corCutisOpcoes.set(e)},error:e=>{console.error(e),this.messagesServiceModal.openModal(`N\xE3o foi poss\xEDvel carregar as cores de cutis para sele\xE7\xE3o. Tente novamente mais tarde. 25 26`+e.error,this.viewContainerRef)}})}setValoresDominio(){this.dadoDeclaradoModel&&(this.form.controls.tipoGrauInstrucao.setValue(this.buscaTipoGrauInstrucao()),this.form.controls.tipoCorOlhos.setValue(this.buscaTipoCorOlhos()),this.form.controls.tipoCorCutis.setValue(this.buscaTipoCorCutis()))}
26buscaTipoGrauInstrucao(){return this.grauInstrucaoOpcoes().find(e=>e.codigo==this.dadoDeclaradoModel.codTipoInstrucao)}buscaTipoCorOlhos(){return this.corOlhosOpcoes().find(e=>e.codigo==this.dadoDeclaradoModel.tipoCorOlhos)}buscaTipoCorCutis(){return this.corCutisOpcoes().find(e=>e.codigo==this.dadoDeclaradoModel.tipoCorCutis)}salvaDadosDeclarados(){this.dadoDeclaradoModel&&this.dadoDeclaradoService.gravaDadoDeclarado(this.dadoDeclaradoModel).subscribe({next:e=>{e=="OK"&&this.redirecionaDocumentoOrigem()},error:e=>{let t=JSON.parse(e.error);this.messagesServiceModal.openModal(`Erro ao gravar os dados declarados. 27 28`+t[0].message,this.viewContainerRef)}})}redirecionaDocumentoOrigem(){this.router.navigate(["etapas/documento-origem"],{skipLocationChange:!0})}removeCpfMask(e){return e.replace(/\D/g,"")}criaDadoDeclaradoModel(){this.dadoDeclaradoModel={uuidPrecadastro:this.protocoloModel?.uuid??null,codTipoInstrucao:this.form.controls.tipoGrauInstrucao.value?.codigo,dsTipoInstrucao:this.form.controls.tipoGrauInstrucao.value?.valor,tipoCorCutis:this.form.controls.tipoCorCutis.value?.codigo,descricaoCorCutis:this.form.controls.tipoCorCutis.value?.valor,tipoCorOlhos:this.form.controls.tipoCorOlhos.value?.codigo,descricaoCorOlhos:this.form.controls.tipoCorOlhos.value?.valor,nroAltura:this.form.controls.altura.value??"",indInterditado:"",codTipoInterdicao:"",dsTipoInterdicao:"",indTutorSolicitacao:"",nomeTutor:"",cpfTutor:""},this.dadosCompartilhadosService.setDadoDeclarado(this.dadoDeclaradoModel)}validaFormulario(){return this.formularioValido()}redirecionaParaFiliacao(){this.router.navigate(["etapas/filiacao"],{skipLocationChange:!0})}avancarEtapa(){this.validaFormulario()&&(this.criaDadoDeclaradoModel(),this.salvaDadosDeclarados())}voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.redirecionaParaFiliacao()}):this.redirecionaParaFiliacao()}limpaFormulario(){this.messagesServiceModal.openModalConfirmation(this.MSG_LIMPAR,this.viewContainerRef,e=>{e==="Sim"&&this.form.reset()})}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-dado-declarado"]],viewQuery:function(t,i){if(t&1&&z(Lr,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:18,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body","overflow-auto"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","justify-content-between","align-items-center","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"row","mt-3"],[1,"row","pb-2"],["id","tipoGrauInstrucao","label","Grau de instru\xE7\xE3o*:","identificador","codigo","descricao","valor","ngDefaultControl","",3,"formControl","opcoes"],["id","tipoCorOlhos","label","Cor dos olhos*:","identificador","codigo","descricao","valor","ngDefaultControl","",3,"formControl","opcoes"],["id","tipoCorCutis","label","Cor da pele (c\xFAtis)*:","identificador","codigo","descricao","valor","ngDefaultControl","",3,"formControl","opcoes"],[1,""],["for","altura",1,"form-label"],[1,"col-4","mb-2"],["type","text","placeholder","000","tpMask","hCentimetros","ngDefaultControl","",3,"formControl","id"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"nav",1)(3,"span"),s(4," Dados Declarados "),r()(),a(5,"div",2)(6,"div",3),g(7,Br,15,9,"form",4),r()(),a(8,"div",5)(9,"div",6)(10,"app-custom-button-voltar",7),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(11,"div",8),s(12,"Etapa 3 de 8"),r(),a(13,"div",9)(14,"app-custom-button-proximo",7),E("btnClicked",function(){return i.avancarEtapa()}),r()()(),a(15,"div",10)(16,"div",9)(17,"app-custom-button-limpar",7),E("btnClicked",function(){return i.limpaFormulario()}),r()()()),t&2&&(l(7),C(i.form?7:-1))},dependencies:[V,Z,W,P,J,Y,X,kt,he,ee,le,ue,je],styles:[".btn-check[_ngcontent-%COMP%]:checked + .btn[_ngcontent-%COMP%], [_ngcontent-%COMP%]:not(.btn-check) + .btn[_ngcontent-%COMP%]:active, .btn[_ngcontent-%COMP%]:first-child:active, .btn.active[_ngcontent-%COMP%], .btn.show[_ngcontent-%COMP%]{color:#fff;background:#467396;border-color:#467396}.btn-light[_ngcontent-%COMP%]:hover{background-color:#467396;color:#fff}.btn-light[_ngcontent-%COMP%]{border-radius:50px}.erro-radio-tipoInterdicao[_ngcontent-%COMP%]{border-color:red}"]})}};var qn=()=>{let n=f(Q).getProtocolo();return f(Gt).findById(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("Dado declarado n\xE3o encontrado:",e),te(null))))};var qr=(()=>{class o{constructor(){this._element=f(Dt).documentElement}isRTL(){return(this._element.getAttribute("dir")||"").toLowerCase()==="rtl"}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o}
28)(),Ur=/\s+/,Hr=/ +/gi,jr={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]};function $r(o,n){let[e,t]=jr[o];return n&&t||e}var zr=/^left/,Qr=/^right/,Wr=/^start/,Yr=/^end/;function Kr(o,n){let[e,t]=n.split("-"),i=e.replace(zr,"start").replace(Qr,"end"),d=[i];if(t){let p=t;(e==="left"||e==="right")&&(p=p.replace(Wr,"top").replace(Yr,"bottom")),d.push(`${i}-${p}`)}return o&&(d=d.map(p=>`${o}-${p}`)),d.join(" ")}function Un({placement:o,baseClass:n},e){let t=Array.isArray(o)?o:o.split(Ur),i=["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"],d=t.findIndex(w=>w==="auto");d>=0&&i.forEach(function(w){t.find(ie=>ie.search("^"+w)!==-1)==null&&t.splice(d++,1,w)});let p=t.map(w=>$r(w,e.isRTL()));return{placement:p.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!n,phase:"write",fn({state:w}){let ie=new RegExp(n+"(-[a-z]+)*","gi"),ce=w.elements.popper,N=w.placement,fe=ce.className;fe=fe.replace(ie,""),fe+=` ${Kr(n,N)}`,fe=fe.trim().replace(Hr," "),ce.className=fe}},sn,cn,ln,{enabled:!0,name:"flip",options:{fallbackPlacements:p}}]}}function Hn(o){return o}function $n(){let o=f(qr),n=null;return{createPopper(e){if(!n){let i=(e.updatePopperOptions||Hn)(Un(e,o));n=mn(e.hostElement,e.targetElement,i)}},update(){n&&n.update()},setOptions(e){if(n){let i=(e.updatePopperOptions||Hn)(Un(e,o));n.setOptions(i)}},destroy(){n&&(n.destroy(),n=null)}}}function $e(o){return parseInt(`${o}`,10)}function vi(o){return typeof o=="string"}function Xe(o){return!isNaN($e(o))}function Pe(o){return typeof o=="number"&&isFinite(o)&&Math.floor(o)===o}function gi(o){return Xe(o)?`0${o}`.slice(-2):""}function Jr(o,n){return!n||typeof o.closest>"u"?null:o.closest(n)}var bo=(o,n)=>n?n.some(e=>e.contains(o)):!1,jn=(o,n)=>!n||Jr(o,n)!=null,Zr=(()=>{let o=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,n=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(o()||n()):!1})(),Xr=o=>Zr?()=>setTimeout(()=>o(),100):o;function zn(o,n,e,t,i,d,p,_){e&&o.runOutsideAngular(Xr(()=>{let I=N=>{let fe=N.target;return N.button===2||bo(fe,p)?!1:e==="inside"?bo(fe,d)&&jn(fe,_):e==="outside"?!bo(fe,d):jn(fe,_)||!bo(fe,d)},w=Oe(n,"keydown").pipe(Se(i),We(N=>N.key==="Escape"),to(N=>N.preventDefault())),ie=Oe(n,"mousedown").pipe(B(I),Se(i)),ce=Oe(n,"mouseup").pipe(oo(ie),We(([N,fe])=>fe),ki(0),Se(i));Ai([w.pipe(B(N=>0)),ce.pipe(B(N=>1))]).subscribe(N=>o.run(()=>t(N)))}))}var el=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function tl(o){let n=Array.from(o.querySelectorAll(el)).filter(e=>e.tabIndex!==-1);return[n[0],n[n.length-1]]}var Qn=(o,n,e,t=!1)=>{o.runOutsideAngular(()=>{let i=Oe(n,"focusin").pipe(Se(e),B(d=>d.target));Oe(n,"keydown").pipe(Se(e),We(d=>d.key==="Tab"),oo(i)).subscribe(([d,p])=>{let[_,I]=tl(n);(p===_||p===n)&&d.shiftKey&&(I.focus(),d.preventDefault()),p===I&&!d.shiftKey&&(_.focus(),d.preventDefault())}),t&&Oe(n,"click").pipe(Se(e),oo(i),B(d=>d[1])).subscribe(d=>d.focus())})};function Wn(o){return n=>(n.modifiers.push(dn,{name:"offset",options:{offset:()=>o}}),n)}var ol=["ngbDatepickerDayView",""],il=["month"],nl=["year"];function al(o,n){if(o&1&&(v(0,"option",3),s(1),S()),o&2){let e=n.$implicit,t=u();St("value",e),ze("aria-label",t.i18n.getMonthFullName(e,t.date.year)),l(),M(t.i18n.getMonthShortName(e,t.date.year))}}function rl(o,n){if(o&1&&(v(0,"option",3),s(1),S()),o&2){let e=n.$implicit,t=u();St("value",e),l(),M(t.i18n.getYearNumerals(e))}}function Kn(o,n){return this.idMonth(n)}function ll(o,n){if(o&1){let e=A();a(0,"ngb-datepicker-navigation-select",7),E("select",function(i){y(e);let d=u();return T(d.select.emit(i))}),r()}if(o&2){let e=u();m("date",e.date)("disabled",e.disabled)("months",e.selectBoxes.months)("years",e.selectBoxes.years)}}function sl(o,n){o&1&&h(0,"div",8)}function dl(o,n){o&1&&h(0,"div",8)}function cl(o,n){if(o&1&&(g(0,sl,1,0,"div",8),a(1,"div",9),s(2),r(),g(3,dl,1,0,"div",8)),o&2){let e=n.$implicit,t=n.$index,i=u(2);C(t>0?0:-1),l(2),L(" ",i.i18n.getMonthLabel(e.firstDate)," "),l(),C(t!==i.months.length-1?3:-1)}}function ml(o,n){if(o&1&&ne(0,cl,4,3,null,null,Kn,!0),o&2){let e=u();ae(e.months)}}
28function ul(o,n){if(o&1&&(a(0,"span"),s(1),r()),o&2){let e=n.$implicit,t=u();l(),M(t.i18n.getMonthLabel(e.firstDate))}}function pl(o,n){if(o&1&&(a(0,"div",1),s(1),r()),o&2){let e=u(2);l(),M(e.i18n.getWeekLabel())}}function fl(o,n){if(o&1&&(a(0,"div",2),s(1),r()),o&2){let e=n.$implicit;l(),M(e)}}function hl(o,n){if(o&1&&(a(0,"div",0),g(1,pl,2,1,"div",1),ne(2,fl,2,1,"div",2,Ge),r()),o&2){let e=u();l(),C(e.datepicker.showWeekNumbers?1:-1),l(),ae(e.viewModel.weekdays)}}function vl(o,n){if(o&1&&(a(0,"div",4),s(1),r()),o&2){let e=u(2).$implicit,t=u();l(),M(t.i18n.getWeekNumerals(e.number))}}function gl(o,n){}function Cl(o,n){if(o&1&&Ae(0,gl,0,0,"ng-template",7),o&2){let e=u().$implicit,t=u(3);m("ngTemplateOutlet",t.datepicker.dayTemplate)("ngTemplateOutletContext",e.context)}}function bl(o,n){if(o&1){let e=A();a(0,"div",6),E("click",function(i){let d=y(e).$implicit;return u(3).doSelect(d),T(i.preventDefault())}),g(1,Cl,1,2,null,7),r()}if(o&2){let e=n.$implicit;ye("disabled",e.context.disabled)("hidden",e.hidden)("ngb-dp-today",e.context.today),m("tabindex",e.tabindex),ze("aria-label",e.ariaLabel)("aria-disabled",e.context.disabled)("aria-selected",e.context.selected),l(),C(e.hidden?-1:1)}}function _l(o,n){if(o&1&&(a(0,"div",3),g(1,vl,2,1,"div",4),ne(2,bl,2,11,"div",5,lt),r()),o&2){let e=u().$implicit,t=u();l(),C(t.datepicker.showWeekNumbers?1:-1),l(),ae(e.days)}}function Dl(o,n){if(o&1&&g(0,_l,4,1,"div",3),o&2){let e=n.$implicit;C(e.collapsed?-1:0)}}var El=["defaultDayTemplate"],Ml=["content"],Sl=o=>({$implicit:o});function xl(o,n){if(o&1&&h(0,"div",8),o&2){let e=n.date,t=n.currentMonth,i=n.selected,d=n.disabled,p=n.focused;m("date",e)("currentMonth",t)("selected",i)("disabled",d)("focused",p)}}function yl(o,n){if(o&1&&(a(0,"div",10),s(1),r()),o&2){let e=u().$implicit,t=u(2);l(),L(" ",t.i18n.getMonthLabel(e.firstDate)," ")}}function Tl(o,n){if(o&1&&(a(0,"div",9),g(1,yl,2,1,"div",10),h(2,"ngb-datepicker-month",11),r()),o&2){let e=n.$implicit,t=u(2);l(),C(t.navigation==="none"||t.displayMonths>1&&t.navigation==="select"?1:-1),l(),m("month",e.firstDate)}}function Il(o,n){if(o&1&&ne(0,Tl,3,2,"div",9,lt),o&2){let e=u();ae(e.model.months)}}function wl(o,n){if(o&1){let e=A();a(0,"ngb-datepicker-navigation",12),E("navigate",function(i){y(e);let d=u();return T(d.onNavigateEvent(i))})("select",function(i){y(e);let d=u();return T(d.onNavigateDateSelect(i))}),r()}if(o&2){let e=u();m("date",e.model.firstDate)("months",e.model.months)("disabled",e.model.disabled)("showSelect",e.model.navigation==="select")("prevDisabled",e.model.prevDisabled)("nextDisabled",e.model.nextDisabled)("selectBoxes",e.model.selectBoxes)}}function Nl(o,n){}function Fl(o,n){}var qe=class o{static from(n){return n instanceof o?n:n?new o(n.year,n.month,n.day):null}constructor(n,e,t){this.year=Pe(n)?n:null,this.month=Pe(e)?e:null,this.day=Pe(t)?t:null}equals(n){return n!=null&&this.year===n.year&&this.month===n.month&&this.day===n.day}before(n){return n?this.year===n.year?this.month===n.month?this.day===n.day?!1:this.day<n.day:this.month<n.month:this.year<n.year:!1}after(n){return n?this.year===n.year?this.month===n.month?this.day===n.day?!1:this.day>n.day:this.month>n.month:this.year>n.year:!1}};function Yn(o){return new qe(o.getFullYear(),o.getMonth()+1,o.getDate())}function _o(o){let n=new Date(o.year,o.month-1,o.day,12);return isNaN(n.getTime())||n.setFullYear(o.year),n}function Ol(){return new Al}var So=(()=>{class o{static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=G({token:o,factory:()=>Ol(),providedIn:"root"})}}return o})(),Al=(()=>{class o extends So{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,t="d",i=1){let d=_o(e),p=!0,_=d.getMonth();switch(t){case"y":d.setFullYear(d.getFullYear()+i);break;case"m":_+=i,d.setMonth(_),_=_%12,_<0&&(_=_+12);break;case"d":d.setDate(d.getDate()+i),p=!1;break;default:return e}return p&&d.getMonth()!==_&&d.setDate(0),Yn(d)}getPrev(e,t="d",i=1){return this.getNext(e,t,-i)}getWeekday(e){let i=_o(e).getDay();return i===0?7:i}getWeekNumber(e,t){t===7&&(t=0);let i=(11-t)%7,d=e[i],p=_o(d);p.setDate(p.getDate()+4-(p.getDay()||7));let _=p.getTime();return p.setMonth(0),p.setDate(1),Math.floor(Math.round((_-p.getTime())/864e5)/7)+1}getToday(){return Yn(new Date)}isValid(e){if(!e||!Pe(e.year)||!Pe(e.month)||!Pe(e.day)||e.year===0)return!1;let t=_o(e);return!isNaN(t.getTime())&&t.getFullYear()===e.year&&t.getMonth()+1===e.month&&t.getDate()===e.day}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ue(o)))(i||o)}})()}static{this.\u0275prov=G({token:o,factory:o.\u0275fac})}}return o}
28)();function Lt(o,n){return!Rl(o,n)}function Jn(o,n){return!o&&!n?!1:!o||!n?!0:o.year!==n.year||o.month!==n.month}function Rl(o,n){return!o&&!n||!!o&&!!n&&o.equals(n)}function kl(o,n){if(n&&o&&n.before(o))throw new Error(`'maxDate' ${n} should be greater than 'minDate' ${o}`)}function Do(o,n,e){return o&&n&&o.before(n)?n:o&&e&&o.after(e)?e:o||null}function Ci(o,n){let{minDate:e,maxDate:t,disabled:i,markDisabled:d}=n;return!(o==null||i||d&&d(o,{year:o.year,month:o.month})||e&&o.before(e)||t&&o.after(t))}function Pl(o,n,e,t){if(!n)return[];let i=o.getMonths(n.year);if(e&&n.year===e.year){let d=i.findIndex(p=>p===e.month);i=i.slice(d)}if(t&&n.year===t.year){let d=i.findIndex(p=>p===t.month);i=i.slice(0,d+1)}return i}function Vl(o,n,e){if(!o)return[];let t=n?Math.max(n.year,o.year-500):o.year-10,d=(e?Math.min(e.year,o.year+500):o.year+10)-t+1,p=Array(d);for(let _=0;_<d;_++)p[_]=t+_;return p}function Gl(o,n,e){let t=Object.assign(o.getNext(n,"m"),{day:1});return e!=null&&t.after(e)}function Ll(o,n,e){let t=Object.assign(o.getPrev(n,"m"),{day:1});return e!=null&&(t.year===e.year&&t.month<e.month||t.year<e.year&&e.month===1)}function Bl(o,n,e,t,i){let{displayMonths:d,months:p}=e,_=p.splice(0,p.length);return Array.from({length:d},(w,ie)=>{let ce=Object.assign(o.getNext(n,"m",ie),{day:1});if(p[ie]=null,!i){let N=_.findIndex(fe=>fe.firstDate.equals(ce));N!==-1&&(p[ie]=_.splice(N,1)[0])}return ce}).forEach((w,ie)=>{p[ie]===null&&(p[ie]=ql(o,w,e,t,_.shift()||{}))}),p}function ql(o,n,e,t,i={}){let{dayTemplateData:d,minDate:p,maxDate:_,firstDayOfWeek:I,markDisabled:w,outsideDays:ie,weekdayWidth:ce,weekdaysVisible:N}=e,fe=o.getToday();i.firstDate=null,i.lastDate=null,i.number=n.month,i.year=n.year,i.weeks=i.weeks||[],i.weekdays=i.weekdays||[],n=Ul(o,n,I),N||(i.weekdays.length=0);for(let Wt=0;Wt<o.getWeeksPerMonth();Wt++){let Yt=i.weeks[Wt];Yt||(Yt=i.weeks[Wt]={number:0,days:[],collapsed:!0});let _t=Yt.days;for(let ft=0;ft<o.getDaysPerWeek();ft++){Wt===0&&N&&(i.weekdays[ft]=t.getWeekdayLabel(o.getWeekday(n),ce));let Ve=new qe(n.year,n.month,n.day),Ti=o.getNext(Ve),da=t.getDayAriaLabel(Ve),ei=!!(p&&Ve.before(p)||_&&Ve.after(_));!ei&&w&&(ei=w(Ve,{month:i.number,year:i.year}));let ca=Ve.equals(fe),ma=d?d(Ve,{month:i.number,year:i.year}):void 0;i.firstDate===null&&Ve.month===i.number&&(i.firstDate=Ve),Ve.month===i.number&&Ti.month!==i.number&&(i.lastDate=Ve);let nt=_t[ft];nt||(nt=_t[ft]={}),nt.date=Ve,nt.context=Object.assign(nt.context||{},{$implicit:Ve,date:Ve,data:ma,currentMonth:i.number,currentYear:i.year,disabled:ei,focused:!1,selected:!1,today:ca}),nt.tabindex=-1,nt.ariaLabel=da,nt.hidden=!1,n=Ti}Yt.number=o.getWeekNumber(_t.map(ft=>ft.date),I),Yt.collapsed=ie==="collapsed"&&_t[0].date.month!==i.number&&_t[_t.length-1].date.month!==i.number}return i}function Ul(o,n,e){let t=o.getDaysPerWeek(),i=new qe(n.year,n.month,1),d=o.getWeekday(i)%t;return o.getPrev(i,"d",(t+d-e)%t)}var Qe=(()=>{class o{getMonthLabel(e){return`${this.getMonthFullName(e.month,e.year)} ${this.getYearNumerals(e.year)}`}getDayNumerals(e){return`${e.day}`}getWeekNumerals(e){return`${e}`}getYearNumerals(e){return`${e}`}getWeekLabel(){return""}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=G({token:o,factory:()=>new Hl,providedIn:"root"})}}return o})(),Hl=(()=>{class o extends Qe{constructor(){super(...arguments),this._locale=f(Yi),this._monthsShort=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"short",timeZone:"UTC"}).format(Date.UTC(2e3,e))),this._monthsFull=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"long",timeZone:"UTC"}).format(Date.UTC(2e3,e)))}getWeekdayLabel(e,t="narrow"){return[1,2,3,4,5,6,7].map(d=>Intl.DateTimeFormat(this._locale,{weekday:t,timeZone:"UTC"}).format(Date.UTC(2e3,4,d)))[e-1]||""}getMonthShortName(e){return this._monthsShort[e-1]||""}getMonthFullName(e){return this._monthsFull[e-1]||""}getDayAriaLabel(e){let t=new Date(e.year,e.month-1,e.day);return Ji(t,"fullDate",this._locale)}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ue(o)))(i||o)}})()}static{this.\u0275prov=G({token:o,factory:o.\u0275fac})}}return o}
28)(),bi=(()=>{class o{constructor(){this._VALIDATORS={dayTemplateData:e=>{if(this._state.dayTemplateData!==e)return{dayTemplateData:e}},displayMonths:e=>{if(e=$e(e),Pe(e)&&e>0&&this._state.displayMonths!==e)return{displayMonths:e}},disabled:e=>{if(this._state.disabled!==e)return{disabled:e}},firstDayOfWeek:e=>{if(e=$e(e),Pe(e)&&e>=0&&this._state.firstDayOfWeek!==e)return{firstDayOfWeek:e}},focusVisible:e=>{if(this._state.focusVisible!==e&&!this._state.disabled)return{focusVisible:e}},markDisabled:e=>{if(this._state.markDisabled!==e)return{markDisabled:e}},maxDate:e=>{let t=this.toValidDate(e,null);if(Lt(this._state.maxDate,t))return{maxDate:t}},minDate:e=>{let t=this.toValidDate(e,null);if(Lt(this._state.minDate,t))return{minDate:t}},navigation:e=>{if(this._state.navigation!==e)return{navigation:e}},outsideDays:e=>{if(this._state.outsideDays!==e)return{outsideDays:e}},weekdays:e=>{let t=e===!0||e===!1?"narrow":e,i=e===!0||e===!1?e:!0;if(this._state.weekdayWidth!==t||this._state.weekdaysVisible!==i)return{weekdayWidth:t,weekdaysVisible:i}}},this._calendar=f(So),this._i18n=f(Qe),this._model$=new ht,this._dateSelect$=new ht,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:"narrow",weekdaysVisible:!0}}get model$(){return this._model$.pipe(We(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(We(e=>e!==null))}set(e){let t=Object.keys(e).map(i=>this._VALIDATORS[i](e[i])).reduce((i,d)=>et(et({},i),d),{});Object.keys(t).length>0&&this._nextState(t)}focus(e){let t=this.toValidDate(e,null);t!=null&&!this._state.disabled&&Lt(this._state.focusDate,t)&&this._nextState({focusDate:e})}focusSelect(){Ci(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(e){let t=this.toValidDate(e,this._calendar.getToday());t!=null&&!this._state.disabled&&(!this._state.firstDate||Jn(this._state.firstDate,t))&&this._nextState({firstDate:t})}select(e,t={}){let i=this.toValidDate(e,null);i!=null&&!this._state.disabled&&(Lt(this._state.selectedDate,i)&&this._nextState({selectedDate:i}),t.emitEvent&&Ci(i,this._state)&&this._dateSelect$.next(i))}toValidDate(e,t){let i=qe.from(e);return t===void 0&&(t=this._calendar.getToday()),this._calendar.isValid(i)?i:t}getMonth(e){for(let t of this._state.months)if(e.month===t.number&&e.year===t.year)return t;throw new Error(`month ${e.month} of year ${e.year} not found`)}_nextState(e){let t=this._updateState(e);this._patchContexts(t),this._state=t,this._model$.next(this._state)}_patchContexts(e){let{months:t,displayMonths:i,selectedDate:d,focusDate:p,focusVisible:_,disabled:I,outsideDays:w}=e;e.months.forEach(ie=>{ie.weeks.forEach(ce=>{ce.days.forEach(N=>{p&&(N.context.focused=p.equals(N.date)&&_),N.tabindex=!I&&p&&N.date.equals(p)&&p.month===ie.number?0:-1,I===!0&&(N.context.disabled=!0),d!==void 0&&(N.context.selected=d!==null&&d.equals(N.date)),ie.number!==N.date.month&&(N.hidden=w==="hidden"||w==="collapsed"||i>1&&N.date.after(t[0].firstDate)&&N.date.before(t[i-1].lastDate))})})})}_updateState(e){let t=Object.assign({},this._state,e),i=t.firstDate;if(("minDate"in e||"maxDate"in e)&&(kl(t.minDate,t.maxDate),t.focusDate=Do(t.focusDate,t.minDate,t.maxDate),t.firstDate=Do(t.firstDate,t.minDate,t.maxDate),i=t.focusDate),"disabled"in e&&(t.focusVisible=!1),"selectedDate"in e&&this._state.months.length===0&&(i=t.selectedDate),"focusVisible"in e||"focusDate"in e&&(t.focusDate=Do(t.focusDate,t.minDate,t.maxDate),i=t.focusDate,t.months.length!==0&&t.focusDate&&!t.focusDate.before(t.firstDate)&&!t.focusDate.after(t.lastDate)))return t;if("firstDate"in e&&(t.firstDate=Do(t.firstDate,t.minDate,t.maxDate),i=t.firstDate),i){let d="dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e||"weekdaysVisible"in e,p=Bl(this._calendar,i,t,this._i18n,d);t.months=p,t.firstDate=p[0].firstDate,t.lastDate=p[p.length-1].lastDate,"selectedDate"in e&&!Ci(t.selectedDate,t)&&(t.selectedDate=null),"firstDate"in e&&(!t.focusDate||t.focusDate.before(t.firstDate)||t.focu
28sDate.after(t.lastDate))&&(t.focusDate=i);let _=!this._state.firstDate||this._state.firstDate.year!==t.firstDate.year,I=!this._state.firstDate||this._state.firstDate.month!==t.firstDate.month;t.navigation==="select"?(("minDate"in e||"maxDate"in e||t.selectBoxes.years.length===0||_)&&(t.selectBoxes.years=Vl(t.firstDate,t.minDate,t.maxDate)),("minDate"in e||"maxDate"in e||t.selectBoxes.months.length===0||_)&&(t.selectBoxes.months=Pl(this._calendar,t.firstDate,t.minDate,t.maxDate))):t.selectBoxes={years:[],months:[]},(t.navigation==="arrows"||t.navigation==="select")&&(I||_||"minDate"in e||"maxDate"in e||"disabled"in e)&&(t.prevDisabled=t.disabled||Ll(this._calendar,t.firstDate,t.minDate),t.nextDisabled=t.disabled||Gl(this._calendar,t.lastDate,t.maxDate))}return t}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac})}}return o})(),Eo=(function(o){return o[o.PREV=0]="PREV",o[o.NEXT=1]="NEXT",o})(Eo||{}),_i=(()=>{class o{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays="narrow"}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function jl(){return new $l}var Di=(()=>{class o{static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=G({token:o,factory:()=>jl(),providedIn:"root"})}}return o})(),$l=(()=>{class o extends Di{fromModel(e){return e&&Pe(e.year)&&Pe(e.month)&&Pe(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&Pe(e.year)&&Pe(e.month)&&Pe(e.day)?{year:e.year,month:e.month,day:e.day}:null}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ue(o)))(i||o)}})()}static{this.\u0275prov=G({token:o,factory:o.\u0275fac})}}return o})(),zl=(()=>{class o{processKey(e,t){let{state:i,calendar:d}=t;switch(e.key){case"PageUp":t.focusDate(d.getPrev(i.focusedDate,e.shiftKey?"y":"m",1));break;case"PageDown":t.focusDate(d.getNext(i.focusedDate,e.shiftKey?"y":"m",1));break;case"End":t.focusDate(e.shiftKey?i.maxDate:i.lastDate);break;case"Home":t.focusDate(e.shiftKey?i.minDate:i.firstDate);break;case"ArrowLeft":t.focusDate(d.getPrev(i.focusedDate,"d",1));break;case"ArrowUp":t.focusDate(d.getPrev(i.focusedDate,"d",d.getDaysPerWeek()));break;case"ArrowRight":t.focusDate(d.getNext(i.focusedDate,"d",1));break;case"ArrowDown":t.focusDate(d.getNext(i.focusedDate,"d",d.getDaysPerWeek()));break;case"Enter":case" ":t.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})(),Ql=(()=>{class o{constructor(){this.i18n=f(Qe)}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(t,i){t&2&&ye("bg-primary",i.selected)("text-white",i.selected)("text-muted",i.isMuted())("outside",i.isMuted())("active",i.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},attrs:ol,decls:1,vars:1,template:function(t,i){t&1&&s(0),t&2&&M(i.i18n.getDayNumerals(i.date))},styles:[`[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-tertiary-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5} 29`],encapsulation:2,changeDetection:0})}}return o})(),Wl=(()=>{class o{constructor(){this._month=-1,this._year=-1,this.i18n=f(Qe),this.select=new tt}changeMonth(e){this.select.emit(new qe(this.date.year,$e(e),1))}changeYear(e){this.select.emit(new qe($e(e),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this.monthSelect.nativeElement.value=`${this._month}`),this.date.year!==this._year&&(this._year=this.date.year,this.yearSelect.nativeElement.value=`${this._year}`))}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(t,i){if(t&1&&z(il,7,Te)(nl,7,Te),t&2){let d;U(d=H())&&(i.monthSelect=d.first),U(d=H())&&(i.yearSelect=d.first)}},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},decls:8,vars:2,consts:()=>{let e;e=$localize`:@@ngb.datepicker.select-month:Select month`;let t;t=$localize`:@@ngb.datepicker.select-month:Select month`;let i;i=$localize`:@@ngb.datepicker.select-year:Select year`;let d;return d=$localize`:@@ngb.datepicker.select-year:Select year`,[["month",""],["year",""],["aria-label",e,"title",t,1,"form-select",3,"change","disabled"],[3,"value"],["aria-label",i,"title",d,1,"form-select",3,"change","disabled"]]},template:function(t,i){t&1&&(v(0,"select",2,0),ot("change",function(p){return i.changeMonth(p.target.value)}),ne(2,al,2,3,"option",3,lt),S(),v(4,"select",4,1),ot("change",function(p){return i.changeYear(p.target.value)}),ne(6,rl,2,2,"option",3,lt),S()),t&2&&(St("disabled",i.disabled),l(2),ae(i.months),l(2),St("disabled",i.disabled),l(2),ae(i.years))},styles:[`ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important} 30`],encapsulation:2,changeDetection:0})}}return o}
30)(),Yl=(()=>{class o{constructor(){this.navigation=Eo,this.i18n=f(Qe),this.months=[],this.navigate=new tt,this.select=new tt}onClickPrev(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}idMonth(e){return e}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["ngb-datepicker-navigation"]],inputs:{date:"date",disabled:"disabled",months:"months",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},decls:11,vars:4,consts:()=>{let e;e=$localize`:@@ngb.datepicker.previous-month:Previous month`;let t;t=$localize`:@@ngb.datepicker.previous-month:Previous month`;let i;i=$localize`:@@ngb.datepicker.next-month:Next month`;let d;return d=$localize`:@@ngb.datepicker.next-month:Next month`,[[1,"ngb-dp-arrow","ngb-dp-arrow-prev"],["type","button","aria-label",e,"title",t,1,"btn","btn-link","ngb-dp-arrow-btn",3,"click","disabled"],[1,"ngb-dp-navigation-chevron"],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years"],["aria-live","polite",1,"visually-hidden"],[1,"ngb-dp-arrow","ngb-dp-arrow-next"],["type","button","aria-label",i,"title",d,1,"btn","btn-link","ngb-dp-arrow-btn",3,"click","disabled"],[1,"ngb-dp-navigation-select",3,"select","date","disabled","months","years"],[1,"ngb-dp-arrow"],[1,"ngb-dp-month-name"]]},template:function(t,i){t&1&&(a(0,"div",0)(1,"button",1),E("click",function(p){return i.onClickPrev(p)}),h(2,"span",2),r()(),g(3,ll,1,4,"ngb-datepicker-navigation-select",3),g(4,ml,2,0),a(5,"div",4),ne(6,ul,2,1,"span",null,Kn,!0),r(),a(8,"div",5)(9,"button",6),E("click",function(p){return i.onClickNext(p)}),h(10,"span",2),r()()),t&2&&(l(),m("disabled",i.prevDisabled),l(2),C(i.showSelect?3:-1),l(),C(i.showSelect?-1:4),l(2),ae(i.months),l(3),m("disabled",i.nextDisabled))},dependencies:[Wl],styles:[`ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow-next{justify-content:flex-end}.ngb-dp-arrow-next .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem} 31`],encapsulation:2,changeDetection:0})}}return o})(),Kl=(()=>{class o{constructor(){this.templateRef=f(q)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["ng-template","ngbDatepickerContent",""]]})}}return o})(),Jl=(()=>{class o{constructor(){this._keyboardService=f(zl),this._service=f(bi),this.i18n=f(Qe),this.datepicker=f(Zn)}set month(e){this.viewModel=this._service.getMonth(e)}onKeyDown(e){this._keyboardService.processKey(e,this.datepicker)}doSelect(e){!e.context.disabled&&!e.hidden&&this.datepicker.onDateSelect(e.date)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(t,i){t&1&&E("keydown",function(p){return i.onKeyDown(p)})},inputs:{month:"month"},decls:3,vars:1,consts:[["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],[1,"ngb-dp-weekday","ngb-dp-showweek","small"],["role","columnheader",1,"ngb-dp-weekday","small"],["role","row",1,"ngb-dp-week"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"disabled","tabindex","hidden","ngb-dp-today"],["role","gridcell",1,"ngb-dp-day",3,"click","tabindex"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,i){t&1&&(g(0,hl,4,1,"div",0),ne(1,Dl,1,1,null,null,lt)),t&2&&(C(i.viewModel.weekdays.length>0?0:-1),l(),ae(i.viewModel.weeks))},dependencies:[yt],styles:[`ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-tertiary-bg)}
31.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1} 32`],encapsulation:2})}}return o})(),Zn=(()=>{class o{constructor(){this.injector=f(at),this._service=f(bi),this._calendar=f(So),this._i18n=f(Qe),this._config=f(_i),this._nativeElement=f(Te).nativeElement,this._ngbDateAdapter=f(Di),this._ngZone=f(Et),this._destroyRef=f(gt),this._injector=f(at),this._controlValue=null,this._publicState={},this._initialized=!1,this.dayTemplate=this._config.dayTemplate,this.dayTemplateData=this._config.dayTemplateData,this.displayMonths=this._config.displayMonths,this.firstDayOfWeek=this._config.firstDayOfWeek,this.footerTemplate=this._config.footerTemplate,this.markDisabled=this._config.markDisabled,this.maxDate=this._config.maxDate,this.minDate=this._config.minDate,this.navigation=this._config.navigation,this.outsideDays=this._config.outsideDays,this.showWeekNumbers=this._config.showWeekNumbers,this.startDate=this._config.startDate,this.weekdays=this._config.weekdays,this.navigate=new tt,this.dateSelect=new tt,this.onChange=t=>{},this.onTouched=()=>{};let e=f(Kt);this._service.dateSelect$.pipe(Je()).subscribe(t=>{this.dateSelect.emit(t)}),this._service.model$.pipe(Je()).subscribe(t=>{let i=t.firstDate,d=this.model?this.model.firstDate:null;this._publicState={maxDate:t.maxDate,minDate:t.minDate,firstDate:t.firstDate,lastDate:t.lastDate,focusedDate:t.focusDate,months:t.months.map(ie=>ie.firstDate)};let p=!1;if(!i.equals(d)&&(this.navigate.emit({current:d?{year:d.year,month:d.month}:null,next:{year:i.year,month:i.month},preventDefault:()=>p=!0}),p&&d!==null)){this._service.open(d);return}let _=t.selectedDate,I=t.focusDate,w=this.model?this.model.focusDate:null;this.model=t,Lt(_,this._controlValue)&&(this._controlValue=_,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(_))),Lt(I,w)&&w&&t.focusVisible&&this.focus(),e.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}get i18n(){return this._i18n}focusDate(e){this._service.focus(qe.from(e))}focusSelect(){this._service.focusSelect()}focus(){ri({read:()=>{this._nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]')?.focus()}},{injector:this._injector})}navigateTo(e){this._service.open(qe.from(e?e.day?e:ti(et({},e),{day:1}):null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{let e=Oe(this._contentEl.nativeElement,"focusin"),t=Oe(this._contentEl.nativeElement,"focusout");Oi(e,t).pipe(We(i=>{let d=i.target,p=i.relatedTarget;return!(d?.classList.contains("ngb-dp-day")&&p?.classList.contains("ngb-dp-day")&&this._nativeElement.contains(d)&&this._nativeElement.contains(p))}),Je(this._destroyRef)).subscribe(({type:i})=>this._ngZone.run(()=>this._service.set({focusVisible:i==="focusin"})))})}ngOnInit(){if(this.model===void 0){let e={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].forEach(t=>e[t]=this[t]),this._service.set(e),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate),this._initialized=!0}ngOnChanges(e){let t={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].filter(i=>i in e).forEach(i=>t[i]=this[i]),this._service.set(t),"startDate"in e&&this._initialized){let{currentValue:i,previousValue:d}=e.startDate;Jn(d,i)&&this.navigateTo(this.startDate)}}onDateSelect(e){this._service.focus(e),this._service.select(e,{emitEvent:!0})}onNavigateDateSelect(e){this._service.open(e)}onNavigateEvent(e){switch(e){case Eo.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case Eo.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1));break}}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._service.set({disabled:e})}writeValue(e){this._controlValue=qe.from(this._ngbDateAdapter.fromModel(e)),this._service.select(this._controlValue)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["ngb-datepicker"]],contentQueries:function(t,i,d){if(t&1&&qi(d,Kl,7),t&2){let p;U(p=H())&&(i.contentTemplateFromContent=p.first)}},viewQuery:function(t,i){if(t&1&&z(El,7)(Ml,7),t&2){let d;
32U(d=H())&&(i._defaultDayTemplate=d.first),U(d=H())&&(i._contentEl=d.first)}},hostVars:2,hostBindings:function(t,i){t&2&&ye("disabled",i.model.disabled)},inputs:{contentTemplate:"contentTemplate",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",weekdays:"weekdays"},outputs:{navigate:"navigate",dateSelect:"dateSelect"},exportAs:["ngbDatepicker"],features:[Re([{provide:Zt,useExisting:vt(()=>o),multi:!0},bi]),Mt],decls:10,vars:9,consts:[["defaultDayTemplate",""],["defaultContentTemplate",""],["content",""],[1,"ngb-dp-header"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes"],[1,"ngb-dp-content"],[3,"ngTemplateOutlet","ngTemplateOutletContext","ngTemplateOutletInjector"],[3,"ngTemplateOutlet"],["ngbDatepickerDayView","",3,"date","currentMonth","selected","disabled","focused"],[1,"ngb-dp-month"],[1,"ngb-dp-month-name"],[3,"month"],[3,"navigate","select","date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes"]],template:function(t,i){if(t&1&&(Ae(0,xl,1,5,"ng-template",null,0,He)(2,Il,2,0,"ng-template",null,1,He),a(4,"div",3),g(5,wl,1,7,"ngb-datepicker-navigation",4),r(),a(6,"div",5,2),Ae(8,Nl,0,0,"ng-template",6),r(),Ae(9,Fl,0,0,"ng-template",7)),t&2){let d=xe(3);l(5),C(i.navigation!=="none"?5:-1),l(),ye("ngb-dp-months",!i.contentTemplate),l(2),m("ngTemplateOutlet",i.contentTemplate||(i.contentTemplateFromContent==null?null:i.contentTemplateFromContent.templateRef)||d)("ngTemplateOutletContext",Ye(7,Sl,i))("ngTemplateOutletInjector",i.injector),l(),m("ngTemplateOutlet",i.footerTemplate)}},dependencies:[yt,Ql,Jl,Yl],styles:[`ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-tertiary-bg)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-tertiary-bg)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem} 33`],encapsulation:2,changeDetection:0})}}return o})();function Zl(){return new Xl}var Bt=(()=>{class o{static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=G({token:o,factory:()=>Zl(),providedIn:"root"})}}return o})(),Xl=(()=>{class o extends Bt{parse(e){if(e!=null){let t=e.trim().split("-");if(t.length===1&&Xe(t[0]))return{year:$e(t[0]),month:null,day:null};if(t.length===2&&Xe(t[0])&&Xe(t[1]))return{year:$e(t[0]),month:$e(t[1]),day:null};if(t.length===3&&Xe(t[0])&&Xe(t[1])&&Xe(t[2]))return{year:$e(t[0]),month:$e(t[1]),day:$e(t[2])}}return null}format(e){return e?`${e.year}-${Xe(e.month)?gi(e.month):""}-${Xe(e.day)?gi(e.day):""}`:""}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ue(o)))(i||o)}})()}static{this.\u0275prov=G({token:o,factory:o.\u0275fac})}}return o})(),Mo=(()=>{class o extends _i{constructor(){super(...arguments),this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=e=>e,this.restoreFocus=!0}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ue(o)))(i||o)}})()}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})(),Xn=(()=>{class o{constructor(){this._parserFormatter=f(Bt),this._elRef=f(Te),this._vcRef=f($),this._ngZone=f(Et),this._calendar=f(So),this._dateAdapter=f(Di),this._document=f(Dt),this._changeDetector=f(Kt),this._injector=f(at),this._config=f(Mo),this._cRef=null,this._disabled=!1,this._elWithFocus=null,this._model=null,this._positioning=$n(),this._destroyCloseHandlers$=new ht,this.autoClose=this._config.autoClose,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.container=this._config.container,this.positionTarget=this._config.positionTarget,this.dateSelect=new tt,this.navigate=new tt,this.closed=new tt,this._onChange=e=>{},this._onTouched=()=>{}
33,this._validatorChange=()=>{}}get disabled(){return this._disabled}set disabled(e){this._disabled=e===""||e&&e!=="false",this.isOpen()&&this._cRef.instance.setDisabledState(this._disabled)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}registerOnValidatorChange(e){this._validatorChange=e}setDisabledState(e){this.disabled=e}validate(e){let{value:t}=e;if(t!=null){let i=this._fromDateStruct(this._dateAdapter.fromModel(t));if(!i)return{ngbDate:{invalid:t}};if(this.minDate&&i.before(qe.from(this.minDate)))return{ngbDate:{minDate:{minDate:this.minDate,actual:t}}};if(this.maxDate&&i.after(qe.from(this.maxDate)))return{ngbDate:{maxDate:{maxDate:this.maxDate,actual:t}}}}return null}writeValue(e){this._model=this._fromDateStruct(this._dateAdapter.fromModel(e)),this._writeModelValue(this._model)}manualDateChange(e,t=!1){let i=e!==this._inputValue;i&&(this._inputValue=e,this._model=this._fromDateStruct(this._parserFormatter.parse(e))),(i||!t)&&this._onChange(this._model?this._dateAdapter.toModel(this._model):e===""?null:e),t&&this._model&&this._writeModelValue(this._model)}isOpen(){return!!this._cRef}open(){if(!this.isOpen()){this._cRef=this._vcRef.createComponent(Zn,{injector:this._injector}),this._applyPopupStyling(this._cRef.location.nativeElement),this._applyDatepickerInputs(this._cRef),this._subscribeForDatepickerOutputs(this._cRef.instance),this._cRef.instance.ngOnInit(),this._cRef.instance.writeValue(this._dateAdapter.toModel(this._model)),this._cRef.instance.registerOnChange(t=>{this.writeValue(t),this._onChange(t),this._onTouched()}),this._cRef.changeDetectorRef.detectChanges(),this._cRef.instance.setDisabledState(this.disabled),this.container==="body"&&this._document.querySelector(this.container)?.appendChild(this._cRef.location.nativeElement),this._elWithFocus=this._document.activeElement,Qn(this._ngZone,this._cRef.location.nativeElement,this.closed,!0),setTimeout(()=>this._cRef?.instance.focus());let e;if(vi(this.positionTarget)?e=this._document.querySelector(this.positionTarget):this.positionTarget instanceof HTMLElement?e=this.positionTarget:e=this._elRef.nativeElement,this.positionTarget&&!e)throw new Error("ngbDatepicker could not find element declared in [positionTarget] to position against.");this._ngZone.runOutsideAngular(()=>{this._cRef&&e&&(this._positioning.createPopper({hostElement:e,targetElement:this._cRef.location.nativeElement,placement:this.placement,updatePopperOptions:t=>this.popperOptions(Wn([0,2])(t))}),this._afterRenderRef=io({mixedReadWrite:()=>{this._positioning.update()}},{injector:this._injector}))}),this._setCloseHandlers()}}close(){if(this.isOpen()){this._cRef?.destroy(),this._cRef=null,this._positioning.destroy(),this._afterRenderRef?.destroy(),this._destroyCloseHandlers$.next(),this.closed.emit(),this._changeDetector.markForCheck();let e=this._elWithFocus;vi(this.restoreFocus)?e=this._document.querySelector(this.restoreFocus):this.restoreFocus!==void 0&&(e=this.restoreFocus),e&&e.focus?e.focus():this._document.body.focus()}}toggle(){this.isOpen()?this.close():this.open()}navigateTo(e){this.isOpen()&&this._cRef.instance.navigateTo(e)}onBlur(){this._onTouched()}onFocus(){this._elWithFocus=this._elRef.nativeElement}ngOnChanges(e){if((e.minDate||e.maxDate)&&(this._validatorChange(),this.isOpen()&&(e.minDate&&this._cRef.setInput("minDate",this.minDate),e.maxDate&&this._cRef.setInput("maxDate",this.maxDate))),e.datepickerClass){let{currentValue:t,previousValue:i}=e.datepickerClass;this._applyPopupClass(t,i)}e.autoClose&&this.isOpen()&&this._setCloseHandlers()}ngOnDestroy(){this.close()}_applyDatepickerInputs(e){["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showNavigation","showWeekNumbers","weekdays"].forEach(t=>{this[t]!==void 0&&e.setInput(t,this[t])}),e.setInput("startDate",this.startDate||this._model)}_applyPopupClass(e,t){let i=this._cRef?.location.nativeElement;i&&(e&&i.classList.add(e),t&&i.classList.remove(t))}_applyPopupStyling(e){e.classList.add("dropdown-menu","show"),this.container==="body"&&e.classList.add("ngb-dp-body"),this._applyPopupClass(this.datepickerClass)}_subscribeForDatepickerOutputs(e){e.navigate.subscribe(t=>this.navigate.emit(t)),e.dateSelect.subscribe(t=>{this.dateSelect.emit(t),(this.autoClose===!0||this.autoClose==="inside")&&this.close()})}_writeModelValue(e){let t=this._parserFormatter.format(e);this._inputValue=t,this._elRef.nativeElement.value=t,this.isOpen()&&(this._cRef.instance.writeValue(this._dateAdapter.toModel(e)),this._onTouched())}_fromDateStruct(e){let t=e?new qe(e.year,e.month,e.day):null;return this._calendar.isValid(t)?t:null}_setCloseHandlers(){this._destroyCloseHandlers$.next(),zn(this._ngZone,this._document,this.autoClose,()=>this.close(),this._destroyCloseHandlers$,[],[this._elRef.nativeElement,this._cRef.location.nativeElement])}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275dir=De({type:o,selectors:[["input","ngbDatepicker",""]],hostVars:1,hostBindings:function(t,i){t&1&&E("input",function(p){return i.manualDateChange(p.target.value)})("change",function(p){return i.manualDateChange(p.target.value,!0)})("focus",function(){return i.onFocus()})("blur",function(){return i.onBlur()}),t&2&&St("disabled",i.disabled)},inputs:{autoClose:"autoClose",contentTemplate:"contentTemplate",datepickerClass:"datepickerClass",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",minDate:"minDate",maxDate:"maxDate",navigation:"navigation",outsideDays:"outsideDays",placement:"placement",popperOptions:"popperOptions",restoreFocus:"restoreFocus",showWeekNumbers:"showWeekNumbers",startDate:"startDate",container:"container",positionTarget:"positionTarget",weekdays:"weekdays",disabled:"disabled"},outputs:{dateSelect:"dateSelect",navigate:"navigate",closed:"closed"},exportAs:["ngbDatepicker"],features:[Re([{provide:Zt,useExisting:vt(()=>o),multi:!0},{provide:rn,useExisting:vt(()=>o),multi:!0},{provide:_i,useExisting:Mo}]),Mt]})}}return o}
33)();var pp=new Date(1882,10,12),fp=new Date(2174,10,25);var hp=1e3*60*60*24;var Ei=1080,es=24*Ei,ts=12*Ei+793,vp=29*es+ts,gp=11*Ei+204;var xo=(()=>{class o{static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275mod=li({type:o})}static{this.\u0275inj=ni({})}}return o})();var yo=class o extends Bt{format(n){return n?`${this.pad(n.day)}/${this.pad(n.month)}/${n.year}`:""}parse(n){if(n){let e=n.trim().split("/");return e.length===3&&Number(e[0])&&Number(e[1])&&Number(e[2])?{day:+e[0],month:+e[1],year:+e[2]}:null}return null}pad(n){return n<10?`0${n}`:`${n}`}static{this.\u0275fac=(()=>{let n;return function(t){return(n||(n=Ue(o)))(t||o)}})()}static{this.\u0275prov=G({token:o,factory:o.\u0275fac})}};var qt=class o{constructor(){this.language="pt"}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}};var Mi={pt:{weekdays:["Seg","Ter","Qua","Qui","Sex","S\xE1b","Dom"],months:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],weekLabel:"sem"}},To=class o extends Qe{constructor(){super(...arguments);this._i18n=f(qt)}getWeekdayLabel(e){return Mi[this._i18n.language].weekdays[e-1]}getWeekLabel(){return Mi[this._i18n.language].weekLabel}getMonthShortName(e){return Mi[this._i18n.language].months[e-1]}getMonthFullName(e){return this.getMonthShortName(e)}getDayAriaLabel(e){return`${e.day}-${e.month}-${e.year}`}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ue(o)))(i||o)}})()}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}};function os(o,n){o&1&&(a(0,"small",6),s(1,"Este campo \xE9 obrigat\xF3rio "),r())}function is(o,n){if(o&1){let e=A();a(0,"label",3),s(1),r(),a(2,"div",2)(3,"input",4,0),E("blur",function(){y(e);let i=u();return T(i.aplicaMascara())}),r(),a(5,"button",5),E("click",function(){y(e);let i=xe(4);return T(i.toggle())}),r(),g(6,os,2,0,"small",6),r()}if(o&2){let e=u();m("for",e.id()),l(),M(e.topLabel()),l(2),de(e.formControl().invalid&&(e.formControl().dirty||e.formControl().touched)?"form-control rouded-pill-custom-input-date is-invalid":"form-control rouded-pill-custom-input-date"),m("id",e.id())("formControl",e.formControl()),l(3),C(e.formControl().invalid&&e.formControl().touched?6:-1)}}function ns(o,n){o&1&&(a(0,"small",11),s(1,"Este campo \xE9 obrigat\xF3rio "),r())}function as(o,n){if(o&1){let e=A();a(0,"div",1)(1,"div",7)(2,"label",3),s(3),r()(),a(4,"div",8)(5,"div",9)(6,"div",2)(7,"input",10,0),E("blur",function(){y(e);let i=u();return T(i.aplicaMascara())}),r(),a(9,"button",5),E("click",function(){y(e);let i=xe(8);return T(i.toggle())}),r()()(),a(10,"div",9),g(11,ns,2,0,"small",11),r()()()}if(o&2){let e=u();l(2),m("for",e.id()),l(),M(e.leftLabel()),l(4),de(e.formControl().invalid&&e.formControl().touched?"form-control rouded-pill-custom-input-date is-invalid":"form-control rouded-pill-custom-input-date"),m("id",e.id())("formControl",e.formControl()),l(4),C(e.formControl().invalid&&e.formControl().touched?11:-1)}}function rs(o,n){if(o&1){let e=A();a(0,"div",2)(1,"input",12,0),E("blur",function(){y(e);let i=u();return T(i.aplicaMascara())}),r(),a(3,"button",5),E("click",function(){y(e);let i=xe(2);return T(i.toggle())}),r()()}if(o&2){let e=u();l(),de(e.formControl().invalid&&e.formControl().touched?"form-control rouded-pill-custom-input-date is-invalid":"form-control rouded-pill-custom-input-date"),m("id",e.id())("formControl",e.formControl())}}var ct=class o{constructor(){this.config=f(Mo);this.id=b();this.formControl=b.required();this.topLabel=b();this.leftLabel=b();this.config.minDate={year:1900,month:1,day:1},this.config.maxDate={year:2099,month:12,day:31}}ngOnInit(){this.formControl().valueChanges.subscribe(n=>{if(typeof n=="string"){let e=this.convertStringToDate(n);e&&this.formControl().setValue(e,{emitEvent:!1})}})}convertStringToDate(n){let e=n.split("/");if(e.length===3){let t=parseInt(e[0],10),i=parseInt(e[1],10),d=parseInt(e[2],10);if(!isNaN(t)&&!isNaN(i)&&!isNaN(d))return{day:t,month:i,year:d}}return null}aplicaMascara(){if(typeof this.formControl().value=="string"){me.applyDateMask(this.formControl());let n=this.convertStringToDate(this.formControl().value);n&&this.formControl().setValue(n,{emitEvent:!1})}}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-custom-input-date"]],inputs:{id:[1,"id"],formControl:[1,"formControl"],topLabel:[1,"topLabel"],leftLabel:[1,"leftLabel"]},features:[Re([qt,{provide:Qe,useClass:To},{provide:Bt,useClass:yo}])],decls:3,vars:1,consts:[["d","ngbDatepicker"],[1,"row","align-items-center"],[1,"input-group"],[1,"form-label",3,"for"],["maxlength","10","placeholder","dd/mm/yyyy","name","dp","ngbDatepicker","",3,"blur","id","formControl"],["type","button",1,"btn","btn-outline-secondary","bi","bi-calendar3","rouded-pill-custom-button-date",3,"click"],[1,"px-1","text-danger","w-100"],[1,"col-auto"],[1,"col"],[1,"row"],["maxlength","10","placeholder","dd/mm/yyyy","name","dp","ngbDatepicker","","customDateValueAccessor","",3,"blur","id","formControl"],[1,"px-1","text-danger"],["maxlength","10","placeholder","dd/mm/aaaa","name","dp","ngbDatepicker","","customDateValueAccessor","",3,"blur","id","formControl"]],template:function(e,t){e&1&&g(0,is,7,7)(1,as,12,7,"div",1)(2,rs,4,4,"div",2),e&2&&C(t.topLabel()?0:t.leftLabel()?1:2)},dependencies:[V,W,P,co,Y,xo,Xn],styles:[".rouded-pill-custom-input-date[_ngcontent-%COMP%]{border-radius:50rem 0 0 50rem}.rouded-pill-custom-button-date[_ngcontent-%COMP%]{border-radius:0 50rem 50rem 0!important}"]})}};var mt=class o{constructor(){this.http=f(Ee)}gravaDadosGerais(n){let e=R.config.serverUrlRemota+"/pre-cadastro/dado-geral";return this.http.post(e,n,{responseType:"text"})}gravaDadosGeraisComplementares(n){let e=R.config.serverUrlRemota+"/pre-cadastro/dado-geral-complementares";return this.http.post(e,n,{responseType:"text"})}getDadosGerais(n){let e=R.config.serverUrlRemota+"/pre-cadastro/dado-geral/";return this.http.get(e+n)}getDadosGeraisComplementares(n){let e=R.config.serverUrlRemota+"/pre-cadastro/dado-geral-complementares/";return this.http.get(e+n)}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}};var ls=["dialogContainer"];function ss(o,n){if(o&1&&(a(0,"div",15),h(1,"app-custom-input",31),r(),a(2,"div",15)(3,"div",8)(4,"label",32),s(5,"Voc\xEA quer que o seu nome social esteja na sua nova Carteira de Identidade?*"),r(),a(6,"div",20)(7,"div",21)(8,"div",22),h(9,"input",33),a(10,"label",34),s(11," Sim "),r()()(),a(12,"div",21)(13,"div",22),h(14,"input",35),a(15,"label",36),s(16," N\xE3o "),r()()()()()()),o&2){let e=u(2);l(),m("formControl",e.form.controls.nomeSocial)("id","nomeSocial"),l(8),de(e.form.controls.nomeSocialImpresso.invalid&&e.form.controls.nomeSocialImpresso.touched?"form-check-input is-invalid":"form-check-input"),m("value",1),l(5),de(e.form.controls.nomeSocialImpresso.invalid&&e.form.controls.nomeSocialImpresso.touched?"form-check-input is-invalid":"form-check-input"),m("value",0)}}function ds(o,n){if(o&1){let e=A();a(0,"form",6)(1,"div",15),h(2,"app-custom-input",16),r(),a(3,"div",15)(4,"div",8)(5,"label",17),s(6,"Voc\xEA tem nome social?"),r(),a(7,"span",18)(8,"i",19),E("click",function(){y(e);let i=u();return T(i.infoNomeSocial())})("keydown",function(){y(e);let i=u();return T(i.infoNomeSocial())}),r()(),a(9,"div",20)(10,"div",21)(11,"div",22),h(12,"input",23),a(13,"label",24),s(14," Sim "),r()()(),a(15,"div",21)(16,"div",22),h(17,"input",25),a(18,"label",26),s(19," N\xE3o "),r()()()()()(),g(20,ss,17,8),a(21,"div",15)(22,"div",27),h(23,"app-custom-input-date",28),r()(),a(24,"div",15)(25,"label",29),s(26,"Telefone para contato*:"),r(),h(27,"app-custom-input",30),r()()}if(o&2){let e=u();m("formGroup",e.form),l(2),m("formControl",e.form.controls.nomeCompleto)("id","nomeCompleto"),l(10),m("value",!0),l(5),m("value",!1),l(3),C(e.form.controls.possuiNomeSocial.value?20:-1),l(3),m("formControl",e.form.controls.dataNascimento)("id","dataNascimento"),l(4),m("formControl",e.form.controls.txtNroTelefone)("tpMask","tel")("placeholder","(99) 99999-9999")("id","txtNroTelefone")}}var Io=class o extends oe{constructor(){super();this.dadoGeralService=f(mt);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.dadoGeralModel=this.activatedRoute.snapshot.data.dadoGeral1,this.dadoGeralModel&&this.dadosCompartilhadosService.setDadoGeral(this.dadoGeralModel)}ngOnInit(){this.criaFormGroup()}criaFormGroup(){this.dadoGeralModel?this.carregaFormGroup():this.criaNovoFormGroup()}criaNovoFormGroup(){this.form=this.formBuilder.group({nomeCompleto:new c(null,[D.required]),possuiNomeSocial:new c(!1),nomeSocialImpresso:new c(null),nomeSocial:new c(null),dataNascimento:new c(null,[D.required,D.maxLength(10)]),txtNroTelefone:new c(null,[D.required,D.maxLength(15)])}),this.verificaPossuiNomeSocial()}carregaFormGroup(){if(this.protocoloModel){let e="";this.dadoGeralModel.telefoneDdd&&this.dadoGeralModel.telefone&&(e=this.dadoGeralModel.telefoneDdd+this.dadoGeralModel.telefone),this.form=this.formBuilder.group({nomeCompleto:new c(this.dadoGeralModel.nomeCompleto,[D.required]),possuiNomeSocial:new c(!!this.dadoGeralModel.nomeSocial),nomeSocialImpresso:new c(this.dadoGeralModel.nomeSocialImpresso),nomeSocial:new c({value:this.dadoGeralModel.nomeSocial,disabled:this.dadoGeralModel.podeAlterarNomeSocial==0},[D.maxLength(33)]),dataNascimento:new c(me.convertStringToDate(this.dadoGeralModel.dataNascimento),[D.required,D.maxLength(10)]),txtNroTelefone:new c(e,[D.required,D.maxLength(15)])}),this.verificaPossuiNomeSocial(),this.verificaNomesocialInicio()}}criaDadoGeralModel(){this.dadoGeralModel?this.preencheModel():this.criaNovaModel()}criaNovaModel(){this.dadoGeralModel={uuidPrecadastro:this.protocoloModel?.uuid??null,
33nomeCompleto:this.form.controls.nomeCompleto.value,nomeSocial:this.form.controls.possuiNomeSocial.value?this.form.controls.nomeSocial.value:"",nomeSocialImpresso:this.form.controls.possuiNomeSocial.value?this.form.controls.nomeSocialImpresso.value:"",dataNascimento:me.convertDateToString(this.form.controls.dataNascimento.value),encaminhamentoTutor:0,telefone:me.obtemNumeroTelefone(this.form.controls.txtNroTelefone.value),telefoneDdd:me.obtemDDD(this.form.controls.txtNroTelefone.value)},this.dadosCompartilhadosService.setDadoGeral(this.dadoGeralModel)}preencheModel(){this.dadoGeralModel.uuidPrecadastro=this.protocoloModel?.uuid??null,this.dadoGeralModel.nomeCompleto=this.form.controls.nomeCompleto.value,this.dadoGeralModel.nomeSocial=this.form.controls.possuiNomeSocial.value?this.form.controls.nomeSocial.value:"",this.dadoGeralModel.nomeSocialImpresso=this.form.controls.possuiNomeSocial.value?this.form.controls.nomeSocialImpresso.value:"",this.dadoGeralModel.dataNascimento=me.convertDateToString(this.form.controls.dataNascimento.value),this.dadoGeralModel.encaminhamentoTutor=0,this.dadoGeralModel.telefone=me.obtemNumeroTelefone(this.form.controls.txtNroTelefone.value),this.dadoGeralModel.telefoneDdd=me.obtemDDD(this.form.controls.txtNroTelefone.value),this.dadosCompartilhadosService.setDadoGeral(this.dadoGeralModel)}salvaDadosGerais(){this.dadoGeralModel&&this.dadoGeralService.gravaDadosGerais(this.dadoGeralModel).subscribe({next:e=>{e=="OK"&&this.redirecionaDadoGeral2()},error:e=>{let t=JSON.parse(e.error);this.messagesServiceModal.openModal(`Erro ao gravar dados gerais. 34 35`+t[0].message,this.viewContainerRef)}})}redirecionaDadoGeral2(){this.router.navigate(["etapas/dado-geral-2"],{skipLocationChange:!0})}infoNomeSocial(){this.messagesServiceModal.openModal(`<p> 36 Nome social \xE9 o nome pelo qual uma pessoa se identifica e quer ser reconhecida na sociedade, 37 em vez do nome civil que consta no seu registro de nascimento. 38 <br> 39 \xC9 um direito de todas as pessoas que n\xE3o se identifiquem com o seu g\xEAnero biol\xF3gico, 40 assegurado pelo Decreto n\xBA 10977/2022 \xE0s pessoas travestis e transexuais. 41 </p> 42 `,this.viewContainerRef)}voltaInformaDocumentoOrigem(){this.router.navigate(["etapas","informar-documento-origem"],{skipLocationChange:!0})}verificaPossuiNomeSocial(){this.form.controls.possuiNomeSocial.valueChanges.subscribe(e=>{e?this.setValidatorsNomeSocial():this.unsetValidatorsNomeSocial()})}verificaNomesocialInicio(){this.dadoGeralModel.nomeSocial&&this.setValidatorsNomeSocial()}setValidatorsNomeSocial(){this.form.controls.nomeSocial.setValidators(D.required),this.form.controls.nomeSocial.updateValueAndValidity(),this.form.controls.nomeSocialImpresso.setValidators(D.required),this.form.controls.nomeSocialImpresso.updateValueAndValidity()}unsetValidatorsNomeSocial(){this.form.controls.nomeSocial.setValidators([]),this.form.controls.nomeSocial.updateValueAndValidity(),this.form.controls.nomeSocialImpresso.setValidators([]),this.form.controls.nomeSocialImpresso.updateValueAndValidity()}avancarEtapa(){this.validaFormulario()&&(this.criaDadoGeralModel(),this.salvaDadosGerais())}voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.voltaInformaDocumentoOrigem()}):this.voltaInformaDocumentoOrigem()}limpaFormulario(){this.messagesServiceModal.openModalConfirmation(this.MSG_LIMPAR,this.viewContainerRef,e=>{e==="Sim"&&(this.form.controls.nomeCompleto.reset(),this.form.controls.dataNascimento.reset(),this.form.controls.txtNroTelefone.reset(),this.form.controls.possuiNomeSocial.setValue(!1),this.form.controls.possuiNomeSocial.updateValueAndValidity())})}validaFormulario(){return this.formularioValido()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-dado-geral-1"]],viewQuery:function(t,i){if(t&1&&z(ls,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[Re([en]),K],decls:28,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body","overflow-auto"],[1,"atencao-text"],[1,"text-danger","text-uppercase"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","text-center","mt-3"],[1,"col"],[1,"bi","bi-info-circle-fill","fs-x-small"],[1,"row","justify-content-between","align-items-center","mt-3"],[1,"col","custom-etapa"],[1,"col","text-end"],[3,"btnClicked"],[1,"row","mt-3"],[1,"row","pb-2"],["type","text","tamMax","66","placeholder","Digite seu nome completo","topLabel","Nome completo*:","ngDefaultControl","",3,"formControl","id"],["for","nomeSocial",1,"form-label"],[1,"info-icon"],[1,"bi","bi-info-circle-fill","fs-x-large",3,"click","keydown"],[1,"row"],[1,"col-auto"],[1,"form-check"],["formControlName","possuiNomeSocial","type","radio","id","flexRadioDefault1",1,"form-check-input",3,"value"],["for","flexRadioDefault1",1,"form-check-label"],["formControlName","possuiNomeSocial","type","radio","id","flexRadioDefault2",1,"form-check-input",3,"value"],["for","flexRadioDefault2",1,"form-check-label"],[1,"col-8"],["topLabel","Data de nascimento*:","ngDefaultControl","",3,"formControl","id"],["for","txtNroTelefone",1,"form-label"],["type","text","ngDefaultControl","",3,"formControl","tpMask","placeholder","id"],["type","text","topLabel","Qual?*","tamMax","33","ngDefaultControl","",3,"formControl","id"],["for","nomeSocialImpresso",1,"form-label"],["formControlName","nomeSocialImpresso","type","radio","id","nomeSocialImpresso1",3,"value"],["for","nomeSocialImpresso1",1,"form-check-label"],["formControlName","nomeSocialImpresso","type","radio","id","nomeSocialImpresso2",3,"value"],["for","nomeSocialImpresso2",1,"form-check-label"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"nav",1)(3,"span"),s(4," Dados Gerais "),r()(),a(5,"div",2)(6,"div",3)(7,"div",4)(8,"strong")(9,"span",5),s(10,"Aten\xE7\xE3o: "),r(),s(11,"Os campos devem ser preenchidos de acordo com a certid\xE3o escolhida na etapa anterior"),r()(),g(12,ds,28,12,"form",6),a(13,"div",7)(14,"span",8)(15,"small"),s(16," Clique no \xEDcone "),h(17,"i",9),s(18," para saber mais "),r()()()()(),a(19,"div",10),h(20,"div",8),a(21,"div",11),s(22,"Etapa 1 de 8"),r(),a(23,"div",12)(24,"a
42pp-custom-button-proximo",13),E("btnClicked",function(){return i.avancarEtapa()}),r()()(),a(25,"div",14)(26,"div",12)(27,"app-custom-button-limpar",13),E("btnClicked",function(){return i.limpaFormulario()}),r()()()),t&2&&(l(12),C(i.form?12:-1))},dependencies:[V,Z,W,Ne,P,J,Y,X,Me,xo,he,ct,ee,ue],encapsulation:2})}};var cs=["dialogContainer"];function ms(o,n){if(o&1&&(a(0,"div",10)(1,"label",28)(2,"strong"),s(3,"Ocorr\xEAncia policial"),r()()(),a(4,"div",29)(5,"div",30),h(6,"app-custom-input",31),r(),a(7,"div",30),h(8,"app-custom-input",32),r(),a(9,"div",30),h(10,"app-custom-input",33),r()()),o&2){let e=u(3);l(6),m("formControl",e.form.controls.ocorrenciaOrgao)("id","ocorrenciaOrgao"),l(2),m("formControl",e.form.controls.ocorrenciaAno)("id","ocorrenciaAno"),l(2),m("formControl",e.form.controls.ocorrenciaNumero)("id","ocorrenciaNumero")}}function us(o,n){o&1&&(a(0,"div",27)(1,"div",6),s(2,"UPLOAD DO B.O"),r()())}function ps(o,n){if(o&1&&(a(0,"div",11)(1,"div",6)(2,"label",22),s(3,"A sua carteira de identidade anterior foi roubada?"),r(),a(4,"div",14)(5,"div",15)(6,"div",16),h(7,"input",23),a(8,"label",24),s(9," Sim "),r()()(),a(10,"div",15)(11,"div",16),h(12,"input",25),a(13,"label",26),s(14," N\xE3o "),r()()()()()(),g(15,ms,11,6),g(16,us,3,0,"div",27)),o&2){let e=u(2);l(7),m("value",!0),l(5),m("value",!1),l(3),C(e.form.controls.indRoubo.value?15:-1),l(),C(e.form.controls.tipoMotivoEncaminhamento.value==2?16:-1)}}function fs(o,n){if(o&1&&(a(0,"form",4)(1,"div",11)(2,"div",6),h(3,"app-custom-select",12),r()(),a(4,"div",11)(5,"div",6)(6,"label",13),s(7,"Voc\xEA \xE9 doador de \xF3rg\xE3os?*"),r(),a(8,"div",14)(9,"div",15)(10,"div",16),h(11,"input",17),a(12,"label",18),s(13," Sim "),r()()(),a(14,"div",15)(15,"div",16),h(16,"input",19),a(17,"label",20),s(18," N\xE3o "),r()()()()()(),a(19,"div",11)(20,"div",6),h(21,"app-custom-select",21),r()(),g(22,ps,17,4),r()),o&2){let e=u();m("formGroup",e.form),l(3),m("formControl",e.form.controls.tipoSexo)("opcoes",e.tipoSexoOpcoes()),l(8),de(e.form.controls.doadorOrgaos.invalid&&e.form.controls.doadorOrgaos.touched?"form-check-input is-invalid":"form-check-input"),m("value",1),l(5),de(e.form.controls.doadorOrgaos.invalid&&e.form.controls.doadorOrgaos.touched?"form-check-input is-invalid":"form-check-input"),m("value",0),l(5),m("formControl",e.form.controls.tipoEstadoCivil)("opcoes",e.tipoEstadoCivilOpcoes()),l(),C((e.protocoloModel==null?null:e.protocoloModel.indPrimeiraCIN)!=1?22:-1)}}var wo=class o extends oe{constructor(){super();this.dadoGeralService=f(mt);this.tabelasDominioGeralService=f(Be);this.dadoGeralModel=this.dadosCompartilhadosService.getDadoGeral();this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.tipoSexoOpcoes=j([]);this.tipoEstadoCivilOpcoes=j([]);this.tipoMotivoEncaminhamentoOpcoes=j([])}ngOnInit(){return _e(this,null,function*(){yield this.carregaTipoSexo(),yield this.carregaTipoEstadoCivil(),yield this.carregaTipoEncaminhamento(),this.criaFormGroup()})}criaFormGroup(){this.dadoGeralModel?.tipoSexo?this.carregaFormGroup():this.criaNovoFormGroup()}criaNovoFormGroup(){this.form=this.formBuilder.group({tipoSexo:new c(null,[D.required]),doadorOrgaos:new c(null,[D.required]),tipoEstadoCivil:new c(null,[D.required]),indRoubo:new c(!1),tipoMotivoEncaminhamento:new c(this.setPrimeiraViaCIN(),[]),ocorrenciaOrgao:new c(null),ocorrenciaAno:new c(null),ocorrenciaNumero:new c(null)}),this.bloqueiaTipoEncaminhamento1ViaCin()}carregaFormGroup(){this.form=this.formBuilder.group({tipoSexo:new c(this.buscaTipoSexo(),[D.required]),doadorOrgaos:new c(this.dadoGeralModel?.doadorOrgaos,[D.required]),tipoEstadoCivil:new c(this.buscaTipoEstadoCivil(),[D.required]),indRoubo:new c(this.setIndRoubo()),tipoMotivoEncaminhamento:new c(this.buscaTipoEncaminhamento(),[]),ocorrenciaOrgao:new c(this.dadoGeralModel?.ocorrenciaOrgao),ocorrenciaAno:new c(this.dadoGeralModel?.ocorrenciaAno),ocorrenciaNumero:new c(this.dadoGeralModel?.ocorrenciaNumero)}),this.bloqueiaTipoEncaminhamento1ViaCin()}criaDadoGeralModel(){this.verificaMotivoEncaminhamento(),this.dadoGeralModel&&(this.dadoGeralModel.uuidPrecadastro=this.protocoloModel?.uuid??null,this.dadoGeralModel.tipoServico=this.form.controls.tipoMotivoEncaminh
42amento.value.codigo==8?1:2,this.dadoGeralModel.descricaoTipoServico=this.form.controls.tipoMotivoEncaminhamento.value.codigo==8?"1\xAA via CIN":"2\xAA via CIN",this.dadoGeralModel.tipoSexo=this.form.controls.tipoSexo.value?.codigo,this.dadoGeralModel.descricaoTipoSexo=this.form.controls.tipoSexo.value?.valor,this.dadoGeralModel.doadorOrgaos=this.form.controls.doadorOrgaos.value,this.dadoGeralModel.tipoMotivoEncaminhamento=this.form.controls.tipoMotivoEncaminhamento.value?.codigo,this.dadoGeralModel.descricaoMotivoEncaminhamento=this.form.controls.tipoMotivoEncaminhamento.value?.valor,this.dadoGeralModel.tipoEstadoCivil=this.form.controls.tipoEstadoCivil.value?.codigo,this.dadoGeralModel.descricaoEstadoCivil=this.form.controls.tipoEstadoCivil.value?.valor,this.dadoGeralModel.ocorrenciaOrgao=this.form.controls.tipoMotivoEncaminhamento.value.codigo==2?this.form.controls.ocorrenciaOrgao?.value:"",this.dadoGeralModel.ocorrenciaAno=this.form.controls.tipoMotivoEncaminhamento.value.codigo==2?this.form.controls.ocorrenciaAno?.value:"",this.dadoGeralModel.ocorrenciaNumero=this.form.controls.tipoMotivoEncaminhamento.value.codigo==2?this.form.controls.ocorrenciaNumero?.value:"",this.dadosCompartilhadosService.setDadoGeral(this.dadoGeralModel))}carregaTipoSexo(){return _e(this,null,function*(){let e=yield this.tabelasDominioGeralService.getTipoSexo(this.viewContainerRef);e.data?this.tipoSexoOpcoes.set(e.data):(console.info("N\xE3o foi poss\xEDvel carregar tipos de sexo."),console.error(e.error))})}carregaTipoEstadoCivil(){return _e(this,null,function*(){let e=yield this.tabelasDominioGeralService.getTipoEstadoCivil(this.viewContainerRef);e.data?this.tipoEstadoCivilOpcoes.set(e.data):(console.info("N\xE3o foi poss\xEDvel carregar tipos de estados civis."),console.error(e.error))})}carregaTipoEncaminhamento(){return _e(this,null,function*(){let e=yield this.tabelasDominioGeralService.getTipoMotivoEncaminhamento(this.viewContainerRef);e.data?this.tipoMotivoEncaminhamentoOpcoes.set(e.data):(console.info("N\xE3o foi poss\xEDvel carregar tipos de encaminhamentos."),console.error(e.error))})}salvaDadosGerais(){this.dadoGeralModel&&(this.dadosCompartilhadosService.setDadoGeral(this.dadoGeralModel),this.dadoGeralService.gravaDadosGeraisComplementares(this.dadoGeralModel).subscribe({next:e=>{e=="OK"&&this.redirecionaParaFiliacao()},error:e=>{let t=JSON.parse(e.error);this.messagesServiceModal.openModal(`Erro ao gravar dados gerais. 43 44`+t[0].message,this.viewContainerRef)}}))}redirecionaParaFiliacao(){this.router.navigate(["etapas/filiacao"],{skipLocationChange:!0})}buscaTipoSexo(){return this.tipoSexoOpcoes().find(e=>e.codigo==this.dadoGeralModel?.tipoSexo)}buscaTipoEstadoCivil(){return this.tipoEstadoCivilOpcoes().find(e=>e.codigo==this.dadoGeralModel?.tipoEstadoCivil)}buscaTipoEncaminhamento(){return this.tipoMotivoEncaminhamentoOpcoes().find(e=>e.codigo==this.dadoGeralModel?.tipoMotivoEncaminhamento)}setPrimeiraViaCIN(){let e;return this.protocoloModel?.indPrimeiraCIN==1&&(e=this.tipoMotivoEncaminhamentoOpcoes().find(t=>t.codigo==8)),e}voltaParaDadoGeral1(){this.router.navigate(["etapas/dado-geral-1"],{skipLocationChange:!0})}bloqueiaTipoEncaminhamento1ViaCin(){let e=this.form.controls.tipoMotivoEncaminhamento.value;e&&e.codigo==8&&this.form.controls.tipoMotivoEncaminhamento.disable()}setValidatorsNomeSocial(){this.form.controls.nomeSocial.setValidators(D.required),this.form.controls.nomeSocial.updateValueAndValidity()}unsetValidatorsNomeSocial(){this.form.controls.nomeSocial.setValidators([]),this.form.controls.nomeSocial.updateValueAndValidity()}setValidatorsInformacoesBO(){this.form.controls.ocorrenciaOrgao.setValidators(D.required),this.form.controls.ocorrenciaOrgao.updateValueAndValidity(),this.form.controls.ocorrenciaAno.setValidators(D.required),this.form.controls.ocorrenciaAno.updateValueAndValidity(),this.form.controls.ocorrenciaNumero.setValidators(D.required),this.form.controls.ocorrenciaNumero.updateValueAndValidity()}unsetValidatorsInformacoesBO(){this.form.controls.ocorrenciaOrgao.setValidators([]),this.form.controls.ocorrenciaOrgao.updateV
44alueAndValidity(),this.form.controls.ocorrenciaAno.setValidators([]),this.form.controls.ocorrenciaAno.updateValueAndValidity(),this.form.controls.ocorrenciaNumero.setValidators([]),this.form.controls.ocorrenciaNumero.updateValueAndValidity()}verificaMotivoEncaminhamento(){let e=this.form.controls.tipoMotivoEncaminhamento;this.protocoloModel?.indPrimeiraCIN===1?e.setValue({codigo:8,valor:"1\xAA via CIN"}):this.form.controls.indRoubo.value?(this.setValidatorsInformacoesBO(),e.setValue({codigo:2,valor:"Roubo"})):(this.unsetValidatorsInformacoesBO(),e.setValue({codigo:7,valor:"Atualiza\xE7\xE3o"}))}setIndRoubo(){return this.dadoGeralModel?.tipoMotivoEncaminhamento===2}avancarEtapa(){this.validaFormulario()&&(this.criaDadoGeralModel(),this.salvaDadosGerais())}voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.voltaParaDadoGeral1()}):this.voltaParaDadoGeral1()}limpaFormulario(){this.messagesServiceModal.openModalConfirmation(this.MSG_LIMPAR,this.viewContainerRef,e=>{e==="Sim"&&(this.form.controls.tipoSexo.reset(),this.form.controls.tipoEstadoCivil.reset(),this.form.controls.doadorOrgaos.reset(),this.form.controls.tipoSexo.addValidators(D.required),this.form.controls.doadorOrgaos.addValidators(D.required),this.form.controls.tipoEstadoCivil.addValidators(D.required),this.form.controls.tipoSexo.updateValueAndValidity(),this.form.controls.doadorOrgaos.updateValueAndValidity(),this.form.controls.tipoEstadoCivil.updateValueAndValidity(),this.protocoloModel?.indPrimeiraCIN==0&&(this.form.controls.tipoMotivoEncaminhamento.reset(),this.form.controls.tipoMotivoEncaminhamento.addValidators(D.required),this.form.controls.tipoMotivoEncaminhamento.updateValueAndValidity(),this.form.controls.ocorrenciaOrgao.reset(),this.form.controls.ocorrenciaAno.reset(),this.form.controls.ocorrenciaNumero.reset()))})}validaFormulario(){return this.formularioValido()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-dado-geral-2"]],viewQuery:function(t,i){if(t&1&&z(cs,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:18,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body","overflow-auto"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","justify-content-between","align-items-center","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"row","mt-3"],[1,"row","pb-2"],["id","tipoSexo","label","Sexo*:","identificador","codigo","descricao","valor","ngDefaultControl","",3,"formControl","opcoes"],["for","doadorOrgaos",1,"form-label"],[1,"row"],[1,"col-auto"],[1,"form-check"],["formControlName","doadorOrgaos","type","radio","id","doadorOrgaos1",3,"value"],["for","doadorOrgaos1",1,"form-check-label"],["formControlName","doadorOrgaos","type","radio","id","doadorOrgaos2",3,"value"],["for","doadorOrgaos2",1,"form-check-label"],["id","tipoEstadoCivil","label","Estado civil*:","identificador","codigo","descricao","valor","ngDefaultControl","",3,"formControl","opcoes"],["for","indRoubo",1,"form-label"],["formControlName","indRoubo","type","radio","id","indRoubo1",1,"form-check-input",3,"value"],["for","indRoubo1",1,"form-check-label"],["formControlName","indRoubo","type","radio","id","indRoubo2",1,"form-check-input",3,"value"],["for","indRoubo2",1,"form-check-label"],[1,"row","pt-2"],["for","form",1,"form-label"],[1,"row","d-flex","align-items-baseline"],[1,"col-4"],["type","text","topLabel","N\xBA do \xF3rg\xE3o:","placeholder","000000","tpMask","numero","tamMax","6","ngDefaultControl","",3,"formControl","id"],["type","text","placeholder","0000","tpMask","numero","tamMax","4","topLabel","Ano:","ngDefaultControl","",3,"formControl","id"],["type","text","placeholder","000000","tpMask","numero","tamMax","6","topLabel","N\xFAmero:","ngDefaultControl","",3,"formControl","id"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"nav",1)(3,"span"),s(4," Dados Gerais "),r()(),a(5,"div",2)(6,"div",3),g(7,fs,23,12,"form",4),r()(),a(8,"div",5)(9,"div",6)(10,"app-custom-button-voltar",7),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(11,"div",8),s(12,"Etapa 1 de 8"),r(),a(13,"div",9)(14,"app-custom-button-proximo",7),E("btnClicked",function(){return i.avancarEtapa()}),r()()(),a(15,"div",10)(16,"div",9)(17,"app-custom-button-limpar",7),E("btnClicked",function(){return i.limpaFormulario()}),r()()()),t&2&&(l(7),C(i.form?7:-1))},dependencies:[V,Z,W,Ne,P,J,Y,X,Me,he,le,ee,ue,je],encapsulation:2})}};var ea=()=>{let n=f(Q).getProtocolo();return f(mt).getDadosGerais(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("Dados gerais n\xE3o encontrados:",e),te(null))))};var Ut=class o{constructor(){this.http=f(Ee)}gravaDocumentoOrigem(n){let e=R.config.serverUrlRemota+"/pre-cadastro/documento-origem";return this.http.post(e,n,{responseType:"text"})}getDocumentoOrigem(n){let e=R.config.serverUrlRemota+"/pre-cadastro/documento-origem/";return this.http.get(e+n)}getMenor16(n){let e=R.config.serverUrlRemota+"/pre-cadastro/cidadao-menor-16/";return this.http.get(e+n)}getMenor18(n){let e=R.config.serverUrlRemota+"/pre-cadastro/cidadao-menor-18/";return this.http.get(e+n)}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}};var hs=["dialogContainer"],vs=(o,n)=>n.codigo;function gs(o,n){if(o&1&&(a(0,"div",6)(1,"small",27),s(2),r()()),o&2){let e=u(3);l(2),L(" ",e.MSG_CAMPO_OBRIGATORIO," ")}}function Cs(o,n){if(o&1&&(a(0,"div",6)(1,"small",27),s(2),r()()),o&2){let e=u(3);l(2),L(" M\xE1x. 40 n\xFAmeros: ",e.form.controls.txtMatricula.value.length,"/40 ")}}function bs(o,n){if(o&1&&(a(0,"div",13),g(1,gs,3,1,"div",6)(2,Cs,3,1,"div",6),r()),o&2){let e=u(2);l(),C(!e.form.controls.txtMatricula.value&&e.form.controls.txtMatricula.touched?1:e.form.controls.txtMatricula.dirty?2:-1)}}
44function _s(o,n){if(o&1&&(a(0,"small",27),s(1),r()),o&2){let e=u(4);l(),L(" ",e.form.controls.txtMatriculaUniaoEstavel.value.length,"/40")}}function Ds(o,n){if(o&1&&(a(0,"div",13)(1,"div",6),h(2,"app-custom-input",35),g(3,_s,2,1,"small",27),r()()),o&2){let e=u(3);l(2),m("formControl",e.form.controls.txtMatriculaUniaoEstavel)("tamMax",40)("id","txtMatriculaUniaoEstavel"),l(),C(e.form.controls.txtMatriculaUniaoEstavel.value&&e.form.controls.txtMatriculaUniaoEstavel.touched&&e.form.controls.txtMatriculaUniaoEstavel.dirty&&e.form.controls.txtMatriculaUniaoEstavel.invalid?3:-1)}}function Es(o,n){if(o&1&&(a(0,"div",13)(1,"div",6)(2,"label",28),s(3,"Tem uni\xE3o est\xE1vel registrada em cart\xF3rio e ela est\xE1 registrada na certid\xE3o informada?"),r(),a(4,"div",22)(5,"div",29)(6,"div",30),h(7,"input",31),a(8,"label",32),s(9," Sim "),r()()(),a(10,"div",29)(11,"div",30),h(12,"input",33),a(13,"label",34),s(14," N\xE3o "),r()()()()()(),g(15,Ds,4,4,"div",13)),o&2){let e=u(2);l(7),de(e.form.controls.indUniaoEstavel.invalid&&e.form.controls.indUniaoEstavel.touched?"form-check-input is-invalid":"form-check-input"),m("value",1),l(5),de(e.form.controls.indUniaoEstavel.invalid&&e.form.controls.indUniaoEstavel.touched?"form-check-input is-invalid":"form-check-input"),m("value",0),l(3),C(e.form.controls.indUniaoEstavel.value==1?15:-1)}}function Ms(o,n){o&1&&(a(0,"div",13)(1,"div",6)(2,"label",40),s(3,"Quais?"),r(),a(4,"div",41)(5,"label",42),s(6,"Separa\xE7\xE3o:"),r(),a(7,"div",43),h(8,"input",44),a(9,"label",45),s(10," Sim "),r()(),a(11,"div",46),h(12,"input",47),a(13,"label",48),s(14," N\xE3o "),r()()(),a(15,"div",41)(16,"label",49),s(17,"Div\xF3rcio:"),r(),a(18,"div",43),h(19,"input",50),a(20,"label",51),s(21," Sim "),r()(),a(22,"div",46),h(23,"input",52),a(24,"label",53),s(25," N\xE3o "),r()()()()()),o&2&&(l(8),m("value",1),l(4),m("value",0),l(7),m("value",1),l(4),m("value",0))}function Ss(o,n){if(o&1){let e=A();a(0,"label",28),s(1,"Sua certid\xE3o possui averba\xE7\xF5es? "),a(2,"i",15),E("click",function(){y(e);let i=u(2);return T(i.carregaImagem("assets/certidao_nascimento_averbacoes_corte.jpg"))}),r()(),a(3,"div",13)(4,"div",29)(5,"div",30),h(6,"input",36),a(7,"label",37),s(8," Sim "),r()()(),a(9,"div",29)(10,"div",30),h(11,"input",38),a(12,"label",39),s(13," N\xE3o "),r()()()(),g(14,Ms,26,4,"div",13)}if(o&2){let e=u(2);l(6),m("value",!0),l(5),m("value",!1),l(3),C(e.form.controls.possuiAverbacao.value?14:-1)}}function xs(o,n){if(o&1&&(a(0,"option",61),s(1),r()),o&2){let e=n.$implicit;m("ngValue",e),l(),L(" ",e.valor," ")}}function ys(o,n){if(o&1&&(a(0,"small",27),s(1),r()),o&2){let e=u(3);l(),M(e.MSG_CAMPO_OBRIGATORIO)}}function Ts(o,n){if(o&1&&(a(0,"div",54)(1,"p",55)(2,"strong"),s(3," Observamos que o encaminhamento \xE9 para menor de 16 anos. "),r()()(),a(4,"div",13),h(5,"app-custom-input",56),r(),a(6,"div",13),h(7,"app-custom-input",57),r(),a(8,"div",13),h(9,"app-custom-input",58),r(),a(10,"div",22)(11,"div",6)(12,"label",59),s(13,"Tipo de respons\xE1vel legal*:"),r(),a(14,"select",60),ne(15,xs,2,2,"option",61,vs),r()()(),a(17,"div",13)(18,"div",6),g(19,ys,2,1,"small",27),r()()),o&2){let e=u(2);l(5),m("formControl",e.form.controls.nomeResponsavel)("id","nomeResponsavel"),l(2),m("formControl",e.form.controls.cpfResponsavel)("id","cpfResponsavel"),l(2),m("formControl",e.form.controls.rgResponsavel)("id","rgResponsavel"),l(5),de(e.form.controls.tipoResponsavel.invali
44d&&e.form.controls.tipoResponsavel.touched?"form-select is-invalid":"form-select"),m("id","tipoResponsavel"),l(),ae(e.responsavelOpcoes()),l(4),C(e.form.controls.tipoResponsavel.invalid&&e.form.controls.tipoResponsavel.touched?19:-1)}}function Is(o,n){if(o&1){let e=A();a(0,"form",4)(1,"div",13)(2,"div",6)(3,"label",14),s(4,"Matr\xEDcula da certid\xE3o*: "),a(5,"i",15),E("click",function(){y(e);let i=u();return T(i.carregaImagem("assets/certidao_nascimento_matricula_corte.jpg"))}),r()(),h(6,"app-custom-input",16),g(7,bs,3,1,"div",13),r()(),a(8,"div",17)(9,"div",18),h(10,"app-custom-input-date",19),r()(),a(11,"div",20)(12,"div",21)(13,"div",22)(14,"div",6),h(15,"app-custom-select-uf",23),r()()(),a(16,"div",24)(17,"label",25),s(18,"Munic\xEDpio de emiss\xE3o*: "),a(19,"i",15),E("click",function(){y(e);let i=u();return T(i.carregaImagem("assets/certidao_nascimento_municipio_corte.jpg"))}),r()(),h(20,"app-custom-select-autocomplete",26),r()(),g(21,Es,16,7),g(22,Ss,15,3),g(23,Ts,20,10),r()}if(o&2){let e,t,i=u();m("formGroup",i.form),l(6),m("formControl",i.form.controls.txtMatricula)("tamMax",40)("id","matricula"),l(),C(i.form.controls.txtMatricula.invalid?7:-1),l(3),m("formControl",i.form.controls.dtEmissaoCertidao)("id","dtEmissaoCertidao"),l(5),m("formControl",i.form.controls.txtUf)("viewContainerRef",i.viewContainerRef),l(5),m("opcoes",i.municipiosOpcoes())("formControl",i.form.controls.txtMunicipio),l(),C(!i.statusIdade.ehMenor18&&((e=i.dadosCompartilhadosService.getDadoGeral())==null?null:e.tipoEstadoCivil)!=2?21:-1),l(),C(((t=i.dadosCompartilhadosService.getDadoGeral())==null?null:t.tipoEstadoCivil)==3||((t=i.dadosCompartilhadosService.getDadoGeral())==null?null:t.tipoEstadoCivil)==4||((t=i.dadosCompartilhadosService.getDadoGeral())==null?null:t.tipoEstadoCivil)==7?22:-1),l(),C(i.statusIdade.ehMenor16?23:-1)}}var No=class o extends oe{constructor(){super();this.documentoOrigemService=f(Ut);this.tabelasDominioGeralService=f(Be);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.municipiosOpcoes=j([]);this.responsavelOpcoes=j([]);this.imagemAjuda="";this.statusIdade={ehMenor16:!1,ehMenor18:!1};this.documentoOrigemModel=this.activatedRoute.snapshot.data.documentoOrigem,this.statusIdade.ehMenor16=this.activatedRoute.snapshot.data.menor16,this.statusIdade.ehMenor18=this.activatedRoute.snapshot.data.menor18}
44ngOnInit(){this.criaFormGroup()}criaFormGroup(){return _e(this,null,function*(){yield this.carregaTipoResponsavel(),this.documentoOrigemModel?this.documentoOrigemModel.txtUf?this.carregaMunicipios(this.documentoOrigemModel.txtUf):this.carregaFormGroup():this.criaNovoFormGroup()})}criaNovoFormGroup(){this.form=this.formBuilder.group({txtMatricula:new c(null,[D.required,D.minLength(40),D.maxLength(40)]),dtEmissaoCertidao:new c(null,[D.required]),txtUf:new c(null,[D.required]),txtMunicipio:new c({value:null,disabled:!0},[D.required]),indUniaoEstavel:new c(0),txtMatriculaUniaoEstavel:new c(""),possuiAverbacao:new c(!1),indAverbacaoInterdicao:new c(null),indAverbacaoEmancipacao:new c(null),indAverbacaoDivorcio:new c(null),indAverbacaoSeparacao:new c(null),nomeResponsavel:new c(null),cpfResponsavel:new c(null),rgResponsavel:new c(null),tipoResponsavel:new c(null)}),this.verificaAlteracaoUf(),this.verificaPossuiUniaoEstavel(),this.verificaMenor16()}carregaFormGroup(){this.form=this.formBuilder.group({txtMatricula:new c(this.documentoOrigemModel.txtMatricula,[D.required,D.minLength(40),D.maxLength(40)]),dtEmissaoCertidao:new c(me.convertStringToDate(this.documentoOrigemModel.dtEmissaoCertidao),[D.required,D.maxLength(10)]),txtUf:new c(this.documentoOrigemModel.txtUf,[D.required]),txtMunicipio:new c(this.buscaMunicipio(),[D.required]),indUniaoEstavel:new c(this.documentoOrigemModel.indUniaoEstavel??0),txtMatriculaUniaoEstavel:new c(this.documentoOrigemModel.txtMatriculaUniaoEstavel),possuiAverbacao:new c(this.carregaOpcaoAverbacao()!=0),indAverbacaoInterdicao:new c(this.documentoOrigemModel.indAverbacaoInterdicao),indAverbacaoEmancipacao:new c(this.documentoOrigemModel.indAverbacaoEmancipacao),indAverbacaoDivorcio:new c(this.documentoOrigemModel.indAverbacaoDivorcio),indAverbacaoSeparacao:new c(this.documentoOrigemModel.indAverbacaoSeparacao),nomeResponsavel:new c(this.documentoOrigemModel.txtResponsavelLegalNome),cpfResponsavel:new c(this.documentoOrigemModel.txtResponsavelLegalCPF),rgResponsavel:new c(this.documentoOrigemModel.txtResponsavelLegalRG),tipoResponsavel:new c(this.buscaTipoResponsavel())}),this.verificaAlteracaoUf(),this.verificaPossuiUniaoEstavel(),this.verificaMenor16()}removeCpfMask(e){return e.replace(/\D/g,"")}criaDocumentoOrigemModel(){let e=this.removeCpfMask(this.form.controls.cpfResponsavel.value??""),t=this.form.controls.tipoResponsavel.value?.codigo,i=this.form.controls.tipoResponsavel.value?.valor,d=this.form.controls.rgResponsavel.value,p=this.form.controls.nomeResponsavel.value,_=this.ehAverbacaoSeparacaoDivorcio()&&this.form.controls.possuiAverbacao.value?this.form.controls.indAverbacaoSeparacao.value:"",I=this.ehAverbacaoSeparacaoDivorcio()&&this.form.controls.possuiAverbacao.value?this.form.controls.indAverbacaoDivorcio.value:"";this.statusIdade.ehMenor16||(e="",t="",i="",d="",p=""),this.documentoOrigemModel={uuidPrecadastro:this.protocoloModel?.uuid??null,txtMatricula:this.form.controls.txtMatricula.value.replaceAll(" ",""),dtEmissaoCertidao:me.convertDateToString(this.form.controls.dtEmissaoCertidao.value),
44codTipoDocumentoOrigem:this.protocoloModel?.codDocumentoOrigem??null,txtDsTipoDocumentoOrigem:this.dadosCompartilhadosService.getTipoDocumentoOrigem()?.valor??null,txtTermo:"",txtUf:this.form.controls.txtUf.value??null,txtMunicipio:this.form.controls.txtMunicipio.value.nomeMunicA??null,codMunicipio:this.form.controls.txtMunicipio.value.nroMunic??null,txtZona:"",txtLivro:"",txtFolha:"",indAverbacaoInterdicao:this.form.controls.possuiAverbacao.value?this.form.controls.indAverbacaoInterdicao.value:0,indAverbacaoEmancipacao:this.form.controls.possuiAverbacao.value?this.form.controls.indAverbacaoEmancipacao.value:0,indAverbacaoDivorcio:I,indAverbacaoSeparacao:_,indUniaoEstavel:this.form.controls.indUniaoEstavel.value??null,indAverbacaoUniaoEstavel:0,txtMatriculaUniaoEstavel:this.form.controls.txtMatriculaUniaoEstavel.value?this.form.controls.txtMatriculaUniaoEstavel.value.replaceAll(" ",""):"",dtValidadeOpcaoBrasileiro:"01-01-2030 00:00:00",txtDocumentoOrigemImpressao:"",txtResponsavelLegalNome:p,txtResponsavelLegalCPF:e,txtResponsavelLegalRG:d,codTipoResponsavelLegal:t,txtDSTipoResponsavelLegal:i},this.dadosCompartilhadosService.setDocumentoOrigem(this.documentoOrigemModel)}carregaMunicipios(e){this.tabelasDominioGeralService.getMunicipios(e).subscribe({next:t=>{t&&t.municipios.length>0&&(this.municipiosOpcoes.set(t.municipios),this.form?this.form.controls.txtMunicipio.enable():this.carregaFormGroup())},error:t=>{this.messagesServiceModal.openModal(`Erro ao carregar munic\xEDpios. Tente novamente mais tarde. 45 46`+t.error,this.viewContainerRef)}})}carregaTipoResponsavel(){return _e(this,null,function*(){let e=yield this.tabelasDominioGeralService.getTipoResponsavel(this.viewContainerRef);if(e.data){let t=e.data;this.responsavelOpcoes.set(t)}})}verificaAlteracaoUf(){this.form.controls.txtUf.valueChanges.subscribe(e=>{e?.length==2&&(this.form.controls.txtMunicipio.setValue(null),this.carregaMunicipios(e))})}redirecionaDadoCertidao(){this.router.navigate(["etapas/dado-certidao"],{skipLocationChange:!0})}avancarEtapa(){this.validaFormulario()&&this.messagesServiceModal.openModalConfirmation(` 47 <p>Verifique as seguintes informa\xE7\xF5es:</p> 48 <p class="text-start fw-normal mb-1"> 49 Matr\xEDcula da certid\xE3o:<br> 50 <strong>${this.form.controls.txtMatricula.value}</strong> 51 </p> 52 <p class="text-start fw-normal mb-1"> 53 Data de validade da certid\xE3o: 54 <strong>${me.convertDateToStringSemHora(this.form.controls.dtEmissaoCertidao.value)}</strong> 55 </p> 56 <p class="text-start fw-normal mb-1"> 57 Estado (UF) de emiss\xE3o: 58 <strong>${this.form.controls.txtUf.value}</strong> 59 </p> 60 <p class="text-start fw-normal"> 61 Munic\xEDpio de emiss\xE3o: 62 <strong>${this.form.controls.txtMunicipio.value.nomeMunicA}</strong> 63 </p> 64 <p>As informa\xE7\xF5es da sua certid\xE3o est\xE3o preenchidas corretamente?</p> 65 `,this.viewContainerRef,e=>{e==="Sim"&&(this.criaDocumentoOrigemModel(),this.salvaDocumentoOrigem())})}salvaDocumentoOrigem(){this.documentoOrigemModel&&this.documentoOrigemService.gravaDocumentoOrigem(this.documentoOrigemModel).subscribe({next:e=>{e=="OK"&&this.redirecionaDadoCertidao()},error:e=>{let t=JSON.parse(e.error);this.messagesServiceModal.openModal(`Erro ao gravar documento de origem. 66 67`+t[0].message,this.viewContainerRef)}})}voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.voltaParaDadoDeclarado()}):this.voltaParaDadoDeclarado()}limpaFormulario(){this.limparForm(this.viewContainerRef)}validaFormulario(){return this.formularioValido()}voltaParaDadoDeclarado(){this.router.navigate(["etapas/dado-declarado"],{skipLocationChange:!0})}buscaMunicipio(){return this.municipiosOpcoes().find(e=>e.nomeMunicA==this.documentoOrigemModel.txtMunicipio)}buscaTipoResponsavel(){return this.responsavelOpcoes().find(e=>e.codigo==this.documentoOrigemModel.codTipoResponsavelLegal)}carregaImagem(e){this.messagesServiceModal.openModal("",this.viewContainerRef,e)}verificaPossuiUniaoEstavel(){this.form.controls.indUniaoEstavel.valueChanges.subscribe(e=>{e?this.setValidators():this.unsetValidators()})}setValidators(){this.form.controls.txtMatriculaUniaoEstavel.setValidators(D.required),this.form.controls.txtMatriculaUniaoEstavel.setValidators(D.minLength(40)),this.form.controls.txtMatriculaUniaoEstavel.setValidators(D.maxLength(40)),this.form.controls.txtMatriculaUniaoEstavel.updateValueAndValidity()}unsetValidators(){this.form.controls.txtMatriculaUniaoEstavel.reset(),this.form.controls.txtMatriculaUniaoEstavel.setValidators([]),this.form.controls.txtMatriculaUniaoEstavel.updateValueAndValidity()}carregaOpcaoAverbacao(){return this.documentoOrigemModel.indAverbacaoInterdicao==1?1:this.documentoOrigemModel.indAverbacaoEmancipacao==1?2:this.documentoOrigemModel.indAverbacaoSeparacao==1?3:this.documentoOrigemModel.indAverbacaoDivorcio==1?4:0}ehAverbacaoSeparacaoDivorcio(){return this.dadosCompartilhadosService.getDadoGeral()?.tipoEstadoCivil==3||this.dadosCompartilhadosService.getDadoGeral()?.tipoEstadoCivil==4||this.dadosCompartilhadosService.getDadoGeral()?.tipoEstadoCivil==7}verificaMenor16(){this.statusIdade.ehMenor16&&this.setValidatorsResponsavelLegal()}setValidatorsResponsavelLegal(){this.form.controls.nomeResponsavel.setValidators(D.required),this.form.controls.nomeResponsavel.updateValueAndValidity(),this.form.controls.cpfResponsavel.setValidators(D.required),this.form.controls.cpfResponsavel.updateValueAndValidity(),this.form.controls.tipoResponsavel.setValidators(D.required),this.form.controls.tipoResponsavel.updateValueAndValidity()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-documento-origem"]],viewQuery:function(t,i){if(t&1&&z(hs,5,$),t&2){let d;
67U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:24,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body","overflow-auto"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","text-center","mt-3"],[1,"col"],[1,"bi","bi-info-circle-fill","fs-x-small"],[1,"row","justify-content-between","align-items-center","mt-3"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"row","mt-3"],[1,"row","pb-2"],["for","txtMatricula",1,"form-label"],[1,"bi","bi-info-circle-fill","fs-x-large",3,"click"],["type","text","placeholder","000000 00 00 0000 0 00000 000 0000000 00","tpMask","matricula","ngDefaultControl","",3,"formControl","tamMax","id"],[1,"row","pb-4"],[1,"col-6"],["topLabel","Data de emiss\xE3o da certid\xE3o*:","ngDefaultControl","",3,"formControl","id"],[1,"row","pb-2","d-flex","align-items-baseline"],[1,"col-5"],[1,"row"],["id","txtUf","label","Estado (UF) de emiss\xE3o*:","pathImage","assets/certidao_nascimento_uf_corte.jpg","ngDefaultControl","",3,"formControl","viewContainerRef"],[1,"col-7"],["for","municipio",1,"form-label"],["id","municipio","bindLabel","nomeMunicA","ngDefaultControl","",3,"opcoes","formControl"],[1,"px-1","text-danger"],["for","indUniaoEstavel",1,"form-label"],[1,"col-auto"],[1,"form-check"],["formControlName","indUniaoEstavel","type","radio","id","indUniaoEstavel1",3,"value"],["for","indUniaoEstavel1",1,"form-check-label"],["formControlName","indUniaoEstavel","type","radio","id","indUniaoEstavel2",3,"value"],["for","indUniaoEstavel2",1,"form-check-label"],["type","text","topLabel","Matr\xEDcula da uni\xE3o est\xE1vel*:","placeholder","000000 00 00 0000 0 00000 000 0000000 00","tpMask","matricula","ngDefaultControl","",3,"formControl","tamMax","id"],["formControlName","possuiAverbacao","type","radio","id","possuiAverbacao1",1,"form-check-input",3,"value"],["for","possuiAverbacao1",1,"form-check-label"],["formControlName","possuiAverbacao","type","radio","id","possuiAverbacao2",1,"form-check-input",3,"value"],["for","possuiAverbacao2",1,"form-check-label"],["for","possuiAverbacao",1,"form-label"],[1,"d-flex","align-items-center"],["for","indAverbacaoSeparacao",1,"ms-2","me-3","radio-label"],[1,"form-check","form-check-inline","me-3"],["formControlName","indAverbacaoSeparacao","type","radio","id","indAverbacaoSeparacao1",1,"form-check-input",3,"value"],["for","indAverbacaoSeparacao1",1,"form-check-label"],[1,"form-check","form-check-inline"],["formControlName","indAverbacaoSeparacao","type","radio","id","indAverbacaoSeparacao2",1,"form-check-input",3,"value"],["for","indAverbacaoSeparacao2",1,"form-check-label"],["for","indAverbacaoDivorcio",1,"ms-2","me-3","radio-label"],["formControlName","indAverbacaoDivorcio","type","radio","id","indAverbacaoDivorcio1",1,"form-check-input",3,"value"],["for","indAverbacaoDivorcio1",1,"form-check-label"],["formControlName","indAverbacaoDivorcio","type","radio","id","indAverbacaoDivorcio2",1,"form-check-input",3,"value"],["for","indAverbacaoDivorcio2",1,"form-check-label"],[1,"text-start","mb-2","justify-content-center","card-responsavel"],[1,"p-2"],["type","text","topLabel","Nome completo do(a) respons\xE1vel legal*:","tamMax","66","ngDefaultControl","",3,"formControl","id"],["type","text","topLabel","CPF do(a) respons\xE1vel legal*:","placeholder","000.000.000-00","tpMask","cpf","ngDefaultControl","",3,"formControl","id"],["type","text","topLabel","RG do(a) respons\xE1vel legal:","placeholder","0000000000","tpMask","numero","tamMax","10","ngDefaultControl","",3,"formControl","id"],["for","tipoResponsavel",1,"form-label"],["formControlName","tipoResponsavel",3,"id"],[3,"ngValue"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"nav",1)(3,"span"),s(4," Dados da Certid\xE3o "),r()(),a(5,"div",2)(6,"div",3),g(7,Is,24,14,"form",4),a(8,"div",5)(9,"span",6)(10,"small"),s(11," Clique no \xEDcone "),h(12,"i",7),s(13," para saber mais "),r()()()()(),a(14,"div",8)(15,"div",6)(16,"app-custom-button-voltar",9),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(17,"div",10),s(18,"Etapa 4 de 8"),r(),a(19,"div",11)(20,"app-custom-button-proximo",9),E("btnClicked",function(){return i.avancarEtapa()}),r()()(),a(21,"div",12)(22,"div",11)(23,"app-custom-button-limpar",9),E("btnClicked",function(){return i.limpaFormulario()}),r()()()),t&2&&(l(7),C(i.form?7:-1))},dependencies:[V,Z,At,Rt,W,Ot,Ne,P,J,Y,X,Me,he,ct,le,ee,ue,dt,Fe],styles:[".select-editable[_ngcontent-%COMP%]{position:relative;background-color:#fff;border:solid grey 1px;width:120px;height:18px}.select-editable[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{position:absolute;top:0;left:0;font-size:14px;border:none;width:120px;margin:0}.select-editable[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100px;padding:1px;font-size:12px;border:none}.select-editable[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus, .select-editable[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none}.radio-label[_ngcontent-%COMP%]{width:120px}"]})}};var ta=()=>{let n=f(Q).getProtocolo();return f(Ut).getDocumentoOrigem(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("Documento de origem n\xE3o encontrado:",e),te(null))))};var ws=o=>
67({cursor:o});function Ns(o,n){if(o&1&&(a(0,"small",4),s(1),r()),o&2){let e=u();l(),L(" ",e.errorMessage()?e.errorMessage():"Este campo \xE9 obrigat\xF3rio")}}function Fs(o,n){if(o&1&&(a(0,"small",5),s(1),r()),o&2){let e=u();l(),M(e.helperText())}}function Os(o,n){if(o&1){let e=A();a(0,"li",8),E("click",function(){let i=y(e).$implicit,d=u(2);return T(d.selectItemEmit(i))}),s(1),r()}if(o&2){let e=n.$implicit;l(),L(" ",e.tipoRuaAbrev+" "+e.nomeRua," ")}}function As(o,n){if(o&1&&(a(0,"ul",6),ne(1,Os,2,1,"li",7,Ge),r()),o&2){let e=u();l(),ae(e.opcoes())}}var Ht=class o{constructor(){this.id=b.required();this.icon=b();this.title=b();this.iconId=b.required();this.label=b.required();this.errorMessage=b();this.formControl=b.required();this.tamanhoMaximo=b();this.opcoes=b();this.placeholder=b("");this.helperText=b();this.keydownEnter=ge();this.iconClick=ge();this.selectItem=ge()}keydownEnterEmit(){this.keydownEnter.emit(!0)}iconClickEmit(){this.iconClick.emit(!0)}selectItemEmit(n){this.selectItem.emit(n)}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-custom-input-icon"]],inputs:{id:[1,"id"],icon:[1,"icon"],title:[1,"title"],iconId:[1,"iconId"],label:[1,"label"],errorMessage:[1,"errorMessage"],formControl:[1,"formControl"],tamanhoMaximo:[1,"tamanhoMaximo"],opcoes:[1,"opcoes"],placeholder:[1,"placeholder"],helperText:[1,"helperText"]},outputs:{keydownEnter:"keydownEnter",iconClick:"iconClick",selectItem:"selectItem"},decls:8,vars:18,consts:[[1,"form-label",3,"for"],[1,"input-icon-container","position-relative"],["type","text",3,"keydown.enter","id","formControl","title","maxlength","placeholder"],["title","Pesquisar",3,"click","id","ngStyle"],[1,"px-1","text-danger"],[1,"px-1","text-warning-custom","fst-italic"],[1,"dropdown-menu"],[1,"ps-2"],[1,"ps-2",3,"click"]],template:function(e,t){e&1&&(a(0,"label",0),s(1),r(),a(2,"div",1)(3,"input",2),E("keydown.enter",function(){return t.keydownEnterEmit()}),r(),a(4,"i",3),E("click",function(){return t.iconClickEmit()}),r(),g(5,Ns,2,1,"small",4)(6,Fs,2,1,"small",5),g(7,As,3,0,"ul",6),r()),e&2&&(m("for",t.id()),l(),M(t.label()),l(2),de(t.formControl().invalid&&t.formControl().touched?"form-control rounded-pill is-invalid":"form-control rounded-pill"),m("id",t.id())("formControl",t.formControl())("title",t.title())("maxlength",t.tamanhoMaximo())("placeholder",t.placeholder()),l(),de(t.icon()+" position-absolute input-icon"),m("id",t.iconId())("ngStyle",Ye(16,ws,t.formControl().enabled?"pointer":"default")),ze("data-bs-toggle",t.formControl().enabled?"dropdown":null),l(),C(t.formControl().invalid&&t.formControl().touched?5:6),l(2),C(t.opcoes()?7:-1))},dependencies:[ro,Xi,V,W,P,co,Y],styles:[`.input-icon-container{position:relative;display:inline-block;width:100%}.input-icon{position:absolute;top:19px;right:0;transform:translateY(-50%);font-size:1.5rem;padding-right:20px;padding-left:10px}.dropdown-menu{overflow-y:auto;max-height:300px;width:100%;white-space:nowrap}.dropdown-menu li:hover{background-color:#4169e1;color:#fff;cursor:pointer} 68`],encapsulation:2})}};var jt=class o{constructor(){this.APIURL=R.config.serverUrlRemota;this.http=f(Ee)}getConsultaCEP(n){return n=n.replaceAll("-","").replaceAll(".",""),this.http.get(`${this.APIURL}/endereco/cep/${n}`).pipe(B(e=>e&&e.logradouros?e?.logradouros[0]:null),k())}getUFS(){return this.http.get(`${this.APIURL}/endereco/uf/lista`).pipe(k())}getMunicipios(n){let e=new lo;return n&&(e=e.set("uf",n)),Ni(this.http.get(`${this.APIURL}/endereco/municipio/lista`,{params:e}).pipe(B(t=>t.municipios.map(i=>(i.nomeMunicA&&(i.nomeMunicA=i.nomeMunicA.toUpperCase()),i))),k()))}getLogradouros(n,e){e=e?.toUpperCase(),e=me.removeAcentuacao(e),e=e?.trim();let t=new lo;return t=t.set("nroIntMunicipio",n),t=t.set("nomeLogradouro",e),this.http.get(`${this.APIURL}/endereco/logradouro/lista`,{params:t}).pipe(k())}getLogradouro(n,e){e=e?.toUpperCase(),e=me.removeAcentuacao(e),e=e?.trim();let t=new lo;return t=t.set("nroIntMunicipio",n),t=t.set("nomeLogradouro",e),this.http.get(`${this.APIURL}/endereco/logradouro`,{params:t}).pipe(k())}findById(n){return this.http.get(`${this.APIURL}/pre-cadastro/dado-endereco/${n}`).pipe(k())}gravaEndereco(n){return this.http.post(`${this.APIURL}/pre-cadastro/dado-endereco`,n,{responseType:"text"}).pipe(k())}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}};var ks=["dialogContainer"];function Ps(o,n){if(o&1){let e=A();a(0,"form",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"strong")(5,"span",6),s(6," Aten\xE7\xE3o: "),r(),s(7,"informe o endere\xE7o onde voc\xEA reside atualmente "),r()(),a(8,"div",7)(9,"div",8),h(10,"app-custom-input",9),r()(),a(11,"div",7)(12,"div",10)(13,"div",11),h(14,"app-custom-select-uf",12),r(),a(15,"div",13),h(16,"app-custom-select-autocomplete",14),r()()(),a(17,"app-custom-input-icon",15),E("keydownEnter",function(){y(e);let i=u();return T(i.buscaLogradouro())}
68)("iconClick",function(){y(e);let i=u();return T(i.carregaLogradouro())})("selectItem",function(i){y(e);let d=u();return T(d.selecionaLogradouro(i))}),r(),a(18,"div",16)(19,"div",17)(20,"input",18),E("click",function(){y(e);let i=u();return T(i.desabilitaLogradouro())}),r(),a(21,"label",19),s(22,"N\xE3o encontrei o meu logradouro neste cadastro"),r()()(),a(23,"div",7)(24,"div",10)(25,"div",20)(26,"label",21),s(27,"N\xFAmero:"),r(),h(28,"app-custom-input",22),r(),a(29,"div",23),h(30,"app-custom-input",24),r()()()()(),a(31,"div",25)(32,"div",26)(33,"app-custom-button-voltar",27),E("btnClicked",function(){y(e);let i=u();return T(i.voltarEtapa())}),r()(),a(34,"div",28),s(35,"Etapa 5 de 8"),r(),a(36,"div",29)(37,"app-custom-button-proximo",27),E("btnClicked",function(){y(e);let i=u();return T(i.avancarEtapa())}),r()()(),a(38,"div",30)(39,"div",29)(40,"app-custom-button-limpar",27),E("btnClicked",function(){y(e);let i=u();return T(i.limpaFormulario())}),r()()()()}if(o&2){let e=u();m("formGroup",e.form),l(10),m("formControl",e.form.controls.nroCep)("tpMask","cep")("placeholder","00000-000")("id","nroCep"),l(4),m("formControl",e.form.controls.txtUf),l(2),m("label","Munic\xEDpio*:")("opcoes",e.municipiosOpcoes())("formControl",e.form.controls.txtNomeMunicipio),l(),m("formControl",e.form.controls.txtLogradouro)("label",e.form.controls.indNaoConstaCadastro!=null&&e.form.controls.indNaoConstaCadastro.value?"Logradouro (avenida, rua, etc.)":"Logradouro (avenida, rua, etc.)*")("opcoes",e.logradouroOpcoes()),l(3),m("formControl",e.form.controls.indNaoConstaCadastro)("id","indNaoConstaCadastro"),l(8),m("formControl",e.form.controls.txtNumero)("tamMax",5)("id","txtNumero"),l(2),m("formControl",e.form.controls.txtComplemento)("id","txtComplemento")("tamMax",5)}}var Fo=class o extends oe{constructor(){super();this.enderecoService=f(jt);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.municipiosOpcoes=j([]);this.logradouroOpcoes=j([]);this.MSG_PESQ_LOGRADOURO='Pesquise o logradouro clicando no \xEDcone da lupa. Caso o sistema n\xE3o encontre, selecione a op\xE7\xE3o "Logradouro n\xE3o consta no cadastro"';this.enderecoModel=this.activatedRoute.snapshot.data.endereco}ngOnInit(){this.criaFormGroup()}criaFormGroup(){this.enderecoModel?this.carregaMunicipios(this.enderecoModel.txtUf).then(e=>{e&&e.length>0&&(this.municipiosOpcoes.set(e),this.carregaFormGroup())}):this.criaNovoFormGroup()}criaNovoFormGroup(){this.form=this.formBuilder.group({nroCep:new c(null,[D.minLength(9)]),txtUf:new c(null,D.required),txtNomeMunicipio:new c(null,D.required),txtLogradouro:new c({value:null,disabled:!0}),txtNumero:new c(null),txtComplemento:new c(null),indNaoConstaCadastro:new c(null)}),this.comportamentoTelaRN()}carregaFormGroup(){this.form=this.formBuilder.group({nroCep:new c(this.enderecoModel.nroCep,[D.minLength(9)]),txtUf:new c(this.enderecoModel.txtUf,D.required),txtNomeMunicipio:new c(this.buscaMunicipio(this.enderecoModel.txtNomeMunicipio),D.required),txtLogradouro:new c({value:this.enderecoModel.txtLogradouro,disabled:!0}),txtNumero:new c(this.enderecoModel.txtNumero),txtComplemento:new c(this.enderecoModel.txtComplemento),indNaoConstaCadastro:new c(this.enderecoModel.indNaoConstaCadastro)}),this.comportamentoTelaRN()}comportamentoTelaRN(){this.verificaMudancaCEP(),this.verificaMudancaUF(),this.verificaMudancaMunicipio(),this.verificaMudancaLogradouro(),this.verificaMudancaLogradouroNaoConstaCadastro()}verificaMudancaCEP(){this.form.controls.nroCep.valueChanges.pipe(Se(this.destroy$)).subscribe(e=>{e&&e.length==9?this.enderecoService.getConsultaCEP(e).subscribe({next:t=>{t?this.carregaMunicipios(t.ufMunic).then(i=>{i&&(this.municipiosOpcoes.set(i),this.form.controls.txtLogradouro.enable(),this.carregaDadosCEP(t))}):(this.openMessageCEPNaoEncontrado(),this.form.reset(),this.form.patchValue({indNaoConstaCadastro:!0},{emitEvent:!1}))},error:t=>{console.error(t),this.messagesServiceModal.openModal(`N\xE3o foi poss\xEDvel consultar o CEP. Tente novamente mais tarde. 69 70`+t.error,this.viewContainerRef)}}):(!e||e.length==0)&&(this.form.controls.txtLogradouro.reset(),this.form.controls.txtLogradouro.enable(),this.form.controls.txtLogradouro.addValidators(D.required),this.form.controls.txtLogradouro?.updateValueAndValidity())})}openMessageCEPNaoEncontrado(){this.avisoService.setMessage("DANGER","CEP n\xE3o encontrado.")}verificaMudancaUF(){this.form.controls.txtUf?.valueChanges.pipe(Se(this.destroy$)).subscribe(e=>{e?(this.carregaMunicipios(e).then(t=>{t&&(this.municipiosOpcoes.set(t),this.form.controls.nroCep.value&&this.form.controls.nroCep.reset())}),this.form.controls.txtNomeMunicipio?.enable(),this.form.patchValue({txtNomeMunicipio:null},{emitEvent:!1})):(this.form.controls.txtNomeMunicipio.patchValue(null),this.form.controls.txtNomeMunicipio.disable(),this.form.controls.txtLogradouro.patchValue(null),this.form.controls.indNaoConstaCadastro.patchValue(null))})}verificaMudancaMunicipio(){this.form.controls.txtNomeMunicipio?.valueChanges.pipe(Se(this.destroy$)).subscribe(e=>{e&&(this.form.controls.txtLogradouro.reset(),this.form.controls.nroCep.reset(),this.form.controls.txtLogradouro.enable(),this.form.controls.indNaoConstaCadastro.enable(),this.form.controls.txtLogradouro.addValidators(D.required),this.form.controls.txtLogradouro.updateV
70alueAndValidity())})}verificaMudancaLogradouro(){this.form.controls.txtLogradouro.valueChanges.subscribe(e=>{e&&this.form.patchValue({indNaoConstaCadastro:!1},{emitEvent:!1})})}verificaMudancaLogradouroNaoConstaCadastro(){this.form.controls.indNaoConstaCadastro.valueChanges.subscribe(e=>{e?(this.form.controls.txtLogradouro.clearValidators(),this.form.controls.txtLogradouro.updateValueAndValidity()):(this.form.controls.txtLogradouro.addValidators(D.required),this.form.controls.txtLogradouro.updateValueAndValidity())})}buscaLogradouro(){this.carregaLogradouro(),this.form.controls.txtLogradouro.enabled&&document.getElementById("searchIcon")?.click()}carregaLogradouro(){this.form.controls.txtLogradouro.enabled&&this.form.controls.txtNomeMunicipio.value&&this.form.controls.txtUf.value?(this.logradouroOpcoes.set([]),this.form.controls.txtLogradouro.value&&this.form.controls.txtLogradouro.value?.length>3&&this.enderecoService.getLogradouros(this.form.controls.txtNomeMunicipio?.value.nroMunic,this.form.controls.txtLogradouro?.value).subscribe({next:e=>{e?.length>0?this.logradouroOpcoes.set(e):(this.logradouroSelecionado=null,this.form.controls.txtLogradouro.patchValue(null))},error:e=>{console.error(e),this.messagesServiceModal.openModal(`N\xE3o foi poss\xEDvel verificar a mudan\xE7a de CEP. Tente novamente mais tarde. 71 72`+e.error,this.viewContainerRef)}})):this.messagesServiceModal.openModal("Selecione uma UF e um munic\xEDpio.",this.viewContainerRef)}selecionaLogradouro(e){this.logradouroSelecionado=e;let t=`${String(this.logradouroSelecionado.cepCorreio).slice(0,5)}-${String(this.logradouroSelecionado.cepCorreio).slice(5,8)}`;this.form.patchValue({txtLogradouro:this.logradouroSelecionado.nomeRua,nroCep:t},{emitEvent:!1})}desabilitaLogradouro(){this.form.controls.indNaoConstaCadastro?.value?(this.form.controls.txtLogradouro.enable(),this.form.controls.txtLogradouro.addValidators(D.required),this.form.controls.txtNumero.enable()):(this.form.controls.txtLogradouro.patchValue(""),this.form.controls.txtNumero.patchValue(""),this.logradouroSelecionado=null),this.form.controls.txtLogradouro.updateValueAndValidity(),this.form.controls.txtNumero.updateValueAndValidity()}carregaMunicipios(e){return Promise.resolve(this.enderecoService.getMunicipios(e))}carregaDadosCEP(e){this.logradouroSelecionado=e,this.form.patchValue({txtUf:this.logradouroSelecionado.ufMunic,txtNomeMunicipio:this.municipiosOpcoes().find(t=>t.nroMunic===e.nroMunic),txtLogradouro:e.nomeRua},{emitEvent:!1}),this.atualizaForm()}atualizaForm(){this.form.controls.txtNumero.reset(),this.form.controls.txtComplemento.reset()}salvaEndereco(){this.enderecoService.gravaEndereco(this.enderecoModel).subscribe({next:()=>{this.redirecionaParaSelecaoDocumentos()},error:e=>{console.error(e),this.messagesServiceModal.openModal(`N\xE3o foi gravar o endere\xE7o. Tente novamente mais tarde. 73 74`+e.error,this.viewContainerRef)}})}redirecionaParaSelecaoDocumentos(){this.router.navigate(["etapas/selecao-documentos"],{skipLocationChange:!0})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}criaEnderecoModel(){this.enderecoModel={uuidPrecadastro:this.protocoloModel?.uuid??"",nroCep:this.form.controls.nroCep.value??"",txtUf:this.form.controls.txtUf.value,txtNomeMunicipio:this.form.controls.txtNomeMunicipio.value?.nomeMunicA,codMunicipio:this.logradouroSelecionado?.nroMunic,txtLogradouro:this.form.controls.txtLogradouro.value,txtNumero:this.form.controls.txtNumero.value,txtComplemento:this.form.controls.txtComplemento.value??"",codIsp:this.logradouroSelecionado?.nroIntLogr??"",indNaoConstaCadastro:this.form.controls.indNaoConstaCadastro?.value?1:0},this.dadosCompartilhadosService.setEndereco(this.enderecoModel)}buscaMunicipio(e){return this.municipiosOpcoes().find(t=>
74t.nomeMunicA.toLowerCase()==e?.toLowerCase())}redirecionaDadoCertidao(){this.router.navigate(["etapas/dado-certidao"],{skipLocationChange:!0})}avancarEtapa(){this.validaFormulario()&&(this.criaEnderecoModel(),this.salvaEndereco())}voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.redirecionaDadoCertidao()}):this.redirecionaDadoCertidao()}limpaFormulario(){this.messagesServiceModal.openModalConfirmation(this.MSG_LIMPAR,this.viewContainerRef,e=>{e==="Sim"&&(this.form.reset({},{emitEvent:!1}),this.logradouroSelecionado=null)})}validaFormulario(){return this.formularioValido()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-endereco"]],viewQuery:function(t,i){if(t&1&&z(ks,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:6,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"form-horizontal",3,"formGroup"],[1,"card"],[1,"card-body"],[1,"atencao-text"],[1,"text-danger","text-uppercase"],[1,"mb-3","d-flex","flex-column"],[1,"row","pb-2"],["type","text","topLabel","CEP:","autocomplete","off","ngDefaultControl","",3,"formControl","tpMask","placeholder","id"],[1,"row"],[1,"col-4"],["id","txtUf","label","UF*:","ngDefaultControl","",3,"formControl"],[1,"col-8"],["id","municipio","bindLabel","nomeMunicA","ngDefaultControl","",3,"label","opcoes","formControl"],["id","txtLogradouro","icon","bi bi-search","title","Pesquisar","iconId","searchIcon","ngDefaultControl","",3,"keydownEnter","iconClick","selectItem","formControl","label","opcoes"],[1,"radio-custom","pb-2"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"click","formControl","id"],["for","indNaoConstaCadastro",1,"form-check-label"],[1,"col-5"],["for","txtNumero",1,"form-label"],["type","text","autocomplete","off","ngDefaultControl","",3,"formControl","tamMax","id"],[1,"col-7"],["type","text","topLabel","Complemento:","autocomplete","off","ngDefaultControl","",3,"formControl","id","tamMax"],[1,"row","justify-content-between","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"row","mt-4"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"nav",1)(3,"span"),s(4," Endere\xE7o Residencial "),r()(),g(5,Ps,41,20,"form",2)),t&2&&(l(5),C(i.form?5:-1))},dependencies:[V,Z,W,Ft,P,J,Y,X,kt,he,ee,le,ue,dt,Fe,Ht],styles:[".input-icon-container[_ngcontent-%COMP%]{position:relative;display:inline-block;width:100%}.search-icon[_ngcontent-%COMP%]{position:absolute;top:19px;right:0;transform:translateY(-50%);font-size:1.5rem;padding-right:20px;padding-left:10px}.dropdown-menu[_ngcontent-%COMP%]{overflow-y:auto;max-height:300px;width:100%;white-space:nowrap}.dropdown-menu[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background-color:#4169e1;color:#fff;cursor:pointer}.erro-logradouro[_ngcontent-%COMP%]{border-color:red}#logradouro[_ngcontent-%COMP%]:disabled{pointer-events:none;background-color:#e9ecef;opacity:1}#logradouro[_ngcontent-%COMP%]:active{background-color:#fff}#logradouro[_ngcontent-%COMP%]{padding-right:60px}"]})}};var oa=()=>{let n=f(Q).getProtocolo();return f(jt).findById(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("Documento de origem n\xE3o encontrado:",e),te(null))))};var $t=class o{constructor(){this.http=f(Ee)}gravaFiliacao(n){let e=R.config.serverUrlRemota+"/pre-cadastro/filiacao";return this.http.post(e,n,{responseType:"text"})}getFiliacao(n){let e=R.config.serverUrlRemota+"/pre-cadastro/filiacao/";return this.http.get(e+n)}getTipoFiliacao(){let n=R.config.serverUrlRemota+"/dominio/tipo-filiacao";return this.http.get(n).pipe(k())}getApresentaCpfFiliacao(){let n=R.config.serverUrlRemota+"/parametro-sistema/APRESENTAR_CPF_FILIACAO";return this.http.get(n).pipe(k())}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}};var Vs=["dialogContainer"];function Gs(o,n){if(o&1&&(a(0,"div",15)(1,"div",17),h(2,"input",20),a(3,"label",21),s(4),r()()()),o&2){let e=n.$implicit,t=u(2);l(2),de(t.form.controls.codTipoFiliacao1.invalid&&t.form.controls.codTipoFiliacao1.touched?"form-check-input is-invalid":"form-check-input"),m("value",e.codigo),l(2),L(" ",e.valor," ")}}function Ls(o,n){if(o&1&&(a(0,"div",16),h(1,"app-custom-input",22),r()),o&2){let e=u(2);l(),m("formControl",e.form.controls.cpfFiliacao1)("id","cpfFiliacao1")}}function Bs(o,n){if(o&1&&(a(0,"div",15)(1,"div",17),h(2,"input",24),a(3,"label",25),s(4),r()()()),o&2){let e=n.$implicit,t=u(3);
74l(2),de(t.form.controls.codTipoFiliacao2.invalid&&t.form.controls.codTipoFiliacao2.touched?"form-check-input is-invalid":"form-check-input"),m("value",e.codigo),l(2),L(" ",e.valor," ")}}function qs(o,n){if(o&1&&(a(0,"div",16),h(1,"app-custom-input",22),r()),o&2){let e=u(3);l(),m("formControl",e.form.controls.cpfFiliacao2)("id","cpfFiliacao2")}}function Us(o,n){if(o&1&&(a(0,"div",11)(1,"label",23),s(2,"Tipo de filia\xE7\xE3o:"),r(),a(3,"div",14),ne(4,Bs,5,4,"div",15,Ge),r()(),g(6,qs,2,2,"div",16)),o&2){let e=u(2);l(4),ae(e.tipoFiliacaoOpcoes()),l(2),C(e.mostrarCpf?6:-1)}}function Hs(o,n){if(o&1&&(a(0,"div",15)(1,"div",17),h(2,"input",27),a(3,"label",28),s(4),r()()()),o&2){let e=n.$implicit,t=u(4);l(2),de(t.form.controls.codTipoFiliacao3.invalid&&t.form.controls.codTipoFiliacao3.touched?"form-check-input is-invalid":"form-check-input"),m("value",e.codigo),l(2),L(" ",e.valor," ")}}function js(o,n){if(o&1&&(a(0,"div",16),h(1,"app-custom-input",22),r()),o&2){let e=u(4);l(),m("formControl",e.form.controls.cpfFiliacao3)("id","cpfFiliacao3")}}function $s(o,n){if(o&1&&(a(0,"div",11)(1,"label",26),s(2,"Tipo de filia\xE7\xE3o:"),r(),a(3,"div",14),ne(4,Hs,5,4,"div",15,Ge),r()(),g(6,js,2,2,"div",16)),o&2){let e=u(3);l(4),ae(e.tipoFiliacaoOpcoes()),l(2),C(e.mostrarCpf?6:-1)}}function zs(o,n){if(o&1&&(a(0,"div",15)(1,"div",17),h(2,"input",30),a(3,"label",31),s(4),r()()()),o&2){let e=n.$implicit,t=u(4);l(2),de(t.form.controls.codTipoFiliacao4.invalid&&t.form.controls.codTipoFiliacao4.touched?"form-check-input is-invalid":"form-check-input"),m("value",e.codigo),l(2),L(" ",e.valor," ")}}function Qs(o,n){if(o&1&&(a(0,"div",14),h(1,"app-custom-input",22),r()),o&2){let e=u(4);l(),m("formControl",e.form.controls.cpfFiliacao4)("id","cpfFiliacao4")}}function Ws(o,n){if(o&1&&(a(0,"div",11)(1,"label",29),s(2,"Tipo de filia\xE7\xE3o:"),r(),a(3,"div",14),ne(4,zs,5,4,"div",15,Ge),r()(),g(6,Qs,2,2,"div",14)),o&2){let e=u(3);l(4),ae(e.tipoFiliacaoOpcoes()),l(2),C(e.mostrarCpf?6:-1)}}function Ys(o,n){if(o&1&&(a(0,"div",11)(1,"div",6),h(2,"app-custom-input",12),r()(),g(3,$s,7,1),a(4,"div",11)(5,"div",6),h(6,"app-custom-input",12),r()(),g(7,Ws,7,1)),o&2){let e=u(2);l(2),m("formControl",e.form.controls.nomeCompleto3)("id","nomeCompleto3"),l(),C(e.form.controls.nomeCompleto3.value?3:-1),l(3),m("formControl",e.form.controls.nomeCompleto4)("id","nomeCompleto4"),l(),C(e.form.controls.nomeCompleto4.value?7:-1)}}function Ks(o,n){if(o&1&&(a(0,"form",4)(1,"div",11)(2,"div",6),h(3,"app-custom-input",12),r()(),a(4,"div",11)(5,"label",13),s(6,"Tipo de filia\xE7\xE3o:"),r(),a(7,"div",14),ne(8,Gs,5,4,"div",15,Ge),r()(),g(10,Ls,2,2,"div",16),a(11,"div",11)(12,"div",6),h(13,"app-custom-input",12),r()(),g(14,Us,7,1),a(15,"div",11)(16,"div",6)(17,"div",17),h(18,"input",18),a(19,"label",19),s(20," Existem mais filia\xE7\xF5es na sua certid\xE3o a serem informadas? "),r()()()(),g(21,Ys,8,6),r()),o&2){let e=u();m("formGroup",e.form),l(3),m("formControl",e.form.controls.nomeCompleto1)("id","nomeCompleto1"),l(5),ae(e.tipoFiliacaoOpcoes()),l(2),C(e.mostrarCpf?10:-1),l(3),m("formControl",e.form.controls.nomeCompleto2)("id","nomeCompleto2"),l(),C(e.form.controls.nomeCompleto2.value?14:-1),l(7),C(e.form.controls.informarMaisFiliacoes.value?21:-1)}}var Oo=class o extends oe{constructor(){super();this.fb=f(mo);this.filiacaoService=f($t);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.tipoFiliacaoOpcoes=j([]);this.mostrarCpf=!1;this.filiacaoGeralModel=this.activatedRoute.snapshot.data.filiacaoGeral,this.getApresentarCpfFiliacao(),this.carregaTipoFiliacao()}ngOnInit(){this.criaFormGroup()}criaFormGroup(){this.filiacaoGeralModel?this.carregaFormGroup():this.criaNovoFormGroup()}criaNovoFormGroup(){this.form=this.fb.group({informarMaisFiliacoes:new c(!1),nomeCompleto1:new c(null,[D.required]),codTipoFiliacao1:new c(null,[D.required]),cpfFiliacao1:new c(null),nomeCompleto2:new c(null),codTipoFiliacao2:new c(null),cpfFiliacao2:new c(null),nomeCompleto3:new c(null),codTipoFiliacao3:new c(null),cpfFiliacao3:new c(null),nomeCompleto4:new c(null),codTipoFiliacao4:new c(null),cpfFiliacao4:new c(null)}),this.disableResetFiliacao4(),this.verificaFiliacao3()}carregaFormGroup(){this.form=this.fb.group({informarMaisFiliacoes:new c(this.filiacaoGeralModel.listaFiliacao.length>2),nomeCompleto1:new c(this.carregaNomeCompleto(1),[D.required]),codTipoFiliacao1:new c(this.carregaCodTipoFiliacao(1),[D.required]),cpfFiliacao1:new c(this.carregaCpfFiliacao(1)),nomeCompleto2:new c(this.carregaNomeCompleto(2)),codTipoFiliacao2:new c(this.carregaCodTipoFiliacao(2)),cpfFiliacao2:new c(this.carregaCpfFiliacao(2)),nomeCompleto3:new c(this.carregaNomeCompleto(3)),codTipoFiliacao3:new c(this.carregaCodTipoFiliacao(3)),cpfFiliacao3:new c(this.carregaCpfFiliacao(3)),nomeCompleto4:new c(this.carregaNomeCompleto(4)),codTipoFiliacao4:new c(this.carregaCodTipoFiliacao(4)),cpfFiliacao4:new c(this.carregaCpfFiliacao(4))}),this.disableResetFiliacao4(),this.verificaFiliacao3()}enableFiliacao4(){this.form.controls.nomeCompleto4.enable(),this.form.controls.codTipoFiliacao4.enable(),this.form.controls.cpfFiliacao4.enable()}disableResetFiliacao4(){this.form.controls.nomeCompleto3.value||(this.form.controls.nomeCompleto4.reset(),this.form.controls.codTipoFiliacao4.reset(),this.form.controls.cpfFiliacao4.reset(),this.form.controls.nomeCompleto4.disable(),this.form.controls.codTipoFiliacao4.disable(),this.form.controls.cpfFiliacao4.disable())}verificaFiliacao3(){this.form.controls.nomeCompleto3.valueChanges.subscribe(e=>{e?this.enableFiliacao4():this.disableResetFiliacao4()})}carregaTipoFiliacao(){this.filiacaoService.getTipoFiliacao().subscribe({next:e=>{e&&this.tipoFiliacaoOpcoes.set(e)},error:e=>{this.messagesServiceModal.openModal(`Erro ao carregar tipo de filia\xE7\xE3o. 75 76`+e.error,this.viewContainerRef)}})}redirecionaParaDadosGerais(){this.router.navigate(["etapas/dado-geral-2"],{skipLocationChange:!0})}redirecionaParaDadosDeclarados(){this.router.navigate(["etapas/dado-declarado"],{skipLocationChange:!0})}disableForm(){this.form.controls.nomeCompleto1.disable(),this.form.controls.nomeCompleto1.reset(),this.form.controls.nomeCompleto2.disable(),this.form.controls.nomeCompleto2.reset(),this.form.controls.nomeCompleto3.disable(),this.form.controls.nomeCompleto3.reset(),this.form.controls.nomeCompleto4.disable(),this.form.controls.nomeCompleto4.reset(),this.form.controls.codTipoFiliacao1.reset(),this.form.controls.codTipoFiliacao2.reset(),this.form.controls.codTipoFiliacao3.reset(),this.form.controls.codTipoFiliacao4.reset(),this.form.controls.nomeCompleto1.setValidators([]),this.form.controls.nomeCompleto1.updateV
76alueAndValidity(),this.form.controls.codTipoFiliacao1.setValidators([]),this.form.controls.codTipoFiliacao1.updateValueAndValidity()}salvaFiliacao(){this.filiacaoService.gravaFiliacao(this.filiacaoGeralModel).subscribe({next:e=>{e=="OK"&&this.redirecionaParaDadosDeclarados()},error:e=>{let t=JSON.parse(e.error);this.messagesServiceModal.openModal(`Erro ao gravar filia\xE7\xF5es. 77 78`+t[0].message,this.viewContainerRef)}})}criaFiliacaoGeral(){this.filiacaoGeralModel={uuidPrecadastro:this.protocoloModel?.uuid,possuiFiliacao:1,listaFiliacao:[]},this.valorValido(this.form.controls.nomeCompleto1.value)&&this.criaFiliacaoModel(this.form.controls.nomeCompleto1.value,this.form.controls.codTipoFiliacao1.value,1,this.form.controls.cpfFiliacao1.value),this.valorValido(this.form.controls.nomeCompleto2.value)&&this.criaFiliacaoModel(this.form.controls.nomeCompleto2.value,this.form.controls.codTipoFiliacao2.value,2,this.form.controls.cpfFiliacao2.value),this.form.controls.informarMaisFiliacoes.value&&this.valorValido(this.form.controls.nomeCompleto3.value)&&this.criaFiliacaoModel(this.form.controls.nomeCompleto3.value,this.form.controls.codTipoFiliacao3.value,3,this.form.controls.cpfFiliacao3.value),this.form.controls.informarMaisFiliacoes.value&&this.valorValido(this.form.controls.nomeCompleto4.value)&&this.criaFiliacaoModel(this.form.controls.nomeCompleto4.value,this.form.controls.codTipoFiliacao4.value,4,this.form.controls.cpfFiliacao4.value),this.dadosCompartilhadosService.setFiliacao(this.filiacaoGeralModel)}criaFiliacaoModel(e,t,i,d){let p={ordemFiliacao:i,nomeCompleto:e,codTipoFiliacao:t,dsTipoFiliacao:this.tipoFiliacaoOpcoes().find(_=>_.codigo==t)?.valor,cpfFiliacao:d?d.replace(/\D/g,""):""};this.filiacaoGeralModel.listaFiliacao.push(p)}valorValido(e){return!!e}getApresentarCpfFiliacao(){this.filiacaoService.getApresentaCpfFiliacao().subscribe({next:e=>{e.valorParametro==="1"&&(this.mostrarCpf=!0)},error:e=>{this.messagesServiceModal.openModal(`Erro ao verificar se deve apresentar CPF da filia\xE7\xE3o. 79 80`+e.error,this.viewContainerRef)}})}carregaNomeCompleto(e){let t=null;if(this.filiacaoGeralModel.listaFiliacao.length>e-1){let i=this.filiacaoGeralModel.listaFiliacao.find(d=>d.ordemFiliacao==e);i&&(t=i.nomeCompleto)}return t}carregaCodTipoFiliacao(e){let t=null;if(this.filiacaoGeralModel.listaFiliacao.length>e-1){let i=this.filiacaoGeralModel.listaFiliacao.find(d=>d.ordemFiliacao==e);i&&(t=i.codTipoFiliacao)}return t}carregaCpfFiliacao(e){let t=null;if(this.filiacaoGeralModel.listaFiliacao.length>e-1){let i=this.filiacaoGeralModel.listaFiliacao.find(d=>d.ordemFiliacao==e);i&&(t=i.cpfFiliacao)}return t}avancarEtapa(){this.validaFormulario()&&(this.criaFiliacaoGeral(),this.salvaFiliacao())}voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.redirecionaParaDadosGerais()}):this.redirecionaParaDadosGerais()}limpaFormulario(){this.limparForm(this.viewContainerRef)}validaFormulario(){return this.formularioValido()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-filiacao"]],viewQuery:function(t,i){if(t&1&&z(Vs,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[Re([Ke]),K],decls:18,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","justify-content-between","align-items-center","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"row","mt-3"],[1,"row-auto","pb-2"],["type","text","tamMax","66","topLabel","Nome completo: ","ngDefaultControl","",3,"formControl","id"],["for","codTipoFiliacao1",1,"form-label"],[1,"row"],[1,"col-auto"],[1,"row","pb-2"],[1,"form-check"],["type","checkbox","id","informarMaisFiliacoes","formControlName","informarMaisFiliacoes",1,"form-check-input"],["for","informarMaisFiliacoes",1,"form-check-label"],["formControlName","codTipoFiliacao1","id","codTipoFiliacao1","type","radio",3,"value"],["for","codTipoFiliacao1",1,"form-check-label"],["type","text","topLabel","CPF (opcional):","placeholder","000.000.000-00","tpMask","cpf","ngDefaultControl","",3,"formControl","id"],["for","codTipoFiliacao2",1,"form-label"],["formControlName","codTipoFiliacao2","id","codTipoFiliacao2","type","radio",3,"value"],["for","codTipoFiliacao2",1,"form-check-label"],["for","codTipoFiliacao3",1,"form-label"],["formControlName","codTipoFiliacao3","id","codTipoFiliacao3","type","radio",3,"value"],["for","codTipoFiliacao3",1,"form-check-label"],["for","codTipoFiliacao4",1,"form-label"],["formControlName","codTipoFiliacao4","id","codTipoFiliacao4","type","radio",3,"value"],["for","codTipoFiliacao4",1,"form-check-label"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"nav",1)(3,"span"),s(4," Filia\xE7\xE3o "),r()(),a(5,"div",2)(6,"div",3),g(7,Ks,22,8,"form",4),r()(),a(8,"div",5)(9,"div",6)(10,"app-custom-button-voltar",7),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(11,"div",8),s(12,"Etapa 2 de 8"),r(),a(13,"div",9)(14,"app-custom-button-proximo",7),E("btnClicked",function(){return i.avancarEtapa()}),r()()(),a(15,"div",10)(16,"div",9)(17,"app-custom-button-limpar",7),E("btnClicked",function(){return i.limpaFormulario()}),r()()()),t&2&&(l(7),C(i.form?7:-1))},dependencies:[V,Z,W,Ft,Ne,P,J,Y,X,Me,he,le,ee,ue],encapsulation:2})}};var ia=()=>{let n=f(Q).getProtocolo();return f($t).getFiliacao(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("Filia\xE7\xF5es n\xE3o encontradas:",e),te(null))))};var pe=class o{constructor(){this.http=f(Ee)}gravaInformacoesDocumentos(n){let e=R.config.serverUrlRemota+"/pre-cadastro/dado-documento";return this.http.post(e,n,{responseType:"text"})}gravaDadoIdentidadeProfissional(n){let e=R.config.serverUrlRemota+"/pre-cadastro/identidade-profissional";return this.http.post(e,n,{responseType:"text"})}gravaDadoCID(n){let e=R.config.serverUrlRemota+"/pre-cadastro/dado-cid";return this.http.post(e,n,{responseType:"text"})}gravaArquivo(n){let e=R.config.serverUrlRemota+"/pre-cadastro/arquivo";return this.http.post(e,n,{responseType:"text"})}getInformacoesDocumentos(n){let e=R.config.serverUrlRemota+"/pre-cadastro/dado-documento/";return this.http.get(e+n)}getDadoIdentidadeProfissional(n){let e=R.config.serverUrlRemota+"/pre-cadastro/identidade-profissional/";return this.http.get(e+n)}
80getDadoCID(n){let e=R.config.serverUrlRemota+"/pre-cadastro/dado-cid/";return this.http.get(e+n)}getArquivo(n){let e=R.config.serverUrlRemota+"/pre-cadastro/arquivo/";return this.http.get(e+n)}getCID(n){let e=R.config.serverUrlRemota+"/CID/";return this.http.get(e+n)}getMenor14(n){let e=R.config.serverUrlRemota+"/pre-cadastro/cidadao-menor-14/";return this.http.get(e+n)}getMenor16(n){let e=R.config.serverUrlRemota+"/pre-cadastro/cidadao-menor-16/";return this.http.get(e+n)}getMenor18(n){let e=R.config.serverUrlRemota+"/pre-cadastro/cidadao-menor-18/";return this.http.get(e+n)}deleteArquivo(n,e){let t=R.config.serverUrlRemota+"/pre-cadastro/arquivo/";return this.http.delete(t+n+"/"+e,{responseType:"text"})}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}};var Js=["dialogContainer"];function Zs(o,n){if(o&1&&(a(0,"div",11)(1,"div",12),s(2,"Titulo de Eleitor"),r()(),a(3,"div",13)(4,"div",6),h(5,"app-custom-input",14),r()()),o&2){let e=u(2);l(5),m("formControl",e.form.controls.tituloEleitor)("tamMax",12)("id","tituloEleitor")}}function Xs(o,n){if(o&1&&(a(0,"div",11)(1,"div",12),s(2,"Certid\xE3o Militar"),r()(),a(3,"div",13)(4,"div",6),h(5,"app-custom-input",15),r()()),o&2){let e=u(2);l(5),m("formControl",e.form.controls.certidaoMilitar)("tamMax",12)("id","certidaoMilitar")}}function ed(o,n){if(o&1&&(a(0,"div",16)(1,"div",12),s(2,"Habilita\xE7\xE3o (CNH)"),r()(),a(3,"div",13)(4,"div",17),h(5,"app-custom-input",18),r(),a(6,"div",17),h(7,"app-custom-input-date",19),r()(),a(8,"div",13)(9,"div",17),h(10,"app-custom-select-uf",20),r(),a(11,"div",17),h(12,"app-custom-select",21),r()()),o&2){let e=u(2);l(5),m("formControl",e.form.controls.habilitacaoNumero)("tamMax",11)("id","habilitacaoNumero"),l(2),m("formControl",e.form.controls.dtValidadeHabilitacao)("id","dtValidadeHabilitacao"),l(3),m("formControl",e.form.controls.habilitacaoUf),l(2),m("formControl",e.form.controls.tipoHabilitacaoCategoria)("opcoes",e.tipoCnhOpcoes())}}function td(o,n){if(o&1&&(a(0,"form",4),g(1,Zs,6,3),g(2,Xs,6,3),g(3,ed,13,8),r()),o&2){let e=u();m("formGroup",e.form),l(),C(e.selecaoDocumentosModel.informarTituloEleitor?1:-1),l(),C(e.selecaoDocumentosModel.informarCertidaoMilitar?2:-1),l(),C(e.selecaoDocumentosModel.informarCNH?3:-1)}}var Ao=class o extends oe{constructor(){super();this.tabelasDominioGeralService=f(Be);this.informacoesDocumentosService=f(pe);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.selecaoDocumentosModel=this.dadosCompartilhadosService.getSelecaoDocumento();this.informacaoDocumentoModel=this.dadosCompartilhadosService.getInformacoesDocumentos();this.tipoCnhOpcoes=j([]);this.carregaCNHs(),rt(()=>{this.tipoCnhOpcoes().length>0&&this.criaFormGroup()})}criaFormGroup(){this.informacaoDocumentoModel?this.carregaFormGroup():this.criaNovoFormGroup()}criaNovoFormGroup(){this.form=this.formBuilder.group({tituloEleitor:new c(null),certidaoMilitar:new c(null),habilitacaoNumero:new c(null),dtValidadeHabilitacao:new c(null,[D.required]),habilitacaoUf:new c({value:null,disabled:!0}),tipoHabilitacaoCategoria:new c({value:null,disabled:!0})}),this.verificaCampoHabilitacaoNumero()}carregaFormGroup(){this.form=this.formBuilder.group({tituloEleitor:new c(this.informacaoDocumentoModel?.tituloEleitor),certidaoMilitar:new c(this.informacaoDocumentoModel?.certidaoMilitar),habilitacaoNumero:new c(this.informacaoDocumentoModel?.habilitacaoNumero),dtValidadeHabilitacao:new c(me.convertStringToDate(this.informacaoDocumentoModel?.dtValidadeHabilitacao),[D.required]),habilitacaoUf:new c({value:this.informacaoDocumentoModel?.habilitacaoUf,disabled:!this.informacaoDocumentoModel?.habilitacaoUf}),tipoHabilitacaoCategoria:new c({value:this.buscaTipoCNH(),disabled:!(this.informacaoDocumentoModel?.tipoHabilitacaoCategoria&&this.informacaoDocumentoModel?.tipoHabilitacaoCategoria!=-1)})}),this.verificaCampoHabilitacaoNumero()}criaInformacoesDocumentoModel(){this.informacaoDocumentoModel?this.preencheModel():this.criaNovaModel(),this.dadosCompartilhadosService.setInformacaoDocumento(this.informacaoDocumentoModel)}criaNovaModel(){let e=this.form.controls.tipoHabilitacaoCategoria.value;this.informacaoDocumentoModel={uuidPrecadastro:this.protocoloModel?.uuid??null,tituloEleitor:this.form.controls.tituloEleitor.value,certidaoMilitar:this.form.controls.certidaoMilitar.value,habilitacaoNumero:this.form.controls.habilitacaoNumero.value,dtValidadeHabilitacao:me.convertDateToString(this.form.controls.dtValidadeHabilitacao.value),habilitacaoUf:this.form.controls.habilitacaoNumero.value?this.form.controls.habilitacaoUf.value:"",tipoHabilitacaoCategoria:this.form.controls.habilitacaoNumero.value?e?.codigo:-1,descricaoTipoHabilitacaoCategoria:this.form.controls.habilitacaoNumero.value?e?.valor:""}}preencheModel(){if(this.informacaoDocumentoModel){let e=this.form.controls.tipoHabilitacaoCategoria.value;this.informacaoDocumentoModel.uuidPrecadastro=this.protocoloModel?.uuid??null,this.informacaoDocumentoModel.tituloEleitor=this.form.controls.tituloEleitor.value,this.informacaoDocumentoModel.certidaoMilitar=this.form.controls.certidaoMilitar.value,this.informacaoDocumentoModel.habilitacaoNumero=this.form.controls.habilitacaoNumero.value,this.informacaoDocumentoModel.habilitacaoUf=this.form.controls.habilitacaoNumero.value?this.form.controls.habilitacaoUf.value:"",this.informacaoDocumentoModel.dtValidadeHabilitacao=me.convertDateToString(this.form.controls.dtValidadeHabilitacao.value),e&&this.form.controls.habilitacaoNumero.value?(this.informacaoDocumentoModel.tipoHabilitacaoCategoria=e.codigo,this.informacaoDocumentoModel.descricaoTipoHabilitacaoCategoria=e.valor):(this.informacaoDocumentoModel.tipoHabilitacaoCategoria=-1,this.informacaoDocumentoModel.descricaoTipoHabilitacaoCategoria="")}}carregaCNHs(){this.tabelasDominioGeralService.getCNHs().subscribe({next:e=>{e&&this.tipoCnhOpcoes.set(e)},error:e=>{this.messagesServiceModal.openModal(`Erro ao carregar tipos de CNH. Tente novamente mais tarde. 81 82`+e.error,this.viewContainerRef)}})}
82buscaTipoCNH(){return this.tipoCnhOpcoes().find(e=>e.codigo==this.informacaoDocumentoModel?.tipoHabilitacaoCategoria)}salvaInformacoesDocumentoModel(){this.informacaoDocumentoModel&&this.informacoesDocumentosService.gravaInformacoesDocumentos(this.informacaoDocumentoModel).subscribe({next:e=>{e=="OK"&&this.redirecionaProximaPagina()},error:e=>{let t=JSON.parse(e.error);this.messagesServiceModal.openModal(`Erro ao gravar informa\xE7\xF5es de documentos. 83 84`+t[0].message,this.viewContainerRef)}})}verificaCampoHabilitacaoNumero(){this.form.controls.habilitacaoNumero.valueChanges.subscribe(e=>{e?this.setValidatorsUfCategoriaValidadeCNH():this.unsetValidatorsUfCategoriaValidadeCNH()})}setValidatorsUfCategoriaValidadeCNH(){this.form.controls.habilitacaoUf.addValidators(D.required),this.form.controls.habilitacaoUf.enable(),this.form.controls.habilitacaoUf.updateValueAndValidity(),this.form.controls.tipoHabilitacaoCategoria.addValidators(D.required),this.form.controls.tipoHabilitacaoCategoria.enable(),this.form.controls.tipoHabilitacaoCategoria.updateValueAndValidity(),this.form.controls.dtValidadeHabilitacao.addValidators(D.required),this.form.controls.dtValidadeHabilitacao.enable(),this.form.controls.dtValidadeHabilitacao.updateValueAndValidity()}unsetValidatorsUfCategoriaValidadeCNH(){this.form.controls.habilitacaoUf.setValue(""),this.form.controls.habilitacaoUf.clearValidators(),this.form.controls.habilitacaoUf.disable(),this.form.controls.habilitacaoUf.updateValueAndValidity(),this.form.controls.tipoHabilitacaoCategoria.setValue(""),this.form.controls.tipoHabilitacaoCategoria.clearValidators(),this.form.controls.tipoHabilitacaoCategoria.disable(),this.form.controls.tipoHabilitacaoCategoria.updateValueAndValidity(),this.form.controls.dtValidadeHabilitacao.setValue(""),this.form.controls.dtValidadeHabilitacao.clearValidators(),this.form.controls.dtValidadeHabilitacao.disable(),this.form.controls.dtValidadeHabilitacao.updateValueAndValidity()}redirecionaProximaPagina(){this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCarteiraTrabalho?this.router.navigate(["etapas/informacoes-documentos-2"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarIdentidadeProfissional?this.router.navigate(["etapas/informacoes-documentos-3"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCartaoNacionalSaude||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarTipoSanguineoFatorRH?this.router.navigate(["etapas/informacoes-documentos-4"],{skipLocationChange:!0}):this.router.navigate(["etapas/informacoes-documentos-5"],{skipLocationChange:!0})}avancarEtapa(){this.validaFormulario()&&(this.criaInformacoesDocumentoModel(),this.salvaInformacoesDocumentoModel())}voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.router.navigate(["etapas/selecao-documentos"],{skipLocationChange:!0})}):this.router.navigate(["etapas/selecao-documentos"],{skipLocationChange:!0})}limpaFormulario(){this.messagesServiceModal.openModalConfirmation(this.MSG_LIMPAR,this.viewContainerRef,e=>{e==="Sim"&&this.form.patchValue({tituloEleitor:"",certidaoMilitar:"",habilitacaoNumero:"",habilitacaoUf:"",tipoHabilitacaoCategoria:"",descricaoTipoHabilitacaoCategoria:""})})}validaFormulario(){return this.formularioValido()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-informacoes-documentos-1"]],viewQuery:function(t,i){if(t&1&&z(Js,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:17,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body","overflow-auto"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","justify-content-between","align-items-center","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"row","mt-3"],[1,"row","pb-1"],[1,"col","fw-bold"],[1,"row","pb-3"],["type","text","topLabel","N\xBA da inscri\xE7\xE3o:","tpMask","numero","ngDefaultControl","",3,"formControl","tamMax","id"],["type","text","topLabel","N\xBA da certid\xE3o:","tpMask","numero","ngDefaultControl","",3,"formControl","tamMax","id"],[1,"row"],[1,"col-6"],["type","text","topLabel","N\xBA da CNH:","tpMask","numero","ngDefaultControl","",3,"formControl","tamMax","id"],["topLabel","Data de validade da CNH*:","ngDefaultControl","",3,"formControl","id"],["id","habilitacaoUf","label","UF*:","errorMessage","Obrigat\xF3rio","ngDefaultControl","",3,"formControl"],["id","tipoHabilitacaoCategoria","label","Categoria*:","identificador","codigo","descricao","valor","errorMessage","Obrigat\xF3rio","ngDefaultControl","",3,"formControl","opcoes"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"div",1),s(3,"Informa\xE7\xF5es de documentos"),r(),a(4,"div",2)(5,"div",3),g(6,td,4,4,"form",4),r()(),a(7,"div",5)(8,"div",6)(9,"app-custom-button-voltar",7),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(10,"div",8),s(11,"Etapa 6 de 8"),r(),a(12,"div",9)(13,"a
84pp-custom-button-proximo",7),E("btnClicked",function(){return i.avancarEtapa()}),r()()(),a(14,"div",10)(15,"div",9)(16,"app-custom-button-limpar",7),E("btnClicked",function(){return i.limpaFormulario()}),r()()()),t&2&&(l(6),C(i.form?6:-1))},dependencies:[V,Z,W,P,J,Y,X,he,ct,le,ee,ue,je,Fe],encapsulation:2})}};var od=["dialogContainer"];function id(o,n){if(o&1&&(a(0,"form",4)(1,"div",11)(2,"div",12),s(3,"Carteira de Trabalho (CTPS)"),r()(),a(4,"div",13)(5,"div",6),h(6,"app-custom-input",14),r()(),a(7,"div",13)(8,"div",15),h(9,"app-custom-select-uf",16),r(),a(10,"div",17)(11,"div",18),h(12,"app-custom-input",19),r()()(),a(13,"div",13)(14,"div",20),h(15,"app-custom-input",21),r(),a(16,"div",22),h(17,"app-custom-input",23),r()(),a(18,"div",18)(19,"div",6),h(20,"app-custom-input",24),r()()()),o&2){let e=u();m("formGroup",e.form),l(6),m("formControl",e.form.controls.carteiraTrabalho)("tamMax",7)("id","carteiraTrabalho"),l(3),m("formControl",e.form.controls.carteiraTrabalhoUf),l(3),m("formControl",e.form.controls.carteiraTrabalhoSerie)("tamMax",5)("id","carteiraTrabalhoSerie"),l(3),m("formControl",e.form.controls.nis)("tamMax",11)("id","nis"),l(2),m("formControl",e.form.controls.nit)("tamMax",11)("id","nit"),l(3),m("formControl",e.form.controls.pisPasep)("tamMax",11)("id","pisPasep")}}var Ro=class o extends oe{constructor(){super();this.informacoesDocumentosService=f(pe);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.informacaoDocumentoModel=this.dadosCompartilhadosService.getInformacoesDocumentos();this.criaFormGroup()}criaFormGroup(){this.informacaoDocumentoModel?.carteiraTrabalho?this.carregaFormGroup():this.criaNovoFormGroup()}criaNovoFormGroup(){this.form=this.formBuilder.group({carteiraTrabalho:new c(null),carteiraTrabalhoSerie:new c({value:null,disabled:!0}),carteiraTrabalhoUf:new c({value:null,disabled:!0}),nis:new c(null),nit:new c(null),pisPasep:new c(null)}),this.verificaAlteracaoCarteiraTrabalho()}carregaFormGroup(){this.form=this.formBuilder.group({carteiraTrabalho:new c(this.informacaoDocumentoModel?.carteiraTrabalho),carteiraTrabalhoSerie:new c({value:this.informacaoDocumentoModel?.carteiraTrabalhoSerie,disabled:!this.informacaoDocumentoModel?.carteiraTrabalhoSerie}),carteiraTrabalhoUf:new c({value:this.informacaoDocumentoModel?.carteiraTrabalhoUf,disabled:!this.informacaoDocumentoModel?.carteiraTrabalhoUf}),nis:new c(this.informacaoDocumentoModel?.nis),nit:new c(this.informacaoDocumentoModel?.nit),pisPasep:new c(this.informacaoDocumentoModel?.pisPasep)}),this.verificaAlteracaoCarteiraTrabalho()}verificaAlteracaoCarteiraTrabalho(){this.form.controls.carteiraTrabalho.valueChanges.subscribe(e=>{e?this.setValidators():this.unsetValidators()})}setValidators(){this.form.controls.carteiraTrabalhoSerie.setValidators(D.required),this.form.controls.carteiraTrabalhoSerie.enable(),this.form.controls.carteiraTrabalhoSerie.updateValueAndValidity(),this.form.controls.carteiraTrabalhoUf.setValidators(D.required),this.form.controls.carteiraTrabalhoUf.enable(),this.form.controls.carteiraTrabalhoUf.updateValueAndValidity()}unsetValidators(){this.form.controls.carteiraTrabalhoSerie.setValidators([]),this.form.controls.carteiraTrabalhoSerie.setValue(""),this.form.controls.carteiraTrabalhoSerie.disable(),this.form.controls.carteiraTrabalhoSerie.updateValueAndValidity(),this.form.controls.carteiraTrabalhoUf.setValidators([]),this.form.controls.carteiraTrabalhoUf.setValue(""),this.form.controls.carteiraTrabalhoUf.disable(),this.form.controls.carteiraTrabalhoUf.updateValueAndValidity()}criaInformacoesDocumentoModel(){this.informacaoDocumentoModel?this.preencheModel():this.criaNovaModel()}criaNovaModel(){this.informacaoDocumentoModel={uuidPrecadastro:this.protocoloModel?.uuid??null,carteiraTrabalho:this.form.controls.carteiraTrabalho.value,carteiraTrabalhoSerie:this.form.controls.carteiraTrabalhoSerie.value,carteiraTrabalhoUf:this.form.controls.carteiraTrabalhoUf.value,nis:this.form.controls.nis.value,nit:this.form.controls.nit.value,pisPasep:this.form.controls.pisPasep.value},this.dadosCompartilhadosService.setInformacaoDocumento(this.informacaoDocumentoModel)}preencheModel(){this.informacaoDocumentoModel&&(this.informacaoDocumentoModel.uuidPrecadastro=this.protocoloModel?.uuid??null,this.informacaoDocumentoModel.carteiraTrabalho=this.form.controls.carteiraTrabalho.value,this.informacaoDocumentoModel.carteiraTrabalhoSerie=this.form.controls.carteiraTrabalhoSerie.value,this.informacaoDocumentoModel.carteiraTrabalhoUf=this.form.controls.carteiraTrabalhoUf.value,this.informacaoDocumentoModel.nis=this.form.controls.nis.value,this.informacaoDocumentoModel.nit=this.form.controls.nit.value,this.informacaoDocumentoModel.pisPasep=this.form.controls.pisPasep.value),this.dadosCompartilhadosService.setInformacaoDocumento(this.informacaoDocumentoModel)}salvaInformacoesDocumentoModel(){this.informacaoDocumentoModel&&this.informacoesDocumentosService.gravaInformacoesDocumentos(this.informacaoDocumentoModel).subscribe({next:e=>{e=="OK"&&this.redirecionaProximaPagina()},error:e=>{let t=JSON.parse(e.error);this.messagesServiceModal.openModal(`Erro ao gravar informa\xE7\xF5es do documento. 85 86`+t[0].message,this.viewContainerRef)}})}redirecionaProximaPagina(){this.dadosCompartilhadosService.getSelecaoDocumento()?.informarIdentidadeProfissional?this.router.navigate(["etapas/informacoes-documentos-3"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCartaoNacionalSaude||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarTipoSanguineoFatorRH?this.router.navigate(["etapas/informacoes-documentos-4"],{skipLocationChange:!0}):this.router.navigate(["etapas/informacoes-documentos-5"],{skipLocationChange:!0})}redirecionaPaginaAnterior(){this.dadosCompartilhadosService.getSelecaoDocumento()?.informarTituloEleitor||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCertidaoMilitar||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCNH?this.router.navigate(["etapas/informacoes-documentos-1"],{skipLocationChange:!0}):this.router.navigate(["etapas/selecao-documentos"],{skipLocationChange:!0})}avancarEtapa(){this.criaInformacoesDocumentoModel(),this.validaFormulario()&&(this.criaInformacoesDocumentoModel(),this.salvaInformacoesDocumentoModel())}
86voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.redirecionaPaginaAnterior()}):this.redirecionaPaginaAnterior()}limpaFormulario(){this.messagesServiceModal.openModalConfirmation(this.MSG_LIMPAR,this.viewContainerRef,e=>{e==="Sim"&&this.form.patchValue({carteiraTrabalho:"",carteiraTrabalhoSerie:"",carteiraTrabalhoUf:"",nis:"",nit:"",pisPasep:""})})}validaFormulario(){return this.formularioValido()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-informacoes-documentos-2"]],viewQuery:function(t,i){if(t&1&&z(od,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:17,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body","overflow-auto"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","justify-content-between","align-items-center","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"row","mt-3"],[1,"row","pb-1"],[1,"col","fw-bold"],[1,"row","pb-2"],["type","text","topLabel","N\xBA da CPTS:","tpMask","numero","ngDefaultControl","",3,"formControl","tamMax","id"],[1,"col-5"],["id","carteiraTrabalhoUf","label","UF*:","errorMessage","Obrigat\xF3rio","ngDefaultControl","",3,"formControl"],[1,"col-7","ps-0"],[1,"row"],["type","text","topLabel","S\xE9rie:","tpMask","numero","ngDefaultControl","",3,"formControl","tamMax","id"],[1,"col-6"],["type","text","topLabel","NIS:","tpMask","numero","ngDefaultControl","",3,"formControl","tamMax","id"],[1,"col-6","ps-0"],["type","text","topLabel","NIT:","tpMask","numero","ngDefaultControl","",3,"formControl","tamMax","id"],["type","text","topLabel","PIS/PASEP:","tpMask","numero","ngDefaultControl","",3,"formControl","tamMax","id"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"div",1),s(3,"Informa\xE7\xF5es de documentos"),r(),a(4,"div",2)(5,"div",3),g(6,id,21,17,"form",4),r()(),a(7,"div",5)(8,"div",6)(9,"app-custom-button-voltar",7),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(10,"div",8),s(11,"Etapa 6 de 8"),r(),a(12,"div",9)(13,"a
86pp-custom-button-proximo",7),E("btnClicked",function(){return i.avancarEtapa()}),r()()(),a(14,"div",10)(15,"div",9)(16,"app-custom-button-limpar",7),E("btnClicked",function(){return i.limpaFormulario()}),r()()()),t&2&&(l(6),C(i.form?6:-1))},dependencies:[V,Z,W,P,J,Y,X,he,le,ee,ue,Fe],encapsulation:2})}};var nd=["dialogContainer"];function ad(o,n){if(o&1&&(a(0,"form",4)(1,"div",11)(2,"div",12),s(3,"Identidade profissional"),r()(),a(4,"div",13)(5,"div",14),h(6,"app-custom-select",15),r(),a(7,"div",16),h(8,"app-custom-select-uf",17),r(),a(9,"div",18),h(10,"app-custom-input",19),r()(),a(11,"div",13)(12,"div",14),h(13,"app-custom-select",20),r(),a(14,"div",16),h(15,"app-custom-select-uf",21),r(),a(16,"div",18),h(17,"app-custom-input",19),r()(),a(18,"div",22)(19,"div",14),h(20,"app-custom-select",23),r(),a(21,"div",16),h(22,"app-custom-select-uf",24),r(),a(23,"div",18),h(24,"app-custom-input",19),r()()()),o&2){let e=u();m("formGroup",e.form),l(6),m("formControl",e.form.controls.tipoConselho1)("opcoes",e.tiposIdProfissionaisOpcoes()),l(2),m("formControl",e.form.controls.uf1),l(2),m("formControl",e.form.controls.numeroIdentidade1)("tamMax",10)("id","numeroIdentidade1"),l(3),m("formControl",e.form.controls.tipoConselho2)("opcoes",e.tiposIdProfissionaisOpcoes()),l(2),m("formControl",e.form.controls.uf2),l(2),m("formControl",e.form.controls.numeroIdentidade2)("tamMax",10)("id","numeroIdentidade2"),l(3),m("formControl",e.form.controls.tipoConselho3)("opcoes",e.tiposIdProfissionaisOpcoes()),l(2),m("formControl",e.form.controls.uf3),l(2),m("formControl",e.form.controls.numeroIdentidade3)("tamMax",10)("id","numeroIdentidade3")}}var ko=class o extends oe{constructor(){super();this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.informacoesDocumentosService=f(pe);this.tabelasDominioGeralService=f(Be);this.tiposIdProfissionaisOpcoes=j([]);this.desabilitaCamposIdentidadeProfissional2=!1;this.desabilitaCamposIdentidadeProfissional3=!1;this.dadoIdentidadeProfissionalModel=this.activatedRoute.snapshot.data.dadoIdentidadeProfissional,this.verificaSeDesabilitaCamposIdentidadeProfissional1e2()}ngOnInit(){this.criaFormGroup()}verificaSeDesabilitaCamposIdentidadeProfissional1e2(){this.desabilitaCamposIdentidadeProfissional2=this.dadoIdentidadeProfissionalModel&&this.dadoIdentidadeProfissionalModel.listaIdentidadeProfissional.length==0,this.desabilitaCamposIdentidadeProfissional3=this.dadoIdentidadeProfissionalModel&&(this.dadoIdentidadeProfissionalModel.listaIdentidadeProfissional.length==1||this.desabilitaCamposIdentidadeProfissional2)}criaFormGroup(){return _e(this,null,function*(){this.dadoIdentidadeProfissionalModel?(yield this.carregaTiposIdProfissionais(),this.carregaFormGroup()):(this.carregaTiposIdProfissionais(),this.criaNovoFormGroup())})}criaNovoFormGroup(){this.form=this.formBuilder.group({tipoConselho1:new c(null),uf1:new c(null),numeroIdentidade1:new c(null),tipoConselho2:new c({value:null,disabled:!0}),uf2:new c({value:null,disabled:!0}),numeroIdentidade2:new c({value:null,disabled:!0}),tipoConselho3:new c({value:null,disabled:!0}),uf3:new c({value:null,disabled:!0}),numeroIdentidade3:new c({value:null,disabled:!0})}),this.verificaAlteracaoTiposConselho(),this.verificaSeHouveMudancaoNoForm(),this.verificaUfNumero()}carregaFormGroup(){this.form=this.formBuilder.group({tipoConselho1:new c(this.carregaValorTipoConselho(0)),uf1:new c(this.carregaValorUf(0)),numeroIdentidade1:new c(this.carregaValorNumeroIdentidade(0)),tipoConselho2:new c({value:this.carregaValorTipoConselho(1),disabled:this.desabilitaCamposIdentidadeProfissional2}),uf2:new c({value:this.carregaValorUf(1),disabled:this.desabilitaCamposIdentidadeProfissional2}),numeroIdentidade2:new c({value:this.carregaValorNumeroIdentidade(1),disabled:this.desabilitaCamposIdentidadeProfissional2}),tipoConselho3:new c({value:this.carregaValorTipoConselho(2),disabled:this.desabilitaCamposIdentidadeProfissional3}),uf3:new c({value:this.carregaValorUf(2),disabled:this.desabilitaCamposIdentidadeProfissional3}),numeroIdentidade3:new c({value:this.carregaValorNumeroIdentidade(2),disabled:this.desabilitaCamposIdentidadeProfissional3})}),this.verificaAlteracaoTiposConselho(),this.verificaSeHouveMudancaoNoForm(),this.verificaUfNumero()}verificaUfNumero(){["uf1","uf2","uf3","numeroIdentidade1","numeroIdentidade2","numeroIdentidade3"].forEach(e
86=>{this.form.controls[e].value?this.form.controls[e].enable():this.form.controls[e].disable()})}verificaAlteracaoTiposConselho(){this.form.controls.tipoConselho1.valueChanges.subscribe(e=>{e?(this.form.controls.tipoConselho2.enable(),this.form.controls.uf1.setValidators(D.required),this.form.controls.numeroIdentidade1.setValidators(D.required),this.form.controls.uf1.enable(),this.form.controls.numeroIdentidade1.enable(),this.form.controls.uf1.updateValueAndValidity(),this.form.controls.numeroIdentidade1.updateValueAndValidity()):(this.disableResetIdentidadeProfissional("2"),this.form.controls.uf1.reset(),this.form.controls.numeroIdentidade1.reset(),this.form.controls.uf1.clearValidators(),this.form.controls.numeroIdentidade1.clearValidators(),this.form.controls.uf1.disable(),this.form.controls.numeroIdentidade1.disable(),this.form.controls.uf1.updateValueAndValidity(),this.form.controls.numeroIdentidade1.updateValueAndValidity())}),this.form.controls.tipoConselho2.valueChanges.subscribe(e=>{e?(this.form.controls.tipoConselho3.enable(),this.form.controls.uf2.setValidators(D.required),this.form.controls.numeroIdentidade2.setValidators(D.required),this.form.controls.uf2.enable(),this.form.controls.numeroIdentidade2.enable(),this.form.controls.uf2.updateValueAndValidity(),this.form.controls.numeroIdentidade2.updateValueAndValidity()):(this.disableResetIdentidadeProfissional("3"),this.form.controls.uf2.reset(),this.form.controls.numeroIdentidade2.reset(),this.form.controls.uf2.clearValidators(),this.form.controls.numeroIdentidade2.clearValidators(),this.form.controls.uf2.updateValueAndValidity(),this.form.controls.numeroIdentidade2.updateValueAndValidity())}),this.form.controls.tipoConselho3.valueChanges.subscribe(e=>{e?(this.form.controls.uf3.setValidators(D.required),this.form.controls.numeroIdentidade3.setValidators(D.required),this.form.controls.uf3.enable(),this.form.controls.numeroIdentidade3.enable(),this.form.controls.uf3.updateValueAndValidity(),this.form.controls.numeroIdentidade3.updateValueAndValidity()):(this.form.controls.uf3.reset(),this.form.controls.numeroIdentidade3.reset(),this.form.controls.uf3.clearValidators(),this.form.controls.numeroIdentidade3.clearValidators(),this.form.controls.uf3.updateValueAndValidity(),this.form.controls.numeroIdentidade3.updateValueAndValidity())})}disableResetIdentidadeProfissional(e){let t=Number(e),i=String(t-1);this.form.controls["tipoConselho"+i].value||(this.form.controls["tipoConselho"+e].reset(),this.form.controls["uf"+e].reset(),this.form.controls["numeroIdentidade"+e].reset(),this.form.controls["tipoConselho"+e].disable(),this.form.controls["uf"+e].disable(),this.form.controls["numeroIdentidade"+e].disable())}carregaValorTipoConselho(e){return this.dadoIdentidadeProfissionalModel.listaIdentidadeProfissional.length>e?this.buscaTipoIdProfissional(this.dadoIdentidadeProfissionalModel.listaIdentidadeProfissional[e].tipoConselho):null}carregaValorUf(e){return this.dadoIdentidadeProfissionalModel.listaIdentidadeProfissional.length>e?this.dadoIdentidadeProfissionalModel.listaIdentidadeProfissional[e].uf:null}carregaValorNumeroIdentidade(e){return this.dadoIdentidadeProfissionalModel.listaIdentidadeProfissional.length>e?this.dadoIdentidadeProfissionalModel.listaIdentidadeProfissional[e].numeroIdentidade:null}salvaDadoIdentidadeProfissionalModel(){this.informacoesDocumentosService.gravaDadoIdentidadeProfissional(this.dadoIdentidadeProfissionalModel).subscribe({next:e=>{e=="OK"&&this.redirecionaProximaPagina()},error:e=>{let t=JSON.parse(e.error);this.messagesServiceModal.openModal(`Erro ao gravar informa\xE7\xF5es da identidade profissional. 87 88`+t[0].message,this.viewContainerRef)}})}criaDadoIdentidadeProfissionalModel(){this.dadoIdentidadeProfissionalModel={uuidPrecadastro:this.protocoloModel?.uuid??null,listaIdentidadeProfissional:[]},this.criaIdentidadeProfissionalModels()}criaIdentidadeProfissionalModels(){this.valorValido(this.form.controls.tipoConselho1.value)&&this.criaIdentidadeProfissionalModel(this.form.controls.tipoConselho1.value,this.form.controls.uf1.value,this.form.controls.numeroIdentidade1.value,0),this.valorValido(this.form.controls.tipoConselho2.value)&&this.criaIdentidadeProfissionalModel(this.form.controls.tipoConselho2.value,this.form.controls.uf2.value,this.form.controls.numeroIdentidade2.value,1),this.valorValido(this.form.controls.tipoConselho3.value)&&this.criaIdentidadeProfissionalModel(this.form.controls.tipoConselho3.value,this.form.controls.uf3.value,this.form.controls.numeroIdentidade3.value,2),this.dadosCompartilhadosService.setDadoIdentidadeProfissional(this.dadoIdentidadeProfissionalModel)}criaIdentidadeProfissionalModel(e,t,i,d){let p={tipoConselho:e.codigo,descricaoTipoConselho:e.valor,uf:t,numeroIdentidade:i}
88;this.dadoIdentidadeProfissionalModel.listaIdentidadeProfissional[d]=p}carregaTiposIdProfissionais(){return _e(this,null,function*(){let e=yield this.tabelasDominioGeralService.getTipoIdProfissional(this.viewContainerRef);if(e.data){let t=e.data;this.tiposIdProfissionaisOpcoes.set(t)}})}buscaTipoIdProfissional(e){return this.tiposIdProfissionaisOpcoes().find(t=>t.codigo==e)}valorValido(e){return!!e}redirecionaProximaPagina(){this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCartaoNacionalSaude||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarTipoSanguineoFatorRH?this.router.navigate(["etapas/informacoes-documentos-4"],{skipLocationChange:!0}):this.router.navigate(["etapas/informacoes-documentos-5"],{skipLocationChange:!0})}redirecionaPaginaAnterior(){this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCarteiraTrabalho?this.router.navigate(["etapas/informacoes-documentos-2"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarTituloEleitor||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCertidaoMilitar||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCNH?this.router.navigate(["etapas/informacoes-documentos-1"],{skipLocationChange:!0}):this.router.navigate(["etapas/selecao-documentos"],{skipLocationChange:!0})}avancarEtapa(){this.validaFormulario()&&(this.houveMudancaNoForm?(this.criaDadoIdentidadeProfissionalModel(),this.salvaDadoIdentidadeProfissionalModel()):this.redirecionaProximaPagina())}voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.redirecionaPaginaAnterior()}):this.redirecionaPaginaAnterior()}limpaFormulario(){this.limparForm(this.viewContainerRef)}validaFormulario(){return this.formularioValido()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-informacoes-documentos-2"]],viewQuery:function(t,i){if(t&1&&z(nd,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:17,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body","overflow-auto"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","justify-content-between","align-items-center","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"row","mt-3"],[1,"row","pb-1"],[1,"col","fw-bold"],[1,"row","pb-2"],[1,"col-4"],["id","tipoConselho1","label","Conselho:","identificador","codigo","descricao","valor","ngDefaultControl","",3,"formControl","opcoes"],[1,"col-3","ps-0"],["id","uf1","label","UF*:","errorMessage","Obrigat\xF3rio","ngDefaultControl","",3,"formControl"],[1,"col-5","ps-0"],["type","text","topLabel","N\xBA da inscri\xE7\xE3o:","tpMask","numero","ngDefaultControl","","errorMessage","Obrigat\xF3rio",3,"formControl","tamMax","id"],["id","tipoConselho2","label","Conselho:","identificador","codigo","descricao","valor","ngDefaultControl","",3,"formControl","opcoes"],["id","uf2","label","UF*:","errorMessage","Obrigat\xF3rio","ngDefaultControl","",3,"formControl"],[1,"row"],["
88id","tipoConselho3","label","Conselho:","identificador","codigo","descricao","valor","ngDefaultControl","",3,"formControl","opcoes"],["id","uf3","label","UF*:","errorMessage","Obrigat\xF3rio","ngDefaultControl","",3,"formControl"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"div",1),s(3,"Informa\xE7\xF5es de documentos"),r(),a(4,"div",2)(5,"div",3),g(6,ad,25,19,"form",4),r()(),a(7,"div",5)(8,"div",6)(9,"app-custom-button-voltar",7),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(10,"div",8),s(11,"Etapa 6 de 8"),r(),a(12,"div",9)(13,"app-custom-button-proximo",7),E("btnClicked",function(){return i.avancarEtapa()}),r()()(),a(14,"div",10)(15,"div",9)(16,"app-custom-button-limpar",7),E("btnClicked",function(){return i.limpaFormulario()}),r()()()),t&2&&(l(6),C(i.form?6:-1))},dependencies:[V,Z,W,P,J,Y,X,he,le,ee,ue,je,Fe],encapsulation:2})}};function rd(o,n){if(o&1&&(a(0,"div",0)(1,"div",1)(2,"label",6),s(3),r()()()),o&2){let e=u();l(2),m("for",e.id()),l(),M(e.titulo())}}function ld(o,n){if(o&1&&(a(0,"div",5)(1,"div",1)(2,"small",7),s(3),r()()()),o&2){let e=u();l(3),L(" ",e.errorMessage())}}function sd(o,n){if(o&1&&(a(0,"strong"),s(1,"Documento: "),r(),s(2),h(3,"br")),o&2){let e=u(2);l(2),L("",e.nomeArquivoCarregado()," ")}}function dd(o,n){if(o&1&&(g(0,sd,4,1),a(1,"b"),s(2),r()),o&2){let e=u();C(e.nomeArquivoCarregado()?0:-1),l(),de(e.msgCarregamentoArquivo().tipoMensagem==e.StatusRequisicao.SUCESSO?"text-success":"text-danger"),l(),M(e.msgCarregamentoArquivo().mensagem)}}function cd(o,n){if(o&1&&(a(0,"strong"),s(1,"Documento: "),r(),s(2)),o&2){let e=u();l(2),L("",e.nomeArquivoCarregado()," ")}}function md(o,n){if(o&1&&(a(0,"small"),s(1),r()),o&2){let e=u();l(),M(e.formatosSuportadosMsg())}}var ut=class o{constructor(){this.id=b.required();this.titulo=b();this.label=b();this.formControl=b.required();this.errorMessage=b();this.msgCarregamentoArquivo=b();this.nomeArquivoCarregado=b();this.formatosSuportadosMsg=b();this.file=ge();this.StatusRequisicao=Xt}fileChange(n){let e=n.target,t=null;e.files&&(t=e.files[0]),t&&this.file.emit(t)}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-custom-input-file"]],inputs:{id:[1,"id"],titulo:[1,"titulo"],label:[1,"label"],formControl:[1,"formControl"],errorMessage:[1,"errorMessage"],msgCarregamentoArquivo:[1,"msgCarregamentoArquivo"],nomeArquivoCarregado:[1,"nomeArquivoCarregado"],formatosSuportadosMsg:[1,"formatosSuportadosMsg"]},outputs:{file:"file"},decls:15,vars:9,consts:[[1,"row"],[1,"col"],[3,"for"],[1,"bi","bi-upload","ps-3","pe-2"],["type","file","aria-describedby","inputFile","aria-label","Upload",3,"change","formControl","id"],[1,"row","pb-1"],[1,"form-label",3,"for"],[1,"text-danger"]],template:function(e,t){e&1&&(g(0,rd,4,2,"div",0),a(1,"div",0)(2,"div",1)(3,"label",2),s(4),h(5,"i",3),r(),a(6,"input",4),E("change",function(d){return t.fileChange(d)}),r()()(),a(7,"div",0)(8,"div",1),g(9,ld,4,1,"div",5),a(10,"div",0)(11,"div",1),g(12,dd,3,4)(13,cd,3,1)(14,md,2,1,"small"),r()()()()),e&2&&(C(t.titulo()?0:-1),l(3),de(t.formControl().invalid&&t.formControl().touched&&t.formControl().dirty?"custom-file-button custom-file-button-invalid":"custom-file-button"),m("for",t.id()),l(),M(t.label()),l(2),m("formControl",t.formControl())("id",t.id()),l(3),C(t.formControl().invalid&&t.formControl().touched&&t.formControl().dirty?9:-1),l(3),C(t.msgCarregamentoArquivo()?12:t.nomeArquivoCarregado()?13:14))},dependencies:[V,W,P,Y],styles:[`input[type=file]{display:none}.custom-file-button{background-color:#fff;border:1px solid #ccc;padding:8px 12px;border-radius:50px;cursor:pointer}.custom-file-button:hover{background-color:#e7e7e7}.custom-file-button-invalid{border-color:red;border-radius:50px} 89`],encapsulation:2})}};var ud=["dialogContainer"];function pd(o,n){if(o&1&&(a(0,"div",11)(1,"div",12),s(2,"Cart\xE3o Nacional de Sa\xFAde"),r()(),a(3,"div",13)(4,"div",6),h(5,"app-custom-input",14),r()()),o&2){let e=u(2);l(5),m("formControl",e.form.controls.cartaoNacionalSaude)("tamMax",15)("id","cartaoNacionalSaude")}}function fd(o,n){if(o&1){let e=A();a(0,"div",17)(1,"app-custom-input-file",18),E("file",function(i){y(e);let d=u(3);return T(d.fileLoaded(i))}),r()()}if(o&2){let e=u(3);l(),m("id","comprovante")("formControl",e.form.controls.comprovante)("msgCarregamentoArquivo",e.msgCarregamentoArquivo)("nomeArquivoCarregado",e.nomeArquivoCarregado)}}function hd(o,n){if(o&1&&(a(0,"div",13)(1,"div",15),h(2,"app-custom-select",16),r()(),g(3,fd,2,4,"div",17)),o&2){let e=u(2);l(2),m("formControl",e.form.controls.tipoSanguineo)("opcoes",e.tiposSanguineosOpcoes),l(),C(e.form.controls.tipoSanguineo.value?3:-1)}}function vd(o,n){if(o&1&&(a(0,"form",4),g(1,pd,6,3),g(2,hd,4,3),r()),o&2){let e=u();m("formGroup",e.form),l(),C(e.selecaoDocumentosModel.informarCartaoNacionalSaude?1:-1),l(),C(e.selecaoDocumentosModel.informarTipoSanguineoFatorRH?2:-1)}}var Po=class o extends oe{constructor(){super();this.informacoesDocumentosService=f(pe);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.informacaoDocumentoModel=this.dadosCompartilhadosService.getInformacoesDocumentos();this.selecaoDocumentosModel=this.dadosCompartilhadosService.getSelecaoDocumento();this.tiposSanguineosOpcoes=["A+","A-","B+","B-","AB+","AB-","O+","O-"];this.formData=new FormData;this.msgCarregamentoArquivo=null;this.arquivo=this.activatedRoute.snapshot.data.arquivos}ngOnInit(){this.criaFormGroup(),this.carregaNomeComprovante()}criaFormGroup(){this.informacaoDocumentoModel?.cartaoNacionalSaude||this.informacaoDocumentoModel?.tipoSanguineo?this.carregaFormGroup():this.criaNovoFormGroup()}criaNovoFormGroup(){this.form=this.formBuilder.group({cartaoNacionalSaude:new c(null),tipoSanguineo:new c(null),comprovante:new c(null)}),this.verificaTipoSanguineo()}carregaFormGroup(){let e=null;this.informacaoDocumentoModel?.tipoSanguineo&&this.informacaoDocumentoModel.fatorRh&&(e=this.informacaoDocumentoModel.tipoSanguineo+this.informacaoDocumentoModel.fatorRh),this.form=this.formBuilder.group({cartaoNacionalSaude:new c(this.informacaoDocumentoModel?.cartaoNacionalSaude),tipoSanguineo:new c(e),comprovante:new c(null)}),this.verificaTipoSanguineo(e)}verificaTipoSanguineo(e){this.form.controls.tipoSanguineo.valueChanges.subscribe(t=>{t&&e!=t?(this.adicionaValidatorComprovante(),this.nomeArquivoCarregado=""):this.removeValidatorComprovante()})}carregaNomeComprovante(){this.arquivo&&this.arquivo.listaDocumento.length>0&&(this.nomeArquivoCarregado=this.arquivo.listaDocumento.find(e=>e.tipoDocumentoAnexo=="TIPO_SANGUE")?.nomeArquivo)}criaInformacoesDocumentoModel(){this.informacaoDocumentoModel?this.preencheModel():this.criaNovaModel()}criaNovaModel(){this.informacaoDocumentoModel={uuidPrecadastro:this.protocoloModel?.uuid??null,cartaoNacionalSaude:this.form.controls.cartaoNacionalSaude.value,tipoSanguineo:this.retornaTipoSanguineoSemFatorRH(),fatorRh:this.retornaFatorRH()},this.dadosCompartilhadosService.setInformacaoDocumento(this.informacaoDocumentoModel)}preencheModel(){this.informacaoDocumentoModel&&(this.informacaoDocumentoModel.uuidPrecadastro=this.protocoloModel?.uuid??null,this.informacaoDocumentoModel.cartaoNacionalSaude=this.form.controls.cartaoNacionalSaude.value,this.informacaoDocumentoModel.tipoSanguineo=this.retornaTipoSanguineoSemFatorRH(),this.informacaoDocumentoModel.fatorRh=this.retornaFatorRH()),this.dadosCompartilhadosService.setInformacaoDocumento(this.informacaoDocumentoModel)}salvaInformacoesDocumentoModel(){this.informacaoDocumentoModel&&this.informacoesDocumentosService.gravaInformacoesDocumentos(this.informacaoDocumentoModel).subscribe({next:e=>{e=="OK"&&this.redirecionaParaProximaPagina()},error:e=>{console.error(e),this.deletaArquivo("TIPO_SANGUE")}})}redirecionaParaProximaPagina(){this.router.navigate(["etapas/informacoes-documentos-5"],{skipLocationChange:!0})}retornaFatorRH(){let e=null,t=this.form.controls.tipoSanguineo.value;return t&&(t.includes("+")?e="+":e="-"),e}retornaTipoSanguineoSemFatorRH(){let e=null;return this.form.controls.tipoSanguineo.value&&(this.form.controls.tipoSanguineo.value.includes("+")?e=this.form.controls.tipoSanguineo.value.replace("+",""):e=this.form.controls.tipoSanguineo.value.replace("-","")),e}fileLoaded(e){let t=null;e&&(t=e),t&&this.protocoloModel?.uuid&&(this.limpaFormData(),this.formData.append("uuid",this.protocoloModel.uuid),this.formData.append("file",t),this.formData.append("fileName",t.name),this.formData.append("tipo","TIPO_SANGUE"),this.salvaArquivo(t.name))}salvaArquivo(e){this.informacoesDocumentosService.gravaArquivo(this.formData).subscribe({next:t=>{t&&(this.nomeArquivoCarregado=e,this.msgCarregamentoArquivo={mensagem:"Arquivo carregado com sucesso.",tipoMensagem:1})},error:t=>{try{let i=JSON.parse(t.error);this.msgCarregamentoArquivo={mensagem:"Erro ao carregar arquivo. "+i[0].message,tipoMensagem:2}}catch(i){this.msgCarregamentoArquivo={mensagem:"Erro ao carregar arquivo. "+i+". Formatos suportados: .jpg .png e .pdf",tipoMensagem:2}}}})}limpaFormData(){this.formData.delete("uuid"),this.formData.delete("file"),this.formData.delete("fileName"),this.formData.delete("tipo"),this.formData.delete("tipoDocOrigem")}deletaArquivo(e){this.limpaFormData(),this.informacoesDocumentosService.deleteArquivo(this.protocoloModel?.uuid,e).subscribe({error:t=>{let i=JSON.parse(t.error);console.error("Erro ao remover arquivo. "+i[0].message)}})}redirecionaPaginaAnterior(){this.dadosCompartilhadosService.getSelecaoDocumento()?.informarIdentidadeProfissional?this.router.navigate(["etapas/informacoes-documentos-3"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCarteiraTrabalho?this.router.navigate(["etapas/informacoes-documentos-2"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarTituloEleitor||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCertidaoMilitar||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCNH?this.router.navigate(["etapas/informacoes-documentos-1"],{skipLocationChange:!0}):this.router.navigate(["etapas/selecao-documentos"],{skipLocationChange:!0})}adicionaValidatorComprovante(){this.form.controls.comprovante.addValidators(D.required),this.form.controls.comprovante.updateValueAndValidity()}removeValidatorComprovante(){this.form.controls.comprovante.clearValidators(),this.form.controls.comprovante.updateValueAndValidity()}avancarEtapa(){this.validaFormulario()&&(this.criaInformacoesDocumentoModel(),this.salvaInformacoesDocumentoModel())}
89voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.redirecionaPaginaAnterior()}):this.redirecionaPaginaAnterior()}limpaFormulario(){this.limparForm(this.viewContainerRef)}validaFormulario(){return this.formularioValido()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-informacoes-documentos-4"]],viewQuery:function(t,i){if(t&1&&z(ud,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:17,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body","overflow-auto"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","justify-content-between","align-items-center","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"row","mt-3"],[1,"row","pb-1"],[1,"col","fw-bold"],[1,"row","pb-2"],["type","text","topLabel","N\xBA do cart\xE3o:","tpMask","numero","ngDefaultControl","",3,"formControl","tamMax","id"],[1,"col-7"],["id","tipoSanguineo","label","Tipo Sangu\xEDneo / Fator RH:","ngDefaultControl","",3,"formControl","opcoes"],[1,"row"],["titulo","Carregue um comprovante*: (arquivos .jpg, .pdf ou .png)","label","Enviar arquivo","ngDefaultControl","","errorMessage","N\xE3o pode avan\xE7ar sem carregar um comprovante!",3,"file","id","formControl","msgCarregamentoArquivo","nomeArquivoCarregado"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"div",1),s(3,"Informa\xE7\xF5es de documentos"),r(),a(4,"div",2)(5,"div",3),g(6,vd,3,3,"form",4),r()(),a(7,"div",5)(8,"div",6)(9,"app-custom-button-voltar",7),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(10,"div",8),s(11,"Etapa 6 de 8"),r(),a(12,"div",9)(13,"a
89pp-custom-button-proximo",7),E("btnClicked",function(){return i.avancarEtapa()}),r()()(),a(14,"div",10)(15,"div",9)(16,"app-custom-button-limpar",7),E("btnClicked",function(){return i.limpaFormulario()}),r()()()),t&2&&(l(6),C(i.form?6:-1))},dependencies:[V,Z,W,P,J,Y,X,he,le,ee,ue,ut,je],encapsulation:2})}};var gd=["dialogContainer"];function Cd(o,n){o&1&&(a(0,"small",19),h(1,"i",29),s(2," Aperte na LUPA ao lado para pesquisar o CID. "),r())}function bd(o,n){if(o&1){let e=A();a(0,"div",20)(1,"div",4)(2,"app-custom-input-file",30),E("file",function(i){y(e);let d=u(3);return T(d.fileLoaded(i,"CID_1"))}),r()()()}if(o&2){let e=u(3);l(2),m("id","arquivo1")("formControl",e.form.controls.arquivo1)("msgCarregamentoArquivo",e.msgCarregamentoArquivo1)("nomeArquivoCarregado",e.laudoCid1)}}function _d(o,n){o&1&&(a(0,"small",19),h(1,"i",29),s(2," Aperte na LUPA ao lado para pesquisar o CID. "),r())}function Dd(o,n){if(o&1){let e=A();a(0,"div",20)(1,"div",4)(2,"app-custom-input-file",30),E("file",function(i){y(e);let d=u(3);return T(d.fileLoaded(i,"CID_2"))}),r()()()}if(o&2){let e=u(3);l(2),m("id","arquivo2")("formControl",e.form.controls.arquivo2)("msgCarregamentoArquivo",e.msgCarregamentoArquivo2)("nomeArquivoCarregado",e.laudoCid2)}}function Ed(o,n){o&1&&(a(0,"small",19),h(1,"i",29),s(2," Aperte na LUPA ao lado para pesquisar o CID. "),r())}function Md(o,n){if(o&1){let e=A();a(0,"div",20)(1,"div",4)(2,"app-custom-input-file",30),E("file",function(i){y(e);let d=u(3);return T(d.fileLoaded(i,"CID_3"))}),r()()()}if(o&2){let e=u(3);l(2),m("id","arquivo3")("formControl",e.form.controls.arquivo3)("msgCarregamentoArquivo",e.msgCarregamentoArquivo3)("nomeArquivoCarregado",e.laudoCid3)}}function Sd(o,n){if(o&1){let e=A();a(0,"form",13)(1,"div",14)(2,"div",15)(3,"app-custom-input-icon",16),E("iconClick",function(){y(e);let i=u(2);return T(i.carregaCid(i.form.controls.cid1.value,1))}),r()(),a(4,"div",17),h(5,"app-custom-input",18),g(6,Cd,3,0,"small",19),r()(),a(7,"div",20)(8,"div",15),h(9,"app-custom-input",21),r(),a(10,"div",22),h(11,"app-custom-select-uf",23),r()(),g(12,bd,3,4,"div",20),h(13,"hr"),a(14,"div",14)(15,"div",15)(16,"app-custom-input-icon",24),E("iconClick",function(){y(e);let i=u(2);return T(i.carregaCid(i.form.controls.cid2.value,2))}),r()(),a(17,"div",17),h(18,"app-custom-input",18),g(19,_d,3,0,"small",19),r()(),a(20,"div",20)(21,"div",15),h(22,"app-custom-input",21),r(),a(23,"div",22),h(24,"app-custom-select-uf",25),r()(),g(25,Dd,3,4,"div",20),h(26,"hr"),a(27,"div",14)(28,"div",15)(29,"app-custom-input-icon",26),E("iconClick",function(){y(e);let i=u(2);return T(i.carregaCid(i.form.controls.cid3.value,3))}),r()(),a(30,"div",17),h(31,"app-custom-input",18),g(32,Ed,3,0,"small",19),r()(),a(33,"div",27)(34,"div",15),h(35,"app-custom-input",21),r(),a(36,"div",22),h(37,"app-custom-select-uf",28),r()(),g(38,Md,3,4,"div",20),r()}if(o&2){let e=u(2);m("formGroup",e.form),l(3),m("formControl",e.form.controls.cid1),l(2),m("formControl",e.form.controls.cidDescricao1)("id","cidDescricao1"),l(),C(e.form.controls.cid1.value&&!e.form.controls.cidDescricao1.value?6:-1),l(3),m("formControl",e.form.controls.crm1)("tamMax",6)("id","crm1"),l(2),m("formControl",e.form.controls.uf1),l(),C(e.form.controls.cid1.value&&e.form.controls.cidDescricao1.value?12:-1),l(4),m("formControl",e.form.controls.cid2),l(2),m("formControl",e.form.controls.cidDescricao2)("id","cidDescricao2"),l(),C(e.form.controls.cid2.value&&!e.form.controls.cidDescricao2.value?19:-1),l(3),m("formControl",e.form.controls.crm2)("tamMax",6)("id","crm2"),l(2),m("formControl",e.form.controls.uf2),l(),C(e.form.controls.cid2.value&&e.form.controls.cidDescricao2.value?25:-1),l(4),m("formControl",e.form.controls.cid3),l(2),m("formControl",e.form.controls.cidDescricao3)("id","cidDescricao3"),l(),C(e.form.controls.cid3.value&&!e.form.controls.cidDescricao3.value?32:-1),l(3),m("formControl",e.form.controls.crm3)("tamMax",6)("id","crm3"),l(2),m("formControl",e.form.controls.uf3),l(),C(e.form.controls.cid3.value&&e.form.controls.cidDescricao3.value?38:-1)}}function xd(o,n){if(o&1&&(a(0,"div",2)(1,"div",10)(2,"div",11)(3,"strong")(4,"span",12),s(5," Aten\xE7\xE3o: "),r(),s(6,"Informe at\xE9 3 condi\xE7\xF5es conforme os laudos ou atestados m\xE9dicos "),r()(),g(7,Sd,39,28,"form",13),r()()),o&2){let e=u();l(7),C(e.form?7:-1)}}function yd(o,n){if(o&1&&(a(0,"div",2)(1,"div",10)(2,"div",20)(3,"div",4)(4,"strong"),s(5," Voc\xEA tem alguma condi\xE7\xE3o espec\xEDfica de sa\xFAde que precisa ser informada? "),r()()(),a(6,"div",20)(7,"div",4),s(8," Em caso afirmativo, lembre-se de que ser\xE1 necess\xE1rio fornecer o C\xF3digo Internacional de Doen\xE7a (CID) correspondente e o laudo assinad
89o por um m\xE9dico comprovando tal situa\xE7\xE3o. "),r()(),a(9,"div",31)(10,"div",32)(11,"div",33),h(12,"input",34),a(13,"label",35),s(14," Sim "),r()()(),a(15,"div",32)(16,"div",33),h(17,"input",36),a(18,"label",37),s(19," N\xE3o "),r()()()()()()),o&2){let e=u();l(12),m("formControl",e.temCondicoesEspecificasSaude)("value",!0),l(5),m("formControl",e.temCondicoesEspecificasSaude)("value",!1)}}var Vo=class o extends oe{constructor(){super();this.informacoesDocumentosService=f(pe);this.mostraCondicoesEspecificasSaude=!1;this.temCondicoesEspecificasSaude=new c(!1,[D.required]);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.formData=new FormData;this.msgCarregamentoArquivo1=null;this.msgCarregamentoArquivo2=null;this.msgCarregamentoArquivo3=null;this.dadoCIDModel=this.activatedRoute.snapshot.data.dadoCID,this.laudos=this.activatedRoute.snapshot.data.arquivos,this.laudoCid1=this.carregaLaudo("CID_1"),this.laudoCid2=this.carregaLaudo("CID_2"),this.laudoCid3=this.carregaLaudo("CID_3"),this.dadoCIDModel&&this.dadoCIDModel.listaDadoCID.length>0&&(this.mostraCondicoesEspecificasSaude=!0)}ngOnInit(){this.criaFormGroup()}criaFormGroup(){this.dadoCIDModel?this.carregaFormGroup():this.criaNovoFormGroup()}criaNovoFormGroup(){this.form=this.formBuilder.group({cid1:new c(""),cidDescricao1:new c({value:"",disabled:!0}),crm1:new c(""),uf1:new c(""),arquivo1:new c(null),cid2:new c(""),cidDescricao2:new c({value:"",disabled:!0}),crm2:new c(""),uf2:new c(""),arquivo2:new c(null),cid3:new c(""),cidDescricao3:new c({value:"",disabled:!0}),crm3:new c(""),uf3:new c(""),arquivo3:new c(null)}),this.verificaAlteracoesNumeroCid()}carregaFormGroup(){this.form=this.formBuilder.group({cid1:new c(this.carregaValorCid(1)),cidDescricao1:new c({value:this.carregaValorCidDescricao(1),disabled:!0}),crm1:new c(this.carregaValorCrm(1)),uf1:new c(this.carregaValorUf(1)),arquivo1:new c(null),cid2:new c(this.carregaValorCid(2)),cidDescricao2:new c({value:this.carregaValorCidDescricao(2),disabled:!0}),crm2:new c(this.carregaValorCrm(2)),uf2:new c(this.carregaValorUf(2)),arquivo2:new c(null),cid3:new c(this.carregaValorCid(3)),cidDescricao3:new c({value:this.carregaValorCidDescricao(3),disabled:!0}),crm3:new c(this.carregaValorCrm(3)),uf3:new c(this.carregaValorUf(3)),arquivo3:new c(null)}),this.verificaAlteracoesNumeroCid()}criaDadoCIDModel(){this.dadoCIDModel={uuidPrecadastro:this.protocoloModel?.uuid??"",listaDadoCID:[]},this.criaCIDModels()}carregaCid(e,t){e&&e.length>=3?this.informacoesDocumentosService.getCID(e).subscribe({next:i=>
89{i&&(this.form.controls["cidDescricao"+t].setValue(i.cidDescricaoReduzida),this.setValidators(t))},error:i=>{console.error(i),this.openMessageCIDNaoEncontrado()}}):e||this.unsetValidators(t)}openMessageCIDNaoEncontrado(){this.avisoService.setMessage("WARNING","C\xD3DIGO CID inv\xE1lido ou n\xE3o existe registro com esta chave")}verificaAlteracoesNumeroCid(){["cid1","cid2","cid3"].forEach((e,t)=>{this.form.controls[e].valueChanges.subscribe(i=>{i?this.setValidators(t+1):(this.unsetValidators(t+1),this.limpaNomeArquivoCarregado(t+1))})})}limpaNomeArquivoCarregado(e){switch(e){case 1:this.laudoCid1=void 0,this.msgCarregamentoArquivo1=null;break;case 2:this.laudoCid2=void 0,this.msgCarregamentoArquivo2=null;break;case 3:this.laudoCid3=void 0,this.msgCarregamentoArquivo3=null;break}}setValidators(e){this.form.controls["cid"+e].setValidators(D.required),this.form.controls["crm"+e].setValidators(D.required),this.form.controls["uf"+e].setValidators(D.required),this.form.controls["arquivo"+e].setValidators(D.required),this.form.controls["cid"+e].updateValueAndValidity({emitEvent:!1}),this.form.controls["crm"+e].updateValueAndValidity(),this.form.controls["uf"+e].updateValueAndValidity(),this.form.controls["arquivo"+e].updateValueAndValidity()}
89unsetValidators(e){this.form.controls["cidDescricao"+e].setValue(""),this.form.controls["crm"+e].setValue(""),this.form.controls["uf"+e].setValue(""),this.form.controls["arquivo"+e].setValue(""),this.form.controls["cid"+e].clearValidators(),this.form.controls["crm"+e].clearValidators(),this.form.controls["uf"+e].clearValidators(),this.form.controls["arquivo"+e].clearValidators(),this.form.controls["cid"+e].updateValueAndValidity({emitEvent:!1}),this.form.controls["crm"+e].updateValueAndValidity(),this.form.controls["uf"+e].updateValueAndValidity(),this.form.controls["arquivo"+e].updateValueAndValidity()}valorValido(e){return!!e}criaCIDModels(){this.valorValido(this.form.controls.cidDescricao1.value)?this.criaCIDModel(this.form.controls.cid1.value,this.form.controls.cidDescricao1.value,this.form.controls.crm1.value,this.form.controls.uf1.value,1):this.deletaArquivo("CID_1"),this.valorValido(this.form.controls.cidDescricao2.value)?this.criaCIDModel(this.form.controls.cid2.value,this.form.controls.cidDescricao2.value,this.form.controls.crm2.value,this.form.controls.uf2.value,2):this.deletaArquivo("CID_2"),this.valorValido(this.form.controls.cidDescricao3.value)?this.criaCIDModel(this.form.controls.cid3.value,this.form.controls.cidDescricao3.value,this.form.controls.crm3.value,this.form.controls.uf3.value,3):this.deletaArquivo("CID_3"),this.dadosCompartilhadosService.setDadoCID(this.dadoCIDModel)}criaCIDModel(e,t,i,d,p){let _={codigoCid:e.toUpperCase(),descricaoCid:t,crm:i,crmUf:d,ordemCid:p};this.dadoCIDModel.listaDadoCID.push(_)}carregaValorCid(e){let t=this.dadoCIDModel.listaDadoCID.find(i=>i.ordemCid==e);return t?t.codigoCid:""}carregaValorCidDescricao(e){let t=this.dadoCIDModel.listaDadoCID.find(i=>i.ordemCid==e);return t?t.descricaoCid:""}carregaValorCrm(e){let t=this.dadoCIDModel.listaDadoCID.find(i=>i.ordemCid==e);return t?t.crm:""}carregaValorUf(e){let t=this.dadoCIDModel.listaDadoCID.find(i=>i.ordemCid==e);return t?t.crmUf:""}carregaLaudo(e){let t="";return this.laudos&&this.laudos.listaDocumento.length>0&&(t=this.laudos.listaDocumento.find(i=>i.tipoDocumentoAnexo==e)?.nomeArquivo),t}salvaDadoCondicoesEspecificasSaude(){this.informacoesDocumentosService.gravaDadoCID(this.dadoCIDModel).subscribe({next:e=>{e=="OK"&&this.redirecionaProximaPagina()},error:e=>{let t=JSON.parse(e.error);this.messagesServiceModal.openModal(`Erro ao gravar condi\xE7\xF5es espec\xEDficas de sa\xFAde. 90 91`+t[0].message,this.viewContainerRef)}})}redirecionaProximaPagina(){this.router.navigate(["etapas/informacoes-documentos-6"],{skipLocationChange:!0})}fileLoaded(e,t){let i=null;e&&(i=e),i&&this.protocoloModel?.uuid&&(this.limpaFormData(),this.formData.append("uuid",this.protocoloModel.uuid),this.formData.append("file",i),this.formData.append("fileName",i.name),this.formData.append("tipo",t),this.salvaArquivo(t,i.name))}salvaArquivo(e,t){this.informacoesDocumentosService.gravaArquivo(this.formData).subscribe({next:i=>{i&&this.criaMensagem(e,"Laudo carregado com sucesso.",1,t)},error:i=>{try{let d=JSON.parse(i.error);this.criaMensagem(e,"Erro ao carregar arquivo. "+d[0].message,2)}catch(d){this.criaMensagem(e,"Erro ao carregar arquivo. "+d+". Formatos suportados: .jpg .png e .pdf",2)}}})}deletaArquivo(e){this.protocoloModel?.uuid&&(this.limpaFormData(),this.formData.append("uuid",this.protocoloModel.uuid),this.formData.append("file",""),this.formData.append("fileName",""),this.formData.append("tipo",e)),this.informacoesDocumentosService.deleteArquivo(this.protocoloModel?.uuid,e).subscribe({error:t=>{try{let i=JSON.parse(t.error);this.criaMensagem(e,"Erro ao remover arquivo. "+i[0].message,2)}catch(i){this.criaMensagem(e,"Erro ao remover arquivo. "+i+".",2)}}})}criaMensagem(e,t,i,d){e=="CID_1"&&(this.laudoCid1=d??d,this.msgCarregamentoArquivo1={mensagem:t,tipoMensagem:i}),e=="CID_2"&&(this.laudoCid2=d??d,this.msgCarregamentoArquivo2={mensagem:t,tipoMensagem:i}),e=="CID_3"&&(this.laudoCid3=d??d,this.msgCarregamentoArquivo3={mensagem:t,tipoMensagem:i})}limpaFormData(){this.formData.delete("uuid"),this.formData.delete("file"),this.formData.delete("fileName"),this.formData.delete("tipo")}redirecionaPaginaAnterior(){this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCartaoNacionalSaude||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarTipoSanguineoFatorRH?this.router.navigate(["etapas/informacoes-documentos-4"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarIdentidadeProfissional?this.router.navigate(["etapas/informacoes-documentos-3"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCarteiraTrabalho?this.router.navigate(["etapas/informacoes-documentos-2"],{skipLocationChange:!0}):this.dadosCompartilhadosService.getSelecaoDocumento()?.informarTituloEleitor||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCertidaoMilitar||this.dadosCompartilhadosService.getSelecaoDocumento()?.informarCNH?this.router.navigate(["etapas/informacoes-documentos-1"],{skipLocationChange:!0}):this.router.navigate(["etapas/selecao-documentos"],{skipLocationChange:!0})}
91avancarEtapa(){if(this.temCondicoesEspecificasSaude.value&&!this.mostraCondicoesEspecificasSaude)this.mostraCondicoesEspecificasSaude=!0;else{if(!this.validaFormulario())return;this.temCondicoesEspecificasSaude.value||this.dadoCIDModel&&this.dadoCIDModel.listaDadoCID.length>0?(this.criaDadoCIDModel(),this.salvaDadoCondicoesEspecificasSaude()):this.router.navigate(["etapas/agendamento"],{skipLocationChange:!0})}}voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.redirecionaPaginaAnterior()}):this.redirecionaPaginaAnterior()}limpaFormulario(){this.messagesServiceModal.openModalConfirmation(this.MSG_LIMPAR,this.viewContainerRef,e=>{e==="Sim"&&(this.form.reset(),this.laudoCid1=void 0,this.laudoCid2=void 0,this.laudoCid3=void 0,this.msgCarregamentoArquivo1=null,this.msgCarregamentoArquivo2=null,this.msgCarregamentoArquivo3=null,this.deletaArquivo("CID_1"),this.deletaArquivo("CID_2"),this.deletaArquivo("CID_3"))})}validaFormulario(){return this.formularioValido()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-informacoes-documentos-5"]],viewQuery:function(t,i){if(t&1&&z(gd,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:16,vars:2,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"row","justify-content-between","align-items-center","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[3,"btnClicked","disabled"],[1,"row","mt-3"],[1,"card-body","overflow-auto"],[1,"atencao-text"],[1,"text-danger","text-uppercase"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","pb-2","d-flex","align-items-baseline"],[1,"col-5"],["id","cid1","icon","bi bi-search","title","Pesquisar","iconId","searchIcon","label","N\xBA do 1\xBA CID:","placeholder","Ex: a55","helperText","Digite o c\xF3digo CID","ngDefaultControl","",3,"iconClick","formControl"],[1,"col-7"],["type","text","topLabel","Descri\xE7\xE3o:","ngDefaultControl","",3,"formControl","id"],[1,"px-1","text-danger"],[1,"row","pb-2"],["type","text","topLabel","CRM:","tpMask","numero","ngDefaultControl","","errorMessage","Obrigat\xF3rio",3,"formControl","tamMax","id"],[1,"col-4"],["id","uf1","label","UF*:","errorMessage","Obrigat\xF3rio","ngDefaultControl","",3,"formControl"],["id","cid2","icon","bi bi-search","title","Pesquisar","iconId","searchIcon","label","N\xBA do 2\xBA CID:","placeholder","Ex: a55","helperText","Digite o c\xF3digo CID","ngDefaultControl","",3,"iconClick","formControl"],["id","uf2","label","UF*:","errorMessage","Obrigat\xF3rio","ngDefaultControl","",3,"formControl"],["id","cid3","icon","bi bi-search","title","Pesquisar","iconId","searchIcon","label","N\xBA do 3\xBA CID:","placeholder","Ex: a55","helperText","Digite o c\xF3digo CID","ngDefaultControl","",3,"iconClick","formControl"],[1,"row","pb-3"],["id","uf3","label","UF*:","errorMessage","Obrigat\xF3rio","ngDefaultControl","",3,"formControl"],[1,"bi","bi-arrow-up-left"],["titulo","Carregue seu laudo m\xE9dico digitalizado:","label","Enviar arquivo","ngDefaultControl","","errorMessage","N\xE3o pode avan\xE7ar sem carregar seu laudo m\xE9dico!",3,"file","id","formControl","msgCarregamentoArquivo","nomeArquivoCarregado"],[1,"row"],[1,"col-auto"],[1,"form-check"],["type","radio","id","temCondicoesEspecificasSaude1",1,"form-check-input",3,"formControl","value"],["for","temCondicoesEspecificasSaude1",1,"form-check-label"],["type","radio","id","temCondicoesEspecificasSaude2",1,"form-check-input",3,"formControl","value"],["for","temCondicoesEspecificasSaude2",1,"form-check-label"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"div",1),s(3,"Condi\xE7\xF5es espec\xEDficas de sa\xFAde"),r(),g(4,xd,8,1,"div",2)(5,yd,20,4,"div",2),a(6,"div",3)(7,"div",4)(8,"app-custom-button-voltar",5),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(9,"div",6),s(10,"Etapa 7 de 8"),r(),a(11,"div",7)(12,"app-custom-button-proximo",8),E("btnClicked",function(){return i.avancarEtapa()}
91),r()()(),a(13,"div",9)(14,"div",7)(15,"app-custom-button-limpar",5),E("btnClicked",function(){return i.limpaFormulario()}),r()()()),t&2&&(l(4),C(i.mostraCondicoesEspecificasSaude?4:5),l(8),m("disabled",!i.temCondicoesEspecificasSaude.valid&&!i.dadoCIDModel))},dependencies:[V,Z,W,Ne,P,J,Y,X,he,le,ee,ue,ut,Fe,Ht],styles:[`.input-icon-container{position:relative;display:inline-block;width:100%}.search-icon{position:absolute;top:19px;right:0;transform:translateY(-50%);font-size:1.5rem;padding-right:20px;padding-left:10px} 92`],encapsulation:2})}};var Td=["dialogContainer"];function Id(o,n){if(o&1&&(a(0,"form",5)(1,"div",12)(2,"div",13),h(3,"img",14),r(),a(4,"div",15)(5,"label",16),s(6,"Mobilidade?"),r()(),a(7,"div",17)(8,"div",18),h(9,"input",19),a(10,"label",20),s(11," Sim "),r()()(),a(12,"div",17)(13,"div",18),h(14,"input",21),a(15,"label",22),s(16," N\xE3o "),r()()()(),a(17,"div",12)(18,"div",13),h(19,"img",23),r(),a(20,"div",24)(21,"label",25),s(22,"Auditiva?"),r()(),a(23,"div",17)(24,"div",18),h(25,"input",26),a(26,"label",27),s(27," Sim "),r()()(),a(28,"div",17)(29,"div",18),h(30,"input",28),a(31,"label",29),s(32," N\xE3o "),r()()()(),a(33,"div",12)(34,"div",13),h(35,"img",30),r(),a(36,"div",24)(37,"label",31),s(38,"Visual?"),r()(),a(39,"div",17)(40,"div",18),h(41,"input",32),a(42,"label",33),s(43," Sim "),r()()(),a(44,"div",17)(45,"div",18),h(46,"input",34),a(47,"label",35),s(48," N\xE3o "),r()()()(),a(49,"div",12)(50,"div",13),h(51,"img",36),r(),a(52,"div",24)(53,"label",37),s(54,"Mental?"),r()(),a(55,"div",17)(56,"div",18),h(57,"input",38),a(58,"label",39),s(59," Sim "),r()()(),a(60,"div",17)(61,"div",18),h(62,"input",40),a(63,"label",41),s(64," N\xE3o "),r()()()(),a(65,"div",12)(66,"div",13),h(67,"img",42),r(),a(68,"div",24)(69,"label",43),s(70,"Autismo?"),r()(),a(71,"div",17)(72,"div",18),h(73,"input",44),a(74,"label",45),s(75," Sim "),r()()(),a(76,"div",17)(77,"div",18),h(78,"input",46),a(79,"label",47),s(80," N\xE3o "),r()()()()()),o&2){let e=u();m("formGroup",e.form),l(9),m("value",1),l(5),m("value",0),l(11),m("value",1),l(5),m("value",0),l(11),m("value",1),l(5),m("value",0),l(11),m("value",1),l(5),m("value",0),l(11),m("value",1),l(5),m("value",0)}}var Go=class o extends oe{constructor(){super();this.informacoesDocumentosService=f(pe);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.informacaoDocumentoModel=this.dadosCompartilhadosService.getInformacoesDocumentos()}ngOnInit(){this.criaFormGroup()}criaFormGroup(){this.informacaoDocumentoModel?.mobilidade||this.informacaoDocumentoModel?.auditiva||this.informacaoDocumentoModel?.visual||this.informacaoDocumentoModel?.mental||this.informacaoDocumentoModel?.autismo?this.carregaFormGroup():this.criaNovoFormGroup()}criaNovoFormGroup(){this.form=this.formBuilder.group({mobilidade:new c(0),auditiva:new c(0),visual:new c(0),mental:new c(0),autismo:new c(0)})}carregaFormGroup(){this.form=this.formBuilder.group({mobilidade:new c(this.informacaoDocumentoModel?.mobilidade),auditiva:new c(this.informacaoDocumentoModel?.auditiva),visual:new c(this.informacaoDocumentoModel?.visual),mental:new c(this.informacaoDocumentoModel?.mental),autismo:new c(this.informacaoDocumentoModel?.autismo)})}criaInformacoesDocumentoModel(){this.informacaoDocumentoModel?this.preencheModel():this.criaNovaModel()}criaNovaModel(){this.informacaoDocumentoModel={uuidPrecadastro:this.protocoloModel?.uuid??null,mobilidade:this.form.controls.mobilidade.value,auditiva:this.form.controls.auditiva.value,visual:this.form.controls.visual.value,mental:this.form.controls.mental.value,autismo:this.form.controls.autismo.value},this.dadosCompartilhadosService.setInformacaoDocumento(this.informacaoDocumentoModel)}preencheModel(){this.informacaoDocumentoModel&&(this.informacaoDocumentoModel.uuidPrecadastro=this.protocoloModel?.uuid??null,this.informacaoDocumentoModel.mobilidade=this.form.controls.mobilidade.value,this.informacaoDocumentoModel.auditiva=this.form.controls.auditiva.value,this.informacaoDocumentoModel.visual=this.form.controls.visual.value,this.informacaoDocumentoModel.mental=this.form.controls.mental.value,this.informacaoDocumentoModel.autismo=this.form.controls.autismo.value),this.dadosCompartilhadosService.setInformacaoDocumento(this.informacaoDocumentoModel)}salvaInformacoesDocumentoModel(){this.informacaoDocumentoModel&&this.informacoesDocumentosService.gravaInformacoesDocumentos(this.informacaoDocumentoModel).subscribe({next:e=>{e=="OK"&&this.redirecionaProximaPagina()},error:e=>{let t=JSON.parse(e.error);this.messagesServiceModal.openModal(`Erro ao gravar informa\xE7\xF5es. 93 94`+t[0].message,this.viewContainerRef)}})}redirecionaProximaPagina(){this.router.navigate(["etapas/agendamento"],{skipLocationChange:!0})}avancarEtapa(){this.validaFormulario()&&(this.criaInformacoesDocumentoModel(),this.salvaInformacoesDocumentoModel())}
94voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.router.navigate(["etapas/informacoes-documentos-5"],{skipLocationChange:!0})}):this.router.navigate(["etapas/informacoes-documentos-5"],{skipLocationChange:!0})}limpaFormulario(){this.limparForm(this.viewContainerRef)}validaFormulario(){return this.formularioValido()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-informacoes-documentos-6"]],viewQuery:function(t,i){if(t&1&&z(Td,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:19,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body","overflow-auto"],[1,"card-text"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","justify-content-between","align-items-center","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"row","mt-3"],[1,"row","align-items-center","pb-2"],[1,"col-auto","pe-0"],["src","assets/mobilidade.png","alt","mobilidade"],[1,"col-3","align-items-center"],["for","mobilidade",1,"form-label","mb-0"],[1,"col-auto"],[1,"form-check"],["formControlName","mobilidade","type","radio","id","mobilidade1",1,"form-check-input",3,"value"],["for","mobilidade1",1,"form-check-label"],["formControlName","mobilidade","type","radio","id","mobilidade2",1,"form-check-input",3,"value"],["for","mobilidade2",1,"form-check-label"],["src","assets/auditiva.png","alt","auditiva"],[1,"col-3"],["for","auditiva",1,"form-label","mb-0"],["formControlName","auditiva","type","radio","id","auditiva1",1,"form-check-input",3,"value"],["for","auditiva1",1,"form-check-label"],["formControlName","auditiva","type","radio","id","auditiva2",1,"form-check-input",3,"value"],["for","auditiva2",1,"form-check-label"],["src","assets/visual.png","alt","visual"],["for","visual",1,"form-label","mb-0"],["formControlName","visual","type","radio","id","visual1",1,"form-check-input",3,"value"],["for","visual1",1,"form-check-label"],["formControlName","visual","type","radio","id","visual2",1,"form-check-input",3,"value"],["for","visual2",1,"form-check-label"],["src","assets/mental.png","alt","mental"],["for","mental",1,"form-label","mb-0"],["formControlName","mental","type","radio","id","mental1",1,"form-check-input",3,"value"],["for","mental1",1,"form-check-label"],["formControlName","mental","type","radio","id","mental2",1,"form-check-input",3,"value"],["for","mental2",1,"form-check-label"],["src","assets/autismo.png","alt","autismo"],["for","autismo",1,"form-label","mb-0"],["formControlName","autismo","type","radio","id","autismo1",1,"form-check-input",3,"value"],["for","autismo1",1,"form-check-label"],["formControlName","autismo","type","radio","id","autismo2",1,"form-check-input",3,"value"],["for","autismo2",1,"form-check-label"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"div",1),s(3,"Condi\xE7\xF5es espec\xEDficas de sa\xFAde"),r(),a(4,"div",2)(5,"div",3)(6,"p",4),s(7,"Voc\xEA deseja que a sua carteira de identidade contenha algum(ns) dos \xEDcones abaixo a respeito das suas defici\xEAncias/dificuldades permanentes?"),r(),g(8,Id,81,11,"form",5),r()(),a(9,"div",6)(10,"div",7)(11,"app-custom-button-voltar",8),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(12,"div",9),s(13,"Etapa 7 de 8"),r(),a(14,"div",10)(15,"app-custom-button-proximo",8),E("btnClicked",function(){return i.avancarEtapa()}),r()()(),a(16,"div",11)(17,"div",10)(18,"app-custom-button-limpar",8),E("btnClicked",function(){return i.limpaFormulario()}),r()()()),t&2&&(l(8),C(i.form?8:-1))},dependencies:[V,Z,W,Ne,P,J,X,Me,le,ee,ue],styles:[".svg-deficiencias[_ngcontent-%COMP%]{background-color:#467396}"]})}};var Si=()=>{let n=f(Q).getProtocolo();return f(pe).getDadoIdentidadeProfissional(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("Dados profissionais n\xE3o encontrados:",e),te(null))))};var na=()=>{let n=f(Q).getProtocolo();return f(pe).getDadoCID(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("Dados de CID n\xE3o encontrados:",e),te(null))))};var aa=()=>{let n=f(Q).getProtocolo();return f(pe).getInformacoesDocumentos(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("Informa\xE7\xF5es de documentos n\xE3o encontradas:",e),te(null))))};var xi=()=>{let n=f(Q).getProtocolo();return f(pe).getArquivo(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("Laudos n\xE3o encontrados:",e),te(null))))};var yi=()=>{let n=f(Q).getProtocolo();return f(pe).getMenor14(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("N\xE3o foi poss\xEDvel verificar se o cidad\xE3o \xE9 menor de 14 anos: ",e),te(null))))};var Lo=()=>{let n=f(Q).getProtocolo();return f(pe).getMenor16(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("N\xE3o foi poss\xEDvel verificar se o cidad\xE3o \xE9 menor de 16 anos: ",e),te(null))))};var Bo=()=>{let n=f(Q).getProtocolo();return f(pe).getMenor18(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("N\xE3o foi poss\xEDvel verificar se o cidad\xE3o \xE9 menor de 18 anos: ",e),te(null))))};var wd=["dialogContainer"];function Nd(o,n){o&1&&(a(0,"div",14)(1,"div",15)(2,"label",28),s(3,"T\xEDtulo de Eleitor:"),r()(),a(4,"div",17)(5,"div",18),h(6,"input",29),a(7,"label",30),s(8," Sim "),r()()(),a(9,"div",17)(10,"div",18),h(11,"input",31),a(12,"label",32),s(13," N\xE3o "),r()()()()),o&2&&(l(6),m("value",!0),l(5),m("value",!1))}function Fd(o,n){o&1&&(a(0,"div",14)(1,"div",15)(2,"label",33),s(3,"Certid\xE3o Militar:"),r()(),a(4,"div",17)(5,"div",18),h(6,"input",34),a(7,"label",35),s(8," Sim "),r()()(),a(9,"div",17)(10,"div",18),h(11,"input",36),a(12,"label",37),s(13," N\xE3o "),r()()()(),a(14,"div",14)(15,"div",15)(16,"label",38),s(17,"Habilita\xE7\xE3o (CNH):"),r()(),a(18,"div",17)(19,"div",18),h(20,"input",39),a(21,"label",40),s(22," Sim "),r()()(),a(23,"div",17)(24,"div",18),h(25,"input",41),a(26,"label",42),s(27," N\xE3o "),r()()()()),o&2&&(l(6),m("value",!0),l(5),m("value",!1),l(9),m("value",!0),l(5),m("value",!1))}function Od(o,n){o&1&&(a(0,"div",14)(1,"div",15)(2,"label",43),s(3,"Carteira de Trabalho (CTPS):"),r()(),a(4,"div",17)(5,"div",18),h(6,"input",44),a(7,"label",45),s(8," Sim "),r()()(),a(9,"div",17)(10,"div",18),h(11,"input",46),a(12,"label",47),s(13," N\xE3o "),r()()()()),o&2&&(l(6),m("value",!0),l(5),m("value",!1))}function Ad(o,n){o&1&&(a(0,"div",14)(1,"div",15)(2,"label",48),s(3,"Identidade Profissional:"),r()(),a(4,"div",17)(5,"div",18),h(6,"input",49),a(7,"label",50),s(8," Sim "),r()()(),a(9,"div",17)(10,"div",18),h(11,"input",51),a(12,"label",52),s(13," N\xE3o "),r()()()()),o&2&&(l(6),m("value",!0),l(5),m("value",!1))}function Rd(o,n){if(o&1&&(a(0,"form",9),g(1,Nd,14,2,"div",14),g(2,Fd,28,4),g(3,Od,14,2,"div",14),g(4,Ad,14,2,"div",14),a(5,"div",14)(6,"div",15)(7,"label",16),s(8,"Cart\xE3o Nacional de Sa\xFAde (SUS):"),r()(),a(9,"div",17)(10,"div",18),h(11,"input",19),a(12,"label",20),s(13," Sim "),r()()(),a(14,"div",17)(15,"div",18),h(16,"input",21),a(17,"label",22),s(18," N\xE3o "),r()()()(),a(19,"div",14)(20,"div",15)(21,"label",23),s(22,"Tipo sangu\xEDneo / Fator RH:"),r()(),a(23,"div",17)(24,"div",18),h(25,"input",24),a(26,"label",25),s(27," Sim "),r()()(),a(28,"div",17)(29,"div",18),h(30,"input",26),a(31,"label",27),s(32," N\xE3o "),r()()()()()),o&2){let e=u();m("formGroup",e.form),l(),C(e.statusMaioridade.ehMenor16?-1:1),l(),C(e.statusMaioridade.ehMenor18?-1:2),l(),C(e.statusMaioridade.ehMenor14?-1:3),l(),C(e.statusMaioridade.ehMenor18?-1:4),l(7),m("value",!0),l(5),m("value",!1),l(9),m("value",!0),l(5),m("value",!1)}}var qo=class o extends oe{constructor(){super();this.selecaoDocumentoModel=this.dadosCompartilhadosService.getSelecaoDocumento();this.statusMaioridade={ehMenor14:!1,ehMenor16:!1,ehMenor18:!1};this.informacaoDocumentoModel=this.activatedRoute.snapshot.data.informacoesDocumentos,this.dadoIdentidadeProfissionalModel=this.activatedRoute.snapshot.data.dadoIdentidadeProfissional,this.statusMaioridade.ehMenor14=this.activatedRoute.snapshot.data.menor14,this.statusMaioridade.ehMenor16=this.activatedRoute.snapshot.data.menor16,this.statusMaioridade.ehMenor18=this.activatedRoute.snapshot.data.menor18,this.informacaoDocumentoModel&&this.dadosCompartilhadosService.setInformacaoDocumento(this.informacaoDocumentoModel)}ngOnInit(){(this.informacaoDocumentoModel||this.dadoIdentidadeProfissionalModel&&this.dadoIdentidadeProfissionalModel.listaIdentidadeProfissional.length>0)&&!this.selecaoDocumentoModel?this.carregaFormGroup():this.selecaoDocumentoModel?this.carregaFormGroupSelecaoDocumentoModel():this.criaFormGroup()}criaFormGroup(){this.form=this.formBuilder.group({informarTituloEleitor:new c(!1),informarCertidaoMilitar:new c(!1),informarCNH:new c(!1),informarCarteiraTrabalho:new c(!1),informarIdentidadeProfissional:new c(!1),informarCartaoNacionalSaude:new c(!1),informarTipoSanguineoFatorRH:new c(!1)})}carregaFormGroup(){this.form=this.formBuilder.group({informarTituloEleitor:new c(!!this.informacaoDocumentoModel.tituloEleitor),informarCertidaoMilitar:new c(!!this.informacaoDocumentoModel.certidaoMilitar),informarCNH:new c(!!this.informacaoDocumentoModel.habilitacaoNumero),informarCarteiraTrabalho:new c(!!this.informacaoDocumentoModel.carteiraTrabalho),informarIdentidadeProfissional:new c(this.dadoIdentidadeProfissionalModel&&this.dadoIdentidadeProfissionalModel.listaIdentidadeProfissional.length>0),informarCartaoNacionalSaude:new c(!!this.informacaoDocumentoModel.cartaoNacionalSaude),informarTipoSanguineoFatorRH:new c(!!this.informacaoDocumentoModel.tipoSanguineo)})}carregaFormGroupSelecaoDocumentoModel(){this.form=this.formBuilder.group({informarTituloEleitor:new c(this.selecaoDocumentoModel?.informarTituloEleitor),informarCertidaoMilitar:new c(this.selecaoDocumentoModel?.informarCertidaoMilitar),informarCNH:new c(this.selecaoDocumentoModel?.informarCNH),informarCarteiraTrabalho:new c(this.selecaoDocumentoModel?.informarCarteiraTrabalho),informarIdentidadeProfissional:new c(this.selecaoDocumentoModel?.informarIdentidadeProfissional),informarCartaoNacionalSaude:new c(this.selecaoDocumentoModel?.informarCartaoNacionalSaude),informarTipoSanguineoFatorRH:new c(this.selecaoDocumentoModel?.informarTipoSanguineoFatorRH)})}criaSelecaoDocumentoModel(){this.selecaoDocumentoModel={informarTituloEleitor:this.form.controls.informarTituloEleitor.value,informarCertidaoMilitar:this.form.controls.informarCertidaoMilitar.value,informarCNH:this.form.controls.informarCNH.value,informarCarteiraTrabalho:this.form.controls.informarCarteiraTrabalho.value,informarIdentidadeProfissional:this.form.controls.informarIdentidadeProfissional.value,informarCartaoNacionalSaude:this.form.controls.informarCartaoNacionalSaude.value,informarTipoSanguineoFatorRH:this.form.controls.informarTipoSanguineoFatorRH.value},this.dadosCompartilhadosService.setSelecaoDocumento(this.selecaoDocumentoModel)}redirecionaProximaPagina(){this.selecaoDocumentoModel?.informarTituloEleitor||this.selecaoDocumentoModel?.informarCertidaoMilitar||this.selecaoDocumentoModel?.informarCNH?this.router.navigate(["etapas/informacoes-documentos-1"],{skipLocationChange:!0}):this.selecaoDocumentoModel?.informarCarteiraTrabalho?this.router.navigate(["etapas/informacoes-documentos-2"],{skipLocationChange:!0}):this.selecaoDocumentoModel?.informarIdentidadeProfissional?this.router.navigate(["etapas/informacoes-documentos-3"],{skipLocationChange:!0}):this.selecaoDocumentoModel?.informarCartaoNacionalSaude||this.selecaoDocumentoModel?.informarTipoSanguineoFatorRH?this.router.navigate(["etapas/informacoes-documentos-4"],{skipLocationChange:!0}):this.router.navigate(["etapas/informacoes-documentos-5"],{skipLocationChange:!0})}redirecionaEndereco(){this.router.navigate(["etapas/endereco"],{skipLocationChange:!0})}avancarEtapa(){this.criaSelecaoDocumentoModel(),this.redirecionaProximaPagina()}
94voltarEtapa(){this.verificaAlteracoesInputs()?this.messagesServiceModal.openModalConfirmation(this.MSG_DADOS_PENDENTES,this.viewContainerRef,e=>{e==="Sim"&&this.redirecionaEndereco()}):this.redirecionaEndereco()}limpaFormulario(){throw new Error("Method not implemented.")}validaFormulario(){throw new Error("Method not implemented.")}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-selecao-documentos"]],viewQuery:function(t,i){if(t&1&&z(wd,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[K],decls:26,vars:1,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body","overflow-auto"],[1,"atencao-text","text-center"],[1,"bi","bi-exclamation-triangle","text-danger"],[1,"text-danger","text-uppercase"],[1,"row","pb-3"],[1,"col"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","justify-content-between","align-items-center","mt-3"],[3,"btnClicked"],[1,"col","custom-etapa"],[1,"col","text-end"],[1,"row","align-items-center","pb-2"],[1,"col-6","align-items-center"],["for","informarCartaoNacionalSaude",1,"form-label","mb-0"],[1,"col-auto"],[1,"form-check"],["formControlName","informarCartaoNacionalSaude","type","radio","id","informarCartaoNacionalSaude1",1,"form-check-input",3,"value"],["for","informarCartaoNacionalSaude1",1,"form-check-label"],["formControlName","informarCartaoNacionalSaude","type","radio","id","informarCartaoNacionalSaude2",1,"form-check-input",3,"value"],["for","informarCartaoNacionalSaude2",1,"form-check-label"],["for","informarTipoSanguineoFatorRH",1,"form-label","mb-0"],["formControlName","informarTipoSanguineoFatorRH","type","radio","id","informarTipoSanguineoFatorRH1",1,"form-check-input",3,"value"],["for","informarTipoSanguineoFatorRH1",1,"form-check-label"],["formControlName","informarTipoSanguineoFatorRH","type","radio","id","informarTipoSanguineoFatorRH2",1,"form-check-input",3,"value"],["for","informarTipoSanguineoFatorRH2",1,"form-check-label"],["for","informarTituloEleitor",1,"form-label","mb-0"],["formControlName","informarTituloEleitor","type","radio","id","informarTituloEleitor1",1,"form-check-input",3,"value"],["for","informarTituloEleitor1",1,"form-check-label"],["formControlName","informarTituloEleitor","type","radio","id","informarTituloEleitor2",1,"form-check-input",3,"value"],["for","informarTituloEleitor2",1,"form-check-label"],["for","informarCertidaoMilitar",1,"form-label","mb-0"],["formControlName","informarCertidaoMilitar","type","radio","id","informarCertidaoMilitar1",1,"form-check-input",3,"value"],["for","informarCertidaoMilitar1",1,"form-check-label"],["formControlName","informarCertidaoMilitar","type","radio","id","informarCertidaoMilitar2",1,"form-check-input",3,"value"],["for","informarCertidaoMilitar2",1,"form-check-label"],["for","informarCNH",1,"form-label","mb-0"],["formControlName","informarCNH","type","radio","id","informarCNH1",1,"form-check-input",3,"value"],["for","informarCNH1",1,"form-check-label"],["formControlName","informarCNH","type","radio","id","informarCNH2",1,"form-check-input",3,"value"],["for","informarCNH2",1,"form-check-label"],["for","informarCarteiraTrabalho",1,"form-label","mb-0"],["formControlName","informarCarteiraTrabalho","type","radio","id","informarCarteiraTrabalho1",1,"form-check-input",3,"value"],["for","informarCarteiraTrabalho1",1,"form-check-label"],["formControlName","informarCarteiraTrabalho","type","radio","id","informarCarteiraTrabalho2",1,"form-check-input",3,"value"],["for","informarCarteiraTrabalho2",1,"form-check-label"],["for","informarIdentidadeProfissional",1,"form-label","mb-0"],["formControlName","informarIdentidadeProfissional","type","radio","id","informarIdentidadeProfissional1",1,"form-check-input",3,"value"],["for","informarIdentidadeProfissional1",1,"form-check-label"],["formControlName","informarIdentidadeProfissional","type","radio","id","informarIdentidadeProfissional2",1,"form-check-input",3,"value"],["for","informarIdentidadeProfissional2",1,"form-check-label"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"div",1),s(3,"Sele\xE7\xE3o de Documentos"),r(),a(4,"div",2)(5,"div",3)(6,"div",4),h(7,"i",5),a(8,"strong",6),s(9," Aten\xE7\xE3o:"),r(),s(10," Estes campos s\xE3o de preenchimento "),a(11,"strong",6)(12,"u"),s(13,"opcional"),r()()(),a(14,"div",7)(1
945,"div",8)(16,"strong"),s(17,"Voc\xEA gostaria de informar e/ou atualizar os seguintes documentos?"),r()()(),g(18,Rd,33,9,"form",9),r()(),a(19,"div",10)(20,"div",8)(21,"app-custom-button-voltar",11),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(22,"div",12),s(23,"Etapa 6 de 8"),r(),a(24,"div",13)(25,"app-custom-button-proximo",11),E("btnClicked",function(){return i.avancarEtapa()}),r()()()),t&2&&(l(18),C(i.form?18:-1))},dependencies:[V,Z,W,Ne,P,J,X,Me,le,ee],encapsulation:2})}};var pt=class o{transform(n){if(!n)return"";let[,e]=n.split(" "),[t,i]=e.split(":");return`${t}:${i}`}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275pipe=Vi({name:"formataHora",type:o,pure:!0})}};var Uo=class o{constructor(){this.usuarioService=f(It);this.dadosCompartilhadosService=f(Q);this.avaliacaoSatisfacaoService=f(pn);this.agendamentoModel=this.dadosCompartilhadosService.getResumo()?.agendamento}ngAfterViewInit(){this.avaliacaoSatisfacaoService.getAvaliacaoSatisfacao(this.dadosCompartilhadosService.getProtocolo()?.uuid).subscribe({next:n=>{n||this.openModalAvaliacaoSatisfacao()},error:n=>{console.error("Erro ao carregar avalia\xE7\xE3o de satisfa\xE7\xE3o: ",n.error)}})}openModalAvaliacaoSatisfacao(){let n=document.getElementById("avaliacaoSatisfacaoModal");n&&new un(n).show()}logout(){this.usuarioService.logOut()}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-sucesso"]],decls:57,vars:8,consts:[[1,"card","card-background-color","mb-3"],[1,"card-body"],[1,"row","pb-3"],[1,"card-text","text-center","fw-bold","fs-6"],[1,"d-flex","justify-content-start","mb-2"],[1,"d-flex","flex-column"],[1,"bi","bi-check-circle-fill","fs-2","text-success"],[1,"vertical-line"],[1,"p-2"],[1,"bi","bi-arrow-repeat","fs-2"],[1,"text-warning-custom"],[1,"row","text-center"],[1,"col"],["cssClass","btn-primary-custom","label","Sair",3,"btnClicked"]],template:function(e,t){e&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"p",3),s(4," Muito obrigado pelo seu encaminhamento atrav\xE9s do Identidade F\xE1cil RS! "),r()(),a(5,"div",2)(6,"p",3),s(7," Voc\xEA receber\xE1 um e-mail de confirma\xE7\xE3o dos seus dados no endere\xE7o cadastrado no Gov.br. "),r()(),a(8,"div",4)(9,"div",5)(10,"div"),h(11,"i",6),r(),h(12,"div",7),r(),a(13,"div",5)(14,"div",8),s(15,"Cadastro"),r()()(),a(16,"div",4)(17,"div",5)(18,"div"),h(19,"i",6),r(),h(20,"div",7),r(),a(21,"div",5)(22,"div",8),s(23,"Agendamento"),r()()(),a(24,"div",4)(25,"div",5)(26,"div"),h(27,"i",9),r(),h(28,"div",7),r(),a(29,"div",5)(30,"div",8),s(31,"Atendimento presencial - "),a(32,"b",10),s(33,"N\xE3o esque\xE7a de levar os documentos originais que foram anexados."),r()(),a(34,"div",8)(35,"small")(36,"strong"),s(37),r(),s(38),r()(),a(39,"div",8)(40,"small"),s(41," Dia: "),a(42,"strong"),s(43),Ie(44,"formataData"),Ie(45,"formataHora"),r()()()()(),a(46,"div",4)(47,"div",5)(48,"div"),h(49,"i",9),r()(),a(50,"div",5)(51,"div",8),s(52,"Retirada da carteira de identidade"),r()()(),a(53,"div",11)(54,"div",12)(55,"app-custom-button",13),E("btnClicked",function(){return t.logout()}),r()()()()(),h(56,"app-avaliacao-satisfacao")),e&2&&(l(37),M(t.agendamentoModel==null?null:t.agendamentoModel.nomeLocal),l(),L(" - ",t.agendamentoModel==null?null:t.agendamentoModel.enderecoLocal," "),l(5),Hi(" ",we(44,4,t.agendamentoModel==null?null:t.agendamentoModel.dataAgendamento)," \xE0s ",we(45,6,t.agendamentoModel==null?null:t.agendamentoModel.dataAgendamento)," "))},dependencies:[st,fn,Pt,pt],styles:[`.vertical-line{width:2px;height:100%;background-color:#a6abaf;align-self:center;min-height:2rem} 95`],encapsulation:2})}};var zt=class o{constructor(){this.http=f(Ee)}getTipoDocumetoOrigem(){let n=R.config.serverUrlRemota+"/dominio/tipo-documento-origem";return this.http.get(n)}getArquivo(n){let e=R.config.serverUrlRemota+"/pre-cadastro/arquivo/";return this.http.get(e+n)}gravaArquivo(n){let e=R.config.serverUrlRemota+"/pre-cadastro/arquivo";return this.http.post(e,n,{responseType:"text"})}getAnaliseQualidadeDocumento(n){let e=R.config.serverUrlRemota+"/pre-cadastro/analise-qualidade-documento/";return this.http.get(e+n)}deleteArquivo(n,e){let t=R.config.serverUrlRemota+"/pre-cadastro/arquivo/";return this.http.delete(t+n+"/"+e,{responseType:"text"})}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}};var kd=["dialogContainer"];function Pd(o,n){if(o&1){let e=A();a(0,"div",12)(1,"app-custom-input-file",17),E("file",function(i){y(e);let d=u(2);return T(d.carregaCertidao(i,d.Certidao.NASCIMENTO))}),r()()}if(o&2){let e=u(2);l(),m("id","certidaoNascimento")("formControl",e.form.controls.certidaoNascimento)("msgCarregamentoArquivo",e.msgCarregamentoCertidaoNascimentoSucesso)("nomeArquivoCarregado",e.nomeCertidaoNascimento)}}function Vd(o,n){if(o&1){let e=A();a(0,"div",7)(1,"div",8),E("click",function(){y(e);let i=u();return T(i.form.controls.opcao.setValue(1))}),a(2,"div",3)(3,"h4",9),s(4," Certid\xE3o de nascimento "),a(5,"i",10),E("click",function(i){return y(e),u().carregaImagem("assets/certidao_nascimento_atualizada.jpg"),T(i.stopPropagation())}),r()(),a(6,"ul",11)(7,"li"),s(8,"Voc\xEA \xE9 solteiro e nunca foi casado"),r(),a(9,"li"),s(10,"Ou possui apenas um contrato de uni\xE3o est\xE1vel"),r(),a(11,"li"),s(12,"Ou \xE9 menor de 16 anos"),r()()()(),g(13,Pd,2,4,"div",12),r()}if(o&2){let e=u();l(),ye("selected",e.form.value.opcao===1),l(12),C(e.form.value.opcao===1?13:-1)}}function Gd(o,n){if(o&1){let e=A();a(0,"div",12)(1,"app-custom-input-file",18),E("file",function(i){y(e);let d=u();return T(d.carregaCertidao(i,d.Certidao.CASAMENTO))}),r()()}if(o&2){let e=u();l(),m("id","certidaoCasamento")("formControl",e.form.controls.certidaoCasamento)("msgCarregamentoArquivo",e.msgCarregamentoCertidaoCasamentoSucesso)("nomeArquivoCarregado",e.nomeCertidaoCasamento)}}var ra=(e=>(e[e.NASCIMENTO=1]="NASCIMENTO",e[e.CASAMENTO=2]="CASAMENTO",e))(ra||{}),Ho=class o extends oe{constructor(){super();this.Certidao=ra;this.tipoDocumentoOrigemService=f(zt);this.protocoloService=f(wt);this.protocoloModel=this.dadosCompartilhadosService.getProtocolo();this.tipoDocumentoOrigemOpcoes=j([]);this.formData=new FormData;this.msgCarregamentoCertidaoNascimentoSucesso=null;this.msgCarregamentoCertidaoCasamentoSucesso=null;this.indCertidaoAnteriorCasamento=this.protocoloModel?.indCertidaoAnteriorCasamento==1;this.arquivo=this.activatedRoute.snapshot.data.arquivo,this.carregaNomeArquivo(),this.carregaTipoDocumentoOrigem(),this.criaFormGroup()}carregaNomeArquivo(){if(this.arquivo&&this.arquivo.listaDocumento.length>0){let e=this.arquivo.listaDocumento.find(t=>t.tipoDocumentoAnexo=="DOC_ORIGEM");e&&this.protocoloModel&&(this.protocoloModel.codDocumentoOrigem===1&&(this.nomeCertidaoNascimento=e.nomeArquivo),this.protocoloModel.codDocumentoOrigem===2&&(this.nomeCertidaoCasamento=e.nomeArquivo))}}carregaTipoDocumentoOrigem(){this.tipoDocumentoOrigemService.getTipoDocumetoOrigem().subscribe({next:e=>{e&&this.tipoDocumentoOrigemOpcoes.set(e)},error:e=>{this.messagesServiceModal.openModal(e.error[0].message??e.error,this.viewContainerRef)}})}criaFormGroup(){this.form=this.formBuilder.group({opcao:new c({value:"",disabled:this.indCertidaoAnteriorCasamento},D.required),certidaoNascimento:new c(null),certidaoCasamento:new c(null)}),this.atualizaValidatorFormOpcao(),this.carregaOpcao()}atualizaValidatorFormOpcao(){(!this.arquivo||this.arquivo?.listaDocumento.length==0)&&(this.form.controls.certidaoNascimento.addValidators(D.required),this.form.controls.certidaoNascimento.updateV
95alueAndValidity(),this.form.controls.certidaoCasamento.addValidators(D.required),this.form.controls.certidaoCasamento.updateValueAndValidity())}carregaOpcao(){this.protocoloModel?.codDocumentoOrigem?this.form.controls.opcao.setValue(this.protocoloModel?.codDocumentoOrigem):this.indCertidaoAnteriorCasamento&&this.form.controls.opcao.setValue(2)}carregaCertidao(e,t){this.form.controls.opcao.setValue(t);let i=null;if(e&&(i=e),i&&i.size>1e7){this.carregaMsgCarregamentoArquivo("Arquivo muito grande! Tamanho m\xE1ximo do arquivo: 10MB.",2),this.form.controls.certidaoNascimento.reset(),this.form.controls.certidaoCasamento.reset();return}i&&this.protocoloModel?.uuid&&(this.limpaFormData(),this.formData.append("uuid",this.protocoloModel.uuid),this.formData.append("file",i),this.formData.append("fileName",i.name),this.formData.append("tipo","DOC_ORIGEM"),this.formData.append("tipoDocOrigem",this.form.controls.opcao.value),this.atualizaValidators(t,i.name),this.salvaArquivo())}atualizaValidators(e,t){e==1&&(this.nomeCertidaoNascimento=t,this.form.controls.certidaoCasamento.clearValidators(),this.form.controls.certidaoCasamento.updateValueAndValidity()),e==2&&(this.nomeCertidaoCasamento=t,this.form.controls.certidaoNascimento.clearValidators(),this.form.controls.certidaoNascimento.updateValueAndValidity())}limpaFormData(){this.formData.delete("uuid"),this.formData.delete("file"),this.formData.delete("fileName"),this.formData.delete("tipo"),this.formData.delete("tipoDocOrigem")}salvaArquivo(){this.tipoDocumentoOrigemService.gravaArquivo(this.formData).subscribe({next:e=>{e&&this.carregaMsgCarregamentoArquivo("Arquivo carregado com sucesso. O documento original utilizado deve ser apresentado no atendimento.",1)},error:e=>{this.arquivo=null;try{let t=JSON.parse(e.error);this.tipoDocumentoOrigemService.getAnaliseQualidadeDocumento(this.dadosCompartilhadosService.getProtocolo()?.uuid).subscribe({next:i=>{this.messagesServiceModal.openModalAccordion(i,this.viewContainerRef,null,{titulo:"Erro ao carregar arquivo",tipoTitulo:2})},error:i=>{this.carregaMsgCarregamentoArquivo("Erro ao obter an\xE1lise de qualidade do documento: "+i.message,2)}}),this.carregaMsgCarregamentoArquivo("Erro ao carregar arquivo. "+t[0].message,2)}catch(t){this.messagesServiceModal.openModalAccordion("Erro ao carregar arquivo. "+t+". Formatos suportados: .jpg, .jpeg, .png e .pdf",this.viewContainerRef,null,{titulo:"Erro ao carregar arquivo",tipoTitulo:2}),this.tipoDocumentoOrigemService.getAnaliseQualidadeDocumento(this.dadosCompartilhadosService.getProtocolo()?.uuid).subscribe({next:i=>{this.messagesServiceModal.openModalAccordion(i,this.viewContainerRef,null,{titulo:"Erro ao carregar arquivo",tipoTitulo:2})},error:i=>{this.carregaMsgCarregamentoArquivo("Erro ao obter an\xE1lise de qualidade do documento: "+i.message,2)}}),this.carregaMsgCarregamentoArquivo("Erro ao carregar arquivo. "+t+". Formatos suportados: .jpg, .jpeg, .png e .pdf",2)}this.form.controls.certidaoNascimento.reset(),this.form.controls.certidaoCasamento.reset()}})}buscaDocOrigem(e){return this.tipoDocumentoOrigemOpcoes().find(t=>t.codigo==e)}redirecionaProximaPagina(){this.router.navigate(["etapas","dado-geral-1"],{skipLocationChange:!0})}gravaDocOrigemNoProtocolo(e){let t={uuid:this.dadosCompartilhadosService.getProtocolo()?.uuid,codDocumentoOrigem:e,plataforma:this.platform()};this.protocoloService.gravarProtocolo(t).subscribe({next:i=>{this.dadosCompartilhadosService.setProtocolo(i)},error:i=>{console.error(i),this.deletaArquivo("DOC_ORIGEM")}})}deletaArquivo(e){this.limpaFormData(),this.tipoDocumentoOrigemService.deleteArquivo(this.protocoloModel?.uuid,e).subscribe({error:t=>{let i=JSON.parse(t.error);console.error("Erro ao remover arquivo. "+i[0].message)}})}carregaMsgCarregamentoArquivo(e,t){(this.protocoloModel?.codDocumentoOrigem===1||this.form.controls.opcao.value===1)&&(this.msgCarregamentoCertidaoNascimentoSucesso={mensagem:e,tipoMensagem:t}),(this.protocoloModel?.codDocumentoOrigem===2||this.form.controls.opcao.value===2)&&(this.msgCarregamentoCertidaoCasamentoSucesso={mensagem:e,tipoMensagem:t})}carregaImagem(e){this.messagesServiceModal.openModal("",this.viewContainerRef,e)}atualizaValidatorsUploadCertidao(){this.form.controls.opcao.value&&(this.form.controls.certidaoNascimento.value&&(this.form.controls.certidaoCasamento.clearValidators(),this.form.controls.certidaoCasamento.updateV
95alueAndValidity(),this.msgCarregamentoCertidaoCasamentoSucesso={mensagem:null,tipoMensagem:null}),this.form.controls.certidaoCasamento.value&&(this.form.controls.certidaoNascimento.clearValidators(),this.form.controls.certidaoNascimento.updateValueAndValidity(),this.msgCarregamentoCertidaoNascimentoSucesso={mensagem:null,tipoMensagem:null}))}avancarEtapa(){if(this.atualizaValidatorsUploadCertidao(),!this.validaFormulario()||this.msgCarregamentoCertidaoNascimentoSucesso?.tipoMensagem==2||this.msgCarregamentoCertidaoCasamentoSucesso?.tipoMensagem==2)return;let e=this.form.controls.opcao.value;this.gravaDocOrigemNoProtocolo(e),this.dadosCompartilhadosService.setTipoDocumentoOrigem(this.buscaDocOrigem(e)),this.redirecionaProximaPagina()}voltarEtapa(){this.router.navigate(["etapas","tem-pre-cadastro"],{skipLocationChange:!0})}limpaFormulario(){}validaFormulario(){return this.formularioValido()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-informar-documento-origem"]],viewQuery:function(t,i){if(t&1&&z(kd,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[Re([Ke]),K],decls:34,vars:6,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body"],[3,"formGroup"],[1,"card-text"],[1,"row","justify-content-center","pb-1"],[1,"col-md-6","mb-4"],[1,"card","card-select-certidao","shadow-lg",3,"click"],[1,"card-title"],[1,"bi","bi-info-circle-fill","fs-x-large",3,"click"],[1,"text-start"],[1,"row","mt-4"],[1,"col","text-start"],[3,"btnClicked"],[1,"col","text-end"],[3,"btnClicked","disabled"],["formatosSuportadosMsg","Carregue sua certid\xE3o nascimento*: (arquivos .jpg, .pdf ou .png)","label","Enviar arquivo","ngDefaultControl","","errorMessage","N\xE3o \xE9 poss\xEDvel avan\xE7ar sem carregar sua certid\xE3o!",3,"file","id","formControl","msgCarregamentoArquivo","nomeArquivoCarregado"],["formatosSuportadosMsg","Carregue sua certid\xE3o de casamento*: (arquivos .jpg, .pdf ou .png)","label","Enviar arquivo","ngDefaultControl","","errorMessage","N\xE3o \xE9 poss\xEDvel avan\xE7ar sem carregar sua certid\xE3o!",3,"file","id","formControl","msgCarregamentoArquivo","nomeArquivoCarregado"]],template:function(t,i){if(t&1){let d=A();h(0,"div",null,0),a(2,"nav",1)(3,"span"),s(4," Informe a certid\xE3o "),r()(),a(5,"div",2)(6,"div",3)(7,"form",4)(8,"p",5),s(9," Qual ser\xE1 a "),a(10,"strong"),s(11,"certid\xE3o"),r(),s(12," (o documento que voc\xEA utilizar\xE1 para dar entrada no seu pedido)? "),r(),a(13,"div",6),g(14,Vd,14,3,"div",7),a(15,"div",7)(16,"div",8),E("click",function(){return i.form.controls.opcao.setValue(2)}),a(17,"div",3)(18,"h4",9),s(19," Certid\xE3o de casamento "),a(20,"i",10),E("click",function(_){return y(d),i.carregaImagem("assets/certidao_casamento.png"),T(_.stopPropagation())}),r()(),a(21,"ul",11)(22,"li"),s(23,"Voc\xEA \xE9/j\xE1 foi casado"),r(),a(24,"li"),s(25,"Ou \xE9 vi\xFAvo ou divorciado"),r(),a(26,"li"),s(27," Ou possui uni\xE3o est\xE1vel averbada na certid\xE3o de casamento "),r()()()(),g(28,Gd,2,4,"div",12),r()()()()(),a(29,"div",12)(30,"div",13)(31,"app-custom-button-voltar",14),E("btnClicked",function(){return i.voltarEtapa()}),r()(),a(32,"div",15)(33,"app-custom-button-proximo",16),E("btnClicked",function(){return i.avancarEtapa()}),r()()()}t&2&&(l(7),m("formGroup",i.form),l(7),C(i.indCertidaoAnteriorCasamento?-1:14),l(2),ye("selected",i.form.value.opcao===2),l(12),C(i.form.value.opcao===2||i.indCertidaoAnteriorCasamento?28:-1),l(5),m("disabled",i.form.invalid))},dependencies:[V,Z,W,P,J,Y,X,ee,le,ut],styles:["[_nghost-%COMP%]{width:80%}.card-select-certidao[_ngcontent-%COMP%]{cursor:pointer;transition:box-shadow .2s}.card-select-certidao.selected[_ngcontent-%COMP%]{box-shadow:0 0 0 2px #0056b3;border:2px solid #0056b3}.text-start[_ngcontent-%COMP%]{margin-bottom:0!important}"]})}};var la=()=>{let n=f(Q).getProtocolo();return f(zt).getArquivo(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("Documentos n\xE3o encontrados:",e),te(null))))};var Ld=["dialogContainer"];function Bd(o,n){o&1&&(a(0,"label",16),s(1," N\xE3o, \xE9 minha primeira emiss\xE3o no RS "),r())}function qd(o,n){o&1&&(a(0,"label",16),s(1," N\xE3o "),r())}function Ud(o,n){if(o&1&&(a(0,"label",10),s(1,"Voc\xEA tem Carteira de Identidade (RG) emitida no estado do Rio Grande do Sul? "),r(),a(2,"div",8)(3,"div",11)(4,"div",12),h(5,"input",13),a(6,"label",14),s(7," Sim "),r()()(),a(8,"div",11)(9,"div",12),h(10,"input",15),g(11,Bd,2,0,"label",16)(12,qd,2,0,"label",16),r()()()),o&2){let e=u(2);l(5),m("value",1),l(5),m("value",0),l(),C(e.primeiraViaHabilitada?11:12)}}function Hd(o,n){if(o&1){let e=A();a(0,"div",8)(1,"label",17),s(2,"Informe o seu RG no campo abaixo: "),a(3,"span",18)(4,"i",19),E("click",function(){y(e);let i=u(2);return T(i.mostraRG())}),r()()(),h(5,"app-custom-input",20),r()}if(o&2){let e=u(2);l(5),m("formControl",e.form.controls.rgCidadao)("id","rgCidadao")}}
95function jd(o,n){if(o&1){let e=A();a(0,"div",9)(1,"div",21)(2,"div",22)(3,"strong"),h(4,"i",23),s(5," N\xE3o \xE9 poss\xEDvel o encaminhamento atrav\xE9s do Identidade F\xE1cil RS para o cidad\xE3o que n\xE3o possui Carteira de Identidade (RG) no estado. Solicite agendamento presencial. "),r()()(),a(6,"div",24)(7,"div",25)(8,"app-custom-button",26),E("btnClicked",function(){y(e);let i=u(2);return T(i.redirecionaParaAgendamentoPresencial())}),r()()()()}}function $d(o,n){if(o&1&&(a(0,"form",4),g(1,Ud,13,3),g(2,Hd,6,2,"div",8),g(3,jd,9,0,"div",9),r()),o&2){let e=u();m("formGroup",e.form),l(),C(e.dadosCompartilhadosService.getPossuiCIN()?-1:1),l(),C(e.form.controls.possuiRG.value===1?2:-1),l(),C(e.form.controls.possuiRG.value===0&&!e.primeiraViaHabilitada?3:-1)}}var jo=class o extends oe{constructor(){super();this.usuarioService=f(It);this.cidadaoService=f(nn);this.protocoloService=f(wt);this.logoffMsgCustomService=f(an);this.parametroService=f(on);this.contadorTentativas=4;this.primeiraViaHabilitada=!1;this.MENSAGEM_INTERDITADO="Conforme os termos de uso, n\xE3o \xE9 poss\xEDvel o encaminhamento da nova Carteira de Identidade atrav\xE9s do Identidade F\xE1cil RS para pessoa interditada judicialmente.";this.MENSAGEM_NATURALIZADO="Conforme os termos de uso, n\xE3o \xE9 poss\xEDvel o encaminhamento da nova Carteira de Identidade atrav\xE9s do Identidade F\xE1cil RS para pessoa naturalizada."}ngOnInit(){return _e(this,null,function*(){this.consultaParametroPrimeiraViaHabilitada(),this.dadosCompartilhadosService.getPossuiCIN()?this.criaFormgroupTemCIN():this.criaFormgroupNaoTemCIN()})}criaFormgroupTemCIN(){this.form=this.formBuilder.group({possuiRG:new c(null),rgCidadao:new c(null)}),this.verificaPossuiRG()}criaFormgroupNaoTemCIN(){this.form=this.formBuilder.group({possuiRG:new c(null),rgCidadao:new c(null,[D.pattern(/^\d{10}$/),D.required])}),this.verificaPossuiRG()}verificaPossuiRG(){this.form.controls.possuiRG.valueChanges.subscribe(e=>{e===1&&(this.form.controls.rgCidadao.setValidators([D.required]),this.form.controls.rgCidadao.updateV
95alueAndValidity()),e===0&&(this.form.controls.rgCidadao.setValidators([]),this.form.controls.rgCidadao.updateValueAndValidity())})}consultaRgCidadao(e,t){return _e(this,null,function*(){let i=yield this.cidadaoService.getRG(e);if(i.data){let d=i.data;this.dadosCompartilhadosService.setCidadao(d),this.processaRGCidadao(d,t)}else if(i.error&&i.error instanceof tn){let d=i.error;this.processaRGErro(d)}})}processaRGCidadao(e,t){if(e){if(e.interdicao){this.logoffMsgCustomService.setMensagem(this.MENSAGEM_INTERDITADO),this.redirecionaParaLogoff();return}if(e.naturalizado){this.logoffMsgCustomService.setMensagem(this.MENSAGEM_NATURALIZADO),this.redirecionaParaLogoff();return}this.gravaProtocolo(t)}}processaRGErro(e){this.contadorTentativas--,e.status==404?this.messagesServiceModal.openModal(`<p> RG informado n\xE3o encontrado no RS.<br> 96 Por favor, verifique o n\xFAmero para continuar.</p> 97 <p>Voc\xEA tem 98 <span class="badge rounded-pill bg-primary fs-6"> 99 ${this.contadorTentativas} 100 </span> 101 tentativas para informar o n\xFAmero do RG. 102 </p>`,this.viewContainerRef):e.status==400&&this.messagesServiceModal.openModal(`<p>N\xFAmero inv\xE1lido.<br> Informe novamente.</p> 103 <p>Voc\xEA tem 104 <span class="badge rounded-pill bg-primary fs-6"> 105 ${this.contadorTentativas} 106 </span> 107 tentativas para informar o n\xFAmero do RG. 108 </p>`,this.viewContainerRef)}mostraRG(){this.messagesServiceModal.openModal("",this.viewContainerRef,"assets/rg_numero.jpg")}redirecionaInformarDocumentoOrigem(){this.router.navigate(["etapas","informar-documento-origem"],{skipLocationChange:!0})}redirecionaParaLogoff(){this.router.navigate(["logoff-agendamento"],{skipLocationChange:!0})}redirecionaParaAgendamentoPresencial(){this.router.navigate(["agendamento-presencial"],{skipLocationChange:!0})}gravarDados(e){return _e(this,null,function*(){this.form.controls.rgCidadao.value&&this.form.controls.possuiRG.value===1?yield this.consultaRgCidadao(this.form.controls.rgCidadao.value,e):this.gravaProtocolo(e)})}gravaProtocolo(e){let t;this.form.controls.rgCidadao.value?t={txtCpf:e,txtRG:this.form.controls.rgCidadao.value,indFluxo:0,indPrimeiraCIN:1,plataforma:this.platform()}:this.dadosCompartilhadosService.getPossuiCIN()?t={txtCpf:e,indFluxo:0,indPrimeiraCIN:0,plataforma:this.platform()}:t={txtCpf:e,indFluxo:2,indPrimeiraCIN:1,plataforma:this.platform()},this.protocoloService.gravarProtocolo(t).subscribe({next:i=>{this.dadosCompartilhadosService.setProtocolo(i),this.redirecionaInformarDocumentoOrigem()},error:i=>{let d=JSON.parse(i.error);this.messagesServiceModal.openModal(`Erro ao gravar o protocolo. 109 110`+d[0].message,this.viewContainerRef)}})}consultaParametroPrimeiraViaHabilitada(){this.parametroService.getParametroSistema("PRIMEIRA_VIA_HABILITADA").subscribe({next:e=>{e&&(this.primeiraViaHabilitada=e.valorParametro=="1")},error:e=>{this.messagesServiceModal.openModal(`N\xE3o foi poss\xEDvel carregar o par\xE2metro PRIMEIRA_VIA_HABILITADA. Tente novamente mais tarde. 111 112`+e.error,this.viewContainerRef)}})}habilitaBotaoProximo(){let e=this.form.controls.possuiRG.value,t=this.dadosCompartilhadosService.getPossuiCIN();return e===0&&!this.primeiraViaHabilitada||e==null&&!t}avancarEtapa(){return _e(this,null,function*(){if(this.validaFormulario()){if(this.contadorTentativas===1){this.redirecionaParaLogoff();return}this.gravarDados(this.usuarioService.cpf())}})}voltarEtapa(){throw new Error("Method not implemented.")}limpaFormulario(){throw new Error("Method not implemented.")}validaFormulario(){return this.formularioValido()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-informar-rg"]],viewQuery:function(t,i){if(t&1&&z(Ld,5,$),t&2){let d;U(d=H())&&(i.viewContainerRef=d.first)}},features:[Re([Ke]),K],decls:13,vars:5,consts:[["dialogContainer",""],[1,"navbar","titulo-navegacao"],[1,"card","card-background-color"],[1,"card-body"],["novalidate","",1,"needs-validation","pt-3",3,"formGroup"],[1,"row","justify-content-between","mt-3"],[1,"col","text-end"],[3,"btnClicked","disabled"],[1,"row","pb-2"],[1,"row","text-bg-light","justify-content-center","box-shadow","rounded","p-3","mb-1"],["for","possuiRG",1,"form-label"],[1,"col-auto"],[1,"form-check"],["formControlName","possuiRG","type","radio","id","possuiRG1",1,"form-check-input",3,"value"],["for","possuiRG1",1,"form-check-label"],["formControlName","possuiRG","type","radio","id","possuiRG2",1,"form-check-input",3,"value"],["for","possuiRG2",1,"form-check-label"],["for","rgCidadao",1,"form-label"],[1,"info-icon"],[1,"bi","bi-info-circle-fill","fs-x-large",3,"click"],["type","text","placeholder","0000000000","tpMask","numero","tamMax","10","ngDefaultControl","","errorMessage","RG deve conter 10 caracteres",3,"formControl","id"],[1,"row","text-danger","p-0"],[1,"col","text-danger"],[1,"bi","bi-exclamation-circle-fill"],[1,"row","text-center","pt-2","p-0"],[1,"col"],["label","Agendamento Presencial","cssClass","btn-primary-custom mb-2 me-2","icon","bi-box-arrow-up-right",3,"btnClicked"]],template:function(t,i){t&1&&(h(0,"div",null,0),a(2,"nav",1)(3,"span"),s(4),Ie(5,"cutString"),r()(),a(6,"div",2)(7,"div",3),h(8,"app-lista-cidades-disponiveis"),g(9,$d,4,4,"form",4),r()(),a(10,"div",5)(11,"div",6)(12,"app-custom-button-proximo",7),E("btnClicked",function(){return i.avancarEtapa()}),r()()()),t&2&&(l(4),L(" Bem-vindo(a), ",we(5,3,i.usuarioService.n
112ome())),l(5),C(i.form?9:-1),l(3),m("disabled",i.form&&i.habilitaBotaoProximo()))},dependencies:[he,V,Z,W,Ne,P,J,Y,X,Me,ee,st,hn,vn],encapsulation:2})}};var Qt=class o{constructor(){this.http=f(Ee)}getResumo(n){let e=R.config.serverUrlRemota+"/pre-cadastro/resumo/";return this.http.get(e+n)}enviaEmail(n){let e=R.config.serverUrlRemota+"/pre-cadastro/resumo-notificacao/";return this.http.get(e+n,{responseType:"text"})}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=G({token:o,factory:o.\u0275fac,providedIn:"root"})}};var sa=()=>{let n=f(Q).getProtocolo();return f(Qt).getResumo(n?.uuid).pipe(k(),B(e=>e||null),re(e=>(console.info("N\xE3o foi poss\xEDvel buscar o resumo:",e),te(null))))};var $o=class o{constructor(){this.dadoDeclaradoModel=b()}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-dado-declarado-resumo"]],inputs:{dadoDeclaradoModel:[1,"dadoDeclaradoModel"]},decls:20,vars:4,consts:[[1,"row","pb-2"],[1,"col"]],template:function(e,t){if(e&1&&(v(0,"div",0)(1,"div",1),s(2," Grau de instru\xE7\xE3o: "),v(3,"strong"),s(4),S()()(),v(5,"div",0)(6,"div",1),s(7," Cor dos olhos: "),v(8,"strong"),s(9),S()()(),v(10,"div",0)(11,"div",1),s(12," Cor da pele (c\xFAtis): "),v(13,"strong"),s(14),S()()(),v(15,"div",0)(16,"div",1),s(17," Altura (em cent\xEDmetros): "),v(18,"strong"),s(19),S()()()),e&2){let i,d,p,_;l(4),M(((i=t.dadoDeclaradoModel())==null?null:i.dsTipoInstrucao)??"N\xE3o informado"),l(5),M(((d=t.dadoDeclaradoModel())==null?null:d.descricaoCorOlhos)??"N\xE3o informado"),l(5),M(((p=t.dadoDeclaradoModel())==null?null:p.descricaoCorCutis)??"N\xE3o informado"),l(5),M((_=t.dadoDeclaradoModel())!=null&&_.nroAltura&&((_=t.dadoDeclaradoModel())==null?null:_.nroAltura)!=""?(_=t.dadoDeclaradoModel())==null?null:_.nroAltura:"N\xE3o informado")}},encapsulation:2})}};function zd(o,n){if(o&1&&(v(0,"div",0)(1,"div",1),s(2," RG: "),v(3,"strong"),s(4),S()()()),o&2){let e,t=u();l(4),M((e=t.protocolo())==null?null:e.txtRG)}}function Qd(o,n){if(o&1&&(v(0,"div",0)(1,"div",1),s(2," Nome social: "),v(3,"strong"),s(4),S()()(),v(5,"div",0)(6,"div",1),s(7," Deseja nome social na nova Carteira de Identidade? "),v(8,"strong"),s(9),S()()()),o&2){let e,t,i=u();l(4),M((e=i.dadoGeralModel())==null?null:e.nomeSocial),l(5),M((t=i.dadoGeralModel())!=null&&t.nomeSocialImpresso&&((t=i.dadoGeralModel())==null?null:t.nomeSocialImpresso)===1?"Sim":"N\xE3o")}}function Wd(o,n){if(o&1&&(v(0,"div",2)(1,"div",3)(2,"div",1)(3,"strong"),s(4,"Ocorr\xEAncia policial"),S()()(),v(5,"div",3)(6,"div",4),s(7," N\xBA do \xF3rg\xE3o: "),v(8,"strong"),s(9),S()(),v(10,"div",5),s(11," Ano: "),v(12,"strong"),s(13),S()()(),v(14,"div",3)(15,"div",1),s(16," N\xBA boletim de ocorr\xEAncia: "),v(17,"strong"),s(18),S()()()()),o&2){let e,t,i,d=u(2);l(9),M(((e=d.dadoGeralModel())==null?null:e.ocorrenciaOrgao)??"N\xE3o informado"),l(4),M(((t=d.dadoGeralModel())==null?null:t.ocorrenciaAno)??"N\xE3o informado"),l(5),M(((i=d.dadoGeralModel())==null?null:i.ocorrenciaNumero)??"N\xE3o informado")}}function Yd(o,n){if(o&1&&(v(0,"div",0)(1,"div",1),s(2," A sua carteira de identidade anterior foi roubada? "),v(3,"strong"),s(4),S()()(),g(5,Wd,19,3,"div",2)),o&2){let e,t,i=u();l(4),M(((e=i.dadoGeralModel())==null?null:e.tipoMotivoEncaminhamento)===2?"Sim":"N\xE3o"),l(),C((t=i.dadoGeralModel())!=null&&t.ocorrenciaNumero?5:-1)}}var zo=class o{constructor(){this.protocolo=b();this.dadoGeralModel=b()}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-dado-geral-resumo"]],inputs:{protocolo:[1,"protocolo"],dadoGeralModel:[1,"dadoGeralModel"]},decls:39,vars:12,consts:[[1,"row","pb-2"],[1,"col"],[1,"row","text-bg-light","box-shadow","rounded","py-3"],[1,"row","primary-color"],[1,"col-7"],[1,"col-5"]],template:function(e,t){if(e&1&&(v(0,"div",0)(1,"div",1),s(2," CPF: "),v(3,"strong"),s(4),Ie(5,"formataCPF"),S()()(),g(6,zd,5,1,"div",0),v(7,"div",0)(8,"div",1),s(9," Nome completo: "),v(10,"strong"),s(11),S()()(),v(12,"div",0)(13,"div",1),s(14," Tem nome social? "),v(15,"strong"),s(16),S()()(),g(17,Qd,10,2),v(18,"div",0)(19,"div",1),s(20," Data de nascimento: "),v(21,"strong"),s(22),S()()(),v(23,"div",0)(24,"div",1),s(25," Sexo: "),v(26,"strong"),s(27),S()()(),v(28,"div",0)(29,"div",1),s(30," Doador de \xF3rg\xE3os? "),v(31,"strong"),s(32),S()()(),v(33,"div",0)(34,"div",1),s(35," Estado civil: "),v(36,"strong"),s(37),S()()(),g(38,Yd,6,2)),e&2){let i,d,p,_,I,w,ie,ce,N,fe;l(4),L("",we(5,10,((i=t.protocolo())==null?null:i.txtCpf)??"N\xE3o informado")," "),l(2),C((d=t.protocolo())!=null&&d.txtRG?6:-1),l(5),M(((p=t.dadoGeralModel())==null?null:p.nomeCompleto)??"N\xE3o informado"),l(5),M((_=t.dadoGeralModel())!=null&&_.nomeSocial&&((_=t.dadoGeralModel())==null?null:_.nomeSocial)!=""?"Sim":"N\xE3o"),l(),C((I=t.dadoGeralModel())!=null&&I.nomeSocial&&((I=t.dadoGeralModel())==null?null:I.nomeSocial)!=""?17:-1),l(5),M((w=t.dadoGeralModel())!=null&&w.dataNascimento?(w=t.dadoGeralModel())==null?null:w.dataNascimento.slice(0,10).replaceAll("-","/"):"N\xE3o informado"),l(5),M(((ie=t.dadoGeralModel())==null?null:ie.descricaoTipoSexo)??"N\xE3o informado"),l(5),M(((ce=t.dadoGeralModel())==null?null:ce.doadorOrgaos)===1?"Sim":"N\xE3o"),l(5),M(((N=t.dadoGeralModel())==null?null:N.descricaoEstadoCivil)??"N\xE3o informado"),l(),C(((fe=t.dadoGeralModel())==null?null:fe.tipoServico)===2?38:-1)}},dependencies:[uo],encapsulation:2})}};function Kd(o,n){if(o&1&&(v(0,"div",0)(1,"div",1),s(2," Matr\xEDcula da uni\xE3o est\xE1vel: "),v(3,"strong"),s(4),S()()()),o&2){let e=u(2);l(4),M(e.matriculaUnicaoEstavelCertidaoFormatada&&e.matriculaUnicaoEstavelCertidaoFormatada!=""?e.matriculaUnicaoEstavelCertidaoFormatada:"N\xE3o informado")}}function Jd(o,n){if(o&1&&(v(0,"div",0)(1,"div",1),s(2," Tem uni\xE3o est\xE1vel registrada em cart\xF3rio e ela est\xE1 registrada n
112a certid\xE3o informada? "),v(3,"strong"),s(4),S()()(),g(5,Kd,5,1,"div",0)),o&2){let e,t,i=u();l(4),M(((e=i.documentoOrigemModel())==null?null:e.indUniaoEstavel)===1?"Sim":"N\xE3o"),l(),C(((t=i.documentoOrigemModel())==null?null:t.indUniaoEstavel)===1?5:-1)}}function Zd(o,n){o&1&&(v(0,"div",0)(1,"div",1)(2,"strong"),s(3,"Div\xF3rcio"),S()()())}function Xd(o,n){o&1&&(v(0,"div",0)(1,"div",1)(2,"strong"),s(3,"Separa\xE7\xE3o"),S()()())}function ec(o,n){if(o&1&&(v(0,"div",0)(1,"div",1),s(2,"Quais?"),S()(),g(3,Zd,4,0,"div",0),g(4,Xd,4,0,"div",0)),o&2){let e,t,i=u(2);l(3),C(((e=i.documentoOrigemModel())==null?null:e.indAverbacaoDivorcio)==1?3:-1),l(),C(((t=i.documentoOrigemModel())==null?null:t.indAverbacaoSeparacao)==1?4:-1)}}function tc(o,n){if(o&1&&(v(0,"div",0)(1,"div",1),s(2," Nome completo do(a) respons\xE1vel legal: "),v(3,"strong"),s(4),S()()()),o&2){let e,t=u(2);l(4),M((e=t.documentoOrigemModel())!=null&&e.txtResponsavelLegalNome&&((e=t.documentoOrigemModel())==null?null:e.txtResponsavelLegalNome)!=""?(e=t.documentoOrigemModel())==null?null:e.txtResponsavelLegalNome:"N\xE3o informado")}}function oc(o,n){if(o&1&&(v(0,"div",0)(1,"div",1),s(2," Sua certid\xE3o possui averba\xE7\xF5es? "),v(3,"strong"),s(4),S()()(),g(5,ec,5,2),g(6,tc,5,1,"div",0)),o&2){let e,t,i,d=u();l(4),M(((e=d.documentoOrigemModel())==null?null:e.indAverbacaoDivorcio)==1||((e=d.documentoOrigemModel())==null?null:e.indAverbacaoSeparacao)==1?"Sim":"N\xE3o"),l(),C(((t=d.documentoOrigemModel())==null?null:t.indAverbacaoDivorcio)==1||((t=d.documentoOrigemModel())==null?null:t.indAverbacaoSeparacao)==1?5:-1),l(),C((i=d.documentoOrigemModel())!=null&&i.txtResponsavelLegalNome&&((i=d.documentoOrigemModel())==null?null:i.txtResponsavelLegalNome)!=""?6:-1)}}function ic(o,n){if(o&1&&(v(0,"div",0)(1,"div",1),s(2," Nome completo do(a) respons\xE1vel legal: "),v(3,"strong"),s(4),S()()(),v(5,"div",0)(6,"div",1),s(7," CPF do(a) respons\xE1vel legal: "),v(8,"strong"),s(9),Ie(10,"formataCPF"),S()()(),v(11,"div",0)(12,"div",1),s(13," RG do(a) respons\xE1vel legal: "),v(14,"strong"),s(15),S()()(),v(16,"div",0)(17,"div",1),s(18," Tipo de respons\xE1vel legal: "),v(19,"strong"),s(20),S()()()),o&2){let e,t,i,d,p=u();l(4),M((e=p.documentoOrigemModel())!=null&&e.txtResponsavelLegalNome&&((e=p.documentoOrigemModel())==null?null:e.txtResponsavelLegalNome)!=""?(e=p.documentoOrigemModel())==null?null:e.txtResponsavelLegalNome:"N\xE3o informado"),l(5),M((t=p.documentoOrigemModel())!=null&&t.txtResponsavelLegalCPF&&((t=p.documentoOrigemModel())==null?null:t.txtResponsavelLegalCPF)!=""?(t=p.documentoOrigemModel())==null?null:t.txtResponsavelLegalCPF:we(10,4,"N\xE3o informado")),l(6),M((i=p.documentoOrigemModel())!=null&&i.txtResponsavelLegalRG&&((i=p.documentoOrigemModel())==null?null:i.txtResponsavelLegalRG)!=""?(i=p.documentoOrigemModel())==null?null:i.txtResponsavelLegalRG:"N\xE3o informado"),l(5),M((d=p.documentoOrigemModel())!=null&&d.txtDSTipoResponsavelLegal&&((d=p.documentoOrigemModel())==null?null:d.txtDSTipoResponsavelLegal)!=""?(d=p.documentoOrigemModel())==null?null:d.txtDSTipoResponsavelLegal:"N\xE3o informado")}}function nc(o,n){if(o&1&&(v(0,"div",0)(1,"div",1),s(2," Estado de nascimento: "),v(3,"strong"),s(4),S()()(),v(5,"div",0)(6,"div",1),s(7," Naturalidade (munic\xEDpio de nascimento): "),v(8,"strong"),s(9),S()()()),o&2){let e,t,i=u();l(4),M((e=i.dadoCertidaoModel())!=null&&e.txtUfNaturalidade&&((e=i.dadoCertidaoModel())==null?null:e.txtUfNaturalidade)!=""?(e=i.dadoCertidaoModel())==null?null:e.txtUfNaturalidade:"N\xE3o informado"),l(5),M((t=i.dadoCertidaoModel())!=null&&t.txtMunicipioNaturalidade&&((t=i.dadoCertidaoModel())==null?null:t.txtMunicipioNaturalidade)!=""?(t=i.dadoCertidaoModel())==null?null:t.txtMunicipioNaturalidade:"N\xE3o informado")}}function ac(o,n){if(o&1&&(v(0,"div",0)(1,"div",1),s(2," Pa\xEDs de nascimento: "),v(3,"strong"),s(4),S()()()),o&2){let e,t=u();l(4),M((e=t.dadoCertidaoModel())!=null&&e.txtDsPaisNaturalidade&&((e=t.dadoCertidaoModel())==null?null:e.txtDsPaisNaturalidade)!=""?(e=t.dadoCertidaoModel())==null?null:e.txtDsPaisNaturalidade:"N\xE3o informado")}}var Qo=class o{constructor(){this.documentoOrigemModel=b();this.dadoCertidaoModel=b();this.dadoGeralModel=b();this.activatedRoute=f(Tt);this.statusIdade={ehMenor14:!1,ehMenor16:!1,ehMenor18:!1};this.statusIdade.ehMenor16=this.activatedRoute.snapshot.data.menor16,this.statusIdade.ehMenor18=this.activatedRoute.snapshot.data.menor18}
112ngOnInit(){this.matriculaCertidaoFormatada=me.applyMatriculaMaskSemFormControl(this.documentoOrigemModel()?.txtMatricula),this.matriculaUnicaoEstavelCertidaoFormatada=me.applyMatriculaMaskSemFormControl(this.documentoOrigemModel()?.txtMatriculaUniaoEstavel)}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-documento-origem-resumo"]],inputs:{documentoOrigemModel:[1,"documentoOrigemModel"],dadoCertidaoModel:[1,"dadoCertidaoModel"],dadoGeralModel:[1,"dadoGeralModel"]},decls:25,vars:8,consts:[[1,"row","pb-2"],[1,"col"]],template:function(e,t){if(e&1&&(v(0,"div",0)(1,"div",1),s(2," Matr\xEDcula da certid\xE3o: "),v(3,"strong"),s(4),S()()(),v(5,"div",0)(6,"div",1),s(7," Estado (UF) de emiss\xE3o: "),v(8,"strong"),s(9),S()()(),v(10,"div",0)(11,"div",1),s(12," Munic\xEDpio de emiss\xE3o: "),v(13,"strong"),s(14),S()()(),g(15,Jd,6,2),g(16,oc,7,3),g(17,ic,21,6),v(18,"div",0)(19,"div",1),s(20," Nacionalidade: "),v(21,"strong"),s(22),S()()(),g(23,nc,10,2)(24,ac,5,1,"div",0)),e&2){let i,d,p,_,I,w;l(4),M(t.matriculaCertidaoFormatada&&t.matriculaCertidaoFormatada!=""?t.matriculaCertidaoFormatada:"N\xE3o informado"),l(5),M(((i=t.documentoOrigemModel())==null?null:i.txtUf)??"N\xE3o informado"),l(5),M(((d=t.documentoOrigemModel())==null?null:d.txtMunicipio)??"N\xE3o informado"),l(),C(!t.statusIdade.ehMenor18&&((p=t.dadoGeralModel())==null?null:p.tipoEstadoCivil)!=2?15:-1),l(),C(((_=t.dadoGeralModel())==null?null:_.tipoEstadoCivil)==3||((_=t.dadoGeralModel())==null?null:_.tipoEstadoCivil)==4||((_=t.dadoGeralModel())==null?null:_.tipoEstadoCivil)==7?16:-1),l(),C(t.statusIdade.ehMenor16?17:-1),l(5),M(((I=t.dadoCertidaoModel())==null?null:I.txtDsTipoNacionalidade)??"N\xE3o informado"),l(),C(((w=t.dadoCertidaoModel())==null?null:w.codTipoNacionalidade)!=2?23:24)}},dependencies:[uo],encapsulation:2})}};var Wo=class o{constructor(){this.dadoEnderecoModel=b()}ngOnInit(){let n=`${this.dadoEnderecoModel()?.txtNroDdd}${this.dadoEnderecoModel()?.txtNroTelefone}`;this.telefoneFormatado=me.applyTelMaskSemFormControl(n)}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-endereco-resumo"]],inputs:{dadoEnderecoModel:[1,"dadoEnderecoModel"]},decls:35,vars:7,consts:[[1,"row","pb-2"],[1,"col"]],template:function(e,t){if(e&1&&(v(0,"div",0)(1,"div",1),s(2," CEP: "),v(3,"strong"),s(4),S()()(),v(5,"div",0)(6,"div",1),s(7," UF: "),v(8,"strong"),s(9),S()()(),v(10,"div",0)(11,"div",1),s(12," Munic\xEDpio: "),v(13,"strong"),s(14),S()()(),v(15,"div",0)(16,"div",1),s(17," Logradouro: "),v(18,"strong"),s(19),S()()(),v(20,"div",0)(21,"div",1),s(22," N\xFAmero: "),v(23,"strong"),s(24),S()()(),v(25,"div",0)(26,"div",1),s(27," Complemento: "),v(28,"strong"),s(29),S()()(),v(30,"div",0)(31,"div",1),s(32," Telefone para contato: "),v(33,"strong"),s(34),S()()()),e&2){let i,d,p,_,I,w;l(4),M(((i=t.dadoEnderecoModel())==null?null:i.nroCep)??"N\xE3o informado"),l(5),M(((d=t.dadoEnderecoModel())==null?null:d.txtUf)??"N\xE3o informado"),l(5),M(((p=t.dadoEnderecoModel())==null?null:p.txtNomeMunicipio)??"N\xE3o informado"),l(5),M(((_=t.dadoEnderecoModel())==null?null:_.txtLogradouro)??"N\xE3o informado"),l(5),M(((I=t.dadoEnderecoModel())==null?null:I.txtNumero)??"N\xE3o informado"),l(5),M(((w=t.dadoEnderecoModel())==null?null:w.txtComplemento)??"N\xE3o informado"),l(5),M(t.telefoneFormatado&&t.telefoneFormatado!=""?t.telefoneFormatado:"N\xE3o informado")}},encapsulation:2})}};var rc=(o,n)=>n.ordemFiliacao;function lc(o,n){if(o&1&&(v(0,"section",0)(1,"div",1)(2,"div",2),s(3," Nome completo: "),v(4,"strong"),s(5),S()()(),v(6,"div",1)(7,"div",2),s(8," Tipo de filia\xE7\xE3o: "),v(9,"strong"),s(10),S()()()()),o&2){let e=n.$implicit;l(5),M(e.nomeCompleto??"N\xE3o informado"),l(5),M(e.dsTipoFiliacao??"N\xE3o informado")}}function sc(o,n){o&1&&s(0," N\xE3o informado. ")}var Yo=class o{constructor(){this.filiacaoGeralModel=b()}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-filiacao-resumo"]],inputs:{filiacaoGeralModel:[1,"filiacaoGeralModel"]},decls:3,vars:1,consts:[[1,"pb-3"],[1,"row"],[1,"col"]],template:function(e,t){if(e&1&&ne(0,lc,11,2,"section",0,rc,!1,sc,1,0),e&2){let i;ae((i=t.filiacaoGeralModel())==null?null:i.listaFiliacao)}},encapsulation:2})}};var dc=(o,n)=>n.numeroIdentidade,cc=(o,n)=>n.codigoCid;function mc(o,n){if(o&1&&(v(0,"div",0)(1,"div",2),s(2," N\xBA do t\xEDtulo de eleitor: "),v(3,"strong"),s(4),S()()()),o&2){let e,t=u();l(4),M(((e=t.informacoesDocumentoModel())==null?null:e.tituloEleitor)??"N\xE3o informado")}}function uc(o,n){if(o&1&&(v(0,"div",0)(1,"div",2),s(2," N\xBA da certid\xE3o militar: "),v(3,"strong"),s(4),S()()(),v(5,"div",0)(6,"div",2),s(7," N\xBA da CNH: "),v(8,"strong"),s(9),S()()(),v(10,"div",0)(11,"div",2),s(12," UF da CNH: "),v(13,"strong"),s(14),S()(),v(15,"div",2),s(16," Categoria da CNH: "),v(17,"strong"),s(18),S()()()),o&2){let e,t,i,d,p=u();
112l(4),M(((e=p.informacoesDocumentoModel())==null?null:e.certidaoMilitar)??"N\xE3o informado"),l(5),M(((t=p.informacoesDocumentoModel())==null?null:t.habilitacaoNumero)??"N\xE3o informado"),l(5),M(((i=p.informacoesDocumentoModel())==null?null:i.habilitacaoUf)??"N\xE3o informado"),l(4),M((d=p.informacoesDocumentoModel())!=null&&d.descricaoTipoHabilitacaoCategoria&&((d=p.informacoesDocumentoModel())==null?null:d.descricaoTipoHabilitacaoCategoria)!=""?(d=p.informacoesDocumentoModel())==null?null:d.descricaoTipoHabilitacaoCategoria:"N\xE3o informado")}}function pc(o,n){if(o&1&&(v(0,"div",0)(1,"div",2),s(2," N\xBA da CTPS: "),v(3,"strong"),s(4),S()()(),v(5,"div",0)(6,"div",2),s(7," UF da CTPS: "),v(8,"strong"),s(9),S()(),v(10,"div",2),s(11," S\xE9rie da CTPS: "),v(12,"strong"),s(13),S()()(),v(14,"div",0)(15,"div",2),s(16," NIS: "),v(17,"strong"),s(18),S()()(),v(19,"div",0)(20,"div",2),s(21," NIT: "),v(22,"strong"),s(23),S()()(),v(24,"div",0)(25,"div",2),s(26," PIS/PASEP: "),v(27,"strong"),s(28),S()()()),o&2){let e,t,i,d,p,_,I=u();l(4),M(((e=I.informacoesDocumentoModel())==null?null:e.carteiraTrabalho)??"N\xE3o informado"),l(5),M(((t=I.informacoesDocumentoModel())==null?null:t.carteiraTrabalhoUf)??"N\xE3o informado"),l(4),M(((i=I.informacoesDocumentoModel())==null?null:i.carteiraTrabalhoSerie)??"N\xE3o informado"),l(5),M(((d=I.informacoesDocumentoModel())==null?null:d.nis)??"N\xE3o informado"),l(5),M(((p=I.informacoesDocumentoModel())==null?null:p.nit)??"N\xE3o informado"),l(5),M(((_=I.informacoesDocumentoModel())==null?null:_.pisPasep)??"N\xE3o informado")}}function fc(o,n){if(o&1&&(v(0,"section",4)(1,"div",5)(2,"div",2),s(3," N\xBA da identidade profissional: "),v(4,"strong"),s(5),S()()(),v(6,"div",5)(7,"div",2),s(8," Conselho: "),v(9,"strong"),s(10),S()(),v(11,"div",2),s(12," UF: "),v(13,"strong"),s(14),S()()()()),o&2){let e=n.$implicit;l(5),M(e.numeroIdentidade??"N\xE3o informado"),l(5),M(e.descricaoTipoConselho??"N\xE3o informado"),l(4),M(e.uf??"N\xE3o informado")}}function hc(o,n){if(o&1&&(v(0,"div",1)(1,"div",3)(2,"div",2)(3,"strong"),s(4,"Informa\xE7\xF5es de identidade profissional"),S()()(),ne(5,fc,15,3,"section",4,dc),S()),o&2){let e,t=u();l(5),ae((e=t.dadoIdentidadeProfissionalModel())==null?null:e.listaIdentidadeProfissional)}}function vc(o,n){if(o&1&&(v(0,"section",4)(1,"div",5)(2,"div",2),s(3," N\xBA do CID: "),v(4,"strong"),s(5),S()()(),v(6,"div",5)(7,"div",2),s(8," Descri\xE7\xE3o do CID: "),v(9,"strong"),s(10),S()()(),v(11,"div",5)(12,"div",2),s(13," CRM: "),v(14,"strong"),s(15),S()(),v(16,"div",2),s(17," UF: "),v(18,"strong"),s(19),S()()()()),o&2){let e=n.$implicit;l(5),M(e.codigoCid),l(5),M(e.descricaoCid),l(5),M(e.crm),l(4),M(e.crmUf)}}function gc(o,n){if(o&1&&(v(0,"div",1)(1,"div",3)(2,"div",2)(3,"strong"),s(4,"Condi\xE7\xF5es espec\xEDficas de sa\xFAde"),S()()(),ne(5,vc,20,4,"section",4,cc),S()),o&2){let e,t=u();l(5),ae((e=t.dadoCIDModel())==null?null:e.listaDadoCID)}}var Ko=class o{constructor(){this.informacoesDocumentoModel=b();this.dadoIdentidadeProfissionalModel=b();this.dadoCIDModel=b();this.activatedRoute=f(Tt);this.statusIdade={ehMenor14:!1,ehMenor16:!1,ehMenor18:!1};this.statusIdade.ehMenor14=this.activatedRoute.snapshot.data.menor14,this.statusIdade.ehMenor16=this.activatedRoute.snapshot.data.menor16,this.statusIdade.ehMenor18=this.activatedRoute.snapshot.data.menor18}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-informacoes-documentos-resumo"]],inputs:{informacoesDocumentoModel:[1,"informacoesDocumentoModel"],dadoIdentidadeProfissionalModel:[1,"dadoIdentidadeProfissionalModel"],dadoCIDModel:[1,"dadoCIDModel"]},decls:44,vars:12,consts:[[1,"row","pb-2"],[1,"row","mb-2","text-bg-light","box-shadow","rounded","py-3"],[1,"col"],[1,"row","primary-color","pb-2"],[1,"pb-2"],[1,"row","primary-color"]],template:function(e,t){if(e&1&&(g(0,mc,5,1,"div",0),g(1,uc,19,4),g(2,pc,29,6),g(3,hc,7,0,"div",1),v(4,"div",0)(5,"div",2),s(6," N\xBA do Cart\xE3o Nacional de Sa\xFAde: "),v(7,"strong"),s(8),S()()(),v(9,"div",0)(10,"div",2),s(11," Tipo sangu\xEDneo / Fator RH: "),v(12,"strong"),s(13),S()()(),g(14,gc,7,0,"div",1),v(15,"div",0)(16,"div",2)(17,"strong"),s(18,"Defici\xEAncias/dificuldades permanentes"),S()()(),v(19,"div",0)(20,"div",2),s(21," Mobilidade? "),v(22,"strong"),s(23),S()()(),v(24,"div",0)(25,"div",2),s(26," Auditiva? "),v(27,"strong"),s(28),S()()(),v(29,"div",0)(30,"div",2),s(31," Visual? "),v(32,"strong"),s(33),S()()(),v(34,"div",0)(35,"div",2),s(36," Mental? "),v(37,"strong"),s(38),S()()(),v(39,"div",0)(40,"div",2),s(41," Autismo? "),v(42,"strong"),s(43),S()()()),e&2){let i,d,p,_,I,w,ie,ce,N;C(t.statusIdade.ehMenor16?-1:0),l(),C(t.statusIdade.ehMenor18?-1:1),l(),C(t.statusIdade.ehMenor14?-1:2),l(),C(((i=t.dadoIdentidadeProfissionalModel())==null?null:i.listaIdentidadeProfissional.length)>0?3:-1),l(5),M(((d=t.informacoesDocumentoModel())==null?null:d.cartaoNacionalSaude)??"N\xE3o informado"),l(5),M((p=t.informacoesDocumentoModel())!=null&&p.tipoSanguineo&&((p=t.informacoesDocumentoModel())!=null&&p.fatorRh)?((p=t.informacoesDocumentoModel())==null?null:p.tipoSanguineo)+((p=t.informacoesDocumentoModel())==null?null:p.fatorRh):"N\xE3o informado"),l(),C(((_=t.dadoCI
112DModel())==null?null:_.listaDadoCID.length)>0?14:-1),l(9),M(((I=t.informacoesDocumentoModel())==null?null:I.mobilidade)==1?"Sim":"N\xE3o"),l(5),M(((w=t.informacoesDocumentoModel())==null?null:w.auditiva)==1?"Sim":"N\xE3o"),l(5),M(((ie=t.informacoesDocumentoModel())==null?null:ie.visual)==1?"Sim":"N\xE3o"),l(5),M(((ce=t.informacoesDocumentoModel())==null?null:ce.mental)==1?"Sim":"N\xE3o"),l(5),M(((N=t.informacoesDocumentoModel())==null?null:N.autismo)==1?"Sim":"N\xE3o")}},encapsulation:2})}};var Jo=class o{constructor(){this.agendamentoModel=b()}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-agendamento-resumo"]],inputs:{agendamentoModel:[1,"agendamentoModel"]},decls:27,vars:11,consts:[[1,"row","pb-2"],[1,"col"]],template:function(e,t){if(e&1&&(v(0,"div",0)(1,"div",1),s(2," Telefone: "),v(3,"strong"),s(4),Ie(5,"formataTelefone"),S()()(),v(6,"div",0)(7,"div",1),s(8," Local: "),v(9,"strong"),s(10),S()()(),v(11,"div",0)(12,"div",1),s(13," Endere\xE7o: "),v(14,"strong"),s(15),S()()(),v(16,"div",0)(17,"div",1),s(18," Dia: "),v(19,"strong"),s(20),Ie(21,"formataData"),S()(),v(22,"div",1),s(23," Hora: "),v(24,"strong"),s(25),Ie(26,"formataHora"),S()()()),e&2){let i,d,p,_,I;l(4),L("",we(5,5,(i=t.agendamentoModel())!=null&&i.telefoneDdd&&((i=t.agendamentoModel())!=null&&i.telefone)?((i=t.agendamentoModel())==null?null:i.telefoneDdd)+((i=t.agendamentoModel())==null?null:i.telefone):"N\xE3o informado")," "),l(6),L("",((d=t.agendamentoModel())==null?null:d.nomeLocal)??"N\xE3o informado"," "),l(5),L("",((p=t.agendamentoModel())==null?null:p.enderecoLocal)??"N\xE3o informado"," "),l(5),L("",we(21,7,((_=t.agendamentoModel())==null?null:_.dataAgendamento)??"N\xE3o informado")," "),l(5),L("",we(26,9,((I=t.agendamentoModel())==null?null:I.dataAgendamento)??"N\xE3o informado")," ")}},dependencies:[Pt,pt,gn],encapsulation:2})}};function Cc(o,n){if(o&1&&(a(0,"form",26)(1,"div",41)(2,"div",42),h(3,"input",43),a(4,"label",44),s(5," Declaro que li e aceito os "),a(6,"button",45),s(7," termos de uso "),r(),s(8," do Identidade F\xE1cil RS. "),r()()()()),o&2){let e=u();m("formGroup",e.form)}}var Zo=class o{constructor(){this.router=f(so);this.dadosCompartilhadosService=f(Q);this.activatedRoute=f(Tt);this.resumoService=f(Qt);this.protocolo=this.dadosCompartilhadosService.getProtocolo();this.formBuilder=f(mo);this.resumoModel=this.activatedRoute.snapshot.data.resumo,this.dadosCompartilhadosService.setResumo(this.resumoModel)}ngOnInit(){this.form=this.formBuilder.group({declaraVeracidade:new c({value:!1,disabled:!1},D.requiredTrue)})}enviarNotificacaoEmail(){this.resumoService.enviaEmail(this.protocolo?.uuid).subscribe({error:n=>{console.error("Erro ao enviar notifica\xE7\xE3o por e-mail:",n)}})}avancar(){this.enviarNotificacaoEmail(),this.router.navigate(["etapas/sucesso"],{skipLocationChange:!0})}voltar(){this.router.navigate(["etapas/agendamento"],{skipLocationChange:!0})}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-resumo"]],decls:115,vars:14,consts:[[1,"navbar","titulo-navegacao"],["id","accordionResumo",1,"accordion"],[1,"accordion-item","bg-accordion-custom"],[1,"accordion-header"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseDadosGerais","aria-expanded","true","aria-controls","collapseDadosGerais",1,"accordion-button","bg-accordion-button-custom","fw-bold"],["id","collapseDadosGerais","data-bs-parent","#accordionResumo",1,"accordion-collapse","collapse","show"],[1,"accordion-body"],[3,"dadoGeralModel","protocolo"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseFiliacao","aria-expanded","false","aria-controls","collapseFiliacao",1,"accordion-button","bg-accordion-button-custom","fw-bold","collapsed"],["id","collapseFiliacao","data-bs-parent","#accordionResumo",1,"accordion-collapse","collapse"],[3,"filiacaoGeralModel"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseDadosDeclarados","aria-expanded","false","aria-controls","collapseDadosDeclarados",1,"accordion-button","bg-accordion-button-custom","fw-bold","collapsed"],["
112id","collapseDadosDeclarados","data-bs-parent","#accordionResumo",1,"accordion-collapse","collapse"],[3,"dadoDeclaradoModel"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseDocumentoOrigem","aria-expanded","false","aria-controls","collapseDocumentoOrigem",1,"accordion-button","bg-accordion-button-custom","fw-bold","collapsed"],["id","collapseDocumentoOrigem","data-bs-parent","#accordionResumo",1,"accordion-collapse","collapse"],[3,"documentoOrigemModel","dadoCertidaoModel","dadoGeralModel"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseEndereco","aria-expanded","false","aria-controls","collapseEndereco",1,"accordion-button","bg-accordion-button-custom","fw-bold","collapsed"],["id","collapseEndereco","data-bs-parent","#accordionResumo",1,"accordion-collapse","collapse"],[3,"dadoEnderecoModel"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseinformacoesDocumentoModels","aria-expanded","false","aria-controls","collapseinformacoesDocumentoModels",1,"accordion-button","bg-accordion-button-custom","fw-bold","collapsed"],["id","collapseinformacoesDocumentoModels","data-bs-parent","#accordionResumo",1,"accordion-collapse","collapse"],[3,"informacoesDocumentoModel","dadoIdentidadeProfissionalModel","dadoCI
112DModel"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseAgendamento","aria-expanded","false","aria-controls","collapseAgendamento",1,"accordion-button","bg-accordion-button-custom","fw-bold","collapsed"],["id","collapseAgendamento","data-bs-parent","#accordionResumo",1,"accordion-collapse","collapse"],[3,"agendamentoModel"],["novalidate","",1,"needs-validation",3,"formGroup"],[1,"row","justify-content-between","mt-3"],[1,"col"],[3,"btnClicked"],[1,"col","text-end"],[3,"btnClicked","disabled"],["id","termosUsoModal","tabindex","-1","aria-labelledby","termosUsoModalLabel","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","pt-5"],[1,"modal-content"],[1,"modal-header"],["id","termosUsoModalLabel",1,"modal-title","text-center","card-body"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close"],[1,"modal-body"],[1,"modal-footer","d-flex","justify-content-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary-custom"],[1,"col-12","text-bg-light","box-shadow","rounded","p-3","mt-3","mb-2"],[1,"form-check"],["type","checkbox","value","true","id","declaraVeracidade","formControlName","declaraVeracidade",1,"form-check-input","checkbox-igp"],["for","declaraVeracidade",1,"form-check-label"],["type","button","data-bs-toggle","modal","data-bs-target","#termosUsoModal",1,"btn","btn-link","p-0",2,"vertical-align","baseline"]],template:function(e,t){e&1&&(a(0,"nav",0)(1,"span"),s(2," Resumo "),r()(),a(3,"div",1)(4,"div",2)(5,"h2",3)(6,"button",4),s(7," Dados Gerais "),r()(),a(8,"div",5)(9,"div",6),h(10,"app-dado-geral-resumo",7),r()()(),a(11,"div",2)(12,"h2",3)(13,"button",8),s(14," Filia\xE7\xE3o "),r()(),a(15,"div",9)(16,"div",6),h(17,"app-filiacao-resumo",10),r()()(),a(18,"div",2)(19,"h2",3)(20,"button",11),s(21," Dados Declarados "),r()(),a(22,"div",12)(23,"div",6),h(24,"app-dado-declarado-resumo",13),r()()(),a(25,"div",2)(26,"h2",3)(27,"button",14),s(28," Dados de Certid\xE3o "),r()(),a(29,"div",15)(30,"div",6),h(31,"app-documento-origem-resumo",16),r()()(),a(32,"div",2)(33,"h2",3)(34,"button",17),s(35," Endere\xE7o Residencial "),r()(),a(36,"div",18)(37,"div",6),h(38,"app-endereco-resumo",19),r()()(),a(39,"div",2)(40,"h2",3)(41,"button",20),s(42," Informa\xE7\xF5es de Documentos "),r()(),a(43,"div",21)(44,"div",6),h(45,"app-informacoes-documentos-resumo",22),r()()(),a(46,"div",2)(47,"h2",3)(48,"button",23),s(49," Agendamento Presencial "),r()(),a(50,"div",24)(51,"div",6),h(52,"app-agendamento-resumo",25),r()()()(),g(53,Cc,9,1,"form",26),a(54,"div",27)(55,"div",28)(56,"app-custom-button-voltar",29),E("btnClicked",function(){return t.voltar()}),r()(),a(57,"div",30)(58,"app-custom-button-proximo",31),E("btnClicked",function(){return t.avancar()}),r()()(),a(59,"div",32)(60,"div",33)(61,"div",34)(62,"div",35)(63,"h5",36),s(64," Termos de Uso "),r(),h(65,"button",37),r(),a(66,"div",38)(67,"h1"),s(68,'Termos de Uso da Aplica\xE7\xE3o - "Identidade F\xE1cil RS"'),r(),a(69,"p"),s(70," Bem-vindo(a) \xE0 nossa aplica\xE7\xE3o! Este documento descreve os Termos de Uso que regem a utiliza\xE7\xE3o da plataforma, destinada aos cidad\xE3os do Estado do Rio Grande do Sul para o encaminhamento de sua nova Carteira de Identidade. Ao utilizar a aplica\xE7\xE3o, voc\xEA concorda com os termos abaixo. "),r(),a(71,"h2"),s(72,"1. Objetivo da Aplica\xE7\xE3o"),r(),a(73,"p"),s(74,' A aplica\xE7\xE3o "Identidade F\xE1cil RS" tem como finalidade permitir que cidad\xE3os encaminhem sua Carteira de Identidade, de forma pr\xE1tica e segura, fornecendo dados e documentos para an\xE1lise e processamento pelos \xF3rg\xE3os competentes do Estado do Rio Grande do Sul. '),r(),a(75,"h2"),s(76,"2. Aceita\xE7\xE3o dos Termos de Uso"),r(),a(77,"p"),s(78," Ao acessar e utilizar esta aplica\xE7\xE3o, o usu\xE1rio declara ter lido, entendido e concordado com estes Termos de Uso. Caso n\xE3o concorde com qualquer parte deste documento, solicitamos que n\xE3o utilize a plataforma. "),r(),a(79,"h2"),s(80,"3. Cadastro e Responsabilidades do Usu\xE1rio"),r(),a(81,"ul")(82,"li"),s(83," 3.1. Para utilizar a aplica\xE7\xE3o, o usu\xE1rio deve fornecer informa\xE7\xF5es precisas, completas e atualizadas. "),r(),a(84,"li"),s(85," 3.2. O usu\xE1rio \xE9 respons\xE1vel por manter a confidencialidade de seus dados de acesso e por todas as a\xE7\xF5es realizadas em sua conta. "),r(),a(86,"li"),s(87," 3.3. O envio de documentos falsos, fraudulentos ou ilegais est\xE1 estritamente proibido e pode acarretar san\xE7\xF5es administrativas, civis e penais. "),r()(),a(88,"h2"),s(89,"4. Privacidade e Prote\xE7\xE3o de Dados"),r(),a(90,"ul")(91,"li"),s(92," 4.1. Todas as informa\xE7\xF5es fornecidas pelos usu\xE1rios ser\xE3o tratadas de acordo com a legisla\xE7\xE3o vigente, incluindo a Lei Geral de Prote\xE7\xE3o de Dados Pessoais (LGPD). "),r(),a(93,"li"),s(94,' 4.2. Os dados coletados ser\xE3o utilizados exclusivamente para os fins relacionados ao encaminhamento do n
112ovo documento de identidade" e n\xE3o ser\xE3o compartilhados com terceiros sem autoriza\xE7\xE3o pr\xE9via, salvo quando exigido por lei. '),r()(),a(95,"h2"),s(96,"5. Disponibilidade e Limita\xE7\xF5es da Aplica\xE7\xE3o"),r(),a(97,"ul")(98,"li"),s(99,' 5.1. A aplica\xE7\xE3o \xE9 fornecida "como est\xE1" e pode estar sujeita a interrup\xE7\xF5es, erros ou indisponibilidades. '),r(),a(100,"li"),s(101," 5.2. O Estado do Rio Grande do Sul n\xE3o se responsabiliza por danos decorrentes de problemas t\xE9cnicos ou operacionais da plataforma, salvo nos casos previstos em lei. "),r()(),a(102,"h2"),s(103,"6. Modifica\xE7\xF5es nos Termos de Uso"),r(),a(104,"p"),s(105," Estes Termos de Uso podem ser alterados a qualquer momento para garantir conformidade com a legisla\xE7\xE3o ou melhorias no servi\xE7o. Recomendamos a leitura peri\xF3dica deste documento. "),r(),a(106,"h2"),s(107,"7. Contato"),r(),a(108,"p"),s(109," Em caso de d\xFAvidas, problemas ou sugest\xF5es, entre em contato com nossa equipe por meio dos canais oficiais disponibilizados na aplica\xE7\xE3o. "),r(),a(110,"p"),s(111," Ao continuar utilizando esta aplica\xE7\xE3o, voc\xEA declara concordar com os termos acima descritos. Agradecemos pela confian\xE7a em nosso servi\xE7o! "),r()(),a(112,"div",39)(113,"button",40),s(114," Fechar "),r()()()()()),e&2&&(l(10),m("dadoGeralModel",t.resumoModel.dadoGeral)("protocolo",t.protocolo),l(7),m("filiacaoGeralModel",t.resumoModel.filiacao),l(7),m("dadoDeclaradoModel",t.resumoModel.dadoDeclarado),l(7),m("documentoOrigemModel",t.resumoModel.documentoOrigem)("dadoCertidaoModel",t.resumoModel.dadoCertidao)("dadoGeralModel",t.resumoModel.dadoGeral),l(7),m("dadoEnderecoModel",t.resumoModel.dadoEndereco),l(7),m("informacoesDocumentoModel",t.resumoModel.dadoDocumento)("dadoIdentidadeProfissionalModel",t.resumoModel.identidadeProfissional)("dadoCIDModel",t.resumoModel.dadoCID),l(7),m("agendamentoModel",t.resumoModel.agendamento),l(),C(t.form?53:-1),l(5),m("disabled",t.form&&!t.form.controls.declaraVeracidade.value))},dependencies:[ee,le,zo,$o,Qo,Wo,Yo,Ko,Jo,V,Z,Ft,P,J,X,Me],encapsulation:2})}};var bc=["dialogContainer"];function _c(o,n){if(o&1){let e=A();v(0,"div",6)(1,"h5",8)(2,"strong"),s(3,"Agendamento"),S()(),v(4,"p",9),s(5,"Compare\xE7a presencialmente no agendamento abaixo:"),S(),v(6,"div",10)(7,"div",11),s(8," Local: "),v(9,"strong"),s(10),S()()(),v(11,"div",10)(12,"div",11),s(13," Endere\xE7o: "),v(14,"strong"),s(15),S()()(),v(16,"div",10)(17,"div",11),s(18," Dia: "),v(19,"strong"),s(20),Ie(21,"formataData"),S()(),v(22,"div",11),s(23," Hor\xE1rio: "),v(24,"strong"),s(25),Ie(26,"formataHora"),S()()(),v(27,"p",3)(28,"strong"),s(29,"Lembre de levar consigo todos os seus documentos."),S()(),v(30,"div",12)(31,"button",5),ot("click",function(){y(e);let i=u();return T(i.cancelarAlterarAgendamento())}),s(32," Alterar ou Cancelar o Agendamento "),S()()()}if(o&2){let e=u();l(10),M(e.agendamentoModel.nomeLocal),l(5),M(e.agendamentoModel.enderecoLocal),l(5),M(we(21,4,e.agendamentoModel.dataAgendamento)),l(5),M(we(26,6,e.agendamentoModel.dataAgendamento))}}var Xo=class o{constructor(){this.router=f(so);this.dadosCompartilhadosService=f(Q);this.protocoloService=f(wt);this.etapaAgendamentoService=f(Nt);this.messagesServiceModal=f(Ke)}ngOnInit(){this.verificaSeTemAgendamento()}editarPreCadastro(){this.dadosCompartilhadosService.getProtocolo()?.certidaoInformadaAprovada===1?this.redirecionaParaDadoGeral1():this.redirecionaParaInformarDocumento()}cancelarPreCadastro(){this.solicitaExclusaoProtocolo()}cancelarAlterarAgendamento(){this.router.navigate(["etapas/agendamento"],{skipLocationChange:!0,state:{from:this.router.url}})}verificaSeTemAgendamento(){this.etapaAgendamentoService.getAgendamento(this.dadosCompartilhadosService.getProtocolo()?.uuid).subscribe({next:n=>{n&&(this.agendamentoModel=n,this.dadosCompartilhadosService.setAgendamento(n))},error:n=>{console.error(n),this.messagesServiceModal.openModal(`Erro ao verificar se h\xE1 agendamento aberto. Tente novamente mais tarde. 113 114`+n.error,this.viewContainerRef)}})}solicitaExclusaoProtocolo(){this.messagesServiceModal.openModalConfirmation("<p>Tem certeza que deseja cancelar o encaminhamento?</p>",this.viewContainerRef,n=>{n==="Sim"&&this.deletaProtocolo()})}deletaProtocolo(){this.protocoloService.deleteProtocolo(this.dadosCompartilhadosService.getProtocolo()?.uuid).subscribe({next:n=>{n=="DELETED"&&(this.dadosCompartilhadosService.deleteProtocolo(),this.dadosCompartilhadosService.deleteAgendamento(),this.redirecionaParaHome())},error:n=>{n&&(this.messagesServiceModal.openModal("Erro ao cancelar protocolo. Tente novamente.",this.viewContainerRef),console.error(n.error))}})}redirecionaParaHome(){this.router.navigate([""],{skipLocationChange:!0})}redirecionaParaInformarDocumento(){this.router.navigate(["etapas","informar-d
114ocumento-origem"],{skipLocationChange:!0})}redirecionaParaDadoGeral1(){this.router.navigate(["etapas","dado-geral-1"],{skipLocationChange:!0})}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275cmp=x({type:o,selectors:[["app-tem-pre-cadastro"]],viewQuery:function(e,t){if(e&1&&z(bc,5,$),e&2){let i;U(i=H())&&(t.viewContainerRef=i.first)}},decls:13,vars:1,consts:[["dialogContainer",""],[1,"card","card-background-color","mt-5"],[1,"card-body"],[1,"card-text"],[1,"d-grid","gap-2","col","col-md-6","mx-auto"],["type","button",1,"btn","btn-primary-custom",3,"click"],[1,"card-agendamento","mt-2"],["id","modal-limpar"],[1,"text-center","mb-3"],[1,"card-text","mb-2"],[1,"row","pb-2"],[1,"col"],[1,"d-grid","gap-2","col","mx-auto","mt-3"]],template:function(e,t){e&1&&(v(0,"div",1)(1,"div",2)(2,"p",3)(3,"strong"),s(4," Vimos que voc\xEA j\xE1 iniciou o encaminhamento da sua Carteira de Identidade. O que deseja fazer agora? "),S()(),v(5,"div",4)(6,"button",5),ot("click",function(){return t.editarPreCadastro()}),s(7," Alterar Encaminhamento "),S(),v(8,"button",5),ot("click",function(){return t.cancelarPreCadastro()}),s(9," Cancelar Encaminhamento "),S(),g(10,_c,33,8,"div",6),S()()(),Gi(11,"div",7,0)),e&2&&(l(10),C(t.agendamentoModel?10:-1))},dependencies:[Pt,pt],encapsulation:2})}};var y_=[{path:"",redirectTo:"dado-geral-1",pathMatch:"full"},{path:"informar-rg",component:jo,title:"Identidade F\xE1cil RS"},{path:"tem-pre-cadastro",component:Xo,title:"Identidade F\xE1cil RS"},{path:"informar-documento-origem",component:Ho,title:"Identidade F\xE1cil RS",resolve:{arquivo:la}},{path:"resumo",component:Zo,title:"Identidade F\xE1cil RS",resolve:{resumo:sa,menor14:yi,menor16:Lo,menor18:Bo}},{path:"dado-geral-1",component:Io,title:"Identidade F\xE1cil RS",resolve:{dadoGeral1:ea}},{path:"dado-geral-2",component:wo,title:"Identidade F\xE1cil RS"},{path:"dado-declarado",component:Co,title:"Identidade F\xE1cil RS",resolve:{dadoDeclarado:qn}},{path:"filiacao",component:Oo,title:"Identidade F\xE1cil RS",resolve:{filiacaoGeral:ia}},{path:"documento-origem",component:No,title:"Identidade F\xE1cil RS",resolve:{documentoOrigem:ta,menor16:Lo,menor18:Bo}},{path:"dado-certidao",component:go,title:"Identidade F\xE1cil RS",resolve:{dadoCertidao:Bn}},{path:"endereco",component:Fo,title:"Identidade F\xE1cil RS",resolve:{endereco:oa}},{path:"informacoes-documentos-1",component:Ao,title:"Identidade F\xE1cil RS"},{path:"informacoes-documentos-2",component:Ro,title:"Identidade F\xE1cil RS"},{path:"informacoes-documentos-3",component:ko,title:"Identidade F\xE1cil RS",resolve:{dadoIdentidadeProfissional:Si}},{path:"informacoes-documentos-4",component:Po,title:"Identidade F\xE1cil RS",resolve:{arquivos:xi}},{path:"informacoes-documentos-5",component:Vo,title:"Identidade F\xE1cil RS",resolve:{dadoCI
114D:na,arquivos:xi}},{path:"informacoes-documentos-6",component:Go,title:"Identidade F\xE1cil RS"},{path:"agendamento",component:po,title:"Identidade F\xE1cil RS",resolve:{agendamento:Cn}},{path:"selecao-documentos",component:qo,title:"Identidade F\xE1cil RS",resolve:{informacoesDocumentos:aa,dadoIdentidadeProfissional:Si,menor14:yi,menor16:Lo,menor18:Bo}},{path:"sucesso",component:Uo,title:"Identidade F\xE1cil RS"}];export{y_ as ETAPAS_ROUTES};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.