1function v(f){f.forEach(i=>{i.addEventListener("click",g=>{g.preventDefault();const s=i.getAttribute("data-station-city-override"),m=i.dataset.latitude,_=i.dataset.longitude,r=document.querySelectorAll(".get-there-sncf-reveal");if(r.length>0){const p=`/api/sncf_cities?lat=${m}&lon=${_}`;fetch(p).then(e=>e.json()).then(e=>{if(e.city){const o="https://www.sncf-connect.com/widget-external/web-widgets-external.js";if(document.querySelector(`script[src="${o}"]`)==null){let t=document.createElement("script");t.src=o,t.setAttribute("async",""),t.setAttribute("defer",""),document.body.append(t)}const y=e.city,b=["fr","nl","es","de","it"].includes(globals.current_locale)?globals.current_locale:"com",a=["fr","nl","es","de","it"].includes(globals.current_locale)?globals.current_locale:"en",h=`${a}-${a}`,d=e.distance_m?e.distance_m:"";r.forEach(t=>{const c=t.querySelector(".sncfconnect_container_booking");if(c!==null){const u=c.id;if(u!==null&&!c.classList.contains("is-initialized")&&(c.classList.add("is-initialized"),document.addEventListener("IvtsWidgetsExternal.Booking.Ready",({detail
1:n})=>{n.init(u,{titleIndex:0,isCompact:1,destination:{defaultValue:s===null?y:s,isDisabled:!1},tracking:{wizalyQueryParameters:`eaf-publisher=${globals.sncfconnect.publisher}&eaf-name=part_${b}_conv_${globals.sncfconnect.name}-widget-_tourisme_filrouge_tr-multiproduit_${a}_mk_202406&eaf-creative=creative&eaf-creativetype=1x1`}},h)})),s===null&&d>1e4){const n=t.querySelector(".sncfconnect-alert-message");if(n!==null&&!n.classList.contains("is-initialized")){n.classList.add("is-initialized");let l=d/1e3;l=Math.floor(l/10)*10,n.querySelector("span").innerHTML=`${l} km.`,n.classList.remove("hide")}}}})}}).catch(e=>{console.warn(e)})}})})}export{v as init};
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.