@deck.gl/carto 8.8.3 → 8.8.4
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/dist/dist.dev.js +61 -16
- package/dist/es5/style/color-bins-style.js.map +1 -1
- package/dist/es5/style/color-categories-style.js.map +1 -1
- package/dist/es5/style/color-continuous-style.js.map +1 -1
- package/dist/es5/style/utils.js +3 -1
- package/dist/es5/style/utils.js.map +1 -1
- package/dist/esm/style/color-bins-style.js.map +1 -1
- package/dist/esm/style/color-categories-style.js.map +1 -1
- package/dist/esm/style/color-continuous-style.js.map +1 -1
- package/dist/esm/style/utils.js +3 -1
- package/dist/esm/style/utils.js.map +1 -1
- package/dist.min.js +3 -3
- package/package.json +9 -9
- package/src/style/color-bins-style.ts +25 -3
- package/src/style/color-categories-style.ts +28 -4
- package/src/style/color-continuous-style.ts +25 -3
- package/src/style/utils.ts +8 -4
- package/typed/style/color-bins-style.d.ts +22 -3
- package/typed/style/color-bins-style.d.ts.map +1 -1
- package/typed/style/color-categories-style.d.ts +24 -4
- package/typed/style/color-categories-style.d.ts.map +1 -1
- package/typed/style/color-continuous-style.d.ts +22 -3
- package/typed/style/color-continuous-style.d.ts.map +1 -1
- package/typed/style/utils.d.ts +3 -6
- package/typed/style/utils.d.ts.map +1 -1
package/dist/dist.dev.js
CHANGED
|
@@ -6293,13 +6293,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6293
6293
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEachSegmentInPolygonPoints", function() { return forEachSegmentInPolygonPoints; });
|
|
6294
6294
|
/* harmony import */ var _math_gl_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @math.gl/core */ "../../node_modules/@math.gl/core/dist/esm/index.js");
|
|
6295
6295
|
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
WINDING[WINDING["COUNTER_CLOCKWISE"] = -1] = "COUNTER_CLOCKWISE";
|
|
6301
|
-
})(WINDING || (WINDING = {}));
|
|
6302
|
-
|
|
6296
|
+
const WINDING = {
|
|
6297
|
+
CLOCKWISE: 1,
|
|
6298
|
+
COUNTER_CLOCKWISE: -1
|
|
6299
|
+
};
|
|
6303
6300
|
function modifyPolygonWindingDirection(points, direction, options = {}) {
|
|
6304
6301
|
const windingDirection = getPolygonWindingDirection(points, options);
|
|
6305
6302
|
|
|
@@ -6822,7 +6819,7 @@ function unprojectOnFarPlane(viewport, x, targetZ) {
|
|
|
6822
6819
|
/*!****************************************************************************************!*\
|
|
6823
6820
|
!*** /Users/missx/Source/deck.gl/node_modules/@math.gl/web-mercator/dist/esm/index.js ***!
|
|
6824
6821
|
\****************************************************************************************/
|
|
6825
|
-
/*! exports provided: default, WebMercatorViewport, getBounds, fitBounds, normalizeViewportProps, flyToViewport, getFlyToDuration, MAX_LATITUDE, lngLatToWorld, worldToLngLat, worldToPixels, pixelsToWorld, zoomToScale, scaleToZoom, altitudeToFovy, fovyToAltitude, getMeterZoom, getDistanceScales, addMetersToLngLat, getViewMatrix, getProjectionMatrix, getProjectionParameters */
|
|
6822
|
+
/*! exports provided: default, WebMercatorViewport, getBounds, fitBounds, normalizeViewportProps, flyToViewport, getFlyToDuration, MAX_LATITUDE, lngLatToWorld, worldToLngLat, worldToPixels, pixelsToWorld, zoomToScale, scaleToZoom, altitudeToFovy, fovyToAltitude, getMeterZoom, unitsPerMeter, getDistanceScales, addMetersToLngLat, getViewMatrix, getProjectionMatrix, getProjectionParameters */
|
|
6826
6823
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6827
6824
|
|
|
6828
6825
|
"use strict";
|
|
@@ -6867,6 +6864,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6867
6864
|
|
|
6868
6865
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMeterZoom", function() { return _web_mercator_utils__WEBPACK_IMPORTED_MODULE_5__["getMeterZoom"]; });
|
|
6869
6866
|
|
|
6867
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unitsPerMeter", function() { return _web_mercator_utils__WEBPACK_IMPORTED_MODULE_5__["unitsPerMeter"]; });
|
|
6868
|
+
|
|
6870
6869
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDistanceScales", function() { return _web_mercator_utils__WEBPACK_IMPORTED_MODULE_5__["getDistanceScales"]; });
|
|
6871
6870
|
|
|
6872
6871
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addMetersToLngLat", function() { return _web_mercator_utils__WEBPACK_IMPORTED_MODULE_5__["addMetersToLngLat"]; });
|
|
@@ -7007,7 +7006,7 @@ function normalizeViewportProps(props) {
|
|
|
7007
7006
|
/*!*****************************************************************************************************!*\
|
|
7008
7007
|
!*** /Users/missx/Source/deck.gl/node_modules/@math.gl/web-mercator/dist/esm/web-mercator-utils.js ***!
|
|
7009
7008
|
\*****************************************************************************************************/
|
|
7010
|
-
/*! exports provided: MAX_LATITUDE, DEFAULT_ALTITUDE, zoomToScale, scaleToZoom, lngLatToWorld, worldToLngLat, getMeterZoom, getDistanceScales, addMetersToLngLat, getViewMatrix, getProjectionParameters, getProjectionMatrix, altitudeToFovy, fovyToAltitude, worldToPixels, pixelsToWorld */
|
|
7009
|
+
/*! exports provided: MAX_LATITUDE, DEFAULT_ALTITUDE, zoomToScale, scaleToZoom, lngLatToWorld, worldToLngLat, getMeterZoom, unitsPerMeter, getDistanceScales, addMetersToLngLat, getViewMatrix, getProjectionParameters, getProjectionMatrix, altitudeToFovy, fovyToAltitude, worldToPixels, pixelsToWorld */
|
|
7011
7010
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7012
7011
|
|
|
7013
7012
|
"use strict";
|
|
@@ -7019,6 +7018,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7019
7018
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lngLatToWorld", function() { return lngLatToWorld; });
|
|
7020
7019
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "worldToLngLat", function() { return worldToLngLat; });
|
|
7021
7020
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMeterZoom", function() { return getMeterZoom; });
|
|
7021
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unitsPerMeter", function() { return unitsPerMeter; });
|
|
7022
7022
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDistanceScales", function() { return getDistanceScales; });
|
|
7023
7023
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMetersToLngLat", function() { return addMetersToLngLat; });
|
|
7024
7024
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getViewMatrix", function() { return getViewMatrix; });
|
|
@@ -7076,6 +7076,10 @@ function getMeterZoom(options) {
|
|
|
7076
7076
|
const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS);
|
|
7077
7077
|
return scaleToZoom(EARTH_CIRCUMFERENCE * latCosine) - 9;
|
|
7078
7078
|
}
|
|
7079
|
+
function unitsPerMeter(latitude) {
|
|
7080
|
+
const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS);
|
|
7081
|
+
return TILE_SIZE / EARTH_CIRCUMFERENCE / latCosine;
|
|
7082
|
+
}
|
|
7079
7083
|
function getDistanceScales(options) {
|
|
7080
7084
|
const {
|
|
7081
7085
|
latitude,
|
|
@@ -7152,6 +7156,9 @@ function getProjectionParameters(options) {
|
|
|
7152
7156
|
height,
|
|
7153
7157
|
altitude,
|
|
7154
7158
|
pitch = 0,
|
|
7159
|
+
offset,
|
|
7160
|
+
center,
|
|
7161
|
+
scale,
|
|
7155
7162
|
nearZMultiplier = 1,
|
|
7156
7163
|
farZMultiplier = 1
|
|
7157
7164
|
} = options;
|
|
@@ -7163,17 +7170,26 @@ function getProjectionParameters(options) {
|
|
|
7163
7170
|
fovy = altitudeToFovy(altitude);
|
|
7164
7171
|
}
|
|
7165
7172
|
|
|
7166
|
-
const
|
|
7167
|
-
const focalDistance = fovyToAltitude(fovy);
|
|
7173
|
+
const fovRadians = fovy * DEGREES_TO_RADIANS;
|
|
7168
7174
|
const pitchRadians = pitch * DEGREES_TO_RADIANS;
|
|
7169
|
-
const
|
|
7170
|
-
|
|
7175
|
+
const focalDistance = fovyToAltitude(fovy);
|
|
7176
|
+
let cameraToSeaLevelDistance = focalDistance;
|
|
7177
|
+
|
|
7178
|
+
if (center) {
|
|
7179
|
+
cameraToSeaLevelDistance += center[2] * scale / Math.cos(pitchRadians) / height;
|
|
7180
|
+
}
|
|
7181
|
+
|
|
7182
|
+
const fovAboveCenter = fovRadians * (0.5 + (offset ? offset[1] : 0) / height);
|
|
7183
|
+
const topHalfSurfaceDistance = Math.sin(fovAboveCenter) * cameraToSeaLevelDistance / Math.sin(Object(_math_utils__WEBPACK_IMPORTED_MODULE_0__["clamp"])(Math.PI / 2 - pitchRadians - fovAboveCenter, 0.01, Math.PI - 0.01));
|
|
7184
|
+
const furthestDistance = Math.sin(pitchRadians) * topHalfSurfaceDistance + cameraToSeaLevelDistance;
|
|
7185
|
+
const horizonDistance = cameraToSeaLevelDistance * 10;
|
|
7186
|
+
const farZ = Math.min(furthestDistance * farZMultiplier, horizonDistance);
|
|
7171
7187
|
return {
|
|
7172
|
-
fov:
|
|
7188
|
+
fov: fovRadians,
|
|
7173
7189
|
aspect: width / height,
|
|
7174
7190
|
focalDistance,
|
|
7175
7191
|
near: nearZMultiplier,
|
|
7176
|
-
far: farZ
|
|
7192
|
+
far: farZ
|
|
7177
7193
|
};
|
|
7178
7194
|
}
|
|
7179
7195
|
function getProjectionMatrix(options) {
|
|
@@ -7377,6 +7393,8 @@ class WebMercatorViewport {
|
|
|
7377
7393
|
this.projectionMatrix = Object(_web_mercator_utils__WEBPACK_IMPORTED_MODULE_2__["getProjectionMatrix"])({
|
|
7378
7394
|
width,
|
|
7379
7395
|
height,
|
|
7396
|
+
scale,
|
|
7397
|
+
center,
|
|
7380
7398
|
pitch,
|
|
7381
7399
|
fovy,
|
|
7382
7400
|
nearZMultiplier,
|
|
@@ -49564,6 +49582,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
49564
49582
|
|
|
49565
49583
|
|
|
49566
49584
|
|
|
49585
|
+
/**
|
|
49586
|
+
* Helper function for quickly creating a color bins style based on `d3` `scaleThreshold`.
|
|
49587
|
+
*
|
|
49588
|
+
* Data values of each attribute are rounded down to the nearest value in the domain and are then
|
|
49589
|
+
* styled with the corresponding color.
|
|
49590
|
+
*
|
|
49591
|
+
* @return accessor that maps objects to `Color` values
|
|
49592
|
+
*/
|
|
49593
|
+
|
|
49567
49594
|
function colorBins({
|
|
49568
49595
|
attr,
|
|
49569
49596
|
domain,
|
|
@@ -49595,6 +49622,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
49595
49622
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./src/style/utils.ts");
|
|
49596
49623
|
|
|
49597
49624
|
|
|
49625
|
+
/**
|
|
49626
|
+
* Helper function for quickly creating a color category style.
|
|
49627
|
+
*
|
|
49628
|
+
* Data values of each attribute listed in the domain are mapped one to one
|
|
49629
|
+
* with corresponding colors in the range.
|
|
49630
|
+
*
|
|
49631
|
+
* @return accessor that maps objects to `Color` values
|
|
49632
|
+
*/
|
|
49633
|
+
|
|
49598
49634
|
function colorCategories({
|
|
49599
49635
|
attr,
|
|
49600
49636
|
domain,
|
|
@@ -49634,6 +49670,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
49634
49670
|
|
|
49635
49671
|
|
|
49636
49672
|
|
|
49673
|
+
/**
|
|
49674
|
+
* Helper function for quickly creating a color continuous style.
|
|
49675
|
+
*
|
|
49676
|
+
* Data values of each field are interpolated linearly across values in the domain and
|
|
49677
|
+
* are then styled with a blend of the corresponding color in the range.
|
|
49678
|
+
*
|
|
49679
|
+
* @return accessor that maps objects to `Color` values
|
|
49680
|
+
*/
|
|
49681
|
+
|
|
49637
49682
|
function colorContinuous({
|
|
49638
49683
|
attr,
|
|
49639
49684
|
domain,
|
|
@@ -49745,7 +49790,7 @@ function getAttrValue(attr, d) {
|
|
|
49745
49790
|
return attr(d);
|
|
49746
49791
|
}
|
|
49747
49792
|
|
|
49748
|
-
return d
|
|
49793
|
+
return d?.properties?.[attr];
|
|
49749
49794
|
}
|
|
49750
49795
|
function assert(condition, message = '') {
|
|
49751
49796
|
if (!condition) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/style/color-bins-style.ts"],"names":["colorBins","attr","domain","colors","DEFAULT_PALETTE","nullColor","NULL_COLOR","Array","isArray","palette","length","color","range","d","value","Number","isFinite"],"mappings":";;;;;;;;;AAAA;;
|
|
1
|
+
{"version":3,"sources":["../../../src/style/color-bins-style.ts"],"names":["colorBins","attr","domain","colors","DEFAULT_PALETTE","nullColor","NULL_COLOR","Array","isArray","palette","length","color","range","d","value","Number","isFinite"],"mappings":";;;;;;;;;AAAA;;AAGA;;AACA;;;;;;AAUe,SAASA,SAAT,OAsBoB;AAAA,MArBjCC,IAqBiC,QArBjCA,IAqBiC;AAAA,MApBjCC,MAoBiC,QApBjCA,MAoBiC;AAAA,yBAnBjCC,MAmBiC;AAAA,MAnBjCA,MAmBiC,4BAnBxBC,wBAmBwB;AAAA,4BAlBjCC,SAkBiC;AAAA,MAlBjCA,SAkBiC,+BAlBrBC,mBAkBqB;AACjC,qBAAOC,KAAK,CAACC,OAAN,CAAcN,MAAd,CAAP,EAA8B,6CAA9B;AAEA,MAAMO,OAAO,GAAG,OAAON,MAAP,KAAkB,QAAlB,GAA6B,sBAAWA,MAAX,EAAmBD,MAAM,CAACQ,MAAP,GAAgB,CAAnC,CAA7B,GAAqEP,MAArF;AAEA,MAAMQ,KAAK,GAAG,+BAAgCT,MAAhC,CAAuCA,MAAvC,EAA+CU,KAA/C,CAAqDH,OAArD,CAAd;AAEA,SAAO,UAAAI,CAAC,EAAI;AACV,QAAMC,KAAK,GAAG,yBAAab,IAAb,EAAmBY,CAAnB,CAAd;AACA,WAAO,OAAOC,KAAP,KAAiB,QAAjB,IAA6BC,MAAM,CAACC,QAAP,CAAgBF,KAAhB,CAA7B,GAAsDH,KAAK,CAACG,KAAD,CAA3D,GAAqET,SAA5E;AACD,GAHD;AAID","sourcesContent":["import {scaleThreshold} from 'd3-scale';\nimport {AccessorFunction} from '@deck.gl/core';\nimport {Feature} from 'geojson';\nimport getPalette, {Color, DEFAULT_PALETTE, NULL_COLOR} from './palette';\nimport {assert, AttributeSelector, getAttrValue} from './utils';\n\n/**\n * Helper function for quickly creating a color bins style based on `d3` `scaleThreshold`.\n *\n * Data values of each attribute are rounded down to the nearest value in the domain and are then\n * styled with the corresponding color.\n *\n * @return accessor that maps objects to `Color` values\n */\nexport default function colorBins<DataT = Feature>({\n attr,\n domain,\n colors = DEFAULT_PALETTE,\n nullColor = NULL_COLOR\n}: {\n /** Attribute or column to symbolize by. */\n attr: AttributeSelector<DataT, number>;\n\n /** Category list. Must be a valid list of categories. */\n domain: number[];\n\n /**\n * Color assigned to each domain value.\n *\n * Either Array of colors in RGBA or valid named CARTOColors palette.\n * @default `PurpOr`\n */\n colors?: string | Color[];\n\n /** Color for null values. @default: [204, 204, 204] */\n nullColor?: Color;\n}): AccessorFunction<DataT, Color> {\n assert(Array.isArray(domain), 'Expected \"domain\" to be an array of numbers');\n\n const palette = typeof colors === 'string' ? getPalette(colors, domain.length + 1) : colors;\n\n const color = scaleThreshold<number, Color>().domain(domain).range(palette);\n\n return d => {\n const value = getAttrValue(attr, d);\n return typeof value === 'number' && Number.isFinite(value) ? color(value) : nullColor;\n };\n}\n"],"file":"color-bins-style.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/style/color-categories-style.ts"],"names":["colorCategories","attr","domain","colors","DEFAULT_PALETTE","nullColor","NULL_COLOR","othersColor","OTHERS_COLOR","Array","isArray","colorsByCategory","palette","length","entries","i","c","d","value","Number","isFinite"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/style/color-categories-style.ts"],"names":["colorCategories","attr","domain","colors","DEFAULT_PALETTE","nullColor","NULL_COLOR","othersColor","OTHERS_COLOR","Array","isArray","colorsByCategory","palette","length","entries","i","c","d","value","Number","isFinite"],"mappings":";;;;;;;;;;;;;AAEA;;AACA;;;;;;;;;;;;AAUe,SAASA,eAAT,OA0BoB;AAAA,MAzBjCC,IAyBiC,QAzBjCA,IAyBiC;AAAA,MAxBjCC,MAwBiC,QAxBjCA,MAwBiC;AAAA,yBAvBjCC,MAuBiC;AAAA,MAvBjCA,MAuBiC,4BAvBxBC,wBAuBwB;AAAA,4BAtBjCC,SAsBiC;AAAA,MAtBjCA,SAsBiC,+BAtBrBC,mBAsBqB;AAAA,8BArBjCC,WAqBiC;AAAA,MArBjCA,WAqBiC,iCArBnBC,qBAqBmB;AACjC,qBAAOC,KAAK,CAACC,OAAN,CAAcR,MAAd,CAAP,EAA8B,wDAA9B;AAEA,MAAMS,gBAAgB,GAAG,EAAzB;AACA,MAAMC,OAAO,GAAG,OAAOT,MAAP,KAAkB,QAAlB,GAA6B,sBAAWA,MAAX,EAAmBD,MAAM,CAACW,MAA1B,CAA7B,GAAiEV,MAAjF;;AAJiC,6CAMZD,MAAM,CAACY,OAAP,EANY;AAAA;;AAAA;AAMjC,wDAAuC;AAAA;AAAA,UAA3BC,CAA2B;AAAA,UAAxBC,CAAwB;;AACrCL,MAAAA,gBAAgB,CAACK,CAAD,CAAhB,GAAsBJ,OAAO,CAACG,CAAD,CAA7B;AACD;AARgC;AAAA;AAAA;AAAA;AAAA;;AAUjC,SAAO,UAAAE,CAAC,EAAI;AACV,QAAMC,KAAK,GAAG,yBAAajB,IAAb,EAAmBgB,CAAnB,CAAd;AACA,WAAQ,OAAOC,KAAP,KAAiB,QAAjB,IAA6BC,MAAM,CAACC,QAAP,CAAgBF,KAAhB,CAA9B,IAAyD,OAAOA,KAAP,KAAiB,QAA1E,GACHP,gBAAgB,CAACO,KAAD,CAAhB,IAA2BX,WADxB,GAEHF,SAFJ;AAGD,GALD;AAMD","sourcesContent":["import {AccessorFunction} from '@deck.gl/core';\nimport {Feature} from 'geojson';\nimport getPalette, {Color, DEFAULT_PALETTE, NULL_COLOR, OTHERS_COLOR} from './palette';\nimport {assert, AttributeSelector, getAttrValue} from './utils';\n\n/**\n * Helper function for quickly creating a color category style.\n *\n * Data values of each attribute listed in the domain are mapped one to one\n * with corresponding colors in the range.\n *\n * @return accessor that maps objects to `Color` values\n */\nexport default function colorCategories<DataT = Feature>({\n attr,\n domain,\n colors = DEFAULT_PALETTE,\n nullColor = NULL_COLOR,\n othersColor = OTHERS_COLOR\n}: {\n /** Attribute or column to symbolize by */\n attr: string | AttributeSelector<DataT, number | string>;\n\n /** Category list. Must be a valid list of categories. */\n domain: number[] | string[];\n\n /**\n * Color assigned to each domain value.\n *\n * Either Array of colors in RGBA or valid named CARTOColors palette.\n * @default `PurpOr`\n */\n colors: string | Color[];\n\n /** Color for null values. @default: [204, 204, 204] */\n nullColor?: Color;\n\n /** Fallback color for a category not correctly assigned. @default: [119, 119, 119] */\n othersColor?: Color;\n}): AccessorFunction<DataT, Color> {\n assert(Array.isArray(domain), 'Expected \"domain\" to be an array of numbers or strings');\n\n const colorsByCategory = {};\n const palette = typeof colors === 'string' ? getPalette(colors, domain.length) : colors;\n\n for (const [i, c] of domain.entries()) {\n colorsByCategory[c] = palette[i];\n }\n\n return d => {\n const value = getAttrValue(attr, d);\n return (typeof value === 'number' && Number.isFinite(value)) || typeof value === 'string'\n ? colorsByCategory[value] || othersColor\n : nullColor;\n };\n}\n"],"file":"color-categories-style.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/style/color-continuous-style.ts"],"names":["colorContinuous","attr","domain","colors","DEFAULT_PALETTE","nullColor","NULL_COLOR","Array","isArray","palette","length","color","range","d","value","Number","isFinite"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/style/color-continuous-style.ts"],"names":["colorContinuous","attr","domain","colors","DEFAULT_PALETTE","nullColor","NULL_COLOR","Array","isArray","palette","length","color","range","d","value","Number","isFinite"],"mappings":";;;;;;;;;AACA;;AAEA;;AACA;;;;;;AAUe,SAASA,eAAT,OAsBoB;AAAA,MArBjCC,IAqBiC,QArBjCA,IAqBiC;AAAA,MApBjCC,MAoBiC,QApBjCA,MAoBiC;AAAA,yBAnBjCC,MAmBiC;AAAA,MAnBjCA,MAmBiC,4BAnBxBC,wBAmBwB;AAAA,4BAlBjCC,SAkBiC;AAAA,MAlBjCA,SAkBiC,+BAlBrBC,mBAkBqB;AACjC,qBAAOC,KAAK,CAACC,OAAN,CAAcN,MAAd,CAAP,EAA8B,6CAA9B;AAEA,MAAMO,OAAO,GAAG,OAAON,MAAP,KAAkB,QAAlB,GAA6B,sBAAWA,MAAX,EAAmBD,MAAM,CAACQ,MAA1B,CAA7B,GAAiEP,MAAjF;AACA,MAAMQ,KAAK,GAAG,4BAAqBT,MAArB,CAA4BA,MAA5B,EAAoCU,KAApC,CAA0CH,OAA1C,CAAd;AAEA,SAAO,UAAAI,CAAC,EAAI;AACV,QAAMC,KAAK,GAAG,yBAAab,IAAb,EAAmBY,CAAnB,CAAd;AACA,WAAO,OAAOC,KAAP,KAAiB,QAAjB,IAA6BC,MAAM,CAACC,QAAP,CAAgBF,KAAhB,CAA7B,GAAsDH,KAAK,CAACG,KAAD,CAA3D,GAAqET,SAA5E;AACD,GAHD;AAID","sourcesContent":["import {AccessorFunction} from '@deck.gl/core';\nimport {scaleLinear} from 'd3-scale';\nimport {Feature} from 'geojson';\nimport getPalette, {Color, DEFAULT_PALETTE, NULL_COLOR} from './palette';\nimport {assert, AttributeSelector, getAttrValue} from './utils';\n\n/**\n * Helper function for quickly creating a color continuous style.\n *\n * Data values of each field are interpolated linearly across values in the domain and\n * are then styled with a blend of the corresponding color in the range.\n *\n * @return accessor that maps objects to `Color` values\n */\nexport default function colorContinuous<DataT = Feature>({\n attr,\n domain,\n colors = DEFAULT_PALETTE,\n nullColor = NULL_COLOR\n}: {\n /** Attribute or column to symbolize by. */\n attr: AttributeSelector<DataT, number>;\n\n /** Attribute domain to define the data range. */\n domain: number[];\n\n /**\n * Color assigned to each domain value.\n *\n * Either Array of colors in RGBA or valid named CARTOColors palette.\n * @default `PurpOr`\n */\n colors?: string | Color[];\n\n /** Color for null values. @default: [204, 204, 204]*/\n nullColor?: Color;\n}): AccessorFunction<DataT, Color> {\n assert(Array.isArray(domain), 'Expected \"domain\" to be an array of numbers');\n\n const palette = typeof colors === 'string' ? getPalette(colors, domain.length) : colors;\n const color = scaleLinear<Color>().domain(domain).range(palette);\n\n return d => {\n const value = getAttrValue(attr, d);\n return typeof value === 'number' && Number.isFinite(value) ? color(value) : nullColor;\n };\n}\n"],"file":"color-continuous-style.js"}
|
package/dist/es5/style/utils.js
CHANGED
|
@@ -13,6 +13,8 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
|
13
13
|
var ALLOWED_ATTR_TYPES = Object.freeze(['function', 'string']);
|
|
14
14
|
|
|
15
15
|
function getAttrValue(attr, d) {
|
|
16
|
+
var _properties;
|
|
17
|
+
|
|
16
18
|
assert((0, _typeof2.default)(d) === 'object', 'Expected "data" to be an object');
|
|
17
19
|
assert(ALLOWED_ATTR_TYPES.includes((0, _typeof2.default)(attr)), 'Expected "attr" to be a function or string');
|
|
18
20
|
|
|
@@ -20,7 +22,7 @@ function getAttrValue(attr, d) {
|
|
|
20
22
|
return attr(d);
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
return d.properties[attr];
|
|
25
|
+
return d === null || d === void 0 ? void 0 : (_properties = d.properties) === null || _properties === void 0 ? void 0 : _properties[attr];
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
function assert(condition) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/style/utils.ts"],"names":["ALLOWED_ATTR_TYPES","Object","freeze","getAttrValue","attr","d","assert","includes","properties","condition","message","Error"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/style/utils.ts"],"names":["ALLOWED_ATTR_TYPES","Object","freeze","getAttrValue","attr","d","assert","includes","properties","condition","message","Error"],"mappings":";;;;;;;;;;;;AAEA,IAAMA,kBAAkB,GAAGC,MAAM,CAACC,MAAP,CAAc,CAAC,UAAD,EAAa,QAAb,CAAd,CAA3B;;AAIO,SAASC,YAAT,CACLC,IADK,EAELC,CAFK,EAGC;AAAA;;AACNC,EAAAA,MAAM,CAAC,sBAAOD,CAAP,MAAa,QAAd,EAAwB,iCAAxB,CAAN;AACAC,EAAAA,MAAM,CAACN,kBAAkB,CAACO,QAAnB,uBAAmCH,IAAnC,EAAD,EAA2C,4CAA3C,CAAN;;AAGA,MAAI,OAAOA,IAAP,KAAgB,UAApB,EAAgC;AAC9B,WAAOA,IAAI,CAACC,CAAD,CAAX;AACD;;AACD,SAAQA,CAAR,aAAQA,CAAR,sCAAQA,CAAD,CAA2BG,UAAlC,gDAAO,YAAwCJ,IAAxC,CAAP;AACD;;AAEM,SAASE,MAAT,CAAgBG,SAAhB,EAA4D;AAAA,MAAjCC,OAAiC,uEAAvB,EAAuB;;AACjE,MAAI,CAACD,SAAL,EAAgB;AACd,UAAM,IAAIE,KAAJ,8BAAgCD,OAAhC,EAAN;AACD;AACF","sourcesContent":["import {Feature} from 'geojson';\n\nconst ALLOWED_ATTR_TYPES = Object.freeze(['function', 'string']);\n\nexport type AttributeSelector<DataT = Feature, OutT = any> = string | ((d: DataT) => OutT);\n\nexport function getAttrValue<DataT = Feature, OutT = any>(\n attr: string | AttributeSelector<DataT, OutT>,\n d: DataT\n): OutT {\n assert(typeof d === 'object', 'Expected \"data\" to be an object');\n assert(ALLOWED_ATTR_TYPES.includes(typeof attr), 'Expected \"attr\" to be a function or string');\n\n // Is function\n if (typeof attr === 'function') {\n return attr(d);\n }\n return (d as unknown as Feature)?.properties?.[attr] as OutT;\n}\n\nexport function assert(condition, message = ''): asserts condition {\n if (!condition) {\n throw new Error(`CARTO style error: ${message}`);\n }\n}\n"],"file":"utils.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/style/color-bins-style.ts"],"names":["scaleThreshold","getPalette","DEFAULT_PALETTE","NULL_COLOR","assert","getAttrValue","colorBins","attr","domain","colors","nullColor","Array","isArray","palette","length","color","range","d","value","Number","isFinite"],"mappings":"AAAA,SAAQA,cAAR,QAA6B,UAA7B;
|
|
1
|
+
{"version":3,"sources":["../../../src/style/color-bins-style.ts"],"names":["scaleThreshold","getPalette","DEFAULT_PALETTE","NULL_COLOR","assert","getAttrValue","colorBins","attr","domain","colors","nullColor","Array","isArray","palette","length","color","range","d","value","Number","isFinite"],"mappings":"AAAA,SAAQA,cAAR,QAA6B,UAA7B;AAGA,OAAOC,UAAP,IAA2BC,eAA3B,EAA4CC,UAA5C,QAA6D,WAA7D;AACA,SAAQC,MAAR,EAAmCC,YAAnC,QAAsD,SAAtD;AAUA,eAAe,SAASC,SAAT,CAAoC;AACjDC,EAAAA,IADiD;AAEjDC,EAAAA,MAFiD;AAGjDC,EAAAA,MAAM,GAAGP,eAHwC;AAIjDQ,EAAAA,SAAS,GAAGP;AAJqC,CAApC,EAsBoB;AACjCC,EAAAA,MAAM,CAACO,KAAK,CAACC,OAAN,CAAcJ,MAAd,CAAD,EAAwB,6CAAxB,CAAN;AAEA,QAAMK,OAAO,GAAG,OAAOJ,MAAP,KAAkB,QAAlB,GAA6BR,UAAU,CAACQ,MAAD,EAASD,MAAM,CAACM,MAAP,GAAgB,CAAzB,CAAvC,GAAqEL,MAArF;AAEA,QAAMM,KAAK,GAAGf,cAAc,GAAkBQ,MAAhC,CAAuCA,MAAvC,EAA+CQ,KAA/C,CAAqDH,OAArD,CAAd;AAEA,SAAOI,CAAC,IAAI;AACV,UAAMC,KAAK,GAAGb,YAAY,CAACE,IAAD,EAAOU,CAAP,CAA1B;AACA,WAAO,OAAOC,KAAP,KAAiB,QAAjB,IAA6BC,MAAM,CAACC,QAAP,CAAgBF,KAAhB,CAA7B,GAAsDH,KAAK,CAACG,KAAD,CAA3D,GAAqER,SAA5E;AACD,GAHD;AAID","sourcesContent":["import {scaleThreshold} from 'd3-scale';\nimport {AccessorFunction} from '@deck.gl/core';\nimport {Feature} from 'geojson';\nimport getPalette, {Color, DEFAULT_PALETTE, NULL_COLOR} from './palette';\nimport {assert, AttributeSelector, getAttrValue} from './utils';\n\n/**\n * Helper function for quickly creating a color bins style based on `d3` `scaleThreshold`.\n *\n * Data values of each attribute are rounded down to the nearest value in the domain and are then\n * styled with the corresponding color.\n *\n * @return accessor that maps objects to `Color` values\n */\nexport default function colorBins<DataT = Feature>({\n attr,\n domain,\n colors = DEFAULT_PALETTE,\n nullColor = NULL_COLOR\n}: {\n /** Attribute or column to symbolize by. */\n attr: AttributeSelector<DataT, number>;\n\n /** Category list. Must be a valid list of categories. */\n domain: number[];\n\n /**\n * Color assigned to each domain value.\n *\n * Either Array of colors in RGBA or valid named CARTOColors palette.\n * @default `PurpOr`\n */\n colors?: string | Color[];\n\n /** Color for null values. @default: [204, 204, 204] */\n nullColor?: Color;\n}): AccessorFunction<DataT, Color> {\n assert(Array.isArray(domain), 'Expected \"domain\" to be an array of numbers');\n\n const palette = typeof colors === 'string' ? getPalette(colors, domain.length + 1) : colors;\n\n const color = scaleThreshold<number, Color>().domain(domain).range(palette);\n\n return d => {\n const value = getAttrValue(attr, d);\n return typeof value === 'number' && Number.isFinite(value) ? color(value) : nullColor;\n };\n}\n"],"file":"color-bins-style.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/style/color-categories-style.ts"],"names":["getPalette","DEFAULT_PALETTE","NULL_COLOR","OTHERS_COLOR","assert","getAttrValue","colorCategories","attr","domain","colors","nullColor","othersColor","Array","isArray","colorsByCategory","palette","length","i","c","entries","d","value","Number","isFinite"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/style/color-categories-style.ts"],"names":["getPalette","DEFAULT_PALETTE","NULL_COLOR","OTHERS_COLOR","assert","getAttrValue","colorCategories","attr","domain","colors","nullColor","othersColor","Array","isArray","colorsByCategory","palette","length","i","c","entries","d","value","Number","isFinite"],"mappings":"AAEA,OAAOA,UAAP,IAA2BC,eAA3B,EAA4CC,UAA5C,EAAwDC,YAAxD,QAA2E,WAA3E;AACA,SAAQC,MAAR,EAAmCC,YAAnC,QAAsD,SAAtD;AAUA,eAAe,SAASC,eAAT,CAA0C;AACvDC,EAAAA,IADuD;AAEvDC,EAAAA,MAFuD;AAGvDC,EAAAA,MAAM,GAAGR,eAH8C;AAIvDS,EAAAA,SAAS,GAAGR,UAJ2C;AAKvDS,EAAAA,WAAW,GAAGR;AALyC,CAA1C,EA0BoB;AACjCC,EAAAA,MAAM,CAACQ,KAAK,CAACC,OAAN,CAAcL,MAAd,CAAD,EAAwB,wDAAxB,CAAN;AAEA,QAAMM,gBAAgB,GAAG,EAAzB;AACA,QAAMC,OAAO,GAAG,OAAON,MAAP,KAAkB,QAAlB,GAA6BT,UAAU,CAACS,MAAD,EAASD,MAAM,CAACQ,MAAhB,CAAvC,GAAiEP,MAAjF;;AAEA,OAAK,MAAM,CAACQ,CAAD,EAAIC,CAAJ,CAAX,IAAqBV,MAAM,CAACW,OAAP,EAArB,EAAuC;AACrCL,IAAAA,gBAAgB,CAACI,CAAD,CAAhB,GAAsBH,OAAO,CAACE,CAAD,CAA7B;AACD;;AAED,SAAOG,CAAC,IAAI;AACV,UAAMC,KAAK,GAAGhB,YAAY,CAACE,IAAD,EAAOa,CAAP,CAA1B;AACA,WAAQ,OAAOC,KAAP,KAAiB,QAAjB,IAA6BC,MAAM,CAACC,QAAP,CAAgBF,KAAhB,CAA9B,IAAyD,OAAOA,KAAP,KAAiB,QAA1E,GACHP,gBAAgB,CAACO,KAAD,CAAhB,IAA2BV,WADxB,GAEHD,SAFJ;AAGD,GALD;AAMD","sourcesContent":["import {AccessorFunction} from '@deck.gl/core';\nimport {Feature} from 'geojson';\nimport getPalette, {Color, DEFAULT_PALETTE, NULL_COLOR, OTHERS_COLOR} from './palette';\nimport {assert, AttributeSelector, getAttrValue} from './utils';\n\n/**\n * Helper function for quickly creating a color category style.\n *\n * Data values of each attribute listed in the domain are mapped one to one\n * with corresponding colors in the range.\n *\n * @return accessor that maps objects to `Color` values\n */\nexport default function colorCategories<DataT = Feature>({\n attr,\n domain,\n colors = DEFAULT_PALETTE,\n nullColor = NULL_COLOR,\n othersColor = OTHERS_COLOR\n}: {\n /** Attribute or column to symbolize by */\n attr: string | AttributeSelector<DataT, number | string>;\n\n /** Category list. Must be a valid list of categories. */\n domain: number[] | string[];\n\n /**\n * Color assigned to each domain value.\n *\n * Either Array of colors in RGBA or valid named CARTOColors palette.\n * @default `PurpOr`\n */\n colors: string | Color[];\n\n /** Color for null values. @default: [204, 204, 204] */\n nullColor?: Color;\n\n /** Fallback color for a category not correctly assigned. @default: [119, 119, 119] */\n othersColor?: Color;\n}): AccessorFunction<DataT, Color> {\n assert(Array.isArray(domain), 'Expected \"domain\" to be an array of numbers or strings');\n\n const colorsByCategory = {};\n const palette = typeof colors === 'string' ? getPalette(colors, domain.length) : colors;\n\n for (const [i, c] of domain.entries()) {\n colorsByCategory[c] = palette[i];\n }\n\n return d => {\n const value = getAttrValue(attr, d);\n return (typeof value === 'number' && Number.isFinite(value)) || typeof value === 'string'\n ? colorsByCategory[value] || othersColor\n : nullColor;\n };\n}\n"],"file":"color-categories-style.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/style/color-continuous-style.ts"],"names":["scaleLinear","getPalette","DEFAULT_PALETTE","NULL_COLOR","assert","getAttrValue","colorContinuous","attr","domain","colors","nullColor","Array","isArray","palette","length","color","range","d","value","Number","isFinite"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/style/color-continuous-style.ts"],"names":["scaleLinear","getPalette","DEFAULT_PALETTE","NULL_COLOR","assert","getAttrValue","colorContinuous","attr","domain","colors","nullColor","Array","isArray","palette","length","color","range","d","value","Number","isFinite"],"mappings":"AACA,SAAQA,WAAR,QAA0B,UAA1B;AAEA,OAAOC,UAAP,IAA2BC,eAA3B,EAA4CC,UAA5C,QAA6D,WAA7D;AACA,SAAQC,MAAR,EAAmCC,YAAnC,QAAsD,SAAtD;AAUA,eAAe,SAASC,eAAT,CAA0C;AACvDC,EAAAA,IADuD;AAEvDC,EAAAA,MAFuD;AAGvDC,EAAAA,MAAM,GAAGP,eAH8C;AAIvDQ,EAAAA,SAAS,GAAGP;AAJ2C,CAA1C,EAsBoB;AACjCC,EAAAA,MAAM,CAACO,KAAK,CAACC,OAAN,CAAcJ,MAAd,CAAD,EAAwB,6CAAxB,CAAN;AAEA,QAAMK,OAAO,GAAG,OAAOJ,MAAP,KAAkB,QAAlB,GAA6BR,UAAU,CAACQ,MAAD,EAASD,MAAM,CAACM,MAAhB,CAAvC,GAAiEL,MAAjF;AACA,QAAMM,KAAK,GAAGf,WAAW,GAAUQ,MAArB,CAA4BA,MAA5B,EAAoCQ,KAApC,CAA0CH,OAA1C,CAAd;AAEA,SAAOI,CAAC,IAAI;AACV,UAAMC,KAAK,GAAGb,YAAY,CAACE,IAAD,EAAOU,CAAP,CAA1B;AACA,WAAO,OAAOC,KAAP,KAAiB,QAAjB,IAA6BC,MAAM,CAACC,QAAP,CAAgBF,KAAhB,CAA7B,GAAsDH,KAAK,CAACG,KAAD,CAA3D,GAAqER,SAA5E;AACD,GAHD;AAID","sourcesContent":["import {AccessorFunction} from '@deck.gl/core';\nimport {scaleLinear} from 'd3-scale';\nimport {Feature} from 'geojson';\nimport getPalette, {Color, DEFAULT_PALETTE, NULL_COLOR} from './palette';\nimport {assert, AttributeSelector, getAttrValue} from './utils';\n\n/**\n * Helper function for quickly creating a color continuous style.\n *\n * Data values of each field are interpolated linearly across values in the domain and\n * are then styled with a blend of the corresponding color in the range.\n *\n * @return accessor that maps objects to `Color` values\n */\nexport default function colorContinuous<DataT = Feature>({\n attr,\n domain,\n colors = DEFAULT_PALETTE,\n nullColor = NULL_COLOR\n}: {\n /** Attribute or column to symbolize by. */\n attr: AttributeSelector<DataT, number>;\n\n /** Attribute domain to define the data range. */\n domain: number[];\n\n /**\n * Color assigned to each domain value.\n *\n * Either Array of colors in RGBA or valid named CARTOColors palette.\n * @default `PurpOr`\n */\n colors?: string | Color[];\n\n /** Color for null values. @default: [204, 204, 204]*/\n nullColor?: Color;\n}): AccessorFunction<DataT, Color> {\n assert(Array.isArray(domain), 'Expected \"domain\" to be an array of numbers');\n\n const palette = typeof colors === 'string' ? getPalette(colors, domain.length) : colors;\n const color = scaleLinear<Color>().domain(domain).range(palette);\n\n return d => {\n const value = getAttrValue(attr, d);\n return typeof value === 'number' && Number.isFinite(value) ? color(value) : nullColor;\n };\n}\n"],"file":"color-continuous-style.js"}
|
package/dist/esm/style/utils.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const ALLOWED_ATTR_TYPES = Object.freeze(['function', 'string']);
|
|
2
2
|
export function getAttrValue(attr, d) {
|
|
3
|
+
var _properties;
|
|
4
|
+
|
|
3
5
|
assert(typeof d === 'object', 'Expected "data" to be an object');
|
|
4
6
|
assert(ALLOWED_ATTR_TYPES.includes(typeof attr), 'Expected "attr" to be a function or string');
|
|
5
7
|
|
|
@@ -7,7 +9,7 @@ export function getAttrValue(attr, d) {
|
|
|
7
9
|
return attr(d);
|
|
8
10
|
}
|
|
9
11
|
|
|
10
|
-
return d.properties[attr];
|
|
12
|
+
return d === null || d === void 0 ? void 0 : (_properties = d.properties) === null || _properties === void 0 ? void 0 : _properties[attr];
|
|
11
13
|
}
|
|
12
14
|
export function assert(condition, message = '') {
|
|
13
15
|
if (!condition) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/style/utils.ts"],"names":["ALLOWED_ATTR_TYPES","Object","freeze","getAttrValue","attr","d","assert","includes","properties","condition","message","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/style/utils.ts"],"names":["ALLOWED_ATTR_TYPES","Object","freeze","getAttrValue","attr","d","assert","includes","properties","condition","message","Error"],"mappings":"AAEA,MAAMA,kBAAkB,GAAGC,MAAM,CAACC,MAAP,CAAc,CAAC,UAAD,EAAa,QAAb,CAAd,CAA3B;AAIA,OAAO,SAASC,YAAT,CACLC,IADK,EAELC,CAFK,EAGC;AAAA;;AACNC,EAAAA,MAAM,CAAC,OAAOD,CAAP,KAAa,QAAd,EAAwB,iCAAxB,CAAN;AACAC,EAAAA,MAAM,CAACN,kBAAkB,CAACO,QAAnB,CAA4B,OAAOH,IAAnC,CAAD,EAA2C,4CAA3C,CAAN;;AAGA,MAAI,OAAOA,IAAP,KAAgB,UAApB,EAAgC;AAC9B,WAAOA,IAAI,CAACC,CAAD,CAAX;AACD;;AACD,SAAQA,CAAR,aAAQA,CAAR,sCAAQA,CAAD,CAA2BG,UAAlC,gDAAO,YAAwCJ,IAAxC,CAAP;AACD;AAED,OAAO,SAASE,MAAT,CAAgBG,SAAhB,EAA2BC,OAAO,GAAG,EAArC,EAA4D;AACjE,MAAI,CAACD,SAAL,EAAgB;AACd,UAAM,IAAIE,KAAJ,8BAAgCD,OAAhC,EAAN;AACD;AACF","sourcesContent":["import {Feature} from 'geojson';\n\nconst ALLOWED_ATTR_TYPES = Object.freeze(['function', 'string']);\n\nexport type AttributeSelector<DataT = Feature, OutT = any> = string | ((d: DataT) => OutT);\n\nexport function getAttrValue<DataT = Feature, OutT = any>(\n attr: string | AttributeSelector<DataT, OutT>,\n d: DataT\n): OutT {\n assert(typeof d === 'object', 'Expected \"data\" to be an object');\n assert(ALLOWED_ATTR_TYPES.includes(typeof attr), 'Expected \"attr\" to be a function or string');\n\n // Is function\n if (typeof attr === 'function') {\n return attr(d);\n }\n return (d as unknown as Feature)?.properties?.[attr] as OutT;\n}\n\nexport function assert(condition, message = ''): asserts condition {\n if (!condition) {\n throw new Error(`CARTO style error: ${message}`);\n }\n}\n"],"file":"utils.js"}
|