PageSourceSearch

https://www.wiim.immo/_nuxt/zB2gRruX.js

js wiim.immo collected 2026-10-09 23:00:53 UTC 7,337 bytes, 1 lines download raw bytes

1import{u as st,s as nt,y as at,i as it,v as lt}from"./hRFt3Tuk.js";import{_ as ct}from"./BUCShxJ9.js";import rt from"./BlUlAP2D.js";import{e as ut,x as pt,C as dt,f as F,o as l,z as _,w as g,b as v,c as m,r as j,a as c,t as p,n as N,d as mt,k as B,F as D,_ as ft,l as y,q as ht,p as T,K as _t}from"./D8644rYh.js";import{f as G,d as K}from"./Dem3fb71.js";import{a as U}from"./Cx9uHq_g.js";import{a as gt}from"./MRLRowXz.js";import{a as vt}from"./pRSGnVRC.js";const yt={key:0,class:"w-[min(280px,calc(100vw-56px))]"},bt={class:"mp-header"},wt={key:0},xt={class:"mp-list"},Pt={class:"mp-row-thumb"},kt={key:1,class:"mp-thumb-empty"},Mt={class:"min-w-0 flex-1"},$t={class:"mp-row-title"},Ct={key:0,class:"block truncate text-[11px] text-grey-text"},Lt={class:"mp-row-meta"},zt={class:"mp-price-sm"},St={class:"mp-thumb aspect-[16/9]"},Ft={key:1,class:"mp-thumb-empty"},Nt={class:"p-2.5"},Bt={class:"mp-title"},Tt={key:0,class:"mp-city"},It={class:"mp-price"},Rt=11,q=.3,Ot=5,At=ut({__name:"CatalogueMap",props:{points:{},hoveredId:{},visible:{type:Boolean},focusPoints:{},initialBbox:{}},emits:["bounds-change","select-lots"],setup(P,{emit:W}){const d=P,I=W,R=pt(),O=gt(),{t:h}=dt();function X(e){return R(U(e.lotSlug))}function b(e){return e.points.reduce((t,n)=>t+(n.lots?.length??n.lotsCount??1),0)}function Y(e){const t=vt(e);return h(t||"catalogue.propertyFallback")}function H(e){const t=e.type||Y(e.asset_type);return e.search_surface!=null?`${t} · ${e.search_surface} m²`:t}function k(e){return e.status??(e.sold?"sold":"available")}function J(e){return e.flatMap(t=>t.lots?.length?t.lots.map(n=>({key:`${t.id}:${n.slug}`,slug:n.slug,label:H(n),propertyName:t.name,coverPath:t.coverPath,price:n.price,status:n.status})):[{key:t.id,slug:t.lotSlug,label:t.name,propertyName:t.name,coverPath:t.coverPath,price:t.startingPrice,status:k(t)}])}function A(e){const t=K(e);return h(t==="sold"?"catalogue.mpSold":t==="reserved"?"catalogue.mpReserved":t==="coming_soon"?"catalogue.mpComingSoon":"catalogue.mpAvailable")}function E(e,t){const n=K(e);return n==="sold"?`mp-${t}-sold`:n==="reserved"?t==="dot"?"mp-dot-reserved":"mp-badge-reserved":n==="coming_soon"?t==="dot"?"mp-dot-soon":"mp-badge-soon":`mp-${t}-avail`}const M=T(5),Q=ht(()=>{const e=M.value<Rt,t=new Map,n=(o,a)=>{const i=t.get(o);i?(i.points.push(a),i.ids.push(a.id)):t.set(o,{key:o,latitude:a.latitude,longitude:a.longitude,points:[a],ids:[a.id]})};if(e){const o=new Map;for(const a of d.points){const i=a.city?`city:${a.city.trim().toLowerCase()}`:`zone:${a.latitude.toFixed(1)},${a.longitude.toFixed(1)}`,f=o.get(i);f?f.push(a):o.set(i,[a])}for(const[a,i]of o){const f=Math.max(...i.map(r=>r.latitude))-Math.min(...i.map(r=>r.latitude)),z=Math.max(...i.map(r=>r.longitude))-Math.min(...i.map(r=>r.longitude)),S=f>q||z>q;for(const r of i)n(S?`${a}:${r.latitude.toFixed(1)},${r.longitude.toFixed(1)}`:a,r)}}else for(const o of d.points)n(`${o.latitude.toFixed(4)},${o.longitude.toFixed(4)}`,o);for(const o of t.values())o.points.length>1&&(o.latitude=o.points.reduce((a,i)=>a+i.latitude,0)/o.points.length,o.longitude=o.points.reduce((a,i)=>a+i.longitude,0)/o.points.length);return[...t.values()]});function tt(e){w();const t=e.points.flatMap(n=>(n.lots??[]).flatMap(o=>o.id?[o.id]:[]));t.length&&I("select-lots",t)}const et=[46.6,2.4],V=T();let $=!1,C;function w(){$=!1,clearTimeout(C)}function x(e){const t=d.focusPoints?.length?d.focusPoints:d.points;if(!e||t.length===0)return;if(w(),t.length===1){e.setView([t[0].latitude,t[0].longitude],13);return}const n=t.map(o=>[o.latitude,o.longitude]);e.fitBounds(n,{padding:[60,60]})}function L(){return V.value?.leafletObject}const Z=T(!1);function ot(e){M.value=e.getZoom(),e.on("zoomend",()=>{M.value=e.getZoom()}),typeof window<"u"&&window.matchMedia("(max-width: 1023px)").matches&&e.zoomControl?.remove();const t=(d.initialBbox??"").split(",").map(Number);t.length===4&&t.every(Number.isFinite)?(Z.value=!0,w(),e.fitBounds([[t[0],t[1]],[t[2],t[3]]])):x(e);const n=e.getContainer();for(const o of["pointerdown","wheel","touchstart","keydown"])n.addEventListener(o,()=>{$=!0},{passive:!0});e.on("moveend",()=>{$&&(clearTimeout(C),C=setTimeout(()=>{const o=e.getBounds();I("bounds-change",`${o.getSouth().toFixed(5)},${o.getWest().toFixed(5)},${o.getNorth().toFixed(5)},${o.getEast().toFixed(5)}`)},350))})}return F(()=>d.points,()=>{if(Z.value)return;const e=L();e&&x(e)}),F(()=>d.focusPoints,e=>{const t=L();t&&e?.length&&x(t)}),F(()=>d.visible,e=>{e&&_t(()=>{const t=L();t&&(w(),t.invalidateSize(),x(t))})}),(e,t)=>{const n=lt,o=nt,a=ct,i=rt,f=ft,z=at,S=st,r=it;return l(),_(r,{ref_key:"mapRef",ref:V,zoom:Ot,center:et,"use-global-leaflet":!1,class:"h-full w-full z-0 lg:rounded-2xl lg:overflow-hidden",onReady:ot},{default:g(()=>[v(n,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"© OpenStreetMap"}),(l(!0),m(D,null,j(Q.value,s=>(l(),_(S,{key:s.key,"lat-lng":[s.latitude,s.longitude],"z-index-offset":s.ids.includes(P.hoveredId||"")?1e3:0,onClick:u=>tt(s)},{default:g(()=>[v(o,{"icon-anchor":[34,16],"icon-size":[68,28],"class-name":"wiim-price-pin"},{default:g(()=>
1[c("div",{class:N(["wiim-price-pin-inner",s.ids.includes(P.hoveredId||"")?"wiim-price-pin-inner--active":""])},p(b(s)>1?e.$t("catalogue.pinMulti",{count:b(s)}):e.$t("catalogue.pinSingle")),3)]),_:2},1024),v(z,{class:"wiim-map-popup",options:{maxWidth:320,autoPanPaddingTopLeft:[16,88],autoPanPaddingBottomRight:[16,96]}},{default:g(()=>[b(s)>1?(l(),m("div",yt,[c("p",bt,[mt(p(e.$t("catalogue.pinMulti",{count:b(s)})),1),s.points[0].city?(l(),m("span",wt," · "+p(s.points[0].city),1)):B("",!0)]),c("div",xt,[(l(!0),m(D,null,j(J(s.points),u=>(l(),_(f,{key:u.key,to:y(R)(y(U)(u.slug)),class:"mp-row"},{default:g(()=>[c("span",Pt,[u.coverPath?(l(),_(a,{key:0,src:y(O)(u.coverPath),alt:u.propertyName,loading:"lazy",width:"52",height:"52",fit:"cover",class:"w-full h-full object-cover"},null,8,["src","alt"])):(l(),m("span",kt,[v(i,{name:"solar:buildings-2-linear",class:"h-4 w-4"})]))]),c("span",Mt,[c("span",$t,p(u.label),1),s.points.length>1?(l(),m("span",Ct,p(u.propertyName),1)):B("",!0),c("span",Lt,[c("span",zt,p(u.price!=null?("formatPrice"in e?e.formatPrice:y(G))(u.price):e.$t("catalogue.priceOnRequest")),1),c("span",{class:N(["mp-dot",E(u.status,"dot")])},p(A(u.status)),3)])]),v(i,{name:"solar:alt-arrow-right-linear",class:"h-4 w-4 text-grey-text shrink-0 self-center"})]),_:2},1032,["to"]))),128))])])):(l(),_(f,{key:1,to:X(s.points[0]),class:"mp-card block w-[min(260px,calc(100vw-56px))]"},{default:g(()=>[c("div",St,[s.points[0].coverPath?(l(),_(a,{key:0,src:y(O)(s.points[0].coverPath),alt:s.points[0].name,loading:"lazy",width:"260",height:"146",fit:"cover",class:"w-full h-full object-cover"},null,8,["src","alt"])):(l(),m("span",Ft,[v(i,{name:"solar:buildings-2-linear",class:"h-7 w-7"})])),c("span",{class:N(["mp-badge",E(k(s.points[0]),"badge")])},p(A(k(s.points[0]))),3)]),c("div",Nt,[c("p",Bt,p(s.points[0].name),1),s.points[0].city?(l(),m("p",Tt,p(s.points[0].city),1)):B("",!0),c("p",It,p(s.points[0].startingPrice!=null?("formatPrice"in e?e.formatPrice:y(G))(s.points[0].startingPrice):e.$t("catalogue.priceOnRequest")),1)])]),_:2},1032,["to"]))]),_:2},1024)]),_:2},1032,["lat-lng","z-index-offset","onClick"]))),128))]),_:1},512)}}}),qt=Object.assign(At,{__name:"CatalogueMap"});export{qt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.