PageSourceSearch

https://teetime.cz/_next/static/chunks/pages/tournaments/[slug]-0a06e8a12cc7a1cc.js

js teetime.cz collected 2026-10-08 19:49:33 UTC 46,105 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[79435],{12176:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/tournaments/[slug]",function(){return r(65444)}])},65444:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return eY},default:function(){return eV}});var o=r(35944),n=r(29726),i=r(29568),l=r(98106),a=r(96752);let s=(0,a.H)({key:{name:"queryGetRegisteredTournamentPlayers",opts:{providesTags:["PortalGetRegisteredTournamentPlayers"]}},async queryFn(e,t){let{pageParam:r}=t;return(await (0,i.Sj)()).portal.tournamentsController.getRegisteredPlayers({page:r,...e})}});function d(e){let t=(0,n.N)(s(e));return(0,l.J)({query:t,getRaw:()=>t.data,getItems(){var e,t;return null!==(t=null===(e=this.getRaw())||void 0===e?void 0:e.pages.map(e=>{var t;return null!==(t=e.data)&&void 0!==t?t:[]}).flat())&&void 0!==t?t:[]}})}let c=(0,a.kZ)({key:{name:"queryGetTournamentAttachments",opts:{providesTags:["Membership"]}},async queryFn(e){let{tournamentId:t}=e;return(await (0,i.Sj)()).portal.tournamentsController.getTournamentAttachments({tournamentId:t})}}),u=(0,a.gc)(c,e=>({query:e,getRaw(){var t;return null!==(t=e.data)&&void 0!==t?t:[]}})),m=(0,a.kZ)({key:{name:"queryTournamentDetails",opts:{providesTags:["PortalGetTournamentDetails"]}},async queryFn(e){let{tournamentId:t,lat:r,lng:o}=e;try{let e=await (0,i.q7)(),n=await e.portal.tournamentsController.getTournamentDetails({tournamentId:t,lat:r,lng:o});if(!n)throw Error("No data returned from the API.");return n}catch(e){throw console.error("Error fetching tournament details",e),Error("Podrobnosti o letovisku se nepodařilo nač\xedst")}}}),g=(0,a.gc)(m,e=>({query:e})),h=(0,a.kZ)({key:{name:"queryGetTournamentStartList ",opts:{providesTags:["PortalGetUserTournamentRegistration"]}},queryFn:async e=>{let t=await (0,i.Sj)(),{tournamentId:r}=e;return t.portal.tournamentsController.getTournamentStartList({tournamentId:r})}}),p=(0,a.gc)(h,e=>({query:e,getRaw:()=>e.data}));var _=r(31008),v=r(16448),y=r(82124),b=r(80037),Z=r(69280),x=r(36854),f=r(33916),w=r(98029),z=r(75056),H=r(50044),I=r(72140),C=r(79986),k=r(75413),P=r(90875),T=r(43573),B=r(50154),R=r(40131),X=r(23075),K=r(16993),N=r(63351),D=r(41664),j=r.n(D),S=r(11163),A=r(67294),L=r(55678),F=r(38473),q=r(4561),E=r(79612),O=r(61758),W=r(56312),G=r(25107),M=r(1836),U=r(75022),Y=r(47962),V=r(6708),J=r(1725),Q=r(90278),$=r(47438),ee=r(87536),et=r(84703),er=r(24775),eo=r(52044),en=r(1604),ei=r(71480),el=r(63619),ea=()=>{var e,t,r,n,i;let{t:l}=(0,X.L)("UnRegisterTournamentModal"),{closeAll:a}=(0,P.vR)(),{slug:s}=(0,S.useRouter)().query,{tournamentDetails:d}=(0,f.t)(),{query:c}=(0,z.r)({resortId:null==d?void 0:d.resortDetails.resortId,tournamentId:s}),u=(0,M.D)(),m=(0,G.Z)(),{toast:g}=(0,eo.p)(),h=c.data,[p,_]=(0,A.useState)(null),[v,y]=(0,A.useState)([]),[b,x]=(0,A.useState)(!1),w=async(e,t)=>{t||1!==e.length||_(e[0]||null);try{await u.mutation.mutateAsync({requestBody:{resortId:null==d?void 0:d.resortDetails.resortId,tournamentPlayerIds:e},tournamentId:null==d?void 0:d.tournamentId})&&t?(a(),g((0,o.tZ)(B.b,{title:l("tournament_unregistered_title","\xdaspěch"),description:l("tournament_unregistered_description","Turnaj byl zrušen.")}),{containerId:"global"}),window.location.reload()):g((0,o.tZ)(B.b,{title:l("tournament_unregistered_title","\xdaspěch"),description:l("player_tournament_unregistered_description","Hr\xe1č byl z turnaje vyřazen.")}),{containerId:"global"})}finally{_(null)}},H=async()=>{if(0===v.length){g((0,o.tZ)(V.h,{title:l("no_players_selected","Nevybr\xe1ni ž\xe1dn\xed hr\xe1či"),description:l("please_select_players","Vyberte alespoň jednoho hr\xe1če pro přid\xe1n\xed")}),{containerId:"global"});return}x(!0);try{let e=v.map(e=>e.playerId);await m.mutation.mutateAsync({requestBody:{playerIds:e,resortId:null==d?void 0:d.resortDetails.resortId,note:(null==h?void 0:h.registration.note)||null},tournamentId:null==d?void 0:d.tournamentId})&&(g((0,o.tZ)(B.b,{title:l("players_added_title","\xdaspěch"),description:l("players_added_description","Hr\xe1či byli přid\xe1ni k registraci turnaje!")}),{containerId:"global"}),a())}catch(t){let e=(0,er.P)({error:t});g((0,o.tZ)(V.h,{title:l("failed_to_add_players","Selhalo"),description:e.description}),{containerId:"global"})}finally{x(!1)}},k=en.z.object({note:en.z.string()}),T=(0,ee.cI)({resolver:(0,W.F)(k),defaultValues:{note:(null==h?void 0:null===(e=h.registration)||void 0===e?void 0:e.note)||""}});return(0,o.tZ)(o.HY,{children:(0,o.BX)(Y.A,{preferredWidth:(0,et.cH)(702),form:void 0,children:[(0,o.tZ)(Q.r,{}),(0,o.BX)(Z.K,{gap:"1.25rem",accurateSpacers:!0,css:{marginTop:"1rem"},children:[(0,o.tZ)(Z.K,{css:{[N.l0.md]:{img:{borderRadius:"0.72rem"}}},children:(0,o.tZ)(el.Z,{image:(null==d?void 0:null===(n=d.resortDetails)||void 0===n?void 0:null===(r=n.gallery)||void 0===r?void 0:null===(t=r[0])||void 0===t?void 0:t.resizedImageURL)||"/images/resort/resort
1-banner.png",imageHeight:"15rem"})}),(0,o.BX)(Z.K,{gap:"1rem",children:[(0,o.BX)(Z.K,{gap:"0.6rem",css:{textAlign:"center"},children:[(0,o.tZ)(R.H,{size:"text_lg",weight:"semibold",color:F.colors.gray900,children:l("registration_end_date_title","Term\xedn: {{endDate}}",{endDate:(null==d?void 0:d.registrationClosedAt)?d.registrationClosedAt.split("T")[0]:l("registration_end_date_not_specified","Nen\xed uvedeno")})}),(0,o.tZ)(R.H,{size:"text_sm",weight:"regular",color:F.colors.gray600,children:null==d?void 0:d.formOfRegistration}),(0,o.tZ)(R.H,{size:"text_sm",weight:"regular",color:F.colors.gray600,children:null==d?void 0:d.description})]}),(0,o.tZ)(o.HY,{children:(0,o.tZ)(Z.K,{gap:"0.8rem",children:(0,o.tZ)(ei.Z,{selectedPlayers:v,setSelectedPlayers:y})})}),(0,o.BX)(o.HY,{children:[(null==h?void 0:null===(i=h.registration)||void 0===i?void 0:i.note)&&(0,o.tZ)($.nv,{label:l("note_text","Pozn\xe1mka"),form:T,name:"note",height:2.5,disabled:!0,width:"100%"}),(0,o.BX)(Z.K,{gap:"0.8rem",children:[(0,o.tZ)(R.H,{size:"text_md",weight:"medium",color:F.colors.gray700,children:l("player_count_text","{{playersCount}} Existuj\xedc\xed hr\xe1či",{playersCount:(null==h?void 0:h.registration.players.length)||0})}),(0,o.tZ)(Z.K,{children:null==h?void 0:h.registration.players.map((e,t)=>(0,o.BX)(Z.K,{horizontal:!0,gap:"1rem",center:!0,css:{justifyContent:"space-between",padding:"0.72rem 0",borderBottom:"1px solid ".concat(F.colors.gray200)},children:[(0,o.BX)(Z.K,{horizontal:!0,gap:"1rem",center:!0,children:[(0,o.tZ)(U.q,{entity:{type:"custom",imageSrc:e.profileURL,initials:e.firstName.split(" ").slice(0,2).reduce((e,t)=>{var r;return e+(null!==(r=null==t?void 0:t[0])&&void 0!==r?r:"")},"")},size:"2.6rem"}),(0,o.tZ)(Z.K,{children:(0,o.tZ)(R.H,{size:"text_sm",weight:"medium",color:F.colors.gray900,children:"".concat(e.firstName," ").concat(e.lastName)})})]}),(0,o.tZ)(J.h,{loading:p===e.tournamentPlayerId,disabled:!!p&&p!==e.tournamentPlayerId,onClick:()=>w([e.tournamentPlayerId]),children:(0,o.tZ)(C.J,{name:"Trash01"})})]},t))})]})]})]}),(0,o.BX)(Z.K,{gap:"2rem",horizontal:!0,children:[(0,o.tZ)(I.z,{css:{width:"100%","& > *":{width:"100%"}},color:"secondary_gray",onClick:()=>{a()},children:l("cancel_tournament_unregister","Zrušit")}),0===v.length?(0,o.tZ)(I.z,{css:{width:"100%","& > *":{width:"100%"}},onClick:()=>{var e;return w(null!==(e=null==h?void 0:h.registration.players.map(e=>e.tournamentPlayerId))&&void 0!==e?e:[],!0)},children:l("cancel_tournament_registration","Zrušit registraci do turnaje")}):(0,o.tZ)(I.z,{css:{width:"100%","& > *":{width:"100%"}},loading:b,disabled:0===v.length||b,onClick:H,children:l("add_players_button","Přidat hr\xe1če k registraci")})]})]})]})})},es=r(94358),ed=r(38797),ec=()=>(0,o.tZ)(o.HY,{children:(0,o.BX)(Z.K,{horizontal:!0,gap:"1rem",css:{width:"100%",justifyContent:"space-between",alignItems:"start"},wrapGap:"1rem",children:[(0,o.tZ)(eu,{}),(0,o.tZ)(em,{})]})});let eu=()=>{var e,t,r,n,i,l;let{t:a}=(0,X.L)("TournamentsDetailsHeader"),s=K.n.getPortalResortsPage(),{tournamentDetails:c}=(0,f.t)(),{slug:u}=(0,S.useRouter)().query,{query:m}=d({tournamentId:u,limit:7});if(!c)return null;let g=(0,T.z3)((null===(e=c.resortDetails)||void 0===e?void 0:e.country)||"CZ"),h=c.startAt?(0,T.g0)(c.startAt,(null==g?void 0:g[0])||"Europe/Prague"):"",p=c.startAt?(0,T.Mx)(c.startAt,(null==g?void 0:g[0])||"Europe/Prague"):"";return(0,o.tZ)(y.I,{query:m,children:(0,o.BX)(Z.K,{horizontal:!0,gap:"1rem",css:{padding:"0 1rem",[N.l0.md]:{alignItems:"flex-start"}},children:[(0,o.BX)("div",{css:{width:"73px",borderRadius:"0.72rem",border:"1px solid ".concat(F.colors.gray200),boxShadow:"0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03)"},children:[(0,o.BX)(Z.K,{css:{padding:"8px",textAlign:"center",borderBottom:"1px solid ".concat(F.colors.gray200)},children:[(0,o.tZ)(R.H,{size:"text_xl",weight:"bold",color:F.colors.green500,children:(0,q.p6)(p,"short_day_of_month")}),(0,o.BX)(R.H,{size:"text_md",weight:"regular",color:F.colors.gray900,translate:"yes",children:[(0,q.ZD)(p),"."]})]}),(0,o.tZ)("div",{css:{padding:"8px",textAlign:"center"}
1,children:(0,o.tZ)(C.J,{name:"Trophy01",color:F.colors.gray400,size:26})})]}),(0,o.BX)(Z.K,{gap:"1rem",css:{alignItems:"flex-start",[N.l0.md]:{width:"calc(100% - 3rem)"}},children:[(0,o.BX)(Z.K,{gap:"0.5rem",children:[(0,o.tZ)(R.H,{size:"display_xs",weight:"semibold",color:F.colors.gray900,truncate:!0,css:{maxWidth:"40rem",[N.l0.md]:{maxWidth:"16rem",fontSize:"1.2rem"}},children:c.name}),(0,o.tZ)(k.O,{items:[(0,o.BX)(R.H,{size:"text_md",weight:"regular",color:F.colors.gray600,children:[(0,es.rU)((0,es.UV)(new Date(p).getDay())).formatName()," ",h]},"0"),(0,o.tZ)(R.H,{size:"text_md",weight:"regular",color:F.colors.gray600,children:a("round_column_text","Kolo {{roundNumber}}",{roundNumber:c.numOfRounds})},"1"),(0,o.tZ)(R.H,{size:"text_md",weight:"regular",color:F.colors.gray600,children:c.startMode},"2"),(0,o.tZ)(j(),{href:"".concat(s,"/").concat(c.resortDetails.resortId),css:{height:"100%",display:"flex"},children:(0,o.tZ)(R.H,{size:"text_md",weight:"regular",color:F.colors.gray600,css:{textDecoration:"underline"},children:c.resortDetails.resortName})},"3")],bulletColor:F.colors.gray300})]}),(0,o.tZ)("div",{css:{"& *":{width:"2rem",height:"2rem"}},children:(0,o.tZ)(H.ZP,{size:"2rem",avatars:null===(r=m.data)||void 0===r?void 0:null===(t=r.pages[0])||void 0===t?void 0:t.data.map(e=>({imageSrc:e.profileURL,type:"custom",initials:(e.firstName||"")+" "+(e.lastName||"")})),additionalAvatar:(null!==(l=null===(i=m.data)||void 0===i?void 0:null===(n=i.pages[0])||void 0===n?void 0:n.pagination.total)&&void 0!==l?l:0)-7,borderRadius:"50%"})})]})]})})},em=()=>{let{t:e}=(0,X.L)("HeaderButtonContent"),{tournamentDetails:t}=(0,f.t)(),[r,n]=(0,A.useState)(!1),{show:a}=(0,P.vR)(),s=(0,S.useRouter)(),{slug:d}=s.query,c=ed.X.getState();(0,E.fm)(null==t?void 0:t.isFavourite,()=>n(!!(null==t?void 0:t.isFavourite)));let u=function(){let e=(0,w.D)({mutationFn:async e=>{let{tournamentId:t}=e;return(await (0,i.vW)()).portal.tournamentsController.toggleTournamentFavourite({tournamentId:t})},onError:e=>{console.error("Failed to toggle favourite:",e)}});return(0,l.J)({mutation:e})}().mutation,m=!(null==t?void 0:t.registrationOpenedAt)&&!(null==t?void 0:t.registrationClosedAt),g=new Date((null==t?void 0:t.registrationClosedAt)||(null==t?void 0:t.startAt)||""),h=null==t?void 0:t.registrationOpenedAt,p=h?new Date(h):void 0,_=new Date,v=_>g,{query:y}=(0,z.r)({resortId:null==t?void 0:t.resortDetails.resortId,tournamentId:null==t?void 0:t.tournamentId}),b=!!p&&p<=_,x=!!p&&!!g,H=K.n.getPortalLoginPage(),C=()=>{var e;return null!=c&&null!==(e=c.currentUser)&&void 0!==e&&!!e.id||(s.push({pathname:H,query:{from:s.asPath}}),!1)},k=async()=>{if(!C()){(0,L.Am)((0,o.tZ)(B.y,{state:"warning",title:e("favourite_warning","Registrace nebo přihl\xe1šen\xed je vyžadov\xe1no"),description:e("favourite_warning_desc","Pro přid\xe1n\xed turnaje do vaš\xed obl\xedben\xe9 kolekce se mus\xedte přihl\xe1sit. Zaregistrujte se nebo se přihlaste a pokračujte.")}),{containerId:"global"});return}try{await u.mutateAsync({tournamentId:d}),n(!r)}catch(e){console.error("Failed to toggle favourite:",e)}};return(0,o.tZ)(o.HY,{children:(0,o.BX)(Z.K,{gap:"1.25rem",horizontal:!0,center:!0,css:{[N.l0.md]:{gap:"0.72rem",overflowX:"auto",padding:"0 1rem","::-webkit-scrollbar":{display:"none"}}},children:[m?null:y.data&&y.data.registration.isCurrentPlayerInGroup&&!v?(0,o.tZ)(I.z,{onClick:()=>{C()?a((0,o.tZ)(ea,{})):(0,L.Am)((0,o.tZ)(B.y,{state:"warning",title:e("unregistration_tournament_warning","Registrace nebo přihl\xe1šen\xed je vyžadov\xe1no"),description:e("unregistration_tournament_warning_desc","Pro zrušen\xed registrace do turnaje se mus\xedte přihl\xe1sit. Pro pokračov\xe1n\xed se zaregistrujte nebo přihlaste.")}),{containerId:"global"})},children:e("manage_tournament_registration_text","Spravovat registraci")}):!x||b||v?v?(0,o.tZ)(R.H,{size:"text_md",weight:"medium",color:F.colors.gray600,children:e("registration_date_ended","Datum registrace skončilo")}):(null==t?void 0:t.filledCapacity)&&(null==t?void 0:t.capacity)&&t.filledCapacity>=t.capacity&&!v?(0,o.tZ)(R.H,{size:"text_md",weight:"medium",color:F.colors.gray600,children:e("registration_limit_reached_text","Byl dosažen limit registrac\xed")}):(0,o.tZ)(I.z,{onClick:()=>{C()?a((0,o.tZ)(O.Z,{})):(0,L.Am)((0,o.tZ)(B.y,{state:"warning",title:e("registration_tournament_warning","Registrace nebo přihl\xe1šen\xed je vyžadov\xe1no"),description:e("registration_tournament_warning_desc","Pro registraci do turnaje se mus\xedte přihl\xe1sit. Pro pokračov\xe1n\xed se zaregistrujte nebo přihlaste.")}),{containerId:"global"})},children:e("signup_tournament_table_button","Přihlaste se do turnaje")}):(0,o.tZ)(I.z,{color:"link_gray",children:e("registration_not_started_text","Registrace zač\xedn\xe1 od - {{date}}",{date:(0,q.p6)(p,"short_date")})}
1),(0,o.tZ)(I.z,{css:{cursor:"pointer"},size:"md",color:"secondary_gray",iconName:"Share01",onClick:()=>{if(navigator.share)try{navigator.share({title:document.title,text:e("check_the_copied_url","Pod\xedvejte se na to!"),url:window.location.href})}catch(e){console.error("Error sharing:",e)}else navigator.clipboard.writeText(window.location.href).then(()=>{(0,L.Am)((0,o.tZ)(B.b,{iconName:"CheckCircle",title:"Link copied to clipboard!"}),{containerId:"global"})}).catch(e=>{console.error("Failed to copy the link:",e),(0,L.Am)("Failed to copy the link. Please try again.",{type:"error",containerId:"global"})})},children:e("tournaments_share_button","Sd\xedlet")}),(0,o.tZ)(I.z,{size:"md",iconName:"Heart",onClick:k,color:r?"error_outline":"secondary_gray"})]})})};var eg=r(17409),eh=r(53732),ep=r(31470),e_=r(12254),ev=r(93773),ey=()=>{var e,t,r,n,i,l;let{t:a}=(0,X.L)("AboutTournamentsDetails"),{tournamentDetails:s}=(0,f.t)(),d=[{title:a("description_text","Popis"),description:eb(null==s?void 0:s.description)},{title:a("form_registration_text","Způsob registrace"),description:eb(null==s?void 0:s.formOfRegistration)},{title:a("form_of_start_text","Startovac\xed metoda"),description:eb(null==s?void 0:s.formOfStart)},{title:a("conditions_text","Podm\xednky"),description:eb(null==s?void 0:s.conditions)},{title:a("proze_text","Ceny"),description:eb(null==s?void 0:s.prize)},{title:a("reservation_note_text","Pozn\xe1mka k rezervaci"),description:eb(null==s?void 0:s.reservationNote)},{title:a("boarding","Stravov\xe1n\xed"),description:eb(null==s?void 0:s.boarding)},{title:a("winners_text","V\xedtěz"),description:eb(null==s?void 0:s.winner)},{title:a("refund_cost_text","\xdahrada n\xe1kladů"),description:eb(null==s?void 0:s.refundCost)},{title:a("fee_text","Poplatky"),description:eb(null==s?void 0:s.tournamentFederationFeeDetails)}].filter(e=>e.description),c=!!(null==s?void 0:null===(e=s.tournamentCategories)||void 0===e?void 0:e.length),u=Array.isArray(null==s?void 0:s.tournamentRounds)&&(null==s?void 0:s.tournamentRounds.length)>0,m=(null!==(l=null==s?void 0:null===(n=s.tournamentRounds)||void 0===n?void 0:null===(r=n[0])||void 0===r?void 0:null===(t=r.startRules)||void 0===t?void 0:t.length)&&void 0!==l?l:0)>0;return(0,o.BX)(Z.K,{gap:"2rem",css:{paddingTop:"3rem",[N.l0.md]:{paddingTop:"2rem"}},children:[(null==d?void 0:d.length)>0&&(0,o.BX)(Z.K,{gap:"1.5rem",children:[(0,o.tZ)(R.H,{size:"text_lg",weight:"semibold",color:F.colors.gray900,children:a("F","O turnaji {{tournamentName}}",{tournamentName:null==s?void 0:s.name})}),(0,o.tZ)(Z.K,{css:{borderRadius:"0.72rem",padding:"2rem",border:"1px solid ".concat(F.colors.gray200),background:F.colors.gray25,[N.l0.md]:{background:F.colors.baseWhite,padding:"1rem"}},children:d.map((e,t)=>(0,o.BX)(Z.K,{gap:"0.5rem",css:{padding:"1rem 0","&:first-child":{paddingTop:0},"&:last-child":{paddingBottom:0},"&:not(:last-child)":{borderBottom:"1px solid ".concat(F.colors.gray100)}},children:[(0,o.tZ)(R.H,{size:"text_md",weight:"semibold",color:F.colors.gray700,children:e.title}),(0,o.tZ)(R.H,{size:"text_sm",weight:"regular",color:F.colors.gray600,children:e.description})]},t))})]}),c&&(null==s?void 0:s.tournamentCategories)&&(0,o.BX)(Z.K,{gap:"1.5rem",children:[(0,o.tZ)(R.H,{size:"text_lg",weight:"semibold",color:F.colors.gray900,children:a("about_tournament_competition_categories_title","Soutěžn\xed kategorie")}),(0,o.tZ)(eh._$,{columns:{name:{title:a("name_title_text","N\xe1zev"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",weight:"medium",children:e.name}),css:{padding:".4rem 1.5rem"}},system:{title:a("playing_system_title_text","Hrac\xed syst\xe9m"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",children:e.playingSystemCode===e_.O2.STABLE?a("stableford_text","Stableford"):a("for_wounds_text","Na r\xe1ny")}),css:{padding:".4rem 0"}},handicap:{title:a("playing_eith_hcp_title_text","Hra s HCP"),render:e=>(0,o.tZ)(eg.Ct,{color:e.useHandicap?"success":"gray",noIcon:!0,children:(0,o.tZ)(R.H,{size:"text_sm",children:e.useHandicap?a("yes_text","Ano"):a("no_text","Ne")})}),css:{padding:".4rem  1.5rem .4rem 0"}},handicapCorrection:{title:a("with_correction_title_text","S \xfapravou"),render:e=>(0,o.tZ)(eg.Ct,{color:e.handicapCorrection?"success":"gray",noIcon:!0,children:(0,o.tZ)(R.H,{size:"text_sm",children:e.handicapCorrection?a("yes_text","Ano"):a("no_text","Ne")})}),css:{padding:".4rem  1.5rem .4rem 0"}}},items:s.tournamentCategories.map(e=>({id:e.tournamentCategoryId,name:e.name,playingSystemCode:e.playingSystemCode,useHandicap:e.useHandicap,handicapCorrection:e.handicapCorrection}
1)),variables:{headerBackgroundColor:F.colors.gray25}})]}),u&&(null==s?void 0:s.tournamentRounds)&&m&&(0,o.BX)(Z.K,{gap:"1.5rem",children:[(0,o.tZ)(R.H,{size:"text_lg",weight:"semibold",color:F.colors.gray900,children:a("about_tournament_wheels_title","Turnajov\xe9 kolo")}),(0,o.tZ)(eh._$,{columns:{tee:{title:a("teen_ground_title_text","Odpaliště"),render:e=>(0,o.BX)("span",{style:{fontWeight:500},children:[" ",(0,o.tZ)(R.H,{size:"text_sm",children:e.tee})," "]}),css:{padding:".4rem 2rem"}},hcpFrom:{title:a("hcp_from_title_text","HCP od"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",children:(0,ev.PC)(e.hcpFrom)}),css:{padding:".4rem 0"}},hcpTo:{title:a("hcp_to_title_text","HCP do"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",children:(0,ev.PC)(e.hcpTo)}),css:{padding:".4rem 0"}},ageFrom:{title:a("age_from_title_text","Věk od"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",children:e.ageFrom}),css:{padding:".4rem 0"}},ageTo:{title:a("age_to_title_text","Věk do"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",children:e.ageTo}),css:{padding:".4rem 0"}},sex:{title:a("sex__title","Pohlav\xed"),render:e=>"M"===e.sex?(0,o.tZ)("span",{style:{background:"#E6F0FF",color:"#2684FF",borderRadius:"999px",padding:"0 8px",fontWeight:600,fontSize:18,display:"inline-block",minWidth:28,textAlign:"center"},children:(0,o.tZ)(R.H,{size:"text_sm",children:"M"})}):(0,o.tZ)("span",{style:{background:"#FCE6F2",color:"#D72660",borderRadius:"999px",padding:"0 8px",fontWeight:600,fontSize:18,display:"inline-block",minWidth:28,textAlign:"center"},children:(0,o.tZ)(R.H,{size:"text_sm",children:"F"})}),css:{padding:".4rem 1.5rem .4rem 0"}}},items:null===(i=s.tournamentRounds)||void 0===i?void 0:i.flatMap(e=>e.startRules.map((t,r)=>({id:"".concat(e.tournamentRoundId,"-").concat(r),section:"Round ".concat(e.localNumOfRound),tee:t.teeColorCode,hcpFrom:t.hcpFrom,hcpTo:t.hcpTo,ageFrom:t.ageFrom,ageTo:t.ageTo,sex:t.gender}))),section:{header:"once",identify:e=>e.section,render:e=>{var t;return(0,o.tZ)("div",{style:{gridColumn:"1 / -1",background:F.colors.primary100,color:F.colors.primary700,fontWeight:700,fontSize:20,padding:"0.5rem 0 0.5rem 2rem",width:"100%"},children:(0,o.tZ)(R.H,{size:"text_sm",children:a("round_column_text","Kolo {{roundNumber}}",{roundNumber:null==e?void 0:null===(t=e.section)||void 0===t?void 0:t.split(" ")[1]})})})}}})]}),(0,o.tZ)(ep.L,{size:"2rem"})]})};function eb(e){if(!e||"string"!=typeof e)return null;let t=/<a[^>]*href="([^"]+)"[^>]*>(.*?)<\/a>/gi,r=/(\[\[LINK:[^\]]+\]\])/g,n=/\[\[LINK:(.+?)\|(.+?)\]\]/,i=e.replace(/<br\s*\/?>/gi,"\n").split("\n");return i.map((e,l)=>{if(!e.trim())return l<i.length-1?(0,o.tZ)("br",{},l):null;let a=e.replace(t,(e,t,r)=>"[[LINK:".concat(t,"|").concat(r,"]]")).split(r);return(0,o.BX)(A.Fragment,{children:[a.map((e,t)=>{let r=e.match(n);if(r){let[,e,n]=r;return(0,o.tZ)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:n},t)}return e?(0,o.tZ)("span",{children:e},t):null}),l<i.length-1&&(0,o.tZ)("br",{})]},l)})}var eZ=r(1119),ex=r(66006),ef=r(5471),ew=r(79936),ez=()=>{let{t:e}=(0,X.L)("MoreTournaments"),{lat:t,lng:r}=(0,ed.X)(),{lat:n,lng:i}=(0,ew.R)(t,r),l=(0,eZ.q)({limit:3,order:"ASC",orderBy:"start_at_and_distance",requestBody:{lat:n,lng:i,isRegistrationActive:!0}}),a=l.getItems(),{tournamentDetails:s}=(0,f.t)(),d=a.filter(e=>e.id!==(null==s?void 0:s.tournamentId)),c=K.n.getPortalTournamentsPage();return(0,o.tZ)(y.I,{query:l.query,children:(null==d?void 0:d.length)>0&&(0,o.BX)(o.HY,{children:[(0,o.tZ)(ex.m,{color:F.colors.gray200,css:{margin:"2rem 0rem"}}),(0,o.BX)("div",{css:{display:"flex",gap:"2rem",[N.l0.lg]:{flexDirection:"row",alignItems:"flex-start"}},children:[(0,o.BX)(Z.K,{gap:"1rem",css:{flex:"0 0 320px",alignItems:"flex-start",[N.l0.md]:{padding:"0 1rem",gap:"0.6rem"}},children:[(0,o.tZ)(R.H,{size:"text_md",weight:"semibold",color:F.colors.primary700,children:e("more_tournaments_sub_title_text","Prozkoumejte okol\xed")}),(0,o.tZ)(R.H,{size:"display_md",weight:"semibold",color:F.colors.gray900,css:{fontSize:"clamp(1.2rem, 2vw + 0.8rem, 2rem)",lineHeight:1.3},children:e("more_tournaments_main_title_text","Dalš\xed turnaje")}),(0,o.tZ)(R.H,{size:"text_md",weight:"regular",color:F.colors.gray600,children:e("more_tournaments_desc","Objevte hřiště pobl\xedž {{resort}}",{resort:null==s?void 0:s.resortDetails.resortName})}),(0,o.tZ)(I.z,{href:c,css:{marginTop:"0.5rem"},children:e("tournaments_details_discover_more_button_text","Objevte v\xedce")})]}),(0,o.tZ)("div",{css:{display:"flex",gap:"1rem",overflowX:"auto",scrollSnapType:"x mandatory",paddingBottom:"0.5rem",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[N.l0.lg]:{flex:"1"}},children:d.map(e=>(0,o.tZ)("div",{css:{flex:"0 0 auto",minWidth:"260px",maxWidth:"320px",scrollSnapAlign:"start"},children:(0,o.tZ)(ef.Z,{data:e})},e.id))})]})]})})},eH=r(95714),eI=e=>{let{registeredPlayersQuery:t}=e,{t:r}=(0,X.L)("RegisteredPlayersTable"),{tournamentDetails:n}=(0,f.t)(),i=t.getItems();return(0,o.tZ)(Z.K,{css:{paddingTop:"4rem",[N.l0.md]:{paddingTop:"2rem"}},children:(0,o.tZ)(y.I,{query:t.query,children:(0,o.tZ)(eh._$,{sourceQuery:t.query,customHeader:(0,o.tZ)(eC,{registeredPlayerCount:null==n?void 0:n.filledCapacity,capacity:null==n?void 0:n.capacity}),items:i.map(e=>({id:e.tournamentPlayerId,...e})),columns:{member:{truncate:!0,width:"max-content",title:r("registered_member_column_title","Jm\xe9no člena"),render:e=>(0,o.BX)(Z.K,{horizontal:!0,gap:"0.8rem",center:!0,children:[(0,o.tZ)(eH.ZP,{size:"2.4rem",round:!0,name:[e.firstName,e.lastName].join(" "),src:e.profileURL}),(0,o.tZ)(R.H,{size:"text_sm",weight:"semibold",color:F.colors.gray900,children:[e.firstName,e.lastName].join(" ")})]})},handicap:{truncate:!0,title:r("registered_handicap_column_title","Hendikep"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",weight:"regular",color:F.colors.gray600,children:e.hcp?(0,ev.PC)(e.hcp):"-"})},club:{truncate:!0,title:r("registered_club_column_title","Klub"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",weight:"regular",color:F.colors.gray600,children:e.clubName||"-"})},membershipNumber:{truncate:!0,title:r("registered_membership_number_column_title","Člensk\xe9 č\xedslo"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",weight:"regular",color:F.colors.gray600,children:(null==e?void 0:e.memberNumber)||"-"})}}})})})};let eC=e=>{let{registeredPlayerCount:t,capacity:r}=e,{t:n}
1=(0,X.L)("RegistrationTableHeaderCOntent"),{show:i}=(0,P.vR)(),{tournamentDetails:l}=(0,f.t)(),a=new Date((null==l?void 0:l.registrationClosedAt)||(null==l?void 0:l.startAt)||""),s=null==l?void 0:l.registrationOpenedAt,d=s?new Date(s):void 0,c=new Date,u=c>a,{query:m}=(0,z.r)({resortId:null==l?void 0:l.resortDetails.resortId,tournamentId:null==l?void 0:l.tournamentId}),g=!!d&&d<=c,h=!!d&&!!a,p=K.n.getPortalLoginPage(),_=(0,S.useRouter)(),v=(0,ed.X)(),y=()=>{var e;return null!=v&&null!==(e=v.currentUser)&&void 0!==e&&!!e.id||(_.push({pathname:p,query:{from:_.asPath}}),!1)};return(0,o.tZ)(o.HY,{children:(0,o.BX)(Z.K,{horizontal:!0,gap:"1rem",css:{padding:"1.72rem",justifyContent:"space-between",[N.l0.md]:{flexDirection:"column"}},children:[(0,o.BX)(Z.K,{horizontal:!0,gap:"0.8rem",center:!0,children:[(0,o.tZ)(R.H,{size:"text_lg",weight:"semibold",color:F.colors.gray900,children:n("registration_player_title_table","Registrovan\xed hr\xe1či")}),(0,o.BX)(eg.Ct,{color:"success",iconName:"Users03",children:[n("total_registration_badge","Celkem")," ",(0,o.BX)(o.HY,{children:[t," ","/",r]})]})]}),m.data&&m.data.registration.isCurrentPlayerInGroup&&!u?(0,o.tZ)(I.z,{onClick:()=>{y()?i((0,o.tZ)(ea,{})):(0,L.Am)((0,o.tZ)(B.y,{state:"warning",title:n("unregistration_tournament_warning","Registrace nebo přihl\xe1šen\xed je vyžadov\xe1no"),description:n("unregistration_tournament_warning_desc","Pro zrušen\xed registrace do turnaje se mus\xedte přihl\xe1sit. Pro pokračov\xe1n\xed se zaregistrujte nebo přihlaste.")}),{containerId:"global"})},children:n("manage_tournament_registration_text","Spravovat registraci")}):!h||g||u?u?(0,o.tZ)(R.H,{size:"text_md",weight:"medium",color:F.colors.gray600,children:n("registration_date_ended","Datum registrace skončilo")}):(null==l?void 0:l.filledCapacity)&&(null==l?void 0:l.capacity)&&l.filledCapacity>=l.capacity&&!u?(0,o.tZ)(R.H,{size:"text_md",weight:"medium",color:F.colors.gray600,children:n("registration_limit_reached_text","Byl dosažen limit registrac\xed")}):(0,o.tZ)(I.z,{onClick:()=>{y()?i((0,o.tZ)(O.Z,{})):(0,L.Am)((0,o.tZ)(B.y,{state:"warning",title:n("registration_tournament_warning","Registrace nebo přihl\xe1šen\xed je vyžadov\xe1no"),description:n("registration_tournament_warning_desc","Pro registraci do turnaje se mus\xedte přihl\xe1sit. Pro pokračov\xe1n\xed se zaregistrujte nebo přihlaste.")}),{containerId:"global"})},children:n("signup_tournament_table_button","Přihlaste se do turnaje")}):(0,o.tZ)(I.z,{color:"link_gray",children:n("registration_not_started_text","Registrace zač\xedn\xe1 od - {{date}}",{date:(0,q.p6)(d,"short_date")})})]})})};var ek=r(56007),eP=r(25675),eT=r.n(eP),eB=e=>{var t;let{startListQuery:r}=e,{t:n}=(0,X.L)("TournamentsStartList"),i=(null!==(t=r.query.data)&&void 0!==t?t:[]).reduce((e,t,r)=>
1(e["round".concat(r+1)]={title:n("round_column_text","Kolo {{roundNumber}}",{roundNumber:r+1}),render:()=>{var e;return(0,o.tZ)(o.HY,{children:null===(e=t.slots)||void 0===e?void 0:e.map((e,t)=>(0,o.tZ)(eR,{data:e},t))})}},e),{});return(0,o.BX)(Z.K,{gap:"1.5rem",css:{paddingTop:"2rem",[N.l0.md]:{padding:"1.5rem 1rem"}},children:[(0,o.tZ)(R.H,{size:"text_lg",weight:"semibold",color:F.colors.gray900,children:n("tournament_details_start_list_title","Startovn\xed seznam")}),r.query.data&&r.query.data.length>0?(0,o.tZ)(Z.K,{gap:"1rem",children:(0,o.tZ)(ek.E,{defaultTab:"round1",variant:"subtab",tabs:i,css:{"& > div:first-child":{padding:"0.3rem","::-webkit-scrollbar":{display:"none"},[N.l0.md]:{padding:"0.3rem 1rem"}}}})}):(0,o.tZ)(eK,{})]})};let eR=e=>{var t;let{data:r}=e,{t:n}=(0,X.L)("ListingCardWrapper"),{tournamentDetails:i}=(0,f.t)(),l={width:"100%",display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(180px, 1fr))",gap:"0.8rem",[N.l0.md]:{gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:"0.6rem"}},a=(0,T.z3)((null==i?void 0:null===(t=i.resortDetails)||void 0===t?void 0:t.country)||"CZ"),s=(null==r?void 0:r.startTime)?(0,T.g0)(null==r?void 0:r.startTime,(null==a?void 0:a[0])||"Europe/Prague"):"";return(0,o.BX)(Z.K,{horizontal:!0,gap:"1rem",css:{alignItems:"start",borderRadius:"1rem",border:"1px solid ".concat(F.colors.gray200),padding:"0.72rem",background:F.colors.gray100,[N.l0.sm]:{borderRadius:"0.5rem",flexDirection:"column"}},children:[(0,o.tZ)(eX,{time:s,startHole:r.startHole,flight:r.flightNum}),(0,o.tZ)("div",{css:l,children:r.players.map(e=>(0,o.BX)(Z.K,{gap:"0.7rem",css:{background:F.colors.baseWhite,border:"1px solid ".concat(F.colors.gray200),borderRadius:"1rem",height:"100%",padding:"1rem",justifyContent:"center",alignItems:"flex-start",[N.l0.md]:{width:"100%",borderRadius:"0.5rem"}},children:[(0,o.tZ)(R.H,{size:"text_sm",weight:"semibold",color:F.colors.gray700,children:"".concat(e.firstName||""," ").concat(e.lastName||"")}),(0,o.tZ)(R.H,{size:"text_sm",weight:"regular",color:F.colors.gray700,children:e.clubName||"-"}),(0,o.BX)(eg.Ct,{color:"success",noIcon:!0,children:[(0,o.tZ)(R.H,{size:"text_xs",css:{marginRight:".25rem",color:F.colors.primary500},children:n("hcp_text",{defaultValue:"HCP"})}),e.hcp?(0,ev.PC)(e.hcp):"-"]})]},e.playerId))})]})},eX=e=>{let{time:t,startHole:r,flight:n}=e;return(0,o.BX)(Z.K,{center:!0,css:{padding:".75rem",paddingRight:"1.5rem",textAlign:"center",borderRight:"1px  dashed ".concat(F.colors.gray300),width:"110px",[N.l0.sm]:{width:"100%",borderBottom:"1px  dashed ".concat(F.colors.gray300),borderRight:"none"}},children:[(0,o.tZ)(R.H,{size:"display_sm",weight:"semibold",color:F.colors.gray700,children:t}),(0,o.BX)(Z.K,{horizontal:!0,gap:".5rem",css:{width:"100%",justifyContent:"space-between",marginTop:"0.7rem",alignItems:"center"},children:[r&&(0,o.BX)(Z.K,{horizontal:!0,gap:".25rem",children:[(0,o.tZ)(C.J,{name:"GolfBall02",size:"1rem",color:F.colors.gray500}),(0,o.tZ)(R.H,{size:"text_sm",weight:"regular",color:F.colors.gray600,css:{whiteSpace:"nowrap"},children:r})]}),n&&(0,o.BX)(Z.K,{horizontal:!0,gap:".25rem",children:[(0,o.tZ)(C.J,{name:"Flag01",size:"1rem",color:F.colors.gray500}),(0,o.tZ)(R.H,{size:"text_sm",weight:"regular",color:F.colors.gray600,css:{whiteSpace:"nowrap"},children:n})]})]})]})},eK=()=>{let{t:e}=(0,X.L)("EmptyScreenStartList");return(0,o.tZ)(Z.K,{css:{padding:"5rem 2rem",border:"1px solid ".concat(F.colors.gray200),borderRadius:"1rem"},children:(0,o.BX)(Z.K,{css:{width:"100%",maxWidth:"50rem",textAlign:"center",margin:"0 auto",justifyContent:"center",alignItems:"center"},children:[(0,o.tZ)(eT(),{alt:"No listings illustration",width:400,height:300,src:"/images/empty-screen/no-listing.svg",css:{marginBottom:"1rem"}}),(0,o.tZ)(R.H,{size:"text_lg",weight:"semibold",color:F.colors.gray900,children:e("list_empty_message_title","Generov\xe1n\xed startovn\xed listiny ještě nebylo zah\xe1jeno")}),(0,o.tZ)(R.H,{size:"text_md",weight:"regular",color:F.colors.gray600,css:{marginTop:"0.5rem"},children:e("list_empty_message_description","Generov\xe1n\xed seznamu ještě nezačalo. Proces je moment\xe1lně nečinn\xfd a bude spuštěn po dokončen\xed registrac\xed. Aktualizaci zkuste pros\xedm později.")})]})})};var eN=r(14988),eD=e=>{let{attachmentsQuery:t}=e,{t:r}=(0,X.L)("TournamentAttachments"),n=(e,t)=>{if(e){let r=document.createElement("a");r.href=e,r.target="_blank",r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}},i=t.getRaw();return(0,o.BX)(o.HY,{children:[(0,o.tZ)(R.H,{size:"text_lg",weight:"semibold",color:F.colors.gray900,children:r("attachments_title","Př\xedlohy")}),(0,o.tZ)(ep.L,{size:"1rem"}),(0,o.tZ)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"1rem"},children:null==i?void 0:i.map(e=>(0,o.BX)(Z.K,{horizontal:!0,gap:"1rem",onClick:()=>n(e.url,e.file),css:{padding:"0.5rem 1rem",border:"1px solid ".concat(F.colors.primary600),borderRadius:"0.75rem",alignItems:"center",justifyContent:"space-between",cursor:"pointer",backgroundColor:F.colors.baseWhite,"&:hover":{backgroundColor:F.colors.primary50}},children:[(0,o.BX)(Z.K,{horizontal:!0,center:!0,gap:"1rem",children:[(0,o.tZ)(eN.$,{name:"File04",color:"success"}),(0,o.tZ)(R.H,{size:"text_md",weight:"medium",color:F.colors.gray700,children:e.name})]}),(0,o.tZ)(C.J,{name:"Download01",color:F.colors.gray500})]},e.id))})]})};(0,a.H)({key:{name:"queryGetTournamentsLeaderboard",opts:{providesTags:["PortalGetTournamentLeaderboard"]}},async queryFn(e,t){let{pageParam:r}=t;return(await (0,i.vW)()).portal.tournamentsController.getTournamentLeaderboard({page:r,...e})}}),(0,a.H)({key:{name:"queryGetTournamentsLeaderboardV2",opts:{providesTags:["PortalGetTournamentLeaderboard"]}},async queryFn(e,t){let{pageParam:r}=t;return(await (0,i.vW)()).portal.tournamentsController.getTournamentLeaderboardV2({page:r,...e})}});let ej=(0,a.H)({key:{name:"queryGetTournamentResults",opts:{providesTags:["PortalGetTournamentLeaderboard"]}},async queryFn(e,t){let{pageParam:r}=t;return(await (0,i.vW)()).portal.tournamentsController.getTournamentResult({page:r,...e})}});var eS=r(25345),eA=r(46649),eL=r(30381),eF=r.n(eL),eq=r(26118),eE=e=>{let{player:t}=e,{t:r}=(0,X.L)("OverallResultModal"),{tournamentDetails:n}=(0,f.t)(),{query:i}=(0,eA.c)({playerId:null==t?void 0:t.playerId,tournamentId:null==n?void 0:n.tournamentId}),l=i.data;return(0,o.tZ)(o.HY,{children:(0,o.BX)(Y.A,{preferredWidth:(0,et.cH)(1e3),form:void 0,children:[(0,o.tZ)(Q.r,{children:r("overall_result_modal_title","Overview")}),(0,o.BX)(Z.K,{gap:"1.25rem",accurateSpacers:!0,css:{marginTop:"1rem",[N.l0.md]:{padding:"0"}},children:[(0,o.BX)(Z.K,{horizontal:!0,gap:"1rem",center:!0,css:{borderBottom:"1px solid ".concat(F.colors.gray200),paddingBottom:"0.8rem"},children:[(0,o.tZ)(eH.ZP,{size:"2.4rem",round:!0,name:null==t?void 0:t.firstName,src:null==t?void 0:t.profileURL}),(0,o.BX)(Z.K,{children:[(0,o.tZ)(R.H,{size:"text_md",weight:"medium",color:F.colors.gray900,children:"".concat((null==t?void 0:t.firstName)||"","  ").concat((null==t?void 0:t.lastName)||"")}),(0,o.BX)(R.H,{size:"text_sm",weight:"regular",color:F.colors.gray600,children:[(0,o.BX)("b",{children:[" ",r("player_tournament_hcp_values_title_text","HCP Index:")]})," ",(null==l?void 0:l.hcpBefore)&&(null==l?void 0:l.hcpAfter)&&r("player_tournament_hcp_values_text_trans","Před {{before}} | Po {{after}}",{before:l.hcpBefore,after:l.hcpAfter})]})]})]}),(0,o.BX)(Z.K,{horizontal:!0,gap:"1rem",css:{justifyContent:"space-between",[N.l0.md]:{flexDirection:"column"}},children:[(0,o.tZ)(eO,{}),(0,o.tZ)(Z.K,{gap:"1rem",css:{justifyContent:"space-between",alignItems:"flex-end",[N.l0.md]:{flexDirection:"row",padding:"0 1rem",marginTop:"1rem",justifyContent:"flex-start"}}})]}),(0,o.BX)(Z.K,{children:[(0,o.tZ)(R.H,{size:"text_lg",weight:"semibold",color:F.colors.gray900,children:r("result_tabs_title","Result")}),(0,o.tZ)(y.I,{query:i,children:(0,o.tZ)(ek.E,{defaultTab:"0",variant:"subtab",css:{marginTop:"0.72rem","& > div:first-child":{padding:"0.5rem"}}
1,tabs:((null==l?void 0:l.rounds)||[]).reduce((e,t,n)=>(e["".concat(n)]={title:r("round_column_text","Kolo {{roundNumber}}",{roundNumber:t.globalNumOfRound||1}),render:()=>(0,o.tZ)(eq.qP,{rounds:t})},e),{})})})]})]})]})})};let eO=()=>{let{t:e}=(0,X.L)("TournamentDetailsInfo"),{tournamentDetails:t}=(0,f.t)();return(0,o.BX)(Z.K,{horizontal:!0,gap:"1rem",children:[(0,o.tZ)("div",{css:{width:"73px",borderRadius:"0.72rem",border:"1px solid ".concat(F.colors.gray200),boxShadow:"0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03)"},children:(0,o.BX)(Z.K,{css:{padding:"8px",textAlign:"center",height:"100%",alignItems:"center",justifyContent:"center"},children:[(0,o.tZ)(R.H,{size:"text_xl",weight:"bold",color:F.colors.green500,children:new Date(null==t?void 0:t.startAt).getDate()}),(0,o.tZ)(R.H,{size:"text_md",weight:"regular",color:F.colors.gray900,children:eF()(new Date(null==t?void 0:t.startAt)).format("MMM")})]})}),(0,o.tZ)(Z.K,{gap:"1rem",css:{alignItems:"flex-start"},children:(0,o.BX)(Z.K,{gap:"0.5rem",children:[(0,o.tZ)(R.H,{size:"text_lg",weight:"semibold",color:F.colors.gray900,truncate:!0,css:{maxWidth:"40rem"},children:null==t?void 0:t.name}),(0,o.tZ)(R.H,{size:"text_sm",weight:"regular",color:F.colors.gray600,children:(0,o.tZ)(k.O,{items:["".concat(eF()(new Date(null==t?void 0:t.startAt)).format("MMM")),"".concat(null==t?void 0:t.numOfRounds," Round"),e("holes_type_text","{{holes}} jamek",{holes:null==t?void 0:t.resortDetails.displayMaxHoles}),(0,o.tZ)(R.H,{size:"text_sm",weight:"regular",color:F.colors.gray600,css:{textDecoration:"underline"},onClick:()=>K.n.getPortalResortDetailPage(null==t?void 0:t.resortDetails.resortId),children:null==t?void 0:t.resortDetails.resortName},"1")],bulletColor:F.colors.gray300})})]})})]})},eW=()=>{let{t:e}=(0,X.L)("TournamentResult"),[t,r]=(0,A.useState)(0),{tournamentDetails:n}=(0,f.t)(),i=null==n?void 0:n.tournamentCategories.sort((e,t)=>{var r,o;return(null!==(r=null==e?void 0:e.orderNum)&&void 0!==r?r:0)-(null!==(o=null==t?void 0:t.orderNum)&&void 0!==o?o:0)});return(0,o.BX)(Z.K,{css:{paddingTop:"3rem",gap:"2rem"},children:[(0,o.tZ)(R.H,{size:"text_lg",weight:"semibold",color:F.colors.gray900,children:e("tournament_result_title","V\xfdsledek turnaje")}),null==i?void 0:i.map((e,t)=>(0,o.tZ)(eG,{data:e,setResultsPublished:r},t)),0===t&&(0,o.tZ)(Z.K,{css:{display:"flex",width:"100%",height:"20rem",justifyContent:"center",alignItems:"center"},children:(0,o.tZ)(eS.Z,{imageSrc:"/images/empty-screen/cancel-reservation.svg",title:e("no_tournament_results","Pro turnaj nebyly nalezeny ž\xe1dn\xe9 v\xfdsledky."),buttons:void 0})})]})},eG=e=>{let{data:t,setResultsPublished:r}=e,{t:i}=(0,X.L)("StudentHandicapTable"),{show:a}=(0,P.vR)(),{tournamentDetails:s}=(0,f.t)(),d=function(e){let t=(0,n.N)(ej(e));return(0,l.J)({query:t,getRaw:()=>t.data,getItems(){var e,t;return null!==(t=null===(e=this.getRaw())||void 0===e?void 0:e.pages.map(e=>{var t;return null!==(t=e.data)&&void 0!==t?t:[]}).flat())&&void 0!==t?t:[]}})}({tournamentId:null==s?void 0:s.tournamentId,categoryId:t.tournamentCategoryId,limit:5}),c=d.getItems().sort((e,t)=>{var r,o;return(null!==(r=null==e?void 0:e.orderTo)&&void 0!==r?r:0)-(null!==(o=null==t?void 0:t.orderTo)&&void 0!==o?o:0)});return((0,A.useEffect)(()=>{c.length>0&&r(e=>e+1)},[c.length,r]),0===c.length)?(0,o.tZ)(o.HY,{}):(0,o.tZ)(Z.K,{children:(0,o.tZ)(eh._$,{items:c.map((e,t)=>({...e,id:t})),sourceQuery:d.query,customHeader:(0,o.tZ)(Z.K,{css:{padding:"1.5rem"},children:(0,o.tZ)(R.H,{size:"text_md",weight:"semibold",color:F.colors.gray900,children:t.name})}),columns:{order:{width:"max-content",title:i("column_order","Pořad\xed"),render:e=>(0,o.tZ)(R.H,{size:"text_md",weight:"medium",color:F.colors.gray900,children:e.orderFrom&&e.orderFrom!==e.orderTo?"".concat(e.orderFrom,"-").concat(e.orderTo):e.orderTo})},player:{title:i("column_player","Hr\xe1č"),truncate:!0,render:e=>{var t,r;return(0,o.BX)(Z.K,{horizontal:!0,onClick:()=>{e.playerId&&a((0,o.tZ)(eE,{player:e}))},gap:".75rem",center:!0,children:[(0,o.tZ)(eH.ZP,{size:"2.4rem",round:!0,name:[e.firstName,e.lastName].join(" "),src:e.profileURL}),(0,o.tZ)(R.H,{size:"text_md",color:F.colors.gray900,weight:"medium",css:{textDecoration:"underline",cursor:"pointer"},children:"".concat(null!==(t=e.firstName)&&void 0!==t?t:""," ").concat(null!==(r=e.lastName)&&void 0!==r?r:"")})]})}},membershipNumber:{title:i("column_membership_number","Člensk\xe9 č\xedslo"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",children:e.memberNumber})}
1,handicapBefore:{title:i("column_handicap_before","Hendikep před"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",color:F.colors.primary600,weight:"semibold",children:e.hcpBefore?(0,ev.PC)(e.hcpBefore):"-"})},score:{title:i("column_score","Sk\xf3re"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",children:(0,ev.EN)(e.score)})},handicapAfter:{title:i("column_handicap_after","Hendikep po"),render:e=>(0,o.tZ)(R.H,{size:"text_sm",color:F.colors.primary600,weight:"semibold",children:e.hcpAfter?(0,ev.PC)(e.hcpAfter):(0,ev.PC)(e.hcpBefore)||"-"})}},renderEmptyState:()=>(0,o.tZ)(Z.K,{css:{display:"flex",width:"100%",height:"20rem",justifyContent:"center",alignItems:"center"},children:(0,o.tZ)(eS.Z,{imageSrc:"/images/empty-screen/cancel-reservation.svg",title:i("no_category_results","Pro kategorii {{category}} nebyl nalezen ž\xe1dn\xfd v\xfdsledek.",{category:t.name}),buttons:void 0})})})})};var eM=function(e){var t,r,n,i,l,a,s,c,m,h,w,z,H,I,C,k,P;let{t:T}=(0,X.L)("AboutTournamentsDetails"),B=(0,S.useRouter)(),D=(0,A.useRef)({}),{setTournamentDetails:j,tournamentDetails:L}=(0,f.t)(),{currentUser:q}=(0,ed.X)(),E=null==L?void 0:L.tournamentResultsExists,{tab:O}=B.query;(0,A.useEffect)(()=>{if(O&&D.current[O]){var e;null===(e=D.current[O])||void 0===e||e.scrollIntoView({behavior:"smooth"})}},[B.query]);let W=d({tournamentId:e.tournamentId,limit:10}),G=p({tournamentId:e.tournamentId}),M=u({tournamentId:e.tournamentId}),{lat:U,lng:Y}=(0,ed.X)(),{query:V}=g({tournamentId:e.tournamentId,lat:U,lng:Y,userId:null!==(w=null==q?void 0:q.id)&&void 0!==w?w:""});(0,A.useEffect)(()=>{j(V.data)},[V.data]);let J=[{id:"tab_about_tournament",title:T("about_tournament_tab_title","O turnaji"),content:(0,o.tZ)(ey,{})},...(null!==(z=null===(t=M.query.data)||void 0===t?void 0:t.length)&&void 0!==z?z:0)>0?[{id:"tab_about_attachments",title:T("attachments_tab_title","Př\xedlohy"),content:(0,o.tZ)(eD,{attachmentsQuery:M})}]:[]],Q=[...(null!==(H=null==L?void 0:L.tournamentCategories.length)&&void 0!==H?H:0)>0&&E?[{id:"tab_tournament_result",title:T("tournament_result_tab_title","V\xfdsledky turnaje"),content:(0,o.tZ)(eW,{})}]:[],...W.getItems().length>0?[{id:"tab_player_registration",title:T("player_registration_tab_title","Registrace"),content:(0,o.tZ)(eI,{registeredPlayersQuery:W})}]:[],...(null!==(I=null===(r=G.query.data)||void 0===r?void 0:r.length)&&void 0!==I?I:0)>0?[{id:"tab_start_list",title:T("start_list_tab_title","Startovn\xed listina"),content:(0,o.tZ)(eB,{startListQuery:G})}]:[]],$=[...J,...Q],[ee,et]=(0,A.useState)("tab_about_tournament");return(0,A.useEffect)(()=>{let e=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&et(e.target.id)})},{threshold:.2});return Object.values(D.current).forEach(t=>{t&&e.observe(t)}),()=>{e.disconnect()}},[D.current]),(0,o.tZ)(o.HY,{children:(0,o.tZ)(v.T,{noTopSpacer:!0,footer:!0,children:(0,o.tZ)(y.I,{query:V,children:(0,o.BX)(Z.K,{gap:"2rem",css:{marginTop:"2rem"},children:[(0,o.tZ)(_.O,{items:[{url:K.n.getPortalTournamentsPage(),label:T("tournaments_breadcrumb_link","Turnaje")},{label:null!==(C=null==L?void 0:L.name)&&void 0!==C?C:"tournament-name"}]}),(0,o.tZ)(ec,{}),(0,o.tZ)(el.Z,{image:(null==L?void 0:null===(l=L.resortDetails)||void 0===l?void 0:null===(i=l.gallery)||void 0===i?void 0:null===(n=i[0])||void 0===n?void 0:n.resizedImageURL)||"/images/resort/resort-banner.png",imageHeight:"20rem"}),(0,o.BX)(Z.K,{children:[(0,o.tZ)(x.y,{className:"scroll-bar-router-tabs",css:{position:"sticky",top:0,zIndex:"100",paddingTop:"1rem",background:F.colors.baseWhite,"& > div:first-child":{[N.l0.md]:{whiteSpace:"nowrap",padding:"0 1rem","::-webkit-scrollbar":{display:"none"}}}},defaultTab:ee,tabs:$.reduce((e,t)=>(e[t.id]={title:t.title},e),{})}),(0,o.BX)(Z.K,{horizontal:!0,gap:"3rem",css:{alignItems:"flex-start",[N.l0.md]:{flexDirection:"column",gap:"2rem"}},children:[J.length>0&&(0,o.tZ)(Z.K,{css:{width:"calc(100% - 26rem)",[N.l0.md]:{width:"100%"}},children:(0,o.tZ)(Z.K,{css:{padding:"0 1rem"},children:J.map(e=>(0,o.tZ)("section",{id:e.id,ref:t=>D.current[e.id]=t,children:e.content},e.id))})}),(null==L?void 0:L.resortDetails)&&L.resortDetails&&(0,o.BX)(Z.K,{gap:"1.5rem",css:{paddingTop:"3rem",width:"26rem",position:"sticky",top:"2rem",[N.l0.md]:{width:"100%",position:"unset",padding:"0 1rem"}},children:[(0,o.tZ)(R.H,{size:"text_lg",weight:"semibold",color:F.colors.gray900,children:T("about_the_course_sidepanel_title_text","O hřišti")}),(0,o.tZ)(b.V,{data:{address:null==L?void 0:L.resortDetails.address,courseProfile:null==L?void 0:null===(c=L.resortDetails)||void 0===c?void 0:null===(s=c.gallery)||void 0===s?void 0:null===(a=s[0])||void 0===a?void 0:a.resizedImageURL,currency:L.resortDetails.currency||"CZ",distance:null!==(k=null==L?void 0:L.resortDetails.distance)&&void 0!==k?k:0,gallery:null==L?void 0:null===(m=L.resortDetails)||void 0===m?void 0:m.gallery,isFavourite:!1,lat:"",lon:"",lowestPrice:L.resortDetails.lowestPrice||0,maxHoles:L.resortDetails.maxHoles||"",dis
1playMaxHoles:L.resortDetails.displayMaxHoles,name:L.resortDetails.resortName,offerUrl:null!==(P=L.resortDetails.offerURL)&&void 0!==P?P:void 0,offeredServies:void 0,onlineReservation:L.resortDetails.onlineReservation,onteeResortId:0,rating:Number((null===(h=L.resortDetails.ratings)||void 0===h?void 0:h.toFixed())||0),resortId:L.resortDetails.resortId,slug:void 0}})]})]}),Q.length>0&&(0,o.tZ)(Z.K,{children:Q.map(e=>(0,o.tZ)("section",{id:e.id,ref:t=>D.current[e.id]=t,children:e.content},e.id))}),(0,o.tZ)(ez,{})]})]})})})})},eU=r(2962),eY=!0,eV=e=>{var t,r;return(0,o.BX)(o.HY,{children:[(0,o.tZ)(eU.PB,{title:null===(t=e.openGraph)||void 0===t?void 0:t.title,description:null===(r=e.openGraph)||void 0===r?void 0:r.description,openGraph:e.openGraph}),(0,o.tZ)(eM,{tournamentId:e.tournamentId})]})}}},function(e){e.O(0,[54736,68592,49774,92888,40179],function(){return e(e.s=12176)}),_N_E=e.O()}]);

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.