<commit_before>'use strict';

var historyArray = []; // [{ dom: <>, areaBounds: <>, screenBounds: <>, areaUrl: <>, address: <> }]
var savedAreasWindowInner = document.getElementById('saved-areas-window-inner');
var savedAreasWindow = document.getElementById('saved-areas-window');
var ua = navigator.userAgent;

savedAreasWindowInner.onclick = function (e) {
  if (e.srcElement.nodeName === 'IMG') {
    var targetId = Number(e.srcElement.id.split('-')[2]);
    var boundsBase = areaBounds[targetId];
    var screenBoundsBase = screenBounds[targetId];
    var sw = new mapboxgl.LngLat(boundsBase[0], boundsBase[1]);
    var ne = new mapboxgl.LngLat(boundsBase[2], boundsBase[3]);
    var bounds = new mapboxgl.LngLatBounds(sw, ne);
    var screenSw = new mapboxgl.LngLat(screenBoundsBase[0], screenBoundsBase[1]);
    var screenNe = new mapboxgl.LngLat(screenBoundsBase[2], screenBoundsBase[3]);
    var sBounds = new mapboxgl.LngLatBounds(screenSw, screenNe);

    updateTableImage(bounds);
    if (gotStreets === false) {
        gotStreets = true;
    } else {
      map.removeLayer(streetsLayerProps.id);
      map.removeSource(streetsLayerProps.id);
    }<commit_msg>preview: bugfix<commit_after>'use strict';

var historyArray = []; // [{ dom: <>, areaBounds: <>, screenBounds: <>, areaUrl: <>, address: <> }]
var savedAreasWindowInner = document.getElementById('saved-areas-window-inner');
var savedAreasWindow = document.getElementById('saved-areas-window');
var ua = navigator.userAgent;

savedAreasWindowInner.onclick = function (e) {
  if (e.srcElement.nodeName === 'IMG') {
    var targetId = Number(e.srcElement.id.split('-')[2]);
    var boundsBase = historyArray[targetId].areaBounds;
    var screenBoundsBase = historyArray[targetId].screenBounds;
    var sw = new mapboxgl.LngLat(boundsBase[0], boundsBase[1]);
    var ne = new mapboxgl.LngLat(boundsBase[2], boundsBase[3]);
    var bounds = new mapboxgl.LngLatBounds(sw, ne);
    var screenSw = new mapboxgl.LngLat(screenBoundsBase[0], screenBoundsBase[1]);
    var screenNe = new mapboxgl.LngLat(screenBoundsBase[2], screenBoundsBase[3]);
    var sBounds = new mapboxgl.LngLatBounds(screenSw, screenNe);

    updateTableImage(bounds);
    if (gotStreets === false) {
        gotStreets = true;
    } else {
      map.removeLayer(streetsLayerProps.id);
      map.removeSource(streetsLayerProps.id);
    }
{'fraction_non_alphanumeric': 0.14460370994940977, 'fraction_numerical': 0.007588532883642495, 'mean_word_length': 4.677033492822966, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2207428', 'n_tokens_mistral': 778, 'n_tokens_neox': 772, 'n_words': 145}