PageSourceSearch

https://www.guide-des-landes.com/modules/annonces/scripts/nearestItems.min.js?v=1789120540

js guide-des-landes.com collected 2026-09-24 10:15:40 UTC 6,762 bytes, 1 lines download raw bytes

1function initTrackingNearestAnnonces(e){e.on("reveal",function(){var e=$(".card-title",this).text().trim(),a=$(this).data("idAnnonce");e+=" - id:"+a,collectStatsAnnonce(a,"vueAutour"),trackEvent("Annonces","Vue (aux alentours)",e,1)}),$(".card-img .bt",e).on("click",function(){var e=$(this).parents(".annonce"),a=$(".card-title",e).text().trim(),e=$(e).data("idAnnonce");a+=" - id:"+e,collectStatsAnnonce(e,"clicAutour"),trackEvent("Annonces","Clic (aux alentours)",a,3)})}function initNearestPlace(e){initTrackingNearestAnnonces(e),$(".card-bt-loc",e).on("click",function(){var e=$(this).parents(".nearestAnnonces-places-item").data("idAnnonce");vueApp.selectMapNearest(e)})}vueNearestAnnonce={data:function(){return{ficheMapActive:!1,nearestCategory:null,nearestMarkers:[],nearestPlaces:[]}},computed:{mapKey:function(){return"undefined"!=typeof mapKey&&mapKey?mapKey:null},mapCenter:function(){return"undefined"!=typeof mapCenter&&mapCenter?mapCenter:[]},mapZoom:function(){return"undefined"!=typeof mapZoom&&mapZoom?mapZoom:9},mapStyle:function(){return"undefined"!=typeof mapStyle&&mapStyle?mapStyle:[]},mapTilesProvider:function(){return"undefined"!=typeof mapTilesProvider&&mapTilesProvider?mapTilesProvider:"osm"},mapBoxApiKey:function(){return"undefined"!=typeof mapBoxApiKey?mapBoxApiKey:null},nearestMarkersCombined:function(){var a=this.nearestMarkers.map(e=>e.tag),n=a.length?Math.max(...a):0,e=[];return(e=this.nearestPlaces?this.nearestPlaces.filter(function(e){return e.id&&-1===a.indexOf(e.id)}).map(function(e){return{id:++n,markerId:n,latLng:e.latLng||null,lat:e.latLng?e.latLng[0]:null,lng:e.latLng?e.latLng[1]:null,data:{idAnnonce:e.id,distance:e.distance||null,libelleFiche:e.titre||null,sousTitre:e.soustitre||null,detail:e.detail||null,image:e.image||null,linkLabel:"Voir la fiche détaillée",urlFiche:e.url||null,free:e.free||null,tags:e.tags||null},tag:e.id}}):e).concat(this.nearestMarkers)}},methods:{activFicheMap:function(){this.nearestCategory||(this.nearestCategory=$(".nearestAnnonces-places-filters-item.active > .bt").data("idFam")),this.$nextTick(function(){this.ficheMapActive=!0})},selectMapNearest:debounce(function(e){this.ficheMapActive||this.activFicheMap(),this.$refs.nearestAnnoncesMap.selectMarkerByTag(e,"idAnnonce")},500),formatNearestInfo:function(e){var a="";for(i in e.tags)a+='<li class="tag"><span class="label">'+e.tags[i]+"</span></li>";return(e.image?e.urlFiche?'<a class="img" style="background-image:url(\''+e.image+'?v=nearestItems\')" href="'+e.urlFiche+'"></a>':'<div class="img" style="background-image:url(\''+e.image+"?v=nearestItems')\"></div>":"")+'<div class="details">'+(a?'<ul class="tags">'+a+"</ul>":"")+'<p class="libelle">'+(e.urlFiche?'<a href="'+e.urlFiche+'">'+e.libelleFiche+"</a>":e.libelleFiche)+"</p>"+(e.sousTitre?'<p class="sousTitre">'+e.sousTitre+"</p>":"")+(e.detail?'<p class="description">'+e.detail+"</p>":"")+(e.distance?'<p class="distance ico-marker">'+e.distance+"</p>":"")+(e.urlFiche?'<a class="link ico-arrow-right-2" href="'+e.urlFiche+'"><span class="lib">'+e.linkLabel+"</span></a>":"")+"</div>"},getNearestMarkers:function(){this.$refs.nearestAnnoncesMap.setLoading(!0);var e=racine+"/modules/annonces/dataLoc.json.php";$.ajax({url:e,data:{LGG:LGG,idCategory:this.nearestCategory,AUTOURDE:this.mapCenter,IDFICHE:"undefined"!=typeof idFiche?idFiche:null},dataType:"json",type:"POST",success:function(e){e.error||(this.nearestMarkers=e.adresses||[])}.bind(this)})},getNearestPlaces:function(){$nearestAnnonces=$(".nearestAnnonces-places"),$nearestAnnonces.addClass("loading");var e=$nearestAnnonces.data("latLng"),d=this;$.ajax({url:racine+"/modules/annonces/@nearestItems.json.php",data:{idFam:this.nearestCategory,LGG:LGG,currentPosition:e,currentAnnonceId:"undefined"!=typeof idFiche?idFiche:null},dataType:"json",success:function(e){var a=$(".nearestAnnonces-places-list",$nearestAnnonces);if(a.children().remove(),e.items){d.nearestPlaces=e.items;var n=e.items;for(i in n){var t=n[i],s=$('<div class="nearestAnnonces-places-item annonce-card-item revealable"></div>');s.data("idAnnonce",t.id),t.titre&&s.append('<h2 class="card-title">'+t.titre+"</h2>");var r,c=t.url?$('<a class="bt" href="'+t.url+'"></a>'):$('<span class="bt"></span>');t.image?(r=$('<img src="'+t.image+'?v=preload" class="loading" alt="" data-src="'+t.image+'?v=nearestItems"/>'),t.title&&r.attr("alt",t.title),c.append(r)):(s.addClass("noPhoto"),t.picto&&(l=$('<i class="card-picto" style="background-image:url(\''+t.picto+"');\"/>"),c.append(l)));var l=$('<div class="card-img"></div>');if(l.append(c),s.append(l),t.tags){var o=$('<ul class="card-tags"></ul>');for(i in t.tags)o.append('<li class="card-tag"><span class="label">'+t.tags[i]+"</span></li>");s.append(o)}t.soustitre&&s.append('<p class="card-subtitle">'+t.soustitre+"</p>"),t.distance&&s.append('<p class="card-distance ico-marker">'+t.distance+"</p>");l=$('<a class="card-bt-loc bouton floating negative ico-locate"></a>');t.btLocTitle&&l.attr("title",t.btLocTitle),s.append(l),a.append(s)}initNearestPlace($(".nearestAnnonces-places-item",a)),a.trigger("scroll")}else d.nearestPlaces=[];d.ficheMapActive&&d.getNearestMarkers(),$nearestAnnonces.removeClass("loading")}})},clearNearestMarkers:function(){this.$refs.nearestAnnoncesMap.clearMarkers()},setNearestCategory:function(e){this.nearestCategory=e},onOpenMarker(e){var a,n;e["@id"]&&(a=e.libelleFiche.trim(),n=e["@id"],a+=" - id:"+n,collectStatsAnnonce(n,"vueAutour"),trackEvent("Annonces","Vue Carte (aux alentours)",a,1)),setTimeout(function(){$(".v-map-info-content .link",this.$refs.nearestAnnoncesMap.$el).on("click",function(){collectStatsAnnonce(n,"clicAutour"),trackEvent("Annonces","Clic Carte (aux alentours)",a,3)})}.bind(this),100)}},watch:{nearestCategory:function(e,a){vueApp.getNearestPlaces(),1!=this.ficheMapActive||this.val||this.clearNearestMarkers()}},mounted:function(){}};var vueAppMixins=vueAppMixins||[];vueAppMixins.push(vueNearestAnnonce),$(function(){$(".nearestAnnonces-map").on("reveal",function(){var e,a=$("img[data-preview]",this),n=a.data("preview");n&&(a.on("load",function(){a.hasClass("imgRevealed")&&a.removeClass("loading")}),(e=Math.ceil(a.width()))?(n+="&size="+e+"x640",a.attr("src",n),a.addClass("imgRevealed")):a.on("load",function(){var e;a.hasClass("imgRevealed")||(e=Math.ceil(a.width()),n+="&size="+e+"x640",a.attr("src",n),a.addClass("imgRevealed"))})),a.on("click",function(){vueApp.activFicheMap()})}),$(".nearestAnnonces-places-filters-item .bt").on("click",function(){var e=$
1(this),a=e.parent();a.hasClass("active")||($(".nearestAnnonces-places-filters-item.active").removeClass("active"),a.addClass("active"),e=e.data("idFam"),vueApp.setNearestCategory(e))}),initNearestPlace($(".nearestAnnonces-places-item"))});

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.