<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"use strict"; 
var adsbygoogle = window.adsbygoogle || [], 
    custom = {  
    domain: "rideanyway.com",                                          
    googleKey: "AIzaSyBhNMmvndKIPwQd5ULVQROgRLZpHLxeVIo",
    mapboxKey: "pk.eyJ1Ijoic2VyZ2V5LW92IiwiYSI6ImNqbGt3MWRybDByMGQzcG9zZnZ5cTdoYmMifQ.cSceyGcWb0T2zEv7wJhjcQ",    
    init: function() { 
        this.updatefare(), this.updatetownratelist(),this.initflex(),
        this.lazyimages(), this.places(), this.townbrowse(),                    
        /*,this.maps()*/ this.showmaps()
    },
    updatetownratelist: function() {
        var e = document.getElementById("updatetownratelist");
        e &amp;&amp; e.addEventListener("click", function(e) {
            return e.preventDefault(),
            town ? (custom.loading("show"),            
            void custom.lookupTown(town, function(e, t) {
                e ? (alert(e),
                custom.loading("hide")) : window.location.href = "http://taxirates-" +  t.townencodeid + "." + custom.domain
            })) : !1
        }, !1)
    },
    showmaps: function(e) {
        var e = document.getElementById("showmaplink");
        e &amp;&amp; e.addEventListener("click", function(e) { 
           e.preventDefault();
           var s = document.getElementById("showmapdiv");
           s.style.display = "none";
           custom.maps()
        })    
    },
    loadJS: function(e, t) {
        var n = window.document.getElementsByTagName("script")[0],
            a = window.document.createElement("script");
        return a.src = e, a.async = !0, n.parentNode.insertBefore(a, n), t &amp;&amp; "function" == typeof t &amp;&amp; (a.onload = t), a
    },
    loadCSS: function(e) {
        var t = document.createElement("link");
        t.rel = "stylesheet", t.type = "text/css", t.href = e, document.getElementsByTagName("head")[0].appendChild(t)
    },
    parseJSON: function(e) {
        try {
            return JSON.parse(e)
        } catch (e) {
            return null
        }
    },
    shuffle: function(e) {
        for (var t = e.length - 1; 0 &lt; t; t--) {
            var n = Math.floor(Math.random() * (t + 1)),
                a = e[t];
            e[t] = e[n], e[n] = a
        }
        return e
    },
    throttle: function(e, t) {
        var n = !1;
        return function() {
            n || (e.call(), n = !0, setTimeout(function() {
                n = !1
            }, t))
        }
    },
    isAnyPartOfElementInViewport: function(e) {
        var t = e.getBoundingClientRect(),
            n = window.innerHeight || document.documentElement.clientHeight,
            a = window.innerWidth || document.documentElement.clientWidth,
            o = t.top &lt;= n &amp;&amp; 0 &lt;= t.top + t.height,
            i = t.left &lt;= a &amp;&amp; 0 &lt;= t.left + t.width;
        return o &amp;&amp; i
    },
    lazyimages: function() {
        var t = Array.from(document.querySelectorAll("img[data-src]"));
        if ("IntersectionObserver" in window)
            for (var e = new IntersectionObserver(function(e, t) {
                    for (var n = 0; n &lt; e.length; n++) e[n].isIntersecting &amp;&amp; (e[n].target.setAttribute("src", e[n].target.getAttribute("data-src")), e[n].target.removeAttribute("data-src"), t.unobserve(e[n].target))
                }, {
                    root: null,
                    rootMargin: "0px",
                    threshold: 0
                }), n = 0; n &lt; t.length; n++) e.observe(t[n]);
        else {
            var a = custom.throttle(function() {
                for (var e = t.length; e--;) custom.isAnyPartOfElementInViewport(t[e]) &amp;&amp; (t[e].setAttribute("src", t[e].getAttribute("data-src")), t[e].removeAttribute("data-src"), t.splice(e, 1));
                0 === t.length &amp;&amp; (window.removeEventListener("resize", a), window.removeEventListener("scroll", a))
            }, 250);
            window.addEventListener("resize", a), window.addEventListener("scroll", a), a()
        }
    },
    loading: function(e) {
        var t = document.getElementById("loading");
        switch (e) {
            case "show":
                t || ((t = document.createElement("div")).id = "loading", t.className = "loading", t.innerText = "Loading", document.body.appendChild(t)), t.style.display = "block";
                break;
            case "hide":
                t &amp;&amp; (t.style.display = "none")
        }
    },  
    initflex: function() {  
        var e = document.getElementsByClassName("flex"); 
        if (0 &lt; e.length)
            for (var t = 0, n = e.length; t &lt; n; t++) {
                var a = e[t].getAttribute("data-type") || "auto",
                    o = "link" === a ? "8753795304" : "1440631709";
                "autorelaxed" === a &amp;&amp; (o = "1440631709"), e[t].innerHTML = '&lt;ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-7135221251051092" data-ad-slot="' + o + '" data-ad-format="' + a + '"&gt;&lt;/ins&gt;', (adsbygoogle = window.adsbygoogle || []).push({})
            }(adsbygoogle = window.adsbygoogle || []).push({
                google_ad_client: "ca-pub-7135221251051092",
                enable_page_level_ads: !0
            }), setTimeout(function() {
                var e = Array.from(document.getElementsByClassName("adsbygoogle")),
                    t = custom.shuffle([{                        
                        title: "Get €50 OFF your first Airbnb stay",
                        url: "https://goo.gl/jPhZCt"
                    }]);
                e[0] &amp;&amp; 0 === e[0].innerHTML.replace(/\s/g, "").length &amp;&amp; window.GoogleAnalyticsObject &amp;&amp; ga("send", "event", "Adblock");
                for (var n = 0, a = e.length; n &lt; a; n++) t[n] &amp;&amp; e[n] &amp;&amp; 0 === e[n].innerHTML.replace(/\s/g, "").length &amp;&amp; (e[n].outerHTML = '&lt;a href="' + t[n].url + '" class="link" rel="nofollow"&gt;' + t[n].title + "&lt;/a&gt;")
            }, 3600)
    },
    
    places: function() {
        var e = document.getElementById("calculator"),
            o = document.getElementById("pickup"),
            i = document.getElementById("dropoff"),
            r = document.getElementById("getfare"),
            t = !1;

        function n() {              
            if (t) return !0;
            t = !0, custom.loadJS("https://maps.googleapis.com/maps/api/js?libraries=places&amp;key=" + custom.googleKey, function() {
                o = new google.maps.places.Autocomplete(o), o.setFields(['address_components', 'adr_address', 'formatted_address', 'geometry', 'id', 'name', 'permanently_closed', 'place_id', 'type',  'vicinity']),
                i = new google.maps.places.Autocomplete(i), i.setFields(['address_components', 'adr_address', 'formatted_address', 'geometry', 'id', 'name', 'permanently_closed', 'place_id', 'type',  'vicinity']),
                e.addEventListener("submit", function(e) {
                    e.preventDefault()
                }, !1), r.addEventListener("click", function(e) {
                    e.preventDefault(), custom.loading("show"), r.disabled = !0;
                    var t = o.getPlace(),
                        n = i.getPlace();
                    if (!t || !n) return alert("Either pickup or drop off location is missing"), r.disabled = !1, custom.loading("hide"), !1;
                    var a = {
                        pickup_g: t,
                        pickup_name: t.name,
                        pickup_geo: t.geometry.location.lat() + "," + t.geometry.location.lng(), 
                        dropoff_g: n,
                        dropoff_name: n.name,
                        dropoff_geo: n.geometry.location.lat() + "," + n.geometry.location.lng() 
                    };
                    custom.lookupRoute(a, function(e, t) {
                        e ? (alert(e), r.disabled = !1, custom.loading("hide")) : window.location.href = "http://" + custom.domain + "/route/" + t.id
                    })
                }, !1)
            })
        }
        e &amp;&amp; o &amp;&amp; i &amp;&amp; (o.addEventListener("focus", n, !1), i.addEventListener("focus", n, !1))
    },
    
    
    
    townbrowse: function() {  
        var e = document.getElementById("townCalculator"), 
            o = document.getElementById('townText'),                  
            r = document.getElementById("townGo"), 
            t = !1;      
            
        function n() {             
            if (t) return !0;  
            t = !0, custom.loadJS("https://maps.googleapis.com/maps/api/js?libraries=places&amp;key=" + custom.googleKey, function() {
                o = new google.maps.places.Autocomplete(o,{types: ['(regions)']}), e.addEventListener("submit", function(e) {
                    e.preventDefault()
                }, !1), r.addEventListener("click", function(e) {
                    e.preventDefault(), custom.loading("show"), r.disabled = !0;
                    var t = o.getPlace();
                    if (!t) return alert("Location is missing"), r.disabled = !1, custom.loading("hide"), !1;
                    var a = {
                        town_g: t,
                        town_name: t.name,
                        town_formatted: t.formatted_address, 
                        town_geo: t.geometry.location.lat() + "," + t.geometry.location.lng() 
                        
                    };
                    custom.saveTown(a, function(e, t) {
                        e ? (alert(e), r.disabled = !1, custom.loading("hide")) :  window.location.href =  t.url
                    })  
                }, !1)
            })
        } 
        e &amp;&amp; o &amp;&amp; (o.addEventListener("focus", n, !1))
    },          
    
    lookupRoute: function(e, t) {
        if (!e)
            return t("Missing route"),
            !1;
        /*if (!e.pickup_name)
            return t("Missing pickup name"),
            !1; */
        if (!e.pickup_geo)
            return t("Missing pickup geo"),
            !1;
        /*if (!e.dropoff_name)
            return t("Missing dropoff name"),
            !1; */
        if (!e.dropoff_geo)
            return t("Missing dropoff geo"),
            !1;
        var o = new XMLHttpRequest;
        o.open("POST", "/api/routes.php", !0),
        o.setRequestHeader("Content-Type", "application/json; charset=UTF-8"),
        o.onload = function() {
            if (200 === o.status) {
                var e = JSON.parse(o.responseText);
                t(null , e)
            } else
                t("Oh sorry, there was an error. Please try again later!")
        }
        ,
        o.send(JSON.stringify(e))
    },
    
    saveTown: function(e, t) {
        if (!e)
            return t("Missing town"),
            !1;  
        var o = new XMLHttpRequest;
        o.open("POST", "/api/saveTown.php", !0),
        o.setRequestHeader("Content-Type", "application/json; charset=UTF-8"),
        o.onload = function() {
            if (200 === o.status) {
                var e = JSON.parse(o.responseText);
                t(null , e)
            } else
                t("Oh sorry, there was an error. Please try again later!")
        }
        ,
        o.send(JSON.stringify(e))
    }, 
    
    lookupTown: function(e, t) {
        if (!e)
            return t("Missing town"),
            !1;  
        var o = new XMLHttpRequest;
        o.open("POST", "/api/towns.php", !0),
        o.setRequestHeader("Content-Type", "application/json; charset=UTF-8"),
        o.onload = function() {
            if (200 === o.status) {
                var e = JSON.parse(o.responseText);
                t(null , e)
            } else
                t("Oh sorry, there was an error. Please try again later!")
        }
        ,
        o.send(JSON.stringify(e))
    }, 
    
   maps: function() {
        if (/bot|google|baidu|bing|msn|yandex/i.test(navigator.userAgent)) return !1;
        var a = document.getElementById("map");
        if (a) {
            if ("IntersectionObserver" in window) {
                var n = new IntersectionObserver(function(e, t) {
                    0 &lt; e.length &amp;&amp; e[0].isIntersecting &amp;&amp; (o(), n.disconnect())
                }, {
                    root: null,
                    rootMargin: "0px",
                    threshold: 0
                });
                n.observe(a)
            } else {
                var e = custom.throttle(function() {
                    custom.isAnyPartOfElementInViewport(a) &amp;&amp; (o(), window.removeEventListener("resize", e), window.removeEventListener("scroll", e))
                }, 250);
                window.addEventListener("resize", e), window.addEventListener("scroll", e), e()
            }
            var o = function() {
                custom.loadCSS("https://unpkg.com/leaflet@1.3.4/dist/leaflet.css"), custom.loadCSS("https://unpkg.com/leaflet-routing-machine@3.2.9/dist/leaflet-routing-machine.css"), custom.loadJS("https://unpkg.com/leaflet@1.3.4/dist/leaflet.js", function() {
                    custom.loadJS("https://unpkg.com/leaflet-routing-machine@3.2.9/dist/leaflet-routing-machine.js", function() { 
                        /*custom.loadJS("https://ahorn.lima-city.de/owm/leaflet/leaflet-languageselector.js", function() {  */ 
                        
                        var e = L.map("map"),
                            t = a.getAttribute("data-pickup").split(","),
                            n = a.getAttribute("data-dropoff").split(","); 
                        
                        L.tileLayer("https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}{r}.{ext}", {
                            attribution: '&lt;a href="http://stamen.com" rel="nofollow"&gt;Stamen Design&lt;/a&gt; &amp;amp; &lt;a href="http://www.openstreetmap.org/copyright"&gt;OpenStreetMap&lt;/a&gt;',
                            subdomains: "abcd",
                            minZoom: 0,
                            maxZoom: 16,
                            ext: "png"
                        }).addTo(e);   
                        L.Routing.control({
                            router: L.Routing.mapbox(custom.mapboxKey),
                            waypoints: [L.latLng(t[0], t[1]), L.latLng(n[0], n[1])],
                            routeWhileDragging: !1,
                            showAlternatives: !1,
                            draggableWaypoints: !1,
                            show: !1,
                            collapsible: !1, 
                            lineOptions: {
                                styles: [{
                                    color: "black",
                                    opacity: .15,
                                    weight: 9
                                }, {
                                    color: "white",
                                    opacity: .8,
                                    weight: 6
                                }, {
                                    color: "#1fbad6",
                                    opacity: 1,
                                    weight: 2
                                }]
                            }
                        }).addTo(e)
                    })
                   // })
                })
            }
        }
    },       
    
    updatefare: function() {
        var e = document.getElementById("update");
        e &amp;&amp; e.addEventListener("click", function(e) {
            return e.preventDefault(),
            route ? (custom.loading("show"),
            //window.GoogleAnalyticsObject &amp;&amp; ga("send", "event", "Route", "Update", route.pickup_name + " to " + route.dropoff_name),
            void custom.lookupRoute(route, function(e, t) {
                e ? (alert(e),
                custom.loading("hide")) : window.location.href = "http://" + custom.domain + "/route/"   + t.id
            })) : !1
        }, !1)
    }              
    
};
custom.init();</pre></body></html>