webpackJsonp([2],{
/***/ "./node_modules/Leaflet.Geodesic/Leaflet.Geodesic.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\n// This file is part of Leaflet.Geodesic.\n// Copyright (C) 2017 Henry Thasler\n// based on code by Chris Veness Copyright (C) 2014 https://github.com/chrisveness/geodesy\n//\n// Leaflet.Geodesic is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Leaflet.Geodesic is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Leaflet.Geodesic. If not, see .\n\n\n/** Extend Number object with method to convert numeric degrees to radians */\nif (typeof Number.prototype.toRadians === \"undefined\") {\n Number.prototype.toRadians = function() {\n return this * Math.PI / 180;\n };\n}\n\n/** Extend Number object with method to convert radians to numeric (signed) degrees */\nif (typeof Number.prototype.toDegrees === \"undefined\") {\n Number.prototype.toDegrees = function() {\n return this * 180 / Math.PI;\n };\n}\n\nvar INTERSECT_LNG = 179.999; // Lng used for intersection and wrap around on map edges\n\nL.Geodesic = L.Polyline.extend({\n options: {\n color: \"blue\",\n steps: 10,\n dash: 1,\n wrap: true\n },\n\n initialize: function(latlngs, options) {\n this.options = this._merge_options(this.options, options);\n this.options.dash = Math.max(1e-3, Math.min(1, parseFloat(this.options.dash) || 1));\n this.datum = {};\n this.datum.ellipsoid = {\n a: 6378137,\n b: 6356752.3142,\n f: 1 / 298.257223563\n }; // WGS-84\n this._latlngs = this._generate_Geodesic(latlngs);\n L.Polyline.prototype.initialize.call(this, this._latlngs, this.options);\n },\n\n setLatLngs: function(latlngs) {\n this._latlngs = this._generate_Geodesic(latlngs);\n L.Polyline.prototype.setLatLngs.call(this, this._latlngs);\n },\n\n /**\n * Calculates some statistic values of current geodesic multipolyline\n * @returns (Object} Object with several properties (e.g. overall distance)\n */\n getStats: function() {\n let obj = {\n distance: 0,\n points: 0,\n polygons: this._latlngs.length\n }, poly, points;\n\n for (poly = 0; poly < this._latlngs.length; poly++) {\n obj.points += this._latlngs[poly].length;\n for (points = 0; points < (this._latlngs[poly].length - 1); points++) {\n obj.distance += this._vincenty_inverse(this._latlngs[poly][points],\n this._latlngs[poly][points + 1]).distance;\n }\n }\n return obj;\n },\n\n\n /**\n * Creates geodesic lines from geoJson. Replaces all current features of this instance.\n * Supports LineString, MultiLineString and Polygon\n * @param {Object} geojson - geosjon as object.\n */\n geoJson: function(geojson) {\n\n let normalized = L.GeoJSON.asFeature(geojson);\n let features = normalized.type === \"FeatureCollection\" ? normalized.features : [\n normalized\n ];\n this._latlngs = [];\n for (let feature of features) {\n let geometry = feature.type === \"Feature\" ? feature.geometry :\n feature,\n coords = geometry.coordinates;\n\n switch (geometry.type) {\n case \"LineString\":\n this._latlngs.push(this._generate_Geodesic([L.GeoJSON.coordsToLatLngs(\n coords, 0)]));\n break;\n case \"MultiLineString\":\n case \"Polygon\":\n this._latlngs.push(this._generate_Geodesic(L.GeoJSON.coordsToLatLngs(\n coords, 1)));\n break;\n case \"Point\":\n case \"MultiPoint\":\n console.log(\"Dude, points can't be drawn as geodesic lines...\");\n break;\n default:\n console.log(\"Drawing \" + geometry.type +\n \" as a geodesic is not supported. Skipping...\");\n }\n }\n L.Polyline.prototype.setLatLngs.call(this, this._latlngs);\n },\n\n /**\n * Creates a great circle. Replaces all current lines.\n * @param {Object} center - geographic position\n * @param {number} radius - radius of the circle in metres\n */\n createCircle: function(center, radius) {\n let polylineIndex = 0;\n let prev = {\n lat: 0,\n lng: 0,\n brg: 0\n };\n let step;\n\n this._latlngs = [];\n this._latlngs[polylineIndex] = [];\n\n let direct = this._vincenty_direct(L.latLng(center), 0, radius, this.options\n .wrap);\n prev = L.latLng(direct.lat, direct.lng);\n this._latlngs[polylineIndex].push(prev);\n for (step = 1; step <= this.options.steps;) {\n direct = this._vincenty_direct(L.latLng(center), 360 / this.options\n .steps * step, radius, this.options.wrap);\n let gp = L.latLng(direct.lat, direct.lng);\n if (Math.abs(gp.lng - prev.lng) > 180) {\n let inverse = this._vincenty_inverse(prev, gp);\n let sec = this._intersection(prev, inverse.initialBearing, {\n lat: -89,\n lng: ((gp.lng - prev.lng) > 0) ? -INTERSECT_LNG : INTERSECT_LNG\n }, 0);\n if (sec) {\n this._latlngs[polylineIndex].push(L.latLng(sec.lat, sec.lng));\n polylineIndex++;\n this._latlngs[polylineIndex] = [];\n prev = L.latLng(sec.lat, -sec.lng);\n this._latlngs[polylineIndex].push(prev);\n } else {\n polylineIndex++;\n this._latlngs[polylineIndex] = [];\n this._latlngs[polylineIndex].push(gp);\n prev = gp;\n step++;\n }\n } else {\n this._latlngs[polylineIndex].push(gp);\n prev = gp;\n step++;\n }\n }\n\n L.Polyline.prototype.setLatLngs.call(this, this._latlngs);\n },\n\n /**\n * Creates a geodesic Polyline from given coordinates\n * Note: dashed lines are under work\n * @param {Object} latlngs - One or more polylines as an array. See Leaflet doc about Polyline\n * @returns (Object} An array of arrays of geographical points.\n */\n _generate_Geodesic: function(latlngs) {\n let _geo = [], _geocnt = 0;\n\n for (let poly = 0; poly < latlngs.length; poly++) {\n _geo[_geocnt] = [];\n let prev = L.latLng(latlngs[poly][0]);\n for (let points = 0; points < (latlngs[poly].length - 1); points++) {\n // use prev, so that wrapping behaves correctly\n let pointA = prev;\n let pointB = L.latLng(latlngs[poly][points + 1]);\n if (pointA.equals(pointB)) {\n continue;\n }\n let inverse = this._vincenty_inverse(pointA, pointB);\n _geo[_geocnt].push(prev);\n for (let s = 1; s <= this.options.steps;) {\n let distance = inverse.distance / this.options.steps;\n // dashed lines don't go the full distance between the points\n let dist_mult = s - 1 + this.options.dash;\n let direct = this._vincenty_direct(pointA, inverse.initialBearing, distance*dist_mult, this.options.wrap);\n let gp = L.latLng(direct.lat, direct.lng);\n if (Math.abs(gp.lng - prev.lng) > 180) {\n let sec = this._intersection(pointA, inverse.initialBearing, {\n lat: -89,\n lng: ((gp.lng - prev.lng) > 0) ? -INTERSECT_LNG : INTERSECT_LNG\n }, 0);\n if (sec) {\n _geo[_geocnt].push(L.latLng(sec.lat, sec.lng));\n _geocnt++;\n _geo[_geocnt] = [];\n prev = L.latLng(sec.lat, -sec.lng);\n _geo[_geocnt].push(prev);\n } else {\n _geocnt++;\n _geo[_geocnt] = [];\n _geo[_geocnt].push(gp);\n prev = gp;\n s++;\n } \n } else {\n _geo[_geocnt].push(gp);\n // Dashed lines start a new line\n if (this.options.dash < 1){\n _geocnt++;\n // go full distance this time, to get starting point for next line\n let direct_full = this._vincenty_direct(pointA, inverse.initialBearing, distance*s, this.options.wrap);\n _geo[_geocnt] = [];\n prev = L.latLng(direct_full.lat, direct_full.lng);\n _geo[_geocnt].push(prev);\n }\n else prev = gp;\n s++;\n }\n }\n }\n _geocnt++;\n }\n return _geo;\n },\n\n /**\n * Vincenty direct calculation.\n * based on the work of Chris Veness (https://github.com/chrisveness/geodesy)\n *\n * @private\n * @param {number} initialBearing - Initial bearing in degrees from north.\n * @param {number} distance - Distance along bearing in metres.\n * @returns (Object} Object including point (destination point), finalBearing.\n */\n\n _vincenty_direct: function(p1, initialBearing, distance, wrap) {\n var φ1 = p1.lat.toRadians(),\n λ1 = p1.lng.toRadians();\n var α1 = initialBearing.toRadians();\n var s = distance;\n\n var a = this.datum.ellipsoid.a,\n b = this.datum.ellipsoid.b,\n f = this.datum.ellipsoid.f;\n\n var sinα1 = Math.sin(α1);\n var cosα1 = Math.cos(α1);\n\n var tanU1 = (1 - f) * Math.tan(φ1),\n cosU1 = 1 / Math.sqrt((1 + tanU1 * tanU1)),\n sinU1 = tanU1 * cosU1;\n var σ1 = Math.atan2(tanU1, cosα1);\n var sinα = cosU1 * sinα1;\n var cosSqα = 1 - sinα * sinα;\n var uSq = cosSqα * (a * a - b * b) / (b * b);\n var A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 *\n uSq)));\n var B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));\n\n var σ = s / (b * A),\n σʹ, iterations = 0;\n var sinσ, cosσ;\n var cos2σM;\n do {\n cos2σM = Math.cos(2 * σ1 + σ);\n sinσ = Math.sin(σ);\n cosσ = Math.cos(σ);\n var Δσ = B * sinσ * (cos2σM + B / 4 * (cosσ * (-1 + 2 * cos2σM *\n cos2σM) -\n B / 6 * cos2σM * (-3 + 4 * sinσ * sinσ) * (-3 + 4 * cos2σM *\n cos2σM)));\n σʹ = σ;\n σ = s / (b * A) + Δσ;\n } while (Math.abs(σ - σʹ) > 1e-12 && ++iterations);\n\n var x = sinU1 * sinσ - cosU1 * cosσ * cosα1;\n var φ2 = Math.atan2(sinU1 * cosσ + cosU1 * sinσ * cosα1, (1 - f) *\n Math.sqrt(sinα * sinα + x * x));\n var λ = Math.atan2(sinσ * sinα1, cosU1 * cosσ - sinU1 * sinσ * cosα1);\n var C = f / 16 * cosSqα * (4 + f * (4 - 3 * cosSqα));\n var L = λ - (1 - C) * f * sinα *\n (σ + C * sinσ * (cos2σM + C * cosσ * (-1 + 2 * cos2σM * cos2σM)));\n\n var λ2;\n if (wrap) {\n λ2 = (λ1 + L + 3 * Math.PI) % (2 * Math.PI) - Math.PI; // normalise to -180...+180\n } else {\n λ2 = (λ1 + L); // do not normalize\n }\n\n var revAz = Math.atan2(sinα, -x);\n\n return {\n lat: φ2.toDegrees(),\n lng: λ2.toDegrees(),\n finalBearing: revAz.toDegrees()\n };\n },\n\n /**\n * Vincenty inverse calculation.\n * based on the work of Chris Veness (https://github.com/chrisveness/geodesy)\n *\n * @private\n * @param {LatLng} p1 - Latitude/longitude of start point.\n * @param {LatLng} p2 - Latitude/longitude of destination point.\n * @returns {Object} Object including distance, initialBearing, finalBearing.\n * @throws {Error} If formula failed to converge.\n */\n _vincenty_inverse: function(p1, p2) {\n var φ1 = p1.lat.toRadians(),\n λ1 = p1.lng.toRadians();\n var φ2 = p2.lat.toRadians(),\n λ2 = p2.lng.toRadians();\n\n var a = this.datum.ellipsoid.a,\n b = this.datum.ellipsoid.b,\n f = this.datum.ellipsoid.f;\n\n var L = λ2 - λ1;\n var tanU1 = (1 - f) * Math.tan(φ1),\n cosU1 = 1 / Math.sqrt((1 + tanU1 * tanU1)),\n sinU1 = tanU1 * cosU1;\n var tanU2 = (1 - f) * Math.tan(φ2),\n cosU2 = 1 / Math.sqrt((1 + tanU2 * tanU2)),\n sinU2 = tanU2 * cosU2;\n\n var λ = L,\n λʹ, iterations = 0;\n var cosSqα, sinσ, cos2σM, cosσ, σ, sinλ, cosλ;\n do {\n sinλ = Math.sin(λ);\n cosλ = Math.cos(λ);\n var sinSqσ = (cosU2 * sinλ) * (cosU2 * sinλ) + (cosU1 * sinU2 -\n sinU1 * cosU2 * cosλ) * (cosU1 * sinU2 - sinU1 * cosU2 * cosλ);\n sinσ = Math.sqrt(sinSqσ);\n if (sinσ == 0) return 0; // co-incident points\n cosσ = sinU1 * sinU2 + cosU1 * cosU2 * cosλ;\n σ = Math.atan2(sinσ, cosσ);\n var sinα = cosU1 * cosU2 * sinλ / sinσ;\n cosSqα = 1 - sinα * sinα;\n cos2σM = cosσ - 2 * sinU1 * sinU2 / cosSqα;\n if (isNaN(cos2σM)) cos2σM = 0; // equatorial line: cosSqα=0 (§6)\n var C = f / 16 * cosSqα * (4 + f * (4 - 3 * cosSqα));\n λʹ = λ;\n λ = L + (1 - C) * f * sinα * (σ + C * sinσ * (cos2σM + C * cosσ * (-\n 1 + 2 * cos2σM * cos2σM)));\n } while (Math.abs(λ - λʹ) > 1e-12 && ++iterations < 100);\n if (iterations >= 100) {\n console.log(\"Formula failed to converge. Altering target position.\");\n return this._vincenty_inverse(p1, {\n lat: p2.lat,\n lng: p2.lng - 0.01\n });\n // throw new Error('Formula failed to converge');\n }\n\n var uSq = cosSqα * (a * a - b * b) / (b * b);\n var A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 *\n uSq)));\n var B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));\n var Δσ = B * sinσ * (cos2σM + B / 4 * (cosσ * (-1 + 2 * cos2σM *\n cos2σM) -\n B / 6 * cos2σM * (-3 + 4 * sinσ * sinσ) * (-3 + 4 * cos2σM *\n cos2σM)));\n\n var s = b * A * (σ - Δσ);\n\n var fwdAz = Math.atan2(cosU2 * sinλ, cosU1 * sinU2 - sinU1 * cosU2 *\n cosλ);\n var revAz = Math.atan2(cosU1 * sinλ, -sinU1 * cosU2 + cosU1 * sinU2 *\n cosλ);\n\n s = Number(s.toFixed(3)); // round to 1mm precision\n return {\n distance: s,\n initialBearing: fwdAz.toDegrees(),\n finalBearing: revAz.toDegrees()\n };\n },\n\n\n /**\n * Returns the point of intersection of two paths defined by point and bearing.\n * based on the work of Chris Veness (https://github.com/chrisveness/geodesy)\n *\n * @param {LatLon} p1 - First point.\n * @param {number} brng1 - Initial bearing from first point.\n * @param {LatLon} p2 - Second point.\n * @param {number} brng2 - Initial bearing from second point.\n * @returns {Object} containing lat/lng information of intersection.\n *\n * @example\n * var p1 = LatLon(51.8853, 0.2545), brng1 = 108.55;\n * var p2 = LatLon(49.0034, 2.5735), brng2 = 32.44;\n * var pInt = LatLon.intersection(p1, brng1, p2, brng2); // pInt.toString(): 50.9078°N, 4.5084°E\n */\n _intersection: function(p1, brng1, p2, brng2) {\n // see http://williams.best.vwh.net/avform.htm#Intersection\n\n var φ1 = p1.lat.toRadians(),\n λ1 = p1.lng.toRadians();\n var φ2 = p2.lat.toRadians(),\n λ2 = p2.lng.toRadians();\n var θ13 = Number(brng1).toRadians(),\n θ23 = Number(brng2).toRadians();\n var Δφ = φ2 - φ1,\n Δλ = λ2 - λ1;\n\n var δ12 = 2 * Math.asin(Math.sqrt(Math.sin(Δφ / 2) * Math.sin(Δφ / 2) +\n Math.cos(φ1) * Math.cos(φ2) * Math.sin(Δλ / 2) * Math.sin(Δλ /\n 2)));\n if (δ12 == 0) return null;\n\n // initial/final bearings between points\n var θ1 = Math.acos((Math.sin(φ2) - Math.sin(φ1) * Math.cos(δ12)) /\n (Math.sin(δ12) * Math.cos(φ1)));\n if (isNaN(θ1)) θ1 = 0; // protect against rounding\n var θ2 = Math.acos((Math.sin(φ1) - Math.sin(φ2) * Math.cos(δ12)) /\n (Math.sin(δ12) * Math.cos(φ2)));\n var θ12, θ21;\n if (Math.sin(λ2 - λ1) > 0) {\n θ12 = θ1;\n θ21 = 2 * Math.PI - θ2;\n } else {\n θ12 = 2 * Math.PI - θ1;\n θ21 = θ2;\n }\n\n var α1 = (θ13 - θ12 + Math.PI) % (2 * Math.PI) - Math.PI; // angle 2-1-3\n var α2 = (θ21 - θ23 + Math.PI) % (2 * Math.PI) - Math.PI; // angle 1-2-3\n\n if (Math.sin(α1) == 0 && Math.sin(α2) == 0) return null; // infinite intersections\n if (Math.sin(α1) * Math.sin(α2) < 0) return null; // ambiguous intersection\n\n //α1 = Math.abs(α1);\n //α2 = Math.abs(α2);\n // ... Ed Williams takes abs of α1/α2, but seems to break calculation?\n\n var α3 = Math.acos(-Math.cos(α1) * Math.cos(α2) +\n Math.sin(α1) * Math.sin(α2) * Math.cos(δ12));\n var δ13 = Math.atan2(Math.sin(δ12) * Math.sin(α1) * Math.sin(α2),\n Math.cos(α2) + Math.cos(α1) * Math.cos(α3));\n var φ3 = Math.asin(Math.sin(φ1) * Math.cos(δ13) +\n Math.cos(φ1) * Math.sin(δ13) * Math.cos(θ13));\n var Δλ13 = Math.atan2(Math.sin(θ13) * Math.sin(δ13) * Math.cos(φ1),\n Math.cos(δ13) - Math.sin(φ1) * Math.sin(φ3));\n var λ3 = λ1 + Δλ13;\n λ3 = (λ3 + 3 * Math.PI) % (2 * Math.PI) - Math.PI; // normalise to -180..+180º\n\n return {\n lat: φ3.toDegrees(),\n lng: λ3.toDegrees()\n };\n },\n\n /**\n * Overwrites obj1's values with obj2's and adds obj2's if non existent in obj1\n * @param obj1\n * @param obj2\n * @returns obj3 a new object based on obj1 and obj2\n */\n _merge_options: function(obj1, obj2) {\n let obj3 = {};\n for (let attrname in obj1) {\n obj3[attrname] = obj1[attrname];\n }\n for (let attrname in obj2) {\n obj3[attrname] = obj2[attrname];\n }\n return obj3;\n }\n});\n\nL.geodesic = function(latlngs, options) {\n return new L.Geodesic(latlngs, options);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvTGVhZmxldC5HZW9kZXNpYy9MZWFmbGV0Lkdlb2Rlc2ljLmpzPzU3NGMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw0QkFBNEI7QUFDNUI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBR0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSw0QkFBNEI7O0FBRTVCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7O0FBRUg7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQVE7QUFDUjtBQUNBO0FBQ0EsR0FBRzs7QUFFSDtBQUNBO0FBQ0E7QUFDQSxHQUFHOztBQUVIO0FBQ0E7QUFDQSxzQkFBc0I7QUFDdEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsT0FBTzs7QUFFUCxrQkFBa0IsNkJBQTZCO0FBQy9DO0FBQ0Esc0JBQXNCLDJDQUEyQztBQUNqRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRzs7O0FBR0g7QUFDQTtBQUNBO0FBQ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CwgdGhpcy5vcHRpb25zLndyYXApO1xuICAgICAgICAgIGxldCBncCA9IEwubGF0TG5nKGRpcmVjdC5sYXQsIGRpcmVjdC5sbmcpO1xuICAgICAgICAgIGlmIChNYXRoLmFicyhncC5sbmcgLSBwcmV2LmxuZykgPiAxODApIHtcbiAgICAgICAgICAgIGxldCBzZWMgPSB0aGlzLl9pbnRlcnNlY3Rpb24ocG9pbnRBLCBpbnZlcnNlLmluaXRpYWxCZWFyaW5nLCB7XG4gICAgICAgICAgICAgIGxhdDogLTg5LFxuICAgICAgICAgICAgICBsbmc6ICgoZ3AubG5nIC0gcHJldi5sbmcpID4gMCkgPyAtSU5URVJTRUNUX0xORyA6IElOVEVSU0VDVF9MTkdcbiAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgaWYgKHNlYykge1xuICAgICAgICAgICAgICBfZ2VvW19nZW9jbnRdLnB1c2goTC5sYXRMbmcoc2VjLmxhdCwgc2VjLmxuZykpO1xuICAgICAgICAgICAgICBfZ2VvY250Kys7XG4gICAgICAgICAgICAgIF9nZW9bX2dlb2NudF0gPSBbXTtcbiAgICAgICAgICAgICAgcHJldiA9IEwubGF0TG5nKHNlYy5sYXQsIC1zZWMubG5nKTtcbiAgICAgICAgICAgICAgX2dlb1tfZ2VvY250XS5wdXNoKHByZXYpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgX2dlb2NudCsrO1xuICAgICAgICAgICAgICBfZ2VvW19nZW9jbnRdID0gW107XG4gICAgICAgICAgICAgIF9nZW9bX2dlb2NudF0ucHVzaChncCk7XG4gICAgICAgICAgICAgIHByZXYgPSBncDtcbiAgICAgICAgICAgICAgcysrO1xuICAgICAgICAgICAgfSAgXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIF9nZW9bX2dlb2NudF0ucHVzaChncCk7XG4gICAgICAgICAgICAvLyBEYXNoZWQgbGluZXMgc3RhcnQgYSBuZXcgbGluZVxuICAgICAgICAgICAgaW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8ge1xuICAgICAgc2luzrsgPSBNYXRoLnNpbijOuyk7XG4gICAgICBjb3POuyA9IE1hdGguY29zKM67KTtcbiAgICAgIHZhciBzaW5Tcc+DID0gKGNvc1UyICogc2luzrspICogKGNvc1UyICogc2luzrspICsgKGNvc1UxICogc2luVTIgLVxuICAgICAgICBzaW5VMSAqIGNvc1UyICogY29zzrspICogKGNvc1UxICogc2luVTIgLSBzaW5VMSAqIGNvc1UyICogY29zzrspO1xuICAgICAgc2luz4MgPSBNYXRoLnNxcnQoc2luU3HPgyk7XG4gICAgICBpZiAoc2luz4MgPT0gMCkgcmV0dXJuIDA7IC8vIGNvLWluY2lkZW50IHBvaW50c1xuICAgICAgY29zz4MgPSBzaW5VMSAqIHNpblUyICsgY29zVTEgKiBjb3NVMiAqIGNvc867O1xuICAgICAgz4MgPSBNYXRoLmF0YW4yKHNpbs+DLCBjb3PPgyk7XG4gICAgICB2YXIgc2luzrEgPSBjb3NVMSAqIGNvc1UyICogc2luzrsgLyBzaW7PgztcbiAgICAgIGNvc1NxzrEgPSAxIC0gc2luzrEgKiBzaW7OsTtcbiAgICAgIGNvczLPg00gPSBjb3PPgyAtIDIgKiBzaW5VMSAqIHNpblUyIC8gY29zU3HOsTtcbiAgICAgIGlmIChpc05hTihjb3Myz4NNKSkgY29zMs+DTSA9IDA7IC8vIGVxdWF0b3JpYWwgbGluZTogY29zU3HOsT0wICjCpzYpXG4gICAgICB2YXIgQyA9IGYgLyAxNiAqIGNvc1NxzrEgKiAoNCArIGYgKiAoNCAtIDMgKiBjb3NTcc6xKSk7XG4gICAgICDOu8q5ID0gzrs7XG4gICAgICDOuyA9IEwgKyAoMSAtIEMpICogZiAqIHNpbs6xICogKM+DICsgQyAqIHNpbs+DICogKGNvczLPg00gKyBDICogY29zz4MgKiAoLVxuICAgICAgICAxICsgMiAqIGNvczLPg00gKiBjb3Myz4NNKSkpO1xuICAgIH0gd2hpbGUgKE1hdGguYWJzKM67IC0gzrvKuSkgPiAxZS0xMiA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3aXRoIG9iajIncyBhbmQgYWRkcyBvYmoyJ3MgaWYgbm9uIGV4aXN0ZW50IGluIG9iajFcbiAgICogQHBhcmFtIG9iajFcbiAgICogQHBhcmFtIG9iajJcbiAgICogQHJldHVybnMgb2JqMyBhIG5ldyBvYmplY3QgYmFzZWQgb24gb2JqMSBhbmQgb2JqMlxuICAgKi9cbiAgX21lcmdlX29wdGlvbnM6IGZ1bmN0aW9uKG9iajEsIG9iajIpIHtcbiAgICBsZXQgb2JqMyA9IHt9O1xuICAgIGZvciAobGV0IGF0dHJuYW1lIGluIG9iajEpIHtcbiAgICAgIG9iajNbYXR0cm5hbWVdID0gb2JqMVthdHRybmFtZV07XG4gICAgfVxuICAgIGZvciAobGV0IGF0dHJuYW1lIGluIG9iajIpIHtcbiAgICAgIG9iajNbYXR0cm5hbWVdID0gb2JqMlthdHRybmFtZV07XG4gICAgfVxuICAgIHJldHVybiBvYmozO1xuICB9XG59KTtcblxuTC5nZW9kZXNpYyA9IGZ1bmN0aW9uKGxhdGxuZ3MsIG9wdGlvbnMpIHtcbiAgcmV0dXJuIG5ldyBMLkdlb2Rlc2ljKGxhdGxuZ3MsIG9wdGlvbnMpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL0xlYWZsZXQuR2VvZGVzaWMvTGVhZmxldC5HZW9kZXNpYy5qc1xuLy8gbW9kdWxlIGlkID0gLi9ub2RlX21vZHVsZXMvTGVhZmxldC5HZW9kZXNpYy9MZWFmbGV0Lkdlb2Rlc2ljLmpzXG4vLyBtb2R1bGUgY2h1bmtzID0gMiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/Leaflet.Geodesic/Leaflet.Geodesic.js\n");
/***/ }),
/***/ "./node_modules/jquery/dist/jquery.js":
/***/ (function(module, exports, __webpack_require__) {
eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery JavaScript Library v3.3.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2018-01-20T17:24Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar document = window.document;\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar concat = arr.concat;\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n // Support: Chrome <=57, Firefox <=52\n // In some browsers, typeof returns \"function\" for HTML