PageSourceSearch

https://www.hesperide.com/js/mapsProvider.js?1790256298

js hesperide.com collected 2026-09-26 10:02:10 UTC 65,343 bytes, 1 lines download raw bytes

1var MapsProviderService={provider:null,config:{},initialLng:new URLSearchParams(window.location.search).get("lng"),initialLat:new URLSearchParams(window.location.search).get("lat"),userLocation:{lat:null,lng:null},selectors:{},initSearchShopPage:function(e=null){var t,o;this.selectors.localityInputSelector&&this.selectors.localityInputId&&this.selectors.storeLocationFormSelector&&this.selectors.storeListItemSelector&&this.selectors.storeListItemClass&&this.selectors.latAttribute&&this.selectors.lngAttribute?(t=document.getElementById(this.selectors.mapId),o=this.provider.getSdkUrl(this.config),$(this.selectors.loaderSelector).css("text-align","center"),"woosmap"!==MapsProviderService.provider.name&&$(this.selectors.storeListSelector).parent().css("overflow-y","scroll"),!this.selectors.mapId||"woosmap"==MapsProviderService.provider.name&&null!=e||MapsProviderService.updateList(),$.ajax({url:o,dataType:"script",success:()=>{var e;t&&this.provider.initSearchShopPage(t),$(this.selectors.localityInputSelector).on("keyup",()=>{this.provider.completeLocalities(this.selectors.localityInputId)}),$(this.selectors.storeLocationFormSelector).attr("onsubmit","").on("submit",e=>{e.preventDefault(),this.provider.completeLocalities(this.selectors.localityInputId),this.provider.gotoLocality(this.selectors.localityInputId)}),$("#"+this.selectors.mapId).on("mousewheel DOMMouseScroll",e=>{1==e.ctrlKey&&this.provider.updateList("mapCenter")}),$(this.selectors.localityInputSelector).on("input",e=>{1<$(this.selectors.localityInputSelector).val().split(",").length&&(e.preventDefault(),this.provider.completeLocalities(this.selectors.localityInputId),this.provider.gotoLocality(this.selectors.localityInputId))}),this.selectors.geolocationButtonSelector&&((e=$(this.selectors.geolocationButtonSelector)).attr("onclick","").on("click",e=>{e.preventDefault(),this.locateUser()}),e.is(":visible")&&e.trigger("click")),null!==this.initialLat&&null!==this.initialLng&&(this.provider.goto(this.initialLat,this.initialLng,11),this.provider.setMarkerPosition(this.initialLat,this.initialLng),this.userLocation={lat:this.initialLat,lng:this.initialLng},this.provider.updateList({location:{lat:this.initialLat,lng:this.initialLng}}))}})):console.error("maps-provider-service: at least one missing selector")},initProductPage:function(){var t,e;this.selectors.localityInputSelector&&this.selectors.localityInputId&&this.selectors.storeLocationFormSelector&&this.selectors.storeListItemSelector&&this.selectors.storeListItemClass&&this.selectors.latAttribute&&this.selectors.lngAttribute?(t=document.getElementById(this.selectors.mapId),e=this.provider.getSdkUrl(this.config),$(this.selectors.loaderSelector).css("text-align","center"),$(this.selectors.storeListSelector).parent().css("overflow-y","scroll"),$.ajax({url:e,dataType:"script",success:()=>{var e;t&&this.provider.initProductPage(t),$(this.selectors.localityInputSelector).on("input",()=>{this.provider.completeLocalities(this.selectors.localityInputId)}),$(this.selectors.storeLocationFormSelector).attr("onsubmit","").on("submit",e=>{e.preventDefault(),this.provider.completeLocalities(this.selectors.localityInputId),this.provider.gotoLocality(this.selectors.localityInputId)}),$(this.selectors.localityInputSelector).on("input",e=>{1<=$(this.selectors.localityInputSelector).val().split(",").length&&(e.preventDefault(),this.provider.completeLocalities(this.selectors.localityInputId),this.provider.gotoLocality(this.selectors.localityInputId))}),this.selectors.geolocationButtonSelector&&((e=$(this.selectors.geolocationButtonSelector)).attr("onclick","").on("click",e=>{e.preventDefault(),this.locateUser()}),e.is(":visible")&&e.trigger("click"))}})):console.error("maps-provider-service: at least one missing selector")},initOrderDeliveryPage:function(t){var o,e;this.selectors.localityInputSelector&&this.selectors.localityInputId&&this.selectors.storeLocationFormSelector&&this.selectors.storeListItemSelector&&this.selectors.storeListItemClass&&this.selectors.latAttribute&&this.selectors.lngAttribute?(o=$(this.selectors.mapContainer)[0],e=this.provider.getSdkUrl(this.config),$(this.selectors.loaderSelector).css("text-align","center"),$(this.selectors.storeListSelector).parent().css("overflow-y","scroll"),null!==e&&$.ajax({url:e,dataType:"script",success:()=>{var e;o&&this.provider.initOrderDeliveryPage(o,t),$(this.selectors.localityInputSelector).on("input",()=>{this.provider.completeRelays(this.selectors.localityInputId)}),$(this.selectors.localityInputId).on("input",e=>{e.preventDefault(),this.provider.completeRelays(this.selectors.localityInputId),this.provider.gotoRelay(this.selectors.localityInputId)}),this.selectors.geolocationButtonSelector&&((e=$(this.selectors.geolocationButtonSelector)).attr("onclick","").on("click",e=>{e.preventDefault(),this.locateUser()}),e.is(":visible")&&e.trigger("click"))}})):console.error("maps-provider-service: at least one missing selector")},initThanksPage:function(e,t,o,a,s=17){var r,i;this.selectors.latAttribute&&this.selectors.lngAttribute?(r=$(this.selectors.mapContainer)[0],i=this.provider.getSdkUrl(this.config),$(this.selectors.loaderSelector).css("text-align","center"),$(this.selectors.storeListSelector).parent().css("overflow-y","scroll"),null!==i&&$.ajax({url:i,dataType:"script",success:()=>{r&&this.provider.initThanksPage(r,e,t,o,a,s)}})):console.error("maps-provider-service: at least one missing selector")},locateUser:function(){navigator.geolocation.getCurrentPosition(e=>{var t=e.coords.latitude,o=e.coords.longitude;this.userLocation={lat:t,lng:o},this.clearSelection();var a=this.initialLat;e=this.initialLng;null!==a&&null!==e?this.provider.setMarkerPosition(t=a,o=e):this.provider.setMarkerPosition(t,o),this.provider.goto(t,o,11),this.provider.updateList({location:{lat:t,lng:o}})},()=>{})},setSelection:function(e){this.provider.setSelection(e)},clearSelection:function(){this.provider.setSelection(null)},updateList:function(){this.provider.updateList("mapCenter")},createRelayListItem:function(e){var t=document.createElement("div");
1t.id="relay-"+e.id,e.distanceToUser?e.distanceToUser.display:e.distance;var o,a,s,r,i=Translator.translate("choisir_ce_relais"),n=Translator.translate("choisir_ce_magasin"),l=(n="store"==e.type?n:i,e.weekly_opening);let c=[],d="";if(e.tunnelV3&&0<l.length){var p;let t="",o="";for(p=0==(i=new Date).getDay()?6:i.getDay()-1,weekday=0;weekday<=6;weekday++){var u=l[weekday][1];t=l[p][1];let e=[];o=0<u.length?(e.push(u),'<span class="puce_store_open"><span class="mag_open_status">'+Translator.translate("store_opened")+"</span></span>"):(e.push(Translator.translate("delivery_store_closed")),'<span class="puce_store_closed"><span class="mag_open_status">'+Translator.translate("store_closed")+"</span></span>"),t==Translator.translate("closed")&&(o='<span class="puce_store_closed"><span class="mag_open_status">'+Translator.translate("store_closed")+"</span></span>",t=""),e='<tr><td align="left">'+(e=Translator.translate("day_0"+(weekday+1))+" : "+e.join(", "))+"</td></tr>",c.push(e)}d='<span class="todayHours">'+o+t+"</span>",d+='<span class="btn_toggle_hours">'+Translator.translate("afficher_horaires")+"</span>",d+='<table width="100%" cellpadding="2" cellspacing="0" class="table_horaire openingHours">',d+=c.join(""),d+="</table>"}else{if(0<l.length)for(weekday=1;weekday<=7;weekday++){var m=l[weekday].hours;let e=[];
1if(0<l[weekday].hours.length)for(var h in m)0<m[h].start.length&&0<m[h].end.length&&e.push(m[h].start+"-"+m[h].end);else e.push(Translator.translate("delivery_store_closed"));e='<tr><td align="left">'+(e=Translator.translate("day_0"+weekday)+" : "+e.join(", "))+"</td></tr>",c.push(e)}d='<table width="100%" cellpadding="2" cellspacing="0" class="table_horaire" style="display: none;">',d+=c.join(""),d+="</table>"}return"mobile"==this.device?(t=document.createElement("section"),t=$(t),o=this.distance(e.distance),a=this.provider.formatAddress(e.address.street),s=this.provider.formatAddress(e.address.city),r=e.address.countryCode||"FR",r=`\n                <div class="kp" id="relay-${e.id}" data-conveyor-type="${e.type}">\n                    <div class="kp_top">\n                        <div class="address">\n                            <div class="kp_addr">\n                                <span class="name">${e.name}</span>\n                                <input name="relay-address" value="${a} ${e.address.zipcode} - ${e.address.city}" type="hidden">\n                                <span class="kp_street">${a}</span>\n                            </div>\n                            <div class="kp_city">${e.address.zipcode} ${s}</div>\n                        </div>\n                        <div class="distance">${o}</div>\n                    </div>\n                    <div class="form_submit">\n                        <a class="relayLink" data-url="livraison-choix-process.phplivraison-choix-process.php?r_id=${e.id}&amp;conveyor_id=${e.conveyorId}&amp;${r}" href="javascript:;" onclick="changeRelay('${e.id}', '${e.conveyorId}', '${r}');">${n}</a>\n                    </div>\n                </div>${d}`,t.html(r),t.innerHTML=r):((t=$(t)).addClass("kp"),t.addClass("relay-list-element"),t.attr({"data-store-id":e.id,"data-conveyor-type":e.type}),o=this.distance(e.distance),a=this.provider.formatAddress(e.address.street),s=this.provider.formatAddress(e.address.city),e.openingHoursToday,r=e.address.countryCode||"FR",n=`\n                <div class="name"><a class="kpname">${e.name}</a><div class="distance">${o}</div></div>\n                <div class="address">${a}<br> <span class="zipcode">${e.address.zipcode}</span> -  <span class="city">${s}</span></div>\n                <div class="locationhint"></div>\n                <div class="btn_container">\n                    <a class="relayLink" data-url="livraison-choix-process.phplivraison-choix-process.php?r_id=${e.id}&amp;conveyor_id=${e.conveyorId}&amp;country=${r}" href="javascript:;" onclick="changeRelay('${e.id}', '${e.conveyorId}', '${r}');">${n}</a>\n                </div>${d}`,t.html(n),t.innerHTML=n),t},createStoreListItem:function(t){var o=document.createElement("div");o.id=t.id;let a=Translator.translate("choose_as_favorite_store");"undefined"!=typeof clientFavoriteStoreId&&clientFavoriteStoreId==t.id&&(a=Translator.translate("actual_favorite_store"));var s=1==$("body.product_page").length,r=0<$("div.customer_adress").length,i="undefined"==t.stockQuantity||""==t.stockQuantity?"unknow_stock":(stockQuantity=t.stockQuantity,c=2<stockQuantity&&stockQuantity<900,n=1<=stockQuantity&&stockQuantity<=2,e=0==stockQuantity,900<=stockQuantity?"to_be_confirmed_stock":e?"not_in_stock":n?"limited_stock":c?"in_stock":"");if("mobile"==this.device){(o=$(o)).addClass("store_wrap section-link-bottom"),o.attr({"data-lat":t.location.lat,"data-lng":t.location.lng,"data-nom":t.name,style:"cursor:pointer;left:0px;"});var e=Translator.translate("pays_"+t.address.countryCode.toLowerCase()),n=t.address.street+" "+t.address.zipcode+" "+t.address.city+" - "+e,l=`http://maps.google.com/maps?f=q&source=s_d&daddr=${encodeURIComponent(n)}&hl=fr&sll=${encodeURIComponent(t.location.lat+","+t.location.lng)}&ie=UTF8&z=16&iwloc=A`,c=t.distanceToUser?" - "+t.distanceToUser.display:"";l=`<div class="cadre1">\n                <div class="wrapper_cadre">\n                    <div class="wrapper_infos_store">\n                        <input class="storeloc_city" type="hidden" value="${t.address.city}">\n                        <input class="storeloc_cp" type="hidden" value="${t.address.zipcode}">\n                        <input class="storeloc_country" type="hidden" value="${e}">
1\n                        <span class="section-link-close vector_sprite close"></span>\n                        <h2 class="nom_store">${t.name}<span>${c}</span></h2>\n                        <div class="store_address">${n}</div>\n                        ${t.clickAndCollect?'<div class="store_clickandcollect" style="display: none;">'+Translator.translate("click_and_collect")+"</div>":""}\n                        <div class="store_tel">${t.phone}</div>\n                        <p class="stock_status ${i}" style="display: none;">\n                        ${Translator.translate(i+"_msg")}\n                        </p>\n                        <p class="store_statut"></p>\n                        <div class="favShop">\n                            <span id="favico-${t.id}" class="favico" data-id="${t.id}"></span>\n                            <p id="fav-${t.id}" class="fav-store">${a}</p>\n                        </div>\n                    </div>\n                    <div id="magAlert" class="row"></div>\n                </div>\n            </div>\n            <div class="shop_map_elements" style="display:block;">\n                <a class="geoloc_foot pink_btn c_both" target="_blank" href="${l}">\n                    ${Translator.translate("store_route")}\n                </a>\n                <a class="geoloc_foot grey_btn c_both" href="${path_relative_root}distributeurs.php?lat=${t.location.lat}&lng=${t.location.lng}&all=1">\n                    ${Translator.translate("all_shops")}\n                    <span class="rose"></span>\n                </a>\n            </div>`;if(o.html(l),$(".favShop",o).on("click",()=>{this.addFavoriteStore(t.id)}),s||r||$(".favShop",o).after(`\n                    <a class="savoir_plus" onclick="createDataLayer('${t.id}')" href="${path_relative_root}store_details.php?id=${t.id}">\n                        ${Translator.translate("more_infos")}\n                    </a>\n                `),t.openingHoursToday&&$(".store_statut",o).html('<strong class="'+(t.currentlyOpen?"store_open":"store_closed")+'"></strong>'+t.openingHoursToday),s&&t.canBeContacted){let e=$("div#contact_mag_component > div.formStore").clone(!0);e.addClass("form_"+t.id),$("#message",e).html(Translator.translate("form_mag_desc",[t.name])),$('input[name="magasin_id"]',e).attr("value",t.id),$("#magAlert",o).html(`\n                    <div class="inStore">\n                        <div class="dispoInShop" onclick="handleChangeMobile(${t.id}, '${t.name.replaceAll("'","\\'")}')">\n                            <div class="inShop"></div>\n                            <div class="availableTxt">\n                                ${"contact_store_lightbox"!==Translator.translate("contact_store_lightbox")?Translator.translate("contact_store_lightbox"):Translator.translate("contact_store")}\n                            </div>\n                        </div>\n                    </div>\n                `).after(e)}}else{o.className=this.selectors.storeListItemClass;let e='<h2 id="store-title-'+t.id+'" class="nom_store">';t.distanceToUser?e+=t.name+" - "+t.distanceToUser.display:e+=t.name,l=t.phone?'<div class="store_infos">'+t.phone+"</div>":"",e+="</h2>",e+='<span class="store_infos_'+t.filterMag+'"></span>',e+='<p class="stock_status '+i+'" style="display: none;">'+(r=Translator.translate(i+"_msg"))+"</p>","undefined"!=typeof address_no_format?e+='<div class="store_infos">'+t.address.street+'</div><div class="store_infos">'+t.address.zipcode+" "+t.address.city.at(0)+t.address.city.slice(1)+" - "+t.address.countryCode+"</div>"+l:e+='<div class="store_infos">'+t.address.street+'</div><div class="store_infos">'+t.address.zipcode+" "+t.address.city.at(0)+t.address.city.slice(1)+" - "+t.address.countryCode+'</div><div class="store_infos store_phone">'+t.phone+"</div>",t.clickAndCollect&&(e+="<span class='click_and_collect' style='display: none;'>"+Translator.translate("click_and_collect")+"</span>"),t.openingHoursToday&&(e+=`<div class="horaire_today"><span class="puce ${t.currentlyOpen?"store_open":"store_closed"}"></span> ${t.openingHoursToday}</div>`),e+=`<a class="addfavorite favorite_store_button" data-magasinid="${t.id}" data-clientid="">
1\n                <span class="choose_fav_label">\n                    <span class="bgSprite bfr store"></span>\n                    <span id="fav-${t.id}" class="isFavoriteLabel fav-store">${a}</span>\n                </span>\n            </a>`,s?t.canBeContacted&&(e+=`<div class="button secondary availableTxt" onclick="handleChange(${t.id}, '${t.name.replaceAll("'","\\'")}')">${"contact_store_lightbox"!==Translator.translate("contact_store_lightbox")?Translator.translate("contact_store_lightbox"):Translator.translate("contact_store")}</div>`):(s=Translator.translate("shop_info"),e+='<a id="store-link-'+t.id+'" onclick="createDataLayer('+t.id+')" href="'+path_relative_root+"store_details.php?id="+t.id+'" class="button secondary">'+s+"</a>"),o.innerHTML=e}return o},initStoreDetailsPage:function(e,t){var o=document.getElementById(this.selectors.mapId);o&&(null!==this.provider.getSdkUrl(this.config)?$.ajax({url:this.provider.getSdkUrl(this.config),dataType:"script",success:()=>{this.provider.initStoreDetailsPage(o,e,t)}}):this.provider.initStoreDetailsPage(o,e,t))},addFavoriteStore:t=>{null!=clientId&&null!=t&&clientFavoriteStoreId!=t?$.ajax({url:path_relative_root+"ajax_manage_favorite_store.php",type:"post",dataType:"json",data:{act:"add",magasin_id:t,client_id:clientId},success:e=>{e.success&&(clientFavoriteStoreId=t,e=document.getElementById("fav-"+t),$(".fav-store").html(Translator.translate("choose_as_favorite_store")),e.innerHTML=Translator.translate("actual_favorite_store"),$("body").hasClass("customer")&&location.reload(),MapsProviderService.updateList())}}):(path_relative_root,alert('<div class="box_txt_wishlist selected_mag"><h2>'+Translator.translate("add_store_login_error_title")+"</h2><br>"+Translator.translate("add_store_login_error_text")+'<br><button class="button primary" onclick="favStoreRedirectLogin()">'+Translator.translate("vgt_connexion")+" </button></div>"))},initAddressAutocomplete:function(e){e.inputSelector&&this.provider.initAddressAutocomplete(e)},distance:function(e){return 1e3<e?Math.round(e/100)/10+" km":Math.round(e)+" m"}},woosmapProvider={name:"woosmap",mapObject:null,storesOverlay:null,countUpdateList:0,marker:null,infoWindow:null,countryCode:"FR",countriesConfig:{FR:{name:"France",position:{lat:48.866667,lng:2.333333}},BE:{name:"Belgique",position:{lat:50.850335,lng:4.36}},CH:{name:"Suisse",position:{lat:46.924143,lng:8.03}},LU:{name:"Luxembourg",position:{lat:49.775125,lng:6.08}}},lastUpdateList:null,getSdkUrl:function(e){this.config=e;var t="https://sdk.woosmap.com/map/map.js";e=[];return this.config.WOOSMAP_API_PUBLIC_KEY&&e.push("key="+this.config.WOOSMAP_API_PUBLIC_KEY),"undefined"!=typeof lang_woosmap&&lang_woosmap&&e.push("language="+lang_woosmap),0<e.length&&(t+="?"+e.join("&")),t},initSearchShopPage:function(e){var t="#444444";if("undefined"!=typeof woosmap_map_store_default&&(t=woosmap_map_store_default),$(MapsProviderService.selectors.localityInputSelector).attr({autocomplete:"off"}),e){this.mapObject=new woosmap.map.Map(e,{center:this.countriesConfig.FR.position,zoom:5,styles:woosmap_map_style}),"mobile"==MapsProviderService.device&&(e.style.height="280px"),this.marker=new woosmap.map.Marker({icon:{url:path_relative_root+"img/maps/map_position.png",scaledSize:{height:16,width:16}},map:this.mapObject,draggable:!0}),e="undefined"!=typeof lang_woosmap?lang_woosmap:"fr";const o={breakPoint:14,default:{color:t,size:10,minSize:3,icon:{url:path_relative_root+"img/maps/marker.png",size:{height:14.5,width:12.5}},selectedIcon:{url:path_relative_root+"img/maps/marker.png",size:{height:29,width:25}}},rules:[]};"fr"==e&&(o.rules=[{type:"ambassadeur",color:"#C4D600",size:10,minSize:3,icon:{url:path_relative_root+"img/maps/pin-vert.svg",scaledSize:{height:14.5,width:12.5}},selectedIcon:{url:path_relative_root+"img/maps/pin-vert.svg",scaledSize:{height:29,width:25}}},{type:"referent",color:"#81C2C0",size:10,minSize:3,icon:{url:path_relative_root+"img/maps/pin-bleu.svg",scaledSize:{height:14.5,width:12.5}},selectedIcon:{url:path_relative_root+"img/maps/pin-bleu.svg",scaledSize:{height:29,width:25}}}
1,{type:"essentiel",color:"#8A8279",size:10,minSize:3,icon:{url:path_relative_root+"img/maps/pin-taupe.svg",scaledSize:{height:14.5,width:12.5}},selectedIcon:{url:path_relative_root+"img/maps/pin-taupe.svg",scaledSize:{height:29,width:25}}}]),this.storesOverlay=new woosmap.map.StoresOverlay(o),e=$('.filtre-checkbox[type="checkbox"]:checked').map(function(e,t){return $(t).val()}).get(),window.history.replaceState({},"","?"),0<e.length&&(this.storesOverlay.setQuery("user.filterMag:"+e.toString().toLowerCase()),window.history.pushState({},"",`?filter=${e.toString().toLowerCase()}`)),this.storesOverlay.setMap(this.mapObject),this.infoWindow=new woosmap.map.InfoWindow({pixelOffset:{x:0,y:-35}}),this.mapObject.addListener("store_selected",e=>{0<$("#"+e.properties.store_id).length&&($("#liste_distributeur").animate({scrollTop:$("#"+e.properties.store_id).position().top},1e3),$(".elem_liste_distributeur").removeClass("selected_store"),$("#"+e.properties.store_id).addClass("selected_store"));var t=this.getInfoWindowHtml(e);this.infoWindow.setContent(t),t=e.geometry.coordinates[1],e=e.geometry.coordinates[0],this.infoWindow.open(this.mapObject,{lat:t,lng:e}),this.marker.setOpacity(0),this.goto(t,e,11)}),this.mapObject.addListener("store_unselected",()=>{this.infoWindow.close(),this.marker.setOpacity(1)}),this.marker.addListener("dragstart",()=>{this.storesOverlay.clearSelection()}),this.marker.addListener("dragend",()=>{var e=this.marker.getPosition();this.mapObject.panTo(e)})}},initProductPage:function(e){e&&(this.mapObject=new woosmap.map.Map(e,{center:this.countriesConfig.FR.position,zoom:5,styles:woosmap_map_style}),this.marker=new woosmap.map.Marker({icon:{url:path_relative_root+"img/maps/map_position.png",scaledSize:{height:16,width:16}},map:this.mapObject,draggable:!0}),this.storesOverlay=new woosmap.map.StoresOverlay({breakPoint:14,default:{color:"#444444",size:10,minSize:3,icon:{url:path_relative_root+"img/maps/marker.png",size:{height:14.5,width:12.5}},selectedIcon:{url:path_relative_root+"img/maps/marker.png",size:{height:29,width:25}}},rules:[]}),this.storesOverlay.setMap(this.mapObject),this.infoWindow=new woosmap.map.InfoWindow({pixelOffset:{x:0,y:-35}}),this.mapObject.addListener("store_selected",e=>{var t=this.getInfoWindowHtml(e);this.infoWindow.setContent(t),t=e.geometry.coordinates[1],e=e.geometry.coordinates[0],this.infoWindow.open(this.mapObject,{lat:t,lng:e}),this.marker.setOpacity(0),this.goto(t,e,11)}),this.mapObject.addListener("store_unselected",()=>{this.infoWindow.close(),this.marker.setOpacity(1)}),this.mapObject.addListener("idle",()=>{this.updateList({location:this.mapObject.getCenter()})}),this.marker.addListener("dragstart",()=>{this.storesOverlay.clearSelection()}),this.marker.addListener("dragend",()=>{var e=this.marker.getPosition();this.mapObject.panTo(e)}))},initOrderDeliveryPage:function(e,t){var o,a,s,r;e&&(o=null!=MapsProviderService.device&&"mobile"==MapsProviderService.device&&void 0===MapsProviderService.isTunnelV3?$(".street").val()+"|"+$(".zip").val()+"|"+$(".city").val()+"|"+$(".country").val():$("#street").val()+"|"+$("#zip").val()+"|"+$("#city").val()+"|"+$("#country").val(),a="https://api.woosmap.com/localities/geocode?key="+this.config.WOOSMAP_API_PUBLIC_KEY,a+="&address="+encodeURIComponent(o),this.mapObject=new woosmap.map.Map(e,{center:this.countriesConfig.FR.position,zoom:5,styles:woosmap_map_style}),$.ajax({url:a,dataType:"json",success:e=>{e.results.length&&(s=e.results[0].geometry.location.lat,r=e.results[0].geometry.location.lng,this.goto(s,r,10),setTimeout(()=>{var e=new woosmap.map.Marker({icon:{url:path_relative_root+"img/maps/map_position.png",scaledSize:{height:16,width:16}},map:this.mapObject,draggable:!0});let m=this.mapObject;if(e.setMap(m),void 0===t||26==t||24==t){if(this.storesOverlay=new woosmap.map.StoresOverlay({breakPoint:14,default:{color:"#444444",size:10,minSize:3,icon:{url:path_relative_root+"img/maps/marker.png",size:{height:14.5,width:12.5}},selectedIcon:{url:path_relative_root+"img/maps/marker.png",size:{height:29,width:25}}},rules:[]}),void 0===t){let e=document.querySelector(".choix_delivery");t=e?e.getAttribute("data-id-transporteur"):null}26==t&&this.storesOverlay.setQuery("user.clickandcollect:=#t"),24==t&&this.storesOverlay.setQuery("user.clickandgo:=#t"),this.storesOverlay.setMap(this.mapObject),(e=new woosmap.map.Marker({position:m.getCenter(),icon:{url:path_relative_root+"img/maps/map_position.png"},zIndex:1})).setMap(this.mapObject),this.infoWindow=new woosmap.map.InfoWindow({pixelOffset:{x:0,y:-35}}),this.mapObject.addListener("store_selected",e=>{var t=this.getInfoWindowHtml(e);this.infoWindow.setContent(t),t=e.geometry.coordinates[1],e=e.geometry.coordinates[0],this.infoWindow.open(this.mapObject,{lat:t,lng:e}),this.marker.setOpacity(0),this.goto(t,e,11)}),setTimeout(()=>{this.updateRelayList({location:this.mapObject.getCenter(),conveyorId:t})},500)}
1else 12==t&&($.post("ajax_generate_xml_relay.php",{address:$("input[name=street]").val(),zipcode:$("input[name=zip]").val(),city:$("input[name=city]").val(),country:$("input[name=country], select[name=country]").val(),is_relay_magasin:!1,conveyorId:t},function(e){e=$.parseXML(e),e=$(e);var p=[],u=new woosmap.map.LatLngBounds;0<e.find("marker").length&&(e.find("marker").each(function(){var e=$(this).attr("id"),t=$(this).attr("name"),o=$(this).attr("address"),a=parseFloat($(this).attr("lat")),s=parseFloat($(this).attr("long")),r=$(this).attr("transporteur_id"),i=new woosmap.map.LatLng(a,s),n='<div role="dialog" aria-modal="false" aria-labelledby="relay-title-'+e+'" style="overflow: auto; padding: 10px; max-height: 287px; max-width: 388.5px;">';n+='<p id="relay-title-'+e+'" class="mapDeliveryName">'+$(this).attr("name")+"</p>",n+='<p class="mapDeliveryDistance">'+$(this).attr("indication")+" ("+$(this).attr("distance")+" km)</p>",n+='<p class="mapDeliveryAddressLabel">Adresse</p>',n+='<p class="mapDeliveryAddress">'+$(this).attr("address")+"<br />"+$(this).attr("zipcode")+" "+$(this).attr("city")+"</p>",a="livraison-choix-process.php?r_id="+e,a+="&conveyor_id="+r,null!=$(this).attr("network")&&(a+="&network="+$(this).attr("network"));let l="";null!=$(this).attr("country")&&(a+="&country="+(l=$(this).attr("country"))),n+='<div class="mapDeliveryChoose details"><a href="javascript:;" data-url="'+a+'" onclick="'+(s="changeRelay('"+e+"', '"+r+"', '"+l+"');")+'">Choisissez ce Relais</a></div>',n+="</div>";var c=new woosmap.map.Marker({id:e,position:i,name:t,address:o,icon:{url:path_relative_root+"img/maps/marker-"+r+".png"},zIndex:2});let d;p.push(c),u.extend(i),c.setMap(m),d=new woosmap.map.InfoWindow({pixelOffset:{x:0,y:-35}}),c.addListener("click",function(){d.setContent(n),d.open(m,c);var e=c.getPosition();m.panTo(e),d.setOptions({maxHeight:"350px"})}),$(".relay-list-element[data-store-id]").on("click",function(){var t=$(this).data("store-id");for(let e=0;e<p.length;e++){const a=p[e];if(a.get("id")===t){d.setContent(n),d.open(m,a);var o=a.getPosition();m.panTo(o),d.setOptions({maxHeight:"350px"});break}d.close()}}),m.addListener("click",()=>{d.close()})}),m.fitBounds(u)),new woosmap.map.Marker({position:m.getCenter(),icon:{url:path_relative_root+"img/maps/map_position.png"},zIndex:1}).setMap(m)}),this.updateRelayList({location:m.getCenter(),conveyorId:t}))},500))}}))},initThanksPage:function(e,t,o,s,r,a){e&&(this.mapObject=new woosmap.map.Map(e,{center:{lat:t,lng:o},zoom:a,styles:woosmap_map_style}),setTimeout(()=>{var e=new woosmap.map.Marker({position:this.mapObject.getCenter(),icon:{url:path_relative_root+"img/maps/marker.png",scaledSize:{height:30,width:23}},map:this.mapObject,draggable:!1}),t=this.mapObject;e.setMap(t);const o=new woosmap.map.InfoWindow({});var a="<div class='info-content'><p class='titleAddress'>"+s+"</p><p>"+r+"</p></div>";o.setOffset(new woosmap.map.Point(130,45)),o.setContent(a),o.open(t,e.position)},500),$.ajax({url:url,dataType:"json",success:e=>{e.results.length}}))},setCountry:function(e){e in this.countriesConfig?this.countryCode=e:this.countryCode="FR",e=this.countriesConfig[this.countryCode].position,woosmap.map.event.trigger(this.mapObject,"store_unselected"),this.goto(e.lat,e.lng,3),this.storesOverlay.setQuery(`country:="${this.countryCode}"`)},getInfoWindowHtml:function(e){return createLineWoosmap(e,MapsProviderService)},updateRelayList:function(a){if(MapsProviderService.selectors.storeListSelector){var n,e=$(MapsProviderService.selectors.scrollContentSelector);n=null!=MapsProviderService.device&&"mobile"==MapsProviderService.device&&void 0===MapsProviderService.isTunnelV3?$("div[data-id-transporteur="+a.conveyorId+"] "+MapsProviderService.selectors.storeListSelector):$(MapsProviderService.selectors.storeListSelector);var t,o=$(MapsProviderService.selectors.loaderSelector);if($(MapsProviderService.selectors.pagination),n.empty(),n.html(""),"mapCenter"===a&&mapObject&&(a={location:mapObject.getCenter()}),o.length&&(e.fadeOut(),o.fadeIn()),12==a.conveyorId||24==a.conveyorId){t=(null!=MapsProviderService.device&&"mobile"==MapsProviderService.device&&void 0===MapsProviderService.isTunnelV3?$("select[name=country]"):$("input[name=country]")).val();var s=12==a.conveyorId?"relay":"store";"undefined"!=typeof woosmap_provider&&woosmap_provider&&"undefined"!=typeof conveyorId&&(s=12==conveyorId?"relay":"store",a.conveyorId=conveyorId,type=12),$.post("aja
1x_generate_xml_relay.php",{address:$("input[name=street]").val(),zipcode:$("input[name=zip]").val(),city:$("input[name=city]").val(),country:t,is_relay_magasin:!1,conveyorId:a.conveyorId},function(e){e=$.parseXML(e),0<(e=$(e)).find("marker").length&&(e.find("marker").each(function(){var e,t;let o=!1;null!=$(this).attr("weekly_opening")?t=$(this).attr("weekly_opening"):(t=$.parseJSON($(this).attr("hours")),o=!0),e={id:$(this).attr("id"),name:$(this).attr("name"),address:{street:$(this).attr("address"),zipcode:$(this).attr("zipcode"),city:$(this).attr("city"),countryCode:$(this).attr("country")},lat:parseFloat($(this).attr("lat")),lng:parseFloat($(this).attr("long")),distance:1e3*parseFloat($(this).attr("distance")),conveyorId:$(this).attr("transporteur_id"),weekly_opening:t,type:s,tunnelV3:o},storeDiv=MapsProviderService.createRelayListItem(e),storeDiv=$(storeDiv),this.features=[],this.features[$(this).attr("id")]=e,MapsProviderService.selectors.mapContainer&&storeDiv.on("click",()=>{MapsProviderService.setSelection(id)}),n.append(storeDiv),$(".store_no_result").hide(),storeDiv.show()}),MapsProviderService.pagination&&(e='<a id="voir_plus" class="button primary">'+Translator.translate("txt_show_more")+"</a>",$("#voir_plus").remove(),n.append(e),$(document).ready(function(){n.find("section:lt(3)").show(),n.find("section:gt(2)").hide()}),$("a#voir_plus").click(function(e){n.find("section").css("display","block"),$("#voir_plus").css("display","none")})))})}else{let o="https://api.woosmap.com/stores/search?";if(this.config.WOOSMAP_API_PUBLIC_KEY&&(o+="key="+this.config.WOOSMAP_API_PUBLIC_KEY+"&"),void 0!==a.location){let e=a.location.lat,t=a.location.lng;"function"==typeof e&&(e=e()),"function"==typeof t&&(t=t()),o+="lat="+e,o+="&lng="+t,o+="&radius="+1e5,o+="&query="+encodeURIComponent("user.clickandcollect:=#t")}else void 0!==a.country?o+='query=country:="'+a.country+'"':o+='query=country:="'+this.countryCode+'"',o+=encodeURIComponent(" AND user.clickandcollect:=#t");$.ajax({url:o,dataType:"json",success:r=>{if(0<r.features.length){for(feature of(this.features=[],r.features))this.features[feature.properties.store_id]=feature;if($.isEmptyObject(this.distanceMatrix)&&null!==MapsProviderService.userLocation.lat&&null!==MapsProviderService.userLocation.lng){let t=[];this.features.forEach(e=>{t.push({storeId:e.properties.store_id,location:{lat:e.geometry.coordinates[1],lng:e.geometry.coordinates[0]}})}),this.goto(lat,lng,11),updateDistanceMatrix(t,lat,lng)}for(featureIndex in r.features.reverse(),r.features){let t=$(MapsProviderService.selectors.storeListItemSelector+"#"+r.features[featureIndex].properties.store_id),o={},e=r.features[featureIndex].properties.store_id;var i={};let a="";if("undefined"!=typeof relayMagCarrierId&&(a=relayMagCarrierId),1!=t.length){t.remove();let e=r.features[featureIndex];o={id:e.properties.store_id,location:{lat:e.geometry.coordinates[1],lng:e.geometry.coordinates[0]},name:e.properties.name,address:{street:e.properties.address.lines.join(", "),zipcode:e.properties.address.zipcode,city:e.properties.address.city,countryCode:this.formatCountry(e.properties.address.country_code)},phone:this.formatPhone(e.properties.contact.phone),distance:parseFloat(e.properties.distance),isFavorite:i==e.properties.store_id,canBeContacted:e.properties.user_properties.canBeContacted,filterMag:e.properties.user_properties.filterMag,magImgDisplay:e.properties.user_properties.magImgDisplay,type:"store",weekly_opening:e.properties.weekly_opening,conveyorId:a,currentlyOpen:!1,openingHoursToday:[]},void 0!==e.properties.open&&(void 0!==e.properties.open.open_hours&&(o.openingHoursToday=e.properties.open.open_hours),o.currentlyOpen=e.properties.open.open_now),0<o.openingHoursToday.length&&!o.currentlyOpen?o.openingHoursToday=Translator.translate("closed"):1==o.openingHoursToday.length?o.openingHoursToday=Translator.translate("store_open_until_2",[o.openingHoursToday[0].end]):2==o.openingHoursToday.length?o.openingHoursToday=Translator.translate("store_open_until_3a")+o.openingHoursToday[0].start+Translator.translate("store_open_until_3b")+o.openingHoursToday[0].end+Translator.translate("store_open_until_3d")+o.openingHoursToday[1].start+Translator.translate("store_open_until_3b")+o.openingHoursToday[1].end+Translator.translate("store_open_until_3c"):o.currentlyOpen?o.openingHoursToday=Translator.translate("open"):o.openingHoursToday=Translator.translate("closed"),this.distanceMatrix[e.properties.store_id],o.distanceToUser=this.distanceMatrix[e.properties.store_id],t=MapsProviderService.createRelayListItem(o),t=$(t)}MapsProviderService.selectors.mapId&&t.on("click",()=>{MapsProviderService.setSelection(e)});let s="";i==e?s=Translator.translate("actual_favorite_store"):(s=Translator.translate("choose_as_favorite_store"),$(MapsProviderService.selectors.addFavoriteSelector,t).on("click",()=>{MapsProviderService.addFavoriteStore(e)})),$(".isFavoriteLabel",t).text(s),n.prepend(t),t.show(),$(".store_no_result").hide()}var e;MapsProviderService.pagination&&(e='<a id="voir_plus" class="button primary">'+Translator.translate("txt_show_more")+"</a>",$("#voir_plus").remove(),n.append(e),$(document).ready(function(){n.find("section:lt(3)").show(),n.find("section:gt(2)").hide()}),$("a#voir_plus").click(function(e){n.find("section").css("display","block"),$("#voir_plus").css("display","none")}))}}})}o.length&&(o.fadeOut(),e.fadeIn()),e.scrollTop(0)}
1else console.error("woosmap: at least one missing selector")},updateList:function(d){var e=new CustomEvent("updateList_start");if(window.dispatchEvent(e),this.countUpdateList++,MapsProviderService.selectors.storeListSelector){var p=$(MapsProviderService.selectors.scrollContentSelector),u=$(MapsProviderService.selectors.storeListSelector),m=$(MapsProviderService.selectors.loaderSelector);"undefined"!=typeof WOOSMAP_CURRENT_PAGE&&1==WOOSMAP_CURRENT_PAGE&&u.empty();let l="https://api.woosmap.com/stores/search?";this.config.WOOSMAP_API_PUBLIC_KEY&&(l+="key="+this.config.WOOSMAP_API_PUBLIC_KEY),"mapCenter"===d&&this.mapObject&&(d={location:this.mapObject.getCenter()});const s=new URLSearchParams(window.location.search);var t=s.get("lat"),o=s.get("lng");if(l+="&stores_by_page=50","undefined"!=typeof WOOSMAP_CURRENT_PAGE&&0==$('.filtre-checkbox[type="checkbox"]:checked').length&&(l+="&page="+window.WOOSMAP_CURRENT_PAGE),void 0!==d.location){let e=d.location.lat,t=d.location.lng;"function"==typeof e&&(e=e()),"function"==typeof t&&(t=t());var h=e,g=t;l+="&lat="+e,l+="&lng="+t}null!==t&&null!==o&&(l+="&lat="+t,l+="&lng="+o),l+='&query=(country:="FR" OR country:="BE" OR country:="LU" OR country:="CH")';var a=$('.filtre-checkbox[type="checkbox"]:checked').map(function(e,t){return $(t).val()}).get();0<a.length&&window.history.pushState({},"",`?filter=${a.toString()}`),0<a.length&&(l+=' AND user.filterMag:="'+a.toString()+'"'),m.length&&($(".search-result").hide(),m.fadeIn()),type_call="auto",e="",t="",o="",void 0!==document.getElementById("search_cp").value&&(t+="&cp="+encodeURIComponent(document.getElementById("search_cp").value)),o.substr(0,20)===Translator.translate("default_address_begin")&&(o=""),null!==(a=document.getElementById("search_pays"))&&void 0!==a.value&&(t+="search="+o+e,t+="&pays="+encodeURIComponent(document.getElementById("search_pays").value),null!=$("#search_pays").find(":selected").data("id")?t+="&pays_id="+$("#search_pays").find(":selected").data("id"):t+="&pays_id="+$("#search_pays").data("id")),document.getElementById("pdv")&&""!==document.getElementById("pdv").value&&(t+="&pdv="+encodeURIComponent(document.getElementById("pdv").value)),document.getElementById("produit_id")&&""!==document.getElementById("produit_id").value&&(e+="&produit_id="+encodeURIComponent(document.getElementById("produit_id").value),t+="&produit_id="+encodeURIComponent(document.getElementById("produit_id").value)),type_call="auto",$("#retailers_map").css("width","100%"),t=e,null!==a&&(t+="&pays="+encodeURIComponent(document.getElementById("search_pays").value),null!=$("#search_pays").find(":selected").data("id")?t+="&pays_id="+$("#search_pays").find(":selected").data("id"):t+="&pays_id="+$("#search_pays").data("id")),t=path_relative_root+"ajax_generate_xml_map.php?"+t,downloadUrl(t,"100km",type_call,function(e){var t=e.responseXML.documentElement.getElementsByTagName("marqueur");const o=[];for(var a=0;a<t.length;a++){var s=t[a].getAttribute("magasin_id"),r=t[a].getAttribute("stock"),i=t[a].getAttribute("stock_quantity"),n=t[a].getAttribute("stock-status");o[s]?(o[s].stock=r,o[s].stockQuantity=i,o[s].stockStatus=n):o[s]={stock:r,stockQuantity:i,stockStatus:n}}return new Promise((e,t)=>{e(o)}).then(function(c){$.ajax({url:l,dataType:"json",success:s=>{if(0<s.features.length){this.features=[];var e=s.pagination.pageCount;for(feature of s.features)this.features[feature.properties.store_id]=feature;if($.isEmptyObject(this.distanceMatrix)&&null!==MapsProviderService.userLocation.lat&&null!==MapsProviderService.userLocation.lng){let t=[];this.features.forEach(e=>{t.push({storeId:e.properties.store_id,location:{lat:e.geometry.coordinates[1],lng:e.geometry.coordinates[0]}})}),void 0!==d.location&&updateDistanceMatrix(t,h,g)}for(featureIndex in $(MapsProviderService.selectors.storeListSelector).empty(),s.features){let t=$(MapsProviderService.selectors.storeListItemSelector+"#"+s.features[featureIndex].properties.store_id),o={},e=s.features[featureIndex].properties.store_id;var r=c[e]&&void 0!==c[e].stock?c[e].stock:"",i=c[e]&&void 0!==c[e].stockStatus?c[e].stockStatus:"",n=c[e]&&void 0!==c[e].stockQuantity?c[e].stockQuantity:"";if(1!=t.length){t.remove();let e=s.features[featureIndex];o={id:e.properties.store_id,location:{lat:e.geometry.coordinates[1],lng:e.geometry.coordinates[0]},name:e.properties.name,address:{street:e.properties.address.lines.join(", "),zipcode:e.properties.address.zipcode,city:e.properties.address.city,countryCode:e.properties.address.country_code.replace("FR","France")},phone:e.properties.contact.phone.replace("+33","0").replace(/(.{2})(.{2})(.{2})(.{2})(.{2})/,"$1 $2 $3 $4 $5"),isFavorite:clientFavoriteStoreId==e.properties.store_id,canBeContacted:e.properties.user_properties.canBeContacted,filterMag:e.properties.user_properties.filterMag,magImgDisplay:e.properties.user_properties.magImgDisplay,stock:r,stockStatus:i,stockQuantity:n,clickAndCollect:e.properties.user_properties.clickandcollect,clickAndGo:e.properties.user_properties.clickandgo,currentlyOpen:!1,openingHoursToday:[]},void 0!==e.properties.open&&(void 0!==e.properties.open.open_hours&&(o.openingHoursToday=e.properties.open.open_hours),o.currentlyOpen=e.properties.open.open_now),0<o.openingHoursToday.length&&!o.currentlyOpen?o.openingHoursToday=Translator.translate("closed"):1==o.openingHoursToday.length?o.openingHoursToday=Translator.translate("store_open_until_2",[o.openingHoursToday[0].end]):2==o.openingHoursToday.length?o.openingHoursToday=Translator.translate("store_open_until_3a")+o.openingHoursToday[0].start+Translator.translate("store_open_until_3b")+o.openingHoursToday[0].end+Translator.translate("store_open_until_3d")+o.openingHoursToday[1].start+Translator.translate("store_open_until_3b")+o.openingHoursToday[1].end+Translator.translate("store_open_until_3c"):o.currentlyOpen?o.openingHoursToday=Translator.translate("open"):o.openingHoursToday=Translator.translate("closed"),t=MapsProviderService.createStoreListItem(o),t=$(t)}MapsProviderService.selectors.mapId&&t.on("click",()=>{woosmapProvider.setSelection(e,this.features)});let a="";if(clientFavoriteStoreId==e?a=Translator.translate("actual_favorite_store"):(a=Translator.translate("choose_as_favorite_store"),$(MapsProviderService.selectors.addFavoriteSelector,t).on("click",()=>{MapsProviderService.addFavoriteStore(e)})),$(".isFavoriteLabel",t).text(a),0==featureIndex||clientFavoriteStoreId==e)u.prepend(t);else{let e=$(MapsProviderService.selectors.storeListSelector+" >
1 :nth-child("+featureIndex+")");1==e.length&&e.after(t)}t.show()}p.scrollTop(0),$("body").addClass("map_results_loaded");var t=u.children().length;null!==(l=document.querySelector(".element_count"))&&(l.textContent=t),MapsProviderService.pagination&&"mobile"==MapsProviderService.device?(t='<a id="voir_plus" class="button primary">'+Translator.translate("txt_show_more")+"</a>",$("#voir_plus").remove(),$("#search_form").append(t),$(document).ready(function(){$(".store_wrap:lt(3)").show(),$(".store_wrap:gt(2)").hide()}),$("a#voir_plus").click(function(e){$("#home .c_both").find(".store_wrap").css("display","block"),$("#voir_plus").css("display","none")})):"desktop"==MapsProviderService.device&&($("#voir_plus").remove(),"undefined"!=typeof WOOSMAP_CURRENT_PAGE&&e>WOOSMAP_CURRENT_PAGE&&($('<button type="button" id="voir_plus" class="button primary">'+Translator.translate("txt_show_more")+"</button>").insertAfter(".section-list-store"),$("#voir_plus").click(function(e){WOOSMAP_CURRENT_PAGE++,woosmapProvider.updateList("mapCenter")}))),m.length&&(p.fadeIn(500),$(".search-result").css("display","flex"),m.fadeOut(300),setTimeout(()=>{const e=document.getElementsByClassName("elem_liste_distributeur")[0];e&&(e.setAttribute("tabindex","-1"),e.focus())},500))}else if(m.length){m.fadeOut(),(l=document.querySelector(".element_count")).textContent="Pas de magasin trouvé";for(var o=document.getElementsByClassName("resultat_default"),a=0;a<o.length;a++)o[a].style.display="none"}var l=new CustomEvent("updateList_done");window.dispatchEvent(l)}})})})}else console.error("woosmap: at least one missing selector!"+MapsProviderService.selectors.storeListSelector)},distanceMatrix:{},lastGoto:0,goto:function(o,a,s){if(Math.PI,"function"==typeof o&&(o=o()),"function"==typeof a&&(a=a()),this.mapObject){let e=!0,t=1e3;Date.now()-this.lastGoto<1e3&&(e=!1,t=0),this.mapObject.flyTo({animate:e,duration:t,center:{lat:o,lng:a},zoom:s}),this.lastGoto=Date.now()}else this.updateList({location:{lat:o,lng:a}})},setMarkerPosition:function(e,t){this.marker&&this.marker.setPosition({lat:e,lng:t})},features:{},setSelection:function(e,t){var o;this.mapObject&&(null===e?(this.storesOverlay.clearSelection(),woosmap.map.event.trigger(this.mapObject,"store_unselected")):void 0!==this.features[e]?(o=this.features[e],this.storesOverlay.setSelection(o),woosmap.map.event.trigger(this.mapObject,"store_selected",[o])):null!=t&&void 0!==t[e]&&(e=t[e],this.storesOverlay.setSelection(e),woosmap.map.event.trigger(this.mapObject,"store_selected",[e])))},completeRelays:function(a){var e,s=$(a),r="search_cp-completion",i=$(a).next("#"+r);s.attr({list:r,autocomplete:"off"}),0==i.length&&(e=document.querySelectorAll("#"+r),$(e).remove(),(i=$(document.createElement("ul"))).addClass("autocomplete-results"),i.attr("id",r),i.css({display:"block"}),i.insertAfter(s)),s.on("input",()=>{this.autocomplete(s.val(),e=>{if(e){i.empty();let o=[];var t;for(t of($(e).each((e,t)=>{i.css({display:"block"}),o.push('<li class="autocomplete-item" data-type="store" data-public-id="'+t.public_id+'"><span class="autocomplete-icon icon-localities"></span><span class="autocomplete-text">'+t.description+"</span></li>")}),document.querySelector("#"+r).innerHTML=o.join(""),i.css({display:"block"}),document.querySelector(".autocomplete-results").querySelectorAll(".autocomplete-item")))t.addEventListener("click",function(){var e=this.querySelector(".autocomplete-text").textContent;s.val(e),e=new Event("input",{bubbles:!0}),$(a).get(0).dispatchEvent(e),i.hide(),setTimeout(()=>{i.hide(),$(a).next("#"+r).hide()},800)})}})})},gotoRelay:function(e){var t=$(e),r=(e=$("#search_cp-completion"),$("#search_cp-completion"),t.val().toLowerCase().replace(/[, ]+/," "));if(!r.includes(",")||r.split(", ").length<1)return!1;$("li",e).each((e,t)=>{t=$(t),optionText=t.text().toLowerCase().replace(/[, ]+/," "),optionText.includes(r)&&(selectedOptionPublicId=t.attr("data-public-id"))}),"undefined"!=typeof selectedOptionPublicId&&this.getDetailsByLocalityPublicId(selectedOptionPublicId,e=>{var t=e.geometry.location.lat,o=e.geometry.location.lng;this.setSelection(selectedOptionPublicId);var a,s=r.split(", ");e=r[3]in this.countriesConfig?r[3]:"FR",$("input[name=street]").val(s[0]),$("input[name=zip]").val(s[1]),$("input[name=city]").val(s[2]),$("input[name=country]").val(e),this.goto(t,o,11),12==$(".active .choix_delivery").data("id-trans
1porteur")?(a="mondialrelay_relais","undefined"!=typeof woosmap_provider&&woosmap_provider&&(a=12)):26!=$(".active .choix_delivery").data("id-transporteur")&&24!=$(".active .choix_delivery").data("id-transporteur")||(a="_mag","undefined"!=typeof woosmap_provider&&woosmap_provider&&(a=24)),loadMapDelivery(s[0]+"|"+s[1]+"|"+s[2]+"|"+e,a,$(".active .choix_delivery").data("id-transporteur")),selectedOptionPublicId=null})},completeLocalities:function(a){var e,s=$("#"+a),r=a+"-completion",i=$("#"+r);s.attr({list:r,autocomplete:"off"}),0==i.length&&(e=document.querySelectorAll("#"+r),$(e).remove(),(i=$(document.createElement("ul"))).addClass("autocomplete-results"),i.attr("id",r),i.css({display:"block"}),i.insertAfter(s)),s.on("input",()=>{this.autocomplete(s.val(),e=>{if(e){i.empty();let o=[];var t;for(t of($(e).each((e,t)=>{i.css({display:"block"}),o.push('<li class="autocomplete-item" data-type="store" data-public-id="'+t.public_id+'"><span class="autocomplete-icon icon-localities"></span><span class="autocomplete-text">'+t.description+"</span></li>")}),document.querySelector("#"+r).innerHTML=o.join(""),i.css({display:"block"}),document.querySelector(".autocomplete-results").querySelectorAll(".autocomplete-item")))t.addEventListener("click",function(){var e=this.querySelector(".autocomplete-text").textContent;s.val(e),e=new Event("input",{bubbles:!0}),$("#"+a).get(0).dispatchEvent(e),i.hide(),setTimeout(()=>{i.hide()},800)})}})})},gotoLocality:function(e){var t=$("#"+e);e=$("#"+e+"-completion");t.attr({autocomplete:"off"});var a=null,o=t.val().toLowerCase().replace(/[, ]+/," ");$("li",e).each((e,t)=>{t=$(t),optionText=t.text().toLowerCase().replace(/[, ]+/," "),optionText.includes(o)&&(a=t.attr("data-public-id"))}),null!==a&&this.getDetailsByLocalityPublicId(a,e=>{var t=e.geometry.location.lat,o=e.geometry.location.lng;this.setSelection(a),this.goto(t,o,11),a=null,setTimeout(()=>{this.updateList({location:{lat:t,lng:o}})},500)})},lastAutocomplete:null,autocomplete:function(e,t){if(e.length<3)return!1;if(null!==this.lastAutocomplete&&Date.now()-this.lastAutocomplete<300)return!1;this.lastAutocomplete=Date.now();var o,a="undefined"!=typeof lang_woosmap?lang_woosmap:"fr";if("undefined"!=typeof autocomplete_searchShop_countries)o=autocomplete_searchShop_countries;else switch(a){case"fr":o=["fr-fr","be","lu","mc"];break;case"en":o=["fr-fr","be","mc","pt"];break;case"es":o=["es","pt"];break;case"pt":o=["pt"];break;case"it":o=["it"];break;case"de":o=["de","at"];break;default:o=["fr-fr","be","lu","ch"]}var s=o.map(e=>"country:"+e).join("|"),r="https://api.woosmap.com/localities/autocomplete?key="+this.config.WOOSMAP_API_PUBLIC_KEY;r+="&types="+encodeURIComponent("shopping|address|locality|postal_code|admin_level|airport|train_station|metro_station|museum|tourist_attraction|amusement_park|art_gallery|zoo"),r+="&components="+encodeURIComponent(s),r+="&input="+encodeURIComponent(e),r+="&language="+encodeURIComponent(a),this.marker&&this.marker.position&&(r+="&location="+this.marker.position.lat()+","+this.marker.position.lng()),$.ajax({url:r,dataType:"json",success:e=>{e.localities&&t(e.localities)}}),$("#search_cp-completion").show()},lastGetDetailsByLocalityPublicId:null,getDetailsByLocalityPublicId:function(e,t){if(null!==this.lastGetDetailsByLocalityPublicId&&Date.now()-this.lastGetDetailsByLocalityPublicId<1e3)return!1;this.lastGetDetailsByLocalityPublicId=Date.now();var o="https://api.woosmap.com/localities/details?key="+this.config.WOOSMAP_API_PUBLIC_KEY;o+="&public_id="+encodeURIComponent(e),o+="&cc_format=alpha2",$.ajax({url:o,dataType:"json",success:e=>{e.result&&t(e.result)}})},initStoreDetailsPage:function(e,t,o){this.mapObject=new woosmap.map.Map(e,{center:{lat:t,lng:o},zoom:12,styles:woosmap_map_style});var a="img/maps/marker.png";if(o=document.querySelector('[class^="store_infos_"]'))switch(o.className.split("_").pop()){case"referent":a="img/maps/pin-bleu_resize.svg";break;case"ambassadeur":a="img/maps/pin-vert_resize.svg";break;case"essentiel":a="img/maps/pin-taupe_resize.svg";break;default:a="img/maps/marker.png"}this.marker=new woosmap.map.Marker({position:this.mapObject.getCenter(),icon:path_relative_root+a}),this.marker.setMap(this.mapObject)},lastAddressAutocomplete:null,initAddressAutocomplete:function(r){var i,n=r.inputSelector+":visible";i=r.tunnelV3&&!0===r.tunnelV3?$(r.inputSelector):$(r.inputSelector+":visible");var l="search_cp-completion",c=$("#"+l),e=document.querySelectorAll("#"+l);$(e).remove(),$(".pac-container").remove(),i.after(i),i.attr({autocomplete:"off"}),(c=$(document.createElement("ul"))).addClass("autocomplete-results"),c.attr("id",l),c.css({display:"block"}),c.insertAfter(i),i.on("input",()=>{var e=i.val();if(e.length<3)return!1;if(null!==this.lastAddressAutocomplete&&Date.now()-this.lastAddressAutocomplete<300)return!1;this.lastAddressAutocomplete=Date.now();var t,o="undefined"!=typeof lang_woosmap?lang_woosmap:"fr";if("undefined"!=typeof autocomplete_tunnel_countries)t=autocomplete_tunnel_countries;else switch(o){case"fr":t=["fr-fr","be","lu","mc"];break;case"en":t=["fr-fr","be","mc","pt"];break;case"es":t=["es","pt"];break;case"pt":t=["pt"];break;case"it":t=["it"];break;case"de":t=["de","at"];break;default:t=["fr-fr","be","lu","ch"]}var a=t.map(e=>"country:"+e).join("|"),s="https://api.woosmap.com/localities/autocomplete/?key="+MapsProviderService.config.WOOSMAP_API_PUBLIC_KEY;s+="&components="+encodeURIComponent(a),s+="&no_deprecated_fields=true",s+="&types="+encodeURIComponent("address|postal_code"),s+="&input="+encodeURIComponent(e),s+="&language="+encodeURIComponent(o),o={method:"GET",redirect:"follow",Referer:document.location.origin},fetch(s,o).then(e=>e.text()).then(e=>{var t;if((e=JSON.parse(e)).localities){c.empty();let s=[];for(t of($(e.localities).each((e,t)=>{var o,a;i.val()==t.description?(o="https://api.woosmap.com/localities/details/?key="+MapsProviderService.config.WOOSMAP_API_PUBLIC_KEY,o+="&public_id="+encodeURIComponent(t.public_id),a={method:"GET",redirect:"follow",Referer:document.location.origin},fetch(o,a).then(e=>e.text()).then(e=>{if((e=JSON.parse(e)).result){const t=document.querySelector('input[name="lat"]'),o=document.querySelector('input[name="lng"]');
1if(t&&o&&e.result.geometry&&e.result.geometry.location&&(t.value=e.result.geometry.location.lat,o.value=e.result.geometry.location.lng),r.outputSelectors.fieldset){$(r.outputSelectors.street).val("");const a=new Event("input",{bubbles:!0});$(e.result.address_components).each((e,t)=>{if(t.types.includes("street_number")){let e=$(r.outputSelectors.street);e.val(t.long_name+" "+e.val()),e.get(0).dispatchEvent(a),e.parent().addClass("w-nonempty")}else if(t.types.includes("route")){let e=$(r.outputSelectors.street);e.val(e.val()+" "+t.long_name),e.get(0).dispatchEvent(a),e.parent().addClass("w-nonempty")}else t.types.includes("postal_codes")?($(r.outputSelectors.zipcode).val(t.long_name),$(r.outputSelectors.zipcode).get(0).dispatchEvent(a),$(r.outputSelectors.zipcode).parent().addClass("w-nonempty")):t.types.includes("locality")?($(r.outputSelectors.city).val(t.long_name),$(r.outputSelectors.city).get(0).dispatchEvent(a),$(r.outputSelectors.city).parent().addClass("w-nonempty")):t.types.includes("country")&&($(r.outputSelectors.country).val(t.short_name),o=new Event("change",{bubbles:!0}),$(r.outputSelectors.country).get(0).dispatchEvent(o),$(r.outputSelectors.country).parent().addClass("w-nonempty"));var o;$(r.outputSelectors.fieldset).parent().show(),null!=MapsProviderService.device&&"mobile"==MapsProviderService.device&&0!=$(".elem_global ").length&&$(".elem_global ").hasClass("delivery")&&($(".elem_global ").show(),o=new CustomEvent("addressFormDisplayed"),window.dispatchEvent(o))})}}}).catch(e=>console.log("error",e))):s.push('<li class="autocomplete-item" data-type="store" data-public-id="'+t.public_id+'"><span class="autocomplete-icon icon-localities"></span><span class="autocomplete-text">'+t.description+"</span></li>")}),document.querySelector("#"+l).innerHTML=s.join(""),c.css({display:"block"}),document.querySelector(".autocomplete-results").querySelectorAll(".autocomplete-item")))t.addEventListener("click",function(){var e=this.querySelector(".autocomplete-text").textContent;i.val(e),e=new Event("input",{bubbles:!0}),$(n).get(0).dispatchEvent(e),c.hide(),setTimeout(()=>{c.hide(),$("#search_cp-completion.autocomplete-results").hide(),"function"==typeof elemGlobalShow&&elemGlobalShow()},600)})}}).catch(e=>console.log("error",e))}),"mobile"==MapsProviderService.device&&$(document).ready(function(){var e,t;$(".resetFields").length||(e=$('button[onclick="fetchMap.call(this)"]'),t=$('<button data-close="'+Translator.translate("delete")+'" class="button secondary resetFields cancel"><span>'+Translator.translate("delete")+"</span></button>"),e.after(t),$(".resetFields").click(function(e){$(".street").val(""),$(".city").val(""),$(".zip").val(""),$(".form_item_label label").show()}))})},onPlaceChange:function(){},formatPhone:function(e){return e.replace("+33","0").replace(/(.{2})(.{2})(.{2})(.{2})(.{2})/,"$1 $2 $3 $4 $5")},formatCountry:function(e){return e.replace("FR","France")},formatAddress:function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}};function updateDistanceMatrix(o,e,t){let a=[];o.forEach(e=>{a.push(e.location.lat+","+e.location.lng)}),a=a.join("|");var s="https://api.woosmap.com/distance/distancematrix/json?key="+woosmapProvider.config.WOOSMAP_API_PUBLIC_KEY;s+="&origins="+encodeURIComponent(e+","+t),s+="&destinations="+encodeURIComponent(a),s+="&units=metric",s+="&elements=distance",$.ajax({url:s,async:!1,dataType:"json",success:e=>{if("OK"==e.status)for(elementIndex in e.rows[0].elements){var t=e.rows[0].elements[elementIndex];if("OK"==t.status){let e="";e=(t=t.distance.value)<1e3?Math.round(t)+" m":Math.trunc(t/100)/10+" km",this.distanceMatrix[o[elementIndex].storeId]={meters:t,display:e}}}}})}var googlemapsProvider={name:"googlemaps",getSdkUrl:function(){return null},initStoreDetailsPage:function(e,t,o){if(e){geocodeur=new google.maps.Geocoder,o={zoom:12,center:t=new google.maps.LatLng(t,o),mapId:google_map_id},map=new google.maps.Map(e,o);const a=document.createElement("img");a.src=path_relative_root+"img/maps/marker.png",new google.maps.marker.AdvancedMarkerElement({map:map,position:t,content:a}
1).setMap(map)}},initOrderDeliveryPage:function(e,t){},lastAddressAutocomplete:null,initAddressAutocomplete:function(e){},completeRelays:function(e){var t=$(e),a=(e="search_cp-completion",$("#"+e));t.attr({list:e,autocomplete:"on"}),0==a.length&&($("datalist").remove(),(a=$(document.createElement("datalist"))).attr("id",e),a.insertAfter(t)),t.on("input",()=>{this.autocomplete(t.val(),e=>{e&&(a.empty(),$(e).each((e,t)=>{var o=document.createElement("option");(o=$(o)).attr("value",t.description),o.attr("data-public-id",t.public_id),a.append(o)}))})})},rechercheProximite:function(e,t){$("#loading-image").fadeIn();var o="",a="";$("input[name='filtres[]']:checked").each(function(){o+="&filtres[]="+$(this).val()});var N,Q,s=document.getElementById("search_cp").value;a+="search="+(s=s.substr(0,20)===Translator.translate("default_address_begin")?"":s)+o,a+="&pays="+encodeURIComponent(document.getElementById("search_pays").value),a+="&pays_id="+$("#search_pays").find(":selected").data("id"),document.getElementById("pdv")&&""!==document.getElementById("pdv").value&&(a+="&pdv="+encodeURIComponent(document.getElementById("pdv").value)),document.getElementById("produit_id")&&""!==document.getElementById("produit_id").value&&(o+="&produit_id="+encodeURIComponent(document.getElementById("produit_id").value),a+="&produit_id="+encodeURIComponent(document.getElementById("produit_id").value)),document.getElementById("cataloguesWrapper")&&""!=magasin_filtre_nom?(o+="&magasin_filtre_nom="+magasin_filtre_nom,a+="&magasin_filtre_nom="+magasin_filtre_nom):document.getElementById("magasin_filtre_nom")&&(document.getElementById("magasin_filtre_nom").getAttribute("filtre_nom")?(o+="&magasin_filtre_nom="+document.getElementById("magasin_filtre_nom").getAttribute("filtre_nom"),a+="&magasin_filtre_nom="+document.getElementById("magasin_filtre_nom").getAttribute("filtre_nom")):(o+="&magasin_filtre_nom="+document.getElementById("magasin_filtre_nom").value,a+="&magasin_filtre_nom="+document.getElementById("magasin_filtre_nom").value)),type_call="auto";var r=$("#retailers_map");r.css("width","100%"),a=void 0!==e?(type_call="button",e.coords||e.lat&&e.lng?(r.length&&(s={zoom:12,center:e,mapId:google_map_id},r={gridSize:80,imagePath:path_relative_root+"img/maps/cluster"},maCarte=new google.maps.Map(document.getElementById("retailers_map"),s),clusterer=new markerClusterer.MarkerClusterer({map:maCarte,markers:markers,options:r,renderer:clustererRenderer}),boundChanched(maCarte,markersArray),markers=[]),Q=e.coords?(N=e.coords.latitude,e.coords.longitude):(N=e.lat,e.lng),a=o,a+="&pays="+encodeURIComponent(document.getElementById("search_pays").value),a+="&pays_id="+$("#search_pays").find(":selected").data("id"),path_relative_root+"ajax_generate_xml_map.php?lat="+N+"&lng="+Q+"&"+a):path_relative_root+"ajax_generate_xml_map.php?lat="+e.geometry.location.lat()+"&lng="+e.geometry.location.lng()+"&"+a):path_relative_root+"ajax_generate_xml_map.php?"+a,no_result=!1,horaire_txt=Translator.translate("horaires_map"),close_txt=Translator.translate("closed"),null!=typeof t&&t||initSearch(),downloadUrl(a,"100km",type_call,function(e){var t=e.responseXML.documentElement.getElementsByTagName("marqueur");clearOverlays();var o=document.getElementById("liste_distributeur");if(""!==document.getElementById("search_cp").value&&(o.innerHTML=""),0===t.length)return $(".resultat_recherche").hide(),$("#loading-image").fadeIn(),displayLoader("show"),o.innerHTML='<span class="no_result">'+Translator.translate("txt_no_near_shop")+"</span>",maCarte&&(n=new google.maps.LatLng(46.864716,2.22),maCarte.setCenter(n),maCarte.setZoom(6)),void("button"==type_call&&(displayLoader("show"),$("#loading-image").fadeOut(),$("#nb_magasins").html(""),document.getElementById("liste_distributeur").innerHTML='<span class="no_result">'+Translator.translate("txt_no_near_shop")+"</span>",$(".liste_recherche_distributeur").fadeIn()));"button"===type_call&&($("#loading-image").fadeOut(),$(".liste_recherche_distributeur").fadeIn(),$(".wrapper_retailers_map").length&&window.scrollTo(0,$(".wrapper_retailers_map").offset().top-$("#site_head_wrap").height()));var a="";$("#search_cp").val()&&(a="?search_cp="+encodeURI($("#search_cp").val())),void 0!==N&&void 0!==Q&&(""!=a?a+="&":a="?",a+="lat="+N+"&lng="+Q),$(".resultat_recherche").show(),$("#loading-image").fadeOut();var s=new google.maps.LatLngBounds,r=new Date,i=(r.getHours()<10?"0":"")+r.getHours();i+=(r.getMinutes()<10?"0":"")+r.getMinutes();for(var n,l=0;l<t.length;l++){var c=t[l].getAttribute("nom"),d=t[l].getAttribute("adresse"),p=t[l].getAttribute("ville"),u=t[l].getAttribute("cp"),m=t[l].getAttribute("pays"),h=t[l].getAttribute("magasin_id"),g=t[l].getAttribute("stock"),v=t[l].getAttribute("stock-status"),_=t[l].getAttribute("client_id"),y=t[l].getAttribute("favorite"),f=t[l].getAttribute("contact_by_store"),b=new Array;
1if(t[l].hasChildNodes())for(var w=t[l].childNodes,S=0;S<w.length;S++)b.push(w[S].getAttribute("picture_filtre"));4===u.length&&"France"===m&&(u="0"+u);var k,I,C,L,T,P,A=t[l].getAttribute("magasin_id"),M=t[l].getAttribute("image"),x=t[l].getAttribute("horaire"),O=horaire_close=0;null!=t[l].getAttribute("horaire_open")&&""!=t[l].getAttribute("horaire_open")&&(O=t[l].getAttribute("horaire_open").replace(/:/g,""),horaire_close=t[l].getAttribute("horaire_close").replace(/:/g,""),k=t[l].getAttribute("horaire_open").replace(":","h"),I=t[l].getAttribute("horaire_close").replace(":","h"),t[l].getAttribute("horaire_close_pause")&&t[l].getAttribute("horaire_open_pause")&&""!=t[l].getAttribute("horaire_close_pause")&&""!=t[l].getAttribute("horaire_open_pause")&&(C=t[l].getAttribute("horaire_close_pause").replace(/:/g,""),L=t[l].getAttribute("horaire_open_pause").replace(/:/g,""),T=t[l].getAttribute("horaire_close_pause").replace(":","h"),P=t[l].getAttribute("horaire_open_pause").replace(":","h")));var E=0;parseInt(O)<parseInt(i)&&parseInt(i)<parseInt(horaire_close)&&(E=1);var j=t[l].getAttribute("horaire_today");x?E?k&&I&&(j=null!=typeof C&&null!=L?store_open_until_3a+k+store_open_until_3b+T+store_open_until_3d+P+store_open_until_3b+I+store_open_until_3c:store_open_until_2.replace(/\%s/,I)):j=close_txt:j="",""!==t[l].getAttribute("horaire_plus")&&(x+="<br><br>"+t[l].getAttribute("horaire_plus")),""!==t[l].getAttribute("holiday")&&(x+="<br>"+t[l].getAttribute("holiday"));var B,R=t[l].getAttribute("url"),U=t[l].getAttribute("tel"),z=t[l].getAttribute("email"),D=t[l].getAttribute("site"),F=t[l].getAttribute("magasin_type"),H=t[l].getAttribute("flag_available"),W=parseFloat(t[l].getAttribute("lat")),q=parseFloat(t[l].getAttribute("lng"));t[l].getAttribute("distance")&&(B=parseFloat(t[l].getAttribute("distance")));var G="";t[l].getAttribute("filtres").length&&(G=t[l].getAttribute("filtres")),O=new google.maps.LatLng(parseFloat(t[l].getAttribute("lat")),parseFloat(t[l].getAttribute("lng"))),F=creerMarqueur(O,c,d,p,u,m,x,U,z,D,M,F,l+1,A,R),q=creerLigneListe(l+1,A,c,d,p,u,m,E,j,B,F,b,h,g,v,_,y,f,H,R,G,U,a,W,q),o.appendChild(q),markers.push(F),s.extend(O),$("#pdvBox").is(":visible")&&($("#pdvBox").addClass("deployed"),setTimeout(function(){$(".liste_distributeur_wrapper").overlayScrollbars({overflow:{x:"hidden"}})},250))}$("#nb_magasins").html(t.length+" "+Translator.translate("recherche_magasins")),$(".liste_distributeur_wrapper").overlayScrollbars({overflow:{x:"hidden"}}),maCarte&&($("#retailers_map").length&&(e={zoom:12,center:n=new google.maps.LatLng(storeLat,storeLng),mapId:google_map_id},r={gridSize:80,imagePath:path_relative_root+"img/maps/cluster"},maCarte=new google.maps.Map(document.getElementById("retailers_map"),e),clusterer=new markerClusterer.MarkerClusterer({map:maCarte,markers:markers,options:r,renderer:clustererRenderer}),boundChanched(maCarte,markersArray),markers=[]),"France"===document.getElementById("search_pays").value&&""===document.getElementById("search_cp").value?(n=new google.maps.LatLng(46.864716,2.2),maCarte.setZoom(6),maCarte.setCenter(n)):maCarte.setCenter(s.getCenter(),maCarte.fitBounds(s)),1===t.length&&maCarte.setZoom(16)),setTimeout(function(){$(".liste_recherche_distributeur").fadeIn()},50),displayLoader("show")})},lastAutocomplete:null,autocomplete:function(e,t){},geolocalisation:function(){navigator.geolocation.getCurrentPosition(function(e){displayLoader("hide"),e={lat:e.coords.latitude,lng:e.coords.longitude},rechercheProximite(e)})},geocodeAdresse:function(e,t){displayLoader("hide");var o="";o=document.getElementById("search_cp").value.trim();search_exceptions.includes(o)&&(o+=" france"),zipcode_rex.test(o)&&(o+=", France",document.getElementById("search_cp").value+=", France"),"undefined"!=geocodeur&&(geocodeur=new google.maps.Geocoder),""==o&&void 0===(o=get("search_cp"))&&(o=""),document.getElementById("produit_id")&&document.getElementById("produit_id").value,geocodeur.geocode({address:o},function(e,t){""===o?($("#retailers_map").length&&(initSearch(),clusterer=new markerClusterer.MarkerClusterer({map:maCarte,markers:markers,options:mcOptions,renderer:clustererRenderer}),boundChanched(maCarte,markersArray),markers=[]),rechercheProximite()):"select_pays"==type_call?rechercheProximite():t==google.maps.GeocoderStatus.OK?rechercheProximite(e[0]):(displayLoader("show"),alert(o+" "+Translator.translate("txt_introuvable")))})}};

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.