1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1291],{5830:function(e,t,l){var n=l(48282),a=l(18529),s=l(90227),i=l(81064),o=l(16384),r=l(210),d=l(5909),c=l(78617),u=l(67369),m=l(84726),x=l(88508),h=l(63792),p=l(43126),v=l(50174),g=l(4005),f=l(99001);t.Z=e=>{var t,l;let{onSuccess:j}=e,[b,N]=(0,a.useState)("confirm"),[y,w]=(0,a.useState)(null),{closeModal:k,getModalState:_}=(0,x.Z)(),{mutate:z}=(0,h.Z)(),Z=(0,s.useRouter)(),{loading:C,topupNote:S,topupAttempt:M,submitBooking:P}=(0,f.Q)({source:"reservation_modal",onBooked:()=>{null==j||j(),z(),N("confirmed")},onNeedTopup:e=>{w(e),N("topup")},onSlotUnavailable:()=>N("slot_unavailable"),onGuideUnavailable:()=>N("guide_unavailable"),onError:()=>p.A.error("NÄco se nepovedlo, zkuste to pros\xedm znovu")}),D=_("register-date");if(!D)return null;let I=null!==(l=({chat:"Chat",audio:"Hovor",video:"Video"})[null!==(t=D.channel)&&void 0!==t?t:""])&&void 0!==l?l:null,E={happening_at:D.datetime,guide_profile_id:D.id,timezone:D.timezone,channel:D.channel},F=()=>{N("confirm"),k("register-date")};return"topup"===b?(0,n.jsxs)(u.Z,{name:"register-date",width:"460px",showClose:!0,children:[S&&(0,n.jsx)("div",{className:"mb-3 rounded-lg bg-error-600 p-3 text-center text-sm text-on-media",children:S}),(0,n.jsx)(g.Z,{advisorId:D.id,requiredMinutes:y,onBalanceCredited:()=>void P(E,{fromTopup:!0}),onTimeout:()=>N("topup_processing")},M)]}):"topup_processing"===b?(0,n.jsx)(u.Z,{name:"register-date",width:"440px",showClose:!0,children:(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4 py-6 text-center",children:[(0,n.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-accent/20",children:(0,n.jsx)(r.Q,{size:36,weight:"duotone",className:"text-warning"})}),(0,n.jsx)("h3",{className:"font-bold text-xl text-content",children:"Platba se zpracov\xe1v\xe1"}),(0,n.jsx)("p",{className:"max-w-xs text-sm text-content/70",children:"Minuty se pÅipisuj\xed. Za okamžik zkus rezervaci dokonÄit."}),(0,n.jsxs)("div",{className:"mt-2 flex w-full flex-col gap-3",children:[(0,n.jsx)(m.Z,{color:"gradient",className:"w-full",loading:C,onClick:()=>void P(E,{fromTopup:!0}),children:"DokonÄit rezervaci"}),(0,n.jsx)(m.Z,{color:"transparent-white",className:"w-full",onClick:F,children:"ZavÅ\xedt"})]})]})}):"slot_unavailable"===b?(0,n.jsx)(u.Z,{name:"register-date",width:"440px",showClose:!1,children:(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4 py-6 text-center",children:[(0,n.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-error-600/20",children:(0,n.jsx)(d.x,{size:36,weight:"duotone",className:"text-error-600"})}),(0,n.jsx)("h3",{className:"font-bold text-xl text-content",children:"Term\xedn už nen\xed dostupn\xfd"}),(0,n.jsx)("p",{className:"max-w-xs text-sm text-content/70",children:"Tento term\xedn mezit\xedm obsadil nÄkdo jin\xfd. Vyber si pros\xedm jin\xfd Äas."}),(0,n.jsx)(m.Z,{color:"gradient",className:"mt-2 w-full",onClick:F,children:"Vybrat jin\xfd term\xedn"})]})}):"guide_unavailable"===b?(0,n.jsx)(u.Z,{name:"register-date",width:"440px",showClose:!1,children:(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4 py-6 text-center",children:[(0,n.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-error-600/20",children:(0,n.jsx)(c.g,{size:36,weight:"duotone",className:"text-error-600"})}),(0,n.jsx)("h3",{className:"font-bold text-xl text-content",children:"Průvodce nen\xed dostupn\xfd"}),(0,n.jsx)("p",{className:"max-w-xs text-sm text-content/70",children:"Tohoto průvodce teÄ bohužel nelze rezervovat. Zkus to pros\xedm pozdÄji."}),(0,n.jsx)(m.Z,{color:"gradient",className:"mt-2 w-full",onClick:F,children:"ZavÅ\xedt"})]})}):"confirmed"===b?(0,n.jsx)(u.Z,{name:"register-date",width:"400px",showClose:!1,children:(0,n.jsxs)("div",{className:"flex flex-col items-center text-center",children:[D.guideAvatar?(0,n.jsx)("img",{src:D.guideAvatar,alt:D.guideName,className:"mb-3 h-20 w-20 rounded-full object-cover ring-2 ring-brand/40"}):(0,n.jsx)("div",{className:"mb-3 h-20 w-20 rounded-full bg-surface-raised ring-2 ring-brand/40"}),(0,n.jsx)("h3",{className:"font-bold mb-2 text-2xl text-content",children:"Rezervace potvrzena!"}),(0,n.jsx)("p",{className:"mb-4 text-sm text-muted",children:"Potvrzen\xed jsme ti poslali na email."}),(0,n.jsxs)("div",{className:"mb-5 w-full divide-y divide-line/10 rounded-lg border border-line/10 bg-overlay/5",children:[D.guideName&&(0,n.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,n.jsx)("span",{className:"text-sm text-muted",children:"Průvodce"}),(0,n.jsx)("span",{className:"font-semibold text-sm text-content",children:D.guideName})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,n.jsx)("span",{className:"text-sm text-muted",children:"Datum"}),(0,n.jsx)("span",{className:"font-semibold text-sm text-content",children:(0,i.WU)(new Date(D.datetime),"d. MMMM yyyy",{locale:o.cs})})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,n.jsx)("span",{className:"text-sm text-muted",children:"Äas"}),(0,n.jsx)("span",{className:"font-semibold text-sm text-content",children:(0,i.WU)(new Date(D.datetime),"HH:mm")}
1)]}),I&&(0,n.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,n.jsx)("span",{className:"text-sm text-muted",children:"Forma"}),(0,n.jsx)("span",{className:"font-semibold text-sm text-content",children:I})]})]}),(0,n.jsxs)("div",{className:"mb-4 w-full rounded-lg border border-brand/20 bg-accent/10 px-4 py-3 text-xs text-content/70",children:["PÅipom\xednku ti poÅ¡leme ",(0,n.jsx)("span",{className:"font-semibold text-content",children:"1 hodinu"})," pÅed zaÄ\xe1tkem sezen\xed."]}),(0,n.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,n.jsx)(m.Z,{onClick:()=>{F(),Z.push(v.B.calendar())},color:"gradient",size:"lg",className:"w-full",children:"Moje rezervace"}),(0,n.jsx)(m.Z,{onClick:()=>{F(),Z.push("/")},color:"transparent-white",size:"lg",className:"w-full",children:"ZpÄt na hlavn\xed str\xe1nku"})]})]})}):(0,n.jsxs)(u.Z,{name:"register-date",width:"440px",showClose:!0,children:[(0,n.jsx)("h3",{className:"font-bold mb-4 text-center text-2xl",children:"Rezervace term\xednu"}),(0,n.jsxs)("p",{className:"mx-auto mb-8 max-w-sm text-center text-content/80",children:["ChceÅ¡ si rezervovat term\xedn ",(0,n.jsx)("span",{className:"font-semibold text-content",children:(0,i.WU)(new Date(D.datetime),"d. MMMM yyyy",{locale:o.cs})})," od"," ",(0,n.jsx)("span",{className:"font-semibold text-content",children:(0,i.WU)(new Date(D.datetime),"HH:mm")}),I?(0,n.jsxs)(n.Fragment,{children:[" ","formou ",(0,n.jsx)("span",{className:"font-semibold text-content",children:I})]}):null,"?"]}),(0,n.jsxs)("div",{className:"mt-auto flex items-center justify-between gap-4 [&>button]:flex-1",children:[(0,n.jsx)(m.Z,{onClick:F,color:"transparent-white",children:"ZruÅ¡it"}),(0,n.jsx)(m.Z,{onClick:()=>void P(E),color:"gradient",loading:C,children:"Rezervovat"})]})]})}},31916:function(e,t,l){var n=l(48282),a=l(18529),s=l(67369),i=l(88508),o=l(97225),r=l(81064),d=l(94570),c=l(5915),u=l(89199),m=l(61743),x=l(15210),h=l(92853),p=l(31647),v=l(16384),g=l(84726),f=l(66434),j=l(40312),b=l(6289),N=l(69496),y=l(40642),w=l(5872),k=l(76665),_=l(58376);let z=["Po","\xdat","St","Ät","P\xe1","So","Ne"],Z=e=>((0,o.w)(e)+6)%7,C=[{key:"chat",label:"Chat",Icon:N.j},{key:"audio",label:"Hovor",Icon:y.A},{key:"video",label:"Video",Icon:w.z}];t.Z=e=>{let{calendarSlots:t=[],guideId:l,guideName:o,guideAvatar:N,isOnline:y,channels:w=["chat","audio","video"],onRefetch:S,onContinue:M}=e,{isModalOpen:P,closeModal:D,openModal:I}=(0,i.Z)(),[E,F]=(0,a.useState)(new Date),[q,R]=(0,a.useState)(null),[O,U]=(0,a.useState)(null),[A,L]=(0,a.useState)(null),[B,X]=(0,a.useState)(!1),V=C.filter(e=>w.includes(e.key)),H=!!P("reservation-slots"),T=!!P("register-date"),J=a.useMemo(()=>new Set((t||[]).map(e=>(0,r.WU)(new Date(e.datetime),"yyyy-MM-dd"))),[t]),W=e=>J.has((0,r.WU)(e,"yyyy-MM-dd")),K=e=>(0,d.R)((0,c.b)(e),(0,c.b)(new Date)),G=a.useMemo(()=>{if(!q)return[];let e=(0,r.WU)(q,"yyyy-MM-dd");return(t||[]).filter(t=>(0,r.WU)(new Date(t.datetime),"yyyy-MM-dd")===e).sort((e,t)=>Date.parse(e.datetime)-Date.parse(t.datetime))},[q,t]);(0,a.useEffect)(()=>{if(!q&&t.length>0){let e=[...t].map(e=>new Date(e.datetime)).filter(e=>!(0,d.R)((0,c.b)(e),(0,c.b)(new Date))).sort((e,t)=>e.getTime()-t.getTime())[0];e&&(R(e),F(e))}},[t]),(0,a.useEffect)(()=>{H||(R(null),U(null),L(null))},[H]),(0,a.useEffect)(()=>{B&&!T&&(null==S||S()),X(T)},[T]),(0,a.useEffect)(()=>{H&&(null==S||S(),(0,j.L9)("booking_start",{advisor_id:l}))},[H]);let Y=(0,u.N)(E),Q=(0,m.N)(E),$=Z(Y);return H?(0,n.jsxs)(s.Z,{name:"reservation-slots",width:"480px",showClose:!0,className:"!bg-[image:var(--grad-surface)] text-on-media",children:[o&&(0,n.jsxs)("div",{className:"mb-4 flex items-center gap-3 rounded-md bg-on-media/15 p-3",children:[N&&(0,n.jsx)("img",{src:N,alt:o,className:"h-10 w-10 flex-shrink-0 rounded-full object-cover ring-2 ring-on-media/40"}),(0,n.jsxs)("div",{children:[void 0!==y&&(0,n.jsxs)("p",{className:"flex items-center gap-1.5 text-xs text-on-media/80",children:[(0,n.jsx)("span",{className:(0,f.cn)("h-2 w-2 rounded-full",y?"bg-status-online":"bg-on-media/40")}),y?"Online":"Offline"]}),(0,n.jsx)("p",{className:"font-semibold text-on-media",children:o})]})]}),(0,n.jsx)("h3",{className:"mb-5 text-center text-[22px] font-600 leading-tight text-on-media",children:o?"Rezervovat term\xedn s ".concat(o):"Vyber si term\xedn"}),0===t.length?(0,n.jsx)("div",{className:"py-12 text-center text-on-media/85",children:"Bohužel nejsou dostupn\xe9 ž\xe1dn\xe9 voln\xe9 term\xedny."}):(0,n.jsxs)("div",{className:"space-y-4 ",children:[(0,n.jsxs)("div",{className:"rounded-md bg-on-media/10 p-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between ",children:[(0,n.jsx)("button",{onClick:()=>F(e=>(0,x.W)(e,1)),className:"flex h-8 w-8 items-center justify-center rounded-full bg-on-media/15 text-on-media transition-colors hover:bg-on-media/30",children:(0,n.jsx)(k.W,{size:16,weight:"bold"})}),(0,n.jsx)("span",{className:"font-semibold text-sm capitalize text-on-media",children:(0,r.WU)(E,"LLLL yyyy",{locale:v.cs})}),(0,n.jsx)("button",{onClick:()=>F(e=>(0,h.z)(e,1)),className:"flex h-8 w-8 items-center justify-center rounded-full bg-on-media/15 text-on-media transition-colors hover:bg-on-media/30",children:(0,n.jsx)(_.T,{size:15,weight:"bold"})})]}),(0,n.jsx)("div",{className:"grid grid-cols-7",children:z.map(e=>(0,n.jsx)("div",{className:"font-semibold py-1 text-center text-xs uppercase text-on-media/60",children:e},e))}),(0,n.jsx)("div",{className:"grid grid-cols-7 gap-1",children:Array.from({length:7*Math.ceil(($+Q)/7)}).map((e,t)=>{let l=t-$+1;if(l<1||l>Q)return(0,n.jsx)("div",{},t);let a=new Date(E.getFullYear(),E.getMonth(),l),s=W(a)&&!K(a),i=!!q&&(0,p.K)(a,q);return K(a),(0,n.jsx)("button",{disabled:!s,onClick:()=>{R(a),U(null)},className:(0,f.cn)("font-medium flex aspect-square items-center justify-center rounded-md text-sm transition-all",i?"bg-on-media font-700 text-brand-on-light shadow-md":s?"bg-on-media/15 text-on-media hover:bg-on-media/30":"
1cursor-not-allowed text-on-media/30"),children:l},t)})})]}),q&&(0,n.jsxs)("div",{className:"rounded-md bg-on-media/10 p-4",children:[(0,n.jsxs)("p",{className:"font-semibold mb-3 text-sm capitalize text-on-media/85",children:["Dostupn\xe9 Äasy (",(0,r.WU)(q,"d. MMMM",{locale:v.cs}),")"]}),0===G.length?(0,n.jsx)("p",{className:"py-3 text-center text-sm text-on-media/70",children:"Ž\xe1dn\xe9 voln\xe9 term\xedny pro tento den."}):(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:G.map(e=>{let t=(null==O?void 0:O.datetime)===e.datetime;return(0,n.jsx)("button",{onClick:()=>U(e),className:(0,f.cn)("font-medium rounded-md px-4 py-2 text-sm transition-all",t?"bg-on-media font-700 text-brand-on-light shadow-md":"bg-on-media/15 text-on-media hover:bg-on-media/30"),children:(0,r.WU)(new Date(e.datetime),"HH:mm")},e.datetime)})})]}),O&&(0,n.jsxs)("div",{role:"radiogroup","aria-label":"Forma sezen\xed",className:"rounded-md bg-on-media/10 p-4",children:[(0,n.jsx)("p",{className:"font-semibold mb-3 text-sm text-on-media/85",children:"Forma sezen\xed"}),(0,n.jsx)("div",{className:"flex gap-2",children:V.map(e=>{let{key:t,label:a,Icon:s}=e,i=A===t;return(0,n.jsxs)("button",{type:"button",role:"radio","aria-checked":i,"aria-label":a,onClick:()=>{t!==A&&(0,j.L9)(b.s6.BOOKING_CHANNEL_SELECTED,{advisor_id:l,channel:t}),L(t)},className:(0,f.cn)("font-medium flex flex-1 items-center justify-center gap-2 rounded-lg border px-3 py-2.5 text-sm transition-all",i?"border-transparent bg-on-media font-700 text-brand-on-light shadow-md":"border-transparent bg-on-media/15 text-on-media hover:bg-on-media/30"),children:[(0,n.jsx)(s,{size:18,weight:i?"fill":"regular"}),a]},t)})})]}),(0,n.jsx)(g.Z,{onClick:()=>{if(O&&A){if(M){M({datetime:O.datetime,timezone:O.timezone,channel:A});return}I("register-date",{type:"state",queries:{id:l,datetime:O.datetime,timezone:O.timezone,guideName:null!=o?o:"",guideAvatar:null!=N?N:"",channel:A}})}},disabled:!O||!A,color:"white",size:"lg",className:"mx-auto flex min-w-[240px]",children:"PokraÄovat"})]})]}):null}},63792:function(e,t,l){var n=l(5336),a=l(66434),s=l(90227),i=l(77314);t.Z=()=>{var e,t,l,n,a;let r=(0,s.useRouter)(),d=r.query.page?Number(r.query.page):1,c=(0,i.ZP)(["bookings",d],r.isReady?()=>o(d):null,{revalidateOnMount:!0,revalidateOnFocus:!0});return{...c,data:null===(e=c.data)||void 0===e?void 0:e.data,bookingsCount:null!==(n=null===(t=c.data)||void 0===t?void 0:t.meta.count)&&void 0!==n?n:0,bookingsPages:Math.ceil(null!==(a=null===(l=c.data)||void 0===l?void 0:l.meta.count)&&void 0!==a?a:0)/500}};let o=e=>n.Z.get("/bookings/index",{params:{page:e,take:500,sort:["-happening_at"]}}).then(async e=>(0,a.qP)(e.data))},80403:function(e,t,l){l.d(t,{A:function(){return o}});var n=l(5336),a=l(66434),s=l(90227),i=l(77314);t.Z=(e,t)=>{var l,n,a,r,d,c;let u=(0,s.useRouter)(),m=u.query.page?Number(u.query.page):1,x={mode:1,...e},h=(0,i.ZP)(["guides",m,JSON.stringify(x)],()=>o(m,x),{refreshInterval:6e4,fallbackData:t});return{...h,data:null===(l=h.data)||void 0===l?void 0:l.data,guidesCount:null!==(r=null===(n=h.data)||void 0===n?void 0:n.meta.count)&&void 0!==r?r:0,guidesPages:Math.ceil((null!==(d=null===(a=h.data)||void 0===a?void 0:a.meta.count)&&void 0!==d?d:0)/(null!==(c=x.take)&&void 0!==c?c:20))}};let o=(e,t)=>n.Z.get("/guide_profiles/index",{params:{page:e,take:20,...t}}).then(async e=>(0,a.qP)(e.data))},10737:function(e,t,l){l.d(t,{L:function(){return i},O:function(){return o}});var n=l(18529);let a="spirio_recent_guides";function s(){try{var e;return JSON.parse(null!==(e=localStorage.getItem(a))&&void 0!==e?e:"[]")}catch(e){return[]}}function i(e){let t=[e,...s().filter(t=>t.id!==e.id)].slice(0,5);localStorage.setItem(a,JSON.stringify(t))}function o(){let[e,t]=(0,n.useState)([]);return(0,n.useEffect)(()=>{t(s())},[]),e}},1291:function(e,t,l){l.r(t),l.d(t,{DiscoverDetailShort:function(){return ev},__N_SSP:function(){return eh},default:function(){return ep}});var n=l(48282),a=l(3221),s=l(11360),i=l(196),o=l(18529),r=l(50174),d=l(28649),c=l.n(d),u=l(67061),m=l(65571),x=l(84726),h=l(40312),p=l(50537),v=l(81064),g=l(35242),f=l(80403),j=l(9207),b=l(58074),N=l(43126),y=l(67369),w=l(88508),k=l(5336),_=l(66434),z=l(90227),Z=l.n(z),C=l(86429),S=l(5872),M=l(22504),P=l(69169),D=l(85829),I=l(60856),E=l(23117),F=l(30948),q=l(91460),R=l(99459),O=l(14689),U=l(8455),A=l(98725),L=l(78343),B=l(24958),X=l(97547);let V=()=>({isOpen:!1,videoId:null,videoData:null,previewDuration:30,title:"",price:""});function H(e){let{guideProfileId:t}=e,{videos:l}=(0,L.D2)(t),{user:a}=(0,b.Z)(),{openModal:s}=(0,w.Z)(),[i,r]=(0,o.useState)(!1),[d,c]=(0,o.useState)({}),[u,m]=(0,o.useState)({}),[h,p]=(0,o.useState)({}),[v,g]=(0,o.useState)({}),[f,j]=(0,o.useState)({}),[y,k]=(0,o.useState)(()=>V()),z=(0,o.useCallback)(()=>{k(V())},[]),Z=(0,o.useMemo)(()=>{let e=new Set;return l.forEach(t=>{(t.is_purchased||t.is_owner)&&e.add(t.id)}),e},[l]);(0,o.useEffect)(()=>{a&&l.length&&l.some(e=>void 0===e.is_purchased)&&console.warn("Legacy access check triggered - backend should provide is_purchased flag")},[a,l]),(0,o.useEffect)(()=>
1{if(!l.length){c({}),p({}),m({}),g({}),j({}),z();return}let e=new Set(l.map(e=>e.id));c(t=>{let l={};return Object.entries(t).forEach(t=>{let[n,a]=t,s=Number(n);e.has(s)&&(l[s]=a)}),l}),p(t=>{let l={};return Object.entries(t).forEach(t=>{let[n,a]=t,s=Number(n);e.has(s)&&(l[s]=a)}),l}),m(t=>{let l={};return Object.entries(t).forEach(t=>{let[n,a]=t,s=Number(n);e.has(s)&&(l[s]=a)}),l}),g(e=>{let t={};return l.forEach(l=>{var n,a;let s=null!==(a=null!==(n=l.preview_image_url)&&void 0!==n?n:l.thumbnail_url)&&void 0!==a?a:e[l.id];s&&(t[l.id]=s)}),t}),j(t=>{let l={};return Object.entries(t).forEach(t=>{let[n,a]=t,s=Number(n);e.has(s)&&(l[s]=a)}),l}),null===y.videoId||e.has(y.videoId)||z()},[l,y.videoId,z]);let C=async e=>{let{id:t}=e;if(d[t])return d[t];if(h[t]||u[t])return null;m(e=>({...e,[t]:!0}));try{var l,n;let a;let s=await (0,L.CT)(t);if(s&&"preview_available"in s&&!1===s.preview_available)return p(e=>({...e,[t]:!0})),N.A.error(null!==(l=null==s?void 0:s.reason)&&void 0!==l?l:"N\xe1hled pro toto video nen\xed k dispozici."),null;if(!s||"hls"===s.type&&!s.playlist_url||"file"===s.type&&!s.stream_url||"youtube"===s.type&&!s.url||"external"===s.type&&!s.url)return p(e=>({...e,[t]:!0})),N.A.error("N\xe1hled se nepodaÅilo naÄ\xedst."),null;c(e=>({...e,[t]:s})),(a="preview_image_url"in s&&"string"==typeof s.preview_image_url?s.preview_image_url:e.preview_image_url||e.thumbnail_url||void 0)&&g(e=>({...e,[t]:a}));let i=null!==(n="preview_duration_seconds"in s?s.preview_duration_seconds:null)&&void 0!==n?n:30;return j(e=>({...e,[t]:i})),s}catch(e){return console.error("Failed to load preview for video ".concat(t),e),p(e=>({...e,[t]:!0})),N.A.error("N\xe1hled se nepodaÅilo naÄ\xedst."),null}finally{m(e=>({...e,[t]:!1}))}},S=async e=>{var t;let{id:l}=e;if(u[l])return;if(h[l]){N.A.error("N\xe1hled pro toto video nen\xed k dispozici.");return}let n=d[l],a=null!=n?n:await C(e);if(!a)return;let s=null!==(t=f[l])&&void 0!==t?t:30;k({isOpen:!0,videoId:l,videoData:a,previewDuration:s,title:e.title,price:(0,_.uf)(e.price_cents/100,{currency:"czk"})})},M=async e=>{var t,l,n;if(z(),!a){window.location.href="/prihlaseni";return}let s=await (0,L.E7)(e),i=(null==s?void 0:s.checkout_url)||(null==s?void 0:null===(t=s.data)||void 0===t?void 0:t.checkout_url)||(null==s?void 0:null===(l=s.data)||void 0===l?void 0:l.stripe_checkout_url)||(null==s?void 0:null===(n=s.data)||void 0===n?void 0:n.url);i&&(window.location.href=i)},P=e=>{s("video-player",{type:"state",queries:{videoId:String(e.id),videoTitle:e.title}})};return l.length?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(B.Z,{videoId:0,videoTitle:""}),(0,n.jsx)(X.Z,{isOpen:y.isOpen,onClose:z,onBuy:()=>{null!==y.videoId&&M(y.videoId)},videoTitle:y.title,videoData:y.videoData,previewDuration:y.previewDuration,price:y.price}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"font-bold mb-6 text-3xl",children:"Placen\xe1 videa"}),(0,n.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3",children:l.map(e=>{var t,l,a,s,o,r;let d=Z.has(e.id),c=e.is_owner,m=!e.is_active,p=u[e.id],g=h[e.id],f=null===(l=e.media)||void 0===l?void 0:null===(t=l.find(e=>"thumbnail"===e.collection_name))||void 0===t?void 0:t.original_url,j=null!==(r=null!==(o=null!==(s=null!==(a=v[e.id])&&void 0!==a?a:e.preview_image_url)&&void 0!==s?s:e.thumbnail_url)&&void 0!==o?o:f)&&void 0!==r?r:void 0,b=g?"Uk\xe1zka nen\xed dostupn\xe1":p?"NaÄ\xedt\xe1n\xed...":"PusÅ¥ uk\xe1zku ";
1return(0,n.jsxs)("div",{className:"flex flex-col gap-4 rounded-lg border bg-overlay/5 p-4 transition-all hover:bg-overlay/10 ".concat(c&&m?"opacity-70":"border-line/10"),children:[(0,n.jsxs)("div",{className:"relative h-48 w-full overflow-hidden rounded-lg bg-gradient-to-br",children:[j?(0,n.jsx)("img",{src:j,alt:e.title,className:"h-full w-full object-cover ".concat(c&&m?"opacity-50 grayscale":"")}):(0,n.jsx)("div",{className:"flex h-full w-full items-center justify-center text-lg text-muted-soft",children:"Bez n\xe1hledu"}),c&&m&&(0,n.jsx)("div",{className:"font-bold absolute right-2 top-2 rounded-full px-3 py-1 text-xs text-content shadow-lg",children:"NEAKTIVN\xcd"}),p&&(0,n.jsx)("div",{className:"font-semibold absolute inset-0 flex items-center justify-center bg-black/60 text-sm text-on-media",children:"NaÄ\xedt\xe1n\xed uk\xe1zky..."})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("div",{className:"font-bold text-xl",children:e.title}),c&&m&&(0,n.jsx)("span",{className:"font-semibold text-sm",children:"(neaktivn\xed)"})]}),e.description&&(0,n.jsx)("div",{className:"line-clamp-3 flex-grow text-sm text-content/70",children:e.description}),e.duration_seconds&&(0,n.jsxs)("div",{className:"text-sm text-muted",children:[(0,n.jsx)("span",{className:"font-semibold",children:"D\xe9lka:"})," ",Math.floor(e.duration_seconds/60),":",String(e.duration_seconds%60).padStart(2,"0")," min"]}),(0,n.jsxs)("div",{className:"mt-auto flex flex-col gap-3",children:[(0,n.jsxs)("div",{className:"flex flex-col items-start gap-2 sm:flex-row sm:items-center sm:justify-between",children:[d?(0,n.jsx)("div",{className:"font-semibold text-sm",children:"â Zakoupeno"}):(0,n.jsx)("div",{className:"font-bold text-lg text-brand-on-surface",children:(0,_.uf)(e.price_cents/100,{currency:"czk"})}),d&&(0,n.jsx)(x.Z,{onClick:()=>P({id:e.id,title:e.title}),color:"gradient",size:"sm",className:"w-full sm:w-auto",children:"PÅehr\xe1t"})]}),!d&&(0,n.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,n.jsx)(x.Z,{onClick:()=>S(e),color:"transparent-white",size:"sm",disabled:g||p,children:b}),(0,n.jsx)(x.Z,{onClick:()=>M(e.id),color:"gradient",size:"sm",disabled:i,children:i?"NaÄ\xedt\xe1n\xed...":"Koupit"})]})]})]},e.id)})})]})]}):null}var T=l(31916),J=l(5830),W=l(55984),K=l(7363),G=l(77314),Y=e=>{var t;let{data:l,error:n,isLoading:a,mutate:s}=(0,G.ZP)(e?"/reviews/index?guide_profile_id=".concat(e,"&take=50"):null,e=>k.Z.get(e).then(e=>e.data),{revalidateOnFocus:!1,revalidateOnReconnect:!1});return{reviews:(0,o.useMemo)(()=>{var e;return null!==(e=null==l?void 0:l.data)&&void 0!==e?e:[]},[l]),total:null==l?void 0:null===(t=l.meta)||void 0===t?void 0:t.total,isLoading:a,error:n,mutate:s}},Q=l(16384),$=e=>{var t;let{review:l,onMedia:s}=e,i=(null===(t=l.user)||void 0===t?void 0:t.nickname)||l.custom_name||"Anonymn\xed uživatel";return(0,n.jsx)("div",{className:s?"rounded-lg bg-on-media/15 p-4 text-on-media ring-1 ring-on-media/25":"rounded-lg border border-line/10 bg-overlay/5 p-4",children:(0,n.jsx)("div",{className:"flex items-start gap-4",children:(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"font-600",children:i}),(0,n.jsx)("p",{className:s?"text-xs text-on-media/70":"text-xs text-muted",children:(0,v.WU)(new Date(l.created_at),"d. MMMM yyyy",{locale:Q.cs})})]}),(0,n.jsx)("div",{className:"flex gap-1",children:[1,2,3,4,5].map(e=>(0,n.jsx)(P.U,{size:16,weight:l.rating>=e?"fill":"regular",className:l.rating>=e?"text-secondary":s?"text-on-media/40":"text-content/20"},e))})]}),(0,n.jsx)(a.H4,{className:s?"m-0 mt-2 text-base text-on-media":"m-0 mt-2 text-base",children:l.title}),(0,n.jsx)("p",{className:s?"mt-2 text-sm text-on-media/85":"mt-2 text-sm text-content/70",children:l.content})]})})})};let ee=(e,t,l,n)=>1===e?t:e>=2&&e<=4?l:n;var et=e=>{let{guideProfileId:t,onAddReview:l,showAddButton:s=!0,callRatingsCount:i=0,rating:r,onMedia:d}=e,{reviews:c,total:u,isLoading:m}=Y(t),{user:h}=(0,b.Z)(),[p,v]=(0,o.useState)(5),g=(0,o.useRef)(null);if((0,o.useEffect)(()=>{v(5)},[t]),m)return(0,n.jsx)("div",{className:d?"text-center text-on-media/80":"text-center text-muted",children:"NaÄ\xedt\xe1n\xed hodnocen\xed..."});if(0===c.length&&0===i&&!s)return null;let f=null!=u?u:c.length,j=f+i,N=c.slice(0,p),y=c.length-N.length,w=0===y&&c.length>5;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"mb-6 flex items-center justify-between",ref:g,children:[(0,n.jsx)(a.H4,{className:d?"m-0 text-on-media":"m-0",children:"ZkuÅ¡enosti klientů"}
1),s&&!!h&&(0,n.jsxs)(x.Z,{onClick:l,color:"transparent-white",size:"sm",className:"!px-2.5 !py-1 !text-xs ".concat(d?"!text-on-media":""),children:[(0,n.jsx)(W.e,{size:14,weight:"bold",className:"mr-1.5"}),"PÅidat"]})]}),j>0&&(0,n.jsxs)("div",{className:d?"mb-6 text-on-media":"mb-6",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[null!=r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"flex gap-1","aria-hidden":!0,children:[1,2,3,4,5].map(e=>(0,n.jsx)(P.U,{size:22,weight:Math.round(r)>=e?"fill":"regular",className:Math.round(r)>=e?"text-secondary":d?"text-on-media/40":"text-content/20"},e))}),(0,n.jsx)("span",{className:"text-2xl font-700","aria-label":"PrůmÄrn\xe9 hodnocen\xed ".concat(r.toFixed(1)," z 5"),children:r.toFixed(1)})]}),(0,n.jsxs)("span",{className:d?"text-on-media/85":"text-content/80",children:[j," hodnocen\xed"]})]}),(0,n.jsxs)("p",{className:d?"mt-1 text-sm text-on-media/70":"mt-1 text-sm text-muted",children:[f," ",ee(f,"p\xedsemn\xe1 recenze","p\xedsemn\xe9 recenze","p\xedsemn\xfdch recenz\xed")," \xb7 ",i," hodnocen\xed po hovoru"]})]}),0===c.length?(0,n.jsx)("p",{className:d?"text-center text-on-media/80":"text-center text-muted",children:i>0?"Zat\xedm ž\xe1dn\xe9 p\xedsemn\xe9 recenze.":"Zat\xedm ž\xe1dn\xe1 hodnocen\xed. BuÄte prvn\xed!"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"space-y-4",children:N.map(e=>(0,n.jsx)($,{review:e,onMedia:d},e.id))}),y>0&&(0,n.jsxs)("button",{type:"button",onClick:()=>v(e=>e+5),className:d?"mt-6 flex w-full items-center justify-center gap-2 rounded-lg border border-on-media/30 bg-on-media/15 px-4 py-3 text-sm text-on-media transition-colors hover:bg-on-media/25":"mt-6 flex w-full items-center justify-center gap-2 rounded-lg border border-line/10 bg-overlay/5 px-4 py-3 text-sm text-content/80 transition-colors hover:border-line/20 hover:bg-overlay/10",children:[(0,n.jsx)(K.p,{size:16,weight:"bold"}),"Zobrazit dalÅ¡\xed hodnocen\xed (",y,")"]}),w&&(0,n.jsx)("button",{type:"button",onClick:()=>{var e;v(5),null===(e=g.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})},className:d?"mt-6 flex w-full items-center justify-center rounded-lg border border-on-media/30 bg-on-media/15 px-4 py-3 text-sm text-on-media/85 transition-colors hover:bg-on-media/25 hover:text-on-media":"mt-6 flex w-full items-center justify-center rounded-lg border border-line/10 bg-overlay/5 px-4 py-3 text-sm text-muted transition-colors hover:border-line/20 hover:bg-overlay/10 hover:text-content/80",children:"Zobrazit m\xe9nÄ"})]})]})},el=l(82619),en=l(27385);let ea=en.Ry().shape({rating:en.Rx().min(1,"Vyberte hodnocen\xed").max(5).required("Hodnocen\xed je povinn\xe9"),nickname:en.Z_().min(2,"PÅezd\xedvka mus\xed m\xedt alespoÅ 2 znaky").max(50).required("PÅezd\xedvka je povinn\xe1"),title:en.Z_().min(5,"N\xe1zev mus\xed m\xedt alespoÅ 5 znaků").max(255).required("N\xe1zev je povinn\xfd"),content:en.Z_().min(20,"Hodnocen\xed mus\xed m\xedt alespoÅ 20 znaků").max(5e3).required("Obsah je povinn\xfd")});var es=e=>{let{guideProfileId:t,onSuccess:l,onCancel:a}=e,[s,i]=(0,o.useState)(!1),{user:r}=(0,b.Z)(),d={rating:0,nickname:(null==r?void 0:r.nickname)||"",title:"",content:""},c=async e=>{i(!0);try{let n={guide_profile_id:t,rating:e.rating,nickname:e.nickname,title:e.title,content:e.content};await k.Z.post("/reviews/store",n),N.A.success("VaÅ¡e hodnocen\xed bylo odesl\xe1no ke schv\xe1len\xed"),null==l||l()}catch(e){var n,a,s;N.A.error(null!==(s=null==e?void 0:null===(a=e.response)||void 0===a?void 0:null===(n=a.data)||void 0===n?void 0:n.message)&&void 0!==s?s:"NepodaÅilo se odeslat hodnocen\xed")}finally{i(!1)}};return(0,n.jsx)(el.J9,{initialValues:d,validationSchema:ea,onSubmit:c,children:e=>{let{values:t,errors:l,touched:i,isSubmitting:o,setFieldValue:r}=e;return(0,n.jsxs)(el.l0,{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"rating-input",className:"mb-2 block text-sm font-600",children:"Hodnocen\xed *"}),(0,n.jsx)("div",{className:"flex gap-2",children:[1,2,3,4,5].map(e=>(0,n.jsx)("button",{type:"button","aria-label":"Hodnocen\xed ".concat(e," hvÄzdiÄky"),onClick:()=>r("rating",e),className:"transition ".concat(t.rating>=e?"text-secondary":"text-content/20"),children:(0,n.jsx)(P.U,{size:32,weight:t.rating>=e?"fill":"regular"})},e))}),(0,n.jsx)(el.gN,{name:"rating",id:"rating-input",type:"hidden"}),(0,n.jsx)(el.Bc,{name:"rating",children:e=>(0,n.jsx)("p",{className:"mt-1 text-sm text-error",children:e})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"nickname",className:"mb-2 block text-sm font-600",children:"Jak ti m\xe1me Å\xedkat? *"}),(0,n.jsx)(el.gN,{as:"input",type:"text",id:"nickname",name:"nickname",placeholder:"napÅ. Petra, Honza...",className:"w-full rounded-md border bg-overlay/5 px-3 py-2 text-content placeholder-muted-softer ".concat(l.nickname&&i.nickname?"border-error":"border-line/15")}),(0,n.jsx)(el.Bc,{name:"nickname",children:e=>(0,n.jsx)("p",{className:"mt-1 text-sm text-error",children:e})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"title",className:"mb-2 block text-sm font-600",children:"N\xe1zev *"}),(0,n.jsx)(el.gN,{as:"input",type:"text",id:"title",name:"title",placeholder:"napÅ. SkvÄl\xfd průvodce",className:"w-full rounded-md border bg-overlay/5 px-3 py-2 text-content placeholder-muted-softer ".concat(l.title&&i.title?"border-error":"border-line/15")}),(0,n.jsx)(el.Bc,{name:"title",children:e=>(0,n.jsx)("p",{className:"mt-1 text-sm text-error",children:e})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"content",className:"mb-2 block text-sm font-600",children:"Text hodnocen\xed *"}),(0,n.jsx)(el.gN,{as:"textarea",id:"content",name:"content",placeholder:"SdÄlte n\xe1m, jak\xe1 byla vaÅ¡e zkuÅ¡enost...",rows:5,className:"w-full resize-none rounded-md border bg-overlay/5 px-3 py-2 text-content placeholder-muted-softer ".concat(l.content&&i.content?"border-error":"border-line/15")}),(0,n.jsx)(el.Bc,{name:"content",children:e=>(0,n.jsx)("p",{className:"mt-1 text-sm text-error",children:e})})]}),(0,n.jsxs)("div",{className:"flex gap-3 pt-4",children:[a&&(0,n.jsx)(x.Z,{type:"button",onClick:a,color:"transparent-white",className:"flex-1",children:"ZruÅ¡it"}),(0,n.jsx)(x.Z,{type:"submit",color:"gradient",disabled:s||o,className:"flex-1",children:s?"Odes\xedl\xe1n\xed...":"Odeslat hodnocen\xed"})]})]})}})}
1,ei=l(99767),eo=l(31378),er=l(26289),ed=l(10737);let ec=e=>{var t,l,n;let a=(null!==(t=e.years_of_service)&&void 0!==t?t:0)+Math.floor((null!==(l=e.total_online_hours)&&void 0!==l?l:0)/8760),s=null!==(n=e.calls_count)&&void 0!==n?n:0,i=[a>0&&"".concat(a," ").concat(1===a?"rok":a<=4?"roky":"let"," praxe"),s>0&&"".concat(s.toLocaleString("cs-CZ")," sezen\xed")].filter(Boolean);return i.length?i.join(" \xb7 "):null},eu=e=>{let{...t}=e,[l,a]=o.useState(!1),s=o.useRef(null),[i,r]=(0,o.useState)(0);o.useEffect(()=>{s.current&&(l?s.current.play():s.current.pause())},[l]);let d=()=>{s.current&&(s.current.muted=!1,s.current.requestFullscreen&&s.current.requestFullscreen())};return t.src?(0,n.jsxs)("div",{className:"group relative flex aspect-video justify-center overflow-hidden bg-black",children:[(0,n.jsx)("video",{ref:s,...t,className:"h-full",muted:!0,autoPlay:!0,loop:!0,controls:!1,playsInline:!0,onClick:()=>{l&&a(!1)},onDoubleClick:d}),(0,n.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 transition-opacity group-hover:opacity-100",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)(S.z,{size:48,weight:"bold",className:"mx-auto mb-2 text-tag-outline"}),(0,n.jsx)("span",{className:"font-bold text-xl text-on-media",children:"Video hovor"})]})}),l?(0,n.jsx)("button",{type:"button",onClick:()=>a(!1),className:"absolute left-1/2 top-1/2 z-10 hidden w-24 -translate-x-1/2 -translate-y-1/2 transition-transform hover:scale-105 group-hover:block sm:w-32",children:(0,n.jsx)(m.X2,{className:"w-24"})}):(0,n.jsx)("button",{type:"button",onClick:()=>a(!0),className:"absolute left-1/2 top-1/2 z-10 w-24 -translate-x-1/2 -translate-y-1/2 transition-transform hover:scale-105 sm:w-32",children:(0,n.jsx)(m.t$,{className:"w-24"})}),(0,n.jsxs)("div",{className:"absolute bottom-4 left-4 z-10 hidden items-center gap-x-4 group-hover:flex",children:[(0,n.jsx)("input",{type:"range",min:"0",max:"1",step:"0.1",value:i,onChange:e=>{let t=parseFloat(e.target.value);r(t),s.current&&(t>0&&(s.current.muted=!1),s.current.volume=t)},className:"gap-x-4w-32 hidden cursor-pointer group-hover:block"}),(0,n.jsx)("button",{type:"button",onClick:d,className:"hidden cursor-pointer rounded-lg bg-black/50 p-2 text-content group-hover:block",children:"â¶ Cel\xe1 obrazovka"})]})]}):(0,n.jsx)("div",{className:"flex h-full min-h-[330px] items-center justify-center text-lg font-600 text-muted",children:"Video"})},em=e=>{let{url:t}=e,l=(e=>{try{let t=new URL(e);if(t.hostname.includes("youtube.com")){let e=t.searchParams.get("v");if(e)return e;let l=t.pathname.split("/").filter(Boolean),n=l.indexOf("shorts");if(-1!==n&&l[n+1])return l[n+1]}if(t.hostname.includes("youtu.be"))return t.pathname.split("/").filter(Boolean)[0]||null}catch(e){}return null})(t);return l?(0,n.jsx)("div",{className:"relative w-full overflow-hidden bg-black",style:{paddingTop:"56.25%"},children:(0,n.jsx)("iframe",{className:"absolute left-0 top-0 h-full w-full",src:"https://www.youtube.com/embed/".concat(l,"?rel=0"),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0})}):null},ex=()=>{(0,z.useRouter)();let[e,t]=(0,o.useState)(!1),{closeModal:l,getModalState:a}=(0,w.Z)(),[s,i]=(0,o.useState)(""),[r,d]=(0,o.useState)(!1),{logInUser:c}=(0,b.Z)(),u=a("access-options"),m=()=>{t(!0),k.Z.post("/auth/register",(0,_.mu)({email:s,role:"host",locale:"cs",referral_code:null})).then(e=>{c((0,_.qP)(e.data).data)}).catch(()=>{N.A.error("NÄco se nezdaÅilo")}).finally(()=>t(!1))};return u?(0,n.jsxs)(y.Z,{name:"access-options",width:"460px",showClose:!1,children:[(0,n.jsx)("h2",{className:"font-bold mb-4 text-center text-3xl",children:"Z\xedskej pÅ\xedstup"}),(0,n.jsx)("p",{className:"mx-auto mb-4 max-w-sm text-center text-lg",children:"Pro pokraÄov\xe1n\xed zadejte svůj e-mail."}),(0,n.jsx)(U.I,{disabled:r,type:"email",placeholder:"napÅ. [email protected]",value:s,onChange:e=>i(e.target.value),className:"mb-4 w-full rounded-md border px-4 py-2 text-center text-on-light shadow-sm"}),(0,n.jsx)(x.Z,{disabled:r,color:"gradient",className:"mb-4 w-full",onClick:()=>{/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)?(d(!0),m()):(d(!1),N.A.error("Zadejte platn\xfd e-mail."))},children:"PokraÄovat"}),r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"mx-auto mb-6 max-w-sm text-center text-lg",children:["Z\xedskej pÅ\xedstup ke konzultaci. ",(0,n.jsx)("strong",{children:"5 minut zdarma"})," pro nov\xe9 uživatele."]}),(0,n.jsx)(O.default,{fromModal:!0,loading:e,setLoading:t}),(0,n.jsxs)("div",{className:"my-6 flex items-center justify-center gap-2",children:[(0,n.jsx)("hr",{className:"flex-grow border-t"}),(0,n.jsx)("span",{className:"text-sm text-muted",children:"NEBO"}),(0,n.jsx)("hr",{className:"flex-grow border-t"})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-4 [&>button]:flex-1",children:[(0,n.jsx)(x.Z,{onClick:()=>{d(!1),i(""),l("access-options")},color:"transparent-white",children:"ZavÅ\xedt"}),(0,n.jsx)(x.Z,{onClick:m,disabled:e,className:"font-medium rounded-md px-4 py-2 text-content shadow",children:e?"NaÄ\xedt\xe1n\xed...":"Registrovat se"})]})]})]}):null};var eh=!0;function ep(e){var t,l,s,d,m,p,f,k,q,O,U,A,L,B,X,V,W,K,G,Y,Q,$,ee,el,en,ea;let{data:eh,slug:ep,calendarSlots:ev=[]}=e,{data:ef}=(0,C.Z)(ep,eh),{user:ej}=(0,b.Z)();(0,o.useEffect)(()=>{ef&&(0,ed.L)(ef)},[null==ef?void 0:ef.id]);
1let eb=(0,eo.d)(),eN=(0,er.e)(ef),{openModal:ey,closeModal:ew}=(0,w.Z)(),ek=(0,o.useRef)(null),[e_,ez]=(0,o.useState)(!1),[eZ,eC]=(0,o.useState)(0),[eS,eM]=(0,o.useState)(!1),[eP,eD]=(0,o.useState)(!1),[eI,eE]=(0,o.useState)(!1),[eF,eq]=(0,o.useState)(null),[eR,eO]=(0,o.useState)(null),eU=()=>{eC(e=>e5.length?(e-1+e5.length)%e5.length:0)},eA=()=>{eC(e=>e5.length?(e+1)%e5.length:0)},eL=(0,o.useCallback)(()=>{var e;if(!ej){Z().push("".concat(r.B.login(),"?mode=register"));return}if((null===(e=ej.guide_profile)||void 0===e?void 0:e.id)===(null==ef?void 0:ef.id)){N.A.error("Nemůžete pÅidat hodnocen\xed na svůj vlastn\xed profil.");return}ey("add-review-profile",{type:"state"})},[ej,ey,null==ef?void 0:ef.id]),eB=(0,z.useRouter)(),eX="guidance"===eB.query.from,[eV,eH]=(0,o.useState)([]),{data:eT,mutate:eJ}=(0,j.Z)({guide_profile_id:null!==(f=null==ef?void 0:ef.id)&&void 0!==f?f:"",date_from:(0,v.WU)(new Date,"y-MM-dd"),date_to:(0,v.WU)((0,g.E)(new Date,7),"y-MM-dd")},{fallbackData:ev});(0,o.useEffect)(()=>{let e=ek.current;if(!e||e_)return;let t=new IntersectionObserver(e=>{let[l]=e;l.isIntersecting&&(ez(!0),t.disconnect())},{rootMargin:"300px"});return t.observe(e),()=>t.disconnect()},[e_]),(0,o.useEffect)(()=>{try{var e;let t=window.localStorage.getItem("guidance:lastSelection");if(!t){eH([]);return}let l=JSON.parse(t),n=(null!==(e=l.suggested_guides)&&void 0!==e?e:[]).map(e=>e.slug).filter(e=>"string"==typeof e&&e.length>0);eH(n)}catch(e){eH([])}},[]),(0,o.useEffect)(()=>{let e=()=>eD(window.scrollY>500);return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[]);let eW=(0,o.useRef)(null);(0,o.useEffect)(()=>{ef&&ep&&eW.current!==ep&&(eW.current=ep,(0,h.L9)("advisor_profile_view",{advisor_id:ef.id,advisor_slug:ep}))},[null==ef?void 0:ef.id,ep]);let eK=eB.query.autoAction;(0,o.useEffect)(()=>{if(!eK||!ej||!ef)return;let e=ef.call_status,t=["online","video-online","chat-video-online","all-online"].includes(e),l=["online","audio-online","chat-audio-online","all-online"].includes(e),n=["chat-online","chat-audio-online","chat-video-online","all-online"].includes(e);eB.replace({pathname:eB.pathname,query:{slug:eB.query.slug}},void 0,{shallow:!0}),"video"===eK&&t?Z().push({pathname:r.Z.call,query:{id:(0,_.uK)(ej.id,ef.id),token:1}}):"audio"===eK&&l?Z().push({pathname:r.Z.call,query:{id:(0,_.XF)(ej.id,ef.id),token:1}}):"chat"===eK&&n&&Z().push({pathname:r.Z.chat,query:{id:(0,_.hk)(ej.id,ef.id),token:0}})},[eK,null==ej?void 0:ej.id,null==ef?void 0:ef.id]);let eG=o.useMemo(()=>{let e=eV.indexOf(ep),t=e>0?eV[e-1]:null,l=e>=0&&e<eV.length-1?eV[e+1]:null;return{index:e,count:eV.length,prevSlug:t,nextSlug:l}},[eV,ep]),eY=async(e,t)=>{var l;if(ef&&(0,h.L9)("contact_advisor_click",{advisor_id:ef.id,session_type:null!=t?t:"video"}),!ej){eq({action:null!=t?t:"video",callback:e});return}if((null!==(l=ej.seconds_balance)&&void 0!==l?l:0)<170){eq({action:null!=t?t:"video",callback:e,loggedInUser:ej});return}eO(null!=t?t:"video");let n=!0;try{let e=await (0,C.q)(ep),l=null==e?void 0:e.call_status;(n=({video:!!l&&["online","video-online","chat-video-online","all-online"].includes(l),audio:!!l&&["online","audio-online","chat-audio-online","all-online"].includes(l),chat:!!l&&["chat-online","chat-audio-online","chat-video-online","all-online"].includes(l)})[null!=t?t:"video"])||N.A.error("busy"===l?"Průvodce je moment\xe1lnÄ v hovoru. Rezervujte si term\xedn n\xedže.":"Průvodce je moment\xe1lnÄ offline. Rezervujte si term\xedn n\xedže.")}catch(e){}eO(null),n&&e(ej)},eQ=()=>{ey("reservation-slots",{type:"state"})},e$=e=>{ef&&ey("register-date",{type:"state",queries:{id:ef.id,datetime:e.datetime,timezone:e.timezone,guideName:(0,_.Xu)(ef),guideAvatar:ef.avatar?(0,_.Jn)(ef.avatar):"",channel:e.channel}})};if(!ef)return null;let e0=ef.call_status,e1=["online","video-online","chat-online","audio-online","chat-audio-online","chat-video-online","all-online"].includes(e0),e2=["online","video-online","chat-video-online","all-online"].includes(e0),e4=["chat-online","chat-audio-online","chat-video-online","all-online"].includes(e0),e3=["online","audio-online","chat-audio-online","all-online"].includes(e0),e5=null!==(k=ef.gallery)&&void 0!==k?k:[],e6=!!(ef.youtube_url||(null===(t=ef.video)||void 0===t?void 0:t.original));return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(c(),{children:[(0,n.jsxs)("title",{children:[(0,_.Xu)(ef)," | ",(null===(s=ef.specializations)||void 0===s?void 0:null===(l=s[0])||void 0===l?void 0:l.title)?"".concat(ef.specializations[0].title," | "):"","Spirio"]}),(0,n.jsx)("meta",{name:"description",content:ef.short_description?ef.short_description.slice(0,160):"".concat((0,_.Xu)(ef)," â duchovn\xed průvodce na Spirio. Video konzultace, audio hovor, chat.")}),(0,n.jsx)("link",{rel:"canonical",href:"https://spirio.cz/pruvodci/".concat(ep)}),(0,n.jsx)("meta",{property:"og:title",content:"".concat((0,_.Xu)(ef)," | Spirio")}),(0,n.jsx)("meta",{property:"og:description",content:ef.short_description?ef.short_description.slice(0,160):"".concat((0,_.Xu)(ef)," â duchovn\xed průvodce na Spirio.")}),ef.avatar&&(0,n.jsx)("meta",{property:"og:image",content:(0,_.Jn)(ef.avatar)}),(0,n.jsx)("meta",{property:"og:url",content:"https://spirio.cz/pruvodci/".concat(ep)}),(0,n.jsx)("meta",{property:"og:type",content:"profile"}),(0,n.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"Product",name:(0,_.Xu)(ef),description:null!==(q=ef.short_description)&&void 0!==q?q:void 0,image:ef.avatar?(0,_.Jn)(ef.avatar):void 0,category:"Duchovn\xed průvodce",url:"https://spirio.cz/pruvodci/".concat(ep),...null!=ef.rating&&(null!==(O=ef.reviews_count)&&void 0!==O?O:0)+(null!==(U=ef.call_ratings_count)&&void 0!==U?U:0)>0&&{aggregateRating:{"@type":"AggregateRating",ratingValue:String(ef.rating),ratingCount:String((null!==(A=ef.reviews_count)&&void 0!==A?A:0)+(null!==(L=ef.call_ratings_count)&&void 0!==L?L:0)),bestRating:"5",worstRating:"1"}},...null!=eN&&{offers:{"@type":"Offer",priceCurrency:"CZK",priceSpecification:{"@type":"UnitPriceSpecification",price:eN,priceCurrency:"CZK",unitText:"MIN"}}}})}})]}),(0,n.jsxs)("section",{className:"pb-4 lg:pb-10",children:[(0,n.jsx)("div",{className:"hidden lg:block",children:(0,n.jsx)(i.Z,{breadcrumbs:[{title:"Dostupn\xed průvodci",url:r.Z.discover},{title:"Detail průvodce"}]})}),eX&&(0,n.jsx)("div",{className:"container relative mt-4 !px-0 sm:px-6",children:(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-line/10 bg-card-background/80 px-4 py-3",children:[(0,n.jsx)("button",{type:"button",onClick:()=>Z().push("/guidance?resume=1"),className:"text-sm font-500 text-card-foreground
1/80 hover:text-card-foreground",children:"ZpÄt na doporuÄen\xe9 průvodce"}),(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("button",{type:"button",disabled:!eG.prevSlug,onClick:()=>eG.prevSlug&&Z().push({pathname:r.B.discoverDetail(eG.prevSlug),query:{from:"guidance"}}),className:"text-sm font-500 text-card-foreground/80 hover:text-card-foreground disabled:opacity-40",children:"PÅedchoz\xed"}),eG.count>0&&(0,n.jsx)("div",{className:"text-xs text-card-foreground/60",children:eG.index>=0?"".concat(eG.index+1,"/").concat(eG.count):"".concat(eG.count)}),(0,n.jsx)("button",{type:"button",disabled:!eG.nextSlug,onClick:()=>eG.nextSlug&&Z().push({pathname:r.B.discoverDetail(eG.nextSlug),query:{from:"guidance"}}),className:"text-sm font-500 text-card-foreground/80 hover:text-card-foreground disabled:opacity-40",children:"DalÅ¡\xed"})]})]})}),(0,n.jsxs)("div",{className:"container relative mt-0 !px-0 sm:mt-6 lg:mt-10 lg:!px-8",children:[(0,n.jsxs)("div",{className:"lg:hidden",children:[(0,n.jsxs)("div",{className:"relative mx-6 mt-4 aspect-[340/265] overflow-hidden rounded-md bg-overlay/10 shadow-[shadow:var(--card-shadow)]",children:[ef.avatar?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("img",{src:(0,_.Jn)(ef.avatar),alt:"","aria-hidden":!0,className:"absolute inset-0 h-full w-full scale-110 object-cover blur-xl"}),(0,n.jsx)("img",{src:(0,_.Jn)(ef.avatar),alt:(0,_.Xu)(ef),className:"relative h-full w-full object-contain object-center"})]}):(0,n.jsx)("div",{className:"h-full w-full bg-primary-725"}),(0,n.jsx)("div",{className:"absolute left-3 top-3",children:(0,n.jsx)(u.Z,{state:ef.call_status,show_info:!1})}),(0,n.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/75 via-black/35 to-transparent px-4 pb-3 pt-10",children:[(0,n.jsxs)("div",{className:"mb-1",children:[(0,n.jsx)("h1",{className:"font-bold m-0 text-[22px] leading-tight text-on-media",children:(0,_.Xu)(ef)}),(0,_.UG)(ef)&&(0,n.jsx)("p",{className:"mt-1 truncate text-xs italic leading-snug text-on-media/90",children:(0,_.UG)(ef)})]}),ef.tagline&&(0,n.jsx)("p",{className:"mb-1 text-xs italic leading-snug text-on-media/90",children:ef.tagline}),(0,n.jsxs)("div",{className:"flex items-center gap-2 text-xs text-on-media/80",children:[(0,n.jsx)("span",{className:"text-warning-500",children:"â"}),(0,n.jsx)("span",{className:"font-semibold text-on-media",children:(null!==(B=ef.rating)&&void 0!==B?B:4.9).toFixed(1)}),(0,n.jsx)("span",{children:"\xb7"}),(0,n.jsxs)("button",{type:"button",onClick:()=>{let e=document.getElementById("reviews");e&&e.scrollIntoView({behavior:"smooth",block:"start"})},className:"underline transition-colors hover:text-on-media",children:[(null!==(X=ef.reviews_count)&&void 0!==X?X:0)+(null!==(V=ef.call_ratings_count)&&void 0!==V?V:0)," hodnocen\xed"]}),ec(ef)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:"\xb7"}),(0,n.jsx)("span",{children:ec(ef)})]})]})]}),e5.length>0&&(0,n.jsxs)("button",{type:"button",onClick:()=>{eC(0),ey("gallery-lightbox",{type:"state"})},className:"absolute right-4 top-4 inline-flex items-center gap-1.5 rounded-full bg-black/70 px-3 py-2 text-xs font-600 text-on-media shadow-lg ring-1 ring-line/25 transition hover:bg-black/85","aria-label":"OtevÅ\xedt fotogalerii",children:[(0,n.jsx)(M.r,{size:16,weight:"fill",className:"text-on-media"}),(0,n.jsx)("span",{children:"Galerie"})]})]}),eb&&(0,n.jsxs)("button",{type:"button",onClick:()=>{var e,t;eR||(ej?(null!==(e=ej.seconds_balance)&&void 0!==e?e:0)<170?eq({action:"video",callback:()=>{},purpose:"credits",loggedInUser:ej}):null===(t=document.getElementById("action-buttons"))||void 0===t||t.scrollIntoView({behavior:"smooth",block:"center"}):eq({action:"video",callback:()=>{},purpose:"credits"}))},className:"mx-auto block px-4 py-4 text-center transition-opacity active:opacity-80",children:[(0,n.jsxs)("div",{className:"text-base text-content",children:["Prvn\xedch ",eb.minutes," min ",(0,n.jsxs)("span",{className:"font-700",children:["za ",eb.pricePerMin," KÄ/min"]})]}),(0,n.jsxs)("div",{className:"mt-0.5 text-xs text-muted",children:["pak od ",eb.originalPricePerMin," KÄ/min"]})]})]}),(0,n.jsxs)("div",{className:"relative hidden min-h-[400px] items-start gap-x-8 overflow-hidden rounded-xl p-8 text-on-media lg:grid lg:grid-cols-[calc(460px-2rem)_1fr] xl:grid-cols-[calc(460px-2.5rem)_1fr] xl:p-10",style:{background:"var(--grad-surface)"},children:[(0,n.jsxs)("div",{className:"absolute inset-y-0 left-0 w-[460px] overflow-hidden rounded-xl bg-on-media/10",children:[ef.avatar?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("img",{src:(0,_.Jn)(ef.avatar),alt:"","aria-hidden":!0,
1className:"absolute inset-0 h-full w-full scale-110 object-cover blur-xl"}),(0,n.jsx)("img",{src:(0,_.Jn)(ef.avatar),alt:(0,_.Xu)(ef),className:"absolute inset-0 h-full w-full object-contain object-center"})]}):(0,n.jsx)("div",{className:"h-full w-full bg-primary-725"}),(0,n.jsx)("div",{className:"absolute left-3 top-3",children:(0,n.jsx)(u.Z,{state:ef.call_status,show_info:!1})}),e5.length>0?(0,n.jsxs)("button",{type:"button",onClick:()=>{eC(0),ey("gallery-lightbox",{type:"state"})},className:"absolute bottom-3 right-3 inline-flex items-center gap-1 rounded-full bg-black/70 px-3 py-1.5 text-xs font-600 text-on-media shadow-lg ring-1 ring-line/25 transition hover:bg-black/85","aria-label":"OtevÅ\xedt fotogalerii",children:[(0,n.jsx)(M.r,{size:16,weight:"fill",className:"text-on-media"}),(0,n.jsx)("span",{children:"Galerie"})]}):null]}),(0,n.jsx)("div",{"aria-hidden":!0}),(0,n.jsxs)("div",{className:"flex flex-col items-center lg:items-start",children:[(0,n.jsxs)("div",{className:"mb-6 w-full text-center lg:text-left",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-3 lg:justify-start",children:[(0,n.jsx)(a.H2,{className:"m-0 mt-2 truncate text-2xl text-on-media sm:mt-0 sm:text-3xl lg:text-[2.5rem]",children:(0,_.Xu)(ef)}),(0,n.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-on-media px-2.5 py-1 text-xs text-on-light shadow-sm",children:[(0,n.jsx)(P.U,{size:12,weight:"fill",className:"text-secondary"}),(0,n.jsx)("span",{className:"font-700",children:(null!==(W=ef.rating)&&void 0!==W?W:4.9).toFixed(1)}),((null!==(K=ef.reviews_count)&&void 0!==K?K:0)>0||(null!==(G=ef.call_ratings_count)&&void 0!==G?G:0)>0)&&(0,n.jsxs)("button",{type:"button",onClick:()=>{var e;return null===(e=document.getElementById("reviews"))||void 0===e?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},className:"text-on-light/70 underline-offset-2 hover:underline",children:[(null!==(Y=ef.reviews_count)&&void 0!==Y?Y:0)+(null!==(Q=ef.call_ratings_count)&&void 0!==Q?Q:0)," hodnocen\xed"]})]})]}),(0,_.UG)(ef,120)&&(0,n.jsx)("p",{className:"mx-auto mt-3 line-clamp-3 max-w-md text-sm leading-snug text-on-media/85 lg:mx-0 lg:text-lg",children:(0,_.UG)(ef,120)}),ec(ef)&&(0,n.jsx)("p",{className:"mt-3 text-sm font-700 text-on-media lg:text-base",children:ec(ef)})]}),(0,n.jsx)("div",{className:"w-full max-w-2xl",children:(0,n.jsx)("div",{className:"group relative",children:(()=>{let e=ef.call_status,t="online"===e||"video-online"===e||"chat-video-online"===e||"all-online"===e,l="online"===e||"audio-online"===e||"chat-audio-online"===e||"all-online"===e,a="chat-online"===e||"chat-audio-online"===e||"chat-video-online"===e||"all-online"===e,s=["online","video-online","chat-online","audio-online","chat-audio-online","chat-video-online","all-online"].includes(e);return(0,n.jsxs)("div",{className:"relative z-10 flex flex-col gap-5",children:[s?(0,n.jsxs)("div",{className:"grid grid-cols-4 gap-2 sm:gap-3",children:[(0,n.jsx)("button",{style:{order:2},onClick:()=>a&&!eR&&eY(e=>Z().push({pathname:r.Z.chat,query:{id:(0,_.hk)(e.id,ef.id),token:0}}),"chat"),disabled:!a||!!eR,className:(0,_.cn)("flex min-h-[72px] items-center justify-center rounded-md bg-on-media px-4 py-4 text-left text-sm leading-tight text-on-light shadow-sm ring-1 ring-line/30 transition-all",a&&!eR?"cursor-pointer hover:shadow-md active:scale-95":"cursor-not-allowed opacity-40"),children:(0,n.jsxs)("div",{className:"relative flex items-center gap-2",children:["chat"===eR?(0,n.jsx)(R.Z,{color:"white",className:"!h-6 !w-6"}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(D.E,{size:32,weight:"regular",className:"text-brand-on-light","aria-label":"Chat"})}),(0,n.jsx)("span",{className:"whitespace-nowrap font-600 text-gradient",children:"Chat"})]})}),(0,n.jsx)("button",{style:{order:1},onClick:()=>t&&!eR&&eY(e=>Z().push({pathname:r.Z.call,query:{id:(0,_.uK)(e.id,ef.id),token:0}}),"video"),disabled:!t||!!eR,className:(0,_.cn)("flex min-h-[72px] items-center justify-center rounded-md bg-on-media px-4 py-4 text-left text-sm leading-tight text-on-light shadow-sm ring-1 ring-line/30 transition-all",t&&!eR?"cursor-pointer hover:shadow-md active:scale-95":"cursor-not-allowed opacity-40"),children:(0,n.jsxs)("div",{className:"relative flex items-center gap-2",children:["video"===eR?(0,n.jsx)(R.Z,{color:"white",className:"!h-6 !w-6"}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(S.z,{size:32,weight:"regular",className:"text-brand-on-light","aria-label":"Video hovor"})}),(0,n.jsxs)("span",{className:"font-600 leading-tight text-gradient",children:["Video",(0,n.jsx)("br",{}),"hovor"]})]})}),(0,n.jsx)("button",{style:{order:3},onClick:()=>l&&!eR&&eY(e=>Z().push({pathname:r.Z.call,query:{id:(0,_.XF)(e.id,ef.id),token:1}}),"audio"),disabled:!l||!!eR,className:(0,_.cn)("flex min-h-[72px] items-center justify-center rounded-md bg-on-media px-4 py-4 text-left text-sm leading-tight text-on-light shadow-sm ring-1 ring-line/30 transition-all",l&&!eR?"cursor-pointer hover:shadow-md active:scale-95":"cursor-not-allowed opacity-40"),children:(0,n.jsxs)("div",{className:"relative flex items-center gap-2",children:["audio"===eR?(0,n.jsx)(R.Z,{color:"white",className:"!h-6 !w-6"}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(I.L,{size:32,weight:"regular",className:"text-brand-on-light","aria-label":"Audio hovor"})}),(0,n.jsxs)("span",{className:"font-600 leading-tight text-gradient",children:["Audio",(0,n.jsx)("br",{}),"hovor"]})]})}),(0,n.jsx)("button",{style:{order:4}
1,onClick:eQ,className:"flex min-h-[72px] cursor-pointer items-center justify-center rounded-md bg-on-media px-4 py-4 text-left text-sm leading-tight text-on-light shadow-sm ring-1 ring-line/30 transition-all hover:shadow-md active:scale-95",children:(0,n.jsxs)("div",{className:"relative flex items-center gap-2",children:[(0,n.jsx)(E.R,{size:32,weight:"regular",className:"text-brand-on-light","aria-hidden":!0}),(0,n.jsx)("span",{className:"font-600 text-gradient",children:"Rezervovat term\xedn"})]})})]}):(0,n.jsx)("div",{className:"rounded-lg bg-on-media/15 px-4 py-3 text-center text-sm text-on-media",children:"busy"===e?"Průvodce je moment\xe1lnÄ v hovoru":"Průvodce je moment\xe1lnÄ offline"}),eb&&(0,n.jsxs)("p",{className:"order-first mb-1 text-sm text-on-media lg:text-lg",children:["Prvn\xedch ",eb.minutes," min ",(0,n.jsxs)("strong",{className:"font-bold",children:["za ",eb.pricePerMin," KÄ/min"]}),(0,n.jsxs)("span",{className:"text-on-media/70",children:[" \xb7 pak od ",eb.originalPricePerMin," KÄ/min"]})]}),(0,n.jsxs)("div",{className:"mt-1 flex flex-wrap items-center justify-center gap-x-4 gap-y-1 text-xs text-on-media/80 lg:justify-start",children:[(0,n.jsx)("span",{children:"â OvÄÅen\xfd průvodce"}),(0,n.jsx)("span",{children:"â Nevyužit\xfd Äas ti zůst\xe1v\xe1"}),(0,n.jsx)("span",{children:"â BezpeÄn\xe9 platby"})]}),!s&&(0,n.jsxs)(x.Z,{onClick:eQ,color:"white",size:"lg",className:"mt-1 w-full",children:[(0,n.jsx)(F.f,{size:20,className:"mr-2 text-brand",weight:"bold"}),(0,n.jsx)("span",{className:"text-gradient",children:"Rezervovat term\xedn"})]})]})})()})})]})]})]}),(0,n.jsx)(ex,{})]}),(0,n.jsxs)("div",{className:"profile-band",children:[(0,n.jsxs)("div",{className:"px-5 py-6 text-on-media lg:hidden",children:[(0,n.jsx)("div",{id:"action-buttons",className:"scroll-mt-20",children:e1&&(0,n.jsxs)("div",{className:"mb-4 grid grid-cols-2 gap-3",children:[(0,n.jsxs)("button",{style:{order:2},onClick:()=>e4&&!eR&&eY(e=>Z().push({pathname:r.Z.chat,query:{id:(0,_.hk)(e.id,ef.id),token:0}}),"chat"),disabled:!e4||!!eR,className:(0,_.cn)("flex h-20 flex-row items-center justify-center gap-3 rounded-sm bg-surface px-3 shadow-[shadow:var(--card-shadow)] ring-1 ring-line/30 transition-all",e4&&!eR?"hover:bg-overlay/10 active:scale-95":"cursor-not-allowed opacity-40"),children:["chat"===eR?(0,n.jsx)(R.Z,{color:"white",className:"!h-8 !w-8"}):(0,n.jsx)(D.E,{size:32,weight:"regular",className:"text-brand-on-surface"}),(0,n.jsx)("span",{className:"font-semibold text-sm text-gradient",children:"Chat"})]}),(0,n.jsxs)("button",{style:{order:1},onClick:()=>e2&&!eR&&eY(e=>Z().push({pathname:r.Z.call,query:{id:(0,_.uK)(e.id,ef.id),token:0}}),"video"),disabled:!e2||!!eR,className:(0,_.cn)("flex h-20 flex-row items-center justify-center gap-3 rounded-sm bg-surface px-3 shadow-[shadow:var(--card-shadow)] ring-1 ring-line/30 transition-all",e2&&!eR?"hover:bg-overlay/10 active:scale-95":"cursor-not-allowed opacity-40"),children:["video"===eR?(0,n.jsx)(R.Z,{color:"white",className:"!h-8 !w-8"}):(0,n.jsx)(S.z,{size:32,weight:"regular",className:"text-brand-on-surface"}),(0,n.jsxs)("span",{className:"font-semibold text-sm leading-tight text-gradient",children:["Video",(0,n.jsx)("br",{}),"hovor"]})]}),(0,n.jsxs)("button",{style:{order:3},onClick:()=>e3&&!eR&&eY(e=>Z().push({pathname:r.Z.call,query:{id:(0,_.XF)(e.id,ef.id),token:1}}),"audio"),disabled:!e3||!!eR,className:(0,_.cn)("flex h-20 flex-row items-center justify-center gap-3 rounded-sm bg-surface px-3 shadow-[shadow:var(--card-shadow)] ring-1 ring-line/30 transition-all",e3&&!eR?"hover:bg-overlay/10 active:scale-95":"cursor-not-allowed opacity-40"),children:["audio"===eR?(0,n.jsx)(R.Z,{color:"white",className:"!h-8 !w-8"}):(0,n.jsx)(I.L,{size:32,weight:"regular",className:"text-brand-on-surface"}),(0,n.jsxs)("span",{className:"font-semibold text-sm leading-tight text-gradient",children:["Audio",(0,n.jsx)("br",{}),"hovor"]})]}),(0,n.jsxs)("button",{style:{order:4},onClick:eQ,className:"flex h-20 flex-row items-center justify-center gap-3 rounded-sm bg-surface px-3 shadow-[shadow:var(--card-shadow)] ring-1 ring-line/30 transition-all hover:bg-overlay/10 active:scale-95",children:[(0,n.jsx)(E.R,{size:32,weight:"regular",className:"text-brand-on-surface"}),(0,n.jsx)("span",{className:"font-semibold text-sm text-gradient",children:"Rezervovat term\xedn"})]})]})}),!e1&&(0,n.jsxs)(x.Z,{onClick:eQ,color:"white",size:"lg",className:"w-full",children:[(0,n.jsx)(F.f,{size:20,className:"mr-2 text-brand",weight:"bold"}),(0,n.jsx)("span",{className:"text-gradient",children:"Rezervovat term\xedn"})]})]}),(0,n.jsx)(T.Z,{calendarSlots:eT,guideId:ef.id,guideName:(0,_.Xu)(ef),guideAvatar:ef.avatar?(0,_.Jn)(ef.avatar):void 0,isOnline:"offline"!==ef.call_status,onRefetch:eJ,onContinue:e=>{if(!ej){ew("reservation-slots"),eq({action:"video",purpose:"reservation",callback:()=>e$(e)});return}e$(e)}}),e5.length?(0,n.jsxs)(y.Z,{name:"gallery-lightbox",width:"900px",showClose:!0,children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(a.H4,{className:"m-0",children:"Fotogalerie"}),(0,n.jsxs)("p",{className:"mt-1 text-sm text-content/70",children:[e5.length," fotek"]}
1)]}),(0,n.jsx)(x.Z,{color:"transparent-white",size:"sm",onClick:()=>ew("gallery-lightbox"),children:"ZavÅ\xedt"})]}),(0,n.jsxs)("div",{className:"rounded-2xl relative mt-6 overflow-hidden border border-line/10 bg-black/50",children:[(0,n.jsx)("img",{src:(0,_.Jn)(e5[eZ]),alt:"".concat((0,_.Xu)(ef)," - fotka ").concat(eZ+1),className:"w-full object-contain"}),(0,n.jsx)("button",{type:"button",onClick:eU,onKeyDown:e=>{"ArrowLeft"===e.key&&eU()},className:"absolute left-3 top-1/2 flex -translate-y-1/2 items-center justify-center rounded-full bg-black/60 px-3 py-2 text-on-media shadow-lg ring-1 ring-line/20 transition hover:bg-black/80","aria-label":"PÅedchoz\xed fotka",children:"â¹"}),(0,n.jsx)("button",{type:"button",onClick:eA,onKeyDown:e=>{"ArrowRight"===e.key&&eA()},className:"absolute right-3 top-1/2 flex -translate-y-1/2 items-center justify-center rounded-full bg-black/60 px-3 py-2 text-on-media shadow-lg ring-1 ring-line/20 transition hover:bg-black/80","aria-label":"DalÅ¡\xed fotka",children:"âº"}),(0,n.jsxs)("div",{className:"absolute bottom-3 right-3 rounded-full bg-black/60 px-3 py-1 text-xs text-on-media/80",children:[eZ+1,"/",e5.length]})]})]}):null,(0,n.jsx)("section",{className:"pb-10 sm:pb-24",children:(0,n.jsxs)("div",{className:"container",children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("h2",{className:"text-[28px] font-700 text-on-media lg:text-[2rem] lg:text-content",children:"Specializace"}),(0,n.jsx)("div",{className:"mt-4 flex flex-wrap items-center justify-center gap-2",children:ef.specializations.map(e=>(0,n.jsx)("span",{className:"rounded-full bg-on-media/20 px-3 py-1 text-xs text-on-media lg:bg-tag",children:e.title},e.id))})]}),(0,n.jsx)("div",{className:"mt-12 lg:mt-16",children:(0,n.jsxs)("div",{className:(0,_.cn)("grid gap-10 lg:gap-14",e6&&"lg:grid-cols-2"),children:[(0,n.jsx)("div",{className:"flex flex-col gap-8",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"mb-3 text-center text-[28px] font-700 text-on-media lg:text-left lg:text-[2rem] lg:text-content",children:"O mnÄ"}),(()=>{var e,t,l,a,s,i;let o=(null!==(a=null===(e=ef.description)||void 0===e?void 0:e.length)&&void 0!==a?a:0)>250;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"mx-auto max-w-3xl whitespace-pre-wrap text-center text-sm leading-relaxed text-on-media/90 lg:mx-0 lg:text-left lg:text-base lg:text-muted",children:[(0,n.jsx)("span",{className:"lg:hidden",children:o&&!eI?ef.description.slice(0,250)+"â¦":ef.description}),(0,n.jsx)("span",{className:"hidden lg:inline",children:(null!==(s=null===(t=ef.description)||void 0===t?void 0:t.length)&&void 0!==s?s:0)>900&&!eI?ef.description.slice(0,900)+"â¦":ef.description})]}),o&&(0,n.jsx)("button",{type:"button",onClick:()=>eE(e=>!e),className:(0,_.cn)("font-semibold mx-auto mt-2 block text-sm text-on-media underline transition-opacity hover:opacity-80 lg:mx-0 lg:text-brand",(null!==(i=null===(l=ef.description)||void 0===l?void 0:l.length)&&void 0!==i?i:0)<=900&&"lg:hidden"),children:eI?"Zobrazit m\xe9nÄ":"Zobrazit v\xedce"})]})})()]})}),e6&&(0,n.jsx)("div",{className:"self-start overflow-hidden rounded-lg bg-surface shadow-[shadow:var(--card-shadow)]",children:ef.youtube_url?(0,n.jsx)(em,{url:ef.youtube_url}):(0,n.jsx)(eu,{src:null===(d=ef.video)||void 0===d?void 0:d.original})})]})})]})}),(0,n.jsx)("section",{id:"reviews",className:"pb-10 sm:pb-24",ref:ek,children:(0,n.jsx)("div",{className:"profile-reviews-card container rounded-xl px-6 py-10 empty:hidden sm:px-10 lg:px-14",children:e_&&(0,n.jsx)(et,{guideProfileId:ef.id,onAddReview:eL,showAddButton:(null==ej?void 0:null===(m=ej.guide_profile)||void 0===m?void 0:m.id)!==ef.id,callRatingsCount:null!==($=ef.call_ratings_count)&&void 0!==$?$:0,rating:ef.rating,onMedia:!0})})})]}),(0,n.jsx)(y.Z,{name:"add-review-profile",width:"600px",showClose:!0,children:(0,n.jsx)(es,{guideProfileId:ef.id,onSuccess:()=>{ew("add-review-profile"),N.A.success("DÄkujeme za vaÅ¡e hodnocen\xed!")},onCancel:()=>ew("add-review-profile")})}),ef&&(0,n.jsx)(eg,{specializationIds:null!==(ee=null===(p=ef.specializations)||void 0===p?void 0:p.map(e=>e.id))&&void 0!==ee?ee:[],notId:ef.id}),ef.paid_videos_enabled&&(0,n.jsx)("section",{id:"paid-videos",className:"pb-10 sm:pb-24",children:(0,n.jsx)("div",{className:"container",children:(0,n.jsx)(H,{guideProfileId:ef.id})})}),eP&&(0,n.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-50 border-t border-line/10 bg-card-background/95 px-4 py-3 shadow-2xl backdrop-blur-md lg:hidden",children:(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[ef.avatar&&(0,n.jsx)("img",{src:(0,_.Jn)(ef.avatar),alt:(0,_.Xu)(ef),className:"h-8 w-8 shrink-0 rounded-full object-cover ring-1 ring-brand"}),(0,n.jsx)("div",{className:"truncate text-sm font-600",children:(0,_.Xu)(ef)})]}),(0,n.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:e1?(0,n.jsxs)(n.Fragment,{children:[e4&&(0,n.jsxs)("button",{type:"button",onClick:()=>!eR&&eY(e=>Z().push({pathname:r.Z.chat,query:{id:(0,_.hk)(e.id,ef.id),token:0}}),"chat"),disabled:!!eR,className:(0,_.cn)("flex flex-col items-center gap-0.5 rounded-md border border-line/10 bg-overlay/5 px-3 py-2 text-xs font-600 transition-all",eR?"cursor-not-allowed opacity-50":"hover:bg-overlay/10 active:scale-95"),children:["chat"===eR?(0,n.jsx)(R.Z,{color:"white",className:"!h-5 !w-5"}):(0,n.jsx)(D.E,{size:20,weight:"fill",className:"text-tag-outline"}),(0,n.jsx)("span",{children:"Chat"})]}),e3&&(0,n.jsxs)("button",{type:"button",onClick:()=>!eR&&eY(e=>Z().push({pathname:r.Z.call,query:{id:(0,_.XF)(e.id,ef.id),token:1}}),"audio"),disabled:!!eR,className:(0,_.cn)("flex flex-col items-center gap-0.5 rounded-md border border-line/10 bg-overlay/5 px-3 py-2 text-xs font-600 transition-all",eR?"cursor-not-allowed opacity-50":"hover:bg-overlay/10 active:scale-95"),children:["audio"===eR?(0,n.jsx)(R.Z,{color:"white",className:"!h-5 !w-5"}):(0,n.jsx)(I.L,{size:20,weight:"fill",className:"text-tag-outline"}),(0,n.jsx)("span",{children:"Hovor"})]}),e2&&(0,n.jsxs)("button",{type:"button",onClick:()=>!eR&&eY(e=>Z().push({pathname:r.Z.call,query:{id:(0,_.uK)(e.id,ef.id),token:0}}),"video"),disabled:!!eR,className:(0,_.cn)("flex flex-col items-center gap-0.5 rounded-md border border-line/10 bg-overlay/5 px-3 py-2 text-xs font-600 transition-all",eR?"cursor-not-allowed opacity-50":"hover:bg-overlay/10 active:scale-95"),children:["video"===eR?(0,n.jsx)(R.Z,{color:"white",className:"!h-5 !w-5"}):(0,n.jsx)(S.z,{size:20,weight:"fill",className:"text-tag-outline"}),(0,n.jsx)("span",{children:"Video"})]})]}):(0,n.jsxs)(x.Z,{onClick:eQ,color:"gradient",size:"sm",className:"!rounded-md",children:[(0,n.jsx)(F.f,{size:16,className:"mr-1.5",weight:"bold"}),"Rezervovat term\xedn"]})})]})}),(0,n.jsx)(J.Z,{onSuccess:eJ}),eF&&ef&&(0,n.jsx)(ei.Z,{isOpen:!0,onClose:()=>eq(null),onSuccess:e=>{let t=eF.callback;eq(null),t(e)},action:eF.action,purpose:null!==(el=eF.purpose)&&void 0!==el?el:"call",guide:{name:(0,_.Xu)(ef),avatar:ef.avatar?(0,_.Jn)(ef.avatar):null,call_status:ef.call_status,rating:ef.rating,reviewsCount:(null!==(en=ef.reviews_count)&&void 0!==en?en:0)+(null!==(ea=ef.call_ratings_count)&&void 0!==ea?ea:0)},guideSlug:ep,initialUser:eF.loggedInUser})]})}function ev(e){var t,l,a,s,d,c,m,p;let{data:f,slug:N}=e,{data:y}=(0,C.Z)(N,f),{user:w}=(0,b.Z)(),k=(0,o.useRef)(null);(0,o.useEffect)(()=>{y&&N&&k.current!==N&&(k.current=N,(0,h.L9)("advisor_profile_view",{advisor_slug:N,advisor_id:y.id}))},[null==y?void 0:y.id,N]);let{data:z,mutate:M}=(0,j.Z)({guide_profile_id:null!==(l=null==y?void 0:y.id)&&void 0!==l?l:"",date_from:(0,v.WU)(new Date,"y-MM-dd"),date_to:(0,v.WU)((0,g.E)(new Date,7),"y-MM-dd")}),[P,E]=(0,o.useState)(null),F=(e,t)=>{var l;y&&(0,h.L9)("contact_advisor_click",{advisor_id:y.id,session_type:null!=t?t:"video"}),w?(null!==(l=w.seconds_balance)&&void 0!==l?l:0)<170?E({action:null!=t?t:"video",callback:e,loggedInUser:w}):e(w):E({action:null!=t?t:"video",callback:e})};return y?(y.gallery,(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("section",{className:"pb-12 sm:pb-24",children:[(0,n.jsx)(i.Z,{children:(0,n.jsxs)("div",{className:"flex flex-col-reverse items-center justify-center gap-x-4 gap-y-1 lg:flex-row lg:items-start",children:[(null==y?void 0:y.avatar)&&(0,n.jsx)("img",{src:(0,_.Jn)(y.avatar),alt:(0,_.Xu)(y),className:"h-10 w-10 rounded-full object-cover ring-1 ring-brand"}),(0,n.jsx)(A.Z,{rating:null!==(a=y.rating)&&void 0!==a?a:4.6}),(0,_.Xu)(y)," ",(0,n.jsx)(u.Z,{state:y.call_status,show_info:!1})]})}),(0,n.jsxs)("div",{className:"container relative mt-10 !px-0 sm:px-6",children:[(0,n.jsx)("div",{className:"mt-8 flex flex-wrap justify-center gap-4 text-center",children:"Spoj se teÄ pÅes video, audio nebo chat s průvodcem:"}),(0,n.jsx)("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-4",children:["online","video-online","chat-online","audio-online","chat-audio-online","chat-video-online","all-online"].includes(y.call_status)&&(()=>{let e=y.call_status,t="online"===e||"video-online"===e||"chat-video-online"===e||"all-online"===e,l="online"===e||"audio-online"===e||"chat-audio-online"===e||"all-online"===e,a="chat-online"===e||"chat-audio-online"===e||"chat-video-online"===e||"all-online"===e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Z,{onClick:()=>t&&F(e=>Z().push({pathname:r.Z.call,query:{id:(0,_.uK)(e.id,y.id),token:0}}),"video"),disabled:!t,className:(0,_.cn)("mx-6 flex min-h-[150px] w-full items-center justify-center gap-4 !rounded-md px-6 py-6 text-content shadow-lg ring-1 ring-line/20 hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-line/30 focus:ring-offset-2 focus:ring-offset-transparent sm:mx-0 sm:max-w-[175px]",{"curs
1or-not-allowed opacity-50":!t}),children:(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,n.jsx)(S.z,{size:45,weight:"bold",className:"text-tag-outline"}),(0,n.jsx)("span",{className:"font-semibold text-lg",children:"Video hovor"}),(0,n.jsx)("span",{className:"text-sm font-100",children:"ZaÄni teÄ"})]})}),(0,n.jsx)(x.Z,{onClick:()=>l&&F(e=>Z().push({pathname:r.Z.call,query:{id:(0,_.XF)(e.id,y.id),token:1}}),"audio"),disabled:!l,className:(0,_.cn)("mx-6 flex min-h-[150px] w-full items-center justify-center gap-4 !rounded-md px-6 py-6 text-content shadow-lg ring-1 ring-line/20 hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-line/30 focus:ring-offset-2 focus:ring-offset-transparent sm:mx-0 sm:max-w-[175px]",{"cursor-not-allowed opacity-50":!l}),children:(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)(I.L,{size:45,weight:"bold",className:"text-tag-outline"}),(0,n.jsx)("span",{className:"font-semibold text-lg",children:"Audio hovor"}),(0,n.jsx)("span",{className:"text-sm font-100",children:"ZaÄni teÄ"})]})}),(0,n.jsx)(x.Z,{onClick:()=>a&&F(e=>Z().push({pathname:r.Z.chat,query:{id:(0,_.hk)(e.id,y.id),token:0}}),"chat"),disabled:!a,className:(0,_.cn)("mx-6 flex min-h-[150px] w-full items-center justify-center gap-4 !rounded-md px-6 py-6 text-content shadow-lg ring-1 ring-line/20 hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-line/30 focus:ring-offset-2 focus:ring-offset-transparent sm:mx-0 sm:max-w-[175px]",{"cursor-not-allowed opacity-50":!a}),children:(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)(D.E,{size:45,weight:"bold",className:"text-tag-outline"}),(0,n.jsx)("span",{className:"font-semibold text-lg",children:"Chat"}),(0,n.jsx)("span",{className:"text-sm font-100",children:"ZaÄni teÄ"})]})}),(0,n.jsx)(x.Z,{onClick:()=>Z().push({hash:"paid-videos"}),className:"!hover:text-content mx-6 flex min-h-[150px] w-full items-center justify-center gap-4 !rounded-md px-6 py-6 !font-100 text-content shadow-lg sm:mx-0 sm:max-w-[175px]",children:(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)(q.S,{size:45,weight:"bold",className:"text-tag-outline"}),(0,n.jsx)("span",{className:"font-semibold text-lg",children:"Placen\xe1 videa"})]})})]})})()})]})]}),(0,n.jsx)("section",{className:"pb-10 sm:pb-24",children:(0,n.jsx)("div",{className:"container",children:(0,n.jsx)(et,{guideProfileId:y.id,showAddButton:!0})})}),(0,n.jsx)(eg,{specializationIds:null!==(s=null==y?void 0:null===(t=y.specializations)||void 0===t?void 0:t.map(e=>e.id))&&void 0!==s?s:[],notId:null!==(d=null==y?void 0:y.id)&&void 0!==d?d:""}),(0,n.jsx)("span",{className:"text-md flex flex-wrap justify-center whitespace-pre-wrap text-center text-muted",children:" Nev\xedÅ¡ si rady? "})," ",(0,n.jsxs)("span",{className:"ml-1 flex flex-wrap justify-center text-center text-content",children:[" ","Volej"," ",(0,n.jsxs)("a",{href:"tel:+420608047033",className:" ml-1",children:["+420 608 047 033"," "]}),(0,n.jsx)("span",{className:"ml-1 text-muted",children:" nebo napiÅ¡ na "}),(0,n.jsxs)("a",{href:"mailto:[email protected]",className:" ml-1",children:[" ","[email protected]"]})]}),(0,n.jsx)(J.Z,{onSuccess:M}),P&&y&&(0,n.jsx)(ei.Z,{isOpen:!0,onClose:()=>E(null),onSuccess:e=>{let t=P.callback;E(null),t(e)},action:P.action,purpose:null!==(c=P.purpose)&&void 0!==c?c:"call",guide:{name:(0,_.Xu)(y),avatar:y.avatar?(0,_.Jn)(y.avatar):null,call_status:y.call_status,rating:y.rating,reviewsCount:(null!==(m=y.reviews_count)&&void 0!==m?m:0)+(null!==(p=y.call_ratings_count)&&void 0!==p?p:0)},guideSlug:N,initialUser:P.loggedInUser})]})):null}let eg=e=>{let{specializationIds:t,notId:l}=e,{data:s}=(0,f.Z)({"filter[specialization_id]":t,"filter[not_id]":[l]});return(null==s?void 0:s.length)?(0,n.jsx)("section",{children:(0,n.jsxs)("div",{className:"container pb-24",children:[(0,n.jsx)("div",{className:"mb-5 flex flex-col items-center pt-18 text-center sm:mb-10 md:pt-32",children:(0,n.jsx)(a.H2,{children:"Podobn\xed průvodci"})}),(0,n.jsx)("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-4",children:s.map(e=>(0,n.jsx)(p.Z,{...e},e.id))}),(0,n.jsx)("div",{className:"mt-7.5 text-center sm:mt-15",children:(0,n.jsx)(x.Z,{href:r.Z.discover,color:"outline-gradient",size:"lg",className:"min-w-[320px]",children:(0,n.jsx)("span",{className:"text-gradient",children:"Zobrazit vÅ¡echny"})})})]})}):null};ep.getLayout=function(e){return(0,n.jsx)(s.Z,{children:e})}}}]);
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.