Update prettier version

This commit is contained in:
Gautier P 2020-12-05 11:50:30 +01:00
parent c49b821db7
commit 25429b3c24
42 changed files with 2480 additions and 2490 deletions

View file

@ -54,7 +54,7 @@
'vm-forum-velomobil-schnell',
'fastbike-lowtraffic',
'fastbike-asia-pacific',
'hiking-beta'
'hiking-beta',
];
// Removes default base layers when 'true'. Useful for only having custom layers (see below).
@ -84,22 +84,22 @@
weight: 5,
dashArray: [10, 10],
opacity: 0.6,
color: 'magenta'
color: 'magenta',
},
track: {
weight: 5,
color: 'magenta',
opacity: BR.conf.defaultOpacity
opacity: BR.conf.defaultOpacity,
},
trackCasing: {
weight: 8,
color: 'white',
// assumed to be same as track, see setOpacity
opacity: BR.conf.defaultOpacity
opacity: BR.conf.defaultOpacity,
},
nodata: {
color: 'darkred'
}
color: 'darkred',
},
};
BR.conf.markerColors = {
@ -107,7 +107,7 @@
poi: '#436978',
start: '#72b026',
via: '#38aadd',
stop: '#d63e2a'
stop: '#d63e2a',
};
// transit (intermodal routing) demo config
@ -121,7 +121,7 @@
'fastbike',
'shortest',
'moped',
'car-test'
'car-test',
];
}

View file

@ -34,16 +34,16 @@ var debug = false;
var paths = {
// see overrides in package.json
scriptsConfig: mainNpmFiles().filter(f => RegExp('url-search-params/.*\\.js', 'i').test(f)),
scriptsConfig: mainNpmFiles().filter((f) => RegExp('url-search-params/.*\\.js', 'i').test(f)),
scripts: [
'node_modules/jquery/dist/jquery.js',
'node_modules/tether/dist/js/tether.js',
'node_modules/async/lib/async.js',
'node_modules/leaflet/dist/leaflet-src.js'
'node_modules/leaflet/dist/leaflet-src.js',
]
.concat(
mainNpmFiles().filter(
f =>
(f) =>
RegExp('.*\\.js', 'i').test(f) &&
!RegExp('.*\\.min\\.js', 'i').test(f) &&
!RegExp('url-search-params/.*\\.js', 'i').test(f)
@ -58,13 +58,13 @@ var paths = {
'js/util/*.js',
'js/plugin/*.js',
'js/control/*.js',
'js/index.js'
'js/index.js',
]),
styles: mainNpmFiles()
.filter(f => RegExp('.*\\.css', 'i').test(f) && !RegExp('.*\\.min\\.css', 'i').test(f))
.filter((f) => RegExp('.*\\.css', 'i').test(f) && !RegExp('.*\\.min\\.css', 'i').test(f))
.concat('css/*.css'),
images: mainNpmFiles().filter(f => RegExp('.*.+(png|gif|svg)', 'i').test(f)),
fonts: mainNpmFiles().filter(f => RegExp('font-awesome/fonts/.*', 'i').test(f)),
images: mainNpmFiles().filter((f) => RegExp('.*.+(png|gif|svg)', 'i').test(f)),
fonts: mainNpmFiles().filter((f) => RegExp('font-awesome/fonts/.*', 'i').test(f)),
locales: 'locales/*.json',
layers: 'layers/**/*.geojson',
layersDestName: 'layers.js',
@ -72,12 +72,12 @@ var paths = {
'layers/config/config.js',
'layers/config/tree.js',
'layers/config/overrides.js',
'layers/config/geometry.js'
'layers/config/geometry.js',
],
layersConfigDestName: 'layersConf.js',
zip: ['dist/**', 'index.html', 'config.template.js', 'keys.template.js'],
dest: 'dist',
destName: 'brouter-web'
destName: 'brouter-web',
};
gulp.task('clean', function (cb) {
@ -129,13 +129,13 @@ gulp.task('styles', function() {
}
return distUrl;
}
},
})
)
.pipe(concat(paths.destName + '.css'))
.pipe(
cleanCSS({
rebase: false
rebase: false,
})
)
.pipe(postcss([autoprefixer({ remove: false })]))
@ -171,13 +171,7 @@ gulp.task('watch', function() {
gulp.watch(paths.locales, gulp.series('locales', 'reload'));
gulp.watch(paths.styles, gulp.series('styles', 'reload'));
gulp.watch(paths.layersConfig, gulp.series('layers_config', 'reload'));
gulp.watch(
['./index.html']
.concat(paths.images)
.concat(paths.fonts)
.concat(paths.locales),
gulp.series('reload')
);
gulp.watch(['./index.html'].concat(paths.images).concat(paths.fonts).concat(paths.locales), gulp.series('reload'));
});
// Print paths to console, for manually debugging the gulp build
@ -187,10 +181,7 @@ gulp.task('log', function() {
// var src = paths.styles
// var src = paths.images
// var src = paths.locales
var src = paths.scripts
.concat(paths.styles)
.concat(paths.images)
.concat(paths.locales);
var src = paths.scripts.concat(paths.styles).concat(paths.images).concat(paths.locales);
return gulp.src(src).pipe(gulpDebug());
});
@ -199,7 +190,7 @@ gulp.task('inject', function() {
var target = gulp.src('index.html');
var sources = gulp.src(paths.scripts.concat(paths.styles), {
base: '.',
read: false
read: false,
});
return target.pipe(inject(sources, { relative: true })).pipe(gulp.dest('.'));
@ -280,18 +271,15 @@ gulp.task('i18next', function() {
loadPath: 'locales/{{lng}}.json',
// the destination path is relative to your `gulp.dest()` path
savePath: 'locales/{{lng}}.json'
}
savePath: 'locales/{{lng}}.json',
},
})
)
.pipe(gulp.dest('.'));
});
gulp.task('layers_config', function () {
return gulp
.src(paths.layersConfig)
.pipe(concat(paths.layersConfigDestName))
.pipe(gulp.dest(paths.dest));
return gulp.src(paths.layersConfig).pipe(concat(paths.layersConfigDestName)).pipe(gulp.dest(paths.dest));
});
// Bundles layer files. To download and extract run "yarn layers"
@ -332,9 +320,9 @@ gulp.task(
gulp.series('debug', function (cb) {
server.init({
server: {
baseDir: './'
baseDir: './',
},
open: false
open: false,
});
cb();
})
@ -344,7 +332,7 @@ gulp.task('release:zip', function() {
gutil.log(gutil.colors.green('Build brouter-web.' + nextVersion + '.zip'));
return gulp
.src(paths.zip, {
base: '.'
base: '.',
})
.pipe(zip('brouter-web.' + nextVersion + '.zip'))
.pipe(gulp.dest('.'));
@ -358,7 +346,7 @@ gulp.task('release:zip_standalone', function() {
var brouterWeb = gulp
.src(paths.zip, {
base: '.'
base: '.',
})
.pipe(
rename(function (path) {
@ -372,10 +360,10 @@ gulp.task('release:zip_standalone', function() {
.src(
[
'misc/readmes/profile_developers_guide.txt',
'brouter-server/target/brouter-server-*-jar-with-dependencies.jar'
'brouter-server/target/brouter-server-*-jar-with-dependencies.jar',
],
{
cwd: path.join(process.cwd(), '../brouter')
cwd: path.join(process.cwd(), '../brouter'),
}
)
.pipe(
@ -392,22 +380,20 @@ gulp.task('release:zip_standalone', function() {
'!profiles2/all.brf',
'!profiles2/car-eco-suspect_scan.brf',
'!profiles2/car-traffic_analysis.brf',
'!profiles2/softaccess.brf'
'!profiles2/softaccess.brf',
],
{
cwd: path.join(process.cwd(), '../brouter/misc/'),
base: '../brouter/misc/'
base: '../brouter/misc/',
}
);
var serverScripts = gulp.src(['standalone/**'], {
cwd: path.join(process.cwd(), '../brouter/misc/scripts/'),
base: '../brouter/misc/scripts/'
base: '../brouter/misc/scripts/',
});
return merge(brouterWeb, root, serverRoot, serverProfiles, serverScripts)
.pipe(zip(destName))
.pipe(gulp.dest('.'));
return merge(brouterWeb, root, serverRoot, serverProfiles, serverScripts).pipe(zip(destName)).pipe(gulp.dest('.'));
});
gulp.task('release:publish', function () {
@ -415,7 +401,7 @@ gulp.task('release:publish', function() {
release({
tag: nextVersion,
token: ghToken,
manifest: pkg
manifest: pkg,
})
);
});

View file

@ -41,9 +41,7 @@
data-icon="fa-random"
id="alternative"
>
<option data-i18n="navbar.alternative.original" value="0" selected
>Original
</option>
<option data-i18n="navbar.alternative.original" value="0" selected>Original</option>
<option data-i18n="navbar.alternative.first" value="1">1st alternative</option>
<option data-i18n="navbar.alternative.second" value="2">2nd alternative</option>
<option data-i18n="navbar.alternative.third" value="3">3rd alternative</option>
@ -194,9 +192,7 @@
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" data-i18n="layers.customize">
Customize layers
</h4>
<h4 class="modal-title" data-i18n="layers.customize">Customize layers</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
@ -263,9 +259,7 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" data-i18n="about.title">
About
</h4>
<h4 class="modal-title" data-i18n="about.title">About</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
@ -358,20 +352,16 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" data-i18n="loadNogos.title">
Load no-go areas
</h4>
<h4 class="modal-title" data-i18n="loadNogos.title">Load no-go areas</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p id="nogoError" class="invalid-feedback" style="display: none;"></p>
<p id="nogoError" class="invalid-feedback" style="display: none"></p>
<form>
<fieldset>
<legend data-i18n="loadNogos.source">
Source
</legend>
<legend data-i18n="loadNogos.source">Source</legend>
<p>
<input type="text" id="nogoJSON" hidden />
<label for="nogoURL" data-i18n="loadNogos.url">URL: </label>
@ -382,9 +372,7 @@
</p>
</fieldset>
<fieldset>
<legend data-i18n="loadNogos.defaultProperties">
Default properties
</legend>
<legend data-i18n="loadNogos.defaultProperties">Default properties</legend>
<p>
<label for="nogoWeight" data-i18n="loadNogos.nogoWeight"
>No-go weight (-1 means impassable):
@ -441,9 +429,7 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" data-i18n="export.title">
Export route
</h4>
<h4 class="modal-title" data-i18n="export.title">Export route</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
@ -459,9 +445,7 @@
</div>
<fieldset id="export-format" class="form-group">
<div class="row">
<legend class="col-form-label col-sm-2" data-i18n="export.format">
Format
</legend>
<legend class="col-form-label col-sm-2" data-i18n="export.format">Format</legend>
<div class="col-sm-10">
<div class="form-check">
<label class="form-check-label">
@ -517,9 +501,7 @@
</fieldset>
<fieldset id="export-includes" class="form-group">
<div class="row">
<legend class="col-form-label col-sm-2" data-i18n="export.include">
Include
</legend>
<legend class="col-form-label col-sm-2" data-i18n="export.include">Include</legend>
<div class="col-sm-10">
<div class="form-check">
<label class="form-check-label">
@ -571,9 +553,7 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" data-i18n="trackasroute.title">
Load Track as Route
</h4>
<h4 class="modal-title" data-i18n="trackasroute.title">Load Track as Route</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
@ -596,7 +576,7 @@
<label
for="loadedittrackFile"
class="custom-file-label"
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
>
</label
><br />
@ -1020,9 +1000,7 @@
<div id="stats-container" class="flexrow flexgrow">
<ul id="stats">
<li>
<div class="text-muted small d-none d-md-block" data-i18n="footer.distance">
Distance
</div>
<div class="text-muted small d-none d-md-block" data-i18n="footer.distance">Distance</div>
<p class="stats-label">
<span id="distance">-</span>&#8239;<abbr
data-i18n="[title]footer.kilometer;footer.kilometer-abbrev"
@ -1032,9 +1010,7 @@
</p>
</li>
<li>
<div class="text-muted small d-none d-md-block" data-i18n="footer.travel-time">
Travel time
</div>
<div class="text-muted small d-none d-md-block" data-i18n="footer.travel-time">Travel time</div>
<p class="stats-label">
<span id="totaltime">-</span>&#8239;<abbr
data-i18n="[title]footer.hours;footer.hours-abbrev"

View file

@ -21,6 +21,6 @@
BR.Browser = {
touchScreen: touchScreen,
touchScreenDetectable: touchScreenDetectable,
touch: touch
touch: touch,
};
})();

View file

@ -29,7 +29,7 @@ BR.LayersConfig = L.Class.extend({
if (BR.Util.localStorageAvailable()) {
var defaultLayers = {
baseLayers: baseLayers,
overlays: overlays
overlays: overlays,
};
localStorage.setItem('map/defaultLayers', JSON.stringify(defaultLayers));
}
@ -45,9 +45,9 @@ BR.LayersConfig = L.Class.extend({
properties: {
id: id,
name: id.replace('.', ' '),
dataSource: 'leaflet-providers'
dataSource: 'leaflet-providers',
},
type: 'Feature'
type: 'Feature',
};
BR.layerIndex[id] = obj;
}
@ -162,7 +162,7 @@ BR.LayersConfig = L.Class.extend({
name = found[1];
result = {
name: name,
urlVar: prefix + name
urlVar: prefix + name,
};
}
@ -218,7 +218,7 @@ BR.LayersConfig = L.Class.extend({
var options = {
maxZoom: this._map.getMaxZoom(),
bounds: layerData.geometry && !props.worldTiles ? L.geoJson(layerData.geometry).getBounds() : null
bounds: layerData.geometry && !props.worldTiles ? L.geoJson(layerData.geometry).getBounds() : null,
};
if (props.mapUrl) {
options.mapLink =
@ -237,7 +237,7 @@ BR.LayersConfig = L.Class.extend({
layer = L.tileLayer.provider(props.id);
var layerOptions = L.Util.extend(options, {
maxNativeZoom: layer.options.maxZoom
maxNativeZoom: layer.options.maxZoom,
});
L.setOptions(layer, layerOptions);
} else if (props.dataSource === 'LayersCollection') {
@ -245,7 +245,7 @@ BR.LayersConfig = L.Class.extend({
url,
L.Util.extend(options, {
minZoom: props.minZoom || 0,
maxNativeZoom: props.maxZoom
maxNativeZoom: props.maxZoom,
})
);
if (props.subdomains) {
@ -260,7 +260,7 @@ BR.LayersConfig = L.Class.extend({
minZoom: props.min_zoom || 0,
maxNativeZoom: props.max_zoom,
subdomains: getSubdomains(josmUrl),
attribution: convertAttributionJosm(props)
attribution: convertAttributionJosm(props),
});
if (props.type && props.type === 'wms') {
@ -268,7 +268,7 @@ BR.LayersConfig = L.Class.extend({
url,
L.Util.extend(josmOptions, {
layers: props.layers,
format: props.format
format: props.format,
})
);
} else {
@ -287,7 +287,7 @@ BR.LayersConfig = L.Class.extend({
layer.id = props.id;
return layer;
}
},
});
BR.layersConfig = function (map) {

View file

@ -4,8 +4,8 @@ BR.Map = {
L.setOptions(this, {
shortcut: {
locate: 76 // char code for 'l'
}
locate: 76, // char code for 'l'
},
});
BR.keys = BR.keys || {};
@ -18,14 +18,14 @@ BR.Map = {
minZoom: 0,
maxZoom: maxZoom,
// fix for route drag on mobile (#285), until next Leaflet version released (> 1.6.0)
tap: false
tap: false,
});
if (BR.Util.getResponsiveBreakpoint() >= '3md') {
L.control
.zoom({
zoomInTitle: i18next.t('keyboard.generic-shortcut', { action: '$t(map.zoomInTitle)', key: '+' }),
zoomOutTitle: i18next.t('keyboard.generic-shortcut', { action: '$t(map.zoomOutTitle)', key: '-' })
zoomOutTitle: i18next.t('keyboard.generic-shortcut', { action: '$t(map.zoomOutTitle)', key: '-' }),
})
.addTo(map);
}
@ -77,7 +77,7 @@ BR.Map = {
minZoom: 1,
maxZoom: 19,
attribution:
'&copy; <a href="https://www.digitalglobe.com/platforms/mapsapi">DigitalGlobe</a> (<a href="https://bit.ly/mapsapiview">Terms of Use</a>)'
'&copy; <a href="https://www.digitalglobe.com/platforms/mapsapi">DigitalGlobe</a> (<a href="https://bit.ly/mapsapiview">Terms of Use</a>)',
}
);
baseLayers[i18next.t('map.layer.digitalglobe')] = recent;
@ -105,10 +105,10 @@ BR.Map = {
var locationControl = L.control
.locate({
strings: {
title: i18next.t('keyboard.generic-shortcut', { action: '$t(map.locate-me)', key: 'L' })
title: i18next.t('keyboard.generic-shortcut', { action: '$t(map.locate-me)', key: 'L' }),
},
icon: 'fa fa-location-arrow',
iconLoading: 'fa fa-spinner fa-pulse'
iconLoading: 'fa fa-spinner fa-pulse',
})
.addTo(map);
L.DomEvent.addListener(
@ -133,7 +133,7 @@ BR.Map = {
return {
map: map,
layersControl: layersControl
layersControl: layersControl,
};
},
@ -157,5 +157,5 @@ BR.Map = {
dl.appendChild(dd);
}
}
}
},
};

View file

@ -106,5 +106,5 @@ BR.Util = {
var temp = document.createElement('div');
temp.textContent = str;
return temp.innerHTML;
}
},
};

View file

@ -95,5 +95,5 @@ BR.ControlLayers = L.Control.Layers.extend({
layer.setZIndex(0);
}
}
}
},
});

View file

@ -3,8 +3,8 @@ BR.Export = L.Class.extend({
options: {
shortcut: {
export: 88 // char code for 'x'
}
export: 88, // char code for 'x'
},
},
initialize: function (router, pois) {
@ -88,13 +88,13 @@ BR.Export = L.Class.extend({
} else if (from === to) {
trackname.value = i18next.t('export.route-loop', {
from: from,
distance: distance
distance: distance,
});
} else {
trackname.value = i18next.t('export.route-from-to', {
from: from,
to: to,
distance: distance
distance: distance,
});
}
@ -137,7 +137,7 @@ BR.Export = L.Class.extend({
this._generateTrackname();
$('#export').modal('show');
}
}
},
});
BR.export = function () {

View file

@ -20,5 +20,5 @@ BR.Itinerary = L.Class.extend({
html += '</pre>';
this._content.innerHTML = html;
}
},
});

View file

@ -16,7 +16,7 @@ BR.Layers = L.Class.extend({
layersData.push([
layer,
this._customLayers[layer].layer._url,
this._customLayers[layer].isOverlay ? 'Overlay' : 'Layer'
this._customLayers[layer].isOverlay ? 'Overlay' : 'Layer',
]);
}
if (this._layersTable != null) {
@ -29,13 +29,13 @@ BR.Layers = L.Class.extend({
searching: false,
paging: false,
language: {
emptyTable: i18next.t('sidebar.layers.table.empty')
emptyTable: i18next.t('sidebar.layers.table.empty'),
},
columns: [
{ title: i18next.t('sidebar.layers.table.name') },
{ title: i18next.t('sidebar.layers.table.URL') },
{ title: i18next.t('sidebar.layers.table.type') }
]
{ title: i18next.t('sidebar.layers.table.type') },
],
});
},
@ -75,10 +75,7 @@ BR.Layers = L.Class.extend({
this._layersControl.removeLayer(this._customLayers[name].layer);
this._map.removeLayer(this._customLayers[name].layer);
delete this._customLayers[name];
this._layersTable
.row('.selected')
.remove()
.draw(false);
this._layersTable.row('.selected').remove().draw(false);
this._sync();
}
},
@ -106,7 +103,7 @@ BR.Layers = L.Class.extend({
this._customLayers[layerName] = {
layer: layer,
isOverlay: isOverlay
isOverlay: isOverlay,
};
if (isOverlay) {
@ -133,5 +130,5 @@ BR.Layers = L.Class.extend({
})
);
}
}
},
});

View file

@ -53,7 +53,7 @@ BR.LayersTab = BR.ControlLayers.extend({
self._layers[i].layer.setStyle({ opacity: opacity });
}
}
}
},
});
L.DomUtil.get('leaflet-control-layers-overlays-opacity-slider').appendChild(overlayOpacitySlider.getElement());
},
@ -163,23 +163,23 @@ BR.LayersTab = BR.ControlLayers.extend({
plugins: ['checkbox'],
checkbox: {
whole_node: false,
tie_selection: false
tie_selection: false,
},
core: {
multiple: false,
themes: {
icons: false,
dots: false
dots: false,
},
data: treeData,
},
data: treeData
}
});
this.jstree = $('#optional-layers-tree').jstree(true);
},
toJsTree: function (layerTree) {
var data = {
children: []
children: [],
};
var self = this;
@ -187,9 +187,9 @@ BR.LayersTab = BR.ControlLayers.extend({
var rootNode = {
text: i18next.t('sidebar.layers.category.' + name, name),
state: {
disabled: true
disabled: true,
},
children: []
children: [],
};
return rootNode;
}
@ -217,8 +217,8 @@ BR.LayersTab = BR.ControlLayers.extend({
id: id,
text: getText(props, parent),
state: {
checked: self.layersConfig.isDefaultLayer(id, props.overlay)
}
checked: self.layersConfig.isDefaultLayer(id, props.overlay),
},
};
}
return childNode;
@ -363,7 +363,7 @@ BR.LayersTab = BR.ControlLayers.extend({
renderer: L.svg({ padding: 1 }),
color: '#333',
fillOpacity: 0.4,
weight: 2
weight: 2,
}).addTo(this._map);
}
},
@ -471,7 +471,7 @@ BR.LayersTab = BR.ControlLayers.extend({
}
}
}
}
},
});
BR.layersTab = function (baseLayers, overlays, options) {

View file

@ -2,7 +2,7 @@ BR.Message = L.Class.extend({
options: {
// true to manually attach click event to close button,
// Bootstrap data-api's auto-initialization doesn't work in Controls because of stopPropagation
alert: false
alert: false,
},
initialize: function (id, options) {
@ -58,7 +58,7 @@ BR.Message = L.Class.extend({
showWarning: function (msg) {
this._show(msg, 'warning');
}
},
});
// static instance as global control

View file

@ -5,7 +5,7 @@ BR.OpacitySlider = L.Class.extend({
orientation: 'vertical',
defaultValue: BR.conf.defaultOpacity,
title: '',
callback: function(opacity) {}
callback: function (opacity) {},
},
initialize: function (options) {
@ -30,7 +30,7 @@ BR.OpacitySlider = L.Class.extend({
orientation: this.options.orientation,
reversed: this.options.reversed,
selection: this.options.reversed ? 'before' : 'after', // inverted, serves as track style, see css
tooltip: 'hide'
tooltip: 'hide',
})
.on('slide slideStop', { self: this }, function (evt) {
evt.data.self.options.callback(evt.value / 100);
@ -65,5 +65,5 @@ BR.OpacitySlider = L.Class.extend({
getElement: function () {
return this.input.slider('getElement');
}
},
});

View file

@ -1,6 +1,6 @@
BR.OpacitySliderControl = L.Control.extend({
options: {
position: 'topleft'
position: 'topleft',
},
onAdd: function (map) {
@ -49,5 +49,5 @@ BR.OpacitySliderControl = L.Control.extend({
});
return container;
}
},
});

View file

@ -5,7 +5,7 @@ BR.Profile = L.Evented.extend({
initialize: function () {
var textArea = L.DomUtil.get('profile_upload');
this.editor = CodeMirror.fromTextArea(textArea, {
lineNumbers: true
lineNumbers: true,
});
$('#profileEditorTabs a[data-toggle="tab"]').on(
@ -22,7 +22,7 @@ BR.Profile = L.Evented.extend({
this.pinned = L.DomUtil.get('profile-pinned');
this.message = new BR.Message('profile_message', {
alert: true
alert: true,
});
},
@ -110,7 +110,7 @@ BR.Profile = L.Evented.extend({
this.saveWarningShown = true;
}
}
}, this)
}, this),
});
},
@ -146,7 +146,7 @@ BR.Profile = L.Evented.extend({
that.profileName = profileId;
that.cache[profileId] = profileText;
}
}
},
});
},
@ -230,7 +230,7 @@ BR.Profile = L.Evented.extend({
description: description,
type: paramType,
value: value,
possible_values: paramValues
possible_values: paramValues,
};
}
});
@ -320,5 +320,5 @@ BR.Profile = L.Evented.extend({
} else {
this._setValue(this._buildCustomProfile(profileText));
}
}
},
});

View file

@ -1,8 +1,8 @@
BR.RoutingOptions = L.Evented.extend({
options: {
shortcut: {
switch: 71 // char code for 'g'
}
switch: 71, // char code for 'g'
},
},
initialize: function () {
@ -58,14 +58,14 @@ BR.RoutingOptions = L.Evented.extend({
return {
profile: profile.val(),
alternative: alternative.val()
alternative: alternative.val(),
};
},
setOptions: function (options) {
var values = [
options.profile ? options.profile : $('#profile option:selected').val(),
options.alternative ? options.alternative : $('#alternative option:selected').val()
options.alternative ? options.alternative : $('#alternative option:selected').val(),
];
$('.selectpicker').selectpicker('val', values);
this.refreshUI();
@ -125,5 +125,5 @@ BR.RoutingOptions = L.Evented.extend({
$('#profile-alternative-form button').click();
}
}
}
},
});

View file

@ -20,8 +20,8 @@ BR.TrackAnalysis = L.Class.extend({
opacity: 0.8,
weight: 8,
// show above quality coding (pane defined in RoutingPathQuality.js)
pane: 'routingQualityPane'
}
pane: 'routingQualityPane',
},
},
/**
@ -125,7 +125,7 @@ BR.TrackAnalysis = L.Class.extend({
var analysis = {
highway: {},
surface: {},
smoothness: {}
smoothness: {},
};
this.totalRouteDistance = 0.0;
@ -158,7 +158,7 @@ BR.TrackAnalysis = L.Class.extend({
),
name: wayTagParts[1],
subtype: trackType,
distance: 0.0
distance: 0.0,
};
}
analysis.highway[highwayType].distance += parseFloat(
@ -175,7 +175,7 @@ BR.TrackAnalysis = L.Class.extend({
),
name: wayTagParts[1],
subtype: '',
distance: 0.0
distance: 0.0,
};
}
analysis[wayTagParts[0]][wayTagParts[1]].distance += parseFloat(
@ -388,9 +388,7 @@ BR.TrackAnalysis = L.Class.extend({
toggleSelected: function (event) {
var tableRow = event.currentTarget;
var $table = $(tableRow)
.parents('table')
.first();
var $table = $(tableRow).parents('table').first();
var dataType = $table.data('type');
var dataName = $(tableRow).data('name');
var trackType = $(tableRow).data('subtype');
@ -512,5 +510,5 @@ BR.TrackAnalysis = L.Class.extend({
}
return result;
}
},
});

View file

@ -5,10 +5,10 @@ BR.TrackMessages = L.Class.extend({
opacity: 0.8,
weight: 8,
// show above quality coding (pane defined in RoutingPathQuality.js)
pane: 'routingQualityPane'
pane: 'routingQualityPane',
},
// center hovered edge (way segment) on map
syncMap: true
syncMap: true,
},
// true when tab is shown, false when hidden
@ -23,7 +23,7 @@ BR.TrackMessages = L.Class.extend({
ElevCost: { title: 'elev$', className: 'dt-body-right' },
TurnCost: { title: 'turn$', className: 'dt-body-right' },
NodeCost: { title: 'node$', className: 'dt-body-right' },
InitialCost: { title: 'initial$', className: 'dt-body-right' }
InitialCost: { title: 'initial$', className: 'dt-body-right' },
},
/**
@ -89,7 +89,7 @@ BR.TrackMessages = L.Class.extend({
// (^= minimum height with flexbox?)
scrollY: 50,
scrollX: true,
order: []
order: [],
});
// highlight track segment (graph edge) on row hover
@ -112,9 +112,7 @@ BR.TrackMessages = L.Class.extend({
if ($.fn.DataTable.isDataTable('#datatable')) {
// destroy option too slow on update, really remove elements with destroy method
$('#datatable')
.DataTable()
.destroy(true);
$('#datatable').DataTable().destroy(true);
// recreate original table element, destroy removes all
ele = document.createElement('table');
@ -135,7 +133,7 @@ BR.TrackMessages = L.Class.extend({
for (k = 0; k < headings.length; k++) {
defaultOptions = {
title: headings[k],
visible: !emptyColumns[k]
visible: !emptyColumns[k],
};
options = L.extend(defaultOptions, this.columnOptions[headings[k]]);
columns.push(options);
@ -210,5 +208,5 @@ BR.TrackMessages = L.Class.extend({
button.classList.toggle('active');
this.options.syncMap = !this.options.syncMap;
}
},
});

View file

@ -12,7 +12,7 @@ BR.TrackStats = L.Class.extend({
var stats = this.calcStats(polyline, segments),
length1 = L.Util.formatNum(stats.trackLength / 1000, 1).toLocaleString(),
length3 = L.Util.formatNum(stats.trackLength / 1000, 3).toLocaleString(undefined, {
minimumFractionDigits: 3
minimumFractionDigits: 3,
}),
formattedAscend = stats.filteredAscend.toLocaleString(),
formattedPlainAscend = stats.plainAscend.toLocaleString(),
@ -46,7 +46,7 @@ BR.TrackStats = L.Class.extend({
plainAscend: 0,
totalTime: 0,
totalEnergy: 0,
cost: 0
cost: 0,
};
var i, props;
@ -61,5 +61,5 @@ BR.TrackStats = L.Class.extend({
}
return stats;
}
},
});

View file

@ -42,14 +42,14 @@
iconBase: 'fa',
tickIcon: 'fa-check',
// don't overlap with footer
windowPadding: [0, 0, 40, 0]
windowPadding: [0, 0, 40, 0],
});
search = new BR.Search();
map.addControl(search);
$('#map .leaflet-control-geocoder > button')[0].title = i18next.t('keyboard.generic-shortcut', {
action: '$t(map.geocoder)',
key: 'F'
key: 'F',
});
router = L.bRouter(); //brouterCgi dummyRouter
@ -65,8 +65,8 @@
},
title: i18next.t('keyboard.generic-shortcut', {
action: '$t(map.draw-route-stop)',
key: '$t(keyboard.escape)'
})
key: '$t(keyboard.escape)',
}),
},
{
stateName: 'activate-draw',
@ -77,10 +77,10 @@
},
title: i18next.t('keyboard.generic-shortcut', {
action: '$t(map.draw-route-start)',
key: 'D'
})
}
]
key: 'D',
}),
},
],
});
var reverseRouteButton = L.easyButton(
@ -90,7 +90,7 @@
},
i18next.t('keyboard.generic-shortcut', {
action: '$t(map.reverse-route)',
key: 'R'
key: 'R',
})
);
@ -101,7 +101,7 @@
},
i18next.t('keyboard.generic-shortcut', {
action: '$t(map.delete-last-point)',
key: 'Z'
key: 'Z',
})
);
@ -112,7 +112,7 @@
},
i18next.t('keyboard.generic-shortcut', {
action: '$t(map.clear-route)',
key: '$t(keyboard.backspace)'
key: '$t(keyboard.backspace)',
})
);
@ -141,16 +141,16 @@
inputOptions: [
{
text: i18next.t('map.delete-route'),
value: 'route'
value: 'route',
},
{
text: i18next.t('map.delete-nogo-areas'),
value: 'nogo'
value: 'nogo',
},
{
text: i18next.t('map.delete-pois'),
value: 'pois'
}
value: 'pois',
},
],
value: ['route'],
callback: function (result) {
@ -167,7 +167,7 @@
onUpdate();
urlHash.onMapMove();
}
}
},
});
}
@ -196,11 +196,11 @@
BR.NogoAreas.MSG_BUTTON = i18next.t('keyboard.generic-shortcut', {
action: '$t(map.nogo.draw)',
key: 'N'
key: 'N',
});
BR.NogoAreas.MSG_BUTTON_CANCEL = i18next.t('keyboard.generic-shortcut', {
action: '$t(map.nogo.cancel)',
key: '$t(keyboard.escape)'
key: '$t(keyboard.escape)',
});
BR.NogoAreas.MSG_CREATE = i18next.t('map.nogo.click-drag');
BR.NogoAreas.MSG_DISABLED = i18next.t('map.nogo.edit');
@ -224,7 +224,7 @@
if (!err) {
routingOptions.setCustomProfile(profileId, true);
updateRoute({
options: routingOptions.getOptions()
options: routingOptions.getOptions(),
});
} else {
profile.message.showError(err);
@ -244,19 +244,19 @@
routingOptions.setCustomProfile(null);
});
trackMessages = new BR.TrackMessages(map, {
requestUpdate: requestUpdate
requestUpdate: requestUpdate,
});
trackAnalysis = new BR.TrackAnalysis(map, {
requestUpdate: requestUpdate
requestUpdate: requestUpdate,
});
routingPathQuality = new BR.RoutingPathQuality(map, layersControl);
routing = new BR.Routing({
routing: {
router: L.bind(router.getRouteSegment, router)
router: L.bind(router.getRouteSegment, router),
},
styles: BR.conf.routingStyles
styles: BR.conf.routingStyles,
});
pois = new BR.PoiMarkers(routing);
@ -311,8 +311,8 @@
listeningTabs: {
tab_profile: profile,
tab_data: trackMessages,
tab_analysis: trackAnalysis
}
tab_analysis: trackAnalysis,
},
}).addTo(map);
if (BR.conf.transit) {
sidebar.showPanel('tab_itinerary');
@ -357,10 +357,10 @@
id: 'route',
title: i18next.t('map.opacity-slider-shortcut', {
action: '$t(map.opacity-slider)',
key: 'M'
key: 'M',
}),
muteKeyCode: 77, // m
callback: L.bind(routing.setOpacity, routing)
callback: L.bind(routing.setOpacity, routing),
})
);
@ -435,7 +435,7 @@
urlHash.onHashChangeCb = onHashChangeCb;
urlHash.onInvalidHashChangeCb = onInvalidHashChangeCb;
urlHash.init(map, {
layersControl: layersControl
layersControl: layersControl,
});
// activate configured default base layer or first if no hash,
@ -491,14 +491,14 @@
{
fallbackLng: 'en',
backend: {
loadPath: 'dist/locales/{{lng}}.json'
}
loadPath: 'dist/locales/{{lng}}.json',
},
},
function (err, t) {
jqueryI18next.init(i18next, $, { useOptionsAttr: true });
$('html').localize();
$('#aboutLinks').localize({
privacyPolicyUrl: BR.conf.privacyPolicyUrl || 'https://brouter.de/privacypolicy.html'
privacyPolicyUrl: BR.conf.privacyPolicyUrl || 'https://brouter.de/privacypolicy.html',
});
mapContext = BR.Map.initMap();

View file

@ -3,7 +3,7 @@ BR.BingLayer = L.BingLayer.extend({
maxZoom: 19,
attribution:
'<a target="_blank" href="https://www.bing.com/maps/">Bing Maps</a>' +
' (<a target="_blank" href="https://go.microsoft.com/?linkid=9710837">TOU</a>)'
' (<a target="_blank" href="https://go.microsoft.com/?linkid=9710837">TOU</a>)',
},
initialize: function (key, options) {
@ -26,5 +26,5 @@ BR.BingLayer = L.BingLayer.extend({
onRemove: function (map) {
L.BingLayer.prototype.onRemove.call(this, map);
map.removeControl(this._logo);
}
},
});

View file

@ -7,9 +7,9 @@ BR.CircleGoArea = L.Control.extend({
shortcut: {
draw: {
enable: 73, // char code for 'i'
disable: 27 // char code for 'ESC'
}
}
disable: 27, // char code for 'ESC'
},
},
},
initialize: function (routing, nogos, pois) {
this.routing = routing;
@ -34,8 +34,8 @@ BR.CircleGoArea = L.Control.extend({
},
title: i18next.t('keyboard.generic-shortcut', {
action: i18next.t('map.draw-circlego-start', { radius: radiusKm }),
key: 'I'
})
key: 'I',
}),
},
{
stateName: 'deactivate-circlego',
@ -45,10 +45,10 @@ BR.CircleGoArea = L.Control.extend({
},
title: i18next.t('keyboard.generic-shortcut', {
action: i18next.t('map.draw-circlego-stop', { radius: radiusKm }),
key: '$t(keyboard.escape)'
})
}
]
key: '$t(keyboard.escape)',
}),
},
],
});
map.on('routing:draw-start', function () {
@ -103,7 +103,13 @@ BR.CircleGoArea = L.Control.extend({
setOutsideArea: function (polygon) {
var inner = polygon.features[0].geometry.coordinates.concat(polygon.features[1].geometry.coordinates);
var world = [[180, 90], [-180, 90], [-180, -90], [180, -90], [180, 90]];
var world = [
[180, 90],
[-180, 90],
[-180, -90],
[180, -90],
[180, 90],
];
polygon.features[0].geometry.coordinates = [world, inner];
polygon.features[0].geometry.type = 'Polygon';
polygon.features.pop();
@ -121,9 +127,9 @@ BR.CircleGoArea = L.Control.extend({
opacity: 0.4,
fillColor: 'black',
fillOpacity: 0.4,
className: 'circlego-outside'
className: 'circlego-outside',
};
}
},
})
.on('click', L.DomEvent.stop)
.addTo(this.map);
@ -137,7 +143,7 @@ BR.CircleGoArea = L.Control.extend({
var self = this;
var icon = L.VectorMarkers.icon({
icon: 'home',
markerColor: BR.conf.markerColors.circlego
markerColor: BR.conf.markerColors.circlego,
});
var marker = L.marker([center[1], center[0]], { icon: icon, draggable: true, name: name })
.on('dragend', function (e) {
@ -223,20 +229,20 @@ BR.CircleGoArea = L.Control.extend({
properties: {},
geometry: {
type: 'LineString',
coordinates: inner.slice(n / 2 - 1)
}
coordinates: inner.slice(n / 2 - 1),
},
},
{
type: 'Feature',
properties: {},
geometry: {
type: 'LineString',
coordinates: inner.slice(0, n / 2 + 1)
}
}
]
coordinates: inner.slice(0, n / 2 + 1),
},
},
],
};
}
},
});
BR.CircleGoArea.include(L.Evented.prototype);

View file

@ -5,12 +5,12 @@ BR.Elevation = L.Control.Elevation.extend({
top: 20,
right: 30,
bottom: 30,
left: 60
left: 60,
},
theme: 'steelblue-theme',
shortcut: {
toggle: 69 // char code for 'e'
}
toggle: 69, // char code for 'e'
},
},
onAdd: function (map) {
@ -19,10 +19,7 @@ BR.Elevation = L.Control.Elevation.extend({
// revert registering touch events when touch screen detection is available and negative
// see https://github.com/MrMufflon/Leaflet.Elevation/issues/67
if (L.Browser.touch && BR.Browser.touchScreenDetectable && !BR.Browser.touchScreen) {
this._background
.on('touchmove.drag', null)
.on('touchstart.drag', null)
.on('touchstart.focus', null);
this._background.on('touchmove.drag', null).on('touchstart.drag', null).on('touchstart.focus', null);
L.DomEvent.off(this._container, 'touchend', this._dragEndHandler, this);
this._background
@ -112,5 +109,5 @@ BR.Elevation = L.Control.Elevation.extend({
if (BR.Util.keyboardShortcutsAllowed(e) && e.keyCode === this.options.shortcut.toggle) {
$('#elevation-btn').click();
}
}
},
});

View file

@ -3,9 +3,9 @@ BR.NogoAreas = L.Control.extend({
shortcut: {
draw: {
enable: 78, // char code for 'n'
disable: 27 // char code for 'ESC'
}
}
disable: 27, // char code for 'ESC'
},
},
},
statics: {
@ -16,7 +16,7 @@ BR.NogoAreas = L.Control.extend({
MSG_ENABLED:
'&square; = move / resize, <span class="fa fa-trash-o"></span> = delete,<br>click nogo to quit editing',
STATE_CREATE: 'no-go-create',
STATE_CANCEL: 'cancel-no-go-create'
STATE_CANCEL: 'cancel-no-go-create',
},
style: {
@ -25,14 +25,14 @@ BR.NogoAreas = L.Control.extend({
opacity: 0.5,
fillColor: null, //same as color by default
fillOpacity: 0.2,
dashArray: null
dashArray: null,
},
editStyle: {
color: '#fe57a1',
opacity: 0.6,
dashArray: '10, 10',
fillOpacity: 0.1
fillOpacity: 0.1,
},
initialize: function () {
@ -54,7 +54,7 @@ BR.NogoAreas = L.Control.extend({
circleEditorClass: BR.DeletableCircleEditor,
// FeatureGroup instead of LayerGroup to propagate events to members
editLayer: new L.FeatureGroup().addTo(map),
featuresLayer: this.drawnItems
featuresLayer: this.drawnItems,
}));
this.startDrawing = function (control) {
@ -76,15 +76,15 @@ BR.NogoAreas = L.Control.extend({
stateName: BR.NogoAreas.STATE_CREATE,
icon: 'fa-ban',
title: BR.NogoAreas.MSG_BUTTON,
onClick: this.startDrawing
onClick: this.startDrawing,
},
{
stateName: BR.NogoAreas.STATE_CANCEL,
icon: 'fa-ban active',
title: BR.NogoAreas.MSG_BUTTON_CANCEL,
onClick: this.stopDrawing
}
]
onClick: this.stopDrawing,
},
],
});
// prevent instant re-activate when turning off button by both Pointer and Click
@ -233,7 +233,7 @@ BR.NogoAreas = L.Control.extend({
var geoJSON = L.geoJson(turf.featureCollection(cleanedGeoJSONFeatures), {
onEachFeature: function (feature, layer) {
layer.options.nogoWeight = feature.properties.nogoWeight || nogoWeight;
}
},
});
var nogosPoints = geoJSON.getLayers().filter(function (e) {
return e.feature.geometry.type === 'Point';
@ -255,7 +255,7 @@ BR.NogoAreas = L.Control.extend({
}),
polylines: geoJSON.getLayers().filter(function (e) {
return e.feature.geometry.type === 'LineString';
})
}),
});
self._fireUpdate();
self.displayUploadError(undefined);
@ -299,7 +299,7 @@ BR.NogoAreas = L.Control.extend({
}),
polylines: this.drawnItems.getLayers().filter(function (e) {
return e instanceof L.Polyline && !(e instanceof L.Polygon);
})
}),
};
},
@ -351,7 +351,7 @@ BR.NogoAreas = L.Control.extend({
getButton: function () {
return this.button;
}
},
});
BR.NogoAreas.include(L.Evented.prototype);
@ -391,12 +391,12 @@ BR.Editable = L.Editable.extend({
createVertexIcon: function (options) {
return BR.Browser.touch ? new L.Editable.TouchVertexIcon(options) : new L.Editable.VertexIcon(options);
}
},
});
BR.EditingTooltip = L.Handler.extend({
options: {
closeTimeout: 2000
closeTimeout: 2000,
},
initialize: function (map, editTools, button) {
@ -434,7 +434,7 @@ BR.EditingTooltip = L.Handler.extend({
var layer = e.layer;
layer.bindTooltip(BR.NogoAreas.MSG_DISABLED, {
direction: 'bottom',
className: 'editing-tooltip'
className: 'editing-tooltip',
});
// Override to set position to south instead of center (circle latlng);
@ -461,7 +461,7 @@ BR.EditingTooltip = L.Handler.extend({
// offset wrong with 'auto' when switching direction
direction: 'right',
offset: L.point(5, 28),
className: 'editing-tooltip-create'
className: 'editing-tooltip-create',
});
// self-reference hack for _moveTooltip, as tooltip is not bound to layer
@ -536,7 +536,7 @@ BR.EditingTooltip = L.Handler.extend({
_disable: function (e) {
e.layer.setTooltipContent(BR.NogoAreas.MSG_DISABLED);
this._setCloseTimeout(e.layer);
}
},
});
BR.DeletableCircleEditor = L.Editable.CircleEditor.extend({
@ -611,7 +611,7 @@ BR.DeletableCircleEditor = L.Editable.CircleEditor.extend({
onVertexMarkerDrag: function (e) {
this._updateDeleteLatLng();
L.Editable.CircleEditor.prototype.onVertexMarkerDrag.call(this, e);
}
},
});
BR.DeleteMarker = L.Marker.extend({
@ -619,8 +619,8 @@ BR.DeleteMarker = L.Marker.extend({
draggable: false,
icon: L.divIcon({
iconSize: BR.Browser.touch ? new L.Point(24, 24) : new L.Point(16, 16),
className: 'leaflet-div-icon fa fa-trash-o nogo-delete-marker'
})
className: 'leaflet-div-icon fa fa-trash-o nogo-delete-marker',
}),
},
initialize: function (latlng, editor, options) {
@ -653,5 +653,5 @@ BR.DeleteMarker = L.Marker.extend({
onClick: function (e) {
this.editor.delete();
}
},
});

View file

@ -6,9 +6,9 @@ BR.PoiMarkers = L.Control.extend({
shortcut: {
draw: {
enable: 80, // char code for 'p'
disable: 27 // char code for 'ESC'
}
}
disable: 27, // char code for 'ESC'
},
},
},
initialize: function (routing) {
this.routing = routing;
@ -29,7 +29,7 @@ BR.PoiMarkers = L.Control.extend({
onClick: function () {
self.draw(true);
},
title: i18next.t('keyboard.generic-shortcut', { action: '$t(map.draw-poi-start)', key: 'P' })
title: i18next.t('keyboard.generic-shortcut', { action: '$t(map.draw-poi-start)', key: 'P' }),
},
{
stateName: 'deactivate-poi',
@ -39,10 +39,10 @@ BR.PoiMarkers = L.Control.extend({
},
title: i18next.t('keyboard.generic-shortcut', {
action: '$t(map.draw-poi-stop)',
key: '$t(keyboard.escape)'
})
}
]
key: '$t(keyboard.escape)',
}),
},
],
}).addTo(map);
map.on('routing:draw-start', function () {
@ -87,14 +87,14 @@ BR.PoiMarkers = L.Control.extend({
if (result !== null) {
self.addMarker(e.latlng, result);
}
}
},
});
},
addMarker: function (latlng, name) {
var icon = L.VectorMarkers.icon({
icon: 'star',
markerColor: BR.conf.markerColors.poi
markerColor: BR.conf.markerColors.poi,
});
var content = BR.Util.sanitizeHTMLContent(name) + '<br>';
@ -135,10 +135,10 @@ BR.PoiMarkers = L.Control.extend({
return this.markersLayer.getLayers().map(function (it) {
return {
latlng: it.getLatLng(),
name: it.options.name
name: it.options.name,
};
});
}
},
});
BR.PoiMarkers.include(L.Evented.prototype);

View file

@ -14,7 +14,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
showPointAsPoi: true,
simplifyTolerance: -1,
isTestMode: false,
simplifyLastKnownGood: 0.001
simplifyLastKnownGood: 0.001,
},
setDialogDraggable: function (jqDlgHeader) {
@ -25,7 +25,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
$('body').on('mousemove.draggable', function (mousemoveEvt) {
$draggable.closest('.modal-dialog').offset({
left: mousemoveEvt.pageX - x,
top: mousemoveEvt.pageY - y
top: mousemoveEvt.pageY - y,
});
});
$('body').one('mouseup', function () {
@ -40,7 +40,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
getSimplifiedCoords: function (tolerance) {
var simplifiedLine = turf.simplify(this._trackPoints.geometry, {
tolerance: tolerance,
highQuality: true
highQuality: true,
});
return simplifiedLine.coordinates;
},
@ -61,7 +61,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
L.circleMarker(simplifiedLatLngs[i], {
radius: 6,
fill: false,
color: '#FF0000'
color: '#FF0000',
})
);
}
@ -89,7 +89,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
showPointAsPoi: true,
simplifyTolerance: -1,
isTestMode: false,
simplifyLastKnownGood: 0.001
simplifyLastKnownGood: 0.001,
};
},
@ -236,9 +236,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
onFileChanged: function (e) {
if (!e.target.files[0]) return;
$(e.target)
.next('label')
.text(e.target.files[0].name);
$(e.target).next('label').text(e.target.files[0].name);
var testmode = this._options.isTestMode;
this.cleanup();
this._options.isTestMode = testmode;
@ -340,7 +338,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
var err = event.error;
BR.message.showError(
i18next.t('warning.tracks-load-error', {
error: err && err.message ? err.message : err
error: err && err.message ? err.message : err,
})
);
});
@ -383,7 +381,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
if (!this._options.isTestMode) this.addRoutingPoints();
this.onBusyChanged(false);
}
},
});
RouteLoader.include(L.Evented.prototype);

View file

@ -12,7 +12,7 @@ BR.Routing = L.Routing.extend({
normal: L.VectorMarkers.icon({ icon: 'circle', markerColor: BR.conf.markerColors.via }),
end: L.VectorMarkers.icon({ icon: 'stop', markerColor: BR.conf.markerColors.stop }),
draw: false,
opacity: 1
opacity: 1,
},
snapping: null,
zIndexOffset: -2000,
@ -22,16 +22,16 @@ BR.Routing = L.Routing.extend({
offset: 5000,
textFunction: function (distance) {
return distance / 1000;
}
},
},
shortcut: {
draw: {
enable: 68, // char code for 'd'
disable: 27 // char code for 'ESC'
disable: 27, // char code for 'ESC'
},
reverse: 82, // char code for 'r'
deleteLastPoint: 90 // char code for 'z'
}
deleteLastPoint: 90, // char code for 'z'
},
},
onAdd: function (map) {
@ -82,7 +82,7 @@ BR.Routing = L.Routing.extend({
L.divIcon({
className: 'line-mouse-marker',
iconAnchor: [8, 8], // size/2 + border/2
iconSize: [16, 16]
iconSize: [16, 16],
})
);
@ -205,10 +205,10 @@ BR.Routing = L.Routing.extend({
this.options.icons.opacity = opacity;
this._segments.setStyle({
opacity: sourceOpacity
opacity: sourceOpacity,
});
this._segmentsCasing.setStyle({
opacity: sourceOpacity
opacity: sourceOpacity,
});
this._waypoints.eachLayer(function (marker) {
marker.setOpacity(opacity);
@ -327,7 +327,7 @@ BR.Routing = L.Routing.extend({
color: this.options.styles.track.color,
opacity: this.options.styles.trailer.opacity,
dashArray: [10, 10],
className: 'loading-trailer'
className: 'loading-trailer',
});
this._loadingTrailerGroup.addLayer(loadingTrailer);
}
@ -413,5 +413,5 @@ BR.Routing = L.Routing.extend({
this._distanceMarkers = new L.DistanceMarkers(this.toPolyline(), this._map, distanceMarkersOpts);
this._map.addLayer(this._distanceMarkers);
}
}
},
});

View file

@ -2,8 +2,8 @@ BR.RoutingPathQuality = L.Control.extend({
options: {
shortcut: {
toggle: 67, // char code for 'c'
muteKeyCode: 77 // char code for 'm'
}
muteKeyCode: 77, // char code for 'm'
},
},
initialize: function (map, layersControl, options) {
@ -32,10 +32,10 @@ BR.RoutingPathQuality = L.Control.extend({
0.25: '#00ffff', // cyan
0.5: '#00ff00', // green
0.75: '#ffff00', // yellow
1.0: '#ff0000' // red
1.0: '#ff0000', // red
},
outlineColor: 'dimgray',
renderer: renderer
renderer: renderer,
},
valueFunction: function (latLng, prevLatLng) {
var deltaAltitude = latLng.alt - prevLatLng.alt, // in m
@ -44,8 +44,8 @@ BR.RoutingPathQuality = L.Control.extend({
return 0;
}
return (Math.atan(deltaAltitude / distance) * 180) / Math.PI;
}
})
},
}),
},
altitude: {
title: i18next.t('map.route-quality-shortcut', { action: '$t(map.route-quality-altitude)', key: 'C' }),
@ -53,12 +53,12 @@ BR.RoutingPathQuality = L.Control.extend({
provider: new HotLineQualityProvider({
hotlineOptions: {
outlineColor: 'dimgray',
renderer: renderer
renderer: renderer,
},
valueFunction: function (latLng) {
return latLng.alt;
}
})
},
}),
},
cost: {
title: i18next.t('map.route-quality-shortcut', { action: '$t(map.route-quality-cost)', key: 'C' }),
@ -66,7 +66,7 @@ BR.RoutingPathQuality = L.Control.extend({
provider: new HotLineQualityProvider({
hotlineOptions: {
outlineColor: 'dimgray',
renderer: renderer
renderer: renderer,
},
valueFunction: function (latLng) {
var feature = latLng.feature;
@ -78,9 +78,9 @@ BR.RoutingPathQuality = L.Control.extend({
distance;
}
return cost;
}
})
}
},
}),
},
};
this._initialProvider = this.options.initialProvider || 'incline';
this.selectedProvider = this._initialProvider;
@ -138,7 +138,7 @@ BR.RoutingPathQuality = L.Control.extend({
this._activate(btn);
}
}, this);
}, this)(nextState)
}, this)(nextState),
});
}
@ -148,7 +148,7 @@ BR.RoutingPathQuality = L.Control.extend({
}
this.routingPathButton = new L.easyButton({
states: states
states: states,
}).addTo(map);
return new L.DomUtil.create('div');
},
@ -211,7 +211,7 @@ BR.RoutingPathQuality = L.Control.extend({
this._muted = false;
this._activate(this.routingPathButton);
}
}
},
});
var HotLineQualityProvider = L.Class.extend({
@ -285,7 +285,7 @@ var HotLineQualityProvider = L.Class.extend({
}
return {
min: min,
max: max
max: max,
};
}
},
});

View file

@ -2,14 +2,14 @@ BR.Search = L.Control.Geocoder.extend({
options: {
geocoder: new L.Control.Geocoder.LatLng({
next: new L.Control.Geocoder.Nominatim({
serviceUrl: 'https://nominatim.openstreetmap.org/'
serviceUrl: 'https://nominatim.openstreetmap.org/',
}),
sizeInMeters: 800
sizeInMeters: 800,
}),
position: 'topleft',
shortcut: {
search: 70 // char code for 'f'
}
search: 70, // char code for 'f'
},
},
initialize: function (options) {
@ -17,7 +17,7 @@ BR.Search = L.Control.Geocoder.extend({
L.setOptions(this, {
// i18next.t will only return 'undefined' if it is called in a static context
// (e.g. when added directly to "options:" above), so we have to call it here
placeholder: i18next.t('map.geocoder-placeholder')
placeholder: i18next.t('map.geocoder-placeholder'),
});
L.DomEvent.addListener(document, 'keydown', this._keydownListener, this);
@ -25,7 +25,7 @@ BR.Search = L.Control.Geocoder.extend({
markGeocode: function (result) {
this._map.fitBounds(result.geocode.bbox, {
maxZoom: 17
maxZoom: 17,
});
this.clear();
@ -33,7 +33,7 @@ BR.Search = L.Control.Geocoder.extend({
interactive: false,
color: 'red',
opacity: 1,
weight: 3
weight: 3,
}).addTo(this._map);
return this;
@ -50,5 +50,5 @@ BR.Search = L.Control.Geocoder.extend({
$('#map .leaflet-control-geocoder')[0].dispatchEvent(new MouseEvent('mousedown'));
e.preventDefault();
}
}
},
});

View file

@ -9,12 +9,12 @@ BR.Sidebar = L.Control.Sidebar.extend({
defaultTabId: '',
shortcut: {
toggleTabs: 84 // char code for 't'
toggleTabs: 84, // char code for 't'
},
// Tabs to be notified when shown or hidden
// (tab div id -> object implementing show/hide methods)
listeningTabs: {}
listeningTabs: {},
},
initialize: function (id, options) {
@ -142,7 +142,7 @@ BR.Sidebar = L.Control.Sidebar.extend({
this.open(nextTab.attr('href').slice(1));
}
}
}
},
});
BR.sidebar = function (divId, options) {

View file

@ -15,8 +15,8 @@ BR.tracksLoader = function(map, layersControl, routing, pois) {
// File size limit in kb (default: 1024) ?
fileSizeLimit: 1024,
shortcut: {
open: 79 // char code for 'o'
}
open: 79, // char code for 'o'
},
},
_initContainer: function () {
@ -68,7 +68,7 @@ BR.tracksLoader = function(map, layersControl, routing, pois) {
$('#navbarLoadTracks')[0].click();
}
}
}
},
});
var tracksLoaderControl = new TracksLoader();
tracksLoaderControl.addTo(map);
@ -105,7 +105,7 @@ BR.tracksLoader = function(map, layersControl, routing, pois) {
var err = event.error;
BR.message.showError(
i18next.t('warning.tracks-load-error', {
error: err && err.message ? err.message : err
error: err && err.message ? err.message : err,
})
);
console.error(err);

View file

@ -127,5 +127,5 @@ L.DistanceMarkers = L.LayerGroup.extend({
i = Math.floor(i / 2);
}
return zoom;
}
},
});

View file

@ -31,7 +31,7 @@
center: new L.LatLng(lat, lon),
zoom: zoom,
layers: layers,
additional: additional
additional: additional,
};
}
} else {
@ -57,7 +57,7 @@
}),
(L.Hash.prototype = {
options: {
layerSeparator: ','
layerSeparator: ',',
},
map: null,
lastHash: null,
@ -268,7 +268,7 @@
}
}
}
}
},
});
L.hash = function (map, options) {
return new L.Hash(map, options);

View file

@ -4,22 +4,22 @@ BR.stravaSegments = function(map, layersControl) {
runningTitle: i18next.t('map.strava-shortcut', { action: '$t(map.strava-running)', key: 'S' }),
bikingTitle: i18next.t('map.strava-shortcut', { action: '$t(map.strava-biking)', key: 'S' }),
loadingTitle: i18next.t('map.loading'),
stravaToken: BR.keys.strava
stravaToken: BR.keys.strava,
})
.addTo(map);
layersControl.addOverlay(stravaControl.stravaLayer, i18next.t('map.layer.strava-segments'));
stravaControl.onError = function (err) {
BR.message.showError(
i18next.t('warning.strava-error', {
error: err && err.message ? err.message : err
error: err && err.message ? err.message : err,
})
);
};
L.setOptions(this, {
shortcut: {
toggleLayer: 83 // char code for 's'
}
toggleLayer: 83, // char code for 's'
},
});
// hide strava buttons when layer is inactive

View file

@ -12,7 +12,7 @@ L.BRouter = L.Class.extend({
CUSTOM_PREFIX: 'custom_',
isCustomProfile: function (profileName) {
return profileName && profileName.substring(0, 7) === L.BRouter.CUSTOM_PREFIX;
}
},
},
options: {},
@ -108,7 +108,7 @@ L.BRouter = L.Class.extend({
circlego = [
Number.parseFloat(circlego[0]),
Number.parseFloat(circlego[1]),
Number.parseInt(circlego[2])
Number.parseInt(circlego[2]),
];
opts.circlego = circlego;
}
@ -132,7 +132,7 @@ L.BRouter = L.Class.extend({
if (trackname)
args.push(
L.Util.template('trackname={trackname}', {
trackname: trackname
trackname: trackname,
})
);
if (exportWaypoints) args.push('exportWaypoints=1');
@ -248,11 +248,11 @@ L.BRouter = L.Class.extend({
elev: parseInt(featureMessage[5]),
turn: parseInt(featureMessage[6]),
node: parseInt(featureMessage[7]),
initial: parseInt(featureMessage[8])
initial: parseInt(featureMessage[8]),
},
distance: parseInt(featureMessage[3]),
wayTags: featureMessage[9],
nodeTags: featureMessage[10]
nodeTags: featureMessage[10],
};
},
@ -499,7 +499,7 @@ L.BRouter = L.Class.extend({
s += L.BRouter.NUMBER_SEPARATOR;
s += L.Util.formatNum(latLng.lat || latLng[0], L.BRouter.PRECISION);
return s;
}
},
});
L.bRouter = function (options) {

View file

@ -15,7 +15,7 @@ var brouterCgi = (function() {
toLat: L.Util.formatNum(latLngs[1].lat, PRECISION),
toLng: L.Util.formatNum(latLngs[1].lng, PRECISION),
profile: 'trekking',
alt: '0'
alt: '0',
};
var url = L.Util.template(URL_TEMPLATE, urlParams);
//console.log(url);
@ -24,6 +24,6 @@ var brouterCgi = (function() {
}
return {
getUrl: getUrl
getUrl: getUrl,
};
})();

View file

@ -15,7 +15,7 @@ BR.Track = {
var currentLayerId = layersControl.getActiveBaseLayer().layer.id;
return {
color: currentLayerId === 'cyclosm' ? 'yellow' : 'blue',
weight: 4
weight: 4,
};
},
interactive: false,
@ -29,9 +29,9 @@ BR.Track = {
interactive: false,
opacity: 0.7,
// prevent being on top of route markers
zIndexOffset: -1000
zIndexOffset: -1000,
});
}
},
};
},
@ -79,5 +79,5 @@ BR.Track = {
*/
isPoiPoint: function (geoJsonFeature) {
return turf.getType(geoJsonFeature) === 'Point' && !BR.Track.isRouteWaypoint(geoJsonFeature);
}
},
};

View file

@ -75,5 +75,5 @@ BR.TrackEdges = L.Class.extend({
lat = message[1] / 1000000;
return L.latLng(lat, lon);
}
},
});

View file

@ -15,6 +15,6 @@
strava: '',
// OpenMapSurfer (OpenRouteService API), https://openrouteservice.org/plans/
openrouteservice: ''
openrouteservice: '',
};
})();

View file

@ -109,8 +109,8 @@
"merge-stream": "^2.0.0",
"node-fetch": "^2.6.1",
"npmfiles": "^0.1.1",
"prettier": "^1.17.1",
"pretty-quick": "^1.10.0"
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0"
},
"overrides": {
"leaflet": {

264
yarn.lock
View file

@ -1231,6 +1231,11 @@
"@turf/invariant" "^5.1.5"
d3-voronoi "1.1.2"
"@types/minimatch@^3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
"@types/normalize-package-data@^2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
@ -1446,7 +1451,7 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1:
dependencies:
color-convert "^1.9.0"
ansi-styles@^4.0.0:
ansi-styles@^4.0.0, ansi-styles@^4.1.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
@ -1563,10 +1568,10 @@ array-differ@^1.0.0:
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031"
integrity sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=
array-differ@^2.0.3:
version "2.1.0"
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1"
integrity sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w==
array-differ@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b"
integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==
array-each@^1.0.0, array-each@^1.0.1:
version "1.0.1"
@ -1612,13 +1617,18 @@ array-sort@^1.0.0:
get-value "^2.0.6"
kind-of "^5.0.2"
array-union@^1.0.1, array-union@^1.0.2:
array-union@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=
dependencies:
array-uniq "^1.0.1"
array-union@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
array-uniq@^1.0.1, array-uniq@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
@ -1634,10 +1644,10 @@ arraybuffer.slice@~0.0.7:
resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675"
integrity sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==
arrify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=
arrify@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa"
integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==
asn1@~0.2.3:
version "0.2.4"
@ -2168,7 +2178,7 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
strip-ansi "^3.0.0"
supports-color "^2.0.0"
chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2:
chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
@ -2177,6 +2187,14 @@ chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
chalk@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4"
integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
chalk@~0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f"
@ -2561,15 +2579,6 @@ cosmiconfig@^5.2.0:
js-yaml "^3.13.1"
parse-json "^4.0.0"
cross-spawn@^5.0.1:
version "5.1.0"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=
dependencies:
lru-cache "^4.0.1"
shebang-command "^1.2.0"
which "^1.2.9"
cross-spawn@^6.0.0, cross-spawn@^6.0.5:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
@ -2581,6 +2590,15 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5:
shebang-command "^1.2.0"
which "^1.2.9"
cross-spawn@^7.0.0:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
dependencies:
path-key "^3.1.0"
shebang-command "^2.0.0"
which "^2.0.1"
css@2.X, css@^2.0.0:
version "2.2.4"
resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929"
@ -3237,19 +3255,6 @@ eventemitter3@^4.0.0:
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==
execa@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da"
integrity sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=
dependencies:
cross-spawn "^5.0.1"
get-stream "^3.0.0"
is-stream "^1.1.0"
npm-run-path "^2.0.0"
p-finally "^1.0.0"
signal-exit "^3.0.0"
strip-eof "^1.0.0"
execa@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
@ -3263,6 +3268,21 @@ execa@^1.0.0:
signal-exit "^3.0.0"
strip-eof "^1.0.0"
execa@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a"
integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==
dependencies:
cross-spawn "^7.0.0"
get-stream "^5.0.0"
human-signals "^1.1.1"
is-stream "^2.0.0"
merge-stream "^2.0.0"
npm-run-path "^4.0.0"
onetime "^5.1.0"
signal-exit "^3.0.2"
strip-final-newline "^2.0.0"
expand-brackets@^2.1.4:
version "2.1.4"
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
@ -3428,13 +3448,6 @@ find-up@^1.0.0:
path-exists "^2.0.0"
pinkie-promise "^2.0.0"
find-up@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c=
dependencies:
locate-path "^2.0.0"
find-up@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
@ -3699,6 +3712,13 @@ get-stream@^4.0.0:
dependencies:
pump "^3.0.0"
get-stream@^5.0.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3"
integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==
dependencies:
pump "^3.0.0"
get-value@^2.0.3, get-value@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
@ -4190,6 +4210,11 @@ has-flag@^3.0.0:
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
has-flag@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
has-gulplog@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce"
@ -4289,6 +4314,11 @@ http-signature@~1.2.0:
jsprim "^1.2.2"
sshpk "^1.7.0"
human-signals@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
husky@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/husky/-/husky-2.3.0.tgz#8b78ed24d763042df7fd899991985d65a976dd13"
@ -4374,16 +4404,16 @@ ignore-walk@^3.0.1:
dependencies:
minimatch "^3.0.4"
ignore@^3.3.7:
version "3.3.10"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==
ignore@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
ignore@^5.1.4:
version "5.1.8"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==
immutable@^3:
version "3.8.2"
resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3"
@ -4730,6 +4760,11 @@ is-stream@^1.1.0:
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
is-stream@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3"
integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==
is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
@ -5152,14 +5187,6 @@ localtunnel@^2.0.0:
openurl "1.1.1"
yargs "13.3.0"
locate-path@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=
dependencies:
p-locate "^2.0.0"
path-exists "^3.0.0"
locate-path@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
@ -5332,14 +5359,6 @@ loud-rejection@^1.0.0:
currently-unhandled "^0.4.1"
signal-exit "^3.0.0"
lru-cache@^4.0.1:
version "4.1.5"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==
dependencies:
pseudomap "^1.0.2"
yallist "^2.1.2"
make-iterator@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6"
@ -5543,10 +5562,10 @@ monotone-convex-hull-2d@^1.0.1:
dependencies:
robust-orientation "^1.1.3"
mri@^1.1.0:
version "1.1.4"
resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.4.tgz#7cb1dd1b9b40905f1fac053abe25b6720f44744a"
integrity sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==
mri@^1.1.5:
version "1.1.6"
resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.6.tgz#49952e1044db21dbf90f6cd92bc9c9a777d415a6"
integrity sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==
ms@2.0.0:
version "2.0.0"
@ -5558,14 +5577,15 @@ ms@^2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
multimatch@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-3.0.0.tgz#0e2534cc6bc238d9ab67e1b9cd5fcd85a6dbf70b"
integrity sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA==
multimatch@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3"
integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==
dependencies:
array-differ "^2.0.3"
array-union "^1.0.2"
arrify "^1.0.1"
"@types/minimatch" "^3.0.3"
array-differ "^3.0.0"
array-union "^2.1.0"
arrify "^2.0.1"
minimatch "^3.0.4"
multipipe@^0.1.2:
@ -5739,6 +5759,13 @@ npm-run-path@^2.0.0:
dependencies:
path-key "^2.0.0"
npm-run-path@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
dependencies:
path-key "^3.0.0"
npmfiles@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/npmfiles/-/npmfiles-0.1.1.tgz#081f51f98c9a4d488e6e15acc5989870c94db77b"
@ -5953,13 +5980,6 @@ p-finally@^1.0.0:
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
p-limit@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==
dependencies:
p-try "^1.0.0"
p-limit@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2"
@ -5974,13 +5994,6 @@ p-limit@^2.2.0:
dependencies:
p-try "^2.0.0"
p-locate@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=
dependencies:
p-limit "^1.1.0"
p-locate@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4"
@ -5995,11 +6008,6 @@ p-locate@^4.1.0:
dependencies:
p-limit "^2.2.0"
p-try@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=
p-try@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
@ -6112,6 +6120,11 @@ path-key@^2.0.0, path-key@^2.0.1:
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
path-key@^3.0.0, path-key@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
path-parse@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
@ -6313,10 +6326,10 @@ prelude-ls@~1.1.2:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
prettier@^1.17.1:
version "1.17.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.1.tgz#ed64b4e93e370cb8a25b9ef7fef3e4fd1c0995db"
integrity sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg==
prettier@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
pretty-bytes@^1.0.4:
version "1.0.4"
@ -6331,17 +6344,17 @@ pretty-hrtime@^1.0.0:
resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=
pretty-quick@^1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-1.10.0.tgz#d86cc46fe92ed8cfcfba6a082ec5949c53858198"
integrity sha512-uNvm2N3UWmnZRZrClyQI45hIbV20f5BpSyZY51Spbvn4APp9+XLyX4bCjWRGT3fGyVyQ/2/iw7dbQq1UUaq7SQ==
pretty-quick@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-3.1.0.tgz#cb172e9086deb57455dea7c7e8f136cd0a4aef6c"
integrity sha512-DtxIxksaUWCgPFN7E1ZZk4+Aav3CCuRdhrDSFZENb404sYMtuo9Zka823F+Mgeyt8Zt3bUiCjFzzWYE9LYqkmQ==
dependencies:
chalk "^2.3.0"
execa "^0.8.0"
find-up "^2.1.0"
ignore "^3.3.7"
mri "^1.1.0"
multimatch "^3.0.0"
chalk "^3.0.0"
execa "^4.0.0"
find-up "^4.1.0"
ignore "^5.1.4"
mri "^1.1.5"
multimatch "^4.0.0"
process-nextick-args@^2.0.0:
version "2.0.0"
@ -6376,11 +6389,6 @@ promise-polyfill@^8.1.0:
resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-8.1.0.tgz#30059da54d1358ce905ac581f287e184aedf995d"
integrity sha512-OzSf6gcCUQ01byV4BgwyUCswlaQQ6gzXc23aLQWhicvfX9kfsUiUhgt3CCQej8jDnl8/PhGF31JdHX2/MzF3WA==
pseudomap@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM=
psl@^1.1.24:
version "1.1.31"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184"
@ -7092,11 +7100,23 @@ shebang-command@^1.2.0:
dependencies:
shebang-regex "^1.0.0"
shebang-command@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
dependencies:
shebang-regex "^3.0.0"
shebang-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
shebang-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
@ -7533,6 +7553,11 @@ strip-eof@^1.0.0:
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
strip-final-newline@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
strip-indent@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"
@ -7569,6 +7594,13 @@ supports-color@^5.3.0, supports-color@^5.4.0:
dependencies:
has-flag "^3.0.0"
supports-color@^7.1.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
dependencies:
has-flag "^4.0.0"
sver-compat@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8"
@ -8125,6 +8157,13 @@ which@^1.2.14, which@^1.2.9:
dependencies:
isexe "^2.0.0"
which@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
dependencies:
isexe "^2.0.0"
wide-align@^1.1.0:
version "1.1.3"
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
@ -8238,11 +8277,6 @@ y18n@^4.0.0:
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4"
integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==
yallist@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=
yallist@^3.0.0, yallist@^3.0.3:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"