1import{C as oe}from"./CarouselSponsorWidget-7a8251fc.js";import{S as ne}from"./SponsorList-1ab75dca.js";import{_ as U,L as S,h as J,D as v,b as i,c as g,l as A,j as K,k as f,t as a,d as e,v as B,x as X,y as $,r as T,F as w,s as O,g as x,i as M,B as se,A as H,w as Z}from"./index-2e9905b2.js";import{C as ie}from"./Condividi-a4b2f7dc.js";import{u as le}from"./apiCall-7f5599ba.js";import{S as re,u as ce}from"./StatsMatchATP-b3f2b48e.js";import{u as de}from"./vue.f36acd1f-7d6c8106.js";import"./callApiSaveStoreBanner-8147d416.js";import"./swAlert-cd67e95d.js";import"./getWindowWidth-17ed1663.js";import"./callApiSaveStore-a7fa4728.js";const ue={name:"dettaglio-giocatore",props:{img_src:{type:String},bandiera:{type:String},nome:{type:String},cognome:{type:String},rank:{type:String},nrTitlesSingles:{type:Number},rankType:{type:String},rankDoubles:{type:String},nrTitlesDoubles:{type:Number},date_data:{type:String}},setup(){return{LINGUE:S,PROD:J(()=>!0)}},computed:{language(){var d;return((d=window.location.pathname.match(/^\/([^\/]+)/))==null?void 0:d[1])==S.ITALIANO?S.ITALIANO:S.INGLESE}}},F=m=>(X("data-v-0cc0b28b"),m=m(),$(),m),_e={class:"single-intro-spacer player-intro-card"},ge={class:"wrap"},me={class:"image"},he={class:"img-spacer"},fe=["src"],ye={class:"content"},pe=["src"],ke={class:"player-name"},Se={class:"numbers"},ve=F(()=>e("br",null,null,-1)),Ee={class:"rank-divider"},be=F(()=>e("br",null,null,-1)),Ne=F(()=>e("br",null,null,-1)),Ie=F(()=>e("br",null,null,-1));function Ge(m,d,o,t,C,r){const p=v("router-link");return i(),g("div",_e,[A(p,{to:r.language==t.LINGUE.ITALIANO?"/it/players":"/en/players",class:"crumb"},{default:K(()=>[f(a(r.language==t.LINGUE.INGLESE?"players":"giocatori"),1)]),_:1},8,["to"]),e("div",ge,[e("div",me,[e("div",he,[e("img",{src:o.img_src,class:"attachment-player-big size-player-big wp-post-image",alt:"",decoding:"async"},null,8,fe)])]),e("div",ye,[o.bandiera?(i(),g("img",{key:0,class:"flag",src:`/wp-content/themes/ibi23/assets/img/flags/${o.bandiera.toLowerCase()}.svg`},null,8,pe)):B("",!0),e("h1",ke,[f(a(o.nome)+" ",1),e("strong",null,a(o.cognome),1)]),e("div",Se,[e("p",null,[e("strong",null,a(o.rank||"-"),1),f("Ranking "+a(o.rankType)+" ",1),ve,f(" "+a(r.language==t.LINGUE.INGLESE?"Singles":"Singolo"),1)]),e("p",Ee,[e("strong",null,a(o.nrTitlesSingles),1),f(" "+a(r.language==t.LINGUE.INGLESE?"Singles":"Titoli vinti")+" ",1),be,f(" "+a(r.language==t.LINGUE.INGLESE?"titles won":"in singolare"),1)]),e("p",null,[e("strong",null,a(o.rankDoubles||"-"),1),f("Ranking "+a(o.rankType)+" ",1),Ne,f(" "+a(r.language==t.LINGUE.INGLESE?"Doubles":"Doppio"),1)]),e("p",null,[e("strong",null,a(o.nrTitlesDoubles||0),1),f(" "+a(r.language==t.LINGUE.INGLESE?"Doubles":"Titoli vinti")+" ",1),Ie,f(" "+a(r.language==t.LINGUE.INGLESE?"titles won":"in doppio"),1)])])])])])}const Le=U(ue,[["render",Ge],["__scopeId","data-v-0cc0b28b"]]);const Te={name:"risultati-giocatore",props:{dettaglioGiocatore:{type:Object||void 0},risultati_giocatore:{type:Array}},emits:["match-click"],setup(m,{emit:d}){var R;const o=T(""),t=(l,u,y,k)=>{let _;if(o.value="?associations=ATP",k=="WTA")if(o.value="?associations=WTA",y=="Single")if(u=="M")switch(l){case"F":_="Finals";break;case"S":_="Semifinals";break;case"Q":_="Quarterfinals";break;case"4":_="Round of 16";break;case"3":_="Round of 32";break;case"2":_="Round of 64";break;case"1":_="Round of 128";break}else switch(l){case"2":_="2nd Round Qualifying";break;case"1":_="1st Round Qualifying";break}else if(u=="M")switch(l){case"F":_="Finals";break;case"S":_="Semifinals";break;case"Q":_="Quarterfinals";break;case"4":_="Round of 16";break;case"3":_="Round of 32";break;case"2":_="Round of 64";break;case"1":_="Round of 128";break}else switch(l){case"2":_="2nd Round Qualifying";break;case"1":_="1st Round Qualifying";break}else return l;return _},r=((R=window.location.pathname.match(/^\/([^\/]+)/))==null?void 0:R[1])==S.ITALIANO?"/it/players":"/en/players",p=l=>{let u=!1;return l.teams.forEach(y=>{y.players.forEach(k=>{k.firstName==="Bye"&&(console.log("Il primo nome del giocatore è Bye."),u=!0)})}),u},G=l=>{let u=!1;
1return l.teams.forEach(y=>{y.players.forEach(k=>{k.firstName==="Qualifier"&&(u=!0)})}),u},n=l=>{let u=!1;return l.teams.forEach(y=>{y.players.forEach(k=>{k.firstName==="TBA"&&(u=!0)})}),u},c=l=>!!l.serve,h=(l,u)=>String(l.serve)===String(u);return{onMatchClick:l=>{d("match-click",{showModalStats:!0,selectedMatch:l,tipologia_torneo_selezionato:o.value})},LINGUE:S,getRoundLabel:t,routePlayersLanguage:r,includeBye:p,includeQualifier:G,includeTBA:n,includeServe:c,isServingTeam:h,isServingPlayer:(l,u,y,k)=>h(l,u)?!Array.isArray(y)||y.length<=1?k===0:k===1:!1,includeWinner:l=>{let u=!1;return l.teams.forEach(y=>{y.isWinner==!0&&(u=!0)}),u},tipologia_torneo_selezionato:o}},computed:{language(){var d;return((d=window.location.pathname.match(/^\/([^\/]+)/))==null?void 0:d[1])==S.ITALIANO?S.ITALIANO:S.INGLESE}}},ee=m=>(X("data-v-85baeed0"),m=m(),$(),m),Ae={key:0,class:"main-section player-matches"},we=ee(()=>e("h2",{class:"section-title"},"Risultati",-1)),Ce=ee(()=>e("p",null,"Il giocatore non ha ancora disputato nessun match per lâedizione in corso",-1)),Re=[we,Ce],De={key:1,class:"main-section player-matches"},Me={class:"section-title"},Be={class:"matches-list wide"},Pe={class:"match-header"},Oe={class:"round"},Ue={class:"time"},Fe={class:"left round-label"},Qe={class:"time"},We={class:"match_code"},ze=["onClick"],xe={class:"match-result"},Ve={class:"players-wrap"},qe=["src","alt"],Ye={class:"first-letter"},je={class:"first-letter seed"},He={class:"points pts-1 live-score"};function Ze(m,d,o,t,C,r){const p=v("IconTime"),G=v("router-link");return o.risultati_giocatore?(i(),g("div",De,[e("h2",Me,a(r.language==t.LINGUE.INGLESE?"results":"risultati"),1),e("div",Be,[(i(!0),g(w,null,O(o.risultati_giocatore,(n,c)=>(i(),g("div",{class:"match",key:c},[e("span",Pe,[e("span",Oe,a(t.getRoundLabel(n.round,n.drawLevel,n.draw,n.tournament)),1),e("span",Ue,a(n.tempo),1),e("span",Fe,a(n.timeDescription)+" "+a(n.time?m.convertiFusoOrarioItaliano(n.time):""),1),e("span",Qe,[A(p),f(a(n.duration)+" ⢠",1)]),e("span",We,[e("b",null,[!n.teams[0].isWinner&&!n.teams[1].isWinner&&n.duration!=null&&n.duration!="00:00:00"?(i(),g("span",{key:0,class:x(n.suspended?"suspended-notice":"live-notice")},a(n.suspended?"Suspended":"Live"),3)):B("",!0),f(a(n.courtName),1)])]),n.matchId&&!t.includeBye(n)&&!t.includeQualifier(n)&&!t.includeTBA(n)&&(t.includeServe(n)||t.includeWinner(n))?(i(),g("button",{key:0,type:"button",style:{cursor:"pointer"},onClick:h=>t.onMatchClick(n)}," STATS ",8,ze)):B("",!0)]),e("div",xe,[(i(!0),g(w,null,O(n.teams,(h,b)=>(i(),g("div",{key:b,class:x([{winner:h.isWinner&&!t.includeBye(n),"is-doubles":h.players&&h.players.length>1},"match-item item-1"])},[e("div",Ve,[(i(!0),g(w,null,O(h.players,(s,E)=>(i(),g("div",{class:x(["players",{serving:t.isServingPlayer(n,b,h.players,E)}]),key:E},[s.firstName=="Bye"||s.firstName=="BYE"||s.firstName=="Qualifier"||s.firstName=="QUALIFIER"||s.firstName=="TBA"||s.firstName=="N/A"?(i(),g(w,{key:0},[f(a(s.firstName),1)],64)):(i(),M(G,{key:1,class:"player",to:m.pathIncludePlayer?`${t.routePlayersLanguage}/${s.lastName}-${s.firstName}`:`${t.routePlayersLanguage}/${s.lastName}-${s.firstName}`},{default:K(()=>[s.country?(i(),g("img",{key:0,class:"flag",src:`/wp-content/themes/ibi23/assets/img/flags/${s.country.toLowerCase()}de3f.svg?v=20220508`,alt:s.country},null,8,qe)):B("",!0),e("em",Ye,a(s.firstName),1),e("span",null,a(s.lastName),1),f(a(s.lastName)+" ",1),e("em",je,a(s.seed),1)]),_:2},1032,["to"]))],2))),128))]),e("span",He,a(h.gamePointsPlayerTeam),1),(i(!0),g(w,null,O(h.sets,(s,E)=>(i(),g("span",{key:E,class:"set set1-1"},[e("strong",null,a(s.score),1),e("sup",null,a(s.tieBreakScore),1)]))),128))],2))),128))])]))),128))])])):(i(),g("div",Ae,Re))}const Je=U(Te,[["render",Ze],["__scopeId","data-v-85baeed0"]]);const Ke={name:"dati-giocatore",props:{dettaglioGiocatore:{type:Object||void 0},risultati_giocatore:{type:Array}},setup(){return{LINGUE:S}},computed:{language(){var d;return((d=window.location.pathname.match(/^\/([^\/]+)/))==null?void 0:d[1])==S.ITALIANO?S.ITALIANO:S.INGLESE}}},Xe={class:"player-data"},$e={class:"item"},et={class:"item"},tt={class:"item"},at={class:"item"},ot={class:"item"};function nt(m,d,o,t,C,r){return i(),g("div",Xe,[e("dl",null,[e("div",$e,[e("dt",null,a(r.language==t.LINGUE.INGLESE?"COUNTRY":"Paese"),1),e("dd",null,a(o.dettaglioGiocatore.country_it),1)]),e("div",et,[e("dt",null,a(r.language==t.LINGUE.INGLESE?"DATE OF BIRTH":"Data di nascita"),1),e("dd",null,[f(a(o.dettaglioGiocatore.formatted_date)+" ",1),e("em",null,a(o.dettaglioGiocatore.years),1)])]),e("div",tt,[e("dt",null,a(r.language==t.LINGUE.INGLESE?"height":"Altezza"),1),e("dd",null,[f(a(o.dettaglioGiocatore.height=="2cm"?"":o.dettaglioGiocatore.height)+" ",1),e("em",null,a(o.dettaglioGiocatore.height=="2cm"?"":o.dettaglioGiocatore.heightFt),1)])]),e("div",at,[e("dt",null,a(r.language==t.LINGUE.INGLESE?"dominant hand":"braccio dominante"),1),e("dd",null,a(o.dettaglioGiocatore.arm),1)]),e("div",ot,[e("dt",null,a(r.language==t.LINGUE.INGLESE?"source":"Fonte dati"),1),e("dd",null,[f(a(o.dettaglioGiocatore.rankType)+" ",1),e("em",null,a(o.dettaglioGiocatore.date_data),1)])])])])}const st=U(Ke,[["render",nt],["__scopeId","data-v-1f39a33c"]]),it={name:"PlayerTeaser",components:{Condividi:ie,CarouselSponsorWidget:oe,SponsorList:ne,FotoRankingGiocatore:Le,DettaglioRisultatiGiocatore:Je,DatiGiocatore:st,StatsMatchATP:re},setup(){var V;const m=(V=window.location.pathname.match(/^\/([^\/]+)/))==null?void 0:V[1],d=se(),o=T(d.path);console.log("path",o);const t=T({idPlayer:"",idSite:m,url:d.path.replace(/\s/g,"%20")}),C=le(H.PLAYERS_VIEW,t,!0),{loading:r,data:p,status:G,getData:n}=C,c=J(()=>p.value&&p.value.results&&p.value.results[0]?p.value.results[0]:null),h=T(`?id_giocatore=${c.value?c.value.playerCode:""}&association=${c.value?c.value.rankType:""}`),b=ce(H.PLAYER_RESULTS,h,!1),{loading:s,data:E,status:R,getData:l}=b;Z(c,async()=>
1{if(c.value&&c.value.playerCode&&(h.value=`?id_giocatore=${c.value.playerCode}&association=${c.value.rankType??""}`,await l(),c.value&&c.value.seo)){const N=new DOMParser().parseFromString(c.value.seo,"text/html"),q=N.head,Q=q.firstElementChild,W=q.lastElementChild,te=Array.from(N.querySelectorAll("meta")).map(L=>{const I={};return Array.from(L.attributes).forEach(P=>{I[P.name]=P.value}),I.name==="title"?null:I}).filter(L=>L!==null),ae=Array.from(N.querySelectorAll("link")).map(L=>{const I={};return Array.from(L.attributes).forEach(P=>{I[P.name]=P.value}),I});let z="";const Y=N.querySelector("title"),j=N.querySelector('meta[name="title"]');Y?z=Y.textContent:j&&(z=j.getAttribute("content")||""),de({title:z,meta:te,link:ae}),Q&&W&&setTimeout(()=>{const L=document.createComment(" INIZIO CODICE SEO "),I=document.createComment(" FINE CODICE SEO ");Q.parentNode.insertBefore(L,Q),W.parentNode.insertBefore(I,W.nextSibling)},200)}}),Z(()=>d.path,async()=>{var N;const D=(N=window.location.pathname.match(/^\/([^\/]+)/))==null?void 0:N[1];t.value={idPlayer:"",idSite:D,url:d.path.replace(/\s/g,"%20")},await n(),h.value=`?id_giocatore=${c.value?c.value.playerCode:""}&association=${c.value?c.value.rankType:""}`});const u=T(!1),y=T(null),k=T("");return{tipologia_torneo_selezionato:k,onMatchClick:D=>{u.value=D.showModalStats,y.value=D.selectedMatch,k.value=D.tipologia_torneo_selezionato},showModalStats:u,selectedMatch:y,dettaglio_persona:c,loading:r,data:p,status:G,loading_results:s,data_results:E,status_results:R,path:o}},computed:{risultati_giocatore(){return this.data_results&&this.data_results.matches?this.data_results.matches:[]}}},lt={key:0,class:"container"},rt={class:"single-intro",id:"player-intro"},ct={class:"single-content",id:"player-content"},dt={class:"single-content-main"};function ut(m,d,o,t,C,r){const p=v("StatsMatchATP"),G=v("gestione-errore"),n=v("FotoRankingGiocatore"),c=v("DatiGiocatore"),h=v("DettaglioRisultatiGiocatore"),b=v("loader-gym"),s=v("Condividi"),E=v("CarouselSponsorWidget"),R=v("SponsorList");return i(),g(w,null,[A(p,{showModalStats:t.showModalStats,onSetModalShow:d[0]||(d[0]=l=>t.showModalStats=l),selectedMatch:t.selectedMatch,tipologia_torneo_selezionato:t.tipologia_torneo_selezionato},null,8,["showModalStats","selectedMatch","tipologia_torneo_selezionato"]),t.loading?(i(),M(b,{key:1})):(i(),g("div",lt,[t.status!=200&&t.dettaglio_persona||t.status==200&&!t.dettaglio_persona?(i(),M(G,{key:0})):(i(),g(w,{key:1},[e("div",rt,[t.dettaglio_persona?(i(),M(n,{key:0,img_src:t.dettaglio_persona.image,bandiera:t.dettaglio_persona.abbrCountry,nome:t.dettaglio_persona.firstName,cognome:t.dettaglio_persona.lastName,nrTitlesSingles:t.dettaglio_persona.nrTitlesSingles,rank:t.dettaglio_persona.rankSingles,rankDoubles:t.dettaglio_persona.rankDoubles,nrTitlesDoubles:t.dettaglio_persona.nrTitlesDoubles,rankType:t.dettaglio_persona.rankType,date_data:t.dettaglio_persona.date_data},null,8,["img_src","bandiera","nome","cognome","nrTitlesSingles","rank","rankDoubles","nrTitlesDoubles","rankType","date_data"])):B("",!0)]),e("div",ct,[e("div",dt,[A(c,{dettaglioGiocatore:t.dettaglio_persona},null,8,["dettaglioGiocatore"]),!t.loading_results&&r.risultati_giocatore.length?(i(),M(h,{key:0,dettaglioGiocatore:t.dettaglio_persona,risultati_giocatore:r.risultati_giocatore,onMatchClick:t.onMatchClick},null,8,["dettaglioGiocatore","risultati_giocatore","onMatchClick"])):t.loading_results?(i(),M(b,{key:1})):B("",!0)]),A(s)]),A(E),A(R)],64))]))],64)}const It=U(it,[["render",ut]]);export{It as default};
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.