WME Diffinator

Display differences between two segments

// ==UserScript==
// @name         WME Diffinator
// @namespace    https://greasyfork.org/en/users/166843-wazedev
// @version      2023.03.13.01
// @description  Display differences between two segments
// @author       JustinS83
// @match        https://www.waze.com/editor*
// @match        https://www.waze.com/*/editor*
// @match        https://beta.waze.com/*
// @exclude      https://www.waze.com/user/editor*
// @exclude      https://www.waze.com/dashboard/editor
// @require      https://greasyfork.org/scripts/24851-wazewrap/code/WazeWrap.js
// @contributionURL https://github.com/WazeDev/Thank-The-Authors
// @grant        none
// ==/UserScript==

/* global W */
/* global OL */
/* ecmaVersion 2017 */
/* global $ */
/* global I18n */
/* global _ */
/* global WazeWrap */
/* eslint curly: ["warn", "multi-or-nest"] */

(function() {
    'use strict';

    var terminatorimg = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA+Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBkZWZhdWx0IHF1YWxpdHkK/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgBrgGuAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHC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fA8XgHQp9LivnvFluWuPMeMJglVXGAT/d/WutooAKKKKACiiigAooooAKKKKACvMPHfwifx5r39o3niOeCKNBHBbLbhliXvg7uSTyT9PSvT6KAPCf+GaLL/oZrj/wEX/4qj/hmiy/6Ga4/wDARf8A4qvdqKAPCf8Ahmiy/wChmuP/AAEX/wCKo/4Zosv+hmuP/ARf/iq92ooA8J/4Zosv+hmuP/ARf/iqP+GaLL/oZrj/AMBF/wDiq92ooA8J/wCGaLL/AKGa4/8AARf/AIqj/hmiy/6Ga4/8BF/+Kr3aigDwn/hmiy/6Ga4/8BF/+Ko/4Zosv+hmuP8AwEX/AOKr3aigDwn/AIZosv8AoZrj/wABF/8AiqP+GaLL/oZrj/wEX/4qvdqKAPCf+GaLL/oZrj/wEX/4qj/hmiy/6Ga4/wDARf8A4qvdqKAPCf8Ahmiy/wChmuP/AAEX/wCKo/4Zosv+hmuP/ARf/iq92ooA8e8MfAW08NeJbDWY9fnnazlEgia2ChvbO417DRRQAUUUUAf/2Q==";

    const updateMessage = "The Diffinator has installed updates to work with the WME changes and is ready to diff.";

    var attributeToTextMap={
        fwdDirection: "A -> B",
        revDirection: "B -> A",
        fwdMaxSpeed: I18n.translations[I18n.currentLocale()].edit.segment.speed_limit.fwdMaxSpeed + " " + I18n.translations[I18n.currentLocale()].edit.segment.fields.speed_limit,
        revMaxSpeed: I18n.translations[I18n.currentLocale()].edit.segment.speed_limit.revMaxSpeed + " " + I18n.translations[I18n.currentLocale()].edit.segment.fields.speed_limit,
        fwdMaxSpeedUnverified: "A -> B Unverified",
        revMaxSpeedUnverified: "B -> A Unverified",
        fwdToll: "Toll",
        //revToll: "Toll", //Current implementation only supports flagging of both directions even though data structure allows per direction
        level: I18n.translations[I18n.currentLocale()].edit.segment.fields.level,
        lockRank: "Lock Level",
        rank: "Auto Lock",
        roadType: I18n.translations[I18n.currentLocale()].edit.segment.fields.road_type,
        routingRoadType: I18n.translations[I18n.currentLocale()].edit.segment.fields.routing,
        flags: ""
    };

    function bootstrap(tries = 1) {
        if (W && W.map &&
            W.model && W.loginManager.user &&
            $ && WazeWrap.Ready)
            init();
        else if (tries < 1000)
            setTimeout(function () {bootstrap(tries++);}, 200);
    }

    bootstrap();

    function init(){
        injectCSS();
        W.selectionManager.events.register('selectionchanged', this, checkDisplayDiffinator);
        checkDisplayDiffinator();

        WazeWrap.Interface.ShowScriptUpdate("WME Diffinator", GM_info.script.version, updateMessage, "", "https://www.waze.com/forum/viewtopic.php?p=2339393");
    }

    function checkDisplayDiffinator(){
        if(WazeWrap.getSelectedFeatures().length === 2){
            setTimeout( function(){
                $('.segment .panel-header-component').append('<i class="fa fa-object-ungroup" aria-hidden="true" id="diffSegs" style="cursor:pointer;"></i>');

            $('#diffSegs').click(releaseTheDiffinator);
            }, 100 );
        }
        else
        {
            $('#SegDiffContainer').remove();
        }
    }

    function releaseTheDiffinator(){
        let selected = WazeWrap.getSelectedFeatures();
        let seg1St, seg2St;
        let streets = W.model.streets.getByIds([WazeWrap.getSelectedFeatures()[0].model.attributes.primaryStreetID, WazeWrap.getSelectedFeatures()[1].model.attributes.primaryStreetID]);
        seg1St = streets[0];
        seg2St = streets[1];
        let seg1Street = WazeWrap.getSelectedFeatures()[0].model.getAddress().attributes.street.name;
        let seg1City = WazeWrap.getSelectedFeatures()[0].model.getAddress().attributes.city.attributes.name;
        let seg2Street = WazeWrap.getSelectedFeatures()[1].model.getAddress().attributes.street.name;
        let seg2City = WazeWrap.getSelectedFeatures()[1].model.getAddress().attributes.city.attributes.name;
        let seg1Alts = WazeWrap.getSelectedFeatures()[0].model.getAddress().attributes.altStreets;
        let seg2Alts = WazeWrap.getSelectedFeatures()[1].model.getAddress().attributes.altStreets;

        $('#SegDiffContainer').remove();
        var $segDiff = $('<div>');
        $segDiff.html([
            '<div class="segDiffContainer" style="display: grid; position: absolute; z-index:1000; background-color:white; top:40px; left:300px; border-radius:20px; border: 2px solid; min-width: 650px; padding-left:10px; padding-right: =10px; padding-bottom:5px;" id="SegDiffContainer">',
            `<div class="segDiffHeader"><h3>The Diffinator<img width="50" height="50" src="${terminatorimg}"></h3><div style="position:absolute; float:right; cursor:pointer; top:0; right:10px;" id="segDiffClose"><i class="fa fa-window-close" aria-hidden="true"></i></div></div>`,
            '<div class="segDiffAttr"><h6>Attribute</h6></div>',
            `<div class="segDiffSeg1"><h6>Segment ${selected[0].model.attributes.id}</h6></div>`,
            `<div class="segDiffSeg2"><h6>Segment ${selected[1].model.attributes.id}</h6></div>`,
            '</div>'
        ].join(' '));

        $("#WazeMap").append($segDiff.html());

        $('#segDiffClose').click(function(){ $('#SegDiffContainer').remove(); });

        if(seg1Street !== seg2Street){
            if(seg1Street == "")
                seg1Street = "[Empty]";
            if(seg2Street == "")
                seg2Street = "[Empty]";
            $('.segDiffAttr').append(`<div>Street name</div>`);
            $('.segDiffSeg1').append(`<div>${seg1Street}</div>`);
            $('.segDiffSeg2').append(`<div>${seg2Street}</div>`);
        }
        if(seg1City !== seg2City){
            $('.segDiffAttr').append(`<div>Primary City</div>`);
            if(seg1City === "")
                seg1City = "None";
            if(seg2City === "")
                seg2City = "None";
            $('.segDiffSeg1').append(`<div>${seg1City}</div>`);
            $('.segDiffSeg2').append(`<div>${seg2City}</div>`);
        }

        for (var property in selected[0].model.attributes) {
            if (selected[0].model.attributes.hasOwnProperty(property)) {
                if(attributeToTextMap[property] !== undefined){
                    if(selected[0].model.attributes[property] != selected[1].model.attributes[property]){
                        if(property !== "flags"){
                            $('.segDiffAttr').append(`<div>${attributeToTextMap[property]}</div>`);

                            if(property=="roadType"){
                                $('.segDiffSeg1').append(`<div>${I18n.translations[I18n.currentLocale()].segment.road_types[selected[0].model.attributes[property]]}</div>`);
                                $('.segDiffSeg2').append(`<div>${I18n.translations[I18n.currentLocale()].segment.road_types[selected[1].model.attributes[property]]}</div>`);
                            }
                            else if(property == "routingRoadType"){
                                let rrt0 = I18n.translations[I18n.currentLocale()].edit.segment.routing.road_type.current;
                                let rrt1 = I18n.translations[I18n.currentLocale()].edit.segment.routing.road_type.current;
                                if(selected[0].model.attributes.routingRoadType !== null){
                                    if(isNextRoutingRoadType(selected[0].model.attributes.roadType,selected[0].model.attributes[property]))
                                        rrt0 = I18n.translations[I18n.currentLocale()].edit.segment.routing.road_type.next;
                                    else
                                        rrt0 = I18n.translations[I18n.currentLocale()].edit.segment.routing.road_type.prev;
                                }

                                if(selected[1].model.attributes.routingRoadType !== null){
                                    if(isNextRoutingRoadType(selected[1].model.attributes.roadType, selected[1].model.attributes[property]))
                                        rrt1 = I18n.translations[I18n.currentLocale()].edit.segment.routing.road_type.next;
                                    else
                                        rrt1 = I18n.translations[I18n.currentLocale()].edit.segment.routing.road_type.prev;
                                }

                                $('.segDiffSeg1').append(`<div>${rrt0}</div>`);
                                $('.segDiffSeg2').append(`<div>${rrt1}</div>`);
                            }
                            else{
                                $('.segDiffSeg1').append(`<div>${selected[0].model.attributes[property]}</div>`);
                                $('.segDiffSeg2').append(`<div>${selected[1].model.attributes[property]}</div>`);
                            }
                        }
                        else{
                            if(selected[0].model.attributes.flags & 1 || selected[1].model.attributes.flags & 1){
                                //Tunnel
                                $('.segDiffAttr').append(`<div>${I18n.translations[I18n.currentLocale()].edit.segment.fields.tunnel}</div>`);
                                $('.segDiffSeg1').append(`<div>${(selected[0].model.attributes.flags & 1) === 1}</div>`);
                                $('.segDiffSeg2').append(`<div>${(selected[1].model.attributes.flags & 1) === 1}</div>`);
                            }
                            if(selected[0].model.attributes.flags & 16 || selected[1].model.attributes.flags & 16){
                                //Unpaved
                                $('.segDiffAttr').append(`<div>${I18n.translations[I18n.currentLocale()].edit.segment.fields.unpaved}</div>`);
                                $('.segDiffSeg1').append(`<div>${(selected[0].model.attributes.flags & 16) === 16}</div>`);
                                $('.segDiffSeg2').append(`<div>${(selected[1].model.attributes.flags & 16) === 16}</div>`);
                            }
                            if(selected[0].model.attributes.flags & 32 || selected[1].model.attributes.flags & 32){
                                //Headlights
                                $('.segDiffAttr').append(`<div>${I18n.translations[I18n.currentLocale()].edit.segment.fields.headlights}</div>`);
                                $('.segDiffSeg1').append(`<div>${(selected[0].model.attributes.flags & 32) === 32}</div>`);
                                $('.segDiffSeg2').append(`<div>${(selected[1].model.attributes.flags & 32) === 32}</div>`);
                            }
                            if(selected[0].model.attributes.flags & 128 || selected[1].model.attributes.flags & 128){
                                //Nearby HOV
                                $('.segDiffAttr').append(`<div>${I18n.translations[I18n.currentLocale()].edit.segment.fields.nearbyHOV}</div>`);
                                $('.segDiffSeg1').append(`<div>${(selected[0].model.attributes.flags & 128) === 128}</div>`);
                                $('.segDiffSeg2').append(`<div>${(selected[1].model.attributes.flags & 128) === 128}</div>`);
                            }
                        }
                    }
                }
            }
        }
    }

    function isNextRoutingRoadType(roadType, routingRoadType) {
        switch (roadType) {
            case 1:
                if (routingRoadType == 2)
                    return true;
                break;
            case 2:
                if (routingRoadType == 7)
                    return true;
                break;
            case 3:
                if (routingRoadType == 6)
                    return false;
                break;
            case 6:
                if (routingRoadType == 3)
                    return true;
                break;
            case 7:
                if (routingRoadType == 6)
                    return true;
                break;
        }
        return false;
    };

    function injectCSS() {
        var css = [
            '.segDiffContainer { text-align: center; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto; grid-template-areas: "header header header" "segAttr seg1 seg2"}',
            '.segDiffHeader { grid-area: header }',
            '.segDiffAttr { grid-area: segAttr }',
            '.segDiffSeg1 { text-align: center; grid-area: seg1 }',
            '.segDiffSeg2 { text-align: center; grid-area: seg2 }'
        ].join(' ');
        $('<style type="text/css">' + css + '</style>').appendTo('head');
    }
})();