PageSourceSearch

https://realitni-pes.cz/assets/prehled-nabidek-QJRZhl_H.js

js realitni-pes.cz collected 2026-10-07 00:52:28 UTC 19,799 bytes, 1 lines download raw bytes

1import{r,j as e}from"./index-DYSxZb0c.js";import{C as De,a as ze,M as re,D as Ie}from"./CustomAppBar-CJTO7HIi.js";import{F as We}from"./Footer-DG0bBhQ_.js";import{D as je,a as we,b as Ce}from"./DialogTitle-BdTAtlsk.js";import{D as _e,a as ke}from"./DialogContentText-VbR22gKF.js";import{d as Te,g as Re,u as Ee,e as Pe,_ as te,h as Ae,i as Ne,s as Ue,a as W,B as f,T as x}from"./Button-cOKPiu6O.js";import{R as Ve,g as Le,t as Oe}from"./authRedirect-BGt_PM4r.js";import{f as He,g as Be,a as Ze,b as $e,s as D,T as Se,O as Qe,c as Me}from"./helpers-CuXVB9fq.js";import{a as Ge}from"./index-42ANG6Sg.js";import{V as Ke,U as Ye}from"./UpgradePlanModal-J4xuqYOI.js";import{W as ce}from"./consts-DVq3YnxQ.js";import{u as Je}from"./UserContext-Cjy3UOGu.js";import{b as Xe,u as qe,L as de}from"./components-t_mF0GA0.js";import{T as he}from"./Tooltip-DhEhv78L.js";import{c as ae,I as ne}from"./Slide-QYq-IuGH.js";import{C as et}from"./CircularProgress-Dg6YhzX_.js";import{C as U}from"./Chip-eWl6hGka.js";import{F as fe,d as me,S as pe,O as ue}from"./Select-CntTzuzY.js";import{C as xe}from"./Checkbox-05_ywBpQ.js";import{L as be}from"./ListItemText-B7F1cOyn.js";import{E as tt}from"./Edit-CdXqGnFA.js";import{G as ee}from"./Grid-BIAaeZ_X.js";import"./useId-D5drRJ-o.js";import"./index-CIMQZJhK.js";import"./theme-CoFIoBUy.js";import"./colorManipulator-DBmVyNpO.js";import"./useControlled-Zkx8MQj3.js";import"./Popper-BEXshzqf.js";import"./GlobalStyles-Bw19VWy1.js";import"./SwitchBase-DL3vpye3.js";function at(a){return Te("MuiCardMedia",a)}Re("MuiCardMedia",["root","media","img"]);const st=["children","className","component","image","src","style"],ot=a=>{const{classes:o,isMediaComponent:n,isImageComponent:i}=a;return Ne({root:["root",n&&"media",i&&"img"]},at,o)},rt=Ue("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(a,o)=>{const{ownerState:n}=a,{isMediaComponent:i,isImageComponent:d}=n;
1return[o.root,i&&o.media,d&&o.img]}})(({ownerState:a})=>te({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},a.isMediaComponent&&{width:"100%"},a.isImageComponent&&{objectFit:"cover"})),nt=["video","audio","picture","iframe","img"],it=["picture","img"],lt=r.forwardRef(function(o,n){const i=Ee({props:o,name:"MuiCardMedia"}),{children:d,className:b,component:y="div",image:h,src:_,style:k}=i,E=Pe(i,st),C=nt.indexOf(y)!==-1,T=!C&&h?te({backgroundImage:`url("${h}")`},k):k,O=te({},i,{component:y,isMediaComponent:C,isImageComponent:it.indexOf(y)!==-1}),P=ot(O);return e.jsx(rt,te({className:Ae(P.root,b),as:y,role:!C&&h?"img":void 0,ref:n,style:T,ownerState:O,src:C?h||_:void 0},E,{children:d}))}),Fe=ae(e.jsx("path",{d:"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z"}),"Favorite"),ct=ae(e.jsx("path",{d:"M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05"}),"FavoriteBorder"),dt=ae(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z"}),"Notifications"),ht=ae(e.jsx("path",{d:"M7.58 4.08 6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2c.15-2.65 1.51-4.97 3.55-6.42m12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43c2.02 1.45 3.39 3.77 3.54 6.42M18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2"}),"NotificationsActive");function ft({offerId:a,open:o,handleClose:n}){return e.jsxs(je,{open:o,onClose:()=>n(),PaperProps:{component:"form",onSubmit:async i=>{i.preventDefault();try{const d=await fetch("/api/favourite-offers/remove",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({offerId:a})});if(d.ok)n({isSuccess:!0});else{const b=await d.json();n({isSuccess:!1,error:b.errorMessage||"Chyba při odebrání z oblíbených"})}}catch{n({isSuccess:!1,error:"Chyba při odebrání z oblíbených"})}}},children:[e.jsx(we,{children:"Odebrat z oblíbených"}),e.jsx(Ce,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%"},children:e.jsx(_e,{children:"Opravdu si přejete odebrat tuto nabídku z oblíbených?"})}),e.jsxs(ke,{sx:{pb:3,px:3},children:[e.jsx(W,{onClick:()=>n(),children:"Zavřít"}),e.jsx(W,{variant:"contained",type:"submit",children:"Odebrat"})]})]})}function ge({offer:a,isFavorite:o=!1,onToggleFavorite:n,isWatched:i=!1,watchOfferId:d,onWatchCreated:b,onRequestRemoveWatch:y}){var Y;const{data:h,createdAt:_}=a,k=((Y=h.imageUrls)==null?void 0:Y[0])||"/image_placeholder.png",E=He(h.price),C=h.url?Be(h.url):null,T=Ze(_),O=$e(h),P=Je(),g=Xe(),[j,v]=r.useState(!1),[V,A]=r.useState(!1),[L,H]=r.useState(!1),[S,z]=r.useState(!1),[B,M]=r.useState(ce.MAX_WATCH_OFFERS),Z=()=>{A(!0)},I=()=>{A(!1)},$=()=>{H(!0)},se=()=>{H(!1)},Q=m=>{switch(m.errorCode){case"email-not-verified":Z();break;case"max-watch-offers-reached":M(ce.MAX_WATCH_OFFERS),$();break;default:throw D(m.errorMessage,"error"),new Error(m.errorMessage)}},G=async()=>{var m;if(!j){if(!P){D("Pro sledování nabídky se musíte nejdříve přihlásit.","info"),g("/prihlasit");return}v(!0);try{const{data:w}=await Ge.post("/api/watch-offers",{offerId:a._id,offerUrl:h.url});w.watchOfferId?(D("Sledování nabídky úspěšně nastaveno.","success"),b==null||b(a._id,w.watchOfferId)):w.errorMessage&&Q(w)}catch(w){const t=(m=w==null?void 0:w.response)==null?void 0:m.data;if(t!=null&&t.errorMessage){Q(t);return}D("Chyba při vytváření sledování nabídky. Zkuste to prosím znovu.","error")}finally{v(!1)}}},K=m=>{if(m.preventDefault(),m.stopPropagation(),i){d&&y&&y(d);return}z(!0)},oe=m=>{m.preventDefault(),m.stopPropagation(),n==null||n(a._id)};return e.jsxs(f,{component:"a",href:h.url,target:"_blank",rel:"noopener noreferrer",sx:{dis
1play:"flex",flexDirection:"column",textDecoration:"none",transition:"transform 0.2s",position:"relative","&:hover":{transform:"translateY(-2px)"}},children:[e.jsxs(f,{sx:{position:"absolute",top:8,right:8,display:"flex",gap:1,zIndex:1},children:[e.jsx(he,{title:i?"Zrušit hlídání nabídky":"Hlídat nabídku",children:e.jsx("span",{children:e.jsx(ne,{"aria-label":i?"Zrušit hlídání nabídky":"Hlídat nabídku",size:"small",onClick:K,disabled:j,sx:{bgcolor:"background.paper",boxShadow:1,color:i||j?"warning.main":"text.secondary","&:hover":{bgcolor:"background.paper",color:"warning.main"}},children:j?e.jsx(et,{size:16}):e.jsx(ht,{fontSize:"small"})})})}),e.jsx(he,{title:o?"Odebrat z oblíbených":"Přidat do oblíbených",children:e.jsx("span",{children:e.jsxs(ne,{"aria-label":o?"Odebrat z oblíbených":"Přidat do oblíbených",size:"small",onClick:oe,sx:{bgcolor:"background.paper",boxShadow:1,"&:hover":{bgcolor:"background.paper",color:"error.main"},color:o?"error.main":"text.secondary","& .favorite-filled":{display:o?"block":"none"},"& .favorite-outline":{display:o?"none":"block"},"&:hover .favorite-filled":{display:"block"},"&:hover .favorite-outline":{display:"none"}},children:[e.jsx(Fe,{fontSize:"small",className:"favorite-filled"}),e.jsx(ct,{fontSize:"small",className:"favorite-outline"})]})})})]}),e.jsxs(f,{sx:{position:"relative",mb:1.5},children:[e.jsx(lt,{component:"img",image:k,alt:h.title,loading:"lazy",sx:{width:"100%",aspectRatio:"4 / 3",objectFit:"cover",borderRadius:2,display:"block"},onError:m=>{m.currentTarget.src="/image_placeholder.png"}}),C&&e.jsx(U,{label:C,size:"small",sx:{position:"absolute",bottom:8,left:8,bgcolor:"rgba(0,0,0,0.55)",color:"white",fontSize:"0.625rem",fontWeight:400,height:"auto",py:.25,pointerEvents:"none","& .MuiChip-label":{px:1}}})]}),e.jsx(x,{variant:"h6",component:"h3",sx:{fontSize:"0.875rem",fontWeight:400,lineHeight:1.4,mb:.5,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",color:"text.secondary"},children:O}),(h==null?void 0:h.address)&&e.jsx(x,{variant:"body2",color:"text.secondary",sx:{fontSize:"0.875rem",fontWeight:400,mb:.5},children:h.address}),h.price!=null&&e.jsxs(x,{variant:"body1",sx:{fontWeight:700,fontSize:"0.875rem",color:"text.primary",mb:.5},children:[E," Kč"]}),e.jsx(f,{sx:{display:"flex",justifyContent:"flex-start"},children:e.jsx(U,{label:T,size:"small",sx:{fontSize:"0.625rem",fontWeight:400,height:"auto",width:"fit-content",py:.25}})}),e.jsx(Ke,{open:V,handleClose:I}),e.jsx(Ye,{reason:B,open:L,handleClose:se}),e.jsxs(je,{open:S,onClose:()=>z(!1),"aria-labelledby":"watch-offer-confirm-title",children:[e.jsx(we,{id:"watch-offer-confirm-title",children:"Opravdu chcete začít hlídat tuto nabídku?"}),e.jsx(Ce,{children:e.jsxs(x,{variant:"body2",color:"text.secondary",children:["Pokud se změní ",e.jsx("b",{children:"cena"})," této nabídky nebo bude tato nabídka ",e.jsx("b",{children:"odstraněna"}),", okamžitě vám pošleme upozornění na váš email."]})}),e.jsxs(ke,{children:[e.jsx(W,{variant:"text",onClick:()=>z(!1),children:"Zrušit"}),e.jsx(W,{variant:"contained",onClick:()=>{z(!1),G()},children:"Hlídat nabídku"})]})]})]})}const mt="/api/favourite-offers",pt="/api/favourite-offers/add",ut="/api/watch-offers",xt=a=>{if(!a)return null;const o=Me({from:a.from??"",to:a.to??""},"Kč");return o==="neomezeno"?null:o},bt=a=>{if(!a)return null;const o=Me({from:a.from??"",to:a.to??""},"Kč/m²");return o==="neomezeno"?null:o},ve=a=>{var d,b;const o=((d=Se[a==null?void 0:a.type])==null?void 0:d.title)||"Nemovitost",n=Qe[a==null?void 0:a.offerType]||"Hledání",i=((b=a==null?void 0:a.location)==null?void 0:b.description)||"Lokalita";return`${o}, ${n}, ${i}`},ye=[{value:"all",label:"Všechny"},{value:"favorite",label:"Oblíbené",icon:Fe},{value:"watched",label:"Hlídané",icon:dt}],Jt=()=>[{title:"Přehled nabídek z hlídacích psů | Realitní pes"},{name:"description",content:"Zobrazte si všechny nabídky, které jste obdrželi od svých hlídacích psů na jednom místě."}];async function gt(a){const o=await fetch("/api/watch-dogs/offers/feed");if(Oe(o,a),!o.ok)throw new Response("Nepodařilo se načíst nabídky",{status:o.status,statusText:o.statusText});return await o.json()}async function vt(){let a=[];try{const o=await fetch(mt);if(o.ok){const n=await o.json();Array.isArray(n)&&(a=n.filter(i=>typeof i=="string"))}}catch{a=[]}return a}
1async function yt(a){const o=await fetch(ut);if(Oe(o,a),!o.ok)throw new Response("Nepodařilo se načíst hlídané nabídky",{status:o.status,statusText:o.statusText});return await o.json()}async function Xt({request:a}){const o=Le(a),[n,i,d]=await Promise.all([gt(o),vt(),yt(o)]);return{watchDogsWithOffers:n,favoriteOfferIds:i,watchOffers:d}}function qt(){const{watchDogsWithOffers:a,favoriteOfferIds:o,watchOffers:n}=qe(),[i,d]=r.useState(o??[]),[b,y]=r.useState(n??[]),[h,_]=r.useState(!1),[k,E]=r.useState(""),[C,T]=r.useState(!1),[O,P]=r.useState(""),[g,j]=r.useState(["all"]),[v,V]=r.useState([]),A=a.length>0,L=r.useCallback(t=>{d(s=>{if(s.includes(t))return E(t),_(!0),s;const c=[...s,t],p=pt;return(async()=>{try{if(!(await fetch(p,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({offerId:t})})).ok)throw new Error("Chyba při ukládání oblíbené nabídky")}catch{d(F=>F.filter(R=>R!==t))}})(),c})},[]),H=r.useCallback(t=>{if(_(!1),!t)return;const{isSuccess:s,error:l}=t;if(s){D("Nabídka byla odebrána z oblíbených.","success"),d(c=>c.filter(p=>p!==k));return}D(l||"Chyba při odebrání z oblíbených.","error")},[k]),S=r.useMemo(()=>new Map(b.map(t=>[t.offerId,t])),[b]),z=r.useMemo(()=>a.map(t=>({id:t.watchDogId,label:ve(t.watchDogQuery)})),[a]),B=r.useMemo(()=>{const t=new Map;return a.forEach(s=>{s.offers.forEach(l=>{const c=t.get(l._id);if(!c){t.set(l._id,{offer:l,watchDogIds:[s.watchDogId]});return}c.watchDogIds.includes(s.watchDogId)||c.watchDogIds.push(s.watchDogId)})}),t},[a]),M=r.useMemo(()=>Array.from(B.values()).sort((t,s)=>{const l=t.offer.createdAt?new Date(t.offer.createdAt).getTime():0;return(s.offer.createdAt?new Date(s.offer.createdAt).getTime():0)-l}),[B]),Z=M.length>0,I=r.useMemo(()=>{const t=g.includes("all"),s=g.includes("favorite"),l=g.includes("watched");return M.filter(({offer:c,watchDogIds:p})=>{const F=i.includes(c._id),R=S.has(c._id),J=t||s&&F||l&&R,X=v.length===0||p.some(q=>v.includes(q));return J&&X})},[M,g,i,S,v]),$=r.useMemo(()=>new Set(I.map(({offer:t})=>t._id)),[I]),se=r.useMemo(()=>{const t=new Map;return a.forEach(s=>{t.set(s.watchDogId,[])}),M.forEach(({offer:s,watchDogIds:l})=>{$.has(s._id)&&l.forEach(c=>{const p=t.get(c);p&&p.push(s)})}),t},[M,$,a]),Q=v.length>0||g.length!==1||g[0]!=="all",G=r.useCallback((t,s)=>{y(l=>{const c=l.filter(p=>p.offerId!==t);return[{_id:s,offerId:t,createdAt:new Date().toISOString()},...c]})},[]),K=r.useCallback(t=>{P(t),T(!0)},[]),oe=r.useCallback(t=>{const s=t.target.value;if(s.length===0){j(["all"]);return}if(s.includes("all")&&s.length>1){if(g.includes("all")){j(s.filter(l=>l!=="all"));return}j(["all"]);return}j(s)},[g]),Y=r.useCallback(t=>{V(t.target.value)},[]),m=r.useCallback(()=>{j(["all"]),V([])},[]),w=r.useCallback(t=>{if(T(!1),!t)return;const{isSuccess:s,error:l}=t;if(s){D("Sledování nabídky bylo úspěšně smazáno.","success"),y(c=>c.filter(p=>p._id!==O));return}D(l||"Chyba při mazání sledování nabídky.","error")},[O]);return e.jsxs(e.Fragment,{children:[e.jsx(De,{}),e.jsxs(f,{sx:{bgcolor:"background.default",minHeight:"100vh"},children:[e.jsxs(ze,{sx:{pt:{xs:12,md:16,lg:18},pb:{xs:8,sm:12}},children:[e.jsx(x,{component:"h1",variant:"h3",sx:{fontWeight:700,mb:1,color:"text.primary",textAlign:"left"},children:"Přehled nabídek z hlídacích psů"}),e.jsx(x,{variant:"body1",color:"text.secondary",sx:{mb:4,textAlign:"left"},children:"Nabídky, které vyčmuchali vaši hlídací psi"}),!A&&e.jsxs(f,{sx:{p:4,textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[e.jsx(x,{component:"p",variant:"h5",children:"Nemáte žádné hlídací psy. Vytvořte si prvního a nechte si hlídat nové nabídky."}),e.jsx("img",{src:"/img/watch-dogs/watch-dogs-empty.webp",alt:"Žádný hlídací pes",width:"300",height:"300"})]}),A&&!Z&&e.jsxs(f,{sx:{p:4,textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[e.jsx(x,{component:"p",variant:"h5",children:"Zatím jste neobdrželi žádné nabídky"}),e.jsx(x,{variant:"body1",color:"text.secondary",children:"Jakmile se objeví nová nabídka odpovídající vašim kritériím, dostanete e-mail a nabídka se zobrazí zde."}),e.jsx("img",{src:"/img/watch-dogs/watch-dogs-empty.webp",alt:"Žádné nabídky",width:"300",height:"300"})]}),Z&&e.jsxs(f,{children:[e.jsxs(f,{sx:{mb:3,display:"flex",justifyContent:"flex-end",alignItems:"center",gap:2,flexWrap:"wrap",flexDirection:{xs:"column",sm:"row"}},children:[e.jsxs(fe,{size:"small",sx:{minWidth:{sm:220},width:{xs:"100%",sm:"auto"},order:{xs:1,sm:2}},children:[e.jsx(me,{id:"offer-filter-label",children:"Filtr nabídky"}),e.jsx(pe,{labelId:"offer-filter-label",multiple:!0,value:g,onChange:oe,input:e.jsx(ue,{label:"Filtr nabídky"}),renderValue:t=>{const s=t;return e.jsx(f,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:s.map(l=>{var c;return e.jsx(U,{label:(c=ye.find(p=>p.value===l))==null?void 0:c.label,size:"small"},l)})})},children:ye.map(t=>e.jsxs(re,{value:t.value,children:[e.jsx(xe,{checked:g.includes(t.value)}
1),t.icon&&e.jsx(f,{component:"span",sx:{display:"inline-flex",alignItems:"center",mr:1,color:t.value==="favorite"?"error.main":t.value==="watched"?"warning.main":"text.secondary"},children:e.jsx(t.icon,{fontSize:"small"})}),e.jsx(be,{primary:t.label})]},t.value))})]}),e.jsxs(fe,{size:"small",sx:{minWidth:{sm:260},width:{xs:"100%",sm:"auto"},order:{xs:2,sm:3}},children:[e.jsx(me,{id:"watch-dog-filter-label",shrink:!0,children:"Hlídací psi"}),e.jsxs(pe,{labelId:"watch-dog-filter-label",multiple:!0,displayEmpty:!0,value:v,onChange:Y,input:e.jsx(ue,{label:"Hlídací psi"}),renderValue:t=>{const s=t;return s.length===0?e.jsx(f,{component:"span",sx:{color:"text.secondary"},children:"Všichni hlídací psi"}):s.length===1?"1 hlídací pes":s.length>=2&&s.length<=4?`${s.length} hlídací psi`:`${s.length} hlídacích psů`},children:[z.length===0&&e.jsx(re,{disabled:!0,children:"Žádní hlídací psi"}),z.map(t=>e.jsxs(re,{value:t.id,children:[e.jsx(xe,{checked:v.includes(t.id)}),e.jsx(be,{primary:t.label})]},t.id))]})]}),Q&&e.jsx(W,{variant:"text",size:"small",onClick:m,sx:{width:{xs:"100%",sm:"auto"},order:{xs:3,sm:1}},children:"Vyčistit filtry"})]}),e.jsx(f,{sx:{mb:2,display:"flex",justifyContent:"flex-end"},children:e.jsxs(x,{variant:"body2",color:"text.secondary",children:["Zobrazeno ",I.length," z"," ",M.length]})}),I.length===0?e.jsxs(f,{sx:{p:4,textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[e.jsx(x,{component:"p",variant:"h5",children:"Žádné nabídky neodpovídají filtrům"}),e.jsx(x,{variant:"body1",color:"text.secondary",children:"Zkuste rozšířit výběr nebo vyčistit filtry."}),e.jsx(W,{variant:"outlined",onClick:m,children:"Vyčistit filtry"})]}):e.jsx(e.Fragment,{children:v.length>0?v.map(t=>{var R,J,X,q;const s=a.find(u=>u.watchDogId===t);if(!s)return null;const l=se.get(t)??[],c=xt((R=s.watchDogQuery)==null?void 0:R.price),p=bt((J=s.watchDogQuery)==null?void 0:J.pricePerM2),F=[{label:void 0,value:c},{label:void 0,value:p}].filter(u=>u.value);return e.jsxs(f,{sx:{mb:4},children:[e.jsxs(f,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1,mb:F.length>0?1.5:2},children:[e.jsx(x,{variant:"h5",component:"h3",sx:{fontWeight:600,color:"text.primary"},children:ve(s.watchDogQuery)}),e.jsx(ne,{color:"primary",component:de,to:`/hlidaci-pes/${t}`,sx:{display:{xs:"none",sm:"inline-flex"}},"aria-label":"Upravit hlídacího psa",children:e.jsx(tt,{color:"secondary"})}),e.jsx(W,{variant:"outlined",component:de,to:`/hlidaci-pes/${t}`,sx:{display:{xs:"inline-flex",sm:"none"},width:"100%"},children:"Upravit"})]}),F.length>0&&e.jsxs(f,{sx:{mt:.5,mb:3,display:"flex",flexWrap:"wrap",gap:1},children:[(q=(X=s.watchDogQuery)==null?void 0:X.subtype)!=null&&q.length?s.watchDogQuery.subtype.map(u=>{var N,ie,le;return e.jsx(U,{label:((le=(ie=Se[(N=s.watchDogQuery)==null?void 0:N.type])==null?void 0:ie.subtypes)==null?void 0:le[u])||u,size:"small"},u)}):null,F.map(u=>e.jsx(U,{size:"small",variant:"outlined",label:u.value},u.value))]}),l.length===0?e.jsx(f,{sx:{p:3,borderRadius:"12px",border:"1px solid",borderColor:"divider",bgcolor:"background.paper"},children:e.jsx(x,{variant:"body2",color:"text.secondary",children:"Tento hlídací pes nemá v tomto výběru žádné nabídky."})}):e.jsx(ee,{container:!0,spacing:3,sx:{mt:.5},children:l.map(u=>{var N;return e.jsx(ee,{item:!0,xs:12,sm:6,md:3,children:e.jsx(ge,{offer:u,isFavorite:i.includes(u._id),onToggleFavorite:L,isWatched:S.has(u._id),watchOfferId:(N=S.get(u._id))==null?void 0:N._id,onWatchCreated:G,onRequestRemoveWatch:K})},u._id)})})]},t)}):e.jsx(ee,{container:!0,spacing:3,children:I.map(({offer:t})=>{var s;return e.jsx(ee,{item:!0,xs:12,sm:6,md:3,children:e.jsx(ge,{offer:t,isFavorite:i.includes(t._id),onToggleFavorite:L,isWatched:S.has(t._id),watchOfferId:(s=S.get(t._id))==null?void 0:s._id,onWatchCreated:G,onRequestRemoveWatch:K})},t._id)})})})]})]}),e.jsx(Ie,{}),e.jsx(ft,{open:h,handleClose:H,offerId:k}),e.jsx(Ve,{open:C,handleClose:w,watchOfferId:O}),e.jsx(We,{})]})]})}export{Xt as clientLoader,qt as default,Jt as meta};

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.