<commit_before>import 'leaflet'
import 'mapbox-gl-leaflet'

export function createMap (L, e, {
  dragging = undefined,
  scrollWheelZoom = undefined,
  zoomControl = undefined,
  minZoom = undefined,
  maxZoom = undefined,
  baseUrl = '',
  useVectorMap = '0',
  attribution = '',
  mapboxToken = '',
  omtToken = ''
} = {}) {
  const map = new L.Map(e, {
    dragging: dragging,
    scrollWheelZoom: scrollWheelZoom,
    zoomControl: zoomControl,
    minZoom: minZoom,
    maxZoom: maxZoom
  })

  if (useVectorMap === '1') {
    if (mapboxToken !== '') {
      L.mapboxGL({
        accessToken: mapboxToken,
        style: baseUrl
      }).addTo(map)
    } else {
      if (omtToken !== '') {
        L.mapboxGL({
          accessToken: 'no-token',
          style: baseUrl,
          transformRequest: function (url, resourceType) {
            if (resourceType === 'Tile' && url.indexOf('https://') === 0) {
              return {
                url: url + '?token=' + omtToken
              }
            }
          }
        }).addTo(map)
      } else {
        L.mapboxGL({
          accessToken: 'no-token',
          style: baseUrl
        }).addTo(map)
      }
    }
    const attributionLayer = L.tileLayer('', { attribution: attribution })
    attributionLayer.addTo(map)
  } else {
    let basemap = baseUrl + '{z}/{x}/{y}.png'
    let accessToken = ''
    if (mapboxToken !== '') {
      basemap = baseUrl + '{z}/{x}/{y}.png?access_token={accessToken}'
      accessToken = mapboxToken
    } else if (omtToken !== '') {
      basemap = baseUrl + '{z}/{x}/{y}.png?token={accessToken}'
      accessToken = omtToken
    }
    const baselayer = L.tileLayer(basemap, { attribution: attribution, accessToken: accessToken })
    baselayer.addTo(map)
  }

  return map
}
<commit_msg>maps/assets: Stop passing 'no-token'<commit_after>import 'leaflet'
import 'mapbox-gl-leaflet'

export function createMap (L, e, {
  dragging = undefined,
  scrollWheelZoom = undefined,
  zoomControl = undefined,
  minZoom = undefined,
  maxZoom = undefined,
  baseUrl = '',
  useVectorMap = '0',
  attribution = '',
  mapboxToken = '',
  omtToken = ''
} = {}) {
  const map = new L.Map(e, {
    dragging: dragging,
    scrollWheelZoom: scrollWheelZoom,
    zoomControl: zoomControl,
    minZoom: minZoom,
    maxZoom: maxZoom
  })

  if (useVectorMap === '1') {
    if (mapboxToken !== '') {
      L.mapboxGL({
        accessToken: mapboxToken,
        style: baseUrl
      }).addTo(map)
    } else {
      if (omtToken !== '') {
        L.mapboxGL({
          style: baseUrl,
          transformRequest: function (url, resourceType) {
            if (resourceType === 'Tile' && url.indexOf('https://') === 0) {
              return {
                url: url + '?token=' + omtToken
              }
            }
          }
        }).addTo(map)
      } else {
        L.mapboxGL({
          style: baseUrl
        }).addTo(map)
      }
    }
    const attributionLayer = L.tileLayer('', { attribution: attribution })
    attributionLayer.addTo(map)
  } else {
    let basemap = baseUrl + '{z}/{x}/{y}.png'
    let accessToken = ''
    if (mapboxToken !== '') {
      basemap = baseUrl + '{z}/{x}/{y}.png?access_token={accessToken}'
      accessToken = mapboxToken
    } else if (omtToken !== '') {
      basemap = baseUrl + '{z}/{x}/{y}.png?token={accessToken}'
      accessToken = omtToken
    }
    const baselayer = L.tileLayer(basemap, { attribution: attribution, accessToken: accessToken })
    baselayer.addTo(map)
  }

  return map
}

{'fraction_non_alphanumeric': 0.15199547127087462, 'fraction_numerical': 0.0016982734220209455, 'mean_word_length': 2.25414364640884, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '362049', 'n_tokens_mistral': 1169, 'n_tokens_neox': 1158, 'n_words': 235}