{"version":3,"file":"qbOB8t1-.js","sources":["../../../../src/middleware/validate-property.ts"],"sourcesContent":["import {LISTINGS_SERVICE} from \"~/data/ServicesConstants\";\n\nexport default defineNuxtRouteMiddleware(async (to) => {\n if (import.meta.server) return\n try {\n const axiosRequest = await useNuxtApp().$getApi(LISTINGS_SERVICE)\n const {data} = await axiosRequest.get(`/listings/public/properties/${to.params.slug}`)\n const property = useState('property')\n if (!data) {\n return navigateTo('/404')\n }\n property.value = data\n } catch (error) {\n console.log(error)\n return navigateTo('/404')\n }\n})"],"names":["validateProperty","defineNuxtRouteMiddleware","to","__temp","__restore","axiosRequest","__executeAsync","useNuxtApp","LISTINGS_SERVICE","data","property","useState","navigateTo","error"],"mappings":"uEAGI,MAAwBA,EAAAC,EAAA,MAAAC,GAAA,CAAA,IAAAC,EAAAC,EAEpB,GAAA,CACM,MAAAC,GAAK,CAAAF,EAAAC,CAAA,EAAAE,EAAU,IAAAC,IAAiB,QAA+BC,CAAA,CAAA,EAAAL,EAAU,MAAAA,SACzE,CAAA,KAAAM,OAA8BL,CAAA,EAAAE,EAAA,IAAAD,EAAA,IAAA,+BAAAH,EAAA,OAAA,IAAA,EAAA,CAAA,EAAAC,EAAA,MAAAA,EAAAC,IAAAD,GACzBO,EAAAC,EAAA,UAAA,EACP,GAAA,CAAAF,EACJ,OAAAG,EAAA,MAAA,IAEY,MAAAH,CACZ,OAAAI,EAAiB,CACjB,sBACJD,EAAA,MAAA,CACH"}