PageSourceSearch

https://leipzig-home-navigator.lovable.app/assets/immobilien._slug-CVpqhT_J.js

js leipzig-home-navigator.lovable.app collected 2026-10-03 03:36:48 UTC 16,486 bytes, 1 lines download raw bytes

vendor: 12,580 bytes, line 1
1import{u as Y,r as p,i as A,S as q,p as H,a as u,s as I,b as j,n as T,e as P,c as W,t as ee,d as k,f as te,g as se,h as $,k as G,l as J,m as re,R as ie,o as ae,q as ne,j as r,L as _,v as oe}from"./index-DOAaDZHA.js";import{c as O,L as le,M as ce,P as he,d as de}from"./Layout-yTY7hUNj.js";import{F as ue}from"./file-text-E03JmVEs.js";import{C as fe}from"./calendar-Cbn_G2Wo.js";function pe(e){const t=Y();return p.useCallback(async(...i)=>{try{const s=await e(...i);if(A(s))throw s;return s}catch(s){if(A(s))return s.options._fromLocation=t.stores.location.get(),t.navigate(t.resolveRedirect(s).options);throw s}},[t,e])}var me=class extends q{constructor(e,t){super(),this.options=t,this.#s=e,this.#i=null,this.#r=H(),this.bindMethods(),this.setOptions(t)}#s;#e=void 0;#p=void 0;#t=void 0;#n;#h;#r;#i;#m;#d;#u;#o;#l;#a;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),V(this.#e,this.options)?this.#c():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Q(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Q(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#j(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,i=this.#e;if(this.options=this.#s.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof u(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#R(),this.#e.setOptions(this.options),t._defaulted&&!I(this.options,t)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const s=this.hasListeners();s&&Z(this.#e,i,this.options,t)&&this.#c(),this.updateResult(),s&&(this.#e!==i||u(this.options.enabled,this.#e)!==u(t.enabled,this.#e)||j(this.options.staleTime,this.#e)!==j(t.staleTime,this.#e))&&this.#g();const a=this.#x();s&&(this.#e!==i||u(this.options.enabled,this.#e)!==u(t.enabled,this.#e)||a!==this.#a)&&this.#b(a)}getOptimisticResult(e){const t=this.#s.getQueryCache().build(this.#s,e),i=this.createResult(t,e);return xe(this,i)&&(this.#t=i,this.#h=this.options,this.#n=this.#e.state),i}getCurrentResult(){return this.#t}trackResult(e,t){return new Proxy(e,{get:(i,s)=>(this.trackProp(s),t?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#r.status==="pending"&&this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,s))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#s.defaultQueryOptions(e),i=this.#s.getQueryCache().build(this.#s,t);return i.fetch().then(()=>this.createResult(i,t))}fetch(e){return this.#c({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#t))}#c(e){this.#R();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(T)),t}#g(){this.#y();const e=j(this.options.staleTime,this.#e);if(P.isServer()||this.#t.isStale||!W(e))return;const i=ee(this.#t.dataUpdatedAt,e)+1;this.#o=k.setTimeout(()=>{this.#t.isStale||this.updateResult()},i)}#x(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#b(e){this.#j(),this.#a=e,!(P.isServer()||u(this.options.enabled,this.#e)===!1||!W(this.#a)||this.#a===0)&&(this.#l=k.setInterval(()=>{(this.options.refetchIntervalInBackground||te.isFocused())&&this.#c()},this.#a))}#v(){this.#g(),this.#b(this.#x())}#y(){this.#o!==void 0&&(k.clearTimeout(this.#o),this.#o=void 0)}#j(){this.#l!==void 0&&(k.clearInterval(this.#l),this.#l=void 0)}createResult(e,t){const i=this.#e,s=this.options,a=this.#t,h=this.#n,n=this.#h,b=e!==i?e.state:this.#p,{state:c}=e;let o={...c},v=!1,l;if(t._optimisticResults){const d=this.hasListeners(),y=!d&&V(e,t),N=d&&Z(e,i,t,s);(y||N)&&(o={...o,...se(c.data,e.options)}),t._optimisticResults==="isRestoring"&&(o.fetchStatus="idle")}let{error:R,errorUpdatedAt:F,status:g}=o;l=o.data;let U=!1;if(t.placeholderData!==void 0&&l===void 0&&g==="pending"){let d;a?.isPlaceholderData&&t.placeholderData===n?.placeholderData?(d=a.data,U=!0):d=typeof t.placeholderData=="function"?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,d!==void 0&&(g="success",l=$(a?.data,d,t),v=!0)}if(t.select&&l!==void 0&&!U)if(a&&l===h?.data&&t.select===this.#m)l=this.#d;else try{this.#m=t.select,l=t.select(l),l=$(a?.data,l,t),this.#d=l,this.#i=null}catch(d){this.#i=d}this.#i&&(R=this.#i,l=this.#d,F=Date.now(),g="error");const E=o.fetchStatus==="fetching",C=g==="pending",M=g==="error",L=C&&E,B=l!==void 0,m={status:g,fetchStatus:o.fetchStatus,isPending:C,isSuccess:g==="success",isError:M,isInitialLoading:L,isLoading:L,data:l,dataUpdatedAt:o.dataUpdatedAt,error:R,errorUpdatedAt:F,failureCount:o.fetchFailureCount,failureReason:o.fetchFailureReason,errorUpdateCount:o.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:o.dataUpdateCount>b.dataUpdateCount||o.errorUpdateCount>b.errorUpdateCount,isFetching:E,isRefetching:E&&!C,isLoadingError:M&&!B,isPaused:o.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:M&&B,isStale:D(e,t),refetch:this.refetch,promise:this.#r,isEnabled:u(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const d=m.data!==void 0,y=m.status==="error"&&!d,N=S=>{y?S.reject(m.error):d&&S.resolve(m.data)},z=()=>{const S=this.#r=m.promise=H();N(S)},w=this.#r;switch(w.status){case"pending":e.queryHash===i.queryHash&&N(w);break;case"fulfilled":(y||m.data!==w.value)&&z();break;case"rejected":(!y||m.error!==w.reason)&&z();break}}return m}updateResult(){const e=this.#t,t=this.createResult(this.#e,this.options);if(this.#n=this.#e.state,this.#h=this.options,this.#n.data!==void 0&&(this.#u=this.#e),I(t,e))return;this.#t=t;const i=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!this.#f.size)return!0;const h=new Set(a??this.#f);return this.options.throwOnError&&h.add("error"),Object.keys(this.#t).some(n=>{const f=n;return this.#t[f]!==e[f]&&h.has(f)})};this.#N({listeners:i()})}#R(){const e=this.#s.getQueryCache().build(this.#s,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#p=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#N(e){G.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#t)}),this.#s.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function ge(e,t){return u(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&u(t.retryOnMount,e)===!1)}function V(e,t){return ge(e,t)||e.state.data!==void 0&&Q(e,t,t.refetchOnMount)}function Q(e,t,i){if(u(t.enabled,e)!==!1&&j(t.staleTime,e)!=="static"){const s=typeof i=="function"?i(e):i;return s==="always"||s!==!1&&D(e,t)}return!1}function Z(e,t,i,s){return(e!==t||u(s.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&D(e,i)}function D(e,t){return u(t.enabled,e)!==!1&&e.isStaleByTime(j(t.staleTime,e))}function xe(e,t){return!I(e.getCurrentResult(),t)}var X=p.createContext(!1),be=()=>p.useContext(X);X.Provider;function ve(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ye=p.createContext(ve()),je=()=>p.useContext(ye),Re=(e,t,i)=>{const s=i?.state.error&&typeof e.throwOnError=="function"?J(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},Ne=e=>{p.useEffect(()=>{e.clearReset()},[e])},we=({result:e,errorResetBoundary:t,throwOnError:i,query:s,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(a&&e.data===void 0||J(i,[e.error,s])),Se=e=>{if(e.suspense){const i=a=>a==="static"?a:Math.max(a??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...a)=>i(s(...a)):i(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},ke=(e,t)=>e.isLoading&&e.isFetching&&!t,Oe=(e,t)=>e?.suspense&&t.isPending,K=(e,t,i)=>t.fetchOptimistic(e).catch(()=>{i.clearReset()});function Ee(e,t,i){const s=be(),a=je(),h=re(),n=h.defaultQueryOptions(e);h.getDefaultOptions().queries?._experimental_beforeQuery?.(n);const f=h.getQueryCache().get(n.queryHash);n._optimisticResults=s?"isRestoring":"optimistic",Se(n),Re(n,a,f),Ne(a);const b=!h.getQueryCache().get(n.queryHash),[c]=p.useState(()=>new t(h,n)),o=c.getOptimisticResult(n),v=!s&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(l=>{const R=v?c.subscribe(G.batchCalls(l)):T;return c.updateResult(),R},[c,v]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setOptions(n)},[n,c]),Oe(n,o))throw K(n,c,a);if(we({result:o,errorResetBoundary:a,throwOnError:n.throwOnError,query:f,suspense:n.suspense}))throw o.error;return h.getDefaultOptions().queries?._experimental_afterQuery?.(n,o),n.experimental_prefetchInRender&&!P.isServer()&&ke(o,s)&&(b?K(n,c,a):f?.promise)?.catch(T).finally(()=>{c.updateResult()}),n.notifyOnChangeProps?o:c.trackResult(o)}function Ce(e,t){return Ee(e,me)}const Me=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],_e=O("arrow-left",Me);const Ie=[["path",{d:"M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8",key:"1k78r4"}],["path",{d:"M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4",key:"fb3tl2"}],["path",{d:"M12 4v6",key:"1dcgq2"}],["path",{d:"M2 18h20",key:"ajqnye"}]],Te=O("bed-double",Ie);const Pe=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Qe=O("download",Pe);const De=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],Fe=O("maximize",De),Ue=new Intl.NumberFormat("de-DE");function We(){const{slug:e}=ie.useParams(),t=ae(e),i=pe(oe),{data:s,isLoading:a,error:h}=Ce({queryKey:["propstack","property",t],queryFn:()=>i({data:{id:t}}),staleTime:5*6e4});if(h)throw ne();return r.jsx(le,{children:r.jsxs("section",{className:"container-page py-10 lg:py-14",children:[r.jsxs(_,{to:"/immobilien",className:"inline-flex items-center gap-2 text-sm font-semibold text-muted-foreground hover:text-foreground",children:[r.jsx(_e,{className:"h-4 w-4"})," Zurück zur Übersicht"]}),a?r.jsxs("div",{className:"mt-8 space-y-6",children:[r.jsx("div",{className:"aspect-[16/9] w-full rounded-3xl bg-secondary animate-pulse"}),r.jsx("div",{className:"h-8 w-2/3 bg-secondary rounded animate-pulse"}),r.jsx("div",{className:"h-4 w-1/2 bg-secondary rounded animate-pulse"})]}):s?r.jsxs("article",{className:"mt-8",children:[r.jsxs("div",{className:"grid lg:grid-cols-[1.6fr_1fr] gap-8 lg:gap-12 items-start",children:[r.jsxs("div",{children:[r.jsxs("p",{className:"text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground inline-flex items-center gap-1.5",children:[r.jsx(ce,{className:"h-3.5 w-3.5"})," ",s.location]}),r.jsx("h1",{className:"mt-3 text-3xl lg:text-5xl font-bold tracking-tight text-balance",children:s.title}),r.jsxs("div",{className:"mt-6 flex flex-wrap gap-6 text-sm",children:[r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(Fe,{className:"h-4 w-4"})," ",s.area," m²"]}),r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(Te,{className:"h-4 w-4"})," ",s.rooms," Zimmer"]}),r.jsx("span",{className:"rounded-full bg-secondary px-3 py-1 text-xs font-semibold",children:s.type})]})]}),r.jsxs("aside",{className:"rounded-3xl bg-card border border-border p-6 lg:p-8 shadow-elevated",children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground",children:"Kaufpreis"}),r.jsx("p",{className:"mt-2 text-3xl font-bold text-primary",children:s.price>0?`${Ue.format(s.price)} €`:"Preis auf Anfrage"}),r.jsxs("div",{className:"mt-6 grid gap-2",children:[r.jsxs("a",{href:"tel:+4934198985970",className:"inline-flex items-center justify-center gap-2 rounded-full bg-foreground text-background px-5 py-3 text-sm font-semibold hover:opacity-90",children:[r.jsx(he,{className:"h-4 w-4"})," Besichtigung anfragen"]}),r.jsxs("a",{href:"https://wa.me/4934198985970",target:"_blank",rel:"noreferrer",className:"inline-flex items-center justify-center gap-2 rounded-full border border-foreground
1/15 px-5 py-3 text-sm font-semibold hover:bg-secondary",children:[r.jsx(de,{className:"h-4 w-4"})," WhatsApp"]}),s.exposeUrl&&r.jsxs("a",{href:s.exposeUrl,target:"_blank",rel:"noreferrer",className:"inline-flex items-center justify-center gap-2 rounded-full border border-foreground/15 px-5 py-3 text-sm font-semibold hover:bg-secondary",children:[r.jsx(Qe,{className:"h-4 w-4"})," Exposé (PDF)"]})]})]})]}),s.images.length>0&&r.jsxs("div",{className:"mt-10 grid gap-3 md:grid-cols-[2fr_1fr]",children:[r.jsx("img",{src:s.images[0].url,alt:s.images[0].alt??s.title,className:"w-full aspect-[4/3] object-cover rounded-3xl"}),r.jsx("div",{className:"grid gap-3",children:s.images.slice(1,3).map((n,f)=>r.jsx("img",{src:n.url,alt:n.alt??s.title,className:"w-full aspect-[4/3] object-cover rounded-3xl"},f))})]}),r.jsxs("div",{className:"mt-12 grid lg:grid-cols-[1.6fr_1fr] gap-10",children:[r.jsxs("div",{className:"space-y-6",children:[r.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Objektbeschreibung"}),r.jsx("p",{className:"text-base leading-relaxed text-muted-foreground whitespace-pre-line",children:s.description||"Detaillierte Beschreibung folgt – kontaktieren Sie uns für ausführliche Informationen."}),s.features.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("h3",{className:"text-xl font-bold tracking-tight pt-4",children:"Ausstattung"}),r.jsx("ul",{className:"grid sm:grid-cols-2 gap-2 text-sm",children:s.features.map(n=>r.jsxs("li",{className:"flex items-start gap-2",children:[r.jsx("span",{className:"mt-2 h-1 w-1 rounded-full bg-foreground
1/40"}),n]},n))})]})]}),r.jsxs("aside",{className:"space-y-4",children:[r.jsxs("div",{className:"rounded-3xl bg-card border border-border p-6",children:[r.jsxs("h3",{className:"text-sm font-bold inline-flex items-center gap-2",children:[r.jsx(ue,{className:"h-4 w-4"})," Eckdaten"]}),r.jsxs("dl",{className:"mt-4 space-y-2.5 text-sm",children:[r.jsx(x,{label:"Wohnfläche",value:`${s.area} m²`}),r.jsx(x,{label:"Zimmer",value:String(s.rooms)}),r.jsx(x,{label:"Objektart",value:s.type}),s.energy?.yearBuilt&&r.jsx(x,{label:"Baujahr",value:String(s.energy.yearBuilt)}),s.energy?.class&&r.jsx(x,{label:"Energieeffizienzklasse",value:s.energy.class}),s.energy?.consumption&&r.jsx(x,{label:"Energieverbrauch",value:`${s.energy.consumption} kWh/(m²·a)`}),s.address?.zip&&r.jsx(x,{label:"PLZ",value:`${s.address.zip} ${s.address.city??""}`.trim()})]})]}),r.jsxs("div",{className:"rounded-3xl bg-primary-soft p-6",children:[r.jsxs("h3",{className:"text-sm font-bold inline-flex items-center gap-2",children:[r.jsx(fe,{className:"h-4 w-4"})," Besichtigungstermin"]}),r.jsx("p",{className:"mt-2 text-sm text-foreground/75",children:"Wir nehmen uns Zeit für Sie – persönlich vor Ort oder digital."}),r.jsx(_,{to:"/kontakt",className:"mt-4 inline-flex items-center gap-2 rounded-full bg-foreground text-background px-4 py-2.5 text-sm font-semibold hover:opacity-90",children:"Termin anfragen"})]})]})]})]}):r.jsxs("div",{className:"mt-12 rounded-3xl border border-dashed border-border p-12 text-center max-w-xl mx-auto",children:[r.jsx("h1",{className:"text-2xl font-bold",children:"Objekt nicht verfügbar"}),r.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:"Dieses Objekt ist derzeit nicht abrufbar oder die Anbindung an Propstack ist noch nicht aktiv. Bitte kontaktieren Sie uns für Details."}),r.jsx(_,{to:"/kontakt",className:"mt-6 inline-flex items-center gap-2 rounded-full bg-foreground text-background px-5 py-3 text-sm font-semibold hover:opacity-90",children:"Kontakt aufnehmen"})]})]})})}function x({label:e,value:t}){return r.jsxs("div",{className:"flex items-center justify-between gap-4 border-b border-border last:border-0 pb-2 last:pb-0",children:[r.jsx("dt",{className:"text-muted-foreground",children:e}),r.jsx("dd",{className:"font-semibold text-right",children:t})]})}export{We as component};

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.