PageSourceSearch

https://www.fundacioneuskadi.eus/36591.68ae9cca7fcb7f33.js

js fundacioneuskadi.eus collected 2026-10-02 20:40:57 UTC 18,239 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[36591],{36591:(I,d,a)=>{a.d(d,{V:()=>g});var m=a(49189),s=a(56868),l=a(19348),_=a(48749),S=a(73664),f=a(2615);a(97696);let g=(()=>{class h{static \u0275fac=function(v){return new(v||h)};static \u0275mod=S.$C({type:h});static \u0275inj=f.G2t({imports:[s.X,m.G,l.x,_.P]})}return h})()},97696:(I,d,a)=>{a.d(d,{m:()=>tt});var m=a(10467),s=a(73664),l=a(89417),_=a(38968),S=a(69915),f=a(68010),O=a(60152),g=a(26742),h=a(19901),L=a(51589),M=a(6961),v=a(25615),R=a(72982),A=a(13961),U=a(54843),T=a(70152),b=a(23294),E=a(88141),V=a(81048),B=a(89128),F=a(82e3),N=a(27544),K=a(61448),W=a(56640),G=a(60177),p=a(2615),y=a(91029),X=a(72200),x=a(6688),j=a(89902),w=a(68018);const Y=r=>({season:r}),z=()=>({name:"global.common.season",placeholder:"global.common.season"}),J=()=>({name:"global.common.section",placeholder:"global.common.section"}),$=()=>({name:"global.placeholder.category",placeholder:"global.placeholder.category"});function k(r,u){if(1&r&&(s.j41(0,"div",3)(1,"div",4),s.EFF(2),s.nI1(3,"translate"),s.k0s()()),2&r){const e=s.XpG();s.R7$(2),s.JRh(s.i5U(3,1,"global.title.season_teams",s.eq3(4,Y,e.currentSeason.title)))}}function H(r,u){if(1&r&&s.nrm(0,"app-input",9),2&r){const e=s.XpG(2);s.Y8G("isDark",e.isNewLayout&&e.globalVars.desktop)("isSelectMultiple",!0)("inputSize",e.globalVars.desktop?"sm":"md")("selectOptions",e.sections)("select",s.lJ4(5,J))}}function Q(r,u){if(1&r&&s.nrm(0,"app-input",10),2&r){const e=s.XpG(2);s.Y8G("isDark",e.isNewLayout&&e.globalVars.desktop)("isSelectMultiple",!1)("inputSize",e.globalVars.desktop?"sm":"md")("selectOptions",e.competitions)("select",s.lJ4(5,$))}}function Z(r,u){if(1&r&&(s.j41(0,"form",5),s.nrm(1,"app-input",6),s.DNE(2,H,1,6,"app-input",7)(3,Q,1,6,"app-input",8),s.k0s()),2&r){const e=s.XpG();s.Y8G("formGroup",e.dataForm),s.R7$(),s.Y8G("isDark",e.isNewLayout&&!e.inAdmin&&e.globalVars.desktop)("inputSize",e.globalVars.desktop?"sm":"md")("selectOptions",e.seasons)("select",s.lJ4(7,z)),s.R7$(),s.Y8G("ngIf","CLB"===e.type&&e.sections&&e.sections.length>1),s.R7$(),s.Y8G("ngIf","ORG"===e.type&&e.competitions.length>0)}}function q(r,u){if(1&r){const e=s.RV6();s.j41(0,"div",11)(1,"app-button-main",12),s.bIt("buttonAction",function(){p.eBV(e);const i=s.XpG();return p.Njj(i.closeFilters())}),s.k0s(),s.j41(2,"app-button-main",13),s.bIt("buttonAction",function(){p.eBV(e);const i=s.XpG();return p.Njj(i.applyFilters())}),s.k0s()()}2&r&&(s.R7$(),s.Y8G("isMain",!0)("isOutlined",!0)("value","global.common.delete_filters")("size","small"),s.R7$(),s.Y8G("isMain",!0)("value","global.common.apply_filter")("size","small"))}let tt=(()=>{class r{fb;seasonsService;clubsService;apiTeamsService;globalVars;authService;router;activatedRoute;apiAuthService;apiCompetitionsService;apiSeasonsService;appService;imagesService;apiClubsService;apiSectionsService;teamService;layoutService;platformId;translationService;dataForm;get hasRealCompetition(){return"object"==typeof this.currentCompetition&&"-1"!=this.currentCompetition?.id}fromSideNav=!1;currentSeason;currentCompetition;clubData;isAdmin;seasons;sections;firstSections;currentSection;type;clubId;seasonLoading;competitionLoading;competitions;basicCompetition={id:"-1",name:"global.common.show_all"};currentSeasonId;teamsCategories;teamLoading;teams;seasonId;loaded=!1;isNewLayout=!1;subscription=new A.yU;sectionsToPaint;paramSections;query={};constructor(e,t,i,o,n,c,P,et,st,it,ot,at,nt,rt,ct,lt,mt,ht,pt){var C=this;this.fb=e,this.seasonsService=t,this.clubsService=i,this.apiTeamsService=o,this.globalVars=n,this.authService=c,this.router=P,this.activatedRoute=et,this.apiAuthService=st,this.apiCompetitionsService=it,this.apiSeasonsService=ot,this.appService=at,this.imagesService=nt,this.apiClubsService=rt,this.apiSectionsService=ct,this.teamService=lt,this.layoutService=mt,this.platformId=ht,this.translationService=pt,this.subscription.add(this.teamService.subscribe("closeFilters",()=>{this.firstLoad()})),this.subscription.add(this.activatedRoute.queryParams.subscribe(function(){var ut=(0,m.A)(function*(D){(!C.currentSection||D.sectionId!=C.currentSection.id)&&(yield C.ngOnInit())});return function(D){return ut.apply(this,arguments)}}()))}ngOnDestroy(){this.subscription.unsubscribe()}parseSections(e){var t=this;return(0,m.A)(function*(){if(t.paramSections=t.getParam("sections"),t.sections=yield(0,U._)(t.apiSectionsService.getAllSectionsFilters(e)),t.sections=t.sections.filter(o=>o.visibility),t.paramSections){let o=t.paramSections.split(",");t.sections.forEach(n=>
1{n.selectActive=!!o.some(c=>c===n.id)})}else t.sections.forEach(o=>{o.selectActive=!1});"CLB"===t.type&&(t.sections=t.sections.filter(o=>o.numTeams>0));let i=t.sections.filter(o=>o.selectActive);i=i.length>0?i.map(o=>o.id):t.sections.map(o=>o.id),t.firstSections=i,t.currentSection=t.sections&&t.sections.length>0?t.sections[0]:new R.wn})()}getParam(e){if(this.globalVars.desktop)return this.activatedRoute.snapshot.queryParams[e];{let t=JSON.parse(localStorage.getItem("teamFilter"));return t?t[e]:null}}firstLoad(){var e=this;return(0,m.A)(function*(){e.globalVars.responsive||e.teamService.broadcast("startLoadingTeams",{}),e.clubData=e.clubsService.getClubData(),e.isAdmin=e.authService.isAdministrator(),e.seasons=yield e.apiSeasonsService.getSeasons().toPromise();let t=e.getParam("seasonId");if(e.currentSeason=t?e.seasons.find(i=>i.id===t):yield e.apiSeasonsService.getCurrentSeason(),e.currentSeasonId=e.currentSeason.id,e.type=e.clubData.type,e.clubId=e.clubData.id,yield e.parseSections(e.currentSeasonId),e.seasonLoading=!0,e.competitionLoading="ORG"===e.type,e.currentCompetition=Object.assign(e.basicCompetition),e.competitions=[],e.competitions.splice(0,0,e.basicCompetition),"ORG"===e.type)e.buildForm(),e.getCompetitionsOfSeason(),e.teamService.setMeta(e.router.url,"select",e.currentSeason);else{e.buildForm();let i=e.paramSections?e.paramSections:e.sections.map(o=>o.id);setTimeout(()=>{e.getTeams(i)})}})()}ngOnInit(){var e=this;return(0,m.A)(function*(){e.isNewLayout=e.layoutService.isNew(),e.paramSections=e.getParam("sections"),yield e.firstLoad()})()}onSeasonchange(e){var t=this;return(0,m.A)(function*(){if(t.currentCompetition=JSON.parse(JSON.stringify(t.basicCompetition)),t.currentSeason=t.seasons.find(i=>i.id===e),yield t.parseSections(t.currentSeason.id),t.sections.length>1&&t.dataForm.get("section").setValue(t.firstSections),t.globalVars.navbarTop.title=yield t.translationService.getTranslation("global.title.season_teams",{season:t.currentSeason.title}),"ORG"===t.type?(t.dataForm.setValue({season:t.currentSeason.id,competition:t.currentCompetition?.id||-1,section:t.currentSection.id},{emitEvent:!1}),t.getCompetitionsOfSeason()):1===t.sections.length?t.getTeams(t.sections.map(i=>i.id)):t.sections.length>1?t.changeSection(null):0===t.sections.length&&(t.teams=[],t.sections=[],t.sectionsToPaint=[],(t.globalVars.desktop||t.globalVars.responsive&&!t.fromSideNav)&&t.teamService.broadcast("getTeams",{currentSeason:t.currentSeason,teams:t.teams,sections:t.sections,sectionsToPaint:t.sectionsToPaint})),t.hasRealCompetition?t.getCompetitionTeams():"ORG"===t.type&&(t.sections.length>1?t.getTeams(t.sections.map(i=>i.id)):t.getSeasonTeams(t.dataForm.get("season").value)),t.query={},t.query.seasonId=t.currentSeason.id,t.hasRealCompetition&&(t.query.competitionId=t.currentCompetition?.id),t.globalVars.desktop||t.globalVars.responsive&&!t.fromSideNav){let i=t.router.url.split("?");t.router.navigate([i[0]],{relativeTo:t.activatedRoute,queryParams:t.query,queryParamsHandling:"merge"})}})()}changeSection(e){let t;if(e&&"-1"!=e?(t="",t=e.join(",")):t=this.sections.map(i=>i.id),t&&setTimeout(()=>{this.getTeams(t)},1e3),this.query=e&&"-1"!=e?{seasonId:this.currentSeason.id,sections:t}:{seasonId:this.currentSeason.id},"-1"!=this.currentCompetition?.id&&(this.query.competitionId=this.currentCompetition?.id),this.globalVars.desktop||this.globalVars.responsive&&!this.fromSideNav){let i=this.router.url.split("?");this.router.navigate([i[0]],{relativeTo:this.activatedRoute,queryParams:this.query,queryParamsHandling:"merge"})}}getTeams(e){e.length>0?this.apiTeamsService.getTeamsTableBySections(this.currentSeason.id,"true",e).subscribe(t=>{if(t.length>0){this.teams=t.filter(i=>i.visibility),this.sections.forEach(i=>delete i.teamsToShow),this.teams.forEach(i=>{let o=this.sections.findIndex(c=>c.id===i.sectionId),n=this.sections[o];null!=n&&(n=n?.hasOwnProperty("teamsToShow")?{...n,customOrder:i.customOrder,team
1sToShow:[...n.teamsToShow,i]}:{...n,customOrder:i.customOrder,teamsToShow:[i]},this.sections.splice(o,1,n))});for(let i of this.sections)i.teamsToShow?.sort((o,n)=>i.customOrder?Number(o.sort)-Number(n.sort):o.editableName-n.editableName);this.teamLoading=!1,this.seasonLoading=!1,this.sectionsToPaint=this.sections,(this.globalVars.desktop||this.globalVars.responsive&&!this.fromSideNav)&&this.teamService.broadcast("getTeams",{currentSeason:this.currentSeason,teams:this.teams,sections:this.sections,sectionsToPaint:this.sectionsToPaint})}else this.teams=[],this.sections=[],this.sectionsToPaint=[],(this.globalVars.desktop||this.globalVars.responsive&&!this.fromSideNav)&&this.teamService.broadcast("getTeams",{currentSeason:this.currentSeason,teams:this.teams,sections:this.sections,sectionsToPaint:this.sectionsToPaint});this.globalVars.responsive||this.teamService.broadcast("finishLoadingTeams",{})}):(this.teams=[],this.sections=[],this.sectionsToPaint=[],(this.globalVars.desktop||this.globalVars.responsive&&!this.fromSideNav)&&this.teamService.broadcast("getTeams",{currentSeason:this.currentSeason,teams:this.teams,sections:this.sections,sectionsToPaint:this.sectionsToPaint}),this.globalVars.responsive||this.teamService.broadcast("finishLoadingTeams",{}))}setSeasonTeams(){"ORG"!==this.type&&(this.dataForm.get("section")&&this.dataForm.get("section").enable(),this.dataForm.get("season").enable()),this.hasRealCompetition?this.getCompetitionTeams():this.sections.length>1?this.getTeams(this.sections.map(e=>e.id)):this.getSeasonTeams(this.currentSeason.id),this.seasonLoading=!1}buildForm(){let e={season:new l.MJ({value:this.currentSeason.id,disabled:!1},[]),section:new l.MJ([],[])};"ORG"===this.type&&(e.competition=new l.MJ({value:this.currentCompetition?.id,disabled:!0},[])),this.sections.length>1&&e.section.setValue(this.firstSections),this.dataForm=this.fb.group(e),this.dataForm.controls.season.valueChanges.pipe((0,T.B)(100),(0,b.F)(),(0,E.M)(t=>{this.onSeasonchange(t)})).subscribe(),this.dataForm.controls.section.valueChanges.pipe((0,T.B)(100),(0,b.F)(),(0,E.M)(t=>{this.changeSection(t)})).subscribe(),"ORG"===this.type&&this.dataForm.controls.competition.valueChanges.pipe((0,T.B)(100),(0,b.F)(),(0,E.M)(t=>{const i=this.competitions.find(o=>o.id==t);this.onCompetitionchange(i)})).subscribe(),this.loaded=!0}getCompetitionsOfSeason(){this.competitionLoading=!0,this.teamsCategories=[];const e=this.dataForm.get("section").value.join(",");this.apiCompetitionsService.getCompetitions(!0,this.currentSeason.id,e).subscribe(t=>{if(t.length>0){this.competitions=t,this.setTeamsCategories(t),this.competitions.splice(0,0,this.basicCompetition),this.currentCompetition=this.competitions[0],this.competitionLoading=!1;let i=this.getParam("competitionId");if(i&&this.competitions.length>0){let o=this.competitions.find(n=>n.id===i);o&&this.onCompetitionchange(o)}}else this.competitions=[];this.buildForm(),this.setSeasonTeams(),this.dataForm.get("season").enable({emitEvent:!1}),this.dataForm.get("section")&&this.dataForm.get("section").enable({emitEvent:!1}),this.dataForm.get("competition")&&this.dataForm.get("competition").enable({emitEvent:!1})})}setTeamsCategories(e){e.forEach(t=>{let i=t.name;t.competitionClupikClubTeam.forEach(o=>{this.teamsCategories.push({teamId:o.team_id,category:i})})})}onCompetitionchange(e){if(this.currentCompetition=e,this.hasRealCompetition?this.getCompetitionTeams():this.sections.length>1?this.getTeams(this.sections.map(t=>t.id)):this.getSeasonTeams(this.dataForm.get("season").value),this.query={seasonId:this.currentSeason.id},"-1"!=this.currentCompetition?.id&&(this.query.competitionId=this.currentCompetition?.id),this.paramSections&&(this.query.sections=this.paramSections),this.globalVars.desktop||this.globalVars.responsive&&!this.fromSideNav){let t=this.router.url.split("?");this.router.navigate([t[0]],{relativeTo:this.activatedRoute,queryParams:this.query,queryParamsHandling:"merge"})}}getCompetitionsTeams(){this.teamLoading=!0,this.sectionsToPaint=[],this.apiCompetitionsService.getTeamsByCompetitions(this.competitions.map(e=>e.id)).subscribe(e=>{this.teams=[],e.length>0?(this.sections.forEach(t=>delete t.teamsToShow),e.forEach(t=>{let i=this.sections.findIndex(n=>n.id===t.team.teamClub.sectionId),o=this.sections[i];o=o.hasOwnProperty("teamsToShow")?{...o,teamsToShow:[...o.teamsToShow,t]}:{...o,teamsToShow:[t]},null==t.visibility&&(t.visibility=t.team.visibility),this.teams.push(t),this.sections.splice(i,1,o)}),this.sectionsToPaint=this.sections,(this.globalVars.desktop||this.globalVars.responsive&&!this.fromSideNav)&&this.teamService.broadcast("getTeams",{currentSeason:this.currentSeason,teams:this.teams,sections:this.sections,sectionsToPaint:this.sectionsToPaint})):(this.teams=[],this.sections=[],this.sectionsToPaint=[],(this.globalVars.desktop||this.globalVars.responsive&&!this.fromSideNav)&&this.teamService.broadcast("getTeams",{currentSeason:this.currentSeason,teams:this.teams,sections:this.sections,sectionsToPaint:this.sectionsToPaint})),this.seasonLoading=!1,this.teamLoading=!1,this.globalVars.responsive||this.teamService.broadcast("finishLoadingTeams",{})})}getCompetitionTeams(){this.teamLoading=!0,this.sectionsToPaint=[],this.apiCompetitionsService.getCompetitionsAssociateTeams(this.currentCompetition?.id).subscribe(e=>{this.teams=[],e.length>0?(this.sections.forEach(t=>delete t.teamsToShow),e.forEach(t=>{let i=this.sections.findIndex(n=>n.id===t.team.teamClub.sectionId),o=this.sections[i];o=o.hasOwnProperty("teamsToShow")?{...o,teamsToShow:[...o.teamsToShow,t]}:{...o,teamsToShow:[t]},null==t.visibility&&(t.visibility=t.team.visibility),this.teams.push(t),this.sections.splice(i,1,o)}),this.sectionsToPaint=this.sections,(this.globalVars.desktop||this.globalVars.responsive&&!this.fromSideNav)&&this.teamService.broadcast("getTeams",{currentSeason:this.currentSeason,teams:this.teams,sections:this.sections,sectionsToPaint:this.sectionsToPaint})):(this.teams=[],this.sections=[],this.sectionsToPaint=[],(this.globalVars.desktop||this.globalVars.responsive&&!this.fromSideNav)&&this.teamService.broadcast("getTeams",{currentSeason:this.currentSeason,teams:this.teams,sections:this.sections,sectionsToPaint:this.sectionsToPaint})),this.seasonLoading=!1,this.teamLoading=!1,this.globalVars.responsive||this.teamService.broadcast("finishLoadingTeams",{})})}getSeasonTeams(e){this.seasonId=e,this.teamLoading=!0,this.apiTeamsService.getTeams(this.seasonId,"true",null!=this.currentSection?this.currentSection.id:"-1").subscribe(i=>{this.sectionsToPaint=[],this.sections.forEach(o=>delete o.teamsToShow),this.teams=[],i.length>0?(i.forEach(o=>{if(this.teams.push(o),this.sections.length>1){let n=this.sections.findIndex(P=>P.id===o.sectionId),c=this.sections[n];c=c.hasOwnProperty("teamsToShow")?{...c,teamsToShow:[...c.teamsToShow,o]}:{...c,teamsToShow:[o]},this.sections.splice(n,1,c)}else{let n=this.sections[0];n=n.hasOwnProperty("teamsToShow")?{...n,teamsToShow:[...n.teamsToShow,o]}:{...n,teamsToShow:[o]},this.sections[0]=n}}),this.sectionsToPaint=this.sections,(this.globalVars.desktop||this.globalVars.responsive&&!this.fromSideNav)&&this.teamService.broadcast("getTeams",{currentSeason:this.currentSeason,teams:this.teams,sections:this.sections,sectionsToPaint:this.sectionsToPaint})):(this.teams=[],this.sections=[],this.sectionsToPaint=[],(this.globalVars.desktop||this.globalVars.responsive&&!this.fromSideNav)&&this.teamService.broadcast("getTeams",{currentSeason:this.currentSeason,teams:this.teams,sections:this.sections,sectionsToPaint:this.sectionsToPaint}))})}setQuery(){(0,G.UE)(this.platformId)&&localStorage.setItem("teamFilter",JSON.stringify(this.query))}applyFilters(){this.setQuery(),this.teamService.broadcast("getTeams",{currentSeason:this.currentSeason,teams:this.teams,sections:this.sections,sectionsToPaint:this.sectionsToPaint}),this.appService.broadcast("closeSidenav",{isErasing:!1})}closeFilters(){this.paramSections=null,localStorage.removeItem("teamFilter"),this.firstLoad(),this.appService.broadcast("closeSidenav",{isErasing:!0})}static \u0275fac=function(t){return new(t||r)(s.rXU(l.ok),s.rXU(h.q),s.rXU(O.X),s.rXU(K.k),s.rXU(v.Y),s.rXU(f.u),s.rXU(y.Ix),s.rXU(y.nX),s.rXU(V.g),s.rXU(F.Y),s.rXU(N.o),s.rXU(S.d),s.rXU(g.M),s.rXU(B.P),s.rXU(_.k),s.rXU(L.n),s.rXU(W.ZV),s.rXU(s.Agw),s.rXU(M.T))};static \u0275cmp=s.VBU({type:r,selectors:[["app-team-select-filters"]],inputs:{fromSideNav:"fromSideNav"},standalone:!1,decls:3,vars:3,consts:[["class","section-header main-part",4,"ngIf"],["class","sidenav-form",3,"formGroup",4,"ngIf"],["class","buttons-filters",4,"ngIf"],[1,"section-header","main-part"],[1,"clupik-title-h1"],[1,"sidenav-form",3,"formGroup"],["formControlName","season","type","select",3,"isDark","inputSize","selectOptions","select"],["formControlName","section","type","select",3,"isDark","isSelectMultiple","
1inputSize","selectOptions","select",4,"ngIf"],["formControlName","competition","type","select",3,"isDark","isSelectMultiple","inputSize","selectOptions","select",4,"ngIf"],["formControlName","section","type","select",3,"isDark","isSelectMultiple","inputSize","selectOptions","select"],["formControlName","competition","type","select",3,"isDark","isSelectMultiple","inputSize","selectOptions","select"],[1,"buttons-filters"],[3,"buttonAction","isMain","isOutlined","value","size"],[3,"buttonAction","isMain","value","size"]],template:function(t,i){1&t&&s.DNE(0,k,4,6,"div",0)(1,Z,4,8,"form",1)(2,q,3,7,"div",2),2&t&&(s.Y8G("ngIf",i.loaded&&i.globalVars.desktop&&!i.isNewLayout),s.R7$(),s.Y8G("ngIf",i.loaded),s.R7$(),s.Y8G("ngIf",i.globalVars.responsive))},dependencies:[X.bT,l.qT,l.BC,l.cb,l.j4,l.JD,x.H,j.S,w.D9],encapsulation:2})}return r})()}}]);

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.