widget-web-component 1.0.62-dev.20251222-1836 → 1.0.62-dev.20251223-1838
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
const observer = new MutationObserver(() => injectStyles());
|
|
57
57
|
observer.observe(document.documentElement, { childList: true, subtree: true });
|
|
58
58
|
})();
|
|
59
|
-
"use strict";if((self.webpackChunkvex=self.webpackChunkvex||[]).push([[163],{4163:(e,t,n)=>{n.r(t),n.d(t,{ClientCertModule:()=>Ut});var i=n(6895),s=n(6383),r=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),b=n(3798),v=n(9391),y=n(1572),w=n(182),x=n(4144),C=n(7367),k=n(9602),T=n(3238),S=n(5895),M=n(6257),I=n(1948),E=n(4246),O=n(9299),L=n(6e3),P=n(5861),D=n(7582),A=n(9549),N=n(9933),q=n(8259),Y=n(2340),R=n(1363),F=n(4650),U=n(5089),Z=n(8460),H=n(529),j=n(6554);let z=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(Y.N.baseUrl+"/requests/client-certificate",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addSignedFile(e){return new Promise(((t,n)=>{this.localFetch.postFile(Y.N.baseUrl+"/requests/client-certificate/upload-file-signed",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addFiles(e){return new Promise(((t,n)=>{this.localFetch.postFile(Y.N.baseUrl+"/requests/client-certificate/upload-files",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(Y.N.baseUrl+"/requests/client-certificate/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOtp(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(Y.N.baseUrl+"/requests/client-certificate/otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendPassword(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(Y.N.baseUrl+"/requests/client-certificate/password",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}preRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(Y.N.baseUrl+"/pre-request/client-certificate",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{let i="/requests/client-certificate/otp";Y.N.scraperMock&&(i="/mockscrapper/requests/client-certificate/otp"),this.localFetch.postFetchWhitoutToken(Y.N.baseUrl+i,e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(F.LFG(U.F),F.LFG(H.eN),F.LFG(j.r))},e.ɵprov=F.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var B=n(5412),J=n(833),V=n(4302),Q=n(6830),W=n(3731);function G(e,t){if(1&e&&(F.TgZ(0,"span"),F._uU(1),F.qZA()),2&e){const e=F.oxw(3);F.xp6(1),F.hij("¿No has recibido el código? Solicítalo de nuevo en ",e.secsCount," segundos")}}function $(e,t){if(1&e&&(F.TgZ(0,"span"),F._uU(1),F.qZA()),2&e){const e=F.oxw(3);F.xp6(1),F.AsE("¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? Solicítalo de nuevo en ",e.secsCount," segundos")}}const K=function(e,t,n){return{color:e,border:t,background:n}};function X(e,t){if(1&e&&(F.ynx(0),F.TgZ(1,"small",13),F.YNc(2,G,2,1,"span",7),F.YNc(3,$,2,2,"span",7),F.qZA(),F.BQk()),2&e){const e=F.oxw(2);F.xp6(1),F.Q6J("ngStyle",F.kEZ(3,K,e.data.styles.colors.accentColor,"1px solid "+e.data.styles.colors.accentColor,e.data.styles.colors.accentBgColor)),F.xp6(1),F.Q6J("ngIf",!e.lastNumberPhone),F.xp6(1),F.Q6J("ngIf",e.lastNumberPhone)}}function ee(e,t){1&e&&(F.TgZ(0,"span"),F._uU(1," ¿No has recibido el código en tu teléfono? "),F.qZA())}function te(e,t){if(1&e&&(F.TgZ(0,"span"),F._uU(1),F.qZA()),2&e){const e=F.oxw(3);F.xp6(1),F.hij(" ¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? ")}}const ne=function(e,t){return{color:e,background:t}};function ie(e,t){if(1&e){const e=F.EpF();F.ynx(0),F.TgZ(1,"small",13),F.YNc(2,ee,2,0,"span",7),F.YNc(3,te,2,1,"span",7),F.TgZ(4,"a",14),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw(2);return F.KtG(t.resendOTP())})),F._uU(5,"Reenviar"),F.qZA()(),F.BQk()}if(2&e){const e=F.oxw(2);F.xp6(1),F.Q6J("ngStyle",F.kEZ(4,K,e.data.styles.colors.dangerColor,"1px solid "+e.data.styles.colors.dangerColor,e.data.styles.colors.dangerBgColor)),F.xp6(1),F.Q6J("ngIf",!e.lastNumberPhone),F.xp6(1),F.Q6J("ngIf",e.lastNumberPhone),F.xp6(1),F.Q6J("ngStyle",F.WLB(8,ne,e.data.styles.colors.dangerTextButtonColor,e.data.styles.colors.dangerColor))}}function se(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"form",2)(1,"div",3),F._UZ(2,"div",4)(3,"div",5),F.ALo(4,"safeHtml"),F.TgZ(5,"div",6),F.YNc(6,X,4,7,"ng-container",7),F.YNc(7,ie,6,11,"ng-container",7),F.qZA(),F.TgZ(8,"div",8)(9,"mat-form-field",9)(10,"mat-label"),F._uU(11," Código OTP "),F.qZA(),F.TgZ(12,"input",10),F.NdJ("change",(function(t){F.CHM(e);const n=F.oxw();return F.KtG(n.capturePasteEvent(t))}))("keyup",(function(t){F.CHM(e);const n=F.oxw();return F.KtG(n.setInputEvent(t))})),F.qZA()()()(),F.TgZ(13,"div",11)(14,"button",12),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.nextStep())})),F._uU(15,"Siguiente"),F.qZA()()()}if(2&e){const e=F.oxw();F.Q6J("formGroup",e.form),F.xp6(2),F.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),F.Q6J("innerHTML",e.texts.otp.title,F.oJD),F.xp6(1),F.Udp("color",e.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,18,e.texts.otp.description||""),F.oJD),F.xp6(3),F.Q6J("ngIf",e.secsCount&&e.secsCount>0),F.xp6(1),F.Q6J("ngIf",!e.secsCount||e.secsCount<=0),F.xp6(7),F.Udp("color",e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),F.Q6J("disabled",e.form.invalid)}}function re(e,t){if(1&e&&(F.TgZ(0,"div",15),F._UZ(1,"mat-progress-spinner",16),F.TgZ(2,"p",17),F._uU(3),F.qZA()()),2&e){const e=F.oxw();F.xp6(3),F.Oqu(e.loading)}}let oe=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.solucitudesService=n,this.activeRoute=i,this.next=new F.vpe(null),this.errPhone=new F.vpe(null),this.resendO=new F.vpe(null),this.secsCount=60,this.lastNumberPhone="XXX"}ngOnInit(){this.form=this.fb.group({code1:[null,[p.kI.required,p.kI.maxLength(6),p.kI.minLength(6)]]}),this.initSecsInterval(),this.activeRoute.queryParams.subscribe((e=>{e&&e.request_id&&(this.requestID=e.request_id)}),(e=>{console.error(e)})),this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastNumberPhone=t}initSecsInterval(){this.interv=setInterval((()=>{this.secsCount--,this.secsCount<=0&&this.finishSecsInterval()}),1e3)}finishSecsInterval(){this.interv&&clearInterval(this.interv)}nextStep(){let e={code:this.getCode()};this.next.emit(e)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){return(0,P.Z)((function*(){}))()}errorStep(){this.errPhone.emit(!0)}setInputEvent(e){""!=e.target.value?q(e.target).next().focus():"Backspace"==e.code&&q(e.target).prev().focus()}resendOTP(){this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.QS),F.Y36(U.F),F.Y36(_.M),F.Y36(O.gz))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-otp-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","gap-2","items-center","justify-start","w-full","max-w-[200px]"],["appearance","outline",1,"w-full","flex-1"],["tabindex","1","maxlength","6","minlength","1","formControlName","code1","type","text","matInput","",3,"change","keyup"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"info-time","w-fit",3,"ngStyle"],[1,"ml-4",3,"ngStyle","click"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(F.YNc(0,se,16,20,"form",0),F.YNc(1,re,4,1,"div",1)),2&e&&(F.Q6J("ngIf",!t.loading),F.xp6(1),F.Q6J("ngIf",t.loading))},dependencies:[i.O5,i.PC,u.lW,A.KE,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.nD,p.sg,p.u,y.Ou,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var ae=n(342);function le(e,t){if(1&e&&(F.TgZ(0,"div",3),F._UZ(1,"div",4)(2,"div",5),F.ALo(3,"safeHtml"),F.qZA()),2&e){const e=F.oxw();F.xp6(1),F.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),F.Q6J("innerHTML",e.texts.success.title,F.oJD),F.xp6(1),F.Udp("color",e.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(3,8,e.texts.success.description||""),F.oJD)}}function ce(e,t){if(1&e&&F._UZ(0,"widget-documents",6),2&e){const e=F.oxw();F.Q6J("userId",e.userId)("packId",e.packId)("requestID",e.requestID)}}function de(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div",7)(1,"button",8),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.gotoRedirect())})),F._uU(2),F.qZA()()}if(2&e){const e=F.oxw();F.xp6(1),F.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),F.xp6(1),F.hij(" ",e.data.ClientCertificate.btnTextCallBack||"Haga click aquí para finalizar"," ")}}let ue=(()=>{class e{constructor(e){this.utils=e,this.showDocuments=!1}ngOnInit(){this.data.ClientCertificate.enableUrlCallBack&&this.data.ClientCertificate.automaticRedirectCallBack&&this.data.ClientCertificate.callBackUrl?setTimeout((()=>{location.assign(this.data.ClientCertificate.callBackUrl)}),2e3):this.data.ClientCertificate.showDocumentsOnSuccess&&(this.showDocuments=!0)}gotoRedirect(){this.data.ClientCertificate.enableUrlCallBack&&this.data.ClientCertificate.callBackUrl&&location.assign(this.data.ClientCertificate.callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(F.Y36(U.F))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",loading:"loading",packId:"packId",requestID:"requestID",userId:"userId"},decls:3,vars:3,consts:[["class","pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],[3,"userId","packId","requestID",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"userId","packId","requestID"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(F.YNc(0,le,4,10,"div",0),F.YNc(1,ce,1,3,"widget-documents",1),F.YNc(2,de,3,7,"div",2)),2&e&&(F.Q6J("ngIf",!t.data.config.infiniteLoopInCompleted),F.xp6(1),F.Q6J("ngIf",t.showDocuments),F.xp6(1),F.Q6J("ngIf",t.data.ClientCertificate.enableUrlCallBack))},dependencies:[i.O5,u.lW,ae.A,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function he(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div",5)(1,"button",6),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.retry())})),F._uU(2,"Intentarlo nuevamente"),F.qZA()()}if(2&e){const e=F.oxw();F.xp6(1),F.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function pe(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div",5)(1,"button",6),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.newRequest())})),F._uU(2,"Crear nueva solicitud"),F.qZA()()}if(2&e){const e=F.oxw();F.xp6(1),F.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}let me=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.retryOp=new F.vpe(null),this.newReq=new F.vpe(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.QS),F.Y36(U.F),F.Y36(_.M),F.Y36(v.o),F.Y36(S.T))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",loading:"loading",solicitud:"solicitud"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(F.TgZ(0,"div",0)(1,"div",1),F._UZ(2,"div",2)(3,"div",3),F.ALo(4,"safeHtml"),F.qZA(),F.YNc(5,he,3,6,"div",4),F.YNc(6,pe,3,6,"div",4),F.qZA()),2&e&&(F.xp6(2),F.Q6J("innerHTML",t.texts.fail.title,F.oJD),F.xp6(1),F.Udp("color",t.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,6,t.texts.fail.description),F.oJD),F.xp6(2),F.Q6J("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),F.xp6(1),F.Q6J("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[i.O5,u.lW,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function fe(e,t){if(1&e&&(F.TgZ(0,"span",7),F._uU(1),F.qZA()),2&e){const e=F.oxw();F.xp6(1),F.hij("El archivo no puede pesar mas de ",e.max/1e3,"MB")}}function ge(e,t){if(1&e&&(F.TgZ(0,"span"),F._uU(1),F.qZA()),2&e){const e=F.oxw();F.xp6(1),F.AsE("",e.fileName," ",e.fileSize?"("+e.fileSize+"Kb)":"","")}}n(6866);const _e=function(e,t){return{"bg-red-500/20":e,"bg-slate-100/80":t}};let be=(()=>{class e{constructor(e){this.formBuilder=e,this.file=null,this.fileName="No se ha seleccionado ningun archivo",this.fileSize=0,this.acceptFiles="image/jpeg, image/jpg, application/pdf",this.max=1e4,this.newItemEvent=new F.vpe(null),this.toBase64=e=>new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=n}))}ngOnInit(){this.uploadForm=this.formBuilder.group({file:[""]})}fileChange(e){const t=e.target.files[0];this.uploadForm.patchValue({file:t}),this.uploadForm.get("file").updateValueAndValidity();const n=new FormData;let i=this.uploadForm.get("file").value;this.fileName=i.name,this.fileSize=+(+i.size/1e3).toFixed(1),n.append("file",i),console.warn(this.uploadForm.get("file").value),console.error(t),t.size<=3e6&&this.newItemEvent.emit({file:t}),this.newItemEvent.emit(n)}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.qu))},e.ɵcmp=F.Xpm({type:e,selectors:[["app-upload-file"]],inputs:{label:"label",acceptFiles:"acceptFiles",max:"max"},outputs:{newItemEvent:"change"},decls:11,vars:9,consts:[[1,"flex","flex-col","items-start","input-file-wrapper","my-1",3,"formGroup","ngClass"],["hidden","true","onclick","this.value=null","type","file","name","file",3,"accept","change"],["fileInput",""],[1,"flex","items-center","justify-start","mt-3"],["mat-flat-button","","color","accent",1,"btn-file",3,"click"],["class","text-red-500",4,"ngIf"],[4,"ngIf"],[1,"text-red-500"]],template:function(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"form",0)(1,"mat-label"),F._uU(2),F.qZA(),F.TgZ(3,"input",1,2),F.NdJ("change",(function(e){return t.fileChange(e)})),F.qZA(),F.TgZ(5,"div",3)(6,"button",4),F.NdJ("click",(function(){F.CHM(e);const t=F.MAs(4);return F.KtG(t.click())})),F._uU(7,"Seleccionar archivo"),F.qZA(),F._uU(8," "),F.YNc(9,fe,2,1,"span",5),F.YNc(10,ge,2,2,"span",6),F.qZA()()}2&e&&(F.Q6J("formGroup",t.uploadForm)("ngClass",F.WLB(6,_e,!t.fileName||t.fileSize>3e3,t.fileName&&t.fileSize<=3e3)),F.xp6(2),F.Oqu(t.label),F.xp6(1),F.Q6J("accept",t.acceptFiles),F.xp6(6),F.Q6J("ngIf",t.fileSize>t.max),F.xp6(1),F.Q6J("ngIf",t.fileSize<=t.max))},dependencies:[i.mk,i.O5,p._Y,p.JL,p.sg,A.hX,u.lW],styles:["button[aria-pressed=true][_ngcontent-%COMP%]{color:red!important}.btn-file[_ngcontent-%COMP%]{max-width:200px}.input-file-wrapper[_ngcontent-%COMP%]{padding:.7rem .5rem .7rem 1rem;border-radius:5px;border:2px dashed rgba(0,0,0,.1)}"]}),e})();function ve(e,t){if(1&e&&(F.TgZ(0,"mat-hint",21),F._uU(1),F.qZA()),2&e){const e=F.oxw(2);F.xp6(1),F.Oqu(e.errorDNI)}}function ye(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"form",2)(1,"div",3),F._UZ(2,"div",4)(3,"div",5),F.ALo(4,"safeHtml"),F.qZA(),F.TgZ(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),F._uU(8,"Nombre de la persona responsable"),F.qZA(),F._UZ(9,"input",8),F.qZA(),F.TgZ(10,"mat-form-field",7)(11,"mat-label"),F._uU(12,"Primer apellido de la persona responsable"),F.qZA(),F._UZ(13,"input",9),F.qZA(),F.TgZ(14,"mat-form-field",7)(15,"mat-label"),F._uU(16,"Segundo apellido de la persona responsable"),F.qZA(),F._UZ(17,"input",10),F.qZA(),F.TgZ(18,"mat-form-field",7)(19,"mat-label"),F._uU(20,"Email"),F.qZA(),F._UZ(21,"input",11),F.qZA(),F.TgZ(22,"mat-form-field",7)(23,"mat-label"),F._uU(24,"Teléfono"),F.qZA(),F._UZ(25,"input",12),F.qZA(),F.TgZ(26,"mat-form-field",7)(27,"mat-label"),F._uU(28,"Número de documento de identificación"),F.qZA(),F._UZ(29,"input",13),F.YNc(30,ve,2,1,"mat-hint",14),F.qZA(),F.TgZ(31,"mat-form-field",7)(32,"mat-label"),F._uU(33,"Razón social"),F.qZA(),F._UZ(34,"input",15),F.qZA(),F.TgZ(35,"mat-form-field",7)(36,"mat-label"),F._uU(37,"CIF"),F.qZA(),F._UZ(38,"input",16),F.qZA(),F.TgZ(39,"app-upload-file",17),F.NdJ("change",(function(t){F.CHM(e);const n=F.oxw();return F.KtG(n.setAnvers(t))})),F.qZA(),F.TgZ(40,"app-upload-file",18),F.NdJ("change",(function(t){F.CHM(e);const n=F.oxw();return F.KtG(n.setRevers(t))})),F.qZA()(),F.TgZ(41,"div",19)(42,"button",20),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.nextStep())})),F._uU(43," Siguiente "),F.qZA()()()}if(2&e){const e=F.oxw();F.Q6J("formGroup",e.form),F.xp6(2),F.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),F.Q6J("innerHTML",e.texts.form.title,F.oJD),F.xp6(1),F.Udp("color",e.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,51,e.texts.form.description||""),F.oJD),F.xp6(3),F.Gre("",e.disabledInputs.name?"disabled-input":""," w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.name?-1:1),F.xp6(1),F.Gre("",e.disabledInputs.lastname?"disabled-input":""," w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.lastname?-1:1),F.xp6(1),F.Gre("",e.disabledInputs.secondlastname?"disabled-input":""," w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.secondlastname?-1:1),F.xp6(1),F.Gre("",e.disabledInputs.email?"disabled-input":""," w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.email?-1:1),F.xp6(1),F.Gre("",e.disabledInputs.phone?"disabled-input":""," w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.phone?-1:1),F.xp6(1),F.Gre("",e.disabledInputs.dni?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.dni?-1:1),F.xp6(1),F.Q6J("ngIf",e.errorDNI),F.xp6(1),F.Gre("",e.disabledInputs.razon?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.razon?-1:1),F.xp6(1),F.Gre("",e.disabledInputs.cif?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.cif?-1:1),F.xp6(1),F.Q6J("max",2e3),F.xp6(1),F.Q6J("max",2e3),F.xp6(2),F.Udp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),F.Q6J("disabled",e.form.invalid)}}function we(e,t){if(1&e&&(F.TgZ(0,"div",22),F._UZ(1,"mat-progress-spinner",23),F.TgZ(2,"p",24),F._uU(3),F.qZA()()),2&e){const e=F.oxw();F.xp6(3),F.hij(" ",e.loading," ")}}const xe={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Ce=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.cd=n,this.next=new F.vpe(null),this.disabledInputs={dni:!1,name:!1,lastname:!1,secondlastname:!1,phone:!1,email:!1,razon:!1,cif:!1,type:!1}}ngOnInit(){this.setForm(this.solicitud?this.solicitud:null)}setForm(e){let t=e&&e.person_name?e.person_name:null,n=e&&(e.email||e.email_copy)?e.email||e.email_copy:null,i=e&&e.person_last_name?e.person_last_name:null,s=e&&e.person_last_name2?e.person_last_name2:null,r=e?e.person_document_number||e.document_number:null,o=e&&e.razon_social?e.razon_social:null,a=e&&e.cif?e.cif:null,l=e&&e.phone?e.phone:null;this.form=this.fb.group({name:[t||null,[p.kI.required]],lastname:[i||null,[p.kI.required]],lastname2:[s||null],dni:[r||null,[p.kI.required,p.kI.maxLength(9),p.kI.minLength(9),this.regexDNI()]],razon:[o||null,[p.kI.required]],email:[n,[p.kI.required,p.kI.email]],phone:[l,[p.kI.required]],cif:[a||null,[p.kI.required,p.kI.minLength(9),p.kI.maxLength(9)]],document_front:[null,[p.kI.required]],document_back:[null,[p.kI.required]]}),this.requestIDFromURL&&this.disableEnableInputs(!1,t,i,s,n,l,r,o,a),this.cd.markForCheck()}disableEnableInputs(e,t,n,i,s,r,o,a,l){this.disabledInputs={name:t||!1,lastname:n||!1,secondlastname:i||!1,email:s||!1,phone:r||!1,dni:o||!1,razon:a||!1,cif:l||!1,type:e||!1}}if(e){this.setRegex(e)}regexDNI(){return e=>{const t=e.value;return t?(this.setRegex(t),this.isDni||this.isNie?null:{regexDNI:!0}):null}}setRegex(e){e&&(this.isDni=!!e.toUpperCase().match(/^(\d{8})([A-Z])$/),this.isNie=!!e.toUpperCase().match(/^[XYZ]\d{7,8}[A-Z]$/),console.warn(this.isDni,this.isNie),this.errorDNI=this.isDni||this.isNie?null:"Debes ingresar un DNI o NIE válido!",this.cd.markForCheck())}setAnvers(e){e&&e.file&&this.form.patchValue({document_front:e.file})}setRevers(e){e&&e.file&&this.form.patchValue({document_back:e.file})}nextStep(){let e={name:this.form.get("name").value,lastname:this.form.get("lastname").value,lastname2:this.form.get("lastname2").value,dni:this.form.get("dni").value,company_name:this.form.get("razon").value,cif:this.form.get("cif").value,document_front:this.form.get("document_front").value,document_back:this.form.get("document_back").value,first_surname:this.form.get("lastname").value,second_surname:this.form.get("lastname2").value,email_copy:this.form.get("email").value,phone:this.form.get("phone").value,document_number:this.form.get("dni").value,check_legal:!0,type:"LEGAL",rmc_validation:!0,validation_id:!0};this.data.config.activatePower&&(e.power_activate=1),this.next.emit(e)}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.QS),F.Y36(U.F),F.Y36(F.sBO))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-form-step"]],inputs:{data:"data",flowName:"flowName",texts:"texts",solicitud:"solicitud",loading:"loading",requestIDFromURL:"requestIDFromURL"},outputs:{next:"nextStep"},features:[F._Bn([{provide:T.sG,useValue:xe},{provide:F.soG,useValue:"es-ES"}])],decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline"],["formControlName","name","matInput","",3,"tabindex"],["formControlName","lastname","matInput","",3,"tabindex"],["formControlName","lastname2","matInput","",3,"tabindex"],["formControlName","email","matInput","",3,"tabindex"],["formControlName","phone","maxlength","9","matInput","",3,"tabindex"],["formControlName","dni","maxlength","9","placeholder","Ej: 12345678R","matInput","",3,"tabindex"],["class","text-xs text-red-500",4,"ngIf"],["formControlName","razon","placeholder","Ej: Mi Empresa","type","text","matInput","",3,"tabindex"],["formControlName","cif","maxlength","9","placeholder","Ej: B12345678","type","text","matInput","",3,"tabindex"],["label","Anverso documento de identificación (Max 2MB)",1,"w-full",3,"max","change"],["label","Reverso documento de identificación (Max 2MB)",1,"w-full",3,"max","change"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-xs","text-red-500"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(F.YNc(0,ye,44,53,"form",0),F.YNc(1,we,4,1,"div",1)),2&e&&(F.Q6J("ngIf",!t.loading),F.xp6(1),F.Q6J("ngIf",t.loading))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.nD,p.sg,p.u,y.Ou,be,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),ke=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts",loading:"loading"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(F.TgZ(0,"form",0)(1,"div",1),F._UZ(2,"div",2)(3,"div",3),F.ALo(4,"safeHtml"),F.qZA()()),2&e&&(F.xp6(2),F.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),F.Q6J("innerHTML",t.texts.noService.title,F.oJD),F.xp6(1),F.Udp("color",t.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,8,t.texts.noService.description),F.oJD))},dependencies:[p._Y,p.JL,p.F,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Te=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.retryOp=new F.vpe(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return"Abandonado después de esperar OTP de Seguridad Social";case"abandoned_after_invalid_otp_seguridad_social":return"Abandonado despues de OTP inválido en Seguridad Social";case"abandoned_after_invalid_otp_aeat":return"Abandonado despues de OTP inválido en AEAT";case"abandoned_after_waiting_otp_aeat":return"Abandonado después de esperar OTP de AEAT";default:return this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.QS),F.Y36(U.F),F.Y36(_.M),F.Y36(v.o),F.Y36(S.T))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",loading:"loading",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:10,vars:17,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-2","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-md","mb-2","mt-2"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(F.TgZ(0,"div",0)(1,"div",1),F._UZ(2,"div",2)(3,"div",3),F.ALo(4,"safeHtml"),F.TgZ(5,"div",4),F._uU(6),F.qZA()(),F.TgZ(7,"div",5)(8,"button",6),F.NdJ("click",(function(){return t.retry()})),F._uU(9,"Intentarlo nuevamente"),F.qZA()()()),2&e&&(F.xp6(2),F.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),F.Q6J("innerHTML",t.texts.abandoned.title,F.oJD),F.xp6(1),F.Udp("color",t.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,15,t.texts.abandoned.description),F.oJD),F.xp6(3),F.hij(" Estado: ",t.getTextStatus()," "),F.xp6(2),F.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Se(e,t){return n=>{const i=n.controls[t];i.errors&&!i.errors.confirmedValidator||i.setErrors(n.controls[e].value!==i.value?{confirmedValidator:!0}:null)}}function Me(e,t){1&e&&(F.TgZ(0,"mat-hint",14),F._uU(1," La contraseña es requerida "),F.qZA())}function Ie(e,t){1&e&&(F.TgZ(0,"mat-hint",14),F._uU(1," La contraseña debe tener al menos 8 carácteres "),F.qZA())}function Ee(e,t){1&e&&(F.TgZ(0,"mat-hint",14),F._uU(1," Es necesario repetir la contraseña "),F.qZA())}function Oe(e,t){1&e&&(F.TgZ(0,"mat-hint",14),F._uU(1," Las contraseñas deben coincidir "),F.qZA())}function Le(e,t){1&e&&(F.TgZ(0,"mat-hint",14),F._uU(1," La contraseña debe tener al menos 8 carácteres "),F.qZA())}function Pe(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"form",2)(1,"div",3),F._UZ(2,"div",4)(3,"div",5),F.ALo(4,"safeHtml"),F.qZA(),F.TgZ(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),F._uU(8,"Contraseña"),F.qZA(),F._UZ(9,"input",8),F.YNc(10,Me,2,0,"mat-hint",9),F.YNc(11,Ie,2,0,"mat-hint",9),F.qZA(),F.TgZ(12,"mat-form-field",10)(13,"mat-label"),F._uU(14,"Repite Contraseña"),F.qZA(),F._UZ(15,"input",11),F.YNc(16,Ee,2,0,"mat-hint",9),F.YNc(17,Oe,2,0,"mat-hint",9),F.YNc(18,Le,2,0,"mat-hint",9),F.qZA()(),F.TgZ(19,"div",12)(20,"button",13),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.nextStep())})),F._uU(21," Guardar "),F.qZA()()()}if(2&e){const e=F.oxw();F.Q6J("formGroup",e.form),F.xp6(2),F.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),F.Q6J("innerHTML",e.texts.password.title,F.oJD),F.xp6(1),F.Udp("color",e.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,21,e.texts.password.description),F.oJD),F.xp6(7),F.Q6J("ngIf",e.f.password.touched&&e.f.password.invalid&&e.f.password.errors.required),F.xp6(1),F.Q6J("ngIf",e.f.password.invalid&&e.f.password.errors.minlength),F.xp6(5),F.Q6J("ngIf",e.f.confirm_password.touched&&e.f.confirm_password.touched&&e.f.confirm_password.invalid&&e.f.confirm_password.errors.required),F.xp6(1),F.Q6J("ngIf",e.f.confirm_password.touched&&e.f.confirm_password.touched&&e.f.confirm_password.invalid&&e.f.confirm_password.errors.confirmedValidator),F.xp6(1),F.Q6J("ngIf",e.f.confirm_password.invalid&&e.f.confirm_password.errors.minlength),F.xp6(2),F.Udp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),F.Q6J("disabled",e.form.invalid)}}function De(e,t){if(1&e&&(F.TgZ(0,"div",15),F._UZ(1,"mat-progress-spinner",16),F.TgZ(2,"p",17),F._uU(3),F.qZA()()),2&e){const e=F.oxw();F.xp6(3),F.hij(" ",e.loading," ")}}const Ae={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Ne=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.form=new p.cw({}),this.next=new F.vpe(null)}ngOnInit(){this.setForm()}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({password:["",[p.kI.required]],confirm_password:["",[p.kI.required]]},{validator:Se("password","confirm_password")})}nextStep(){this.next.emit(this.form.get("password").value)}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.qu),F.Y36(U.F))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-password-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading"},outputs:{next:"nextStep"},features:[F._Bn([{provide:T.sG,useValue:Ae},{provide:F.soG,useValue:"es-ES"}])],decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","password","minlength","8","type","password","matInput",""],["class","text-red-500",4,"ngIf"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","confirm_password","minlength","8","type","password","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-red-500"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(F.YNc(0,Pe,22,23,"form",0),F.YNc(1,De,4,1,"div",1)),2&e&&(F.Q6J("ngIf",!t.loading),F.xp6(1),F.Q6J("ngIf",t.loading))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.sg,p.u,y.Ou,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var qe=n(1763),Ye=n(5696);function Re(e,t){1&e&&F._UZ(0,"mat-icon",14)}function Fe(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div")(1,"belender-checkbox",11),F.NdJ("changeCheckbox",(function(t){F.CHM(e);const n=F.oxw(2);return F.KtG(n.setTerms(t))})),F.TgZ(2,"belender-terms-and-policy-links",12),F.NdJ("goToTerms",(function(t){F.CHM(e);const n=F.oxw(2);return F.KtG(n.gotoTermsAndConditions(t))})),F.qZA()(),F.YNc(3,Re,1,0,"mat-icon",13),F.qZA()}if(2&e){const e=F.oxw(2);F.Gre("mt-8 flex justify-between items-center w-full flex-100 ",e.errorType.termsRead||e.errorType.acceptTerms?"bg-orange-500/10 ":""," pr-4 rounded-sm"),F.xp6(1),F.Q6J("color",e.data.styles.colors.title),F.xp6(1),F.Q6J("userId",e.userId)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink),F.xp6(1),F.Q6J("ngIf",e.errorType.termsRead||e.errorType.acceptTerms)}}function Ue(e,t){1&e&&F._UZ(0,"mat-icon",14)}function Ze(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div")(1,"belender-checkbox",11),F.NdJ("changeCheckbox",(function(t){F.CHM(e);const n=F.oxw(2);return F.KtG(n.setPower(t))})),F._uU(2," Consiento expresamente a la activación de un poder digital según las condiciones que pueden verse "),F.TgZ(3,"a",15),F.NdJ("click",(function(t){F.CHM(e);const n=F.oxw(2);return F.KtG(n.gotoPowerConditions(t))})),F.TgZ(4,"u"),F._uU(5,"aquí"),F.qZA()()(),F.YNc(6,Ue,1,0,"mat-icon",13),F.qZA()}if(2&e){const e=F.oxw(2);F.Gre("flex justify-between items-center w-full flex-100 ",e.errorType.termsRead||e.errorType.powerAccept?"bg-orange-500/10 ":"",""),F.xp6(1),F.Q6J("color",e.data.styles.colors.title),F.xp6(5),F.Q6J("ngIf",e.errorType.powerAccept)}}function He(e,t){1&e&&F._UZ(0,"mat-icon",14)}function je(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div")(1,"belender-checkbox",11),F.NdJ("changeCheckbox",(function(t){F.CHM(e);const n=F.oxw(2);return F.KtG(n.setAssignment(t))})),F._UZ(2,"div",16),F.qZA(),F.YNc(3,He,1,0,"mat-icon",13),F.qZA()}if(2&e){const e=F.oxw(2);F.Gre("flex justify-between items-center w-full flex-100 ",e.errorType.assignment?"bg-orange-500/10 ":""," pr-4 rounded-sm"),F.xp6(1),F.Q6J("color",e.data.styles.colors.title),F.xp6(1),F.Q6J("innerHTML",null==e.data?null:e.data.config.dataAssignmentText,F.oJD),F.xp6(1),F.Q6J("ngIf",e.errorType.assignment)}}function ze(e,t){if(1&e&&(F.TgZ(0,"div",19),F._UZ(1,"mat-icon",20),F._uU(2),F.qZA()),2&e){const e=F.oxw().$implicit;F.xp6(2),F.hij(" ",e," ")}}function Be(e,t){if(1&e&&(F.ynx(0),F.YNc(1,ze,3,1,"div",18),F.BQk()),2&e){const e=t.index;F.xp6(1),F.Q6J("ngIf",e<3)}}function Je(e,t){if(1&e&&(F.ynx(0),F.YNc(1,Be,2,1,"ng-container",17),F.BQk()),2&e){const e=F.oxw(2);F.xp6(1),F.Q6J("ngForOf",e.errors)}}function Ve(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div",2)(1,"div",3),F._UZ(2,"div",4)(3,"div",5),F.ALo(4,"safeHtml"),F.qZA(),F.TgZ(5,"div",6),F.YNc(6,Fe,4,7,"div",7),F.YNc(7,Ze,7,5,"div",7),F.YNc(8,je,4,6,"div",7),F.qZA(),F.YNc(9,Je,2,1,"ng-container",8),F.TgZ(10,"div",9)(11,"button",10),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.nextStep())})),F._uU(12,"Siguiente"),F.qZA()()()}if(2&e){const e=F.oxw();F.xp6(2),F.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),F.Q6J("innerHTML",e.texts.tyc.title,F.oJD),F.xp6(1),F.Udp("color",e.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,19,e.texts.tyc.description||""),F.oJD),F.xp6(3),F.Q6J("ngIf",!e.data.config.hideCheckLegal),F.xp6(1),F.Q6J("ngIf",e.requestID?null==e.solicitud?null:e.solicitud.power_activate:null==e.data?null:e.data.config.activatePower),F.xp6(1),F.Q6J("ngIf",null==e.data?null:e.data.config.dataAssignmentCheck),F.xp6(1),F.Q6J("ngIf",e.errors&&e.errors.length),F.xp6(2),F.Udp("color",e.getErrorValidation()?"":e.data.styles.colors.btnText)("background",e.getErrorValidation()?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),F.Q6J("disabled",e.getErrorValidation())}}function Qe(e,t){if(1&e&&(F.TgZ(0,"div",21),F._UZ(1,"mat-progress-spinner",22),F.TgZ(2,"p",23),F._uU(3),F.qZA()()),2&e){const e=F.oxw();F.xp6(3),F.Oqu(e.loading)}}let We=(()=>{class e{constructor(e){this.utils=e,this.requestID=null,this.powerAccepted=!1,this.next=new F.vpe(null),this.goTerms=new F.vpe(null),this.goTermsCert=new F.vpe(null),this.gotoPower=new F.vpe(null),this.acceptTerms=!1,this.acceptTerms2=!0,this.powerActivate=!1,this.termsReaded=!1,this.terms2Readed=!0,this.assignment=!1,this.errors=[],this.errorType={termsRead:!1,terms2Read:!1,powerRead:!1,powerAccept:!1,acceptTerms:!1,acceptTerms2:!1,assignment:!1,acceptPower:!1}}ngOnInit(){}nextStep(){this.next.emit(this.powerActivate)}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.termsReaded=!0,this.goTerms.emit(!0)}gotoTermsAndConditionsCertificate(e){e.preventDefault(),e.stopPropagation(),this.terms2Readed=!0,this.goTermsCert.emit(!0)}gotoPowerConditions(e){e.preventDefault(),e.stopPropagation(),this.gotoPower.emit(!0)}setAssignment(e){this.assignment=e}setPower(e){this.powerActivate=e}setTerms(e){this.acceptTerms=e}setTerms2(e){this.acceptTerms2=e}getErrorValidation(){this.errors=[],this.errorType={termsRead:!1,terms2Read:!1,powerRead:!1,powerAccept:!1,acceptTerms:!1,acceptTerms2:!1,assignment:!1,acceptPower:!1};let e=!1;return this.data.config.forceChecks&&(!this.termsReaded&&!this.data.config.hideCheckLegal&&(this.errors.push("Debe leer los términos y condiciones del servicio"),this.errorType.termsRead=!0,e=!0),this.terms2Readed||(this.errors.push("Debe leer los términos y condiciones para la emisión de certificado"),this.errorType.terms2Read=!0,e=!0)),!this.acceptTerms&&!this.data.config.hideCheckLegal&&(this.errors.push("Debe aceptar los términos y condiciones del servicio"),this.errorType.acceptTerms=!0,e=!0),this.acceptTerms2||(this.errors.push("Debe aceptar los términos y condiciones para la emisión de certificado"),this.errorType.acceptTerms2=!0,e=!0),this.data.config.dataAssignmentCheck&&!this.assignment&&(this.errors.push("Debe consentir la activación de un poder digital registrado en el REA"),this.errorType.assignment=!0,e=!0),(this.requestID?this.solicitud?.power_activate:this.data?.config.activatePower)&&(this.powerActivate||(this.errors.push("Debe consentir la activación de un poder digital registrado en el REA"),this.errorType.powerAccept=!0,e=!0)),e}}return e.ɵfac=function(t){return new(t||e)(F.Y36(U.F))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-terms-step"]],inputs:{userId:"userId",requestID:"requestID",data:"data",texts:"texts",solicitud:"solicitud",loading:"loading",powerAccepted:"powerAccepted"},outputs:{next:"nextStep",goTerms:"goToTerms",goTermsCert:"goToTermsCertificate",gotoPower:"gotoPowerConditions"},decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],[3,"class",4,"ngIf"],[4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"color","changeCheckbox"],[3,"userId","showPolicyLink","goToTerms"],["class","text-xs w-4 h-4 text-orange-500","svgIcon","mat:warning",4,"ngIf"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4","text-orange-500"],["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],[1,"custom-html",3,"innerHTML"],[4,"ngFor","ngForOf"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500 ",4,"ngIf"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(F.YNc(0,Ve,13,21,"div",0),F.YNc(1,Qe,4,1,"div",1)),2&e&&(F.Q6J("ngIf",!t.loading),F.xp6(1),F.Q6J("ngIf",t.loading))},dependencies:[i.sg,i.O5,d.Hw,u.lW,y.Ou,qe.b,Ye.T,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Ge=n(4468);function $e(e,t){1&e&&(F.TgZ(0,"div",12),F._UZ(1,"mat-icon",13),F._uU(2," Archivo firmado cargado "),F.qZA())}function Ke(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"button",14),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw(2);return F.KtG(t.onClickAutofirma())})),F._uU(1,"Firmar certificado"),F.qZA()}if(2&e){const e=F.oxw(2);F.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function Xe(e,t){1&e&&(F.TgZ(0,"div",15),F._UZ(1,"mat-progress-spinner",16),F.TgZ(2,"span",17),F._uU(3,"Esperando autofirma..."),F.qZA()())}function et(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"form",2)(1,"div",3)(2,"h1",4),F._uU(3,"HOJA DE ACEPTACIÓN DE CERTIFICADO ELECTRONICO CUALIFICADO RÉGIMEN OBLIGATORIO DE USO DEL CERTIFICADO ELECTRONICO: “CERTIFICADO DE PERSONA FÍSICA REPRESENTANTE DE EMPRESA EMITIDO EN SOFTWARE”"),F.qZA(),F.TgZ(4,"p"),F._uU(5," a) Que existen unas condiciones generales del servicio incorporadas en el texto de divulgación del certificado o PDS, y una declaración de prácticas de certificación, que regulan la emisión y utilización del certificado electrónico emitido porvinCAsign, cuyo texto íntegro se puede consultar en la dirección de Internet, https://policy.vincasign.net. "),F.qZA(),F.TgZ(6,"p"),F._uU(7," b) Que el certificado electrónico emitido y el resto de los elementos que forman parte de la identificación electrónica son únicos para cada usuario. El certificado debe ser protegido por un código secreto (PIN), que sólo conoce el titular y que le será entregado en el momento de la emisión del certificado. Para utilizar el certificado es imprescindible conocer este código. "),F.qZA(),F.TgZ(8,"p"),F._uU(9," c) Que este certificado permite al titular del certificado generar firmas electrónicas e identificarse de forma electrónica en aquellos sistemas de información que soporten este tipo de autenticación. "),F.qZA(),F.TgZ(10,"p"),F._uU(11," d) Que el FIRMANTE debe custodiar, de forma diligente, el PIN que permite utilizarlo, para evitar que otras personas puedan suplantar su identidad y firmar documentos en su nombre, o acceder a mensajes confidenciales o sistemas de información de acceso restringido. "),F.qZA(),F.TgZ(12,"p"),F._uU(13," e) Que, si el FIRMANTE detecta cualquier indicio de que su identificación electrónica ha podido ser utilizada por otras personas, tendrá que suspender el uso del certificado y notificarlo inmediatamente al responsable del servicio de certificación del SUSCRIPTOR, o a vinCAsign, para pedir la revocación del certificado y, en su caso, la emisión de uno nuevo. "),F.qZA(),F.TgZ(14,"p"),F._uU(15," f) Que ante cualquier necesidad de información adicional, respecto de la utilización de los certificados emitidos en nombre de vinCAsign, el FIRMANTE se podrá dirigir al SUSCRIPTOR, al responsable del servicio de certificación del SUSCRIPTOR, y/o a VINTEGRIS. "),F.qZA(),F.TgZ(16,"p"),F._uU(17," g) Que con el fin de obtener los correspondientes certificados, y dentro del marco del Reglamento (UE) 2016/679 del Parlamento Europeo y del Consejo de 27 de abril de 2016 relativo a la protección de las personas físicas en lo que respecta al tratamiento de datos personales y a la libre circulación de estos datos y por el que se deroga la Directiva 95/46/CE (Reglamento general de protección de datos), el SUSCRIPTOR ha comunicado a vinCAsign los datos identificativos del FIRMANTE con el fin de emitir y gestionar el certificado corporativo de persona física emitido en software, en el ámbito de la relación de trabajo entre dicho FIRMANTE y el SUSCRIPTOR, todo ello a los efectos de lo previsto en el artículo 28 del Reglamento general de protección de datos. "),F.qZA(),F.TgZ(18,"p"),F._uU(19," h) Que sabe que, en cumplimiento de lo establecido en los artículos 24.2 y 28 del Reglamento (UE) 910/2014 del Parlamento Europeo y del Consejo de 23 de julio de 2014, los datos contenidos en el certificado corporativo de persona física emitido en software están publicados en la página web de vinCAsign a efectos del Registro de Certificados y de las listas de revocación, toda vez que ha prestado su consentimiento durante el proceso de solicitud. "),F.qZA(),F.TgZ(20,"h1",5),F._uU(21," ACTO DE ACEPTACIÓN DEL CERTIFICADO ELECTRÓNICO "),F.qZA(),F.TgZ(22,"p"),F._uU(23," Firmo el presente documento para dejar constancia: "),F.qZA(),F.TgZ(24,"p"),F._uU(25," Que ha sido informado del contenido del texto de divulgación del certificado o PDS, en el que se incluyen las condiciones generales del servicio aplicable al certificado corporativo de persona física emitido en software. "),F.qZA(),F.TgZ(26,"p"),F._uU(27," Que ha sido informado del régimen obligatorio de uso del certificado emitido, sus condiciones de uso y sus responsabilidades. "),F.qZA(),F.TgZ(28,"p"),F._uU(29," Que ha sido informado de las circunstancias relativas al tratamiento de sus datos personales para la correcta emisión y gestión del certificado que se emite. "),F.qZA(),F.TgZ(30,"p"),F._uU(31," Firma de conformidad, en virtud de la cual ha leído y entiende las obligaciones y responsabilidades que asume. "),F.qZA(),F.TgZ(32,"div",6),F.YNc(33,$e,3,0,"div",7),F.YNc(34,Ke,2,6,"button",8),F.YNc(35,Xe,4,0,"div",9),F.qZA()(),F.TgZ(36,"div",10)(37,"button",11),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.nextStep())})),F._uU(38,"Completar"),F.qZA()()()}if(2&e){const e=F.oxw();F.Q6J("formGroup",e.form),F.xp6(33),F.Q6J("ngIf",e.signedFile&&!e.loadingAutofirma),F.xp6(1),F.Q6J("ngIf",!e.signedFile&&!e.loadingAutofirma),F.xp6(1),F.Q6J("ngIf",e.loadingAutofirma),F.xp6(2),F.Udp("color",e.signedFile?e.data.styles.colors.btnText:"")("background",e.signedFile?e.data.styles.colors.btnBg:"")("border-radius",e.data.styles.btnRound+"px"),F.Q6J("disabled",!e.signedFile)}}function tt(e,t){if(1&e&&(F.TgZ(0,"div",18),F._UZ(1,"mat-progress-spinner",19),F.TgZ(2,"p",20),F._uU(3),F.qZA()()),2&e){const e=F.oxw();F.xp6(3),F.Oqu(e.loading)}}let nt=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.notis=t,this.utils=n,this._autofirma=i,this.form=new p.cw({}),this.next=new F.vpe(null),this.loadingAutofirma=!1}ngOnInit(){this.setForm(),this.blobFile=this.base64ToBlob(this.pdfFile64,"application/pdf");const e=URL.createObjectURL(this.blobFile);this.pdfHtml="<iframe width='100%' height='100%' src='"+e+"'></iframe>",this.pdfHtml+=`<img style="width: 100%; min-heigth: 300px" src="${e}" />`}base64ToBlob(e,t="application/octet-stream"){const n=atob(e),i=n.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=n.charCodeAt(e);return new Blob([s],{type:t})}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({file_signed:["",[p.kI.required]]})}nextStep(){this.next.emit({file_signed:this.signedFile})}onChangeFile(e){const t=e.target;!t||!t.files||(this.file=t.files[0])}blobToFile(e,t){return e.lastModifiedDate=new Date,e.name=t,e}onClickAutofirma(){var e=this;return(0,P.Z)((function*(){e.loadingAutofirma=!0;let t,n="signed_document";e.file=e.blobToFile(e.blobFile,n),e._autofirma.requestPDFSignature(e.file,{headless:!0,filters:{"issuer.rfc2254":"(CN=AC Representa*)"}}).then((i=>{t=i,e.loadingAutofirma=!1;let s=new File([t],n+"_signed.pdf",{type:e.file.type});e.signedFile=s,e.nextStep()})).catch((t=>{t?.message?.includes("ApplicationNotFoundException")?e.notis.showAlert("No se encuentra AutoFirma","No se ha encontrado el programa de autofirma instalado en su computador, por favor descarguelo en el siguiente link y vuelva a intentarlo.","info",{cancelButtonLabel:"Ir a Autofirma",okButtonLabel:"Cerrar",cancelAction:function(){window.open("https://firmaelectronica.gob.es/Home/Descargas.html","_blank")}}):e.notis.showAlert("Error desconocido","Ha ocurrido un error: "+t)}))}))()}fileToUrl(e){return new Promise(((t,n)=>{const i=new FileReader;i.onloadend=()=>{t(i.result)},i.readAsDataURL(e)}))}setAnvers(e){e&&e.file&&this.form.patchValue({document_front:e.file})}setRevers(e){e&&e.file&&this.form.patchValue({document_back:e.file})}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.qu),F.Y36(S.T),F.Y36(U.F),F.Y36(Ge.Kj))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-autofirma-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading",pdfFile64:"pdfFile64"},outputs:{next:"nextStep"},decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"my-3","bg-slate-50","p-2","rounded-md","flex","max-h-[300px]","overflow-y-auto","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],[1,"font-bold"],[1,"pt-3","font-bold"],[1,"flex","w-full","items-center","justify-end","gap-2","p-4"],["class","flex gap-1 text-green-500 items-center justify-end w-full",4,"ngIf"],["class","px-8","mat-flat-button","","type","button",3,"color","background","border-radius","click",4,"ngIf"],["class","flex items-center gap-2",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"flex","gap-1","text-green-500","items-center","justify-end","w-full"],["svgIcon","mat:check_circle"],["mat-flat-button","","type","button",1,"px-8",3,"click"],[1,"flex","items-center","gap-2"],["color","accent","diameter","20","value","0","mode","indeterminate",1,"spinner"],[1,"text-black"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(F.YNc(0,et,39,11,"form",0),F.YNc(1,tt,4,1,"div",1)),2&e&&(F.Q6J("ngIf",!t.loading),F.xp6(1),F.Q6J("ngIf",t.loading))},dependencies:[i.O5,d.Hw,u.lW,p._Y,p.JL,p.sg,y.Ou],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),it=(()=>{class e{constructor(){this.next=new F.vpe(null)}ngOnInit(){}nextStep(){this.next.emit(!0)}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-requisites-step"]],inputs:{data:"data",texts:"texts",loading:"loading"},outputs:{next:"nextStep"},decls:15,vars:18,consts:[[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"py-4"],["href","https://firmaelectronica.gob.es/Home/Descargas.html","target","_blank",1,"text-blue-500","font-bold","underline"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(F.TgZ(0,"div",0),F._UZ(1,"div",1)(2,"div",2),F.ALo(3,"safeHtml"),F.TgZ(4,"div",3),F._uU(5," Si no tiene "),F.TgZ(6,"strong"),F._uU(7,"Autofirma"),F.qZA(),F._uU(8," instalado, antes de continuar, puedes instalarlo siguiendo este "),F.TgZ(9,"a",4),F._uU(10,"link"),F.qZA(),F._uU(11,". "),F.qZA(),F.TgZ(12,"div",5)(13,"button",6),F.NdJ("click",(function(){return t.nextStep()})),F._uU(14,"Siguiente"),F.qZA()()()),2&e&&(F.xp6(1),F.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),F.Q6J("innerHTML",null==t.texts||null==t.texts.requisites?null:t.texts.requisites.title,F.oJD),F.xp6(1),F.Udp("color",t.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(3,16,null==t.texts||null==t.texts.requisites?null:t.texts.requisites.description),F.oJD),F.xp6(2),F.Udp("color",t.data.styles.colors.text),F.xp6(9),F.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function st(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"vex-power-cert",4),F.NdJ("accept",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.acceptPowerCert())})),F.qZA()}if(2&e){const e=F.oxw();F.Q6J("hideButtons",!1)("flow","ClientCertificate")("userId",e.userId)}}function rt(e,t){if(1&e&&(F.TgZ(0,"div",10),F._UZ(1,"img",11),F.qZA()),2&e){const e=F.oxw(2);F.xp6(1),F.Q6J("src",e.data.styles.logoUrl,F.LSH)}}function ot(e,t){1&e&&(F.TgZ(0,"div",12),F._UZ(1,"mat-progress-spinner",13),F.qZA()),2&e&&(F.xp6(1),F.Q6J("value",0))}function at(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-form-step",25),F.NdJ("gotoPowerConditions",(function(){F.CHM(e);const t=F.oxw(3);return F.KtG(t.gotoPowerConditions())}))("nextStep",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.sendFormData(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("data",e.data)("flowName",e.flowName)("loading",e.loading)("requestIDFromURL",e.requestIDFromURL)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function lt(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-requisites-step",26),F.NdJ("nextStep",(function(){F.CHM(e);const t=F.oxw(3);return F.KtG(t.showRequisitesPage=!1)})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)}}function ct(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-terms-step",27),F.NdJ("goToTerms",(function(){F.CHM(e);const t=F.oxw(3);return F.KtG(t.gotoTermsAndConditions())}))("gotoPowerConditions",(function(){F.CHM(e);const t=F.oxw(3);return F.KtG(t.gotoPowerConditions())}))("goToTermsCertificate",(function(){F.CHM(e);const t=F.oxw(3);return F.KtG(t.gotoTermsAndConditionsCertificate())}))("nextStep",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.acceptTerms(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("userId",e.userId)("requestID",e.requestID)("data",e.data)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)("loading",e.loading)}}function dt(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-password-step",28),F.NdJ("nextStep",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.sendPassword(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function ut(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-autofirma-step",29),F.NdJ("nextStep",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.sendDocument(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("data",e.data)("pdfFile64",e.pdfFile64)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function ht(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-otp-step",30),F.NdJ("resendOTP",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.resendOTP(t))}))("errorPhone",(function(){F.CHM(e);const t=F.oxw(3);return F.KtG(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.requestOTP(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function pt(e,t){if(1&e&&F._UZ(0,"belender-success-step",31),2&e){const e=F.oxw(3);F.Q6J("data",e.data)("packId",e.packId)("userId",e.userId)("requestID",e.requestID)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)}}function mt(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-fail-step",32),F.NdJ("retry",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.retryRequest(t))}))("newRequest",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.newRequest(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function ft(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-abandoned-step",33),F.NdJ("retry",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.retryRequest(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("solicitud",e.solicitud)("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)}}function gt(e,t){if(1&e&&F._UZ(0,"belender-no-service-step",34),2&e){const e=F.oxw(3);F.Q6J("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("data",e.data)}}function _t(e,t){if(1&e&&(F.TgZ(0,"div",35)(1,"div",36)(2,"h1",37),F._uU(3,"No existe la solicitud"),F.qZA()(),F.TgZ(4,"div",38),F._uU(5," No existen solicitudes activas con el código requerido "),F.qZA()()),2&e){const e=F.oxw(3);F.xp6(4),F.Udp("color",e.data.styles.colors.text)}}function bt(e,t){if(1&e&&(F.ynx(0),F.YNc(1,at,1,6,"belender-form-step",14),F.YNc(2,lt,1,3,"belender-requisites-step",15),F.YNc(3,ct,1,6,"belender-terms-step",16),F.YNc(4,dt,1,4,"belender-password-step",17),F.YNc(5,ut,1,5,"belender-autofirma-step",18),F.YNc(6,ht,1,4,"belender-otp-step",19),F.YNc(7,pt,1,6,"belender-success-step",20),F.YNc(8,mt,1,4,"belender-fail-step",21),F.YNc(9,ft,1,4,"belender-abandoned-step",22),F.YNc(10,gt,1,3,"belender-no-service-step",23),F.YNc(11,_t,6,2,"div",24),F.BQk()),2&e){const e=F.oxw(2);F.xp6(1),F.Q6J("ngIf",e.data&&"form"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","autofirma"==e.getStatus()&&e.showRequisitesPage),F.xp6(1),F.Q6J("ngIf","terms"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","password"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","autofirma"==e.getStatus()&&e.pdfFile64&&!e.showRequisitesPage),F.xp6(1),F.Q6J("ngIf","otp"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","success"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","failed"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","abandoned"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","no-service"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","no-exist"==e.getStatus())}}function vt(e,t){1&e&&F._UZ(0,"belender-disabled-url")}function yt(e,t){if(1&e&&(F.TgZ(0,"div",39),F._UZ(1,"mat-progress-spinner",40),F.TgZ(2,"p",41),F._uU(3),F.qZA()()),2&e){const e=F.oxw(2);F.xp6(3),F.hij(" ",e.loading," ")}}function wt(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div",42)(1,"div",35)(2,"div",43),F._uU(3,"Error!"),F.qZA(),F._UZ(4,"div",44),F.qZA(),F.TgZ(5,"div",45)(6,"button",46),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw(2);return F.KtG(t.error=!1)})),F._uU(7," Ingresar manualmente "),F.qZA()()()}if(2&e){const e=F.oxw(2);F.xp6(4),F.Udp("color",e.data.styles.colors.text),F.Q6J("innerHTML",e.error,F.oJD)}}function xt(e,t){if(1&e&&(F.TgZ(0,"div",5)(1,"div"),F.YNc(2,rt,2,1,"div",6),F.YNc(3,ot,2,1,"div",7),F.YNc(4,bt,12,11,"ng-container",3),F.YNc(5,vt,1,0,"belender-disabled-url",3),F.YNc(6,yt,4,1,"div",8),F.YNc(7,wt,8,3,"div",9),F.qZA()()),2&e){const e=F.oxw();F.xp6(1),F.Gre("h-full w-full flex-auto p-0 md:p-3 ",e.data.styles.typography,""),F.Udp("background",e.data.styles.colors.background),F.xp6(1),F.Q6J("ngIf",e.data.styles.withLogo&&"loading"!=e.getStatus()),F.xp6(1),F.Q6J("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"==e.getStatus()),F.xp6(1),F.Q6J("ngIf",!e.error),F.xp6(1),F.Q6J("ngIf",!e.error&&e.disableURL),F.xp6(1),F.Q6J("ngIf",e.loading),F.xp6(1),F.Q6J("ngIf",!e.loading&&e.error)}}function Ct(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"vex-terms",47),F.NdJ("accepted",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.handleTermsResponse(!0))}))("cancelled",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.handleTermsResponse(!1))})),F.qZA()}if(2&e){const e=F.oxw();F.Q6J("flow","certificate")("requestStatus",e.solicitud?e.solicitud.status_code:"")}}function kt(e,t){if(1&e&&(F.ynx(0),F.TgZ(1,"div",48),F._uU(2),F.qZA(),F.BQk()),2&e){const e=F.oxw();F.xp6(2),F.hij(" TestMode ",e.testMode?"ON":"OFF"," ")}}let Tt=class{constructor(e,t,n,i,s,r,o,a,l){this.cd=e,this.Activatedroute=t,this.utils=n,this.solicitudesService=i,this.customizationService=s,this.customizationStoreService=r,this.notis=o,this.certificateService=a,this.dialog=l,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.viewPowerTerms=!1,this.disableURL=!1,this.showRequisitesPage=!0,this.requestCreated=!1,this.requestIDFromURL=!1,this.flowName="ClientCertificate",this.showTermsDialog=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.userId?this.setInitialData(this.userId):this.loading=null,"pro"!=Y.N.env&&(q(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),q(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}ngOnDestroy(){}setInitialData(e){var t=this;return(0,P.Z)((function*(){const n=yield t.getFlow(e);if(t.data={config:t.customizationStoreService.FUNDER_CONFIG,styles:t.customizationStoreService.FUNDER_STYLES,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.notis.showAlert("Error!","No se ha configurado la customización del widget para este usuario","error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,P.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}sendPreRequest(){this.certificateService.preRequest({user_id:this.userId,package_id:this.packId}).then((e=>{e&&e.data&&(this.requestID=e.data.request_id),this.loading=!1})).catch((e=>{console.error(e),this.loading=!1}))}setParamsToRequest(e){this.requestIDFromURL=!0,this.solicitud||(this.solicitud={status_code:"form"}),e.document&&!this.solicitud.person_document_number&&(this.solicitud.person_document_number=e.document),e.birthday&&!this.solicitud.birth_date&&(this.solicitud.birth_date=e.birthday),e.expiration&&!this.solicitud.document_expiration_date&&(this.solicitud.document_expiration_date=e.expiration),e.type&&!this.solicitud.person_type&&(this.solicitud.person_type=e.type),e.phone&&!this.solicitud.phone&&(this.solicitud.phone=e.phone),e.email&&!this.solicitud.email&&(this.solicitud.email=e.email),e.cif&&!this.solicitud.cif&&(this.solicitud.cif=e.cif),e.razon&&!this.solicitud.razon_social&&(this.solicitud.razon_social=e.razon),e.name&&!this.solicitud.person_name&&(this.solicitud.person_name=e.name),e.lastname&&!this.solicitud.person_last_name&&(this.solicitud.person_last_name=e.lastname),e.second_lastname&&!this.solicitud.person_last_name2&&(this.solicitud.person_last_name2=e.second_lastname)}sendMessageToParent(e){window.top.postMessage(e,"*")}validateRequestIdInUrl(){const e=this;this.Activatedroute.queryParams.subscribe((t=>{t&&this.setParamsToRequest(t),t&&t.acceptTerms&&(this.autoAcceptTerms=!0),t&&t.request_id?(this.disableURL=!1,e.requestID=t.request_id,this.setFormFromVcCode(t.request_id)):(e.sendPreRequest(),console.error("con paramas"))}),(e=>{this.loading=!1,console.error("sin paramas")}))}setFormFromVcCode(e){var t=this;return(0,P.Z)((function*(){t.loading="Obteniendo datos de la solicitud...",t.solicitudesService.getSolicitudByCode(e).then((e=>{e&&e.data?(t.solicitud=e.data,t.pdfFile64=t.solicitud.file,t.setSubscriptionOfRequest(),t.loading=!1,t.skipCreationOfRequest=!0,t.autoAcceptTerms&&t.acceptTerms(!0)):t.loading=!1})).catch((e=>{t.loading=!1}))}))()}setSubscriptionOfRequest(){const e=this;if(e.socket)return;let t="wss://notifications.dev.belender.net";"qa"==Y.N.env&&(t="wss://notifications.qa.belender.net"),"pro"==Y.N.env&&(t="wss://notifications.belender.net"),Y.N.notificationsBaseUrl&&(t=Y.N.notificationsBaseUrl),this.socket=new WebSocket(`${t}?requests_id=${e.requestID}&user_id=${e.userId}`),this.socket.onopen=function(n){console.log("Conexión establecida: ",`${t}?requests_id=${e.requestID}&user_id=${e.userId}`)},this.socket.onmessage=function(t){let n=JSON.parse(t.data);console.warn("message from ws:",n),e.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,this.sendMessageToParent({type:"websocket",data:e}),"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),"terms_and_conditions"!=this.solicitud.status_code&&setTimeout((()=>{this.loading=!1,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.solicitudesService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}sendNewData(e){this.loading="Enviando información..",this.solicitudesService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e),this.loading=!1):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.initWaitingForResponse("Validando nuevos datos, espere por favor.."),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}showAlert(e,t){this.loading=!1,this.notis.showAlert(e,t)}sendFormData(e){this.requestID&&(e.request_id=this.requestID),e.user_id=this.userId,e.package_id=this.packId,e.validation_id=0;const t=new FormData;let n=Object.keys(e);for(const i of n)t.append(i,e[i]);this.loading="Subiendo documentación...",this.addRequest(t).then((e=>{e&&e.length&&this.setSubscriptionOfRequest(),this.loading=null})).catch((e=>{console.error("promise error: ",e),this.loading=null}))}uploadFiles(e){return new Promise(((t,n)=>{this.certificateService.addSignedFile(e).then((e=>{e&&e.status&&"error"==e.status?(e.message&&(this.showAlert("Error!",400==e.code&&"Does not have Known client service"==e.message?"El usuario no tiene servicio PIN habilitado!":400==e.code&&"Incorrect date"==e.message?"Fecha incorrecta!":e.message),n(e.message)),n(e),this.loading=null,this.cd.markForCheck()):e&&e.status&&"success"==e.status?t(!0):(this.showAlert("Error!","Error desconocido: "+e),n(e),this.loading=null,this.cd.markForCheck())})).catch((e=>{n(e),e&&e.errorMessage&&this.showAlert("Error!",e.errorMessage),this.loading=null,this.cd.markForCheck()}))}))}addRequest(e){return new Promise(((t,n)=>{this.certificateService.addSolicitud(e).then((e=>{e&&e.status&&"error"==e.status?(e.message&&(this.showAlert("Error!",400==e.code&&"Does not have Known client service"==e.message?"El usuario no tiene servicio PIN habilitado!":400==e.code&&"Incorrect date"==e.message?"Fecha incorrecta!":e.message),n(e.message)),this.loading=null,this.cd.markForCheck(),n(e)):e&&e.status&&"success"==e.status?(this.solicitud=e.data,this.setSubscriptionOfRequest(),this.loading=null,this.cd.markForCheck(),t(e.data)):(this.showAlert("Error!","Error desconocido: "+e),n(e))})).catch((e=>{console.error("respuesta desde pin service: ",e),e&&e.errorMessage&&this.showAlert("Error!",e.errorMessage),this.loading=null,this.cd.markForCheck(),n(e)}))}))}acceptTerms(e){this.loading="Iniciando el proceso de emisión de certificado..";let t={request_id:this.solicitud.request_id,terms_and_conditions_service:!0,terms_and_conditions_certificate_emition:!0};(this.data.config.activatePower||this.solicitud?.power_activate)&&(t.power_activate=!0,t.terms_and_conditions_power=e?1:0),this.certificateService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}sendPassword(e){this.loading="Enviando información..",this.certificateService.sendPassword({request_id:this.solicitud.request_id,password:e}).then((e=>{e.status&&"error"==e.status?this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.pdfFile64=e.file,this.cd.markForCheck()),this.loading=null})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}sendDocument(e){e.request_id=this.requestID;const t=new FormData;let n=Object.keys(e);for(const i of n)t.append(i,e[i]);this.loading="Subiendo documentación...",this.uploadFiles(t).then((e=>{e&&(this.solicitud.status_code="consent_process_completed")})).catch((e=>{console.error(e)}))}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}requestOTP(e){let t={otp:e.code,request_id:this.solicitud.request_id};this.loading="Enviando código OTP ..",this.certificateService.sendOtp(t).then((e=>{e.status&&"error"==e.status?this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.cd.markForCheck()),this.loading=!1})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}askToBack(){this.solicitudesService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.requestCreated=!0,this.requestIDFromURL=!0,this.solicitud=e.data,this.loading=!1):this.loading=!1})).catch((e=>{this.loading=!1}))}gotoErrorPhone(){}setRequestStatus(e){this.solicitud.status_code=e}retryRequest(e){let t={request_id:e,user_id:this.userId};this.loading="Reintentando enviar la solicitud...",this.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}newRequest(e){this.solicitud.status_code="created"}disconnectWebsocket(){console.log("intentando desconectar ws..."),this.socket&&this.socket.close()}getStatus(){return!this.solicitud||this.solicitud&&("created"==this.solicitud.status_code||"form"==this.solicitud.status_code)?"form":this.solicitud&&"terms_and_conditions"==this.solicitud.status_code?"terms":this.solicitud&&"waiting_acceptance_file_signed"==this.solicitud.status_code?(console.log("returning autofirma"),"autofirma"):!this.solicitud||"waiting_login_seguridad_social"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_otp_seguridad_social"!=this.solicitud.status_code&&"waiting_otp"!=this.solicitud.status_code&&"invalid_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"waiting_password"!=this.solicitud.status_code&&"approved_terms_digital_power"!=this.solicitud.status_code&&"declined_terms_digital_power"!=this.solicitud.status_code?!this.solicitud||"abandoned_after_bad_phone"!=this.solicitud.status_code&&"abandoned_after_invalid_otp_seguridad_social"!=this.solicitud.status_code&&"abandoned_after_terms_and_conditions"!=this.solicitud.status_code&&"abandoned_after_waiting_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"all_documents_downloaded"!=this.solicitud.status_code&&"partial_documents_downloaded"!=this.solicitud.status_code&&"consent_process_completed"!=this.solicitud.status_code&&"waiting_certificate"!=this.solicitud.status_code&&"waiting_documents"!=this.solicitud.status_code?!this.solicitud||"bad_phone"!=this.solicitud.status_code&&"phone_not_exist_otp"!=this.solicitud.status_code?!this.solicitud||"failed_with_retry"!=this.solicitud.status_code&&"failed_without_retry"!=this.solicitud.status_code&&"failed_documents_downloaded"!=this.solicitud.status_code?this.solicitud&&"no_service"==this.solicitud.status_code?"no-service":"no-exist":"failed":"error-data":(this.disconnectWebsocket(),this.data.config&&this.data.config.infiniteLoopInCompleted?"loading":"success"):"abandoned":"password":"otp":(this.loading="Estamos procesando su solicitud. Espere un momento por favor","loading")}sendRetry(){}gotoTermsAndConditions(){this.showTermsDialog=!0}handleTermsResponse(e){this.showTermsDialog=!1}gotoTermsAndConditionsCertificate(){this.dialog.open(R.v,{panelClass:"fullscreen-dialog",data:{flow:"certificate"}})}gotoPowerConditions(){this.viewPowerTerms=!0}acceptPowerCert(){this.viewPowerTerms=!1}};Tt.ɵfac=function(e){return new(e||Tt)(F.Y36(F.sBO),F.Y36(O.gz),F.Y36(U.F),F.Y36(_.M),F.Y36(C.w),F.Y36(Z.r),F.Y36(S.T),F.Y36(z),F.Y36(B.uw))},Tt.ɵcmp=F.Xpm({type:Tt,selectors:[["belender-widget-client-cert"]],inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[F._Bn([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:4,vars:4,consts:[[3,"hideButtons","flow","userId","accept",4,"ngIf"],["class","h-full widget-belender",4,"ngIf"],[3,"flow","requestStatus","accepted","cancelled",4,"ngIf"],[4,"ngIf"],[3,"hideButtons","flow","userId","accept"],[1,"h-full","widget-belender"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px]",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[3,"data","flowName","loading","requestIDFromURL","texts","solicitud","gotoPowerConditions","nextStep",4,"ngIf"],[3,"data","loading","texts","nextStep",4,"ngIf"],[3,"userId","requestID","data","texts","solicitud","loading","goToTerms","gotoPowerConditions","goToTermsCertificate","nextStep",4,"ngIf"],[3,"data","loading","texts","solicitud","nextStep",4,"ngIf"],[3,"data","pdfFile64","loading","texts","solicitud","nextStep",4,"ngIf"],[3,"data","loading","texts","solicitud","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","packId","userId","requestID","loading","texts",4,"ngIf"],[3,"data","loading","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"solicitud","data","loading","texts","retry",4,"ngIf"],[3,"loading","texts","data",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"data","flowName","loading","requestIDFromURL","texts","solicitud","gotoPowerConditions","nextStep"],[3,"data","loading","texts","nextStep"],[3,"userId","requestID","data","texts","solicitud","loading","goToTerms","gotoPowerConditions","goToTermsCertificate","nextStep"],[3,"data","loading","texts","solicitud","nextStep"],[3,"data","pdfFile64","loading","texts","solicitud","nextStep"],[3,"data","loading","texts","solicitud","resendOTP","errorPhone","nextStep"],[3,"data","packId","userId","requestID","loading","texts"],[3,"data","loading","texts","solicitud","retry","newRequest"],[3,"solicitud","data","loading","texts","retry"],[3,"loading","texts","data"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[3,"flow","requestStatus","accepted","cancelled"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"]],template:function(e,t){1&e&&(F.YNc(0,st,1,3,"vex-power-cert",0),F.YNc(1,xt,8,11,"div",1),F.YNc(2,Ct,1,2,"vex-terms",2),F.YNc(3,kt,3,1,"ng-container",3)),2&e&&(F.Q6J("ngIf",t.viewPowerTerms),F.xp6(1),F.Q6J("ngIf",t.data),F.xp6(1),F.Q6J("ngIf",t.showTermsDialog),F.xp6(1),F.Q6J("ngIf",t.testMode))},dependencies:[i.O5,u.lW,y.Ou,J.L,V.q,Q.L,oe,ue,me,Ce,ke,Te,Ne,We,nt,it],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),Tt=(0,D.gn)([(0,N.c)()],Tt);const St=[{path:":idUser",component:Tt},{path:":idUser/:packID",component:Tt}];let Mt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=F.oAB({type:e}),e.ɵinj=F.cJS({imports:[O.Bz.forChild(St),O.Bz,L.d8]}),e})();var It=n(6981),Et=n(3848),Ot=n(1129),Lt=n(969),Pt=n(7009);let Dt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=F.oAB({type:e}),e.ɵinj=F.cJS({imports:[i.ez,Pt.ZX,d.Ps,p.UX,x.c,u.ot]}),e})();var At=n(1145),Nt=n(2266),qt=n(3300),Yt=n(865),Rt=n(3033),Ft=n(3295);let Ut=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=F.oAB({type:e}),e.ɵinj=F.cJS({providers:[_.M,v.o,C.w,w.t,S.T,E.t,z,{provide:T.Ad,useValue:"es-ES"}],imports:[Mt,i.ez,s.G,r.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,x.c,p.u5,m.AV,p.UX,f.LD,g.vV,b.a,y.Cq,k.FA,T.XK,M.T5,I.Fk,It.x,Et.Nh,c.p9,Ot.n,Lt.O,Dt,At.j,Nt.L,qt.C,Yt.q,Rt.d,Ft.g]}),e})()}}]),(self.webpackChunkvex=self.webpackChunkvex||[]).push([[193],{667:(e,t,n)=>{n.d(t,{$:()=>s});var i=n(7340);const s=(r=400,(0,i.X$)("fadeInUp",[(0,i.eR)(":enter",[(0,i.oB)({transform:"translateY(20px)",opacity:0}),(0,i.jt)(`${r}ms cubic-bezier(0.35, 0, 0.25, 1)`,(0,i.oB)({transform:"translateY(0)",opacity:1}))])]));var r},5592:(e,t,n)=>{n.d(t,{J:()=>a});var i=n(6895),s=n(9299),r=n(7392),o=n(4650);let a=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.oAB({type:e}),e.ɵinj=o.cJS({imports:[i.ez,s.Bz,r.Ps]}),e})()},1763:(e,t,n)=>{n.d(t,{b:()=>c});var i=n(4650),s=n(6895),r=n(7392);function o(e,t){1&e&&i._UZ(0,"mat-icon",3)}const a=function(e,t){return{background:e,"border-color":t}},l=["*"];let c=(()=>{class e{constructor(){this.text="",this.color="rgb(14, 197, 151)",this.ccb=new i.vpe,this.checked=!1}ngOnInit(){}emitChange(){this.checked=!this.checked,this.ccb.emit(this.checked)}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-checkbox"]],inputs:{text:"text",color:"color",checked:"checked"},outputs:{ccb:"changeCheckbox"},ngContentSelectors:l,decls:5,vars:5,consts:[[1,"flex","items-start","gap-2","justify-start","w-fit","hover:bg-slate-700/10","py-2","rounded-sm","cursor-pointer",3,"click"],[1,"check-wrapper","w-5","h-5","border","mr-1","rounded-sm","flex","justify-center","items-center","p-0",3,"ngStyle"],["style","font-size: 5px","class","m-0 p-0 text-white","svgIcon","mat:check",4,"ngIf"],["svgIcon","mat:check",1,"m-0","p-0","text-white",2,"font-size","5px"]],template:function(e,t){1&e&&(i.F$t(),i.TgZ(0,"div",0),i.NdJ("click",(function(){return t.emitChange()})),i.TgZ(1,"div",1),i.YNc(2,o,1,0,"mat-icon",2),i.qZA(),i.TgZ(3,"div"),i.Hsn(4),i.qZA()()),2&e&&(i.xp6(1),i.Q6J("ngStyle",i.WLB(2,a,t.checked?t.color:"transparent",t.checked?t.color:"rgba(0,0,0,.7)")),i.xp6(1),i.Q6J("ngIf",t.checked))},dependencies:[s.O5,s.PC,r.Hw],styles:[".check-wrapper[_ngcontent-%COMP%]{transition:all .3s ease;min-width:1.25rem}"]}),e})()},1129:(e,t,n)=>{n.d(t,{n:()=>c});var i=n(6895),s=n(4006),r=n(9549),o=n(9101),a=n(7392),l=n(4650);let c=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=l.oAB({type:e}),e.ɵinj=l.cJS({imports:[i.ez,s.u5,s.UX,r.lN,o.ot,a.Ps]}),e})()},8008:(e,t,n)=>{n.d(t,{O:()=>o});var i=n(4650),s=n(6895);function r(e,t){if(1&e&&(i.O4$(),i.kcU(),i.TgZ(0,"p",4),i._uU(1),i.qZA()),2&e){const e=i.oxw();i.xp6(1),i.Oqu(e.text)}}let o=(()=>{class e{constructor(){this.text="",this.color="rgb(14, 197, 151)",this.zoom=1}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-spinner"]],inputs:{text:"text",color:"color",zoom:"zoom"},decls:4,vars:7,consts:[[1,"flex","w-full","justify-center","items-center","flex-col","gap-4"],["width","65px","height","65px","viewBox","0 0 66 66","xmlns","http://www.w3.org/2000/svg",1,"spinner"],["fill","none","stroke-width","6","stroke-linecap","round","cx","33","cy","33","r","30",1,"path"],["class","text-center",4,"ngIf"],[1,"text-center"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0),i.O4$(),i.TgZ(1,"svg",1),i._UZ(2,"circle",2),i.qZA(),i.YNc(3,r,2,1,"p",3),i.qZA()),2&e&&(i.xp6(1),i.Jzz("zoom: ",t.zoom,"; "),i.xp6(1),i.Jzz("stroke: ",t.color,""),i.xp6(1),i.Q6J("ngIf",t.text))},dependencies:[s.O5],styles:[".spinner[_ngcontent-%COMP%]{animation:rotator 1.4s linear infinite}@keyframes rotator{0%{transform:rotate(0)}to{transform:rotate(270deg)}}.path[_ngcontent-%COMP%]{stroke-dasharray:187;stroke-dashoffset:0;transform-origin:center;animation:dash 1.4s ease-in-out infinite}@keyframes dash{0%{stroke-dashoffset:187}50%{stroke-dashoffset:46.75;transform:rotate(135deg)}to{stroke-dashoffset:187;transform:rotate(450deg)}}"]}),e})()},9476:(e,t,n)=>{n.d(t,{F:()=>c});var i=n(6895),s=n(4006),r=n(9549),o=n(9101),a=n(7392),l=n(4650);let c=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=l.oAB({type:e}),e.ɵinj=l.cJS({imports:[i.ez,s.u5,s.UX,r.lN,o.ot,a.Ps]}),e})()},833:(e,t,n)=>{n.d(t,{L:()=>d});var i=n(4650),s=n(9299),r=n(7367),o=n(8460),a=n(6895),l=n(9101);function c(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",5)(1,"button",6),i.NdJ("click",(function(){i.CHM(e);const t=i.oxw();return i.KtG(t.accept())})),i._uU(2,"Cerrar"),i.qZA()()}if(2&e){const e=i.oxw();i.xp6(1),i.Udp("color",e.funderStyles.colors.btnText)("background",e.funderStyles.colors.btnBg)("border-radius",e.funderStyles.btnRound+"px")}}let d=(()=>{class e{constructor(e,t,n){this.Activatedroute=e,this.customizationService=t,this.customizationStoreService=n,this.loading=!0,this.hideButtons=!0,this.acceptTerms=new i.vpe(null),this.cancelTerms=new i.vpe(null)}ngOnInit(){this.loading=!0,this.userId&&this.flow?(this.userID=this.userId,this.flowName=this.flow,this.customizationStoreService.getFunderStyles().subscribe((e=>{this.funderStyles=e})),this.customizationService.getCustomizationByFlow(this.userID,this.flowName).then((e=>{this.flowConfig=e,this.terms_and_conditions=this.flowConfig&&this.flowConfig.terms_and_conditions?this.flowConfig.terms_and_conditions:`\n <div class="px-10 py-6 rounded-md text-center bg-orange-500/20 text-orange-600">\n <p>No hay términos y condiciones para el flujo <b>${this.flowName}</b></p> \n </div>`,this.loading=!1})).catch((e=>{this.loading=!1}))):this.Activatedroute.params.subscribe((e=>{e&&e.idUser?(this.userID=e.idUser,this.flowName=this.getParsedFlowName(e.flow),this.userID?this.customizationService.getCustomizationByFlow(this.userID,this.flowName).then((e=>{this.flowConfig=e,this.terms_and_conditions=this.flowConfig&&this.flowConfig.terms_and_conditions?this.flowConfig.terms_and_conditions:'\n <div class="px-10 py-6 rounded-md text-center bg-orange-500/20 text-orange-600">\n <p>No hay términos y condiciones para este flujo</p> \n </div>',this.loading=!1})).catch((e=>{this.loading=!1})):this.loading=!1):this.loading=!1}),(e=>{this.loading=!1}))}getParsedFlowName(e){switch(e){case"sms":case"Sms":return"SMS";case"clavepin":case"ClavePin":case"CLAVEPIN":return"ClavePin";case"videoid":return"VideoID";case"personal":case"presencial":case"client-cert":return"KnownClient";default:return e}}accept(){this.acceptTerms.emit(!0)}cancel(){this.cancelTerms.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(i.Y36(s.gz),i.Y36(r.w),i.Y36(o.r))},e.ɵcmp=i.Xpm({type:e,selectors:[["vex-power-cert"]],inputs:{flow:"flow",userId:"userId",hideButtons:"hideButtons"},outputs:{acceptTerms:"accept",cancelTerms:"cancel"},decls:33,vars:1,consts:[[1,"py-12","flex","flex-col","items-center","overflow-auto","max-h-[96vh]","terms-page"],[1,"max-w-xl","overflow-y-auto"],[1,"font-bold"],[1,"pt-6","font-bold"],["class","w-full max-w-xl flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"w-full","max-w-xl","flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0)(1,"div",1)(2,"h1",2),i._uU(3,"HOJA DE ACEPTACIÓN DE CERTIFICADO ELECTRONICO CUALIFICADO RÉGIMEN OBLIGATORIO DE USO DEL CERTIFICADO ELECTRONICO: “CERTIFICADO DE PERSONA FÍSICA REPRESENTANTE DE EMPRESA EMITIDO EN SOFTWARE”"),i.qZA(),i.TgZ(4,"p"),i._uU(5," a) Que existen unas condiciones generales del servicio incorporadas en el texto de divulgación del certificado o PDS, y una declaración de prácticas de certificación, que regulan la emisión y utilización del certificado electrónico emitido porvinCAsign, cuyo texto íntegro se puede consultar en la dirección de Internet, https://policy.vincasign.net. "),i.qZA(),i.TgZ(6,"p"),i._uU(7," b) Que el certificado electrónico emitido y el resto de los elementos que forman parte de la identificación electrónica son únicos para cada usuario. El certificado debe ser protegido por un código secreto (PIN), que sólo conoce el titular y que le será entregado en el momento de la emisión del certificado. Para utilizar el certificado es imprescindible conocer este código. "),i.qZA(),i.TgZ(8,"p"),i._uU(9," c) Que este certificado permite al titular del certificado generar firmas electrónicas e identificarse de forma electrónica en aquellos sistemas de información que soporten este tipo de autenticación. "),i.qZA(),i.TgZ(10,"p"),i._uU(11," d) Que el FIRMANTE debe custodiar, de forma diligente, el PIN que permite utilizarlo, para evitar que otras personas puedan suplantar su identidad y firmar documentos en su nombre, o acceder a mensajes confidenciales o sistemas de información de acceso restringido. "),i.qZA(),i.TgZ(12,"p"),i._uU(13," e) Que, si el FIRMANTE detecta cualquier indicio de que su identificación electrónica ha podido ser utilizada por otras personas, tendrá que suspender el uso del certificado y notificarlo inmediatamente al responsable del servicio de certificación del SUSCRIPTOR, o a vinCAsign, para pedir la revocación del certificado y, en su caso, la emisión de uno nuevo. "),i.qZA(),i.TgZ(14,"p"),i._uU(15," f) Que ante cualquier necesidad de información adicional, respecto de la utilización de los certificados emitidos en nombre de vinCAsign, el FIRMANTE se podrá dirigir al SUSCRIPTOR, al responsable del servicio de certificación del SUSCRIPTOR, y/o a VINTEGRIS. "),i.qZA(),i.TgZ(16,"p"),i._uU(17," g) Que con el fin de obtener los correspondientes certificados, y dentro del marco del Reglamento (UE) 2016/679 del Parlamento Europeo y del Consejo de 27 de abril de 2016 relativo a la protección de las personas físicas en lo que respecta al tratamiento de datos personales y a la libre circulación de estos datos y por el que se deroga la Directiva 95/46/CE (Reglamento general de protección de datos), el SUSCRIPTOR ha comunicado a vinCAsign los datos identificativos del FIRMANTE con el fin de emitir y gestionar el certificado corporativo de persona física emitido en software, en el ámbito de la relación de trabajo entre dicho FIRMANTE y el SUSCRIPTOR, todo ello a los efectos de lo previsto en el artículo 28 del Reglamento general de protección de datos. "),i.qZA(),i.TgZ(18,"p"),i._uU(19," h) Que sabe que, en cumplimiento de lo establecido en los artículos 24.2 y 28 del Reglamento (UE) 910/2014 del Parlamento Europeo y del Consejo de 23 de julio de 2014, los datos contenidos en el certificado corporativo de persona física emitido en software están publicados en la página web de vinCAsign a efectos del Registro de Certificados y de las listas de revocación, toda vez que ha prestado su consentimiento durante el proceso de solicitud. "),i.qZA(),i.TgZ(20,"h1",3),i._uU(21," ACTO DE ACEPTACIÓN DEL CERTIFICADO ELECTRÓNICO "),i.qZA(),i.TgZ(22,"p"),i._uU(23," Firmo el presente documento para dejar constancia: "),i.qZA(),i.TgZ(24,"p"),i._uU(25," Que ha sido informado del contenido del texto de divulgación del certificado o PDS, en el que se incluyen las condiciones generales del servicio aplicable al certificado corporativo de persona física emitido en software. "),i.qZA(),i.TgZ(26,"p"),i._uU(27," Que ha sido informado del régimen obligatorio de uso del certificado emitido, sus condiciones de uso y sus responsabilidades. "),i.qZA(),i.TgZ(28,"p"),i._uU(29," Que ha sido informado de las circunstancias relativas al tratamiento de sus datos personales para la correcta emisión y gestión del certificado que se emite. "),i.qZA(),i.TgZ(30,"p"),i._uU(31," Firma de conformidad, en virtud de la cual ha leído y entiende las obligaciones y responsabilidades que asume. "),i.qZA()(),i.YNc(32,c,3,6,"div",4),i.qZA()),2&e&&(i.xp6(32),i.Q6J("ngIf",t.funderStyles&&!t.hideButtons))},dependencies:[a.O5,l.lW],styles:["h1[_ngcontent-%COMP%]{font-size:20px!important;font-weight:700}h2[_ngcontent-%COMP%]{font-size:20px!important;font-weight:700;line-height:25px;margin:15px 0}p[_ngcontent-%COMP%]{margin:10px 0}.terms-page[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100vw;background:white;z-index:9999999!important;height:100vh;max-height:100vh}"]}),e})()},2266:(e,t,n)=>{n.d(t,{L:()=>g});var i=n(9299),s=n(833),r=n(6e3),o=n(4650);const a=[{path:":flow",component:s.L},{path:":flow/:idUser",component:s.L}];let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.oAB({type:e}),e.ɵinj=o.cJS({imports:[i.Bz.forChild(a),i.Bz,r.d8]}),e})();var c=n(7533),d=n(1572),u=n(7367),h=n(6383),p=n(6895),m=n(4006),f=n(9101);let g=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.oAB({type:e}),e.ɵinj=o.cJS({providers:[u.w],imports:[l,c.q,d.Cq,h.G,p.ez,m.u5,f.ot]}),e})()},1145:(e,t,n)=>{n.d(t,{j:()=>l});var i=n(4650),s=n(6895);let r=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=i.oAB({type:e}),e.ɵinj=i.cJS({imports:[[s.ez]]}),e})();var o=n(7392),a=n(4006);let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=i.oAB({type:e}),e.ɵinj=i.cJS({imports:[s.ez,a.u5,r,o.Ps]}),e})()},4302:(e,t,n)=>{n.d(t,{q:()=>a});var i=n(7582),s=n(9933),r=n(667),o=n(4650);let a=class{constructor(){}};a.ɵfac=function(e){return new(e||a)},a.ɵcmp=o.Xpm({type:a,selectors:[["belender-disabled-url"]],decls:6,vars:1,consts:[[1,"p-2","w-full","flex","justify-start","flex-wrap"],[1,"py-4","px-6","w-full","rounded-md","bg-red-500/10","text-red-600","flex","flex-col","gap-3"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0)(1,"div",1)(2,"h2"),o._uU(3,"Servicio desactivado"),o.qZA(),o.TgZ(4,"p"),o._uU(5,"El servicio que intenta acceder está desactivado. "),o.qZA()()()),2&e&&o.Q6J("@fadeInUp",void 0)},data:{animation:[r.$]}}),a=(0,i.gn)([(0,s.c)()],a)},3300:(e,t,n)=>{n.d(t,{C:()=>o});var i=n(6895),s=n(4006),r=n(4650);let o=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=r.oAB({type:e}),e.ɵinj=r.cJS({imports:[i.ez,s.u5]}),e})()},342:(e,t,n)=>{n.d(t,{A:()=>g});var i=n(2340),s=n(4650),r=n(4006),o=n(5089),a=n(5601),l=n(9617),c=n(6895),d=n(7392),u=n(1572);function h(e,t){if(1&e&&(s.TgZ(0,"span",11),s._uU(1),s._UZ(2,"mat-progress-spinner",12),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.hij(" ",e.document_name," ")}}function p(e,t){if(1&e&&(s.TgZ(0,"span",13),s._uU(1),s._UZ(2,"mat-icon",14),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.hij(" ",e.document_name," ")}}function m(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"span",15),s.NdJ("click",(function(){s.CHM(e);const t=s.oxw().$implicit,n=s.MAs(5);return s.oxw().setDocumentName(t.document_name),s.KtG(n.click())})),s._uU(1),s._UZ(2,"mat-icon",16),s.qZA()}if(2&e){const e=s.oxw().$implicit;s.xp6(1),s.hij(" ",e.document_name," ")}}function f(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.YNc(1,h,3,1,"span",6),s.YNc(2,p,3,1,"span",7),s.YNc(3,m,3,1,"span",8),s.TgZ(4,"input",9,10),s.NdJ("change",(function(t){s.CHM(e);const n=s.oxw();return s.KtG(n.fileChange(t))})),s.qZA(),s.BQk()}if(2&e){const e=t.$implicit,n=s.oxw();s.xp6(1),s.Q6J("ngIf",!e.document_status_code),s.xp6(1),s.Q6J("ngIf",e.document_status_code&&"downloaded"===e.document_status_code&&!n.loadingDocs),s.xp6(1),s.Q6J("ngIf",e.document_status_code&&"failed_download"===e.document_status_code&&!n.loadingDocs),s.xp6(1),s.Q6J("accept",n.acceptFiles)}}let g=(()=>{class e{constructor(e,t,n,i,s){this.formBuilder=e,this.utils=t,this.solicitudesService=n,this.packsS=i,this.cd=s,this.totalDocuments=[],this.totalDownloaded=0,this.totalNotDownloaded=0,this.file=null,this.fileName="No se ha seleccionado ningun archivo",this.fileSize=0,this.acceptFiles="image/jpeg, image/jpg, application/pdf",this.loadingDocs=!0,this.toBase64=e=>new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=n}))}ngOnInit(){this.loadingDocs=!0,this.uploadForm=this.formBuilder.group({file:[""]}),this.setPacksAndDocuments(),this.initIntervalDocs()}initIntervalDocs(){this.intDocs=setInterval((()=>{this.setDocumentsFromPack()}),4e3)}setPacksAndDocuments(){this.packsS.getPacksByPackId(this.packId).then((e=>{this.totalDocuments=this.parseDocumentsFromPack(e.data.documents),this.setDocumentsFromPack()}))}setDocumentsFromPack(){this.solicitudesService.getDocumentsIds(this.requestID).then((e=>{e.data&&this.setDocumentsReports(e.data),this.loadingDocs=!1})).catch((()=>{this.loadingDocs=!1}))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==i.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==i.N.env&&(e="wss://notifications.belender.net"),i.N.notificationsBaseUrl&&(e=i.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),n&&t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}handlePusherNotification(e){this.totalDocuments&&this.totalDocuments.forEach((t=>{t.document_name===e.document_name&&(t.document_status_code=e.document_status_code)})),this.cd.markForCheck()}parseDocumentsFromPack(e){let t=[];return e&&e.length&&e.forEach((e=>{t.push({document_name:e,document_status_code:null})})),t}setDocumentsReports(e){e&&e.length&&e.forEach((e=>{this.totalDocuments.forEach((t=>{t.document_name===e.document_name&&(t.document_status_code=e.document_status_code)}))})),this.checkIfAllReported(),this.cd.markForCheck()}checkIfAllReported(){this.totalDocuments.find((e=>!e.document_status_code||"downloaded"!=e.document_status_code))||this.intDocs&&clearInterval(this.intDocs)}fileChange(e){e.preventDefault(),e.stopPropagation();let t=e.target.files[0];const n=new FormData;n.append("file",t),n.append("request_id",this.requestID),n.append("document_name",this.docName),this.loadingDocs=!0,this.solicitudesService.uploadFileFromWidget(n).then((e=>{console.log("success"),this.setPacksAndDocuments()})).catch((e=>{console.error(e),this.setPacksAndDocuments()}))}setDocumentName(e){this.docName=e}}return e.ɵfac=function(t){return new(t||e)(s.Y36(r.qu),s.Y36(o.F),s.Y36(a.M),s.Y36(l.U),s.Y36(s.sBO))},e.ɵcmp=s.Xpm({type:e,selectors:[["widget-documents"]],inputs:{packId:"packId",requestID:"requestID",userId:"userId",acceptFiles:"acceptFiles"},decls:7,vars:1,consts:[[1,"px-4","py-3","bg-slate-300/10","rounded-md"],[1,"w-full","flex","mb-4","justify-between","items-center"],[1,"text-xl","font-bold"],[1,"flex","justify-end","items-center"],[1,"flex","gap-1","flex-wrap","items-start","justify-start","w-full","flex-col"],[4,"ngFor","ngForOf"],["class","bg-black/10 items-center w-full h-8 gap-2 pr-4 pl-3 py-1 rounded-sm flex text-xs justify-between",4,"ngIf"],["class","bg-green-500/10 items-center text-green-500 w-full justify-between border border-green-500 gap-2 h-8 font-bold pr-4 pl-3 py-1 rounded-sm flex text-xs ",4,"ngIf"],["class","bg-red-500/10 items-center text-red-500 border border-red-500 gap-2 h-8 font-bold pr-4 pl-3 py-1 rounded-sm flex text-xs justify-between w-full cursor-pointer hover:bg-red-500 hover:text-red-50",3,"click",4,"ngIf"],["hidden","true","onclick","this.value=null","type","file","name","file",3,"accept","change"],["fileInput",""],[1,"bg-black/10","items-center","w-full","h-8","gap-2","pr-4","pl-3","py-1","rounded-sm","flex","text-xs","justify-between"],["color","accent","diameter","12","value","0","mode","indeterminate",1,"spinner"],[1,"bg-green-500/10","items-center","text-green-500","w-full","justify-between","border","border-green-500","gap-2","h-8","font-bold","pr-4","pl-3","py-1","rounded-sm","flex","text-xs"],["svgIcon","mat:check",1,"w-4"],[1,"bg-red-500/10","items-center","text-red-500","border","border-red-500","gap-2","h-8","font-bold","pr-4","pl-3","py-1","rounded-sm","flex","text-xs","justify-between","w-full","cursor-pointer","hover:bg-red-500","hover:text-red-50",3,"click"],["svgIcon","mat:upload",1,"w-4"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0)(1,"div",1)(2,"p",2),s._uU(3,"Documentos: "),s.qZA(),s._UZ(4,"div",3),s.qZA(),s.TgZ(5,"div",4),s.YNc(6,f,6,4,"ng-container",5),s.qZA()()),2&e&&(s.xp6(6),s.Q6J("ngForOf",t.totalDocuments))},dependencies:[c.sg,c.O5,d.Hw,u.Ou]}),e})()},3033:(e,t,n)=>{n.d(t,{d:()=>l});var i=n(6895),s=n(4006),r=n(7392),o=n(1572),a=n(4650);let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=a.oAB({type:e}),e.ɵinj=a.cJS({imports:[i.ez,r.Ps,s.UX,o.Cq]}),e})()},1406:(e,t,n)=>{n.d(t,{Y:()=>a});var i=n(4650),s=n(4006),r=n(9549),o=n(9101);let a=(()=>{class e{constructor(e){this.formBuilder=e,this.file=null,this.fileName="No se ha seleccionado ningun archivo",this.acceptFiles="image/png, image/jpeg, image/jpg, .pdf",this.newItemEvent=new i.vpe(null),this.uploadFile=new i.vpe(null),this.toBase64=e=>new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=n}))}ngOnInit(){this.uploadForm=this.formBuilder.group({file:[""]})}fileChange(e){this.uploadForm.patchValue({file:e.target.files[0]}),this.uploadForm.get("file").updateValueAndValidity();const t=new FormData;let n=this.uploadForm.get("file").value;this.fileName=n.name,this.fileSize=+(+n.size/1e3).toFixed(1),t.append("file",n),console.warn(this.uploadForm.get("file").value),this.newItemEvent.emit({file:t}),this.uploadFile.emit(n)}}return e.ɵfac=function(t){return new(t||e)(i.Y36(s.qu))},e.ɵcmp=i.Xpm({type:e,selectors:[["app-file-upload"]],inputs:{label:"label",acceptFiles:"acceptFiles"},outputs:{newItemEvent:"change",uploadFile:"fileUpload"},decls:11,vars:5,consts:[[1,"flex","flex-col","w-full","items-start","input-file-wrapper","my-1",3,"formGroup"],["hidden","true","onclick","this.value=null","type","file","name","file",3,"accept","change"],["fileInput",""],[1,"flex","items-center","justify-start","mt-3"],["mat-flat-button","","color","accent",1,"btn-file",3,"click"]],template:function(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"form",0)(1,"mat-label"),i._uU(2),i.qZA(),i.TgZ(3,"input",1,2),i.NdJ("change",(function(e){return t.fileChange(e)})),i.qZA(),i.TgZ(5,"div",3)(6,"button",4),i.NdJ("click",(function(){i.CHM(e);const t=i.MAs(4);return i.KtG(t.click())})),i._uU(7,"Seleccionar archivo"),i.qZA(),i._uU(8," "),i.TgZ(9,"span"),i._uU(10),i.qZA()()()}2&e&&(i.Q6J("formGroup",t.uploadForm),i.xp6(2),i.Oqu(t.label),i.xp6(1),i.Q6J("accept",t.acceptFiles),i.xp6(7),i.AsE("",t.fileName," ",t.fileSize?"("+t.fileSize+"Kb)":"",""))},dependencies:[s._Y,s.JL,s.sg,r.hX,o.lW],styles:["button[aria-pressed=true][_ngcontent-%COMP%]{color:red!important}.btn-file[_ngcontent-%COMP%]{max-width:200px}.input-file-wrapper[_ngcontent-%COMP%]{background:rgba(0,0,0,.0117647059);padding:.7rem .5rem .7rem 1rem;border-radius:5px;border:2px dashed rgba(0,0,0,.1)}"]}),e})()},969:(e,t,n)=>{n.d(t,{O:()=>d});var i=n(6895),s=n(4006),r=n(9101),o=n(7392),a=n(4144),l=n(7009),c=n(4650);let d=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=c.oAB({type:e}),e.ɵinj=c.cJS({imports:[i.ez,l.ZX,o.Ps,s.UX,a.c,r.ot]}),e})()},4246:(e,t,n)=>{n.d(t,{t:()=>s});var i=n(4650);let s=(()=>{class e{constructor(){this.DNI_REGEX=/^(\d{8})([A-Z])$/,this.CIF_REGEX=/^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/,this.NIE_REGEX=/^[XYZ]\d{7,8}[A-Z]$/}convertObjectArrayToArray(e){return Object.keys(e).map((t=>{const n=e[t];return n.key=t,n}))}ValidateIDType(e){e=e.toUpperCase().replace(/\s/,"");var t=!1,n=this.spainIdType(e);switch(n){case"dni":t=this.validDNI(e);break;case"nie":t=this.validNIE(e)}return{type:n,valid:t}}spainIdType(e){return e.match(this.DNI_REGEX)?"dni":e.match(this.NIE_REGEX)?"nie":void 0}validDNI(e){return"TRWAGMYFPDXBNJZSQVHLCKE".charAt(parseInt(e,10)%23)==e.charAt(8)}validNIE(e){var t=e.charAt(0);switch(t){case"X":t=0;break;case"Y":t=1;break;case"Z":t=2}return this.validDNI(t+e.substr(1))}}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=i.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},3364:(e,t,n)=>{n.d(t,{R:()=>l});var i=n(4650),s=(n(6866),n(5089)),r=n(9299),o=n(9101),a=n(3731);let l=(()=>{class e{constructor(e,t){this.utils=e,this.Activatedroute=t,this.goFlow=new i.vpe(null),this.goManual=new i.vpe(null)}ngOnInit(){console.error("data: ",this.data)}gotoFlow(){this.goFlow.emit(!0)}gotoManual(){this.goManual.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(i.Y36(s.F),i.Y36(r.gz))},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-intro-step"]],inputs:{data:"data",solicitud:"solicitud",flowName:"flowName"},outputs:{goFlow:"gotoFlow",goManual:"gotoManual"},decls:10,vars:18,consts:[[1,"flex","flex-col","justify-between","h-full","fixed-content"],[1,"flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-2"],["mat-flat-button","","type","button",1,"px-8","bg-slate-100","hover:bg-slate-200","text-slate-900",3,"click"],["mat-flat-button","","type","button",1,"px-8","hover:opacity-90",3,"click"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0)(1,"div",1),i._UZ(2,"div",2)(3,"div",3),i.ALo(4,"safeHtml"),i.qZA(),i.TgZ(5,"div",4)(6,"button",5),i.NdJ("click",(function(){return t.gotoManual()})),i._uU(7,"Subida manual"),i.qZA(),i.TgZ(8,"button",6),i.NdJ("click",(function(){return t.gotoFlow()})),i._uU(9,"Subida automatica"),i.qZA()()()),2&e&&(i.xp6(2),i.Udp("color",t.data.styles.colors.title)("font-size",t.data.intro?t.data.intro.titleSize+"px":"30px"),i.Q6J("innerHTML",t.data.intro?t.data.intro.title:"Intro de descripción",i.oJD),i.xp6(1),i.Udp("color",t.data.styles.colors.text),i.Q6J("innerHTML",t.data.intro?t.data.intro.description:i.lcZ(4,16,"Descripcion de la intro"),i.oJD),i.xp6(3),i.Udp("border-radius",t.data.styles.btnRound+"px"),i.xp6(2),i.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[o.lW,a.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}"]}),e})()},8962:(e,t,n)=>{n.d(t,{A:()=>k});var i=n(6895),s=n(9101),r=n(1561),o=n(4006),a=n(5601),l=n(3798),c=n(9391),d=n(1572),u=n(182),h=n(4144),p=n(7367),m=n(9602),f=n(3238),g=n(5895),_=n(6257),b=n(1948),v=n(4246),y=n(6981),w=n(1129),x=n(9476),C=n(4650);let k=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=C.oAB({type:e}),e.ɵinj=C.cJS({providers:[a.M,c.o,p.w,u.t,g.T,v.t],imports:[i.ez,s.ot,r.Tx,h.c,o.u5,o.UX,l.a,d.Cq,m.FA,f.XK,_.T5,b.Fk,y.x,w.n,x.F]}),e})()},1760:(e,t,n)=>{n.d(t,{u:()=>T});var i=n(4650),s=(n(6866),n(4006)),r=n(8135),o=n(5089),a=n(9391),l=n(9299),c=n(9617),d=n(5895),u=n(2254),h=n(5601),p=n(6895),m=n(9101),f=n(9549),g=n(4144),_=n(8008),b=n(1406),v=n(3731);function y(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"form",1)(1,"div",2),i._UZ(2,"div",3)(3,"div",4),i.ALo(4,"safeHtml"),i.qZA(),i.TgZ(5,"div",5)(6,"div",6)(7,"mat-form-field",7)(8,"mat-label"),i._uU(9,"DNI / NIE"),i.qZA(),i._UZ(10,"input",8),i.qZA()()(),i.TgZ(11,"div",9)(12,"button",10),i.NdJ("click",(function(){i.CHM(e);const t=i.oxw();return i.KtG(t.goBack())})),i._uU(13," Volver "),i.qZA(),i.TgZ(14,"button",11),i.NdJ("click",(function(){i.CHM(e);const t=i.oxw();return i.KtG(t.gotoStep2())})),i._uU(15," Siguiente "),i.qZA()()()}if(2&e){const e=i.oxw();i.Q6J("formGroup",e.formDni),i.xp6(2),i.Udp("color",e.data.styles.colors.title)("font-size",e.data.Manual?e.data.Manual.titleSize+"px":"30px"),i.Q6J("innerHTML",e.data.Manual?e.data.Manual.title:"Manual de descripción",i.oJD),i.xp6(1),i.Udp("color",e.data.styles.colors.text),i.Q6J("innerHTML",e.data.Manual?e.data.Manual.description:i.lcZ(4,18,"Descripcion de la subida manual"),i.oJD),i.xp6(9),i.Udp("border-radius",e.data.styles.btnRound+"px"),i.xp6(2),i.Udp("color",e.formDni.invalid?"":e.data.styles.colors.btnText)("background",e.formDni.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),i.Q6J("disabled",e.formDni.invalid)}}function w(e,t){if(1&e){const e=i.EpF();i.ynx(0),i.TgZ(1,"app-file-upload",15),i.NdJ("fileUpload",(function(t){const n=i.CHM(e).$implicit,s=i.oxw(3);return i.KtG(s.setFile(n,t))})),i.qZA(),i.BQk()}if(2&e){const e=t.$implicit;i.xp6(1),i.s9C("label",e)}}function x(e,t){if(1&e&&(i.TgZ(0,"div",5),i.YNc(1,w,2,1,"ng-container",14),i.qZA()),2&e){const e=i.oxw(2);i.xp6(1),i.Q6J("ngForOf",e.pack.documents)}}function C(e,t){1&e&&(i.TgZ(0,"div",16),i._UZ(1,"belender-spinner",17),i.qZA()),2&e&&(i.xp6(1),i.Q6J("zoom",.6))}function k(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"form",1)(1,"div",2),i._UZ(2,"div",3)(3,"div",4),i.ALo(4,"safeHtml"),i.qZA(),i.YNc(5,x,2,1,"div",12),i.YNc(6,C,2,1,"div",13),i.TgZ(7,"div",9)(8,"button",10),i.NdJ("click",(function(){i.CHM(e);const t=i.oxw();return i.KtG(t.goBack())})),i._uU(9," Volver "),i.qZA(),i.TgZ(10,"button",11),i.NdJ("click",(function(){i.CHM(e);const t=i.oxw();return i.KtG(t.uploadFiles())})),i._uU(11," Subir archivos "),i.qZA()()()}if(2&e){const e=i.oxw();i.Q6J("formGroup",e.form),i.xp6(2),i.Udp("color",e.data.styles.colors.title)("font-size",e.data.Manual?e.data.Manual.titleSize+"px":"30px"),i.Q6J("innerHTML",e.data.Manual?e.data.Manual.title:"Manual de descripción",i.oJD),i.xp6(1),i.Udp("color",e.data.styles.colors.text),i.Q6J("innerHTML",e.data.Manual?e.data.Manual.description:i.lcZ(4,20,"Descripcion de la subida manual"),i.oJD),i.xp6(2),i.Q6J("ngIf",e.pack&&!e.loadingPack),i.xp6(1),i.Q6J("ngIf",e.loadingPack),i.xp6(2),i.Udp("border-radius",e.data.styles.btnRound+"px"),i.xp6(2),i.Udp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),i.Q6J("disabled",e.form.invalid)}}let T=(()=>{class e{constructor(e,t,n,s,r,o,a,l,c){this.smsComponent=e,this.fb=t,this.utils=n,this.attachmentsS=s,this.ar=r,this.packsS=o,this.notis=a,this.smsFlowService=l,this.solicitudesService=c,this.upload=new i.vpe(null),this.back=new i.vpe(null),this.sendDNI=new i.vpe(null),this.loadingPack=!1,this.step=1}ngOnInit(){this.form=this.fb.group({}),console.warn("data: ",this.data),this.loadingPack=!0,this.packsS.getPackagesByUserID(this.userId).then((e=>{console.warn(e),e&&e.data?this.setPack(e.data):this.loadingPack=!1})).catch((e=>{console.error(e),this.loadingPack=!1})),this.formDni=this.fb.group({dni:[null,[s.kI.required,s.kI.maxLength(9)]]}),console.error(this.smsFlowService.REQUEST),this.smsFlowService.REQUEST&&this.smsFlowService.REQUEST.request_id&&(this.step=2)}setRequestStep(){}gotoStep2(){"SMS"===this.flowName?this.createSmsRequestFromDNI(this.formDni.get("dni").value):this.sendDNI.emit(this.formDni.get("dni").value)}setPack(e){this.pack=e.find((e=>e.id==this.packId)),this.loadingPack=!1,this.setForm()}setForm(){this.pack&&this.pack.documents&&this.pack.documents.forEach((e=>{this.form.addControl(e,new s.NI("",s.kI.required))}))}uploadFiles(){this.upload.emit(!0)}goBack(){"SMS"===this.flowName?this.smsComponent.manual=!1:this.back.emit(!0)}fileChange(e){e.preventDefault(),e.stopPropagation()}setFile(e,t){const n=new FormData;n.append("file",t),n.append("request_id",this.smsFlowService.REQUEST.request_id),n.append("document_name",e),this.notis.showToast("Subiendo documento: "+e,6e3,"info"),this.attachmentsS.uploadFile(n).then((n=>{n&&n.status&&"error"!=n.status?(this.form.get(e).setValue(t),this.notis.showToast("Documento "+e+" subido correctamente",4e3,"success")):n&&n.status&&"error"==n.status&&this.notis.showToast("El documento "+e+" no se ha podido subir: "+n.message,4e3,"error")})).catch((t=>{console.error(t),this.notis.showToast("El documento "+e+" no se ha podido subir: "+t,4e3,"error")}))}createSmsRequestFromDNI(e){let t={document_number:e,user_id:this.userId,package_id:this.packId,check_legal:!0};this.solicitudesService.addSolicitud(t,this.packId,this.userId).then((e=>{e&&e.status&&"error"==e.status?(this.smsFlowService.setRequest(t),e.message&&(400==e.code?"Birthdate incorrect"==e.message?(this.smsComponent.setRequestStatus("form"),this.smsComponent.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc)):"Incorrect date"==e.message?(this.smsComponent.setRequestStatus("form"),this.smsComponent.showAlert(this.labels.warnings.error,this.labels.warnings.wrongDate)):(this.smsComponent.setRequestStatus("no_service"),this.smsFlowService.setLoading(!1)):(this.smsComponent.setRequestStatus("form"),this.smsComponent.showAlert("Error!",e.message))),this.smsComponent.setStatus()):e&&e.status&&"success"==e.status?(this.smsFlowService.updateRequestID(e.data.request_id),this.smsFlowService.setRequest(e.data),this.smsComponent.setStatus(),this.smsFlowService.setSubscriptionOfRequest(),this.smsFlowService.sendMessageToParent({type:"response",data:e.data}),this.smsComponent.acceptTerms()):this.smsComponent.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+e)})).catch((e=>{e&&e.error&&this.smsComponent.showAlert("Error!",e.error),this.smsFlowService.setLoading(!1)}))}}return e.ɵfac=function(t){return new(t||e)(i.Y36(r.T,9),i.Y36(s.QS),i.Y36(o.F),i.Y36(a.o),i.Y36(l.gz),i.Y36(c.U),i.Y36(d.T),i.Y36(u.p),i.Y36(h.M))},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-manual-step"]],inputs:{data:"data",flowName:"flowName",packId:"packId",userId:"userId",labels:"labels"},outputs:{upload:"uploadFiles",back:"goBack",sendDNI:"dniChange"},decls:2,vars:2,consts:[["class","flex flex-col justify-between h-full fixed-content",3,"formGroup",4,"ngIf"],[1,"flex","flex-col","justify-between","h-full","fixed-content",3,"formGroup"],[1,"flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"py-4"],[1,"w-full"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["maxlength","9","formControlName","dni","type","text","placeholder","Ingresa tu DNI o NIE","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-2"],["mat-flat-button","","type","button",1,"px-8","bg-slate-100","hover:bg-slate-200","text-slate-900",3,"click"],["mat-flat-button","","type","button",1,"px-8","hover:opacity-90",3,"disabled","click"],["class","py-4",4,"ngIf"],["class","py-10 px-4",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"label","fileUpload"],[1,"py-10","px-4"],["text","Cargando documentos",3,"zoom"]],template:function(e,t){1&e&&(i.YNc(0,y,16,20,"form",0),i.YNc(1,k,12,22,"form",0)),2&e&&(i.Q6J("ngIf",1==t.step),i.xp6(1),i.Q6J("ngIf",2==t.step))},dependencies:[p.sg,p.O5,m.lW,f.KE,f.hX,g.Nt,s._Y,s.Fj,s.JJ,s.JL,s.nD,s.sg,s.u,_.O,b.Y,v.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}"]}),e})()},3468:(e,t,n)=>{n.d(t,{f:()=>T});var i=n(6895),s=n(9101),r=n(1561),o=n(4006),a=n(5601),l=n(3798),c=n(9391),d=n(1572),u=n(182),h=n(4144),p=n(7367),m=n(9602),f=n(3238),g=n(5895),_=n(6257),b=n(1948),v=n(4246),y=n(6981),w=n(1129),x=n(9476),C=n(969),k=n(4650);let T=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=k.oAB({type:e}),e.ɵinj=k.cJS({providers:[a.M,c.o,p.w,u.t,g.T,v.t],imports:[i.ez,s.ot,r.Tx,h.c,o.u5,o.UX,l.a,d.Cq,m.FA,f.XK,_.T5,b.Fk,y.x,w.n,x.F,C.O]}),e})()},8526:(e,t,n)=>{n.r(t),n.d(t,{PersonalModule:()=>pt});var i=n(6895),s=n(6383),r=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),b=n(3798),v=n(9391),y=n(1572),w=n(182),x=n(4144),C=n(7367),k=n(9602),T=n(3238),S=n(5895),M=n(6257),I=n(1948),E=n(4246),O=n(9299),L=n(6e3),P=n(5861),D=n(7582),A=n(9549),N=n(9933),q=n(5762),Y=n(8259),R=n(2340),F=n(1363),U=n(4650),Z=n(5089),H=n(8460),j=n(529),z=n(6554);let B=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(R.N.baseUrl+"/requests/known-client",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addFiles(e){return new Promise(((t,n)=>{this.localFetch.postFile(R.N.baseUrl+"/requests/known-client/upload-files",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/known-client/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOtp(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/known-client/otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendPassword(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/known-client/password",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}preRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/pre-request/known-client",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{let i="/requests/known-client/otp";R.N.scraperMock&&(i="/mockscrapper/requests/known-client/otp"),this.localFetch.postFetchWhitoutToken(R.N.baseUrl+i,e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(U.LFG(Z.F),U.LFG(j.eN),U.LFG(z.r))},e.ɵprov=U.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var J=n(5412),V=n(6830),Q=n(833),W=n(4302),G=n(3731);function $(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.hij("¿No has recibido el código? Solicítalo de nuevo en ",e.secsCount," segundos")}}function K(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.AsE("¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? Solicítalo de nuevo en ",e.secsCount," segundos")}}function X(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.hij("¿No has recibido el código en tu teléfono? Solicítalo de nuevo en ",e.secsCount," segundos")}}const ee=function(e,t,n){return{color:e,border:t,background:n}};function te(e,t){if(1&e&&(U.ynx(0),U.TgZ(1,"small",11),U.YNc(2,$,2,1,"span",5),U.YNc(3,K,2,2,"span",5),U.YNc(4,X,2,1,"span",5),U.qZA(),U.BQk()),2&e){const e=U.oxw();U.xp6(1),U.Q6J("ngStyle",U.kEZ(4,ee,e.data.styles.colors.accentColor,"1px solid "+e.data.styles.colors.accentColor,e.data.styles.colors.accentBgColor)),U.xp6(1),U.Q6J("ngIf",!e.lastNumberPhone),U.xp6(1),U.Q6J("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),U.xp6(1),U.Q6J("ngIf",e.lastNumberPhone&&e.data.config.noRetryInBadPhone)}}function ne(e,t){1&e&&(U.TgZ(0,"span"),U._uU(1," ¿No has recibido el código en tu teléfono? "),U.qZA())}function ie(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.hij(" ¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? ")}}function se(e,t){1&e&&(U.TgZ(0,"span"),U._uU(1," ¿No has recibido el código en el teléfono? "),U.qZA())}const re=function(e,t){return{color:e,background:t}};function oe(e,t){if(1&e){const e=U.EpF();U.ynx(0),U.TgZ(1,"small",11),U.YNc(2,ne,2,0,"span",5),U.YNc(3,ie,2,1,"span",5),U.YNc(4,se,2,0,"span",5),U.TgZ(5,"a",12),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.resendOTP())})),U._uU(6,"Reenviar"),U.qZA()(),U.BQk()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("ngStyle",U.kEZ(5,ee,e.data.styles.colors.dangerColor,"1px solid "+e.data.styles.colors.dangerColor,e.data.styles.colors.dangerBgColor)),U.xp6(1),U.Q6J("ngIf",!e.lastNumberPhone),U.xp6(1),U.Q6J("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),U.xp6(1),U.Q6J("ngIf",e.data.config.noRetryInBadPhone),U.xp6(1),U.Q6J("ngStyle",U.WLB(9,re,e.data.styles.colors.dangerTextButtonColor,e.data.styles.colors.dangerColor))}}let ae=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.solucitudesService=n,this.activeRoute=i,this.next=new U.vpe(null),this.errPhone=new U.vpe(null),this.resendO=new U.vpe(null),this.secsCount=60,this.lastNumberPhone="XXX"}ngOnInit(){this.form=this.fb.group({code1:[null,[p.kI.required,p.kI.maxLength(6),p.kI.minLength(6)]]}),this.initSecsInterval(),this.activeRoute.queryParams.subscribe((e=>{e&&e.request_id&&(this.requestID=e.request_id)}),(e=>{console.error(e)})),this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastNumberPhone=t}initSecsInterval(){this.interv=setInterval((()=>{this.secsCount--,this.secsCount<=0&&this.finishSecsInterval()}),1e3)}finishSecsInterval(){this.interv&&clearInterval(this.interv)}nextStep(){let e={code:this.getCode()};this.next.emit(e)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){return(0,P.Z)((function*(){}))()}errorStep(){this.errPhone.emit(!0)}setInputEvent(e){""!=e.target.value?Y(e.target).next().focus():"Backspace"==e.code&&Y(e.target).prev().focus()}resendOTP(){this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(_.M),U.Y36(O.gz))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-otp-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},decls:16,vars:20,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","gap-2","items-center","justify-start","w-full","max-w-[200px]"],["appearance","outline",1,"w-full","flex-1"],["tabindex","1","maxlength","6","minlength","1","formControlName","code1","type","text","matInput","",3,"change","keyup"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"info-time","w-fit",3,"ngStyle"],[1,"ml-4",3,"ngStyle","click"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.TgZ(5,"div",4),U.YNc(6,te,5,8,"ng-container",5),U.YNc(7,oe,7,12,"ng-container",5),U.qZA(),U.TgZ(8,"div",6)(9,"mat-form-field",7)(10,"mat-label"),U._uU(11," Código OTP "),U.qZA(),U.TgZ(12,"input",8),U.NdJ("change",(function(e){return t.capturePasteEvent(e)}))("keyup",(function(e){return t.setInputEvent(e)})),U.qZA()()()(),U.TgZ(13,"div",9)(14,"button",10),U.NdJ("click",(function(){return t.nextStep()})),U._uU(15,"Siguiente"),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.otp.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,18,t.texts.otp.description||""),U.oJD),U.xp6(3),U.Q6J("ngIf",t.secsCount&&t.secsCount>0),U.xp6(1),U.Q6J("ngIf",!t.secsCount||t.secsCount<=0),U.xp6(7),U.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",t.form.invalid))},dependencies:[i.O5,i.PC,u.lW,A.KE,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.nD,p.sg,p.u,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function le(e,t){if(1&e&&(U.TgZ(0,"div",1),U._UZ(1,"div",2)(2,"div",3),U.ALo(3,"safeHtml"),U.qZA()),2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),U.Q6J("innerHTML",e.texts.success.title,U.oJD),U.xp6(1),U.Udp("color",e.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(3,8,e.texts.success.description||""),U.oJD)}}let ce=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s}ngOnInit(){}save(){}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(_.M),U.Y36(v.o),U.Y36(S.T))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts"},decls:1,vars:1,consts:[["class"," pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&U.YNc(0,le,4,10,"div",0),2&e&&U.Q6J("ngIf",!t.data.config.infiniteLoopInCompleted)},dependencies:[i.O5,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function de(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",5)(1,"button",6),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.retry())})),U._uU(2,"Intentarlo nuevamente"),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function ue(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",5)(1,"button",7),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.newRequest())})),U._uU(2,"Crear nueva solicitud"),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}let he=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.retryOp=new U.vpe(null),this.newReq=new U.vpe(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(_.M),U.Y36(v.o),U.Y36(S.T))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(U.TgZ(0,"div",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA(),U.YNc(5,de,3,6,"div",4),U.YNc(6,ue,3,6,"div",4),U.qZA()),2&e&&(U.xp6(2),U.Q6J("innerHTML",t.texts.fail.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,6,t.texts.fail.description),U.oJD),U.xp6(2),U.Q6J("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),U.xp6(1),U.Q6J("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[i.O5,u.lW,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();n(6866);var pe=n(1763),me=n(5696);const fe=["termsCheckbox"],ge=["termsCertCheckbox"],_e=["assignmentCheckbox"];function be(e,t){1&e&&(U.TgZ(0,"div",15)(1,"mat-form-field",16)(2,"mat-label"),U._uU(3,"Email"),U.qZA(),U._UZ(4,"input",17),U.qZA()())}function ve(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",18)(1,"belender-checkbox",19,20),U.NdJ("changeCheckbox",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.setTerms(t))})),U.TgZ(3,"belender-terms-and-policy-links",21),U.NdJ("goToTerms",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.gotoTermsAndConditions(t))})),U.qZA()()()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("color",e.data.styles.colors.title),U.xp6(2),U.Q6J("userId",e.userId)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink)("firstSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.firstSentence)("secondSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.secondSentence)("thirdSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.thirdSentence)("policyActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.policyActionText)("termsActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.termsActionText)("customTerms",e.data[e.flowName].customTerms)}}function ye(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",22)(1,"belender-checkbox",9),U.NdJ("changeCheckbox",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.setPower(t))})),U._uU(2," Consiento expresamente a la activación de un poder digital según las condiciones que pueden verse "),U.TgZ(3,"a",11),U.NdJ("click",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.gotoPowerConditions(t))})),U.TgZ(4,"u"),U._uU(5,"aquí"),U.qZA()()()()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("color",e.data.styles.colors.title)}}function we(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",18)(1,"belender-checkbox",9,23),U.NdJ("changeCheckbox",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.setAssignment(t))})),U._UZ(3,"div",24),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("color",e.data.styles.colors.title),U.xp6(2),U.Q6J("innerHTML",null==e.data?null:e.data.config.dataAssignmentText,U.oJD)}}function xe(e,t){1&e&&(U.TgZ(0,"div",25),U._UZ(1,"mat-icon",26),U._uU(2," Debes leer los términos y condiciones para poder continuar "),U.qZA())}const Ce={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let ke=(()=>{class e{constructor(e,t){this.utils=e,this.fb=t,this.requestID=null,this.next=new U.vpe(null),this.goTerms=new U.vpe(null),this.goTermsCert=new U.vpe(null),this.goPower=new U.vpe(null),this.acceptTerms=!1,this.acceptTerms2=!1,this.termsReaded=!1,this.terms2Readed=!1,this.step=0,this.assignment=!1,this.powerActivate=!1}ngOnInit(){this.setForm(this.solicitud?this.solicitud:null)}tabChanged(e){this.step=e,this.setForm(null)}setForm(e){let t=e?e.person_email||e.email:null;this.form=this.fb.group(this.data.config.followMail?{email:[t,[p.kI.required,p.kI.email]]}:{email:[t]})}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}setTerms2Check(e){this.certCheckComponent.checked=e,this.acceptTerms2=e}setAssignmentCheck(e){this.assignmentCheckComponent.checked=e,this.assignment=e}setTerms(e){this.acceptTerms=e}setTerms2(e){this.acceptTerms2=e}setAssignment(e){this.assignment=e}nextStep(){let e={terms_and_conditions_service:this.acceptTerms,terms_and_conditions_certificate_emition:this.acceptTerms2,request_id:this.solicitud.request_id};this.data&&this.data.config&&this.data.config.followMail&&(e.email_copy=this.form.get("email").value),(this.data.config.activatePower||this.solicitud?.power_activate)&&(e.power_activate=!0,e.terms_and_conditions_power=this.powerActivate?1:0),this.next.emit(e)}gotoTermsAndConditions(e){this.termsReaded=!0,e.preventDefault(),e.stopPropagation(),this.goTerms.emit(!0)}gotoTermsAndConditionsCertificate(e){this.terms2Readed=!0,e.preventDefault(),e.stopPropagation(),this.goTermsCert.emit(!0)}getIfValid(){return!((this.requestID?this.solicitud?.power_activate:this.data?.config.activatePower)&&!this.powerActivate)&&this.getAssignmentValidation()}getAssignmentValidation(){return!!(!this.data.config.forceChecks||this.termsReaded&&this.terms2Readed)&&(this.data.config.hideCheckLegal&&(this.acceptTerms=!0),this.data.config.dataAssignmentCheck?this.acceptTerms&&this.acceptTerms2&&this.assignment:this.acceptTerms&&this.acceptTerms2)}gotoPowerConditions(e){this.goPower.emit(!0)}setPower(e){this.powerActivate=e}}return e.ɵfac=function(t){return new(t||e)(U.Y36(Z.F),U.Y36(p.QS))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(U.Gf(fe,5),U.Gf(ge,5),U.Gf(_e,5)),2&e){let e;U.iGM(e=U.CRH())&&(t.checkComponent=e.first),U.iGM(e=U.CRH())&&(t.certCheckComponent=e.first),U.iGM(e=U.CRH())&&(t.assignmentCheckComponent=e.first)}},inputs:{userId:"userId",flowName:"flowName",requestID:"requestID",data:"data",texts:"texts",solicitud:"solicitud",acceptTerms:"acceptTerms",acceptTerms2:"acceptTerms2",termsReaded:"termsReaded",terms2Readed:"terms2Readed"},outputs:{next:"nextStep",goTerms:"goToTerms",goTermsCert:"goToTermsCertificate",goPower:"goToPower"},features:[U._Bn([{provide:T.sG,useValue:Ce},{provide:U.soG,useValue:"es-ES"}])],decls:22,vars:24,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["class","w-full",4,"ngIf"],["class","mt-6 flex justify-start items-center w-full flex-100",4,"ngIf"],["class","flex justify-between items-center w-full flex-100",4,"ngIf"],[1,"flex","justify-start","items-center","w-full","flex-100"],[3,"color","changeCheckbox"],["termsCertCheckbox",""],["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"w-full"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","email","type","email","placeholder","Ingresa tu email","matInput",""],[1,"mt-6","flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],[1,"flex","justify-between","items-center","w-full","flex-100"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA(),U.TgZ(5,"div",4),U.YNc(6,be,5,0,"div",5),U.YNc(7,ve,4,9,"div",6),U.YNc(8,ye,6,1,"div",7),U.TgZ(9,"div",8)(10,"belender-checkbox",9,10),U.NdJ("changeCheckbox",(function(e){return t.setTerms2(e)})),U._uU(12," He leído y acepto los "),U.TgZ(13,"a",11),U.NdJ("click",(function(e){return t.gotoTermsAndConditionsCertificate(e)})),U.TgZ(14,"u"),U._uU(15,"términos y condiciones"),U.qZA()(),U._uU(16," para la emisión del certificado "),U.qZA()(),U.YNc(17,we,4,2,"div",6),U.YNc(18,xe,3,0,"div",12),U.qZA(),U.TgZ(19,"div",13)(20,"button",14),U.NdJ("click",(function(){return t.nextStep()})),U._uU(21," Siguiente "),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.form.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,22,t.texts.form.description||""),U.oJD),U.xp6(3),U.Q6J("ngIf",null==t.data||null==t.data.config?null:t.data.config.followMail),U.xp6(1),U.Q6J("ngIf",!t.data.config.hideCheckLegal),U.xp6(1),U.Q6J("ngIf",t.requestID?null==t.solicitud?null:t.solicitud.power_activate:null==t.data?null:t.data.config.activatePower),U.xp6(2),U.Q6J("color",t.data.styles.colors.title),U.xp6(7),U.Q6J("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),U.xp6(1),U.Q6J("ngIf",t.data.config.forceChecks&&(!t.termsReaded||!t.terms2Readed)),U.xp6(2),U.Udp("color",t.form.invalid||!t.getIfValid()?"":t.data.styles.colors.btnText)("background",t.form.invalid||!t.getIfValid()?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",t.form.invalid||!t.getIfValid()))},dependencies:[i.O5,d.Hw,u.lW,A.KE,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.sg,p.u,pe.b,me.T,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Te=n(5145);let Se=(()=>{class e{constructor(e){this.utils=e,this.status="",this.label="Cargando datos.."}ngOnInit(){this.data.config&&this.data.config.infiniteLoopInCompleted?this.label="":Te.Z.forEach((e=>{e.text==this.status&&(this.label=e.label)}))}}return e.ɵfac=function(t){return new(t||e)(U.Y36(Z.F))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-loading-step"]],inputs:{status:"status",data:"data"},decls:5,vars:1,consts:[[1,"fixed-content","h-full"],[1,"h-full","py-10","flex","flex-col","items-center"]],template:function(e,t){1&e&&(U.TgZ(0,"div",0)(1,"div",1),U._UZ(2,"mat-progress-spinner"),U.TgZ(3,"p"),U._uU(4),U.qZA()()()),2&e&&(U.xp6(4),U.Oqu(t.label))},dependencies:[y.Ou],styles:[".content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Me=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA()()),2&e&&(U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.noService.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,8,t.texts.noService.description),U.oJD))},dependencies:[p._Y,p.JL,p.F,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Ie=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.retryOp=new U.vpe(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return"Abandonado después de esperar OTP de Seguridad Social";case"abandoned_after_invalid_otp_seguridad_social":return"Abandonado despues de OTP inválido en Seguridad Social";case"abandoned_after_invalid_otp_aeat":return"Abandonado despues de OTP inválido en AEAT";case"abandoned_after_waiting_otp_aeat":return"Abandonado después de esperar OTP de AEAT";default:return this.solicitud.status_message||this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(_.M),U.Y36(v.o),U.Y36(S.T))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:10,vars:17,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(U.TgZ(0,"div",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.TgZ(5,"div",4),U._uU(6),U.qZA()(),U.TgZ(7,"div",5)(8,"button",6),U.NdJ("click",(function(){return t.retry()})),U._uU(9,"Intentarlo nuevamente"),U.qZA()()()),2&e&&(U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.abandoned.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,15,t.texts.abandoned.description),U.oJD),U.xp6(3),U.hij(" ",t.getTextStatus()," "),U.xp6(2),U.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Ee(e,t){return n=>{const i=n.controls[t];i.errors&&!i.errors.confirmedValidator||i.setErrors(n.controls[e].value!==i.value?{confirmedValidator:!0}:null)}}function Oe(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," La contraseña es requerida "),U.qZA())}function Le(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," La contraseña debe tener al menos 8 carácteres "),U.qZA())}function Pe(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," Es necesario repetir la contraseña "),U.qZA())}function De(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," Las contraseñas deben coincidir "),U.qZA())}function Ae(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," La contraseña debe tener al menos 8 carácteres "),U.qZA())}const Ne={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let qe=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.form=new p.cw({}),this.next=new U.vpe(null)}ngOnInit(){this.setForm()}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({password:["",[p.kI.required]],confirm_password:["",[p.kI.required]]},{validator:Ee("password","confirm_password")})}nextStep(){let e={set_password_certificate:this.form.get("password").value};this.next.emit(e)}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.qu),U.Y36(Z.F))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-password-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep"},features:[U._Bn([{provide:T.sG,useValue:Ne},{provide:U.soG,useValue:"es-ES"}])],decls:22,vars:23,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","password","minlength","8","type","password","matInput",""],["class","text-red-500",4,"ngIf"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","confirm_password","minlength","8","type","password","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-red-500"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA(),U.TgZ(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),U._uU(8,"Contraseña"),U.qZA(),U._UZ(9,"input",6),U.YNc(10,Oe,2,0,"mat-hint",7),U.YNc(11,Le,2,0,"mat-hint",7),U.qZA(),U.TgZ(12,"mat-form-field",8)(13,"mat-label"),U._uU(14,"Repite Contraseña"),U.qZA(),U._UZ(15,"input",9),U.YNc(16,Pe,2,0,"mat-hint",7),U.YNc(17,De,2,0,"mat-hint",7),U.YNc(18,Ae,2,0,"mat-hint",7),U.qZA()(),U.TgZ(19,"div",10)(20,"button",11),U.NdJ("click",(function(){return t.nextStep()})),U._uU(21," Guardar "),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.password.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,21,t.texts.password.description),U.oJD),U.xp6(7),U.Q6J("ngIf",t.f.password.touched&&t.f.password.invalid&&t.f.password.errors.required),U.xp6(1),U.Q6J("ngIf",t.f.password.invalid&&t.f.password.errors.minlength),U.xp6(5),U.Q6J("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.required),U.xp6(1),U.Q6J("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.confirmedValidator),U.xp6(1),U.Q6J("ngIf",t.f.confirm_password.invalid&&t.f.confirm_password.errors.minlength),U.xp6(2),U.Udp("color",t.form.invalid?"":t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",t.form.invalid))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.sg,p.u,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const Ye=["formStep"];function Re(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"vex-power-cert",4),U.NdJ("accept",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.acceptPowerCert())})),U.qZA()}if(2&e){const e=U.oxw();U.Q6J("hideButtons",!1)("flow","KnownClient")("userId",e.userId)}}function Fe(e,t){if(1&e&&(U.TgZ(0,"div",9),U._UZ(1,"img",10),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("src",e.data.styles.logoUrl,U.LSH)}}function Ue(e,t){if(1&e&&U._UZ(0,"belender-loading-step",20),2&e){const e=U.oxw(3);U.Q6J("status",null==e.solicitud?null:e.solicitud.status_code)("data",e.data)}}function Ze(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-form-step",21,22),U.NdJ("goToTerms",(function(){U.CHM(e);const t=U.oxw(3);return U.KtG(t.gotoTermsAndConditions())}))("goToPower",(function(){U.CHM(e);const t=U.oxw(3);return U.KtG(t.gotoPowerConditions())}))("goToTermsCertificate",(function(){U.CHM(e);const t=U.oxw(3);return U.KtG(t.gotoTermsAndConditionsCertificate())}))("nextStep",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.gotoPassword(t))})),U.qZA()}if(2&e){const e=U.oxw(3);U.Q6J("userId",e.userId)("requestID",e.requestID)("data",e.data)("flowName",e.flowName)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function He(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-password-step",23),U.NdJ("nextStep",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.sendPassword(t))})),U.qZA()}if(2&e){const e=U.oxw(3);U.Q6J("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function je(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-otp-step",24),U.NdJ("resendOTP",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.resendOTP(t))}))("errorPhone",(function(){U.CHM(e);const t=U.oxw(3);return U.KtG(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.requestOTP(t))})),U.qZA()}if(2&e){const e=U.oxw(3);U.Q6J("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function ze(e,t){if(1&e&&U._UZ(0,"belender-success-step",25),2&e){const e=U.oxw(3);U.Q6J("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Be(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-fail-step",26),U.NdJ("retry",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.retryRequest(t))}))("newRequest",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.newRequest(t))})),U.qZA()}if(2&e){const e=U.oxw(3);U.Q6J("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Je(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-abandoned-step",27),U.NdJ("retry",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.retryRequest(t))})),U.qZA()}if(2&e){const e=U.oxw(3);U.Q6J("solicitud",e.solicitud)("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Ve(e,t){if(1&e&&U._UZ(0,"belender-no-service-step",28),2&e){const e=U.oxw(3);U.Q6J("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("data",e.data)}}function Qe(e,t){if(1&e&&(U.TgZ(0,"div",29)(1,"div",30)(2,"h1",31),U._uU(3,"No existe la solicitud"),U.qZA()(),U.TgZ(4,"div",32),U._uU(5,"No existen solicitudes activas con el código requerido"),U.qZA()()),2&e){const e=U.oxw(3);U.xp6(4),U.Udp("color",e.data.styles.colors.text)}}function We(e,t){if(1&e&&(U.ynx(0),U.YNc(1,Ue,1,2,"belender-loading-step",11),U.YNc(2,Ze,2,6,"belender-form-step",12),U.YNc(3,He,1,3,"belender-password-step",13),U.YNc(4,je,1,3,"belender-otp-step",14),U.YNc(5,ze,1,2,"belender-success-step",15),U.YNc(6,Be,1,3,"belender-fail-step",16),U.YNc(7,Je,1,3,"belender-abandoned-step",17),U.YNc(8,Ve,1,2,"belender-no-service-step",18),U.YNc(9,Qe,6,2,"div",19),U.BQk()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("ngIf","loading"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","form"==e.getStatus()&&!e.loading),U.xp6(1),U.Q6J("ngIf","password"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","otp"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","success"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","failed"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","abandoned"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","no-service"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","no-exist"==e.getStatus())}}function Ge(e,t){1&e&&U._UZ(0,"belender-disabled-url")}function $e(e,t){if(1&e&&(U.TgZ(0,"div",33),U._UZ(1,"mat-progress-spinner",34),U.TgZ(2,"p",35),U._uU(3),U.qZA()()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("value",e.spinnerValue)("mode",e.spinnerMode),U.xp6(2),U.Oqu(e.loading)}}function Ke(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",36)(1,"div",29)(2,"div",37),U._uU(3,"Error!"),U.qZA(),U._UZ(4,"div",38),U.qZA(),U.TgZ(5,"div",39)(6,"button",40),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw(2);return U.KtG(t.error=!1)})),U._uU(7,"Ingresar manualmente"),U.qZA()()()}if(2&e){const e=U.oxw(2);U.xp6(4),U.Udp("color",e.data.styles.colors.text),U.Q6J("innerHTML",e.error,U.oJD)}}function Xe(e,t){if(1&e&&(U.TgZ(0,"div",5)(1,"div"),U.YNc(2,Fe,2,1,"div",6),U.YNc(3,We,10,9,"ng-container",3),U.YNc(4,Ge,1,0,"belender-disabled-url",3),U.YNc(5,$e,4,3,"div",7),U.YNc(6,Ke,8,3,"div",8),U.qZA()()),2&e){const e=U.oxw();U.xp6(1),U.Gre("h-full w-full flex-auto p-0 md:p-3 ",e.data.styles.typography,""),U.Udp("background",e.data.styles.colors.background),U.xp6(1),U.Q6J("ngIf",e.data.styles.withLogo&&"loading"!=e.getStatus()),U.xp6(1),U.Q6J("ngIf",!e.error&&!e.disableURL),U.xp6(1),U.Q6J("ngIf",!e.error&&e.disableURL),U.xp6(1),U.Q6J("ngIf",e.loading&&!e.error),U.xp6(1),U.Q6J("ngIf",!e.loading&&e.error)}}function et(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"vex-terms",41),U.NdJ("accepted",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.handleTermsResponse(!0))}))("cancelled",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.handleTermsResponse(!1))})),U.qZA()}if(2&e){const e=U.oxw();U.Q6J("flow","presencial")("requestStatus",e.solicitud?e.solicitud.status_code:"")}}function tt(e,t){if(1&e&&(U.ynx(0),U.TgZ(1,"div",42),U._uU(2),U.qZA(),U.BQk()),2&e){const e=U.oxw();U.xp6(2),U.hij("TestMode ",e.testMode?"ON":"OFF","")}}let nt=class{constructor(e,t,n,i,s,r,o,a,l,c){this.cd=e,this.Activatedroute=t,this.utils=n,this.solicitudesService=i,this.customizationService=s,this.customizationStoreService=r,this.notis=o,this.webhooksService=a,this.knownService=l,this.dialog=c,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.viewPowerTerms=!1,this.disableURL=!1,this.flowName="KnownClient",this.showTermsDialog=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.userId?this.setInitialData(this.userId):this.loading=null,"pro"!=R.N.env&&(Y(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),Y(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}ngOnDestroy(){}setInitialData(e){var t=this;return(0,P.Z)((function*(){const n=yield t.getFlow(e);if(t.data={config:t.customizationStoreService.FUNDER_CONFIG,styles:t.customizationStoreService.FUNDER_STYLES,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.notis.showAlert("Error!","No se ha configurado la customización del widget para este usuario","error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,P.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}sendMessageToParent(e){window.top.postMessage(e,"*")}validateRequestIdInUrl(){this.Activatedroute.queryParams.subscribe((e=>{e&&e.acceptTerms&&(this.autoAcceptTerms=!0),e&&e.request_id?(this.disableURL=!1,this.requestID=e.request_id,this.setFormFromVcCode(e.request_id)):this.loading=!1}),(e=>{this.loading=!1}))}setFormFromVcCode(e){var t=this;return(0,P.Z)((function*(){t.loading="Obteniendo datos de la solicitud...",t.solicitudesService.getSolicitudByCode(e).then((e=>{console.warn("solicitud: ",e.data),e&&e.data?(t.solicitud=e.data,t.setSubscriptionOfRequest(),t.loading=!1,t.skipCreationOfRequest=t.solicitud&&t.solicitud.status_code&&"prerequest"!=t.solicitud.status_code,t.autoAcceptTerms&&t.gotoOTP()):t.loading=!1})).catch((e=>{t.loading=!1}))}))()}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==R.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==R.N.env&&(e="wss://notifications.belender.net"),R.N.notificationsBaseUrl&&(e=R.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),t.setSubscriptionOfRequestOld()},this.socket.onclose=function(e){console.log("Conexión cerrada"),t.setSubscriptionOfRequestOld()}}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,this.sendMessageToParent({type:"websocket",data:e}),"invalid_otp"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),"terms_and_conditions"!=this.solicitud.status_code&&setTimeout((()=>{this.loading=!1,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.solicitudesService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}gotoTerms(e){this.loading="Enviando datos..",e.package_id=this.packId,e.user_id=this.userId,this.testMode?setTimeout((()=>{this.solicitud=new q.l,this.solicitud.status_code="waiting_otp",this.loading=!1}),4e3):this.skipCreationOfRequest?(this.gotoOTP(),this.setSubscriptionOfRequest()):this.solicitudesService.addSolicitud(e,this.packId,this.userId).then((t=>{t&&t.status&&"error"==t.status?(this.solicitud=e,t.message&&(400==t.code?"Birthdate incorrect"==t.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha de nacimiento incorrecta")):(this.solicitud.status_code="no_service",this.loading=!1):(this.solicitud.status_code="form",this.showAlert("Error!",t.message)))):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,this.sendMessageToParent({type:"response",data:t.data||t}),this.gotoOTP()):this.showAlert("Error!","Error desconocido: "+t)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=!1})))}sendNewData(e){this.loading="Enviando información..",this.solicitudesService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e),this.loading=!1):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.initWaitingForResponse("Validando nuevos datos, espere por favor.."),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}showAlert(e,t){this.loading=!1,this.notis.showAlert(e,t)}gotoPassword(e){this.loading="Iniciando el proceso de emisión de certificado..";let t=e;(this.data.config.activatePower||this.solicitud?.power_activate)&&(t.power_activate=!0,t.terms_and_conditions_power=e.terms_and_conditions_power),this.knownService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status?this.sendMessageToParent({type:"response",data:e.data||e}):this.loading=!1})).catch((e=>{t&&t.error&&this.showAlert("Error!",t.error),this.loading=!1}))}gotoOTP(e){let t=e;t.request_id=this.requestID,t.user_id=this.userId,this.initWaitingForResponse("Iniciando el proceso de emisión de certificado.."),setTimeout((()=>{this.solicitud=new q.l,this.loading=!1,this.solicitud.status_code="waiting_otp"}),2e3)}requestOTP(e){let t={otp:e.code,request_id:this.solicitud.request_id};this.loading="Enviando código OTP ..",this.knownService.sendOtp(t).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status?this.sendMessageToParent({type:"response",data:e.data||e}):this.loading=!1})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}sendPassword(e){let t={password:e.set_password_certificate,request_id:this.solicitud.request_id};this.loading="Enviando contraseña..",this.knownService.sendPassword(t).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status?this.sendMessageToParent({type:"response",data:e.data||e}):this.loading=!1})).catch((t=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.solicitudesService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=!1):this.loading=!1})).catch((e=>{this.loading=!1}))}gotoErrorPhone(){}setRequestStatus(e){this.solicitud.status_code=e}retryRequest(e){let t={request_id:e,user_id:this.userId};this.loading="Reintentando enviar la solicitud...",this.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}newRequest(e){this.solicitud.status_code="created"}getStatus(){return!this.solicitud||this.solicitud&&("created"==this.solicitud.status_code||"form"==this.solicitud.status_code||"terms_and_conditions"==this.solicitud.status_code)?"form":!this.solicitud||"waiting_login"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_otp"!=this.solicitud.status_code&&"invalid_otp"!=this.solicitud.status_code&&"waiting_otp_seguridad_social"!=this.solicitud.status_code&&"invalid_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"waiting_password"!=this.solicitud.status_code&&"approved_terms_digital_power"!=this.solicitud.status_code&&"declined_terms_digital_power"!=this.solicitud.status_code?!this.solicitud||"abandoned_after_bad_phone"!=this.solicitud.status_code&&"abandoned_after_invalid_otp"!=this.solicitud.status_code&&"abandoned_after_terms_and_conditions"!=this.solicitud.status_code&&"abandoned_after_waiting_otp"!=this.solicitud.status_code?!this.solicitud||"all_documents_downloaded"!=this.solicitud.status_code&&"certificate_created"!=this.solicitud.status_code&&"partial_documents_downloaded"!=this.solicitud.status_code&&"waiting_certificate"!=this.solicitud.status_code&&"consent_process_completed"!=this.solicitud.status_code&&"success_otp"!=this.solicitud.status_code&&"otp_success"!=this.solicitud.status_code&&"waiting_documents"!=this.solicitud.status_code?!this.solicitud||"bad_phone"!=this.solicitud.status_code&&"phone_not_exist_otp"!=this.solicitud.status_code?!this.solicitud||"failed_with_retry"!=this.solicitud.status_code&&"failed_without_retry"!=this.solicitud.status_code&&"failed_documents_downloaded"!=this.solicitud.status_code?this.solicitud&&"no_service"==this.solicitud.status_code?"no-service":"no-exist":"failed":this.data.config.noRetryInBadPhone?"otp":"error-data":this.data.config&&this.data.config.infiniteLoopInCompleted?"loading":"success":"abandoned":"password":"otp":(this.loading="Estamos procesando su solicitud. Espere un momento por favor","loading")}sendRetry(){}gotoTermsAndConditions(){this.showTermsDialog=!0}handleTermsResponse(e){this.showTermsDialog=!1,e&&this.formComponent.setTermsCheck(!0)}gotoTermsAndConditionsCertificate(){this.dialog.open(F.v,{panelClass:"fullscreen-dialog",data:{flow:"presencial"}}).afterClosed().subscribe((e=>{e&&this.formComponent.setTerms2Check(!0)}))}gotoPowerConditions(){this.viewPowerTerms=!0}acceptPowerCert(){this.viewPowerTerms=!1}};nt.ɵfac=function(e){return new(e||nt)(U.Y36(U.sBO),U.Y36(O.gz),U.Y36(Z.F),U.Y36(_.M),U.Y36(C.w),U.Y36(H.r),U.Y36(S.T),U.Y36(w.t),U.Y36(B),U.Y36(J.uw))},nt.ɵcmp=U.Xpm({type:nt,selectors:[["belender-widget-personal"]],viewQuery:function(e,t){if(1&e&&U.Gf(Ye,5),2&e){let e;U.iGM(e=U.CRH())&&(t.formComponent=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[U._Bn([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:4,vars:4,consts:[[3,"hideButtons","flow","userId","accept",4,"ngIf"],["class","h-full widget-belender",4,"ngIf"],[3,"flow","requestStatus","accepted","cancelled",4,"ngIf"],[4,"ngIf"],[3,"hideButtons","flow","userId","accept"],[1,"h-full","widget-belender"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],["class","loading-wrapper animated fadeIn",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[3,"status","data",4,"ngIf"],[3,"userId","requestID","data","flowName","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep",4,"ngIf"],[3,"data","texts","solicitud","nextStep",4,"ngIf"],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","texts",4,"ngIf"],[3,"data","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"solicitud","data","texts","retry",4,"ngIf"],[3,"texts","data",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"status","data"],[3,"userId","requestID","data","flowName","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep"],["formStep",""],[3,"data","texts","solicitud","nextStep"],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep"],[3,"data","texts"],[3,"data","texts","solicitud","retry","newRequest"],[3,"solicitud","data","texts","retry"],[3,"texts","data"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[3,"flow","requestStatus","accepted","cancelled"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"]],template:function(e,t){1&e&&(U.YNc(0,Re,1,3,"vex-power-cert",0),U.YNc(1,Xe,7,10,"div",1),U.YNc(2,et,1,2,"vex-terms",2),U.YNc(3,tt,3,1,"ng-container",3)),2&e&&(U.Q6J("ngIf",t.viewPowerTerms),U.xp6(1),U.Q6J("ngIf",t.data),U.xp6(1),U.Q6J("ngIf",t.showTermsDialog),U.xp6(1),U.Q6J("ngIf",t.testMode))},dependencies:[i.O5,u.lW,y.Ou,V.L,Q.L,W.q,ae,ce,he,ke,Se,Me,Ie,qe],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),nt=(0,D.gn)([(0,N.c)()],nt);const it=[{path:":idUser",component:nt},{path:":idUser/:packID",component:nt}];let st=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=U.oAB({type:e}),e.ɵinj=U.cJS({imports:[O.Bz.forChild(it),O.Bz,L.d8]}),e})();var rt=n(6981),ot=n(3848),at=n(1129),lt=n(3295),ct=n(1258),dt=n(2266),ut=n(3300),ht=n(865);let pt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=U.oAB({type:e}),e.ɵinj=U.cJS({providers:[_.M,v.o,C.w,w.t,S.T,E.t,B,{provide:T.Ad,useValue:"es-ES"}],imports:[st,i.ez,s.G,r.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,x.c,p.u5,m.AV,p.UX,f.LD,g.vV,b.a,y.Cq,k.FA,T.XK,M.T5,I.Fk,rt.x,ot.Nh,at.n,lt.g,ct.H,dt.L,ut.C,ht.q]}),e})()},1742:(e,t,n)=>{n.d(t,{_:()=>d});var i=n(1931),s=n(1135),r=n(5762),o=n(2340),a=n(9359),l=n(4650),c=n(8460);let d=(()=>{class e{constructor(e){this.customizationStoreService=e,this.labels=i.S.es,this.socket=null,this._request=new s.X({...new r.l,status_code:"created"}),this._lastThreeNumbersPhone=new s.X(null),this._request_status=new s.X(null),this.currentHeight=0,this.request$=this._request.asObservable(),this.request_status$=this._request_status.asObservable(),this.lastThreeNumbersPhone$=this._lastThreeNumbersPhone.asObservable()}parseErrorResponse(e){if(Array.isArray(e)){let t="";return e.forEach((e=>{t+=e+" "})),{title:this.labels.warnings.errorSomeData,description:t}}return"does not have pin service"==e.toLowerCase()||"does not have clave pin service"==e.toLowerCase()?{title:"no-service",code:"no-service",description:this.labels.warnings.noPinService}:"document number invalid."==e.toLowerCase()?{title:this.labels.warnings.wrongDni,code:"dni",description:this.labels.warnings.wrongDniDesc}:"incorrect support number"==e.toLowerCase()?{title:this.labels.warnings.error,code:"sop",description:this.labels.warnings.wrongSupport}:"incorrect date"==e.toLowerCase()?{title:this.labels.warnings.wrongDate,code:"nac",description:this.labels.warnings.wrongDateDesc}:{title:"Error!",code:"unknown",description:e}}setGlobalVariables(){this.REQUEST=this._request.value,this.REQUEST_STATUS=this.REQUEST.status_code,this._request_status.next(this.REQUEST_STATUS)}setRequest(e){this._request.next({...e}),this.setGlobalVariables()}patch(e){this._request.next({...this._request.value,...e}),this.setGlobalVariables()}setParameter(e,t){this._request.next({...this._request.value,[e]:t}),this.setGlobalVariables()}setRequestStatus(e){this._request.next({...this._request.value,status_code:e}),this.setGlobalVariables()}setRequestID(e){this._request.next({...this._request.value,request_id:e}),this.setGlobalVariables()}subscribeWS(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==o.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==o.N.env&&(e="wss://notifications.belender.net"),o.N.notificationsBaseUrl&&(e=o.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this._request.value.request_id}&user_id=${this.customizationStoreService.USER_ID}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);n&&t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}handlePusherNotification(e){if(e&&(this.sendMessageToParent({type:"websocket",data:e}),e)){e.person_last_three_phone_number&&this._lastThreeNumbersPhone.next(e.person_last_three_phone_number);const t=e.status_code;t&&(t===a.q.CONSENT_PROCESS_COMPLETED?(this.disconnectWebsocket(),this.setRequestStatus("success")):t.startsWith("abandoned")&&(this.disconnectWebsocket(),this.setRequestStatus("abandoned")))}}sendMessageToParent(e){if(e&&e.type&&"widgetHeight"===e.type){if(e.data===this.currentHeight)return;this.currentHeight=e.data}window.top.postMessage(e,"*")}disconnectWebsocket(){this.socket&&this.socket.close()}}return e.ɵfac=function(t){return new(t||e)(l.LFG(c.r))},e.ɵprov=l.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},2142:(e,t,n)=>{n.d(t,{n:()=>Q});var i=n(5861),s=n(7582),r=n(9549),o=n(9933),a=n(5762),l=n(8259),c=n(2340),d=n(667),u=n(9359),h=n(4650),p=n(9299),m=n(5089),f=n(7489),g=n(5206),_=n(8460),b=n(9045),v=n(7367),y=n(7308),w=n(1742);const x=["formStep"],C=["otpStep"];function k(e,t){if(1&e&&(h.TgZ(0,"div",9),h._UZ(1,"mat-icon",10),h._uU(2),h.qZA()),2&e){const e=h.oxw(2);h.Q6J("@fadeInUp",void 0),h.xp6(2),h.hij(" ",e.warningAlert," ")}}function T(e,t){1&e&&(h.TgZ(0,"div",11),h._UZ(1,"mat-progress-spinner",12),h.qZA()),2&e&&(h.xp6(1),h.Q6J("value",0))}function S(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"belender-form-step",23,24),h.NdJ("openTerms",(function(){h.CHM(e);const t=h.oxw(3);return h.KtG(t.showTermsDialog=!0)})),h.qZA()}if(2&e){const e=h.oxw(3);h.Q6J("skipCreationOfRequest",e.skipCreationOfRequest)("deviceInfoDetails",e.deviceInfoDetails)("flowName",e.flowName)("acceptCirbe",e.acceptCirbe)("requestIDFromURL",e.requestIDFromURL)("texts",e.data[e.flowName].texts)("data",e.data)("lang",e.currentLang)("editable_dates",e.editable_dates)}}function M(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"belender-shared-otp-step",25,26),h.NdJ("resendOTP",(function(t){h.CHM(e);const n=h.oxw(3);return h.KtG(n.resendOTP(t))}))("errorPhone",(function(){h.CHM(e);const t=h.oxw(3);return h.KtG(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){h.CHM(e);const n=h.oxw(3);return h.KtG(n.requestOTP(t))})),h.qZA()}if(2&e){const e=h.oxw(3);h.Q6J("otpType",e.getOtpType(e.requestStatus))("flowType",e.flowName)("data",e.data)("labels",e.labels)("minLength",e.getOTPMinLength())("lastThreeNumbersPhone",e.lastThreeNumbersPhone)("texts",e.data[e.flowName].texts)}}function I(e,t){if(1&e&&h._UZ(0,"belender-success-step",27),2&e){const e=h.oxw(3);h.Q6J("data",e.data)("labels",e.labels)("flowName",e.flowName)("texts",e.data[e.flowName].texts)}}function E(e,t){if(1&e&&h._UZ(0,"belender-duplicated-request-step",28),2&e){const e=h.oxw(3);h.Q6J("data",e.data)}}function O(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"belender-error-birthday-step",29),h.NdJ("nextStep",(function(t){h.CHM(e);const n=h.oxw(3);return h.KtG(n.setBirthDate(t))})),h.qZA()}if(2&e){const e=h.oxw(3);h.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function L(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"belender-error-expiration-step",29),h.NdJ("nextStep",(function(t){h.CHM(e);const n=h.oxw(3);return h.KtG(n.setExpiration(t))})),h.qZA()}if(2&e){const e=h.oxw(3);h.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function P(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"belender-error-support-number-step",29),h.NdJ("nextStep",(function(t){h.CHM(e);const n=h.oxw(3);return h.KtG(n.setSupportNumber(t))})),h.qZA()}if(2&e){const e=h.oxw(3);h.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function D(e,t){if(1&e&&h._UZ(0,"belender-fail-step",30),2&e){const e=h.oxw(3);h.Q6J("data",e.data)("texts",e.data[e.flowName].texts)}}function A(e,t){if(1&e&&h._UZ(0,"belender-abandoned-step",30),2&e){const e=h.oxw(3);h.Q6J("data",e.data)("texts",e.data[e.flowName].texts)}}function N(e,t){if(1&e&&h._UZ(0,"belender-no-service-step",31),2&e){const e=h.oxw(3);h.Q6J("texts",e.data[e.flowName].texts)("data",e.data)}}function q(e,t){if(1&e&&h._UZ(0,"belender-standby-step",31),2&e){const e=h.oxw(3);h.Q6J("texts",e.data[e.flowName].texts)("data",e.data)}}function Y(e,t){if(1&e&&(h.TgZ(0,"div",32)(1,"div",33)(2,"h1",34),h._uU(3,"No existe la solicitud"),h.qZA()(),h.TgZ(4,"div",35),h._uU(5," No existen solicitudes activas con el código requerido "),h.qZA()()),2&e){const e=h.oxw(3);h.xp6(4),h.Udp("color",e.data.styles.colors.text)}}function R(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"belender-cancel-request",36),h.NdJ("updateStatusCode",(function(t){h.CHM(e);const n=h.oxw(3);return h.KtG(n.setCancel(t))})),h.qZA()}if(2&e){const e=h.oxw(3);h.Q6J("flowType",e.flowName)("data",e.data)("labels",e.labels)("textColor",e.data.styles.colors.text)("customText",e.data.config.cancelRequestText)}}function F(e,t){if(1&e&&(h._UZ(0,"div",37),h.ALo(1,"safeHtml")),2&e){const e=h.oxw(3);h.Udp("color",e.data.styles.colors.text),h.Q6J("innerHTML",e.data[e.flowName]&&e.data[e.flowName].texts&&e.data[e.flowName].texts.form&&e.data[e.flowName].texts.form.aditionalDescription?h.lcZ(1,3,(null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.aditionalDescription)||""):"",h.oJD)}}function U(e,t){if(1&e&&(h.ynx(0),h.YNc(1,S,2,9,"belender-form-step",13),h.YNc(2,M,2,7,"belender-shared-otp-step",14),h.YNc(3,I,1,4,"belender-success-step",15),h.YNc(4,E,1,1,"belender-duplicated-request-step",16),h.YNc(5,O,1,3,"belender-error-birthday-step",17),h.YNc(6,L,1,3,"belender-error-expiration-step",17),h.YNc(7,P,1,3,"belender-error-support-number-step",17),h.YNc(8,D,1,2,"belender-fail-step",18),h.YNc(9,A,1,2,"belender-abandoned-step",18),h.YNc(10,N,1,2,"belender-no-service-step",19),h.YNc(11,q,1,2,"belender-standby-step",19),h.YNc(12,Y,6,2,"div",20),h.YNc(13,R,1,5,"belender-cancel-request",21),h.YNc(14,F,2,5,"div",22),h.BQk()),2&e){const e=h.oxw(2);h.xp6(1),h.Q6J("ngIf","form"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","otp_ss"==e.requestStatus||"otp_aeat"==e.requestStatus||"otp_bde"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","success"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","duplicated"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","error-birth-date"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","error-expiration-date"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","error-support-number"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","failed"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","abandoned"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","no-service"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","standby"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","created"!=e.step),h.xp6(1),h.Q6J("ngIf",e.showCancelRequest&&e.data.config.cancelRequest),h.xp6(1),h.Q6J("ngIf","form"===e.requestStatus&&!e.loadingRequestData&&e.data[e.flowName]&&(null==e.data[e.flowName]?null:e.data[e.flowName].showAditionalDescription))}}function Z(e,t){1&e&&h._UZ(0,"belender-disabled-url")}function H(e,t){if(1&e&&(h.TgZ(0,"div",38),h._UZ(1,"div",39),h.qZA()),2&e){const e=h.oxw(2);h.xp6(1),h.Q6J("innerHTML",e.warning,h.oJD)}}function j(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"div",40)(1,"div",32)(2,"div",41),h._uU(3,"Error!"),h.qZA(),h._UZ(4,"div",42),h.qZA(),h.TgZ(5,"div",43)(6,"button",44),h.NdJ("click",(function(){h.CHM(e);const t=h.oxw(2);return h.KtG(t.error=!1)})),h._uU(7," Ingresar manualmente "),h.qZA()()()}if(2&e){const e=h.oxw(2);h.xp6(4),h.Udp("color",e.data.styles.colors.text),h.Q6J("innerHTML",e.error,h.oJD)}}function z(e,t){if(1&e&&(h.TgZ(0,"div",3)(1,"div"),h.YNc(2,k,3,2,"div",4),h.YNc(3,T,2,1,"div",5),h.YNc(4,U,15,14,"ng-container",6),h.YNc(5,Z,1,0,"belender-disabled-url",6),h.YNc(6,H,2,1,"div",7),h.YNc(7,j,8,3,"div",8),h.qZA()()),2&e){const e=h.oxw();h.xp6(1),h.Gre("h-full w-full relative flex-auto p-0 md:p-3 ",null==e.data||null==e.data.styles?null:e.data.styles.typography,""),h.Udp("background",null==e.data||null==e.data.styles||null==e.data.styles.colors?null:e.data.styles.colors.background),h.xp6(1),h.Q6J("ngIf",e.warningAlert&&"success"!=e.requestStatus),h.xp6(1),h.Q6J("ngIf",e.data.config.infiniteLoopInCompleted&&"success"===e.requestStatus),h.xp6(1),h.Q6J("ngIf",!e.error&&!e.disableURL),h.xp6(1),h.Q6J("ngIf",!e.error&&e.disableURL),h.xp6(1),h.Q6J("ngIf",!e.loading&&e.warning),h.xp6(1),h.Q6J("ngIf",!e.loading&&e.error)}}function B(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"vex-terms",45),h.NdJ("accepted",(function(){h.CHM(e);const t=h.oxw();return h.KtG(t.handleTermsResponse(!0))}))("cancelled",(function(){h.CHM(e);const t=h.oxw();return h.KtG(t.handleTermsResponse(!1))})),h.qZA()}if(2&e){const e=h.oxw();h.Q6J("flow",e.flowName)("lang",e.currentLang)("requestID",e.requestID)("requestStatus",e.solicitud?e.solicitud.status_code:"")("allData",e.data)}}function J(e,t){if(1&e&&(h.TgZ(0,"div",46),h._UZ(1,"mat-progress-spinner",47),h.TgZ(2,"p",48),h._uU(3),h.qZA()()),2&e){const e=h.oxw();h.xp6(3),h.hij(" ",e.loading||""," ")}}const V={"Seguridad Social":"waiting_otp_seguridad_social",AEAT:"waiting_otp_aeat","Banco de España":"waiting_otp_bde"};let Q=class{constructor(e,t,n,i,s,r,o,a,l,d){this.cd=e,this.Activatedroute=t,this.utils=n,this.pinService=i,this.flowsS=s,this.customizationStoreService=r,this.deviceInfoService=o,this.customizationService=a,this.translationService=l,this.pinUtils=d,this.data=null,this.disableActions=!1,this.step="created",this.clientEnviroment="belender",this.showCancelRequest=!1,this.loading=null,this.error=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.lastThreeNumbersPhone=null,this.requestIDFromURL=!1,this.paramsSetted=!1,this.stopPropagationOfSuccess=!1,this.picturesTaken=[],this.disableURL=!1,this.selectedLanguage="es",this.loadingRequestData=!1,this.env=c.N,this.intervalToAskBack=null,this.requestedFromDetail=!1,this.intervalCount=0,this.requestStatus="",this.isScaled=!1,this.flowName="ClavePin",this.currentLang="",this.acceptCirbe=!1,this.showTermsDialog=!1,this.editable_dates=!1,this.termsOpened=!1,localStorage.getItem("belender-language")&&(this.selectedLanguage=localStorage.getItem("belender-language")),this.deviceInfoDetails$=this.deviceInfoService.deviceInfo$.subscribe((e=>{Object.keys(e).length>0&&(this.deviceInfoDetails=e)}))}ngOnInit(){this.labels=this.pinUtils.labels,this.loading=this.labels.loadings.gettingData,this.pinUtils.request_status$.subscribe((e=>{this.setStatus()})),this.initFunctions()}ngOnDestroy(){window.screen&&window.screen.orientation&&this.orientationChangeHandler&&window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}ngAfterViewChecked(){this.getWidgetCardHeight()}isQA(){return"qa"===c.N.env}initFunctions(){var e=this;return(0,i.Z)((function*(){var t;e.Activatedroute.queryParams.subscribe((t=(0,i.Z)((function*(t){t&&t.request_id&&(e.requestID=t.request_id,console.warn(e.requestID)),t.lang?(e.currentLang=t.lang,e.loading=e.translationService.getFirstLoading(e.currentLang),e.setTranslation()):e.loading=e.pinUtils.labels.loadings.gettingData,"true"===t.editable_dates&&(e.editable_dates=t.editable_dates),e.customizationStoreService.USER_ID?e.setInitialData(e.customizationStoreService.USER_ID):e.loading=null})),function(e){return t.apply(this,arguments)}))}))()}setTranslation(){let e=this.translationService.getLabelsTranslated(this.currentLang);e&&(this.pinUtils.labels=e)}getWindowsScreenOrientation(){window.screen&&window.screen.orientation?(this.orientationChangeHandler=()=>{this.getWidgetCardHeight()},window.screen.orientation.addEventListener("change",this.orientationChangeHandler)):console.warn("Screen Orientation API not supported.")}getWidgetCardHeight(){let e=l("#widget-wrapper").height()||0;this.isScaled$=this.deviceInfoService.isScaled$.subscribe((t=>{this.isScaled=t,this.isScaled&&(e*=1.5)})),this.pinUtils.sendMessageToParent({type:"widgetHeight",data:e})}getOtpType(e){switch(e){case"otp_ss":default:return"otpSS";case"otp_aeat":return"otpAEAT";case"otp_bde":return"otpBDE"}}setRequestStatus(e){this.pinUtils?.REQUEST?this.pinUtils.setRequestStatus(e):this.pinUtils.setRequest(new a.l),this.setStatus()}checkClientUrl(){const e=window.location.href;this.clientEnviroment=this.getClientFromUrl(e)}getOTPMinLength(){return this.env?"dev"===this.env.env&&"belender"===this.clientEnviroment?6:"qa"===this.env.env||"dev"===this.env.env&&"opendata"===this.clientEnviroment?3:6:6}getClientFromUrl(e){return e.includes("opendata")?"opendata":"belender"}setWarningPortals(){this.flowsS.getFlows().then((e=>{if(e&&e.data&&e.data.length){let t=e.data.find((e=>e.name==this.flowName));t&&t.status&&"OCCASIONAL_FAIL"==t.status&&(this.warningAlert=this.pinUtils.labels.warnings.ocassionalError)}})).catch((e=>{console.error(e)}))}setInitialData(e){var t=this;return(0,i.Z)((function*(){if(yield t.validateRequestIdInUrl(),t.flowConfig=yield t.getFlow(e),t.funderConfig=t.customizationStoreService.FUNDER_CONFIG,t.funderStyles=t.customizationStoreService.FUNDER_STYLES,t.data={config:t.funderConfig,styles:t.funderStyles,[t.flowName]:t.flowConfig},!t.data.config||!t.data.config.funder_id)return t.showAlert(t.pinUtils.labels.warnings.error,t.pinUtils.labels.warnings.noCustomization,"error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.customizationStoreService.setFunderID(t.financiadorID),t.disableURL=t.data.config.disableUrlWidget,t.loading=null,t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName,t.currentLang,t.requestID,t.solicitud?t.solicitud.status_code:"").then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}validateRequestIdInUrl(){var e=this;return(0,i.Z)((function*(){return new Promise((t=>{var n;e.Activatedroute.queryParams.subscribe({next:(n=(0,i.Z)((function*(n){if(n&&n.acceptTerms&&(e.autoAcceptTerms=!0),n&&n.request_id){e.disableURL=!1,e.requestID=n.request_id;let i=yield e.setFormFromVcCode(n.request_id,n);e.requestIDFromURL=!0,t(i)}else n?(e.setParamsToRequest(n),t(null)):(e.loading=null,t(null))})),function(e){return n.apply(this,arguments)}),error:()=>{e.loading=null,t(null)}})}))}))()}setParamsToRequest(e){this.pinUtils?.REQUEST||this.pinUtils.setRequest(new a.l),e.success&&(this.stopPropagationOfSuccess=!0),e.accept_cirbe&&(this.acceptCirbe=!0),(e.document_number||e.document)&&!this.pinUtils?.REQUEST.person_document_number&&(this.pinUtils.REQUEST.person_document_number=e.document_number||e.document,this.requestIDFromURL=!0),(e.birth_date||e.birthday)&&!this.pinUtils?.REQUEST.birth_date&&(this.pinUtils.REQUEST.birth_date=e.birth_date||e.birthday,this.requestIDFromURL=!0),(e.document_expiration_date||e.expiration)&&!this.pinUtils.REQUEST.person_document_expiration_date&&(this.pinUtils.REQUEST.person_document_expiration_date=e.document_expiration_date||e.expiration,this.requestIDFromURL=!0),(e.document_support||e.supportNumber)&&!this.pinUtils.REQUEST.document_support&&(this.pinUtils.REQUEST.document_support=e.document_support||e.supportNumber,this.requestIDFromURL=!0),e.email&&!this.pinUtils.REQUEST.email&&(this.pinUtils.REQUEST.email=e.email,this.requestIDFromURL=!0,this.paramsSetted=!0),this.paramsSetted=!0}setFormFromVcCode(e,t){var n=this;return(0,i.Z)((function*(){return n.loading=n.pinUtils.labels.loadings.gettingData,n.loadingRequestData=!0,new Promise((i=>{n.pinService.getSolicitudByCode(e).then((e=>{e&&e.data?(n.pinUtils.setRequest(e.data),n.setRequestStatus(n.pinUtils.REQUEST.status_code),n.pinUtils.subscribeWS(),n.loading=null,n.skipCreationOfRequest=n.solicitud&&n.solicitud.status_code&&"prerequest"!=n.solicitud.status_code,n.setParamsToRequest(t)):n.loading=null,n.loadingRequestData=!1,i(n.solicitud||null)})).catch((e=>{n.loading=null,n.loadingRequestData=!1,i(null)}))}))}))()}handleBadPhone(){this.pinUtils.disconnectWebsocket(),this.loading=this.pinUtils.labels.loadings.validatingData,this.pinService.noMatchPhone({request_id:this.pinUtils.REQUEST.request_id,user_id:this.customizationStoreService.USER_ID}).then((e=>{this.pinUtils.REQUEST||(this.pinUtils.setRequest(new a.l),this.setRequestStatus(this.pinUtils.REQUEST.status_code)),e&&e.data&&(this.pinUtils.setRequest(e.data),this.setRequestStatus(this.pinUtils.REQUEST.status_code)),this.loading=null})).catch((e=>{this.showAlert("Error!",e),setTimeout((()=>{this.pinUtils.REQUEST||(this.pinUtils.setRequest(new a.l),this.setRequestStatus(this.pinUtils.REQUEST.status_code)),this.setRequestStatus("failed_without_retry"),this.loading=null}),1e3)}))}sendNewData(e){this.loading=this.pinUtils.labels.loadings.sendingData,this.pinService.fixData(this.pinUtils.REQUEST.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e,"error"),this.loading=null):e&&"success"==e.status&&(this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),this.loading=this.pinUtils.labels.loadings.validatingData,this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error,"error")}))}showAlert(e,t,n){this.loading=null,this.getFunderIconType(n),console.warn(e,t,n),this.warning=`<div class="flex flex-col w-full items-start gap-0 pl-2"><strong class="text-md" >${e}</strong><small>${t}</small></div>`}getFunderIconType(e){if(!e||!this.funderStyles)return"error";switch(e){case"error":return this.funderStyles.errorIcon||e;case"success":return this.funderStyles.successIcon||e;case"warning":return this.funderStyles.warningIcon||e;case"info":return this.funderStyles.infoIcon||e;default:return e}}isBdeStatus(){let e=this.pinUtils.REQUEST?this.pinUtils.REQUEST.status_code:null;return!!e&&("waiting_otp_bde"===e||"waiting_login_bde"===e||"invalid_otp_bde"===e)}sendOtpToBde(e){this.pinUtils.disconnectWebsocket(),this.pinService.sendOTPToBde(e,"qa"===c.N.env).then((e=>{e.status&&"error"==e.status?(e.message&&"Invalid request status: waiting_login_seguridad_social"==e.message?this.showAlert(this.pinUtils.labels.warnings.error,this.pinUtils.labels.warnings.noOtp):this.showAlert("Error!",e.message?e.message:e),this.loading=null):e?(console.warn("handle success!"),e.data?e.data.consent_process_completed=!0:e.consent_process_completed=!0,this.handleRequestStatus(e.data?e.data:e),this.cd.markForCheck()):this.loading=null})).catch((e=>{this.showAlert("Error!",e&&e.error?e.error:e),this.loading=null}))}requestOTP(e){var t=this;return(0,i.Z)((function*(){if(!e?.code)return void t.showAlert("Error",t.pinUtils.labels.warnings.wrongOtp);t.loading=t.labels.loadings.sendingData;const n={user_id:t.customizationStoreService.USER_ID,request_id:t.pinUtils.REQUEST.request_id,code:e.code};try{if(t.isBdeStatus()){const e=yield t.sendOtpToBde(n);return void t.handleSendOtpResponse(e)}const e=yield t.pinService.sendOTP(n,t.isQA());t.handleSendOtpResponse(e)}catch(e){const n=e?.error??e?.message??String(e);t.showAlert("Error!",n)}finally{t.loading=null}}))()}handleSendOtpResponse(e){if(e)return"error"===e.status?"Invalid request status: waiting_login_seguridad_social"===e.message?void this.showAlert(this.pinUtils.labels.warnings.error,this.pinUtils.labels.warnings.noOtp):void this.showAlert("Error!",e.message??e):"success"===e.status?(this.handleRequestStatus(e.data??e),void this.cd.markForCheck()):void this.showAlert("Error!",this.pinUtils.labels.warnings.noOtp);this.showAlert("Error!",this.pinUtils.labels.warnings.noOtp)}handleRequestStatus(e){if(e.consent_process_completed)return this.requestedFromDetail=!0,this.pinUtils.sendMessageToParent({type:"response",data:{status_message:"El proceso de consentimiento ha finalizado",widget_url:this.pinUtils?.REQUEST?.widget_url||"",status_code:u.q.CONSENT_PROCESS_COMPLETED,user_id:this.customizationStoreService?.USER_ID||"",funder_id:this.customizationStoreService?.FUNDER_ID||"",request_id:this.pinUtils?.REQUEST?.request_id||"",widget_url_boxed:this.pinUtils?.REQUEST?.widget_url_boxed||""}}),this.pinUtils.setRequestStatus(u.q.CONSENT_PROCESS_COMPLETED),setTimeout((()=>this.pinUtils.disconnectWebsocket()),1e3),void(this.data[this.flowName].showDocumentsOnSuccess&&!this.intervalToAskBack&&this.initIntervalToAskBack());if(this.otpComponent?.resetOtpNumber(),!e.otp_status&&!e.next_step_detail)return this.pinUtils.setRequestStatus("failed"),this.showAlert(this.pinUtils.labels.warnings.error,this.pinUtils.labels.warnings.wrongOtp),void this.pinUtils.sendMessageToParent({type:"response",data:e});if("INVALID"===e.otp_status)return this.pinUtils.setRequestStatus(e.status_code??"failed"),this.showAlert(this.pinUtils.labels.warnings.error,this.pinUtils.labels.warnings.wrongOtp),void this.pinUtils.sendMessageToParent({type:"response",data:e});if("VALID"===e.otp_status){const t=this.firstPortal(e.next_step_detail);return this.pinUtils.setRequestStatus(t&&V[t]||e.status_code||"failed"),void this.pinUtils.sendMessageToParent({type:"response",data:e})}this.pinUtils.setRequestStatus(e.status_code||"failed"),this.pinUtils.sendMessageToParent({type:"response",data:e})}firstPortal(e){return e?(Array.isArray(e)?e[0]:e)?.portal:void 0}askToBack(){this.pinService.getSolicitudByCode(this.pinUtils?.REQUEST?.request_id).then((e=>{e&&e.data?(this.pinUtils.setRequest(e.data),this.setRequestStatus(this.pinUtils.REQUEST.status_code),this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}gotoErrorPhone(){}setBirthDate(e){}setExpiration(e){}setSupportNumber(e){}resendOTP(e){let t={request_id:this.pinUtils?.REQUEST?.request_id,user_id:this.customizationStoreService.USER_ID};this.loading="Reenviando OTP...",this.pinUtils.subscribeWS(),this.pinService.resendOTP(t).then((e=>{e&&e.data&&(this.pinUtils.setRequest(e.data),this.setRequestStatus(this.pinUtils.REQUEST.status_code)),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}initIntervalToAskBack(){!this.pinUtils?.REQUEST||!this.pinUtils?.REQUEST?.request_id||(this.intervalToAskBack=setInterval((()=>{this.askDetailToBack(this.pinUtils.REQUEST.request_id),this.intervalCount++,this.intervalCount>20&&this.stopInterval()}),5e3))}stopInterval(){this.intervalToAskBack&&clearInterval(this.intervalToAskBack)}askDetailToBack(e){let t=JSON.parse(JSON.stringify(this.pinUtils.REQUEST.status_code));e||this.pinUtils?.REQUEST?.request_id?this.pinService.getSolicitudByCode(e).then((e=>{e&&e.data&&t!=e.data.status_code&&(this.pinUtils.setRequest(e.data),this.setRequestStatus(this.pinUtils.REQUEST.status_code))})).catch((e=>{this.loading=null,this.loadingRequestData=!1})):this.stopInterval()}setStatus(){if(this.showCancelRequest=!0,this.pinUtils?.REQUEST){let e=this.pinUtils?.REQUEST.status_code;if("waiting_documents"===e||"saved_otp"===e)return void(this.loading="Cargando datos...");let t=u.S[e];t&&(t===u.q.SUCCESS&&this.funderConfig&&this.funderConfig.infiniteLoopInCompleted&&(this.loading=" "),(t===u.q.ABANDONED||t===u.q.FAILED)&&(this.showCancelRequest=!1),this.requestStatus=t,this.loading=null)}this.cd.markForCheck()}sendRetry(){}setCancel(e){this.setRequestStatus(e)}pictureTaken(e){this.picturesTaken.push(e._imageAsDataUrl)}getIfShowLogo(){return("loading"!=this.requestStatus&&"success"!=this.requestStatus&&!this.loading||!this.funderConfig?.infiniteLoopInCompleted)&&this.funderStyles?.withLogo}handleTermsResponse(e){this.showTermsDialog=!1,e&&(this.termsOpened=!0,this.formComponent.setTermsCheck(!0))}};Q.ɵfac=function(e){return new(e||Q)(h.Y36(h.sBO),h.Y36(p.gz),h.Y36(m.F),h.Y36(f.v),h.Y36(g.s),h.Y36(_.r),h.Y36(b.H),h.Y36(v.w),h.Y36(y.D),h.Y36(w._))},Q.ɵcmp=h.Xpm({type:Q,selectors:[["belender-widget-pin"]],viewQuery:function(e,t){if(1&e&&(h.Gf(x,5),h.Gf(C,5),h.Gf(x,5)),2&e){let e;h.iGM(e=h.CRH())&&(t.formComponent=e.first),h.iGM(e=h.CRH())&&(t.otpComponent=e.first),h.iGM(e=h.CRH())&&(t.theDiv=e.first)}},inputs:{solicitud:"solicitud",data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID"},features:[h._Bn([{provide:r.o2,useValue:{appearance:"standard"}}])],decls:3,vars:3,consts:[["id","widget-wrapper","class","h-full widget-belender",4,"ngIf"],[3,"flow","lang","requestID","requestStatus","allData","accepted","cancelled",4,"ngIf"],["class","loading-wrapper animated fadeIn",4,"ngIf"],["id","widget-wrapper",1,"h-full","widget-belender"],["class","flex justify-start px-4 py-3 items-center font-bold gap-3 text-md bg-amber-500/20 rounded-sm border border-amber-500 text-amber-500",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],[4,"ngIf"],["class","animated w-full fadeInRight",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"flex","justify-start","px-4","py-3","items-center","font-bold","gap-3","text-md","bg-amber-500/20","rounded-sm","border","border-amber-500","text-amber-500"],["svgIcon","mat:warning"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[3,"skipCreationOfRequest","deviceInfoDetails","flowName","acceptCirbe","requestIDFromURL","texts","data","lang","editable_dates","openTerms",4,"ngIf"],[3,"otpType","flowType","data","labels","minLength","lastThreeNumbersPhone","texts","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","labels","flowName","texts",4,"ngIf"],[3,"data",4,"ngIf"],[3,"data","labels","texts","nextStep",4,"ngIf"],[3,"data","texts",4,"ngIf"],[3,"texts","data",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"flowType","data","labels","textColor","customText","updateStatusCode",4,"ngIf"],["class","subheading-1 p-4 custom-html",3,"color","innerHTML",4,"ngIf"],[3,"skipCreationOfRequest","deviceInfoDetails","flowName","acceptCirbe","requestIDFromURL","texts","data","lang","editable_dates","openTerms"],["formStep",""],[3,"otpType","flowType","data","labels","minLength","lastThreeNumbersPhone","texts","resendOTP","errorPhone","nextStep"],["otpStep",""],[3,"data","labels","flowName","texts"],[3,"data"],[3,"data","labels","texts","nextStep"],[3,"data","texts"],[3,"texts","data"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[3,"flowType","data","labels","textColor","customText","updateStatusCode"],[1,"subheading-1","p-4","custom-html",3,"innerHTML"],[1,"animated","w-full","fadeInRight"],[1,"px-6","py-4","w-full","bg-orange-500/10","rounded-md","flex","flex-col","text-orange-600",3,"innerHTML"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[3,"flow","lang","requestID","requestStatus","allData","accepted","cancelled"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(h.YNc(0,z,8,11,"div",0),h.YNc(1,B,1,5,"vex-terms",1),h.YNc(2,J,4,1,"div",2)),2&e&&(h.Q6J("ngIf",t.data&&t.data.styles&&t.data.styles.colors&&!t.loading&&"loading"!=t.requestStatus),h.xp6(1),h.Q6J("ngIf",t.showTermsDialog),h.xp6(1),h.Q6J("ngIf",("loading"===t.requestStatus||t.loading)&&!t.error))},styles:[".widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.card[_ngcontent-%COMP%]{transition:all .2s ease;overflow:hidden;width:500px;max-width:100%;margin:0 auto}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}.webcam-wrapper[_ngcontent-%COMP%]{position:relative}.webcam-overlay[_ngcontent-%COMP%]{position:absolute;z-index:99;width:500px;top:0;left:0;width:100%;height:100%;justify-content:center}.webcam-overlay[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{background:url(/assets/img/exclude.png);width:100%;height:100%;background-repeat:no-repeat;background-size:cover;opacity:.7;max-width:500px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;top:0;left:0;background:#fff}"],data:{animation:[d.$]}}),Q=(0,s.gn)([(0,o.c)()],Q)},8489:(e,t,n)=>{n.r(t),n.d(t,{PinModule:()=>ot});var i=n(6895),s=n(6383),r=n(5592),o=n(4006),a=n(3798),l=n(9391),c=n(182),d=n(4650),u=n(5089),h=n(5601),p=n(9617),m=n(3046),f=n(342),g=n(9101),_=n(3731);function b(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",3),2&e){const e=d.oxw();d.Q6J("firstOption",e.texts.success.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function v(e,t){if(1&e&&d._UZ(0,"widget-documents",8),2&e){const e=d.oxw(2);d.Q6J("userId",e.userId)("packId",e.packId)("requestID",e.requestID)}}function y(e,t){if(1&e&&(d.TgZ(0,"div",4),d._UZ(1,"div",5)(2,"div",6),d.ALo(3,"safeHtml"),d.YNc(4,v,1,3,"widget-documents",7),d.qZA()),2&e){const e=d.oxw();d.xp6(1),d.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),d.Q6J("innerHTML",e.texts.success.title,d.oJD),d.xp6(1),d.Udp("color",e.data.styles.colors.text),d.Q6J("innerHTML",d.lcZ(3,9,e.texts.success.description||""),d.oJD),d.xp6(2),d.Q6J("ngIf",e.showDocuments)}}const w=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function x(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"div",9)(1,"button",10),d.NdJ("click",(function(){d.CHM(e);const t=d.oxw();return d.KtG(t.gotoRedirect())})),d._uU(2),d.qZA()()}if(2&e){const e=d.oxw();d.Q6J("ngClass",d.kEZ(8,w,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),d.xp6(1),d.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),d.xp6(1),d.hij(" ",e.data[e.flowName].btnTextCallBack||e.labels.actions.clickToFinish," ")}}let C=(()=>{class e{constructor(e,t,n,i,s){this.formBuilder=e,this.utils=t,this.solicitudesService=n,this.packsS=i,this.cd=s,this.showDocuments=!1}ngOnInit(){this.uploadForm=this.formBuilder.group({file:[""]}),this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].automaticRedirectCallBack&&this.data[this.flowName].callBackUrl?setTimeout((()=>{location.assign(this.data[this.flowName].callBackUrl)}),2e3):this.data&&this.data[this.flowName]&&this.data[this.flowName].showDocumentsOnSuccess&&(this.showDocuments=!0)}save(){}gotoRedirect(){this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].callBackUrl&&location.assign(this.data[this.flowName].callBackUrl)}getIfShowLogo(){return!this.data?.config?.infiniteLoopInCompleted&&this.data?.styles?.withLogo}}return e.ɵfac=function(t){return new(t||e)(d.Y36(o.qu),d.Y36(u.F),d.Y36(h.M),d.Y36(p.U),d.Y36(d.sBO))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",packId:"packId",requestID:"requestID",userId:"userId",flowName:"flowName",labels:"labels"},decls:3,vars:3,consts:[[3,"firstOption","logoUrl",4,"ngIf"],["class"," pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],["class","flex items-center gap-2 py-4 flex-col md:flex-row",3,"ngClass",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"userId","packId","requestID",4,"ngIf"],[3,"userId","packId","requestID"],[1,"flex","items-center","gap-2","py-4","flex-col","md:flex-row",3,"ngClass"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(d.YNc(0,b,1,2,"belender-widget-logo",0),d.YNc(1,y,5,11,"div",1),d.YNc(2,x,3,12,"div",2)),2&e&&(d.Q6J("ngIf",t.getIfShowLogo()),d.xp6(1),d.Q6J("ngIf",!t.data.config.infiniteLoopInCompleted),d.xp6(1),d.Q6J("ngIf",t.data&&t.data[t.flowName]&&t.data[t.flowName].enableUrlCallBack&&!t.data[t.flowName].automaticRedirectCallBack))},dependencies:[i.mk,i.O5,m.X,f.A,g.lW,_.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var k=n(7367),T=n(5762),S=n(1742);function M(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",7),2&e){const e=d.oxw();d.Q6J("firstOption",e.texts.fail.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const I=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function E(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"div",8)(1,"button",9),d.NdJ("click",(function(){d.CHM(e);const t=d.oxw();return d.KtG(t.retry())})),d._uU(2),d.qZA()()}if(2&e){const e=d.oxw();d.Q6J("ngClass",d.kEZ(8,I,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),d.xp6(1),d.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),d.xp6(1),d.hij(" ",null==e.labels||null==e.labels.actions?null:e.labels.actions.retry," ")}}function O(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"div",8)(1,"button",10),d.NdJ("click",(function(){d.CHM(e);const t=d.oxw();return d.KtG(t.newRequest())})),d._uU(2),d.qZA()()}if(2&e){const e=d.oxw();d.Q6J("ngClass",d.kEZ(8,I,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),d.xp6(1),d.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),d.xp6(1),d.hij(" ",null==e.labels||null==e.labels.actions?null:e.labels.actions.newRequest," ")}}let L=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.pinUtils=s}ngOnInit(){this.labels=this.pinUtils.labels}save(){}retry(){this.newRequest()}newRequest(){this.pinUtils.setRequest(new T.l)}}return e.ɵfac=function(t){return new(t||e)(d.Y36(o.QS),d.Y36(u.F),d.Y36(h.M),d.Y36(l.o),d.Y36(S._))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts"},decls:8,vars:9,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"px-2","py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center gap-2 p-4",3,"ngClass",4,"ngIf"],["class","flex items-center gap-2 p-4",3,"ngClass",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(d.YNc(0,M,1,2,"belender-widget-logo",0),d.TgZ(1,"div",1)(2,"div",2),d._UZ(3,"div",3)(4,"div",4),d.ALo(5,"safeHtml"),d.qZA(),d.YNc(6,E,3,12,"div",5),d.YNc(7,O,3,12,"div",6),d.qZA()),2&e&&(d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(3),d.Q6J("innerHTML",t.texts.fail.title,d.oJD),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.Q6J("innerHTML",d.lcZ(5,7,t.texts.fail.description),d.oJD),d.xp6(2),d.Q6J("ngIf",t.pinUtils.REQUEST&&"failed_with_retry"==t.pinUtils.REQUEST.status_code),d.xp6(1),d.Q6J("ngIf",t.pinUtils.REQUEST&&"failed_documents_downloaded"==t.pinUtils.REQUEST.status_code))},dependencies:[i.mk,i.O5,m.X,g.lW,_.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var P=n(3238),D=n(5439),A=n.n(D),N=n(3755),q=n(3746),Y=n(2932),R=n(4246),F=n(5412),U=n(7489),Z=n(5895),H=n(8460),j=n(1763),z=n(5696),B=n(1094),J=n(7392),V=n(9549),Q=n(4144),W=n(1572);const G=["termsCheckbox"],$=["assignmentCheckbox"];function K(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",18),2&e){const e=d.oxw();d.Q6J("firstOption",e.texts.form.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function X(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw();d.xp6(1),d.hij(" ",e.labels.warnings.invalidNieOrDni," ")}}function ee(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw();d.xp6(1),d.hij(" ",e.labels.warnings.invalidNieOrDni," ")}}function te(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"mat-hint")(1,"a",20),d.NdJ("click",(function(t){d.CHM(e);const n=d.oxw(2);return d.KtG(n.gotoExpirationDate(t))})),d.TgZ(2,"u"),d._uU(3),d.qZA()()()}if(2&e){const e=d.oxw(2);d.xp6(3),d.Oqu(e.labels.findExpiration)}}function ne(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw(2);d.xp6(1),d.hij(" ",e.labels.warnings.wrongDate,": DD/MM/AAAA ")}}function ie(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw(2);d.xp6(1),d.hij(" ",e.labels.warnings.wrongDate," ")}}function se(e,t){if(1&e&&(d.TgZ(0,"mat-form-field",7)(1,"mat-label"),d._uU(2),d.qZA(),d._UZ(3,"input",19),d.YNc(4,te,4,1,"mat-hint",9),d.YNc(5,ne,2,1,"mat-error",9),d.YNc(6,ie,2,1,"mat-error",9),d.qZA()),2&e){const e=d.oxw();let t,n;d.Gre("",e.disabledInputs.expiration?"disabled-input":""," w-full flex-1 belender-form-field"),d.xp6(2),d.Oqu(e.labels.expiration),d.xp6(1),d.s9C("tabindex",e.disabledInputs.expiration?-1:1),d.xp6(1),d.Q6J("ngIf",e.isDni),d.xp6(1),d.Q6J("ngIf",null==(t=e.form.get("expired_date"))?null:t.hasError("invalidFormat")),d.xp6(1),d.Q6J("ngIf",null==(n=e.form.get("expired_date"))?null:n.hasError("invalidDate"))}}function re(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw(2);d.xp6(1),d.hij(" ",e.labels.warnings.wrongDate,": DD/MM/AAAA ")}}function oe(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw(2);d.xp6(1),d.hij(" ",e.labels.warnings.wrongDate," ")}}function ae(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw(2);d.xp6(1),d.hij(" ",e.labels.warnings.wrongDate," ")}}function le(e,t){if(1&e&&(d.TgZ(0,"mat-form-field",7)(1,"mat-label"),d._uU(2),d.qZA(),d._UZ(3,"input",21),d.YNc(4,re,2,1,"mat-error",9),d.YNc(5,oe,2,1,"mat-error",9),d.YNc(6,ae,2,1,"mat-error",9),d.qZA()),2&e){const e=d.oxw();let t,n,i;d.Gre("",e.disabledInputs.birthday?"disabled-input":""," w-full flex-1 belender-form-field"),d.xp6(2),d.Oqu(e.labels.birthday),d.xp6(1),d.s9C("tabindex",e.disabledInputs.birthday?-1:1),d.xp6(1),d.Q6J("ngIf",null==(t=e.form.get("expired_date"))?null:t.hasError("invalidFormat")),d.xp6(1),d.Q6J("ngIf",null==(n=e.form.get("expired_date"))?null:n.hasError("invalidDate")),d.xp6(1),d.Q6J("ngIf",null==(i=e.form.get("expired_date"))?null:i.hasError("underAge"))}}function ce(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw(2);d.xp6(1),d.hij(" ",e.labels.warnings.wrongSupport," ")}}function de(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"mat-form-field",7)(1,"mat-label"),d._uU(2),d.qZA(),d._UZ(3,"input",22),d.YNc(4,ce,2,1,"mat-error",9),d.TgZ(5,"mat-hint")(6,"a",20),d.NdJ("click",(function(t){d.CHM(e);const n=d.oxw();return d.KtG(n.gotoSupportAclaration(t))})),d.TgZ(7,"u"),d._uU(8),d.qZA()()()()}if(2&e){const e=d.oxw();let t;d.Gre("",e.disabledInputs.supportNumber?"disabled-input":""," w-full flex-1 belender-form-field"),d.xp6(2),d.Oqu(e.labels.support),d.xp6(1),d.s9C("tabindex",e.disabledInputs.supportNumber?-1:1),d.xp6(1),d.Q6J("ngIf",null==(t=e.form.get("support_number"))?null:t.hasError("invalidSupportNumber")),d.xp6(4),d.Oqu(e.labels.findExpiration)}}function ue(e,t){if(1&e&&(d.TgZ(0,"div",23)(1,"mat-form-field",7)(2,"mat-label"),d._uU(3),d.qZA(),d._UZ(4,"input",24),d.qZA()()),2&e){const e=d.oxw();d.xp6(1),d.Gre("",e.disabledInputs.email?"disabled-input":""," w-full flex-1 belender-form-field"),d.xp6(2),d.Oqu(e.labels.email),d.xp6(1),d.s9C("tabindex",e.disabledInputs.email?-1:1)}}function he(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"div",25)(1,"belender-checkbox",26,27),d.NdJ("changeCheckbox",(function(t){d.CHM(e);const n=d.oxw();return d.KtG(n.setTerms(t))})),d.TgZ(3,"belender-terms-and-policy-links",28),d.NdJ("goToTerms",(function(){d.CHM(e);const t=d.oxw();return d.KtG(t.gotoTermsAndConditions())})),d.qZA()()()}if(2&e){const e=d.oxw();d.xp6(1),d.Q6J("color",e.data.styles.colors.title),d.xp6(2),d.Q6J("lang",e.lang)("flowName",e.flowName)("data",e.data)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink)("firstSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.firstSentence)("secondSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.secondSentence)("thirdSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.thirdSentence)("policyActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.policyActionText)("termsActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.termsActionText)("customTerms",e.data[e.flowName].customTerms)}}function pe(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"div",25)(1,"belender-checkbox",29,30),d.NdJ("changeCheckbox",(function(t){d.CHM(e);const n=d.oxw();return d.KtG(n.setAssignment(t))})),d._UZ(3,"div",31),d.qZA()()}if(2&e){const e=d.oxw();d.xp6(1),d.Q6J("color",e.data.styles.colors.title),d.xp6(2),d.Q6J("innerHTML",e.data[e.flowName]&&e.data[e.flowName].texts&&e.data[e.flowName].texts.dataAssignmentText?e.data[e.flowName].texts.dataAssignmentText:null==e.data?null:e.data.config.dataAssignmentText,d.oJD)}}function me(e,t){if(1&e&&(d.TgZ(0,"div",32),d._UZ(1,"mat-icon",33),d._uU(2),d.qZA()),2&e){const e=d.oxw();d.xp6(2),d.hij(" ",e.labels.warnings.haveToReadTerms," ")}}function fe(e,t){if(1&e&&(d.TgZ(0,"div",34),d._UZ(1,"mat-icon",35)(2,"div",36),d.qZA()),2&e){const e=d.oxw();d.xp6(2),d.Q6J("innerHTML",e.error,d.oJD)}}const ge=function(e){return{background:e}};function _e(e,t){if(1&e&&(d.TgZ(0,"div",37),d._UZ(1,"mat-spinner",38),d.TgZ(2,"p"),d._uU(3),d.qZA()()),2&e){const e=d.oxw();d.Q6J("ngStyle",d.VKq(2,ge,e.data.styles.colors.background)),d.xp6(3),d.Oqu(e.loading||"Cargando, espere por favor...")}}const be=function(e){return{"dont-show-data":e}},ve=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}},ye={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let we=(()=>{class e{constructor(e,t,n,i,s,r,o,a,l){this.fb=e,this.utils=t,this.cd=n,this.widgetUtils=i,this.dialog=s,this.pinService=r,this.pinUtils=o,this.notis=a,this.customizationStoreService=l,this.lang="",this.editable_dates=!1,this.next=new d.vpe(null),this.esDNI=new d.vpe(null),this.goTerms=new d.vpe(null),this.skipCreationOfRequest=!1,this.openTerms=new d.vpe,this.acceptTerms=!1,this.step=0,this.assignment=!1,this.termsReaded=!1,this.isDni=!1,this.isNie=!1,this.disabledInputs={dni:!1,birthday:!1,supportNumber:!1,email:!1,expiration:!1},this.noValidate=!1,this.termsOpened=!1,this.loading=!1,this.error=""}ngOnInit(){this.labels=this.pinUtils.labels,this.pinUtils.REQUEST?(this.setBaseForm(this.pinUtils.REQUEST),this.noValidate="terms_and_conditions"==this.pinUtils.REQUEST.status_code):this.setBaseForm(null)}ngOnDestroy(){this.subscribeRequest&&this.subscribeRequest.unsubscribe()}sendPestana(){window.parent.open("www.google.com","_blank")}setRegex(e){if(!e)return;let t=this.widgetUtils.ValidateIDType(e);t&&t.type?(this.isDni="dni"===t.type,this.isNie="nie"===t.type):(this.isDni=!1,this.isNie=!1),this.form?.get("expired_date").setValidators([(0,Y.s)({checkFormat:!0,checkDate:!0,checkAge:!this.isDni})]),this.cd.markForCheck()}normalizeRequest(e){return{dni:e?.person_document_number??e?.dni??e?.document_number??null,birth:e?.person_birth_date??e?.birth_date??null,expiration:e?.person_document_expiration_date??null,email:e?.person_email??e?.email??e?.email_copy??null,supportNumber:e?.person_document_support??e?.document_support??null}}setBaseForm(e){let t=this.normalizeRequest(e),n=t?.dni||null,i=t.birth?A()(t.birth).format("DD/MM/YYYY"):null,s=t.expiration?A()(t.expiration).format("DD/MM/YYYY"):null,r=t.supportNumber||null,a=t.email||null;const l=this.data?.config??{};n&&this.setRegex(n),this.form=this.fb.group(this.isDni?l.followMail?{dni:[n,this.noValidate?[]:[o.kI.required,o.kI.maxLength(9),this.regexDNI()]],email:[a],document_type:["dni"],expired_date:[s,[(0,Y.s)({checkFormat:!0,checkDate:!0})]],support_number:[null],person_phone:[]}:{dni:[n,this.noValidate?[]:[o.kI.required,o.kI.maxLength(9),this.regexDNI()]],document_type:["dni"],expired_date:[s,[(0,Y.s)({checkFormat:!0,checkDate:!0})]],support_number:[null]}:l.followMail?{dni:[n,[o.kI.required,o.kI.maxLength(9),this.regexDNI()]],expired_date:[i],document_type:["nie"],support_number:[r],email:[a]}:{dni:[n,[o.kI.required,o.kI.maxLength(9),this.regexDNI()]],expired_date:[i],document_type:["nie"],support_number:[r]}),this.form.get("expired_date").setValidators([(0,Y.s)({checkFormat:!0,checkDate:!0,checkAge:!this.isDni})]),this.form.markAsUntouched(),this.form.updateValueAndValidity(),this.requestIDFromURL&&this.disableEnableInputs(n,i,s,r,a)}forceEnableDisableInputs(e,t,n,i,s){let r=t?t.value:this.disabledInputs.birthday,o=i?i.value:this.disabledInputs.supportNumber;this.isNie&&r&&!r.value&&(o={value:!1}),this.disableEnableInputs(e?e.value:this.disabledInputs.dni,r,n?n.value:this.disabledInputs.expiration,o,s?s.value:this.disabledInputs.email)}disableEnableInputs(e,t,n,i,s){this.disabledInputs={dni:e||!1,birthday:!this.editable_dates&&(t||!1),supportNumber:i||!1,email:!!s,expiration:!this.editable_dates&&(n||!1)},this.cd.markForCheck()}regexDNI(){return e=>{const t=e.value;return t?(this.setRegex(t),this.isDni||this.isNie?null:{regexDNI:!0}):null}}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}nextStep(){let e;const t=this.data?.config??{};e=this.isDni?{document_number:this.form.get("dni").value.toUpperCase(),check_legal:!0,document_expiration_date:this.utils.formatDate(this.form.get("expired_date").value)}:{document_number:this.form.get("dni").value.toUpperCase(),birth_date:this.utils.formatDate(this.form.get("expired_date").value),check_legal:!0,document_support:this.form.get("support_number").value},t.followMail&&(e.email_copy=this.form?.get("email")?.value||""),e.document_type=this.isDni?"dni":"nie",this.validateRequest(e)}gotoSupportAclaration(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(N.$,{panelClass:"fullscreen-dialog"})}gotoExpirationDate(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(q.R,{panelClass:"fullscreen-dialog"})}setTerms(e){this.acceptTerms=e}setAssignment(e){this.assignment=e}getFormsValid(){if(!this.form||this.form.invalid)return!1;if((this.data?.config??{}).dontShowDataInTerms&&"terms_and_conditions"===this.pinUtils?.REQUEST?.status_code)return!0;const e=this.form.get("dni")?.value?.toString().trim();if(!e)return!1;const{type:t,valid:n}=this.widgetUtils.ValidateIDType(e)||{},i="nie"===t;if("dni"!==t&&!i||!n)return!1;const s=this.form.get("support_number")?.value?.toString().trim();return!(i&&!s)}getIfValid(){const e=this.data?.config??{};if(e.dontShowDataInTerms&&this.pinUtils.REQUEST&&this.pinUtils.REQUEST.status_code&&"terms_and_conditions"===this.pinUtils.REQUEST.status_code&&(this.acceptTerms=!0),this.isDni||this.isNie)return!!e.hideCheckLegal||this.acceptTerms;this.form.get("dni")?.setErrors({dni:!0})}getAssignmentValidation(){const e=this.data?.config??{};return!(e.forceChecks&&!this.termsReaded)&&(!e.dataAssignmentCheck||this.assignment)}gotoTermsAndConditions(){this.openTerms.emit(!0)}setFormError(e){switch(e){case"nac":case"expiration":this.form.get("expired_date")?.setErrors({invalidDate:!0});break;case"dni":this.form.get("dni")?.setErrors({invalidDniOrNie:!0});break;case"sop":this.form.get("support_number")?.setErrors({invalidSupportNumber:!0})}}validateRequest(e){e.user_id=this.customizationStoreService.USER_ID,e.package_id=this.customizationStoreService.PACK_ID,this.loading=this.labels.loadings.validatingData,this.forceEnableDisableInputs({value:!0},{value:!0},{value:!0},{value:!0},{value:!0}),this.pinService.checkService(e).then((t=>{if(t&&t.status&&"success"==t.status)this.gotoTerms(e);else if(t.message){let n=this.pinUtils.parseErrorResponse(t.message);"no-service"==n.code?this.setNoService(e):(this.setFormError(n.code),this.loading=null),this.handleDisableInputs(n.code)}else this.setNoService(e)})).catch((t=>{if(t.message){let n=this.pinUtils.parseErrorResponse(t.message);"no-service"!=n.title?(this.showAlert(n.title,n.description),this.loading=null):(this.pinService.addSolicitud(e).then((e=>{this.pinService.setNoService({request_id:this.pinUtils.REQUEST}).then((e=>{this.pinUtils.setRequestStatus("no_service"),this.loading=null})).catch((e=>{this.pinUtils.setRequestStatus("no_service"),this.loading=null}))})),this.loading=null,this.cd.markForCheck()),console.log("handle code: ",n.code),this.handleDisableInputs(n.code)}else this.showAlert("Error indefinido!",t),this.loading=null,this.cd.markForCheck()}))}gotoTerms(e){e.user_id=this.customizationStoreService.USER_ID,e.package_id=this.customizationStoreService.PACK_ID,this.acceptCirbe&&(e.add_cirbe=!0),this.pinUtils.REQUEST.request_id&&(e.request_id=this.pinUtils.REQUEST.request_id),this.loading=this.labels.loadings.sendingData,this.skipCreationOfRequest=this.pinUtils.REQUEST&&this.pinUtils.REQUEST.request_id&&this.pinUtils.REQUEST.status_code&&"prerequest"!=this.pinUtils.REQUEST.status_code,this.skipCreationOfRequest?(this.sendAcceptTerms(),this.pinUtils.subscribeWS()):this.pinService.addSolicitud(e).then((t=>{t&&t.status&&"error"==t.status?t.message&&(this.pinUtils.setRequest(e),400==t.code&&"Does not have Pin service"==t.message?this.pinService.setNoService({request_id:this.pinUtils.REQUEST.request_id}).then((e=>{this.pinUtils.setRequestStatus("no_service"),this.loading=null})).catch((e=>{this.pinUtils.setRequestStatus("no_service"),this.loading=null})):400==t.code&&"Incorrect support number"==t.message?(this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongSupport),this.pinUtils.setRequestStatus("form")):400==t.code&&"Incorrect date"==t.message?(console.warn("entro aquiiii"),this.form.get("expired_date")?.setErrors({invalidDate:!0}),this.pinUtils.setRequestStatus("form")):(this.pinUtils.setRequestStatus("form"),this.showAlert("Error!",t.message))):t&&t.status&&"success"==t.status?(this.pinUtils.setRequest(t.data),this.pinUtils.subscribeWS(),this.sendAcceptTerms()):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+t)})).catch((e=>{e&&e.errorMessage&&this.showAlert(this.labels.warnings.error,e.errorMessage)}))}setNoService(e){this.loading=this.labels.loadings.validatingData,e.user_id=this.customizationStoreService.USER_ID,e.package_id=this.customizationStoreService.PACK_ID,this.pinUtils.REQUEST.request_id&&(e.request_id=this.pinUtils.REQUEST.request_id),this.pinService.addSolicitud(e).then((e=>{this.pinService.setNoService({request_id:this.pinUtils.REQUEST.request_id}).then((e=>{this.pinUtils.setRequestStatus("no_service"),this.loading=null,this.cd.markForCheck()})).catch((e=>{this.pinUtils.setRequestStatus("no_service"),this.loading=null,this.cd.markForCheck()}))}))}showAlert(e,t){this.error=`<div class="flex flex-col w-full items-start gap-0 pl-2"><strong class="text-md" >${e}</strong><small>${t}</small></div>`}sendAcceptTerms(e=!0){let t={user_id:this.customizationStoreService.USER_ID,request_id:this.pinUtils.REQUEST.request_id,terms_and_conditions:!0,opening:this.termsOpened?1:0};Object.keys(this.deviceInfoDetails).length>0&&(t={...t,ip:this.deviceInfoDetails.ip,device:this.deviceInfoDetails.device,os:`${this.deviceInfoDetails.os} ${this.deviceInfoDetails.os_version}`,resolution:this.deviceInfoDetails.screen}),e&&(this.loading=this.labels.loadings.validatingData),this.pinService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?e.message&&"You have a request in progress"==e.message?location.pathname.indexOf("widget-boxed")>-1?location.assign(e.response.widget_url_boxed):location.assign(e.response.widget_url):e.message&&"Invalid request status: stand_by"==e.message?this.pinUtils.setRequestStatus("stand_by"):this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.pinUtils.subscribeWS(),this.pinUtils.setRequest(e.data),this.loading=null,this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}handleDisableInputs(e){!e||setTimeout((()=>{"venc"===e&&this.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1},{value:!1}),"sop"===e&&this.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1},{value:!1}),"nac"===e&&this.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1},{value:!1}),this.cd.markForCheck()}),1e3)}}return e.ɵfac=function(t){return new(t||e)(d.Y36(o.qu),d.Y36(u.F),d.Y36(d.sBO),d.Y36(R.t),d.Y36(F.uw),d.Y36(U.v),d.Y36(S._),d.Y36(Z.T),d.Y36(H.r))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(d.Gf(G,5),d.Gf($,5)),2&e){let e;d.iGM(e=d.CRH())&&(t.checkComponent=e.first),d.iGM(e=d.CRH())&&(t.assignmentCheckComponent=e.first)}},inputs:{flowName:"flowName",data:"data",texts:"texts",acceptCirbe:"acceptCirbe",requestIDFromURL:"requestIDFromURL",lang:"lang",editable_dates:"editable_dates",deviceInfoDetails:"deviceInfoDetails",skipCreationOfRequest:"skipCreationOfRequest"},outputs:{next:"nextStep",esDNI:"isDni",goTerms:"goToTerms",openTerms:"openTerms"},features:[d._Bn([{provide:P.sG,useValue:ye},{provide:d.soG,useValue:"es-ES"}])],decls:26,vars:44,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2","relative",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[3,"ngClass"],[1,"mb-3","pt-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline"],["id","dniInput","formControlName","dni","maxlength","9","matInput","",3,"tabindex"],[4,"ngIf"],["appearance","outline",3,"class",4,"ngIf"],["class","w-full",4,"ngIf"],["class","mt-6 flex justify-start items-center w-full flex-100",4,"ngIf"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],["class","pl-3 w-full pr-4 flex items-center gap-2 py-2 rounded-md mt-3 bg-orange-500/10 text-orange-600",4,"ngIf"],[1,"flex","items-center","gap-2","p-4","flex-col","md:flex-row",3,"ngClass"],["id","sendBtn","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],["class","loading-overlay flex flex-col gap-3 items-center justify-center ",3,"ngStyle",4,"ngIf"],[3,"firstOption","logoUrl"],["id","dniExpireInput","required","","formControlName","expired_date","type","text","mask","00/00/0000","matInput","",3,"tabindex"],["target","_blank",1,"text-sm","hover:text-blue-500","cursor-pointer",3,"click"],["id","dniExpireInput","required","","formControlName","expired_date","type","text","matInput","","mask","d0/M0/0000",3,"tabindex"],["id","supportNumberInput","maxlength","9","minlength","6","required","","formControlName","support_number","matInput","",3,"tabindex"],[1,"w-full"],["id","emailInput","formControlName","email","required","","type","email","placeholder","Ingresa tu email","matInput","",3,"tabindex"],[1,"mt-6","flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"lang","flowName","data","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],[3,"color","changeCheckbox"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"],[1,"pl-3","w-full","pr-4","flex","items-center","gap-2","py-2","rounded-md","mt-3","bg-orange-500/10","text-orange-600"],["svgIcon","mat:warning"],[1,"font-bold",3,"innerHTML"],[1,"loading-overlay","flex","flex-col","gap-3","items-center","justify-center",3,"ngStyle"],["diameter","30"]],template:function(e,t){if(1&e&&(d.YNc(0,K,1,2,"belender-widget-logo",0),d.TgZ(1,"form",1)(2,"div",2),d._UZ(3,"div",3)(4,"div",4),d.ALo(5,"safeHtml"),d.qZA(),d.TgZ(6,"div",5)(7,"div",6)(8,"mat-form-field",7)(9,"mat-label"),d._uU(10),d.qZA(),d._UZ(11,"input",8),d.YNc(12,X,2,1,"mat-error",9),d.YNc(13,ee,2,1,"mat-error",9),d.qZA(),d.YNc(14,se,7,8,"mat-form-field",10),d.YNc(15,le,7,8,"mat-form-field",10),d.YNc(16,de,9,7,"mat-form-field",10),d.YNc(17,ue,5,5,"div",11),d.qZA()(),d.YNc(18,he,4,11,"div",12),d.YNc(19,pe,4,2,"div",12),d.YNc(20,me,3,1,"div",13),d.YNc(21,fe,3,1,"div",14),d.TgZ(22,"div",15)(23,"button",16),d.NdJ("click",(function(){return t.nextStep()})),d._uU(24),d.qZA()(),d.YNc(25,_e,4,4,"div",17),d.qZA()),2&e){let e;d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(1),d.Q6J("formGroup",t.form),d.xp6(2),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.Q6J("innerHTML",t.texts.form.title,d.oJD),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.Q6J("innerHTML",d.lcZ(5,36,t.texts.form.description||""),d.oJD),d.xp6(2),d.Q6J("ngClass",d.VKq(38,be,t.data.config.dontShowDataInTerms&&t.pinUtils.REQUEST.request_id&&t.pinUtils.REQUEST.status_code&&"terms_and_conditions"===t.pinUtils.REQUEST.status_code)),d.xp6(2),d.Gre("",t.disabledInputs.dni?"disabled-input":""," w-full flex-1 belender-form-field"),d.xp6(2),d.Oqu(t.isDni?t.labels.dni:t.isNie?t.labels.nie:t.labels.nieOrDni),d.xp6(1),d.s9C("tabindex",t.disabledInputs.dni?-1:1),d.xp6(1),d.Q6J("ngIf",!t.isNie&&!t.isDni),d.xp6(1),d.Q6J("ngIf",null==(e=t.form.get("dni"))?null:e.hasError("invalidDniOrNie")),d.xp6(1),d.Q6J("ngIf",t.isDni),d.xp6(1),d.Q6J("ngIf",t.isNie),d.xp6(1),d.Q6J("ngIf",t.isNie),d.xp6(1),d.Q6J("ngIf",(null==t.data||null==t.data.config?null:t.data.config.followMail)&&(t.isDni||t.isNie)),d.xp6(1),d.Q6J("ngIf",!t.data.config.hideCheckLegal),d.xp6(1),d.Q6J("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),d.xp6(1),d.Q6J("ngIf",t.data.config.forceChecks&&!t.termsReaded),d.xp6(1),d.Q6J("ngIf",t.error),d.xp6(1),d.Q6J("ngClass",d.kEZ(40,ve,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),d.xp6(1),d.Udp("color",t.getFormsValid()&&t.getIfValid()&&t.getAssignmentValidation()?t.data.styles.colors.btnText:"")("background",t.getFormsValid()&&t.getIfValid()&&t.getAssignmentValidation()?t.data.styles.colors.btnBg:"")("border-radius",t.data.styles.btnRound+"px"),d.Q6J("disabled",!t.getFormsValid()||!t.getIfValid()||!t.getAssignmentValidation()),d.xp6(1),d.hij(" ",t.labels.actions.continue," "),d.xp6(1),d.Q6J("ngIf",t.loading)}},dependencies:[i.mk,i.O5,i.PC,o._Y,o.Fj,o.JJ,o.JL,o.Q7,o.wO,o.nD,o.sg,o.u,j.b,m.X,z.T,B.Z6,J.Hw,g.lW,V.TO,V.KE,V.bx,V.hX,Q.Nt,W.Ou,_.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}.hiden-input[_ngcontent-%COMP%]{height:0!important;max-height:0px!important;overflow:hidden!important;opacity:0!important}.loading-overlay[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;z-index:999}"]}),e})();var xe=n(2142),Ce=n(9299),ke=n(6e3);const Te=[{path:":idUser",component:xe.n},{path:":idUser/:packID",component:xe.n}];let Se=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=d.oAB({type:e}),e.ɵinj=d.cJS({imports:[Ce.Bz.forChild(Te),Ce.Bz,ke.d8]}),e})();function Me(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",5),2&e){const e=d.oxw();d.Q6J("firstOption",e.texts.noService.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let Ie=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts"},decls:6,vars:11,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(d.YNc(0,Me,1,2,"belender-widget-logo",0),d.TgZ(1,"form",1)(2,"div",2),d._UZ(3,"div",3)(4,"div",4),d.ALo(5,"safeHtml"),d.qZA()()),2&e&&(d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(3),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.Q6J("innerHTML",t.texts.noService.title,d.oJD),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.Q6J("innerHTML",d.lcZ(5,9,t.texts.noService.description),d.oJD))},dependencies:[i.O5,o._Y,o.JL,o.F,m.X,_.z]}),e})();function Ee(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",9),2&e){const e=d.oxw();d.Q6J("firstOption",e.texts.abandoned.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const Oe=function(e){return{background:e}};function Le(e,t){if(1&e&&(d.TgZ(0,"div",10),d._UZ(1,"mat-spinner",11),d.TgZ(2,"p"),d._uU(3),d.qZA()()),2&e){const e=d.oxw();d.Q6J("ngStyle",d.VKq(2,Oe,e.data.styles.colors.background)),d.xp6(3),d.Oqu(e.loading||"Cargando, espere por favor...")}}const Pe=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let De=(()=>{class e{constructor(e,t,n,i){this.utils=e,this.pinUtils=t,this.customizationStoreService=n,this.pinService=i,this.loading=null}ngOnInit(){this.labels=this.pinUtils.labels}save(){}retry(){this.retryRequest(this.pinUtils.REQUEST.request_id)}getTextStatus(){switch(this.pinUtils.REQUEST.status_code){case"abandoned_after_waiting_otp_seguridad_social":return this.labels.abandoned.afterWaitingOtpSS;case"abandoned_after_invalid_otp_seguridad_social":return this.labels.abandoned.afterInvalidOtpSS;case"abandoned_after_invalid_otp_aeat":return this.labels.abandoned.afterInvalidOtpAEAT;case"abandoned_after_waiting_otp_aeat":return this.labels.abandoned.afterWaitingOtpAEAT;default:return this.pinUtils.REQUEST.status_message||this.pinUtils.REQUEST.status_code}}retryRequest(e){let t={request_id:this.pinUtils?.REQUEST?.request_id||e,user_id:this.customizationStoreService.USER_ID};this.loading=this.pinUtils.labels.loadings.resendingRequest,this.pinUtils.subscribeWS(),this.pinService.retryRequest(t).then((e=>{e&&e.data&&(this.pinUtils.setRequest(e.data),this.pinUtils.setRequestStatus(this.pinUtils.REQUEST.status_code)),this.loading=null})).catch((e=>{console.error(e),this.loading=null}))}}return e.ɵfac=function(t){return new(t||e)(d.Y36(u.F),d.Y36(S._),d.Y36(H.r),d.Y36(U.v))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-abandoned-step"]],inputs:{data:"data",texts:"texts"},decls:12,vars:25,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content","relative"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"],["class","loading-overlay flex flex-col gap-3 items-center justify-center ",3,"ngStyle",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"loading-overlay","flex","flex-col","gap-3","items-center","justify-center",3,"ngStyle"],["diameter","30"]],template:function(e,t){1&e&&(d.YNc(0,Ee,1,2,"belender-widget-logo",0),d.TgZ(1,"div",1)(2,"div",2),d._UZ(3,"div",3)(4,"div",4),d.ALo(5,"safeHtml"),d.TgZ(6,"div",5),d._uU(7),d.qZA()(),d.TgZ(8,"div",6)(9,"button",7),d.NdJ("click",(function(){return t.retry()})),d._uU(10),d.qZA()(),d.YNc(11,Le,4,4,"div",8),d.qZA()),2&e&&(d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(3),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.Q6J("innerHTML",t.texts.abandoned.title,d.oJD),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.Q6J("innerHTML",d.lcZ(5,19,t.texts.abandoned.description),d.oJD),d.xp6(3),d.hij(" ",t.getTextStatus()," "),d.xp6(1),d.Q6J("ngClass",d.kEZ(21,Pe,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),d.xp6(1),d.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),d.xp6(1),d.hij(" ",null==t.labels.actions?null:t.labels.actions.retry," "),d.xp6(1),d.Q6J("ngIf",t.loading))},dependencies:[i.mk,i.O5,i.PC,m.X,g.lW,W.Ou,_.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-overlay[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;z-index:999}"]}),e})();var Ae=n(6981),Ne=n(5145);const qe=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Ye=(()=>{class e{constructor(e,t){this.utils=e,this.pinUtils=t}ngOnInit(){this.labels=this.pinUtils.labels}newRequest(){this.pinUtils.setRequestStatus("created")}gotoRequest(){location.assign(this.pinUtils.REQUEST.widget_url_boxed)}getStatus(){let e=Ne.Z.find((e=>e.text==this.pinUtils.REQUEST.status_code));return e?e.label:"Estado desconocido"}}return e.ɵfac=function(t){return new(t||e)(d.Y36(u.F),d.Y36(S._))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-duplicated-request-step"]],inputs:{data:"data",texts:"texts"},decls:15,vars:25,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"flex","gap-2","justify-start","items-center","py-2"],[1,"w-fit","p-1","px-2","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(d.TgZ(0,"div",0)(1,"div",1)(2,"div",2),d._uU(3),d.qZA(),d.TgZ(4,"div",3),d._uU(5),d.qZA(),d.TgZ(6,"div",4),d._uU(7),d.TgZ(8,"div",5),d._uU(9),d.qZA()()(),d.TgZ(10,"div",6)(11,"button",7),d.NdJ("click",(function(){return t.newRequest()})),d._uU(12),d.qZA(),d.TgZ(13,"button",8),d.NdJ("click",(function(){return t.gotoRequest()})),d._uU(14),d.qZA()()()),2&e&&(d.xp6(2),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.xp6(1),d.hij(" ",t.labels.warnings.duplicatedRequest," "),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.xp6(1),d.hij(" ",t.labels.warnings.alreadyHaveRequest," "),d.xp6(2),d.hij(" ",t.labels.warnings.currentRequestStatus," "),d.xp6(2),d.hij(" ",t.getStatus()," "),d.xp6(1),d.Q6J("ngClass",d.kEZ(21,qe,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),d.xp6(1),d.Udp("border-radius",t.data.styles.btnRound+"px"),d.xp6(1),d.hij(" ",t.labels.actions.newRequest," "),d.xp6(1),d.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),d.xp6(1),d.hij(" ",t.labels.actions.gotoCurrentRequest," "))},dependencies:[i.mk,g.lW],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Re=n(1129),Fe=n(9476),Ue=n(3295);let Ze=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-standby-step"]],inputs:{data:"data",texts:"texts"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(d.TgZ(0,"form",0)(1,"div",1),d._UZ(2,"div",2)(3,"div",3),d.ALo(4,"safeHtml"),d.qZA()()),2&e&&(d.xp6(2),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.standby?t.texts.standby.titleSize+"px":"20px"),d.Q6J("innerHTML",t.texts.standby?t.texts.standby.title:"Solicitud en Stand By",d.oJD),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.Q6J("innerHTML",t.texts.standby?t.texts.standby.description:d.lcZ(4,8,"Descripcion del estado Stand By"),d.oJD))},dependencies:[o._Y,o.JL,o.F,_.z]}),e})();var He=n(1145);function je(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",10),2&e){const e=d.oxw();d.Q6J("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const ze=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Be=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new d.vpe(null)}ngOnInit(){this.form=this.fb.group({document_expiration_date:[null,[o.kI.required]]})}next(){this.nextStep.emit(this.form.get("document_expiration_date").value)}}return e.ɵfac=function(t){return new(t||e)(d.Y36(o.QS),d.Y36(u.F))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-error-expiration-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:17,vars:24,consts:[[3,"logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","date","placeholder","Ej: 22/03/1990","required","","formControlName","document_expiration_date","matInput",""],[1,"flex","items-center","justify-end","gap-2","py-4","flex-col","md:flex-row",3,"ngClass"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"logoUrl"]],template:function(e,t){1&e&&(d.YNc(0,je,1,1,"belender-widget-logo",0),d.TgZ(1,"div",1)(2,"div",2)(3,"div",3),d._uU(4),d.qZA(),d.TgZ(5,"div",4),d._uU(6),d.qZA(),d.TgZ(7,"form",5)(8,"mat-form-field",6)(9,"mat-label"),d._uU(10),d.qZA(),d._UZ(11,"input",7),d.TgZ(12,"mat-hint"),d._uU(13,"DD/MM/YYYY"),d.qZA()()()(),d.TgZ(14,"div",8)(15,"button",9),d.NdJ("click",(function(){return t.next()})),d._uU(16),d.qZA()()()),2&e&&(d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(3),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.xp6(1),d.hij(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.wrongExpiration," "),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.xp6(1),d.hij(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.inputExpiration," "),d.xp6(1),d.Q6J("formGroup",t.form),d.xp6(3),d.Oqu(null==t.labels?null:t.labels.expiration),d.xp6(4),d.Q6J("ngClass",d.kEZ(20,ze,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),d.xp6(1),d.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),d.Q6J("disabled",t.form.invalid),d.xp6(1),d.hij(" ",null==t.labels||null==t.labels.actions?null:t.labels.actions.send," "))},dependencies:[i.mk,i.O5,o._Y,o.Fj,o.JJ,o.JL,o.Q7,o.sg,o.u,m.X,g.lW,V.KE,V.bx,V.hX,Q.Nt],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Je(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",10),2&e){const e=d.oxw();d.Q6J("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const Ve=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Qe=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new d.vpe(null)}ngOnInit(){this.form=this.fb.group({support_number:[null,[o.kI.required]]})}next(){this.nextStep.emit(this.form.get("support_number").value)}}return e.ɵfac=function(t){return new(t||e)(d.Y36(o.QS),d.Y36(u.F))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-error-support-number-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:15,vars:24,consts:[[3,"logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","number","placeholder","Ej: 1233443","required","","formControlName","support_number","matInput",""],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"logoUrl"]],template:function(e,t){1&e&&(d.YNc(0,Je,1,1,"belender-widget-logo",0),d.TgZ(1,"div",1)(2,"div",2)(3,"div",3),d._uU(4),d.qZA(),d.TgZ(5,"div",4),d._uU(6),d.qZA(),d.TgZ(7,"form",5)(8,"mat-form-field",6)(9,"mat-label"),d._uU(10),d.qZA(),d._UZ(11,"input",7),d.qZA()()(),d.TgZ(12,"div",8)(13,"button",9),d.NdJ("click",(function(){return t.next()})),d._uU(14),d.qZA()()()),2&e&&(d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(3),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.xp6(1),d.hij(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.wrongSupport," "),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.xp6(1),d.hij(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.inputSupport," "),d.xp6(1),d.Q6J("formGroup",t.form),d.xp6(3),d.Oqu(null==t.labels||null==t.labels.warnings?null:t.labels.warnings.support),d.xp6(2),d.Q6J("ngClass",d.kEZ(20,Ve,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),d.xp6(1),d.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),d.Q6J("disabled",t.form.invalid),d.xp6(1),d.hij(" ",null==t.labels||null==t.labels.actions?null:t.labels.actions.send," "))},dependencies:[i.mk,i.O5,o._Y,o.Fj,o.wV,o.JJ,o.JL,o.Q7,o.sg,o.u,m.X,g.lW,V.KE,V.hX,Q.Nt],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function We(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",10),2&e){const e=d.oxw();d.Q6J("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const Ge=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let $e=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new d.vpe(null)}ngOnInit(){this.form=this.fb.group({birth_date:[null,[o.kI.required]]})}next(){this.nextStep.emit(this.form.get("birth_date").value)}}return e.ɵfac=function(t){return new(t||e)(d.Y36(o.QS),d.Y36(u.F))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-error-birthday-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:17,vars:24,consts:[[3,"logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","belender-form-field"],["type","text","required","","formControlName","birth_date","matInput","","mask","d0/M0/0000"],[1,"flex","items-center","justify-end","gap-2","py-4","flex-col","md:flex-row",3,"ngClass"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"logoUrl"]],template:function(e,t){1&e&&(d.YNc(0,We,1,1,"belender-widget-logo",0),d.TgZ(1,"div",1)(2,"div",2)(3,"div",3),d._uU(4),d.qZA(),d.TgZ(5,"div",4),d._uU(6),d.qZA(),d.TgZ(7,"form",5)(8,"mat-form-field",6)(9,"mat-label"),d._uU(10),d.qZA(),d._UZ(11,"input",7),d.TgZ(12,"mat-hint"),d._uU(13,"DD/MM/YYYY"),d.qZA()()()(),d.TgZ(14,"div",8)(15,"button",9),d.NdJ("click",(function(){return t.next()})),d._uU(16),d.qZA()()()),2&e&&(d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(3),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.xp6(1),d.hij(" ",t.labels.warnings.wrongBirthday," "),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.xp6(1),d.hij(" ",t.labels.warnings.inputBirthDay," "),d.xp6(1),d.Q6J("formGroup",t.form),d.xp6(3),d.hij(" ",t.labels.warnings.birthday," "),d.xp6(4),d.Q6J("ngClass",d.kEZ(20,Ge,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),d.xp6(1),d.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),d.Q6J("disabled",t.form.invalid),d.xp6(1),d.hij(" ",t.labels.actions.send," "))},dependencies:[i.mk,i.O5,o._Y,o.Fj,o.JJ,o.JL,o.Q7,o.sg,o.u,m.X,B.Z6,g.lW,V.KE,V.bx,V.hX,Q.Nt],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Ke=n(3300),Xe=n(865),et=n(3033),tt=n(5028),nt=n(6830),it=n(4302),st=n(9112),rt=n(9382);let ot=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=d.oAB({type:e}),e.ɵinj=d.cJS({providers:[U.v,l.o,k.w,c.t,Z.T,R.t,S._,{provide:P.Ad,useValue:"es-ES"}],imports:[Se,i.ez,s.G,r.J,o.u5,o.UX,a.a,Ae.x,Re.n,Fe.F,Ue.g,He.j,Ke.C,Xe.q,et.d,tt.q]}),e})();d.B6R(xe.n,[i.O5,nt.L,it.q,st.y,rt.i,J.Hw,g.lW,W.Ou,C,L,we,Ie,De,Ye,Ze,Be,Qe,$e],[_.z])},9359:(e,t,n)=>{n.d(t,{S:()=>s,q:()=>i});const i={INTRO:"intro",MANUAL:"manual",FORM:"form",ERROR:{DATA:"error-data",BIRTH_DATE:"error-birth-date",EXPIRATION:"error-expiration-date",SUPPORT_NUMBER:"error-support-number"},OTPSS:"otp_ss",OTPAEAT:"otp_aeat",OTPBDE:"otp_bde",ABANDONED:"abandoned",SUCCESS:"success",FAILED:"failed",NO_SERVICE:"no-service",STAND_BY:"standby",NO_PHONE:"no-phone",BAD_PHONE:"bad-phone",DUPLICATED:"duplicated",LOADING:"loading",PHONE_NO_EXIST:"phone_not_exist_otp",CONSENT_PROCESS_COMPLETED:"consent_process_completed"},s={created:i.FORM,form:i.FORM,prerequest:i.FORM,terms_and_conditions:i.FORM,waiting_terms_and_conditions:i.FORM,waiting_otp_seguridad_social:i.OTPSS,waiting_login_seguridad_social:i.OTPSS,invalid_otp_seguridad_social:i.OTPSS,waiting_otp_carpeta_ciudadana:i.OTPSS,waiting_login_carpeta_ciudadana:i.OTPSS,invalid_otp_carpeta_ciudadana:i.OTPSS,waiting_otp_aeat:i.OTPAEAT,waiting_login_aeat:i.OTPAEAT,invalid_otp_aeat:i.OTPAEAT,waiting_login_bde:i.OTPBDE,waiting_otp_bde:i.OTPBDE,invalid_otp_bde:i.OTPBDE,abandoned_after_bad_phone:i.ABANDONED,abandoned_after_terms_and_conditions:i.ABANDONED,abandoned_after_invalid_otp_seguridad_social:i.ABANDONED,abandoned_after_waiting_otp_seguridad_social:i.ABANDONED,abandoned_after_invalid_otp_aeat:i.ABANDONED,abandoned_after_waiting_otp_aeat:i.ABANDONED,abandoned_after_waiting_otp_bde:i.ABANDONED,abandoned_after_invalid_otp_bde:i.ABANDONED,abandond_after_waiting_otp_carpeta_ciudadana:i.ABANDONED,abandond_after_invalid_otp_carpeta_ciudadana:i.ABANDONED,all_documents_downloaded:i.SUCCESS,partial_documents_downloaded:i.SUCCESS,consent_process_completed:i.SUCCESS,partial_documents_downloaded_and_deleted:i.SUCCESS,all_documents_downloaded_and_deleted:i.SUCCESS,failed_with_retry:i.FAILED,failed_without_retry:i.FAILED,failed_documents_downloaded:i.FAILED,consent_process_canceled:i.FAILED,failed_job_task_cirbe:i.FAILED,no_service:i.NO_SERVICE,no_clave_pin_service:i.NO_SERVICE,no_cirbe_cp_service:i.NO_SERVICE,no_sms_service:i.NO_SERVICE,stand_by:i.STAND_BY,"no-phone":i.NO_PHONE,"no-more-phone":i.NO_PHONE,bad_phone:i.BAD_PHONE,error_expiration_date:i.ERROR.EXPIRATION,error_birth_date:i.ERROR.BIRTH_DATE,error_support_number:i.ERROR.SUPPORT_NUMBER,duplicated:i.DUPLICATED}},2254:(e,t,n)=>{n.d(t,{p:()=>l});var i=n(1135),s=n(5762),r=n(2340),o=n(4650),a=n(8460);let l=(()=>{class e{constructor(e){this.customizationStoreService=e,this.currentHeight=0,this.socket=null,this.socketOpened=!0,this._request=new i.X({...new s.l,status_code:"created"}),this._request_status=new i.X(null),this.request$=this._request.asObservable(),this.request_status$=this._request_status.asObservable(),this.requestIDSubject=new i.X(""),this.requestID$=this.requestIDSubject.asObservable(),this.loadingSubject=new i.X(!1),this.loading$=this.loadingSubject.asObservable()}setLoading(e){this.loadingSubject.next(e)}updateRequestID(e){this.requestIDSubject.next(e),this.REQUEST_ID=e}setGlobalVariables(){this.REQUEST=this._request.value,this.REQUEST_STATUS=this.REQUEST.status_code,this._request_status.next(this.REQUEST_STATUS)}setRequest(e){this._request.next({...e}),this.setGlobalVariables()}patch(e){this._request.next({...this._request.value,...e}),this.setGlobalVariables()}setRequestStatus(e){this._request.next({...this._request.value,status_code:e}),this.setGlobalVariables()}setSubscriptionOfRequest(){let e=this;if(this.socket)return;let t="wss://notifications.dev.belender.net";"qa"==r.N.env&&(t="wss://notifications.qa.belender.net"),"pro"==r.N.env&&(t="wss://notifications.belender.net"),r.N.notificationsBaseUrl&&(t=r.N.notificationsBaseUrl),this.socket=new WebSocket(`${t}?requests_id=${this.REQUEST_ID}&user_id=${this.customizationStoreService.USER_ID}`),this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(t){let n=JSON.parse(t.data);console.warn("message from wss: ",n),e.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(t){console.log("Conexión cerrada"),e.socketOpened=!1}}disconnectWebsocket(){this.socket&&this.socket.close()}handlePusherNotification(e){e&&e.widget_url&&(this.widgetUrl=e.widget_url),e&&e.widget_url_boxed&&(this.widgetUrlBoxed=e.widget_url_boxed),this.sendMessageToParent({type:"websocket",data:e}),e&&e.status_code&&("consent_process_completed"===e.status_code&&this.disconnectWebsocket(),e.status_code.startsWith("abandoned")&&(this.disconnectWebsocket(),this.setRequestStatus("abandoned")),e.status_code.startsWith("failed")&&(this.disconnectWebsocket(),this.setRequestStatus("failed")))}sendMessageToParent(e){if(e&&e.type&&"widgetHeight"===e.type){if(e.data===this.currentHeight)return;this.currentHeight=e.data}window.top.postMessage(e,"*")}}return e.ɵfac=function(t){return new(t||e)(o.LFG(a.r))},e.ɵprov=o.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},8135:(e,t,n)=>{n.d(t,{T:()=>ne});var i=n(5861),s=n(7582),r=n(9549),o=n(9933),a=n(5762),l=n(8259),c=n(2340),d=n(667);const u={created:"form",form:"form",terms_and_conditions:"form",waiting_terms_and_conditions:"form","pre-request":"form",waiting_otp_seguridad_social:"otp",waiting_login_seguridad_social:"otp",invalid_otp_seguridad_social:"otp",abandoned_after_bad_phone:"abandoned",abandoned_after_invalid_otp_seguridad_social:"abandoned",abandoned_after_terms_and_conditions:"abandoned",abandoned_after_waiting_otp_seguridad_social:"abandoned",all_documents_downloaded:"success",partial_documents_downloaded:"success",consent_process_completed:"success",partial_documents_downloaded_and_deleted:"success",all_documents_downloaded_and_deleted:"success",waiting_documents:"success",failed_documents_downloaded:"success",failed_with_retry:"failed",failed_without_retry:"failed",consent_process_canceled:"loading",no_service:"no-service",no_sms_service:"no-service",no_clave_pin_service:"no-service",stand_by:"loading","no-phone":"loading",no_phone:"loading","no-more-phone":"no-phone",no_more_phone:"no-phone",bad_phone:"bad-phone",error_expiration_date:"error-expiration-date",error_birth_date:"error-birth-date",error_support_number:"error-support-number",duplicated:"duplicated"};var h=n(1931),p=n(4650),m=n(9299),f=n(5089),g=n(5601),_=n(7367),b=n(8460),v=n(5895),y=n(5206),w=n(7489),x=n(9045),C=n(5412),k=n(7308),T=n(2254);const S=["formStep"],M=["otpStep"];function I(e,t){if(1&e&&(p.TgZ(0,"div",8),p._UZ(1,"mat-icon",9),p._uU(2),p.qZA()),2&e){const e=p.oxw(2);p.Q6J("@fadeInUp",void 0),p.xp6(2),p.hij(" ",e.warningAlert," ")}}function E(e,t){1&e&&(p.TgZ(0,"div",10),p._UZ(1,"mat-progress-spinner",11),p.qZA()),2&e&&(p.xp6(1),p.Q6J("value",0))}function O(e,t){if(1&e){const e=p.EpF();p.TgZ(0,"belender-intro-step",27),p.NdJ("gotoFlow",(function(){p.CHM(e);const t=p.oxw(3);return p.KtG(t.goFlow())}))("gotoManual",(function(){p.CHM(e);const t=p.oxw(3);return p.KtG(t.gotoManual())})),p.qZA()}if(2&e){const e=p.oxw(3);p.Q6J("data",e.data)("flowName",e.flowName)}}function L(e,t){if(1&e&&p._UZ(0,"belender-manual-step",28),2&e){const e=p.oxw(3);p.Q6J("data",e.data)("flowName",e.flowName)("packId",e.packId)("userId",e.userId)("labels",e.labels)}}function P(e,t){if(1&e){const e=p.EpF();p.TgZ(0,"belender-form-step",29,30),p.NdJ("goToTerms",(function(){p.CHM(e);const t=p.oxw(3);return p.KtG(t.gotoTermsAndConditions())})),p.qZA()}if(2&e){const e=p.oxw(3);p.Q6J("requestIDFromURL",e.requestIDFromURL)("lang",e.currentLang)("requestID",e.requestID)("flowName",e.flowName)("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("pinMode",e.pinMode)("editable_dates",e.editable_dates)("skipCreationOfRequest",e.skipCreationOfRequest)}}function D(e,t){if(1&e&&p._UZ(0,"belender-error-form-step",31),2&e){const e=p.oxw(3);p.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("flowName",e.flowName)("requestID",e.requestID)}}function A(e,t){if(1&e&&p._UZ(0,"belender-error-birthday-step",32),2&e){const e=p.oxw(3);p.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function N(e,t){if(1&e&&p._UZ(0,"belender-error-expiration-step",32),2&e){const e=p.oxw(3);p.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function q(e,t){if(1&e&&p._UZ(0,"belender-error-support-number-step",32),2&e){const e=p.oxw(3);p.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function Y(e,t){if(1&e&&p._UZ(0,"belender-abandoned-step",33),2&e){const e=p.oxw(3);p.Q6J("requestID",e.requestID)("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("flowType",e.flowName)}}function R(e,t){if(1&e&&p._UZ(0,"belender-shared-otp-step",34,35),2&e){const e=p.oxw(3);p.Q6J("otpType","otpSS")("requestID",e.requestID)("testMode",e.testMode)("labels",e.labels)("logoCustom",e.data[e.flowName].texts.otpSS.customImage)("flowType",e.flowName)("data",e.data)("texts",e.data[e.flowName].texts)("minLength",6)}}function F(e,t){if(1&e&&p._UZ(0,"belender-success-step",36),2&e){const e=p.oxw(3);p.Q6J("data",e.data)("labels",e.labels)("packId",e.packId)("flowName",e.flowName)("userId",e.userId)("requestID",e.requestID)("texts",e.data[e.flowName].texts)}}function U(e,t){if(1&e){const e=p.EpF();p.TgZ(0,"belender-duplicated-request-step",37),p.NdJ("newRequest",(function(t){p.CHM(e);const n=p.oxw(3);return p.KtG(n.newRequest(t))})),p.qZA()}if(2&e){const e=p.oxw(3);p.Q6J("data",e.data)("labels",e.labels)("currentRequest",e.currentRequest)}}function Z(e,t){if(1&e&&p._UZ(0,"belender-no-phone-step",38),2&e){const e=p.oxw(3);p.Q6J("data",e.data)("labels",e.labels)("flowName",e.flowName)("texts",e.data[e.flowName].texts)}}function H(e,t){if(1&e&&p._UZ(0,"belender-error-phone-step",39),2&e){const e=p.oxw(3);p.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("flowName",e.flowName)}}function j(e,t){if(1&e){const e=p.EpF();p.TgZ(0,"belender-fail-step",40),p.NdJ("newRequest",(function(t){p.CHM(e);const n=p.oxw(3);return p.KtG(n.newRequest(t))})),p.qZA()}if(2&e){const e=p.oxw(3);p.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("requestID",e.requestID)("flowType",e.flowName)}}function z(e,t){if(1&e&&p._UZ(0,"belender-no-service-step",41),2&e){const e=p.oxw(3);p.Q6J("texts",e.data[e.flowName].texts)("data",e.data)("labels",e.labels)}}function B(e,t){if(1&e&&p._UZ(0,"belender-standby-step",41),2&e){const e=p.oxw(3);p.Q6J("texts",e.data[e.flowName].texts)("data",e.data)("labels",e.labels)}}function J(e,t){if(1&e&&p._UZ(0,"belender-cancel-request",42),2&e){const e=p.oxw(3);p.Q6J("flowType",e.flowName)("request_id",e.requestID)("user_id",e.userId)("data",e.data)("labels",e.labels)("textColor",e.data.styles.colors.text)("customText",e.data.config.cancelRequestText)}}function V(e,t){if(1&e&&(p._UZ(0,"div",43),p.ALo(1,"safeHtml")),2&e){const e=p.oxw(3);p.Udp("color",e.data.styles.colors.text),p.Q6J("innerHTML",p.lcZ(1,3,(null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.aditionalDescription)||""),p.oJD)}}function Q(e,t){if(1&e&&(p.ynx(0),p.YNc(1,O,1,2,"belender-intro-step",12),p.YNc(2,L,1,5,"belender-manual-step",13),p.YNc(3,P,2,10,"belender-form-step",14),p.YNc(4,D,1,5,"belender-error-form-step",15),p.YNc(5,A,1,3,"belender-error-birthday-step",16),p.YNc(6,N,1,3,"belender-error-expiration-step",16),p.YNc(7,q,1,3,"belender-error-support-number-step",16),p.YNc(8,Y,1,5,"belender-abandoned-step",17),p.YNc(9,R,2,9,"belender-shared-otp-step",18),p.YNc(10,F,1,7,"belender-success-step",19),p.YNc(11,U,1,3,"belender-duplicated-request-step",20),p.YNc(12,Z,1,4,"belender-no-phone-step",21),p.YNc(13,H,1,4,"belender-error-phone-step",22),p.YNc(14,j,1,5,"belender-fail-step",23),p.YNc(15,z,1,3,"belender-no-service-step",24),p.YNc(16,B,1,3,"belender-standby-step",24),p.YNc(17,J,1,7,"belender-cancel-request",25),p.YNc(18,V,2,5,"div",26),p.BQk()),2&e){const e=p.oxw(2);p.xp6(1),p.Q6J("ngIf","intro"===e.requestStatus),p.xp6(1),p.Q6J("ngIf","manual"===e.requestStatus),p.xp6(1),p.Q6J("ngIf","form"===e.requestStatus&&!e.settingRequestFromBack),p.xp6(1),p.Q6J("ngIf","error-data"===e.requestStatus),p.xp6(1),p.Q6J("ngIf","error-birth-date"==e.requestStatus),p.xp6(1),p.Q6J("ngIf","error-expiration-date"==e.requestStatus),p.xp6(1),p.Q6J("ngIf","error-support-number"==e.requestStatus),p.xp6(1),p.Q6J("ngIf","abandoned"==e.requestStatus),p.xp6(1),p.Q6J("ngIf","otp"==e.requestStatus),p.xp6(1),p.Q6J("ngIf","success"==e.requestStatus),p.xp6(1),p.Q6J("ngIf","duplicated"==e.requestStatus),p.xp6(1),p.Q6J("ngIf","no-phone"==e.requestStatus),p.xp6(1),p.Q6J("ngIf","bad-phone"==e.requestStatus),p.xp6(1),p.Q6J("ngIf","failed"==e.requestStatus),p.xp6(1),p.Q6J("ngIf","no-service"==e.requestStatus),p.xp6(1),p.Q6J("ngIf","standby"==e.requestStatus),p.xp6(1),p.Q6J("ngIf",e.showCancelRequest&&e.data.config.cancelRequest&&e.requestIDFromURL),p.xp6(1),p.Q6J("ngIf","form"===e.requestStatus&&!e.loading&&e.data[e.flowName]&&(null==e.data[e.flowName]?null:e.data[e.flowName].showAditionalDescription)&&e.data[e.flowName].texts&&e.data[e.flowName].texts.form&&e.data[e.flowName].texts.form.aditionalDescription)}}function W(e,t){1&e&&p._UZ(0,"belender-disabled-url")}function G(e,t){if(1&e){const e=p.EpF();p.TgZ(0,"div")(1,"div",44)(2,"div",45),p._uU(3,"Error!"),p.qZA(),p._UZ(4,"div",46),p.qZA(),p.TgZ(5,"div",47)(6,"button",48),p.NdJ("click",(function(){p.CHM(e);const t=p.oxw(2);return p.KtG(t.error=!1)})),p._uU(7,"Ingresar manualmente"),p.qZA()()()}if(2&e){const e=p.oxw(2);p.xp6(4),p.Udp("color",e.data.styles.colors.text),p.Q6J("innerHTML",e.error,p.oJD)}}function $(e,t){if(1&e&&(p.TgZ(0,"div"),p.YNc(1,I,3,2,"div",6),p.YNc(2,E,2,1,"div",7),p.YNc(3,Q,19,18,"ng-container",4),p.YNc(4,W,1,0,"belender-disabled-url",4),p.YNc(5,G,8,3,"div",4),p.qZA()),2&e){const e=p.oxw();p.Gre("h-full w-full flex-auto p-0 md:p-3 ",null==e.data||null==e.data.styles?null:e.data.styles.typography,""),p.Udp("background",null==e.data||null==e.data.styles||null==e.data.styles.colors?null:e.data.styles.colors.background),p.xp6(1),p.Q6J("ngIf",e.warningAlert&&"success"!=e.requestStatus),p.xp6(1),p.Q6J("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"===e.requestStatus),p.xp6(1),p.Q6J("ngIf",!e.error&&!e.disableURL),p.xp6(1),p.Q6J("ngIf",!e.error&&e.disableURL),p.xp6(1),p.Q6J("ngIf",!e.loading&&e.error&&"loading"!=e.requestStatus)}}function K(e,t){if(1&e&&(p.TgZ(0,"div",49),p._UZ(1,"mat-progress-spinner",50),p.TgZ(2,"p",51),p._uU(3),p.qZA()()),2&e){const e=p.oxw();p.xp6(1),p.Q6J("value",e.spinnerValue)("mode",e.spinnerMode),p.xp6(2),p.Oqu(e.loading)}}function X(e,t){if(1&e){const e=p.EpF();p.TgZ(0,"vex-terms",52),p.NdJ("accepted",(function(){p.CHM(e);const t=p.oxw();return p.KtG(t.handleTermsResponse(!0))}))("cancelled",(function(){p.CHM(e);const t=p.oxw();return p.KtG(t.handleTermsResponse(!1))})),p.qZA()}if(2&e){const e=p.oxw();p.Q6J("flow",e.flowName)("lang",e.currentLang)("allData",e.data)("requestStatus",e.smsFlowService.REQUEST?e.smsFlowService.REQUEST_STATUS:"")("requestID",e.requestID)}}function ee(e,t){if(1&e&&(p.ynx(0),p.TgZ(1,"div",53),p._uU(2),p.qZA(),p.BQk()),2&e){const e=p.oxw();p.xp6(2),p.hij("TestMode ",e.testMode?"ON":"OFF","")}}function te(e,t){if(1&e){const e=p.EpF();p.TgZ(0,"belender-tester-sms",54),p.NdJ("sendMessage",(function(t){p.CHM(e);const n=p.oxw();return p.KtG(n.setMessageFromTest(t))})),p.qZA()}}let ne=class{constructor(e,t,n,i,s,r,o,a,l,d,u,p,m){if(this.cd=e,this.Activatedroute=t,this.utils=n,this.solicitudesService=i,this.customizationService=s,this.customizationStoreService=r,this.notis=o,this.flowsS=a,this.pinService=l,this.deviceInfoService=d,this.dialog=u,this.translationService=p,this.smsFlowService=m,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.introEnabled=!1,this.manual=!1,this.pinMode=!1,this.requestIDFromURL=!1,this.warningAlert=null,this.stopPropagationOfSuccess=!1,this.paramsSetted=!1,this.requestStatus="loading",this.disableURL=!1,this.settingRequestFromBack=!1,this.showCancelRequest=!1,this.requestedFromDetail=!1,this.env=c.N,this.intervalToAskBack=null,this.loadingRequestData=!1,this.intervalCount=0,this.requestedToPin=!1,this.isScaled=!1,this.termsOpened=!1,this.flowName="SMS",this.labels=h.S.es,this.currentLang="",this.showTermsDialog=!1,this.editable_dates=!1,"OTPCredential"in window){const e=new AbortController;navigator.credentials.get({otp:{transport:["sms"]},signal:e.signal}).then((e=>{this.showAlert("otp",e)})).catch((e=>{console.log(e)}))}this.deviceInfoDetails$=this.deviceInfoService.deviceInfo$.subscribe((e=>{Object.keys(e).length>0&&(this.deviceInfoDetails=e)}))}ngOnInit(){this.smsFlowService.request_status$.subscribe((e=>{this.setStatus()})),this.userId=this.customizationStoreService.USER_ID,this.smsFlowService.requestID$.subscribe((e=>{this.requestID=e})),this.smsFlowService.loading$.subscribe((e=>{this.loading=e})),this.getWindowsScreenOrientation(),this.setWarningPortals();const e=this;this.packId=this.customizationStoreService.PACK_ID,this.initFunctions(),"pro"!=c.N.env&&(l(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),l(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}initFunctions(){var e=this;return(0,i.Z)((function*(){var t;e.Activatedroute.queryParams.subscribe((t=(0,i.Z)((function*(t){t&&t.request_id&&e.smsFlowService.updateRequestID(t.request_id),t.lang?(e.currentLang=t.lang,e.smsFlowService.setLoading(e.translationService.getFirstLoading(e.currentLang)),e.setTranslation()):e.smsFlowService.setLoading(e.labels.loadings.gettingData),"true"===t.editable_dates&&(e.editable_dates=t.editable_dates),e.userId?e.setInitialData(e.userId):e.smsFlowService.setLoading(null)})),function(e){return t.apply(this,arguments)}))}))()}testNoti(e){this.showAlert("Titleeee","messsaggeee",e)}setTranslation(){let e=this.translationService.getLabelsTranslated(this.currentLang);e&&(this.labels=e)}testAlert(e){this.showAlert("Error de prueba","Esta es una prueba de un error",e)}ngOnDestroy(){window.screen&&window.screen.orientation&&this.orientationChangeHandler&&window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}ngAfterViewChecked(){this.getWidgetCardHeight()}getWindowsScreenOrientation(){window.screen&&window.screen.orientation&&(this.orientationChangeHandler=()=>{this.getWidgetCardHeight()},window.screen.orientation.addEventListener("change",this.orientationChangeHandler))}getWidgetCardHeight(){let e=l("#widget-wrapper").height()||0;this.isScaled$=this.deviceInfoService.isScaled$.subscribe((t=>{this.isScaled=t,this.isScaled&&(e*=1.5)})),this.smsFlowService.sendMessageToParent({type:"widgetHeight",data:e})}setWarningPortals(){this.flowsS.getFlows().then((e=>{e&&e.data&&e.data.length&&"OCCASIONAL_FAIL"==e.data.find((e=>e.name==this.flowName)).status&&!this.warningAlert&&(this.warningAlert=this.labels.warnings.ocassionalError)})).catch((e=>{console.error(e)}))}setInitialData(e){var t=this;return(0,i.Z)((function*(){yield t.validateRequestIdInUrl();const n=yield t.getFlow(e),i=t.customizationStoreService.FUNDER_CONFIG;if(t.funderStyles=t.customizationStoreService.FUNDER_STYLES,console.warn(t.funderStyles),t.data={config:i,styles:t.funderStyles,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.showAlert(t.labels.warnings.error,t.labels.warnings.noCustomization,"error"),t.smsFlowService.setLoading(null),void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.introEnabled=t.data.config.introEnabled,t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName,t.currentLang,t.requestID,t.smsFlowService.REQUEST?t.smsFlowService.REQUEST_STATUS:"").then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}getConfig(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getFunderConfig(e).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{console.error(e),t.smsFlowService.setLoading(!1)}))}))}))()}getStyle(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getFunderStyles(e).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{console.error(e),t.smsFlowService.setLoading(!1)}))}))}))()}validateRequestIdInUrl(){var e=this;return(0,i.Z)((function*(){return new Promise((t=>{var n;e.Activatedroute.queryParams.subscribe((n=(0,i.Z)((function*(n){if(n&&(e.setParamsToRequest(n),e.smsFlowService.setLoading(!1)),n&&n.acceptTerms&&(e.paramsSetted=!0,e.autoAcceptTerms=!0),n.success&&(e.stopPropagationOfSuccess=!0,e.paramsSetted=!0),n&&n.request_id){e.smsFlowService.updateRequestID(n.request_id),e.disableURL=!1;let i=yield e.setFormFromVcCode(n.request_id,n);e.requestIDFromURL=!0,e.paramsSetted=!0,t(i)}else e.smsFlowService.setLoading(!1)})),function(e){return n.apply(this,arguments)}),(t=>{e.smsFlowService.setLoading(!1)}))}))}))()}setParamsToRequest(e){this.smsFlowService.REQUEST||this.setRequestStatus("form");let t={...this.smsFlowService.REQUEST};(e.document_number||e.document)&&!t.person_document_number&&(t.person_document_number=e.document_number||e.document,this.requestIDFromURL=!0,this.paramsSetted=!0),(e.birth_date||e.birthday)&&!t.person_birth_date&&(t.person_birth_date=e.birth_date||e.birthday,this.requestIDFromURL=!0,this.paramsSetted=!0),e.phone&&!t.person_phone&&(t.person_phone=e.phone,this.requestIDFromURL=!0,this.paramsSetted=!0),e.email&&!t.email&&(t.email=e.email,this.requestIDFromURL=!0,this.paramsSetted=!0),this.smsFlowService.setRequest(t)}setFormFromVcCode(e,t){var n=this;return(0,i.Z)((function*(){return n.smsFlowService.setLoading(n.labels.loadings.gettingData),n.settingRequestFromBack=!0,new Promise((i=>{n.solicitudesService.getSolicitudByCode(e).then((e=>{e&&e.data?(n.smsFlowService.setRequest(e.data),n.setStatus(),n.smsFlowService.setSubscriptionOfRequest(),n.smsFlowService.setLoading(!1),n.skipCreationOfRequest=n.smsFlowService.REQUEST&&n.smsFlowService.REQUEST_STATUS&&"prerequest"!=n.smsFlowService.REQUEST_STATUS,n.autoAcceptTerms?n.acceptTerms():n.setParamsToRequest(t)):n.smsFlowService.setLoading(null),n.settingRequestFromBack=!1,i(n.smsFlowService.REQUEST||null)})).catch((e=>{n.smsFlowService.setLoading(null),n.settingRequestFromBack=!1,i(null)}))}))}))()}setMessageFromTest(e){this.smsFlowService.handlePusherNotification(e)}addSolicitudPIN(e){this.data[this.flowName]&&this.data[this.flowName].packID&&(e.package_id=this.data[this.flowName].packID),this.formComponent.forceEnableDisableInputs({value:!0},{value:!0},{value:!0},{value:!0}),this.pinService.addSolicitud(e).then((t=>{t&&t.status&&"error"==t.status?t.message&&(this.smsFlowService.setRequest(e),400==t.code&&"Does not have Pin service"==t.message?(this.setRequestStatus("no_service"),this.smsFlowService.setLoading(!1)):400==t.code&&"Incorrect support number"==t.message?(this.notis.showAlert(this.labels.warnings.error,this.labels.warnings.wrongSupport),this.setRequestStatus("form")):400==t.code&&"Incorrect date"==t.message?(this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongDate),this.setRequestStatus("form")):(this.setRequestStatus("form"),this.showAlert(this.labels.warnings.error,t.message)),this.setStatus()):t&&t.status&&"success"==t.status?(this.smsFlowService.updateRequestID(t.data.request_id),this.smsFlowService.setRequest(t.data),location.pathname.indexOf("widget-boxed")>-1?location.assign(t.data.widget_url_boxed+"&acceptTerms=true"):location.assign(t.data.widget_url+"&acceptTerms=true"),this.acceptTerms()):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+t)})).catch((e=>{e&&e.errorMessage&&this.showAlert("Error!",e.errorMessage)}))}addSolicitudSMS(e){this.formComponent.hasDateError=!1,this.solicitudesService.addSolicitud(e,this.packId,this.userId).then((t=>{console.warn(t),t&&t.status&&"error"==t.status?(this.smsFlowService.setRequest(e),t.message&&(400==t.code?"Birthdate incorrect"==t.message?(this.setRequestStatus("form"),this.formComponent.hasDateError=!0,this.formComponent.dateError=this.labels.warnings.wrongDateDesc):"Incorrect date"==t.message?(this.formComponent.hasDateError=!0,this.formComponent.dateError=this.labels.warnings.wrongDateDesc,this.setRequestStatus("form")):(this.setRequestStatus("no_service"),this.smsFlowService.setLoading(!1)):(this.setRequestStatus("form"),this.showAlert("Error!",t.message)),this.setStatus())):t&&t.status&&"success"==t.status?(this.smsFlowService.updateRequestID(t.data.request_id),this.smsFlowService.setRequest(t.data),this.setStatus(),this.smsFlowService.setSubscriptionOfRequest(),this.acceptTerms()):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+t)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.smsFlowService.setLoading(!1)}))}validateHaveSmsMode(e){this.solicitudesService.checkService(e).then((t=>{t&&t.message&&"does not have sms service"==t.message.toLowerCase()?(this.smsFlowService.setRequest(e),this.setRequestStatus("form"),this.pinMode=!0,this.smsFlowService.setLoading(null),this.showAlert(this.labels.warnings.noSms,this.labels.warnings.noSmsDesc)):this.addSolicitudSMS(e)})).catch((e=>{console.error(e)}))}showAlert(e,t,n){this.smsFlowService.setLoading(!1);let i=this.getFunderIconType(n);this.notis.showAlert(e,t,i)}getFunderIconType(e){if(!e||!this.funderStyles)return"error";switch(e){case"error":return this.funderStyles.errorIcon||e;case"success":return this.funderStyles.successIcon||e;case"warning":return this.funderStyles.warningIcon||e;case"info":return this.funderStyles.infoIcon||e;default:return e}}acceptTerms(e=!0){let t={request_id:this.requestID,user_id:this.userId,terms_and_conditions:!0,opening:this.termsOpened?1:0};Object.keys(this.deviceInfoDetails).length>0&&(t={...t,ip:this.deviceInfoDetails.ip,device:this.deviceInfoDetails.device,os:`${this.deviceInfoDetails.os} ${this.deviceInfoDetails.os_version}`,resolution:this.deviceInfoDetails.screen}),e&&this.smsFlowService.setLoading(this.labels.loadings.validatingAndLoginSS),this.solicitudesService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?(e.message&&"You have a request in progress"==e.message?location.pathname.indexOf("widget-boxed")>-1?location.assign(e.response.widget_url_boxed):location.assign(e.response.widget_url):e.message?"Invalid request status: stand_by"==e.message?this.setRequestStatus("stand_by"):this.showAlert("Error!",e.message):this.showAlert("Error!",e),this.smsFlowService.setLoading(!1)):e&&"success"==e.status?(this.smsFlowService.sendMessageToParent({type:"response",data:e.data||e}),this.smsFlowService.setRequest(e.data),this.setStatus(),this.smsFlowService.setSubscriptionOfRequest(),this.smsFlowService.setLoading(null),this.cd.markForCheck()):this.smsFlowService.setLoading(null)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.smsFlowService.setLoading(!1)}))}askToBack(){this.solicitudesService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.smsFlowService.setRequest(e.data),this.setStatus(),this.smsFlowService.setLoading(!1)):this.smsFlowService.setLoading(!1)})).catch((e=>{this.smsFlowService.setLoading(!1)}))}setRequestStatus(e){let t={...this.smsFlowService.REQUEST};if(t)t.status_code=e;else{let n=new a.l;n.status_code=e,t=n,this.smsFlowService.setRequest(n)}this.smsFlowService.setRequestStatus(e),this.setStatus()}newRequest(e){this.setRequestStatus("created")}gotoManual(){this.manual=!0,this.cd.markForCheck()}goFlow(){this.introEnabled=!1}gotoPin(){this.requestedToPin=!0;let e={request_id:this.smsFlowService.REQUEST.request_id};this.smsFlowService.setLoading(this.labels.loadings.smsToPin),this.solicitudesService.noPhone(e).then((e=>{this.smsFlowService.setLoading(null)})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.smsFlowService.setLoading(null)}))}gotoClavePinUrl(e){location.href.indexOf("widget-boxed")>-1?location.assign(e.widget_url_boxed):location.assign(e.widget_url)}requestStatusFromDetail(){this.requestedFromDetail=!0,this.smsFlowService.setLoading(this.labels.loadings.validatingRequest),this.solicitudesService.getSolicitudByCode(this.smsFlowService.REQUEST.request_id).then((e=>{e&&e.consent_process_completed&&this.setRequestStatus("consent_process_completed"),this.smsFlowService.setLoading(null)})).catch((e=>{this.smsFlowService.setLoading(null),this.setRequestStatus("failed")}))}handleRequestStatus(e){let t=new a.l;e.consent_process_completed?(this.requestedFromDetail=!0,t.status_code="consent_process_completed",this.smsFlowService.setRequest(t),setTimeout((()=>{this.smsFlowService.disconnectWebsocket()}),3e3),this.setStatus(),this.data[this.flowName].showDocumentsOnSuccess&&!this.intervalToAskBack&&this.initIntervalToAskBack()):(this.otpComponent&&this.otpComponent.resetOtpNumber(),e.otp_status?"VALID"===e.otp_status?e.nex_step_detail&&"Seguridad Social"===e.nex_step_detail.portal&&(t.status_code="waiting_otp_seguridad_social",this.smsFlowService.setRequest(t),this.setStatus(),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)):"INVALID"===e.otp_status&&(t.status_code=e.status_code,this.smsFlowService.setRequest(t),this.setStatus(),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)):(t.status_code="failed",this.smsFlowService.setRequest(t),this.setStatus(),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp))),this.smsFlowService.setLoading(null)}initIntervalToAskBack(){!this.smsFlowService.REQUEST||!this.smsFlowService.REQUEST.request_id||(this.intervalToAskBack=setInterval((()=>{this.askDetailToBack(this.smsFlowService.REQUEST.request_id),this.intervalCount++,this.intervalCount>20&&this.stopInterval()}),5e3))}stopInterval(){this.intervalToAskBack&&clearInterval(this.intervalToAskBack)}askDetailToBack(e){if(!e&&!this.requestID)return void this.stopInterval();let t=JSON.parse(JSON.stringify(this.smsFlowService.REQUEST_STATUS));this.pinService.getSolicitudByCode(e).then((e=>{e&&e.data&&t!=e.data.status_code&&(this.smsFlowService.setRequest(e.data),this.setRequestStatus(this.smsFlowService.REQUEST_STATUS))})).catch((e=>{this.smsFlowService.setLoading(null),this.loadingRequestData=!1}))}handleBadPhone(){this.smsFlowService.disconnectWebsocket(),this.smsFlowService.setLoading(this.labels.loadings.validatingData),setTimeout((()=>{this.smsFlowService.REQUEST||this.smsFlowService.setRequest(new a.l),this.setRequestStatus("failed_without_retry"),this.setStatus(),this.smsFlowService.setLoading(null)}),3e3)}setStatus(){if(this.showCancelRequest=!0,this.manual)this.requestStatus="manual";else if(this.introEnabled)this.requestStatus="intro";else if(this.smsFlowService.REQUEST){if(this.smsFlowService.REQUEST){let e=u[this.smsFlowService.REQUEST_STATUS];if(e){if("success"===e&&this.data.config&&this.data.config.infiniteLoopInCompleted)return void(this.requestStatus="loading");if(("abandoned"===e||"failed"===e)&&(this.showCancelRequest=!1),"phone_not_exist_otp"===e)return void(this.data&&this.data.config&&this.data.config.tryPinWithoutSMS?(this.showCancelRequest=!1,this.gotoPin(),this.requestStatus="loading"):this.requestStatus=this.data.config.noRetryInBadPhone?"otp":"error-data");if("no-service"===e&&(this.requestStatus=e,this.data&&this.data.config&&this.data.config.tryPinWithoutSMS))return void(!this.requestedToPin&&this.gotoPin());if("bad-phone"===e&&this.data&&this.data.config&&this.data.config.tryPinWithoutSMS)return!this.requestedToPin&&this.gotoPin(),void(this.requestStatus="no-phone");if("no-phone"===e){if(this.data&&this.data.config&&!this.data.config.tryPinWithoutSMS)return void(this.requestStatus="no-service");if(this.data&&this.data.config&&this.data.tryPinWithoutSMS)return!this.requestedToPin&&this.gotoPin(),void(this.requestStatus="no-phone")}this.requestStatus=e}}}else this.requestStatus="form"}gotoTermsAndConditions(){this.showTermsDialog=!0}handleTermsResponse(e){this.showTermsDialog=!1,e&&(this.termsOpened=!0,this.formComponent.setTermsCheck(!0))}};ne.ɵfac=function(e){return new(e||ne)(p.Y36(p.sBO),p.Y36(m.gz),p.Y36(f.F),p.Y36(g.M),p.Y36(_.w),p.Y36(b.r),p.Y36(v.T),p.Y36(y.s),p.Y36(w.v),p.Y36(x.H),p.Y36(C.uw),p.Y36(k.D),p.Y36(T.p))},ne.ɵcmp=p.Xpm({type:ne,selectors:[["belender-widget-sms"]],viewQuery:function(e,t){if(1&e&&(p.Gf(S,5),p.Gf(M,5),p.Gf(S,5)),2&e){let e;p.iGM(e=p.CRH())&&(t.formComponent=e.first),p.iGM(e=p.CRH())&&(t.otpComponent=e.first),p.iGM(e=p.CRH())&&(t.theDiv=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID"},features:[p._Bn([{provide:r.o2,useValue:{appearance:"standard"}}])],decls:6,vars:5,consts:[[1,"h-full","widget-belender"],[3,"class","background",4,"ngIf"],["class","loading-wrapper",4,"ngIf"],[3,"flow","lang","allData","requestStatus","requestID","accepted","cancelled",4,"ngIf"],[4,"ngIf"],[3,"sendMessage",4,"ngIf"],["class","flex justify-start px-4 py-3 items-center font-bold gap-3 text-md bg-amber-500/20 rounded-sm border border-amber-500 text-amber-500",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],[1,"flex","justify-start","px-4","py-3","items-center","font-bold","gap-3","text-md","bg-amber-500/20","rounded-sm","border","border-amber-500","text-amber-500"],["svgIcon","mat:warning"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],["class","h-full ",3,"data","flowName","gotoFlow","gotoManual",4,"ngIf"],["class","h-full ",3,"data","flowName","packId","userId","labels",4,"ngIf"],[3,"requestIDFromURL","lang","requestID","flowName","data","labels","texts","pinMode","editable_dates","skipCreationOfRequest","goToTerms",4,"ngIf"],[3,"data","labels","texts","flowName","requestID",4,"ngIf"],[3,"data","labels","texts",4,"ngIf"],[3,"requestID","data","labels","texts","flowType",4,"ngIf"],[3,"otpType","requestID","testMode","labels","logoCustom","flowType","data","texts","minLength",4,"ngIf"],[3,"data","labels","packId","flowName","userId","requestID","texts",4,"ngIf"],[3,"data","labels","currentRequest","newRequest",4,"ngIf"],[3,"data","labels","flowName","texts",4,"ngIf"],[3,"data","labels","texts","flowName",4,"ngIf"],[3,"data","labels","texts","requestID","flowType","newRequest",4,"ngIf"],[3,"texts","data","labels",4,"ngIf"],[3,"flowType","request_id","user_id","data","labels","textColor","customText",4,"ngIf"],["class","subheading-1 p-4 custom-html",3,"color","innerHTML",4,"ngIf"],[1,"h-full",3,"data","flowName","gotoFlow","gotoManual"],[1,"h-full",3,"data","flowName","packId","userId","labels"],[3,"requestIDFromURL","lang","requestID","flowName","data","labels","texts","pinMode","editable_dates","skipCreationOfRequest","goToTerms"],["formStep",""],[3,"data","labels","texts","flowName","requestID"],[3,"data","labels","texts"],[3,"requestID","data","labels","texts","flowType"],[3,"otpType","requestID","testMode","labels","logoCustom","flowType","data","texts","minLength"],["otpStep",""],[3,"data","labels","packId","flowName","userId","requestID","texts"],[3,"data","labels","currentRequest","newRequest"],[3,"data","labels","flowName","texts"],[3,"data","labels","texts","flowName"],[3,"data","labels","texts","requestID","flowType","newRequest"],[3,"texts","data","labels"],[3,"flowType","request_id","user_id","data","labels","textColor","customText"],[1,"subheading-1","p-4","custom-html",3,"innerHTML"],[1,"px-6","py-4","flex","flex-col"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"loading-wrapper"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[3,"flow","lang","allData","requestStatus","requestID","accepted","cancelled"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"],[3,"sendMessage"]],template:function(e,t){1&e&&(p.TgZ(0,"div",0),p.YNc(1,$,6,10,"div",1),p.YNc(2,K,4,3,"div",2),p.qZA(),p.YNc(3,X,1,5,"vex-terms",3),p.YNc(4,ee,3,1,"ng-container",4),p.YNc(5,te,1,0,"belender-tester-sms",5)),2&e&&(p.xp6(1),p.Q6J("ngIf",t.data&&t.data.styles&&t.data.styles.colors),p.xp6(1),p.Q6J("ngIf",t.loading&&!t.error),p.xp6(1),p.Q6J("ngIf",t.showTermsDialog),p.xp6(1),p.Q6J("ngIf",t.testMode),p.xp6(1),p.Q6J("ngIf",t.testMode))},styles:[".widget-belender[_ngcontent-%COMP%]{position:relative;min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"],data:{animation:[d.$]}}),ne=(0,s.gn)([(0,o.c)()],ne)},6547:(e,t,n)=>{n.r(t),n.d(t,{SmsModule:()=>Ft});var i=n(6895),s=n(6383),r=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),b=n(3798),v=n(9391),y=n(1572),w=n(182),x=n(4650),C=n(5089),k=n(5895),T=n(3046),S=n(342),M=n(3731);function I(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",5),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.success.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function E(e,t){if(1&e&&(x.TgZ(0,"div",6),x._UZ(1,"div",7)(2,"div",8),x.ALo(3,"safeHtml"),x.qZA()),2&e){const e=x.oxw();x.xp6(1),x.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),x.Q6J("innerHTML",e.texts.success.title,x.oJD),x.xp6(1),x.Udp("color",e.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(3,8,e.texts.success.description||""),x.oJD)}}function O(e,t){if(1&e&&x._UZ(0,"widget-documents",9),2&e){const e=x.oxw();x.Q6J("userId",e.userId)("packId",e.packId)("requestID",e.requestID)}}function L(e,t){if(1&e&&(x.TgZ(0,"div",10),x._UZ(1,"mat-progress-spinner",11),x.TgZ(2,"p",12),x._uU(3),x.qZA()()),2&e){const e=x.oxw();x.xp6(1),x.Q6J("value",0),x.xp6(2),x.Oqu(e.loading)}}const P=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function D(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",13)(1,"button",14),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.gotoRedirect())})),x._uU(2),x.qZA()()}if(2&e){const e=x.oxw();x.Q6J("ngClass",x.kEZ(8,P,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),x.xp6(1),x.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),x.xp6(1),x.hij(" ",e.data[e.flowName].btnTextCallBack||e.labels.actions.clickToFinish," ")}}let A=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.loading=null,this.showDocuments=!1}ngOnInit(){this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].automaticRedirectCallBack&&this.data[this.flowName].callBackUrl?setTimeout((()=>{location.assign(this.data[this.flowName].callBackUrl)}),2e3):this.data&&this.data[this.flowName]&&this.data[this.flowName].showDocumentsOnSuccess&&(this.showDocuments=!0)}save(){}gotoRedirect(){this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].callBackUrl&&location.assign(this.data[this.flowName].callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(x.Y36(p.QS),x.Y36(C.F),x.Y36(_.M),x.Y36(v.o),x.Y36(k.T))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",loading:"loading",requestID:"requestID",packId:"packId",userId:"userId",flowName:"flowName",labels:"labels"},decls:5,vars:5,consts:[[3,"firstOption","logoUrl",4,"ngIf"],["class"," pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],[3,"userId","packId","requestID",4,"ngIf"],["class","loading-wrapper flex flex-col items-center animated fadeIn",4,"ngIf"],["class","flex items-center gap-2 py-4 flex-col md:flex-row",3,"ngClass",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"userId","packId","requestID"],[1,"loading-wrapper","flex","flex-col","items-center","animated","fadeIn"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"flex","items-center","gap-2","py-4","flex-col","md:flex-row",3,"ngClass"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(x.YNc(0,I,1,2,"belender-widget-logo",0),x.YNc(1,E,4,10,"div",1),x.YNc(2,O,1,3,"widget-documents",2),x.YNc(3,L,4,2,"div",3),x.YNc(4,D,3,12,"div",4)),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(1),x.Q6J("ngIf",!t.data.config.infiniteLoopInCompleted&&!t.loading),x.xp6(1),x.Q6J("ngIf",t.showDocuments),x.xp6(1),x.Q6J("ngIf",t.loading),x.xp6(1),x.Q6J("ngIf",t.data&&t.data[t.flowName]&&t.data[t.flowName].enableUrlCallBack&&!t.data[t.flowName].automaticRedirectCallBack))},dependencies:[i.mk,i.O5,u.lW,y.Ou,T.X,S.A,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var N=n(4144),q=n(7367),Y=n(2254),R=n(9549);function F(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",7),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.errorPhone.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function U(e,t){if(1&e&&(x.TgZ(0,"form",8)(1,"mat-form-field",9)(2,"mat-label"),x._uU(3),x.qZA(),x._UZ(4,"input",10),x.qZA()()),2&e){const e=x.oxw();x.Q6J("formGroup",e.form),x.xp6(3),x.Oqu(e.labels.phone)}}const Z=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function H(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",11)(1,"button",12),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.no())})),x._uU(2),x.qZA(),x.TgZ(3,"button",13),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.next())})),x._uU(4),x.qZA()()}if(2&e){const e=x.oxw();x.Q6J("ngClass",x.kEZ(12,Z,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),x.xp6(1),x.Udp("border-radius",e.data.styles.btnRound+"px"),x.xp6(1),x.hij(" ",e.labels.warnings.dontHavePhone," "),x.xp6(1),x.Udp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),x.Q6J("disabled",e.form.invalid),x.xp6(1),x.hij(" ",e.labels.actions.next," ")}}let j=(()=>{class e{constructor(e,t,n,i,s,r){this.fb=e,this.utils=t,this.cd=n,this.notifications=i,this.solicitudesService=s,this.smsFlowService=r,this.loading=null,this.noPhone=new x.vpe(null),this.nextStep=new x.vpe(null)}ngOnInit(){this.form=this.fb.group({phone:[null,[p.kI.required,p.kI.maxLength(9),p.kI.minLength(9)]]})}next(){"SMS"===this.flowName?this.setSmsPhone(this.form.get("phone").value):this.nextStep.emit(this.form.get("phone").value)}no(){"SMS"===this.flowName?this.setSmsNoPhone():this.noPhone.emit(!0)}setSmsPhone(e){this.smsFlowService.setLoading(this.labels.loadings.sendingNewPhone),this.solicitudesService.setPhone({phone:e},this.smsFlowService.REQUEST&&this.smsFlowService.REQUEST.request_id?this.smsFlowService.REQUEST.request_id:this.requestID)}setSmsNoPhone(){this.smsFlowService.setLoading(this.labels.loadings.validatingData),this.solicitudesService.noPhone({request_id:this.smsFlowService.REQUEST.request_id})}}return e.ɵfac=function(t){return new(t||e)(x.Y36(p.QS),x.Y36(C.F),x.Y36(x.sBO),x.Y36(k.T),x.Y36(_.M),x.Y36(Y.p))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-error-phone-step"]],inputs:{requestID:"requestID",flowName:"flowName",data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{noPhone:"noPhone",nextStep:"nextStep"},decls:9,vars:13,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","w-full",3,"formGroup",4,"ngIf"],["class","flex items-center gap-2 p-4",3,"ngClass",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"mb-4","w-full","md:max-w-[500px]"],["maxlength","9","formControlName","phone","matInput",""],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"bg-red-500","text-red-50","px-8","py-1","w-full","max-w-none","md:max-w-[220px]",3,"click"],["mat-flat-button","","type","button",1,"px-8","py-1","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(x.YNc(0,F,1,2,"belender-widget-logo",0),x.TgZ(1,"div",1)(2,"div",2),x._UZ(3,"div",3)(4,"div",4),x.ALo(5,"safeHtml"),x._UZ(6,"br"),x.YNc(7,U,5,2,"form",5),x.qZA(),x.YNc(8,H,5,16,"div",6),x.qZA()),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(3),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.Q6J("innerHTML",t.texts.errorPhone.title,x.oJD),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(5,11,t.texts.errorPhone.description),x.oJD),x.xp6(3),x.Q6J("ngIf",!t.data.config.noRetryInBadPhone),x.xp6(1),x.Q6J("ngIf",!t.data.config.noRetryInBadPhone))},dependencies:[i.mk,i.O5,u.lW,R.KE,R.hX,N.Nt,p._Y,p.Fj,p.JJ,p.JL,p.nD,p.sg,p.u,T.X,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var z=n(8135),B=n(8460);function J(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",3),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.fail.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function V(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",10)(1,"button",11),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw(2);return x.KtG(t.retry())})),x._uU(2),x.qZA()()}if(2&e){const e=x.oxw(2);x.xp6(1),x.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),x.xp6(1),x.hij(" ",e.labels.actions.retry," ")}}const Q=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function W(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",12)(1,"button",11),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw(2);return x.KtG(t.newRequest())})),x._uU(2),x.qZA()()}if(2&e){const e=x.oxw(2);x.Q6J("ngClass",x.kEZ(8,Q,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),x.xp6(1),x.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),x.xp6(1),x.Oqu(e.labels.actions.newRequest)}}function G(e,t){if(1&e&&(x.TgZ(0,"div",4)(1,"div",5),x._UZ(2,"div",6)(3,"div",7),x.ALo(4,"safeHtml"),x.qZA(),x.YNc(5,V,3,7,"div",8),x.YNc(6,W,3,12,"div",9),x.qZA()),2&e){const e=x.oxw();x.xp6(2),x.Q6J("innerHTML",e.texts.fail.title,x.oJD),x.xp6(1),x.Udp("color",e.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(4,6,e.texts.fail.description),x.oJD),x.xp6(2),x.Q6J("ngIf",e.smsFlowService.REQUEST&&"failed_with_retry"==e.smsFlowService.REQUEST_STATUS),x.xp6(1),x.Q6J("ngIf",e.smsFlowService.REQUEST&&"failed_documents_downloaded"==e.smsFlowService.REQUEST_STATUS)}}function $(e,t){if(1&e&&(x.TgZ(0,"div",13),x._UZ(1,"mat-progress-spinner",14),x.TgZ(2,"p",15),x._uU(3),x.qZA()()),2&e){const e=x.oxw();x.xp6(1),x.Q6J("value",0),x.xp6(2),x.Oqu(e.loading)}}let K=(()=>{class e{constructor(e,t,n,i,s,r,o,a){this.smsComponent=e,this.fb=t,this.utils=n,this.solicitudesService=i,this.attachmentsService=s,this.notifications=r,this.smsFlowService=o,this.customizationStoreService=a,this.loading=null,this.retryOp=new x.vpe(null),this.newReq=new x.vpe(null)}ngOnInit(){}save(){}retry(){"SMS"===this.flowType?this.retrySmsRequest(this.smsFlowService.REQUEST.request_id):this.retryOp.emit(this.smsFlowService.REQUEST.request_id)}newRequest(){this.newReq.emit(this.smsFlowService.REQUEST.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.smsFlowService.REQUEST_STATUS}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.smsFlowService.REQUEST_STATUS}retrySmsRequest(e){let t={request_id:(this.smsFlowService.REQUEST&&this.smsFlowService.REQUEST.request_id?this.smsFlowService.REQUEST.request_id:this.requestID)||e,user_id:this.customizationStoreService.USER_ID};this.smsFlowService.setLoading(this.labels.loadings.resendingRequest),this.smsFlowService.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.smsFlowService.setRequest(e.data),this.smsComponent.setStatus()),this.smsFlowService.setLoading(!1)})).catch((e=>{console.error(e),this.smsComponent.showAlert("Error!",e.message||e),this.smsFlowService.setLoading(!1)}))}}return e.ɵfac=function(t){return new(t||e)(x.Y36(z.T,9),x.Y36(p.QS),x.Y36(C.F),x.Y36(_.M),x.Y36(v.o),x.Y36(k.T),x.Y36(Y.p),x.Y36(B.r))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-fail-step"]],inputs:{flowType:"flowType",requestID:"requestID",data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:3,vars:3,consts:[[3,"firstOption","logoUrl",4,"ngIf"],["class","animated fadeIn fixed-content",4,"ngIf"],["class","loading-wrapper flex flex-col items-center animated fadeIn",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"animated","fadeIn","fixed-content"],[1,"px-2","py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],["class","flex items-center gap-2 p-4",3,"ngClass",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],[1,"loading-wrapper","flex","flex-col","items-center","animated","fadeIn"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(x.YNc(0,J,1,2,"belender-widget-logo",0),x.YNc(1,G,7,8,"div",1),x.YNc(2,$,4,2,"div",2)),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(1),x.Q6J("ngIf",!t.loading),x.xp6(1),x.Q6J("ngIf",t.loading))},dependencies:[i.mk,i.O5,u.lW,y.Ou,T.X,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var X=n(5439),ee=n.n(X),te=(n(6866),n(3238)),ne=n(3755),ie=n(3746),se=n(2932),re=n(5762),oe=n(4246),ae=n(5412),le=n(1763),ce=n(5696),de=n(1094);const ue=["termsCheckbox"],he=["assignmentCheckbox"];function pe(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",23),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.form.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function me(e,t){if(1&e&&(x.TgZ(0,"mat-error"),x._uU(1),x.qZA()),2&e){const e=x.oxw();x.xp6(1),x.hij(" ",e.errorDNI," ")}}function fe(e,t){1&e&&(x.TgZ(0,"mat-error"),x._uU(1," El formato debe ser DD/MM/AAAA "),x.qZA())}function ge(e,t){1&e&&(x.TgZ(0,"mat-error"),x._uU(1," Fecha inválida "),x.qZA())}function _e(e,t){1&e&&(x.TgZ(0,"mat-error"),x._uU(1," Debe ser mayor de 18 años "),x.qZA())}function be(e,t){1&e&&(x.TgZ(0,"mat-error"),x._uU(1," El formato debe ser DD/MM/AAAA "),x.qZA())}function ve(e,t){1&e&&(x.TgZ(0,"mat-error"),x._uU(1," Fecha inválida "),x.qZA())}function ye(e,t){1&e&&(x.TgZ(0,"mat-error"),x._uU(1," Debe ser mayor de 18 años "),x.qZA())}function we(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"mat-form-field",24)(1,"mat-label"),x._uU(2),x.qZA(),x._UZ(3,"input",25),x.TgZ(4,"mat-hint")(5,"a",26),x.NdJ("click",(function(t){x.CHM(e);const n=x.oxw();return x.KtG(n.gotoExpirationDate(t))})),x.TgZ(6,"u"),x._uU(7),x.qZA()()(),x.YNc(8,be,2,0,"mat-error",8),x.YNc(9,ve,2,0,"mat-error",8),x.YNc(10,ye,2,0,"mat-error",8),x.qZA()}if(2&e){const e=x.oxw();let t,n,i;x.xp6(2),x.Oqu(e.labels.expiration),x.xp6(5),x.Oqu(e.labels.findExpiration),x.xp6(1),x.Q6J("ngIf",null==(t=e.form.get("document_expiration"))?null:t.hasError("invalidFormat")),x.xp6(1),x.Q6J("ngIf",null==(n=e.form.get("document_expiration"))?null:n.hasError("invalidDate")),x.xp6(1),x.Q6J("ngIf",null==(i=e.form.get("document_expiration"))?null:i.hasError("underAge"))}}function xe(e,t){if(1&e&&(x.TgZ(0,"mat-form-field",24)(1,"mat-label"),x._uU(2),x.qZA(),x._UZ(3,"input",27),x.qZA()),2&e){const e=x.oxw();x.xp6(2),x.Oqu(e.labels.support)}}function Ce(e,t){if(1&e&&(x.TgZ(0,"div",28)(1,"mat-form-field",6)(2,"mat-label"),x._uU(3),x.qZA(),x._UZ(4,"input",29),x.qZA()()),2&e){const e=x.oxw();x.xp6(1),x.Gre("",e.disabledInputs.email?"disabled-input":""," w-full flex-1 belender-form-field"),x.xp6(2),x.Oqu(e.labels.email),x.xp6(1),x.s9C("tabindex",e.disabledInputs.email?-1:1),x.s9C("placeholder",e.labels.inputEmail)}}function ke(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",30)(1,"belender-checkbox",31,32),x.NdJ("changeCheckbox",(function(t){x.CHM(e);const n=x.oxw();return x.KtG(n.setTerms(t))})),x.TgZ(3,"belender-terms-and-policy-links",33),x.NdJ("goToTerms",(function(t){x.CHM(e);const n=x.oxw();return x.KtG(n.gotoTermsAndConditions(t))})),x.qZA()()()}if(2&e){const e=x.oxw();x.xp6(1),x.Q6J("color",e.data.styles.colors.title),x.xp6(2),x.Q6J("userId",e.userId)("lang",e.lang)("flowName",e.flowName)("data",e.data)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink)("firstSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.firstSentence)("secondSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.secondSentence)("thirdSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.thirdSentence)("policyActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.policyActionText)("termsActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.termsActionText)("customTerms",e.data[e.flowName].customTerms)}}function Te(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",34)(1,"belender-checkbox",35,36),x.NdJ("changeCheckbox",(function(t){x.CHM(e);const n=x.oxw();return x.KtG(n.setAssignment(t))})),x._UZ(3,"div",37),x.qZA()()}if(2&e){const e=x.oxw();x.xp6(1),x.Q6J("color",e.data.styles.colors.title),x.xp6(2),x.Q6J("innerHTML",e.data[e.flowName]&&e.data[e.flowName].texts&&e.data[e.flowName].texts.dataAssignmentText?e.data[e.flowName].texts.dataAssignmentText:null==e.data?null:e.data.config.dataAssignmentText,x.oJD)}}function Se(e,t){if(1&e&&(x.TgZ(0,"div",38),x._UZ(1,"mat-icon",39),x._uU(2),x.qZA()),2&e){const e=x.oxw();x.xp6(2),x.hij(" ",e.labels.warnings.haveToReadTerms," ")}}function Me(e,t){if(1&e&&(x.TgZ(0,"div",40),x._UZ(1,"mat-icon",39),x._uU(2),x.qZA()),2&e){const e=x.oxw();x.xp6(2),x.hij(" ",e.errorDNI," ")}}function Ie(e,t){if(1&e&&(x.TgZ(0,"div",41)(1,"strong",42),x._uU(2),x.qZA(),x.TgZ(3,"span",43),x._uU(4),x.qZA()()),2&e){const e=x.oxw();x.xp6(2),x.Oqu(e.labels.warnings.wrongDate||"Error"),x.xp6(2),x.Oqu(e.dateError)}}function Ee(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"button",44),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.goBack())})),x._uU(1),x.qZA()}if(2&e){const e=x.oxw();x.Udp("border-radius",e.data.styles.btnRound+"px"),x.xp6(1),x.hij(" ",e.labels.actions.back," ")}}function Oe(e,t){if(1&e&&(x.TgZ(0,"div",45),x._UZ(1,"mat-progress-spinner",46),x.TgZ(2,"p",47),x._uU(3),x.qZA()()),2&e){const e=x.oxw();x.xp6(1),x.Q6J("value",0),x.xp6(2),x.hij(" ",e.loading," ")}}const Le=function(e){return{"dont-show-data":e}},Pe=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let De=(()=>{class e{constructor(e,t,n,i,s,r,o,a,l,c){this.smsComponent=e,this.fb=t,this.utils=n,this.cd=i,this.widgetUtils=s,this.dialog=r,this.customService=o,this.smsFlowService=a,this.solicitudesService=l,this.customizationStoreService=c,this.editable_dates=!1,this.next=new x.vpe(null),this.goTerms=new x.vpe(null),this.goIntro=new x.vpe(null),this.acceptTerms=!1,this.assignment=!1,this.termsReaded=!1,this.isDni=!1,this.isNie=!1,this.errorDNI=null,this.disabledInputs={document_number:!1,birth_date:!1,email:!1,phone:!1},this.noValidate=!1,this.testMode=!0,this.lang="",this.hasDateError=!1,this.dateError=""}ngOnInit(){this.packId=this.customizationStoreService.PACK_ID,this.userId=this.customizationStoreService.USER_ID,this.smsFlowService.REQUEST?(this.noValidate="terms_and_conditions"==this.smsFlowService.REQUEST_STATUS,this.setForm(this.smsFlowService.REQUEST)):this.setForm(null)}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}setForm(e){console.warn("setForm");let t=e?e.person_document_number||e.dni||e.document_number:null,n=e&&e.person_birth_date?ee()(e.person_birth_date).format("DD/MM/YYYY"):null,i=e&&e.birth_date?ee()(e.birth_date).format("DD/MM/YYYY"):n,s=e?e.person_phone||e.phone:null,r=e?e.person_email||e.email:null;t&&this.setRegex(t);const o=this;o.form=o.fb.group(o.data&&o.data.config&&o.data.config.followMail?{document_number:[t||null,o.noValidate?[]:[p.kI.required,p.kI.maxLength(9),o.regexDNI()]],birth_date:[i||null,o.noValidate?[]:[p.kI.required,(0,se.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],type:["DNI"],phone:[s||"",o.noValidate?[]:[p.kI.required,p.kI.maxLength(9),p.kI.minLength(9)]],email:[r||null,o.noValidate?[]:[p.kI.required,p.kI.email]],document_expiration:[null,[(0,se.s)({checkFormat:!0,checkDate:!0})]],support_number:[null]}:{document_number:[t||null,o.noValidate?[]:[p.kI.required,p.kI.maxLength(9),o.regexDNI()]],birth_date:[i||null,o.noValidate?[]:[p.kI.required,(0,se.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],type:["DNI"],phone:[s||"",o.noValidate?[]:[p.kI.required,p.kI.maxLength(9),p.kI.minLength(9)]],email:[r||null],document_expiration:[null,[(0,se.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],support_number:[null]}),this.form.markAsUntouched(),this.form.updateValueAndValidity(),o.requestIDFromURL&&o.disableEnableInputs(t,n,s,r)}forceEnableDisableInputs(e,t,n,i){this.disableEnableInputs(e?e.value:this.disabledInputs.document_number,t?t.value:this.disabledInputs.birth_date,n?n.value:this.disabledInputs.phone,i?i.value:this.disabledInputs.email)}disableEnableInputs(e,t,n,i){this.disabledInputs={document_number:e||!1,birth_date:!this.editable_dates&&(t||!1),email:i||!1,phone:n||!1},console.warn("this.disabledInputs",this.disabledInputs)}regexDNI(){return e=>{const t=e.value;return t?(this.setRegex(t),this.isDni||this.isNie?null:{regexDNI:!0}):null}}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.termsReaded=!0,this.goTerms.emit(!0)}setRegex(e){if(!e)return;let t=this.widgetUtils.ValidateIDType(e);t&&t.type?("dni"===t.type?(this.isDni=!0,this.errorDNI=t.valid?null:"Debes ingresar un DNI válido!"):this.isDni=!1,"nie"===t.type?(this.isNie=!0,this.errorDNI=t.valid?null:"Debes ingresar un NIE válido!"):this.isNie=!1):(this.isDni=!1,this.isNie=!1,this.errorDNI="Debes ingresar un DNI o NIE válido!"),this.cd.markForCheck()}setTerms(e){this.acceptTerms=e}setAssignment(e){this.assignment=e}getIfValid(){return!!this.data.config.hideCheckLegal||this.acceptTerms}getFormsValid(){let e=!this.form.invalid,t=this.form.get("document_number").value;return t?this.setRegex(t):e=!1,!this.isDni&&!this.isNie&&(this.disabledInputs.document_number=!1,e=!1),this.errorDNI&&(e=!1),this.cd.markForCheck(),e}nextStep(){let e;e=this.data&&this.data.config&&this.data.config.followMail?{document_number:this.form.get("document_number").value.toUpperCase(),birth_date:this.utils.formatDate(this.form.get("birth_date").value),type:this.form.get("type").value,phone:this.form.get("phone").value,email_copy:this.form.get("email").value,check_legal:!0,document_expiration_date:this.form.get("document_expiration")?this.utils.formatDate(this.form.get("document_expiration").value):"2029-04-11"}:{document_number:this.form.get("document_number").value.toUpperCase(),birth_date:this.utils.formatDate(this.form.get("birth_date").value),type:this.form.get("type").value,phone:this.form.get("phone").value,check_legal:!0,email_copy:"roger.checa@belender.eu",document_expiration_date:this.form.get("document_expiration")?this.utils.formatDate(this.form.get("document_expiration").value):"2029-04-11"},"SMS"===this.flowName?this.gotoSmsTerms(e):this.next.emit(e)}getAssignmentValidation(){return!(this.data.config.forceChecks&&!this.termsReaded)&&(!this.data.config.dataAssignmentCheck||this.assignment)}goBack(){"SMS"===this.flowName?this.goSmsIntro():this.goIntro.emit(!0)}gotoSupportAclaration(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(ne.$,{panelClass:"fullscreen-dialog"})}gotoExpirationDate(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(ie.R,{panelClass:"fullscreen-dialog"})}gotoSmsTerms(e){this.smsFlowService.setLoading(this.labels.loadings.sendingData),e.package_id=this.packId,e.user_id=this.userId,this.requestID&&(e.request_id=this.requestID),this.testMode?setTimeout((()=>{this.smsFlowService.setRequest(new re.l),this.smsComponent.setRequestStatus("waiting_otp_seguridad_social"),this.smsFlowService.setLoading(!1)}),4e3):this.skipCreationOfRequest?(this.smsComponent.acceptTerms(),this.smsFlowService.setSubscriptionOfRequest()):this.checkSmsService(e)}goSmsIntro(){this.smsComponent.manual=!1,this.smsComponent.introEnabled=!0}checkSmsService(e){this.hasDateError=!1,this.forceEnableDisableInputs({value:!0},{value:!0},{value:!0},{value:!0}),this.solicitudesService.checkService(e).then((t=>{t&&t.message&&t.status&&"error"==t.status?t.message.birth_date?(this.smsFlowService.setLoading(null),this.smsComponent.setRequestStatus("form"),this.hasDateError=!0,this.dateError=this.labels.warnings.wrongDate,this.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1})):"string"==typeof t.message&&" fecha de nacimiento incorrecta"==t.message.toLowerCase()?(this.smsFlowService.setLoading(null),this.smsComponent.setRequestStatus("form"),this.hasDateError=!0,this.dateError=this.labels.warnings.wrongDateDesc,this.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1})):"string"==typeof t.message&&"does not have sms service"==t.message.toLowerCase()?(this.smsFlowService.setLoading(this.labels.loadings.creatingRequest),e.user_id=this.userId,e.package_id=this.packId,this.requestID&&(e.request_id=this.requestID),this.solicitudesService.addSolicitud(e).then((e=>{e.data&&this.smsFlowService.updateRequestID(e.data.request_id),this.solicitudesService.setNoService({request_id:this.requestID}).then((()=>{this.smsFlowService.setLoading(null)})),this.smsComponent.setRequestStatus("no_service"),this.smsComponent.setStatus()}))):"string"==typeof t.message&&"birthdate incorrect"==t.message.toLowerCase()?(this.smsFlowService.setLoading(null),this.smsComponent.setRequestStatus("form"),this.hasDateError=!0,this.dateError=this.labels.warnings.wrongDateDesc,this.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1})):(this.smsComponent.setRequestStatus("form"),this.smsComponent.setStatus(),this.smsFlowService.setLoading(null)):t&&t.status&&"success"==t.status?this.smsComponent.addSolicitudSMS(e):(this.smsFlowService.setLoading(null),this.smsComponent.setRequestStatus("form"),this.smsComponent.setStatus(),this.dateError=t.message||t)})).catch((e=>{console.error(e),this.smsFlowService.setLoading(null),e.message&&"birthdate incorrect"==e.message.toLowerCase()&&(this.smsComponent.setRequestStatus("form"),this.hasDateError=!0,this.dateError=this.labels.warnings.wrongDateDesc)}))}}return e.ɵfac=function(t){return new(t||e)(x.Y36(z.T,9),x.Y36(p.QS),x.Y36(C.F),x.Y36(x.sBO),x.Y36(oe.t),x.Y36(ae.uw),x.Y36(q.w),x.Y36(Y.p),x.Y36(_.M),x.Y36(B.r))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(x.Gf(ue,5),x.Gf(he,5)),2&e){let e;x.iGM(e=x.CRH())&&(t.checkComponent=e.first),x.iGM(e=x.CRH())&&(t.assignmentCheckComponent=e.first)}},inputs:{requestID:"requestID",data:"data",flowName:"flowName",texts:"texts",pinMode:"pinMode",requestIDFromURL:"requestIDFromURL",editable_dates:"editable_dates",skipCreationOfRequest:"skipCreationOfRequest",labels:"labels",lang:"lang"},outputs:{next:"nextStep",goTerms:"goToTerms",goIntro:"goIntro"},features:[x._Bn([{provide:te.sG,useValue:{parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}}}])],decls:37,vars:60,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between",3,"ngClass"],["appearance","outline"],["placeholder","Ej: 12312345R","formControlName","document_number","maxlength","9","matInput","",3,"tabindex"],[4,"ngIf"],["type","text","placeholder","Ej: 22/03/1990","formControlName","birth_date","matInput","","mask","d0/M0/0000",3,"tabindex"],["appearance","outline","class","w-full flex-1 belender-form-field",4,"ngIf"],["formControlName","phone","placeholder","Ej: 123123123","maxlength","9","type","text","matInput","",3,"tabindex"],["class","w-full",4,"ngIf"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["class","flex justify-start items-center w-full flex-100",4,"ngIf"],["class","mt-6 flex justify-start items-center w-full flex-100",4,"ngIf"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],["class","pl-3 pr-4 flex w-fit items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],["class","bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative","role","alert",4,"ngIf"],[1,"flex","items-center","gap-2","py-4","flex-col","md:flex-row",3,"ngClass"],["class","px-8 py-1 bg-slate-100 hover:bg-slate-200 text-slate-900 w-full max-w-none md:max-w-[220px]","mat-flat-button","","type","button",3,"border-radius","click",4,"ngIf"],["mat-flat-button","","type","button",1,"px-8","py-1","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],["class","loading-wrapper flex flex-col items-center animated fadeIn",4,"ngIf"],[3,"firstOption","logoUrl"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","text","placeholder","Ej: 22/03/1990","required","","formControlName","document_expiration","matInput","","mask","d0/M0/0000"],["target","_blank",1,"text-sm","hover:text-blue-500","cursor-pointer",3,"click"],["type","text","placeholder","22211134","required","","formControlName","support_number","matInput",""],[1,"w-full"],["formControlName","email","type","email","matInput","",3,"tabindex","placeholder"],[1,"flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","lang","flowName","data","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],[1,"mt-6","flex","justify-start","items-center","w-full","flex-100"],[3,"color","changeCheckbox"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"],[1,"pl-3","pr-4","flex","w-fit","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["role","alert",1,"bg-red-100","border","border-red-400","text-red-700","px-4","py-3","rounded","relative"],[1,"font-bold"],[1,"block","sm:inline"],["mat-flat-button","","type","button",1,"px-8","py-1","bg-slate-100","hover:bg-slate-200","text-slate-900","w-full","max-w-none","md:max-w-[220px]",3,"click"],[1,"loading-wrapper","flex","flex-col","items-center","animated","fadeIn"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){if(1&e&&(x.YNc(0,pe,1,2,"belender-widget-logo",0),x.TgZ(1,"form",1)(2,"div",2),x._UZ(3,"div",3)(4,"div",4),x.ALo(5,"safeHtml"),x.qZA(),x.TgZ(6,"div",5)(7,"mat-form-field",6)(8,"mat-label"),x._uU(9),x.qZA(),x._UZ(10,"input",7),x.YNc(11,me,2,1,"mat-error",8),x.qZA(),x.TgZ(12,"mat-form-field",6)(13,"mat-label"),x._uU(14),x.qZA(),x._UZ(15,"input",9),x.YNc(16,fe,2,0,"mat-error",8),x.YNc(17,ge,2,0,"mat-error",8),x.YNc(18,_e,2,0,"mat-error",8),x.qZA(),x.YNc(19,we,11,5,"mat-form-field",10),x.YNc(20,xe,4,1,"mat-form-field",10),x.TgZ(21,"mat-form-field",6)(22,"mat-label"),x._uU(23),x.qZA(),x._UZ(24,"input",11),x.qZA(),x.YNc(25,Ce,5,6,"div",12),x.qZA(),x.TgZ(26,"div",13),x.YNc(27,ke,4,12,"div",14),x.YNc(28,Te,4,2,"div",15),x.YNc(29,Se,3,1,"div",16),x.YNc(30,Me,3,1,"div",17),x.qZA(),x.YNc(31,Ie,5,2,"div",18),x.TgZ(32,"div",19),x.YNc(33,Ee,2,3,"button",20),x.TgZ(34,"button",21),x.NdJ("click",(function(){return t.nextStep()})),x._uU(35),x.qZA()()(),x.YNc(36,Oe,4,2,"div",22)),2&e){let e,n,i;x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(1),x.Gre("animated ",t.loading?"hide-content":""," fadeIn fixed-content px-2"),x.Q6J("formGroup",t.form),x.xp6(2),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.Q6J("innerHTML",t.texts.form.title,x.oJD),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(5,52,t.texts.form.description||""),x.oJD),x.xp6(2),x.Q6J("ngClass",x.VKq(54,Le,t.data.config.dontShowDataInTerms&&t.smsFlowService.REQUEST&&t.smsFlowService.REQUEST_STATUS&&"terms_and_conditions"===t.smsFlowService.REQUEST_STATUS)),x.xp6(1),x.Gre("",t.disabledInputs.document_number?"disabled-input":""," w-full flex-1 belender-form-field"),x.xp6(2),x.Oqu(t.isDni?t.labels.dni:t.isNie?t.labels.nie:t.labels.nieOrDni),x.xp6(1),x.s9C("tabindex",t.disabledInputs.document_number?-1:1),x.xp6(1),x.Q6J("ngIf",t.errorDNI),x.xp6(1),x.Gre("",t.disabledInputs.birth_date?"disabled-input":""," w-full flex-1 belender-form-field"),x.xp6(2),x.Oqu(t.labels.birthday),x.xp6(1),x.s9C("tabindex",t.disabledInputs.birth_date?-1:1),x.xp6(1),x.Q6J("ngIf",null==(e=t.form.get("birth_date"))?null:e.hasError("invalidFormat")),x.xp6(1),x.Q6J("ngIf",null==(n=t.form.get("birth_date"))?null:n.hasError("invalidDate")),x.xp6(1),x.Q6J("ngIf",null==(i=t.form.get("birth_date"))?null:i.hasError("underAge")),x.xp6(1),x.Q6J("ngIf",t.pinMode&&!t.isNie),x.xp6(1),x.Q6J("ngIf",t.pinMode&&t.isNie),x.xp6(1),x.Gre("",t.disabledInputs.phone?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),x.xp6(2),x.Oqu(t.labels.phone),x.xp6(1),x.s9C("tabindex",t.disabledInputs.phone?-1:1),x.xp6(1),x.Q6J("ngIf",null==t.data||null==t.data.config?null:t.data.config.followMail),x.xp6(2),x.Q6J("ngIf",!t.data.config.hideCheckLegal),x.xp6(1),x.Q6J("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),x.xp6(1),x.Q6J("ngIf",t.data.config.forceChecks&&!t.termsReaded),x.xp6(1),x.Q6J("ngIf",t.errorDNI),x.xp6(1),x.Q6J("ngIf",t.hasDateError),x.xp6(1),x.Q6J("ngClass",x.kEZ(56,Pe,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Q6J("ngIf",t.data.config.introEnabled),x.xp6(1),x.Udp("color",t.getFormsValid()&&t.getAssignmentValidation()&&t.getIfValid()?t.data.styles.colors.btnText:"")("background",t.getFormsValid()&&t.getAssignmentValidation()&&t.getIfValid()?t.data.styles.colors.btnBg:"")("border-radius",t.data.styles.btnRound+"px"),x.Q6J("disabled",!t.getFormsValid()||!t.getAssignmentValidation()||!t.getIfValid()),x.xp6(1),x.hij(" ",t.labels.actions.continue," "),x.xp6(1),x.Q6J("ngIf",t.loading)}},dependencies:[i.mk,i.O5,d.Hw,u.lW,R.TO,R.KE,R.bx,R.hX,N.Nt,p._Y,p.Fj,p.JJ,p.JL,p.Q7,p.nD,p.sg,p.u,y.Ou,le.b,T.X,ce.T,de.Z6,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}.hide-content[_ngcontent-%COMP%]{opacity:0!important;max-height:0px!important;overflow:hidden!important;padding:0!important}"]}),e})();var Ae=n(9602),Ne=n(6257),qe=n(1948),Ye=n(9299);const Re=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Fe=(()=>{class e{constructor(e,t,n,i,s,r,o){this.smsComponent=e,this.fb=t,this.utils=n,this.Activatedroute=i,this.smsFlowService=s,this.solicitudesService=r,this.cd=o,this.next=new x.vpe(null),this.loading=null,this.accept=!1}ngOnInit(){this.Activatedroute.queryParams.subscribe((e=>{this.setForm(e)}))}nextStep(){let e={phone:this.form.get("phone").value};"SMS"===this.flowName?this.sendSmsNewData(e):this.next.emit(e)}setForm(e){this.form=this.fb.group({phone:["",p.kI.required]}),this.smsFlowService.REQUEST&&"bad_phone"==this.smsFlowService.REQUEST_STATUS&&this.form.controls.phone.markAsTouched()}sendSmsNewData(e){this.smsFlowService.setLoading(this.labels.loadings.sendingData),this.solicitudesService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.smsComponent.showAlert("Error!",e.message,"error"),this.smsFlowService.setLoading(!1)):e&&"success"==e.status&&(this.smsFlowService.sendMessageToParent({type:"response",data:e.data||e}),this.smsFlowService.setLoading(this.labels.loadings.validatingData),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.smsComponent.showAlert("Error!",e.error),this.smsFlowService.setLoading(!1)}))}}return e.ɵfac=function(t){return new(t||e)(x.Y36(z.T,9),x.Y36(p.QS),x.Y36(C.F),x.Y36(Ye.gz),x.Y36(Y.p),x.Y36(_.M),x.Y36(x.sBO))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-error-form-step"]],inputs:{requestID:"requestID",data:"data",flowName:"flowName",texts:"texts",mode:"mode",loading:"loading",labels:"labels"},outputs:{next:"nextStep"},decls:14,vars:23,consts:[[1,"animated","fadeIn","fixed-content",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"mb-4","w-full","flex-1"],["formControlName","phone","matInput",""],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(x.TgZ(0,"form",0)(1,"div",1)(2,"div",2),x._uU(3),x.qZA(),x.TgZ(4,"div",3),x._uU(5),x.qZA()(),x.TgZ(6,"div",4)(7,"mat-form-field",5)(8,"mat-label"),x._uU(9),x.qZA(),x._UZ(10,"input",6),x.qZA()(),x.TgZ(11,"div",7)(12,"button",8),x.NdJ("click",(function(){return t.nextStep()})),x._uU(13),x.qZA()()()),2&e&&(x.Q6J("formGroup",t.form),x.xp6(2),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.xp6(1),x.Oqu(t.labels.warnings.phoneError),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.xp6(1),x.Oqu(t.labels.warnings.badPhoneSS),x.xp6(4),x.Oqu(t.labels.phone),x.xp6(2),x.Q6J("ngClass",x.kEZ(19,Re,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),x.Q6J("disabled",t.form.invalid),x.xp6(1),x.Oqu(t.labels.actions.continue))},dependencies:[i.mk,u.lW,R.KE,R.hX,N.Nt,p._Y,p.Fj,p.JJ,p.JL,p.sg,p.u],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Ue=n(6e3);const Ze=[{path:":idUser",component:z.T},{path:":idUser/:packID",component:z.T}];let He=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=x.oAB({type:e}),e.ɵinj=x.cJS({imports:[Ye.Bz.forChild(Ze),Ye.Bz,Ue.d8]}),e})();function je(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",5),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.noService.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let ze=(()=>{class e{constructor(){this.loading=null}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},decls:6,vars:11,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(x.YNc(0,je,1,2,"belender-widget-logo",0),x.TgZ(1,"form",1)(2,"div",2),x._UZ(3,"div",3)(4,"div",4),x.ALo(5,"safeHtml"),x.qZA()()),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(3),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.Q6J("innerHTML",t.texts.noService.title,x.oJD),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(5,9,t.texts.noService.description),x.oJD))},dependencies:[i.O5,p._Y,p.JL,p.F,T.X,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Be(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",8),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.abandoned.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const Je=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Ve=(()=>{class e{constructor(e,t,n,i,s,r,o,a){this.smsComponent=e,this.fb=t,this.utils=n,this.solicitudesService=i,this.attachmentsService=s,this.notifications=r,this.smsFlowService=o,this.customizationStoreService=a,this.retryOp=new x.vpe(null),this.loading=null}ngOnInit(){}save(){}retry(){"SMS"===this.flowType?this.retrySmsRequest(this.smsFlowService.REQUEST.request_id):this.retryOp.emit(this.smsFlowService.REQUEST.request_id)}getTextStatus(){switch(this.smsFlowService.REQUEST_STATUS){case"abandoned_after_waiting_otp_seguridad_social":return this.labels.abandoned.afterWaitingOtpSS;case"abandoned_after_invalid_otp_seguridad_social":return this.labels.abandoned.afterInvalidOtpSS;case"abandoned_after_invalid_otp_aeat":return this.labels.abandoned.afterInvalidOtpAEAT;case"abandoned_after_waiting_otp_aeat":return this.labels.abandoned.afterWaitingOtpAEAT;default:return this.smsFlowService.REQUEST.status_message||this.smsFlowService.REQUEST_STATUS}}retrySmsRequest(e){let t={request_id:(this.smsFlowService.REQUEST&&this.smsFlowService.REQUEST.request_id?this.smsFlowService.REQUEST.request_id:this.requestID)||e,user_id:this.customizationStoreService.USER_ID};this.smsFlowService.setLoading(this.labels.loadings.resendingRequest),this.smsFlowService.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.smsFlowService.setRequest(e.data),this.smsComponent.setStatus()),this.smsFlowService.setLoading(!1)})).catch((e=>{console.error(e),this.smsComponent.showAlert("Error!",e.message||e),this.smsFlowService.setLoading(!1)}))}}return e.ɵfac=function(t){return new(t||e)(x.Y36(z.T,9),x.Y36(p.QS),x.Y36(C.F),x.Y36(_.M),x.Y36(v.o),x.Y36(k.T),x.Y36(Y.p),x.Y36(B.r))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-abandoned-step"]],inputs:{flowType:"flowType",requestID:"requestID",loading:"loading",labels:"labels",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:11,vars:24,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(x.YNc(0,Be,1,2,"belender-widget-logo",0),x.TgZ(1,"div",1)(2,"div",2),x._UZ(3,"div",3)(4,"div",4),x.ALo(5,"safeHtml"),x.TgZ(6,"div",5),x._uU(7),x.qZA()(),x.TgZ(8,"div",6)(9,"button",7),x.NdJ("click",(function(){return t.retry()})),x._uU(10),x.qZA()()()),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(3),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.Q6J("innerHTML",t.texts.abandoned.title,x.oJD),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(5,18,t.texts.abandoned.description),x.oJD),x.xp6(3),x.hij(" ",t.getTextStatus()," "),x.xp6(1),x.Q6J("ngClass",x.kEZ(20,Je,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),x.xp6(1),x.Oqu(t.labels.actions.retry))},dependencies:[i.mk,i.O5,u.lW,T.X,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Qe=n(6981),We=n(5145);function Ge(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",10),2&e){const e=x.oxw();x.Q6J("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const $e=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Ke=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.nr=new x.vpe(null),this.loading=null}ngOnInit(){}newRequest(){this.nr.emit(!0)}gotoRequest(){location.assign(this.currentRequest.widget_url_boxed)}getStatus(){let e=We.Z.find((e=>e.text==this.currentRequest.status_code));return e?e.label:this.labels.unknownState}}return e.ɵfac=function(t){return new(t||e)(x.Y36(p.QS),x.Y36(C.F),x.Y36(_.M),x.Y36(v.o),x.Y36(k.T))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-duplicated-request-step"]],inputs:{currentRequest:"currentRequest",loading:"loading",data:"data",texts:"texts",labels:"labels"},outputs:{nr:"newRequest"},decls:16,vars:26,consts:[[3,"logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"flex","gap-2","justify-start","items-center","py-2"],[1,"w-fit","p-1","px-2","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"],[3,"logoUrl"]],template:function(e,t){1&e&&(x.YNc(0,Ge,1,1,"belender-widget-logo",0),x.TgZ(1,"div",1)(2,"div",2)(3,"div",3),x._uU(4),x.qZA(),x.TgZ(5,"div",4),x._uU(6),x.qZA(),x.TgZ(7,"div",5),x._uU(8),x.TgZ(9,"div",6),x._uU(10),x.qZA()()(),x.TgZ(11,"div",7)(12,"button",8),x.NdJ("click",(function(){return t.newRequest()})),x._uU(13),x.qZA(),x.TgZ(14,"button",9),x.NdJ("click",(function(){return t.gotoRequest()})),x._uU(15),x.qZA()()()),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(3),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.xp6(1),x.hij(" ",t.labels.warnings.duplicatedRequest," "),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.xp6(1),x.hij(" ",t.labels.warnings.alreadyHaveRequest," "),x.xp6(2),x.hij(" ",t.labels.warnings.currentRequestStatus," "),x.xp6(2),x.hij(" ",t.getStatus()," "),x.xp6(1),x.Q6J("ngClass",x.kEZ(22,$e,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Udp("border-radius",t.data.styles.btnRound+"px"),x.xp6(1),x.hij(" ",t.labels.actions.newRequest," "),x.xp6(1),x.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),x.xp6(1),x.hij(" ",t.labels.actions.gotoCurrentRequest," "))},dependencies:[i.mk,i.O5,u.lW,T.X],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Xe=n(1129),et=n(9476),tt=n(8962),nt=n(3468),it=n(3295);function st(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",5),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.standby.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let rt=(()=>{class e{constructor(){this.loading=null}ngOnInit(){console.error(this.data,this.texts)}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-standby-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},decls:6,vars:11,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(x.YNc(0,st,1,2,"belender-widget-logo",0),x.TgZ(1,"form",1)(2,"div",2),x._UZ(3,"div",3)(4,"div",4),x.ALo(5,"safeHtml"),x.qZA()()),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(3),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.standby?t.texts.standby.titleSize+"px":"20px"),x.Q6J("innerHTML",t.texts.standby?t.texts.standby.title:"Solicitud en Stand By",x.oJD),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.Q6J("innerHTML",t.texts.standby?t.texts.standby.description:x.lcZ(5,9,"Descripcion del estado Stand By"),x.oJD))},dependencies:[i.O5,p._Y,p.JL,p.F,T.X,M.z]}),e})();const ot=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let at=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new x.vpe(null)}ngOnInit(){this.form=this.fb.group({birth_date:[null,[p.kI.required]]})}next(){this.nextStep.emit(this.form.get("birth_date").value)}}return e.ɵfac=function(t){return new(t||e)(x.Y36(p.QS),x.Y36(C.F))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-error-birthday-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:16,vars:23,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1"],["type","text","placeholder","Ej: 22/03/1990","required","","formControlName","birth_date","matInput","","mask","d0/M0/0000"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(x.TgZ(0,"div",0)(1,"div",1)(2,"div",2),x._uU(3),x.qZA(),x.TgZ(4,"div",3),x._uU(5),x.qZA(),x.TgZ(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),x._uU(9),x.qZA(),x._UZ(10,"input",6),x.TgZ(11,"mat-hint"),x._uU(12,"DD/MM/YYYY"),x.qZA()()()(),x.TgZ(13,"div",7)(14,"button",8),x.NdJ("click",(function(){return t.next()})),x._uU(15),x.qZA()()()),2&e&&(x.xp6(2),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.xp6(1),x.hij(" ",t.labels.warnings.wrongBirthday," "),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.xp6(1),x.hij(" ",t.labels.warnings.inputBirthDay," "),x.xp6(1),x.Q6J("formGroup",t.form),x.xp6(3),x.Oqu(t.labels.birthday),x.xp6(4),x.Q6J("ngClass",x.kEZ(19,ot,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),x.Q6J("disabled",t.form.invalid),x.xp6(1),x.hij(" ",t.labels.send," "))},dependencies:[i.mk,u.lW,R.KE,R.bx,R.hX,N.Nt,p._Y,p.Fj,p.JJ,p.JL,p.Q7,p.sg,p.u,de.Z6],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const lt=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let ct=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new x.vpe(null)}ngOnInit(){this.form=this.fb.group({support_number:[null,[p.kI.required]]})}next(){this.nextStep.emit(this.form.get("support_number").value)}}return e.ɵfac=function(t){return new(t||e)(x.Y36(p.QS),x.Y36(C.F))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-error-support-number-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:14,vars:23,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1"],["type","number","placeholder","Ej: 1233443","required","","formControlName","support_number","matInput",""],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(x.TgZ(0,"div",0)(1,"div",1)(2,"div",2),x._uU(3),x.qZA(),x.TgZ(4,"div",3),x._uU(5),x.qZA(),x.TgZ(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),x._uU(9),x.qZA(),x._UZ(10,"input",6),x.qZA()()(),x.TgZ(11,"div",7)(12,"button",8),x.NdJ("click",(function(){return t.next()})),x._uU(13),x.qZA()()()),2&e&&(x.xp6(2),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.xp6(1),x.hij(" ",t.labels.warnings.wrongSupport," "),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.xp6(1),x.hij(" ",t.labels.warnings.inputSupport," "),x.xp6(1),x.Q6J("formGroup",t.form),x.xp6(3),x.Oqu(t.labels.support),x.xp6(2),x.Q6J("ngClass",x.kEZ(19,lt,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),x.Q6J("disabled",t.form.invalid),x.xp6(1),x.hij(" ",t.labels.send," "))},dependencies:[i.mk,u.lW,R.KE,R.hX,N.Nt,p._Y,p.Fj,p.wV,p.JJ,p.JL,p.Q7,p.sg,p.u],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const dt=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let ut=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new x.vpe(null)}ngOnInit(){this.form=this.fb.group({document_expiration_date:[null,[p.kI.required]]})}next(){this.nextStep.emit(this.form.get("document_expiration_date").value)}}return e.ɵfac=function(t){return new(t||e)(x.Y36(p.QS),x.Y36(C.F))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-error-expiration-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:16,vars:23,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1"],["type","date","placeholder","Ej: 22/03/1990","required","","formControlName","document_expiration_date","matInput",""],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-button","","type","button",1,"px-8",3,"disabled","click"]],template:function(e,t){1&e&&(x.TgZ(0,"div",0)(1,"div",1)(2,"div",2),x._uU(3),x.qZA(),x.TgZ(4,"div",3),x._uU(5),x.qZA(),x.TgZ(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),x._uU(9),x.qZA(),x._UZ(10,"input",6),x.TgZ(11,"mat-hint"),x._uU(12,"DD/MM/YYYY"),x.qZA()()()(),x.TgZ(13,"div",7)(14,"button",8),x.NdJ("click",(function(){return t.next()})),x._uU(15),x.qZA()()()),2&e&&(x.xp6(2),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.xp6(1),x.hij(" ",t.labels.warnings.wrongExpiration," "),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.xp6(1),x.hij(" ",t.labels.warnings.inputExpiration," "),x.xp6(1),x.Q6J("formGroup",t.form),x.xp6(3),x.Oqu(t.labels.expiration),x.xp6(4),x.Q6J("ngClass",x.kEZ(19,dt,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),x.Q6J("disabled",t.form.invalid),x.xp6(1),x.Oqu(t.labels.send))},dependencies:[i.mk,u.lW,R.KE,R.bx,R.hX,N.Nt,p._Y,p.Fj,p.JJ,p.JL,p.Q7,p.sg,p.u],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function ht(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",5),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.noPhone.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function pt(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"mat-form-field",12)(1,"mat-label"),x._uU(2),x.qZA(),x._UZ(3,"input",13),x.TgZ(4,"mat-hint")(5,"a",14),x.NdJ("click",(function(t){x.CHM(e);const n=x.oxw(2);return x.KtG(n.gotoExpirationDate(t))})),x.TgZ(6,"u"),x._uU(7),x.qZA()()()()}if(2&e){const e=x.oxw(2);x.xp6(2),x.Oqu(e.labels.expiration),x.xp6(5),x.Oqu(e.labels.findExpiration)}}function mt(e,t){if(1&e&&(x.TgZ(0,"mat-form-field",15)(1,"mat-label"),x._uU(2),x.qZA(),x._UZ(3,"input",16),x.qZA()),2&e){const e=x.oxw(2);x.xp6(2),x.Oqu(e.labels.support)}}function ft(e,t){if(1&e&&(x.TgZ(0,"div",6),x._UZ(1,"div",7)(2,"div",8),x.ALo(3,"safeHtml"),x._UZ(4,"br"),x.TgZ(5,"form",9),x.YNc(6,pt,8,2,"mat-form-field",10),x.YNc(7,mt,4,1,"mat-form-field",11),x.qZA()()),2&e){const e=x.oxw();x.xp6(1),x.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),x.Q6J("innerHTML",null==e.texts.noPhone?null:e.texts.noPhone.title,x.oJD),x.xp6(1),x.Udp("color",e.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(3,11,e.texts.noPhone.description),x.oJD),x.xp6(3),x.Q6J("formGroup",e.form),x.xp6(1),x.Q6J("ngIf",e.isDni),x.xp6(1),x.Q6J("ngIf",e.isNie)}}const gt=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function _t(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",17)(1,"button",18),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.next())})),x._uU(2),x.qZA()()}if(2&e){const e=x.oxw();x.Q6J("ngClass",x.kEZ(9,gt,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),x.xp6(1),x.Udp("color",e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),x.Q6J("disabled",e.form.invalid),x.xp6(1),x.hij(" ",e.labels.actions.next," ")}}function bt(e,t){if(1&e&&(x.TgZ(0,"div",19),x._uU(1),x.qZA()),2&e){const e=x.oxw();x.xp6(1),x.hij(" ",e.labels.loadings.gettingData," ")}}let vt=(()=>{class e{constructor(e,t,n,i,s,r,o){this.smsComponent=e,this.fb=t,this.utils=n,this.cd=i,this.dialog=s,this.smsFlowService=r,this.solicitudesService=o,this.loading=null,this.answered=!1,this.nextStep=new x.vpe(null),this.isNie=!1,this.isDni=!1}ngOnInit(){console.warn(this.smsFlowService.REQUEST),this.loading=!0,this.checkIfDniOrNie(),this.isDni&&(this.form=this.fb.group({document_expiration_date:[null,p.kI.required]})),this.isNie&&(this.form=this.fb.group({document_support:[null,p.kI.required]})),this.loading=!1}checkIfDniOrNie(){this.setRegex(this.smsFlowService.REQUEST.person_document_number)}setRegex(e){e&&(this.isDni=!!e.toUpperCase().match(/^(\d{8})([A-Z])$/),this.isNie=!!e.toUpperCase().match(/^[XYZ]\d{7,8}[A-Z]$/),this.cd.markForCheck())}next(){let e={};this.isDni?e.document_expiration_date=this.utils.formatDate(this.form.get("document_expiration_date").value):this.isNie&&(e.document_support=this.form.get("document_support").value),"SMS"===this.flowName?this.sendSmsDataToPin(e):this.nextStep.emit(e)}gotoSupportAclaration(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(ne.$,{panelClass:"fullscreen-dialog"})}gotoExpirationDate(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(ie.R,{panelClass:"fullscreen-dialog"})}sendSmsDataToPin(e){e.request_id=this.smsFlowService.REQUEST.request_id,this.smsFlowService.setLoading(this.labels.loadings.sendingData),this.solicitudesService.smsToPin(e).then((e=>{e&&e.status&&"success"===e.status&&this.smsComponent.gotoClavePinUrl(e.data),e&&e.status&&"error"===e.status&&(e.message?"Does not have Pin service"==e.message?this.smsComponent.setRequestStatus("no-service"):this.smsComponent.showAlert("Error!",e.message):this.smsComponent.showAlert("Error!",e),this.smsFlowService.setLoading(null))})).catch((e=>{console.error(e),this.smsComponent.showAlert("Error!",e.message||e),this.smsFlowService.setLoading(null)}))}}return e.ɵfac=function(t){return new(t||e)(x.Y36(z.T,9),x.Y36(p.QS),x.Y36(C.F),x.Y36(x.sBO),x.Y36(ae.uw),x.Y36(Y.p),x.Y36(_.M))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-no-phone-step"]],inputs:{flowName:"flowName",data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:5,vars:4,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],["class","py-4 flex flex-col",4,"ngIf"],["class","flex items-center gap-2 p-4",3,"ngClass",4,"ngIf"],["class","w-full flex justify-center p-4 items-center",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"w-full",3,"formGroup"],["appearance","outline","class","w-full flex-1 belender-form-field",4,"ngIf"],["appearance","outline","class","mb-4 w-full md:max-w-[500px]",4,"ngIf"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","text","placeholder","Ej: 22/03/2030","formControlName","document_expiration_date","matInput","","mask","d0/M0/0000"],["target","_blank",1,"text-sm","hover:text-blue-500","cursor-pointer",3,"click"],["appearance","outline",1,"mb-4","w-full","md:max-w-[500px]"],["formControlName","document_support","matInput",""],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"w-full","flex","justify-center","p-4","items-center"]],template:function(e,t){1&e&&(x.YNc(0,ht,1,2,"belender-widget-logo",0),x.TgZ(1,"div",1),x.YNc(2,ft,8,13,"div",2),x.YNc(3,_t,3,13,"div",3),x.YNc(4,bt,2,1,"div",4),x.qZA()),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(2),x.Q6J("ngIf",(t.isDni||t.isNie)&&!t.loading),x.xp6(1),x.Q6J("ngIf",(t.isDni||t.isNie)&&!t.loading),x.xp6(1),x.Q6J("ngIf",!t.isDni&&!t.isNie||t.loading))},dependencies:[i.mk,i.O5,u.lW,R.KE,R.bx,R.hX,N.Nt,p._Y,p.Fj,p.JJ,p.JL,p.sg,p.u,T.X,de.Z6,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var yt=n(3300),wt=n(865),xt=n(3033),Ct=n(7582),kt=n(9933),Tt=n(667);const St=["formStep"];function Mt(e,t){if(1&e&&(x.TgZ(0,"mat-option",8),x._uU(1),x.qZA()),2&e){const e=t.$implicit;x.s9C("value",e),x.xp6(1),x.Oqu(e)}}function It(e,t){if(1&e){const e=x.EpF();x.ynx(0),x.TgZ(1,"mat-form-field",5)(2,"mat-label"),x._uU(3,"Estado"),x.qZA(),x.TgZ(4,"mat-select",6),x.NdJ("selectionChange",(function(t){const n=x.CHM(e).index,i=x.oxw();return x.KtG(i.setItemSelected(t,n))})),x.YNc(5,Mt,2,2,"mat-option",7),x.qZA()(),x.BQk()}if(2&e){const e=t.$implicit,n=t.index,i=x.oxw();x.xp6(1),x.Gre(" w-full ",n===i.triggerObject.index-1?"!border-t-2 border-green-500 ":"",""),x.xp6(3),x.Q6J("value",e),x.xp6(1),x.Q6J("ngForOf",i.items)}}function Et(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"button",9),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.initTrigger())})),x._uU(1,"Empezar"),x.qZA()}}function Ot(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"button",9),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.initTrigger())})),x._uU(1,"Continuar"),x.qZA()}}function Lt(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"button",9),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.initTriggerFromZero())})),x._uU(1,"Volver a empezar"),x.qZA()}}let Pt=class{constructor(e,t){this.cd=e,this.utils=t,this.sendMessage=new x.vpe,this.requestedToPin=!1,this.items=["created","form","terms_and_conditions","waiting_otp_seguridad_social","waiting_login_seguridad_social","invalid_otp_seguridad_social","abandoned_after_bad_phone","abandoned_after_invalid_otp_seguridad_social","abandoned_after_terms_and_conditions","abandoned_after_waiting_otp_seguridad_social","all_documents_downloaded","partial_documents_downloaded","consent_process_completed","partial_documents_downloaded_and_deleted","all_documents_downloaded_and_deleted","failed_with_retry","failed_without_retry","failed_documents_downloaded","no_service","no_sms_service","stand_by","no-phone","no-more-phone","bad_phone","error_expiration_date","error_birth_date","error_support_number","duplicated"],this.triggerObject={index:0,items:["form","waiting_otp_seguridad_social","all_documents_downloaded"]}}ngOnInit(){}setItemSelected(e,t){console.warn(e,t),this.triggerObject.items[t]=e.value,console.warn(this.triggerObject)}initTrigger(){this.emitMessage(this.triggerObject.items[this.triggerObject.index]),this.triggerObject.index++}initTriggerFromZero(){this.triggerObject.index=0,this.initTrigger()}emitMessage(e){let t={status_code:e};console.log(t),this.sendMessage.emit(t)}closeInterval(){this.int&&clearInterval(this.int),this.triggerObject.index=0}addState(){this.triggerObject.items.push("")}};Pt.ɵfac=function(e){return new(e||Pt)(x.Y36(x.sBO),x.Y36(C.F))},Pt.ɵcmp=x.Xpm({type:Pt,selectors:[["belender-tester-sms"]],viewQuery:function(e,t){if(1&e&&x.Gf(St,5),2&e){let e;x.iGM(e=x.CRH())&&(t.theDiv=e.first)}},outputs:{sendMessage:"sendMessage"},decls:9,vars:4,consts:[[1,"wrapper","flex","flex-col","justify-between","bg-slate-100","w-[200px]","h-full","p-2","gap-0"],[1,"flex","flex-col","h-full","dd-wrapper"],[4,"ngFor","ngForOf"],["mat-button","",1,"w-full","rounded-md",3,"click"],["mat-raised-button","","class","w-full rounded-md bg-blue-500 text-blue-50",3,"click",4,"ngIf"],["appearance","outline"],[1,"border",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["mat-raised-button","",1,"w-full","rounded-md","bg-blue-500","text-blue-50",3,"click"]],template:function(e,t){1&e&&(x.TgZ(0,"div",0)(1,"div",1),x.YNc(2,It,6,5,"ng-container",2),x.TgZ(3,"button",3),x.NdJ("click",(function(){return t.addState()})),x._uU(4,"Agregar estado"),x.qZA()(),x.TgZ(5,"div"),x.YNc(6,Et,2,0,"button",4),x.YNc(7,Ot,2,0,"button",4),x.YNc(8,Lt,2,0,"button",4),x.qZA()()),2&e&&(x.xp6(2),x.Q6J("ngForOf",t.triggerObject.items),x.xp6(4),x.Q6J("ngIf",!t.triggerObject.index||0==t.triggerObject.index),x.xp6(1),x.Q6J("ngIf",t.triggerObject.index&&t.triggerObject.index<t.triggerObject.items.length),x.xp6(1),x.Q6J("ngIf",t.triggerObject.index&&t.triggerObject.index>=t.triggerObject.items.length))},dependencies:[i.sg,i.O5,u.lW,R.KE,R.hX,f.gD,te.ey],styles:[".wrapper[_ngcontent-%COMP%]{position:fixed;top:0;right:0;box-shadow:-10px 20px 30px #0000004d;z-index:99!important;max-height:100vh}.dd-wrapper[_ngcontent-%COMP%]{max-height:calc(100vh - 70px)!important;overflow:auto}"],data:{animation:[Tt.$]}}),Pt=(0,Ct.gn)([(0,kt.c)()],Pt);var Dt=n(3364),At=n(1760),Nt=n(6830),qt=n(4302),Yt=n(9112),Rt=n(9382);let Ft=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=x.oAB({type:e}),e.ɵinj=x.cJS({providers:[_.M,v.o,q.w,w.t,k.T,oe.t,{provide:te.Ad,useValue:"es-ES"}],imports:[He,i.ez,s.G,r.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,N.c,p.u5,m.AV,p.UX,f.LD,g.vV,b.a,y.Cq,Ae.FA,te.XK,Ne.T5,qe.Fk,Qe.x,Xe.n,et.F,tt.A,nt.f,it.g,yt.C,wt.q,xt.d]}),e})();x.B6R(z.T,[i.O5,d.Hw,u.lW,y.Ou,Dt.R,At.u,Nt.L,qt.q,Yt.y,Rt.i,A,j,K,De,Fe,ze,Ve,Ke,rt,at,ct,ut,vt,Pt],[M.z])},1724:(e,t,n)=>{n.r(t),n.d(t,{VideoIdModule:()=>kt});var i=n(6895),s=n(6383),r=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),b=n(3798),v=n(9391),y=n(1572),w=n(182),x=n(4144),C=n(7367),k=n(9602),T=n(3238),S=n(5895),M=n(6257),I=n(1948),E=n(4246),O=n(9299),L=n(6e3),P=n(5861),D=n(7582),A=n(9549),N=n(9933),q=n(5762),Y=n(8259),R=n(2340),F=n(1363),U=n(4650),Z=n(5089),H=n(529),j=n(6554);let z=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getSolicitudes(){return this.localFetch.getFetch(R.N.baseUrl+"/requests")}getSolicitudByCode(e){return this.localFetch.freeGetFetch(R.N.baseUrl+"/requests/"+e)}setState(e,t){let n={request_id:e,status:t};return new Promise(((e,t)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/videoid/status",n).then((n=>{n?e(n):t(n)})).catch((e=>{console.error("addSolicitud",e),t(e)}))}))}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/videoid",e).then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/videoid/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendPassword(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/videoid/password",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}getNewIdOfRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/"+e+"/get-new-id",{}).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}checkService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/sms/check-service",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}retryRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/sms/retry",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}resendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/sms/resend-otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}fixData(e,t){return new Promise(((n,i)=>{this.localFetch.putFetchWhitoutToken(`${R.N.baseUrl}/requests/${e}/person`,t).then((e=>{e?n(e):i(e)})).catch((e=>{i(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/videoid/otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendLinkBySms(e,t){return new Promise(((n,i)=>{this.localFetch.postFetch(`${R.N.baseUrl}/requests/${e}/send-link-sms`,t).then((e=>{e?n(e):i(e)})).catch((e=>{i(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(U.LFG(Z.F),U.LFG(H.eN),U.LFG(j.r))},e.ɵprov=U.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var B=n(8460),J=n(5412),V=n(6830),Q=n(833),W=n(4302),G=n(3731);function $(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.hij("¿No has recibido el código? Solicítalo de nuevo en ",e.secsCount," segundos")}}function K(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.AsE("¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? Solicítalo de nuevo en ",e.secsCount," segundos")}}function X(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.hij("¿No has recibido el código en tu teléfono? Solicítalo de nuevo en ",e.secsCount," segundos")}}const ee=function(e,t,n){return{color:e,border:t,background:n}};function te(e,t){if(1&e&&(U.ynx(0),U.TgZ(1,"small",11),U.YNc(2,$,2,1,"span",5),U.YNc(3,K,2,2,"span",5),U.YNc(4,X,2,1,"span",5),U.qZA(),U.BQk()),2&e){const e=U.oxw();U.xp6(1),U.Q6J("ngStyle",U.kEZ(4,ee,e.data.styles.colors.accentColor,"1px solid "+e.data.styles.colors.accentColor,e.data.styles.colors.accentBgColor)),U.xp6(1),U.Q6J("ngIf",!e.lastNumberPhone),U.xp6(1),U.Q6J("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),U.xp6(1),U.Q6J("ngIf",e.lastNumberPhone&&e.data.config.noRetryInBadPhone)}}function ne(e,t){1&e&&(U.TgZ(0,"span"),U._uU(1," ¿No has recibido el código en tu teléfono? "),U.qZA())}function ie(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.hij(" ¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? ")}}function se(e,t){1&e&&(U.TgZ(0,"span"),U._uU(1," ¿No has recibido el código en el teléfono? "),U.qZA())}const re=function(e,t){return{color:e,background:t}};function oe(e,t){if(1&e){const e=U.EpF();U.ynx(0),U.TgZ(1,"small",11),U.YNc(2,ne,2,0,"span",5),U.YNc(3,ie,2,1,"span",5),U.YNc(4,se,2,0,"span",5),U.TgZ(5,"a",12),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.resendOTP())})),U._uU(6,"Reenviar"),U.qZA()(),U.BQk()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("ngStyle",U.kEZ(5,ee,e.data.styles.colors.dangerColor,"1px solid "+e.data.styles.colors.dangerColor,e.data.styles.colors.dangerBgColor)),U.xp6(1),U.Q6J("ngIf",!e.lastNumberPhone),U.xp6(1),U.Q6J("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),U.xp6(1),U.Q6J("ngIf",e.data.config.noRetryInBadPhone),U.xp6(1),U.Q6J("ngStyle",U.WLB(9,re,e.data.styles.colors.dangerTextButtonColor,e.data.styles.colors.dangerColor))}}let ae=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.solucitudesService=n,this.activeRoute=i,this.next=new U.vpe(null),this.errPhone=new U.vpe(null),this.resendO=new U.vpe(null),this.secsCount=60,this.lastNumberPhone="XXX"}ngOnInit(){this.form=this.fb.group({code1:[null,[p.kI.required,p.kI.maxLength(6),p.kI.minLength(6)]]}),this.initSecsInterval(),this.activeRoute.queryParams.subscribe((e=>{e&&e.request_id&&(this.requestID=e.request_id)}),(e=>{console.error(e)})),this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastNumberPhone=t}initSecsInterval(){this.interv=setInterval((()=>{this.secsCount--,this.secsCount<=0&&this.finishSecsInterval()}),1e3)}finishSecsInterval(){this.interv&&clearInterval(this.interv)}nextStep(){let e={code:this.getCode()};this.next.emit(e)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){return(0,P.Z)((function*(){}))()}errorStep(){this.errPhone.emit(!0)}setInputEvent(e){""!=e.target.value?Y(e.target).next().focus():"Backspace"==e.code&&Y(e.target).prev().focus()}resendOTP(){this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(_.M),U.Y36(O.gz))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-otp-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},decls:16,vars:20,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","gap-2","items-center","justify-start","w-full","max-w-[200px]"],["appearance","outline",1,"w-full","flex-1"],["tabindex","1","maxlength","6","minlength","1","formControlName","code1","type","text","matInput","",3,"change","keyup"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"info-time","w-fit",3,"ngStyle"],[1,"ml-4",3,"ngStyle","click"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.TgZ(5,"div",4),U.YNc(6,te,5,8,"ng-container",5),U.YNc(7,oe,7,12,"ng-container",5),U.qZA(),U.TgZ(8,"div",6)(9,"mat-form-field",7)(10,"mat-label"),U._uU(11," Código OTP "),U.qZA(),U.TgZ(12,"input",8),U.NdJ("change",(function(e){return t.capturePasteEvent(e)}))("keyup",(function(e){return t.setInputEvent(e)})),U.qZA()()()(),U.TgZ(13,"div",9)(14,"button",10),U.NdJ("click",(function(){return t.nextStep()})),U._uU(15,"Siguiente"),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.otp.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,18,t.texts.otp.description||""),U.oJD),U.xp6(3),U.Q6J("ngIf",t.secsCount&&t.secsCount>0),U.xp6(1),U.Q6J("ngIf",!t.secsCount||t.secsCount<=0),U.xp6(7),U.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",t.form.invalid))},dependencies:[i.O5,i.PC,u.lW,A.KE,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.nD,p.sg,p.u,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function le(e,t){if(1&e&&(U.TgZ(0,"div",2),U._UZ(1,"div",3)(2,"div",4),U.ALo(3,"safeHtml"),U.qZA()),2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),U.Q6J("innerHTML",e.texts.success.title,U.oJD),U.xp6(1),U.Udp("color",e.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(3,8,e.texts.success.description||""),U.oJD)}}function ce(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",5)(1,"button",6),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.gotoRedirect())})),U._uU(2),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),U.xp6(1),U.hij(" ",e.data[e.flowName].btnTextCallBack||"Haga click aquí para finalizar"," ")}}let de=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.videoS=n,this.route=i}ngOnInit(){this.route.queryParams.subscribe((e=>{e.request_id&&(this.requestID=e.request_id,this.videoS.setState(this.requestID,"success").then((e=>{console.log("Se ha seteado el status success correctamente")})).catch((e=>{console.error("No se ha seteado el status success. Error: ",e)})))}))}save(){}gotoRedirect(){this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].callBackUrl&&location.assign(this.data[this.flowName].callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(z),U.Y36(O.gz))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",packId:"packId",requestID:"requestID",userId:"userId",flowName:"flowName"},decls:2,vars:2,consts:[["class","pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(U.YNc(0,le,4,10,"div",0),U.YNc(1,ce,3,7,"div",1)),2&e&&(U.Q6J("ngIf",!t.data.config.infiniteLoopInCompleted),U.xp6(1),U.Q6J("ngIf",t.data[t.flowName].enableUrlCallBack))},dependencies:[i.O5,u.lW,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function ue(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",5)(1,"button",6),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.retry())})),U._uU(2,"Intentarlo nuevamente"),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function he(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",5)(1,"button",7),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.newRequest())})),U._uU(2,"Crear nueva solicitud"),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}let pe=(()=>{class e{constructor(e,t,n){this.utils=e,this.videoS=t,this.route=n,this.retryOp=new U.vpe(null),this.newReq=new U.vpe(null)}ngOnInit(){this.route.queryParams.subscribe((e=>{e.request_id&&(this.requestID=e.request_id,this.videoS.setState(this.requestID,"failed").then((e=>{console.log("Se ha seteado el status failed correctamente")})).catch((e=>{console.error("No se ha seteado el status failed. Error: ",e)})))}))}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(U.Y36(Z.F),U.Y36(z),U.Y36(O.gz))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(U.TgZ(0,"div",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA(),U.YNc(5,ue,3,6,"div",4),U.YNc(6,he,3,6,"div",4),U.qZA()),2&e&&(U.xp6(2),U.Q6J("innerHTML",t.texts.fail.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,6,t.texts.fail.description),U.oJD),U.xp6(2),U.Q6J("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),U.xp6(1),U.Q6J("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[i.O5,u.lW,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();n(6866);var me=n(1763),fe=n(5696);const ge=["termsCheckbox"],_e=["termsCertCheckbox"],be=["assignmentCheckbox"];function ve(e,t){if(1&e&&(U.TgZ(0,"mat-form-field",5)(1,"mat-label"),U._uU(2,"Razón social"),U.qZA(),U._UZ(3,"input",28),U.qZA()),2&e){const e=U.oxw();U.Gre("",e.disabledInputs.razon?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",e.disabledInputs.razon?-1:1)}}function ye(e,t){if(1&e&&(U.TgZ(0,"mat-form-field",5)(1,"mat-label"),U._uU(2,"CIF"),U.qZA(),U._UZ(3,"input",29),U.qZA()),2&e){const e=U.oxw();U.Gre("",e.disabledInputs.cif?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",e.disabledInputs.cif?-1:1)}}function we(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",30)(1,"belender-checkbox",22),U.NdJ("changeCheckbox",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.setPower(t))})),U._uU(2," Consiento expresamente a la activación de un poder digital según las condiciones que pueden verse "),U.TgZ(3,"a",24),U.NdJ("click",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.gotoPowerConditions(t))})),U.TgZ(4,"u"),U._uU(5,"aquí"),U.qZA()()()()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("color",e.data.styles.colors.title)}}function xe(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",21)(1,"belender-checkbox",22,31),U.NdJ("changeCheckbox",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.setAssignment(t))})),U._UZ(3,"div",32),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("color",e.data.styles.colors.title),U.xp6(2),U.Q6J("innerHTML",null==e.data?null:e.data.config.dataAssignmentText,U.oJD)}}const Ce=function(e){return{"dont-show-data":e}},ke={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Te=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.cd=n,this.requestID=null,this.next=new U.vpe(null),this.goTerms=new U.vpe(null),this.goTermsCert=new U.vpe(null),this.goPower=new U.vpe(null),this.acceptTerms=!1,this.acceptTerms2=!1,this.step=0,this.assignment=!1,this.disabledInputs={dni:!1,name:!1,lastname:!1,secondlastname:!1,phone:!1,email:!1,razon:!1,cif:!1,type:!1},this.requestAux={phone:null,email:null,razon:null,cif:null,name:null,lastname:null,secondLastname:null,dni:null,type:"NATURAL"},this.noValidate=!1,this.powerActivate=!1}ngOnInit(){this.solicitud?(this.noValidate="terms_and_conditions"==this.solicitud.status_code,this.setForm(this.solicitud)):this.setForm(null)}tabChanged(e){this.requestAux.type=e.value,this.setForm(this.requestAux)}setForm(e){this.requestAux.phone=e?e.person_phone||e.phone:null,this.requestAux.email=e?e.person_email||e.email||e.email_copy:null,this.requestAux.razon=e&&e.razon_social?e.razon_social:null,this.requestAux.cif=e&&e.cif?e.cif:null,this.requestAux.name=e?e.person_name||e.name:null,this.requestAux.lastname=e?e.person_first_surname||e.first_surname:null,this.requestAux.secondLastname=e?e.person_second_surname||e.second_surname:null,this.requestAux.dni=e&&e.document_number?e.document_number:e&&e.person_document_number?e.person_document_number:null,this.requestAux.type=e&&e.person_type?e.person_type:this.requestAux.type,this.form=this.fb.group("NATURAL"==this.requestAux.type?{type:[this.requestAux.type],name:[this.requestAux.name||null,this.noValidate?[]:[p.kI.required]],lastname:[this.requestAux.lastname||null,this.noValidate?[]:[p.kI.required]],secondLastname:[this.requestAux.secondLastname||null],email:[this.requestAux.email||null,this.noValidate?[]:[p.kI.required,p.kI.email]],phone:[this.requestAux.phone||"",this.noValidate?[]:[p.kI.required,p.kI.maxLength(9),p.kI.minLength(9)]],dni:[this.requestAux.dni||null,this.noValidate?[]:[p.kI.required]]}:{type:[this.requestAux.type],name:[this.requestAux.name||null,this.noValidate?[]:[p.kI.required]],lastname:[this.requestAux.lastname||null,this.noValidate?[]:[p.kI.required]],secondLastname:[this.requestAux.secondLastname||null],email:[this.requestAux.email||null,this.noValidate?[]:[p.kI.required,p.kI.email]],dni:[this.requestAux.dni||null,this.noValidate?[]:[p.kI.required]],phone:[this.requestAux.phone||"",this.noValidate?[]:[p.kI.required,p.kI.maxLength(9),p.kI.minLength(9)]],razon:[this.requestAux.razon||null,this.noValidate?[]:[p.kI.required]],cif:[this.requestAux.cif||null,this.noValidate?[]:[p.kI.required]]}),this.requestIDFromURL&&this.disableEnableInputs(this.requestAux.type,this.requestAux.name,this.requestAux.lastname,this.requestAux.secondLastname,this.requestAux.email,this.requestAux.phone,this.requestAux.dni,this.requestAux.razon,this.requestAux.cif),this.cd.markForCheck()}disableEnableInputs(e,t,n,i,s,r,o,a,l){this.disabledInputs={name:t||!1,lastname:n||!1,secondlastname:i||!1,email:s||!1,phone:r||!1,dni:o||!1,razon:a||!1,cif:l||!1,type:e||!1}}enableInput(e){this.disabledInputs[e]=!1,this.cd.markForCheck()}nextStep(){let e;e="NATURAL"==this.requestAux.type?{email_copy:this.form.get("email").value,phone:this.form.get("phone").value,name:this.form.get("name").value,first_surname:this.form.get("lastname").value,second_surname:this.form.get("secondLastname").value,document_number:this.form.get("dni").value,type:"Natural"}:{email_copy:this.form.get("email").value,phone:this.form.get("phone").value,name:this.form.get("name").value,first_surname:this.form.get("lastname").value,second_surname:this.form.get("secondLastname").value,document_number:this.form.get("dni").value,company_name:this.form.get("razon").value,cif:this.form.get("cif").value,type:"Legal",rmc_validation:this.userId},(this.data.config.activatePower||this.solicitud?.power_activate)&&(e.power_activate=1,e.terms_and_conditions_power=1),this.next.emit(e)}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.goTerms.emit(!0)}gotoTermsAndConditionsCertificate(e){e.preventDefault(),e.stopPropagation(),this.goTermsCert.emit(!0)}setAssignment(e){this.assignment=e}getAssignmentValidation(){return!this.data.config.dataAssignmentCheck||this.assignment}setTerms2(e){this.acceptTerms2=e}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}setTerms2Check(e){this.certCheckComponent.checked=e,this.acceptTerms2=e}setAssignmentCheck(e){this.assignmentCheckComponent.checked=e,this.assignment=e}setTerms(e){this.acceptTerms=e}getIfValid(){let e=this.form.invalid;return this.noValidate&&(e=!1),!((this.requestID?this.solicitud?.power_activate:this.data?.config.activatePower)&&!this.powerActivate)&&!e&&this.acceptTerms&&this.acceptTerms2&&this.getAssignmentValidation()}setPower(e){this.powerActivate=e}gotoPowerConditions(e){this.goPower.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(U.sBO))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(U.Gf(ge,5),U.Gf(_e,5),U.Gf(be,5)),2&e){let e;U.iGM(e=U.CRH())&&(t.checkComponent=e.first),U.iGM(e=U.CRH())&&(t.certCheckComponent=e.first),U.iGM(e=U.CRH())&&(t.assignmentCheckComponent=e.first)}},inputs:{requestID:"requestID",flowName:"flowName",data:"data",texts:"texts",solicitud:"solicitud",userId:"userId",requestIDFromURL:"requestIDFromURL"},outputs:{next:"nextStep",goTerms:"goToTerms",goTermsCert:"goToTermsCertificate",goPower:"goToPower"},features:[U._Bn([{provide:T.sG,useValue:ke},{provide:U.soG,useValue:"es-ES"}])],decls:57,vars:63,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"my-1","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between",3,"ngClass"],["appearance","outline"],["formControlName","type",3,"tabindex","selectionChange"],["value","NATURAL"],["value","LEGAL"],["formControlName","name","matInput","",3,"tabindex"],["formControlName","lastname","matInput","",3,"tabindex"],["formControlName","secondLastname","matInput","",3,"tabindex"],["formControlName","email","placeholder","Ej: mi_email@dominio.com","type","email","matInput","",3,"tabindex"],["formControlName","phone","placeholder","Ej: 123123123","maxlength","9","type","text","matInput","",3,"tabindex"],["formControlName","dni","maxlength","9","minlength","9","placeholder","Ej: 2222221R","type","text","matInput","",3,"tabindex"],["appearance","outline",3,"class",4,"ngIf"],[1,"mt-8","flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],["class","flex justify-between items-center w-full flex-100",4,"ngIf"],[1,"flex","justify-start","items-center","w-full","flex-100"],[3,"color","changeCheckbox"],["termsCertCheckbox",""],["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],["class","flex justify-start items-center w-full flex-100",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],["formControlName","razon","placeholder","Ej: Mi Empresa","type","text","matInput","",3,"tabindex"],["formControlName","cif","placeholder","Ej: 123123123","type","text","matInput","",3,"tabindex"],[1,"flex","justify-between","items-center","w-full","flex-100"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA(),U.TgZ(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),U._uU(8,"Tipo de persona"),U.qZA(),U.TgZ(9,"mat-select",6),U.NdJ("selectionChange",(function(e){return t.tabChanged(e)})),U.TgZ(10,"mat-option",7),U._uU(11,"Natural"),U.qZA(),U.TgZ(12,"mat-option",8),U._uU(13,"Legal"),U.qZA()()(),U.TgZ(14,"mat-form-field",5)(15,"mat-label"),U._uU(16,"Nombre"),U.qZA(),U._UZ(17,"input",9),U.qZA(),U.TgZ(18,"mat-form-field",5)(19,"mat-label"),U._uU(20,"Primer apellido"),U.qZA(),U._UZ(21,"input",10),U.qZA(),U.TgZ(22,"mat-form-field",5)(23,"mat-label"),U._uU(24,"Segundo apellido"),U.qZA(),U._UZ(25,"input",11),U.qZA(),U.TgZ(26,"mat-form-field",5)(27,"mat-label"),U._uU(28,"Email"),U.qZA(),U._UZ(29,"input",12),U.qZA(),U.TgZ(30,"mat-form-field",5)(31,"mat-label"),U._uU(32,"Teléfono"),U.qZA(),U._UZ(33,"input",13),U.qZA(),U.TgZ(34,"mat-form-field",5)(35,"mat-label"),U._uU(36,"DNI"),U.qZA(),U._UZ(37,"input",14),U.qZA(),U.YNc(38,ve,4,4,"mat-form-field",15),U.YNc(39,ye,4,4,"mat-form-field",15),U.qZA(),U.TgZ(40,"div",16)(41,"belender-checkbox",17,18),U.NdJ("changeCheckbox",(function(e){return t.setTerms2(e)})),U.TgZ(43,"belender-terms-and-policy-links",19),U.NdJ("goToTerms",(function(e){return t.gotoTermsAndConditions(e)})),U.qZA()()(),U.YNc(44,we,6,1,"div",20),U.TgZ(45,"div",21)(46,"belender-checkbox",22,23),U.NdJ("changeCheckbox",(function(e){return t.setTerms(e)})),U._uU(48," He leído y acepto los "),U.TgZ(49,"a",24),U.NdJ("click",(function(e){return t.gotoTermsAndConditionsCertificate(e)})),U.TgZ(50,"u"),U._uU(51,"términos y condiciones"),U.qZA()(),U._uU(52," para la emisión del certificado "),U.qZA()(),U.YNc(53,xe,4,2,"div",25),U.TgZ(54,"div",26)(55,"button",27),U.NdJ("click",(function(){return t.nextStep()})),U._uU(56," Continuar "),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.form.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,59,t.texts.form.description||""),U.oJD),U.xp6(2),U.Q6J("ngClass",U.VKq(61,Ce,t.data.config.dontShowDataInTerms&&t.solicitud&&t.solicitud.status_code&&"terms_and_conditions"===t.solicitud.status_code)),U.xp6(1),U.Gre("",t.disabledInputs.type?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.type?-1:1),U.xp6(5),U.Gre("",t.disabledInputs.name?"disabled-input":""," w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.name?-1:1),U.xp6(1),U.Gre("",t.disabledInputs.lastname?"disabled-input":""," w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.lastname?-1:1),U.xp6(1),U.Gre("",t.disabledInputs.secondlastname?"disabled-input":""," w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.secondlastname?-1:1),U.xp6(1),U.Gre("",t.disabledInputs.email?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.email?-1:1),U.xp6(1),U.Gre("",t.disabledInputs.phone?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.phone?-1:1),U.xp6(1),U.Gre("",t.disabledInputs.dni?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.dni?-1:1),U.xp6(1),U.Q6J("ngIf","LEGAL"==t.requestAux.type),U.xp6(1),U.Q6J("ngIf","LEGAL"==t.requestAux.type),U.xp6(2),U.Q6J("color",t.data.styles.colors.title),U.xp6(2),U.Q6J("userId",t.userId)("showPolicyLink",null==t.data?null:t.data.config.showPolicyLink)("firstSentence",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.firstSentence)("secondSentence",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.secondSentence)("thirdSentence",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.thirdSentence)("policyActionText",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.policyActionText)("termsActionText",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.termsActionText)("customTerms",t.data[t.flowName].customTerms),U.xp6(1),U.Q6J("ngIf",t.requestID?null==t.solicitud?null:t.solicitud.power_activate:null==t.data?null:t.data.config.activatePower),U.xp6(2),U.Q6J("color",t.data.styles.colors.title),U.xp6(7),U.Q6J("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),U.xp6(2),U.Udp("color",t.getIfValid()?t.data.styles.colors.btnText:"")("background",t.getIfValid()?t.data.styles.colors.btnBg:"")("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",!t.getIfValid()))},dependencies:[i.mk,i.O5,u.lW,A.KE,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.nD,p.sg,p.u,f.gD,T.ey,me.b,fe.T,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}"]}),e})(),Se=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.Activatedroute=n,this.next=new U.vpe(null),this.accept=!1}ngOnInit(){this.Activatedroute.queryParams.subscribe((e=>{this.setForm(e)}))}nextStep(){let e={phone:this.form.get("phone").value};this.next.emit(e)}setForm(e){this.form=this.fb.group({phone:["",p.kI.required]}),this.solicitud&&"bad_phone"==this.solicitud.status_code&&this.form.controls.phone.markAsTouched()}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(O.gz))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-error-form-step"]],inputs:{data:"data",flowName:"flowName",texts:"texts",mode:"mode",solicitud:"solicitud"},outputs:{next:"nextStep"},decls:14,vars:14,consts:[[1,"animated","fadeIn","fixed-content",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","phone","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1)(2,"div",2),U._uU(3," Error con el teléfono "),U.qZA(),U.TgZ(4,"div",3),U._uU(5," El teléfono ingresado no coincide con registrado en la Seguridad Social, por favor ingrese otro "),U.qZA()(),U.TgZ(6,"div",4)(7,"mat-form-field",5)(8,"mat-label"),U._uU(9,"Teléfono"),U.qZA(),U._UZ(10,"input",6),U.qZA()(),U.TgZ(11,"div",7)(12,"button",8),U.NdJ("click",(function(){return t.nextStep()})),U._uU(13," Continuar "),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.xp6(2),U.Udp("color",t.data.styles.colors.text),U.xp6(8),U.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",t.form.invalid))},dependencies:[u.lW,A.KE,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.sg,p.u],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Me=n(5145);let Ie=(()=>{class e{constructor(e){this.utils=e,this.status="",this.label="Cargando datos.."}ngOnInit(){this.data.config&&this.data.config.infiniteLoopInCompleted?this.label="":Me.Z.forEach((e=>{e.text==this.status&&(this.label=e.label)}))}}return e.ɵfac=function(t){return new(t||e)(U.Y36(Z.F))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-loading-step"]],inputs:{status:"status",data:"data"},decls:5,vars:1,consts:[[1,"fixed-content","h-full"],[1,"h-full","py-10","flex","flex-col","items-center"]],template:function(e,t){1&e&&(U.TgZ(0,"div",0)(1,"div",1),U._UZ(2,"mat-progress-spinner"),U.TgZ(3,"p"),U._uU(4),U.qZA()()()),2&e&&(U.xp6(4),U.Oqu(t.label))},dependencies:[y.Ou],styles:[".content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Ee=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.retryOp=new U.vpe(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return"Abandonado después de esperar OTP de Seguridad Social";case"abandoned_after_invalid_otp_seguridad_social":return"Abandonado despues de OTP inválido en Seguridad Social";case"abandoned_after_invalid_otp_aeat":return"Abandonado despues de OTP inválido en AEAT";case"abandoned_after_waiting_otp_aeat":return"Abandonado después de esperar OTP de AEAT";default:return this.solicitud.status_message||this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(_.M),U.Y36(v.o),U.Y36(S.T))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:10,vars:17,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(U.TgZ(0,"div",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.TgZ(5,"div",4),U._uU(6),U.qZA()(),U.TgZ(7,"div",5)(8,"button",6),U.NdJ("click",(function(){return t.retry()})),U._uU(9,"Intentarlo nuevamente"),U.qZA()()()),2&e&&(U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.abandoned.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,15,t.texts.abandoned.description),U.oJD),U.xp6(3),U.hij(" ",t.getTextStatus()," "),U.xp6(2),U.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Oe(e,t){return n=>{const i=n.controls[t];i.errors&&!i.errors.confirmedValidator||i.setErrors(n.controls[e].value!==i.value?{confirmedValidator:!0}:null)}}function Le(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," La contraseña es requerida "),U.qZA())}function Pe(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," La contraseña debe tener al menos 8 carácteres "),U.qZA())}function De(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," Es necesario repetir la contraseña "),U.qZA())}function Ae(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," Las contraseñas deben coincidir "),U.qZA())}function Ne(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," La contraseña debe tener al menos 8 carácteres "),U.qZA())}const qe={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Ye=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.form=new p.cw({}),this.next=new U.vpe(null)}ngOnInit(){this.setForm()}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({password:["",[p.kI.required]],confirm_password:["",[p.kI.required]]},{validator:Oe("password","confirm_password")})}nextStep(){let e={password:this.form.get("password").value};this.next.emit(e)}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.qu),U.Y36(Z.F))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-password-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep"},features:[U._Bn([{provide:T.sG,useValue:qe},{provide:U.soG,useValue:"es-ES"}])],decls:22,vars:23,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","password","minlength","8","type","password","matInput",""],["class","text-red-500",4,"ngIf"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","confirm_password","minlength","8","type","password","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-red-500"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA(),U.TgZ(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),U._uU(8,"Contraseña"),U.qZA(),U._UZ(9,"input",6),U.YNc(10,Le,2,0,"mat-hint",7),U.YNc(11,Pe,2,0,"mat-hint",7),U.qZA(),U.TgZ(12,"mat-form-field",8)(13,"mat-label"),U._uU(14,"Repite Contraseña"),U.qZA(),U._UZ(15,"input",9),U.YNc(16,De,2,0,"mat-hint",7),U.YNc(17,Ae,2,0,"mat-hint",7),U.YNc(18,Ne,2,0,"mat-hint",7),U.qZA()(),U.TgZ(19,"div",10)(20,"button",11),U.NdJ("click",(function(){return t.nextStep()})),U._uU(21," Guardar "),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.password.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,21,t.texts.password.description),U.oJD),U.xp6(7),U.Q6J("ngIf",t.f.password.touched&&t.f.password.invalid&&t.f.password.errors.required),U.xp6(1),U.Q6J("ngIf",t.f.password.invalid&&t.f.password.errors.minlength),U.xp6(5),U.Q6J("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.required),U.xp6(1),U.Q6J("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.confirmedValidator),U.xp6(1),U.Q6J("ngIf",t.f.confirm_password.invalid&&t.f.confirm_password.errors.minlength),U.xp6(2),U.Udp("color",t.form.invalid?"":t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",t.form.invalid))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.sg,p.u,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const Re=["formStep"];function Fe(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"vex-power-cert",3),U.NdJ("accept",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.acceptPowerCert())})),U.qZA()}if(2&e){const e=U.oxw();U.Q6J("hideButtons",!1)("flow","VideoID")("userId",e.userId)}}function Ue(e,t){if(1&e&&(U.TgZ(0,"div",10),U._UZ(1,"img",11),U.qZA()),2&e){const e=U.oxw(3);U.xp6(1),U.Q6J("src",e.data.styles.logoUrl,U.LSH)}}function Ze(e,t){1&e&&(U.TgZ(0,"div",12),U._UZ(1,"mat-progress-spinner",13),U.qZA()),2&e&&(U.xp6(1),U.Q6J("value",0))}function He(e,t){if(1&e&&U._UZ(0,"belender-loading-step",23),2&e){const e=U.oxw(4);U.Q6J("data",e.data)("status",null==e.solicitud?null:e.solicitud.status_code)}}function je(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-form-step",24,25),U.NdJ("goToTerms",(function(){U.CHM(e);const t=U.oxw(4);return U.KtG(t.gotoTermsAndConditions())}))("goToPower",(function(){U.CHM(e);const t=U.oxw(4);return U.KtG(t.gotoPowerConditions())}))("goToTermsCertificate",(function(){U.CHM(e);const t=U.oxw(4);return U.KtG(t.gotoTermsAndConditionsCertificate())}))("nextStep",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.gotoOTP(t))})),U.qZA()}if(2&e){const e=U.oxw(4);U.Q6J("data",e.data)("flowName",e.flowName)("requestID",e.requestID)("requestIDFromURL",e.requestIDFromURL)("userId",e.userId)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function ze(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-otp-step",26),U.NdJ("resendOTP",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.resendOTP(t))}))("errorPhone",(function(){U.CHM(e);const t=U.oxw(4);return U.KtG(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.requestOTP(t))})),U.qZA()}if(2&e){const e=U.oxw(4);U.Q6J("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Be(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-password-step",27),U.NdJ("nextStep",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.sendPassword(t))})),U.qZA()}if(2&e){const e=U.oxw(4);U.Q6J("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Je(e,t){if(1&e&&U._UZ(0,"belender-success-step",28),2&e){const e=U.oxw(4);U.Q6J("data",e.data)("flowName",e.flowName)("packId",e.packId)("userId",e.userId)("requestID",e.requestID)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Ve(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-fail-step",29),U.NdJ("retry",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.retryRequest(t))}))("newRequest",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.newRequest(t))})),U.qZA()}if(2&e){const e=U.oxw(4);U.Q6J("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Qe(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-error-form-step",30),U.NdJ("nextStep",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.sendNewData(t))})),U.qZA()}if(2&e){const e=U.oxw(4);U.Q6J("solicitud",e.solicitud)("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function We(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-abandoned-step",31),U.NdJ("retry",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.retryRequest(t))})),U.qZA()}if(2&e){const e=U.oxw(4);U.Q6J("solicitud",e.solicitud)("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Ge(e,t){if(1&e&&(U.TgZ(0,"div",32)(1,"div",33)(2,"h1",34),U._uU(3,"No existe la solicitud"),U.qZA()(),U.TgZ(4,"div",35),U._uU(5," No existen solicitudes activas con el código requerido "),U.qZA()()),2&e){const e=U.oxw(4);U.xp6(4),U.Udp("color",e.data.styles.colors.text)}}function $e(e,t){if(1&e&&(U.ynx(0),U.YNc(1,He,1,2,"belender-loading-step",14),U.YNc(2,je,2,7,"belender-form-step",15),U.YNc(3,ze,1,3,"belender-otp-step",16),U.YNc(4,Be,1,3,"belender-password-step",17),U.YNc(5,Je,1,6,"belender-success-step",18),U.YNc(6,Ve,1,3,"belender-fail-step",19),U.YNc(7,Qe,1,3,"belender-error-form-step",20),U.YNc(8,We,1,3,"belender-abandoned-step",21),U.YNc(9,Ge,6,2,"div",22),U.BQk()),2&e){const e=U.oxw(3);U.xp6(1),U.Q6J("ngIf","loading"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","form"==e.getStatus()&&!e.loading),U.xp6(1),U.Q6J("ngIf","otp"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","password"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","success"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","failed"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","error-data"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","abandoned"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","no-exist"==e.getStatus())}}function Ke(e,t){1&e&&U._UZ(0,"belender-disabled-url")}function Xe(e,t){if(1&e&&(U.TgZ(0,"div",36),U._UZ(1,"mat-progress-spinner",37),U.TgZ(2,"p",38),U._uU(3),U.qZA()()),2&e){const e=U.oxw(3);U.xp6(1),U.Q6J("value",e.spinnerValue)("mode",e.spinnerMode),U.xp6(2),U.hij(" ",e.loading," ")}}function et(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",39)(1,"div",32)(2,"div",40),U._uU(3,"Error!"),U.qZA(),U._UZ(4,"div",41),U.qZA(),U.TgZ(5,"div",42)(6,"button",43),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw(3);return U.KtG(t.error=!1)})),U._uU(7," Ingresar manualmente "),U.qZA()()()}if(2&e){const e=U.oxw(3);U.xp6(4),U.Udp("color",e.data.styles.colors.text),U.Q6J("innerHTML",e.error,U.oJD)}}function tt(e,t){if(1&e&&(U.TgZ(0,"div",4)(1,"div"),U.YNc(2,Ue,2,1,"div",6),U.YNc(3,Ze,2,1,"div",7),U.YNc(4,$e,10,9,"ng-container",5),U.YNc(5,Ke,1,0,"belender-disabled-url",5),U.YNc(6,Xe,4,3,"div",8),U.YNc(7,et,8,3,"div",9),U.qZA()()),2&e){const e=U.oxw(2);U.xp6(1),U.Gre("h-full w-full flex-auto p-0 md:p-3 ",e.data.styles.typography,""),U.Udp("background",e.data.styles.colors.background),U.xp6(1),U.Q6J("ngIf",e.data.styles.withLogo&&"loading"!=e.getStatus()),U.xp6(1),U.Q6J("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"==e.getStatus()),U.xp6(1),U.Q6J("ngIf",!e.error&&!e.disableURL),U.xp6(1),U.Q6J("ngIf",!e.error&&e.disableURL),U.xp6(1),U.Q6J("ngIf",e.loading&&!e.error),U.xp6(1),U.Q6J("ngIf",!e.loading&&e.error)}}function nt(e,t){if(1&e&&(U.ynx(0),U.TgZ(1,"div",44),U._uU(2),U.qZA(),U.BQk()),2&e){const e=U.oxw(2);U.xp6(2),U.hij(" TestMode ",e.testMode?"ON":"OFF"," ")}}function it(e,t){if(1&e&&(U.TgZ(0,"div",4),U.YNc(1,tt,8,11,"div",1),U.YNc(2,nt,3,1,"ng-container",5),U.qZA()),2&e){const e=U.oxw();U.xp6(1),U.Q6J("ngIf",e.data),U.xp6(1),U.Q6J("ngIf",e.testMode)}}function st(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"vex-terms",45),U.NdJ("accepted",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.handleTermsResponse(!0))}))("cancelled",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.handleTermsResponse(!1))})),U.qZA()}if(2&e){const e=U.oxw();U.Q6J("flow","videoid")("requestStatus",e.solicitud?e.solicitud.status_code:"")}}let rt=class{constructor(e,t,n,i,s,r,o,a,l){this.cd=e,this.Activatedroute=t,this.utils=n,this.videoIDService=i,this.customizationService=s,this.customizationStoreService=r,this.notis=o,this.webhooksService=a,this.dialog=l,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.requestIDFromURL=!1,this.requestCreated=!1,this.viewPowerTerms=!1,this.disableURL=!1,this.flowName="VideoID",this.showTermsDialog=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.userId?this.setInitialData(this.userId):this.loading=null,"pro"!=R.N.env&&(Y(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),Y(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)}))),this.utils.setLoading(!1)}ngOnDestroy(){}sendMessageToParent(e){window.top.postMessage(e,"*")}setInitialData(e){var t=this;return(0,P.Z)((function*(){const n=yield t.getFlow(e);if(t.data={config:t.customizationStoreService.FUNDER_CONFIG,styles:t.customizationStoreService.FUNDER_STYLES,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.notis.showAlert("Error!","No se ha configurado la customización del widget para este usuario","error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,P.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}validateRequestIdInUrl(){this.Activatedroute.queryParams.subscribe((e=>{e&&this.setParamsToRequest(e),e&&e.acceptTerms&&(this.autoAcceptTerms=!0),e&&e.request_id?(this.disableURL=!1,this.requestID=e.request_id,this.setFormFromVcCode(e.request_id)):this.loading=null}),(e=>{this.loading=null}))}setFormFromVcCode(e){var t=this;return(0,P.Z)((function*(){t.loading="Obteniendo datos de la solicitud...",t.videoIDService.getSolicitudByCode(e).then((e=>{e&&e.data?(t.solicitud=e.data,t.requestCreated=!0,t.requestIDFromURL=!0,t.setSubscriptionOfRequest(),t.loading=null,t.solicitud.status_code&&"waiting_video"===t.solicitud.status_code&&t.solicitud.url_video_id&&location.assign(t.solicitud.url_video_id),t.skipCreationOfRequest=t.solicitud&&t.solicitud.status_code&&"prerequest"!=t.solicitud.status_code,t.autoAcceptTerms&&t.gotoOTP()):t.loading=null})).catch((e=>{t.loading=null}))}))()}setParamsToRequest(e){this.requestIDFromURL=!0,this.solicitud||(this.solicitud={status_code:"form"}),e.document&&!this.solicitud.person_document_number&&(this.solicitud.document_number=e.document),e.birthday&&!this.solicitud.birth_date&&(this.solicitud.birth_date=e.birthday),e.expiration&&!this.solicitud.document_expiration_date&&(this.solicitud.document_expiration_date=e.expiration),e.type&&!this.solicitud.person_type&&(this.solicitud.person_type=e.type),e.phone&&!this.solicitud.person_phone&&(this.solicitud.person_phone=e.phone),e.email&&!this.solicitud.person_email&&(this.solicitud.person_email=e.email),e.cif&&!this.solicitud.cif&&(this.solicitud.cif=e.cif),e.razon&&!this.solicitud.razon_social&&(this.solicitud.razon_social=e.razon),e.name&&!this.solicitud.person_name&&(this.solicitud.person_name=e.name),e.lastname&&!this.solicitud.person_first_surname&&(this.solicitud.person_first_surname=e.lastname),e.second_lastname&&!this.solicitud.person_second_surname&&(this.solicitud.person_second_surname=e.second_lastname)}handlePusherNotification(e){this.dataFromFirebase=e,this.sendMessageToParent({type:"websocket",data:e}),this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.videoIDService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}gotoTerms(e){this.loading="Enviando datos..",e.package_id=this.packId,e.user_id=this.userId,this.requestID&&(e.request_id=this.requestID),this.testMode?setTimeout((()=>{this.solicitud=new q.l,this.solicitud.status_code="waiting_otp_seguridad_social",this.loading=null}),4e3):this.skipCreationOfRequest?(this.gotoOTP(),this.setSubscriptionOfRequest()):this.videoIDService.addSolicitud(e).then((t=>{t&&t.status&&"error"==t.status?(this.solicitud=e,t.message&&(400==t.code?"Birthdate incorrect"==t.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha de nacimiento incorrecta")):"Incorrect date"==t.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha incorrecta")):(this.solicitud.status_code="no_service",this.loading=null):(this.solicitud.status_code="form",this.showAlert("Error!",t.message)))):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,this.sendMessageToParent({type:"response",data:t.data||t}),this.gotoOTP()):this.showAlert("Error!","Error desconocido: "+t)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==R.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==R.N.env&&(e="wss://notifications.belender.net"),R.N.notificationsBaseUrl&&(e=R.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=null})))}sendNewData(e){this.loading="Enviando información..",this.videoIDService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e),this.loading=null):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.initWaitingForResponse("Validando nuevos datos, espere por favor.."),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}showAlert(e,t){this.loading=null,this.notis.showAlert(e,t)}gotoOTP(e){let t=e;t.user_id=this.userId,t.package_id=this.packId,this.requestCreated?this.setTerms(e):(this.initWaitingForResponse("Iniciando el proceso de emisión de certificado.."),this.videoIDService.addSolicitud(t).then((n=>{n.status&&"error"==n.status?(console.error("error en el then",n),this.solicitud=t,this.solicitud.status_code="form",n.message?(this.showAlert("Error!",n.message),n.message&&" Teléfono incorrecto"===n.message&&setTimeout((()=>{this.formComponent.enableInput("phone")}),1e3)):this.showAlert("Error!",n)):n&&"success"==n.status&&(this.sendMessageToParent({type:"response",data:n.data||n}),this.solicitud=n.data,this.requestID=n.data.request_id,this.setSubscriptionOfRequest(),this.cd.markForCheck(),this.setTerms(e))})).catch((e=>{console.error("errooooooorrrrr",e),e&&e.error&&this.showAlert("Error!",e.error),this.loading=null})))}setTerms(e){this.loading="Enviando datos..";let t={request_id:this.solicitud.request_id,terms_and_conditions_service:!0,terms_and_conditions_certificate_emition:!0};(this.data.config.activatePower||this.solicitud?.power_activate)&&(t.power_activate=!0,t.terms_and_conditions_power=e.terms_and_conditions_power),this.testMode?setTimeout((()=>{this.solicitud=new q.l,this.solicitud.status_code="waiting_otp_seguridad_social",this.loading=null}),4e3):this.videoIDService.acceptTerms(t).then((e=>{e&&e.status&&"error"==e.status?(this.solicitud=t,e.message&&(400==e.code?"Birthdate incorrect"==e.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha de nacimiento incorrecta")):"Incorrect date"==e.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha incorrecta!")):(this.solicitud.status_code="no_service",this.loading=null):(this.solicitud.status_code="form",this.showAlert("Error!",e.message)))):e&&e.status&&"success"==e.status?(this.solicitud.status_code="waiting_password",this.sendMessageToParent({type:"response",data:e.data||e}),this.loading=null):this.showAlert("Error!","Error desconocido: "+e)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}sendPassword(e){this.loading="Enviando password..",console.error("password: ",e),e.request_id=this.requestID,this.videoIDService.sendPassword(e).then((e=>{e&&e.status&&"error"==e.status?e.message&&(400==e.code?(this.solicitud.status_code="no_service",this.loading=null):(this.solicitud.status_code="waiting_password",this.showAlert("Error!",e.message))):e&&e.status&&"success"==e.status?(this.solicitud.status_code="waiting_otp",this.sendMessageToParent({type:"response",data:e.data||e})):this.showAlert("Error!","Error desconocido: "+e)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}requestOTP(e){this.loading="Enviando OTP..",this.testMode?setTimeout((()=>{this.solicitud=new q.l,this.solicitud.status_code="all_documents_downloaded",this.loading=null}),2e3):this.videoIDService.sendOTP({request_id:this.requestID,otp:e.code}).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?"invalid_otp"==e.message?"El código introducido no es correcto. Por favor, inténtelo de nuevo":e.message:e),this.loading=!1):e&&"success"==e.status&&(this.loading="Redirigiendo a Vintegris, aguarde por favor...",this.solicitud.status_code="loading",this.sendMessageToParent({type:"response",data:e.data||e}),this.cd.markForCheck(),location.assign(e.message))})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.videoIDService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}gotoErrorPhone(){}setRequestStatus(e){this.solicitud.status_code=e}retryRequest(e){let t={request_id:e,user_id:this.userId};this.loading="Reintentando enviar la solicitud...",this.setSubscriptionOfRequest(),this.videoIDService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}newRequest(e){this.solicitud.status_code="created"}getStatus(){return!this.solicitud||this.solicitud&&("created"==this.solicitud.status_code||"terms_and_conditions"==this.solicitud.status_code||"form"==this.solicitud.status_code)?"form":!this.solicitud||"waiting_login_seguridad_social"!=this.solicitud.status_code&&"loading"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_otp"!=this.solicitud.status_code&&"invalid_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_password"!=this.solicitud.status_code&&"approved_terms_digital_power"!=this.solicitud.status_code&&"declined_terms_digital_power"!=this.solicitud.status_code?!this.solicitud||"abandoned_after_bad_phone"!=this.solicitud.status_code&&"abandoned_after_invalid_otp_seguridad_social"!=this.solicitud.status_code&&"abandoned_after_terms_and_conditions"!=this.solicitud.status_code&&"abandoned_after_waiting_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"certificate_created"!=this.solicitud.status_code&&"waiting_certificate"!=this.solicitud.status_code&&"all_documents_downloaded"!=this.solicitud.status_code&&"partial_documents_downloaded"!=this.solicitud.status_code&&"waiting_video"!=this.solicitud.status_code&&"consent_process_completed"!=this.solicitud.status_code&&"waiting_documents"!=this.solicitud.status_code?!this.solicitud||"bad_phone"!=this.solicitud.status_code&&"phone_not_exist_otp"!=this.solicitud.status_code?!this.solicitud||"failed_with_retry"!=this.solicitud.status_code&&"failed_without_retry"!=this.solicitud.status_code&&"rejected_identity"!=this.solicitud.status_code&&"failed_documents_downloaded"!=this.solicitud.status_code?this.solicitud&&"no_service"==this.solicitud.status_code?"no-service":"no-exist":"failed":this.data.config.noRetryInBadPhone?"otp":"error-data":this.data.infiniteLoopInCompleted||"waiting_video"==this.solicitud.status_code?(this.loading="Aguardando validación por Video ID","loading"):"success":"abandoned":"password":"otp":(this.loading="Estamos procesando su solicitud. Espere un momento por favor","loading")}sendRetry(){}gotoTermsAndConditions(){this.showTermsDialog=!0}handleTermsResponse(e){this.showTermsDialog=!1,e&&this.formComponent.setTermsCheck(!0)}gotoTermsAndConditionsCertificate(){this.dialog.open(F.v,{panelClass:"fullscreen-dialog",data:{flow:"videoid"}}).afterClosed().subscribe((e=>{e&&this.formComponent.setTerms2Check(!0)}))}gotoPowerConditions(){this.viewPowerTerms=!0}acceptPowerCert(){this.viewPowerTerms=!1}};function ot(e,t){if(1&e&&(U.TgZ(0,"div",6),U._UZ(1,"img",7),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("src",e.data.styles.logoUrl,U.LSH)}}function at(e,t){if(1&e&&(U.TgZ(0,"div",8),U._UZ(1,"mat-progress-spinner",9),U.TgZ(2,"p",10),U._uU(3),U.qZA()()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("value",e.spinnerValue)("mode",e.spinnerMode),U.xp6(2),U.Oqu(e.loading)}}function lt(e,t){if(1&e&&(U.TgZ(0,"div",1)(1,"div",2),U.YNc(2,ot,2,1,"div",3),U._UZ(3,"belender-success-step",4),U.YNc(4,at,4,3,"div",5),U.qZA()()),2&e){const e=U.oxw();U.xp6(1),U.Udp("background",e.data.styles.colors.background),U.xp6(1),U.Q6J("ngIf",e.data.styles.withLogo),U.xp6(1),U.Q6J("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts),U.xp6(1),U.Q6J("ngIf",e.loading&&!e.error)}}rt.ɵfac=function(e){return new(e||rt)(U.Y36(U.sBO),U.Y36(O.gz),U.Y36(Z.F),U.Y36(z),U.Y36(C.w),U.Y36(B.r),U.Y36(S.T),U.Y36(w.t),U.Y36(J.uw))},rt.ɵcmp=U.Xpm({type:rt,selectors:[["belender-widget-videoid"]],viewQuery:function(e,t){if(1&e&&U.Gf(Re,5),2&e){let e;U.iGM(e=U.CRH())&&(t.formComponent=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[U._Bn([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:3,vars:3,consts:[[3,"hideButtons","flow","userId","accept",4,"ngIf"],["class","h-full widget-belender",4,"ngIf"],[3,"flow","requestStatus","accepted","cancelled",4,"ngIf"],[3,"hideButtons","flow","userId","accept"],[1,"h-full","widget-belender"],[4,"ngIf"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],["class","loading-wrapper animated fadeIn",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[3,"data","status",4,"ngIf"],[3,"data","flowName","requestID","requestIDFromURL","userId","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep",4,"ngIf"],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","texts","solicitud","nextStep",4,"ngIf"],[3,"data","flowName","packId","userId","requestID","texts",4,"ngIf"],[3,"data","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"solicitud","data","texts","nextStep",4,"ngIf"],[3,"solicitud","data","texts","retry",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"data","status"],[3,"data","flowName","requestID","requestIDFromURL","userId","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep"],["formStep",""],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep"],[3,"data","texts","solicitud","nextStep"],[3,"data","flowName","packId","userId","requestID","texts"],[3,"data","texts","solicitud","retry","newRequest"],[3,"solicitud","data","texts","nextStep"],[3,"solicitud","data","texts","retry"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"],[3,"flow","requestStatus","accepted","cancelled"]],template:function(e,t){1&e&&(U.YNc(0,Fe,1,3,"vex-power-cert",0),U.YNc(1,it,3,2,"div",1),U.YNc(2,st,1,2,"vex-terms",2)),2&e&&(U.Q6J("ngIf",t.viewPowerTerms),U.xp6(1),U.Q6J("ngIf",t.data),U.xp6(1),U.Q6J("ngIf",t.showTermsDialog))},dependencies:[i.O5,u.lW,y.Ou,V.L,Q.L,W.q,ae,de,pe,Te,Se,Ie,Ee,Ye],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),rt=(0,D.gn)([(0,N.c)()],rt);let ct=class{constructor(e,t,n,i,s,r,o){this.cd=e,this.Activatedroute=t,this.utils=n,this.videoIDService=i,this.customizationService=s,this.notis=r,this.webhooksService=o,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.Activatedroute.params.subscribe((e=>{e&&e.idUser?(this.userId=e.idUser,this.setInitialData(this.userId)):this.loading=null,e&&e.packID&&(this.packId=e.packID)}),(e=>{this.loading=null})),"pro"!=R.N.env&&(Y(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),Y(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)}))),this.utils.setLoading(!1)}ngOnDestroy(){}setInitialData(e){this.customizationService.getCustomization(e).then((e=>{e&&(this.data=e,this.financiadorID=e.funder_id||"",this.cd.markForCheck()),this.loading=null}),(e=>{console.error(e),this.loading=null}))}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==R.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==R.N.env&&(e="wss://notifications.belender.net"),R.N.notificationsBaseUrl&&(e=R.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=null})))}showAlert(e,t){this.loading=null,this.notis.showAlert(e,t)}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.videoIDService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}setRequestStatus(e){this.solicitud.status_code=e}};function dt(e,t){if(1&e&&(U.TgZ(0,"div",6),U._UZ(1,"img",7),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("src",e.data.styles.logoUrl,U.LSH)}}function ut(e,t){if(1&e&&(U.TgZ(0,"div",8),U._UZ(1,"mat-progress-spinner",9),U.TgZ(2,"p",10),U._uU(3),U.qZA()()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("value",e.spinnerValue)("mode",e.spinnerMode),U.xp6(2),U.Oqu(e.loading)}}function ht(e,t){if(1&e&&(U.TgZ(0,"div",1)(1,"div",2),U.YNc(2,dt,2,1,"div",3),U._UZ(3,"belender-fail-step",4),U.YNc(4,ut,4,3,"div",5),U.qZA()()),2&e){const e=U.oxw();U.xp6(1),U.Udp("background",e.data.styles.colors.background),U.xp6(1),U.Q6J("ngIf",e.data.styles.withLogo),U.xp6(1),U.Q6J("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud),U.xp6(1),U.Q6J("ngIf",e.loading&&!e.error)}}ct.ɵfac=function(e){return new(e||ct)(U.Y36(U.sBO),U.Y36(O.gz),U.Y36(Z.F),U.Y36(z),U.Y36(C.w),U.Y36(S.T),U.Y36(w.t))},ct.ɵcmp=U.Xpm({type:ct,selectors:[["belender-widget-videoid-success"]],inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud",flowName:"flowName"},features:[U._Bn([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:1,vars:1,consts:[["class","h-full widget-belender",4,"ngIf"],[1,"h-full","widget-belender"],[1,"h-full","w-full","flex-auto","p-0","md:p-3"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],[3,"data","texts"],["class","loading-wrapper animated fadeIn",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&U.YNc(0,lt,5,6,"div",0),2&e&&U.Q6J("ngIf",t.data)},dependencies:[i.O5,y.Ou,de],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),ct=(0,D.gn)([(0,N.c)()],ct);let pt=class{constructor(e,t,n,i,s,r,o){this.cd=e,this.Activatedroute=t,this.utils=n,this.videoIDService=i,this.customizationService=s,this.notis=r,this.webhooksService=o,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.Activatedroute.params.subscribe((e=>{e&&e.idUser?(this.userId=e.idUser,this.setInitialData(this.userId)):this.loading=null,e&&e.packID&&(this.packId=e.packID)}),(e=>{this.loading=null})),"pro"!=R.N.env&&(Y(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),Y(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)}))),this.utils.setLoading(!1)}ngOnDestroy(){}setInitialData(e){this.customizationService.getCustomization(e).then((e=>{e&&(this.data=e,this.financiadorID=e.funder_id||"",this.cd.markForCheck()),this.loading=null}),(e=>{console.error(e),this.loading=null}))}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==R.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==R.N.env&&(e="wss://notifications.belender.net"),R.N.notificationsBaseUrl&&(e=R.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=null})))}showAlert(e,t){this.loading=null,this.notis.showAlert(e,t)}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.videoIDService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}setRequestStatus(e){this.solicitud.status_code=e}};pt.ɵfac=function(e){return new(e||pt)(U.Y36(U.sBO),U.Y36(O.gz),U.Y36(Z.F),U.Y36(z),U.Y36(C.w),U.Y36(S.T),U.Y36(w.t))},pt.ɵcmp=U.Xpm({type:pt,selectors:[["belender-widget-videoid-fail"]],inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud",flowName:"flowName"},features:[U._Bn([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:1,vars:1,consts:[["class","h-full widget-belender",4,"ngIf"],[1,"h-full","widget-belender"],[1,"h-full","w-full","flex-auto","p-0","md:p-3"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],[3,"data","texts","solicitud"],["class","loading-wrapper animated fadeIn",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&U.YNc(0,ht,5,7,"div",0),2&e&&U.Q6J("ngIf",t.data)},dependencies:[i.O5,y.Ou,pe],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),pt=(0,D.gn)([(0,N.c)()],pt);const mt=[{path:":idUser",component:rt},{path:":idUser/:packID",component:rt},{path:":idUser/:packID/success",component:ct},{path:":idUser/:packID/fail",component:pt}];let ft=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=U.oAB({type:e}),e.ɵinj=U.cJS({imports:[O.Bz.forChild(mt),O.Bz,L.d8]}),e})();var gt=n(6981),_t=n(3848),bt=n(1129),vt=n(1258),yt=n(3295),wt=n(2266),xt=n(3300),Ct=n(865);let kt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=U.oAB({type:e}),e.ɵinj=U.cJS({providers:[_.M,v.o,C.w,w.t,S.T,E.t,{provide:T.Ad,useValue:"es-ES"}],imports:[ft,i.ez,s.G,r.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,x.c,p.u5,m.AV,p.UX,f.LD,g.vV,b.a,y.Cq,k.FA,T.XK,M.T5,I.Fk,gt.x,_t.Nh,bt.n,vt.H,yt.g,wt.L,xt.C,Ct.q]}),e})()},5469:(e,t,n)=>{n.d(t,{B:()=>b});var i=n(7582),s=n(9933),r=n(8259),o=n(4650),a=n(5089),l=n(7367),c=n(8460),d=n(9299),u=n(9045),h=n(6895),p=n(2237),m=n(9199);const f=["widgetCard"];function g(e,t){1&e&&(o.ynx(0),o._UZ(1,"router-outlet"),o.BQk())}const _=function(e){return{"margin-top":e}};let b=class{constructor(e,t,n,i,s){this.utils=e,this.customizationService=t,this.customizationStoreService=n,this.router=i,this.deviceInfoService=s,this.type="",this.widgetHeight=0,this.warningsSpace=0,this.isScaled=!1,this.funderConfigLoaded=!1,this.funderStylesLoaded=!1}ngOnInit(){this.getWindowsScreenOrientation(),this.utils.getWarningsSpaces().subscribe((e=>{this.warningsSpace=e}));let e=this.router.url.split("/");this.userId=e.length&&e.some((e=>"smspin"===e))?e&&e.length&&e[e.length-3]?e[e.length-3]:"":e&&e.length&&e[e.length-2]?e[e.length-2]:"",this.packId=e.length&&e.some((e=>"smspin"===e))?e&&e.length&&e[e.length-2]?e[e.length-2]:"":e&&e.length&&e[e.length-1]?e[e.length-1]:"";let t=this.packId.split("?");t&&t.length&&(this.packId=t[0]),this.userId&&(this.customizationStoreService.setUserID(this.userId),this.setCustomization()),this.packId&&this.customizationStoreService.setPackID(this.packId)}ngDoCheck(){this.getWidgetCardHeight()}ngOnDestroy(){window.screen&&window.screen.orientation&&this.orientationChangeHandler&&window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}ngAfterViewInit(){r("body").css("background","transparent"),r("body").css("background-color","transparent")}getWindowsScreenOrientation(){window.addEventListener("resize",(()=>{this.widgetHeight=this.widgetCard.nativeElement.offsetHeight,this.isScaled&&(this.widgetHeight=1.5*this.widgetHeight),this.sendMessageToParent({type:"widgetHeight",data:this.widgetHeight})})),window.screen&&window.screen.orientation?(this.orientationChangeHandler=()=>{this.getWidgetCardHeight()},window.screen.orientation.addEventListener("change",this.orientationChangeHandler)):console.warn("Screen Orientation API not supported.")}getWidgetCardHeight(){this.widgetCard&&this.widgetHeight!=this.widgetCard.nativeElement.offsetHeight&&(this.widgetHeight=this.widgetCard.nativeElement.offsetHeight,this.isScaled$=this.deviceInfoService.isScaled$.subscribe((e=>{this.isScaled=e,this.isScaled&&(this.widgetHeight=1.5*this.widgetHeight)})),this.sendMessageToParent({type:"widgetHeight",data:this.widgetHeight}))}sendMessageToParent(e){window.top.postMessage(e,"*")}setCustomization(){this.customizationService.getFunderConfig(this.userId).then((e=>{this.customizationStoreService.setFunderConfig(e.data),this.funderConfigLoaded=!0})).catch((e=>{console.log("🚀 ~ WidgetComponent ~ this.customizationService.getCustomization ~ e:",e)})),this.customizationService.getFunderStyles(this.userId).then((e=>{this.customizationStoreService.setFunderStyles(e.data),this.funderStylesLoaded=!0})).catch((e=>{console.log("🚀 ~ WidgetComponent ~ this.customizationService.getCustomization ~ e:",e)}))}};b.ɵfac=function(e){return new(e||b)(o.Y36(a.F),o.Y36(l.w),o.Y36(c.r),o.Y36(d.F0),o.Y36(u.H))},b.ɵcmp=o.Xpm({type:b,selectors:[["belender-widget"]],viewQuery:function(e,t){if(1&e&&o.Gf(f,5),2&e){let e;o.iGM(e=o.CRH())&&(t.widgetCard=e.first)}},inputs:{type:"type"},decls:4,vars:4,consts:[[1,"belender-page-layout","h-auto","p-0","md:p-4","overflow-y-visible",3,"ngStyle"],[1,"h-auto","overflow-y-visible","content-layout","overflow-x-hidden","content-widget","p-0","md:p-3"],["widgetCard",""],[4,"ngIf"]],template:function(e,t){1&e&&(o.TgZ(0,"vex-page-layout",0)(1,"vex-page-layout-content",1,2),o.YNc(3,g,2,0,"ng-container",3),o.qZA()()),2&e&&(o.Q6J("ngStyle",o.VKq(2,_,t.warningsSpace+"px")),o.xp6(3),o.Q6J("ngIf",t.funderConfigLoaded&&t.funderStylesLoaded))},dependencies:[h.O5,h.PC,d.lC,p.w,m.d],styles:[".badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.card[_ngcontent-%COMP%]{margin:0 auto;max-width:440px}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.content-layout[_ngcontent-%COMP%]{max-height:none;max-height:initial;overflow-y:auto;padding:0!important}.belender-page-layout[_ngcontent-%COMP%]{padding:0!important}"]}),b=(0,i.gn)([(0,s.c)()],b)},2932:(e,t,n)=>{function i(e={}){return t=>{const n=t.value;if(!n)return null;const i=n.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(e.checkFormat&&!i)return{invalidFormat:!0};if(!i)return null;const s=parseInt(i[1],10),r=parseInt(i[2],10)-1,o=parseInt(i[3],10),a=new Date(o,r,s);if(e.checkDate&&(a.getFullYear()!==o||a.getMonth()!==r||a.getDate()!==s))return{invalidDate:!0};if(e.checkAge){const e=new Date;let t=e.getFullYear()-o;const n=e.getMonth()-r;if((n<0||0===n&&e.getDate()<s)&&t--,t<18)return{underAge:!0}}return null}}n.d(t,{s:()=>i})},9382:(e,t,n)=>{n.d(t,{i:()=>p});var i=n(4650),s=n(8135),r=n(5601),o=n(5895),a=n(6895),l=n(3731);function c(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",4),i.NdJ("click",(function(){i.CHM(e);const t=i.oxw(2);return i.KtG(t.goToCancelRequest())})),i.ALo(1,"safeHtml"),i.qZA()}if(2&e){const e=i.oxw(2);i.Udp("color",e.textColor),i.Q6J("innerHTML",i.lcZ(1,3,e.customText),i.oJD)}}function d(e,t){if(1&e&&(i.TgZ(0,"div",5),i._uU(1),i.qZA()),2&e){const e=i.oxw(2);i.xp6(1),i.hij(" ",e.labels.loadings.cancelingRequest,"\n")}}const u=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function h(e,t){if(1&e&&(i.TgZ(0,"div",1),i.YNc(1,c,2,5,"div",2),i.YNc(2,d,2,1,"div",3),i.qZA()),2&e){const e=i.oxw();i.Q6J("ngClass",i.kEZ(3,u,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),i.xp6(1),i.Q6J("ngIf",!e.loading),i.xp6(1),i.Q6J("ngIf",e.loading)}}let p=(()=>{class e{constructor(e,t,n){this.smsComponent=e,this.solicitudesService=t,this.notis=n,this.customText="",this.textColor="",this.flowType="SMS",this.updateStatusCode=new i.vpe,this.requestType="sms",this.loading=!1}goToCancelRequest(){this.loading=!0;const e={request_id:this.request_id,user_id:this.user_id};this.requestType="ClavePin"===this.flowType?"clave-pin":"sms",this.solicitudesService.cancelRequest(e,this.requestType).then((e=>{e&&e.data&&("SMS"===this.flowType?this.setSmsCancel("consent_process_canceled"):this.updateStatusCode.emit("consent_process_canceled")),e.message&&this.showAlert(e.status?this.capitalizeFirstLetter(e.status)+"!":"Aviso!",e.message),setTimeout((()=>{this.loading=!1}),1e3)})).catch((e=>{this.loading=!1,this.showAlert("Error!",e.message||e)}))}capitalizeFirstLetter(e){return"string"!=typeof e||0===e.length?e:e.charAt(0).toUpperCase()+e.slice(1)}showAlert(e,t){this.notis.showAlert(e,t)}setSmsCancel(e){this.smsComponent.setRequestStatus(e),this.smsComponent.setStatus()}}return e.ɵfac=function(t){return new(t||e)(i.Y36(s.T,9),i.Y36(r.M),i.Y36(o.T))},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-cancel-request"]],inputs:{data:"data",customText:"customText",textColor:"textColor",flowType:"flowType",request_id:"request_id",user_id:"user_id",labels:"labels"},outputs:{updateStatusCode:"updateStatusCode"},decls:1,vars:1,consts:[["class","flex",3,"ngClass",4,"ngIf"],[1,"flex",3,"ngClass"],["class","subheading-1 px-2 text-right underline cursor-pointer custom-html",3,"color","innerHTML","click",4,"ngIf"],["class","subheading-1 px-2 text-right text-orange-500 custom-html",4,"ngIf"],[1,"subheading-1","px-2","text-right","underline","cursor-pointer","custom-html",3,"innerHTML","click"],[1,"subheading-1","px-2","text-right","text-orange-500","custom-html"]],template:function(e,t){1&e&&i.YNc(0,h,3,7,"div",0),2&e&&i.Q6J("ngIf",t.data&&t.data.styles)},dependencies:[a.mk,a.O5,l.z]}),e})()},9112:(e,t,n)=>{n.d(t,{y:()=>Y});var i=n(5861),s=n(4650),r=n(4006),o=n(8259),a=n(2440),l=n(5762),c=n(2340),d=n(8135),u=n(5089),h=n(2254),p=n(5601),m=n(8460),f=n(1742),g=n(6895),_=n(9101),b=n(3046),v=n(3731);function y(e,t){if(1&e&&s._UZ(0,"belender-widget-logo",14),2&e){const e=s.oxw();s.Q6J("firstOption",e.logoCustom)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function w(e,t){if(1&e&&s._UZ(0,"div",15),2&e){const e=s.oxw();s.Udp("color",null==e.data.styles?null:e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),s.Q6J("innerHTML",e.texts[e.otpType].title,s.oJD)}}function x(e,t){if(1&e&&(s._UZ(0,"div",16),s.ALo(1,"safeHtml")),2&e){const e=s.oxw();s.Udp("color",null==e.data.styles?null:e.data.styles.colors.text),s.Q6J("innerHTML",s.lcZ(1,3,null==e.texts[e.otpType]?null:e.texts[e.otpType].description),s.oJD)}}function C(e,t){if(1&e&&(s.ynx(0),s._uU(1),s.BQk()),2&e){const e=s.oxw(2);s.xp6(1),s.hij(" ",e.labels?e.labels.otp.requestingOtp:"Estamos solicitando el código. Por favor, espere un momento."," ")}}function k(e,t){if(1&e&&(s.ynx(0),s._uU(1),s.BQk()),2&e){const e=s.oxw(2);s.xp6(1),s.AsE(" ",e.labels?e.labels.otp.otpSentToNumber:"El código ha sido enviado al teléfono acabado en"," ",e.lastThreeNumbersPhone,". ")}}function T(e,t){if(1&e&&(s.ynx(0),s._uU(1),s.BQk()),2&e){const e=s.oxw(2);s.xp6(1),s.hij(" ",e.labels?e.labels.otp.requestingCode:"Estamos solicitando el código. Por favor, espere un momento."," ")}}const S=function(e,t,n){return{color:e,border:t,background:n}};function M(e,t){if(1&e&&(s.ynx(0),s.TgZ(1,"small",17),s.YNc(2,C,2,1,"ng-container",6),s.YNc(3,k,2,2,"ng-container",6),s.YNc(4,T,2,1,"ng-container",6),s.qZA(),s.BQk()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngStyle",s.kEZ(4,S,null==e.data.styles?null:e.data.styles.colors.accentColor,"1px solid "+(null==e.data.styles?null:e.data.styles.colors.accentColor),null==e.data.styles?null:e.data.styles.colors.accentBgColor)),s.xp6(1),s.Q6J("ngIf",!e.lastThreeNumbersPhone),s.xp6(1),s.Q6J("ngIf",e.lastThreeNumbersPhone&&!(null!=e.data.config&&e.data.config.noRetryInBadPhone)),s.xp6(1),s.Q6J("ngIf",e.lastThreeNumbersPhone&&(null==e.data.config?null:e.data.config.noRetryInBadPhone))}}function I(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.hij(" ",e.labels?e.labels.otp.noReceivedCode:"¿No has recibido el código en tu teléfono?"," ")}}function E(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.AsE("",e.labels?e.labels.otp.noReceivedCode2:"¿No has recibido el código en el teléfono acabado en"," ",e.lastThreeNumbersPhone,"? ")}}function O(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.hij(" ",e.labels?e.labels.otp.noReceivedCode:"¿No has recibido el código en tu teléfono?"," ")}}const L=function(e,t){return{color:e,background:t}};function P(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"a",20),s.NdJ("click",(function(){s.CHM(e);const t=s.oxw(2);return s.KtG(t.resendOTP())})),s._uU(1),s.qZA()}if(2&e){const e=s.oxw(2);s.Q6J("ngStyle",s.WLB(2,L,null==e.data.styles?null:e.data.styles.colors.dangerTextButtonColor,null==e.data.styles?null:e.data.styles.colors.dangerColor)),s.xp6(1),s.hij(" ",e.labels?e.labels.actions.resend:"Reenviar"," ")}}function D(e,t){if(1&e&&(s.ynx(0),s.TgZ(1,"small",18),s.YNc(2,I,2,1,"span",6),s.YNc(3,E,2,2,"span",6),s.YNc(4,O,2,1,"span",6),s.YNc(5,P,2,5,"a",19),s.qZA(),s.BQk()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngStyle",s.kEZ(5,S,null==e.data.styles?null:e.data.styles.colors.dangerColor,"1px solid "+(null==e.data.styles?null:e.data.styles.colors.dangerColor),null==e.data.styles?null:e.data.styles.colors.dangerBgColor)),s.xp6(1),s.Q6J("ngIf",!e.lastThreeNumbersPhone),s.xp6(1),s.Q6J("ngIf",e.lastThreeNumbersPhone&&!(null!=e.data.config&&e.data.config.noRetryInBadPhone)),s.xp6(1),s.Q6J("ngIf",null==e.data.config?null:e.data.config.noRetryInBadPhone),s.xp6(1),s.Q6J("ngIf",!e.secondTry)}}function A(e,t){if(1&e&&(s.TgZ(0,"div",21)(1,"strong",22),s._uU(2),s.qZA(),s.TgZ(3,"span",23),s._uU(4),s.qZA()()),2&e){const e=s.oxw();s.xp6(2),s.Oqu(e.labels.warnings.error||"Error"),s.xp6(2),s.Oqu(e.otpErrorMessage)}}const N=function(e,t){return{length:e,allowNumbersOnly:t}},q=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Y=(()=>{class e{constructor(e,t,n,i,r,o,a,l){this.smsComponent=e,this.fb=t,this.utils=n,this.smsFlowService=i,this.solicitudesService=r,this.cd=o,this.customizationStoreService=a,this.pinUtils=l,this.minLength=3,this.logoCustom="",this.next=new s.vpe(null),this.errPhone=new s.vpe(null),this.resendO=new s.vpe(null),this.secsCount=60,this.secondTry=!1,this.timerIsRunning=!1,this.env=c.N.env,this.otpErrorMessage=""}ngOnInit(){this.packId=this.customizationStoreService.PACK_ID,this.userId=this.customizationStoreService.USER_ID,this.labels=this.pinUtils.labels,this.form=this.fb.group({code1:[null,[r.kI.required,r.kI.maxLength(6),r.kI.minLength(this.minLength)]]}),this.subsPhone=this.pinUtils.lastThreeNumbersPhone$.subscribe((e=>{this.lastThreeNumbersPhone=e})),this.subsPhone=this.pinUtils.lastThreeNumbersPhone$.subscribe((e=>{this.lastThreeNumbersPhone=e})),"SMS"==this.flowType&&this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}ngOnDestroy(){this.subsPhone&&this.subsPhone.unsubscribe()}resetOtpNumber(){this.form.get("code1").setValue(""),this.ngOtpInput.setValue("")}ngOnChanges(e){e.otpType&&!e.otpType.previousValue&&(this.secsCount="otpAEAT"==e.otpType?.currentValue||"otpIRS"==e.otpType?.currentValue?300:60,this.initSecsInterval())}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastThreeNumbersPhone=t}initSecsInterval(){this.timerIsRunning||(this.interv=setInterval((()=>{this.timerIsRunning=!0,this.secsCount=this.secsCount-1,this.secsRemaining=this.getRemaining(),this.secsCount<=0&&this.finishSecsInterval()}),1e3))}getRemaining(){let e=Math.floor(this.secsCount/60),t=this.secsCount%60;return this.addZero(e)+":"+this.addZero(t)}addZero(e){return e>=10?e:"0"+e}finishSecsInterval(){this.timerIsRunning=!1,this.interv&&clearInterval(this.interv)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){var t=this;return(0,i.Z)((function*(){console.log(e),t.form.get("code1").setValue(e),t.ngOtpInput.setValue(e)}))()}setInputEvent(e){""!=e.target.value?o(e.target).next().focus():"Backspace"==e.code&&o(e.target).prev().focus()}nextStep(){let e={code:this.getCode()};"SMS"===this.flowType?this.requestSmsOTP(e):this.next.emit(e)}resendOTP(){this.secondTry=!0,this.initSecsInterval(),"SMS"===this.flowType?this.requestSmsOTP(!0):this.resendO.emit(!0)}requestSmsOTP(e){this.smsFlowService.setLoading(this.labels.loadings.sendingData),this.testMode?setTimeout((()=>{this.smsFlowService.setRequest(new l.l),this.smsComponent.setRequestStatus("all_documents_downloaded"),this.smsComponent.setStatus(),this.smsFlowService.setLoading(!1)}),2e3):this.solicitudesService.sendOTP({request_id:this.requestID,user_id:this.userId,code:e.code}).then((e=>{e.status&&"error"==e.status?(this.otpErrorMessage=e.message&&"Invalid request status: waiting_login_seguridad_social"==e.message?this.labels.warnings.noOtp:e.message?e.message:e,this.smsFlowService.setLoading(!1)):e&&"success"==e.status&&(this.smsComponent.handleRequestStatus(e.data||e),this.cd.markForCheck())})).catch((e=>{e&&e.error&&(this.otpErrorMessage=e.error),this.smsFlowService.setLoading(!1)})),this.resetOtpNumber()}resendSmsOTP(e){let t={request_id:(this.smsFlowService.REQUEST&&this.smsFlowService.REQUEST.request_id?this.smsFlowService.REQUEST.request_id:this.requestID)||e,user_id:this.userId};this.smsFlowService.setLoading(this.labels.loadings.resendingOtp),this.smsFlowService.setSubscriptionOfRequest(),this.solicitudesService.resendOTP(t).then((e=>{e&&e.data&&(this.smsFlowService.setRequest(e.data),this.smsComponent.setStatus()),this.smsFlowService.setLoading(!1)})).catch((e=>{console.error(e),this.otpErrorMessage=e.error,this.smsFlowService.setLoading(!1)})),this.resetOtpNumber()}}return e.ɵfac=function(t){return new(t||e)(s.Y36(d.T,9),s.Y36(r.QS),s.Y36(u.F),s.Y36(h.p),s.Y36(p.M),s.Y36(s.sBO),s.Y36(m.r),s.Y36(f._))},e.ɵcmp=s.Xpm({type:e,selectors:[["belender-shared-otp-step"]],viewQuery:function(e,t){if(1&e&&s.Gf(a.df,5),2&e){let e;s.iGM(e=s.CRH())&&(t.ngOtpInput=e.first)}},inputs:{data:"data",texts:"texts",lastThreeNumbersPhone:"lastThreeNumbersPhone",otpType:"otpType",minLength:"minLength",flowType:"flowType",logoCustom:"logoCustom",labels:"labels",requestID:"requestID",testMode:"testMode",solicitud:"solicitud"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},features:[s.TTD],decls:17,vars:27,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-1","flex","flex-col"],["id","otpTitle","class","title m-0",3,"color","font-size","innerHTML",4,"ngIf"],["id","otpDescription","class","subheading-1 pt-4",3,"color","innerHTML",4,"ngIf"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","w-full","flex-col","gap-2","py-2"],[1,"subheading-1","py-1","custom-html"],[3,"config","onInputChange"],["ngOtpInput",""],["class","bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative","role","alert",4,"ngIf"],[1,"flex","items-center","gap-2","py-4","flex-col","md:flex-row",3,"ngClass"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"firstOption","logoUrl"],["id","otpTitle",1,"title","m-0",3,"innerHTML"],["id","otpDescription",1,"subheading-1","pt-4",3,"innerHTML"],["id","secsCountContainer",1,"info-time","w-full",3,"ngStyle"],[1,"info-time","w-full",3,"ngStyle"],["id","resendOTPButton","class","ml-4",3,"ngStyle","click",4,"ngIf"],["id","resendOTPButton",1,"ml-4",3,"ngStyle","click"],["role","alert",1,"bg-red-100","border","border-red-400","text-red-700","px-4","py-3","rounded","relative"],[1,"font-bold"],[1,"block","sm:inline"]],template:function(e,t){1&e&&(s.YNc(0,y,1,2,"belender-widget-logo",0),s.TgZ(1,"form",1)(2,"div",2),s.YNc(3,w,1,5,"div",3),s.YNc(4,x,2,5,"div",4),s.TgZ(5,"div",5),s.YNc(6,M,5,8,"ng-container",6),s.YNc(7,D,6,9,"ng-container",6),s.qZA(),s.TgZ(8,"div",7)(9,"p",8),s._uU(10),s.qZA(),s.TgZ(11,"ng-otp-input",9,10),s.NdJ("onInputChange",(function(e){return t.capturePasteEvent(e)})),s.qZA()()(),s.YNc(13,A,5,2,"div",11),s.TgZ(14,"div",12)(15,"button",13),s.NdJ("click",(function(){return t.nextStep()})),s._uU(16),s.qZA()()()),2&e&&(s.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),s.xp6(1),s.Q6J("formGroup",t.form),s.xp6(2),s.Q6J("ngIf",t.texts&&(null==t.texts[t.otpType]?null:t.texts[t.otpType].title)&&""!=(null==t.texts[t.otpType]?null:t.texts[t.otpType].title)),s.xp6(1),s.Q6J("ngIf",t.texts&&(null==t.texts[t.otpType]?null:t.texts[t.otpType].description)&&""!=(null==t.texts[t.otpType]?null:t.texts[t.otpType].description)),s.xp6(2),s.Q6J("ngIf",t.secsCount&&t.secsCount>0),s.xp6(1),s.Q6J("ngIf",!t.secsCount||t.secsCount<=0),s.xp6(2),s.Udp("color",t.data.styles.colors.text),s.xp6(1),s.hij(" ",t.labels?t.labels.otp.otpCode:"Código OTP (recibido por SMS)"," "),s.xp6(1),s.Q6J("config",s.WLB(20,N,t.minLength,"qa"!=t.env&&"dev"!=t.env)),s.xp6(2),s.Q6J("ngIf",""!=t.otpErrorMessage&&""===t.form.get("code1").value),s.xp6(1),s.Q6J("ngClass",s.kEZ(23,q,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),s.xp6(1),s.Udp("color",null==t.data.styles?null:t.data.styles.colors.btnText)("background",t.form.invalid?"":null==t.data.styles?null:t.data.styles.colors.btnBg)("border-radius",(null==t.data.styles?null:t.data.styles.btnRound)+"px"),s.Q6J("disabled",t.form.invalid),s.xp6(1),s.hij(" ",t.labels?t.labels.actions.next:"Siguiente"," "))},dependencies:[g.mk,g.O5,g.PC,_.lW,r._Y,r.JL,r.sg,a.df,b.X,v.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.code-wrapper[_ngcontent-%COMP%]{padding:5px;height:50px}.code-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:40px;min-width:136px;border-radius:6px;border:1px solid rgba(0,0,0,.1);text-transform:uppercase;text-align:left;font-weight:700;transition:all .3s ease;outline:1px solid transparent;letter-spacing:12px;padding:0 18px}.code-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:hover{background:#fcfcfc;border:1px solid rgba(0,0,0,.2);transition:all .3s ease}.code-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:1px solid #4e98d0;border:1px solid #4e98d0}.info-time[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:7px 10px;min-height:40px;font-size:14px;line-height:14px;border-radius:5px;border-width:1px;border-style:solid;margin:10px 0}.info-time[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:14px;line-height:24px;padding:0 10px;border-radius:5px;cursor:pointer;transition:all .2s ease}@media (max-width: 576px){.info-time[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:0 20px}}"]}),e})()},5696:(e,t,n)=>{n.d(t,{T:()=>c});var i=n(4650),s=n(7403),r=n(5412),o=n(7308),a=n(6895);function l(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"span"),i._uU(1),i.TgZ(2,"a",0),i.NdJ("click",(function(t){i.CHM(e);const n=i.oxw();return i.KtG(n.gotoLegalDocument(t))})),i.TgZ(3,"u"),i._uU(4),i.qZA()()()}if(2&e){const e=i.oxw();i.xp6(1),i.hij(" ",e.parts.p3," "),i.xp6(3),i.Oqu(e.parts.a2)}}let c=(()=>{class e{constructor(e,t){this.dialog=e,this.translationService=t,this.goTerms=new i.vpe(null),this.customTerms=!1,this.lang="",this.parts={p1:"He leído y acepto los",p2:"del servicio",p3:"y la",a1:"términos y condiciones",a2:"política de privacidad"},this.translatedParts={ca:{p1:"He llegit i accepto els",p2:"del servei",p3:"i la",a1:"termes i condicions",a2:"política de privacitat"},en:{p1:"I have read and accept the",p2:"of the service",p3:"and the",a1:"terms and conditions",a2:"privacy policy"},fr:{p1:"J'ai lu et j'accepte les",p2:"du service",p3:"et la",a1:"conditions générales",a2:"politique de confidentialité"},it:{p1:"Ho letto e accetto i",p2:"del servizio",p3:"e la",a1:"termini e condizioni",a2:"informativa sulla privacy"},pt:{p1:"Li e aceito os",p2:"do serviço",p3:"e a",a1:"termos e condições",a2:"política de privacidade"},de:{p1:"Ich habe die",p2:"des Dienstes gelesen und akzeptiere sie",p3:"sowie die",a1:"Nutzungsbedingungen",a2:"Datenschutzrichtlinie"}}}ngOnInit(){this.parts={p1:this.getPart(this.firstSentence,"p1"),p2:this.getPart(this.secondSentence,"p2"),p3:this.getPart(this.thirdSentence,"p3"),a1:this.getPart(this.termsActionText,"a1"),a2:this.getPart(this.policyActionText,"a2")}}getPart(e,t){return e||(this.data&&this.lang&&this.translatedParts[this.lang]?this.translatedParts[this.lang][t]||this.parts[t]||"":this.parts[t]||"")}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.goTerms.emit(e)}gotoLegalDocument(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(s.N,{panelClass:"fullscreen-dialog",data:{lang:this.lang,allData:this.data,flow:this.flowName}})}}return e.ɵfac=function(t){return new(t||e)(i.Y36(r.uw),i.Y36(o.D))},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-terms-and-policy-links"]],inputs:{userId:"userId",showPolicyLink:"showPolicyLink",firstSentence:"firstSentence",secondSentence:"secondSentence",thirdSentence:"thirdSentence",policyActionText:"policyActionText",termsActionText:"termsActionText",customTerms:"customTerms",lang:"lang",data:"data",flowName:"flowName"},outputs:{goTerms:"goToTerms"},decls:6,vars:4,consts:[["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],[4,"ngIf"]],template:function(e,t){1&e&&(i._uU(0),i.TgZ(1,"a",0),i.NdJ("click",(function(e){return t.gotoTermsAndConditions(e)})),i.TgZ(2,"u"),i._uU(3),i.qZA()(),i._uU(4),i.YNc(5,l,5,2,"span",1)),2&e&&(i.hij(" ",t.parts.p1," "),i.xp6(3),i.Oqu(t.parts.a1),i.xp6(1),i.hij(" ",t.parts.p2," "),i.xp6(1),i.Q6J("ngIf",t.showPolicyLink))},dependencies:[a.O5]}),e})()},3046:(e,t,n)=>{n.d(t,{X:()=>a});var i=n(4650),s=n(6895);function r(e,t){1&e&&i._UZ(0,"div",4)}const o=function(e){return{display:e}};let a=(()=>{class e{constructor(){this.logoUrl="",this.firstOption=this.logoUrl,this.logoUrlIsLoaded=!1}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-widget-logo"]],inputs:{logoUrl:"logoUrl",firstOption:"firstOption"},decls:4,vars:5,consts:[[1,"img-wrapper","p-4","flex","justify-center","items-center"],["class","animated-bg h-full w-full",4,"ngIf"],[1,"img-card",3,"src","ngStyle","load"],["img",""],[1,"animated-bg","h-full","w-full"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0),i.YNc(1,r,1,0,"div",1),i.TgZ(2,"img",2,3),i.NdJ("load",(function(){return t.logoUrlIsLoaded=!0})),i.qZA()()),2&e&&(i.xp6(1),i.Q6J("ngIf",!t.logoUrlIsLoaded),i.xp6(1),i.Q6J("src",t.firstOption||t.logoUrl,i.LSH)("ngStyle",i.VKq(3,o,t.logoUrlIsLoaded?"block":"none")))},dependencies:[s.O5,s.PC],styles:[".img-wrapper[_ngcontent-%COMP%]{max-height:240px}.img-wrapper[_ngcontent-%COMP%] .img-card[_ngcontent-%COMP%], .img-wrapper[_ngcontent-%COMP%] .animated-bg[_ngcontent-%COMP%]{max-width:240px;max-height:240px}"]}),e})()},5762:(e,t,n)=>{n.d(t,{l:()=>i});class i{constructor(){this.status_code="created"}}},3731:(e,t,n)=>{n.d(t,{z:()=>r});var i=n(4650),s=n(1481);let r=(()=>{class e{constructor(e){this.sanitized=e}transform(e){return this.sanitized.bypassSecurityTrustHtml(e)}}return e.ɵfac=function(t){return new(t||e)(i.Y36(s.H7,16))},e.ɵpipe=i.Yjl({name:"safeHtml",type:e,pure:!0}),e})()},9391:(e,t,n)=>{n.d(t,{o:()=>l});var i=n(7396),s=n(8829),r=n(2340),o=n(4650),a=n(6554);let l=(()=>{class e{constructor(e){this.localFetch=e}getAttachmentsOld(e){return new Promise(((t,n)=>{const r=(0,i.IO)((0,i.hJ)(s.db,"solicitudes"),(0,i.ar)("id","==",e),(0,i.b9)(1));(0,i.cf)(r,(e=>{let n;e.forEach((e=>{n=e.data().attachments})),t(n)}),(e=>{n(e)}))}))}getAttachments(e){return new Promise(((t,n)=>{this.localFetch.getFetch(`${r.N.baseUrl}/requests/${e}/documents`).then((e=>{e?t(e):n("No hay archivos asignados a esta solicitud..")})).catch((e=>{n(e)}))}))}uploadFile(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(`${r.N.baseUrl}/documents/upload-files`,e).then((e=>{e?t(e):n("No se pudieron subir los documentos..")})).catch((e=>{n(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(o.LFG(a.r))},e.ɵprov=o.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},7489:(e,t,n)=>{n.d(t,{v:()=>l});var i=n(2340),s=n(4650),r=n(5089),o=n(1742),a=n(6554);let l=(()=>{class e{constructor(e,t,n){this.utils=e,this.pinUtils=t,this.localFetch=n}getSolicitudes(){return this.localFetch.getFetch(i.N.baseUrl+"/requests")}getSolicitudByCode(e){return this.localFetch.freeGetFetch(i.N.baseUrl+"/requests/"+e)}noMatchPhone(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/cancel",e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin",e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}checkService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/check-service",e).then((e=>{this.pinUtils.sendMessageToParent(400===e.code?{type:"response",data:{...e.response,status_code:"no_clave_pin_service"}}:{type:"response",data:e.data||e}),t(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}setNoService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/no-service",e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/terms",e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}getNewIdOfRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/"+e+"/get-new-id",{}).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}retryRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/retry",e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}resendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/resend-otp",e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}fixData(e,t){return new Promise(((n,s)=>{this.localFetch.putFetchWhitoutToken(`${i.N.baseUrl}/requests/${e}/person`,t).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?n(e):s(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),s(e)}))}))}sendOTP(e,t){let n="/requests/clave-pin/otp";return(i.N.scraperMock||t)&&(n="/mockscrapper/requests/clave-pin/otp"),new Promise(((t,s)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+n,e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):s(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),s(e)}))}))}sendOTPToBde(e,t){let n="/requests/cirbe-cp/otp";return(i.N.scraperMock||t)&&(n="/mockscrapper/requests/cirbe-cp/otp"),new Promise(((t,s)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+n,e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):s(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),s(e)}))}))}sendSecondTask(e){let t="/requests/clave-pin/secondTask";return i.N.scraperMock&&(t="/mockscrapper/requests/clave-pin/secondTask"),new Promise(((n,s)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+t,e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?n(e):s(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),s(e)}))}))}sendLinkBySms(e,t){return new Promise(((n,s)=>{this.localFetch.postFetch(`${i.N.baseUrl}/requests/${e}/send-link-sms`,t).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?n(e):s(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),s(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(s.LFG(r.F),s.LFG(o._),s.LFG(a.r))},e.ɵprov=s.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},5206:(e,t,n)=>{n.d(t,{s:()=>l});var i=n(6197),s=n(2340),r=n(4650),o=n(5089),a=n(6554);let l=(()=>{class e{constructor(e,t){this.utils=e,this.localFetch=t,this.db=(0,i.N8)()}getFlows(){return new Promise(((e,t)=>{this.localFetch.getFetch(s.N.baseUrl+"/flows").then((n=>{n?e(n):t(!1)}),(e=>{t(!1)}))}))}getFlowsByUserID(e){return new Promise(((t,n)=>{const s=(0,i.iH)((0,i.N8)());(0,i.U2)((0,i.iU)(s,`documents/flows/${e}`)).then((e=>{e.exists()?t(e.val()):n("No data!")})).catch((e=>{console.error(e),n("Error!: "+e)}))}))}}return e.ɵfac=function(t){return new(t||e)(r.LFG(o.F),r.LFG(a.r))},e.ɵprov=r.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},9617:(e,t,n)=>{n.d(t,{U:()=>l});var i=n(2340),s=n(4650),r=n(5089),o=n(529),a=n(6554);let l=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getPackagesByUserID(e){return new Promise(((t,n)=>{this.localFetch.getFetchWhitoutToken(i.N.baseUrl+"/users/"+e+"/pack-documents").then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}getPacksByPackId(e){return new Promise(((t,n)=>{this.localFetch.getFetchWhitoutToken(i.N.baseUrl+"/pack-documents/"+e).then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}getFlowPackagesByUserID(e,t){}}return e.ɵfac=function(t){return new(t||e)(s.LFG(r.F),s.LFG(o.eN),s.LFG(a.r))},e.ɵprov=s.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},5601:(e,t,n)=>{n.d(t,{M:()=>l});var i=n(2340),s=n(4650),r=n(5089),o=n(529),a=n(6554);let l=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getSolicitudes(){return this.localFetch.getFetch(i.N.baseUrl+"/requests")}getSolicitudByCode(e){return this.localFetch.freeGetFetch(i.N.baseUrl+"/requests/"+e)}setPhone(e,t){return new Promise(((n,s)=>{this.localFetch.putFetchWhitoutToken(`${i.N.baseUrl}/requests/${t}/person`,e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),n(e)):s(e)})).catch((e=>{s(e)}))}))}noPhone(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/no-phone",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}smsToPin(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms-clave",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}addSolicitud(e,t,n){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}setNoService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/no-service",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/terms",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}getNewIdOfRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/"+e+"/get-new-id",{}).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}checkService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/check-service",e).then((e=>{this.sendMessageToParent(400===e.code?{type:"response",data:{...e.response,status_code:"no_sms_service"}}:{type:"response",data:e.data||e}),t(e)})).catch((e=>{n(e)}))}))}retryRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/retry",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}resendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/resend-otp",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}fixData(e,t){return new Promise(((n,s)=>{this.localFetch.putFetchWhitoutToken(`${i.N.baseUrl}/requests/${e}/person`,t).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),n(e)):s(e)})).catch((e=>{s(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{let s="/requests/sms/otp";i.N.scraperMock&&(s="/mockscrapper/requests/sms/otp"),this.localFetch.postFetchWhitoutToken(i.N.baseUrl+s,e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}uploadFileFromWidget(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(i.N.baseUrl+"/documents/upload-files-from-widget",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}sendLinkBySms(e,t){return new Promise(((n,s)=>{this.localFetch.postFetch(`${i.N.baseUrl}/requests/${e}/send-link-sms`,t).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),n(e)):s(e)})).catch((e=>{s(e)}))}))}getDocuments(e){return new Promise(((t,n)=>{this.localFetch.getFetch(`${i.N.baseUrl}/requests/${e}/documents`).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n("No hay archivos asignados a esta solicitud..")})).catch((e=>{n(e)}))}))}getDocumentsIds(e){return new Promise(((t,n)=>{this.localFetch.getFetch(`${i.N.baseUrl}/requests/${e}/documents-ids-widget`).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n("No hay archivos asignados a esta solicitud..")})).catch((e=>{n(e)}))}))}cancelRequest(e,t){return new Promise(((n,s)=>{this.localFetch.postFetch(i.N.baseUrl+`/requests/${t}/cancel`,e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),n(e)):s(e)})).catch((e=>{s(e)}))}))}sendMessageToParent(e){window.top.postMessage(e,"*")}}return e.ɵfac=function(t){return new(t||e)(s.LFG(r.F),s.LFG(o.eN),s.LFG(a.r))},e.ɵprov=s.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},5145:(e,t,n)=>{n.d(t,{Z:()=>i});const i=[{id:0,text:"error_clave_pin",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Error con la clave PIN"},{id:1,text:"failed_without_retry",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Fallo sin reintento"},{id:111,text:"failed_with_retry",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Fallo con reintento"},{id:2,text:"bad_phone",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Teléfono erróneo"},{id:3,text:"failed_documents_downloaded",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Fallo al descargar Documentos"},{id:4,text:"invalid_otp_aeat",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"OTP de AEAT inválido"},{id:5,text:"invalid_otp_seguridad_social",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"OTP de Seg. Social inválido"},{id:6,text:"max_entries_otp",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"not_interested",label:"Max intentos OTP"},{id:7,text:"abandoned_after_bad_phone",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"phonelink_erase",label:"Abandonado (bad phone)"},{id:8,text:"abandoned_after_terms",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (términos y condiciones)"},{id:9,text:"abandoned_after_invalid_otp_seguridad_social",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (invalid OTP SS)"},{id:10,text:"abandoned_after_invalid_otp_aeat",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (invalid OTP AEAT)"},{id:11,text:"abandoned_after_waiting_otp_aeat",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (waiting OTP AEAT)"},{id:12,text:"abandoned_after_waiting_otp_seguridad_social",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (waiting OTP SS)"},{id:13,text:"waiting_login_seguridad_social",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando login SS"},{id:14,text:"waiting_login_aeat",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando login AEAT"},{id:15,text:"waiting_otp_aeat",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando OTP AEAT"},{id:16,text:"waiting_otp_seguridad_social",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando OTP SS"},{id:17,text:"saved_otp",textClass:"text-purple",bgClass:"bg-purple-light",previewClass:"bg-purple",icon:"timelapse",label:"OTP guardado"},{id:171,text:"picked_up_otp",textClass:"text-purple",bgClass:"bg-purple-light",previewClass:"bg-purple",icon:"timelapse",label:"OTP recogido"},{id:18,text:"terms_and_conditions",textClass:"text-purple",bgClass:"bg-purple-light",previewClass:"bg-purple",icon:"timelapse",label:"Términos y condiciones"},{id:19,text:"waiting_documents",textClass:"text-cyan",bgClass:"bg-cyan-light",previewClass:"bg-cyan",icon:"hourglass_empty",label:"Esperando documentos"},{id:20,text:"created",textClass:"text-cyan",bgClass:"bg-cyan-light",previewClass:"bg-cyan",icon:"fiber_new",label:"Solicitud creada"},{id:21,text:"all_documents_downloaded",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"check_circle",label:"Todo los documentos descargados"},{id:22,text:"partial_documents_downloaded",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"check_circle",label:"Algunos Documentos descargados"},{id:23,text:"parcial_documents_downloaded",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"check_circle",label:"Algunos Documentos descargados"},{id:24,text:"all_documents_downloaded_and_deleted",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"delete",label:"Todos descargados y eliminados"},{id:25,text:"partial_documents_downloaded_and_deleted",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"delete",label:"Algunos descargados y eliminados"},{id:26,text:"updated_data",textClass:"text-blue-500",bgClass:"bg-blue-500/10",previewClass:"bg-blue-500",icon:"check",label:"Datos del cliente actualizados"},{id:27,text:"resend_otp",textClass:"text-blue-500",bgClass:"bg-blue-500/10",previewClass:"bg-blue-500",icon:"refresh",label:"OTP reenviado"}]},8259:function(e,t){var n,i,s;
|
|
59
|
+
"use strict";if((self.webpackChunkvex=self.webpackChunkvex||[]).push([[163],{4163:(e,t,n)=>{n.r(t),n.d(t,{ClientCertModule:()=>Ut});var i=n(6895),s=n(6383),r=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),b=n(3798),v=n(9391),y=n(1572),w=n(182),x=n(4144),C=n(7367),k=n(9602),T=n(3238),S=n(5895),M=n(6257),I=n(1948),E=n(4246),O=n(9299),L=n(6e3),P=n(5861),D=n(7582),A=n(9549),N=n(9933),q=n(8259),Y=n(2340),R=n(1363),F=n(4650),U=n(5089),Z=n(8460),H=n(529),j=n(6554);let z=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(Y.N.baseUrl+"/requests/client-certificate",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addSignedFile(e){return new Promise(((t,n)=>{this.localFetch.postFile(Y.N.baseUrl+"/requests/client-certificate/upload-file-signed",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addFiles(e){return new Promise(((t,n)=>{this.localFetch.postFile(Y.N.baseUrl+"/requests/client-certificate/upload-files",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(Y.N.baseUrl+"/requests/client-certificate/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOtp(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(Y.N.baseUrl+"/requests/client-certificate/otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendPassword(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(Y.N.baseUrl+"/requests/client-certificate/password",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}preRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(Y.N.baseUrl+"/pre-request/client-certificate",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{let i="/requests/client-certificate/otp";Y.N.scraperMock&&(i="/mockscrapper/requests/client-certificate/otp"),this.localFetch.postFetchWhitoutToken(Y.N.baseUrl+i,e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(F.LFG(U.F),F.LFG(H.eN),F.LFG(j.r))},e.ɵprov=F.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var B=n(5412),J=n(833),V=n(4302),Q=n(6830),W=n(3731);function G(e,t){if(1&e&&(F.TgZ(0,"span"),F._uU(1),F.qZA()),2&e){const e=F.oxw(3);F.xp6(1),F.hij("¿No has recibido el código? Solicítalo de nuevo en ",e.secsCount," segundos")}}function $(e,t){if(1&e&&(F.TgZ(0,"span"),F._uU(1),F.qZA()),2&e){const e=F.oxw(3);F.xp6(1),F.AsE("¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? Solicítalo de nuevo en ",e.secsCount," segundos")}}const K=function(e,t,n){return{color:e,border:t,background:n}};function X(e,t){if(1&e&&(F.ynx(0),F.TgZ(1,"small",13),F.YNc(2,G,2,1,"span",7),F.YNc(3,$,2,2,"span",7),F.qZA(),F.BQk()),2&e){const e=F.oxw(2);F.xp6(1),F.Q6J("ngStyle",F.kEZ(3,K,e.data.styles.colors.accentColor,"1px solid "+e.data.styles.colors.accentColor,e.data.styles.colors.accentBgColor)),F.xp6(1),F.Q6J("ngIf",!e.lastNumberPhone),F.xp6(1),F.Q6J("ngIf",e.lastNumberPhone)}}function ee(e,t){1&e&&(F.TgZ(0,"span"),F._uU(1," ¿No has recibido el código en tu teléfono? "),F.qZA())}function te(e,t){if(1&e&&(F.TgZ(0,"span"),F._uU(1),F.qZA()),2&e){const e=F.oxw(3);F.xp6(1),F.hij(" ¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? ")}}const ne=function(e,t){return{color:e,background:t}};function ie(e,t){if(1&e){const e=F.EpF();F.ynx(0),F.TgZ(1,"small",13),F.YNc(2,ee,2,0,"span",7),F.YNc(3,te,2,1,"span",7),F.TgZ(4,"a",14),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw(2);return F.KtG(t.resendOTP())})),F._uU(5,"Reenviar"),F.qZA()(),F.BQk()}if(2&e){const e=F.oxw(2);F.xp6(1),F.Q6J("ngStyle",F.kEZ(4,K,e.data.styles.colors.dangerColor,"1px solid "+e.data.styles.colors.dangerColor,e.data.styles.colors.dangerBgColor)),F.xp6(1),F.Q6J("ngIf",!e.lastNumberPhone),F.xp6(1),F.Q6J("ngIf",e.lastNumberPhone),F.xp6(1),F.Q6J("ngStyle",F.WLB(8,ne,e.data.styles.colors.dangerTextButtonColor,e.data.styles.colors.dangerColor))}}function se(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"form",2)(1,"div",3),F._UZ(2,"div",4)(3,"div",5),F.ALo(4,"safeHtml"),F.TgZ(5,"div",6),F.YNc(6,X,4,7,"ng-container",7),F.YNc(7,ie,6,11,"ng-container",7),F.qZA(),F.TgZ(8,"div",8)(9,"mat-form-field",9)(10,"mat-label"),F._uU(11," Código OTP "),F.qZA(),F.TgZ(12,"input",10),F.NdJ("change",(function(t){F.CHM(e);const n=F.oxw();return F.KtG(n.capturePasteEvent(t))}))("keyup",(function(t){F.CHM(e);const n=F.oxw();return F.KtG(n.setInputEvent(t))})),F.qZA()()()(),F.TgZ(13,"div",11)(14,"button",12),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.nextStep())})),F._uU(15,"Siguiente"),F.qZA()()()}if(2&e){const e=F.oxw();F.Q6J("formGroup",e.form),F.xp6(2),F.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),F.Q6J("innerHTML",e.texts.otp.title,F.oJD),F.xp6(1),F.Udp("color",e.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,18,e.texts.otp.description||""),F.oJD),F.xp6(3),F.Q6J("ngIf",e.secsCount&&e.secsCount>0),F.xp6(1),F.Q6J("ngIf",!e.secsCount||e.secsCount<=0),F.xp6(7),F.Udp("color",e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),F.Q6J("disabled",e.form.invalid)}}function re(e,t){if(1&e&&(F.TgZ(0,"div",15),F._UZ(1,"mat-progress-spinner",16),F.TgZ(2,"p",17),F._uU(3),F.qZA()()),2&e){const e=F.oxw();F.xp6(3),F.Oqu(e.loading)}}let oe=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.solucitudesService=n,this.activeRoute=i,this.next=new F.vpe(null),this.errPhone=new F.vpe(null),this.resendO=new F.vpe(null),this.secsCount=60,this.lastNumberPhone="XXX"}ngOnInit(){this.form=this.fb.group({code1:[null,[p.kI.required,p.kI.maxLength(6),p.kI.minLength(6)]]}),this.initSecsInterval(),this.activeRoute.queryParams.subscribe((e=>{e&&e.request_id&&(this.requestID=e.request_id)}),(e=>{console.error(e)})),this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastNumberPhone=t}initSecsInterval(){this.interv=setInterval((()=>{this.secsCount--,this.secsCount<=0&&this.finishSecsInterval()}),1e3)}finishSecsInterval(){this.interv&&clearInterval(this.interv)}nextStep(){let e={code:this.getCode()};this.next.emit(e)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){return(0,P.Z)((function*(){}))()}errorStep(){this.errPhone.emit(!0)}setInputEvent(e){""!=e.target.value?q(e.target).next().focus():"Backspace"==e.code&&q(e.target).prev().focus()}resendOTP(){this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.QS),F.Y36(U.F),F.Y36(_.M),F.Y36(O.gz))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-otp-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","gap-2","items-center","justify-start","w-full","max-w-[200px]"],["appearance","outline",1,"w-full","flex-1"],["tabindex","1","maxlength","6","minlength","1","formControlName","code1","type","text","matInput","",3,"change","keyup"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"info-time","w-fit",3,"ngStyle"],[1,"ml-4",3,"ngStyle","click"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(F.YNc(0,se,16,20,"form",0),F.YNc(1,re,4,1,"div",1)),2&e&&(F.Q6J("ngIf",!t.loading),F.xp6(1),F.Q6J("ngIf",t.loading))},dependencies:[i.O5,i.PC,u.lW,A.KE,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.nD,p.sg,p.u,y.Ou,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var ae=n(342);function le(e,t){if(1&e&&(F.TgZ(0,"div",3),F._UZ(1,"div",4)(2,"div",5),F.ALo(3,"safeHtml"),F.qZA()),2&e){const e=F.oxw();F.xp6(1),F.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),F.Q6J("innerHTML",e.texts.success.title,F.oJD),F.xp6(1),F.Udp("color",e.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(3,8,e.texts.success.description||""),F.oJD)}}function ce(e,t){if(1&e&&F._UZ(0,"widget-documents",6),2&e){const e=F.oxw();F.Q6J("userId",e.userId)("packId",e.packId)("requestID",e.requestID)}}function de(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div",7)(1,"button",8),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.gotoRedirect())})),F._uU(2),F.qZA()()}if(2&e){const e=F.oxw();F.xp6(1),F.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),F.xp6(1),F.hij(" ",e.data.ClientCertificate.btnTextCallBack||"Haga click aquí para finalizar"," ")}}let ue=(()=>{class e{constructor(e){this.utils=e,this.showDocuments=!1}ngOnInit(){this.data.ClientCertificate.enableUrlCallBack&&this.data.ClientCertificate.automaticRedirectCallBack&&this.data.ClientCertificate.callBackUrl?setTimeout((()=>{location.assign(this.data.ClientCertificate.callBackUrl)}),2e3):this.data.ClientCertificate.showDocumentsOnSuccess&&(this.showDocuments=!0)}gotoRedirect(){this.data.ClientCertificate.enableUrlCallBack&&this.data.ClientCertificate.callBackUrl&&location.assign(this.data.ClientCertificate.callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(F.Y36(U.F))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",loading:"loading",packId:"packId",requestID:"requestID",userId:"userId"},decls:3,vars:3,consts:[["class","pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],[3,"userId","packId","requestID",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"userId","packId","requestID"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(F.YNc(0,le,4,10,"div",0),F.YNc(1,ce,1,3,"widget-documents",1),F.YNc(2,de,3,7,"div",2)),2&e&&(F.Q6J("ngIf",!t.data.config.infiniteLoopInCompleted),F.xp6(1),F.Q6J("ngIf",t.showDocuments),F.xp6(1),F.Q6J("ngIf",t.data.ClientCertificate.enableUrlCallBack))},dependencies:[i.O5,u.lW,ae.A,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function he(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div",5)(1,"button",6),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.retry())})),F._uU(2,"Intentarlo nuevamente"),F.qZA()()}if(2&e){const e=F.oxw();F.xp6(1),F.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function pe(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div",5)(1,"button",6),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.newRequest())})),F._uU(2,"Crear nueva solicitud"),F.qZA()()}if(2&e){const e=F.oxw();F.xp6(1),F.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}let me=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.retryOp=new F.vpe(null),this.newReq=new F.vpe(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.QS),F.Y36(U.F),F.Y36(_.M),F.Y36(v.o),F.Y36(S.T))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",loading:"loading",solicitud:"solicitud"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(F.TgZ(0,"div",0)(1,"div",1),F._UZ(2,"div",2)(3,"div",3),F.ALo(4,"safeHtml"),F.qZA(),F.YNc(5,he,3,6,"div",4),F.YNc(6,pe,3,6,"div",4),F.qZA()),2&e&&(F.xp6(2),F.Q6J("innerHTML",t.texts.fail.title,F.oJD),F.xp6(1),F.Udp("color",t.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,6,t.texts.fail.description),F.oJD),F.xp6(2),F.Q6J("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),F.xp6(1),F.Q6J("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[i.O5,u.lW,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function fe(e,t){if(1&e&&(F.TgZ(0,"span",7),F._uU(1),F.qZA()),2&e){const e=F.oxw();F.xp6(1),F.hij("El archivo no puede pesar mas de ",e.max/1e3,"MB")}}function ge(e,t){if(1&e&&(F.TgZ(0,"span"),F._uU(1),F.qZA()),2&e){const e=F.oxw();F.xp6(1),F.AsE("",e.fileName," ",e.fileSize?"("+e.fileSize+"Kb)":"","")}}n(6866);const _e=function(e,t){return{"bg-red-500/20":e,"bg-slate-100/80":t}};let be=(()=>{class e{constructor(e){this.formBuilder=e,this.file=null,this.fileName="No se ha seleccionado ningun archivo",this.fileSize=0,this.acceptFiles="image/jpeg, image/jpg, application/pdf",this.max=1e4,this.newItemEvent=new F.vpe(null),this.toBase64=e=>new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=n}))}ngOnInit(){this.uploadForm=this.formBuilder.group({file:[""]})}fileChange(e){const t=e.target.files[0];this.uploadForm.patchValue({file:t}),this.uploadForm.get("file").updateValueAndValidity();const n=new FormData;let i=this.uploadForm.get("file").value;this.fileName=i.name,this.fileSize=+(+i.size/1e3).toFixed(1),n.append("file",i),console.warn(this.uploadForm.get("file").value),console.error(t),t.size<=3e6&&this.newItemEvent.emit({file:t}),this.newItemEvent.emit(n)}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.qu))},e.ɵcmp=F.Xpm({type:e,selectors:[["app-upload-file"]],inputs:{label:"label",acceptFiles:"acceptFiles",max:"max"},outputs:{newItemEvent:"change"},decls:11,vars:9,consts:[[1,"flex","flex-col","items-start","input-file-wrapper","my-1",3,"formGroup","ngClass"],["hidden","true","onclick","this.value=null","type","file","name","file",3,"accept","change"],["fileInput",""],[1,"flex","items-center","justify-start","mt-3"],["mat-flat-button","","color","accent",1,"btn-file",3,"click"],["class","text-red-500",4,"ngIf"],[4,"ngIf"],[1,"text-red-500"]],template:function(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"form",0)(1,"mat-label"),F._uU(2),F.qZA(),F.TgZ(3,"input",1,2),F.NdJ("change",(function(e){return t.fileChange(e)})),F.qZA(),F.TgZ(5,"div",3)(6,"button",4),F.NdJ("click",(function(){F.CHM(e);const t=F.MAs(4);return F.KtG(t.click())})),F._uU(7,"Seleccionar archivo"),F.qZA(),F._uU(8," "),F.YNc(9,fe,2,1,"span",5),F.YNc(10,ge,2,2,"span",6),F.qZA()()}2&e&&(F.Q6J("formGroup",t.uploadForm)("ngClass",F.WLB(6,_e,!t.fileName||t.fileSize>3e3,t.fileName&&t.fileSize<=3e3)),F.xp6(2),F.Oqu(t.label),F.xp6(1),F.Q6J("accept",t.acceptFiles),F.xp6(6),F.Q6J("ngIf",t.fileSize>t.max),F.xp6(1),F.Q6J("ngIf",t.fileSize<=t.max))},dependencies:[i.mk,i.O5,p._Y,p.JL,p.sg,A.hX,u.lW],styles:["button[aria-pressed=true][_ngcontent-%COMP%]{color:red!important}.btn-file[_ngcontent-%COMP%]{max-width:200px}.input-file-wrapper[_ngcontent-%COMP%]{padding:.7rem .5rem .7rem 1rem;border-radius:5px;border:2px dashed rgba(0,0,0,.1)}"]}),e})();function ve(e,t){if(1&e&&(F.TgZ(0,"mat-hint",21),F._uU(1),F.qZA()),2&e){const e=F.oxw(2);F.xp6(1),F.Oqu(e.errorDNI)}}function ye(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"form",2)(1,"div",3),F._UZ(2,"div",4)(3,"div",5),F.ALo(4,"safeHtml"),F.qZA(),F.TgZ(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),F._uU(8,"Nombre de la persona responsable"),F.qZA(),F._UZ(9,"input",8),F.qZA(),F.TgZ(10,"mat-form-field",7)(11,"mat-label"),F._uU(12,"Primer apellido de la persona responsable"),F.qZA(),F._UZ(13,"input",9),F.qZA(),F.TgZ(14,"mat-form-field",7)(15,"mat-label"),F._uU(16,"Segundo apellido de la persona responsable"),F.qZA(),F._UZ(17,"input",10),F.qZA(),F.TgZ(18,"mat-form-field",7)(19,"mat-label"),F._uU(20,"Email"),F.qZA(),F._UZ(21,"input",11),F.qZA(),F.TgZ(22,"mat-form-field",7)(23,"mat-label"),F._uU(24,"Teléfono"),F.qZA(),F._UZ(25,"input",12),F.qZA(),F.TgZ(26,"mat-form-field",7)(27,"mat-label"),F._uU(28,"Número de documento de identificación"),F.qZA(),F._UZ(29,"input",13),F.YNc(30,ve,2,1,"mat-hint",14),F.qZA(),F.TgZ(31,"mat-form-field",7)(32,"mat-label"),F._uU(33,"Razón social"),F.qZA(),F._UZ(34,"input",15),F.qZA(),F.TgZ(35,"mat-form-field",7)(36,"mat-label"),F._uU(37,"CIF"),F.qZA(),F._UZ(38,"input",16),F.qZA(),F.TgZ(39,"app-upload-file",17),F.NdJ("change",(function(t){F.CHM(e);const n=F.oxw();return F.KtG(n.setAnvers(t))})),F.qZA(),F.TgZ(40,"app-upload-file",18),F.NdJ("change",(function(t){F.CHM(e);const n=F.oxw();return F.KtG(n.setRevers(t))})),F.qZA()(),F.TgZ(41,"div",19)(42,"button",20),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.nextStep())})),F._uU(43," Siguiente "),F.qZA()()()}if(2&e){const e=F.oxw();F.Q6J("formGroup",e.form),F.xp6(2),F.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),F.Q6J("innerHTML",e.texts.form.title,F.oJD),F.xp6(1),F.Udp("color",e.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,51,e.texts.form.description||""),F.oJD),F.xp6(3),F.Gre("",e.disabledInputs.name?"disabled-input":""," w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.name?-1:1),F.xp6(1),F.Gre("",e.disabledInputs.lastname?"disabled-input":""," w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.lastname?-1:1),F.xp6(1),F.Gre("",e.disabledInputs.secondlastname?"disabled-input":""," w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.secondlastname?-1:1),F.xp6(1),F.Gre("",e.disabledInputs.email?"disabled-input":""," w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.email?-1:1),F.xp6(1),F.Gre("",e.disabledInputs.phone?"disabled-input":""," w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.phone?-1:1),F.xp6(1),F.Gre("",e.disabledInputs.dni?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.dni?-1:1),F.xp6(1),F.Q6J("ngIf",e.errorDNI),F.xp6(1),F.Gre("",e.disabledInputs.razon?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.razon?-1:1),F.xp6(1),F.Gre("",e.disabledInputs.cif?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),F.xp6(3),F.s9C("tabindex",e.disabledInputs.cif?-1:1),F.xp6(1),F.Q6J("max",2e3),F.xp6(1),F.Q6J("max",2e3),F.xp6(2),F.Udp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),F.Q6J("disabled",e.form.invalid)}}function we(e,t){if(1&e&&(F.TgZ(0,"div",22),F._UZ(1,"mat-progress-spinner",23),F.TgZ(2,"p",24),F._uU(3),F.qZA()()),2&e){const e=F.oxw();F.xp6(3),F.hij(" ",e.loading," ")}}const xe={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Ce=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.cd=n,this.next=new F.vpe(null),this.disabledInputs={dni:!1,name:!1,lastname:!1,secondlastname:!1,phone:!1,email:!1,razon:!1,cif:!1,type:!1}}ngOnInit(){this.setForm(this.solicitud?this.solicitud:null)}setForm(e){let t=e&&e.person_name?e.person_name:null,n=e&&(e.email||e.email_copy)?e.email||e.email_copy:null,i=e&&e.person_last_name?e.person_last_name:null,s=e&&e.person_last_name2?e.person_last_name2:null,r=e?e.person_document_number||e.document_number:null,o=e&&e.razon_social?e.razon_social:null,a=e&&e.cif?e.cif:null,l=e&&e.phone?e.phone:null;this.form=this.fb.group({name:[t||null,[p.kI.required]],lastname:[i||null,[p.kI.required]],lastname2:[s||null],dni:[r||null,[p.kI.required,p.kI.maxLength(9),p.kI.minLength(9),this.regexDNI()]],razon:[o||null,[p.kI.required]],email:[n,[p.kI.required,p.kI.email]],phone:[l,[p.kI.required]],cif:[a||null,[p.kI.required,p.kI.minLength(9),p.kI.maxLength(9)]],document_front:[null,[p.kI.required]],document_back:[null,[p.kI.required]]}),this.requestIDFromURL&&this.disableEnableInputs(!1,t,i,s,n,l,r,o,a),this.cd.markForCheck()}disableEnableInputs(e,t,n,i,s,r,o,a,l){this.disabledInputs={name:t||!1,lastname:n||!1,secondlastname:i||!1,email:s||!1,phone:r||!1,dni:o||!1,razon:a||!1,cif:l||!1,type:e||!1}}if(e){this.setRegex(e)}regexDNI(){return e=>{const t=e.value;return t?(this.setRegex(t),this.isDni||this.isNie?null:{regexDNI:!0}):null}}setRegex(e){e&&(this.isDni=!!e.toUpperCase().match(/^(\d{8})([A-Z])$/),this.isNie=!!e.toUpperCase().match(/^[XYZ]\d{7,8}[A-Z]$/),console.warn(this.isDni,this.isNie),this.errorDNI=this.isDni||this.isNie?null:"Debes ingresar un DNI o NIE válido!",this.cd.markForCheck())}setAnvers(e){e&&e.file&&this.form.patchValue({document_front:e.file})}setRevers(e){e&&e.file&&this.form.patchValue({document_back:e.file})}nextStep(){let e={name:this.form.get("name").value,lastname:this.form.get("lastname").value,lastname2:this.form.get("lastname2").value,dni:this.form.get("dni").value,company_name:this.form.get("razon").value,cif:this.form.get("cif").value,document_front:this.form.get("document_front").value,document_back:this.form.get("document_back").value,first_surname:this.form.get("lastname").value,second_surname:this.form.get("lastname2").value,email_copy:this.form.get("email").value,phone:this.form.get("phone").value,document_number:this.form.get("dni").value,check_legal:!0,type:"LEGAL",rmc_validation:!0,validation_id:!0};this.data.config.activatePower&&(e.power_activate=1),this.next.emit(e)}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.QS),F.Y36(U.F),F.Y36(F.sBO))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-form-step"]],inputs:{data:"data",flowName:"flowName",texts:"texts",solicitud:"solicitud",loading:"loading",requestIDFromURL:"requestIDFromURL"},outputs:{next:"nextStep"},features:[F._Bn([{provide:T.sG,useValue:xe},{provide:F.soG,useValue:"es-ES"}])],decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline"],["formControlName","name","matInput","",3,"tabindex"],["formControlName","lastname","matInput","",3,"tabindex"],["formControlName","lastname2","matInput","",3,"tabindex"],["formControlName","email","matInput","",3,"tabindex"],["formControlName","phone","maxlength","9","matInput","",3,"tabindex"],["formControlName","dni","maxlength","9","placeholder","Ej: 12345678R","matInput","",3,"tabindex"],["class","text-xs text-red-500",4,"ngIf"],["formControlName","razon","placeholder","Ej: Mi Empresa","type","text","matInput","",3,"tabindex"],["formControlName","cif","maxlength","9","placeholder","Ej: B12345678","type","text","matInput","",3,"tabindex"],["label","Anverso documento de identificación (Max 2MB)",1,"w-full",3,"max","change"],["label","Reverso documento de identificación (Max 2MB)",1,"w-full",3,"max","change"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-xs","text-red-500"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(F.YNc(0,ye,44,53,"form",0),F.YNc(1,we,4,1,"div",1)),2&e&&(F.Q6J("ngIf",!t.loading),F.xp6(1),F.Q6J("ngIf",t.loading))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.nD,p.sg,p.u,y.Ou,be,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),ke=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts",loading:"loading"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(F.TgZ(0,"form",0)(1,"div",1),F._UZ(2,"div",2)(3,"div",3),F.ALo(4,"safeHtml"),F.qZA()()),2&e&&(F.xp6(2),F.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),F.Q6J("innerHTML",t.texts.noService.title,F.oJD),F.xp6(1),F.Udp("color",t.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,8,t.texts.noService.description),F.oJD))},dependencies:[p._Y,p.JL,p.F,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Te=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.retryOp=new F.vpe(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return"Abandonado después de esperar OTP de Seguridad Social";case"abandoned_after_invalid_otp_seguridad_social":return"Abandonado despues de OTP inválido en Seguridad Social";case"abandoned_after_invalid_otp_aeat":return"Abandonado despues de OTP inválido en AEAT";case"abandoned_after_waiting_otp_aeat":return"Abandonado después de esperar OTP de AEAT";default:return this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.QS),F.Y36(U.F),F.Y36(_.M),F.Y36(v.o),F.Y36(S.T))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",loading:"loading",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:10,vars:17,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-2","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-md","mb-2","mt-2"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(F.TgZ(0,"div",0)(1,"div",1),F._UZ(2,"div",2)(3,"div",3),F.ALo(4,"safeHtml"),F.TgZ(5,"div",4),F._uU(6),F.qZA()(),F.TgZ(7,"div",5)(8,"button",6),F.NdJ("click",(function(){return t.retry()})),F._uU(9,"Intentarlo nuevamente"),F.qZA()()()),2&e&&(F.xp6(2),F.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),F.Q6J("innerHTML",t.texts.abandoned.title,F.oJD),F.xp6(1),F.Udp("color",t.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,15,t.texts.abandoned.description),F.oJD),F.xp6(3),F.hij(" Estado: ",t.getTextStatus()," "),F.xp6(2),F.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Se(e,t){return n=>{const i=n.controls[t];i.errors&&!i.errors.confirmedValidator||i.setErrors(n.controls[e].value!==i.value?{confirmedValidator:!0}:null)}}function Me(e,t){1&e&&(F.TgZ(0,"mat-hint",14),F._uU(1," La contraseña es requerida "),F.qZA())}function Ie(e,t){1&e&&(F.TgZ(0,"mat-hint",14),F._uU(1," La contraseña debe tener al menos 8 carácteres "),F.qZA())}function Ee(e,t){1&e&&(F.TgZ(0,"mat-hint",14),F._uU(1," Es necesario repetir la contraseña "),F.qZA())}function Oe(e,t){1&e&&(F.TgZ(0,"mat-hint",14),F._uU(1," Las contraseñas deben coincidir "),F.qZA())}function Le(e,t){1&e&&(F.TgZ(0,"mat-hint",14),F._uU(1," La contraseña debe tener al menos 8 carácteres "),F.qZA())}function Pe(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"form",2)(1,"div",3),F._UZ(2,"div",4)(3,"div",5),F.ALo(4,"safeHtml"),F.qZA(),F.TgZ(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),F._uU(8,"Contraseña"),F.qZA(),F._UZ(9,"input",8),F.YNc(10,Me,2,0,"mat-hint",9),F.YNc(11,Ie,2,0,"mat-hint",9),F.qZA(),F.TgZ(12,"mat-form-field",10)(13,"mat-label"),F._uU(14,"Repite Contraseña"),F.qZA(),F._UZ(15,"input",11),F.YNc(16,Ee,2,0,"mat-hint",9),F.YNc(17,Oe,2,0,"mat-hint",9),F.YNc(18,Le,2,0,"mat-hint",9),F.qZA()(),F.TgZ(19,"div",12)(20,"button",13),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.nextStep())})),F._uU(21," Guardar "),F.qZA()()()}if(2&e){const e=F.oxw();F.Q6J("formGroup",e.form),F.xp6(2),F.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),F.Q6J("innerHTML",e.texts.password.title,F.oJD),F.xp6(1),F.Udp("color",e.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,21,e.texts.password.description),F.oJD),F.xp6(7),F.Q6J("ngIf",e.f.password.touched&&e.f.password.invalid&&e.f.password.errors.required),F.xp6(1),F.Q6J("ngIf",e.f.password.invalid&&e.f.password.errors.minlength),F.xp6(5),F.Q6J("ngIf",e.f.confirm_password.touched&&e.f.confirm_password.touched&&e.f.confirm_password.invalid&&e.f.confirm_password.errors.required),F.xp6(1),F.Q6J("ngIf",e.f.confirm_password.touched&&e.f.confirm_password.touched&&e.f.confirm_password.invalid&&e.f.confirm_password.errors.confirmedValidator),F.xp6(1),F.Q6J("ngIf",e.f.confirm_password.invalid&&e.f.confirm_password.errors.minlength),F.xp6(2),F.Udp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),F.Q6J("disabled",e.form.invalid)}}function De(e,t){if(1&e&&(F.TgZ(0,"div",15),F._UZ(1,"mat-progress-spinner",16),F.TgZ(2,"p",17),F._uU(3),F.qZA()()),2&e){const e=F.oxw();F.xp6(3),F.hij(" ",e.loading," ")}}const Ae={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Ne=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.form=new p.cw({}),this.next=new F.vpe(null)}ngOnInit(){this.setForm()}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({password:["",[p.kI.required]],confirm_password:["",[p.kI.required]]},{validator:Se("password","confirm_password")})}nextStep(){this.next.emit(this.form.get("password").value)}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.qu),F.Y36(U.F))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-password-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading"},outputs:{next:"nextStep"},features:[F._Bn([{provide:T.sG,useValue:Ae},{provide:F.soG,useValue:"es-ES"}])],decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","password","minlength","8","type","password","matInput",""],["class","text-red-500",4,"ngIf"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","confirm_password","minlength","8","type","password","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-red-500"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(F.YNc(0,Pe,22,23,"form",0),F.YNc(1,De,4,1,"div",1)),2&e&&(F.Q6J("ngIf",!t.loading),F.xp6(1),F.Q6J("ngIf",t.loading))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.sg,p.u,y.Ou,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var qe=n(1763),Ye=n(5696);function Re(e,t){1&e&&F._UZ(0,"mat-icon",14)}function Fe(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div")(1,"belender-checkbox",11),F.NdJ("changeCheckbox",(function(t){F.CHM(e);const n=F.oxw(2);return F.KtG(n.setTerms(t))})),F.TgZ(2,"belender-terms-and-policy-links",12),F.NdJ("goToTerms",(function(t){F.CHM(e);const n=F.oxw(2);return F.KtG(n.gotoTermsAndConditions(t))})),F.qZA()(),F.YNc(3,Re,1,0,"mat-icon",13),F.qZA()}if(2&e){const e=F.oxw(2);F.Gre("mt-8 flex justify-between items-center w-full flex-100 ",e.errorType.termsRead||e.errorType.acceptTerms?"bg-orange-500/10 ":""," pr-4 rounded-sm"),F.xp6(1),F.Q6J("color",e.data.styles.colors.title),F.xp6(1),F.Q6J("userId",e.userId)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink),F.xp6(1),F.Q6J("ngIf",e.errorType.termsRead||e.errorType.acceptTerms)}}function Ue(e,t){1&e&&F._UZ(0,"mat-icon",14)}function Ze(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div")(1,"belender-checkbox",11),F.NdJ("changeCheckbox",(function(t){F.CHM(e);const n=F.oxw(2);return F.KtG(n.setPower(t))})),F._uU(2," Consiento expresamente a la activación de un poder digital según las condiciones que pueden verse "),F.TgZ(3,"a",15),F.NdJ("click",(function(t){F.CHM(e);const n=F.oxw(2);return F.KtG(n.gotoPowerConditions(t))})),F.TgZ(4,"u"),F._uU(5,"aquí"),F.qZA()()(),F.YNc(6,Ue,1,0,"mat-icon",13),F.qZA()}if(2&e){const e=F.oxw(2);F.Gre("flex justify-between items-center w-full flex-100 ",e.errorType.termsRead||e.errorType.powerAccept?"bg-orange-500/10 ":"",""),F.xp6(1),F.Q6J("color",e.data.styles.colors.title),F.xp6(5),F.Q6J("ngIf",e.errorType.powerAccept)}}function He(e,t){1&e&&F._UZ(0,"mat-icon",14)}function je(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div")(1,"belender-checkbox",11),F.NdJ("changeCheckbox",(function(t){F.CHM(e);const n=F.oxw(2);return F.KtG(n.setAssignment(t))})),F._UZ(2,"div",16),F.qZA(),F.YNc(3,He,1,0,"mat-icon",13),F.qZA()}if(2&e){const e=F.oxw(2);F.Gre("flex justify-between items-center w-full flex-100 ",e.errorType.assignment?"bg-orange-500/10 ":""," pr-4 rounded-sm"),F.xp6(1),F.Q6J("color",e.data.styles.colors.title),F.xp6(1),F.Q6J("innerHTML",null==e.data?null:e.data.config.dataAssignmentText,F.oJD),F.xp6(1),F.Q6J("ngIf",e.errorType.assignment)}}function ze(e,t){if(1&e&&(F.TgZ(0,"div",19),F._UZ(1,"mat-icon",20),F._uU(2),F.qZA()),2&e){const e=F.oxw().$implicit;F.xp6(2),F.hij(" ",e," ")}}function Be(e,t){if(1&e&&(F.ynx(0),F.YNc(1,ze,3,1,"div",18),F.BQk()),2&e){const e=t.index;F.xp6(1),F.Q6J("ngIf",e<3)}}function Je(e,t){if(1&e&&(F.ynx(0),F.YNc(1,Be,2,1,"ng-container",17),F.BQk()),2&e){const e=F.oxw(2);F.xp6(1),F.Q6J("ngForOf",e.errors)}}function Ve(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div",2)(1,"div",3),F._UZ(2,"div",4)(3,"div",5),F.ALo(4,"safeHtml"),F.qZA(),F.TgZ(5,"div",6),F.YNc(6,Fe,4,7,"div",7),F.YNc(7,Ze,7,5,"div",7),F.YNc(8,je,4,6,"div",7),F.qZA(),F.YNc(9,Je,2,1,"ng-container",8),F.TgZ(10,"div",9)(11,"button",10),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.nextStep())})),F._uU(12,"Siguiente"),F.qZA()()()}if(2&e){const e=F.oxw();F.xp6(2),F.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),F.Q6J("innerHTML",e.texts.tyc.title,F.oJD),F.xp6(1),F.Udp("color",e.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(4,19,e.texts.tyc.description||""),F.oJD),F.xp6(3),F.Q6J("ngIf",!e.data.config.hideCheckLegal),F.xp6(1),F.Q6J("ngIf",e.requestID?null==e.solicitud?null:e.solicitud.power_activate:null==e.data?null:e.data.config.activatePower),F.xp6(1),F.Q6J("ngIf",null==e.data?null:e.data.config.dataAssignmentCheck),F.xp6(1),F.Q6J("ngIf",e.errors&&e.errors.length),F.xp6(2),F.Udp("color",e.getErrorValidation()?"":e.data.styles.colors.btnText)("background",e.getErrorValidation()?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),F.Q6J("disabled",e.getErrorValidation())}}function Qe(e,t){if(1&e&&(F.TgZ(0,"div",21),F._UZ(1,"mat-progress-spinner",22),F.TgZ(2,"p",23),F._uU(3),F.qZA()()),2&e){const e=F.oxw();F.xp6(3),F.Oqu(e.loading)}}let We=(()=>{class e{constructor(e){this.utils=e,this.requestID=null,this.powerAccepted=!1,this.next=new F.vpe(null),this.goTerms=new F.vpe(null),this.goTermsCert=new F.vpe(null),this.gotoPower=new F.vpe(null),this.acceptTerms=!1,this.acceptTerms2=!0,this.powerActivate=!1,this.termsReaded=!1,this.terms2Readed=!0,this.assignment=!1,this.errors=[],this.errorType={termsRead:!1,terms2Read:!1,powerRead:!1,powerAccept:!1,acceptTerms:!1,acceptTerms2:!1,assignment:!1,acceptPower:!1}}ngOnInit(){}nextStep(){this.next.emit(this.powerActivate)}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.termsReaded=!0,this.goTerms.emit(!0)}gotoTermsAndConditionsCertificate(e){e.preventDefault(),e.stopPropagation(),this.terms2Readed=!0,this.goTermsCert.emit(!0)}gotoPowerConditions(e){e.preventDefault(),e.stopPropagation(),this.gotoPower.emit(!0)}setAssignment(e){this.assignment=e}setPower(e){this.powerActivate=e}setTerms(e){this.acceptTerms=e}setTerms2(e){this.acceptTerms2=e}getErrorValidation(){this.errors=[],this.errorType={termsRead:!1,terms2Read:!1,powerRead:!1,powerAccept:!1,acceptTerms:!1,acceptTerms2:!1,assignment:!1,acceptPower:!1};let e=!1;return this.data.config.forceChecks&&(!this.termsReaded&&!this.data.config.hideCheckLegal&&(this.errors.push("Debe leer los términos y condiciones del servicio"),this.errorType.termsRead=!0,e=!0),this.terms2Readed||(this.errors.push("Debe leer los términos y condiciones para la emisión de certificado"),this.errorType.terms2Read=!0,e=!0)),!this.acceptTerms&&!this.data.config.hideCheckLegal&&(this.errors.push("Debe aceptar los términos y condiciones del servicio"),this.errorType.acceptTerms=!0,e=!0),this.acceptTerms2||(this.errors.push("Debe aceptar los términos y condiciones para la emisión de certificado"),this.errorType.acceptTerms2=!0,e=!0),this.data.config.dataAssignmentCheck&&!this.assignment&&(this.errors.push("Debe consentir la activación de un poder digital registrado en el REA"),this.errorType.assignment=!0,e=!0),(this.requestID?this.solicitud?.power_activate:this.data?.config.activatePower)&&(this.powerActivate||(this.errors.push("Debe consentir la activación de un poder digital registrado en el REA"),this.errorType.powerAccept=!0,e=!0)),e}}return e.ɵfac=function(t){return new(t||e)(F.Y36(U.F))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-terms-step"]],inputs:{userId:"userId",requestID:"requestID",data:"data",texts:"texts",solicitud:"solicitud",loading:"loading",powerAccepted:"powerAccepted"},outputs:{next:"nextStep",goTerms:"goToTerms",goTermsCert:"goToTermsCertificate",gotoPower:"gotoPowerConditions"},decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],[3,"class",4,"ngIf"],[4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"color","changeCheckbox"],[3,"userId","showPolicyLink","goToTerms"],["class","text-xs w-4 h-4 text-orange-500","svgIcon","mat:warning",4,"ngIf"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4","text-orange-500"],["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],[1,"custom-html",3,"innerHTML"],[4,"ngFor","ngForOf"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500 ",4,"ngIf"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(F.YNc(0,Ve,13,21,"div",0),F.YNc(1,Qe,4,1,"div",1)),2&e&&(F.Q6J("ngIf",!t.loading),F.xp6(1),F.Q6J("ngIf",t.loading))},dependencies:[i.sg,i.O5,d.Hw,u.lW,y.Ou,qe.b,Ye.T,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Ge=n(4468);function $e(e,t){1&e&&(F.TgZ(0,"div",12),F._UZ(1,"mat-icon",13),F._uU(2," Archivo firmado cargado "),F.qZA())}function Ke(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"button",14),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw(2);return F.KtG(t.onClickAutofirma())})),F._uU(1,"Firmar certificado"),F.qZA()}if(2&e){const e=F.oxw(2);F.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function Xe(e,t){1&e&&(F.TgZ(0,"div",15),F._UZ(1,"mat-progress-spinner",16),F.TgZ(2,"span",17),F._uU(3,"Esperando autofirma..."),F.qZA()())}function et(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"form",2)(1,"div",3)(2,"h1",4),F._uU(3,"HOJA DE ACEPTACIÓN DE CERTIFICADO ELECTRONICO CUALIFICADO RÉGIMEN OBLIGATORIO DE USO DEL CERTIFICADO ELECTRONICO: “CERTIFICADO DE PERSONA FÍSICA REPRESENTANTE DE EMPRESA EMITIDO EN SOFTWARE”"),F.qZA(),F.TgZ(4,"p"),F._uU(5," a) Que existen unas condiciones generales del servicio incorporadas en el texto de divulgación del certificado o PDS, y una declaración de prácticas de certificación, que regulan la emisión y utilización del certificado electrónico emitido porvinCAsign, cuyo texto íntegro se puede consultar en la dirección de Internet, https://policy.vincasign.net. "),F.qZA(),F.TgZ(6,"p"),F._uU(7," b) Que el certificado electrónico emitido y el resto de los elementos que forman parte de la identificación electrónica son únicos para cada usuario. El certificado debe ser protegido por un código secreto (PIN), que sólo conoce el titular y que le será entregado en el momento de la emisión del certificado. Para utilizar el certificado es imprescindible conocer este código. "),F.qZA(),F.TgZ(8,"p"),F._uU(9," c) Que este certificado permite al titular del certificado generar firmas electrónicas e identificarse de forma electrónica en aquellos sistemas de información que soporten este tipo de autenticación. "),F.qZA(),F.TgZ(10,"p"),F._uU(11," d) Que el FIRMANTE debe custodiar, de forma diligente, el PIN que permite utilizarlo, para evitar que otras personas puedan suplantar su identidad y firmar documentos en su nombre, o acceder a mensajes confidenciales o sistemas de información de acceso restringido. "),F.qZA(),F.TgZ(12,"p"),F._uU(13," e) Que, si el FIRMANTE detecta cualquier indicio de que su identificación electrónica ha podido ser utilizada por otras personas, tendrá que suspender el uso del certificado y notificarlo inmediatamente al responsable del servicio de certificación del SUSCRIPTOR, o a vinCAsign, para pedir la revocación del certificado y, en su caso, la emisión de uno nuevo. "),F.qZA(),F.TgZ(14,"p"),F._uU(15," f) Que ante cualquier necesidad de información adicional, respecto de la utilización de los certificados emitidos en nombre de vinCAsign, el FIRMANTE se podrá dirigir al SUSCRIPTOR, al responsable del servicio de certificación del SUSCRIPTOR, y/o a VINTEGRIS. "),F.qZA(),F.TgZ(16,"p"),F._uU(17," g) Que con el fin de obtener los correspondientes certificados, y dentro del marco del Reglamento (UE) 2016/679 del Parlamento Europeo y del Consejo de 27 de abril de 2016 relativo a la protección de las personas físicas en lo que respecta al tratamiento de datos personales y a la libre circulación de estos datos y por el que se deroga la Directiva 95/46/CE (Reglamento general de protección de datos), el SUSCRIPTOR ha comunicado a vinCAsign los datos identificativos del FIRMANTE con el fin de emitir y gestionar el certificado corporativo de persona física emitido en software, en el ámbito de la relación de trabajo entre dicho FIRMANTE y el SUSCRIPTOR, todo ello a los efectos de lo previsto en el artículo 28 del Reglamento general de protección de datos. "),F.qZA(),F.TgZ(18,"p"),F._uU(19," h) Que sabe que, en cumplimiento de lo establecido en los artículos 24.2 y 28 del Reglamento (UE) 910/2014 del Parlamento Europeo y del Consejo de 23 de julio de 2014, los datos contenidos en el certificado corporativo de persona física emitido en software están publicados en la página web de vinCAsign a efectos del Registro de Certificados y de las listas de revocación, toda vez que ha prestado su consentimiento durante el proceso de solicitud. "),F.qZA(),F.TgZ(20,"h1",5),F._uU(21," ACTO DE ACEPTACIÓN DEL CERTIFICADO ELECTRÓNICO "),F.qZA(),F.TgZ(22,"p"),F._uU(23," Firmo el presente documento para dejar constancia: "),F.qZA(),F.TgZ(24,"p"),F._uU(25," Que ha sido informado del contenido del texto de divulgación del certificado o PDS, en el que se incluyen las condiciones generales del servicio aplicable al certificado corporativo de persona física emitido en software. "),F.qZA(),F.TgZ(26,"p"),F._uU(27," Que ha sido informado del régimen obligatorio de uso del certificado emitido, sus condiciones de uso y sus responsabilidades. "),F.qZA(),F.TgZ(28,"p"),F._uU(29," Que ha sido informado de las circunstancias relativas al tratamiento de sus datos personales para la correcta emisión y gestión del certificado que se emite. "),F.qZA(),F.TgZ(30,"p"),F._uU(31," Firma de conformidad, en virtud de la cual ha leído y entiende las obligaciones y responsabilidades que asume. "),F.qZA(),F.TgZ(32,"div",6),F.YNc(33,$e,3,0,"div",7),F.YNc(34,Ke,2,6,"button",8),F.YNc(35,Xe,4,0,"div",9),F.qZA()(),F.TgZ(36,"div",10)(37,"button",11),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.nextStep())})),F._uU(38,"Completar"),F.qZA()()()}if(2&e){const e=F.oxw();F.Q6J("formGroup",e.form),F.xp6(33),F.Q6J("ngIf",e.signedFile&&!e.loadingAutofirma),F.xp6(1),F.Q6J("ngIf",!e.signedFile&&!e.loadingAutofirma),F.xp6(1),F.Q6J("ngIf",e.loadingAutofirma),F.xp6(2),F.Udp("color",e.signedFile?e.data.styles.colors.btnText:"")("background",e.signedFile?e.data.styles.colors.btnBg:"")("border-radius",e.data.styles.btnRound+"px"),F.Q6J("disabled",!e.signedFile)}}function tt(e,t){if(1&e&&(F.TgZ(0,"div",18),F._UZ(1,"mat-progress-spinner",19),F.TgZ(2,"p",20),F._uU(3),F.qZA()()),2&e){const e=F.oxw();F.xp6(3),F.Oqu(e.loading)}}let nt=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.notis=t,this.utils=n,this._autofirma=i,this.form=new p.cw({}),this.next=new F.vpe(null),this.loadingAutofirma=!1}ngOnInit(){this.setForm(),this.blobFile=this.base64ToBlob(this.pdfFile64,"application/pdf");const e=URL.createObjectURL(this.blobFile);this.pdfHtml="<iframe width='100%' height='100%' src='"+e+"'></iframe>",this.pdfHtml+=`<img style="width: 100%; min-heigth: 300px" src="${e}" />`}base64ToBlob(e,t="application/octet-stream"){const n=atob(e),i=n.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=n.charCodeAt(e);return new Blob([s],{type:t})}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({file_signed:["",[p.kI.required]]})}nextStep(){this.next.emit({file_signed:this.signedFile})}onChangeFile(e){const t=e.target;!t||!t.files||(this.file=t.files[0])}blobToFile(e,t){return e.lastModifiedDate=new Date,e.name=t,e}onClickAutofirma(){var e=this;return(0,P.Z)((function*(){e.loadingAutofirma=!0;let t,n="signed_document";e.file=e.blobToFile(e.blobFile,n),e._autofirma.requestPDFSignature(e.file,{headless:!0,filters:{"issuer.rfc2254":"(CN=AC Representa*)"}}).then((i=>{t=i,e.loadingAutofirma=!1;let s=new File([t],n+"_signed.pdf",{type:e.file.type});e.signedFile=s,e.nextStep()})).catch((t=>{t?.message?.includes("ApplicationNotFoundException")?e.notis.showAlert("No se encuentra AutoFirma","No se ha encontrado el programa de autofirma instalado en su computador, por favor descarguelo en el siguiente link y vuelva a intentarlo.","info",{cancelButtonLabel:"Ir a Autofirma",okButtonLabel:"Cerrar",cancelAction:function(){window.open("https://firmaelectronica.gob.es/Home/Descargas.html","_blank")}}):e.notis.showAlert("Error desconocido","Ha ocurrido un error: "+t)}))}))()}fileToUrl(e){return new Promise(((t,n)=>{const i=new FileReader;i.onloadend=()=>{t(i.result)},i.readAsDataURL(e)}))}setAnvers(e){e&&e.file&&this.form.patchValue({document_front:e.file})}setRevers(e){e&&e.file&&this.form.patchValue({document_back:e.file})}}return e.ɵfac=function(t){return new(t||e)(F.Y36(p.qu),F.Y36(S.T),F.Y36(U.F),F.Y36(Ge.Kj))},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-autofirma-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading",pdfFile64:"pdfFile64"},outputs:{next:"nextStep"},decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"my-3","bg-slate-50","p-2","rounded-md","flex","max-h-[300px]","overflow-y-auto","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],[1,"font-bold"],[1,"pt-3","font-bold"],[1,"flex","w-full","items-center","justify-end","gap-2","p-4"],["class","flex gap-1 text-green-500 items-center justify-end w-full",4,"ngIf"],["class","px-8","mat-flat-button","","type","button",3,"color","background","border-radius","click",4,"ngIf"],["class","flex items-center gap-2",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"flex","gap-1","text-green-500","items-center","justify-end","w-full"],["svgIcon","mat:check_circle"],["mat-flat-button","","type","button",1,"px-8",3,"click"],[1,"flex","items-center","gap-2"],["color","accent","diameter","20","value","0","mode","indeterminate",1,"spinner"],[1,"text-black"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(F.YNc(0,et,39,11,"form",0),F.YNc(1,tt,4,1,"div",1)),2&e&&(F.Q6J("ngIf",!t.loading),F.xp6(1),F.Q6J("ngIf",t.loading))},dependencies:[i.O5,d.Hw,u.lW,p._Y,p.JL,p.sg,y.Ou],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),it=(()=>{class e{constructor(){this.next=new F.vpe(null)}ngOnInit(){}nextStep(){this.next.emit(!0)}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=F.Xpm({type:e,selectors:[["belender-requisites-step"]],inputs:{data:"data",texts:"texts",loading:"loading"},outputs:{next:"nextStep"},decls:15,vars:18,consts:[[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"py-4"],["href","https://firmaelectronica.gob.es/Home/Descargas.html","target","_blank",1,"text-blue-500","font-bold","underline"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(F.TgZ(0,"div",0),F._UZ(1,"div",1)(2,"div",2),F.ALo(3,"safeHtml"),F.TgZ(4,"div",3),F._uU(5," Si no tiene "),F.TgZ(6,"strong"),F._uU(7,"Autofirma"),F.qZA(),F._uU(8," instalado, antes de continuar, puedes instalarlo siguiendo este "),F.TgZ(9,"a",4),F._uU(10,"link"),F.qZA(),F._uU(11,". "),F.qZA(),F.TgZ(12,"div",5)(13,"button",6),F.NdJ("click",(function(){return t.nextStep()})),F._uU(14,"Siguiente"),F.qZA()()()),2&e&&(F.xp6(1),F.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),F.Q6J("innerHTML",null==t.texts||null==t.texts.requisites?null:t.texts.requisites.title,F.oJD),F.xp6(1),F.Udp("color",t.data.styles.colors.text),F.Q6J("innerHTML",F.lcZ(3,16,null==t.texts||null==t.texts.requisites?null:t.texts.requisites.description),F.oJD),F.xp6(2),F.Udp("color",t.data.styles.colors.text),F.xp6(9),F.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,W.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function st(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"vex-power-cert",4),F.NdJ("accept",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.acceptPowerCert())})),F.qZA()}if(2&e){const e=F.oxw();F.Q6J("hideButtons",!1)("flow","ClientCertificate")("userId",e.userId)}}function rt(e,t){if(1&e&&(F.TgZ(0,"div",10),F._UZ(1,"img",11),F.qZA()),2&e){const e=F.oxw(2);F.xp6(1),F.Q6J("src",e.data.styles.logoUrl,F.LSH)}}function ot(e,t){1&e&&(F.TgZ(0,"div",12),F._UZ(1,"mat-progress-spinner",13),F.qZA()),2&e&&(F.xp6(1),F.Q6J("value",0))}function at(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-form-step",25),F.NdJ("gotoPowerConditions",(function(){F.CHM(e);const t=F.oxw(3);return F.KtG(t.gotoPowerConditions())}))("nextStep",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.sendFormData(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("data",e.data)("flowName",e.flowName)("loading",e.loading)("requestIDFromURL",e.requestIDFromURL)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function lt(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-requisites-step",26),F.NdJ("nextStep",(function(){F.CHM(e);const t=F.oxw(3);return F.KtG(t.showRequisitesPage=!1)})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)}}function ct(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-terms-step",27),F.NdJ("goToTerms",(function(){F.CHM(e);const t=F.oxw(3);return F.KtG(t.gotoTermsAndConditions())}))("gotoPowerConditions",(function(){F.CHM(e);const t=F.oxw(3);return F.KtG(t.gotoPowerConditions())}))("goToTermsCertificate",(function(){F.CHM(e);const t=F.oxw(3);return F.KtG(t.gotoTermsAndConditionsCertificate())}))("nextStep",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.acceptTerms(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("userId",e.userId)("requestID",e.requestID)("data",e.data)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)("loading",e.loading)}}function dt(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-password-step",28),F.NdJ("nextStep",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.sendPassword(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function ut(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-autofirma-step",29),F.NdJ("nextStep",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.sendDocument(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("data",e.data)("pdfFile64",e.pdfFile64)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function ht(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-otp-step",30),F.NdJ("resendOTP",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.resendOTP(t))}))("errorPhone",(function(){F.CHM(e);const t=F.oxw(3);return F.KtG(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.requestOTP(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function pt(e,t){if(1&e&&F._UZ(0,"belender-success-step",31),2&e){const e=F.oxw(3);F.Q6J("data",e.data)("packId",e.packId)("userId",e.userId)("requestID",e.requestID)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)}}function mt(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-fail-step",32),F.NdJ("retry",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.retryRequest(t))}))("newRequest",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.newRequest(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function ft(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"belender-abandoned-step",33),F.NdJ("retry",(function(t){F.CHM(e);const n=F.oxw(3);return F.KtG(n.retryRequest(t))})),F.qZA()}if(2&e){const e=F.oxw(3);F.Q6J("solicitud",e.solicitud)("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)}}function gt(e,t){if(1&e&&F._UZ(0,"belender-no-service-step",34),2&e){const e=F.oxw(3);F.Q6J("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("data",e.data)}}function _t(e,t){if(1&e&&(F.TgZ(0,"div",35)(1,"div",36)(2,"h1",37),F._uU(3,"No existe la solicitud"),F.qZA()(),F.TgZ(4,"div",38),F._uU(5," No existen solicitudes activas con el código requerido "),F.qZA()()),2&e){const e=F.oxw(3);F.xp6(4),F.Udp("color",e.data.styles.colors.text)}}function bt(e,t){if(1&e&&(F.ynx(0),F.YNc(1,at,1,6,"belender-form-step",14),F.YNc(2,lt,1,3,"belender-requisites-step",15),F.YNc(3,ct,1,6,"belender-terms-step",16),F.YNc(4,dt,1,4,"belender-password-step",17),F.YNc(5,ut,1,5,"belender-autofirma-step",18),F.YNc(6,ht,1,4,"belender-otp-step",19),F.YNc(7,pt,1,6,"belender-success-step",20),F.YNc(8,mt,1,4,"belender-fail-step",21),F.YNc(9,ft,1,4,"belender-abandoned-step",22),F.YNc(10,gt,1,3,"belender-no-service-step",23),F.YNc(11,_t,6,2,"div",24),F.BQk()),2&e){const e=F.oxw(2);F.xp6(1),F.Q6J("ngIf",e.data&&"form"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","autofirma"==e.getStatus()&&e.showRequisitesPage),F.xp6(1),F.Q6J("ngIf","terms"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","password"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","autofirma"==e.getStatus()&&e.pdfFile64&&!e.showRequisitesPage),F.xp6(1),F.Q6J("ngIf","otp"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","success"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","failed"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","abandoned"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","no-service"==e.getStatus()),F.xp6(1),F.Q6J("ngIf","no-exist"==e.getStatus())}}function vt(e,t){1&e&&F._UZ(0,"belender-disabled-url")}function yt(e,t){if(1&e&&(F.TgZ(0,"div",39),F._UZ(1,"mat-progress-spinner",40),F.TgZ(2,"p",41),F._uU(3),F.qZA()()),2&e){const e=F.oxw(2);F.xp6(3),F.hij(" ",e.loading," ")}}function wt(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"div",42)(1,"div",35)(2,"div",43),F._uU(3,"Error!"),F.qZA(),F._UZ(4,"div",44),F.qZA(),F.TgZ(5,"div",45)(6,"button",46),F.NdJ("click",(function(){F.CHM(e);const t=F.oxw(2);return F.KtG(t.error=!1)})),F._uU(7," Ingresar manualmente "),F.qZA()()()}if(2&e){const e=F.oxw(2);F.xp6(4),F.Udp("color",e.data.styles.colors.text),F.Q6J("innerHTML",e.error,F.oJD)}}function xt(e,t){if(1&e&&(F.TgZ(0,"div",5)(1,"div"),F.YNc(2,rt,2,1,"div",6),F.YNc(3,ot,2,1,"div",7),F.YNc(4,bt,12,11,"ng-container",3),F.YNc(5,vt,1,0,"belender-disabled-url",3),F.YNc(6,yt,4,1,"div",8),F.YNc(7,wt,8,3,"div",9),F.qZA()()),2&e){const e=F.oxw();F.xp6(1),F.Gre("h-full w-full flex-auto p-0 md:p-3 ",e.data.styles.typography,""),F.Udp("background",e.data.styles.colors.background),F.xp6(1),F.Q6J("ngIf",e.data.styles.withLogo&&"loading"!=e.getStatus()),F.xp6(1),F.Q6J("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"==e.getStatus()),F.xp6(1),F.Q6J("ngIf",!e.error),F.xp6(1),F.Q6J("ngIf",!e.error&&e.disableURL),F.xp6(1),F.Q6J("ngIf",e.loading),F.xp6(1),F.Q6J("ngIf",!e.loading&&e.error)}}function Ct(e,t){if(1&e){const e=F.EpF();F.TgZ(0,"vex-terms",47),F.NdJ("accepted",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.handleTermsResponse(!0))}))("cancelled",(function(){F.CHM(e);const t=F.oxw();return F.KtG(t.handleTermsResponse(!1))})),F.qZA()}if(2&e){const e=F.oxw();F.Q6J("flow","certificate")("requestStatus",e.solicitud?e.solicitud.status_code:"")}}function kt(e,t){if(1&e&&(F.ynx(0),F.TgZ(1,"div",48),F._uU(2),F.qZA(),F.BQk()),2&e){const e=F.oxw();F.xp6(2),F.hij(" TestMode ",e.testMode?"ON":"OFF"," ")}}let Tt=class{constructor(e,t,n,i,s,r,o,a,l){this.cd=e,this.Activatedroute=t,this.utils=n,this.solicitudesService=i,this.customizationService=s,this.customizationStoreService=r,this.notis=o,this.certificateService=a,this.dialog=l,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.viewPowerTerms=!1,this.disableURL=!1,this.showRequisitesPage=!0,this.requestCreated=!1,this.requestIDFromURL=!1,this.flowName="ClientCertificate",this.showTermsDialog=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.userId?this.setInitialData(this.userId):this.loading=null,"pro"!=Y.N.env&&(q(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),q(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}ngOnDestroy(){}setInitialData(e){var t=this;return(0,P.Z)((function*(){const n=yield t.getFlow(e);if(t.data={config:t.customizationStoreService.FUNDER_CONFIG,styles:t.customizationStoreService.FUNDER_STYLES,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.notis.showAlert("Error!","No se ha configurado la customización del widget para este usuario","error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,P.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}sendPreRequest(){this.certificateService.preRequest({user_id:this.userId,package_id:this.packId}).then((e=>{e&&e.data&&(this.requestID=e.data.request_id),this.loading=!1})).catch((e=>{console.error(e),this.loading=!1}))}setParamsToRequest(e){this.requestIDFromURL=!0,this.solicitud||(this.solicitud={status_code:"form"}),e.document&&!this.solicitud.person_document_number&&(this.solicitud.person_document_number=e.document),e.birthday&&!this.solicitud.birth_date&&(this.solicitud.birth_date=e.birthday),e.expiration&&!this.solicitud.document_expiration_date&&(this.solicitud.document_expiration_date=e.expiration),e.type&&!this.solicitud.person_type&&(this.solicitud.person_type=e.type),e.phone&&!this.solicitud.phone&&(this.solicitud.phone=e.phone),e.email&&!this.solicitud.email&&(this.solicitud.email=e.email),e.cif&&!this.solicitud.cif&&(this.solicitud.cif=e.cif),e.razon&&!this.solicitud.razon_social&&(this.solicitud.razon_social=e.razon),e.name&&!this.solicitud.person_name&&(this.solicitud.person_name=e.name),e.lastname&&!this.solicitud.person_last_name&&(this.solicitud.person_last_name=e.lastname),e.second_lastname&&!this.solicitud.person_last_name2&&(this.solicitud.person_last_name2=e.second_lastname)}sendMessageToParent(e){window.top.postMessage(e,"*")}validateRequestIdInUrl(){const e=this;this.Activatedroute.queryParams.subscribe((t=>{t&&this.setParamsToRequest(t),t&&t.acceptTerms&&(this.autoAcceptTerms=!0),t&&t.request_id?(this.disableURL=!1,e.requestID=t.request_id,this.setFormFromVcCode(t.request_id)):(e.sendPreRequest(),console.error("con paramas"))}),(e=>{this.loading=!1,console.error("sin paramas")}))}setFormFromVcCode(e){var t=this;return(0,P.Z)((function*(){t.loading="Obteniendo datos de la solicitud...",t.solicitudesService.getSolicitudByCode(e).then((e=>{e&&e.data?(t.solicitud=e.data,t.pdfFile64=t.solicitud.file,t.setSubscriptionOfRequest(),t.loading=!1,t.skipCreationOfRequest=!0,t.autoAcceptTerms&&t.acceptTerms(!0)):t.loading=!1})).catch((e=>{t.loading=!1}))}))()}setSubscriptionOfRequest(){const e=this;if(e.socket)return;let t="wss://notifications.dev.belender.net";"qa"==Y.N.env&&(t="wss://notifications.qa.belender.net"),"pro"==Y.N.env&&(t="wss://notifications.belender.net"),Y.N.notificationsBaseUrl&&(t=Y.N.notificationsBaseUrl),this.socket=new WebSocket(`${t}?requests_id=${e.requestID}&user_id=${e.userId}`),this.socket.onopen=function(n){console.log("Conexión establecida: ",`${t}?requests_id=${e.requestID}&user_id=${e.userId}`)},this.socket.onmessage=function(t){let n=JSON.parse(t.data);console.warn("message from ws:",n),e.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,this.sendMessageToParent({type:"websocket",data:e}),"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),"terms_and_conditions"!=this.solicitud.status_code&&setTimeout((()=>{this.loading=!1,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.solicitudesService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}sendNewData(e){this.loading="Enviando información..",this.solicitudesService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e),this.loading=!1):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.initWaitingForResponse("Validando nuevos datos, espere por favor.."),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}showAlert(e,t){this.loading=!1,this.notis.showAlert(e,t)}sendFormData(e){this.requestID&&(e.request_id=this.requestID),e.user_id=this.userId,e.package_id=this.packId,e.validation_id=0;const t=new FormData;let n=Object.keys(e);for(const i of n)t.append(i,e[i]);this.loading="Subiendo documentación...",this.addRequest(t).then((e=>{e&&e.length&&this.setSubscriptionOfRequest(),this.loading=null})).catch((e=>{console.error("promise error: ",e),this.loading=null}))}uploadFiles(e){return new Promise(((t,n)=>{this.certificateService.addSignedFile(e).then((e=>{e&&e.status&&"error"==e.status?(e.message&&(this.showAlert("Error!",400==e.code&&"Does not have Known client service"==e.message?"El usuario no tiene servicio PIN habilitado!":400==e.code&&"Incorrect date"==e.message?"Fecha incorrecta!":e.message),n(e.message)),n(e),this.loading=null,this.cd.markForCheck()):e&&e.status&&"success"==e.status?t(!0):(this.showAlert("Error!","Error desconocido: "+e),n(e),this.loading=null,this.cd.markForCheck())})).catch((e=>{n(e),e&&e.errorMessage&&this.showAlert("Error!",e.errorMessage),this.loading=null,this.cd.markForCheck()}))}))}addRequest(e){return new Promise(((t,n)=>{this.certificateService.addSolicitud(e).then((e=>{e&&e.status&&"error"==e.status?(e.message&&(this.showAlert("Error!",400==e.code&&"Does not have Known client service"==e.message?"El usuario no tiene servicio PIN habilitado!":400==e.code&&"Incorrect date"==e.message?"Fecha incorrecta!":e.message),n(e.message)),this.loading=null,this.cd.markForCheck(),n(e)):e&&e.status&&"success"==e.status?(this.solicitud=e.data,this.setSubscriptionOfRequest(),this.loading=null,this.cd.markForCheck(),t(e.data)):(this.showAlert("Error!","Error desconocido: "+e),n(e))})).catch((e=>{console.error("respuesta desde pin service: ",e),e&&e.errorMessage&&this.showAlert("Error!",e.errorMessage),this.loading=null,this.cd.markForCheck(),n(e)}))}))}acceptTerms(e){this.loading="Iniciando el proceso de emisión de certificado..";let t={request_id:this.solicitud.request_id,terms_and_conditions_service:!0,terms_and_conditions_certificate_emition:!0};(this.data.config.activatePower||this.solicitud?.power_activate)&&(t.power_activate=!0,t.terms_and_conditions_power=e?1:0),this.certificateService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}sendPassword(e){this.loading="Enviando información..",this.certificateService.sendPassword({request_id:this.solicitud.request_id,password:e}).then((e=>{e.status&&"error"==e.status?this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.pdfFile64=e.file,this.cd.markForCheck()),this.loading=null})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}sendDocument(e){e.request_id=this.requestID;const t=new FormData;let n=Object.keys(e);for(const i of n)t.append(i,e[i]);this.loading="Subiendo documentación...",this.uploadFiles(t).then((e=>{e&&(this.solicitud.status_code="consent_process_completed")})).catch((e=>{console.error(e)}))}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}requestOTP(e){let t={otp:e.code,request_id:this.solicitud.request_id};this.loading="Enviando código OTP ..",this.certificateService.sendOtp(t).then((e=>{e.status&&"error"==e.status?this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.cd.markForCheck()),this.loading=!1})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}askToBack(){this.solicitudesService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.requestCreated=!0,this.requestIDFromURL=!0,this.solicitud=e.data,this.loading=!1):this.loading=!1})).catch((e=>{this.loading=!1}))}gotoErrorPhone(){}setRequestStatus(e){this.solicitud.status_code=e}retryRequest(e){let t={request_id:e,user_id:this.userId};this.loading="Reintentando enviar la solicitud...",this.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}newRequest(e){this.solicitud.status_code="created"}disconnectWebsocket(){console.log("intentando desconectar ws..."),this.socket&&this.socket.close()}getStatus(){return!this.solicitud||this.solicitud&&("created"==this.solicitud.status_code||"form"==this.solicitud.status_code)?"form":this.solicitud&&"terms_and_conditions"==this.solicitud.status_code?"terms":this.solicitud&&"waiting_acceptance_file_signed"==this.solicitud.status_code?(console.log("returning autofirma"),"autofirma"):!this.solicitud||"waiting_login_seguridad_social"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_otp_seguridad_social"!=this.solicitud.status_code&&"waiting_otp"!=this.solicitud.status_code&&"invalid_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"waiting_password"!=this.solicitud.status_code&&"approved_terms_digital_power"!=this.solicitud.status_code&&"declined_terms_digital_power"!=this.solicitud.status_code?!this.solicitud||"abandoned_after_bad_phone"!=this.solicitud.status_code&&"abandoned_after_invalid_otp_seguridad_social"!=this.solicitud.status_code&&"abandoned_after_terms_and_conditions"!=this.solicitud.status_code&&"abandoned_after_waiting_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"all_documents_downloaded"!=this.solicitud.status_code&&"partial_documents_downloaded"!=this.solicitud.status_code&&"consent_process_completed"!=this.solicitud.status_code&&"waiting_certificate"!=this.solicitud.status_code&&"waiting_documents"!=this.solicitud.status_code?!this.solicitud||"bad_phone"!=this.solicitud.status_code&&"phone_not_exist_otp"!=this.solicitud.status_code?!this.solicitud||"failed_with_retry"!=this.solicitud.status_code&&"failed_without_retry"!=this.solicitud.status_code&&"failed_documents_downloaded"!=this.solicitud.status_code?this.solicitud&&"no_service"==this.solicitud.status_code?"no-service":"no-exist":"failed":"error-data":(this.disconnectWebsocket(),this.data.config&&this.data.config.infiniteLoopInCompleted?"loading":"success"):"abandoned":"password":"otp":(this.loading="Estamos procesando su solicitud. Espere un momento por favor","loading")}sendRetry(){}gotoTermsAndConditions(){this.showTermsDialog=!0}handleTermsResponse(e){this.showTermsDialog=!1}gotoTermsAndConditionsCertificate(){this.dialog.open(R.v,{panelClass:"fullscreen-dialog",data:{flow:"certificate"}})}gotoPowerConditions(){this.viewPowerTerms=!0}acceptPowerCert(){this.viewPowerTerms=!1}};Tt.ɵfac=function(e){return new(e||Tt)(F.Y36(F.sBO),F.Y36(O.gz),F.Y36(U.F),F.Y36(_.M),F.Y36(C.w),F.Y36(Z.r),F.Y36(S.T),F.Y36(z),F.Y36(B.uw))},Tt.ɵcmp=F.Xpm({type:Tt,selectors:[["belender-widget-client-cert"]],inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[F._Bn([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:4,vars:4,consts:[[3,"hideButtons","flow","userId","accept",4,"ngIf"],["class","h-full widget-belender",4,"ngIf"],[3,"flow","requestStatus","accepted","cancelled",4,"ngIf"],[4,"ngIf"],[3,"hideButtons","flow","userId","accept"],[1,"h-full","widget-belender"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px]",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[3,"data","flowName","loading","requestIDFromURL","texts","solicitud","gotoPowerConditions","nextStep",4,"ngIf"],[3,"data","loading","texts","nextStep",4,"ngIf"],[3,"userId","requestID","data","texts","solicitud","loading","goToTerms","gotoPowerConditions","goToTermsCertificate","nextStep",4,"ngIf"],[3,"data","loading","texts","solicitud","nextStep",4,"ngIf"],[3,"data","pdfFile64","loading","texts","solicitud","nextStep",4,"ngIf"],[3,"data","loading","texts","solicitud","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","packId","userId","requestID","loading","texts",4,"ngIf"],[3,"data","loading","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"solicitud","data","loading","texts","retry",4,"ngIf"],[3,"loading","texts","data",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"data","flowName","loading","requestIDFromURL","texts","solicitud","gotoPowerConditions","nextStep"],[3,"data","loading","texts","nextStep"],[3,"userId","requestID","data","texts","solicitud","loading","goToTerms","gotoPowerConditions","goToTermsCertificate","nextStep"],[3,"data","loading","texts","solicitud","nextStep"],[3,"data","pdfFile64","loading","texts","solicitud","nextStep"],[3,"data","loading","texts","solicitud","resendOTP","errorPhone","nextStep"],[3,"data","packId","userId","requestID","loading","texts"],[3,"data","loading","texts","solicitud","retry","newRequest"],[3,"solicitud","data","loading","texts","retry"],[3,"loading","texts","data"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[3,"flow","requestStatus","accepted","cancelled"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"]],template:function(e,t){1&e&&(F.YNc(0,st,1,3,"vex-power-cert",0),F.YNc(1,xt,8,11,"div",1),F.YNc(2,Ct,1,2,"vex-terms",2),F.YNc(3,kt,3,1,"ng-container",3)),2&e&&(F.Q6J("ngIf",t.viewPowerTerms),F.xp6(1),F.Q6J("ngIf",t.data),F.xp6(1),F.Q6J("ngIf",t.showTermsDialog),F.xp6(1),F.Q6J("ngIf",t.testMode))},dependencies:[i.O5,u.lW,y.Ou,J.L,V.q,Q.L,oe,ue,me,Ce,ke,Te,Ne,We,nt,it],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),Tt=(0,D.gn)([(0,N.c)()],Tt);const St=[{path:":idUser",component:Tt},{path:":idUser/:packID",component:Tt}];let Mt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=F.oAB({type:e}),e.ɵinj=F.cJS({imports:[O.Bz.forChild(St),O.Bz,L.d8]}),e})();var It=n(6981),Et=n(3848),Ot=n(1129),Lt=n(969),Pt=n(7009);let Dt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=F.oAB({type:e}),e.ɵinj=F.cJS({imports:[i.ez,Pt.ZX,d.Ps,p.UX,x.c,u.ot]}),e})();var At=n(1145),Nt=n(2266),qt=n(3300),Yt=n(865),Rt=n(3033),Ft=n(3295);let Ut=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=F.oAB({type:e}),e.ɵinj=F.cJS({providers:[_.M,v.o,C.w,w.t,S.T,E.t,z,{provide:T.Ad,useValue:"es-ES"}],imports:[Mt,i.ez,s.G,r.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,x.c,p.u5,m.AV,p.UX,f.LD,g.vV,b.a,y.Cq,k.FA,T.XK,M.T5,I.Fk,It.x,Et.Nh,c.p9,Ot.n,Lt.O,Dt,At.j,Nt.L,qt.C,Yt.q,Rt.d,Ft.g]}),e})()}}]),(self.webpackChunkvex=self.webpackChunkvex||[]).push([[193],{667:(e,t,n)=>{n.d(t,{$:()=>s});var i=n(7340);const s=(r=400,(0,i.X$)("fadeInUp",[(0,i.eR)(":enter",[(0,i.oB)({transform:"translateY(20px)",opacity:0}),(0,i.jt)(`${r}ms cubic-bezier(0.35, 0, 0.25, 1)`,(0,i.oB)({transform:"translateY(0)",opacity:1}))])]));var r},5592:(e,t,n)=>{n.d(t,{J:()=>a});var i=n(6895),s=n(9299),r=n(7392),o=n(4650);let a=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.oAB({type:e}),e.ɵinj=o.cJS({imports:[i.ez,s.Bz,r.Ps]}),e})()},1763:(e,t,n)=>{n.d(t,{b:()=>c});var i=n(4650),s=n(6895),r=n(7392);function o(e,t){1&e&&i._UZ(0,"mat-icon",3)}const a=function(e,t){return{background:e,"border-color":t}},l=["*"];let c=(()=>{class e{constructor(){this.text="",this.color="rgb(14, 197, 151)",this.ccb=new i.vpe,this.checked=!1}ngOnInit(){}emitChange(){this.checked=!this.checked,this.ccb.emit(this.checked)}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-checkbox"]],inputs:{text:"text",color:"color",checked:"checked"},outputs:{ccb:"changeCheckbox"},ngContentSelectors:l,decls:5,vars:5,consts:[[1,"flex","items-start","gap-2","justify-start","w-fit","hover:bg-slate-700/10","py-2","rounded-sm","cursor-pointer",3,"click"],[1,"check-wrapper","w-5","h-5","border","mr-1","rounded-sm","flex","justify-center","items-center","p-0",3,"ngStyle"],["style","font-size: 5px","class","m-0 p-0 text-white","svgIcon","mat:check",4,"ngIf"],["svgIcon","mat:check",1,"m-0","p-0","text-white",2,"font-size","5px"]],template:function(e,t){1&e&&(i.F$t(),i.TgZ(0,"div",0),i.NdJ("click",(function(){return t.emitChange()})),i.TgZ(1,"div",1),i.YNc(2,o,1,0,"mat-icon",2),i.qZA(),i.TgZ(3,"div"),i.Hsn(4),i.qZA()()),2&e&&(i.xp6(1),i.Q6J("ngStyle",i.WLB(2,a,t.checked?t.color:"transparent",t.checked?t.color:"rgba(0,0,0,.7)")),i.xp6(1),i.Q6J("ngIf",t.checked))},dependencies:[s.O5,s.PC,r.Hw],styles:[".check-wrapper[_ngcontent-%COMP%]{transition:all .3s ease;min-width:1.25rem}"]}),e})()},1129:(e,t,n)=>{n.d(t,{n:()=>c});var i=n(6895),s=n(4006),r=n(9549),o=n(9101),a=n(7392),l=n(4650);let c=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=l.oAB({type:e}),e.ɵinj=l.cJS({imports:[i.ez,s.u5,s.UX,r.lN,o.ot,a.Ps]}),e})()},8008:(e,t,n)=>{n.d(t,{O:()=>o});var i=n(4650),s=n(6895);function r(e,t){if(1&e&&(i.O4$(),i.kcU(),i.TgZ(0,"p",4),i._uU(1),i.qZA()),2&e){const e=i.oxw();i.xp6(1),i.Oqu(e.text)}}let o=(()=>{class e{constructor(){this.text="",this.color="rgb(14, 197, 151)",this.zoom=1}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-spinner"]],inputs:{text:"text",color:"color",zoom:"zoom"},decls:4,vars:7,consts:[[1,"flex","w-full","justify-center","items-center","flex-col","gap-4"],["width","65px","height","65px","viewBox","0 0 66 66","xmlns","http://www.w3.org/2000/svg",1,"spinner"],["fill","none","stroke-width","6","stroke-linecap","round","cx","33","cy","33","r","30",1,"path"],["class","text-center",4,"ngIf"],[1,"text-center"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0),i.O4$(),i.TgZ(1,"svg",1),i._UZ(2,"circle",2),i.qZA(),i.YNc(3,r,2,1,"p",3),i.qZA()),2&e&&(i.xp6(1),i.Jzz("zoom: ",t.zoom,"; "),i.xp6(1),i.Jzz("stroke: ",t.color,""),i.xp6(1),i.Q6J("ngIf",t.text))},dependencies:[s.O5],styles:[".spinner[_ngcontent-%COMP%]{animation:rotator 1.4s linear infinite}@keyframes rotator{0%{transform:rotate(0)}to{transform:rotate(270deg)}}.path[_ngcontent-%COMP%]{stroke-dasharray:187;stroke-dashoffset:0;transform-origin:center;animation:dash 1.4s ease-in-out infinite}@keyframes dash{0%{stroke-dashoffset:187}50%{stroke-dashoffset:46.75;transform:rotate(135deg)}to{stroke-dashoffset:187;transform:rotate(450deg)}}"]}),e})()},9476:(e,t,n)=>{n.d(t,{F:()=>c});var i=n(6895),s=n(4006),r=n(9549),o=n(9101),a=n(7392),l=n(4650);let c=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=l.oAB({type:e}),e.ɵinj=l.cJS({imports:[i.ez,s.u5,s.UX,r.lN,o.ot,a.Ps]}),e})()},833:(e,t,n)=>{n.d(t,{L:()=>d});var i=n(4650),s=n(9299),r=n(7367),o=n(8460),a=n(6895),l=n(9101);function c(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",5)(1,"button",6),i.NdJ("click",(function(){i.CHM(e);const t=i.oxw();return i.KtG(t.accept())})),i._uU(2,"Cerrar"),i.qZA()()}if(2&e){const e=i.oxw();i.xp6(1),i.Udp("color",e.funderStyles.colors.btnText)("background",e.funderStyles.colors.btnBg)("border-radius",e.funderStyles.btnRound+"px")}}let d=(()=>{class e{constructor(e,t,n){this.Activatedroute=e,this.customizationService=t,this.customizationStoreService=n,this.loading=!0,this.hideButtons=!0,this.acceptTerms=new i.vpe(null),this.cancelTerms=new i.vpe(null)}ngOnInit(){this.loading=!0,this.userId&&this.flow?(this.userID=this.userId,this.flowName=this.flow,this.customizationStoreService.getFunderStyles().subscribe((e=>{this.funderStyles=e})),this.customizationService.getCustomizationByFlow(this.userID,this.flowName).then((e=>{this.flowConfig=e,this.terms_and_conditions=this.flowConfig&&this.flowConfig.terms_and_conditions?this.flowConfig.terms_and_conditions:`\n <div class="px-10 py-6 rounded-md text-center bg-orange-500/20 text-orange-600">\n <p>No hay términos y condiciones para el flujo <b>${this.flowName}</b></p> \n </div>`,this.loading=!1})).catch((e=>{this.loading=!1}))):this.Activatedroute.params.subscribe((e=>{e&&e.idUser?(this.userID=e.idUser,this.flowName=this.getParsedFlowName(e.flow),this.userID?this.customizationService.getCustomizationByFlow(this.userID,this.flowName).then((e=>{this.flowConfig=e,this.terms_and_conditions=this.flowConfig&&this.flowConfig.terms_and_conditions?this.flowConfig.terms_and_conditions:'\n <div class="px-10 py-6 rounded-md text-center bg-orange-500/20 text-orange-600">\n <p>No hay términos y condiciones para este flujo</p> \n </div>',this.loading=!1})).catch((e=>{this.loading=!1})):this.loading=!1):this.loading=!1}),(e=>{this.loading=!1}))}getParsedFlowName(e){switch(e){case"sms":case"Sms":return"SMS";case"clavepin":case"ClavePin":case"CLAVEPIN":return"ClavePin";case"videoid":return"VideoID";case"personal":case"presencial":case"client-cert":return"KnownClient";default:return e}}accept(){this.acceptTerms.emit(!0)}cancel(){this.cancelTerms.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(i.Y36(s.gz),i.Y36(r.w),i.Y36(o.r))},e.ɵcmp=i.Xpm({type:e,selectors:[["vex-power-cert"]],inputs:{flow:"flow",userId:"userId",hideButtons:"hideButtons"},outputs:{acceptTerms:"accept",cancelTerms:"cancel"},decls:33,vars:1,consts:[[1,"py-12","flex","flex-col","items-center","overflow-auto","max-h-[96vh]","terms-page"],[1,"max-w-xl","overflow-y-auto"],[1,"font-bold"],[1,"pt-6","font-bold"],["class","w-full max-w-xl flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"w-full","max-w-xl","flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0)(1,"div",1)(2,"h1",2),i._uU(3,"HOJA DE ACEPTACIÓN DE CERTIFICADO ELECTRONICO CUALIFICADO RÉGIMEN OBLIGATORIO DE USO DEL CERTIFICADO ELECTRONICO: “CERTIFICADO DE PERSONA FÍSICA REPRESENTANTE DE EMPRESA EMITIDO EN SOFTWARE”"),i.qZA(),i.TgZ(4,"p"),i._uU(5," a) Que existen unas condiciones generales del servicio incorporadas en el texto de divulgación del certificado o PDS, y una declaración de prácticas de certificación, que regulan la emisión y utilización del certificado electrónico emitido porvinCAsign, cuyo texto íntegro se puede consultar en la dirección de Internet, https://policy.vincasign.net. "),i.qZA(),i.TgZ(6,"p"),i._uU(7," b) Que el certificado electrónico emitido y el resto de los elementos que forman parte de la identificación electrónica son únicos para cada usuario. El certificado debe ser protegido por un código secreto (PIN), que sólo conoce el titular y que le será entregado en el momento de la emisión del certificado. Para utilizar el certificado es imprescindible conocer este código. "),i.qZA(),i.TgZ(8,"p"),i._uU(9," c) Que este certificado permite al titular del certificado generar firmas electrónicas e identificarse de forma electrónica en aquellos sistemas de información que soporten este tipo de autenticación. "),i.qZA(),i.TgZ(10,"p"),i._uU(11," d) Que el FIRMANTE debe custodiar, de forma diligente, el PIN que permite utilizarlo, para evitar que otras personas puedan suplantar su identidad y firmar documentos en su nombre, o acceder a mensajes confidenciales o sistemas de información de acceso restringido. "),i.qZA(),i.TgZ(12,"p"),i._uU(13," e) Que, si el FIRMANTE detecta cualquier indicio de que su identificación electrónica ha podido ser utilizada por otras personas, tendrá que suspender el uso del certificado y notificarlo inmediatamente al responsable del servicio de certificación del SUSCRIPTOR, o a vinCAsign, para pedir la revocación del certificado y, en su caso, la emisión de uno nuevo. "),i.qZA(),i.TgZ(14,"p"),i._uU(15," f) Que ante cualquier necesidad de información adicional, respecto de la utilización de los certificados emitidos en nombre de vinCAsign, el FIRMANTE se podrá dirigir al SUSCRIPTOR, al responsable del servicio de certificación del SUSCRIPTOR, y/o a VINTEGRIS. "),i.qZA(),i.TgZ(16,"p"),i._uU(17," g) Que con el fin de obtener los correspondientes certificados, y dentro del marco del Reglamento (UE) 2016/679 del Parlamento Europeo y del Consejo de 27 de abril de 2016 relativo a la protección de las personas físicas en lo que respecta al tratamiento de datos personales y a la libre circulación de estos datos y por el que se deroga la Directiva 95/46/CE (Reglamento general de protección de datos), el SUSCRIPTOR ha comunicado a vinCAsign los datos identificativos del FIRMANTE con el fin de emitir y gestionar el certificado corporativo de persona física emitido en software, en el ámbito de la relación de trabajo entre dicho FIRMANTE y el SUSCRIPTOR, todo ello a los efectos de lo previsto en el artículo 28 del Reglamento general de protección de datos. "),i.qZA(),i.TgZ(18,"p"),i._uU(19," h) Que sabe que, en cumplimiento de lo establecido en los artículos 24.2 y 28 del Reglamento (UE) 910/2014 del Parlamento Europeo y del Consejo de 23 de julio de 2014, los datos contenidos en el certificado corporativo de persona física emitido en software están publicados en la página web de vinCAsign a efectos del Registro de Certificados y de las listas de revocación, toda vez que ha prestado su consentimiento durante el proceso de solicitud. "),i.qZA(),i.TgZ(20,"h1",3),i._uU(21," ACTO DE ACEPTACIÓN DEL CERTIFICADO ELECTRÓNICO "),i.qZA(),i.TgZ(22,"p"),i._uU(23," Firmo el presente documento para dejar constancia: "),i.qZA(),i.TgZ(24,"p"),i._uU(25," Que ha sido informado del contenido del texto de divulgación del certificado o PDS, en el que se incluyen las condiciones generales del servicio aplicable al certificado corporativo de persona física emitido en software. "),i.qZA(),i.TgZ(26,"p"),i._uU(27," Que ha sido informado del régimen obligatorio de uso del certificado emitido, sus condiciones de uso y sus responsabilidades. "),i.qZA(),i.TgZ(28,"p"),i._uU(29," Que ha sido informado de las circunstancias relativas al tratamiento de sus datos personales para la correcta emisión y gestión del certificado que se emite. "),i.qZA(),i.TgZ(30,"p"),i._uU(31," Firma de conformidad, en virtud de la cual ha leído y entiende las obligaciones y responsabilidades que asume. "),i.qZA()(),i.YNc(32,c,3,6,"div",4),i.qZA()),2&e&&(i.xp6(32),i.Q6J("ngIf",t.funderStyles&&!t.hideButtons))},dependencies:[a.O5,l.lW],styles:["h1[_ngcontent-%COMP%]{font-size:20px!important;font-weight:700}h2[_ngcontent-%COMP%]{font-size:20px!important;font-weight:700;line-height:25px;margin:15px 0}p[_ngcontent-%COMP%]{margin:10px 0}.terms-page[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100vw;background:white;z-index:9999999!important;height:100vh;max-height:100vh}"]}),e})()},2266:(e,t,n)=>{n.d(t,{L:()=>g});var i=n(9299),s=n(833),r=n(6e3),o=n(4650);const a=[{path:":flow",component:s.L},{path:":flow/:idUser",component:s.L}];let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.oAB({type:e}),e.ɵinj=o.cJS({imports:[i.Bz.forChild(a),i.Bz,r.d8]}),e})();var c=n(7533),d=n(1572),u=n(7367),h=n(6383),p=n(6895),m=n(4006),f=n(9101);let g=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.oAB({type:e}),e.ɵinj=o.cJS({providers:[u.w],imports:[l,c.q,d.Cq,h.G,p.ez,m.u5,f.ot]}),e})()},1145:(e,t,n)=>{n.d(t,{j:()=>l});var i=n(4650),s=n(6895);let r=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=i.oAB({type:e}),e.ɵinj=i.cJS({imports:[[s.ez]]}),e})();var o=n(7392),a=n(4006);let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=i.oAB({type:e}),e.ɵinj=i.cJS({imports:[s.ez,a.u5,r,o.Ps]}),e})()},4302:(e,t,n)=>{n.d(t,{q:()=>a});var i=n(7582),s=n(9933),r=n(667),o=n(4650);let a=class{constructor(){}};a.ɵfac=function(e){return new(e||a)},a.ɵcmp=o.Xpm({type:a,selectors:[["belender-disabled-url"]],decls:6,vars:1,consts:[[1,"p-2","w-full","flex","justify-start","flex-wrap"],[1,"py-4","px-6","w-full","rounded-md","bg-red-500/10","text-red-600","flex","flex-col","gap-3"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0)(1,"div",1)(2,"h2"),o._uU(3,"Servicio desactivado"),o.qZA(),o.TgZ(4,"p"),o._uU(5,"El servicio que intenta acceder está desactivado. "),o.qZA()()()),2&e&&o.Q6J("@fadeInUp",void 0)},data:{animation:[r.$]}}),a=(0,i.gn)([(0,s.c)()],a)},3300:(e,t,n)=>{n.d(t,{C:()=>o});var i=n(6895),s=n(4006),r=n(4650);let o=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=r.oAB({type:e}),e.ɵinj=r.cJS({imports:[i.ez,s.u5]}),e})()},342:(e,t,n)=>{n.d(t,{A:()=>g});var i=n(2340),s=n(4650),r=n(4006),o=n(5089),a=n(5601),l=n(9617),c=n(6895),d=n(7392),u=n(1572);function h(e,t){if(1&e&&(s.TgZ(0,"span",11),s._uU(1),s._UZ(2,"mat-progress-spinner",12),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.hij(" ",e.document_name," ")}}function p(e,t){if(1&e&&(s.TgZ(0,"span",13),s._uU(1),s._UZ(2,"mat-icon",14),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.hij(" ",e.document_name," ")}}function m(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"span",15),s.NdJ("click",(function(){s.CHM(e);const t=s.oxw().$implicit,n=s.MAs(5);return s.oxw().setDocumentName(t.document_name),s.KtG(n.click())})),s._uU(1),s._UZ(2,"mat-icon",16),s.qZA()}if(2&e){const e=s.oxw().$implicit;s.xp6(1),s.hij(" ",e.document_name," ")}}function f(e,t){if(1&e){const e=s.EpF();s.ynx(0),s.YNc(1,h,3,1,"span",6),s.YNc(2,p,3,1,"span",7),s.YNc(3,m,3,1,"span",8),s.TgZ(4,"input",9,10),s.NdJ("change",(function(t){s.CHM(e);const n=s.oxw();return s.KtG(n.fileChange(t))})),s.qZA(),s.BQk()}if(2&e){const e=t.$implicit,n=s.oxw();s.xp6(1),s.Q6J("ngIf",!e.document_status_code),s.xp6(1),s.Q6J("ngIf",e.document_status_code&&"downloaded"===e.document_status_code&&!n.loadingDocs),s.xp6(1),s.Q6J("ngIf",e.document_status_code&&"failed_download"===e.document_status_code&&!n.loadingDocs),s.xp6(1),s.Q6J("accept",n.acceptFiles)}}let g=(()=>{class e{constructor(e,t,n,i,s){this.formBuilder=e,this.utils=t,this.solicitudesService=n,this.packsS=i,this.cd=s,this.totalDocuments=[],this.totalDownloaded=0,this.totalNotDownloaded=0,this.file=null,this.fileName="No se ha seleccionado ningun archivo",this.fileSize=0,this.acceptFiles="image/jpeg, image/jpg, application/pdf",this.loadingDocs=!0,this.toBase64=e=>new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=n}))}ngOnInit(){this.loadingDocs=!0,this.uploadForm=this.formBuilder.group({file:[""]}),this.setPacksAndDocuments(),this.initIntervalDocs()}initIntervalDocs(){this.intDocs=setInterval((()=>{this.setDocumentsFromPack()}),4e3)}setPacksAndDocuments(){this.packsS.getPacksByPackId(this.packId).then((e=>{this.totalDocuments=this.parseDocumentsFromPack(e.data.documents),this.setDocumentsFromPack()}))}setDocumentsFromPack(){this.solicitudesService.getDocumentsIds(this.requestID).then((e=>{e.data&&this.setDocumentsReports(e.data),this.loadingDocs=!1})).catch((()=>{this.loadingDocs=!1}))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==i.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==i.N.env&&(e="wss://notifications.belender.net"),i.N.notificationsBaseUrl&&(e=i.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),n&&t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}handlePusherNotification(e){this.totalDocuments&&this.totalDocuments.forEach((t=>{t.document_name===e.document_name&&(t.document_status_code=e.document_status_code)})),this.cd.markForCheck()}parseDocumentsFromPack(e){let t=[];return e&&e.length&&e.forEach((e=>{t.push({document_name:e,document_status_code:null})})),t}setDocumentsReports(e){e&&e.length&&e.forEach((e=>{this.totalDocuments.forEach((t=>{t.document_name===e.document_name&&(t.document_status_code=e.document_status_code)}))})),this.checkIfAllReported(),this.cd.markForCheck()}checkIfAllReported(){this.totalDocuments.find((e=>!e.document_status_code||"downloaded"!=e.document_status_code))||this.intDocs&&clearInterval(this.intDocs)}fileChange(e){e.preventDefault(),e.stopPropagation();let t=e.target.files[0];const n=new FormData;n.append("file",t),n.append("request_id",this.requestID),n.append("document_name",this.docName),this.loadingDocs=!0,this.solicitudesService.uploadFileFromWidget(n).then((e=>{console.log("success"),this.setPacksAndDocuments()})).catch((e=>{console.error(e),this.setPacksAndDocuments()}))}setDocumentName(e){this.docName=e}}return e.ɵfac=function(t){return new(t||e)(s.Y36(r.qu),s.Y36(o.F),s.Y36(a.M),s.Y36(l.U),s.Y36(s.sBO))},e.ɵcmp=s.Xpm({type:e,selectors:[["widget-documents"]],inputs:{packId:"packId",requestID:"requestID",userId:"userId",acceptFiles:"acceptFiles"},decls:7,vars:1,consts:[[1,"px-4","py-3","bg-slate-300/10","rounded-md"],[1,"w-full","flex","mb-4","justify-between","items-center"],[1,"text-xl","font-bold"],[1,"flex","justify-end","items-center"],[1,"flex","gap-1","flex-wrap","items-start","justify-start","w-full","flex-col"],[4,"ngFor","ngForOf"],["class","bg-black/10 items-center w-full h-8 gap-2 pr-4 pl-3 py-1 rounded-sm flex text-xs justify-between",4,"ngIf"],["class","bg-green-500/10 items-center text-green-500 w-full justify-between border border-green-500 gap-2 h-8 font-bold pr-4 pl-3 py-1 rounded-sm flex text-xs ",4,"ngIf"],["class","bg-red-500/10 items-center text-red-500 border border-red-500 gap-2 h-8 font-bold pr-4 pl-3 py-1 rounded-sm flex text-xs justify-between w-full cursor-pointer hover:bg-red-500 hover:text-red-50",3,"click",4,"ngIf"],["hidden","true","onclick","this.value=null","type","file","name","file",3,"accept","change"],["fileInput",""],[1,"bg-black/10","items-center","w-full","h-8","gap-2","pr-4","pl-3","py-1","rounded-sm","flex","text-xs","justify-between"],["color","accent","diameter","12","value","0","mode","indeterminate",1,"spinner"],[1,"bg-green-500/10","items-center","text-green-500","w-full","justify-between","border","border-green-500","gap-2","h-8","font-bold","pr-4","pl-3","py-1","rounded-sm","flex","text-xs"],["svgIcon","mat:check",1,"w-4"],[1,"bg-red-500/10","items-center","text-red-500","border","border-red-500","gap-2","h-8","font-bold","pr-4","pl-3","py-1","rounded-sm","flex","text-xs","justify-between","w-full","cursor-pointer","hover:bg-red-500","hover:text-red-50",3,"click"],["svgIcon","mat:upload",1,"w-4"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0)(1,"div",1)(2,"p",2),s._uU(3,"Documentos: "),s.qZA(),s._UZ(4,"div",3),s.qZA(),s.TgZ(5,"div",4),s.YNc(6,f,6,4,"ng-container",5),s.qZA()()),2&e&&(s.xp6(6),s.Q6J("ngForOf",t.totalDocuments))},dependencies:[c.sg,c.O5,d.Hw,u.Ou]}),e})()},3033:(e,t,n)=>{n.d(t,{d:()=>l});var i=n(6895),s=n(4006),r=n(7392),o=n(1572),a=n(4650);let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=a.oAB({type:e}),e.ɵinj=a.cJS({imports:[i.ez,r.Ps,s.UX,o.Cq]}),e})()},1406:(e,t,n)=>{n.d(t,{Y:()=>a});var i=n(4650),s=n(4006),r=n(9549),o=n(9101);let a=(()=>{class e{constructor(e){this.formBuilder=e,this.file=null,this.fileName="No se ha seleccionado ningun archivo",this.acceptFiles="image/png, image/jpeg, image/jpg, .pdf",this.newItemEvent=new i.vpe(null),this.uploadFile=new i.vpe(null),this.toBase64=e=>new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=n}))}ngOnInit(){this.uploadForm=this.formBuilder.group({file:[""]})}fileChange(e){this.uploadForm.patchValue({file:e.target.files[0]}),this.uploadForm.get("file").updateValueAndValidity();const t=new FormData;let n=this.uploadForm.get("file").value;this.fileName=n.name,this.fileSize=+(+n.size/1e3).toFixed(1),t.append("file",n),console.warn(this.uploadForm.get("file").value),this.newItemEvent.emit({file:t}),this.uploadFile.emit(n)}}return e.ɵfac=function(t){return new(t||e)(i.Y36(s.qu))},e.ɵcmp=i.Xpm({type:e,selectors:[["app-file-upload"]],inputs:{label:"label",acceptFiles:"acceptFiles"},outputs:{newItemEvent:"change",uploadFile:"fileUpload"},decls:11,vars:5,consts:[[1,"flex","flex-col","w-full","items-start","input-file-wrapper","my-1",3,"formGroup"],["hidden","true","onclick","this.value=null","type","file","name","file",3,"accept","change"],["fileInput",""],[1,"flex","items-center","justify-start","mt-3"],["mat-flat-button","","color","accent",1,"btn-file",3,"click"]],template:function(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"form",0)(1,"mat-label"),i._uU(2),i.qZA(),i.TgZ(3,"input",1,2),i.NdJ("change",(function(e){return t.fileChange(e)})),i.qZA(),i.TgZ(5,"div",3)(6,"button",4),i.NdJ("click",(function(){i.CHM(e);const t=i.MAs(4);return i.KtG(t.click())})),i._uU(7,"Seleccionar archivo"),i.qZA(),i._uU(8," "),i.TgZ(9,"span"),i._uU(10),i.qZA()()()}2&e&&(i.Q6J("formGroup",t.uploadForm),i.xp6(2),i.Oqu(t.label),i.xp6(1),i.Q6J("accept",t.acceptFiles),i.xp6(7),i.AsE("",t.fileName," ",t.fileSize?"("+t.fileSize+"Kb)":"",""))},dependencies:[s._Y,s.JL,s.sg,r.hX,o.lW],styles:["button[aria-pressed=true][_ngcontent-%COMP%]{color:red!important}.btn-file[_ngcontent-%COMP%]{max-width:200px}.input-file-wrapper[_ngcontent-%COMP%]{background:rgba(0,0,0,.0117647059);padding:.7rem .5rem .7rem 1rem;border-radius:5px;border:2px dashed rgba(0,0,0,.1)}"]}),e})()},969:(e,t,n)=>{n.d(t,{O:()=>d});var i=n(6895),s=n(4006),r=n(9101),o=n(7392),a=n(4144),l=n(7009),c=n(4650);let d=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=c.oAB({type:e}),e.ɵinj=c.cJS({imports:[i.ez,l.ZX,o.Ps,s.UX,a.c,r.ot]}),e})()},4246:(e,t,n)=>{n.d(t,{t:()=>s});var i=n(4650);let s=(()=>{class e{constructor(){this.DNI_REGEX=/^(\d{8})([A-Z])$/,this.CIF_REGEX=/^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/,this.NIE_REGEX=/^[XYZ]\d{7,8}[A-Z]$/}convertObjectArrayToArray(e){return Object.keys(e).map((t=>{const n=e[t];return n.key=t,n}))}ValidateIDType(e){e=e.toUpperCase().replace(/\s/,"");var t=!1,n=this.spainIdType(e);switch(n){case"dni":t=this.validDNI(e);break;case"nie":t=this.validNIE(e)}return{type:n,valid:t}}spainIdType(e){return e.match(this.DNI_REGEX)?"dni":e.match(this.NIE_REGEX)?"nie":void 0}validDNI(e){return"TRWAGMYFPDXBNJZSQVHLCKE".charAt(parseInt(e,10)%23)==e.charAt(8)}validNIE(e){var t=e.charAt(0);switch(t){case"X":t=0;break;case"Y":t=1;break;case"Z":t=2}return this.validDNI(t+e.substr(1))}}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=i.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},3364:(e,t,n)=>{n.d(t,{R:()=>l});var i=n(4650),s=(n(6866),n(5089)),r=n(9299),o=n(9101),a=n(3731);let l=(()=>{class e{constructor(e,t){this.utils=e,this.Activatedroute=t,this.goFlow=new i.vpe(null),this.goManual=new i.vpe(null)}ngOnInit(){console.error("data: ",this.data)}gotoFlow(){this.goFlow.emit(!0)}gotoManual(){this.goManual.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(i.Y36(s.F),i.Y36(r.gz))},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-intro-step"]],inputs:{data:"data",solicitud:"solicitud",flowName:"flowName"},outputs:{goFlow:"gotoFlow",goManual:"gotoManual"},decls:10,vars:18,consts:[[1,"flex","flex-col","justify-between","h-full","fixed-content"],[1,"flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-2"],["mat-flat-button","","type","button",1,"px-8","bg-slate-100","hover:bg-slate-200","text-slate-900",3,"click"],["mat-flat-button","","type","button",1,"px-8","hover:opacity-90",3,"click"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0)(1,"div",1),i._UZ(2,"div",2)(3,"div",3),i.ALo(4,"safeHtml"),i.qZA(),i.TgZ(5,"div",4)(6,"button",5),i.NdJ("click",(function(){return t.gotoManual()})),i._uU(7,"Subida manual"),i.qZA(),i.TgZ(8,"button",6),i.NdJ("click",(function(){return t.gotoFlow()})),i._uU(9,"Subida automatica"),i.qZA()()()),2&e&&(i.xp6(2),i.Udp("color",t.data.styles.colors.title)("font-size",t.data.intro?t.data.intro.titleSize+"px":"30px"),i.Q6J("innerHTML",t.data.intro?t.data.intro.title:"Intro de descripción",i.oJD),i.xp6(1),i.Udp("color",t.data.styles.colors.text),i.Q6J("innerHTML",t.data.intro?t.data.intro.description:i.lcZ(4,16,"Descripcion de la intro"),i.oJD),i.xp6(3),i.Udp("border-radius",t.data.styles.btnRound+"px"),i.xp6(2),i.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[o.lW,a.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}"]}),e})()},8962:(e,t,n)=>{n.d(t,{A:()=>k});var i=n(6895),s=n(9101),r=n(1561),o=n(4006),a=n(5601),l=n(3798),c=n(9391),d=n(1572),u=n(182),h=n(4144),p=n(7367),m=n(9602),f=n(3238),g=n(5895),_=n(6257),b=n(1948),v=n(4246),y=n(6981),w=n(1129),x=n(9476),C=n(4650);let k=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=C.oAB({type:e}),e.ɵinj=C.cJS({providers:[a.M,c.o,p.w,u.t,g.T,v.t],imports:[i.ez,s.ot,r.Tx,h.c,o.u5,o.UX,l.a,d.Cq,m.FA,f.XK,_.T5,b.Fk,y.x,w.n,x.F]}),e})()},1760:(e,t,n)=>{n.d(t,{u:()=>T});var i=n(4650),s=(n(6866),n(4006)),r=n(8135),o=n(5089),a=n(9391),l=n(9299),c=n(9617),d=n(5895),u=n(2254),h=n(5601),p=n(6895),m=n(9101),f=n(9549),g=n(4144),_=n(8008),b=n(1406),v=n(3731);function y(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"form",1)(1,"div",2),i._UZ(2,"div",3)(3,"div",4),i.ALo(4,"safeHtml"),i.qZA(),i.TgZ(5,"div",5)(6,"div",6)(7,"mat-form-field",7)(8,"mat-label"),i._uU(9,"DNI / NIE"),i.qZA(),i._UZ(10,"input",8),i.qZA()()(),i.TgZ(11,"div",9)(12,"button",10),i.NdJ("click",(function(){i.CHM(e);const t=i.oxw();return i.KtG(t.goBack())})),i._uU(13," Volver "),i.qZA(),i.TgZ(14,"button",11),i.NdJ("click",(function(){i.CHM(e);const t=i.oxw();return i.KtG(t.gotoStep2())})),i._uU(15," Siguiente "),i.qZA()()()}if(2&e){const e=i.oxw();i.Q6J("formGroup",e.formDni),i.xp6(2),i.Udp("color",e.data.styles.colors.title)("font-size",e.data.Manual?e.data.Manual.titleSize+"px":"30px"),i.Q6J("innerHTML",e.data.Manual?e.data.Manual.title:"Manual de descripción",i.oJD),i.xp6(1),i.Udp("color",e.data.styles.colors.text),i.Q6J("innerHTML",e.data.Manual?e.data.Manual.description:i.lcZ(4,18,"Descripcion de la subida manual"),i.oJD),i.xp6(9),i.Udp("border-radius",e.data.styles.btnRound+"px"),i.xp6(2),i.Udp("color",e.formDni.invalid?"":e.data.styles.colors.btnText)("background",e.formDni.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),i.Q6J("disabled",e.formDni.invalid)}}function w(e,t){if(1&e){const e=i.EpF();i.ynx(0),i.TgZ(1,"app-file-upload",15),i.NdJ("fileUpload",(function(t){const n=i.CHM(e).$implicit,s=i.oxw(3);return i.KtG(s.setFile(n,t))})),i.qZA(),i.BQk()}if(2&e){const e=t.$implicit;i.xp6(1),i.s9C("label",e)}}function x(e,t){if(1&e&&(i.TgZ(0,"div",5),i.YNc(1,w,2,1,"ng-container",14),i.qZA()),2&e){const e=i.oxw(2);i.xp6(1),i.Q6J("ngForOf",e.pack.documents)}}function C(e,t){1&e&&(i.TgZ(0,"div",16),i._UZ(1,"belender-spinner",17),i.qZA()),2&e&&(i.xp6(1),i.Q6J("zoom",.6))}function k(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"form",1)(1,"div",2),i._UZ(2,"div",3)(3,"div",4),i.ALo(4,"safeHtml"),i.qZA(),i.YNc(5,x,2,1,"div",12),i.YNc(6,C,2,1,"div",13),i.TgZ(7,"div",9)(8,"button",10),i.NdJ("click",(function(){i.CHM(e);const t=i.oxw();return i.KtG(t.goBack())})),i._uU(9," Volver "),i.qZA(),i.TgZ(10,"button",11),i.NdJ("click",(function(){i.CHM(e);const t=i.oxw();return i.KtG(t.uploadFiles())})),i._uU(11," Subir archivos "),i.qZA()()()}if(2&e){const e=i.oxw();i.Q6J("formGroup",e.form),i.xp6(2),i.Udp("color",e.data.styles.colors.title)("font-size",e.data.Manual?e.data.Manual.titleSize+"px":"30px"),i.Q6J("innerHTML",e.data.Manual?e.data.Manual.title:"Manual de descripción",i.oJD),i.xp6(1),i.Udp("color",e.data.styles.colors.text),i.Q6J("innerHTML",e.data.Manual?e.data.Manual.description:i.lcZ(4,20,"Descripcion de la subida manual"),i.oJD),i.xp6(2),i.Q6J("ngIf",e.pack&&!e.loadingPack),i.xp6(1),i.Q6J("ngIf",e.loadingPack),i.xp6(2),i.Udp("border-radius",e.data.styles.btnRound+"px"),i.xp6(2),i.Udp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),i.Q6J("disabled",e.form.invalid)}}let T=(()=>{class e{constructor(e,t,n,s,r,o,a,l,c){this.smsComponent=e,this.fb=t,this.utils=n,this.attachmentsS=s,this.ar=r,this.packsS=o,this.notis=a,this.smsFlowService=l,this.solicitudesService=c,this.upload=new i.vpe(null),this.back=new i.vpe(null),this.sendDNI=new i.vpe(null),this.loadingPack=!1,this.step=1}ngOnInit(){this.form=this.fb.group({}),console.warn("data: ",this.data),this.loadingPack=!0,this.packsS.getPackagesByUserID(this.userId).then((e=>{console.warn(e),e&&e.data?this.setPack(e.data):this.loadingPack=!1})).catch((e=>{console.error(e),this.loadingPack=!1})),this.formDni=this.fb.group({dni:[null,[s.kI.required,s.kI.maxLength(9)]]}),console.error(this.smsFlowService.REQUEST),this.smsFlowService.REQUEST&&this.smsFlowService.REQUEST.request_id&&(this.step=2)}setRequestStep(){}gotoStep2(){"SMS"===this.flowName?this.createSmsRequestFromDNI(this.formDni.get("dni").value):this.sendDNI.emit(this.formDni.get("dni").value)}setPack(e){this.pack=e.find((e=>e.id==this.packId)),this.loadingPack=!1,this.setForm()}setForm(){this.pack&&this.pack.documents&&this.pack.documents.forEach((e=>{this.form.addControl(e,new s.NI("",s.kI.required))}))}uploadFiles(){this.upload.emit(!0)}goBack(){"SMS"===this.flowName?this.smsComponent.manual=!1:this.back.emit(!0)}fileChange(e){e.preventDefault(),e.stopPropagation()}setFile(e,t){const n=new FormData;n.append("file",t),n.append("request_id",this.smsFlowService.REQUEST.request_id),n.append("document_name",e),this.notis.showToast("Subiendo documento: "+e,6e3,"info"),this.attachmentsS.uploadFile(n).then((n=>{n&&n.status&&"error"!=n.status?(this.form.get(e).setValue(t),this.notis.showToast("Documento "+e+" subido correctamente",4e3,"success")):n&&n.status&&"error"==n.status&&this.notis.showToast("El documento "+e+" no se ha podido subir: "+n.message,4e3,"error")})).catch((t=>{console.error(t),this.notis.showToast("El documento "+e+" no se ha podido subir: "+t,4e3,"error")}))}createSmsRequestFromDNI(e){let t={document_number:e,user_id:this.userId,package_id:this.packId,check_legal:!0};this.solicitudesService.addSolicitud(t,this.packId,this.userId).then((e=>{e&&e.status&&"error"==e.status?(this.smsFlowService.setRequest(t),e.message&&(400==e.code?"Birthdate incorrect"==e.message?(this.smsComponent.setRequestStatus("form"),this.smsComponent.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc)):"Incorrect date"==e.message?(this.smsComponent.setRequestStatus("form"),this.smsComponent.showAlert(this.labels.warnings.error,this.labels.warnings.wrongDate)):(this.smsComponent.setRequestStatus("no_service"),this.smsFlowService.setLoading(!1)):(this.smsComponent.setRequestStatus("form"),this.smsComponent.showAlert("Error!",e.message))),this.smsComponent.setStatus()):e&&e.status&&"success"==e.status?(this.smsFlowService.updateRequestID(e.data.request_id),this.smsFlowService.setRequest(e.data),this.smsComponent.setStatus(),this.smsFlowService.setSubscriptionOfRequest(),this.smsFlowService.sendMessageToParent({type:"response",data:e.data}),this.smsComponent.acceptTerms()):this.smsComponent.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+e)})).catch((e=>{e&&e.error&&this.smsComponent.showAlert("Error!",e.error),this.smsFlowService.setLoading(!1)}))}}return e.ɵfac=function(t){return new(t||e)(i.Y36(r.T,9),i.Y36(s.QS),i.Y36(o.F),i.Y36(a.o),i.Y36(l.gz),i.Y36(c.U),i.Y36(d.T),i.Y36(u.p),i.Y36(h.M))},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-manual-step"]],inputs:{data:"data",flowName:"flowName",packId:"packId",userId:"userId",labels:"labels"},outputs:{upload:"uploadFiles",back:"goBack",sendDNI:"dniChange"},decls:2,vars:2,consts:[["class","flex flex-col justify-between h-full fixed-content",3,"formGroup",4,"ngIf"],[1,"flex","flex-col","justify-between","h-full","fixed-content",3,"formGroup"],[1,"flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"py-4"],[1,"w-full"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["maxlength","9","formControlName","dni","type","text","placeholder","Ingresa tu DNI o NIE","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-2"],["mat-flat-button","","type","button",1,"px-8","bg-slate-100","hover:bg-slate-200","text-slate-900",3,"click"],["mat-flat-button","","type","button",1,"px-8","hover:opacity-90",3,"disabled","click"],["class","py-4",4,"ngIf"],["class","py-10 px-4",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"label","fileUpload"],[1,"py-10","px-4"],["text","Cargando documentos",3,"zoom"]],template:function(e,t){1&e&&(i.YNc(0,y,16,20,"form",0),i.YNc(1,k,12,22,"form",0)),2&e&&(i.Q6J("ngIf",1==t.step),i.xp6(1),i.Q6J("ngIf",2==t.step))},dependencies:[p.sg,p.O5,m.lW,f.KE,f.hX,g.Nt,s._Y,s.Fj,s.JJ,s.JL,s.nD,s.sg,s.u,_.O,b.Y,v.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}"]}),e})()},3468:(e,t,n)=>{n.d(t,{f:()=>T});var i=n(6895),s=n(9101),r=n(1561),o=n(4006),a=n(5601),l=n(3798),c=n(9391),d=n(1572),u=n(182),h=n(4144),p=n(7367),m=n(9602),f=n(3238),g=n(5895),_=n(6257),b=n(1948),v=n(4246),y=n(6981),w=n(1129),x=n(9476),C=n(969),k=n(4650);let T=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=k.oAB({type:e}),e.ɵinj=k.cJS({providers:[a.M,c.o,p.w,u.t,g.T,v.t],imports:[i.ez,s.ot,r.Tx,h.c,o.u5,o.UX,l.a,d.Cq,m.FA,f.XK,_.T5,b.Fk,y.x,w.n,x.F,C.O]}),e})()},8526:(e,t,n)=>{n.r(t),n.d(t,{PersonalModule:()=>pt});var i=n(6895),s=n(6383),r=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),b=n(3798),v=n(9391),y=n(1572),w=n(182),x=n(4144),C=n(7367),k=n(9602),T=n(3238),S=n(5895),M=n(6257),I=n(1948),E=n(4246),O=n(9299),L=n(6e3),P=n(5861),D=n(7582),A=n(9549),N=n(9933),q=n(5762),Y=n(8259),R=n(2340),F=n(1363),U=n(4650),Z=n(5089),H=n(8460),j=n(529),z=n(6554);let B=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(R.N.baseUrl+"/requests/known-client",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addFiles(e){return new Promise(((t,n)=>{this.localFetch.postFile(R.N.baseUrl+"/requests/known-client/upload-files",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/known-client/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOtp(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/known-client/otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendPassword(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/known-client/password",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}preRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/pre-request/known-client",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{let i="/requests/known-client/otp";R.N.scraperMock&&(i="/mockscrapper/requests/known-client/otp"),this.localFetch.postFetchWhitoutToken(R.N.baseUrl+i,e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(U.LFG(Z.F),U.LFG(j.eN),U.LFG(z.r))},e.ɵprov=U.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var J=n(5412),V=n(6830),Q=n(833),W=n(4302),G=n(3731);function $(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.hij("¿No has recibido el código? Solicítalo de nuevo en ",e.secsCount," segundos")}}function K(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.AsE("¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? Solicítalo de nuevo en ",e.secsCount," segundos")}}function X(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.hij("¿No has recibido el código en tu teléfono? Solicítalo de nuevo en ",e.secsCount," segundos")}}const ee=function(e,t,n){return{color:e,border:t,background:n}};function te(e,t){if(1&e&&(U.ynx(0),U.TgZ(1,"small",11),U.YNc(2,$,2,1,"span",5),U.YNc(3,K,2,2,"span",5),U.YNc(4,X,2,1,"span",5),U.qZA(),U.BQk()),2&e){const e=U.oxw();U.xp6(1),U.Q6J("ngStyle",U.kEZ(4,ee,e.data.styles.colors.accentColor,"1px solid "+e.data.styles.colors.accentColor,e.data.styles.colors.accentBgColor)),U.xp6(1),U.Q6J("ngIf",!e.lastNumberPhone),U.xp6(1),U.Q6J("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),U.xp6(1),U.Q6J("ngIf",e.lastNumberPhone&&e.data.config.noRetryInBadPhone)}}function ne(e,t){1&e&&(U.TgZ(0,"span"),U._uU(1," ¿No has recibido el código en tu teléfono? "),U.qZA())}function ie(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.hij(" ¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? ")}}function se(e,t){1&e&&(U.TgZ(0,"span"),U._uU(1," ¿No has recibido el código en el teléfono? "),U.qZA())}const re=function(e,t){return{color:e,background:t}};function oe(e,t){if(1&e){const e=U.EpF();U.ynx(0),U.TgZ(1,"small",11),U.YNc(2,ne,2,0,"span",5),U.YNc(3,ie,2,1,"span",5),U.YNc(4,se,2,0,"span",5),U.TgZ(5,"a",12),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.resendOTP())})),U._uU(6,"Reenviar"),U.qZA()(),U.BQk()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("ngStyle",U.kEZ(5,ee,e.data.styles.colors.dangerColor,"1px solid "+e.data.styles.colors.dangerColor,e.data.styles.colors.dangerBgColor)),U.xp6(1),U.Q6J("ngIf",!e.lastNumberPhone),U.xp6(1),U.Q6J("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),U.xp6(1),U.Q6J("ngIf",e.data.config.noRetryInBadPhone),U.xp6(1),U.Q6J("ngStyle",U.WLB(9,re,e.data.styles.colors.dangerTextButtonColor,e.data.styles.colors.dangerColor))}}let ae=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.solucitudesService=n,this.activeRoute=i,this.next=new U.vpe(null),this.errPhone=new U.vpe(null),this.resendO=new U.vpe(null),this.secsCount=60,this.lastNumberPhone="XXX"}ngOnInit(){this.form=this.fb.group({code1:[null,[p.kI.required,p.kI.maxLength(6),p.kI.minLength(6)]]}),this.initSecsInterval(),this.activeRoute.queryParams.subscribe((e=>{e&&e.request_id&&(this.requestID=e.request_id)}),(e=>{console.error(e)})),this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastNumberPhone=t}initSecsInterval(){this.interv=setInterval((()=>{this.secsCount--,this.secsCount<=0&&this.finishSecsInterval()}),1e3)}finishSecsInterval(){this.interv&&clearInterval(this.interv)}nextStep(){let e={code:this.getCode()};this.next.emit(e)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){return(0,P.Z)((function*(){}))()}errorStep(){this.errPhone.emit(!0)}setInputEvent(e){""!=e.target.value?Y(e.target).next().focus():"Backspace"==e.code&&Y(e.target).prev().focus()}resendOTP(){this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(_.M),U.Y36(O.gz))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-otp-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},decls:16,vars:20,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","gap-2","items-center","justify-start","w-full","max-w-[200px]"],["appearance","outline",1,"w-full","flex-1"],["tabindex","1","maxlength","6","minlength","1","formControlName","code1","type","text","matInput","",3,"change","keyup"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"info-time","w-fit",3,"ngStyle"],[1,"ml-4",3,"ngStyle","click"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.TgZ(5,"div",4),U.YNc(6,te,5,8,"ng-container",5),U.YNc(7,oe,7,12,"ng-container",5),U.qZA(),U.TgZ(8,"div",6)(9,"mat-form-field",7)(10,"mat-label"),U._uU(11," Código OTP "),U.qZA(),U.TgZ(12,"input",8),U.NdJ("change",(function(e){return t.capturePasteEvent(e)}))("keyup",(function(e){return t.setInputEvent(e)})),U.qZA()()()(),U.TgZ(13,"div",9)(14,"button",10),U.NdJ("click",(function(){return t.nextStep()})),U._uU(15,"Siguiente"),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.otp.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,18,t.texts.otp.description||""),U.oJD),U.xp6(3),U.Q6J("ngIf",t.secsCount&&t.secsCount>0),U.xp6(1),U.Q6J("ngIf",!t.secsCount||t.secsCount<=0),U.xp6(7),U.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",t.form.invalid))},dependencies:[i.O5,i.PC,u.lW,A.KE,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.nD,p.sg,p.u,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function le(e,t){if(1&e&&(U.TgZ(0,"div",1),U._UZ(1,"div",2)(2,"div",3),U.ALo(3,"safeHtml"),U.qZA()),2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),U.Q6J("innerHTML",e.texts.success.title,U.oJD),U.xp6(1),U.Udp("color",e.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(3,8,e.texts.success.description||""),U.oJD)}}let ce=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s}ngOnInit(){}save(){}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(_.M),U.Y36(v.o),U.Y36(S.T))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts"},decls:1,vars:1,consts:[["class"," pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&U.YNc(0,le,4,10,"div",0),2&e&&U.Q6J("ngIf",!t.data.config.infiniteLoopInCompleted)},dependencies:[i.O5,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function de(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",5)(1,"button",6),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.retry())})),U._uU(2,"Intentarlo nuevamente"),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function ue(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",5)(1,"button",7),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.newRequest())})),U._uU(2,"Crear nueva solicitud"),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}let he=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.retryOp=new U.vpe(null),this.newReq=new U.vpe(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(_.M),U.Y36(v.o),U.Y36(S.T))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(U.TgZ(0,"div",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA(),U.YNc(5,de,3,6,"div",4),U.YNc(6,ue,3,6,"div",4),U.qZA()),2&e&&(U.xp6(2),U.Q6J("innerHTML",t.texts.fail.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,6,t.texts.fail.description),U.oJD),U.xp6(2),U.Q6J("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),U.xp6(1),U.Q6J("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[i.O5,u.lW,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();n(6866);var pe=n(1763),me=n(5696);const fe=["termsCheckbox"],ge=["termsCertCheckbox"],_e=["assignmentCheckbox"];function be(e,t){1&e&&(U.TgZ(0,"div",15)(1,"mat-form-field",16)(2,"mat-label"),U._uU(3,"Email"),U.qZA(),U._UZ(4,"input",17),U.qZA()())}function ve(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",18)(1,"belender-checkbox",19,20),U.NdJ("changeCheckbox",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.setTerms(t))})),U.TgZ(3,"belender-terms-and-policy-links",21),U.NdJ("goToTerms",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.gotoTermsAndConditions(t))})),U.qZA()()()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("color",e.data.styles.colors.title),U.xp6(2),U.Q6J("userId",e.userId)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink)("firstSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.firstSentence)("secondSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.secondSentence)("thirdSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.thirdSentence)("policyActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.policyActionText)("termsActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.termsActionText)("customTerms",e.data[e.flowName].customTerms)}}function ye(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",22)(1,"belender-checkbox",9),U.NdJ("changeCheckbox",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.setPower(t))})),U._uU(2," Consiento expresamente a la activación de un poder digital según las condiciones que pueden verse "),U.TgZ(3,"a",11),U.NdJ("click",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.gotoPowerConditions(t))})),U.TgZ(4,"u"),U._uU(5,"aquí"),U.qZA()()()()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("color",e.data.styles.colors.title)}}function we(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",18)(1,"belender-checkbox",9,23),U.NdJ("changeCheckbox",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.setAssignment(t))})),U._UZ(3,"div",24),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("color",e.data.styles.colors.title),U.xp6(2),U.Q6J("innerHTML",null==e.data?null:e.data.config.dataAssignmentText,U.oJD)}}function xe(e,t){1&e&&(U.TgZ(0,"div",25),U._UZ(1,"mat-icon",26),U._uU(2," Debes leer los términos y condiciones para poder continuar "),U.qZA())}const Ce={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let ke=(()=>{class e{constructor(e,t){this.utils=e,this.fb=t,this.requestID=null,this.next=new U.vpe(null),this.goTerms=new U.vpe(null),this.goTermsCert=new U.vpe(null),this.goPower=new U.vpe(null),this.acceptTerms=!1,this.acceptTerms2=!1,this.termsReaded=!1,this.terms2Readed=!1,this.step=0,this.assignment=!1,this.powerActivate=!1}ngOnInit(){this.setForm(this.solicitud?this.solicitud:null)}tabChanged(e){this.step=e,this.setForm(null)}setForm(e){let t=e?e.person_email||e.email:null;this.form=this.fb.group(this.data.config.followMail?{email:[t,[p.kI.required,p.kI.email]]}:{email:[t]})}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}setTerms2Check(e){this.certCheckComponent.checked=e,this.acceptTerms2=e}setAssignmentCheck(e){this.assignmentCheckComponent.checked=e,this.assignment=e}setTerms(e){this.acceptTerms=e}setTerms2(e){this.acceptTerms2=e}setAssignment(e){this.assignment=e}nextStep(){let e={terms_and_conditions_service:this.acceptTerms,terms_and_conditions_certificate_emition:this.acceptTerms2,request_id:this.solicitud.request_id};this.data&&this.data.config&&this.data.config.followMail&&(e.email_copy=this.form.get("email").value),(this.data.config.activatePower||this.solicitud?.power_activate)&&(e.power_activate=!0,e.terms_and_conditions_power=this.powerActivate?1:0),this.next.emit(e)}gotoTermsAndConditions(e){this.termsReaded=!0,e.preventDefault(),e.stopPropagation(),this.goTerms.emit(!0)}gotoTermsAndConditionsCertificate(e){this.terms2Readed=!0,e.preventDefault(),e.stopPropagation(),this.goTermsCert.emit(!0)}getIfValid(){return!((this.requestID?this.solicitud?.power_activate:this.data?.config.activatePower)&&!this.powerActivate)&&this.getAssignmentValidation()}getAssignmentValidation(){return!!(!this.data.config.forceChecks||this.termsReaded&&this.terms2Readed)&&(this.data.config.hideCheckLegal&&(this.acceptTerms=!0),this.data.config.dataAssignmentCheck?this.acceptTerms&&this.acceptTerms2&&this.assignment:this.acceptTerms&&this.acceptTerms2)}gotoPowerConditions(e){this.goPower.emit(!0)}setPower(e){this.powerActivate=e}}return e.ɵfac=function(t){return new(t||e)(U.Y36(Z.F),U.Y36(p.QS))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(U.Gf(fe,5),U.Gf(ge,5),U.Gf(_e,5)),2&e){let e;U.iGM(e=U.CRH())&&(t.checkComponent=e.first),U.iGM(e=U.CRH())&&(t.certCheckComponent=e.first),U.iGM(e=U.CRH())&&(t.assignmentCheckComponent=e.first)}},inputs:{userId:"userId",flowName:"flowName",requestID:"requestID",data:"data",texts:"texts",solicitud:"solicitud",acceptTerms:"acceptTerms",acceptTerms2:"acceptTerms2",termsReaded:"termsReaded",terms2Readed:"terms2Readed"},outputs:{next:"nextStep",goTerms:"goToTerms",goTermsCert:"goToTermsCertificate",goPower:"goToPower"},features:[U._Bn([{provide:T.sG,useValue:Ce},{provide:U.soG,useValue:"es-ES"}])],decls:22,vars:24,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["class","w-full",4,"ngIf"],["class","mt-6 flex justify-start items-center w-full flex-100",4,"ngIf"],["class","flex justify-between items-center w-full flex-100",4,"ngIf"],[1,"flex","justify-start","items-center","w-full","flex-100"],[3,"color","changeCheckbox"],["termsCertCheckbox",""],["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"w-full"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","email","type","email","placeholder","Ingresa tu email","matInput",""],[1,"mt-6","flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],[1,"flex","justify-between","items-center","w-full","flex-100"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA(),U.TgZ(5,"div",4),U.YNc(6,be,5,0,"div",5),U.YNc(7,ve,4,9,"div",6),U.YNc(8,ye,6,1,"div",7),U.TgZ(9,"div",8)(10,"belender-checkbox",9,10),U.NdJ("changeCheckbox",(function(e){return t.setTerms2(e)})),U._uU(12," He leído y acepto los "),U.TgZ(13,"a",11),U.NdJ("click",(function(e){return t.gotoTermsAndConditionsCertificate(e)})),U.TgZ(14,"u"),U._uU(15,"términos y condiciones"),U.qZA()(),U._uU(16," para la emisión del certificado "),U.qZA()(),U.YNc(17,we,4,2,"div",6),U.YNc(18,xe,3,0,"div",12),U.qZA(),U.TgZ(19,"div",13)(20,"button",14),U.NdJ("click",(function(){return t.nextStep()})),U._uU(21," Siguiente "),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.form.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,22,t.texts.form.description||""),U.oJD),U.xp6(3),U.Q6J("ngIf",null==t.data||null==t.data.config?null:t.data.config.followMail),U.xp6(1),U.Q6J("ngIf",!t.data.config.hideCheckLegal),U.xp6(1),U.Q6J("ngIf",t.requestID?null==t.solicitud?null:t.solicitud.power_activate:null==t.data?null:t.data.config.activatePower),U.xp6(2),U.Q6J("color",t.data.styles.colors.title),U.xp6(7),U.Q6J("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),U.xp6(1),U.Q6J("ngIf",t.data.config.forceChecks&&(!t.termsReaded||!t.terms2Readed)),U.xp6(2),U.Udp("color",t.form.invalid||!t.getIfValid()?"":t.data.styles.colors.btnText)("background",t.form.invalid||!t.getIfValid()?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",t.form.invalid||!t.getIfValid()))},dependencies:[i.O5,d.Hw,u.lW,A.KE,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.sg,p.u,pe.b,me.T,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Te=n(5145);let Se=(()=>{class e{constructor(e){this.utils=e,this.status="",this.label="Cargando datos.."}ngOnInit(){this.data.config&&this.data.config.infiniteLoopInCompleted?this.label="":Te.Z.forEach((e=>{e.text==this.status&&(this.label=e.label)}))}}return e.ɵfac=function(t){return new(t||e)(U.Y36(Z.F))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-loading-step"]],inputs:{status:"status",data:"data"},decls:5,vars:1,consts:[[1,"fixed-content","h-full"],[1,"h-full","py-10","flex","flex-col","items-center"]],template:function(e,t){1&e&&(U.TgZ(0,"div",0)(1,"div",1),U._UZ(2,"mat-progress-spinner"),U.TgZ(3,"p"),U._uU(4),U.qZA()()()),2&e&&(U.xp6(4),U.Oqu(t.label))},dependencies:[y.Ou],styles:[".content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Me=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA()()),2&e&&(U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.noService.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,8,t.texts.noService.description),U.oJD))},dependencies:[p._Y,p.JL,p.F,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Ie=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.retryOp=new U.vpe(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return"Abandonado después de esperar OTP de Seguridad Social";case"abandoned_after_invalid_otp_seguridad_social":return"Abandonado despues de OTP inválido en Seguridad Social";case"abandoned_after_invalid_otp_aeat":return"Abandonado despues de OTP inválido en AEAT";case"abandoned_after_waiting_otp_aeat":return"Abandonado después de esperar OTP de AEAT";default:return this.solicitud.status_message||this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(_.M),U.Y36(v.o),U.Y36(S.T))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:10,vars:17,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(U.TgZ(0,"div",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.TgZ(5,"div",4),U._uU(6),U.qZA()(),U.TgZ(7,"div",5)(8,"button",6),U.NdJ("click",(function(){return t.retry()})),U._uU(9,"Intentarlo nuevamente"),U.qZA()()()),2&e&&(U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.abandoned.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,15,t.texts.abandoned.description),U.oJD),U.xp6(3),U.hij(" ",t.getTextStatus()," "),U.xp6(2),U.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Ee(e,t){return n=>{const i=n.controls[t];i.errors&&!i.errors.confirmedValidator||i.setErrors(n.controls[e].value!==i.value?{confirmedValidator:!0}:null)}}function Oe(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," La contraseña es requerida "),U.qZA())}function Le(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," La contraseña debe tener al menos 8 carácteres "),U.qZA())}function Pe(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," Es necesario repetir la contraseña "),U.qZA())}function De(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," Las contraseñas deben coincidir "),U.qZA())}function Ae(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," La contraseña debe tener al menos 8 carácteres "),U.qZA())}const Ne={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let qe=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.form=new p.cw({}),this.next=new U.vpe(null)}ngOnInit(){this.setForm()}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({password:["",[p.kI.required]],confirm_password:["",[p.kI.required]]},{validator:Ee("password","confirm_password")})}nextStep(){let e={set_password_certificate:this.form.get("password").value};this.next.emit(e)}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.qu),U.Y36(Z.F))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-password-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep"},features:[U._Bn([{provide:T.sG,useValue:Ne},{provide:U.soG,useValue:"es-ES"}])],decls:22,vars:23,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","password","minlength","8","type","password","matInput",""],["class","text-red-500",4,"ngIf"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","confirm_password","minlength","8","type","password","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-red-500"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA(),U.TgZ(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),U._uU(8,"Contraseña"),U.qZA(),U._UZ(9,"input",6),U.YNc(10,Oe,2,0,"mat-hint",7),U.YNc(11,Le,2,0,"mat-hint",7),U.qZA(),U.TgZ(12,"mat-form-field",8)(13,"mat-label"),U._uU(14,"Repite Contraseña"),U.qZA(),U._UZ(15,"input",9),U.YNc(16,Pe,2,0,"mat-hint",7),U.YNc(17,De,2,0,"mat-hint",7),U.YNc(18,Ae,2,0,"mat-hint",7),U.qZA()(),U.TgZ(19,"div",10)(20,"button",11),U.NdJ("click",(function(){return t.nextStep()})),U._uU(21," Guardar "),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.password.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,21,t.texts.password.description),U.oJD),U.xp6(7),U.Q6J("ngIf",t.f.password.touched&&t.f.password.invalid&&t.f.password.errors.required),U.xp6(1),U.Q6J("ngIf",t.f.password.invalid&&t.f.password.errors.minlength),U.xp6(5),U.Q6J("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.required),U.xp6(1),U.Q6J("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.confirmedValidator),U.xp6(1),U.Q6J("ngIf",t.f.confirm_password.invalid&&t.f.confirm_password.errors.minlength),U.xp6(2),U.Udp("color",t.form.invalid?"":t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",t.form.invalid))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.sg,p.u,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const Ye=["formStep"];function Re(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"vex-power-cert",4),U.NdJ("accept",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.acceptPowerCert())})),U.qZA()}if(2&e){const e=U.oxw();U.Q6J("hideButtons",!1)("flow","KnownClient")("userId",e.userId)}}function Fe(e,t){if(1&e&&(U.TgZ(0,"div",9),U._UZ(1,"img",10),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("src",e.data.styles.logoUrl,U.LSH)}}function Ue(e,t){if(1&e&&U._UZ(0,"belender-loading-step",20),2&e){const e=U.oxw(3);U.Q6J("status",null==e.solicitud?null:e.solicitud.status_code)("data",e.data)}}function Ze(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-form-step",21,22),U.NdJ("goToTerms",(function(){U.CHM(e);const t=U.oxw(3);return U.KtG(t.gotoTermsAndConditions())}))("goToPower",(function(){U.CHM(e);const t=U.oxw(3);return U.KtG(t.gotoPowerConditions())}))("goToTermsCertificate",(function(){U.CHM(e);const t=U.oxw(3);return U.KtG(t.gotoTermsAndConditionsCertificate())}))("nextStep",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.gotoPassword(t))})),U.qZA()}if(2&e){const e=U.oxw(3);U.Q6J("userId",e.userId)("requestID",e.requestID)("data",e.data)("flowName",e.flowName)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function He(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-password-step",23),U.NdJ("nextStep",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.sendPassword(t))})),U.qZA()}if(2&e){const e=U.oxw(3);U.Q6J("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function je(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-otp-step",24),U.NdJ("resendOTP",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.resendOTP(t))}))("errorPhone",(function(){U.CHM(e);const t=U.oxw(3);return U.KtG(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.requestOTP(t))})),U.qZA()}if(2&e){const e=U.oxw(3);U.Q6J("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function ze(e,t){if(1&e&&U._UZ(0,"belender-success-step",25),2&e){const e=U.oxw(3);U.Q6J("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Be(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-fail-step",26),U.NdJ("retry",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.retryRequest(t))}))("newRequest",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.newRequest(t))})),U.qZA()}if(2&e){const e=U.oxw(3);U.Q6J("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Je(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-abandoned-step",27),U.NdJ("retry",(function(t){U.CHM(e);const n=U.oxw(3);return U.KtG(n.retryRequest(t))})),U.qZA()}if(2&e){const e=U.oxw(3);U.Q6J("solicitud",e.solicitud)("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Ve(e,t){if(1&e&&U._UZ(0,"belender-no-service-step",28),2&e){const e=U.oxw(3);U.Q6J("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("data",e.data)}}function Qe(e,t){if(1&e&&(U.TgZ(0,"div",29)(1,"div",30)(2,"h1",31),U._uU(3,"No existe la solicitud"),U.qZA()(),U.TgZ(4,"div",32),U._uU(5,"No existen solicitudes activas con el código requerido"),U.qZA()()),2&e){const e=U.oxw(3);U.xp6(4),U.Udp("color",e.data.styles.colors.text)}}function We(e,t){if(1&e&&(U.ynx(0),U.YNc(1,Ue,1,2,"belender-loading-step",11),U.YNc(2,Ze,2,6,"belender-form-step",12),U.YNc(3,He,1,3,"belender-password-step",13),U.YNc(4,je,1,3,"belender-otp-step",14),U.YNc(5,ze,1,2,"belender-success-step",15),U.YNc(6,Be,1,3,"belender-fail-step",16),U.YNc(7,Je,1,3,"belender-abandoned-step",17),U.YNc(8,Ve,1,2,"belender-no-service-step",18),U.YNc(9,Qe,6,2,"div",19),U.BQk()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("ngIf","loading"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","form"==e.getStatus()&&!e.loading),U.xp6(1),U.Q6J("ngIf","password"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","otp"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","success"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","failed"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","abandoned"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","no-service"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","no-exist"==e.getStatus())}}function Ge(e,t){1&e&&U._UZ(0,"belender-disabled-url")}function $e(e,t){if(1&e&&(U.TgZ(0,"div",33),U._UZ(1,"mat-progress-spinner",34),U.TgZ(2,"p",35),U._uU(3),U.qZA()()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("value",e.spinnerValue)("mode",e.spinnerMode),U.xp6(2),U.Oqu(e.loading)}}function Ke(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",36)(1,"div",29)(2,"div",37),U._uU(3,"Error!"),U.qZA(),U._UZ(4,"div",38),U.qZA(),U.TgZ(5,"div",39)(6,"button",40),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw(2);return U.KtG(t.error=!1)})),U._uU(7,"Ingresar manualmente"),U.qZA()()()}if(2&e){const e=U.oxw(2);U.xp6(4),U.Udp("color",e.data.styles.colors.text),U.Q6J("innerHTML",e.error,U.oJD)}}function Xe(e,t){if(1&e&&(U.TgZ(0,"div",5)(1,"div"),U.YNc(2,Fe,2,1,"div",6),U.YNc(3,We,10,9,"ng-container",3),U.YNc(4,Ge,1,0,"belender-disabled-url",3),U.YNc(5,$e,4,3,"div",7),U.YNc(6,Ke,8,3,"div",8),U.qZA()()),2&e){const e=U.oxw();U.xp6(1),U.Gre("h-full w-full flex-auto p-0 md:p-3 ",e.data.styles.typography,""),U.Udp("background",e.data.styles.colors.background),U.xp6(1),U.Q6J("ngIf",e.data.styles.withLogo&&"loading"!=e.getStatus()),U.xp6(1),U.Q6J("ngIf",!e.error&&!e.disableURL),U.xp6(1),U.Q6J("ngIf",!e.error&&e.disableURL),U.xp6(1),U.Q6J("ngIf",e.loading&&!e.error),U.xp6(1),U.Q6J("ngIf",!e.loading&&e.error)}}function et(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"vex-terms",41),U.NdJ("accepted",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.handleTermsResponse(!0))}))("cancelled",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.handleTermsResponse(!1))})),U.qZA()}if(2&e){const e=U.oxw();U.Q6J("flow","presencial")("requestStatus",e.solicitud?e.solicitud.status_code:"")}}function tt(e,t){if(1&e&&(U.ynx(0),U.TgZ(1,"div",42),U._uU(2),U.qZA(),U.BQk()),2&e){const e=U.oxw();U.xp6(2),U.hij("TestMode ",e.testMode?"ON":"OFF","")}}let nt=class{constructor(e,t,n,i,s,r,o,a,l,c){this.cd=e,this.Activatedroute=t,this.utils=n,this.solicitudesService=i,this.customizationService=s,this.customizationStoreService=r,this.notis=o,this.webhooksService=a,this.knownService=l,this.dialog=c,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.viewPowerTerms=!1,this.disableURL=!1,this.flowName="KnownClient",this.showTermsDialog=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.userId?this.setInitialData(this.userId):this.loading=null,"pro"!=R.N.env&&(Y(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),Y(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}ngOnDestroy(){}setInitialData(e){var t=this;return(0,P.Z)((function*(){const n=yield t.getFlow(e);if(t.data={config:t.customizationStoreService.FUNDER_CONFIG,styles:t.customizationStoreService.FUNDER_STYLES,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.notis.showAlert("Error!","No se ha configurado la customización del widget para este usuario","error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,P.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}sendMessageToParent(e){window.top.postMessage(e,"*")}validateRequestIdInUrl(){this.Activatedroute.queryParams.subscribe((e=>{e&&e.acceptTerms&&(this.autoAcceptTerms=!0),e&&e.request_id?(this.disableURL=!1,this.requestID=e.request_id,this.setFormFromVcCode(e.request_id)):this.loading=!1}),(e=>{this.loading=!1}))}setFormFromVcCode(e){var t=this;return(0,P.Z)((function*(){t.loading="Obteniendo datos de la solicitud...",t.solicitudesService.getSolicitudByCode(e).then((e=>{console.warn("solicitud: ",e.data),e&&e.data?(t.solicitud=e.data,t.setSubscriptionOfRequest(),t.loading=!1,t.skipCreationOfRequest=t.solicitud&&t.solicitud.status_code&&"prerequest"!=t.solicitud.status_code,t.autoAcceptTerms&&t.gotoOTP()):t.loading=!1})).catch((e=>{t.loading=!1}))}))()}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==R.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==R.N.env&&(e="wss://notifications.belender.net"),R.N.notificationsBaseUrl&&(e=R.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),t.setSubscriptionOfRequestOld()},this.socket.onclose=function(e){console.log("Conexión cerrada"),t.setSubscriptionOfRequestOld()}}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,this.sendMessageToParent({type:"websocket",data:e}),"invalid_otp"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),"terms_and_conditions"!=this.solicitud.status_code&&setTimeout((()=>{this.loading=!1,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.solicitudesService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}gotoTerms(e){this.loading="Enviando datos..",e.package_id=this.packId,e.user_id=this.userId,this.testMode?setTimeout((()=>{this.solicitud=new q.l,this.solicitud.status_code="waiting_otp",this.loading=!1}),4e3):this.skipCreationOfRequest?(this.gotoOTP(),this.setSubscriptionOfRequest()):this.solicitudesService.addSolicitud(e,this.packId,this.userId).then((t=>{t&&t.status&&"error"==t.status?(this.solicitud=e,t.message&&(400==t.code?"Birthdate incorrect"==t.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha de nacimiento incorrecta")):(this.solicitud.status_code="no_service",this.loading=!1):(this.solicitud.status_code="form",this.showAlert("Error!",t.message)))):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,this.sendMessageToParent({type:"response",data:t.data||t}),this.gotoOTP()):this.showAlert("Error!","Error desconocido: "+t)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=!1})))}sendNewData(e){this.loading="Enviando información..",this.solicitudesService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e),this.loading=!1):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.initWaitingForResponse("Validando nuevos datos, espere por favor.."),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}showAlert(e,t){this.loading=!1,this.notis.showAlert(e,t)}gotoPassword(e){this.loading="Iniciando el proceso de emisión de certificado..";let t=e;(this.data.config.activatePower||this.solicitud?.power_activate)&&(t.power_activate=!0,t.terms_and_conditions_power=e.terms_and_conditions_power),this.knownService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status?this.sendMessageToParent({type:"response",data:e.data||e}):this.loading=!1})).catch((e=>{t&&t.error&&this.showAlert("Error!",t.error),this.loading=!1}))}gotoOTP(e){let t=e;t.request_id=this.requestID,t.user_id=this.userId,this.initWaitingForResponse("Iniciando el proceso de emisión de certificado.."),setTimeout((()=>{this.solicitud=new q.l,this.loading=!1,this.solicitud.status_code="waiting_otp"}),2e3)}requestOTP(e){let t={otp:e.code,request_id:this.solicitud.request_id};this.loading="Enviando código OTP ..",this.knownService.sendOtp(t).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status?this.sendMessageToParent({type:"response",data:e.data||e}):this.loading=!1})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}sendPassword(e){let t={password:e.set_password_certificate,request_id:this.solicitud.request_id};this.loading="Enviando contraseña..",this.knownService.sendPassword(t).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status?this.sendMessageToParent({type:"response",data:e.data||e}):this.loading=!1})).catch((t=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.solicitudesService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=!1):this.loading=!1})).catch((e=>{this.loading=!1}))}gotoErrorPhone(){}setRequestStatus(e){this.solicitud.status_code=e}retryRequest(e){let t={request_id:e,user_id:this.userId};this.loading="Reintentando enviar la solicitud...",this.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}newRequest(e){this.solicitud.status_code="created"}getStatus(){return!this.solicitud||this.solicitud&&("created"==this.solicitud.status_code||"form"==this.solicitud.status_code||"terms_and_conditions"==this.solicitud.status_code)?"form":!this.solicitud||"waiting_login"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_otp"!=this.solicitud.status_code&&"invalid_otp"!=this.solicitud.status_code&&"waiting_otp_seguridad_social"!=this.solicitud.status_code&&"invalid_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"waiting_password"!=this.solicitud.status_code&&"approved_terms_digital_power"!=this.solicitud.status_code&&"declined_terms_digital_power"!=this.solicitud.status_code?!this.solicitud||"abandoned_after_bad_phone"!=this.solicitud.status_code&&"abandoned_after_invalid_otp"!=this.solicitud.status_code&&"abandoned_after_terms_and_conditions"!=this.solicitud.status_code&&"abandoned_after_waiting_otp"!=this.solicitud.status_code?!this.solicitud||"all_documents_downloaded"!=this.solicitud.status_code&&"certificate_created"!=this.solicitud.status_code&&"partial_documents_downloaded"!=this.solicitud.status_code&&"waiting_certificate"!=this.solicitud.status_code&&"consent_process_completed"!=this.solicitud.status_code&&"success_otp"!=this.solicitud.status_code&&"otp_success"!=this.solicitud.status_code&&"waiting_documents"!=this.solicitud.status_code?!this.solicitud||"bad_phone"!=this.solicitud.status_code&&"phone_not_exist_otp"!=this.solicitud.status_code?!this.solicitud||"failed_with_retry"!=this.solicitud.status_code&&"failed_without_retry"!=this.solicitud.status_code&&"failed_documents_downloaded"!=this.solicitud.status_code?this.solicitud&&"no_service"==this.solicitud.status_code?"no-service":"no-exist":"failed":this.data.config.noRetryInBadPhone?"otp":"error-data":this.data.config&&this.data.config.infiniteLoopInCompleted?"loading":"success":"abandoned":"password":"otp":(this.loading="Estamos procesando su solicitud. Espere un momento por favor","loading")}sendRetry(){}gotoTermsAndConditions(){this.showTermsDialog=!0}handleTermsResponse(e){this.showTermsDialog=!1,e&&this.formComponent.setTermsCheck(!0)}gotoTermsAndConditionsCertificate(){this.dialog.open(F.v,{panelClass:"fullscreen-dialog",data:{flow:"presencial"}}).afterClosed().subscribe((e=>{e&&this.formComponent.setTerms2Check(!0)}))}gotoPowerConditions(){this.viewPowerTerms=!0}acceptPowerCert(){this.viewPowerTerms=!1}};nt.ɵfac=function(e){return new(e||nt)(U.Y36(U.sBO),U.Y36(O.gz),U.Y36(Z.F),U.Y36(_.M),U.Y36(C.w),U.Y36(H.r),U.Y36(S.T),U.Y36(w.t),U.Y36(B),U.Y36(J.uw))},nt.ɵcmp=U.Xpm({type:nt,selectors:[["belender-widget-personal"]],viewQuery:function(e,t){if(1&e&&U.Gf(Ye,5),2&e){let e;U.iGM(e=U.CRH())&&(t.formComponent=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[U._Bn([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:4,vars:4,consts:[[3,"hideButtons","flow","userId","accept",4,"ngIf"],["class","h-full widget-belender",4,"ngIf"],[3,"flow","requestStatus","accepted","cancelled",4,"ngIf"],[4,"ngIf"],[3,"hideButtons","flow","userId","accept"],[1,"h-full","widget-belender"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],["class","loading-wrapper animated fadeIn",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[3,"status","data",4,"ngIf"],[3,"userId","requestID","data","flowName","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep",4,"ngIf"],[3,"data","texts","solicitud","nextStep",4,"ngIf"],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","texts",4,"ngIf"],[3,"data","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"solicitud","data","texts","retry",4,"ngIf"],[3,"texts","data",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"status","data"],[3,"userId","requestID","data","flowName","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep"],["formStep",""],[3,"data","texts","solicitud","nextStep"],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep"],[3,"data","texts"],[3,"data","texts","solicitud","retry","newRequest"],[3,"solicitud","data","texts","retry"],[3,"texts","data"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[3,"flow","requestStatus","accepted","cancelled"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"]],template:function(e,t){1&e&&(U.YNc(0,Re,1,3,"vex-power-cert",0),U.YNc(1,Xe,7,10,"div",1),U.YNc(2,et,1,2,"vex-terms",2),U.YNc(3,tt,3,1,"ng-container",3)),2&e&&(U.Q6J("ngIf",t.viewPowerTerms),U.xp6(1),U.Q6J("ngIf",t.data),U.xp6(1),U.Q6J("ngIf",t.showTermsDialog),U.xp6(1),U.Q6J("ngIf",t.testMode))},dependencies:[i.O5,u.lW,y.Ou,V.L,Q.L,W.q,ae,ce,he,ke,Se,Me,Ie,qe],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),nt=(0,D.gn)([(0,N.c)()],nt);const it=[{path:":idUser",component:nt},{path:":idUser/:packID",component:nt}];let st=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=U.oAB({type:e}),e.ɵinj=U.cJS({imports:[O.Bz.forChild(it),O.Bz,L.d8]}),e})();var rt=n(6981),ot=n(3848),at=n(1129),lt=n(3295),ct=n(1258),dt=n(2266),ut=n(3300),ht=n(865);let pt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=U.oAB({type:e}),e.ɵinj=U.cJS({providers:[_.M,v.o,C.w,w.t,S.T,E.t,B,{provide:T.Ad,useValue:"es-ES"}],imports:[st,i.ez,s.G,r.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,x.c,p.u5,m.AV,p.UX,f.LD,g.vV,b.a,y.Cq,k.FA,T.XK,M.T5,I.Fk,rt.x,ot.Nh,at.n,lt.g,ct.H,dt.L,ut.C,ht.q]}),e})()},1742:(e,t,n)=>{n.d(t,{_:()=>d});var i=n(1931),s=n(1135),r=n(5762),o=n(2340),a=n(9359),l=n(4650),c=n(8460);let d=(()=>{class e{constructor(e){this.customizationStoreService=e,this.labels=i.S.es,this.socket=null,this._request=new s.X({...new r.l,status_code:"created"}),this._lastThreeNumbersPhone=new s.X(null),this._request_status=new s.X(null),this.currentHeight=0,this.request$=this._request.asObservable(),this.request_status$=this._request_status.asObservable(),this.lastThreeNumbersPhone$=this._lastThreeNumbersPhone.asObservable()}parseErrorResponse(e){if(Array.isArray(e)){let t="";return e.forEach((e=>{t+=e+" "})),{title:this.labels.warnings.errorSomeData,description:t}}return"does not have pin service"==e.toLowerCase()||"does not have clave pin service"==e.toLowerCase()?{title:"no-service",code:"no-service",description:this.labels.warnings.noPinService}:"document number invalid."==e.toLowerCase()?{title:this.labels.warnings.wrongDni,code:"dni",description:this.labels.warnings.wrongDniDesc}:"incorrect support number"==e.toLowerCase()?{title:this.labels.warnings.error,code:"sop",description:this.labels.warnings.wrongSupport}:"incorrect date"==e.toLowerCase()?{title:this.labels.warnings.wrongDate,code:"nac",description:this.labels.warnings.wrongDateDesc}:{title:"Error!",code:"unknown",description:e}}setGlobalVariables(){this.REQUEST=this._request.value,this.REQUEST_STATUS=this.REQUEST.status_code,this._request_status.next(this.REQUEST_STATUS)}setRequest(e){this._request.next({...e}),this.setGlobalVariables()}patch(e){this._request.next({...this._request.value,...e}),this.setGlobalVariables()}setParameter(e,t){this._request.next({...this._request.value,[e]:t}),this.setGlobalVariables()}setRequestStatus(e){this._request.next({...this._request.value,status_code:e}),this.setGlobalVariables()}setRequestID(e){this._request.next({...this._request.value,request_id:e}),this.setGlobalVariables()}subscribeWS(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==o.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==o.N.env&&(e="wss://notifications.belender.net"),o.N.notificationsBaseUrl&&(e=o.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this._request.value.request_id}&user_id=${this.customizationStoreService.USER_ID}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);n&&t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}handlePusherNotification(e){if(e&&(this.sendMessageToParent({type:"websocket",data:e}),e)){e.person_last_three_phone_number&&this._lastThreeNumbersPhone.next(e.person_last_three_phone_number);const t=e.status_code;t&&(t===a.q.CONSENT_PROCESS_COMPLETED?(this.disconnectWebsocket(),this.setRequestStatus("success")):t.startsWith("abandoned")&&(this.disconnectWebsocket(),this.setRequestStatus("abandoned")))}}sendMessageToParent(e){if(e&&e.type&&"widgetHeight"===e.type){if(e.data===this.currentHeight)return;this.currentHeight=e.data}window.top.postMessage(e,"*")}disconnectWebsocket(){this.socket&&this.socket.close()}}return e.ɵfac=function(t){return new(t||e)(l.LFG(c.r))},e.ɵprov=l.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},2142:(e,t,n)=>{n.d(t,{n:()=>Q});var i=n(5861),s=n(7582),r=n(9549),o=n(9933),a=n(5762),l=n(8259),c=n(2340),d=n(667),u=n(9359),h=n(4650),p=n(9299),m=n(5089),f=n(7489),g=n(5206),_=n(8460),b=n(9045),v=n(7367),y=n(7308),w=n(1742);const x=["formStep"],C=["otpStep"];function k(e,t){if(1&e&&(h.TgZ(0,"div",9),h._UZ(1,"mat-icon",10),h._uU(2),h.qZA()),2&e){const e=h.oxw(2);h.Q6J("@fadeInUp",void 0),h.xp6(2),h.hij(" ",e.warningAlert," ")}}function T(e,t){1&e&&(h.TgZ(0,"div",11),h._UZ(1,"mat-progress-spinner",12),h.qZA()),2&e&&(h.xp6(1),h.Q6J("value",0))}function S(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"belender-form-step",23,24),h.NdJ("openTerms",(function(){h.CHM(e);const t=h.oxw(3);return h.KtG(t.showTermsDialog=!0)})),h.qZA()}if(2&e){const e=h.oxw(3);h.Q6J("skipCreationOfRequest",e.skipCreationOfRequest)("deviceInfoDetails",e.deviceInfoDetails)("flowName",e.flowName)("acceptCirbe",e.acceptCirbe)("requestIDFromURL",e.requestIDFromURL)("texts",e.data[e.flowName].texts)("data",e.data)("lang",e.currentLang)("editable_dates",e.editable_dates)}}function M(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"belender-shared-otp-step",25,26),h.NdJ("resendOTP",(function(t){h.CHM(e);const n=h.oxw(3);return h.KtG(n.resendOTP(t))}))("errorPhone",(function(){h.CHM(e);const t=h.oxw(3);return h.KtG(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){h.CHM(e);const n=h.oxw(3);return h.KtG(n.requestOTP(t))})),h.qZA()}if(2&e){const e=h.oxw(3);h.Q6J("otpType",e.getOtpType(e.requestStatus))("flowType",e.flowName)("data",e.data)("labels",e.labels)("minLength",e.getOTPMinLength())("lastThreeNumbersPhone",e.lastThreeNumbersPhone)("texts",e.data[e.flowName].texts)}}function I(e,t){if(1&e&&h._UZ(0,"belender-success-step",27),2&e){const e=h.oxw(3);h.Q6J("data",e.data)("labels",e.labels)("flowName",e.flowName)("texts",e.data[e.flowName].texts)}}function E(e,t){if(1&e&&h._UZ(0,"belender-duplicated-request-step",28),2&e){const e=h.oxw(3);h.Q6J("data",e.data)}}function O(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"belender-error-birthday-step",29),h.NdJ("nextStep",(function(t){h.CHM(e);const n=h.oxw(3);return h.KtG(n.setBirthDate(t))})),h.qZA()}if(2&e){const e=h.oxw(3);h.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function L(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"belender-error-expiration-step",29),h.NdJ("nextStep",(function(t){h.CHM(e);const n=h.oxw(3);return h.KtG(n.setExpiration(t))})),h.qZA()}if(2&e){const e=h.oxw(3);h.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function P(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"belender-error-support-number-step",29),h.NdJ("nextStep",(function(t){h.CHM(e);const n=h.oxw(3);return h.KtG(n.setSupportNumber(t))})),h.qZA()}if(2&e){const e=h.oxw(3);h.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function D(e,t){if(1&e&&h._UZ(0,"belender-fail-step",30),2&e){const e=h.oxw(3);h.Q6J("data",e.data)("texts",e.data[e.flowName].texts)}}function A(e,t){if(1&e&&h._UZ(0,"belender-abandoned-step",30),2&e){const e=h.oxw(3);h.Q6J("data",e.data)("texts",e.data[e.flowName].texts)}}function N(e,t){if(1&e&&h._UZ(0,"belender-no-service-step",31),2&e){const e=h.oxw(3);h.Q6J("texts",e.data[e.flowName].texts)("data",e.data)}}function q(e,t){if(1&e&&h._UZ(0,"belender-standby-step",31),2&e){const e=h.oxw(3);h.Q6J("texts",e.data[e.flowName].texts)("data",e.data)}}function Y(e,t){if(1&e&&(h.TgZ(0,"div",32)(1,"div",33)(2,"h1",34),h._uU(3,"No existe la solicitud"),h.qZA()(),h.TgZ(4,"div",35),h._uU(5," No existen solicitudes activas con el código requerido "),h.qZA()()),2&e){const e=h.oxw(3);h.xp6(4),h.Udp("color",e.data.styles.colors.text)}}function R(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"belender-cancel-request",36),h.NdJ("updateStatusCode",(function(t){h.CHM(e);const n=h.oxw(3);return h.KtG(n.setCancel(t))})),h.qZA()}if(2&e){const e=h.oxw(3);h.Q6J("flowType",e.flowName)("data",e.data)("labels",e.labels)("textColor",e.data.styles.colors.text)("customText",e.data.config.cancelRequestText)}}function F(e,t){if(1&e&&(h._UZ(0,"div",37),h.ALo(1,"safeHtml")),2&e){const e=h.oxw(3);h.Udp("color",e.data.styles.colors.text),h.Q6J("innerHTML",e.data[e.flowName]&&e.data[e.flowName].texts&&e.data[e.flowName].texts.form&&e.data[e.flowName].texts.form.aditionalDescription?h.lcZ(1,3,(null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.aditionalDescription)||""):"",h.oJD)}}function U(e,t){if(1&e&&(h.ynx(0),h.YNc(1,S,2,9,"belender-form-step",13),h.YNc(2,M,2,7,"belender-shared-otp-step",14),h.YNc(3,I,1,4,"belender-success-step",15),h.YNc(4,E,1,1,"belender-duplicated-request-step",16),h.YNc(5,O,1,3,"belender-error-birthday-step",17),h.YNc(6,L,1,3,"belender-error-expiration-step",17),h.YNc(7,P,1,3,"belender-error-support-number-step",17),h.YNc(8,D,1,2,"belender-fail-step",18),h.YNc(9,A,1,2,"belender-abandoned-step",18),h.YNc(10,N,1,2,"belender-no-service-step",19),h.YNc(11,q,1,2,"belender-standby-step",19),h.YNc(12,Y,6,2,"div",20),h.YNc(13,R,1,5,"belender-cancel-request",21),h.YNc(14,F,2,5,"div",22),h.BQk()),2&e){const e=h.oxw(2);h.xp6(1),h.Q6J("ngIf","form"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","otp_ss"==e.requestStatus||"otp_aeat"==e.requestStatus||"otp_bde"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","success"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","duplicated"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","error-birth-date"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","error-expiration-date"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","error-support-number"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","failed"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","abandoned"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","no-service"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","standby"==e.requestStatus),h.xp6(1),h.Q6J("ngIf","created"!=e.step),h.xp6(1),h.Q6J("ngIf",e.showCancelRequest&&e.data.config.cancelRequest),h.xp6(1),h.Q6J("ngIf","form"===e.requestStatus&&!e.loadingRequestData&&e.data[e.flowName]&&(null==e.data[e.flowName]?null:e.data[e.flowName].showAditionalDescription))}}function Z(e,t){1&e&&h._UZ(0,"belender-disabled-url")}function H(e,t){if(1&e&&(h.TgZ(0,"div",38),h._UZ(1,"div",39),h.qZA()),2&e){const e=h.oxw(2);h.xp6(1),h.Q6J("innerHTML",e.warning,h.oJD)}}function j(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"div",40)(1,"div",32)(2,"div",41),h._uU(3,"Error!"),h.qZA(),h._UZ(4,"div",42),h.qZA(),h.TgZ(5,"div",43)(6,"button",44),h.NdJ("click",(function(){h.CHM(e);const t=h.oxw(2);return h.KtG(t.error=!1)})),h._uU(7," Ingresar manualmente "),h.qZA()()()}if(2&e){const e=h.oxw(2);h.xp6(4),h.Udp("color",e.data.styles.colors.text),h.Q6J("innerHTML",e.error,h.oJD)}}function z(e,t){if(1&e&&(h.TgZ(0,"div",3)(1,"div"),h.YNc(2,k,3,2,"div",4),h.YNc(3,T,2,1,"div",5),h.YNc(4,U,15,14,"ng-container",6),h.YNc(5,Z,1,0,"belender-disabled-url",6),h.YNc(6,H,2,1,"div",7),h.YNc(7,j,8,3,"div",8),h.qZA()()),2&e){const e=h.oxw();h.xp6(1),h.Gre("h-full w-full relative flex-auto p-0 md:p-3 ",null==e.data||null==e.data.styles?null:e.data.styles.typography,""),h.Udp("background",null==e.data||null==e.data.styles||null==e.data.styles.colors?null:e.data.styles.colors.background),h.xp6(1),h.Q6J("ngIf",e.warningAlert&&"success"!=e.requestStatus),h.xp6(1),h.Q6J("ngIf",e.data.config.infiniteLoopInCompleted&&"success"===e.requestStatus),h.xp6(1),h.Q6J("ngIf",!e.error&&!e.disableURL),h.xp6(1),h.Q6J("ngIf",!e.error&&e.disableURL),h.xp6(1),h.Q6J("ngIf",!e.loading&&e.warning&&"success"!=e.requestStatus),h.xp6(1),h.Q6J("ngIf",!e.loading&&e.error)}}function B(e,t){if(1&e){const e=h.EpF();h.TgZ(0,"vex-terms",45),h.NdJ("accepted",(function(){h.CHM(e);const t=h.oxw();return h.KtG(t.handleTermsResponse(!0))}))("cancelled",(function(){h.CHM(e);const t=h.oxw();return h.KtG(t.handleTermsResponse(!1))})),h.qZA()}if(2&e){const e=h.oxw();h.Q6J("flow",e.flowName)("lang",e.currentLang)("requestID",e.requestID)("requestStatus",e.solicitud?e.solicitud.status_code:"")("allData",e.data)}}function J(e,t){if(1&e&&(h.TgZ(0,"div",46),h._UZ(1,"mat-progress-spinner",47),h.TgZ(2,"p",48),h._uU(3),h.qZA()()),2&e){const e=h.oxw();h.xp6(3),h.hij(" ",e.loading||""," ")}}const V={"Seguridad Social":"waiting_otp_seguridad_social",AEAT:"waiting_otp_aeat","Banco de España":"waiting_otp_bde"};let Q=class{constructor(e,t,n,i,s,r,o,a,l,d){this.cd=e,this.Activatedroute=t,this.utils=n,this.pinService=i,this.flowsS=s,this.customizationStoreService=r,this.deviceInfoService=o,this.customizationService=a,this.translationService=l,this.pinUtils=d,this.data=null,this.disableActions=!1,this.step="created",this.clientEnviroment="belender",this.showCancelRequest=!1,this.loading=null,this.error=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.lastThreeNumbersPhone=null,this.requestIDFromURL=!1,this.paramsSetted=!1,this.stopPropagationOfSuccess=!1,this.picturesTaken=[],this.disableURL=!1,this.selectedLanguage="es",this.loadingRequestData=!1,this.env=c.N,this.intervalToAskBack=null,this.requestedFromDetail=!1,this.intervalCount=0,this.requestStatus="",this.isScaled=!1,this.flowName="ClavePin",this.currentLang="",this.acceptCirbe=!1,this.showTermsDialog=!1,this.editable_dates=!1,this.termsOpened=!1,localStorage.getItem("belender-language")&&(this.selectedLanguage=localStorage.getItem("belender-language")),this.deviceInfoDetails$=this.deviceInfoService.deviceInfo$.subscribe((e=>{Object.keys(e).length>0&&(this.deviceInfoDetails=e)}))}ngOnInit(){this.labels=this.pinUtils.labels,this.loading=this.labels.loadings.gettingData,this.pinUtils.request_status$.subscribe((e=>{this.setStatus()})),this.initFunctions()}ngOnDestroy(){window.screen&&window.screen.orientation&&this.orientationChangeHandler&&window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}ngAfterViewChecked(){this.getWidgetCardHeight()}isQA(){return"qa"===c.N.env}initFunctions(){var e=this;return(0,i.Z)((function*(){var t;e.Activatedroute.queryParams.subscribe((t=(0,i.Z)((function*(t){t&&t.request_id&&(e.requestID=t.request_id,console.warn(e.requestID)),t.lang?(e.currentLang=t.lang,e.loading=e.translationService.getFirstLoading(e.currentLang),e.setTranslation()):e.loading=e.pinUtils.labels.loadings.gettingData,"true"===t.editable_dates&&(e.editable_dates=t.editable_dates),e.customizationStoreService.USER_ID?e.setInitialData(e.customizationStoreService.USER_ID):e.loading=null})),function(e){return t.apply(this,arguments)}))}))()}setTranslation(){let e=this.translationService.getLabelsTranslated(this.currentLang);e&&(this.pinUtils.labels=e)}getWindowsScreenOrientation(){window.screen&&window.screen.orientation?(this.orientationChangeHandler=()=>{this.getWidgetCardHeight()},window.screen.orientation.addEventListener("change",this.orientationChangeHandler)):console.warn("Screen Orientation API not supported.")}getWidgetCardHeight(){let e=l("#widget-wrapper").height()||0;this.isScaled$=this.deviceInfoService.isScaled$.subscribe((t=>{this.isScaled=t,this.isScaled&&(e*=1.5)})),this.pinUtils.sendMessageToParent({type:"widgetHeight",data:e})}getOtpType(e){switch(e){case"otp_ss":default:return"otpSS";case"otp_aeat":return"otpAEAT";case"otp_bde":return"otpBDE"}}setRequestStatus(e){this.pinUtils?.REQUEST?this.pinUtils.setRequestStatus(e):this.pinUtils.setRequest(new a.l),this.setStatus()}checkClientUrl(){const e=window.location.href;this.clientEnviroment=this.getClientFromUrl(e)}getOTPMinLength(){return this.env?"dev"===this.env.env&&"belender"===this.clientEnviroment?6:"qa"===this.env.env||"dev"===this.env.env&&"opendata"===this.clientEnviroment?3:6:6}getClientFromUrl(e){return e.includes("opendata")?"opendata":"belender"}setWarningPortals(){this.flowsS.getFlows().then((e=>{if(e&&e.data&&e.data.length){let t=e.data.find((e=>e.name==this.flowName));t&&t.status&&"OCCASIONAL_FAIL"==t.status&&(this.warningAlert=this.pinUtils.labels.warnings.ocassionalError)}})).catch((e=>{console.error(e)}))}setInitialData(e){var t=this;return(0,i.Z)((function*(){if(yield t.validateRequestIdInUrl(),t.flowConfig=yield t.getFlow(e),t.funderConfig=t.customizationStoreService.FUNDER_CONFIG,t.funderStyles=t.customizationStoreService.FUNDER_STYLES,t.data={config:t.funderConfig,styles:t.funderStyles,[t.flowName]:t.flowConfig},!t.data.config||!t.data.config.funder_id)return t.showAlert(t.pinUtils.labels.warnings.error,t.pinUtils.labels.warnings.noCustomization,"error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.customizationStoreService.setFunderID(t.financiadorID),t.disableURL=t.data.config.disableUrlWidget,t.loading=null,t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName,t.currentLang,t.requestID,t.solicitud?t.solicitud.status_code:"").then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}validateRequestIdInUrl(){var e=this;return(0,i.Z)((function*(){return new Promise((t=>{var n;e.Activatedroute.queryParams.subscribe({next:(n=(0,i.Z)((function*(n){if(n&&n.acceptTerms&&(e.autoAcceptTerms=!0),n&&n.request_id){e.disableURL=!1,e.requestID=n.request_id;let i=yield e.setFormFromVcCode(n.request_id,n);e.requestIDFromURL=!0,t(i)}else n?(e.setParamsToRequest(n),t(null)):(e.loading=null,t(null))})),function(e){return n.apply(this,arguments)}),error:()=>{e.loading=null,t(null)}})}))}))()}setParamsToRequest(e){this.pinUtils?.REQUEST||this.pinUtils.setRequest(new a.l),e.success&&(this.stopPropagationOfSuccess=!0),e.accept_cirbe&&(this.acceptCirbe=!0),(e.document_number||e.document)&&!this.pinUtils?.REQUEST.person_document_number&&(this.pinUtils.REQUEST.person_document_number=e.document_number||e.document,this.requestIDFromURL=!0),(e.birth_date||e.birthday)&&!this.pinUtils?.REQUEST.birth_date&&(this.pinUtils.REQUEST.birth_date=e.birth_date||e.birthday,this.requestIDFromURL=!0),(e.document_expiration_date||e.expiration)&&!this.pinUtils.REQUEST.person_document_expiration_date&&(this.pinUtils.REQUEST.person_document_expiration_date=e.document_expiration_date||e.expiration,this.requestIDFromURL=!0),(e.document_support||e.supportNumber)&&!this.pinUtils.REQUEST.document_support&&(this.pinUtils.REQUEST.document_support=e.document_support||e.supportNumber,this.requestIDFromURL=!0),e.email&&!this.pinUtils.REQUEST.email&&(this.pinUtils.REQUEST.email=e.email,this.requestIDFromURL=!0,this.paramsSetted=!0),this.paramsSetted=!0}setFormFromVcCode(e,t){var n=this;return(0,i.Z)((function*(){return n.loading=n.pinUtils.labels.loadings.gettingData,n.loadingRequestData=!0,new Promise((i=>{n.pinService.getSolicitudByCode(e).then((e=>{e&&e.data?(n.pinUtils.setRequest(e.data),n.setRequestStatus(n.pinUtils.REQUEST.status_code),n.pinUtils.subscribeWS(),n.loading=null,n.skipCreationOfRequest=n.solicitud&&n.solicitud.status_code&&"prerequest"!=n.solicitud.status_code,n.setParamsToRequest(t)):n.loading=null,n.loadingRequestData=!1,i(n.solicitud||null)})).catch((e=>{n.loading=null,n.loadingRequestData=!1,i(null)}))}))}))()}handleBadPhone(){this.pinUtils.disconnectWebsocket(),this.loading=this.pinUtils.labels.loadings.validatingData,this.pinService.noMatchPhone({request_id:this.pinUtils.REQUEST.request_id,user_id:this.customizationStoreService.USER_ID}).then((e=>{this.pinUtils.REQUEST||(this.pinUtils.setRequest(new a.l),this.setRequestStatus(this.pinUtils.REQUEST.status_code)),e&&e.data&&(this.pinUtils.setRequest(e.data),this.setRequestStatus(this.pinUtils.REQUEST.status_code)),this.loading=null})).catch((e=>{this.showAlert("Error!",e),setTimeout((()=>{this.pinUtils.REQUEST||(this.pinUtils.setRequest(new a.l),this.setRequestStatus(this.pinUtils.REQUEST.status_code)),this.setRequestStatus("failed_without_retry"),this.loading=null}),1e3)}))}sendNewData(e){this.loading=this.pinUtils.labels.loadings.sendingData,this.pinService.fixData(this.pinUtils.REQUEST.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e,"error"),this.loading=null):e&&"success"==e.status&&(this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),this.loading=this.pinUtils.labels.loadings.validatingData,this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error,"error")}))}showAlert(e,t,n){this.loading=null,this.getFunderIconType(n),this.warning=`<div class="flex flex-col w-full items-start gap-0 pl-2"><strong class="text-md" >${e}</strong><small>${t}</small></div>`}getFunderIconType(e){if(!e||!this.funderStyles)return"error";switch(e){case"error":return this.funderStyles.errorIcon||e;case"success":return this.funderStyles.successIcon||e;case"warning":return this.funderStyles.warningIcon||e;case"info":return this.funderStyles.infoIcon||e;default:return e}}isBdeStatus(){let e=this.pinUtils.REQUEST?this.pinUtils.REQUEST.status_code:null;return!!e&&("waiting_otp_bde"===e||"waiting_login_bde"===e||"invalid_otp_bde"===e)}sendOtpToBde(e){this.pinUtils.disconnectWebsocket(),this.pinService.sendOTPToBde(e,"qa"===c.N.env).then((e=>{e.status&&"error"==e.status?(e.message&&"Invalid request status: waiting_login_seguridad_social"==e.message?this.showAlert(this.pinUtils.labels.warnings.error,this.pinUtils.labels.warnings.noOtp):this.showAlert("Error!",e.message?e.message:e),this.loading=null):e?(console.warn("handle success!"),e.data?e.data.consent_process_completed=!0:e.consent_process_completed=!0,this.handleRequestStatus(e.data?e.data:e),this.cd.markForCheck()):this.loading=null})).catch((e=>{this.showAlert("Error!",e&&e.error?e.error:e),this.loading=null}))}requestOTP(e){var t=this;return(0,i.Z)((function*(){if(!e?.code)return void t.showAlert("Error",t.pinUtils.labels.warnings.wrongOtp);t.loading=t.labels.loadings.sendingData;const n={user_id:t.customizationStoreService.USER_ID,request_id:t.pinUtils.REQUEST.request_id,code:e.code};try{if(t.isBdeStatus()){const e=yield t.sendOtpToBde(n);return void t.handleSendOtpResponse(e)}const e=yield t.pinService.sendOTP(n,t.isQA());t.handleSendOtpResponse(e)}catch(e){const n=e?.error??e?.message??String(e);t.showAlert("Error!",n)}finally{t.loading=null}}))()}handleSendOtpResponse(e){if(e)return"error"===e.status?"Invalid request status: waiting_login_seguridad_social"===e.message?void this.showAlert(this.pinUtils.labels.warnings.error,this.pinUtils.labels.warnings.noOtp):void this.showAlert("Error!",e.message??e):"success"===e.status?(this.handleRequestStatus(e.data??e),void this.cd.markForCheck()):void this.showAlert("Error!",this.pinUtils.labels.warnings.noOtp);this.showAlert("Error!",this.pinUtils.labels.warnings.noOtp)}handleRequestStatus(e){if(e.consent_process_completed)return this.requestedFromDetail=!0,this.pinUtils.sendMessageToParent({type:"response",data:{status_message:"El proceso de consentimiento ha finalizado",widget_url:this.pinUtils?.REQUEST?.widget_url||"",status_code:u.q.CONSENT_PROCESS_COMPLETED,user_id:this.customizationStoreService?.USER_ID||"",funder_id:this.customizationStoreService?.FUNDER_ID||"",request_id:this.pinUtils?.REQUEST?.request_id||"",widget_url_boxed:this.pinUtils?.REQUEST?.widget_url_boxed||""}}),this.pinUtils.setRequestStatus(u.q.CONSENT_PROCESS_COMPLETED),setTimeout((()=>this.pinUtils.disconnectWebsocket()),1e3),void(this.data[this.flowName].showDocumentsOnSuccess&&!this.intervalToAskBack&&this.initIntervalToAskBack());if(this.otpComponent?.resetOtpNumber(),!e.otp_status&&!e.next_step_detail)return this.pinUtils.setRequestStatus("failed"),void this.pinUtils.sendMessageToParent({type:"response",data:e});if("INVALID"===e.otp_status)return this.pinUtils.setRequestStatus(e.status_code??"failed"),this.showAlert(this.pinUtils.labels.warnings.error,this.pinUtils.labels.warnings.wrongOtp),void this.pinUtils.sendMessageToParent({type:"response",data:e});if("VALID"===e.otp_status){const t=this.firstPortal(e.next_step_detail);return this.pinUtils.setRequestStatus(t&&V[t]||e.status_code||"failed"),void this.pinUtils.sendMessageToParent({type:"response",data:e})}this.pinUtils.setRequestStatus(e.status_code||"failed"),this.pinUtils.sendMessageToParent({type:"response",data:e})}firstPortal(e){return e?(Array.isArray(e)?e[0]:e)?.portal:void 0}askToBack(){this.pinService.getSolicitudByCode(this.pinUtils?.REQUEST?.request_id).then((e=>{e&&e.data?(this.pinUtils.setRequest(e.data),this.setRequestStatus(this.pinUtils.REQUEST.status_code),this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}gotoErrorPhone(){}setBirthDate(e){}setExpiration(e){}setSupportNumber(e){}resendOTP(e){let t={request_id:this.pinUtils?.REQUEST?.request_id,user_id:this.customizationStoreService.USER_ID};this.loading="Reenviando OTP...",this.pinUtils.subscribeWS(),this.pinService.resendOTP(t).then((e=>{e&&e.data&&(this.pinUtils.setRequest(e.data),this.setRequestStatus(this.pinUtils.REQUEST.status_code)),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}initIntervalToAskBack(){!this.pinUtils?.REQUEST||!this.pinUtils?.REQUEST?.request_id||(this.intervalToAskBack=setInterval((()=>{this.askDetailToBack(this.pinUtils.REQUEST.request_id),this.intervalCount++,this.intervalCount>20&&this.stopInterval()}),5e3))}stopInterval(){this.intervalToAskBack&&clearInterval(this.intervalToAskBack)}askDetailToBack(e){let t=JSON.parse(JSON.stringify(this.pinUtils.REQUEST.status_code));e||this.pinUtils?.REQUEST?.request_id?this.pinService.getSolicitudByCode(e).then((e=>{e&&e.data&&t!=e.data.status_code&&(this.pinUtils.setRequest(e.data),this.setRequestStatus(this.pinUtils.REQUEST.status_code))})).catch((e=>{this.loading=null,this.loadingRequestData=!1})):this.stopInterval()}setStatus(){if(this.showCancelRequest=!0,this.pinUtils?.REQUEST){let e=this.pinUtils?.REQUEST.status_code;if("waiting_documents"===e||"saved_otp"===e)return void(this.loading="Cargando datos...");let t=u.S[e];t&&(t===u.q.SUCCESS&&this.funderConfig&&this.funderConfig.infiniteLoopInCompleted&&(this.loading=" "),(t===u.q.ABANDONED||t===u.q.FAILED)&&(this.showCancelRequest=!1),this.requestStatus=t,this.loading=null)}this.cd.markForCheck()}sendRetry(){}setCancel(e){this.setRequestStatus(e)}pictureTaken(e){this.picturesTaken.push(e._imageAsDataUrl)}getIfShowLogo(){return("loading"!=this.requestStatus&&"success"!=this.requestStatus&&!this.loading||!this.funderConfig?.infiniteLoopInCompleted)&&this.funderStyles?.withLogo}handleTermsResponse(e){this.showTermsDialog=!1,e&&(this.termsOpened=!0,this.formComponent.setTermsCheck(!0))}};Q.ɵfac=function(e){return new(e||Q)(h.Y36(h.sBO),h.Y36(p.gz),h.Y36(m.F),h.Y36(f.v),h.Y36(g.s),h.Y36(_.r),h.Y36(b.H),h.Y36(v.w),h.Y36(y.D),h.Y36(w._))},Q.ɵcmp=h.Xpm({type:Q,selectors:[["belender-widget-pin"]],viewQuery:function(e,t){if(1&e&&(h.Gf(x,5),h.Gf(C,5),h.Gf(x,5)),2&e){let e;h.iGM(e=h.CRH())&&(t.formComponent=e.first),h.iGM(e=h.CRH())&&(t.otpComponent=e.first),h.iGM(e=h.CRH())&&(t.theDiv=e.first)}},inputs:{solicitud:"solicitud",data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID"},features:[h._Bn([{provide:r.o2,useValue:{appearance:"standard"}}])],decls:3,vars:3,consts:[["id","widget-wrapper","class","h-full widget-belender",4,"ngIf"],[3,"flow","lang","requestID","requestStatus","allData","accepted","cancelled",4,"ngIf"],["class","loading-wrapper animated fadeIn",4,"ngIf"],["id","widget-wrapper",1,"h-full","widget-belender"],["class","flex justify-start px-4 py-3 items-center font-bold gap-3 text-md bg-amber-500/20 rounded-sm border border-amber-500 text-amber-500",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],[4,"ngIf"],["class","animated w-full fadeInRight",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"flex","justify-start","px-4","py-3","items-center","font-bold","gap-3","text-md","bg-amber-500/20","rounded-sm","border","border-amber-500","text-amber-500"],["svgIcon","mat:warning"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[3,"skipCreationOfRequest","deviceInfoDetails","flowName","acceptCirbe","requestIDFromURL","texts","data","lang","editable_dates","openTerms",4,"ngIf"],[3,"otpType","flowType","data","labels","minLength","lastThreeNumbersPhone","texts","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","labels","flowName","texts",4,"ngIf"],[3,"data",4,"ngIf"],[3,"data","labels","texts","nextStep",4,"ngIf"],[3,"data","texts",4,"ngIf"],[3,"texts","data",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"flowType","data","labels","textColor","customText","updateStatusCode",4,"ngIf"],["class","subheading-1 p-4 custom-html",3,"color","innerHTML",4,"ngIf"],[3,"skipCreationOfRequest","deviceInfoDetails","flowName","acceptCirbe","requestIDFromURL","texts","data","lang","editable_dates","openTerms"],["formStep",""],[3,"otpType","flowType","data","labels","minLength","lastThreeNumbersPhone","texts","resendOTP","errorPhone","nextStep"],["otpStep",""],[3,"data","labels","flowName","texts"],[3,"data"],[3,"data","labels","texts","nextStep"],[3,"data","texts"],[3,"texts","data"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[3,"flowType","data","labels","textColor","customText","updateStatusCode"],[1,"subheading-1","p-4","custom-html",3,"innerHTML"],[1,"animated","w-full","fadeInRight"],[1,"px-6","py-4","w-full","bg-orange-500/10","rounded-md","flex","flex-col","text-orange-600",3,"innerHTML"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[3,"flow","lang","requestID","requestStatus","allData","accepted","cancelled"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(h.YNc(0,z,8,11,"div",0),h.YNc(1,B,1,5,"vex-terms",1),h.YNc(2,J,4,1,"div",2)),2&e&&(h.Q6J("ngIf",t.data&&t.data.styles&&t.data.styles.colors&&!t.loading&&"loading"!=t.requestStatus),h.xp6(1),h.Q6J("ngIf",t.showTermsDialog),h.xp6(1),h.Q6J("ngIf",("loading"===t.requestStatus||t.loading)&&!t.error))},styles:[".widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.card[_ngcontent-%COMP%]{transition:all .2s ease;overflow:hidden;width:500px;max-width:100%;margin:0 auto}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}.webcam-wrapper[_ngcontent-%COMP%]{position:relative}.webcam-overlay[_ngcontent-%COMP%]{position:absolute;z-index:99;width:500px;top:0;left:0;width:100%;height:100%;justify-content:center}.webcam-overlay[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{background:url(/assets/img/exclude.png);width:100%;height:100%;background-repeat:no-repeat;background-size:cover;opacity:.7;max-width:500px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;top:0;left:0;background:#fff}"],data:{animation:[d.$]}}),Q=(0,s.gn)([(0,o.c)()],Q)},8489:(e,t,n)=>{n.r(t),n.d(t,{PinModule:()=>ot});var i=n(6895),s=n(6383),r=n(5592),o=n(4006),a=n(3798),l=n(9391),c=n(182),d=n(4650),u=n(5089),h=n(5601),p=n(9617),m=n(3046),f=n(342),g=n(9101),_=n(3731);function b(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",3),2&e){const e=d.oxw();d.Q6J("firstOption",e.texts.success.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function v(e,t){if(1&e&&d._UZ(0,"widget-documents",8),2&e){const e=d.oxw(2);d.Q6J("userId",e.userId)("packId",e.packId)("requestID",e.requestID)}}function y(e,t){if(1&e&&(d.TgZ(0,"div",4),d._UZ(1,"div",5)(2,"div",6),d.ALo(3,"safeHtml"),d.YNc(4,v,1,3,"widget-documents",7),d.qZA()),2&e){const e=d.oxw();d.xp6(1),d.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),d.Q6J("innerHTML",e.texts.success.title,d.oJD),d.xp6(1),d.Udp("color",e.data.styles.colors.text),d.Q6J("innerHTML",d.lcZ(3,9,e.texts.success.description||""),d.oJD),d.xp6(2),d.Q6J("ngIf",e.showDocuments)}}const w=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function x(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"div",9)(1,"button",10),d.NdJ("click",(function(){d.CHM(e);const t=d.oxw();return d.KtG(t.gotoRedirect())})),d._uU(2),d.qZA()()}if(2&e){const e=d.oxw();d.Q6J("ngClass",d.kEZ(8,w,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),d.xp6(1),d.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),d.xp6(1),d.hij(" ",e.data[e.flowName].btnTextCallBack||e.labels.actions.clickToFinish," ")}}let C=(()=>{class e{constructor(e,t,n,i,s){this.formBuilder=e,this.utils=t,this.solicitudesService=n,this.packsS=i,this.cd=s,this.showDocuments=!1}ngOnInit(){this.uploadForm=this.formBuilder.group({file:[""]}),this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].automaticRedirectCallBack&&this.data[this.flowName].callBackUrl?setTimeout((()=>{location.assign(this.data[this.flowName].callBackUrl)}),2e3):this.data&&this.data[this.flowName]&&this.data[this.flowName].showDocumentsOnSuccess&&(this.showDocuments=!0)}save(){}gotoRedirect(){this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].callBackUrl&&location.assign(this.data[this.flowName].callBackUrl)}getIfShowLogo(){return!this.data?.config?.infiniteLoopInCompleted&&this.data?.styles?.withLogo}}return e.ɵfac=function(t){return new(t||e)(d.Y36(o.qu),d.Y36(u.F),d.Y36(h.M),d.Y36(p.U),d.Y36(d.sBO))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",packId:"packId",requestID:"requestID",userId:"userId",flowName:"flowName",labels:"labels"},decls:3,vars:3,consts:[[3,"firstOption","logoUrl",4,"ngIf"],["class"," pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],["class","flex items-center gap-2 py-4 flex-col md:flex-row",3,"ngClass",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"userId","packId","requestID",4,"ngIf"],[3,"userId","packId","requestID"],[1,"flex","items-center","gap-2","py-4","flex-col","md:flex-row",3,"ngClass"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(d.YNc(0,b,1,2,"belender-widget-logo",0),d.YNc(1,y,5,11,"div",1),d.YNc(2,x,3,12,"div",2)),2&e&&(d.Q6J("ngIf",t.getIfShowLogo()),d.xp6(1),d.Q6J("ngIf",!t.data.config.infiniteLoopInCompleted),d.xp6(1),d.Q6J("ngIf",t.data&&t.data[t.flowName]&&t.data[t.flowName].enableUrlCallBack&&!t.data[t.flowName].automaticRedirectCallBack))},dependencies:[i.mk,i.O5,m.X,f.A,g.lW,_.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var k=n(7367),T=n(5762),S=n(1742);function M(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",7),2&e){const e=d.oxw();d.Q6J("firstOption",e.texts.fail.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const I=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function E(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"div",8)(1,"button",9),d.NdJ("click",(function(){d.CHM(e);const t=d.oxw();return d.KtG(t.retry())})),d._uU(2),d.qZA()()}if(2&e){const e=d.oxw();d.Q6J("ngClass",d.kEZ(8,I,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),d.xp6(1),d.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),d.xp6(1),d.hij(" ",null==e.labels||null==e.labels.actions?null:e.labels.actions.retry," ")}}function O(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"div",8)(1,"button",10),d.NdJ("click",(function(){d.CHM(e);const t=d.oxw();return d.KtG(t.newRequest())})),d._uU(2),d.qZA()()}if(2&e){const e=d.oxw();d.Q6J("ngClass",d.kEZ(8,I,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),d.xp6(1),d.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),d.xp6(1),d.hij(" ",null==e.labels||null==e.labels.actions?null:e.labels.actions.newRequest," ")}}let L=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.pinUtils=s}ngOnInit(){this.labels=this.pinUtils.labels}save(){}retry(){this.newRequest()}newRequest(){this.pinUtils.setRequest(new T.l)}}return e.ɵfac=function(t){return new(t||e)(d.Y36(o.QS),d.Y36(u.F),d.Y36(h.M),d.Y36(l.o),d.Y36(S._))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts"},decls:8,vars:9,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"px-2","py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center gap-2 p-4",3,"ngClass",4,"ngIf"],["class","flex items-center gap-2 p-4",3,"ngClass",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(d.YNc(0,M,1,2,"belender-widget-logo",0),d.TgZ(1,"div",1)(2,"div",2),d._UZ(3,"div",3)(4,"div",4),d.ALo(5,"safeHtml"),d.qZA(),d.YNc(6,E,3,12,"div",5),d.YNc(7,O,3,12,"div",6),d.qZA()),2&e&&(d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(3),d.Q6J("innerHTML",t.texts.fail.title,d.oJD),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.Q6J("innerHTML",d.lcZ(5,7,t.texts.fail.description),d.oJD),d.xp6(2),d.Q6J("ngIf",t.pinUtils.REQUEST&&"failed_with_retry"==t.pinUtils.REQUEST.status_code),d.xp6(1),d.Q6J("ngIf",t.pinUtils.REQUEST&&"failed_documents_downloaded"==t.pinUtils.REQUEST.status_code))},dependencies:[i.mk,i.O5,m.X,g.lW,_.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var P=n(3238),D=n(5439),A=n.n(D),N=n(3755),q=n(3746),Y=n(2932),R=n(4246),F=n(5412),U=n(7489),Z=n(5895),H=n(8460),j=n(1763),z=n(5696),B=n(1094),J=n(7392),V=n(9549),Q=n(4144),W=n(1572);const G=["termsCheckbox"],$=["assignmentCheckbox"];function K(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",18),2&e){const e=d.oxw();d.Q6J("firstOption",e.texts.form.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function X(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw();d.xp6(1),d.hij(" ",e.labels.warnings.invalidNieOrDni," ")}}function ee(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw();d.xp6(1),d.hij(" ",e.labels.warnings.invalidNieOrDni," ")}}function te(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"mat-hint")(1,"a",20),d.NdJ("click",(function(t){d.CHM(e);const n=d.oxw(2);return d.KtG(n.gotoExpirationDate(t))})),d.TgZ(2,"u"),d._uU(3),d.qZA()()()}if(2&e){const e=d.oxw(2);d.xp6(3),d.Oqu(e.labels.findExpiration)}}function ne(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw(2);d.xp6(1),d.hij(" ",e.labels.warnings.wrongDate,": DD/MM/AAAA ")}}function ie(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw(2);d.xp6(1),d.hij(" ",e.labels.warnings.wrongDate," ")}}function se(e,t){if(1&e&&(d.TgZ(0,"mat-form-field",7)(1,"mat-label"),d._uU(2),d.qZA(),d._UZ(3,"input",19),d.YNc(4,te,4,1,"mat-hint",9),d.YNc(5,ne,2,1,"mat-error",9),d.YNc(6,ie,2,1,"mat-error",9),d.qZA()),2&e){const e=d.oxw();let t,n;d.Gre("",e.disabledInputs.expiration?"disabled-input":""," w-full flex-1 belender-form-field"),d.xp6(2),d.Oqu(e.labels.expiration),d.xp6(1),d.s9C("tabindex",e.disabledInputs.expiration?-1:1),d.xp6(1),d.Q6J("ngIf",e.isDni),d.xp6(1),d.Q6J("ngIf",null==(t=e.form.get("expired_date"))?null:t.hasError("invalidFormat")),d.xp6(1),d.Q6J("ngIf",null==(n=e.form.get("expired_date"))?null:n.hasError("invalidDate"))}}function re(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw(2);d.xp6(1),d.hij(" ",e.labels.warnings.wrongDate,": DD/MM/AAAA ")}}function oe(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw(2);d.xp6(1),d.hij(" ",e.labels.warnings.wrongDate," ")}}function ae(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw(2);d.xp6(1),d.hij(" ",e.labels.warnings.wrongDate," ")}}function le(e,t){if(1&e&&(d.TgZ(0,"mat-form-field",7)(1,"mat-label"),d._uU(2),d.qZA(),d._UZ(3,"input",21),d.YNc(4,re,2,1,"mat-error",9),d.YNc(5,oe,2,1,"mat-error",9),d.YNc(6,ae,2,1,"mat-error",9),d.qZA()),2&e){const e=d.oxw();let t,n,i;d.Gre("",e.disabledInputs.birthday?"disabled-input":""," w-full flex-1 belender-form-field"),d.xp6(2),d.Oqu(e.labels.birthday),d.xp6(1),d.s9C("tabindex",e.disabledInputs.birthday?-1:1),d.xp6(1),d.Q6J("ngIf",null==(t=e.form.get("expired_date"))?null:t.hasError("invalidFormat")),d.xp6(1),d.Q6J("ngIf",null==(n=e.form.get("expired_date"))?null:n.hasError("invalidDate")),d.xp6(1),d.Q6J("ngIf",null==(i=e.form.get("expired_date"))?null:i.hasError("underAge"))}}function ce(e,t){if(1&e&&(d.TgZ(0,"mat-error"),d._uU(1),d.qZA()),2&e){const e=d.oxw(2);d.xp6(1),d.hij(" ",e.labels.warnings.wrongSupport," ")}}function de(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"mat-form-field",7)(1,"mat-label"),d._uU(2),d.qZA(),d._UZ(3,"input",22),d.YNc(4,ce,2,1,"mat-error",9),d.TgZ(5,"mat-hint")(6,"a",20),d.NdJ("click",(function(t){d.CHM(e);const n=d.oxw();return d.KtG(n.gotoSupportAclaration(t))})),d.TgZ(7,"u"),d._uU(8),d.qZA()()()()}if(2&e){const e=d.oxw();let t;d.Gre("",e.disabledInputs.supportNumber?"disabled-input":""," w-full flex-1 belender-form-field"),d.xp6(2),d.Oqu(e.labels.support),d.xp6(1),d.s9C("tabindex",e.disabledInputs.supportNumber?-1:1),d.xp6(1),d.Q6J("ngIf",null==(t=e.form.get("support_number"))?null:t.hasError("invalidSupportNumber")),d.xp6(4),d.Oqu(e.labels.findExpiration)}}function ue(e,t){if(1&e&&(d.TgZ(0,"div",23)(1,"mat-form-field",7)(2,"mat-label"),d._uU(3),d.qZA(),d._UZ(4,"input",24),d.qZA()()),2&e){const e=d.oxw();d.xp6(1),d.Gre("",e.disabledInputs.email?"disabled-input":""," w-full flex-1 belender-form-field"),d.xp6(2),d.Oqu(e.labels.email),d.xp6(1),d.s9C("tabindex",e.disabledInputs.email?-1:1)}}function he(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"div",25)(1,"belender-checkbox",26,27),d.NdJ("changeCheckbox",(function(t){d.CHM(e);const n=d.oxw();return d.KtG(n.setTerms(t))})),d.TgZ(3,"belender-terms-and-policy-links",28),d.NdJ("goToTerms",(function(){d.CHM(e);const t=d.oxw();return d.KtG(t.gotoTermsAndConditions())})),d.qZA()()()}if(2&e){const e=d.oxw();d.xp6(1),d.Q6J("color",e.data.styles.colors.title),d.xp6(2),d.Q6J("lang",e.lang)("flowName",e.flowName)("data",e.data)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink)("firstSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.firstSentence)("secondSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.secondSentence)("thirdSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.thirdSentence)("policyActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.policyActionText)("termsActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.termsActionText)("customTerms",e.data[e.flowName].customTerms)}}function pe(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"div",25)(1,"belender-checkbox",29,30),d.NdJ("changeCheckbox",(function(t){d.CHM(e);const n=d.oxw();return d.KtG(n.setAssignment(t))})),d._UZ(3,"div",31),d.qZA()()}if(2&e){const e=d.oxw();d.xp6(1),d.Q6J("color",e.data.styles.colors.title),d.xp6(2),d.Q6J("innerHTML",e.data[e.flowName]&&e.data[e.flowName].texts&&e.data[e.flowName].texts.dataAssignmentText?e.data[e.flowName].texts.dataAssignmentText:null==e.data?null:e.data.config.dataAssignmentText,d.oJD)}}function me(e,t){if(1&e&&(d.TgZ(0,"div",32),d._UZ(1,"mat-icon",33),d._uU(2),d.qZA()),2&e){const e=d.oxw();d.xp6(2),d.hij(" ",e.labels.warnings.haveToReadTerms," ")}}function fe(e,t){if(1&e&&(d.TgZ(0,"div",34),d._UZ(1,"mat-icon",35)(2,"div",36),d.qZA()),2&e){const e=d.oxw();d.xp6(2),d.Q6J("innerHTML",e.error,d.oJD)}}const ge=function(e){return{background:e}};function _e(e,t){if(1&e&&(d.TgZ(0,"div",37),d._UZ(1,"mat-spinner",38),d.TgZ(2,"p"),d._uU(3),d.qZA()()),2&e){const e=d.oxw();d.Q6J("ngStyle",d.VKq(2,ge,e.data.styles.colors.background)),d.xp6(3),d.Oqu(e.loading||"Cargando, espere por favor...")}}const be=function(e){return{"dont-show-data":e}},ve=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}},ye={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let we=(()=>{class e{constructor(e,t,n,i,s,r,o,a,l){this.fb=e,this.utils=t,this.cd=n,this.widgetUtils=i,this.dialog=s,this.pinService=r,this.pinUtils=o,this.notis=a,this.customizationStoreService=l,this.lang="",this.editable_dates=!1,this.next=new d.vpe(null),this.esDNI=new d.vpe(null),this.goTerms=new d.vpe(null),this.skipCreationOfRequest=!1,this.openTerms=new d.vpe,this.acceptTerms=!1,this.step=0,this.assignment=!1,this.termsReaded=!1,this.isDni=!1,this.isNie=!1,this.disabledInputs={dni:!1,birthday:!1,supportNumber:!1,email:!1,expiration:!1},this.noValidate=!1,this.termsOpened=!1,this.loading=!1,this.error=""}ngOnInit(){this.labels=this.pinUtils.labels,this.pinUtils.REQUEST?(this.setBaseForm(this.pinUtils.REQUEST),this.noValidate="terms_and_conditions"==this.pinUtils.REQUEST.status_code):this.setBaseForm(null)}ngOnDestroy(){this.subscribeRequest&&this.subscribeRequest.unsubscribe()}sendPestana(){window.parent.open("www.google.com","_blank")}setRegex(e){if(!e)return;let t=this.widgetUtils.ValidateIDType(e);t&&t.type?(this.isDni="dni"===t.type,this.isNie="nie"===t.type):(this.isDni=!1,this.isNie=!1),this.form?.get("expired_date").setValidators([(0,Y.s)({checkFormat:!0,checkDate:!0,checkAge:!this.isDni})]),this.cd.markForCheck()}normalizeRequest(e){return{dni:e?.person_document_number??e?.dni??e?.document_number??null,birth:e?.person_birth_date??e?.birth_date??null,expiration:e?.person_document_expiration_date??null,email:e?.person_email??e?.email??e?.email_copy??null,supportNumber:e?.person_document_support??e?.document_support??null}}setBaseForm(e){let t=this.normalizeRequest(e),n=t?.dni||null,i=t.birth?A()(t.birth).format("DD/MM/YYYY"):null,s=t.expiration?A()(t.expiration).format("DD/MM/YYYY"):null,r=t.supportNumber||null,a=t.email||null;const l=this.data?.config??{};n&&this.setRegex(n),this.form=this.fb.group(this.isDni?l.followMail?{dni:[n,this.noValidate?[]:[o.kI.required,o.kI.maxLength(9),this.regexDNI()]],email:[a],document_type:["dni"],expired_date:[s,[(0,Y.s)({checkFormat:!0,checkDate:!0})]],support_number:[null],person_phone:[]}:{dni:[n,this.noValidate?[]:[o.kI.required,o.kI.maxLength(9),this.regexDNI()]],document_type:["dni"],expired_date:[s,[(0,Y.s)({checkFormat:!0,checkDate:!0})]],support_number:[null]}:l.followMail?{dni:[n,[o.kI.required,o.kI.maxLength(9),this.regexDNI()]],expired_date:[i],document_type:["nie"],support_number:[r],email:[a]}:{dni:[n,[o.kI.required,o.kI.maxLength(9),this.regexDNI()]],expired_date:[i],document_type:["nie"],support_number:[r]}),this.form.get("expired_date").setValidators([(0,Y.s)({checkFormat:!0,checkDate:!0,checkAge:!this.isDni})]),this.form.markAsUntouched(),this.form.updateValueAndValidity(),this.requestIDFromURL&&this.disableEnableInputs(n,i,s,r,a)}forceEnableDisableInputs(e,t,n,i,s){let r=t?t.value:this.disabledInputs.birthday,o=i?i.value:this.disabledInputs.supportNumber;this.isNie&&r&&!r.value&&(o={value:!1}),this.disableEnableInputs(e?e.value:this.disabledInputs.dni,r,n?n.value:this.disabledInputs.expiration,o,s?s.value:this.disabledInputs.email)}disableEnableInputs(e,t,n,i,s){this.disabledInputs={dni:e||!1,birthday:!this.editable_dates&&(t||!1),supportNumber:i||!1,email:!!s,expiration:!this.editable_dates&&(n||!1)},this.cd.markForCheck()}regexDNI(){return e=>{const t=e.value;return t?(this.setRegex(t),this.isDni||this.isNie?null:{regexDNI:!0}):null}}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}nextStep(){let e;const t=this.data?.config??{};e=this.isDni?{document_number:this.form.get("dni").value.toUpperCase(),check_legal:!0,document_expiration_date:this.utils.formatDate(this.form.get("expired_date").value)}:{document_number:this.form.get("dni").value.toUpperCase(),birth_date:this.utils.formatDate(this.form.get("expired_date").value),check_legal:!0,document_support:this.form.get("support_number").value},t.followMail&&(e.email_copy=this.form?.get("email")?.value||""),e.document_type=this.isDni?"dni":"nie",this.validateRequest(e)}gotoSupportAclaration(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(N.$,{panelClass:"fullscreen-dialog"})}gotoExpirationDate(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(q.R,{panelClass:"fullscreen-dialog"})}setTerms(e){this.acceptTerms=e}setAssignment(e){this.assignment=e}getFormsValid(){if(!this.form||this.form.invalid)return!1;if((this.data?.config??{}).dontShowDataInTerms&&"terms_and_conditions"===this.pinUtils?.REQUEST?.status_code)return!0;const e=this.form.get("dni")?.value?.toString().trim();if(!e)return!1;const{type:t,valid:n}=this.widgetUtils.ValidateIDType(e)||{},i="nie"===t;if("dni"!==t&&!i||!n)return!1;const s=this.form.get("support_number")?.value?.toString().trim();return!(i&&!s)}getIfValid(){const e=this.data?.config??{};if(e.dontShowDataInTerms&&this.pinUtils.REQUEST&&this.pinUtils.REQUEST.status_code&&"terms_and_conditions"===this.pinUtils.REQUEST.status_code&&(this.acceptTerms=!0),this.isDni||this.isNie)return!!e.hideCheckLegal||this.acceptTerms;this.form.get("dni")?.setErrors({dni:!0})}getAssignmentValidation(){const e=this.data?.config??{};return!(e.forceChecks&&!this.termsReaded)&&(!e.dataAssignmentCheck||this.assignment)}gotoTermsAndConditions(){this.openTerms.emit(!0)}setFormError(e){switch(e){case"nac":case"expiration":this.form.get("expired_date")?.setErrors({invalidDate:!0});break;case"dni":this.form.get("dni")?.setErrors({invalidDniOrNie:!0});break;case"sop":this.form.get("support_number")?.setErrors({invalidSupportNumber:!0})}}validateRequest(e){e.user_id=this.customizationStoreService.USER_ID,e.package_id=this.customizationStoreService.PACK_ID,this.loading=this.labels.loadings.validatingData,this.forceEnableDisableInputs({value:!0},{value:!0},{value:!0},{value:!0},{value:!0}),this.pinService.checkService(e).then((t=>{if(t&&t.status&&"success"==t.status)this.gotoTerms(e);else if(t.message){let n=this.pinUtils.parseErrorResponse(t.message);"no-service"==n.code?this.setNoService(e):(this.setFormError(n.code),this.loading=null),this.handleDisableInputs(n.code)}else this.setNoService(e)})).catch((t=>{if(t.message){let n=this.pinUtils.parseErrorResponse(t.message);"no-service"!=n.title?(this.showAlert(n.title,n.description),this.loading=null):(this.pinService.addSolicitud(e).then((e=>{this.pinService.setNoService({request_id:this.pinUtils.REQUEST}).then((e=>{this.pinUtils.setRequestStatus("no_service"),this.loading=null})).catch((e=>{this.pinUtils.setRequestStatus("no_service"),this.loading=null}))})),this.loading=null,this.cd.markForCheck()),console.log("handle code: ",n.code),this.handleDisableInputs(n.code)}else this.showAlert("Error indefinido!",t),this.loading=null,this.cd.markForCheck()}))}gotoTerms(e){e.user_id=this.customizationStoreService.USER_ID,e.package_id=this.customizationStoreService.PACK_ID,this.acceptCirbe&&(e.add_cirbe=!0),this.pinUtils.REQUEST.request_id&&(e.request_id=this.pinUtils.REQUEST.request_id),this.loading=this.labels.loadings.sendingData,this.skipCreationOfRequest=this.pinUtils.REQUEST&&this.pinUtils.REQUEST.request_id&&this.pinUtils.REQUEST.status_code&&"prerequest"!=this.pinUtils.REQUEST.status_code,this.skipCreationOfRequest?(this.sendAcceptTerms(),this.pinUtils.subscribeWS()):this.pinService.addSolicitud(e).then((t=>{t&&t.status&&"error"==t.status?t.message&&(this.pinUtils.setRequest(e),400==t.code&&"Does not have Pin service"==t.message?this.pinService.setNoService({request_id:this.pinUtils.REQUEST.request_id}).then((e=>{this.pinUtils.setRequestStatus("no_service"),this.loading=null})).catch((e=>{this.pinUtils.setRequestStatus("no_service"),this.loading=null})):400==t.code&&"Incorrect support number"==t.message?(this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongSupport),this.pinUtils.setRequestStatus("form")):400==t.code&&"Incorrect date"==t.message?(console.warn("entro aquiiii"),this.form.get("expired_date")?.setErrors({invalidDate:!0}),this.pinUtils.setRequestStatus("form")):(this.pinUtils.setRequestStatus("form"),this.showAlert("Error!",t.message))):t&&t.status&&"success"==t.status?(this.pinUtils.setRequest(t.data),this.pinUtils.subscribeWS(),this.sendAcceptTerms()):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+t)})).catch((e=>{e&&e.errorMessage&&this.showAlert(this.labels.warnings.error,e.errorMessage)}))}setNoService(e){this.loading=this.labels.loadings.validatingData,e.user_id=this.customizationStoreService.USER_ID,e.package_id=this.customizationStoreService.PACK_ID,this.pinUtils.REQUEST.request_id&&(e.request_id=this.pinUtils.REQUEST.request_id),this.pinService.addSolicitud(e).then((e=>{this.pinService.setNoService({request_id:this.pinUtils.REQUEST.request_id}).then((e=>{this.pinUtils.setRequestStatus("no_service"),this.loading=null,this.cd.markForCheck()})).catch((e=>{this.pinUtils.setRequestStatus("no_service"),this.loading=null,this.cd.markForCheck()}))}))}showAlert(e,t){this.error=`<div class="flex flex-col w-full items-start gap-0 pl-2"><strong class="text-md" >${e}</strong><small>${t}</small></div>`}sendAcceptTerms(e=!0){let t={user_id:this.customizationStoreService.USER_ID,request_id:this.pinUtils.REQUEST.request_id,terms_and_conditions:!0,opening:this.termsOpened?1:0};Object.keys(this.deviceInfoDetails).length>0&&(t={...t,ip:this.deviceInfoDetails.ip,device:this.deviceInfoDetails.device,os:`${this.deviceInfoDetails.os} ${this.deviceInfoDetails.os_version}`,resolution:this.deviceInfoDetails.screen}),e&&(this.loading=this.labels.loadings.validatingData),this.pinService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?e.message&&"You have a request in progress"==e.message?location.pathname.indexOf("widget-boxed")>-1?location.assign(e.response.widget_url_boxed):location.assign(e.response.widget_url):e.message&&"Invalid request status: stand_by"==e.message?this.pinUtils.setRequestStatus("stand_by"):this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.pinUtils.subscribeWS(),this.pinUtils.setRequest(e.data),this.loading=null,this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}handleDisableInputs(e){!e||setTimeout((()=>{"venc"===e&&this.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1},{value:!1}),"sop"===e&&this.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1},{value:!1}),"nac"===e&&this.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1},{value:!1}),this.cd.markForCheck()}),1e3)}}return e.ɵfac=function(t){return new(t||e)(d.Y36(o.qu),d.Y36(u.F),d.Y36(d.sBO),d.Y36(R.t),d.Y36(F.uw),d.Y36(U.v),d.Y36(S._),d.Y36(Z.T),d.Y36(H.r))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(d.Gf(G,5),d.Gf($,5)),2&e){let e;d.iGM(e=d.CRH())&&(t.checkComponent=e.first),d.iGM(e=d.CRH())&&(t.assignmentCheckComponent=e.first)}},inputs:{flowName:"flowName",data:"data",texts:"texts",acceptCirbe:"acceptCirbe",requestIDFromURL:"requestIDFromURL",lang:"lang",editable_dates:"editable_dates",deviceInfoDetails:"deviceInfoDetails",skipCreationOfRequest:"skipCreationOfRequest"},outputs:{next:"nextStep",esDNI:"isDni",goTerms:"goToTerms",openTerms:"openTerms"},features:[d._Bn([{provide:P.sG,useValue:ye},{provide:d.soG,useValue:"es-ES"}])],decls:26,vars:44,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2","relative",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[3,"ngClass"],[1,"mb-3","pt-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline"],["id","dniInput","formControlName","dni","maxlength","9","matInput","",3,"tabindex"],[4,"ngIf"],["appearance","outline",3,"class",4,"ngIf"],["class","w-full",4,"ngIf"],["class","mt-6 flex justify-start items-center w-full flex-100",4,"ngIf"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],["class","pl-3 w-full pr-4 flex items-center gap-2 py-2 rounded-md mt-3 bg-orange-500/10 text-orange-600",4,"ngIf"],[1,"flex","items-center","gap-2","p-4","flex-col","md:flex-row",3,"ngClass"],["id","sendBtn","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],["class","loading-overlay flex flex-col gap-3 items-center justify-center ",3,"ngStyle",4,"ngIf"],[3,"firstOption","logoUrl"],["id","dniExpireInput","required","","formControlName","expired_date","type","text","mask","00/00/0000","matInput","",3,"tabindex"],["target","_blank",1,"text-sm","hover:text-blue-500","cursor-pointer",3,"click"],["id","dniExpireInput","required","","formControlName","expired_date","type","text","matInput","","mask","d0/M0/0000",3,"tabindex"],["id","supportNumberInput","maxlength","9","minlength","6","required","","formControlName","support_number","matInput","",3,"tabindex"],[1,"w-full"],["id","emailInput","formControlName","email","required","","type","email","placeholder","Ingresa tu email","matInput","",3,"tabindex"],[1,"mt-6","flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"lang","flowName","data","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],[3,"color","changeCheckbox"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"],[1,"pl-3","w-full","pr-4","flex","items-center","gap-2","py-2","rounded-md","mt-3","bg-orange-500/10","text-orange-600"],["svgIcon","mat:warning"],[1,"font-bold",3,"innerHTML"],[1,"loading-overlay","flex","flex-col","gap-3","items-center","justify-center",3,"ngStyle"],["diameter","30"]],template:function(e,t){if(1&e&&(d.YNc(0,K,1,2,"belender-widget-logo",0),d.TgZ(1,"form",1)(2,"div",2),d._UZ(3,"div",3)(4,"div",4),d.ALo(5,"safeHtml"),d.qZA(),d.TgZ(6,"div",5)(7,"div",6)(8,"mat-form-field",7)(9,"mat-label"),d._uU(10),d.qZA(),d._UZ(11,"input",8),d.YNc(12,X,2,1,"mat-error",9),d.YNc(13,ee,2,1,"mat-error",9),d.qZA(),d.YNc(14,se,7,8,"mat-form-field",10),d.YNc(15,le,7,8,"mat-form-field",10),d.YNc(16,de,9,7,"mat-form-field",10),d.YNc(17,ue,5,5,"div",11),d.qZA()(),d.YNc(18,he,4,11,"div",12),d.YNc(19,pe,4,2,"div",12),d.YNc(20,me,3,1,"div",13),d.YNc(21,fe,3,1,"div",14),d.TgZ(22,"div",15)(23,"button",16),d.NdJ("click",(function(){return t.nextStep()})),d._uU(24),d.qZA()(),d.YNc(25,_e,4,4,"div",17),d.qZA()),2&e){let e;d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(1),d.Q6J("formGroup",t.form),d.xp6(2),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.Q6J("innerHTML",t.texts.form.title,d.oJD),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.Q6J("innerHTML",d.lcZ(5,36,t.texts.form.description||""),d.oJD),d.xp6(2),d.Q6J("ngClass",d.VKq(38,be,t.data.config.dontShowDataInTerms&&t.pinUtils.REQUEST.request_id&&t.pinUtils.REQUEST.status_code&&"terms_and_conditions"===t.pinUtils.REQUEST.status_code)),d.xp6(2),d.Gre("",t.disabledInputs.dni?"disabled-input":""," w-full flex-1 belender-form-field"),d.xp6(2),d.Oqu(t.isDni?t.labels.dni:t.isNie?t.labels.nie:t.labels.nieOrDni),d.xp6(1),d.s9C("tabindex",t.disabledInputs.dni?-1:1),d.xp6(1),d.Q6J("ngIf",!t.isNie&&!t.isDni),d.xp6(1),d.Q6J("ngIf",null==(e=t.form.get("dni"))?null:e.hasError("invalidDniOrNie")),d.xp6(1),d.Q6J("ngIf",t.isDni),d.xp6(1),d.Q6J("ngIf",t.isNie),d.xp6(1),d.Q6J("ngIf",t.isNie),d.xp6(1),d.Q6J("ngIf",(null==t.data||null==t.data.config?null:t.data.config.followMail)&&(t.isDni||t.isNie)),d.xp6(1),d.Q6J("ngIf",!t.data.config.hideCheckLegal),d.xp6(1),d.Q6J("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),d.xp6(1),d.Q6J("ngIf",t.data.config.forceChecks&&!t.termsReaded),d.xp6(1),d.Q6J("ngIf",t.error),d.xp6(1),d.Q6J("ngClass",d.kEZ(40,ve,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),d.xp6(1),d.Udp("color",t.getFormsValid()&&t.getIfValid()&&t.getAssignmentValidation()?t.data.styles.colors.btnText:"")("background",t.getFormsValid()&&t.getIfValid()&&t.getAssignmentValidation()?t.data.styles.colors.btnBg:"")("border-radius",t.data.styles.btnRound+"px"),d.Q6J("disabled",!t.getFormsValid()||!t.getIfValid()||!t.getAssignmentValidation()),d.xp6(1),d.hij(" ",t.labels.actions.continue," "),d.xp6(1),d.Q6J("ngIf",t.loading)}},dependencies:[i.mk,i.O5,i.PC,o._Y,o.Fj,o.JJ,o.JL,o.Q7,o.wO,o.nD,o.sg,o.u,j.b,m.X,z.T,B.Z6,J.Hw,g.lW,V.TO,V.KE,V.bx,V.hX,Q.Nt,W.Ou,_.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}.hiden-input[_ngcontent-%COMP%]{height:0!important;max-height:0px!important;overflow:hidden!important;opacity:0!important}.loading-overlay[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;z-index:999}"]}),e})();var xe=n(2142),Ce=n(9299),ke=n(6e3);const Te=[{path:":idUser",component:xe.n},{path:":idUser/:packID",component:xe.n}];let Se=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=d.oAB({type:e}),e.ɵinj=d.cJS({imports:[Ce.Bz.forChild(Te),Ce.Bz,ke.d8]}),e})();function Me(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",5),2&e){const e=d.oxw();d.Q6J("firstOption",e.texts.noService.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let Ie=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts"},decls:6,vars:11,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(d.YNc(0,Me,1,2,"belender-widget-logo",0),d.TgZ(1,"form",1)(2,"div",2),d._UZ(3,"div",3)(4,"div",4),d.ALo(5,"safeHtml"),d.qZA()()),2&e&&(d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(3),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.Q6J("innerHTML",t.texts.noService.title,d.oJD),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.Q6J("innerHTML",d.lcZ(5,9,t.texts.noService.description),d.oJD))},dependencies:[i.O5,o._Y,o.JL,o.F,m.X,_.z]}),e})();function Ee(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",9),2&e){const e=d.oxw();d.Q6J("firstOption",e.texts.abandoned.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const Oe=function(e){return{background:e}};function Le(e,t){if(1&e&&(d.TgZ(0,"div",10),d._UZ(1,"mat-spinner",11),d.TgZ(2,"p"),d._uU(3),d.qZA()()),2&e){const e=d.oxw();d.Q6J("ngStyle",d.VKq(2,Oe,e.data.styles.colors.background)),d.xp6(3),d.Oqu(e.loading||"Cargando, espere por favor...")}}const Pe=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let De=(()=>{class e{constructor(e,t,n,i){this.utils=e,this.pinUtils=t,this.customizationStoreService=n,this.pinService=i,this.loading=null}ngOnInit(){this.labels=this.pinUtils.labels}save(){}retry(){this.retryRequest(this.pinUtils.REQUEST.request_id)}getTextStatus(){switch(this.pinUtils.REQUEST.status_code){case"abandoned_after_waiting_otp_seguridad_social":return this.labels.abandoned.afterWaitingOtpSS;case"abandoned_after_invalid_otp_seguridad_social":return this.labels.abandoned.afterInvalidOtpSS;case"abandoned_after_invalid_otp_aeat":return this.labels.abandoned.afterInvalidOtpAEAT;case"abandoned_after_waiting_otp_aeat":return this.labels.abandoned.afterWaitingOtpAEAT;default:return this.pinUtils.REQUEST.status_message||this.pinUtils.REQUEST.status_code}}retryRequest(e){let t={request_id:this.pinUtils?.REQUEST?.request_id||e,user_id:this.customizationStoreService.USER_ID};this.loading=this.pinUtils.labels.loadings.resendingRequest,this.pinUtils.subscribeWS(),this.pinService.retryRequest(t).then((e=>{e&&e.data&&(this.pinUtils.setRequest(e.data),this.pinUtils.setRequestStatus(this.pinUtils.REQUEST.status_code)),this.loading=null})).catch((e=>{console.error(e),this.loading=null}))}}return e.ɵfac=function(t){return new(t||e)(d.Y36(u.F),d.Y36(S._),d.Y36(H.r),d.Y36(U.v))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-abandoned-step"]],inputs:{data:"data",texts:"texts"},decls:12,vars:25,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content","relative"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"],["class","loading-overlay flex flex-col gap-3 items-center justify-center ",3,"ngStyle",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"loading-overlay","flex","flex-col","gap-3","items-center","justify-center",3,"ngStyle"],["diameter","30"]],template:function(e,t){1&e&&(d.YNc(0,Ee,1,2,"belender-widget-logo",0),d.TgZ(1,"div",1)(2,"div",2),d._UZ(3,"div",3)(4,"div",4),d.ALo(5,"safeHtml"),d.TgZ(6,"div",5),d._uU(7),d.qZA()(),d.TgZ(8,"div",6)(9,"button",7),d.NdJ("click",(function(){return t.retry()})),d._uU(10),d.qZA()(),d.YNc(11,Le,4,4,"div",8),d.qZA()),2&e&&(d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(3),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.Q6J("innerHTML",t.texts.abandoned.title,d.oJD),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.Q6J("innerHTML",d.lcZ(5,19,t.texts.abandoned.description),d.oJD),d.xp6(3),d.hij(" ",t.getTextStatus()," "),d.xp6(1),d.Q6J("ngClass",d.kEZ(21,Pe,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),d.xp6(1),d.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),d.xp6(1),d.hij(" ",null==t.labels.actions?null:t.labels.actions.retry," "),d.xp6(1),d.Q6J("ngIf",t.loading))},dependencies:[i.mk,i.O5,i.PC,m.X,g.lW,W.Ou,_.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-overlay[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;z-index:999}"]}),e})();var Ae=n(6981),Ne=n(5145);const qe=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Ye=(()=>{class e{constructor(e,t){this.utils=e,this.pinUtils=t}ngOnInit(){this.labels=this.pinUtils.labels}newRequest(){this.pinUtils.setRequestStatus("created")}gotoRequest(){location.assign(this.pinUtils.REQUEST.widget_url_boxed)}getStatus(){let e=Ne.Z.find((e=>e.text==this.pinUtils.REQUEST.status_code));return e?e.label:"Estado desconocido"}}return e.ɵfac=function(t){return new(t||e)(d.Y36(u.F),d.Y36(S._))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-duplicated-request-step"]],inputs:{data:"data",texts:"texts"},decls:15,vars:25,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"flex","gap-2","justify-start","items-center","py-2"],[1,"w-fit","p-1","px-2","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(d.TgZ(0,"div",0)(1,"div",1)(2,"div",2),d._uU(3),d.qZA(),d.TgZ(4,"div",3),d._uU(5),d.qZA(),d.TgZ(6,"div",4),d._uU(7),d.TgZ(8,"div",5),d._uU(9),d.qZA()()(),d.TgZ(10,"div",6)(11,"button",7),d.NdJ("click",(function(){return t.newRequest()})),d._uU(12),d.qZA(),d.TgZ(13,"button",8),d.NdJ("click",(function(){return t.gotoRequest()})),d._uU(14),d.qZA()()()),2&e&&(d.xp6(2),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.xp6(1),d.hij(" ",t.labels.warnings.duplicatedRequest," "),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.xp6(1),d.hij(" ",t.labels.warnings.alreadyHaveRequest," "),d.xp6(2),d.hij(" ",t.labels.warnings.currentRequestStatus," "),d.xp6(2),d.hij(" ",t.getStatus()," "),d.xp6(1),d.Q6J("ngClass",d.kEZ(21,qe,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),d.xp6(1),d.Udp("border-radius",t.data.styles.btnRound+"px"),d.xp6(1),d.hij(" ",t.labels.actions.newRequest," "),d.xp6(1),d.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),d.xp6(1),d.hij(" ",t.labels.actions.gotoCurrentRequest," "))},dependencies:[i.mk,g.lW],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Re=n(1129),Fe=n(9476),Ue=n(3295);let Ze=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-standby-step"]],inputs:{data:"data",texts:"texts"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(d.TgZ(0,"form",0)(1,"div",1),d._UZ(2,"div",2)(3,"div",3),d.ALo(4,"safeHtml"),d.qZA()()),2&e&&(d.xp6(2),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.standby?t.texts.standby.titleSize+"px":"20px"),d.Q6J("innerHTML",t.texts.standby?t.texts.standby.title:"Solicitud en Stand By",d.oJD),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.Q6J("innerHTML",t.texts.standby?t.texts.standby.description:d.lcZ(4,8,"Descripcion del estado Stand By"),d.oJD))},dependencies:[o._Y,o.JL,o.F,_.z]}),e})();var He=n(1145);function je(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",10),2&e){const e=d.oxw();d.Q6J("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const ze=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Be=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new d.vpe(null)}ngOnInit(){this.form=this.fb.group({document_expiration_date:[null,[o.kI.required]]})}next(){this.nextStep.emit(this.form.get("document_expiration_date").value)}}return e.ɵfac=function(t){return new(t||e)(d.Y36(o.QS),d.Y36(u.F))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-error-expiration-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:17,vars:24,consts:[[3,"logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","date","placeholder","Ej: 22/03/1990","required","","formControlName","document_expiration_date","matInput",""],[1,"flex","items-center","justify-end","gap-2","py-4","flex-col","md:flex-row",3,"ngClass"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"logoUrl"]],template:function(e,t){1&e&&(d.YNc(0,je,1,1,"belender-widget-logo",0),d.TgZ(1,"div",1)(2,"div",2)(3,"div",3),d._uU(4),d.qZA(),d.TgZ(5,"div",4),d._uU(6),d.qZA(),d.TgZ(7,"form",5)(8,"mat-form-field",6)(9,"mat-label"),d._uU(10),d.qZA(),d._UZ(11,"input",7),d.TgZ(12,"mat-hint"),d._uU(13,"DD/MM/YYYY"),d.qZA()()()(),d.TgZ(14,"div",8)(15,"button",9),d.NdJ("click",(function(){return t.next()})),d._uU(16),d.qZA()()()),2&e&&(d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(3),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.xp6(1),d.hij(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.wrongExpiration," "),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.xp6(1),d.hij(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.inputExpiration," "),d.xp6(1),d.Q6J("formGroup",t.form),d.xp6(3),d.Oqu(null==t.labels?null:t.labels.expiration),d.xp6(4),d.Q6J("ngClass",d.kEZ(20,ze,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),d.xp6(1),d.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),d.Q6J("disabled",t.form.invalid),d.xp6(1),d.hij(" ",null==t.labels||null==t.labels.actions?null:t.labels.actions.send," "))},dependencies:[i.mk,i.O5,o._Y,o.Fj,o.JJ,o.JL,o.Q7,o.sg,o.u,m.X,g.lW,V.KE,V.bx,V.hX,Q.Nt],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Je(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",10),2&e){const e=d.oxw();d.Q6J("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const Ve=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Qe=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new d.vpe(null)}ngOnInit(){this.form=this.fb.group({support_number:[null,[o.kI.required]]})}next(){this.nextStep.emit(this.form.get("support_number").value)}}return e.ɵfac=function(t){return new(t||e)(d.Y36(o.QS),d.Y36(u.F))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-error-support-number-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:15,vars:24,consts:[[3,"logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","number","placeholder","Ej: 1233443","required","","formControlName","support_number","matInput",""],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"logoUrl"]],template:function(e,t){1&e&&(d.YNc(0,Je,1,1,"belender-widget-logo",0),d.TgZ(1,"div",1)(2,"div",2)(3,"div",3),d._uU(4),d.qZA(),d.TgZ(5,"div",4),d._uU(6),d.qZA(),d.TgZ(7,"form",5)(8,"mat-form-field",6)(9,"mat-label"),d._uU(10),d.qZA(),d._UZ(11,"input",7),d.qZA()()(),d.TgZ(12,"div",8)(13,"button",9),d.NdJ("click",(function(){return t.next()})),d._uU(14),d.qZA()()()),2&e&&(d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(3),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.xp6(1),d.hij(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.wrongSupport," "),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.xp6(1),d.hij(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.inputSupport," "),d.xp6(1),d.Q6J("formGroup",t.form),d.xp6(3),d.Oqu(null==t.labels||null==t.labels.warnings?null:t.labels.warnings.support),d.xp6(2),d.Q6J("ngClass",d.kEZ(20,Ve,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),d.xp6(1),d.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),d.Q6J("disabled",t.form.invalid),d.xp6(1),d.hij(" ",null==t.labels||null==t.labels.actions?null:t.labels.actions.send," "))},dependencies:[i.mk,i.O5,o._Y,o.Fj,o.wV,o.JJ,o.JL,o.Q7,o.sg,o.u,m.X,g.lW,V.KE,V.hX,Q.Nt],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function We(e,t){if(1&e&&d._UZ(0,"belender-widget-logo",10),2&e){const e=d.oxw();d.Q6J("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const Ge=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let $e=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new d.vpe(null)}ngOnInit(){this.form=this.fb.group({birth_date:[null,[o.kI.required]]})}next(){this.nextStep.emit(this.form.get("birth_date").value)}}return e.ɵfac=function(t){return new(t||e)(d.Y36(o.QS),d.Y36(u.F))},e.ɵcmp=d.Xpm({type:e,selectors:[["belender-error-birthday-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:17,vars:24,consts:[[3,"logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","belender-form-field"],["type","text","required","","formControlName","birth_date","matInput","","mask","d0/M0/0000"],[1,"flex","items-center","justify-end","gap-2","py-4","flex-col","md:flex-row",3,"ngClass"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"logoUrl"]],template:function(e,t){1&e&&(d.YNc(0,We,1,1,"belender-widget-logo",0),d.TgZ(1,"div",1)(2,"div",2)(3,"div",3),d._uU(4),d.qZA(),d.TgZ(5,"div",4),d._uU(6),d.qZA(),d.TgZ(7,"form",5)(8,"mat-form-field",6)(9,"mat-label"),d._uU(10),d.qZA(),d._UZ(11,"input",7),d.TgZ(12,"mat-hint"),d._uU(13,"DD/MM/YYYY"),d.qZA()()()(),d.TgZ(14,"div",8)(15,"button",9),d.NdJ("click",(function(){return t.next()})),d._uU(16),d.qZA()()()),2&e&&(d.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),d.xp6(3),d.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),d.xp6(1),d.hij(" ",t.labels.warnings.wrongBirthday," "),d.xp6(1),d.Udp("color",t.data.styles.colors.text),d.xp6(1),d.hij(" ",t.labels.warnings.inputBirthDay," "),d.xp6(1),d.Q6J("formGroup",t.form),d.xp6(3),d.hij(" ",t.labels.warnings.birthday," "),d.xp6(4),d.Q6J("ngClass",d.kEZ(20,Ge,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),d.xp6(1),d.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),d.Q6J("disabled",t.form.invalid),d.xp6(1),d.hij(" ",t.labels.actions.send," "))},dependencies:[i.mk,i.O5,o._Y,o.Fj,o.JJ,o.JL,o.Q7,o.sg,o.u,m.X,B.Z6,g.lW,V.KE,V.bx,V.hX,Q.Nt],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Ke=n(3300),Xe=n(865),et=n(3033),tt=n(5028),nt=n(6830),it=n(4302),st=n(9112),rt=n(9382);let ot=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=d.oAB({type:e}),e.ɵinj=d.cJS({providers:[U.v,l.o,k.w,c.t,Z.T,R.t,S._,{provide:P.Ad,useValue:"es-ES"}],imports:[Se,i.ez,s.G,r.J,o.u5,o.UX,a.a,Ae.x,Re.n,Fe.F,Ue.g,He.j,Ke.C,Xe.q,et.d,tt.q]}),e})();d.B6R(xe.n,[i.O5,nt.L,it.q,st.y,rt.i,J.Hw,g.lW,W.Ou,C,L,we,Ie,De,Ye,Ze,Be,Qe,$e],[_.z])},9359:(e,t,n)=>{n.d(t,{S:()=>s,q:()=>i});const i={INTRO:"intro",MANUAL:"manual",FORM:"form",ERROR:{DATA:"error-data",BIRTH_DATE:"error-birth-date",EXPIRATION:"error-expiration-date",SUPPORT_NUMBER:"error-support-number"},OTPSS:"otp_ss",OTPAEAT:"otp_aeat",OTPBDE:"otp_bde",ABANDONED:"abandoned",SUCCESS:"success",FAILED:"failed",NO_SERVICE:"no-service",STAND_BY:"standby",NO_PHONE:"no-phone",BAD_PHONE:"bad-phone",DUPLICATED:"duplicated",LOADING:"loading",PHONE_NO_EXIST:"phone_not_exist_otp",CONSENT_PROCESS_COMPLETED:"consent_process_completed"},s={created:i.FORM,form:i.FORM,prerequest:i.FORM,terms_and_conditions:i.FORM,waiting_terms_and_conditions:i.FORM,waiting_otp_seguridad_social:i.OTPSS,waiting_login_seguridad_social:i.OTPSS,invalid_otp_seguridad_social:i.OTPSS,waiting_otp_carpeta_ciudadana:i.OTPSS,waiting_login_carpeta_ciudadana:i.OTPSS,invalid_otp_carpeta_ciudadana:i.OTPSS,waiting_otp_aeat:i.OTPAEAT,waiting_login_aeat:i.OTPAEAT,invalid_otp_aeat:i.OTPAEAT,waiting_login_bde:i.OTPBDE,waiting_otp_bde:i.OTPBDE,invalid_otp_bde:i.OTPBDE,abandoned_after_bad_phone:i.ABANDONED,abandoned_after_terms_and_conditions:i.ABANDONED,abandoned_after_invalid_otp_seguridad_social:i.ABANDONED,abandoned_after_waiting_otp_seguridad_social:i.ABANDONED,abandoned_after_invalid_otp_aeat:i.ABANDONED,abandoned_after_waiting_otp_aeat:i.ABANDONED,abandoned_after_waiting_otp_bde:i.ABANDONED,abandoned_after_invalid_otp_bde:i.ABANDONED,abandond_after_waiting_otp_carpeta_ciudadana:i.ABANDONED,abandond_after_invalid_otp_carpeta_ciudadana:i.ABANDONED,all_documents_downloaded:i.SUCCESS,partial_documents_downloaded:i.SUCCESS,consent_process_completed:i.SUCCESS,partial_documents_downloaded_and_deleted:i.SUCCESS,all_documents_downloaded_and_deleted:i.SUCCESS,failed_with_retry:i.FAILED,failed_without_retry:i.FAILED,failed_documents_downloaded:i.FAILED,consent_process_canceled:i.FAILED,failed_job_task_cirbe:i.FAILED,no_service:i.NO_SERVICE,no_clave_pin_service:i.NO_SERVICE,no_cirbe_cp_service:i.NO_SERVICE,no_sms_service:i.NO_SERVICE,stand_by:i.STAND_BY,"no-phone":i.NO_PHONE,"no-more-phone":i.NO_PHONE,bad_phone:i.BAD_PHONE,error_expiration_date:i.ERROR.EXPIRATION,error_birth_date:i.ERROR.BIRTH_DATE,error_support_number:i.ERROR.SUPPORT_NUMBER,duplicated:i.DUPLICATED}},2254:(e,t,n)=>{n.d(t,{p:()=>l});var i=n(1135),s=n(5762),r=n(2340),o=n(4650),a=n(8460);let l=(()=>{class e{constructor(e){this.customizationStoreService=e,this.currentHeight=0,this.socket=null,this.socketOpened=!0,this._request=new i.X({...new s.l,status_code:"created"}),this._request_status=new i.X(null),this.request$=this._request.asObservable(),this.request_status$=this._request_status.asObservable(),this.requestIDSubject=new i.X(""),this.requestID$=this.requestIDSubject.asObservable(),this.loadingSubject=new i.X(!1),this.loading$=this.loadingSubject.asObservable()}setLoading(e){this.loadingSubject.next(e)}updateRequestID(e){this.requestIDSubject.next(e),this.REQUEST_ID=e}setGlobalVariables(){this.REQUEST=this._request.value,this.REQUEST_STATUS=this.REQUEST.status_code,this._request_status.next(this.REQUEST_STATUS)}setRequest(e){this._request.next({...e}),this.setGlobalVariables()}patch(e){this._request.next({...this._request.value,...e}),this.setGlobalVariables()}setRequestStatus(e){this._request.next({...this._request.value,status_code:e}),this.setGlobalVariables()}setSubscriptionOfRequest(){let e=this;if(this.socket)return;let t="wss://notifications.dev.belender.net";"qa"==r.N.env&&(t="wss://notifications.qa.belender.net"),"pro"==r.N.env&&(t="wss://notifications.belender.net"),r.N.notificationsBaseUrl&&(t=r.N.notificationsBaseUrl),this.socket=new WebSocket(`${t}?requests_id=${this.REQUEST_ID}&user_id=${this.customizationStoreService.USER_ID}`),this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(t){let n=JSON.parse(t.data);e.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(t){console.log("Conexión cerrada"),e.socketOpened=!1}}disconnectWebsocket(){this.socket&&this.socket.close()}handlePusherNotification(e){e&&e.widget_url&&(this.widgetUrl=e.widget_url),e&&e.widget_url_boxed&&(this.widgetUrlBoxed=e.widget_url_boxed),this.sendMessageToParent({type:"websocket",data:e}),e&&e.status_code&&("consent_process_completed"===e.status_code&&(console.warn("message from wss: ",e),this.disconnectWebsocket()),e.status_code.startsWith("abandoned")&&(console.warn("message from wss: ",e),this.disconnectWebsocket(),this.setRequestStatus("abandoned")),e.status_code.startsWith("failed")&&(console.warn("message from wss: ",e),this.disconnectWebsocket(),this.setRequestStatus("failed")))}sendMessageToParent(e){if(e&&e.type&&"widgetHeight"===e.type){if(e.data===this.currentHeight)return;this.currentHeight=e.data}window.top.postMessage(e,"*")}}return e.ɵfac=function(t){return new(t||e)(o.LFG(a.r))},e.ɵprov=o.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},8135:(e,t,n)=>{n.d(t,{T:()=>ie});var i=n(5861),s=n(7582),r=n(9549),o=n(9933),a=n(5762),l=n(8259),c=n(2340),d=n(667);const u="error-data",h={created:"form",form:"form",terms_and_conditions:"form",waiting_terms_and_conditions:"form","pre-request":"form",waiting_otp_seguridad_social:"otp",waiting_login_seguridad_social:"otp",invalid_otp_seguridad_social:"otp",abandoned_after_bad_phone:"abandoned",abandoned_after_invalid_otp_seguridad_social:"abandoned",abandoned_after_terms_and_conditions:"abandoned",abandoned_after_waiting_otp_seguridad_social:"abandoned",all_documents_downloaded:"success",partial_documents_downloaded:"success",consent_process_completed:"success",partial_documents_downloaded_and_deleted:"success",all_documents_downloaded_and_deleted:"success",waiting_documents:"success",failed_documents_downloaded:"success",failed_with_retry:"failed",failed_without_retry:"failed",consent_process_canceled:"loading",no_service:"no-service",no_sms_service:"no-service",no_clave_pin_service:"no-service",stand_by:"loading","no-phone":"loading",no_phone:"loading","no-more-phone":"no-phone",no_more_phone:"no-phone",bad_phone:"bad-phone",error_expiration_date:"error-expiration-date",error_birth_date:"error-birth-date",error_support_number:"error-support-number",duplicated:"duplicated"};var p=n(1931),m=n(4650),f=n(9299),g=n(5089),_=n(5601),b=n(7367),v=n(8460),y=n(5895),w=n(5206),x=n(7489),C=n(9045),k=n(5412),T=n(7308),S=n(2254);const M=["formStep"],I=["otpStep"];function E(e,t){if(1&e&&(m.TgZ(0,"div",8),m._UZ(1,"mat-icon",9),m._uU(2),m.qZA()),2&e){const e=m.oxw(2);m.Q6J("@fadeInUp",void 0),m.xp6(2),m.hij(" ",e.warningAlert," ")}}function O(e,t){1&e&&(m.TgZ(0,"div",10),m._UZ(1,"mat-progress-spinner",11),m.qZA()),2&e&&(m.xp6(1),m.Q6J("value",0))}function L(e,t){if(1&e){const e=m.EpF();m.TgZ(0,"belender-intro-step",27),m.NdJ("gotoFlow",(function(){m.CHM(e);const t=m.oxw(3);return m.KtG(t.goFlow())}))("gotoManual",(function(){m.CHM(e);const t=m.oxw(3);return m.KtG(t.gotoManual())})),m.qZA()}if(2&e){const e=m.oxw(3);m.Q6J("data",e.data)("flowName",e.flowName)}}function P(e,t){if(1&e&&m._UZ(0,"belender-manual-step",28),2&e){const e=m.oxw(3);m.Q6J("data",e.data)("flowName",e.flowName)("packId",e.packId)("userId",e.userId)("labels",e.labels)}}function D(e,t){if(1&e){const e=m.EpF();m.TgZ(0,"belender-form-step",29,30),m.NdJ("goToTerms",(function(){m.CHM(e);const t=m.oxw(3);return m.KtG(t.gotoTermsAndConditions())})),m.qZA()}if(2&e){const e=m.oxw(3);m.Q6J("requestIDFromURL",e.requestIDFromURL)("lang",e.currentLang)("requestID",e.requestID)("flowName",e.flowName)("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("pinMode",e.pinMode)("editable_dates",e.editable_dates)("skipCreationOfRequest",e.skipCreationOfRequest)}}function A(e,t){if(1&e&&m._UZ(0,"belender-error-form-step",31),2&e){const e=m.oxw(3);m.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("flowName",e.flowName)("requestID",e.requestID)}}function N(e,t){if(1&e&&m._UZ(0,"belender-error-birthday-step",32),2&e){const e=m.oxw(3);m.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function q(e,t){if(1&e&&m._UZ(0,"belender-error-expiration-step",32),2&e){const e=m.oxw(3);m.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function Y(e,t){if(1&e&&m._UZ(0,"belender-error-support-number-step",32),2&e){const e=m.oxw(3);m.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function R(e,t){if(1&e&&m._UZ(0,"belender-abandoned-step",33),2&e){const e=m.oxw(3);m.Q6J("requestID",e.requestID)("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("flowType",e.flowName)}}function F(e,t){if(1&e&&m._UZ(0,"belender-shared-otp-step",34,35),2&e){const e=m.oxw(3);m.Q6J("otpType","otpSS")("requestID",e.requestID)("testMode",e.testMode)("labels",e.labels)("logoCustom",e.data[e.flowName].texts.otpSS.customImage)("flowType",e.flowName)("data",e.data)("texts",e.data[e.flowName].texts)("minLength",6)}}function U(e,t){if(1&e&&m._UZ(0,"belender-success-step",36),2&e){const e=m.oxw(3);m.Q6J("data",e.data)("labels",e.labels)("packId",e.packId)("flowName",e.flowName)("userId",e.userId)("requestID",e.requestID)("texts",e.data[e.flowName].texts)}}function Z(e,t){if(1&e){const e=m.EpF();m.TgZ(0,"belender-duplicated-request-step",37),m.NdJ("newRequest",(function(t){m.CHM(e);const n=m.oxw(3);return m.KtG(n.newRequest(t))})),m.qZA()}if(2&e){const e=m.oxw(3);m.Q6J("data",e.data)("labels",e.labels)("currentRequest",e.currentRequest)}}function H(e,t){if(1&e&&m._UZ(0,"belender-no-phone-step",38),2&e){const e=m.oxw(3);m.Q6J("data",e.data)("labels",e.labels)("flowName",e.flowName)("texts",e.data[e.flowName].texts)}}function j(e,t){if(1&e&&m._UZ(0,"belender-error-phone-step",39),2&e){const e=m.oxw(3);m.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("flowName",e.flowName)}}function z(e,t){if(1&e){const e=m.EpF();m.TgZ(0,"belender-fail-step",40),m.NdJ("newRequest",(function(t){m.CHM(e);const n=m.oxw(3);return m.KtG(n.newRequest(t))})),m.qZA()}if(2&e){const e=m.oxw(3);m.Q6J("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("requestID",e.requestID)("flowType",e.flowName)}}function B(e,t){if(1&e&&m._UZ(0,"belender-no-service-step",41),2&e){const e=m.oxw(3);m.Q6J("texts",e.data[e.flowName].texts)("data",e.data)("labels",e.labels)}}function J(e,t){if(1&e&&m._UZ(0,"belender-standby-step",41),2&e){const e=m.oxw(3);m.Q6J("texts",e.data[e.flowName].texts)("data",e.data)("labels",e.labels)}}function V(e,t){if(1&e&&m._UZ(0,"belender-cancel-request",42),2&e){const e=m.oxw(3);m.Q6J("flowType",e.flowName)("request_id",e.requestID)("user_id",e.userId)("data",e.data)("labels",e.labels)("textColor",e.data.styles.colors.text)("customText",e.data.config.cancelRequestText)}}function Q(e,t){if(1&e&&(m._UZ(0,"div",43),m.ALo(1,"safeHtml")),2&e){const e=m.oxw(3);m.Udp("color",e.data.styles.colors.text),m.Q6J("innerHTML",m.lcZ(1,3,(null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.aditionalDescription)||""),m.oJD)}}function W(e,t){if(1&e&&(m.ynx(0),m.YNc(1,L,1,2,"belender-intro-step",12),m.YNc(2,P,1,5,"belender-manual-step",13),m.YNc(3,D,2,10,"belender-form-step",14),m.YNc(4,A,1,5,"belender-error-form-step",15),m.YNc(5,N,1,3,"belender-error-birthday-step",16),m.YNc(6,q,1,3,"belender-error-expiration-step",16),m.YNc(7,Y,1,3,"belender-error-support-number-step",16),m.YNc(8,R,1,5,"belender-abandoned-step",17),m.YNc(9,F,2,9,"belender-shared-otp-step",18),m.YNc(10,U,1,7,"belender-success-step",19),m.YNc(11,Z,1,3,"belender-duplicated-request-step",20),m.YNc(12,H,1,4,"belender-no-phone-step",21),m.YNc(13,j,1,4,"belender-error-phone-step",22),m.YNc(14,z,1,5,"belender-fail-step",23),m.YNc(15,B,1,3,"belender-no-service-step",24),m.YNc(16,J,1,3,"belender-standby-step",24),m.YNc(17,V,1,7,"belender-cancel-request",25),m.YNc(18,Q,2,5,"div",26),m.BQk()),2&e){const e=m.oxw(2);m.xp6(1),m.Q6J("ngIf","intro"===e.requestStatus),m.xp6(1),m.Q6J("ngIf","manual"===e.requestStatus),m.xp6(1),m.Q6J("ngIf","form"===e.requestStatus&&!e.settingRequestFromBack),m.xp6(1),m.Q6J("ngIf","error-data"===e.requestStatus),m.xp6(1),m.Q6J("ngIf","error-birth-date"==e.requestStatus),m.xp6(1),m.Q6J("ngIf","error-expiration-date"==e.requestStatus),m.xp6(1),m.Q6J("ngIf","error-support-number"==e.requestStatus),m.xp6(1),m.Q6J("ngIf","abandoned"==e.requestStatus),m.xp6(1),m.Q6J("ngIf","otp"==e.requestStatus),m.xp6(1),m.Q6J("ngIf","success"==e.requestStatus),m.xp6(1),m.Q6J("ngIf","duplicated"==e.requestStatus),m.xp6(1),m.Q6J("ngIf","no-phone"==e.requestStatus),m.xp6(1),m.Q6J("ngIf","bad-phone"==e.requestStatus),m.xp6(1),m.Q6J("ngIf","failed"==e.requestStatus),m.xp6(1),m.Q6J("ngIf","no-service"==e.requestStatus),m.xp6(1),m.Q6J("ngIf","standby"==e.requestStatus),m.xp6(1),m.Q6J("ngIf",e.showCancelRequest&&e.data.config.cancelRequest&&e.requestIDFromURL),m.xp6(1),m.Q6J("ngIf","form"===e.requestStatus&&!e.loading&&e.data[e.flowName]&&(null==e.data[e.flowName]?null:e.data[e.flowName].showAditionalDescription)&&e.data[e.flowName].texts&&e.data[e.flowName].texts.form&&e.data[e.flowName].texts.form.aditionalDescription)}}function G(e,t){1&e&&m._UZ(0,"belender-disabled-url")}function $(e,t){if(1&e){const e=m.EpF();m.TgZ(0,"div")(1,"div",44)(2,"div",45),m._uU(3,"Error!"),m.qZA(),m._UZ(4,"div",46),m.qZA(),m.TgZ(5,"div",47)(6,"button",48),m.NdJ("click",(function(){m.CHM(e);const t=m.oxw(2);return m.KtG(t.error=!1)})),m._uU(7,"Ingresar manualmente"),m.qZA()()()}if(2&e){const e=m.oxw(2);m.xp6(4),m.Udp("color",e.data.styles.colors.text),m.Q6J("innerHTML",e.error,m.oJD)}}function K(e,t){if(1&e&&(m.TgZ(0,"div"),m.YNc(1,E,3,2,"div",6),m.YNc(2,O,2,1,"div",7),m.YNc(3,W,19,18,"ng-container",4),m.YNc(4,G,1,0,"belender-disabled-url",4),m.YNc(5,$,8,3,"div",4),m.qZA()),2&e){const e=m.oxw();m.Gre("h-full w-full flex-auto p-0 md:p-3 ",null==e.data||null==e.data.styles?null:e.data.styles.typography,""),m.Udp("background",null==e.data||null==e.data.styles||null==e.data.styles.colors?null:e.data.styles.colors.background),m.xp6(1),m.Q6J("ngIf",e.warningAlert&&"success"!=e.requestStatus),m.xp6(1),m.Q6J("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"===e.requestStatus),m.xp6(1),m.Q6J("ngIf",!e.error&&!e.disableURL),m.xp6(1),m.Q6J("ngIf",!e.error&&e.disableURL),m.xp6(1),m.Q6J("ngIf",!e.loading&&e.error&&"loading"!=e.requestStatus)}}function X(e,t){if(1&e&&(m.TgZ(0,"div",49),m._UZ(1,"mat-progress-spinner",50),m.TgZ(2,"p",51),m._uU(3),m.qZA()()),2&e){const e=m.oxw();m.xp6(1),m.Q6J("value",e.spinnerValue)("mode",e.spinnerMode),m.xp6(2),m.Oqu(e.loading)}}function ee(e,t){if(1&e){const e=m.EpF();m.TgZ(0,"vex-terms",52),m.NdJ("accepted",(function(){m.CHM(e);const t=m.oxw();return m.KtG(t.handleTermsResponse(!0))}))("cancelled",(function(){m.CHM(e);const t=m.oxw();return m.KtG(t.handleTermsResponse(!1))})),m.qZA()}if(2&e){const e=m.oxw();m.Q6J("flow",e.flowName)("lang",e.currentLang)("allData",e.data)("requestStatus",e.smsFlowService.REQUEST?e.smsFlowService.REQUEST_STATUS:"")("requestID",e.requestID)}}function te(e,t){if(1&e&&(m.ynx(0),m.TgZ(1,"div",53),m._uU(2),m.qZA(),m.BQk()),2&e){const e=m.oxw();m.xp6(2),m.hij("TestMode ",e.testMode?"ON":"OFF","")}}function ne(e,t){if(1&e){const e=m.EpF();m.TgZ(0,"belender-tester-sms",54),m.NdJ("sendMessage",(function(t){m.CHM(e);const n=m.oxw();return m.KtG(n.setMessageFromTest(t))})),m.qZA()}}let ie=class{constructor(e,t,n,i,s,r,o,a,l,d,u,h,m){if(this.cd=e,this.Activatedroute=t,this.utils=n,this.solicitudesService=i,this.customizationService=s,this.customizationStoreService=r,this.notis=o,this.flowsS=a,this.pinService=l,this.deviceInfoService=d,this.dialog=u,this.translationService=h,this.smsFlowService=m,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.introEnabled=!1,this.manual=!1,this.pinMode=!1,this.requestIDFromURL=!1,this.warningAlert=null,this.stopPropagationOfSuccess=!1,this.paramsSetted=!1,this.requestStatus="loading",this.disableURL=!1,this.settingRequestFromBack=!1,this.showCancelRequest=!1,this.requestedFromDetail=!1,this.env=c.N,this.intervalToAskBack=null,this.loadingRequestData=!1,this.intervalCount=0,this.requestedToPin=!1,this.isScaled=!1,this.termsOpened=!1,this.flowName="SMS",this.labels=p.S.es,this.currentLang="",this.showTermsDialog=!1,this.editable_dates=!1,"OTPCredential"in window){const e=new AbortController;navigator.credentials.get({otp:{transport:["sms"]},signal:e.signal}).then((e=>{this.showAlert("otp",e)})).catch((e=>{console.log(e)}))}this.deviceInfoDetails$=this.deviceInfoService.deviceInfo$.subscribe((e=>{Object.keys(e).length>0&&(this.deviceInfoDetails=e)}))}ngOnInit(){this.smsFlowService.request_status$.subscribe((e=>{this.setStatus()})),this.userId=this.customizationStoreService.USER_ID,this.smsFlowService.requestID$.subscribe((e=>{this.requestID=e})),this.smsFlowService.loading$.subscribe((e=>{this.loading=e})),this.getWindowsScreenOrientation(),this.setWarningPortals();const e=this;this.packId=this.customizationStoreService.PACK_ID,this.initFunctions(),"pro"!=c.N.env&&(l(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),l(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}initFunctions(){var e=this;return(0,i.Z)((function*(){var t;e.Activatedroute.queryParams.subscribe((t=(0,i.Z)((function*(t){t&&t.request_id&&e.smsFlowService.updateRequestID(t.request_id),t.lang?(e.currentLang=t.lang,e.smsFlowService.setLoading(e.translationService.getFirstLoading(e.currentLang)),e.setTranslation()):e.smsFlowService.setLoading(e.labels.loadings.gettingData),"true"===t.editable_dates&&(e.editable_dates=t.editable_dates),e.userId?e.setInitialData(e.userId):e.smsFlowService.setLoading(null)})),function(e){return t.apply(this,arguments)}))}))()}testNoti(e){this.showAlert("Titleeee","messsaggeee",e)}setTranslation(){let e=this.translationService.getLabelsTranslated(this.currentLang);e&&(this.labels=e)}testAlert(e){this.showAlert("Error de prueba","Esta es una prueba de un error",e)}ngOnDestroy(){window.screen&&window.screen.orientation&&this.orientationChangeHandler&&window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}ngAfterViewChecked(){this.getWidgetCardHeight()}getWindowsScreenOrientation(){window.screen&&window.screen.orientation&&(this.orientationChangeHandler=()=>{this.getWidgetCardHeight()},window.screen.orientation.addEventListener("change",this.orientationChangeHandler))}getWidgetCardHeight(){let e=l("#widget-wrapper").height()||0;this.isScaled$=this.deviceInfoService.isScaled$.subscribe((t=>{this.isScaled=t,this.isScaled&&(e*=1.5)})),this.smsFlowService.sendMessageToParent({type:"widgetHeight",data:e})}setWarningPortals(){this.flowsS.getFlows().then((e=>{e&&e.data&&e.data.length&&"OCCASIONAL_FAIL"==e.data.find((e=>e.name==this.flowName)).status&&!this.warningAlert&&(this.warningAlert=this.labels.warnings.ocassionalError)})).catch((e=>{console.error(e)}))}setInitialData(e){var t=this;return(0,i.Z)((function*(){yield t.validateRequestIdInUrl();const n=yield t.getFlow(e);if(t.funderConfig=t.customizationStoreService.FUNDER_CONFIG,t.funderStyles=t.customizationStoreService.FUNDER_STYLES,t.data={config:t.funderConfig,styles:t.funderStyles,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.showAlert(t.labels.warnings.error,t.labels.warnings.noCustomization,"error"),t.smsFlowService.setLoading(null),void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.introEnabled=t.data.config.introEnabled,t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName,t.currentLang,t.requestID,t.smsFlowService.REQUEST?t.smsFlowService.REQUEST_STATUS:"").then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}validateRequestIdInUrl(){var e=this;return(0,i.Z)((function*(){return new Promise((t=>{var n;e.Activatedroute.queryParams.subscribe((n=(0,i.Z)((function*(n){if(n&&(e.setParamsToRequest(n),e.smsFlowService.setLoading(!1)),n&&n.acceptTerms&&(e.paramsSetted=!0,e.autoAcceptTerms=!0),n.success&&(e.stopPropagationOfSuccess=!0,e.paramsSetted=!0),n&&n.request_id){e.smsFlowService.updateRequestID(n.request_id),e.disableURL=!1;let i=yield e.setFormFromVcCode(n.request_id,n);e.requestIDFromURL=!0,e.paramsSetted=!0,t(i)}else e.smsFlowService.setLoading(!1);t(null)})),function(e){return n.apply(this,arguments)}),(n=>{e.smsFlowService.setLoading(!1),t(null)}))}))}))()}setParamsToRequest(e){this.smsFlowService.REQUEST||this.setRequestStatus("form");let t={...this.smsFlowService.REQUEST};(e.document_number||e.document)&&!t.person_document_number&&(t.person_document_number=e.document_number||e.document,this.requestIDFromURL=!0,this.paramsSetted=!0),(e.birth_date||e.birthday)&&!t.person_birth_date&&(t.person_birth_date=e.birth_date||e.birthday,this.requestIDFromURL=!0,this.paramsSetted=!0),e.phone&&!t.person_phone&&(t.person_phone=e.phone,this.requestIDFromURL=!0,this.paramsSetted=!0),e.email&&!t.email&&(t.email=e.email,this.requestIDFromURL=!0,this.paramsSetted=!0),this.smsFlowService.setRequest(t)}setFormFromVcCode(e,t){var n=this;return(0,i.Z)((function*(){return n.smsFlowService.setLoading(n.labels.loadings.gettingData),n.settingRequestFromBack=!0,new Promise((i=>{n.solicitudesService.getSolicitudByCode(e).then((e=>{e&&e.data?(n.smsFlowService.setRequest(e.data),n.setStatus(),n.smsFlowService.setSubscriptionOfRequest(),n.smsFlowService.setLoading(!1),n.skipCreationOfRequest=n.smsFlowService.REQUEST&&n.smsFlowService.REQUEST_STATUS&&"prerequest"!=n.smsFlowService.REQUEST_STATUS,n.autoAcceptTerms?n.acceptTerms():n.setParamsToRequest(t)):n.smsFlowService.setLoading(null),n.settingRequestFromBack=!1,i(n.smsFlowService.REQUEST||null)})).catch((e=>{n.smsFlowService.setLoading(null),n.settingRequestFromBack=!1,i(null)}))}))}))()}setMessageFromTest(e){this.smsFlowService.handlePusherNotification(e)}addSolicitudPIN(e){this.data[this.flowName]&&this.data[this.flowName].packID&&(e.package_id=this.data[this.flowName].packID),this.formComponent.forceEnableDisableInputs({value:!0},{value:!0},{value:!0},{value:!0}),this.pinService.addSolicitud(e).then((t=>{t&&t.status&&"error"==t.status?t.message&&(this.smsFlowService.setRequest(e),400==t.code&&"Does not have Pin service"==t.message?(this.setRequestStatus("no_service"),this.smsFlowService.setLoading(!1)):400==t.code&&"Incorrect support number"==t.message?(this.notis.showAlert(this.labels.warnings.error,this.labels.warnings.wrongSupport),this.setRequestStatus("form")):400==t.code&&"Incorrect date"==t.message?(this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongDate),this.setRequestStatus("form")):(this.setRequestStatus("form"),this.showAlert(this.labels.warnings.error,t.message)),this.setStatus()):t&&t.status&&"success"==t.status?(this.smsFlowService.updateRequestID(t.data.request_id),this.smsFlowService.setRequest(t.data),location.pathname.indexOf("widget-boxed")>-1?location.assign(t.data.widget_url_boxed+"&acceptTerms=true"):location.assign(t.data.widget_url+"&acceptTerms=true"),this.acceptTerms()):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+t)})).catch((e=>{e&&e.errorMessage&&this.showAlert("Error!",e.errorMessage)}))}addSolicitudSMS(e){this.formComponent.hasDateError=!1,this.solicitudesService.addSolicitud(e,this.packId,this.userId).then((t=>{t&&t.status&&"error"==t.status?(this.smsFlowService.setRequest(e),t.message&&(400==t.code?"Birthdate incorrect"==t.message?(this.setRequestStatus("form"),this.formComponent.hasDateError=!0,this.formComponent.dateError=this.labels.warnings.wrongDateDesc):"Incorrect date"==t.message?(this.formComponent.hasDateError=!0,this.formComponent.dateError=this.labels.warnings.wrongDateDesc,this.setRequestStatus("form")):(this.setRequestStatus("no_service"),this.smsFlowService.setLoading(!1)):(this.setRequestStatus("form"),this.showAlert("Error!",t.message)),this.setStatus())):t&&t.status&&"success"==t.status?(this.smsFlowService.updateRequestID(t.data.request_id),this.smsFlowService.setRequest(t.data),this.setStatus(),this.smsFlowService.setSubscriptionOfRequest(),this.acceptTerms()):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+t)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.smsFlowService.setLoading(!1)}))}validateHaveSmsMode(e){this.solicitudesService.checkService(e).then((t=>{t&&t.message&&"does not have sms service"==t.message.toLowerCase()?(this.smsFlowService.setRequest(e),this.setRequestStatus("form"),this.pinMode=!0,this.smsFlowService.setLoading(null),this.showAlert(this.labels.warnings.noSms,this.labels.warnings.noSmsDesc)):this.addSolicitudSMS(e)})).catch((e=>{console.error(e)}))}showAlert(e,t,n){this.smsFlowService.setLoading(!1);let i=this.getFunderIconType(n);this.notis.showAlert(e,t,i)}getFunderIconType(e){if(!e||!this.funderStyles)return"error";switch(e){case"error":return this.funderStyles.errorIcon||e;case"success":return this.funderStyles.successIcon||e;case"warning":return this.funderStyles.warningIcon||e;case"info":return this.funderStyles.infoIcon||e;default:return e}}acceptTerms(e=!0){let t={request_id:this.requestID,user_id:this.userId,terms_and_conditions:!0,opening:this.termsOpened?1:0};Object.keys(this.deviceInfoDetails).length>0&&(t={...t,ip:this.deviceInfoDetails.ip,device:this.deviceInfoDetails.device,os:`${this.deviceInfoDetails.os} ${this.deviceInfoDetails.os_version}`,resolution:this.deviceInfoDetails.screen}),e&&this.smsFlowService.setLoading(this.labels.loadings.validatingAndLoginSS),this.solicitudesService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?(e.message&&"You have a request in progress"==e.message?location.pathname.indexOf("widget-boxed")>-1?location.assign(e.response.widget_url_boxed):location.assign(e.response.widget_url):e.message?"Invalid request status: stand_by"==e.message?this.setRequestStatus("stand_by"):this.showAlert("Error!",e.message):this.showAlert("Error!",e),this.smsFlowService.setLoading(!1)):e&&"success"==e.status?(this.smsFlowService.sendMessageToParent({type:"response",data:e.data||e}),this.smsFlowService.setRequest(e.data),this.setStatus(),this.smsFlowService.setSubscriptionOfRequest(),this.smsFlowService.setLoading(null),this.cd.markForCheck()):this.smsFlowService.setLoading(null)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.smsFlowService.setLoading(!1)}))}askToBack(){this.solicitudesService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.smsFlowService.setRequest(e.data),this.setStatus(),this.smsFlowService.setLoading(!1)):this.smsFlowService.setLoading(!1)})).catch((e=>{this.smsFlowService.setLoading(!1)}))}setRequestStatus(e){let t={...this.smsFlowService.REQUEST};if(t)t.status_code=e;else{let n=new a.l;n.status_code=e,t=n,this.smsFlowService.setRequest(n)}this.smsFlowService.setRequestStatus(e),this.setStatus()}newRequest(e){this.setRequestStatus("created")}gotoManual(){this.manual=!0,this.cd.markForCheck()}goFlow(){this.introEnabled=!1}gotoPin(){this.requestedToPin=!0;let e={request_id:this.smsFlowService.REQUEST.request_id};this.smsFlowService.setLoading(this.labels.loadings.smsToPin),this.solicitudesService.noPhone(e).then((e=>{this.smsFlowService.setLoading(null)})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.smsFlowService.setLoading(null)}))}gotoClavePinUrl(e){location.href.indexOf("widget-boxed")>-1?location.assign(e.widget_url_boxed):location.assign(e.widget_url)}requestStatusFromDetail(){this.requestedFromDetail=!0,this.smsFlowService.setLoading(this.labels.loadings.validatingRequest),this.solicitudesService.getSolicitudByCode(this.smsFlowService.REQUEST.request_id).then((e=>{e&&e.consent_process_completed&&this.setRequestStatus("consent_process_completed"),this.smsFlowService.setLoading(null)})).catch((e=>{this.smsFlowService.setLoading(null),this.setRequestStatus("failed")}))}handleRequestStatus(e){let t=new a.l;e.consent_process_completed?(this.requestedFromDetail=!0,t.status_code="consent_process_completed",this.smsFlowService.setRequest(t),setTimeout((()=>{this.smsFlowService.disconnectWebsocket()}),3e3),this.setStatus(),this.data[this.flowName].showDocumentsOnSuccess&&!this.intervalToAskBack&&this.initIntervalToAskBack()):(this.otpComponent&&this.otpComponent.resetOtpNumber(),e.otp_status?"VALID"===e.otp_status?e.nex_step_detail&&"Seguridad Social"===e.nex_step_detail.portal&&(t.status_code="waiting_otp_seguridad_social",this.smsFlowService.setRequest(t),this.setStatus(),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)):"INVALID"===e.otp_status&&(t.status_code=e.status_code,this.smsFlowService.setRequest(t),this.setStatus(),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)):(t.status_code="failed",this.smsFlowService.setRequest(t),this.setStatus(),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp))),this.smsFlowService.setLoading(null)}initIntervalToAskBack(){!this.smsFlowService.REQUEST||!this.smsFlowService.REQUEST.request_id||(this.intervalToAskBack=setInterval((()=>{this.askDetailToBack(this.smsFlowService.REQUEST.request_id),this.intervalCount++,this.intervalCount>20&&this.stopInterval()}),5e3))}stopInterval(){this.intervalToAskBack&&clearInterval(this.intervalToAskBack)}askDetailToBack(e){if(!e&&!this.requestID)return void this.stopInterval();let t=JSON.parse(JSON.stringify(this.smsFlowService.REQUEST_STATUS));this.pinService.getSolicitudByCode(e).then((e=>{e&&e.data&&t!=e.data.status_code&&(this.smsFlowService.setRequest(e.data),this.setRequestStatus(this.smsFlowService.REQUEST_STATUS))})).catch((e=>{this.smsFlowService.setLoading(null),this.loadingRequestData=!1}))}handleBadPhone(){this.smsFlowService.disconnectWebsocket(),this.smsFlowService.setLoading(this.labels.loadings.validatingData),setTimeout((()=>{this.smsFlowService.REQUEST||this.smsFlowService.setRequest(new a.l),this.setRequestStatus("failed_without_retry"),this.setStatus(),this.smsFlowService.setLoading(null)}),3e3)}setStatus(){if(this.showCancelRequest=!0,this.smsFlowService?.REQUEST){let e=this.smsFlowService?.REQUEST.status_code;if("waiting_documents"===e||"saved_otp"===e)return void(this.loading="Cargando datos...");let t=h[e];if(t){if("success"===t&&this.funderConfig&&this.funderConfig.infiniteLoopInCompleted&&(this.loading=" "),"phone_not_exist_otp"===t)return void(this.data&&this.data.config&&this.data.config.tryPinWithoutSMS?(this.showCancelRequest=!1,this.gotoPin(),this.requestStatus="loading"):this.requestStatus=this.data.config.noRetryInBadPhone?"otp":u);if(("abandoned"===t||"failed"===t)&&(this.showCancelRequest=!1),"no-service"===t&&(this.requestStatus=t,this.data&&this.data.config&&this.data.config.tryPinWithoutSMS))return void(!this.requestedToPin&&this.gotoPin());if("bad-phone"===t&&this.data&&this.data.config&&this.data.config.tryPinWithoutSMS)return!this.requestedToPin&&this.gotoPin(),void(this.requestStatus="no-phone");if("no-phone"===t){if(this.data&&this.data.config&&!this.data.config.tryPinWithoutSMS)return void(this.requestStatus="no-service");if(this.data&&this.data.config&&this.data.tryPinWithoutSMS)return!this.requestedToPin&&this.gotoPin(),void(this.requestStatus="no-phone")}this.requestStatus=t,this.loading=null}}this.cd.markForCheck()}setStatus2(){if(this.showCancelRequest=!0,this.manual)this.requestStatus="manual";else if(this.introEnabled)this.requestStatus="intro";else if(this.smsFlowService.REQUEST){if(this.smsFlowService.REQUEST){let e=h[this.smsFlowService.REQUEST_STATUS];if(e){if("success"===e&&this.data.config&&this.data.config.infiniteLoopInCompleted)return void(this.requestStatus="loading");if(("abandoned"===e||"failed"===e)&&(this.showCancelRequest=!1),"phone_not_exist_otp"===e)return void(this.data&&this.data.config&&this.data.config.tryPinWithoutSMS?(this.showCancelRequest=!1,this.gotoPin(),this.requestStatus="loading"):this.requestStatus=this.data.config.noRetryInBadPhone?"otp":u);if("no-service"===e&&(this.requestStatus=e,this.data&&this.data.config&&this.data.config.tryPinWithoutSMS))return void(!this.requestedToPin&&this.gotoPin());if("bad-phone"===e&&this.data&&this.data.config&&this.data.config.tryPinWithoutSMS)return!this.requestedToPin&&this.gotoPin(),void(this.requestStatus="no-phone");if("no-phone"===e){if(this.data&&this.data.config&&!this.data.config.tryPinWithoutSMS)return void(this.requestStatus="no-service");if(this.data&&this.data.config&&this.data.tryPinWithoutSMS)return!this.requestedToPin&&this.gotoPin(),void(this.requestStatus="no-phone")}this.requestStatus=e}}}else this.requestStatus="form"}gotoTermsAndConditions(){this.showTermsDialog=!0}handleTermsResponse(e){this.showTermsDialog=!1,e&&(this.termsOpened=!0,this.formComponent.setTermsCheck(!0))}};ie.ɵfac=function(e){return new(e||ie)(m.Y36(m.sBO),m.Y36(f.gz),m.Y36(g.F),m.Y36(_.M),m.Y36(b.w),m.Y36(v.r),m.Y36(y.T),m.Y36(w.s),m.Y36(x.v),m.Y36(C.H),m.Y36(k.uw),m.Y36(T.D),m.Y36(S.p))},ie.ɵcmp=m.Xpm({type:ie,selectors:[["belender-widget-sms"]],viewQuery:function(e,t){if(1&e&&(m.Gf(M,5),m.Gf(I,5),m.Gf(M,5)),2&e){let e;m.iGM(e=m.CRH())&&(t.formComponent=e.first),m.iGM(e=m.CRH())&&(t.otpComponent=e.first),m.iGM(e=m.CRH())&&(t.theDiv=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID"},features:[m._Bn([{provide:r.o2,useValue:{appearance:"standard"}}])],decls:6,vars:5,consts:[[1,"h-full","widget-belender"],[3,"class","background",4,"ngIf"],["class","loading-wrapper",4,"ngIf"],[3,"flow","lang","allData","requestStatus","requestID","accepted","cancelled",4,"ngIf"],[4,"ngIf"],[3,"sendMessage",4,"ngIf"],["class","flex justify-start px-4 py-3 items-center font-bold gap-3 text-md bg-amber-500/20 rounded-sm border border-amber-500 text-amber-500",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],[1,"flex","justify-start","px-4","py-3","items-center","font-bold","gap-3","text-md","bg-amber-500/20","rounded-sm","border","border-amber-500","text-amber-500"],["svgIcon","mat:warning"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],["class","h-full ",3,"data","flowName","gotoFlow","gotoManual",4,"ngIf"],["class","h-full ",3,"data","flowName","packId","userId","labels",4,"ngIf"],[3,"requestIDFromURL","lang","requestID","flowName","data","labels","texts","pinMode","editable_dates","skipCreationOfRequest","goToTerms",4,"ngIf"],[3,"data","labels","texts","flowName","requestID",4,"ngIf"],[3,"data","labels","texts",4,"ngIf"],[3,"requestID","data","labels","texts","flowType",4,"ngIf"],[3,"otpType","requestID","testMode","labels","logoCustom","flowType","data","texts","minLength",4,"ngIf"],[3,"data","labels","packId","flowName","userId","requestID","texts",4,"ngIf"],[3,"data","labels","currentRequest","newRequest",4,"ngIf"],[3,"data","labels","flowName","texts",4,"ngIf"],[3,"data","labels","texts","flowName",4,"ngIf"],[3,"data","labels","texts","requestID","flowType","newRequest",4,"ngIf"],[3,"texts","data","labels",4,"ngIf"],[3,"flowType","request_id","user_id","data","labels","textColor","customText",4,"ngIf"],["class","subheading-1 p-4 custom-html",3,"color","innerHTML",4,"ngIf"],[1,"h-full",3,"data","flowName","gotoFlow","gotoManual"],[1,"h-full",3,"data","flowName","packId","userId","labels"],[3,"requestIDFromURL","lang","requestID","flowName","data","labels","texts","pinMode","editable_dates","skipCreationOfRequest","goToTerms"],["formStep",""],[3,"data","labels","texts","flowName","requestID"],[3,"data","labels","texts"],[3,"requestID","data","labels","texts","flowType"],[3,"otpType","requestID","testMode","labels","logoCustom","flowType","data","texts","minLength"],["otpStep",""],[3,"data","labels","packId","flowName","userId","requestID","texts"],[3,"data","labels","currentRequest","newRequest"],[3,"data","labels","flowName","texts"],[3,"data","labels","texts","flowName"],[3,"data","labels","texts","requestID","flowType","newRequest"],[3,"texts","data","labels"],[3,"flowType","request_id","user_id","data","labels","textColor","customText"],[1,"subheading-1","p-4","custom-html",3,"innerHTML"],[1,"px-6","py-4","flex","flex-col"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"loading-wrapper"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[3,"flow","lang","allData","requestStatus","requestID","accepted","cancelled"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"],[3,"sendMessage"]],template:function(e,t){1&e&&(m.TgZ(0,"div",0),m.YNc(1,K,6,10,"div",1),m.YNc(2,X,4,3,"div",2),m.qZA(),m.YNc(3,ee,1,5,"vex-terms",3),m.YNc(4,te,3,1,"ng-container",4),m.YNc(5,ne,1,0,"belender-tester-sms",5)),2&e&&(m.xp6(1),m.Q6J("ngIf",t.data&&t.data.styles&&t.data.styles.colors),m.xp6(1),m.Q6J("ngIf",t.loading&&!t.error),m.xp6(1),m.Q6J("ngIf",t.showTermsDialog),m.xp6(1),m.Q6J("ngIf",t.testMode),m.xp6(1),m.Q6J("ngIf",t.testMode))},styles:[".widget-belender[_ngcontent-%COMP%]{position:relative;min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"],data:{animation:[d.$]}}),ie=(0,s.gn)([(0,o.c)()],ie)},6547:(e,t,n)=>{n.r(t),n.d(t,{SmsModule:()=>Rt});var i=n(6895),s=n(6383),r=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),b=n(3798),v=n(9391),y=n(1572),w=n(182),x=n(4650),C=n(5089),k=n(5895),T=n(3046),S=n(342),M=n(3731);function I(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",5),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.success.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function E(e,t){if(1&e&&(x.TgZ(0,"div",6),x._UZ(1,"div",7)(2,"div",8),x.ALo(3,"safeHtml"),x.qZA()),2&e){const e=x.oxw();x.xp6(1),x.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),x.Q6J("innerHTML",e.texts.success.title,x.oJD),x.xp6(1),x.Udp("color",e.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(3,8,e.texts.success.description||""),x.oJD)}}function O(e,t){if(1&e&&x._UZ(0,"widget-documents",9),2&e){const e=x.oxw();x.Q6J("userId",e.userId)("packId",e.packId)("requestID",e.requestID)}}function L(e,t){if(1&e&&(x.TgZ(0,"div",10),x._UZ(1,"mat-progress-spinner",11),x.TgZ(2,"p",12),x._uU(3),x.qZA()()),2&e){const e=x.oxw();x.xp6(1),x.Q6J("value",0),x.xp6(2),x.Oqu(e.loading)}}const P=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function D(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",13)(1,"button",14),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.gotoRedirect())})),x._uU(2),x.qZA()()}if(2&e){const e=x.oxw();x.Q6J("ngClass",x.kEZ(8,P,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),x.xp6(1),x.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),x.xp6(1),x.hij(" ",e.data[e.flowName].btnTextCallBack||e.labels.actions.clickToFinish," ")}}let A=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.loading=null,this.showDocuments=!1}ngOnInit(){this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].automaticRedirectCallBack&&this.data[this.flowName].callBackUrl?setTimeout((()=>{location.assign(this.data[this.flowName].callBackUrl)}),2e3):this.data&&this.data[this.flowName]&&this.data[this.flowName].showDocumentsOnSuccess&&(this.showDocuments=!0)}save(){}gotoRedirect(){this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].callBackUrl&&location.assign(this.data[this.flowName].callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(x.Y36(p.QS),x.Y36(C.F),x.Y36(_.M),x.Y36(v.o),x.Y36(k.T))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",loading:"loading",requestID:"requestID",packId:"packId",userId:"userId",flowName:"flowName",labels:"labels"},decls:5,vars:5,consts:[[3,"firstOption","logoUrl",4,"ngIf"],["class"," pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],[3,"userId","packId","requestID",4,"ngIf"],["class","loading-wrapper flex flex-col items-center animated fadeIn",4,"ngIf"],["class","flex items-center gap-2 py-4 flex-col md:flex-row",3,"ngClass",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"userId","packId","requestID"],[1,"loading-wrapper","flex","flex-col","items-center","animated","fadeIn"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"flex","items-center","gap-2","py-4","flex-col","md:flex-row",3,"ngClass"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(x.YNc(0,I,1,2,"belender-widget-logo",0),x.YNc(1,E,4,10,"div",1),x.YNc(2,O,1,3,"widget-documents",2),x.YNc(3,L,4,2,"div",3),x.YNc(4,D,3,12,"div",4)),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(1),x.Q6J("ngIf",!t.data.config.infiniteLoopInCompleted&&!t.loading),x.xp6(1),x.Q6J("ngIf",t.showDocuments),x.xp6(1),x.Q6J("ngIf",t.loading),x.xp6(1),x.Q6J("ngIf",t.data&&t.data[t.flowName]&&t.data[t.flowName].enableUrlCallBack&&!t.data[t.flowName].automaticRedirectCallBack))},dependencies:[i.mk,i.O5,u.lW,y.Ou,T.X,S.A,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var N=n(4144),q=n(7367),Y=n(2254),R=n(9549);function F(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",7),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.errorPhone.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function U(e,t){if(1&e&&(x.TgZ(0,"form",8)(1,"mat-form-field",9)(2,"mat-label"),x._uU(3),x.qZA(),x._UZ(4,"input",10),x.qZA()()),2&e){const e=x.oxw();x.Q6J("formGroup",e.form),x.xp6(3),x.Oqu(e.labels.phone)}}const Z=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function H(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",11)(1,"button",12),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.no())})),x._uU(2),x.qZA(),x.TgZ(3,"button",13),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.next())})),x._uU(4),x.qZA()()}if(2&e){const e=x.oxw();x.Q6J("ngClass",x.kEZ(12,Z,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),x.xp6(1),x.Udp("border-radius",e.data.styles.btnRound+"px"),x.xp6(1),x.hij(" ",e.labels.warnings.dontHavePhone," "),x.xp6(1),x.Udp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),x.Q6J("disabled",e.form.invalid),x.xp6(1),x.hij(" ",e.labels.actions.next," ")}}let j=(()=>{class e{constructor(e,t,n,i,s,r){this.fb=e,this.utils=t,this.cd=n,this.notifications=i,this.solicitudesService=s,this.smsFlowService=r,this.loading=null,this.noPhone=new x.vpe(null),this.nextStep=new x.vpe(null)}ngOnInit(){this.form=this.fb.group({phone:[null,[p.kI.required,p.kI.maxLength(9),p.kI.minLength(9)]]})}next(){"SMS"===this.flowName?this.setSmsPhone(this.form.get("phone").value):this.nextStep.emit(this.form.get("phone").value)}no(){"SMS"===this.flowName?this.setSmsNoPhone():this.noPhone.emit(!0)}setSmsPhone(e){this.smsFlowService.setLoading(this.labels.loadings.sendingNewPhone),this.solicitudesService.setPhone({phone:e},this.smsFlowService.REQUEST&&this.smsFlowService.REQUEST.request_id?this.smsFlowService.REQUEST.request_id:this.requestID)}setSmsNoPhone(){this.smsFlowService.setLoading(this.labels.loadings.validatingData),this.solicitudesService.noPhone({request_id:this.smsFlowService.REQUEST.request_id})}}return e.ɵfac=function(t){return new(t||e)(x.Y36(p.QS),x.Y36(C.F),x.Y36(x.sBO),x.Y36(k.T),x.Y36(_.M),x.Y36(Y.p))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-error-phone-step"]],inputs:{requestID:"requestID",flowName:"flowName",data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{noPhone:"noPhone",nextStep:"nextStep"},decls:9,vars:13,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","w-full",3,"formGroup",4,"ngIf"],["class","flex items-center gap-2 p-4",3,"ngClass",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"mb-4","w-full","md:max-w-[500px]"],["maxlength","9","formControlName","phone","matInput",""],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"bg-red-500","text-red-50","px-8","py-1","w-full","max-w-none","md:max-w-[220px]",3,"click"],["mat-flat-button","","type","button",1,"px-8","py-1","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(x.YNc(0,F,1,2,"belender-widget-logo",0),x.TgZ(1,"div",1)(2,"div",2),x._UZ(3,"div",3)(4,"div",4),x.ALo(5,"safeHtml"),x._UZ(6,"br"),x.YNc(7,U,5,2,"form",5),x.qZA(),x.YNc(8,H,5,16,"div",6),x.qZA()),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(3),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.Q6J("innerHTML",t.texts.errorPhone.title,x.oJD),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(5,11,t.texts.errorPhone.description),x.oJD),x.xp6(3),x.Q6J("ngIf",!t.data.config.noRetryInBadPhone),x.xp6(1),x.Q6J("ngIf",!t.data.config.noRetryInBadPhone))},dependencies:[i.mk,i.O5,u.lW,R.KE,R.hX,N.Nt,p._Y,p.Fj,p.JJ,p.JL,p.nD,p.sg,p.u,T.X,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var z=n(8135),B=n(8460);function J(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",3),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.fail.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function V(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",10)(1,"button",11),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw(2);return x.KtG(t.retry())})),x._uU(2),x.qZA()()}if(2&e){const e=x.oxw(2);x.xp6(1),x.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),x.xp6(1),x.hij(" ",e.labels.actions.retry," ")}}const Q=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function W(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",12)(1,"button",11),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw(2);return x.KtG(t.newRequest())})),x._uU(2),x.qZA()()}if(2&e){const e=x.oxw(2);x.Q6J("ngClass",x.kEZ(8,Q,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),x.xp6(1),x.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),x.xp6(1),x.Oqu(e.labels.actions.newRequest)}}function G(e,t){if(1&e&&(x.TgZ(0,"div",4)(1,"div",5),x._UZ(2,"div",6)(3,"div",7),x.ALo(4,"safeHtml"),x.qZA(),x.YNc(5,V,3,7,"div",8),x.YNc(6,W,3,12,"div",9),x.qZA()),2&e){const e=x.oxw();x.xp6(2),x.Q6J("innerHTML",e.texts.fail.title,x.oJD),x.xp6(1),x.Udp("color",e.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(4,6,e.texts.fail.description),x.oJD),x.xp6(2),x.Q6J("ngIf",e.smsFlowService.REQUEST&&"failed_with_retry"==e.smsFlowService.REQUEST_STATUS),x.xp6(1),x.Q6J("ngIf",e.smsFlowService.REQUEST&&"failed_documents_downloaded"==e.smsFlowService.REQUEST_STATUS)}}function $(e,t){if(1&e&&(x.TgZ(0,"div",13),x._UZ(1,"mat-progress-spinner",14),x.TgZ(2,"p",15),x._uU(3),x.qZA()()),2&e){const e=x.oxw();x.xp6(1),x.Q6J("value",0),x.xp6(2),x.Oqu(e.loading)}}let K=(()=>{class e{constructor(e,t,n,i,s,r,o,a){this.smsComponent=e,this.fb=t,this.utils=n,this.solicitudesService=i,this.attachmentsService=s,this.notifications=r,this.smsFlowService=o,this.customizationStoreService=a,this.loading=null,this.retryOp=new x.vpe(null),this.newReq=new x.vpe(null)}ngOnInit(){}save(){}retry(){"SMS"===this.flowType?this.retrySmsRequest(this.smsFlowService.REQUEST.request_id):this.retryOp.emit(this.smsFlowService.REQUEST.request_id)}newRequest(){this.newReq.emit(this.smsFlowService.REQUEST.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.smsFlowService.REQUEST_STATUS}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.smsFlowService.REQUEST_STATUS}retrySmsRequest(e){let t={request_id:(this.smsFlowService.REQUEST&&this.smsFlowService.REQUEST.request_id?this.smsFlowService.REQUEST.request_id:this.requestID)||e,user_id:this.customizationStoreService.USER_ID};this.smsFlowService.setLoading(this.labels.loadings.resendingRequest),this.smsFlowService.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.smsFlowService.setRequest(e.data),this.smsComponent.setStatus()),this.smsFlowService.setLoading(!1)})).catch((e=>{console.error(e),this.smsComponent.showAlert("Error!",e.message||e),this.smsFlowService.setLoading(!1)}))}}return e.ɵfac=function(t){return new(t||e)(x.Y36(z.T,9),x.Y36(p.QS),x.Y36(C.F),x.Y36(_.M),x.Y36(v.o),x.Y36(k.T),x.Y36(Y.p),x.Y36(B.r))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-fail-step"]],inputs:{flowType:"flowType",requestID:"requestID",data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:3,vars:3,consts:[[3,"firstOption","logoUrl",4,"ngIf"],["class","animated fadeIn fixed-content",4,"ngIf"],["class","loading-wrapper flex flex-col items-center animated fadeIn",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"animated","fadeIn","fixed-content"],[1,"px-2","py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],["class","flex items-center gap-2 p-4",3,"ngClass",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],[1,"loading-wrapper","flex","flex-col","items-center","animated","fadeIn"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(x.YNc(0,J,1,2,"belender-widget-logo",0),x.YNc(1,G,7,8,"div",1),x.YNc(2,$,4,2,"div",2)),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(1),x.Q6J("ngIf",!t.loading),x.xp6(1),x.Q6J("ngIf",t.loading))},dependencies:[i.mk,i.O5,u.lW,y.Ou,T.X,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var X=n(5439),ee=n.n(X),te=(n(6866),n(3238)),ne=n(3755),ie=n(3746),se=n(2932),re=n(4246),oe=n(5412),ae=n(1763),le=n(5696),ce=n(1094);const de=["termsCheckbox"],ue=["assignmentCheckbox"];function he(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",23),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.form.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function pe(e,t){if(1&e&&(x.TgZ(0,"mat-error"),x._uU(1),x.qZA()),2&e){const e=x.oxw();x.xp6(1),x.hij(" ",e.errorDNI," ")}}function me(e,t){1&e&&(x.TgZ(0,"mat-error"),x._uU(1," El formato debe ser DD/MM/AAAA "),x.qZA())}function fe(e,t){1&e&&(x.TgZ(0,"mat-error"),x._uU(1," Fecha inválida "),x.qZA())}function ge(e,t){1&e&&(x.TgZ(0,"mat-error"),x._uU(1," Debe ser mayor de 18 años "),x.qZA())}function _e(e,t){1&e&&(x.TgZ(0,"mat-error"),x._uU(1," El formato debe ser DD/MM/AAAA "),x.qZA())}function be(e,t){1&e&&(x.TgZ(0,"mat-error"),x._uU(1," Fecha inválida "),x.qZA())}function ve(e,t){1&e&&(x.TgZ(0,"mat-error"),x._uU(1," Debe ser mayor de 18 años "),x.qZA())}function ye(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"mat-form-field",24)(1,"mat-label"),x._uU(2),x.qZA(),x._UZ(3,"input",25),x.TgZ(4,"mat-hint")(5,"a",26),x.NdJ("click",(function(t){x.CHM(e);const n=x.oxw();return x.KtG(n.gotoExpirationDate(t))})),x.TgZ(6,"u"),x._uU(7),x.qZA()()(),x.YNc(8,_e,2,0,"mat-error",8),x.YNc(9,be,2,0,"mat-error",8),x.YNc(10,ve,2,0,"mat-error",8),x.qZA()}if(2&e){const e=x.oxw();let t,n,i;x.xp6(2),x.Oqu(e.labels.expiration),x.xp6(5),x.Oqu(e.labels.findExpiration),x.xp6(1),x.Q6J("ngIf",null==(t=e.form.get("document_expiration"))?null:t.hasError("invalidFormat")),x.xp6(1),x.Q6J("ngIf",null==(n=e.form.get("document_expiration"))?null:n.hasError("invalidDate")),x.xp6(1),x.Q6J("ngIf",null==(i=e.form.get("document_expiration"))?null:i.hasError("underAge"))}}function we(e,t){if(1&e&&(x.TgZ(0,"mat-form-field",24)(1,"mat-label"),x._uU(2),x.qZA(),x._UZ(3,"input",27),x.qZA()),2&e){const e=x.oxw();x.xp6(2),x.Oqu(e.labels.support)}}function xe(e,t){if(1&e&&(x.TgZ(0,"div",28)(1,"mat-form-field",6)(2,"mat-label"),x._uU(3),x.qZA(),x._UZ(4,"input",29),x.qZA()()),2&e){const e=x.oxw();x.xp6(1),x.Gre("",e.disabledInputs.email?"disabled-input":""," w-full flex-1 belender-form-field"),x.xp6(2),x.Oqu(e.labels.email),x.xp6(1),x.s9C("tabindex",e.disabledInputs.email?-1:1),x.s9C("placeholder",e.labels.inputEmail)}}function Ce(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",30)(1,"belender-checkbox",31,32),x.NdJ("changeCheckbox",(function(t){x.CHM(e);const n=x.oxw();return x.KtG(n.setTerms(t))})),x.TgZ(3,"belender-terms-and-policy-links",33),x.NdJ("goToTerms",(function(t){x.CHM(e);const n=x.oxw();return x.KtG(n.gotoTermsAndConditions(t))})),x.qZA()()()}if(2&e){const e=x.oxw();x.xp6(1),x.Q6J("color",e.data.styles.colors.title),x.xp6(2),x.Q6J("userId",e.userId)("lang",e.lang)("flowName",e.flowName)("data",e.data)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink)("firstSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.firstSentence)("secondSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.secondSentence)("thirdSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.thirdSentence)("policyActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.policyActionText)("termsActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.termsActionText)("customTerms",e.data[e.flowName].customTerms)}}function ke(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",34)(1,"belender-checkbox",35,36),x.NdJ("changeCheckbox",(function(t){x.CHM(e);const n=x.oxw();return x.KtG(n.setAssignment(t))})),x._UZ(3,"div",37),x.qZA()()}if(2&e){const e=x.oxw();x.xp6(1),x.Q6J("color",e.data.styles.colors.title),x.xp6(2),x.Q6J("innerHTML",e.data[e.flowName]&&e.data[e.flowName].texts&&e.data[e.flowName].texts.dataAssignmentText?e.data[e.flowName].texts.dataAssignmentText:null==e.data?null:e.data.config.dataAssignmentText,x.oJD)}}function Te(e,t){if(1&e&&(x.TgZ(0,"div",38),x._UZ(1,"mat-icon",39),x._uU(2),x.qZA()),2&e){const e=x.oxw();x.xp6(2),x.hij(" ",e.labels.warnings.haveToReadTerms," ")}}function Se(e,t){if(1&e&&(x.TgZ(0,"div",40),x._UZ(1,"mat-icon",39),x._uU(2),x.qZA()),2&e){const e=x.oxw();x.xp6(2),x.hij(" ",e.errorDNI," ")}}function Me(e,t){if(1&e&&(x.TgZ(0,"div",41)(1,"strong",42),x._uU(2),x.qZA(),x.TgZ(3,"span",43),x._uU(4),x.qZA()()),2&e){const e=x.oxw();x.xp6(2),x.Oqu(e.labels.warnings.wrongDate||"Error"),x.xp6(2),x.Oqu(e.dateError)}}function Ie(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"button",44),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.goBack())})),x._uU(1),x.qZA()}if(2&e){const e=x.oxw();x.Udp("border-radius",e.data.styles.btnRound+"px"),x.xp6(1),x.hij(" ",e.labels.actions.back," ")}}function Ee(e,t){if(1&e&&(x.TgZ(0,"div",45),x._UZ(1,"mat-progress-spinner",46),x.TgZ(2,"p",47),x._uU(3),x.qZA()()),2&e){const e=x.oxw();x.xp6(1),x.Q6J("value",0),x.xp6(2),x.hij(" ",e.loading," ")}}const Oe=function(e){return{"dont-show-data":e}},Le=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Pe=(()=>{class e{constructor(e,t,n,i,s,r,o,a,l,c){this.smsComponent=e,this.fb=t,this.utils=n,this.cd=i,this.widgetUtils=s,this.dialog=r,this.customService=o,this.smsFlowService=a,this.solicitudesService=l,this.customizationStoreService=c,this.editable_dates=!1,this.next=new x.vpe(null),this.goTerms=new x.vpe(null),this.goIntro=new x.vpe(null),this.acceptTerms=!1,this.assignment=!1,this.termsReaded=!1,this.isDni=!1,this.isNie=!1,this.errorDNI=null,this.disabledInputs={document_number:!1,birth_date:!1,email:!1,phone:!1},this.noValidate=!1,this.testMode=!0,this.lang="",this.hasDateError=!1,this.dateError=""}ngOnInit(){this.packId=this.customizationStoreService.PACK_ID,this.userId=this.customizationStoreService.USER_ID,this.smsFlowService.REQUEST?(this.noValidate="terms_and_conditions"==this.smsFlowService.REQUEST_STATUS,this.setForm(this.smsFlowService.REQUEST)):this.setForm(null)}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}setForm(e){let t=e?e.person_document_number||e.dni||e.document_number:null,n=e&&e.person_birth_date?ee()(e.person_birth_date).format("DD/MM/YYYY"):null,i=e&&e.birth_date?ee()(e.birth_date).format("DD/MM/YYYY"):n,s=e?e.person_phone||e.phone:null,r=e?e.person_email||e.email:null;t&&this.setRegex(t);const o=this;o.form=o.fb.group(o.data&&o.data.config&&o.data.config.followMail?{document_number:[t||null,o.noValidate?[]:[p.kI.required,p.kI.maxLength(9),o.regexDNI()]],birth_date:[i||null,o.noValidate?[]:[p.kI.required,(0,se.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],type:["DNI"],phone:[s||"",o.noValidate?[]:[p.kI.required,p.kI.maxLength(9),p.kI.minLength(9)]],email:[r||null,o.noValidate?[]:[p.kI.required,p.kI.email]],document_expiration:[null,[(0,se.s)({checkFormat:!0,checkDate:!0})]],support_number:[null]}:{document_number:[t||null,o.noValidate?[]:[p.kI.required,p.kI.maxLength(9),o.regexDNI()]],birth_date:[i||null,o.noValidate?[]:[p.kI.required,(0,se.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],type:["DNI"],phone:[s||"",o.noValidate?[]:[p.kI.required,p.kI.maxLength(9),p.kI.minLength(9)]],email:[r||null],document_expiration:[null,[(0,se.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],support_number:[null]}),this.form.markAsUntouched(),this.form.updateValueAndValidity(),o.requestIDFromURL&&o.disableEnableInputs(t,n,s,r)}forceEnableDisableInputs(e,t,n,i){this.disableEnableInputs(e?e.value:this.disabledInputs.document_number,t?t.value:this.disabledInputs.birth_date,n?n.value:this.disabledInputs.phone,i?i.value:this.disabledInputs.email)}disableEnableInputs(e,t,n,i){this.disabledInputs={document_number:e||!1,birth_date:!this.editable_dates&&(t||!1),email:i||!1,phone:n||!1}}regexDNI(){return e=>{const t=e.value;return t?(this.setRegex(t),this.isDni||this.isNie?null:{regexDNI:!0}):null}}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.termsReaded=!0,this.goTerms.emit(!0)}setRegex(e){if(!e)return;let t=this.widgetUtils.ValidateIDType(e);t&&t.type?("dni"===t.type?(this.isDni=!0,this.errorDNI=t.valid?null:"Debes ingresar un DNI válido!"):this.isDni=!1,"nie"===t.type?(this.isNie=!0,this.errorDNI=t.valid?null:"Debes ingresar un NIE válido!"):this.isNie=!1):(this.isDni=!1,this.isNie=!1,this.errorDNI="Debes ingresar un DNI o NIE válido!"),this.cd.markForCheck()}setTerms(e){this.acceptTerms=e}setAssignment(e){this.assignment=e}getIfValid(){return!!this.data.config.hideCheckLegal||this.acceptTerms}getFormsValid(){let e=!this.form.invalid,t=this.form.get("document_number").value;return t?this.setRegex(t):e=!1,!this.isDni&&!this.isNie&&(this.disabledInputs.document_number=!1,e=!1),this.errorDNI&&(e=!1),this.cd.markForCheck(),e}nextStep(){let e;e=this.data&&this.data.config&&this.data.config.followMail?{document_number:this.form.get("document_number").value.toUpperCase(),birth_date:this.utils.formatDate(this.form.get("birth_date").value),type:this.form.get("type").value,phone:this.form.get("phone").value,email_copy:this.form.get("email").value,check_legal:!0,document_expiration_date:this.form.get("document_expiration")?this.utils.formatDate(this.form.get("document_expiration").value):"2029-04-11"}:{document_number:this.form.get("document_number").value.toUpperCase(),birth_date:this.utils.formatDate(this.form.get("birth_date").value),type:this.form.get("type").value,phone:this.form.get("phone").value,check_legal:!0,email_copy:"roger.checa@belender.eu",document_expiration_date:this.form.get("document_expiration")?this.utils.formatDate(this.form.get("document_expiration").value):"2029-04-11"},"SMS"===this.flowName?this.gotoSmsTerms(e):this.next.emit(e)}getAssignmentValidation(){return!(this.data.config.forceChecks&&!this.termsReaded)&&(!this.data.config.dataAssignmentCheck||this.assignment)}goBack(){"SMS"===this.flowName?this.goSmsIntro():this.goIntro.emit(!0)}gotoSupportAclaration(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(ne.$,{panelClass:"fullscreen-dialog"})}gotoExpirationDate(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(ie.R,{panelClass:"fullscreen-dialog"})}gotoSmsTerms(e){this.smsFlowService.setLoading(this.labels.loadings.sendingData),e.package_id=this.packId,e.user_id=this.userId,this.requestID&&(e.request_id=this.requestID),this.skipCreationOfRequest?(this.smsComponent.acceptTerms(),this.smsFlowService.setSubscriptionOfRequest()):this.checkSmsService(e)}goSmsIntro(){this.smsComponent.manual=!1,this.smsComponent.introEnabled=!0}checkSmsService(e){this.hasDateError=!1,this.forceEnableDisableInputs({value:!0},{value:!0},{value:!0},{value:!0}),this.solicitudesService.checkService(e).then((t=>{t&&t.message&&t.status&&"error"==t.status?t.message.birth_date?(this.smsFlowService.setLoading(null),this.smsComponent.setRequestStatus("form"),this.hasDateError=!0,this.dateError=this.labels.warnings.wrongDate,this.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1})):"string"==typeof t.message&&" fecha de nacimiento incorrecta"==t.message.toLowerCase()?(this.smsFlowService.setLoading(null),this.smsComponent.setRequestStatus("form"),this.hasDateError=!0,this.dateError=this.labels.warnings.wrongDateDesc,this.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1})):"string"==typeof t.message&&"does not have sms service"==t.message.toLowerCase()?(this.smsFlowService.setLoading(this.labels.loadings.creatingRequest),e.user_id=this.userId,e.package_id=this.packId,this.requestID&&(e.request_id=this.requestID),this.solicitudesService.addSolicitud(e).then((e=>{e.data&&this.smsFlowService.updateRequestID(e.data.request_id),this.solicitudesService.setNoService({request_id:this.requestID}).then((()=>{this.smsFlowService.setLoading(null)})),this.smsComponent.setRequestStatus("no_service"),this.smsComponent.setStatus()}))):"string"==typeof t.message&&"birthdate incorrect"==t.message.toLowerCase()?(this.smsFlowService.setLoading(null),this.smsComponent.setRequestStatus("form"),this.hasDateError=!0,this.dateError=this.labels.warnings.wrongDateDesc,this.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1})):(this.smsComponent.setRequestStatus("form"),this.smsComponent.setStatus(),this.smsFlowService.setLoading(null)):t&&t.status&&"success"==t.status?this.smsComponent.addSolicitudSMS(e):(this.smsFlowService.setLoading(null),this.smsComponent.setRequestStatus("form"),this.smsComponent.setStatus(),this.dateError=t.message||t)})).catch((e=>{console.error(e),this.smsFlowService.setLoading(null),e.message&&"birthdate incorrect"==e.message.toLowerCase()&&(this.smsComponent.setRequestStatus("form"),this.hasDateError=!0,this.dateError=this.labels.warnings.wrongDateDesc)}))}}return e.ɵfac=function(t){return new(t||e)(x.Y36(z.T,9),x.Y36(p.QS),x.Y36(C.F),x.Y36(x.sBO),x.Y36(re.t),x.Y36(oe.uw),x.Y36(q.w),x.Y36(Y.p),x.Y36(_.M),x.Y36(B.r))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(x.Gf(de,5),x.Gf(ue,5)),2&e){let e;x.iGM(e=x.CRH())&&(t.checkComponent=e.first),x.iGM(e=x.CRH())&&(t.assignmentCheckComponent=e.first)}},inputs:{requestID:"requestID",data:"data",flowName:"flowName",texts:"texts",pinMode:"pinMode",requestIDFromURL:"requestIDFromURL",editable_dates:"editable_dates",skipCreationOfRequest:"skipCreationOfRequest",labels:"labels",lang:"lang"},outputs:{next:"nextStep",goTerms:"goToTerms",goIntro:"goIntro"},features:[x._Bn([{provide:te.sG,useValue:{parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}}}])],decls:37,vars:60,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between",3,"ngClass"],["appearance","outline"],["placeholder","Ej: 12312345R","formControlName","document_number","maxlength","9","matInput","",3,"tabindex"],[4,"ngIf"],["type","text","placeholder","Ej: 22/03/1990","formControlName","birth_date","matInput","","mask","d0/M0/0000",3,"tabindex"],["appearance","outline","class","w-full flex-1 belender-form-field",4,"ngIf"],["formControlName","phone","placeholder","Ej: 123123123","maxlength","9","type","text","matInput","",3,"tabindex"],["class","w-full",4,"ngIf"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["class","flex justify-start items-center w-full flex-100",4,"ngIf"],["class","mt-6 flex justify-start items-center w-full flex-100",4,"ngIf"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],["class","pl-3 pr-4 flex w-fit items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],["class","bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative","role","alert",4,"ngIf"],[1,"flex","items-center","gap-2","py-4","flex-col","md:flex-row",3,"ngClass"],["class","px-8 py-1 bg-slate-100 hover:bg-slate-200 text-slate-900 w-full max-w-none md:max-w-[220px]","mat-flat-button","","type","button",3,"border-radius","click",4,"ngIf"],["mat-flat-button","","type","button",1,"px-8","py-1","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],["class","loading-wrapper flex flex-col items-center animated fadeIn",4,"ngIf"],[3,"firstOption","logoUrl"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","text","placeholder","Ej: 22/03/1990","required","","formControlName","document_expiration","matInput","","mask","d0/M0/0000"],["target","_blank",1,"text-sm","hover:text-blue-500","cursor-pointer",3,"click"],["type","text","placeholder","22211134","required","","formControlName","support_number","matInput",""],[1,"w-full"],["formControlName","email","type","email","matInput","",3,"tabindex","placeholder"],[1,"flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","lang","flowName","data","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],[1,"mt-6","flex","justify-start","items-center","w-full","flex-100"],[3,"color","changeCheckbox"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"],[1,"pl-3","pr-4","flex","w-fit","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["role","alert",1,"bg-red-100","border","border-red-400","text-red-700","px-4","py-3","rounded","relative"],[1,"font-bold"],[1,"block","sm:inline"],["mat-flat-button","","type","button",1,"px-8","py-1","bg-slate-100","hover:bg-slate-200","text-slate-900","w-full","max-w-none","md:max-w-[220px]",3,"click"],[1,"loading-wrapper","flex","flex-col","items-center","animated","fadeIn"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){if(1&e&&(x.YNc(0,he,1,2,"belender-widget-logo",0),x.TgZ(1,"form",1)(2,"div",2),x._UZ(3,"div",3)(4,"div",4),x.ALo(5,"safeHtml"),x.qZA(),x.TgZ(6,"div",5)(7,"mat-form-field",6)(8,"mat-label"),x._uU(9),x.qZA(),x._UZ(10,"input",7),x.YNc(11,pe,2,1,"mat-error",8),x.qZA(),x.TgZ(12,"mat-form-field",6)(13,"mat-label"),x._uU(14),x.qZA(),x._UZ(15,"input",9),x.YNc(16,me,2,0,"mat-error",8),x.YNc(17,fe,2,0,"mat-error",8),x.YNc(18,ge,2,0,"mat-error",8),x.qZA(),x.YNc(19,ye,11,5,"mat-form-field",10),x.YNc(20,we,4,1,"mat-form-field",10),x.TgZ(21,"mat-form-field",6)(22,"mat-label"),x._uU(23),x.qZA(),x._UZ(24,"input",11),x.qZA(),x.YNc(25,xe,5,6,"div",12),x.qZA(),x.TgZ(26,"div",13),x.YNc(27,Ce,4,12,"div",14),x.YNc(28,ke,4,2,"div",15),x.YNc(29,Te,3,1,"div",16),x.YNc(30,Se,3,1,"div",17),x.qZA(),x.YNc(31,Me,5,2,"div",18),x.TgZ(32,"div",19),x.YNc(33,Ie,2,3,"button",20),x.TgZ(34,"button",21),x.NdJ("click",(function(){return t.nextStep()})),x._uU(35),x.qZA()()(),x.YNc(36,Ee,4,2,"div",22)),2&e){let e,n,i;x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(1),x.Gre("animated ",t.loading?"hide-content":""," fadeIn fixed-content px-2"),x.Q6J("formGroup",t.form),x.xp6(2),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.Q6J("innerHTML",t.texts.form.title,x.oJD),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(5,52,t.texts.form.description||""),x.oJD),x.xp6(2),x.Q6J("ngClass",x.VKq(54,Oe,t.data.config.dontShowDataInTerms&&t.smsFlowService.REQUEST&&t.smsFlowService.REQUEST_STATUS&&"terms_and_conditions"===t.smsFlowService.REQUEST_STATUS)),x.xp6(1),x.Gre("",t.disabledInputs.document_number?"disabled-input":""," w-full flex-1 belender-form-field"),x.xp6(2),x.Oqu(t.isDni?t.labels.dni:t.isNie?t.labels.nie:t.labels.nieOrDni),x.xp6(1),x.s9C("tabindex",t.disabledInputs.document_number?-1:1),x.xp6(1),x.Q6J("ngIf",t.errorDNI),x.xp6(1),x.Gre("",t.disabledInputs.birth_date?"disabled-input":""," w-full flex-1 belender-form-field"),x.xp6(2),x.Oqu(t.labels.birthday),x.xp6(1),x.s9C("tabindex",t.disabledInputs.birth_date?-1:1),x.xp6(1),x.Q6J("ngIf",null==(e=t.form.get("birth_date"))?null:e.hasError("invalidFormat")),x.xp6(1),x.Q6J("ngIf",null==(n=t.form.get("birth_date"))?null:n.hasError("invalidDate")),x.xp6(1),x.Q6J("ngIf",null==(i=t.form.get("birth_date"))?null:i.hasError("underAge")),x.xp6(1),x.Q6J("ngIf",t.pinMode&&!t.isNie),x.xp6(1),x.Q6J("ngIf",t.pinMode&&t.isNie),x.xp6(1),x.Gre("",t.disabledInputs.phone?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),x.xp6(2),x.Oqu(t.labels.phone),x.xp6(1),x.s9C("tabindex",t.disabledInputs.phone?-1:1),x.xp6(1),x.Q6J("ngIf",null==t.data||null==t.data.config?null:t.data.config.followMail),x.xp6(2),x.Q6J("ngIf",!t.data.config.hideCheckLegal),x.xp6(1),x.Q6J("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),x.xp6(1),x.Q6J("ngIf",t.data.config.forceChecks&&!t.termsReaded),x.xp6(1),x.Q6J("ngIf",t.errorDNI),x.xp6(1),x.Q6J("ngIf",t.hasDateError),x.xp6(1),x.Q6J("ngClass",x.kEZ(56,Le,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Q6J("ngIf",t.data.config.introEnabled),x.xp6(1),x.Udp("color",t.getFormsValid()&&t.getAssignmentValidation()&&t.getIfValid()?t.data.styles.colors.btnText:"")("background",t.getFormsValid()&&t.getAssignmentValidation()&&t.getIfValid()?t.data.styles.colors.btnBg:"")("border-radius",t.data.styles.btnRound+"px"),x.Q6J("disabled",!t.getFormsValid()||!t.getAssignmentValidation()||!t.getIfValid()),x.xp6(1),x.hij(" ",t.labels.actions.continue," "),x.xp6(1),x.Q6J("ngIf",t.loading)}},dependencies:[i.mk,i.O5,d.Hw,u.lW,R.TO,R.KE,R.bx,R.hX,N.Nt,p._Y,p.Fj,p.JJ,p.JL,p.Q7,p.nD,p.sg,p.u,y.Ou,ae.b,T.X,le.T,ce.Z6,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}.hide-content[_ngcontent-%COMP%]{opacity:0!important;max-height:0px!important;overflow:hidden!important;padding:0!important}"]}),e})();var De=n(9602),Ae=n(6257),Ne=n(1948),qe=n(9299);const Ye=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Re=(()=>{class e{constructor(e,t,n,i,s,r,o){this.smsComponent=e,this.fb=t,this.utils=n,this.Activatedroute=i,this.smsFlowService=s,this.solicitudesService=r,this.cd=o,this.next=new x.vpe(null),this.loading=null,this.accept=!1}ngOnInit(){this.Activatedroute.queryParams.subscribe((e=>{this.setForm(e)}))}nextStep(){let e={phone:this.form.get("phone").value};"SMS"===this.flowName?this.sendSmsNewData(e):this.next.emit(e)}setForm(e){this.form=this.fb.group({phone:["",p.kI.required]}),this.smsFlowService.REQUEST&&"bad_phone"==this.smsFlowService.REQUEST_STATUS&&this.form.controls.phone.markAsTouched()}sendSmsNewData(e){this.smsFlowService.setLoading(this.labels.loadings.sendingData),this.solicitudesService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.smsComponent.showAlert("Error!",e.message,"error"),this.smsFlowService.setLoading(!1)):e&&"success"==e.status&&(this.smsFlowService.sendMessageToParent({type:"response",data:e.data||e}),this.smsFlowService.setLoading(this.labels.loadings.validatingData),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.smsComponent.showAlert("Error!",e.error),this.smsFlowService.setLoading(!1)}))}}return e.ɵfac=function(t){return new(t||e)(x.Y36(z.T,9),x.Y36(p.QS),x.Y36(C.F),x.Y36(qe.gz),x.Y36(Y.p),x.Y36(_.M),x.Y36(x.sBO))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-error-form-step"]],inputs:{requestID:"requestID",data:"data",flowName:"flowName",texts:"texts",mode:"mode",loading:"loading",labels:"labels"},outputs:{next:"nextStep"},decls:14,vars:23,consts:[[1,"animated","fadeIn","fixed-content",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"mb-4","w-full","flex-1"],["formControlName","phone","matInput",""],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(x.TgZ(0,"form",0)(1,"div",1)(2,"div",2),x._uU(3),x.qZA(),x.TgZ(4,"div",3),x._uU(5),x.qZA()(),x.TgZ(6,"div",4)(7,"mat-form-field",5)(8,"mat-label"),x._uU(9),x.qZA(),x._UZ(10,"input",6),x.qZA()(),x.TgZ(11,"div",7)(12,"button",8),x.NdJ("click",(function(){return t.nextStep()})),x._uU(13),x.qZA()()()),2&e&&(x.Q6J("formGroup",t.form),x.xp6(2),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.xp6(1),x.Oqu(t.labels.warnings.phoneError),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.xp6(1),x.Oqu(t.labels.warnings.badPhoneSS),x.xp6(4),x.Oqu(t.labels.phone),x.xp6(2),x.Q6J("ngClass",x.kEZ(19,Ye,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),x.Q6J("disabled",t.form.invalid),x.xp6(1),x.Oqu(t.labels.actions.continue))},dependencies:[i.mk,u.lW,R.KE,R.hX,N.Nt,p._Y,p.Fj,p.JJ,p.JL,p.sg,p.u],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Fe=n(6e3);const Ue=[{path:":idUser",component:z.T},{path:":idUser/:packID",component:z.T}];let Ze=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=x.oAB({type:e}),e.ɵinj=x.cJS({imports:[qe.Bz.forChild(Ue),qe.Bz,Fe.d8]}),e})();function He(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",5),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.noService.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let je=(()=>{class e{constructor(){this.loading=null}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},decls:6,vars:11,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(x.YNc(0,He,1,2,"belender-widget-logo",0),x.TgZ(1,"form",1)(2,"div",2),x._UZ(3,"div",3)(4,"div",4),x.ALo(5,"safeHtml"),x.qZA()()),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(3),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.Q6J("innerHTML",t.texts.noService.title,x.oJD),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(5,9,t.texts.noService.description),x.oJD))},dependencies:[i.O5,p._Y,p.JL,p.F,T.X,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function ze(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",8),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.abandoned.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const Be=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Je=(()=>{class e{constructor(e,t,n,i,s,r,o,a){this.smsComponent=e,this.fb=t,this.utils=n,this.solicitudesService=i,this.attachmentsService=s,this.notifications=r,this.smsFlowService=o,this.customizationStoreService=a,this.retryOp=new x.vpe(null),this.loading=null}ngOnInit(){}save(){}retry(){"SMS"===this.flowType?this.retrySmsRequest(this.smsFlowService.REQUEST.request_id):this.retryOp.emit(this.smsFlowService.REQUEST.request_id)}getTextStatus(){switch(this.smsFlowService.REQUEST_STATUS){case"abandoned_after_waiting_otp_seguridad_social":return this.labels.abandoned.afterWaitingOtpSS;case"abandoned_after_invalid_otp_seguridad_social":return this.labels.abandoned.afterInvalidOtpSS;case"abandoned_after_invalid_otp_aeat":return this.labels.abandoned.afterInvalidOtpAEAT;case"abandoned_after_waiting_otp_aeat":return this.labels.abandoned.afterWaitingOtpAEAT;default:return this.smsFlowService.REQUEST.status_message||this.smsFlowService.REQUEST_STATUS}}retrySmsRequest(e){let t={request_id:(this.smsFlowService.REQUEST&&this.smsFlowService.REQUEST.request_id?this.smsFlowService.REQUEST.request_id:this.requestID)||e,user_id:this.customizationStoreService.USER_ID};this.smsFlowService.setLoading(this.labels.loadings.resendingRequest),this.smsFlowService.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.smsFlowService.setRequest(e.data),this.smsComponent.setStatus()),this.smsFlowService.setLoading(!1)})).catch((e=>{console.error(e),this.smsComponent.showAlert("Error!",e.message||e),this.smsFlowService.setLoading(!1)}))}}return e.ɵfac=function(t){return new(t||e)(x.Y36(z.T,9),x.Y36(p.QS),x.Y36(C.F),x.Y36(_.M),x.Y36(v.o),x.Y36(k.T),x.Y36(Y.p),x.Y36(B.r))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-abandoned-step"]],inputs:{flowType:"flowType",requestID:"requestID",loading:"loading",labels:"labels",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:11,vars:24,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(x.YNc(0,ze,1,2,"belender-widget-logo",0),x.TgZ(1,"div",1)(2,"div",2),x._UZ(3,"div",3)(4,"div",4),x.ALo(5,"safeHtml"),x.TgZ(6,"div",5),x._uU(7),x.qZA()(),x.TgZ(8,"div",6)(9,"button",7),x.NdJ("click",(function(){return t.retry()})),x._uU(10),x.qZA()()()),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(3),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.Q6J("innerHTML",t.texts.abandoned.title,x.oJD),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(5,18,t.texts.abandoned.description),x.oJD),x.xp6(3),x.hij(" ",t.getTextStatus()," "),x.xp6(1),x.Q6J("ngClass",x.kEZ(20,Be,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),x.xp6(1),x.Oqu(t.labels.actions.retry))},dependencies:[i.mk,i.O5,u.lW,T.X,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Ve=n(6981),Qe=n(5145);function We(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",10),2&e){const e=x.oxw();x.Q6J("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const Ge=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let $e=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.nr=new x.vpe(null),this.loading=null}ngOnInit(){}newRequest(){this.nr.emit(!0)}gotoRequest(){location.assign(this.currentRequest.widget_url_boxed)}getStatus(){let e=Qe.Z.find((e=>e.text==this.currentRequest.status_code));return e?e.label:this.labels.unknownState}}return e.ɵfac=function(t){return new(t||e)(x.Y36(p.QS),x.Y36(C.F),x.Y36(_.M),x.Y36(v.o),x.Y36(k.T))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-duplicated-request-step"]],inputs:{currentRequest:"currentRequest",loading:"loading",data:"data",texts:"texts",labels:"labels"},outputs:{nr:"newRequest"},decls:16,vars:26,consts:[[3,"logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"flex","gap-2","justify-start","items-center","py-2"],[1,"w-fit","p-1","px-2","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"],[3,"logoUrl"]],template:function(e,t){1&e&&(x.YNc(0,We,1,1,"belender-widget-logo",0),x.TgZ(1,"div",1)(2,"div",2)(3,"div",3),x._uU(4),x.qZA(),x.TgZ(5,"div",4),x._uU(6),x.qZA(),x.TgZ(7,"div",5),x._uU(8),x.TgZ(9,"div",6),x._uU(10),x.qZA()()(),x.TgZ(11,"div",7)(12,"button",8),x.NdJ("click",(function(){return t.newRequest()})),x._uU(13),x.qZA(),x.TgZ(14,"button",9),x.NdJ("click",(function(){return t.gotoRequest()})),x._uU(15),x.qZA()()()),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(3),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.xp6(1),x.hij(" ",t.labels.warnings.duplicatedRequest," "),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.xp6(1),x.hij(" ",t.labels.warnings.alreadyHaveRequest," "),x.xp6(2),x.hij(" ",t.labels.warnings.currentRequestStatus," "),x.xp6(2),x.hij(" ",t.getStatus()," "),x.xp6(1),x.Q6J("ngClass",x.kEZ(22,Ge,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Udp("border-radius",t.data.styles.btnRound+"px"),x.xp6(1),x.hij(" ",t.labels.actions.newRequest," "),x.xp6(1),x.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),x.xp6(1),x.hij(" ",t.labels.actions.gotoCurrentRequest," "))},dependencies:[i.mk,i.O5,u.lW,T.X],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Ke=n(1129),Xe=n(9476),et=n(8962),tt=n(3468),nt=n(3295);function it(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",5),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.standby.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let st=(()=>{class e{constructor(){this.loading=null}ngOnInit(){console.error(this.data,this.texts)}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-standby-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},decls:6,vars:11,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(x.YNc(0,it,1,2,"belender-widget-logo",0),x.TgZ(1,"form",1)(2,"div",2),x._UZ(3,"div",3)(4,"div",4),x.ALo(5,"safeHtml"),x.qZA()()),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(3),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.standby?t.texts.standby.titleSize+"px":"20px"),x.Q6J("innerHTML",t.texts.standby?t.texts.standby.title:"Solicitud en Stand By",x.oJD),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.Q6J("innerHTML",t.texts.standby?t.texts.standby.description:x.lcZ(5,9,"Descripcion del estado Stand By"),x.oJD))},dependencies:[i.O5,p._Y,p.JL,p.F,T.X,M.z]}),e})();const rt=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let ot=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new x.vpe(null)}ngOnInit(){this.form=this.fb.group({birth_date:[null,[p.kI.required]]})}next(){this.nextStep.emit(this.form.get("birth_date").value)}}return e.ɵfac=function(t){return new(t||e)(x.Y36(p.QS),x.Y36(C.F))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-error-birthday-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:16,vars:23,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1"],["type","text","placeholder","Ej: 22/03/1990","required","","formControlName","birth_date","matInput","","mask","d0/M0/0000"],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(x.TgZ(0,"div",0)(1,"div",1)(2,"div",2),x._uU(3),x.qZA(),x.TgZ(4,"div",3),x._uU(5),x.qZA(),x.TgZ(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),x._uU(9),x.qZA(),x._UZ(10,"input",6),x.TgZ(11,"mat-hint"),x._uU(12,"DD/MM/YYYY"),x.qZA()()()(),x.TgZ(13,"div",7)(14,"button",8),x.NdJ("click",(function(){return t.next()})),x._uU(15),x.qZA()()()),2&e&&(x.xp6(2),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.xp6(1),x.hij(" ",t.labels.warnings.wrongBirthday," "),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.xp6(1),x.hij(" ",t.labels.warnings.inputBirthDay," "),x.xp6(1),x.Q6J("formGroup",t.form),x.xp6(3),x.Oqu(t.labels.birthday),x.xp6(4),x.Q6J("ngClass",x.kEZ(19,rt,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),x.Q6J("disabled",t.form.invalid),x.xp6(1),x.hij(" ",t.labels.send," "))},dependencies:[i.mk,u.lW,R.KE,R.bx,R.hX,N.Nt,p._Y,p.Fj,p.JJ,p.JL,p.Q7,p.sg,p.u,ce.Z6],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const at=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let lt=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new x.vpe(null)}ngOnInit(){this.form=this.fb.group({support_number:[null,[p.kI.required]]})}next(){this.nextStep.emit(this.form.get("support_number").value)}}return e.ɵfac=function(t){return new(t||e)(x.Y36(p.QS),x.Y36(C.F))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-error-support-number-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:14,vars:23,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1"],["type","number","placeholder","Ej: 1233443","required","","formControlName","support_number","matInput",""],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(x.TgZ(0,"div",0)(1,"div",1)(2,"div",2),x._uU(3),x.qZA(),x.TgZ(4,"div",3),x._uU(5),x.qZA(),x.TgZ(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),x._uU(9),x.qZA(),x._UZ(10,"input",6),x.qZA()()(),x.TgZ(11,"div",7)(12,"button",8),x.NdJ("click",(function(){return t.next()})),x._uU(13),x.qZA()()()),2&e&&(x.xp6(2),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.xp6(1),x.hij(" ",t.labels.warnings.wrongSupport," "),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.xp6(1),x.hij(" ",t.labels.warnings.inputSupport," "),x.xp6(1),x.Q6J("formGroup",t.form),x.xp6(3),x.Oqu(t.labels.support),x.xp6(2),x.Q6J("ngClass",x.kEZ(19,at,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),x.Q6J("disabled",t.form.invalid),x.xp6(1),x.hij(" ",t.labels.send," "))},dependencies:[i.mk,u.lW,R.KE,R.hX,N.Nt,p._Y,p.Fj,p.wV,p.JJ,p.JL,p.Q7,p.sg,p.u],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const ct=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let dt=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new x.vpe(null)}ngOnInit(){this.form=this.fb.group({document_expiration_date:[null,[p.kI.required]]})}next(){this.nextStep.emit(this.form.get("document_expiration_date").value)}}return e.ɵfac=function(t){return new(t||e)(x.Y36(p.QS),x.Y36(C.F))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-error-expiration-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:16,vars:23,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1"],["type","date","placeholder","Ej: 22/03/1990","required","","formControlName","document_expiration_date","matInput",""],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-button","","type","button",1,"px-8",3,"disabled","click"]],template:function(e,t){1&e&&(x.TgZ(0,"div",0)(1,"div",1)(2,"div",2),x._uU(3),x.qZA(),x.TgZ(4,"div",3),x._uU(5),x.qZA(),x.TgZ(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),x._uU(9),x.qZA(),x._UZ(10,"input",6),x.TgZ(11,"mat-hint"),x._uU(12,"DD/MM/YYYY"),x.qZA()()()(),x.TgZ(13,"div",7)(14,"button",8),x.NdJ("click",(function(){return t.next()})),x._uU(15),x.qZA()()()),2&e&&(x.xp6(2),x.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),x.xp6(1),x.hij(" ",t.labels.warnings.wrongExpiration," "),x.xp6(1),x.Udp("color",t.data.styles.colors.text),x.xp6(1),x.hij(" ",t.labels.warnings.inputExpiration," "),x.xp6(1),x.Q6J("formGroup",t.form),x.xp6(3),x.Oqu(t.labels.expiration),x.xp6(4),x.Q6J("ngClass",x.kEZ(19,ct,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),x.xp6(1),x.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),x.Q6J("disabled",t.form.invalid),x.xp6(1),x.Oqu(t.labels.send))},dependencies:[i.mk,u.lW,R.KE,R.bx,R.hX,N.Nt,p._Y,p.Fj,p.JJ,p.JL,p.Q7,p.sg,p.u],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function ut(e,t){if(1&e&&x._UZ(0,"belender-widget-logo",5),2&e){const e=x.oxw();x.Q6J("firstOption",e.texts.noPhone.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function ht(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"mat-form-field",12)(1,"mat-label"),x._uU(2),x.qZA(),x._UZ(3,"input",13),x.TgZ(4,"mat-hint")(5,"a",14),x.NdJ("click",(function(t){x.CHM(e);const n=x.oxw(2);return x.KtG(n.gotoExpirationDate(t))})),x.TgZ(6,"u"),x._uU(7),x.qZA()()()()}if(2&e){const e=x.oxw(2);x.xp6(2),x.Oqu(e.labels.expiration),x.xp6(5),x.Oqu(e.labels.findExpiration)}}function pt(e,t){if(1&e&&(x.TgZ(0,"mat-form-field",15)(1,"mat-label"),x._uU(2),x.qZA(),x._UZ(3,"input",16),x.qZA()),2&e){const e=x.oxw(2);x.xp6(2),x.Oqu(e.labels.support)}}function mt(e,t){if(1&e&&(x.TgZ(0,"div",6),x._UZ(1,"div",7)(2,"div",8),x.ALo(3,"safeHtml"),x._UZ(4,"br"),x.TgZ(5,"form",9),x.YNc(6,ht,8,2,"mat-form-field",10),x.YNc(7,pt,4,1,"mat-form-field",11),x.qZA()()),2&e){const e=x.oxw();x.xp6(1),x.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),x.Q6J("innerHTML",null==e.texts.noPhone?null:e.texts.noPhone.title,x.oJD),x.xp6(1),x.Udp("color",e.data.styles.colors.text),x.Q6J("innerHTML",x.lcZ(3,11,e.texts.noPhone.description),x.oJD),x.xp6(3),x.Q6J("formGroup",e.form),x.xp6(1),x.Q6J("ngIf",e.isDni),x.xp6(1),x.Q6J("ngIf",e.isNie)}}const ft=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function gt(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"div",17)(1,"button",18),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.next())})),x._uU(2),x.qZA()()}if(2&e){const e=x.oxw();x.Q6J("ngClass",x.kEZ(9,ft,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),x.xp6(1),x.Udp("color",e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),x.Q6J("disabled",e.form.invalid),x.xp6(1),x.hij(" ",e.labels.actions.next," ")}}function _t(e,t){if(1&e&&(x.TgZ(0,"div",19),x._uU(1),x.qZA()),2&e){const e=x.oxw();x.xp6(1),x.hij(" ",e.labels.loadings.gettingData," ")}}let bt=(()=>{class e{constructor(e,t,n,i,s,r,o){this.smsComponent=e,this.fb=t,this.utils=n,this.cd=i,this.dialog=s,this.smsFlowService=r,this.solicitudesService=o,this.loading=null,this.answered=!1,this.nextStep=new x.vpe(null),this.isNie=!1,this.isDni=!1}ngOnInit(){console.warn(this.smsFlowService.REQUEST),this.loading=!0,this.checkIfDniOrNie(),this.isDni&&(this.form=this.fb.group({document_expiration_date:[null,p.kI.required]})),this.isNie&&(this.form=this.fb.group({document_support:[null,p.kI.required]})),this.loading=!1}checkIfDniOrNie(){this.setRegex(this.smsFlowService.REQUEST.person_document_number)}setRegex(e){e&&(this.isDni=!!e.toUpperCase().match(/^(\d{8})([A-Z])$/),this.isNie=!!e.toUpperCase().match(/^[XYZ]\d{7,8}[A-Z]$/),this.cd.markForCheck())}next(){let e={};this.isDni?e.document_expiration_date=this.utils.formatDate(this.form.get("document_expiration_date").value):this.isNie&&(e.document_support=this.form.get("document_support").value),"SMS"===this.flowName?this.sendSmsDataToPin(e):this.nextStep.emit(e)}gotoSupportAclaration(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(ne.$,{panelClass:"fullscreen-dialog"})}gotoExpirationDate(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(ie.R,{panelClass:"fullscreen-dialog"})}sendSmsDataToPin(e){e.request_id=this.smsFlowService.REQUEST.request_id,this.smsFlowService.setLoading(this.labels.loadings.sendingData),this.solicitudesService.smsToPin(e).then((e=>{e&&e.status&&"success"===e.status&&this.smsComponent.gotoClavePinUrl(e.data),e&&e.status&&"error"===e.status&&(e.message?"Does not have Pin service"==e.message?this.smsComponent.setRequestStatus("no-service"):this.smsComponent.showAlert("Error!",e.message):this.smsComponent.showAlert("Error!",e),this.smsFlowService.setLoading(null))})).catch((e=>{console.error(e),this.smsComponent.showAlert("Error!",e.message||e),this.smsFlowService.setLoading(null)}))}}return e.ɵfac=function(t){return new(t||e)(x.Y36(z.T,9),x.Y36(p.QS),x.Y36(C.F),x.Y36(x.sBO),x.Y36(oe.uw),x.Y36(Y.p),x.Y36(_.M))},e.ɵcmp=x.Xpm({type:e,selectors:[["belender-no-phone-step"]],inputs:{flowName:"flowName",data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:5,vars:4,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],["class","py-4 flex flex-col",4,"ngIf"],["class","flex items-center gap-2 p-4",3,"ngClass",4,"ngIf"],["class","w-full flex justify-center p-4 items-center",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"w-full",3,"formGroup"],["appearance","outline","class","w-full flex-1 belender-form-field",4,"ngIf"],["appearance","outline","class","mb-4 w-full md:max-w-[500px]",4,"ngIf"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","text","placeholder","Ej: 22/03/2030","formControlName","document_expiration_date","matInput","","mask","d0/M0/0000"],["target","_blank",1,"text-sm","hover:text-blue-500","cursor-pointer",3,"click"],["appearance","outline",1,"mb-4","w-full","md:max-w-[500px]"],["formControlName","document_support","matInput",""],[1,"flex","items-center","gap-2","p-4",3,"ngClass"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"w-full","flex","justify-center","p-4","items-center"]],template:function(e,t){1&e&&(x.YNc(0,ut,1,2,"belender-widget-logo",0),x.TgZ(1,"div",1),x.YNc(2,mt,8,13,"div",2),x.YNc(3,gt,3,13,"div",3),x.YNc(4,_t,2,1,"div",4),x.qZA()),2&e&&(x.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),x.xp6(2),x.Q6J("ngIf",(t.isDni||t.isNie)&&!t.loading),x.xp6(1),x.Q6J("ngIf",(t.isDni||t.isNie)&&!t.loading),x.xp6(1),x.Q6J("ngIf",!t.isDni&&!t.isNie||t.loading))},dependencies:[i.mk,i.O5,u.lW,R.KE,R.bx,R.hX,N.Nt,p._Y,p.Fj,p.JJ,p.JL,p.sg,p.u,T.X,ce.Z6,M.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var vt=n(3300),yt=n(865),wt=n(3033),xt=n(7582),Ct=n(9933),kt=n(667);const Tt=["formStep"];function St(e,t){if(1&e&&(x.TgZ(0,"mat-option",8),x._uU(1),x.qZA()),2&e){const e=t.$implicit;x.s9C("value",e),x.xp6(1),x.Oqu(e)}}function Mt(e,t){if(1&e){const e=x.EpF();x.ynx(0),x.TgZ(1,"mat-form-field",5)(2,"mat-label"),x._uU(3,"Estado"),x.qZA(),x.TgZ(4,"mat-select",6),x.NdJ("selectionChange",(function(t){const n=x.CHM(e).index,i=x.oxw();return x.KtG(i.setItemSelected(t,n))})),x.YNc(5,St,2,2,"mat-option",7),x.qZA()(),x.BQk()}if(2&e){const e=t.$implicit,n=t.index,i=x.oxw();x.xp6(1),x.Gre(" w-full ",n===i.triggerObject.index-1?"!border-t-2 border-green-500 ":"",""),x.xp6(3),x.Q6J("value",e),x.xp6(1),x.Q6J("ngForOf",i.items)}}function It(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"button",9),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.initTrigger())})),x._uU(1,"Empezar"),x.qZA()}}function Et(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"button",9),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.initTrigger())})),x._uU(1,"Continuar"),x.qZA()}}function Ot(e,t){if(1&e){const e=x.EpF();x.TgZ(0,"button",9),x.NdJ("click",(function(){x.CHM(e);const t=x.oxw();return x.KtG(t.initTriggerFromZero())})),x._uU(1,"Volver a empezar"),x.qZA()}}let Lt=class{constructor(e,t){this.cd=e,this.utils=t,this.sendMessage=new x.vpe,this.requestedToPin=!1,this.items=["created","form","terms_and_conditions","waiting_otp_seguridad_social","waiting_login_seguridad_social","invalid_otp_seguridad_social","abandoned_after_bad_phone","abandoned_after_invalid_otp_seguridad_social","abandoned_after_terms_and_conditions","abandoned_after_waiting_otp_seguridad_social","all_documents_downloaded","partial_documents_downloaded","consent_process_completed","partial_documents_downloaded_and_deleted","all_documents_downloaded_and_deleted","failed_with_retry","failed_without_retry","failed_documents_downloaded","no_service","no_sms_service","stand_by","no-phone","no-more-phone","bad_phone","error_expiration_date","error_birth_date","error_support_number","duplicated"],this.triggerObject={index:0,items:["form","waiting_otp_seguridad_social","all_documents_downloaded"]}}ngOnInit(){}setItemSelected(e,t){console.warn(e,t),this.triggerObject.items[t]=e.value,console.warn(this.triggerObject)}initTrigger(){this.emitMessage(this.triggerObject.items[this.triggerObject.index]),this.triggerObject.index++}initTriggerFromZero(){this.triggerObject.index=0,this.initTrigger()}emitMessage(e){let t={status_code:e};console.log(t),this.sendMessage.emit(t)}closeInterval(){this.int&&clearInterval(this.int),this.triggerObject.index=0}addState(){this.triggerObject.items.push("")}};Lt.ɵfac=function(e){return new(e||Lt)(x.Y36(x.sBO),x.Y36(C.F))},Lt.ɵcmp=x.Xpm({type:Lt,selectors:[["belender-tester-sms"]],viewQuery:function(e,t){if(1&e&&x.Gf(Tt,5),2&e){let e;x.iGM(e=x.CRH())&&(t.theDiv=e.first)}},outputs:{sendMessage:"sendMessage"},decls:9,vars:4,consts:[[1,"wrapper","flex","flex-col","justify-between","bg-slate-100","w-[200px]","h-full","p-2","gap-0"],[1,"flex","flex-col","h-full","dd-wrapper"],[4,"ngFor","ngForOf"],["mat-button","",1,"w-full","rounded-md",3,"click"],["mat-raised-button","","class","w-full rounded-md bg-blue-500 text-blue-50",3,"click",4,"ngIf"],["appearance","outline"],[1,"border",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["mat-raised-button","",1,"w-full","rounded-md","bg-blue-500","text-blue-50",3,"click"]],template:function(e,t){1&e&&(x.TgZ(0,"div",0)(1,"div",1),x.YNc(2,Mt,6,5,"ng-container",2),x.TgZ(3,"button",3),x.NdJ("click",(function(){return t.addState()})),x._uU(4,"Agregar estado"),x.qZA()(),x.TgZ(5,"div"),x.YNc(6,It,2,0,"button",4),x.YNc(7,Et,2,0,"button",4),x.YNc(8,Ot,2,0,"button",4),x.qZA()()),2&e&&(x.xp6(2),x.Q6J("ngForOf",t.triggerObject.items),x.xp6(4),x.Q6J("ngIf",!t.triggerObject.index||0==t.triggerObject.index),x.xp6(1),x.Q6J("ngIf",t.triggerObject.index&&t.triggerObject.index<t.triggerObject.items.length),x.xp6(1),x.Q6J("ngIf",t.triggerObject.index&&t.triggerObject.index>=t.triggerObject.items.length))},dependencies:[i.sg,i.O5,u.lW,R.KE,R.hX,f.gD,te.ey],styles:[".wrapper[_ngcontent-%COMP%]{position:fixed;top:0;right:0;box-shadow:-10px 20px 30px #0000004d;z-index:99!important;max-height:100vh}.dd-wrapper[_ngcontent-%COMP%]{max-height:calc(100vh - 70px)!important;overflow:auto}"],data:{animation:[kt.$]}}),Lt=(0,xt.gn)([(0,Ct.c)()],Lt);var Pt=n(3364),Dt=n(1760),At=n(6830),Nt=n(4302),qt=n(9112),Yt=n(9382);let Rt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=x.oAB({type:e}),e.ɵinj=x.cJS({providers:[_.M,v.o,q.w,w.t,k.T,re.t,{provide:te.Ad,useValue:"es-ES"}],imports:[Ze,i.ez,s.G,r.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,N.c,p.u5,m.AV,p.UX,f.LD,g.vV,b.a,y.Cq,De.FA,te.XK,Ae.T5,Ne.Fk,Ve.x,Ke.n,Xe.F,et.A,tt.f,nt.g,vt.C,yt.q,wt.d]}),e})();x.B6R(z.T,[i.O5,d.Hw,u.lW,y.Ou,Pt.R,Dt.u,At.L,Nt.q,qt.y,Yt.i,A,j,K,Pe,Re,je,Je,$e,st,ot,lt,dt,bt,Lt],[M.z])},1724:(e,t,n)=>{n.r(t),n.d(t,{VideoIdModule:()=>kt});var i=n(6895),s=n(6383),r=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),b=n(3798),v=n(9391),y=n(1572),w=n(182),x=n(4144),C=n(7367),k=n(9602),T=n(3238),S=n(5895),M=n(6257),I=n(1948),E=n(4246),O=n(9299),L=n(6e3),P=n(5861),D=n(7582),A=n(9549),N=n(9933),q=n(5762),Y=n(8259),R=n(2340),F=n(1363),U=n(4650),Z=n(5089),H=n(529),j=n(6554);let z=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getSolicitudes(){return this.localFetch.getFetch(R.N.baseUrl+"/requests")}getSolicitudByCode(e){return this.localFetch.freeGetFetch(R.N.baseUrl+"/requests/"+e)}setState(e,t){let n={request_id:e,status:t};return new Promise(((e,t)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/videoid/status",n).then((n=>{n?e(n):t(n)})).catch((e=>{console.error("addSolicitud",e),t(e)}))}))}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/videoid",e).then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/videoid/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendPassword(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/videoid/password",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}getNewIdOfRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/"+e+"/get-new-id",{}).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}checkService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/sms/check-service",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}retryRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/sms/retry",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}resendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/sms/resend-otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}fixData(e,t){return new Promise(((n,i)=>{this.localFetch.putFetchWhitoutToken(`${R.N.baseUrl}/requests/${e}/person`,t).then((e=>{e?n(e):i(e)})).catch((e=>{i(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(R.N.baseUrl+"/requests/videoid/otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendLinkBySms(e,t){return new Promise(((n,i)=>{this.localFetch.postFetch(`${R.N.baseUrl}/requests/${e}/send-link-sms`,t).then((e=>{e?n(e):i(e)})).catch((e=>{i(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(U.LFG(Z.F),U.LFG(H.eN),U.LFG(j.r))},e.ɵprov=U.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var B=n(8460),J=n(5412),V=n(6830),Q=n(833),W=n(4302),G=n(3731);function $(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.hij("¿No has recibido el código? Solicítalo de nuevo en ",e.secsCount," segundos")}}function K(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.AsE("¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? Solicítalo de nuevo en ",e.secsCount," segundos")}}function X(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.hij("¿No has recibido el código en tu teléfono? Solicítalo de nuevo en ",e.secsCount," segundos")}}const ee=function(e,t,n){return{color:e,border:t,background:n}};function te(e,t){if(1&e&&(U.ynx(0),U.TgZ(1,"small",11),U.YNc(2,$,2,1,"span",5),U.YNc(3,K,2,2,"span",5),U.YNc(4,X,2,1,"span",5),U.qZA(),U.BQk()),2&e){const e=U.oxw();U.xp6(1),U.Q6J("ngStyle",U.kEZ(4,ee,e.data.styles.colors.accentColor,"1px solid "+e.data.styles.colors.accentColor,e.data.styles.colors.accentBgColor)),U.xp6(1),U.Q6J("ngIf",!e.lastNumberPhone),U.xp6(1),U.Q6J("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),U.xp6(1),U.Q6J("ngIf",e.lastNumberPhone&&e.data.config.noRetryInBadPhone)}}function ne(e,t){1&e&&(U.TgZ(0,"span"),U._uU(1," ¿No has recibido el código en tu teléfono? "),U.qZA())}function ie(e,t){if(1&e&&(U.TgZ(0,"span"),U._uU(1),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.hij(" ¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? ")}}function se(e,t){1&e&&(U.TgZ(0,"span"),U._uU(1," ¿No has recibido el código en el teléfono? "),U.qZA())}const re=function(e,t){return{color:e,background:t}};function oe(e,t){if(1&e){const e=U.EpF();U.ynx(0),U.TgZ(1,"small",11),U.YNc(2,ne,2,0,"span",5),U.YNc(3,ie,2,1,"span",5),U.YNc(4,se,2,0,"span",5),U.TgZ(5,"a",12),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.resendOTP())})),U._uU(6,"Reenviar"),U.qZA()(),U.BQk()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("ngStyle",U.kEZ(5,ee,e.data.styles.colors.dangerColor,"1px solid "+e.data.styles.colors.dangerColor,e.data.styles.colors.dangerBgColor)),U.xp6(1),U.Q6J("ngIf",!e.lastNumberPhone),U.xp6(1),U.Q6J("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),U.xp6(1),U.Q6J("ngIf",e.data.config.noRetryInBadPhone),U.xp6(1),U.Q6J("ngStyle",U.WLB(9,re,e.data.styles.colors.dangerTextButtonColor,e.data.styles.colors.dangerColor))}}let ae=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.solucitudesService=n,this.activeRoute=i,this.next=new U.vpe(null),this.errPhone=new U.vpe(null),this.resendO=new U.vpe(null),this.secsCount=60,this.lastNumberPhone="XXX"}ngOnInit(){this.form=this.fb.group({code1:[null,[p.kI.required,p.kI.maxLength(6),p.kI.minLength(6)]]}),this.initSecsInterval(),this.activeRoute.queryParams.subscribe((e=>{e&&e.request_id&&(this.requestID=e.request_id)}),(e=>{console.error(e)})),this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastNumberPhone=t}initSecsInterval(){this.interv=setInterval((()=>{this.secsCount--,this.secsCount<=0&&this.finishSecsInterval()}),1e3)}finishSecsInterval(){this.interv&&clearInterval(this.interv)}nextStep(){let e={code:this.getCode()};this.next.emit(e)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){return(0,P.Z)((function*(){}))()}errorStep(){this.errPhone.emit(!0)}setInputEvent(e){""!=e.target.value?Y(e.target).next().focus():"Backspace"==e.code&&Y(e.target).prev().focus()}resendOTP(){this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(_.M),U.Y36(O.gz))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-otp-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},decls:16,vars:20,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","gap-2","items-center","justify-start","w-full","max-w-[200px]"],["appearance","outline",1,"w-full","flex-1"],["tabindex","1","maxlength","6","minlength","1","formControlName","code1","type","text","matInput","",3,"change","keyup"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"info-time","w-fit",3,"ngStyle"],[1,"ml-4",3,"ngStyle","click"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.TgZ(5,"div",4),U.YNc(6,te,5,8,"ng-container",5),U.YNc(7,oe,7,12,"ng-container",5),U.qZA(),U.TgZ(8,"div",6)(9,"mat-form-field",7)(10,"mat-label"),U._uU(11," Código OTP "),U.qZA(),U.TgZ(12,"input",8),U.NdJ("change",(function(e){return t.capturePasteEvent(e)}))("keyup",(function(e){return t.setInputEvent(e)})),U.qZA()()()(),U.TgZ(13,"div",9)(14,"button",10),U.NdJ("click",(function(){return t.nextStep()})),U._uU(15,"Siguiente"),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.otp.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,18,t.texts.otp.description||""),U.oJD),U.xp6(3),U.Q6J("ngIf",t.secsCount&&t.secsCount>0),U.xp6(1),U.Q6J("ngIf",!t.secsCount||t.secsCount<=0),U.xp6(7),U.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",t.form.invalid))},dependencies:[i.O5,i.PC,u.lW,A.KE,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.nD,p.sg,p.u,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function le(e,t){if(1&e&&(U.TgZ(0,"div",2),U._UZ(1,"div",3)(2,"div",4),U.ALo(3,"safeHtml"),U.qZA()),2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),U.Q6J("innerHTML",e.texts.success.title,U.oJD),U.xp6(1),U.Udp("color",e.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(3,8,e.texts.success.description||""),U.oJD)}}function ce(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",5)(1,"button",6),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.gotoRedirect())})),U._uU(2),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),U.xp6(1),U.hij(" ",e.data[e.flowName].btnTextCallBack||"Haga click aquí para finalizar"," ")}}let de=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.videoS=n,this.route=i}ngOnInit(){this.route.queryParams.subscribe((e=>{e.request_id&&(this.requestID=e.request_id,this.videoS.setState(this.requestID,"success").then((e=>{console.log("Se ha seteado el status success correctamente")})).catch((e=>{console.error("No se ha seteado el status success. Error: ",e)})))}))}save(){}gotoRedirect(){this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].callBackUrl&&location.assign(this.data[this.flowName].callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(z),U.Y36(O.gz))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",packId:"packId",requestID:"requestID",userId:"userId",flowName:"flowName"},decls:2,vars:2,consts:[["class","pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(U.YNc(0,le,4,10,"div",0),U.YNc(1,ce,3,7,"div",1)),2&e&&(U.Q6J("ngIf",!t.data.config.infiniteLoopInCompleted),U.xp6(1),U.Q6J("ngIf",t.data[t.flowName].enableUrlCallBack))},dependencies:[i.O5,u.lW,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function ue(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",5)(1,"button",6),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.retry())})),U._uU(2,"Intentarlo nuevamente"),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function he(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",5)(1,"button",7),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.newRequest())})),U._uU(2,"Crear nueva solicitud"),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Udp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}let pe=(()=>{class e{constructor(e,t,n){this.utils=e,this.videoS=t,this.route=n,this.retryOp=new U.vpe(null),this.newReq=new U.vpe(null)}ngOnInit(){this.route.queryParams.subscribe((e=>{e.request_id&&(this.requestID=e.request_id,this.videoS.setState(this.requestID,"failed").then((e=>{console.log("Se ha seteado el status failed correctamente")})).catch((e=>{console.error("No se ha seteado el status failed. Error: ",e)})))}))}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(U.Y36(Z.F),U.Y36(z),U.Y36(O.gz))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(U.TgZ(0,"div",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA(),U.YNc(5,ue,3,6,"div",4),U.YNc(6,he,3,6,"div",4),U.qZA()),2&e&&(U.xp6(2),U.Q6J("innerHTML",t.texts.fail.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,6,t.texts.fail.description),U.oJD),U.xp6(2),U.Q6J("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),U.xp6(1),U.Q6J("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[i.O5,u.lW,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();n(6866);var me=n(1763),fe=n(5696);const ge=["termsCheckbox"],_e=["termsCertCheckbox"],be=["assignmentCheckbox"];function ve(e,t){if(1&e&&(U.TgZ(0,"mat-form-field",5)(1,"mat-label"),U._uU(2,"Razón social"),U.qZA(),U._UZ(3,"input",28),U.qZA()),2&e){const e=U.oxw();U.Gre("",e.disabledInputs.razon?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",e.disabledInputs.razon?-1:1)}}function ye(e,t){if(1&e&&(U.TgZ(0,"mat-form-field",5)(1,"mat-label"),U._uU(2,"CIF"),U.qZA(),U._UZ(3,"input",29),U.qZA()),2&e){const e=U.oxw();U.Gre("",e.disabledInputs.cif?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",e.disabledInputs.cif?-1:1)}}function we(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",30)(1,"belender-checkbox",22),U.NdJ("changeCheckbox",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.setPower(t))})),U._uU(2," Consiento expresamente a la activación de un poder digital según las condiciones que pueden verse "),U.TgZ(3,"a",24),U.NdJ("click",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.gotoPowerConditions(t))})),U.TgZ(4,"u"),U._uU(5,"aquí"),U.qZA()()()()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("color",e.data.styles.colors.title)}}function xe(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",21)(1,"belender-checkbox",22,31),U.NdJ("changeCheckbox",(function(t){U.CHM(e);const n=U.oxw();return U.KtG(n.setAssignment(t))})),U._UZ(3,"div",32),U.qZA()()}if(2&e){const e=U.oxw();U.xp6(1),U.Q6J("color",e.data.styles.colors.title),U.xp6(2),U.Q6J("innerHTML",null==e.data?null:e.data.config.dataAssignmentText,U.oJD)}}const Ce=function(e){return{"dont-show-data":e}},ke={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Te=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.cd=n,this.requestID=null,this.next=new U.vpe(null),this.goTerms=new U.vpe(null),this.goTermsCert=new U.vpe(null),this.goPower=new U.vpe(null),this.acceptTerms=!1,this.acceptTerms2=!1,this.step=0,this.assignment=!1,this.disabledInputs={dni:!1,name:!1,lastname:!1,secondlastname:!1,phone:!1,email:!1,razon:!1,cif:!1,type:!1},this.requestAux={phone:null,email:null,razon:null,cif:null,name:null,lastname:null,secondLastname:null,dni:null,type:"NATURAL"},this.noValidate=!1,this.powerActivate=!1}ngOnInit(){this.solicitud?(this.noValidate="terms_and_conditions"==this.solicitud.status_code,this.setForm(this.solicitud)):this.setForm(null)}tabChanged(e){this.requestAux.type=e.value,this.setForm(this.requestAux)}setForm(e){this.requestAux.phone=e?e.person_phone||e.phone:null,this.requestAux.email=e?e.person_email||e.email||e.email_copy:null,this.requestAux.razon=e&&e.razon_social?e.razon_social:null,this.requestAux.cif=e&&e.cif?e.cif:null,this.requestAux.name=e?e.person_name||e.name:null,this.requestAux.lastname=e?e.person_first_surname||e.first_surname:null,this.requestAux.secondLastname=e?e.person_second_surname||e.second_surname:null,this.requestAux.dni=e&&e.document_number?e.document_number:e&&e.person_document_number?e.person_document_number:null,this.requestAux.type=e&&e.person_type?e.person_type:this.requestAux.type,this.form=this.fb.group("NATURAL"==this.requestAux.type?{type:[this.requestAux.type],name:[this.requestAux.name||null,this.noValidate?[]:[p.kI.required]],lastname:[this.requestAux.lastname||null,this.noValidate?[]:[p.kI.required]],secondLastname:[this.requestAux.secondLastname||null],email:[this.requestAux.email||null,this.noValidate?[]:[p.kI.required,p.kI.email]],phone:[this.requestAux.phone||"",this.noValidate?[]:[p.kI.required,p.kI.maxLength(9),p.kI.minLength(9)]],dni:[this.requestAux.dni||null,this.noValidate?[]:[p.kI.required]]}:{type:[this.requestAux.type],name:[this.requestAux.name||null,this.noValidate?[]:[p.kI.required]],lastname:[this.requestAux.lastname||null,this.noValidate?[]:[p.kI.required]],secondLastname:[this.requestAux.secondLastname||null],email:[this.requestAux.email||null,this.noValidate?[]:[p.kI.required,p.kI.email]],dni:[this.requestAux.dni||null,this.noValidate?[]:[p.kI.required]],phone:[this.requestAux.phone||"",this.noValidate?[]:[p.kI.required,p.kI.maxLength(9),p.kI.minLength(9)]],razon:[this.requestAux.razon||null,this.noValidate?[]:[p.kI.required]],cif:[this.requestAux.cif||null,this.noValidate?[]:[p.kI.required]]}),this.requestIDFromURL&&this.disableEnableInputs(this.requestAux.type,this.requestAux.name,this.requestAux.lastname,this.requestAux.secondLastname,this.requestAux.email,this.requestAux.phone,this.requestAux.dni,this.requestAux.razon,this.requestAux.cif),this.cd.markForCheck()}disableEnableInputs(e,t,n,i,s,r,o,a,l){this.disabledInputs={name:t||!1,lastname:n||!1,secondlastname:i||!1,email:s||!1,phone:r||!1,dni:o||!1,razon:a||!1,cif:l||!1,type:e||!1}}enableInput(e){this.disabledInputs[e]=!1,this.cd.markForCheck()}nextStep(){let e;e="NATURAL"==this.requestAux.type?{email_copy:this.form.get("email").value,phone:this.form.get("phone").value,name:this.form.get("name").value,first_surname:this.form.get("lastname").value,second_surname:this.form.get("secondLastname").value,document_number:this.form.get("dni").value,type:"Natural"}:{email_copy:this.form.get("email").value,phone:this.form.get("phone").value,name:this.form.get("name").value,first_surname:this.form.get("lastname").value,second_surname:this.form.get("secondLastname").value,document_number:this.form.get("dni").value,company_name:this.form.get("razon").value,cif:this.form.get("cif").value,type:"Legal",rmc_validation:this.userId},(this.data.config.activatePower||this.solicitud?.power_activate)&&(e.power_activate=1,e.terms_and_conditions_power=1),this.next.emit(e)}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.goTerms.emit(!0)}gotoTermsAndConditionsCertificate(e){e.preventDefault(),e.stopPropagation(),this.goTermsCert.emit(!0)}setAssignment(e){this.assignment=e}getAssignmentValidation(){return!this.data.config.dataAssignmentCheck||this.assignment}setTerms2(e){this.acceptTerms2=e}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}setTerms2Check(e){this.certCheckComponent.checked=e,this.acceptTerms2=e}setAssignmentCheck(e){this.assignmentCheckComponent.checked=e,this.assignment=e}setTerms(e){this.acceptTerms=e}getIfValid(){let e=this.form.invalid;return this.noValidate&&(e=!1),!((this.requestID?this.solicitud?.power_activate:this.data?.config.activatePower)&&!this.powerActivate)&&!e&&this.acceptTerms&&this.acceptTerms2&&this.getAssignmentValidation()}setPower(e){this.powerActivate=e}gotoPowerConditions(e){this.goPower.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(U.sBO))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(U.Gf(ge,5),U.Gf(_e,5),U.Gf(be,5)),2&e){let e;U.iGM(e=U.CRH())&&(t.checkComponent=e.first),U.iGM(e=U.CRH())&&(t.certCheckComponent=e.first),U.iGM(e=U.CRH())&&(t.assignmentCheckComponent=e.first)}},inputs:{requestID:"requestID",flowName:"flowName",data:"data",texts:"texts",solicitud:"solicitud",userId:"userId",requestIDFromURL:"requestIDFromURL"},outputs:{next:"nextStep",goTerms:"goToTerms",goTermsCert:"goToTermsCertificate",goPower:"goToPower"},features:[U._Bn([{provide:T.sG,useValue:ke},{provide:U.soG,useValue:"es-ES"}])],decls:57,vars:63,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"my-1","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between",3,"ngClass"],["appearance","outline"],["formControlName","type",3,"tabindex","selectionChange"],["value","NATURAL"],["value","LEGAL"],["formControlName","name","matInput","",3,"tabindex"],["formControlName","lastname","matInput","",3,"tabindex"],["formControlName","secondLastname","matInput","",3,"tabindex"],["formControlName","email","placeholder","Ej: mi_email@dominio.com","type","email","matInput","",3,"tabindex"],["formControlName","phone","placeholder","Ej: 123123123","maxlength","9","type","text","matInput","",3,"tabindex"],["formControlName","dni","maxlength","9","minlength","9","placeholder","Ej: 2222221R","type","text","matInput","",3,"tabindex"],["appearance","outline",3,"class",4,"ngIf"],[1,"mt-8","flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],["class","flex justify-between items-center w-full flex-100",4,"ngIf"],[1,"flex","justify-start","items-center","w-full","flex-100"],[3,"color","changeCheckbox"],["termsCertCheckbox",""],["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],["class","flex justify-start items-center w-full flex-100",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],["formControlName","razon","placeholder","Ej: Mi Empresa","type","text","matInput","",3,"tabindex"],["formControlName","cif","placeholder","Ej: 123123123","type","text","matInput","",3,"tabindex"],[1,"flex","justify-between","items-center","w-full","flex-100"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA(),U.TgZ(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),U._uU(8,"Tipo de persona"),U.qZA(),U.TgZ(9,"mat-select",6),U.NdJ("selectionChange",(function(e){return t.tabChanged(e)})),U.TgZ(10,"mat-option",7),U._uU(11,"Natural"),U.qZA(),U.TgZ(12,"mat-option",8),U._uU(13,"Legal"),U.qZA()()(),U.TgZ(14,"mat-form-field",5)(15,"mat-label"),U._uU(16,"Nombre"),U.qZA(),U._UZ(17,"input",9),U.qZA(),U.TgZ(18,"mat-form-field",5)(19,"mat-label"),U._uU(20,"Primer apellido"),U.qZA(),U._UZ(21,"input",10),U.qZA(),U.TgZ(22,"mat-form-field",5)(23,"mat-label"),U._uU(24,"Segundo apellido"),U.qZA(),U._UZ(25,"input",11),U.qZA(),U.TgZ(26,"mat-form-field",5)(27,"mat-label"),U._uU(28,"Email"),U.qZA(),U._UZ(29,"input",12),U.qZA(),U.TgZ(30,"mat-form-field",5)(31,"mat-label"),U._uU(32,"Teléfono"),U.qZA(),U._UZ(33,"input",13),U.qZA(),U.TgZ(34,"mat-form-field",5)(35,"mat-label"),U._uU(36,"DNI"),U.qZA(),U._UZ(37,"input",14),U.qZA(),U.YNc(38,ve,4,4,"mat-form-field",15),U.YNc(39,ye,4,4,"mat-form-field",15),U.qZA(),U.TgZ(40,"div",16)(41,"belender-checkbox",17,18),U.NdJ("changeCheckbox",(function(e){return t.setTerms2(e)})),U.TgZ(43,"belender-terms-and-policy-links",19),U.NdJ("goToTerms",(function(e){return t.gotoTermsAndConditions(e)})),U.qZA()()(),U.YNc(44,we,6,1,"div",20),U.TgZ(45,"div",21)(46,"belender-checkbox",22,23),U.NdJ("changeCheckbox",(function(e){return t.setTerms(e)})),U._uU(48," He leído y acepto los "),U.TgZ(49,"a",24),U.NdJ("click",(function(e){return t.gotoTermsAndConditionsCertificate(e)})),U.TgZ(50,"u"),U._uU(51,"términos y condiciones"),U.qZA()(),U._uU(52," para la emisión del certificado "),U.qZA()(),U.YNc(53,xe,4,2,"div",25),U.TgZ(54,"div",26)(55,"button",27),U.NdJ("click",(function(){return t.nextStep()})),U._uU(56," Continuar "),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.form.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,59,t.texts.form.description||""),U.oJD),U.xp6(2),U.Q6J("ngClass",U.VKq(61,Ce,t.data.config.dontShowDataInTerms&&t.solicitud&&t.solicitud.status_code&&"terms_and_conditions"===t.solicitud.status_code)),U.xp6(1),U.Gre("",t.disabledInputs.type?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.type?-1:1),U.xp6(5),U.Gre("",t.disabledInputs.name?"disabled-input":""," w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.name?-1:1),U.xp6(1),U.Gre("",t.disabledInputs.lastname?"disabled-input":""," w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.lastname?-1:1),U.xp6(1),U.Gre("",t.disabledInputs.secondlastname?"disabled-input":""," w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.secondlastname?-1:1),U.xp6(1),U.Gre("",t.disabledInputs.email?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.email?-1:1),U.xp6(1),U.Gre("",t.disabledInputs.phone?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.phone?-1:1),U.xp6(1),U.Gre("",t.disabledInputs.dni?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),U.xp6(3),U.s9C("tabindex",t.disabledInputs.dni?-1:1),U.xp6(1),U.Q6J("ngIf","LEGAL"==t.requestAux.type),U.xp6(1),U.Q6J("ngIf","LEGAL"==t.requestAux.type),U.xp6(2),U.Q6J("color",t.data.styles.colors.title),U.xp6(2),U.Q6J("userId",t.userId)("showPolicyLink",null==t.data?null:t.data.config.showPolicyLink)("firstSentence",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.firstSentence)("secondSentence",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.secondSentence)("thirdSentence",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.thirdSentence)("policyActionText",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.policyActionText)("termsActionText",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.termsActionText)("customTerms",t.data[t.flowName].customTerms),U.xp6(1),U.Q6J("ngIf",t.requestID?null==t.solicitud?null:t.solicitud.power_activate:null==t.data?null:t.data.config.activatePower),U.xp6(2),U.Q6J("color",t.data.styles.colors.title),U.xp6(7),U.Q6J("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),U.xp6(2),U.Udp("color",t.getIfValid()?t.data.styles.colors.btnText:"")("background",t.getIfValid()?t.data.styles.colors.btnBg:"")("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",!t.getIfValid()))},dependencies:[i.mk,i.O5,u.lW,A.KE,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.nD,p.sg,p.u,f.gD,T.ey,me.b,fe.T,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}"]}),e})(),Se=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.Activatedroute=n,this.next=new U.vpe(null),this.accept=!1}ngOnInit(){this.Activatedroute.queryParams.subscribe((e=>{this.setForm(e)}))}nextStep(){let e={phone:this.form.get("phone").value};this.next.emit(e)}setForm(e){this.form=this.fb.group({phone:["",p.kI.required]}),this.solicitud&&"bad_phone"==this.solicitud.status_code&&this.form.controls.phone.markAsTouched()}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(O.gz))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-error-form-step"]],inputs:{data:"data",flowName:"flowName",texts:"texts",mode:"mode",solicitud:"solicitud"},outputs:{next:"nextStep"},decls:14,vars:14,consts:[[1,"animated","fadeIn","fixed-content",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","phone","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1)(2,"div",2),U._uU(3," Error con el teléfono "),U.qZA(),U.TgZ(4,"div",3),U._uU(5," El teléfono ingresado no coincide con registrado en la Seguridad Social, por favor ingrese otro "),U.qZA()(),U.TgZ(6,"div",4)(7,"mat-form-field",5)(8,"mat-label"),U._uU(9,"Teléfono"),U.qZA(),U._UZ(10,"input",6),U.qZA()(),U.TgZ(11,"div",7)(12,"button",8),U.NdJ("click",(function(){return t.nextStep()})),U._uU(13," Continuar "),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.xp6(2),U.Udp("color",t.data.styles.colors.text),U.xp6(8),U.Udp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",t.form.invalid))},dependencies:[u.lW,A.KE,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.sg,p.u],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Me=n(5145);let Ie=(()=>{class e{constructor(e){this.utils=e,this.status="",this.label="Cargando datos.."}ngOnInit(){this.data.config&&this.data.config.infiniteLoopInCompleted?this.label="":Me.Z.forEach((e=>{e.text==this.status&&(this.label=e.label)}))}}return e.ɵfac=function(t){return new(t||e)(U.Y36(Z.F))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-loading-step"]],inputs:{status:"status",data:"data"},decls:5,vars:1,consts:[[1,"fixed-content","h-full"],[1,"h-full","py-10","flex","flex-col","items-center"]],template:function(e,t){1&e&&(U.TgZ(0,"div",0)(1,"div",1),U._UZ(2,"mat-progress-spinner"),U.TgZ(3,"p"),U._uU(4),U.qZA()()()),2&e&&(U.xp6(4),U.Oqu(t.label))},dependencies:[y.Ou],styles:[".content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Ee=(()=>{class e{constructor(e,t,n,i,s){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=s,this.retryOp=new U.vpe(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return"Abandonado después de esperar OTP de Seguridad Social";case"abandoned_after_invalid_otp_seguridad_social":return"Abandonado despues de OTP inválido en Seguridad Social";case"abandoned_after_invalid_otp_aeat":return"Abandonado despues de OTP inválido en AEAT";case"abandoned_after_waiting_otp_aeat":return"Abandonado después de esperar OTP de AEAT";default:return this.solicitud.status_message||this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.QS),U.Y36(Z.F),U.Y36(_.M),U.Y36(v.o),U.Y36(S.T))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:10,vars:17,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(U.TgZ(0,"div",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.TgZ(5,"div",4),U._uU(6),U.qZA()(),U.TgZ(7,"div",5)(8,"button",6),U.NdJ("click",(function(){return t.retry()})),U._uU(9,"Intentarlo nuevamente"),U.qZA()()()),2&e&&(U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.abandoned.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,15,t.texts.abandoned.description),U.oJD),U.xp6(3),U.hij(" ",t.getTextStatus()," "),U.xp6(2),U.Udp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Oe(e,t){return n=>{const i=n.controls[t];i.errors&&!i.errors.confirmedValidator||i.setErrors(n.controls[e].value!==i.value?{confirmedValidator:!0}:null)}}function Le(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," La contraseña es requerida "),U.qZA())}function Pe(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," La contraseña debe tener al menos 8 carácteres "),U.qZA())}function De(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," Es necesario repetir la contraseña "),U.qZA())}function Ae(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," Las contraseñas deben coincidir "),U.qZA())}function Ne(e,t){1&e&&(U.TgZ(0,"mat-hint",12),U._uU(1," La contraseña debe tener al menos 8 carácteres "),U.qZA())}const qe={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Ye=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.form=new p.cw({}),this.next=new U.vpe(null)}ngOnInit(){this.setForm()}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({password:["",[p.kI.required]],confirm_password:["",[p.kI.required]]},{validator:Oe("password","confirm_password")})}nextStep(){let e={password:this.form.get("password").value};this.next.emit(e)}}return e.ɵfac=function(t){return new(t||e)(U.Y36(p.qu),U.Y36(Z.F))},e.ɵcmp=U.Xpm({type:e,selectors:[["belender-password-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep"},features:[U._Bn([{provide:T.sG,useValue:qe},{provide:U.soG,useValue:"es-ES"}])],decls:22,vars:23,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","password","minlength","8","type","password","matInput",""],["class","text-red-500",4,"ngIf"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","confirm_password","minlength","8","type","password","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-red-500"]],template:function(e,t){1&e&&(U.TgZ(0,"form",0)(1,"div",1),U._UZ(2,"div",2)(3,"div",3),U.ALo(4,"safeHtml"),U.qZA(),U.TgZ(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),U._uU(8,"Contraseña"),U.qZA(),U._UZ(9,"input",6),U.YNc(10,Le,2,0,"mat-hint",7),U.YNc(11,Pe,2,0,"mat-hint",7),U.qZA(),U.TgZ(12,"mat-form-field",8)(13,"mat-label"),U._uU(14,"Repite Contraseña"),U.qZA(),U._UZ(15,"input",9),U.YNc(16,De,2,0,"mat-hint",7),U.YNc(17,Ae,2,0,"mat-hint",7),U.YNc(18,Ne,2,0,"mat-hint",7),U.qZA()(),U.TgZ(19,"div",10)(20,"button",11),U.NdJ("click",(function(){return t.nextStep()})),U._uU(21," Guardar "),U.qZA()()()),2&e&&(U.Q6J("formGroup",t.form),U.xp6(2),U.Udp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),U.Q6J("innerHTML",t.texts.password.title,U.oJD),U.xp6(1),U.Udp("color",t.data.styles.colors.text),U.Q6J("innerHTML",U.lcZ(4,21,t.texts.password.description),U.oJD),U.xp6(7),U.Q6J("ngIf",t.f.password.touched&&t.f.password.invalid&&t.f.password.errors.required),U.xp6(1),U.Q6J("ngIf",t.f.password.invalid&&t.f.password.errors.minlength),U.xp6(5),U.Q6J("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.required),U.xp6(1),U.Q6J("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.confirmedValidator),U.xp6(1),U.Q6J("ngIf",t.f.confirm_password.invalid&&t.f.confirm_password.errors.minlength),U.xp6(2),U.Udp("color",t.form.invalid?"":t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),U.Q6J("disabled",t.form.invalid))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,x.Nt,p._Y,p.Fj,p.JJ,p.JL,p.wO,p.sg,p.u,G.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const Re=["formStep"];function Fe(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"vex-power-cert",3),U.NdJ("accept",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.acceptPowerCert())})),U.qZA()}if(2&e){const e=U.oxw();U.Q6J("hideButtons",!1)("flow","VideoID")("userId",e.userId)}}function Ue(e,t){if(1&e&&(U.TgZ(0,"div",10),U._UZ(1,"img",11),U.qZA()),2&e){const e=U.oxw(3);U.xp6(1),U.Q6J("src",e.data.styles.logoUrl,U.LSH)}}function Ze(e,t){1&e&&(U.TgZ(0,"div",12),U._UZ(1,"mat-progress-spinner",13),U.qZA()),2&e&&(U.xp6(1),U.Q6J("value",0))}function He(e,t){if(1&e&&U._UZ(0,"belender-loading-step",23),2&e){const e=U.oxw(4);U.Q6J("data",e.data)("status",null==e.solicitud?null:e.solicitud.status_code)}}function je(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-form-step",24,25),U.NdJ("goToTerms",(function(){U.CHM(e);const t=U.oxw(4);return U.KtG(t.gotoTermsAndConditions())}))("goToPower",(function(){U.CHM(e);const t=U.oxw(4);return U.KtG(t.gotoPowerConditions())}))("goToTermsCertificate",(function(){U.CHM(e);const t=U.oxw(4);return U.KtG(t.gotoTermsAndConditionsCertificate())}))("nextStep",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.gotoOTP(t))})),U.qZA()}if(2&e){const e=U.oxw(4);U.Q6J("data",e.data)("flowName",e.flowName)("requestID",e.requestID)("requestIDFromURL",e.requestIDFromURL)("userId",e.userId)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function ze(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-otp-step",26),U.NdJ("resendOTP",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.resendOTP(t))}))("errorPhone",(function(){U.CHM(e);const t=U.oxw(4);return U.KtG(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.requestOTP(t))})),U.qZA()}if(2&e){const e=U.oxw(4);U.Q6J("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Be(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-password-step",27),U.NdJ("nextStep",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.sendPassword(t))})),U.qZA()}if(2&e){const e=U.oxw(4);U.Q6J("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Je(e,t){if(1&e&&U._UZ(0,"belender-success-step",28),2&e){const e=U.oxw(4);U.Q6J("data",e.data)("flowName",e.flowName)("packId",e.packId)("userId",e.userId)("requestID",e.requestID)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Ve(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-fail-step",29),U.NdJ("retry",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.retryRequest(t))}))("newRequest",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.newRequest(t))})),U.qZA()}if(2&e){const e=U.oxw(4);U.Q6J("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Qe(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-error-form-step",30),U.NdJ("nextStep",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.sendNewData(t))})),U.qZA()}if(2&e){const e=U.oxw(4);U.Q6J("solicitud",e.solicitud)("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function We(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"belender-abandoned-step",31),U.NdJ("retry",(function(t){U.CHM(e);const n=U.oxw(4);return U.KtG(n.retryRequest(t))})),U.qZA()}if(2&e){const e=U.oxw(4);U.Q6J("solicitud",e.solicitud)("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Ge(e,t){if(1&e&&(U.TgZ(0,"div",32)(1,"div",33)(2,"h1",34),U._uU(3,"No existe la solicitud"),U.qZA()(),U.TgZ(4,"div",35),U._uU(5," No existen solicitudes activas con el código requerido "),U.qZA()()),2&e){const e=U.oxw(4);U.xp6(4),U.Udp("color",e.data.styles.colors.text)}}function $e(e,t){if(1&e&&(U.ynx(0),U.YNc(1,He,1,2,"belender-loading-step",14),U.YNc(2,je,2,7,"belender-form-step",15),U.YNc(3,ze,1,3,"belender-otp-step",16),U.YNc(4,Be,1,3,"belender-password-step",17),U.YNc(5,Je,1,6,"belender-success-step",18),U.YNc(6,Ve,1,3,"belender-fail-step",19),U.YNc(7,Qe,1,3,"belender-error-form-step",20),U.YNc(8,We,1,3,"belender-abandoned-step",21),U.YNc(9,Ge,6,2,"div",22),U.BQk()),2&e){const e=U.oxw(3);U.xp6(1),U.Q6J("ngIf","loading"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","form"==e.getStatus()&&!e.loading),U.xp6(1),U.Q6J("ngIf","otp"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","password"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","success"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","failed"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","error-data"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","abandoned"==e.getStatus()),U.xp6(1),U.Q6J("ngIf","no-exist"==e.getStatus())}}function Ke(e,t){1&e&&U._UZ(0,"belender-disabled-url")}function Xe(e,t){if(1&e&&(U.TgZ(0,"div",36),U._UZ(1,"mat-progress-spinner",37),U.TgZ(2,"p",38),U._uU(3),U.qZA()()),2&e){const e=U.oxw(3);U.xp6(1),U.Q6J("value",e.spinnerValue)("mode",e.spinnerMode),U.xp6(2),U.hij(" ",e.loading," ")}}function et(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"div",39)(1,"div",32)(2,"div",40),U._uU(3,"Error!"),U.qZA(),U._UZ(4,"div",41),U.qZA(),U.TgZ(5,"div",42)(6,"button",43),U.NdJ("click",(function(){U.CHM(e);const t=U.oxw(3);return U.KtG(t.error=!1)})),U._uU(7," Ingresar manualmente "),U.qZA()()()}if(2&e){const e=U.oxw(3);U.xp6(4),U.Udp("color",e.data.styles.colors.text),U.Q6J("innerHTML",e.error,U.oJD)}}function tt(e,t){if(1&e&&(U.TgZ(0,"div",4)(1,"div"),U.YNc(2,Ue,2,1,"div",6),U.YNc(3,Ze,2,1,"div",7),U.YNc(4,$e,10,9,"ng-container",5),U.YNc(5,Ke,1,0,"belender-disabled-url",5),U.YNc(6,Xe,4,3,"div",8),U.YNc(7,et,8,3,"div",9),U.qZA()()),2&e){const e=U.oxw(2);U.xp6(1),U.Gre("h-full w-full flex-auto p-0 md:p-3 ",e.data.styles.typography,""),U.Udp("background",e.data.styles.colors.background),U.xp6(1),U.Q6J("ngIf",e.data.styles.withLogo&&"loading"!=e.getStatus()),U.xp6(1),U.Q6J("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"==e.getStatus()),U.xp6(1),U.Q6J("ngIf",!e.error&&!e.disableURL),U.xp6(1),U.Q6J("ngIf",!e.error&&e.disableURL),U.xp6(1),U.Q6J("ngIf",e.loading&&!e.error),U.xp6(1),U.Q6J("ngIf",!e.loading&&e.error)}}function nt(e,t){if(1&e&&(U.ynx(0),U.TgZ(1,"div",44),U._uU(2),U.qZA(),U.BQk()),2&e){const e=U.oxw(2);U.xp6(2),U.hij(" TestMode ",e.testMode?"ON":"OFF"," ")}}function it(e,t){if(1&e&&(U.TgZ(0,"div",4),U.YNc(1,tt,8,11,"div",1),U.YNc(2,nt,3,1,"ng-container",5),U.qZA()),2&e){const e=U.oxw();U.xp6(1),U.Q6J("ngIf",e.data),U.xp6(1),U.Q6J("ngIf",e.testMode)}}function st(e,t){if(1&e){const e=U.EpF();U.TgZ(0,"vex-terms",45),U.NdJ("accepted",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.handleTermsResponse(!0))}))("cancelled",(function(){U.CHM(e);const t=U.oxw();return U.KtG(t.handleTermsResponse(!1))})),U.qZA()}if(2&e){const e=U.oxw();U.Q6J("flow","videoid")("requestStatus",e.solicitud?e.solicitud.status_code:"")}}let rt=class{constructor(e,t,n,i,s,r,o,a,l){this.cd=e,this.Activatedroute=t,this.utils=n,this.videoIDService=i,this.customizationService=s,this.customizationStoreService=r,this.notis=o,this.webhooksService=a,this.dialog=l,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.requestIDFromURL=!1,this.requestCreated=!1,this.viewPowerTerms=!1,this.disableURL=!1,this.flowName="VideoID",this.showTermsDialog=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.userId?this.setInitialData(this.userId):this.loading=null,"pro"!=R.N.env&&(Y(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),Y(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)}))),this.utils.setLoading(!1)}ngOnDestroy(){}sendMessageToParent(e){window.top.postMessage(e,"*")}setInitialData(e){var t=this;return(0,P.Z)((function*(){const n=yield t.getFlow(e);if(t.data={config:t.customizationStoreService.FUNDER_CONFIG,styles:t.customizationStoreService.FUNDER_STYLES,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.notis.showAlert("Error!","No se ha configurado la customización del widget para este usuario","error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,P.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}validateRequestIdInUrl(){this.Activatedroute.queryParams.subscribe((e=>{e&&this.setParamsToRequest(e),e&&e.acceptTerms&&(this.autoAcceptTerms=!0),e&&e.request_id?(this.disableURL=!1,this.requestID=e.request_id,this.setFormFromVcCode(e.request_id)):this.loading=null}),(e=>{this.loading=null}))}setFormFromVcCode(e){var t=this;return(0,P.Z)((function*(){t.loading="Obteniendo datos de la solicitud...",t.videoIDService.getSolicitudByCode(e).then((e=>{e&&e.data?(t.solicitud=e.data,t.requestCreated=!0,t.requestIDFromURL=!0,t.setSubscriptionOfRequest(),t.loading=null,t.solicitud.status_code&&"waiting_video"===t.solicitud.status_code&&t.solicitud.url_video_id&&location.assign(t.solicitud.url_video_id),t.skipCreationOfRequest=t.solicitud&&t.solicitud.status_code&&"prerequest"!=t.solicitud.status_code,t.autoAcceptTerms&&t.gotoOTP()):t.loading=null})).catch((e=>{t.loading=null}))}))()}setParamsToRequest(e){this.requestIDFromURL=!0,this.solicitud||(this.solicitud={status_code:"form"}),e.document&&!this.solicitud.person_document_number&&(this.solicitud.document_number=e.document),e.birthday&&!this.solicitud.birth_date&&(this.solicitud.birth_date=e.birthday),e.expiration&&!this.solicitud.document_expiration_date&&(this.solicitud.document_expiration_date=e.expiration),e.type&&!this.solicitud.person_type&&(this.solicitud.person_type=e.type),e.phone&&!this.solicitud.person_phone&&(this.solicitud.person_phone=e.phone),e.email&&!this.solicitud.person_email&&(this.solicitud.person_email=e.email),e.cif&&!this.solicitud.cif&&(this.solicitud.cif=e.cif),e.razon&&!this.solicitud.razon_social&&(this.solicitud.razon_social=e.razon),e.name&&!this.solicitud.person_name&&(this.solicitud.person_name=e.name),e.lastname&&!this.solicitud.person_first_surname&&(this.solicitud.person_first_surname=e.lastname),e.second_lastname&&!this.solicitud.person_second_surname&&(this.solicitud.person_second_surname=e.second_lastname)}handlePusherNotification(e){this.dataFromFirebase=e,this.sendMessageToParent({type:"websocket",data:e}),this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.videoIDService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}gotoTerms(e){this.loading="Enviando datos..",e.package_id=this.packId,e.user_id=this.userId,this.requestID&&(e.request_id=this.requestID),this.testMode?setTimeout((()=>{this.solicitud=new q.l,this.solicitud.status_code="waiting_otp_seguridad_social",this.loading=null}),4e3):this.skipCreationOfRequest?(this.gotoOTP(),this.setSubscriptionOfRequest()):this.videoIDService.addSolicitud(e).then((t=>{t&&t.status&&"error"==t.status?(this.solicitud=e,t.message&&(400==t.code?"Birthdate incorrect"==t.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha de nacimiento incorrecta")):"Incorrect date"==t.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha incorrecta")):(this.solicitud.status_code="no_service",this.loading=null):(this.solicitud.status_code="form",this.showAlert("Error!",t.message)))):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,this.sendMessageToParent({type:"response",data:t.data||t}),this.gotoOTP()):this.showAlert("Error!","Error desconocido: "+t)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==R.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==R.N.env&&(e="wss://notifications.belender.net"),R.N.notificationsBaseUrl&&(e=R.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=null})))}sendNewData(e){this.loading="Enviando información..",this.videoIDService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e),this.loading=null):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.initWaitingForResponse("Validando nuevos datos, espere por favor.."),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}showAlert(e,t){this.loading=null,this.notis.showAlert(e,t)}gotoOTP(e){let t=e;t.user_id=this.userId,t.package_id=this.packId,this.requestCreated?this.setTerms(e):(this.initWaitingForResponse("Iniciando el proceso de emisión de certificado.."),this.videoIDService.addSolicitud(t).then((n=>{n.status&&"error"==n.status?(console.error("error en el then",n),this.solicitud=t,this.solicitud.status_code="form",n.message?(this.showAlert("Error!",n.message),n.message&&" Teléfono incorrecto"===n.message&&setTimeout((()=>{this.formComponent.enableInput("phone")}),1e3)):this.showAlert("Error!",n)):n&&"success"==n.status&&(this.sendMessageToParent({type:"response",data:n.data||n}),this.solicitud=n.data,this.requestID=n.data.request_id,this.setSubscriptionOfRequest(),this.cd.markForCheck(),this.setTerms(e))})).catch((e=>{console.error("errooooooorrrrr",e),e&&e.error&&this.showAlert("Error!",e.error),this.loading=null})))}setTerms(e){this.loading="Enviando datos..";let t={request_id:this.solicitud.request_id,terms_and_conditions_service:!0,terms_and_conditions_certificate_emition:!0};(this.data.config.activatePower||this.solicitud?.power_activate)&&(t.power_activate=!0,t.terms_and_conditions_power=e.terms_and_conditions_power),this.testMode?setTimeout((()=>{this.solicitud=new q.l,this.solicitud.status_code="waiting_otp_seguridad_social",this.loading=null}),4e3):this.videoIDService.acceptTerms(t).then((e=>{e&&e.status&&"error"==e.status?(this.solicitud=t,e.message&&(400==e.code?"Birthdate incorrect"==e.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha de nacimiento incorrecta")):"Incorrect date"==e.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha incorrecta!")):(this.solicitud.status_code="no_service",this.loading=null):(this.solicitud.status_code="form",this.showAlert("Error!",e.message)))):e&&e.status&&"success"==e.status?(this.solicitud.status_code="waiting_password",this.sendMessageToParent({type:"response",data:e.data||e}),this.loading=null):this.showAlert("Error!","Error desconocido: "+e)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}sendPassword(e){this.loading="Enviando password..",console.error("password: ",e),e.request_id=this.requestID,this.videoIDService.sendPassword(e).then((e=>{e&&e.status&&"error"==e.status?e.message&&(400==e.code?(this.solicitud.status_code="no_service",this.loading=null):(this.solicitud.status_code="waiting_password",this.showAlert("Error!",e.message))):e&&e.status&&"success"==e.status?(this.solicitud.status_code="waiting_otp",this.sendMessageToParent({type:"response",data:e.data||e})):this.showAlert("Error!","Error desconocido: "+e)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}requestOTP(e){this.loading="Enviando OTP..",this.testMode?setTimeout((()=>{this.solicitud=new q.l,this.solicitud.status_code="all_documents_downloaded",this.loading=null}),2e3):this.videoIDService.sendOTP({request_id:this.requestID,otp:e.code}).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?"invalid_otp"==e.message?"El código introducido no es correcto. Por favor, inténtelo de nuevo":e.message:e),this.loading=!1):e&&"success"==e.status&&(this.loading="Redirigiendo a Vintegris, aguarde por favor...",this.solicitud.status_code="loading",this.sendMessageToParent({type:"response",data:e.data||e}),this.cd.markForCheck(),location.assign(e.message))})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.videoIDService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}gotoErrorPhone(){}setRequestStatus(e){this.solicitud.status_code=e}retryRequest(e){let t={request_id:e,user_id:this.userId};this.loading="Reintentando enviar la solicitud...",this.setSubscriptionOfRequest(),this.videoIDService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}newRequest(e){this.solicitud.status_code="created"}getStatus(){return!this.solicitud||this.solicitud&&("created"==this.solicitud.status_code||"terms_and_conditions"==this.solicitud.status_code||"form"==this.solicitud.status_code)?"form":!this.solicitud||"waiting_login_seguridad_social"!=this.solicitud.status_code&&"loading"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_otp"!=this.solicitud.status_code&&"invalid_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_password"!=this.solicitud.status_code&&"approved_terms_digital_power"!=this.solicitud.status_code&&"declined_terms_digital_power"!=this.solicitud.status_code?!this.solicitud||"abandoned_after_bad_phone"!=this.solicitud.status_code&&"abandoned_after_invalid_otp_seguridad_social"!=this.solicitud.status_code&&"abandoned_after_terms_and_conditions"!=this.solicitud.status_code&&"abandoned_after_waiting_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"certificate_created"!=this.solicitud.status_code&&"waiting_certificate"!=this.solicitud.status_code&&"all_documents_downloaded"!=this.solicitud.status_code&&"partial_documents_downloaded"!=this.solicitud.status_code&&"waiting_video"!=this.solicitud.status_code&&"consent_process_completed"!=this.solicitud.status_code&&"waiting_documents"!=this.solicitud.status_code?!this.solicitud||"bad_phone"!=this.solicitud.status_code&&"phone_not_exist_otp"!=this.solicitud.status_code?!this.solicitud||"failed_with_retry"!=this.solicitud.status_code&&"failed_without_retry"!=this.solicitud.status_code&&"rejected_identity"!=this.solicitud.status_code&&"failed_documents_downloaded"!=this.solicitud.status_code?this.solicitud&&"no_service"==this.solicitud.status_code?"no-service":"no-exist":"failed":this.data.config.noRetryInBadPhone?"otp":"error-data":this.data.infiniteLoopInCompleted||"waiting_video"==this.solicitud.status_code?(this.loading="Aguardando validación por Video ID","loading"):"success":"abandoned":"password":"otp":(this.loading="Estamos procesando su solicitud. Espere un momento por favor","loading")}sendRetry(){}gotoTermsAndConditions(){this.showTermsDialog=!0}handleTermsResponse(e){this.showTermsDialog=!1,e&&this.formComponent.setTermsCheck(!0)}gotoTermsAndConditionsCertificate(){this.dialog.open(F.v,{panelClass:"fullscreen-dialog",data:{flow:"videoid"}}).afterClosed().subscribe((e=>{e&&this.formComponent.setTerms2Check(!0)}))}gotoPowerConditions(){this.viewPowerTerms=!0}acceptPowerCert(){this.viewPowerTerms=!1}};function ot(e,t){if(1&e&&(U.TgZ(0,"div",6),U._UZ(1,"img",7),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("src",e.data.styles.logoUrl,U.LSH)}}function at(e,t){if(1&e&&(U.TgZ(0,"div",8),U._UZ(1,"mat-progress-spinner",9),U.TgZ(2,"p",10),U._uU(3),U.qZA()()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("value",e.spinnerValue)("mode",e.spinnerMode),U.xp6(2),U.Oqu(e.loading)}}function lt(e,t){if(1&e&&(U.TgZ(0,"div",1)(1,"div",2),U.YNc(2,ot,2,1,"div",3),U._UZ(3,"belender-success-step",4),U.YNc(4,at,4,3,"div",5),U.qZA()()),2&e){const e=U.oxw();U.xp6(1),U.Udp("background",e.data.styles.colors.background),U.xp6(1),U.Q6J("ngIf",e.data.styles.withLogo),U.xp6(1),U.Q6J("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts),U.xp6(1),U.Q6J("ngIf",e.loading&&!e.error)}}rt.ɵfac=function(e){return new(e||rt)(U.Y36(U.sBO),U.Y36(O.gz),U.Y36(Z.F),U.Y36(z),U.Y36(C.w),U.Y36(B.r),U.Y36(S.T),U.Y36(w.t),U.Y36(J.uw))},rt.ɵcmp=U.Xpm({type:rt,selectors:[["belender-widget-videoid"]],viewQuery:function(e,t){if(1&e&&U.Gf(Re,5),2&e){let e;U.iGM(e=U.CRH())&&(t.formComponent=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[U._Bn([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:3,vars:3,consts:[[3,"hideButtons","flow","userId","accept",4,"ngIf"],["class","h-full widget-belender",4,"ngIf"],[3,"flow","requestStatus","accepted","cancelled",4,"ngIf"],[3,"hideButtons","flow","userId","accept"],[1,"h-full","widget-belender"],[4,"ngIf"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],["class","loading-wrapper animated fadeIn",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[3,"data","status",4,"ngIf"],[3,"data","flowName","requestID","requestIDFromURL","userId","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep",4,"ngIf"],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","texts","solicitud","nextStep",4,"ngIf"],[3,"data","flowName","packId","userId","requestID","texts",4,"ngIf"],[3,"data","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"solicitud","data","texts","nextStep",4,"ngIf"],[3,"solicitud","data","texts","retry",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"data","status"],[3,"data","flowName","requestID","requestIDFromURL","userId","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep"],["formStep",""],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep"],[3,"data","texts","solicitud","nextStep"],[3,"data","flowName","packId","userId","requestID","texts"],[3,"data","texts","solicitud","retry","newRequest"],[3,"solicitud","data","texts","nextStep"],[3,"solicitud","data","texts","retry"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"],[3,"flow","requestStatus","accepted","cancelled"]],template:function(e,t){1&e&&(U.YNc(0,Fe,1,3,"vex-power-cert",0),U.YNc(1,it,3,2,"div",1),U.YNc(2,st,1,2,"vex-terms",2)),2&e&&(U.Q6J("ngIf",t.viewPowerTerms),U.xp6(1),U.Q6J("ngIf",t.data),U.xp6(1),U.Q6J("ngIf",t.showTermsDialog))},dependencies:[i.O5,u.lW,y.Ou,V.L,Q.L,W.q,ae,de,pe,Te,Se,Ie,Ee,Ye],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),rt=(0,D.gn)([(0,N.c)()],rt);let ct=class{constructor(e,t,n,i,s,r,o){this.cd=e,this.Activatedroute=t,this.utils=n,this.videoIDService=i,this.customizationService=s,this.notis=r,this.webhooksService=o,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.Activatedroute.params.subscribe((e=>{e&&e.idUser?(this.userId=e.idUser,this.setInitialData(this.userId)):this.loading=null,e&&e.packID&&(this.packId=e.packID)}),(e=>{this.loading=null})),"pro"!=R.N.env&&(Y(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),Y(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)}))),this.utils.setLoading(!1)}ngOnDestroy(){}setInitialData(e){this.customizationService.getCustomization(e).then((e=>{e&&(this.data=e,this.financiadorID=e.funder_id||"",this.cd.markForCheck()),this.loading=null}),(e=>{console.error(e),this.loading=null}))}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==R.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==R.N.env&&(e="wss://notifications.belender.net"),R.N.notificationsBaseUrl&&(e=R.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=null})))}showAlert(e,t){this.loading=null,this.notis.showAlert(e,t)}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.videoIDService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}setRequestStatus(e){this.solicitud.status_code=e}};function dt(e,t){if(1&e&&(U.TgZ(0,"div",6),U._UZ(1,"img",7),U.qZA()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("src",e.data.styles.logoUrl,U.LSH)}}function ut(e,t){if(1&e&&(U.TgZ(0,"div",8),U._UZ(1,"mat-progress-spinner",9),U.TgZ(2,"p",10),U._uU(3),U.qZA()()),2&e){const e=U.oxw(2);U.xp6(1),U.Q6J("value",e.spinnerValue)("mode",e.spinnerMode),U.xp6(2),U.Oqu(e.loading)}}function ht(e,t){if(1&e&&(U.TgZ(0,"div",1)(1,"div",2),U.YNc(2,dt,2,1,"div",3),U._UZ(3,"belender-fail-step",4),U.YNc(4,ut,4,3,"div",5),U.qZA()()),2&e){const e=U.oxw();U.xp6(1),U.Udp("background",e.data.styles.colors.background),U.xp6(1),U.Q6J("ngIf",e.data.styles.withLogo),U.xp6(1),U.Q6J("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud),U.xp6(1),U.Q6J("ngIf",e.loading&&!e.error)}}ct.ɵfac=function(e){return new(e||ct)(U.Y36(U.sBO),U.Y36(O.gz),U.Y36(Z.F),U.Y36(z),U.Y36(C.w),U.Y36(S.T),U.Y36(w.t))},ct.ɵcmp=U.Xpm({type:ct,selectors:[["belender-widget-videoid-success"]],inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud",flowName:"flowName"},features:[U._Bn([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:1,vars:1,consts:[["class","h-full widget-belender",4,"ngIf"],[1,"h-full","widget-belender"],[1,"h-full","w-full","flex-auto","p-0","md:p-3"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],[3,"data","texts"],["class","loading-wrapper animated fadeIn",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&U.YNc(0,lt,5,6,"div",0),2&e&&U.Q6J("ngIf",t.data)},dependencies:[i.O5,y.Ou,de],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),ct=(0,D.gn)([(0,N.c)()],ct);let pt=class{constructor(e,t,n,i,s,r,o){this.cd=e,this.Activatedroute=t,this.utils=n,this.videoIDService=i,this.customizationService=s,this.notis=r,this.webhooksService=o,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.Activatedroute.params.subscribe((e=>{e&&e.idUser?(this.userId=e.idUser,this.setInitialData(this.userId)):this.loading=null,e&&e.packID&&(this.packId=e.packID)}),(e=>{this.loading=null})),"pro"!=R.N.env&&(Y(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),Y(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)}))),this.utils.setLoading(!1)}ngOnDestroy(){}setInitialData(e){this.customizationService.getCustomization(e).then((e=>{e&&(this.data=e,this.financiadorID=e.funder_id||"",this.cd.markForCheck()),this.loading=null}),(e=>{console.error(e),this.loading=null}))}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==R.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==R.N.env&&(e="wss://notifications.belender.net"),R.N.notificationsBaseUrl&&(e=R.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=null})))}showAlert(e,t){this.loading=null,this.notis.showAlert(e,t)}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.videoIDService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}setRequestStatus(e){this.solicitud.status_code=e}};pt.ɵfac=function(e){return new(e||pt)(U.Y36(U.sBO),U.Y36(O.gz),U.Y36(Z.F),U.Y36(z),U.Y36(C.w),U.Y36(S.T),U.Y36(w.t))},pt.ɵcmp=U.Xpm({type:pt,selectors:[["belender-widget-videoid-fail"]],inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud",flowName:"flowName"},features:[U._Bn([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:1,vars:1,consts:[["class","h-full widget-belender",4,"ngIf"],[1,"h-full","widget-belender"],[1,"h-full","w-full","flex-auto","p-0","md:p-3"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],[3,"data","texts","solicitud"],["class","loading-wrapper animated fadeIn",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&U.YNc(0,ht,5,7,"div",0),2&e&&U.Q6J("ngIf",t.data)},dependencies:[i.O5,y.Ou,pe],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),pt=(0,D.gn)([(0,N.c)()],pt);const mt=[{path:":idUser",component:rt},{path:":idUser/:packID",component:rt},{path:":idUser/:packID/success",component:ct},{path:":idUser/:packID/fail",component:pt}];let ft=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=U.oAB({type:e}),e.ɵinj=U.cJS({imports:[O.Bz.forChild(mt),O.Bz,L.d8]}),e})();var gt=n(6981),_t=n(3848),bt=n(1129),vt=n(1258),yt=n(3295),wt=n(2266),xt=n(3300),Ct=n(865);let kt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=U.oAB({type:e}),e.ɵinj=U.cJS({providers:[_.M,v.o,C.w,w.t,S.T,E.t,{provide:T.Ad,useValue:"es-ES"}],imports:[ft,i.ez,s.G,r.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,x.c,p.u5,m.AV,p.UX,f.LD,g.vV,b.a,y.Cq,k.FA,T.XK,M.T5,I.Fk,gt.x,_t.Nh,bt.n,vt.H,yt.g,wt.L,xt.C,Ct.q]}),e})()},5469:(e,t,n)=>{n.d(t,{B:()=>b});var i=n(7582),s=n(9933),r=n(8259),o=n(4650),a=n(5089),l=n(7367),c=n(8460),d=n(9299),u=n(9045),h=n(6895),p=n(2237),m=n(9199);const f=["widgetCard"];function g(e,t){1&e&&(o.ynx(0),o._UZ(1,"router-outlet"),o.BQk())}const _=function(e){return{"margin-top":e}};let b=class{constructor(e,t,n,i,s){this.utils=e,this.customizationService=t,this.customizationStoreService=n,this.router=i,this.deviceInfoService=s,this.type="",this.widgetHeight=0,this.warningsSpace=0,this.isScaled=!1,this.funderConfigLoaded=!1,this.funderStylesLoaded=!1}ngOnInit(){this.getWindowsScreenOrientation(),this.utils.getWarningsSpaces().subscribe((e=>{this.warningsSpace=e}));let e=this.router.url.split("/");this.userId=e.length&&e.some((e=>"smspin"===e))?e&&e.length&&e[e.length-3]?e[e.length-3]:"":e&&e.length&&e[e.length-2]?e[e.length-2]:"",this.packId=e.length&&e.some((e=>"smspin"===e))?e&&e.length&&e[e.length-2]?e[e.length-2]:"":e&&e.length&&e[e.length-1]?e[e.length-1]:"";let t=this.packId.split("?");t&&t.length&&(this.packId=t[0]),this.userId&&(this.customizationStoreService.setUserID(this.userId),this.setCustomization()),this.packId&&this.customizationStoreService.setPackID(this.packId)}ngDoCheck(){this.getWidgetCardHeight()}ngOnDestroy(){window.screen&&window.screen.orientation&&this.orientationChangeHandler&&window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}ngAfterViewInit(){r("body").css("background","transparent"),r("body").css("background-color","transparent")}getWindowsScreenOrientation(){window.addEventListener("resize",(()=>{this.widgetHeight=this.widgetCard.nativeElement.offsetHeight,this.isScaled&&(this.widgetHeight=1.5*this.widgetHeight),this.sendMessageToParent({type:"widgetHeight",data:this.widgetHeight})})),window.screen&&window.screen.orientation?(this.orientationChangeHandler=()=>{this.getWidgetCardHeight()},window.screen.orientation.addEventListener("change",this.orientationChangeHandler)):console.warn("Screen Orientation API not supported.")}getWidgetCardHeight(){this.widgetCard&&this.widgetHeight!=this.widgetCard.nativeElement.offsetHeight&&(this.widgetHeight=this.widgetCard.nativeElement.offsetHeight,this.isScaled$=this.deviceInfoService.isScaled$.subscribe((e=>{this.isScaled=e,this.isScaled&&(this.widgetHeight=1.5*this.widgetHeight)})),this.sendMessageToParent({type:"widgetHeight",data:this.widgetHeight}))}sendMessageToParent(e){window.top.postMessage(e,"*")}setCustomization(){this.customizationService.getFunderConfig(this.userId).then((e=>{this.customizationStoreService.setFunderConfig(e.data),this.funderConfigLoaded=!0})).catch((e=>{console.log("🚀 ~ WidgetComponent ~ this.customizationService.getCustomization ~ e:",e)})),this.customizationService.getFunderStyles(this.userId).then((e=>{this.customizationStoreService.setFunderStyles(e.data),this.funderStylesLoaded=!0})).catch((e=>{console.log("🚀 ~ WidgetComponent ~ this.customizationService.getCustomization ~ e:",e)}))}};b.ɵfac=function(e){return new(e||b)(o.Y36(a.F),o.Y36(l.w),o.Y36(c.r),o.Y36(d.F0),o.Y36(u.H))},b.ɵcmp=o.Xpm({type:b,selectors:[["belender-widget"]],viewQuery:function(e,t){if(1&e&&o.Gf(f,5),2&e){let e;o.iGM(e=o.CRH())&&(t.widgetCard=e.first)}},inputs:{type:"type"},decls:4,vars:4,consts:[[1,"belender-page-layout","h-auto","p-0","md:p-4","overflow-y-visible",3,"ngStyle"],[1,"h-auto","overflow-y-visible","content-layout","overflow-x-hidden","content-widget","p-0","md:p-3"],["widgetCard",""],[4,"ngIf"]],template:function(e,t){1&e&&(o.TgZ(0,"vex-page-layout",0)(1,"vex-page-layout-content",1,2),o.YNc(3,g,2,0,"ng-container",3),o.qZA()()),2&e&&(o.Q6J("ngStyle",o.VKq(2,_,t.warningsSpace+"px")),o.xp6(3),o.Q6J("ngIf",t.funderConfigLoaded&&t.funderStylesLoaded))},dependencies:[h.O5,h.PC,d.lC,p.w,m.d],styles:[".badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.card[_ngcontent-%COMP%]{margin:0 auto;max-width:440px}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.content-layout[_ngcontent-%COMP%]{max-height:none;max-height:initial;overflow-y:auto;padding:0!important}.belender-page-layout[_ngcontent-%COMP%]{padding:0!important}"]}),b=(0,i.gn)([(0,s.c)()],b)},2932:(e,t,n)=>{function i(e={}){return t=>{const n=t.value;if(!n)return null;const i=n.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(e.checkFormat&&!i)return{invalidFormat:!0};if(!i)return null;const s=parseInt(i[1],10),r=parseInt(i[2],10)-1,o=parseInt(i[3],10),a=new Date(o,r,s);if(e.checkDate&&(a.getFullYear()!==o||a.getMonth()!==r||a.getDate()!==s))return{invalidDate:!0};if(e.checkAge){const e=new Date;let t=e.getFullYear()-o;const n=e.getMonth()-r;if((n<0||0===n&&e.getDate()<s)&&t--,t<18)return{underAge:!0}}return null}}n.d(t,{s:()=>i})},9382:(e,t,n)=>{n.d(t,{i:()=>p});var i=n(4650),s=n(8135),r=n(5601),o=n(5895),a=n(6895),l=n(3731);function c(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",4),i.NdJ("click",(function(){i.CHM(e);const t=i.oxw(2);return i.KtG(t.goToCancelRequest())})),i.ALo(1,"safeHtml"),i.qZA()}if(2&e){const e=i.oxw(2);i.Udp("color",e.textColor),i.Q6J("innerHTML",i.lcZ(1,3,e.customText),i.oJD)}}function d(e,t){if(1&e&&(i.TgZ(0,"div",5),i._uU(1),i.qZA()),2&e){const e=i.oxw(2);i.xp6(1),i.hij(" ",e.labels.loadings.cancelingRequest,"\n")}}const u=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};function h(e,t){if(1&e&&(i.TgZ(0,"div",1),i.YNc(1,c,2,5,"div",2),i.YNc(2,d,2,1,"div",3),i.qZA()),2&e){const e=i.oxw();i.Q6J("ngClass",i.kEZ(3,u,"left"===e.data.styles.alignButtons,"center"===e.data.styles.alignButtons,"right"===e.data.styles.alignButtons||!e.data.styles.alignButtons)),i.xp6(1),i.Q6J("ngIf",!e.loading),i.xp6(1),i.Q6J("ngIf",e.loading)}}let p=(()=>{class e{constructor(e,t,n){this.smsComponent=e,this.solicitudesService=t,this.notis=n,this.customText="",this.textColor="",this.flowType="SMS",this.updateStatusCode=new i.vpe,this.requestType="sms",this.loading=!1}goToCancelRequest(){this.loading=!0;const e={request_id:this.request_id,user_id:this.user_id};this.requestType="ClavePin"===this.flowType?"clave-pin":"sms",this.solicitudesService.cancelRequest(e,this.requestType).then((e=>{e&&e.data&&("SMS"===this.flowType?this.setSmsCancel("consent_process_canceled"):this.updateStatusCode.emit("consent_process_canceled")),e.message&&this.showAlert(e.status?this.capitalizeFirstLetter(e.status)+"!":"Aviso!",e.message),setTimeout((()=>{this.loading=!1}),1e3)})).catch((e=>{this.loading=!1,this.showAlert("Error!",e.message||e)}))}capitalizeFirstLetter(e){return"string"!=typeof e||0===e.length?e:e.charAt(0).toUpperCase()+e.slice(1)}showAlert(e,t){this.notis.showAlert(e,t)}setSmsCancel(e){this.smsComponent.setRequestStatus(e),this.smsComponent.setStatus()}}return e.ɵfac=function(t){return new(t||e)(i.Y36(s.T,9),i.Y36(r.M),i.Y36(o.T))},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-cancel-request"]],inputs:{data:"data",customText:"customText",textColor:"textColor",flowType:"flowType",request_id:"request_id",user_id:"user_id",labels:"labels"},outputs:{updateStatusCode:"updateStatusCode"},decls:1,vars:1,consts:[["class","flex",3,"ngClass",4,"ngIf"],[1,"flex",3,"ngClass"],["class","subheading-1 px-2 text-right underline cursor-pointer custom-html",3,"color","innerHTML","click",4,"ngIf"],["class","subheading-1 px-2 text-right text-orange-500 custom-html",4,"ngIf"],[1,"subheading-1","px-2","text-right","underline","cursor-pointer","custom-html",3,"innerHTML","click"],[1,"subheading-1","px-2","text-right","text-orange-500","custom-html"]],template:function(e,t){1&e&&i.YNc(0,h,3,7,"div",0),2&e&&i.Q6J("ngIf",t.data&&t.data.styles)},dependencies:[a.mk,a.O5,l.z]}),e})()},9112:(e,t,n)=>{n.d(t,{y:()=>Y});var i=n(5861),s=n(4650),r=n(4006),o=n(8259),a=n(2440),l=n(5762),c=n(2340),d=n(8135),u=n(5089),h=n(2254),p=n(5601),m=n(8460),f=n(1742),g=n(6895),_=n(9101),b=n(3046),v=n(3731);function y(e,t){if(1&e&&s._UZ(0,"belender-widget-logo",14),2&e){const e=s.oxw();s.Q6J("firstOption",e.logoCustom)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function w(e,t){if(1&e&&s._UZ(0,"div",15),2&e){const e=s.oxw();s.Udp("color",null==e.data.styles?null:e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),s.Q6J("innerHTML",e.texts[e.otpType].title,s.oJD)}}function x(e,t){if(1&e&&(s._UZ(0,"div",16),s.ALo(1,"safeHtml")),2&e){const e=s.oxw();s.Udp("color",null==e.data.styles?null:e.data.styles.colors.text),s.Q6J("innerHTML",s.lcZ(1,3,null==e.texts[e.otpType]?null:e.texts[e.otpType].description),s.oJD)}}function C(e,t){if(1&e&&(s.ynx(0),s._uU(1),s.BQk()),2&e){const e=s.oxw(2);s.xp6(1),s.hij(" ",e.labels?e.labels.otp.requestingOtp:"Estamos solicitando el código. Por favor, espere un momento."," ")}}function k(e,t){if(1&e&&(s.ynx(0),s._uU(1),s.BQk()),2&e){const e=s.oxw(2);s.xp6(1),s.AsE(" ",e.labels?e.labels.otp.otpSentToNumber:"El código ha sido enviado al teléfono acabado en"," ",e.lastThreeNumbersPhone,". ")}}function T(e,t){if(1&e&&(s.ynx(0),s._uU(1),s.BQk()),2&e){const e=s.oxw(2);s.xp6(1),s.hij(" ",e.labels?e.labels.otp.requestingCode:"Estamos solicitando el código. Por favor, espere un momento."," ")}}const S=function(e,t,n){return{color:e,border:t,background:n}};function M(e,t){if(1&e&&(s.ynx(0),s.TgZ(1,"small",17),s.YNc(2,C,2,1,"ng-container",6),s.YNc(3,k,2,2,"ng-container",6),s.YNc(4,T,2,1,"ng-container",6),s.qZA(),s.BQk()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngStyle",s.kEZ(4,S,null==e.data.styles?null:e.data.styles.colors.accentColor,"1px solid "+(null==e.data.styles?null:e.data.styles.colors.accentColor),null==e.data.styles?null:e.data.styles.colors.accentBgColor)),s.xp6(1),s.Q6J("ngIf",!e.lastThreeNumbersPhone),s.xp6(1),s.Q6J("ngIf",e.lastThreeNumbersPhone&&!(null!=e.data.config&&e.data.config.noRetryInBadPhone)),s.xp6(1),s.Q6J("ngIf",e.lastThreeNumbersPhone&&(null==e.data.config?null:e.data.config.noRetryInBadPhone))}}function I(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.hij(" ",e.labels?e.labels.otp.noReceivedCode:"¿No has recibido el código en tu teléfono?"," ")}}function E(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.AsE("",e.labels?e.labels.otp.noReceivedCode2:"¿No has recibido el código en el teléfono acabado en"," ",e.lastThreeNumbersPhone,"? ")}}function O(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.hij(" ",e.labels?e.labels.otp.noReceivedCode:"¿No has recibido el código en tu teléfono?"," ")}}const L=function(e,t){return{color:e,background:t}};function P(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"a",20),s.NdJ("click",(function(){s.CHM(e);const t=s.oxw(2);return s.KtG(t.resendOTP())})),s._uU(1),s.qZA()}if(2&e){const e=s.oxw(2);s.Q6J("ngStyle",s.WLB(2,L,null==e.data.styles?null:e.data.styles.colors.dangerTextButtonColor,null==e.data.styles?null:e.data.styles.colors.dangerColor)),s.xp6(1),s.hij(" ",e.labels?e.labels.actions.resend:"Reenviar"," ")}}function D(e,t){if(1&e&&(s.ynx(0),s.TgZ(1,"small",18),s.YNc(2,I,2,1,"span",6),s.YNc(3,E,2,2,"span",6),s.YNc(4,O,2,1,"span",6),s.YNc(5,P,2,5,"a",19),s.qZA(),s.BQk()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngStyle",s.kEZ(5,S,null==e.data.styles?null:e.data.styles.colors.dangerColor,"1px solid "+(null==e.data.styles?null:e.data.styles.colors.dangerColor),null==e.data.styles?null:e.data.styles.colors.dangerBgColor)),s.xp6(1),s.Q6J("ngIf",!e.lastThreeNumbersPhone),s.xp6(1),s.Q6J("ngIf",e.lastThreeNumbersPhone&&!(null!=e.data.config&&e.data.config.noRetryInBadPhone)),s.xp6(1),s.Q6J("ngIf",null==e.data.config?null:e.data.config.noRetryInBadPhone),s.xp6(1),s.Q6J("ngIf",!e.secondTry)}}function A(e,t){if(1&e&&(s.TgZ(0,"div",21)(1,"strong",22),s._uU(2),s.qZA(),s.TgZ(3,"span",23),s._uU(4),s.qZA()()),2&e){const e=s.oxw();s.xp6(2),s.Oqu(e.labels.warnings.error||"Error"),s.xp6(2),s.Oqu(e.otpErrorMessage)}}const N=function(e,t){return{length:e,allowNumbersOnly:t}},q=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let Y=(()=>{class e{constructor(e,t,n,i,r,o,a,l){this.smsComponent=e,this.fb=t,this.utils=n,this.smsFlowService=i,this.solicitudesService=r,this.cd=o,this.customizationStoreService=a,this.pinUtils=l,this.minLength=3,this.logoCustom="",this.next=new s.vpe(null),this.errPhone=new s.vpe(null),this.resendO=new s.vpe(null),this.secsCount=60,this.secondTry=!1,this.timerIsRunning=!1,this.env=c.N.env,this.otpErrorMessage=""}ngOnInit(){this.packId=this.customizationStoreService.PACK_ID,this.userId=this.customizationStoreService.USER_ID,this.labels=this.pinUtils.labels,this.form=this.fb.group({code1:[null,[r.kI.required,r.kI.maxLength(6),r.kI.minLength(this.minLength)]]}),this.subsPhone=this.pinUtils.lastThreeNumbersPhone$.subscribe((e=>{this.lastThreeNumbersPhone=e})),this.subsPhone=this.pinUtils.lastThreeNumbersPhone$.subscribe((e=>{this.lastThreeNumbersPhone=e})),"SMS"==this.flowType&&this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}ngOnDestroy(){this.subsPhone&&this.subsPhone.unsubscribe()}resetOtpNumber(){this.form.get("code1").setValue(""),this.ngOtpInput.setValue("")}ngOnChanges(e){e.otpType&&!e.otpType.previousValue&&(this.secsCount="otpAEAT"==e.otpType?.currentValue||"otpIRS"==e.otpType?.currentValue?300:60,this.initSecsInterval())}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastThreeNumbersPhone=t}initSecsInterval(){this.timerIsRunning||(this.interv=setInterval((()=>{this.timerIsRunning=!0,this.secsCount=this.secsCount-1,this.secsRemaining=this.getRemaining(),this.secsCount<=0&&this.finishSecsInterval()}),1e3))}getRemaining(){let e=Math.floor(this.secsCount/60),t=this.secsCount%60;return this.addZero(e)+":"+this.addZero(t)}addZero(e){return e>=10?e:"0"+e}finishSecsInterval(){this.timerIsRunning=!1,this.interv&&clearInterval(this.interv)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){var t=this;return(0,i.Z)((function*(){t.form.get("code1").setValue(e)}))()}setInputEvent(e){""!=e.target.value?o(e.target).next().focus():"Backspace"==e.code&&o(e.target).prev().focus()}nextStep(){let e={code:this.getCode()};"SMS"===this.flowType?this.requestSmsOTP(e):this.next.emit(e)}resendOTP(){this.secondTry=!0,this.initSecsInterval(),"SMS"===this.flowType?this.requestSmsOTP(!0):this.resendO.emit(!0)}requestSmsOTP(e){this.smsFlowService.setLoading(this.labels.loadings.sendingData),this.testMode?setTimeout((()=>{this.smsFlowService.setRequest(new l.l),this.smsComponent.setRequestStatus("all_documents_downloaded"),this.smsComponent.setStatus(),this.smsFlowService.setLoading(!1)}),2e3):this.solicitudesService.sendOTP({request_id:this.requestID,user_id:this.userId,code:e.code}).then((e=>{e.status&&"error"==e.status?(this.otpErrorMessage=e.message&&"Invalid request status: waiting_login_seguridad_social"==e.message?this.labels.warnings.noOtp:e.message?e.message:e,this.smsFlowService.setLoading(!1)):e&&"success"==e.status&&(this.smsComponent.handleRequestStatus(e.data||e),this.cd.markForCheck())})).catch((e=>{e&&e.error&&(this.otpErrorMessage=e.error),this.smsFlowService.setLoading(!1)})),this.resetOtpNumber()}resendSmsOTP(e){let t={request_id:(this.smsFlowService.REQUEST&&this.smsFlowService.REQUEST.request_id?this.smsFlowService.REQUEST.request_id:this.requestID)||e,user_id:this.userId};this.smsFlowService.setLoading(this.labels.loadings.resendingOtp),this.smsFlowService.setSubscriptionOfRequest(),this.solicitudesService.resendOTP(t).then((e=>{e&&e.data&&(this.smsFlowService.setRequest(e.data),this.smsComponent.setStatus()),this.smsFlowService.setLoading(!1)})).catch((e=>{console.error(e),this.otpErrorMessage=e.error,this.smsFlowService.setLoading(!1)})),this.resetOtpNumber()}}return e.ɵfac=function(t){return new(t||e)(s.Y36(d.T,9),s.Y36(r.QS),s.Y36(u.F),s.Y36(h.p),s.Y36(p.M),s.Y36(s.sBO),s.Y36(m.r),s.Y36(f._))},e.ɵcmp=s.Xpm({type:e,selectors:[["belender-shared-otp-step"]],viewQuery:function(e,t){if(1&e&&s.Gf(a.df,5),2&e){let e;s.iGM(e=s.CRH())&&(t.ngOtpInput=e.first)}},inputs:{data:"data",texts:"texts",lastThreeNumbersPhone:"lastThreeNumbersPhone",otpType:"otpType",minLength:"minLength",flowType:"flowType",logoCustom:"logoCustom",labels:"labels",requestID:"requestID",testMode:"testMode",solicitud:"solicitud"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},features:[s.TTD],decls:17,vars:27,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-1","flex","flex-col"],["id","otpTitle","class","title m-0",3,"color","font-size","innerHTML",4,"ngIf"],["id","otpDescription","class","subheading-1 pt-4",3,"color","innerHTML",4,"ngIf"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","w-full","flex-col","gap-2","py-2"],[1,"subheading-1","py-1","custom-html"],[3,"config","onInputChange"],["ngOtpInput",""],["class","bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative","role","alert",4,"ngIf"],[1,"flex","items-center","gap-2","py-4","flex-col","md:flex-row",3,"ngClass"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"firstOption","logoUrl"],["id","otpTitle",1,"title","m-0",3,"innerHTML"],["id","otpDescription",1,"subheading-1","pt-4",3,"innerHTML"],["id","secsCountContainer",1,"info-time","w-full",3,"ngStyle"],[1,"info-time","w-full",3,"ngStyle"],["id","resendOTPButton","class","ml-4",3,"ngStyle","click",4,"ngIf"],["id","resendOTPButton",1,"ml-4",3,"ngStyle","click"],["role","alert",1,"bg-red-100","border","border-red-400","text-red-700","px-4","py-3","rounded","relative"],[1,"font-bold"],[1,"block","sm:inline"]],template:function(e,t){1&e&&(s.YNc(0,y,1,2,"belender-widget-logo",0),s.TgZ(1,"form",1)(2,"div",2),s.YNc(3,w,1,5,"div",3),s.YNc(4,x,2,5,"div",4),s.TgZ(5,"div",5),s.YNc(6,M,5,8,"ng-container",6),s.YNc(7,D,6,9,"ng-container",6),s.qZA(),s.TgZ(8,"div",7)(9,"p",8),s._uU(10),s.qZA(),s.TgZ(11,"ng-otp-input",9,10),s.NdJ("onInputChange",(function(e){return t.capturePasteEvent(e)})),s.qZA()()(),s.YNc(13,A,5,2,"div",11),s.TgZ(14,"div",12)(15,"button",13),s.NdJ("click",(function(){return t.nextStep()})),s._uU(16),s.qZA()()()),2&e&&(s.Q6J("ngIf",null==t.data.styles?null:t.data.styles.withLogo),s.xp6(1),s.Q6J("formGroup",t.form),s.xp6(2),s.Q6J("ngIf",t.texts&&(null==t.texts[t.otpType]?null:t.texts[t.otpType].title)&&""!=(null==t.texts[t.otpType]?null:t.texts[t.otpType].title)),s.xp6(1),s.Q6J("ngIf",t.texts&&(null==t.texts[t.otpType]?null:t.texts[t.otpType].description)&&""!=(null==t.texts[t.otpType]?null:t.texts[t.otpType].description)),s.xp6(2),s.Q6J("ngIf",t.secsCount&&t.secsCount>0),s.xp6(1),s.Q6J("ngIf",!t.secsCount||t.secsCount<=0),s.xp6(2),s.Udp("color",t.data.styles.colors.text),s.xp6(1),s.hij(" ",t.labels?t.labels.otp.otpCode:"Código OTP (recibido por SMS)"," "),s.xp6(1),s.Q6J("config",s.WLB(20,N,t.minLength,"qa"!=t.env&&"dev"!=t.env)),s.xp6(2),s.Q6J("ngIf",""!=t.otpErrorMessage&&""===t.form.get("code1").value),s.xp6(1),s.Q6J("ngClass",s.kEZ(23,q,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),s.xp6(1),s.Udp("color",null==t.data.styles?null:t.data.styles.colors.btnText)("background",t.form.invalid?"":null==t.data.styles?null:t.data.styles.colors.btnBg)("border-radius",(null==t.data.styles?null:t.data.styles.btnRound)+"px"),s.Q6J("disabled",t.form.invalid),s.xp6(1),s.hij(" ",t.labels?t.labels.actions.next:"Siguiente"," "))},dependencies:[g.mk,g.O5,g.PC,_.lW,r._Y,r.JL,r.sg,a.df,b.X,v.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.code-wrapper[_ngcontent-%COMP%]{padding:5px;height:50px}.code-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:40px;min-width:136px;border-radius:6px;border:1px solid rgba(0,0,0,.1);text-transform:uppercase;text-align:left;font-weight:700;transition:all .3s ease;outline:1px solid transparent;letter-spacing:12px;padding:0 18px}.code-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:hover{background:#fcfcfc;border:1px solid rgba(0,0,0,.2);transition:all .3s ease}.code-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:1px solid #4e98d0;border:1px solid #4e98d0}.info-time[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:7px 10px;min-height:40px;font-size:14px;line-height:14px;border-radius:5px;border-width:1px;border-style:solid;margin:10px 0}.info-time[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:14px;line-height:24px;padding:0 10px;border-radius:5px;cursor:pointer;transition:all .2s ease}@media (max-width: 576px){.info-time[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:0 20px}}"]}),e})()},5696:(e,t,n)=>{n.d(t,{T:()=>c});var i=n(4650),s=n(7403),r=n(5412),o=n(7308),a=n(6895);function l(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"span"),i._uU(1),i.TgZ(2,"a",0),i.NdJ("click",(function(t){i.CHM(e);const n=i.oxw();return i.KtG(n.gotoLegalDocument(t))})),i.TgZ(3,"u"),i._uU(4),i.qZA()()()}if(2&e){const e=i.oxw();i.xp6(1),i.hij(" ",e.parts.p3," "),i.xp6(3),i.Oqu(e.parts.a2)}}let c=(()=>{class e{constructor(e,t){this.dialog=e,this.translationService=t,this.goTerms=new i.vpe(null),this.customTerms=!1,this.lang="",this.parts={p1:"He leído y acepto los",p2:"del servicio",p3:"y la",a1:"términos y condiciones",a2:"política de privacidad"},this.translatedParts={ca:{p1:"He llegit i accepto els",p2:"del servei",p3:"i la",a1:"termes i condicions",a2:"política de privacitat"},en:{p1:"I have read and accept the",p2:"of the service",p3:"and the",a1:"terms and conditions",a2:"privacy policy"},fr:{p1:"J'ai lu et j'accepte les",p2:"du service",p3:"et la",a1:"conditions générales",a2:"politique de confidentialité"},it:{p1:"Ho letto e accetto i",p2:"del servizio",p3:"e la",a1:"termini e condizioni",a2:"informativa sulla privacy"},pt:{p1:"Li e aceito os",p2:"do serviço",p3:"e a",a1:"termos e condições",a2:"política de privacidade"},de:{p1:"Ich habe die",p2:"des Dienstes gelesen und akzeptiere sie",p3:"sowie die",a1:"Nutzungsbedingungen",a2:"Datenschutzrichtlinie"}}}ngOnInit(){this.parts={p1:this.getPart(this.firstSentence,"p1"),p2:this.getPart(this.secondSentence,"p2"),p3:this.getPart(this.thirdSentence,"p3"),a1:this.getPart(this.termsActionText,"a1"),a2:this.getPart(this.policyActionText,"a2")}}getPart(e,t){return e||(this.data&&this.lang&&this.translatedParts[this.lang]?this.translatedParts[this.lang][t]||this.parts[t]||"":this.parts[t]||"")}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.goTerms.emit(e)}gotoLegalDocument(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(s.N,{panelClass:"fullscreen-dialog",data:{lang:this.lang,allData:this.data,flow:this.flowName}})}}return e.ɵfac=function(t){return new(t||e)(i.Y36(r.uw),i.Y36(o.D))},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-terms-and-policy-links"]],inputs:{userId:"userId",showPolicyLink:"showPolicyLink",firstSentence:"firstSentence",secondSentence:"secondSentence",thirdSentence:"thirdSentence",policyActionText:"policyActionText",termsActionText:"termsActionText",customTerms:"customTerms",lang:"lang",data:"data",flowName:"flowName"},outputs:{goTerms:"goToTerms"},decls:6,vars:4,consts:[["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],[4,"ngIf"]],template:function(e,t){1&e&&(i._uU(0),i.TgZ(1,"a",0),i.NdJ("click",(function(e){return t.gotoTermsAndConditions(e)})),i.TgZ(2,"u"),i._uU(3),i.qZA()(),i._uU(4),i.YNc(5,l,5,2,"span",1)),2&e&&(i.hij(" ",t.parts.p1," "),i.xp6(3),i.Oqu(t.parts.a1),i.xp6(1),i.hij(" ",t.parts.p2," "),i.xp6(1),i.Q6J("ngIf",t.showPolicyLink))},dependencies:[a.O5]}),e})()},3046:(e,t,n)=>{n.d(t,{X:()=>a});var i=n(4650),s=n(6895);function r(e,t){1&e&&i._UZ(0,"div",4)}const o=function(e){return{display:e}};let a=(()=>{class e{constructor(){this.logoUrl="",this.firstOption=this.logoUrl,this.logoUrlIsLoaded=!1}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=i.Xpm({type:e,selectors:[["belender-widget-logo"]],inputs:{logoUrl:"logoUrl",firstOption:"firstOption"},decls:4,vars:5,consts:[[1,"img-wrapper","p-4","flex","justify-center","items-center"],["class","animated-bg h-full w-full",4,"ngIf"],[1,"img-card",3,"src","ngStyle","load"],["img",""],[1,"animated-bg","h-full","w-full"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0),i.YNc(1,r,1,0,"div",1),i.TgZ(2,"img",2,3),i.NdJ("load",(function(){return t.logoUrlIsLoaded=!0})),i.qZA()()),2&e&&(i.xp6(1),i.Q6J("ngIf",!t.logoUrlIsLoaded),i.xp6(1),i.Q6J("src",t.firstOption||t.logoUrl,i.LSH)("ngStyle",i.VKq(3,o,t.logoUrlIsLoaded?"block":"none")))},dependencies:[s.O5,s.PC],styles:[".img-wrapper[_ngcontent-%COMP%]{max-height:240px}.img-wrapper[_ngcontent-%COMP%] .img-card[_ngcontent-%COMP%], .img-wrapper[_ngcontent-%COMP%] .animated-bg[_ngcontent-%COMP%]{max-width:240px;max-height:240px}"]}),e})()},5762:(e,t,n)=>{n.d(t,{l:()=>i});class i{constructor(){this.status_code="created"}}},3731:(e,t,n)=>{n.d(t,{z:()=>r});var i=n(4650),s=n(1481);let r=(()=>{class e{constructor(e){this.sanitized=e}transform(e){return this.sanitized.bypassSecurityTrustHtml(e)}}return e.ɵfac=function(t){return new(t||e)(i.Y36(s.H7,16))},e.ɵpipe=i.Yjl({name:"safeHtml",type:e,pure:!0}),e})()},9391:(e,t,n)=>{n.d(t,{o:()=>l});var i=n(7396),s=n(8829),r=n(2340),o=n(4650),a=n(6554);let l=(()=>{class e{constructor(e){this.localFetch=e}getAttachmentsOld(e){return new Promise(((t,n)=>{const r=(0,i.IO)((0,i.hJ)(s.db,"solicitudes"),(0,i.ar)("id","==",e),(0,i.b9)(1));(0,i.cf)(r,(e=>{let n;e.forEach((e=>{n=e.data().attachments})),t(n)}),(e=>{n(e)}))}))}getAttachments(e){return new Promise(((t,n)=>{this.localFetch.getFetch(`${r.N.baseUrl}/requests/${e}/documents`).then((e=>{e?t(e):n("No hay archivos asignados a esta solicitud..")})).catch((e=>{n(e)}))}))}uploadFile(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(`${r.N.baseUrl}/documents/upload-files`,e).then((e=>{e?t(e):n("No se pudieron subir los documentos..")})).catch((e=>{n(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(o.LFG(a.r))},e.ɵprov=o.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},7489:(e,t,n)=>{n.d(t,{v:()=>l});var i=n(2340),s=n(4650),r=n(5089),o=n(1742),a=n(6554);let l=(()=>{class e{constructor(e,t,n){this.utils=e,this.pinUtils=t,this.localFetch=n}getSolicitudes(){return this.localFetch.getFetch(i.N.baseUrl+"/requests")}getSolicitudByCode(e){return this.localFetch.freeGetFetch(i.N.baseUrl+"/requests/"+e)}noMatchPhone(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/cancel",e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin",e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}checkService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/check-service",e).then((e=>{this.pinUtils.sendMessageToParent(400===e.code?{type:"response",data:{...e.response,status_code:"no_clave_pin_service"}}:{type:"response",data:e.data||e}),t(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}setNoService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/no-service",e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/terms",e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}getNewIdOfRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/"+e+"/get-new-id",{}).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}retryRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/retry",e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}resendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/resend-otp",e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):n(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),n(e)}))}))}fixData(e,t){return new Promise(((n,s)=>{this.localFetch.putFetchWhitoutToken(`${i.N.baseUrl}/requests/${e}/person`,t).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?n(e):s(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),s(e)}))}))}sendOTP(e,t){let n="/requests/clave-pin/otp";return(i.N.scraperMock||t)&&(n="/mockscrapper/requests/clave-pin/otp"),new Promise(((t,s)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+n,e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):s(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),s(e)}))}))}sendOTPToBde(e,t){let n="/requests/cirbe-cp/otp";return(i.N.scraperMock||t)&&(n="/mockscrapper/requests/cirbe-cp/otp"),new Promise(((t,s)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+n,e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?t(e):s(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),s(e)}))}))}sendSecondTask(e){let t="/requests/clave-pin/secondTask";return i.N.scraperMock&&(t="/mockscrapper/requests/clave-pin/secondTask"),new Promise(((n,s)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+t,e).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?n(e):s(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),s(e)}))}))}sendLinkBySms(e,t){return new Promise(((n,s)=>{this.localFetch.postFetch(`${i.N.baseUrl}/requests/${e}/send-link-sms`,t).then((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),e?n(e):s(e)})).catch((e=>{this.pinUtils.sendMessageToParent({type:"response",data:e.data||e}),s(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(s.LFG(r.F),s.LFG(o._),s.LFG(a.r))},e.ɵprov=s.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},5206:(e,t,n)=>{n.d(t,{s:()=>l});var i=n(6197),s=n(2340),r=n(4650),o=n(5089),a=n(6554);let l=(()=>{class e{constructor(e,t){this.utils=e,this.localFetch=t,this.db=(0,i.N8)()}getFlows(){return new Promise(((e,t)=>{this.localFetch.getFetch(s.N.baseUrl+"/flows").then((n=>{n?e(n):t(!1)}),(e=>{t(!1)}))}))}getFlowsByUserID(e){return new Promise(((t,n)=>{const s=(0,i.iH)((0,i.N8)());(0,i.U2)((0,i.iU)(s,`documents/flows/${e}`)).then((e=>{e.exists()?t(e.val()):n("No data!")})).catch((e=>{console.error(e),n("Error!: "+e)}))}))}}return e.ɵfac=function(t){return new(t||e)(r.LFG(o.F),r.LFG(a.r))},e.ɵprov=r.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},9617:(e,t,n)=>{n.d(t,{U:()=>l});var i=n(2340),s=n(4650),r=n(5089),o=n(529),a=n(6554);let l=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getPackagesByUserID(e){return new Promise(((t,n)=>{this.localFetch.getFetchWhitoutToken(i.N.baseUrl+"/users/"+e+"/pack-documents").then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}getPacksByPackId(e){return new Promise(((t,n)=>{this.localFetch.getFetchWhitoutToken(i.N.baseUrl+"/pack-documents/"+e).then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}getFlowPackagesByUserID(e,t){}}return e.ɵfac=function(t){return new(t||e)(s.LFG(r.F),s.LFG(o.eN),s.LFG(a.r))},e.ɵprov=s.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},5601:(e,t,n)=>{n.d(t,{M:()=>l});var i=n(2340),s=n(4650),r=n(5089),o=n(529),a=n(6554);let l=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getSolicitudes(){return this.localFetch.getFetch(i.N.baseUrl+"/requests")}getSolicitudByCode(e){return this.localFetch.freeGetFetch(i.N.baseUrl+"/requests/"+e)}setPhone(e,t){return new Promise(((n,s)=>{this.localFetch.putFetchWhitoutToken(`${i.N.baseUrl}/requests/${t}/person`,e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),n(e)):s(e)})).catch((e=>{s(e)}))}))}noPhone(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/no-phone",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}smsToPin(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms-clave",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}addSolicitud(e,t,n){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}setNoService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/no-service",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/terms",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}getNewIdOfRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/"+e+"/get-new-id",{}).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}checkService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/check-service",e).then((e=>{this.sendMessageToParent(400===e.code?{type:"response",data:{...e.response,status_code:"no_sms_service"}}:{type:"response",data:e.data||e}),t(e)})).catch((e=>{n(e)}))}))}retryRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/retry",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}resendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/resend-otp",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}fixData(e,t){return new Promise(((n,s)=>{this.localFetch.putFetchWhitoutToken(`${i.N.baseUrl}/requests/${e}/person`,t).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),n(e)):s(e)})).catch((e=>{s(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{let s="/requests/sms/otp";i.N.scraperMock&&(s="/mockscrapper/requests/sms/otp"),this.localFetch.postFetchWhitoutToken(i.N.baseUrl+s,e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}uploadFileFromWidget(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(i.N.baseUrl+"/documents/upload-files-from-widget",e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n(e)})).catch((e=>{n(e)}))}))}sendLinkBySms(e,t){return new Promise(((n,s)=>{this.localFetch.postFetch(`${i.N.baseUrl}/requests/${e}/send-link-sms`,t).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),n(e)):s(e)})).catch((e=>{s(e)}))}))}getDocuments(e){return new Promise(((t,n)=>{this.localFetch.getFetch(`${i.N.baseUrl}/requests/${e}/documents`).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n("No hay archivos asignados a esta solicitud..")})).catch((e=>{n(e)}))}))}getDocumentsIds(e){return new Promise(((t,n)=>{this.localFetch.getFetch(`${i.N.baseUrl}/requests/${e}/documents-ids-widget`).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),t(e)):n("No hay archivos asignados a esta solicitud..")})).catch((e=>{n(e)}))}))}cancelRequest(e,t){return new Promise(((n,s)=>{this.localFetch.postFetch(i.N.baseUrl+`/requests/${t}/cancel`,e).then((e=>{e?(this.sendMessageToParent({type:"response",data:e.data||e}),n(e)):s(e)})).catch((e=>{s(e)}))}))}sendMessageToParent(e){window.top.postMessage(e,"*")}}return e.ɵfac=function(t){return new(t||e)(s.LFG(r.F),s.LFG(o.eN),s.LFG(a.r))},e.ɵprov=s.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},5145:(e,t,n)=>{n.d(t,{Z:()=>i});const i=[{id:0,text:"error_clave_pin",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Error con la clave PIN"},{id:1,text:"failed_without_retry",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Fallo sin reintento"},{id:111,text:"failed_with_retry",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Fallo con reintento"},{id:2,text:"bad_phone",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Teléfono erróneo"},{id:3,text:"failed_documents_downloaded",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Fallo al descargar Documentos"},{id:4,text:"invalid_otp_aeat",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"OTP de AEAT inválido"},{id:5,text:"invalid_otp_seguridad_social",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"OTP de Seg. Social inválido"},{id:6,text:"max_entries_otp",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"not_interested",label:"Max intentos OTP"},{id:7,text:"abandoned_after_bad_phone",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"phonelink_erase",label:"Abandonado (bad phone)"},{id:8,text:"abandoned_after_terms",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (términos y condiciones)"},{id:9,text:"abandoned_after_invalid_otp_seguridad_social",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (invalid OTP SS)"},{id:10,text:"abandoned_after_invalid_otp_aeat",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (invalid OTP AEAT)"},{id:11,text:"abandoned_after_waiting_otp_aeat",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (waiting OTP AEAT)"},{id:12,text:"abandoned_after_waiting_otp_seguridad_social",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (waiting OTP SS)"},{id:13,text:"waiting_login_seguridad_social",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando login SS"},{id:14,text:"waiting_login_aeat",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando login AEAT"},{id:15,text:"waiting_otp_aeat",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando OTP AEAT"},{id:16,text:"waiting_otp_seguridad_social",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando OTP SS"},{id:17,text:"saved_otp",textClass:"text-purple",bgClass:"bg-purple-light",previewClass:"bg-purple",icon:"timelapse",label:"OTP guardado"},{id:171,text:"picked_up_otp",textClass:"text-purple",bgClass:"bg-purple-light",previewClass:"bg-purple",icon:"timelapse",label:"OTP recogido"},{id:18,text:"terms_and_conditions",textClass:"text-purple",bgClass:"bg-purple-light",previewClass:"bg-purple",icon:"timelapse",label:"Términos y condiciones"},{id:19,text:"waiting_documents",textClass:"text-cyan",bgClass:"bg-cyan-light",previewClass:"bg-cyan",icon:"hourglass_empty",label:"Esperando documentos"},{id:20,text:"created",textClass:"text-cyan",bgClass:"bg-cyan-light",previewClass:"bg-cyan",icon:"fiber_new",label:"Solicitud creada"},{id:21,text:"all_documents_downloaded",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"check_circle",label:"Todo los documentos descargados"},{id:22,text:"partial_documents_downloaded",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"check_circle",label:"Algunos Documentos descargados"},{id:23,text:"parcial_documents_downloaded",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"check_circle",label:"Algunos Documentos descargados"},{id:24,text:"all_documents_downloaded_and_deleted",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"delete",label:"Todos descargados y eliminados"},{id:25,text:"partial_documents_downloaded_and_deleted",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"delete",label:"Algunos descargados y eliminados"},{id:26,text:"updated_data",textClass:"text-blue-500",bgClass:"bg-blue-500/10",previewClass:"bg-blue-500",icon:"check",label:"Datos del cliente actualizados"},{id:27,text:"resend_otp",textClass:"text-blue-500",bgClass:"bg-blue-500/10",previewClass:"bg-blue-500",icon:"refresh",label:"OTP reenviado"}]},8259:function(e,t){var n,i,s;
|
|
60
60
|
/*!
|
|
61
61
|
* jQuery JavaScript Library v3.7.1
|
|
62
62
|
* https://jquery.com/
|