@mui/x-charts-vendor 9.0.0 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/d3-geo.d.ts +4 -0
- package/d3-geo.js +5 -0
- package/d3-geo.mjs +5 -0
- package/lib-vendor/d3-geo/LICENSE +34 -0
- package/lib-vendor/d3-geo/dist/d3-geo.js +2873 -0
- package/lib-vendor/d3-geo/dist/d3-geo.min.js +1957 -0
- package/lib-vendor/d3-geo/src/area.js +77 -0
- package/lib-vendor/d3-geo/src/bounds.js +169 -0
- package/lib-vendor/d3-geo/src/cartesian.js +42 -0
- package/lib-vendor/d3-geo/src/centroid.js +134 -0
- package/lib-vendor/d3-geo/src/circle.js +77 -0
- package/lib-vendor/d3-geo/src/clip/antimeridian.js +89 -0
- package/lib-vendor/d3-geo/src/clip/buffer.js +30 -0
- package/lib-vendor/d3-geo/src/clip/circle.js +173 -0
- package/lib-vendor/d3-geo/src/clip/extent.js +25 -0
- package/lib-vendor/d3-geo/src/clip/index.js +124 -0
- package/lib-vendor/d3-geo/src/clip/line.js +60 -0
- package/lib-vendor/d3-geo/src/clip/rectangle.js +159 -0
- package/lib-vendor/d3-geo/src/clip/rejoin.js +103 -0
- package/lib-vendor/d3-geo/src/compose.js +15 -0
- package/lib-vendor/d3-geo/src/constant.js +11 -0
- package/lib-vendor/d3-geo/src/contains.js +95 -0
- package/lib-vendor/d3-geo/src/distance.js +18 -0
- package/lib-vendor/d3-geo/src/graticule.js +118 -0
- package/lib-vendor/d3-geo/src/identity.js +8 -0
- package/lib-vendor/d3-geo/src/index.js +335 -0
- package/lib-vendor/d3-geo/src/interpolate.js +35 -0
- package/lib-vendor/d3-geo/src/length.js +50 -0
- package/lib-vendor/d3-geo/src/math.js +44 -0
- package/lib-vendor/d3-geo/src/noop.js +7 -0
- package/lib-vendor/d3-geo/src/path/area.js +50 -0
- package/lib-vendor/d3-geo/src/path/bounds.js +31 -0
- package/lib-vendor/d3-geo/src/path/centroid.js +89 -0
- package/lib-vendor/d3-geo/src/path/context.js +53 -0
- package/lib-vendor/d3-geo/src/path/index.js +71 -0
- package/lib-vendor/d3-geo/src/path/measure.js +47 -0
- package/lib-vendor/d3-geo/src/path/string.js +93 -0
- package/lib-vendor/d3-geo/src/pointEqual.js +10 -0
- package/lib-vendor/d3-geo/src/polygonContains.js +72 -0
- package/lib-vendor/d3-geo/src/projection/albers.js +11 -0
- package/lib-vendor/d3-geo/src/projection/albersUsa.js +118 -0
- package/lib-vendor/d3-geo/src/projection/azimuthal.js +26 -0
- package/lib-vendor/d3-geo/src/projection/azimuthalEqualArea.js +20 -0
- package/lib-vendor/d3-geo/src/projection/azimuthalEquidistant.js +20 -0
- package/lib-vendor/d3-geo/src/projection/conic.js +18 -0
- package/lib-vendor/d3-geo/src/projection/conicConformal.js +39 -0
- package/lib-vendor/d3-geo/src/projection/conicEqualArea.js +33 -0
- package/lib-vendor/d3-geo/src/projection/conicEquidistant.js +31 -0
- package/lib-vendor/d3-geo/src/projection/cylindricalEqualArea.js +17 -0
- package/lib-vendor/d3-geo/src/projection/equalEarth.js +37 -0
- package/lib-vendor/d3-geo/src/projection/equirectangular.js +16 -0
- package/lib-vendor/d3-geo/src/projection/fit.js +52 -0
- package/lib-vendor/d3-geo/src/projection/gnomonic.js +20 -0
- package/lib-vendor/d3-geo/src/projection/identity.js +103 -0
- package/lib-vendor/d3-geo/src/projection/index.js +181 -0
- package/lib-vendor/d3-geo/src/projection/mercator.js +51 -0
- package/lib-vendor/d3-geo/src/projection/naturalEarth1.js +29 -0
- package/lib-vendor/d3-geo/src/projection/orthographic.js +18 -0
- package/lib-vendor/d3-geo/src/projection/resample.js +106 -0
- package/lib-vendor/d3-geo/src/projection/stereographic.js +22 -0
- package/lib-vendor/d3-geo/src/projection/transverseMercator.js +27 -0
- package/lib-vendor/d3-geo/src/rotation.js +65 -0
- package/lib-vendor/d3-geo/src/stream.js +83 -0
- package/lib-vendor/d3-geo/src/transform.js +42 -0
- package/package.json +18 -2
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = _default;
|
|
8
|
+
var _polygonContains = _interopRequireDefault(require("./polygonContains.js"));
|
|
9
|
+
var _distance = _interopRequireDefault(require("./distance.js"));
|
|
10
|
+
var _math = require("./math.js");
|
|
11
|
+
var containsObjectType = {
|
|
12
|
+
Feature: function (object, point) {
|
|
13
|
+
return containsGeometry(object.geometry, point);
|
|
14
|
+
},
|
|
15
|
+
FeatureCollection: function (object, point) {
|
|
16
|
+
var features = object.features,
|
|
17
|
+
i = -1,
|
|
18
|
+
n = features.length;
|
|
19
|
+
while (++i < n) if (containsGeometry(features[i].geometry, point)) return true;
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var containsGeometryType = {
|
|
24
|
+
Sphere: function () {
|
|
25
|
+
return true;
|
|
26
|
+
},
|
|
27
|
+
Point: function (object, point) {
|
|
28
|
+
return containsPoint(object.coordinates, point);
|
|
29
|
+
},
|
|
30
|
+
MultiPoint: function (object, point) {
|
|
31
|
+
var coordinates = object.coordinates,
|
|
32
|
+
i = -1,
|
|
33
|
+
n = coordinates.length;
|
|
34
|
+
while (++i < n) if (containsPoint(coordinates[i], point)) return true;
|
|
35
|
+
return false;
|
|
36
|
+
},
|
|
37
|
+
LineString: function (object, point) {
|
|
38
|
+
return containsLine(object.coordinates, point);
|
|
39
|
+
},
|
|
40
|
+
MultiLineString: function (object, point) {
|
|
41
|
+
var coordinates = object.coordinates,
|
|
42
|
+
i = -1,
|
|
43
|
+
n = coordinates.length;
|
|
44
|
+
while (++i < n) if (containsLine(coordinates[i], point)) return true;
|
|
45
|
+
return false;
|
|
46
|
+
},
|
|
47
|
+
Polygon: function (object, point) {
|
|
48
|
+
return containsPolygon(object.coordinates, point);
|
|
49
|
+
},
|
|
50
|
+
MultiPolygon: function (object, point) {
|
|
51
|
+
var coordinates = object.coordinates,
|
|
52
|
+
i = -1,
|
|
53
|
+
n = coordinates.length;
|
|
54
|
+
while (++i < n) if (containsPolygon(coordinates[i], point)) return true;
|
|
55
|
+
return false;
|
|
56
|
+
},
|
|
57
|
+
GeometryCollection: function (object, point) {
|
|
58
|
+
var geometries = object.geometries,
|
|
59
|
+
i = -1,
|
|
60
|
+
n = geometries.length;
|
|
61
|
+
while (++i < n) if (containsGeometry(geometries[i], point)) return true;
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
function containsGeometry(geometry, point) {
|
|
66
|
+
return geometry && containsGeometryType.hasOwnProperty(geometry.type) ? containsGeometryType[geometry.type](geometry, point) : false;
|
|
67
|
+
}
|
|
68
|
+
function containsPoint(coordinates, point) {
|
|
69
|
+
return (0, _distance.default)(coordinates, point) === 0;
|
|
70
|
+
}
|
|
71
|
+
function containsLine(coordinates, point) {
|
|
72
|
+
var ao, bo, ab;
|
|
73
|
+
for (var i = 0, n = coordinates.length; i < n; i++) {
|
|
74
|
+
bo = (0, _distance.default)(coordinates[i], point);
|
|
75
|
+
if (bo === 0) return true;
|
|
76
|
+
if (i > 0) {
|
|
77
|
+
ab = (0, _distance.default)(coordinates[i], coordinates[i - 1]);
|
|
78
|
+
if (ab > 0 && ao <= ab && bo <= ab && (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < _math.epsilon2 * ab) return true;
|
|
79
|
+
}
|
|
80
|
+
ao = bo;
|
|
81
|
+
}
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
function containsPolygon(coordinates, point) {
|
|
85
|
+
return !!(0, _polygonContains.default)(coordinates.map(ringRadians), pointRadians(point));
|
|
86
|
+
}
|
|
87
|
+
function ringRadians(ring) {
|
|
88
|
+
return ring = ring.map(pointRadians), ring.pop(), ring;
|
|
89
|
+
}
|
|
90
|
+
function pointRadians(point) {
|
|
91
|
+
return [point[0] * _math.radians, point[1] * _math.radians];
|
|
92
|
+
}
|
|
93
|
+
function _default(object, point) {
|
|
94
|
+
return (object && containsObjectType.hasOwnProperty(object.type) ? containsObjectType[object.type] : containsGeometry)(object, point);
|
|
95
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = _default;
|
|
8
|
+
var _length = _interopRequireDefault(require("./length.js"));
|
|
9
|
+
var coordinates = [null, null],
|
|
10
|
+
object = {
|
|
11
|
+
type: "LineString",
|
|
12
|
+
coordinates: coordinates
|
|
13
|
+
};
|
|
14
|
+
function _default(a, b) {
|
|
15
|
+
coordinates[0] = a;
|
|
16
|
+
coordinates[1] = b;
|
|
17
|
+
return (0, _length.default)(object);
|
|
18
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = graticule;
|
|
7
|
+
exports.graticule10 = graticule10;
|
|
8
|
+
var _index = require("../../d3-array/src/index.js");
|
|
9
|
+
var _math = require("./math.js");
|
|
10
|
+
function graticuleX(y0, y1, dy) {
|
|
11
|
+
var y = (0, _index.range)(y0, y1 - _math.epsilon, dy).concat(y1);
|
|
12
|
+
return function (x) {
|
|
13
|
+
return y.map(function (y) {
|
|
14
|
+
return [x, y];
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function graticuleY(x0, x1, dx) {
|
|
19
|
+
var x = (0, _index.range)(x0, x1 - _math.epsilon, dx).concat(x1);
|
|
20
|
+
return function (y) {
|
|
21
|
+
return x.map(function (x) {
|
|
22
|
+
return [x, y];
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function graticule() {
|
|
27
|
+
var x1,
|
|
28
|
+
x0,
|
|
29
|
+
X1,
|
|
30
|
+
X0,
|
|
31
|
+
y1,
|
|
32
|
+
y0,
|
|
33
|
+
Y1,
|
|
34
|
+
Y0,
|
|
35
|
+
dx = 10,
|
|
36
|
+
dy = dx,
|
|
37
|
+
DX = 90,
|
|
38
|
+
DY = 360,
|
|
39
|
+
x,
|
|
40
|
+
y,
|
|
41
|
+
X,
|
|
42
|
+
Y,
|
|
43
|
+
precision = 2.5;
|
|
44
|
+
function graticule() {
|
|
45
|
+
return {
|
|
46
|
+
type: "MultiLineString",
|
|
47
|
+
coordinates: lines()
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function lines() {
|
|
51
|
+
return (0, _index.range)((0, _math.ceil)(X0 / DX) * DX, X1, DX).map(X).concat((0, _index.range)((0, _math.ceil)(Y0 / DY) * DY, Y1, DY).map(Y)).concat((0, _index.range)((0, _math.ceil)(x0 / dx) * dx, x1, dx).filter(function (x) {
|
|
52
|
+
return (0, _math.abs)(x % DX) > _math.epsilon;
|
|
53
|
+
}).map(x)).concat((0, _index.range)((0, _math.ceil)(y0 / dy) * dy, y1, dy).filter(function (y) {
|
|
54
|
+
return (0, _math.abs)(y % DY) > _math.epsilon;
|
|
55
|
+
}).map(y));
|
|
56
|
+
}
|
|
57
|
+
graticule.lines = function () {
|
|
58
|
+
return lines().map(function (coordinates) {
|
|
59
|
+
return {
|
|
60
|
+
type: "LineString",
|
|
61
|
+
coordinates: coordinates
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
graticule.outline = function () {
|
|
66
|
+
return {
|
|
67
|
+
type: "Polygon",
|
|
68
|
+
coordinates: [X(X0).concat(Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1))]
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
graticule.extent = function (_) {
|
|
72
|
+
if (!arguments.length) return graticule.extentMinor();
|
|
73
|
+
return graticule.extentMajor(_).extentMinor(_);
|
|
74
|
+
};
|
|
75
|
+
graticule.extentMajor = function (_) {
|
|
76
|
+
if (!arguments.length) return [[X0, Y0], [X1, Y1]];
|
|
77
|
+
X0 = +_[0][0], X1 = +_[1][0];
|
|
78
|
+
Y0 = +_[0][1], Y1 = +_[1][1];
|
|
79
|
+
if (X0 > X1) _ = X0, X0 = X1, X1 = _;
|
|
80
|
+
if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;
|
|
81
|
+
return graticule.precision(precision);
|
|
82
|
+
};
|
|
83
|
+
graticule.extentMinor = function (_) {
|
|
84
|
+
if (!arguments.length) return [[x0, y0], [x1, y1]];
|
|
85
|
+
x0 = +_[0][0], x1 = +_[1][0];
|
|
86
|
+
y0 = +_[0][1], y1 = +_[1][1];
|
|
87
|
+
if (x0 > x1) _ = x0, x0 = x1, x1 = _;
|
|
88
|
+
if (y0 > y1) _ = y0, y0 = y1, y1 = _;
|
|
89
|
+
return graticule.precision(precision);
|
|
90
|
+
};
|
|
91
|
+
graticule.step = function (_) {
|
|
92
|
+
if (!arguments.length) return graticule.stepMinor();
|
|
93
|
+
return graticule.stepMajor(_).stepMinor(_);
|
|
94
|
+
};
|
|
95
|
+
graticule.stepMajor = function (_) {
|
|
96
|
+
if (!arguments.length) return [DX, DY];
|
|
97
|
+
DX = +_[0], DY = +_[1];
|
|
98
|
+
return graticule;
|
|
99
|
+
};
|
|
100
|
+
graticule.stepMinor = function (_) {
|
|
101
|
+
if (!arguments.length) return [dx, dy];
|
|
102
|
+
dx = +_[0], dy = +_[1];
|
|
103
|
+
return graticule;
|
|
104
|
+
};
|
|
105
|
+
graticule.precision = function (_) {
|
|
106
|
+
if (!arguments.length) return precision;
|
|
107
|
+
precision = +_;
|
|
108
|
+
x = graticuleX(y0, y1, 90);
|
|
109
|
+
y = graticuleY(x0, x1, precision);
|
|
110
|
+
X = graticuleX(Y0, Y1, 90);
|
|
111
|
+
Y = graticuleY(X0, X1, precision);
|
|
112
|
+
return graticule;
|
|
113
|
+
};
|
|
114
|
+
return graticule.extentMajor([[-180, -90 + _math.epsilon], [180, 90 - _math.epsilon]]).extentMinor([[-180, -80 - _math.epsilon], [180, 80 + _math.epsilon]]);
|
|
115
|
+
}
|
|
116
|
+
function graticule10() {
|
|
117
|
+
return graticule()();
|
|
118
|
+
}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "geoAlbers", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return _albers.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "geoAlbersUsa", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return _albersUsa.default;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "geoArea", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return _area.default;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "geoAzimuthalEqualArea", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return _azimuthalEqualArea.default;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "geoAzimuthalEqualAreaRaw", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _azimuthalEqualArea.azimuthalEqualAreaRaw;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "geoAzimuthalEquidistant", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return _azimuthalEquidistant.default;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "geoAzimuthalEquidistantRaw", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () {
|
|
47
|
+
return _azimuthalEquidistant.azimuthalEquidistantRaw;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "geoBounds", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () {
|
|
53
|
+
return _bounds.default;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "geoCentroid", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () {
|
|
59
|
+
return _centroid.default;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "geoCircle", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () {
|
|
65
|
+
return _circle.default;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "geoClipAntimeridian", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () {
|
|
71
|
+
return _antimeridian.default;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "geoClipCircle", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function () {
|
|
77
|
+
return _circle2.default;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "geoClipExtent", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function () {
|
|
83
|
+
return _extent.default;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(exports, "geoClipRectangle", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () {
|
|
89
|
+
return _rectangle.default;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, "geoConicConformal", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function () {
|
|
95
|
+
return _conicConformal.default;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, "geoConicConformalRaw", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () {
|
|
101
|
+
return _conicConformal.conicConformalRaw;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
Object.defineProperty(exports, "geoConicEqualArea", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function () {
|
|
107
|
+
return _conicEqualArea.default;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(exports, "geoConicEqualAreaRaw", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function () {
|
|
113
|
+
return _conicEqualArea.conicEqualAreaRaw;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "geoConicEquidistant", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function () {
|
|
119
|
+
return _conicEquidistant.default;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
Object.defineProperty(exports, "geoConicEquidistantRaw", {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: function () {
|
|
125
|
+
return _conicEquidistant.conicEquidistantRaw;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(exports, "geoContains", {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function () {
|
|
131
|
+
return _contains.default;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
Object.defineProperty(exports, "geoDistance", {
|
|
135
|
+
enumerable: true,
|
|
136
|
+
get: function () {
|
|
137
|
+
return _distance.default;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
Object.defineProperty(exports, "geoEqualEarth", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function () {
|
|
143
|
+
return _equalEarth.default;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
Object.defineProperty(exports, "geoEqualEarthRaw", {
|
|
147
|
+
enumerable: true,
|
|
148
|
+
get: function () {
|
|
149
|
+
return _equalEarth.equalEarthRaw;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
Object.defineProperty(exports, "geoEquirectangular", {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function () {
|
|
155
|
+
return _equirectangular.default;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
Object.defineProperty(exports, "geoEquirectangularRaw", {
|
|
159
|
+
enumerable: true,
|
|
160
|
+
get: function () {
|
|
161
|
+
return _equirectangular.equirectangularRaw;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
Object.defineProperty(exports, "geoGnomonic", {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function () {
|
|
167
|
+
return _gnomonic.default;
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
Object.defineProperty(exports, "geoGnomonicRaw", {
|
|
171
|
+
enumerable: true,
|
|
172
|
+
get: function () {
|
|
173
|
+
return _gnomonic.gnomonicRaw;
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
Object.defineProperty(exports, "geoGraticule", {
|
|
177
|
+
enumerable: true,
|
|
178
|
+
get: function () {
|
|
179
|
+
return _graticule.default;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
Object.defineProperty(exports, "geoGraticule10", {
|
|
183
|
+
enumerable: true,
|
|
184
|
+
get: function () {
|
|
185
|
+
return _graticule.graticule10;
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
Object.defineProperty(exports, "geoIdentity", {
|
|
189
|
+
enumerable: true,
|
|
190
|
+
get: function () {
|
|
191
|
+
return _identity.default;
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
Object.defineProperty(exports, "geoInterpolate", {
|
|
195
|
+
enumerable: true,
|
|
196
|
+
get: function () {
|
|
197
|
+
return _interpolate.default;
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
Object.defineProperty(exports, "geoLength", {
|
|
201
|
+
enumerable: true,
|
|
202
|
+
get: function () {
|
|
203
|
+
return _length.default;
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
Object.defineProperty(exports, "geoMercator", {
|
|
207
|
+
enumerable: true,
|
|
208
|
+
get: function () {
|
|
209
|
+
return _mercator.default;
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
Object.defineProperty(exports, "geoMercatorRaw", {
|
|
213
|
+
enumerable: true,
|
|
214
|
+
get: function () {
|
|
215
|
+
return _mercator.mercatorRaw;
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
Object.defineProperty(exports, "geoNaturalEarth1", {
|
|
219
|
+
enumerable: true,
|
|
220
|
+
get: function () {
|
|
221
|
+
return _naturalEarth.default;
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
Object.defineProperty(exports, "geoNaturalEarth1Raw", {
|
|
225
|
+
enumerable: true,
|
|
226
|
+
get: function () {
|
|
227
|
+
return _naturalEarth.naturalEarth1Raw;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
Object.defineProperty(exports, "geoOrthographic", {
|
|
231
|
+
enumerable: true,
|
|
232
|
+
get: function () {
|
|
233
|
+
return _orthographic.default;
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
Object.defineProperty(exports, "geoOrthographicRaw", {
|
|
237
|
+
enumerable: true,
|
|
238
|
+
get: function () {
|
|
239
|
+
return _orthographic.orthographicRaw;
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
Object.defineProperty(exports, "geoPath", {
|
|
243
|
+
enumerable: true,
|
|
244
|
+
get: function () {
|
|
245
|
+
return _index.default;
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
Object.defineProperty(exports, "geoProjection", {
|
|
249
|
+
enumerable: true,
|
|
250
|
+
get: function () {
|
|
251
|
+
return _index2.default;
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
Object.defineProperty(exports, "geoProjectionMutator", {
|
|
255
|
+
enumerable: true,
|
|
256
|
+
get: function () {
|
|
257
|
+
return _index2.projectionMutator;
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
Object.defineProperty(exports, "geoRotation", {
|
|
261
|
+
enumerable: true,
|
|
262
|
+
get: function () {
|
|
263
|
+
return _rotation.default;
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
Object.defineProperty(exports, "geoStereographic", {
|
|
267
|
+
enumerable: true,
|
|
268
|
+
get: function () {
|
|
269
|
+
return _stereographic.default;
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
Object.defineProperty(exports, "geoStereographicRaw", {
|
|
273
|
+
enumerable: true,
|
|
274
|
+
get: function () {
|
|
275
|
+
return _stereographic.stereographicRaw;
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
Object.defineProperty(exports, "geoStream", {
|
|
279
|
+
enumerable: true,
|
|
280
|
+
get: function () {
|
|
281
|
+
return _stream.default;
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
Object.defineProperty(exports, "geoTransform", {
|
|
285
|
+
enumerable: true,
|
|
286
|
+
get: function () {
|
|
287
|
+
return _transform.default;
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
Object.defineProperty(exports, "geoTransverseMercator", {
|
|
291
|
+
enumerable: true,
|
|
292
|
+
get: function () {
|
|
293
|
+
return _transverseMercator.default;
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
Object.defineProperty(exports, "geoTransverseMercatorRaw", {
|
|
297
|
+
enumerable: true,
|
|
298
|
+
get: function () {
|
|
299
|
+
return _transverseMercator.transverseMercatorRaw;
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
var _area = _interopRequireDefault(require("./area.js"));
|
|
303
|
+
var _bounds = _interopRequireDefault(require("./bounds.js"));
|
|
304
|
+
var _centroid = _interopRequireDefault(require("./centroid.js"));
|
|
305
|
+
var _circle = _interopRequireDefault(require("./circle.js"));
|
|
306
|
+
var _antimeridian = _interopRequireDefault(require("./clip/antimeridian.js"));
|
|
307
|
+
var _circle2 = _interopRequireDefault(require("./clip/circle.js"));
|
|
308
|
+
var _extent = _interopRequireDefault(require("./clip/extent.js"));
|
|
309
|
+
var _rectangle = _interopRequireDefault(require("./clip/rectangle.js"));
|
|
310
|
+
var _contains = _interopRequireDefault(require("./contains.js"));
|
|
311
|
+
var _distance = _interopRequireDefault(require("./distance.js"));
|
|
312
|
+
var _graticule = _interopRequireWildcard(require("./graticule.js"));
|
|
313
|
+
var _interpolate = _interopRequireDefault(require("./interpolate.js"));
|
|
314
|
+
var _length = _interopRequireDefault(require("./length.js"));
|
|
315
|
+
var _index = _interopRequireDefault(require("./path/index.js"));
|
|
316
|
+
var _albers = _interopRequireDefault(require("./projection/albers.js"));
|
|
317
|
+
var _albersUsa = _interopRequireDefault(require("./projection/albersUsa.js"));
|
|
318
|
+
var _azimuthalEqualArea = _interopRequireWildcard(require("./projection/azimuthalEqualArea.js"));
|
|
319
|
+
var _azimuthalEquidistant = _interopRequireWildcard(require("./projection/azimuthalEquidistant.js"));
|
|
320
|
+
var _conicConformal = _interopRequireWildcard(require("./projection/conicConformal.js"));
|
|
321
|
+
var _conicEqualArea = _interopRequireWildcard(require("./projection/conicEqualArea.js"));
|
|
322
|
+
var _conicEquidistant = _interopRequireWildcard(require("./projection/conicEquidistant.js"));
|
|
323
|
+
var _equalEarth = _interopRequireWildcard(require("./projection/equalEarth.js"));
|
|
324
|
+
var _equirectangular = _interopRequireWildcard(require("./projection/equirectangular.js"));
|
|
325
|
+
var _gnomonic = _interopRequireWildcard(require("./projection/gnomonic.js"));
|
|
326
|
+
var _identity = _interopRequireDefault(require("./projection/identity.js"));
|
|
327
|
+
var _index2 = _interopRequireWildcard(require("./projection/index.js"));
|
|
328
|
+
var _mercator = _interopRequireWildcard(require("./projection/mercator.js"));
|
|
329
|
+
var _naturalEarth = _interopRequireWildcard(require("./projection/naturalEarth1.js"));
|
|
330
|
+
var _orthographic = _interopRequireWildcard(require("./projection/orthographic.js"));
|
|
331
|
+
var _stereographic = _interopRequireWildcard(require("./projection/stereographic.js"));
|
|
332
|
+
var _transverseMercator = _interopRequireWildcard(require("./projection/transverseMercator.js"));
|
|
333
|
+
var _rotation = _interopRequireDefault(require("./rotation.js"));
|
|
334
|
+
var _stream = _interopRequireDefault(require("./stream.js"));
|
|
335
|
+
var _transform = _interopRequireDefault(require("./transform.js"));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = _default;
|
|
7
|
+
var _math = require("./math.js");
|
|
8
|
+
function _default(a, b) {
|
|
9
|
+
var x0 = a[0] * _math.radians,
|
|
10
|
+
y0 = a[1] * _math.radians,
|
|
11
|
+
x1 = b[0] * _math.radians,
|
|
12
|
+
y1 = b[1] * _math.radians,
|
|
13
|
+
cy0 = (0, _math.cos)(y0),
|
|
14
|
+
sy0 = (0, _math.sin)(y0),
|
|
15
|
+
cy1 = (0, _math.cos)(y1),
|
|
16
|
+
sy1 = (0, _math.sin)(y1),
|
|
17
|
+
kx0 = cy0 * (0, _math.cos)(x0),
|
|
18
|
+
ky0 = cy0 * (0, _math.sin)(x0),
|
|
19
|
+
kx1 = cy1 * (0, _math.cos)(x1),
|
|
20
|
+
ky1 = cy1 * (0, _math.sin)(x1),
|
|
21
|
+
d = 2 * (0, _math.asin)((0, _math.sqrt)((0, _math.haversin)(y1 - y0) + cy0 * cy1 * (0, _math.haversin)(x1 - x0))),
|
|
22
|
+
k = (0, _math.sin)(d);
|
|
23
|
+
var interpolate = d ? function (t) {
|
|
24
|
+
var B = (0, _math.sin)(t *= d) / k,
|
|
25
|
+
A = (0, _math.sin)(d - t) / k,
|
|
26
|
+
x = A * kx0 + B * kx1,
|
|
27
|
+
y = A * ky0 + B * ky1,
|
|
28
|
+
z = A * sy0 + B * sy1;
|
|
29
|
+
return [(0, _math.atan2)(y, x) * _math.degrees, (0, _math.atan2)(z, (0, _math.sqrt)(x * x + y * y)) * _math.degrees];
|
|
30
|
+
} : function () {
|
|
31
|
+
return [x0 * _math.degrees, y0 * _math.degrees];
|
|
32
|
+
};
|
|
33
|
+
interpolate.distance = d;
|
|
34
|
+
return interpolate;
|
|
35
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = _default;
|
|
8
|
+
var _index = require("../../d3-array/src/index.js");
|
|
9
|
+
var _math = require("./math.js");
|
|
10
|
+
var _noop = _interopRequireDefault(require("./noop.js"));
|
|
11
|
+
var _stream = _interopRequireDefault(require("./stream.js"));
|
|
12
|
+
var lengthSum, lambda0, sinPhi0, cosPhi0;
|
|
13
|
+
var lengthStream = {
|
|
14
|
+
sphere: _noop.default,
|
|
15
|
+
point: _noop.default,
|
|
16
|
+
lineStart: lengthLineStart,
|
|
17
|
+
lineEnd: _noop.default,
|
|
18
|
+
polygonStart: _noop.default,
|
|
19
|
+
polygonEnd: _noop.default
|
|
20
|
+
};
|
|
21
|
+
function lengthLineStart() {
|
|
22
|
+
lengthStream.point = lengthPointFirst;
|
|
23
|
+
lengthStream.lineEnd = lengthLineEnd;
|
|
24
|
+
}
|
|
25
|
+
function lengthLineEnd() {
|
|
26
|
+
lengthStream.point = lengthStream.lineEnd = _noop.default;
|
|
27
|
+
}
|
|
28
|
+
function lengthPointFirst(lambda, phi) {
|
|
29
|
+
lambda *= _math.radians, phi *= _math.radians;
|
|
30
|
+
lambda0 = lambda, sinPhi0 = (0, _math.sin)(phi), cosPhi0 = (0, _math.cos)(phi);
|
|
31
|
+
lengthStream.point = lengthPoint;
|
|
32
|
+
}
|
|
33
|
+
function lengthPoint(lambda, phi) {
|
|
34
|
+
lambda *= _math.radians, phi *= _math.radians;
|
|
35
|
+
var sinPhi = (0, _math.sin)(phi),
|
|
36
|
+
cosPhi = (0, _math.cos)(phi),
|
|
37
|
+
delta = (0, _math.abs)(lambda - lambda0),
|
|
38
|
+
cosDelta = (0, _math.cos)(delta),
|
|
39
|
+
sinDelta = (0, _math.sin)(delta),
|
|
40
|
+
x = cosPhi * sinDelta,
|
|
41
|
+
y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,
|
|
42
|
+
z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;
|
|
43
|
+
lengthSum.add((0, _math.atan2)((0, _math.sqrt)(x * x + y * y), z));
|
|
44
|
+
lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;
|
|
45
|
+
}
|
|
46
|
+
function _default(object) {
|
|
47
|
+
lengthSum = new _index.Adder();
|
|
48
|
+
(0, _stream.default)(object, lengthStream);
|
|
49
|
+
return +lengthSum;
|
|
50
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.abs = void 0;
|
|
7
|
+
exports.acos = acos;
|
|
8
|
+
exports.asin = asin;
|
|
9
|
+
exports.halfPi = exports.floor = exports.exp = exports.epsilon2 = exports.epsilon = exports.degrees = exports.cos = exports.ceil = exports.atan2 = exports.atan = void 0;
|
|
10
|
+
exports.haversin = haversin;
|
|
11
|
+
exports.tau = exports.tan = exports.sqrt = exports.sin = exports.sign = exports.radians = exports.quarterPi = exports.pow = exports.pi = exports.log = exports.hypot = void 0;
|
|
12
|
+
var epsilon = exports.epsilon = 1e-6;
|
|
13
|
+
var epsilon2 = exports.epsilon2 = 1e-12;
|
|
14
|
+
var pi = exports.pi = Math.PI;
|
|
15
|
+
var halfPi = exports.halfPi = pi / 2;
|
|
16
|
+
var quarterPi = exports.quarterPi = pi / 4;
|
|
17
|
+
var tau = exports.tau = pi * 2;
|
|
18
|
+
var degrees = exports.degrees = 180 / pi;
|
|
19
|
+
var radians = exports.radians = pi / 180;
|
|
20
|
+
var abs = exports.abs = Math.abs;
|
|
21
|
+
var atan = exports.atan = Math.atan;
|
|
22
|
+
var atan2 = exports.atan2 = Math.atan2;
|
|
23
|
+
var cos = exports.cos = Math.cos;
|
|
24
|
+
var ceil = exports.ceil = Math.ceil;
|
|
25
|
+
var exp = exports.exp = Math.exp;
|
|
26
|
+
var floor = exports.floor = Math.floor;
|
|
27
|
+
var hypot = exports.hypot = Math.hypot;
|
|
28
|
+
var log = exports.log = Math.log;
|
|
29
|
+
var pow = exports.pow = Math.pow;
|
|
30
|
+
var sin = exports.sin = Math.sin;
|
|
31
|
+
var sign = exports.sign = Math.sign || function (x) {
|
|
32
|
+
return x > 0 ? 1 : x < 0 ? -1 : 0;
|
|
33
|
+
};
|
|
34
|
+
var sqrt = exports.sqrt = Math.sqrt;
|
|
35
|
+
var tan = exports.tan = Math.tan;
|
|
36
|
+
function acos(x) {
|
|
37
|
+
return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);
|
|
38
|
+
}
|
|
39
|
+
function asin(x) {
|
|
40
|
+
return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);
|
|
41
|
+
}
|
|
42
|
+
function haversin(x) {
|
|
43
|
+
return (x = sin(x / 2)) * x;
|
|
44
|
+
}
|