1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[3062,6003,8384],{20362:(X,P,r)=>{r.d(P,{c:()=>f});var d=r(73664),T=r(72200);const h=m=>({white:m}),g=()=>[1,2,3],u=()=>[1,2],e=()=>[1,2,3,4];function _(m,b){1&m&&d.nrm(0,"div",2)}function v(m,b){1&m&&d.nrm(0,"div",2)}function M(m,b){1&m&&d.nrm(0,"div",2)}function k(m,b){1&m&&d.nrm(0,"div",2)}let f=(()=>{class m{whiteBkg=!1;reduced=!1;constructor(){}ngOnInit(){}static \u0275fac=function(x){return new(x||m)};static \u0275cmp=d.VBU({type:m,selectors:[["app-skeleton-default"]],inputs:{whiteBkg:"whiteBkg",reduced:"reduced"},standalone:!1,decls:13,vars:15,consts:[[1,"skeleton-default",3,"ngClass"],[1,"skeleton-row"],[1,"skeleton-item"]],template:function(x,G){1&x&&(d.j41(0,"div",0)(1,"div",1),d.Z7z(2,_,1,0,"div",2,d.fX1),d.k0s(),d.j41(4,"div",1),d.Z7z(5,v,1,0,"div",2,d.fX1),d.k0s(),d.j41(7,"div",1),d.Z7z(8,M,1,0,"div",2,d.fX1),d.k0s(),d.j41(10,"div",1),d.Z7z(11,k,1,0,"div",2,d.fX1),d.k0s()()),2&x&&(d.Y8G("ngClass",d.eq3(9,h,G.whiteBkg)),d.R7$(),d.Aen("--items: 3"),d.R7$(),d.Dyx(d.lJ4(11,g)),d.R7$(2),d.Aen("--items: 2"),d.R7$(),d.Dyx(d.lJ4(12,u)),d.R7$(2),d.Aen("--items: 4"),d.R7$(),d.Dyx(d.lJ4(13,e)),d.R7$(2),d.Aen("--items: 2"),d.R7$(),d.Dyx(d.lJ4(14,u)))},dependencies:[T.YU],styles:['@keyframes _ngcontent-%COMP%_progress{0%{transform:translate3d(-200px,0,0)}to{transform:translate3d(calc(200px + 100vw),0,0)}}@keyframes _ngcontent-%COMP%_pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.table-skeleton[_ngcontent-%COMP%] .row-table[_ngcontent-%COMP%]{width:100%;padding:8px 0;border-bottom:var(--border);display:flex;align-items:center;justify-content:space-between}.table-skeleton[_ngcontent-%COMP%] .row-table[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%;height:20px}.table-skeleton[_ngcontent-%COMP%] .row-table[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:inline-block;will-change:transform;background-color:var(--skeleton)}.table-skeleton[_ngcontent-%COMP%] .row-table[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:before{background-image:linear-gradient(90deg,#fff0,#fff9,#fff0)}.table-skeleton[_ngcontent-%COMP%] .row-table[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{overflow:hidden;transform:translateZ(0)}.table-skeleton[_ngcontent-%COMP%] .row-table[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:before{animation:_ngcontent-%COMP%_progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;width:200px;height:100%;content:""}.table-skeleton[_ngcontent-%COMP%] .row-table[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:after, .table-skeleton[_ngcontent-%COMP%] .row-table[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:before{box-sizing:border-box}.table-skeleton[_ngcontent-%COMP%] .row-table.first[_ngcontent-%COMP%]{border-top:var(--border)}.table-skeleton[_ngcontent-%COMP%] .row-table.first[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:40px;height:20px}[_nghost-%COMP%]{display:block;width:100%}.skeleton-default[_ngcontent-%COMP%]{width:100%;min-height:calc(100vh - var(--admin-nav-top));background-color:var(--base-extra-light-grey);padding:var(--module);gap:var(--module);display:flex;flex-direction:column}.skeleton-default[_ngcontent-%COMP%] .skeleton-row[_ngcontent-%COMP%]{gap:var(--module);display:flex;flex-wrap:wrap;height:calc((100vh - var(--admin-nav-top) - var(--module) * 5) / 4)}@media (min-width: 992px){.skeleton-default[_ngcontent-%COMP%] .skeleton-row[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]{margin-bottom:0;max-width:calc(100% / var(--items) - var(--module) * (var(--items) - 1) / var(--items));min-width:calc(100% / var(--items) - var(--module) * (var(--items) - 1) / var(--items))}}.skeleton-default[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]{border-radius:8px;height:100%}.skeleton-default[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]{display:inline-block;will-change:transform;background-color:#fff}.skeleton-default[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]:before{background-image:linear-gradient(90deg,#fff,#f2f3f6 35%,#fff)}.skeleton-default[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]{overflow:hidden;transform:translateZ(0)}.skeleton-default[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]:before{animation:_ngcontent-%COMP%_progress 2s ease-in-out infinite;background-size:cover;position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;content:""}.skeleton-default[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]:after, .skeleton-default[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]:before{box-sizing:border-box}.skeleton-default.white[_ngcontent-%COMP%]{background-color:#fff}.skeleton-default.white[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]{display:inline-block;will-change:transform;background-color:var(--skeleton)}.skeleton-default.white[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]:before{background-image:linear-gradient(90deg,#fff0,#fff9,#fff0)}.skeleton-default.white[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]{overflow:hidden;transform:translateZ(0)}.skeleton-default.white[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]:before{animation:_ngcontent-%COMP%_progress 2s ease-in-out infinite;background-size:200px 100%;position:absolute;z-index:1;top:0;left:0;
1width:200px;height:100%;content:""}.skeleton-default.white[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]:after, .skeleton-default.white[_ngcontent-%COMP%] .skeleton-item[_ngcontent-%COMP%]:before{box-sizing:border-box}']})}return m})()},33062:(X,P,r)=>{r.r(P),r.d(P,{ProtectedAdminModule:()=>Xo});var d=r(72200),T=r(38132),h=r(69915),g=r(60152),u=r(25615),e=r(73664),_=r(18594),v=r(91029);const M=(o,a,t)=>({topbar:o,bread:a,topbread:t});let k=(()=>{class o{clubService;appService;breadCrumbs;globalVars;constructor(t,i,n,l){this.clubService=t,this.appService=i,this.breadCrumbs=n,this.globalVars=l}ngOnInit(){}ngAfterViewInit(){this.globalVars.navbarTop.title="global.navigation.child_protection"}static \u0275fac=function(i){return new(i||o)(e.rXU(g.X),e.rXU(h.d),e.rXU(_.E),e.rXU(u.Y))};static \u0275cmp=e.VBU({type:o,selectors:[["app-protected-admin"]],standalone:!1,decls:2,vars:5,consts:[[1,"admin-dashboard",3,"ngClass"]],template:function(i,n){1&i&&(e.j41(0,"div",0),e.nrm(1,"router-outlet"),e.k0s()),2&i&&e.Y8G("ngClass",e.sMw(1,M,n.clubService.isTopBar()&&!n.breadCrumbs.hasBreadcrumbs(),n.breadCrumbs.hasBreadcrumbs()&&n.clubService.onlyBread(),n.breadCrumbs.hasBreadcrumbs()&&n.clubService.isTopBar()))},dependencies:[d.YU,v.n3],styles:[".admin-pading[_ngcontent-%COMP%]{padding-left:var(--module);padding-right:var(--module)}@media (max-width: 991px){.admin-pading[_ngcontent-%COMP%]{padding:0}}"]})}return o})();var f=r(10467),m=r(2615),b=r(89128),S=r(81864),x=r(22719),G=r(84412),O=r(25558),R=r(96354),se=r(19735),$=r(15449),D=r(68018);function ce(o,a){1&o&&e.eu8(0)}function de(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-clupik-modal",3),e.bIt("mainAction",function(){m.eBV(t);const n=e.XpG();return m.Njj(n.save())}),e.DNE(1,ce,1,0,"ng-container",4),e.k0s()}if(2&o){e.XpG();const t=e.sdS(3);e.Y8G("modalTitle","module.protector.new_protocol")("hasSecondaryButton",!1)("mainButtonValue","global.button.continue"),e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function me(o,a){1&o&&e.eu8(0)}function pe(o,a){if(1&o&&(e.j41(0,"div",2)(1,"div",5)(2,"div",6)(3,"div",7),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.DNE(6,me,1,0,"ng-container",4),e.k0s()()),2&o){e.XpG();const t=e.sdS(3);e.R7$(4),e.JRh(e.bMT(5,2,"module.protector.new_protocol")),e.R7$(2),e.Y8G("ngTemplateOutlet",t)}}function ue(o,a){if(1&o){const t=e.RV6();e.j41(0,"div",8)(1,"app-list-item",9),e.bIt("click",function(){m.eBV(t);const n=e.XpG();return m.Njj(n.template())}),e.k0s(),e.j41(2,"app-list-item",10),e.bIt("click",function(){m.eBV(t);const n=e.XpG();return m.Njj(n.custom())}),e.k0s()()}if(2&o){const t=e.XpG();e.R7$(),e.Y8G("active","template"===t.current)("hasBorder",!0)("hasHover",t.globalVars.desktop),e.R7$(),e.Y8G("active","custom"===t.current)("hasBorder",!0)("hasHover",t.globalVars.desktop)}}let _e=(()=>{class o{globalVars;current="";constructor(t){this.globalVars=t}save(){this.globalVars.closeModal(this.current)}custom(){this.current="custom",this.globalVars.desktop||this.save()}template(){this.current="template",this.globalVars.desktop||this.save()}static \u0275fac=function(i){return new(i||o)(e.rXU(u.Y))};static \u0275cmp=e.VBU({type:o,selectors:[["app-protected-create-select"]],standalone:!1,decls:4,vars:2,consts:[["select",""],[3,"modalTitle","hasSecondaryButton","mainButtonValue"],[1,"cm-select"],[3,"mainAction","modalTitle","hasSecondaryButton","mainButtonValue"],[4,"ngTemplateOutlet"],[1,"modal-down-inner"],[1,"modal-down-header"],[1,"heading-text","h3","center"],[1,"modal_down_fix","select"],["mainTitle","module.protector.add_protocol_template","subtitle","module.protector.add_protocol_template_desc","iconLeft","fa-light fa-file-lines",3,"click","active","hasBorder","hasHover"],["mainTitle","module.protector.add_protocol_custom","subtitle","module.protector.add_protocol_custom_desc","iconLeft","fa-light fa-arrow-up-from-line",3,"click","active","hasBorder","hasHover"]],template:function(i,n){1&i&&(e.nVh(0,de,2,4,"app-clupik-modal",1),e.nVh(1,pe,7,4,"div",2),e.DNE(2,ue,3,6,"ng-template",null,0,e.C5r)),2&i&&(e.vxM(n.globalVars.desktop?0:-1),e.R7$(),e.vxM(n.globalVars.responsive?1:-1))},dependencies:[d.T3,se.$,$.P,D.D9],encapsulation:2})}return o}
1)();var N=r(68010),A=r(36229),z=r(75281),L=r(94474),fe=r(305),he=r(72357),ge=r(20362),H=r(89792),Ce=r(27919);function ve(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-clupik-state-bar",3),e.bIt("buttonAction",function(){m.eBV(t);const n=e.XpG(2).$implicit,l=e.XpG(2);return m.Njj(l.newRelation(n))}),e.k0s()}}function be(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-clupik-state-bar",4),e.bIt("buttonAction",function(){m.eBV(t);const n=e.XpG(4);return m.Njj(n.editContact())}),e.k0s()}}function xe(o,a){if(1&o&&(e.j41(0,"app-block-item",0),e.nVh(1,ve,1,0,"app-clupik-state-bar",1),e.nVh(2,be,1,0,"app-clupik-state-bar",2),e.k0s()),2&o){const t=e.XpG().$implicit,i=e.XpG(2);e.Y8G("mainTitle",null==t?null:t.name)("whiteBorder",!1)("transparent",!0),e.R7$(),e.vxM(null==t.relations||0==t.relations.length?1:-1),e.R7$(),e.vxM(i.needsProvinceAndTown?2:-1)}}function ye(o,a){1&o&&e.nrm(0,"app-clupik-protocol",7),2&o&&e.Y8G("relation",a.$implicit)("hasBottomDownload",!1)("isMultiple",!1)("hasShadow",!0)("hasHeadOptions",!0)("noPaddingInBlockItem",!1)}function Pe(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-block-row",5)(1,"app-block-item",6),e.bIt("buttonAction",function(){m.eBV(t);const n=e.XpG().$implicit,l=e.XpG(2);return m.Njj(l.newRelation(n))}),e.k0s()(),e.j41(2,"app-block-row",5),e.Z7z(3,ye,1,6,"app-clupik-protocol",7,e.fX1),e.k0s()}if(2&o){const t=e.XpG().$implicit;e.Y8G("items",1),e.R7$(),e.Y8G("mainTitle","module.protector.new_protocol_up"),e.R7$(),e.Y8G("items",1),e.R7$(),e.Dyx(t.relations)}}function Te(o,a){if(1&o&&(e.nVh(0,xe,3,5,"app-block-item",0),e.nVh(1,Pe,5,3)),2&o){const t=a.$implicit,i=e.XpG(2);e.vxM(null==t.relations||0==t.relations.length||i.needsProvinceAndTown?0:-1),e.R7$(),e.vxM(null!=t.relations&&t.relations.length>0?1:-1)}}function ke(o,a){1&o&&e.Z7z(0,Te,2,2,null,null,e.fX1),2&o&&e.Dyx(a)}function Se(o,a){1&o&&e.nrm(0,"app-skeleton-default")}let we=(()=>{class o{appService;clubService;globalVars;breadCrumbs;document;dialog;activated;router;apiProtectorService;apiClubsService;_modalCtrl;_authService;modalService;data$;lastEdit=new G.t(null);openModal=!1;get isOnlyDelegate(){return this._authService.newHasSomeRole(["INF"])&&!this._authService.newHasSomeRole(["ADM","SDM"])}get user(){return this._authService.getId()}get needsProvinceAndTown(){return!this.clubService.clubData.regionId||!this.clubService.clubData.townId}constructor(t,i,n,l,c,p,C,y,B,F,E,U,V){this.appService=t,this.clubService=i,this.globalVars=n,this.breadCrumbs=l,this.document=c,this.dialog=p,this.activated=C,this.router=y,this.apiProtectorService=B,this.apiClubsService=F,this._modalCtrl=E,this._authService=U,this.modalService=V,this.openModal="true"===this.activated.snapshot.queryParams?.create,this.openModal&&this.newRelation({id:this.activated.snapshot.queryParams?.parent})}ngOnInit(){this.data$=this.apiProtectorService.getProtectorsInfo().pipe((0,O.n)(t=>{for(let i=0;i<t.length;i++){let n=t[i];n.relations=n.relations.filter(l=>Object.keys(l.info).length>0),this.isOnlyDelegate&&(n.relations=n.relations.filter(l=>l.delegate?.userId===this.user))}return this.lastEdit.pipe((0,R.T)(i=>{if(null==i)return t;const n=t.findIndex(p=>p.id==i.id);if(n<0)return t;const l=t[n],c=l.relations.findIndex(p=>p.id==i.relationId);return l.relations.splice(c,1),t[n]=l,t}))})),this.appService.subscribe("deleteProtocol",t=>{this.lastEdit.next(t)})}editEntity(t){this.router.navigate(["../edit/"+t.id],{relativeTo:this.activated})}editRelation(t,i){this.router.navigate(["../edit/"+t.id+"/"+i.id],{relativeTo:this.activated})}newRelation(t){var i=this;return(0,f.A)(function*(){const n=yield i._modalCtrl.create({...i.globalVars.desktop?{...i.globalVars.modalConfigDesktop}:{...i.globalVars.modalConfig},component:_e});yield n.present();let l=yield n.onWillDismiss();l.data&&i.router.navigate(["../edit/"+t.id],{relativeTo:i.activated,queryParams:{type:l.data}})})()}deleteRelation(t,i){this.dialog.open(x.w,{panelClass:"modal-md",data:{type:"delete-protected-relation"}}).afterClosed().subscribe(n=>{n&&this.apiProtectorService.deleteRelation(i.id).subscribe(l=>{})})}downloadPDF(t,i){this.apiProtectorService.downloadPDF(t.id,i.id,this.globalVars.responsive).subscribe(n=>{if(this.globalVars.responsive)this.appService.broadcast("showAlert",{state:"success",mainTitle:"module.protector.sent_protocol",autoHide:!1});else{let l=new Blob([n],{type:"application/pdf"});const c=this.document.createElement("a");this.document.body.appendChild(c),c.style.display="none";const p=window.URL.createObjectURL(l);c.href=p,c.target="_blank",c.download=`${t.editableName}.pdf`,c.click(),window.URL.revokeObjectURL(p),c.remove()}})}generateOptions(t,i){return[{label:"module.protector.edit_info",icon:"fa-light fa-pen-to-square",action:()=>this.editRelation(t,i),condition:()=>!0,disabled:()=>!1},{label:"module.protector.delete_info",icon:"fa-light fa-trash",action:()=>this.deleteRelation(t,i),condition:()=>!0,disabled:()=>!1}]}isExpired(t){return this.globalVars.getMoment()(t?.date).add(1,"year").isBefore(new Date)}formatDate(t){return this.globalVars.getMoment()(t).format("L")}getLastDate(t){return this.formatDate(this.globalVars.getMoment()(t).add(1,"year"))}getKeys(t){return Object.keys(t.form)}editContact(){this.globalVars.clupikNavigate("/admin/protected/contact")}static \u0275fac=function(i){return new(i||o)(e.rXU(h.d),e.rXU(g.X),e.rXU(u.Y),e.rXU(_.E),e.rXU(m.qQL),e.rXU(A.h),e.rXU(v.nX),e.rXU(v.Ix),e.rXU(S.r),e.rXU(b.P),e.rXU(z.ModalController),e.rXU(N.u),e.rXU(L.M))};static \u0275cmp=e.VBU({type:o,selectors:[["app-protected-edit-info"]],standalone:!1,decls:3,vars:3,consts:[[3,"mainTitle","whiteBorder","transparent"],["state","warning","direction","row","mainTitle","module.protector.no_protocol_found","subtitle","module.protector.create_protocol_info","buttonText","module.protector.active_protocol","buttonType","button"],["state","warning","direction","row","mainTitle","module.protector.complete_province","buttonText","Completar informaci\xf3n","buttonType","button"],["state","warning","direction","row","mainTitle","module.protector.no_protocol_found","subtitle","module.protector.create_protocol_info","buttonText","module.protector.active_protocol","buttonType","button",3,"buttonAction"],["state","warning","direction","row","mainTitle","module.protector.complete_province","buttonText","Completar informaci\xf3n","buttonType","button",3,"buttonAction"],[3,"items"],["subtitle","module.protector.new_protocol_info","buttonSize","sm","buttonType","button","buttonLabel","module.protector.new_protocol",3,"buttonAction","mainTitle"],[3,"relation","hasBottomDownload","isMultiple","hasShadow","hasHeadOptions","noPaddingInBlockItem"]],template:function(i,n){if(1&i&&(e.nVh(0,ke,2,0),e.nI1(1,"async"),e.vZN(2,Se,1,0,"app-skeleton-default")),2&i){let l;e.vxM((l=e.bMT(1,1,n.data$))?0:2,l)}},dependencies:[fe.r,he.W,ge.c,H.a,Ce.w,d.Jj],styles:[".content-white[_ngcontent-%COMP%]{background-color:#fff;padding:24px;margin-bottom:8px}.item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.block-content[_ngcontent-%COMP%]{display:flex;flex-direction:row}.block-content[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:.5;gap:12px}.block-content[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-content:center;align-items:baseline}"],changeDetection:0})}return o}
1)();var s=r(89417),Me=r(1460),Ie=r(26742),Ge=r(94375),Oe=r(74418),Re=r(45312),w=r(7673),J=r(88141),$e=r(92688),De=r(70152),Ye=r(23294),Z=r(99437),Y=r(34073),je=r(6961),K=r(82966),Be=r(80954),Fe=r(89902),W=r(54381),Ee=r(15686),Ue=r(69415),Ve=r(5900),Xe=r(90852),Q=r(85340);const Ne=(o,a)=>({placeholder:"module.entity.name",required:!0,inputType:"text",error:o,errorText:a}),Ae=(o,a)=>({placeholder:"module.entity.number",required:!0,inputType:"text",error:o,errorText:a}),ze=(o,a)=>({placeholder:"module.entity.mission_vision_values",required:!0,inputType:"text",error:o,errorText:a}),Le=o=>({required:!0,placeholder:"module.entity.aproveOrganization",required:!0,error:o,errorText:"global.validator.required"}),He=o=>({required:!0,placeholder:"module.entity.date",inputType:"date",error:o,errorText:"global.validator.required"}),q=(o,a,t)=>({placeholder:o,inputType:"text",error:a,errorText:t}),Je=(o,a)=>({placeholder:"module.entity.intervention_actions",inputType:"text",error:o,errorText:a}),Ze=(o,a)=>({placeholder:"module.entity.documents",inputType:"text",error:o,errorText:a}),Ke=()=>({name:"module.entity.web"}),We=()=>({name:"module.entity.email"}),Qe=()=>({name:"module.entity.noticeBoard"}),qe=(o,a)=>({placeholder:"module.entity.comunication",inputType:"text",error:o,errorText:a}),et=(o,a)=>({placeholder:"module.entity.monitoring",inputType:"text",error:o,errorText:a}),tt=o=>({placeholder:"module.entity.delegate_from",required:!0,inputType:"text",error:o,errorText:"global.validator.required"}),ot=o=>({placeholder:"module.entity.delegate_date",required:!0,inputType:"date",error:o,errorText:"global.validator.required"}),nt=(o,a)=>({placeholder:"module.entity.delegate_number",required:!0,inputType:"text",error:o,errorText:a}),it=o=>({required:!0,placeholder:"global.placeholder.name",inputType:"text",error:o,errorText:"global.validator.required"}),at=o=>({required:!0,placeholder:"global.placeholder.surname",inputType:"text",error:o,errorText:"global.validator.required"}),rt=o=>({placeholder:"global.placeholder.second_surname",inputType:"text",error:o,errorText:"global.validator.invalid"}),lt=(o,a)=>({placeholder:"global.placeholder.birthdate",inputType:"date",error:o,errorText:a}),st=o=>({placeholder:"global.placeholder.email",inputType:"text",error:o,errorText:"global.validator.email"}),ct=o=>({id:"email",name:"module.teams.send_email",disabled:o,light:!0}),ee=o=>({placeholder:"module.entity.entity_delegate_phone",required:!0,inputType:"text",error:o,errorText:"global.validator.required"}),dt=()=>({required:!1,placeholder:"module.publications.search_user"}),mt=()=>["global.table.not_found_messages.no_result_found"],pt=o=>({link:o}),ut=(o,a)=>({name:o,light:!0,error:a,errorText:"global.validator.required",hover:!1}),_t=()=>["module.protector.end_protocol","module.protector.end_protocol_info"];function ft(o,a){1&o&&e.nrm(0,"app-clupik-state-bar",19)}function ht(o,a){1&o&&e.nrm(0,"app-clupik-state-bar",20)}function gt(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-list-item",21)(1,"app-clupik-button",22),e.nI1(2,"translate"),e.bIt("click",function(){m.eBV(t);const n=e.XpG(4);return m.Njj(n.selectDocumentProtocol())}),e.k0s()()}if(2&o){const t=e.XpG(4);e.Y8G("hasBorder",!0)("hasHover",t.globalVars.desktop)("iconLeft","fa-regular fa-arrow-up-from-line")("isCustom",!0),e.R7$(),e.BMQ("aria-label",e.bMT(2,5,"module.protector.select_document_protocol"))}}function Ct(o,a){if(1&o&&(e.j41(0,"app-list-item",23),e.nrm(1,"app-dropdown-menu",24),e.k0s()),2&o){const t=e.XpG(4);e.Y8G("mainTitle",t.customProtocol.name)("isCustom",!0)("hasBorder",!0)("hasHover",t.globalVars.desktop)("iconLeft","fa-regular fa-file-lines"),e.R7$(),e.Y8G("dropDownOptions",t.protocolDropDownOptions)("value",t.customProtocol)}}function vt(o,a){if(1&o&&(e.nrm(0,"app-form-section",13),e.DNE(1,ft,1,0,"app-clupik-state-bar",14)(2,ht,1,0,"app-clupik-state-bar",15)(3,gt,3,7,"app-list-item",16)(4,Ct,2,7,"app-list-item",17),e.nrm(5,"app-form-separator",18)),2&o){const t=e.XpG(3);e.Y8G("mainTitle","module.entity.protocol"),e.R7$(),e.Y8G("ngIf",t.customProtocol&&t.documentError),e.R7$(),e.Y8G("ngIf",!t.customProtocol),e.R7$(),e.Y8G("ngIf",!t.customProtocol),e.R7$(),e.Y8G("ngIf",t.customProtocol)}}function bt(o,a){if(1&o&&(e.j41(0,"app-form-row",25),e.nrm(1,"app-input",30),e.k0s()),2&o){const t=e.XpG(4);e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.l_i(4,ze,t.maxlengthError("form","mission","long").error,t.maxlengthError("form","mission","long").text))}}function xt(o,a){if(1&o&&(e.nrm(0,"app-form-section",13),e.j41(1,"app-form-row",25),e.nrm(2,"app-input",26),e.k0s(),e.j41(3,"app-form-row",25),e.nrm(4,"app-input",27),e.k0s(),e.DNE(5,bt,2,7,"app-form-row",28),e.nrm(6,"app-form-row",29)),2&o){const t=e.XpG(3);e.Y8G("mainTitle","module.entity.entity_form_info"),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.l_i(11,Ne,t.maxlengthError("form","name","short").error,t.maxlengthError("form","name","short").text)),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.l_i(14,Ae,t.maxlengthError("form","number","short").error,t.maxlengthError("form","number","short").text)),e.R7$(),e.Y8G("ngIf",t.isCompleteForm&&!t.isThisClubProtectedByNavarra),e.R7$(),e.Y8G("empty",!0)}}function yt(o,a){if(1&o&&(e.nrm(0,"app-form-section",13),e.j41(1,"app-form-row",25),e.nrm(2,"app-input",31),e.k0s(),e.j41(3,"app-form-row",25),e.nrm(4,"app-input",32),e.k0s(),e.nrm(5,"app-form-row",29)),2&o){const t=e.XpG(3);e.Y8G("mainTitle","module.entity.entity_protocol_info"),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("popoverSize","cover")("selectOptions",t.organizationOptions)("select",e.eq3(11,Le,t.form.get("aproveOrganization").touched&&t.form.get("aproveOrganization").hasError("required"))),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.eq3(13,He,t.form.get("date").touched&&t.form.get("date").hasError("required"))),e.R7$(),e.Y8G("empty",!0)}}function Pt(o,a){if(1&o&&(e.nrm(0,"app-form-section",33),e.nI1(1,"translate"),e.j41(2,"app-form-row",25),e.nrm(3,"app-input",34),e.k0s(),e.nrm(4,"app-form-row",25)),2&o){const t=e.XpG(3);e.Y8G("mainTitle",e.bMT(1,8,t.objetivesSectionTitle)+"*")("description",t.objetivesSectionDescription),e.R7$(2),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.sMw(10,q,t.objetivesPlaceholder,t.maxlengthError("form","objetives","long").error,t.maxlengthError("form","objetives","long").text)),e.R7$(),e.Y8G("items",1)("destacado",!1)}}function Tt(o,a){if(1&o&&(e.nrm(0,"app-form-section",33),e.j41(1,"app-form-row",25),e.nrm(2,"app-input",35),e.k0s(),e.nrm(3,"app-form-row",29)),2&o){const t=e.XpG(3);e.Y8G("mainTitle",t.reachSectionTitle)("description",t.reachSectionDescription),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.sMw(7,q,t.reachPlaceholder,t.maxlengthError("form","reach","long").error,t.maxlengthError("form","reach","long").text)),e.R7$(),e.Y8G("empty",!0)}}function kt(o,a){if(1&o&&(e.nrm(0,"app-form-section",33),e.j41(1,"app-form-row",25),e.nrm(2,"app-input",30),e.k0s(),e.nrm(3,"app-form-row",29)),2&o){const t=e.XpG(3);e.Y8G("mainTitle","module.entity.entity_intervention_actions_title")("description","module.entity.entity_intervention_actions_info"),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.l_i(7,Je,t.maxlengthError("form","mission","long").error,t.maxlengthError("form","mission","long").text)),e.R7$(),e.Y8G("empty",!0)}}function St(o,a){if(1&o&&(e.j41(0,"app-list-item",38),e.nrm(1,"app-dropdown-menu",24),e.k0s()),2&o){const t=a.$implicit,i=e.XpG(4);e.Y8G("mainTitle",t.name)("subtitle",t.description)("isCustom",!0)("hasBorder",!0)("hasHover",i.globalVars.desktop)("iconLeft","fa-regular fa-file-lines"),e.R7$(),e.Y8G("dropDownOptions",t.dropDownOptions)("value",t)}}function wt(o,a){if(1&o){const t=e.RV6();e.nrm(0,"app-form-section",33),e.j41(1,"app-form-row",25),e.nrm(2,"app-input",36),e.k0s(),e.j41(3,"div",37),e.Z7z(4,St,2,8,"app-list-item",38,e.fX1),e.j41(6,"app-list-item",39)(7,"app-clupik-button",40),e.nI1(8,"translate"),e.bIt("click",function(){m.eBV(t);const n=e.XpG(3);return m.Njj(n.addDocument())}),e.k0s()()(),e.nrm(9,"app-form-row",29)}if(2&o){const t=e.XpG(3);e.Y8G("mainTitle","module.entity.entity_documents_title")("description","module.entity.entity_documents_info"),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.l_i(15,Ze,t.maxlengthError("form","documents","long").error,t.maxlengthError("form","documents","long").text)),e.R7$(2),e.Dyx(t.documents),e.R7$(2),e.Y8G("hasBorder",!0)("hasHover",t.globalVars.desktop)("iconLeft","fa-regular fa-file-lines")("isCustom",!0),e.R7$(),e.Y8G("iconLeft",!0),e.BMQ("aria-label",e.bMT(8,13,"global.button.upload_document")),e.R7$(2),e.Y8G("empty",!0)}}function Mt(o,a){if(1&o&&(e.nrm(0,"app-form-section",33)(1,"app-input",41)(2,"app-input",42)(3,"app-input",43),e.j41(4,"app-form-row",25),e.nrm(5,"app-input",44),e.k0s(),e.nrm(6,"app-form-row",29)),2&o){const t=e.XpG(3);e.Y8G("mainTitle","module.entity.entity_comunication_title")("description","module.entity.entity_comunication_info"),e.R7$(),e.Y8G("checkboxConfig",e.lJ4(10,Ke)),e.R7$(),e.Y8G("checkboxConfig",e.lJ4(11,We)),e.R7$(),e.Y8G("checkboxConfig",e.lJ4(12,Qe)),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.l_i(13,qe,t.maxlengthError("form","comunication","long").error,t.maxlengthError("form","comunication","long").text)),e.R7$(),e.Y8G("empty",!0)}}function It(o,a){if(1&o&&(e.nrm(0,"app-form-section",33),e.j41(1,"app-form-row",25),e.nrm(2,"app-input",45),e.k0s(),e.nrm(3,"app-form-row",29)),2&o){const t=e.XpG(3);e.Y8G("mainTitle","module.entity.entity_monitoring_title")("description","module.entity.entity_monitoring_info"),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.l_i(7,et,t.maxlengthError("form","monitoring","long").error,t.maxlengthError("form","monitoring","long").text)),e.R7$(),e.Y8G("empty",!0)}}function Gt(o,a){if(1&o&&(e.j41(0,"app-form-row",25),e.nrm(1,"app-input",54),e.k0s()),2&o){const t=e.XpG(5);e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.eq3(4,ee,t.userForm.get("phone").touched&&t.userForm.get("phone").hasError("required")))}}function Ot(o,a){if(1&o&&(e.j41(0,"form",12)(1,"app-form-row",25),e.nrm(2,"app-input",48),e.k0s(),e.j41(3,"app-form-row",25),e.nrm(4,"app-input",49),e.k0s(),e.j41(5,"app-form-row",25),e.nrm(6,"app-input",50),e.k0s(),e.j41(7,"app-form-row",25),e.nrm(8,"app-input",51),e.k0s(),e.j41(9,"app-form-row",25),e.nrm(10,"app-input",52),e.k0s(),e.DNE(11,Gt,2,6,"app-form-row",28),e.j41(12,"app-form-row",25),e.nrm(13,"app-input",53),e.k0s()()),2&o){const t=e.XpG(4);e.Y8G("formGroup",t.userForm),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.eq3(26,it,t.userForm.get("firstName").touched&&t.userForm.get("firstName").hasError("required"))),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.eq3(28,at,t.userForm.get("lastName").touched&&t.userForm.get("lastName").hasError("required"))),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.eq3(30,rt,t.userForm.get("secondSurname").touched&&t.userForm.get("secondSurname").hasError("minlength"))),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.l_i(32,lt,t.isTrialError,t.isCustomErrorText))("maxDate",t.maxDate),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.eq3(35,st,t.userForm.get("email").touched&&t.userForm.get("email").hasError("email"))),e.R7$(),e.Y8G("ngIf",t.isThisClubProtectedByNavarra),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("checkboxConfig",e.eq3(37,ct,t.userForm.get("sendMail").disabled))}}function Rt(o,a){if(1&o&&(e.j41(0,"app-form-row",25),e.nrm(1,"app-input",54),e.k0s()),2&o){const t=e.XpG(6);e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.eq3(4,ee,t.submitted&&!t.delegateForm.get("phone").value))}}function $t(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-list-item",55)(1,"app-clupik-button",56),e.bIt("click",function(){m.eBV(t);const n=e.XpG(5);return m.Njj(n.removeUser())}),e.k0s()(),e.nVh(2,Rt,2,6,"app-form-row",25)}if(2&o){const t=e.XpG(5);e.Y8G("isCustom",!0)("unique",!0)("mainTitle",null==t.selectedUser?null:t.selectedUser.name)("hasHover",!0)("hasBorder",!0)("isCollapsed",!0)("image",null==t.selectedUser?null:t.selectedUser.avatar)("imageType","user"),e.R7$(2),e.vxM(t.needsDelegatePhone?2:-1)}}function Dt(o,a){1&o&&(e.j41(0,"div",60),e.nrm(1,"app-empty-space",61),e.k0s()),2&o&&(e.R7$(),e.Y8G("size","sm")("textArray",e.lJ4(3,mt))("noButton",!0))}function Yt(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-list-item",63),e.bIt("listAction",function(){const n=m.eBV(t).$implicit,l=e.XpG(8);return m.Njj(l.setUser(n))}),e.k0s()}if(2&o){const t=a.$implicit;e.Y8G("active",t.active)("mainTitle",t.name)("hasHover",!0)("hasBorder",!0)("isCollapsed",!0)("image",t.avatar)("imageType","user")}}function jt(o,a){if(1&o&&(e.j41(0,"div",60),e.Z7z(1,Yt,1,7,"app-list-item",62,e.fX1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.Dyx(t.data)}}function Bt(o,a){if(1&o&&e.DNE(0,Dt,2,4,"div",59)(1,jt,3,0,"div",59),2&o){const t=a;e.Y8G("ngIf",!t.data.length&&!t.loading),e.R7$(),e.Y8G("ngIf",t.data.length&&!t.loading)}}function Ft(o,a){if(1&o&&(e.j41(0,"form",12)(1,"app-form-row",57),e.nrm(2,"app-input",58,10),e.k0s()(),e.nVh(4,Bt,2,2),e.nI1(5,"async")),2&o){let t;const i=e.XpG(5);e.Y8G("formGroup",i.searchForm),e.R7$(),e.Y8G("items",1),e.R7$(),e.Y8G("input",e.lJ4(6,dt)),e.R7$(2),e.vxM((t=e.bMT(5,4,i.userSearch$))?4:-1,t)}}function Et(o,a){if(1&o&&e.nVh(0,$t,3,9)(1,Ft,6,7),2&o){const t=e.XpG(4);e.vxM(t.selectedUser?0:1)}}function Ut(o,a){1&o&&e.nrm(0,"app-clupik-state-bar",67)}function Vt(o,a){if(1&o&&(e.j41(0,"app-form-row",25)(1,"div",64),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"app-input",65),e.DNE(5,Ut,1,0,"app-clupik-state-bar",66),e.k0s()),2&o){const t=e.XpG(4);e.Y8G("items",1)("destacado",!1),e.R7$(2),e.JRh(e.bMT(3,8,"module.protection.has_sexual_crimes_certificate")),e.R7$(2),e.Y8G("formControl",t.form.get("delegateHasSexualCrimesCertficate"))("options",t.certificateOptions)("isHorizontal",!0)("allowEmptySelection",!1),e.R7$(),e.Y8G("ngIf",t.form.get("delegateHasSexualCrimesCertficate").touched&&t.form.get("delegateHasSexualCrimesCertficate").hasError("required"))}}function Xt(o,a){if(1&o&&(e.j41(0,"form",12),e.nrm(1,"app-form-section",33)(2,"app-input",46),e.nVh(3,Ot,14,39,"form",12),e.nVh(4,Et,2,1),e.nrm(5,"app-form-row",29)(6,"app-form-section",13),e.j41(7,"app-form-row",25),e.nrm(8,"app-input",47),e.k0s(),e.j41(9,"app-form-row",25),e.nrm(10,"app-input",32),e.k0s(),e.j41(11,"app-form-row",25),e.nrm(12,"app-input",27),e.k0s(),e.nVh(13,Vt,6,10,"app-form-row",25),e.k0s()),2&o){const t=e.XpG(3);e.Y8G("formGroup",t.delegateForm),e.R7$(),e.Y8G("mainTitle","module.entity.entity_delegate_title")("description","module.entity.entity_delegate_info"),e.R7$(),e.Y8G("options",t.delegateOptions),e.R7$(),e.vxM("new"==t.delegateForm.get("delegate").value?3:-1),e.R7$(),e.vxM("select"==t.delegateForm.get("delegate").value?4:-1),e.R7$(),e.Y8G("empty",!0),e.R7$(),e.Y8G("mainTitle","module.protection.delegate_ass"),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("popoverSize","cover")("selectOptions",t.delegateFromOptions)("select",e.eq3(22,tt,t.delegateForm.get("from").touched&&t.delegateForm.get("from").hasError("required"))),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.eq3(24,ot,t.delegateForm.get("date").touched&&t.delegateForm.get("date").hasError("required"))),e.R7$(),e.Y8G("items",1)("destacado",!1),e.R7$(),e.Y8G("inputSize","default")("input",e.l_i(26,nt,t.maxlengthError("delegateForm","number","short").error,t.maxlengthError("delegateForm","number","short").text)),e.R7$(),e.vxM(t.isThisClubProtectedByNavarra?13:-1)}}function Nt(o,a){if(1&o){const t=e.RV6();e.nrm(0,"app-form-row",29),e.j41(1,"app-input",68),e.nI1(2,"translate"),e.bIt("checkChange",function(n){m.eBV(t);const l=e.XpG(3);return m.Njj(l.protocolObjectivesChange(n))}),e.k0s()}if(2&o){const t=e.XpG(3);e.Y8G("empty",!0),e.R7$()
1,e.Y8G("checkboxConfig",e.l_i(8,ut,e.i5U(2,3,"module.protector.objectives_pdf",e.eq3(6,pt,t.pdfLink)),!t.protocolObjectives&&t.submitted))("initialValue",t.protocolObjectives)}}function At(o,a){1&o&&e.eu8(0)}function zt(o,a){1&o&&e.eu8(0)}function Lt(o,a){1&o&&e.eu8(0)}function Ht(o,a){1&o&&e.eu8(0)}function Jt(o,a){1&o&&e.eu8(0)}function Zt(o,a){1&o&&e.eu8(0)}function Kt(o,a){if(1&o&&e.DNE(0,Ht,1,0,"ng-container",69)(1,Jt,1,0,"ng-container",69)(2,Zt,1,0,"ng-container",69),2&o){e.XpG(2);const t=e.sdS(9),i=e.sdS(11),n=e.sdS(13);e.Y8G("ngTemplateOutlet",t),e.R7$(),e.Y8G("ngTemplateOutlet",i),e.R7$(),e.Y8G("ngTemplateOutlet",n)}}function Wt(o,a){1&o&&e.eu8(0)}function Qt(o,a){1&o&&e.eu8(0)}function qt(o,a){1&o&&e.eu8(0)}function eo(o,a){1&o&&e.eu8(0)}function to(o,a){if(1&o&&(e.DNE(0,At,1,0,"ng-container",69)(1,zt,1,0,"ng-container",69)(2,Lt,1,0,"ng-container",69),e.nVh(3,Kt,3,3),e.DNE(4,Wt,1,0,"ng-container",69)(5,Qt,1,0,"ng-container",69)(6,qt,1,0,"ng-container",69)(7,eo,1,0,"ng-container",69)),2&o){e.XpG();const t=e.sdS(5),i=e.sdS(7),n=e.sdS(15),l=e.sdS(17),c=e.sdS(19),p=e.sdS(21),C=e.sdS(23),y=e.XpG(2);e.Y8G("ngTemplateOutlet",t),e.R7$(),e.Y8G("ngTemplateOutlet",i),e.R7$(),e.Y8G("ngTemplateOutlet",p),e.R7$(),e.vxM(y.isCompleteForm?3:-1),e.R7$(),e.Y8G("ngTemplateOutlet",n),e.R7$(),e.Y8G("ngTemplateOutlet",l),e.R7$(),e.Y8G("ngTemplateOutlet",c),e.R7$(),e.Y8G("ngTemplateOutlet",C)}}function oo(o,a){1&o&&e.eu8(0)}function no(o,a){1&o&&e.eu8(0)}function io(o,a){1&o&&e.eu8(0)}function ao(o,a){1&o&&e.eu8(0)}function ro(o,a){if(1&o&&e.DNE(0,io,1,0,"ng-container",69)(1,ao,1,0,"ng-container",69),2&o){e.XpG(2);const t=e.sdS(9),i=e.sdS(11);e.Y8G("ngTemplateOutlet",t),e.R7$(),e.Y8G("ngTemplateOutlet",i)}}function lo(o,a){1&o&&e.eu8(0)}function so(o,a){1&o&&e.eu8(0)}function co(o,a){1&o&&e.eu8(0)}function mo(o,a){1&o&&e.eu8(0)}function po(o,a){if(1&o&&(e.DNE(0,oo,1,0,"ng-container",69)(1,no,1,0,"ng-container",69),e.nVh(2,ro,2,2),e.DNE(3,lo,1,0,"ng-container",69)(4,so,1,0,"ng-container",69)(5,co,1,0,"ng-container",69)(6,mo,1,0,"ng-container",69)),2&o){e.XpG();const t=e.sdS(5),i=e.sdS(7),n=e.sdS(15),l=e.sdS(17),c=e.sdS(21),p=e.sdS(23),C=e.XpG(2);e.Y8G("ngTemplateOutlet",t),e.R7$(),e.Y8G("ngTemplateOutlet",i),e.R7$(),e.vxM(C.isCompleteForm?2:-1),e.R7$(),e.Y8G("ngTemplateOutlet",n),e.R7$(),e.Y8G("ngTemplateOutlet",l),e.R7$(),e.Y8G("ngTemplateOutlet",c),e.R7$(),e.Y8G("ngTemplateOutlet",p)}}function uo(o,a){if(1&o&&(e.j41(0,"app-block-boxed",11),e.nI1(1,"translate"),e.nV
1h(2,vt,6,5),e.j41(3,"form",12),e.DNE(4,xt,7,17,"ng-template",null,0,e.C5r)(6,yt,6,15,"ng-template",null,1,e.C5r)(8,Pt,5,14,"ng-template",null,2,e.C5r)(10,Tt,4,11,"ng-template",null,3,e.C5r)(12,kt,4,10,"ng-template",null,4,e.C5r)(14,wt,10,18,"ng-template",null,5,e.C5r)(16,Mt,7,16,"ng-template",null,6,e.C5r)(18,It,4,10,"ng-template",null,7,e.C5r)(20,Xt,14,29,"ng-template",null,8,e.C5r)(22,Nt,3,11,"ng-template",null,9,e.C5r),e.nVh(24,to,8,8)(25,po,7,7),e.k0s()()),2&o){const t=e.XpG(2);e.Y8G("size","md")("mainTitle",e.bMT(1,5,"module.protector.protocol_form")),e.R7$(2),e.vxM(t.isCompleteForm?-1:2),e.R7$(),e.Y8G("formGroup",t.form),e.R7$(21),e.vxM(t.isThisClubProtectedByNavarra?24:25)}}function _o(o,a){1&o&&e.nrm(0,"app-skeleton-block")}function fo(o,a){if(1&o&&(e.nVh(0,uo,26,7,"app-block-boxed",11),e.nI1(1,"async"),e.vZN(2,_o,1,0,"app-skeleton-block")),2&o){let t;const i=e.XpG();e.vxM((t=e.bMT(1,1,i.data$))?0:2,t)}}function ho(o,a){1&o&&(e.j41(0,"app-block-boxed",70),e.nrm(1,"div",71),e.k0s()),2&o&&(e.Y8G("size","lg"),e.R7$(),e.Y8G("innerHTML",a.template,e.npT))}function go(o,a){1&o&&e.nrm(0,"app-skeleton-block")}function Co(o,a){if(1&o&&(e.nVh(0,ho,2,2,"app-block-boxed",70),e.nI1(1,"async"),e.vZN(2,go,1,0,"app-skeleton-block")),2&o){let t;const i=e.XpG();e.vxM((t=e.bMT(1,1,i.renderPdf$))?0:2,t)}}function vo(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-block-boxed",11),e.nI1(1,"translate"),e.j41(2,"app-empty-space",72),e.bIt("buttonAction",function(){m.eBV(t);const n=e.XpG();return m.Njj(n.downloadContract())}),e.k0s()()}2&o&&(e.Y8G("size","md")("mainTitle",e.bMT(1,6,"module.protector.end_register")),e.R7$(2),e.Y8G("isLink",!1)("noButton",!1)("isMedium",!0)("textArray",e.lJ4(8,_t)))}let te=(()=>{class o{breadcrumbs;apiProtectorService;activatedRoute;_apiUsersService;_imagesService;authService;apiClubService;router;document;fb;globalVars;appService;dialog;menuService;clubService;_modalService;_modalCtrl;_translationService;pdfLink=Re.c.buckets.assets;protocolObjectives=!1;submitted;typeSelected="template";documentError=!1;get hasUser(){return null!==this.selectedUser||null!==this.userForm?.get("firstName").value||"me"===this.delegateForm.get("delegate").value}get needsDelegatePhone(){return this.isThisClubProtectedByNavarra&&"select"===this.delegateForm?.get("delegate")?.value&&!!this.selectedUser&&!this.selectedUser?.phone1}get isDelegateStepValid(){return"new"===this.delegateForm?.get("delegate")?.value?this.userForm?.valid??!1:!this.needsDelegatePhone||!!this.delegateForm?.get("phone")?.value}get isOnlyDelegate(){return this.authService.newHasSomeRole(["INF"])&&!this.authService.newHasSomeRole(["ADM","SDM"])}get isSadmin(){return this.authService.newHasSomeRole(["SDM"])}get isThisClubProtectedByNavarra(){return this.clubService.isThisClubProtectedByNavarra()}data$=null;userSearch$=null;form;delegateForm;userForm;searchForm;renderPdf$;view="form";selectedUser=null;protectorId=null;finalBody=null;delegateOptions=[{id:"me",name:"",value:"me",current:!0,allowed:!0},{id:"select",name:"module.entity.delegate_select_user",value:"select",current:!0,allowed:!0},{id:"new",name:"module.entity.delegate_new",value:"new",current:!1,allowed:!0}];organizationOptions=[{id:"Junta Directiva",name:"module.protection.junta",title:"module.protection.junta"},{id:"Patronato",name:"module.protection.patronato",title:"module.protection.patronato"},{id:"Otros",name:"global.common.others",title:"global.common.others"}];delegateFromOptions=[{id:"Junta Directiva",name:"module.protection.junta",title:"module.protection.junta"},{id:"Otros",name:"global.common.others",title:"global.common.others"}];certificateOptions=[{id:!0,name:"global.common.yes",allowed:!0},{id:!1,name:"global.common.no",allowed:!0}];get objetivesSectionTitle(){return this.isThisClubProtectedByNavarra?"module.entity.entity_risk_analysis_title":"module.entity.entity_objetives_title"}get objetivesSectionDescription(){return this.isThisClubProtectedByNavarra?"module.entity.entity_risk_analysis_info":"module.entity.entity_objetives_info"}get objetivesPlaceholder(){return this.isThisClubProtectedByNavarra?"module.entity.risk_analysis":"module.entity.objetives"}get reachSectionTitle(){return this.isThisClubProtectedByNavarra?"module.entity.entity_prevention_actions_title":"module.entity.entity_reach_title"}get reachSectionDescription(){return this.isThisClubProtectedByNavarra?"module.entity.entity_prevention_actions_info":"module.entity.entity_reach_info"}get reachPlaceholder(){return this.isThisClubProtectedByNavarra?"module.entity.prevention_actions":"module.entity.reach"}relationId=null;moment;dropDownOptionsIns=[{label:"global.common.download",icon:"fa-light fa-arrow-down-to-line",action:t=>this.donwloadFile(t),condition:t=>t.hasOwnProperty("id"),disabled:t=>null===t.id},{label:"global.common.edit",icon:"fa-light fa-pen-to-square",action:t=>this.editFile(t),condition:()=>!0,disabled:()=>!1},{label:"global.common.remove",icon:"fa-light fa-trash",action:t=>this.removeFile(t),condition:()=>!0,disabled:()=>!1}];customProtocol=null;protocolDropDownOptions=[{label:"global.common.download",icon:"fa-light fa-arrow-down-to-line",action:t=>this.donwloadCustomProtocol(),condition:t=>t.hasOwnProperty("clubRelationInfoId"),disabled:()=>!1},{label:"module.entity.replace_protocol",icon:"fa-light fa-arrows-rotate",action:t=>this.replaceProtocol(),condition:()=>!0,disabled:()=>!1},{label:"global.common.remove",icon:"fa-light fa-trash",action:t=>this.removeCustomProtocol(),condition:()=>!0,disabled:()=>!1}];documents=[];get isCompleteForm(){return"template"===this.typeSelected}
1sended=!1;maxLength={short:"",long:""};namesConfig={source:t=>this._apiUsersService.usersSearchNotif(t),mapeo:t=>(t.name=t.firstName+" "+t.lastName,t.avatar=this._imagesService.getUserClubLogoThumbnailUrl(t.id),t.active=t.id===this.selectedUser?.id,t)};constructor(t,i,n,l,c,p,C,y,B,F,E,U,V,No,Ao,zo,Lo,Ho){this.breadcrumbs=t,this.apiProtectorService=i,this.activatedRoute=n,this._apiUsersService=l,this._imagesService=c,this.authService=p,this.apiClubService=C,this.router=y,this.document=B,this.fb=F,this.globalVars=E,this.appService=U,this.dialog=V,this.menuService=No,this.clubService=Ao,this._modalService=zo,this._modalCtrl=Lo,this._translationService=Ho,this.moment=this.globalVars.getMoment(),this.delegateOptions[0].name=this.authService.getName(),this.delegateOptions[0].allowed=!this.isSadmin,this.delegateOptions[1].allowed=!this.isOnlyDelegate,this.delegateOptions[2].allowed=!this.isOnlyDelegate,this.typeSelected=this.activatedRoute.snapshot.queryParams?.type||"template",this.getTranslations()}getTranslations(){var t=this;return(0,f.A)(function*(){t.maxLength.short=yield t._translationService.getTranslation("global.validator.max_length",{length:200}),t.maxLength.long=yield t._translationService.getTranslation("global.validator.max_length",{length:500})})()}maxlengthError(t,i,n){return this[t].get(i).touched&&this[t].get(i).hasError("required")?{error:!0,text:"global.validator.required"}:this[t].get(i).touched&&this[t].get(i).hasError("maxlength")?{error:!0,text:this.maxLength[n]}:{error:!1,text:""}}ngOnInit(){"eu"===this.clubService.getLanguageInUseCode()?this.pdfLink+="lopivi/Objetivos-protocolo-eus.pdf":this.pdfLink+="lopivi/Objetivos-protocolo.pdf",this.globalVars.scrollToDivId("admin-container",!1),this.breadcrumbs.pushBread("/admin/protected/info","global.common.back"),this.breadcrumbs.setBreadAction({action:()=>{this.buildBody()},actionTitle:"global.button.continue",disabled:()=>!(!this.sended&&(this.isCompleteForm?this.hasUser&&this.isDelegateStepValid&&this.protocolObjectives:this.hasUser&&this.isDelegateStepValid&&this.protocolObjectives&&this.customProtocol)),tooltip:()=>this.isCompleteForm||this.customProtocol?this.hasUser?this.isDelegateStepValid?this.protocolObjectives?"":"module.protection.acept_you_must":"module.entity.entity_delegate_phone_required":"module.protection.delegate_you_need":"module.entity.custom_protocol_must"}),this.data$=this.activatedRoute.paramMap.pipe((0,O.n)(t=>{let i=null;return i=t.has("relationId")?this.apiProtectorService.getProtectorRelationInfoById(t.get("relationId")):(0,w.of)({info:{},delegate:{}}),i.pipe((0,J.M)(n=>{n.documents&&(this.documents=n.documents.map(c=>({dropDownOptions:[...this.dropDownOptionsIns],keep:!0,id:c.id,name:c.name,description:c.description,type:c.type,url:c.info?.url[0]||""}))),n.customProtocol&&(this.customProtocol=n.customProtocol,this.typeSelected="custom"),this.protectorId=t.get("protectorId"),this.relationId=t.get("relationId");const l=this.isThisClubProtectedByNavarra;this.form=new s.gE({name:new s.MJ({disabled:!1,value:n.info.name},[s.k0.required,s.k0.maxLength(200)]),number:new s.MJ({disabled:!1,value:n.info.number},[s.k0.required,s.k0.maxLength(200)]),mission:new s.MJ({disabled:!this.isCompleteForm,value:n.info.hasOwnProperty("description")?n.info.description:n.info.mission},[s.k0.required,s.k0.maxLength(500)]),aproveOrganization:new s.MJ({disabled:!1,value:n.info.aproveOrganization},s.k0.required),date:new s.MJ({disabled:!1,value:n.info.date},s.k0.required),objetives:new s.MJ({disabled:!this.isCompleteForm,value:n.info.objetives},[s.k0.required,s.k0.maxLength(500)]),reach:new s.MJ({disabled:!this.isCompleteForm,value:n.info.reach},[s.k0.required,s.k0.maxLength(500)]),documents:new s.MJ({disabled:!1,value:n.info.documents},[s.k0.maxLength(200)]),comunication:new s.MJ({disabled:!1,value:n.info.comunication},[s.k0.maxLength(200)]),web:new s.MJ({disabled:!1,value:n.info.web}),email:new s.MJ({disabled:!1,value:n.info.email}),noticeBoard:new s.MJ({disabled:!1,value:n.info.noticeBoard}),...l&&{monitoring:new s.MJ({disabled:!1,value:n.info.monitoring},[s.k0.required,s.k0.maxLength(500)]),delegateHasSexualCrimesCertficate:new s.MJ(n.info.delegateHasSexualCrimesCertficate??!1,s.k0.required)}}
1),this.delegateForm=new s.gE({date:new s.MJ(n.delegate?.date,s.k0.required),from:new s.MJ(n.delegate?.from||"Otros",s.k0.required),number:new s.MJ(n.delegate?.number,[s.k0.required,s.k0.maxLength(200)]),delegate:new s.MJ(n.delegate?.userId?n.delegate?.userId===this.authService.getId()?"me":"select":"me"),...l&&{phone:new s.MJ(n.delegate?.phone??n.delegate?.user?.phone1,[s.k0.maxLength(200)])}}),n.delegate?.userId&&n.delegate?.userId!==this.authService.getId()&&(this.selectedUser=n.delegate.user,this.selectedUser.avatar=this._imagesService.getUserClubLogoThumbnailUrl(n.delegate?.userId)),this.userForm=new s.gE({firstName:new s.MJ(null,[s.k0.required]),lastName:new s.MJ(null,[s.k0.required]),secondSurname:new s.MJ(null,[]),email:new s.MJ(null),birthdate:new s.MJ(null),sendMail:new s.MJ(!1),...l&&{phone:new s.MJ(null,[s.k0.required,s.k0.maxLength(200)])}}),this.searchForm=new s.gE({search:new s.MJ("")}),this.userSearch$=(0,$e.x)((0,w.of)({loading:!0,data:[]}),this.searchForm.get("search").valueChanges.pipe((0,De.B)(500),(0,Ye.F)(),(0,O.n)(c=>c.length<3?(0,w.of)({loading:!0,data:[]}):this.namesConfig.source(c)?.pipe((0,Z.W)(p=>(this.searchForm.get("search").setValue(""),(0,w.of)({loading:!0,data:[]}))),(0,R.T)(p=>{if(p)return{loading:!1,data:p.map(y=>this.namesConfig.mapeo(y))}}))))),n.delegate?.user&&(n.delegate.user.name=n.delegate?.user.firstName+" "+n.delegate?.user.lastName,this.selectUser(n.delegate?.user))}))}),(0,Z.W)(t=>(console.error("No permission to edit protocol or protocol not found"),this.globalVars.clupikNavigate("/admin/protected/info"),(0,w.of)({info:{},delegate:{}}))))}getKeys(t){return Object.keys(t.form)}buildBody(){if(this.submitted=!0,this.protocolObjectives){const[t,i,n,l]=[this.form.valid,this.form.value,this.delegateForm.valid,this.delegateForm.value];if(!(t&&n&&this.selectUser&&this.isDelegateStepValid))return this.form.markAllAsTouched(),this.delegateForm.markAllAsTouched(),this.userForm.markAllAsTouched(),void this.globalVars.scrollToInvalid();let c={info:{...i},delegate:l};this.globalVars.scrollToDivId("admin-container",!1),this.selectedUser&&"select"==this.delegateForm.get("delegate").value?(c.delegate.id=this.selectedUser?.id,c.delegate.firstName=this.selectedUser?.firstName,c.delegate.lastName=this.selectedUser?.lastName,c.delegate.email=this.selectedUser?.email,this.needsDelegatePhone&&(c.delegate.phone=this.delegateForm.get("phone").value)):"me"==this.delegateForm.get("delegate").value?(c.delegate.id=this.authService.getId(),c.delegate.firstName=this.authService.getMe().firstName,c.delegate.lastName=this.authService.getMe().lastName,c.delegate.email=this.authService.getMe().email):c.delegate={...c.delegate,...this.userForm.value},this.finalBody=c,this.isCompleteForm?this.sendForm():this.sendContract()}}sendForm(){this.view="pdf",this.submitted=!0,this.renderPdf$=this.apiProtectorService.getPreviewTemplate(this.finalBody,this.protectorId).pipe((0,J.M)(()=>{this.breadcrumbs.setBreadAction({action:t=>{this.sendContract()},tooltip:()=>"module.protection.acept_you_must",disabled:()=>!1,actionTitle:"module.entity.accept_contract"})}))}sendContract(){this.dialog.open(x.w,{panelClass:"modal-md",data:{title:"accept_protocol_title",type:"accept_protocol",buttonLabel:"module.entity.accept_contract"}}).afterClosed().subscribe(t=>{if(t){let i=null;this.relationId?(this.documents.length&&(this.finalBody.documents=this.documents.map(n=>{let l=null;return n.hasOwnProperty("id")?(delete n.dropDownOptions,l=n):l={file:n.file,description:n.description,name:n.name},l})),this.customProtocol&&this.customProtocol.hasOwnProperty("clubId")&&(this.finalBody.customProtocol={keepPrevious:!0}),this.customProtocol&&!this.customProtocol.hasOwnProperty("clubId")&&(this.finalBody.customProtocol=this.customProtocol),i=this.apiProtectorService.updateRelationInfo(this.finalBody,this.protectorId,this.relationId)):(this.documents.length&&(this.finalBody.documents=this.documents.map(n=>({file:n.file,description:n.description,name:n.name}))),this.customProtocol&&(this.finalBody.customProtocol=this.customProtocol),i=this.apiProtectorService.createRelationInfo(this.finalBody,this.protectorId)),this.sended=!0,i.subscribe({next:n=>{this.sended=!1,this.relationId=n.info.id,this.view="success",this.menuService.broadcast("updateBubbles"),this.breadcrumbs.setBreadAction({tooltip:()=>"",action:()=>{this.breadcrumbs.goBack()},actionTitle:"global.button.continue"})},error:n=>{this.sended=!1,"ERRNOCLUBRELATIONFOUND"===n.error?this.appService.broadcast("showAlert",{state:"danger",mainTitle:"No existe relaci\xf3n entre los clubes.",autoHide:!0}):"ERRUNSOPORTEDMEDIATYPE"===n.error?(this.documentError=!0,this.appService.broadcast("showAlert",{state:"danger",mainTitle:"El formato del documento del protocolo no es correcto, por favor suba un documento pdf",autoHide:!0})):this.appService.broadcast("showAlert",{state:"danger",mainTitle:"",autoHide:!0})}})}})}
1downloadContract(){this.apiProtectorService.downloadPDF(this.protectorId,this.relationId,this.globalVars.responsive).subscribe(t=>{if(this.globalVars.responsive)this.appService.broadcast("showAlert",{state:"success",mainTitle:"global.common.sent_to_email",autoHide:!1});else{let i=new Blob([t],{type:"application/pdf"});const n=this.document.createElement("a");this.document.body.appendChild(n),n.style.display="none";const l=window.URL.createObjectURL(i);n.href=l,n.target="_blank",n.download="Protocolo.pdf",n.click(),window.URL.revokeObjectURL(l),n.remove()}})}selectUser(t){this.selectedUser=t,this.searchForm.get("search").setValue(t.name)}ngOnDestroy(){this.breadcrumbs.reset()}protocolObjectivesChange(t){this.protocolObjectives=t}donwloadFile(t){this.apiProtectorService.downloadAux(this.relationId,t.id,this.globalVars.responsive).subscribe({next:i=>{if(this.globalVars.responsive)this.appService.broadcast("showAlert",{state:"success",mainTitle:"global.common.sent_to_email",autoHide:!1});else{let n=i;"pdf"===t.type&&(n=new Blob([i],{type:"application/pdf"})),this.downloadFinish(n,t.name,t.type)}}})}editFile(t){var i=this;return(0,f.A)(function*(){let n=yield i._modalService.openModal({component:Y.K,modalSize:"sm",...t&&{data:{data:{document:t}}}});if(n.data){let l=n.data;l.hasOwnProperty("id")?i.documents.splice(i.documents.findIndex(c=>c.id===t.id),1,i.globalVars.mergeDeep(t,l)):(i.documents=i.documents.filter(c=>c.id!==t.id),l.dropDownOptions=[...i.dropDownOptionsIns],i.documents.push(l))}})()}removeFile(t){var i=this;return(0,f.A)(function*(){const n=yield i._modalCtrl.create({...i.globalVars.desktop?{...i.globalVars.modalConfigDesktop}:{...i.globalVars.modalConfig},component:Oe.D,componentProps:{question:"module.entity.delete_documents_question",description:"module.entity.delete_documents_confirm",mainHasIcon:!0,mainButtonValue:"global.button.remove",mainButtonIcon:"fa-regular fa-trash"}});yield n.present(),(yield n.onWillDismiss()).data&&(i.documents=t.hasOwnProperty("id")?i.documents.filter(c=>c.id!==t.id):i.documents.filter(c=>c.file!==t.file))})()}addDocument(){var t=this;return(0,f.A)(function*(){let i=yield t._modalService.openModal({component:Y.K,modalSize:"sm"});if(i.data){let n=i.data;n.dropDownOptions=[...t.dropDownOptionsIns],t.documents.push(n)}})()}selectDocumentProtocol(){var t=this;return(0,f.A)(function*(){t.documentError=!1;let i=yield t._modalService.openModal({component:Y.K,modalSize:"sm",data:{onlyFile:!0}});if(i.data){let n=i.data;delete n.type,delete n.url,t.customProtocol=i.data}})()}downloadFinish(t,i,n){const l=this.document.createElement("a");this.document.body.appendChild(l),l.style.display="none";const c=window.URL.createObjectURL(t);l.href=c,l.download=`${i}.${n}`,l.click(),window.URL.revokeObjectURL(c),l.remove()}donwloadCustomProtocol(){this.apiProtectorService.downloadCustomProtocol(this.relationId).subscribe({next:t=>{let i=t;"pdf"===this.customProtocol.type&&(i=new Blob([t],{type:"application/pdf"})),this.downloadFinish(i,this.customProtocol.name,this.customProtocol.type)}})}replaceProtocol(){this.selectDocumentProtocol()}removeCustomProtocol(){this.customProtocol=null}setUser(t){this.selectedUser=t,this.searchForm.get("search").setValue("")}removeUser(){this.selectedUser=null}static \u0275fac=function(i){return new(i||o)(e.rXU(_.E),e.rXU(S.r),e.rXU(v.nX),e.rXU(Me.K),e.rXU(Ie.M),e.rXU(N.u),e.rXU(b.P),e.rXU(v.Ix),e.rXU(m.qQL),e.rXU(s.ok),e.rXU(u.Y),e.rXU(h.d),e.rXU(A.h),e.rXU(Ge.$),e.rXU(g.X),e.rXU(L.M),e.rXU(z.ModalController),e.rXU(je.T))};static \u0275cmp=e.VBU({type:o,selectors:[["app-protected-create-info"]],standalone:!1,decls:3,vars:3,consts:[["tplEntityInfo",""],["tplProtocolInfo",""],["tplRiskAnalysis",""],["tplPreventionActions",""],["tplInterventionActions",""],["tplDocuments",""],["tplCommunication",""],["tplMonitoring",""],["tplDelegateAssignment",""],["tplAcceptanceCheckbox",""],["searchInput",""],[3,"size","mainTitle"],[3,"formGroup"],[3,"mainTitle"],["state","danger","mainTitle","Formato de archivo incorrecto","subtitle","El protocolo debe tener formato .pdf",4,"ngIf"],["state","info","mainTitle","module.entity.custom_protocol_must",4,"ngIf"],["mainTitle","module.protector.upload_protocol",3,"hasBorder","hasHover","iconLeft","isCustom",4,"ngIf"],[3,"mainTitle","isCustom","hasBorder","hasHover","iconLeft",4,"ngIf"],[1,"sm"],["state","danger","mainTitle","Formato de archivo incorrecto","
1subtitle","El protocolo debe tener formato .pdf"],["state","info","mainTitle","module.entity.custom_protocol_must"],["mainTitle","module.protector.upload_protocol",3,"hasBorder","hasHover","iconLeft","isCustom"],["label","module.protector.select_document_protocol","type","button","config","outlined","size","sm",3,"click"],[3,"mainTitle","isCustom","hasBorder","hasHover","iconLeft"],["icon","fa-solid fa-ellipsis-vertical link",3,"dropDownOptions","value"],[3,"items","destacado"],["type","normal","formControlName","name",3,"inputSize","input"],["type","normal","formControlName","number",3,"inputSize","input"],[3,"items","destacado",4,"ngIf"],[3,"empty"],["type","textarea","formControlName","mission",3,"inputSize","input"],["type","select","formControlName","aproveOrganization","inputSize","default",3,"popoverSize","selectOptions","select"],["type","normal","formControlName","date",3,"inputSize","input"],[3,"mainTitle","description"],["type","textarea","formControlName","objetives",3,"inputSize","input"],["type","textarea","formControlName","reach",3,"inputSize","input"],["type","textarea","formControlName","documents",3,"inputSize","input"],[1,"documents"],[3,"mainTitle","subtitle","isCustom","hasBorder","hasHover","iconLeft"],["mainTitle","module.user.add_document",3,"hasBorder","hasHover","iconLeft","isCustom"],["label","global.button.upload_document","type","button","config","outlined","size","sm","icon","fa-solid fa-arrow-up-from-line",3,"click","iconLeft"],["type","checkbox","formControlName","web",3,"checkboxConfig"],["type","checkbox","formControlName","email",3,"checkboxConfig"],["type","checkbox","formControlName","noticeBoard",3,"checkboxConfig"],["type","textarea","formControlName","comunication",3,"inputSize","input"],["type","textarea","formControlName","monitoring",3,"inputSize","input"],["type","radiobutton","formControlName","delegate",3,"options"],["type","select","formControlName","from","inputSize","default",3,"popoverSize","selectOptions","select"],["type","normal","formControlName","firstName",3,"inputSize","input"],["type","normal","formControlName","lastName",3,"inputSize","input"],["type","normal","formControlName","secondSurname",3,"inputSize","input"],["formControlName","birthdate","type","normal",3,"inputSize","input","maxDate"],["type","normal","formControlName","email",3,"inputSize","input"],["type","checkbox","formControlName","sendMail",3,"checkboxConfig"],["type","normal","formControlName","phone",3,"inputSize","input"],[3,"isCustom","unique","mainTitle","hasHover","hasBorder","isCollapsed","image","imageType"],["type","icon","config","onlyicon","size","sm","icon","fa-light fa-xmark",3,"click"],[3,"items"],["type","search","formControlName","search","inputSize","default",3,"input"],["class","result",4,"ngIf"],[1,"result"],["svgImage","file-searching",3,"size","textArray","noButton"],[3,"active","mainTitle","hasHover","hasBorder","isCollapsed","image","imageType"],[3,"listAction","active","mainTitle","hasHover","hasBorder","isCollapsed","image","imageType"],[1,"text","md"],["type","radiobutton",3,"formControl","options","isHorizontal","allowEmptySelection"],["state","danger","mainTitle","global.validator.required",4,"ngIf"],["state","danger","mainTitle","global.validator.required"],["type","checkbox",3,"checkChange","checkboxConfig","initialValue"],[4,"ngTemplateOutlet"],[3,"size"],[1,"html","inf-pdf",3,"innerHTML"],["buttonText","module.protector.download_protocol_end","icon","fa-light fa-arrow-down-to-line","svgImage","secure-files",3,"buttonAction","isLink","noButton","isMedium","textArray"]],template:function(i,n){1&i&&(e.nVh(0,fo,3,3),e.nVh(1,Co,3,3),e.nVh(2,vo,3,9,"app-block-boxed",11)),2&i&&(e.vxM("form"==n.view?0:-1),e.R7$(),e.vxM("pdf"==n.view?1:-1),e.R7$(),e.vxM("success"==n.view?2:-1))},dependencies:[d.bT,d.T3,s.qT,s.BC,s.cb,s.l_,s.j4,s.JD,K.K,Be.Y,Fe.S,W.L,$.P,Ee.q,Ue.p,H.a,Ve.t,Xe.n,Q.U,d.Jj,D.D9],styles:[".html[_ngcontent-%COMP%]{padding:24px 0}.documents[_ngcontent-%COMP%]{margin-top:12px}"]})}return o})();const bo=o=>({docNum:o});function xo(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-list-item",1)(1,"app-clupik-button",2),e.nI1(2,"translate"),e.bIt("click",function(){const n=m.eBV(t).$implicit,l=e.XpG(2);return m.Njj(l.download(n))}),e.k0s()()}if(2&o){const t=a.$implicit,i=e.XpG(2);e.Y8G("mainTitle",t.name)("subtitle",t.description)("isCustom",!0)("hasBorder",!0)("hasHover",i.globalVars.desktop),e.R7$(),e.Y8G("iconLeft",!0),e.BMQ("aria-label",e.bMT(2,7,"global.common.download"))}}function yo(o,a){if(1&o&&(e.j41(0,"app-block-boxed",0),e.nI1(1,"translate"),e.Z7z(2,xo,3,9,"app-list-item",1,e.fX1),e.k0s()),2&o){const t=a;e.Y8G("loading",!1)("size","lg")("subtitle",e.i5U(1,3,"module.entity.docs_number",e.eq3(6,bo,t.length))),e.R7$(2),e.Dyx(t)}}function Po(o,a){1&o&&e.nrm(0,"app-skeleton-block")}let To=(()=>{class o{_clubsService;_apiProtector;_appService;globalVars;_apiClubsService;document;dataLoaded=!0;documents$;parents;constructor(t,i,n,l,c,p){this._clubsService=t,this._apiProtector=i,this._appService=n,this.globalVars=l,this._apiClubsService=c,this.document=p}ngOnInit(){var t=this;return(0,f.A)(function*(){t.parents=t._apiProtector.ChildProtectionParents,t.documents$=t._apiProtector.getAllDocumentsFromParent(t.parents[0].id).pipe((0,R.T)(i=>i.sort((n,l)=>Number(n.order)-Number(l.order))))})()}download(t){this._apiProtector.downloadDocumentFromChild(this.parents[0].id,t.id,this.globalVars.responsive).subscribe({next:i=>{if(this.globalVars.responsive)this._appService.broadcast("showAlert",{state:"success",mainTitle:"global.common.sent_to_email",autoHide:!1});else{let n=i;"pdf"===t.type&&(n=new Blob([i],{type:"application/pdf"})),this.downloadFinish(n,t.name,t.type)}},error:i=>this._appService.broadcast("showAlert",{state:"danger",mainTitle:"",autoHide:!0})})}downloadFinish(t,i,n){const l=this.document.createElement("a");this.document.body.appendChild(l),l.style.display="none";const c=window.URL.createObjectURL(t);l.href=c,l.download=`${i}.${n}`,l.click(),window.URL.revokeObjectURL(c),l.remove(),this._appService.broadcast("showAlert",{state:"success",mainTitle:"",autoHide:!0})}static \u0275fac=function(i){return new(i||o)(e.rXU(g.X),e.rXU(S.r),e.rXU(h.d),e.rXU(u.Y),e.rXU(b.P),e.rXU(m.qQL))};static \u0275cmp=e.VBU({type:o,selectors:[["app-protected-documents"]],standalone:!1,decls:3,vars:3,consts:[["mainTitle","global.common.documents",3,"loading","size","subtitle"],[3,"mainTitle","subtitle","isCustom","hasBorder","hasHover"],["label","global.common.download","type","button","config","outlined","size","sm","icon","fa-solid fa-arrow-down-to-line",3,"click","iconLeft"]],template:function(i,n){if(1&i&&(e.nVh(0,yo,4,8,"app-block-boxed",0),e.nI1(1,"async"),e.vZN(2,Po,1,0,"app-skeleton-block")),2&i){let l;e.vxM((l=e.bMT(1,1,n.documents$))?0:2,l)}},dependencies:[K.K,W.L,$.P,Q.U,d.Jj,D.D9],encapsulation:2})}return o}
1)();var I=r(56640);const ko=[{path:"",component:k,children:[{path:"",redirectTo:"info",pathMatch:"full"},{path:"info",component:we},{path:"documents",component:To},{path:"edit/:protectorId",component:te},{path:"edit/:protectorId/:relationId",component:te},{path:"settings",canActivate:[I.v5],canLoad:[I.v5],data:{rolesAllowed:["SDM","ADM"]},loadChildren:()=>r.e(2076).then(r.bind(r,99316)).then(o=>o.ChildSettingsModule)},{path:"contact",canActivate:[I.v5],canLoad:[I.v5],data:{rolesAllowed:["SDM","ADM"]},loadChildren:()=>r.e(1327).then(r.bind(r,61327)).then(o=>o.GlobalSettingsModule)}]}];let oe=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=m.G2t({imports:[T.iI.forChild(ko),T.iI]})}return o})();var j=r(49189),So=r(48746),wo=r(83928),Mo=r(58260),ne=r(62470),ie=r(19348);let Io=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=m.G2t({imports:[ie.x,j.G,ne.k,d.MD]})}return o})();var Go=r(48749),Oo=r(38384),ae=r(66124),re=r(32777),Ro=r(35375),$o=r(7030),Do=r(6212),Yo=r(10971),jo=r(49699),Bo=r(5653),le=r(21867),Fo=r(45260),Eo=r(95189);let Uo=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=m.G2t({imports:[d.MD,j.G,ne.k,ae.M,le.v]})}return o})();var Vo=r(37554);let Xo=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=m.G2t({imports:[Io,Mo.U,wo.D,j.G,So.m,d.MD,Go.P,ie.x,Oo.Q,ae.M,re.h,$o.g,Ro.J,oe,Do.m,Yo.m,jo.C,Bo.x,le.v,re.h,Fo.Z,Eo.c,Uo,Vo.$,oe]})}return o})()},38384:(X,P,r)=>{r.d(P,{Q:()=>e});var d=r(72200),T=r(49189),h=r(83928),g=r(73664),u=r(2615);let e=(()=>{class _{static \u0275fac=function(k){return new(k||_)};static \u0275mod=g.$C({type:_});static \u0275inj=u.G2t({imports:[d.MD,T.G,h.D]})}return _})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.