@uwdata/mosaic-spec 0.7.0 → 0.7.1
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/mosaic-spec.js +765 -759
- package/dist/mosaic-spec.min.js +18 -18
- package/package.json +4 -4
- package/src/ast-to-dom.js +7 -4
package/dist/mosaic-spec.js
CHANGED
|
@@ -14259,7 +14259,7 @@ function decimalToNumber(v2, scale3) {
|
|
|
14259
14259
|
let x3 = 0;
|
|
14260
14260
|
if (v2.signed && (v2[n - 1] | 0) < 0) {
|
|
14261
14261
|
for (let i = 0; i < n; ++i) {
|
|
14262
|
-
x3 += ~
|
|
14262
|
+
x3 += ~v2[i] * BASE32[i];
|
|
14263
14263
|
}
|
|
14264
14264
|
x3 = -(x3 + 1);
|
|
14265
14265
|
} else {
|
|
@@ -26438,6 +26438,9 @@ var Accent_default = colors_default("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b176
|
|
|
26438
26438
|
// ../../node_modules/d3-scale-chromatic/src/categorical/Dark2.js
|
|
26439
26439
|
var Dark2_default = colors_default("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");
|
|
26440
26440
|
|
|
26441
|
+
// ../../node_modules/d3-scale-chromatic/src/categorical/observable10.js
|
|
26442
|
+
var observable10_default = colors_default("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0");
|
|
26443
|
+
|
|
26441
26444
|
// ../../node_modules/d3-scale-chromatic/src/categorical/Paired.js
|
|
26442
26445
|
var Paired_default = colors_default("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");
|
|
26443
26446
|
|
|
@@ -28648,6 +28651,15 @@ function parse(string2, fallback) {
|
|
|
28648
28651
|
return new Date(string2);
|
|
28649
28652
|
}
|
|
28650
28653
|
|
|
28654
|
+
// ../../node_modules/@observablehq/plot/src/order.js
|
|
28655
|
+
function orderof(values2) {
|
|
28656
|
+
if (values2 == null)
|
|
28657
|
+
return;
|
|
28658
|
+
const first3 = values2[0];
|
|
28659
|
+
const last2 = values2[values2.length - 1];
|
|
28660
|
+
return descending(first3, last2);
|
|
28661
|
+
}
|
|
28662
|
+
|
|
28651
28663
|
// ../../node_modules/@observablehq/plot/src/time.js
|
|
28652
28664
|
var durationSecond2 = 1e3;
|
|
28653
28665
|
var durationMinute2 = durationSecond2 * 60;
|
|
@@ -29241,13 +29253,6 @@ function maybeAnchor(value, name2) {
|
|
|
29241
29253
|
function maybeFrameAnchor(value = "middle") {
|
|
29242
29254
|
return maybeAnchor(value, "frameAnchor");
|
|
29243
29255
|
}
|
|
29244
|
-
function orderof(values2) {
|
|
29245
|
-
if (values2 == null)
|
|
29246
|
-
return;
|
|
29247
|
-
const first3 = values2[0];
|
|
29248
|
-
const last2 = values2[values2.length - 1];
|
|
29249
|
-
return descending(first3, last2);
|
|
29250
|
-
}
|
|
29251
29256
|
function inherit2(options = {}, ...rest) {
|
|
29252
29257
|
let o = options;
|
|
29253
29258
|
for (const defaults23 of rest) {
|
|
@@ -29284,6 +29289,15 @@ function named2(things) {
|
|
|
29284
29289
|
function maybeNamed(things) {
|
|
29285
29290
|
return isIterable2(things) ? named2(things) : things;
|
|
29286
29291
|
}
|
|
29292
|
+
function maybeClip(clip) {
|
|
29293
|
+
if (clip === true)
|
|
29294
|
+
clip = "frame";
|
|
29295
|
+
else if (clip === false)
|
|
29296
|
+
clip = null;
|
|
29297
|
+
else if (clip != null)
|
|
29298
|
+
clip = keyword(clip, "clip", ["frame", "sphere"]);
|
|
29299
|
+
return clip;
|
|
29300
|
+
}
|
|
29287
29301
|
|
|
29288
29302
|
// ../../node_modules/@observablehq/plot/src/scales/index.js
|
|
29289
29303
|
var position = Symbol("position");
|
|
@@ -29603,6 +29617,8 @@ function groupn(x3, y3, {
|
|
|
29603
29617
|
extent4.x = x4;
|
|
29604
29618
|
if (Y3)
|
|
29605
29619
|
extent4.y = y4;
|
|
29620
|
+
if (G)
|
|
29621
|
+
extent4.z = f;
|
|
29606
29622
|
if (filter3 && !filter3.reduce(g, extent4))
|
|
29607
29623
|
continue;
|
|
29608
29624
|
groupFacet.push(i++);
|
|
@@ -29701,10 +29717,7 @@ function maybeEvaluator(name2, reduce, inputs, asReduce = maybeReduce) {
|
|
|
29701
29717
|
};
|
|
29702
29718
|
}
|
|
29703
29719
|
function maybeGroup(I, X3) {
|
|
29704
|
-
return X3 ?
|
|
29705
|
-
group(I, (i) => X3[i]),
|
|
29706
|
-
first2
|
|
29707
|
-
) : [[, I]];
|
|
29720
|
+
return X3 ? group(I, (i) => X3[i]) : [[, I]];
|
|
29708
29721
|
}
|
|
29709
29722
|
function maybeReduce(reduce, value, fallback = invalidReduce) {
|
|
29710
29723
|
if (reduce == null)
|
|
@@ -29776,6 +29789,8 @@ function maybeGroupReduceFallback(reduce) {
|
|
|
29776
29789
|
return reduceX;
|
|
29777
29790
|
case "y":
|
|
29778
29791
|
return reduceY;
|
|
29792
|
+
case "z":
|
|
29793
|
+
return reduceZ;
|
|
29779
29794
|
}
|
|
29780
29795
|
throw new Error(`invalid group reduce: ${reduce}`);
|
|
29781
29796
|
}
|
|
@@ -29886,6 +29901,11 @@ var reduceY = {
|
|
|
29886
29901
|
return y3;
|
|
29887
29902
|
}
|
|
29888
29903
|
};
|
|
29904
|
+
var reduceZ = {
|
|
29905
|
+
reduceIndex(I, X3, { z }) {
|
|
29906
|
+
return z;
|
|
29907
|
+
}
|
|
29908
|
+
};
|
|
29889
29909
|
function find2(test) {
|
|
29890
29910
|
if (typeof test !== "function")
|
|
29891
29911
|
throw new Error(`invalid test function: ${test}`);
|
|
@@ -30062,48 +30082,14 @@ function getSource(channels, key) {
|
|
|
30062
30082
|
return channel.source === null ? null : channel;
|
|
30063
30083
|
}
|
|
30064
30084
|
|
|
30065
|
-
// ../../node_modules/@observablehq/plot/src/
|
|
30066
|
-
function
|
|
30067
|
-
|
|
30068
|
-
return (
|
|
30069
|
-
if (cacheKeys?.length !== keys.length || cacheKeys.some((k2, i) => k2 !== keys[i])) {
|
|
30070
|
-
cacheKeys = keys;
|
|
30071
|
-
cacheValue = compute(...keys);
|
|
30072
|
-
}
|
|
30073
|
-
return cacheValue;
|
|
30074
|
-
};
|
|
30075
|
-
}
|
|
30076
|
-
|
|
30077
|
-
// ../../node_modules/@observablehq/plot/src/format.js
|
|
30078
|
-
var numberFormat = memoize1((locale3) => {
|
|
30079
|
-
return new Intl.NumberFormat(locale3);
|
|
30080
|
-
});
|
|
30081
|
-
var monthFormat = memoize1((locale3, month) => {
|
|
30082
|
-
return new Intl.DateTimeFormat(locale3, { timeZone: "UTC", ...month && { month } });
|
|
30083
|
-
});
|
|
30084
|
-
var weekdayFormat = memoize1((locale3, weekday) => {
|
|
30085
|
-
return new Intl.DateTimeFormat(locale3, { timeZone: "UTC", ...weekday && { weekday } });
|
|
30086
|
-
});
|
|
30087
|
-
function formatNumber(locale3 = "en-US") {
|
|
30088
|
-
const format3 = numberFormat(locale3);
|
|
30089
|
-
return (i) => i != null && !isNaN(i) ? format3.format(i) : void 0;
|
|
30090
|
-
}
|
|
30091
|
-
function formatMonth(locale3 = "en-US", format3 = "short") {
|
|
30092
|
-
const fmt = monthFormat(locale3, format3);
|
|
30093
|
-
return (i) => i != null && !isNaN(i = +new Date(Date.UTC(2e3, +i))) ? fmt.format(i) : void 0;
|
|
30094
|
-
}
|
|
30095
|
-
function formatWeekday(locale3 = "en-US", format3 = "short") {
|
|
30096
|
-
const fmt = weekdayFormat(locale3, format3);
|
|
30097
|
-
return (i) => i != null && !isNaN(i = +new Date(Date.UTC(2001, 0, +i))) ? fmt.format(i) : void 0;
|
|
30098
|
-
}
|
|
30099
|
-
function formatIsoDate(date2) {
|
|
30100
|
-
return format2(date2, "Invalid Date");
|
|
30085
|
+
// ../../node_modules/@observablehq/plot/src/context.js
|
|
30086
|
+
function createContext(options = {}) {
|
|
30087
|
+
const { document: document2 = typeof window !== "undefined" ? window.document : void 0, clip } = options;
|
|
30088
|
+
return { document: document2, clip: maybeClip(clip) };
|
|
30101
30089
|
}
|
|
30102
|
-
function
|
|
30103
|
-
|
|
30104
|
-
return (v2) => (v2 instanceof Date ? formatIsoDate : typeof v2 === "number" ? number7 : string)(v2);
|
|
30090
|
+
function create3(name2, { document: document2 }) {
|
|
30091
|
+
return select_default2(creator_default(name2).call(document2.documentElement));
|
|
30105
30092
|
}
|
|
30106
|
-
var formatDefault = formatAuto();
|
|
30107
30093
|
|
|
30108
30094
|
// ../../node_modules/@observablehq/plot/src/warnings.js
|
|
30109
30095
|
var warnings = 0;
|
|
@@ -30122,578 +30108,182 @@ function warn(message) {
|
|
|
30122
30108
|
++warnings;
|
|
30123
30109
|
}
|
|
30124
30110
|
|
|
30125
|
-
// ../../node_modules/@observablehq/plot/src/
|
|
30126
|
-
var
|
|
30127
|
-
var
|
|
30128
|
-
|
|
30129
|
-
|
|
30130
|
-
|
|
30131
|
-
|
|
30132
|
-
|
|
30133
|
-
|
|
30134
|
-
|
|
30135
|
-
|
|
30136
|
-
|
|
30137
|
-
|
|
30138
|
-
|
|
30139
|
-
|
|
30140
|
-
|
|
30141
|
-
|
|
30142
|
-
|
|
30143
|
-
|
|
30144
|
-
|
|
30145
|
-
|
|
30146
|
-
|
|
30147
|
-
|
|
30148
|
-
|
|
30149
|
-
|
|
30150
|
-
|
|
30151
|
-
|
|
30152
|
-
|
|
30153
|
-
|
|
30154
|
-
|
|
30155
|
-
|
|
30156
|
-
|
|
30157
|
-
|
|
30158
|
-
|
|
30159
|
-
stroke: defaultStroke = "none",
|
|
30160
|
-
strokeOpacity: defaultStrokeOpacity,
|
|
30161
|
-
strokeWidth: defaultStrokeWidth,
|
|
30162
|
-
strokeLinecap: defaultStrokeLinecap,
|
|
30163
|
-
strokeLinejoin: defaultStrokeLinejoin,
|
|
30164
|
-
strokeMiterlimit: defaultStrokeMiterlimit,
|
|
30165
|
-
paintOrder: defaultPaintOrder
|
|
30166
|
-
}) {
|
|
30167
|
-
if (defaultFill === null) {
|
|
30168
|
-
fill = null;
|
|
30169
|
-
fillOpacity = null;
|
|
30170
|
-
}
|
|
30171
|
-
if (defaultStroke === null) {
|
|
30172
|
-
stroke = null;
|
|
30173
|
-
strokeOpacity = null;
|
|
30111
|
+
// ../../node_modules/@observablehq/plot/src/projection.js
|
|
30112
|
+
var pi4 = Math.PI;
|
|
30113
|
+
var tau5 = 2 * pi4;
|
|
30114
|
+
var defaultAspectRatio = 0.618;
|
|
30115
|
+
function createProjection({
|
|
30116
|
+
projection: projection3,
|
|
30117
|
+
inset: globalInset = 0,
|
|
30118
|
+
insetTop = globalInset,
|
|
30119
|
+
insetRight = globalInset,
|
|
30120
|
+
insetBottom = globalInset,
|
|
30121
|
+
insetLeft = globalInset
|
|
30122
|
+
} = {}, dimensions) {
|
|
30123
|
+
if (projection3 == null)
|
|
30124
|
+
return;
|
|
30125
|
+
if (typeof projection3.stream === "function")
|
|
30126
|
+
return projection3;
|
|
30127
|
+
let options;
|
|
30128
|
+
let domain;
|
|
30129
|
+
let clip = "frame";
|
|
30130
|
+
if (isObject2(projection3)) {
|
|
30131
|
+
let inset2;
|
|
30132
|
+
({
|
|
30133
|
+
type: projection3,
|
|
30134
|
+
domain,
|
|
30135
|
+
inset: inset2,
|
|
30136
|
+
insetTop = inset2 !== void 0 ? inset2 : insetTop,
|
|
30137
|
+
insetRight = inset2 !== void 0 ? inset2 : insetRight,
|
|
30138
|
+
insetBottom = inset2 !== void 0 ? inset2 : insetBottom,
|
|
30139
|
+
insetLeft = inset2 !== void 0 ? inset2 : insetLeft,
|
|
30140
|
+
clip = clip,
|
|
30141
|
+
...options
|
|
30142
|
+
} = projection3);
|
|
30143
|
+
if (projection3 == null)
|
|
30144
|
+
return;
|
|
30174
30145
|
}
|
|
30175
|
-
if (
|
|
30176
|
-
|
|
30177
|
-
|
|
30178
|
-
|
|
30179
|
-
|
|
30180
|
-
|
|
30146
|
+
if (typeof projection3 !== "function")
|
|
30147
|
+
({ type: projection3 } = namedProjection(projection3));
|
|
30148
|
+
const { width: width2, height: height2, marginLeft: marginLeft2, marginRight: marginRight2, marginTop: marginTop2, marginBottom: marginBottom2 } = dimensions;
|
|
30149
|
+
const dx = width2 - marginLeft2 - marginRight2 - insetLeft - insetRight;
|
|
30150
|
+
const dy = height2 - marginTop2 - marginBottom2 - insetTop - insetBottom;
|
|
30151
|
+
projection3 = projection3?.({ width: dx, height: dy, clip, ...options });
|
|
30152
|
+
if (projection3 == null)
|
|
30153
|
+
return;
|
|
30154
|
+
clip = maybePostClip(clip, marginLeft2, marginTop2, width2 - marginRight2, height2 - marginBottom2);
|
|
30155
|
+
let tx = marginLeft2 + insetLeft;
|
|
30156
|
+
let ty = marginTop2 + insetTop;
|
|
30157
|
+
let transform3;
|
|
30158
|
+
if (domain != null) {
|
|
30159
|
+
const [[x06, y06], [x12, y12]] = path_default(projection3).bounds(domain);
|
|
30160
|
+
const k2 = Math.min(dx / (x12 - x06), dy / (y12 - y06));
|
|
30161
|
+
if (k2 > 0) {
|
|
30162
|
+
tx -= (k2 * (x06 + x12) - dx) / 2;
|
|
30163
|
+
ty -= (k2 * (y06 + y12) - dy) / 2;
|
|
30164
|
+
transform3 = transform_default({
|
|
30165
|
+
point(x3, y3) {
|
|
30166
|
+
this.stream.point(x3 * k2 + tx, y3 * k2 + ty);
|
|
30167
|
+
}
|
|
30168
|
+
});
|
|
30169
|
+
} else {
|
|
30170
|
+
warn(`Warning: the projection could not be fit to the specified domain; using the default scale.`);
|
|
30171
|
+
}
|
|
30181
30172
|
}
|
|
30182
|
-
|
|
30183
|
-
|
|
30184
|
-
|
|
30185
|
-
|
|
30186
|
-
|
|
30187
|
-
|
|
30188
|
-
|
|
30189
|
-
|
|
30190
|
-
|
|
30191
|
-
|
|
30192
|
-
|
|
30193
|
-
|
|
30194
|
-
|
|
30195
|
-
|
|
30196
|
-
|
|
30197
|
-
|
|
30173
|
+
transform3 ??= tx === 0 && ty === 0 ? identity8() : transform_default({
|
|
30174
|
+
point(x3, y3) {
|
|
30175
|
+
this.stream.point(x3 + tx, y3 + ty);
|
|
30176
|
+
}
|
|
30177
|
+
});
|
|
30178
|
+
return { stream: (s2) => projection3.stream(transform3.stream(clip(s2))) };
|
|
30179
|
+
}
|
|
30180
|
+
function namedProjection(projection3) {
|
|
30181
|
+
switch (`${projection3}`.toLowerCase()) {
|
|
30182
|
+
case "albers-usa":
|
|
30183
|
+
return scaleProjection(albersUsa_default, 0.7463, 0.4673);
|
|
30184
|
+
case "albers":
|
|
30185
|
+
return conicProjection2(albers_default, 0.7463, 0.4673);
|
|
30186
|
+
case "azimuthal-equal-area":
|
|
30187
|
+
return scaleProjection(azimuthalEqualArea_default, 4, 4);
|
|
30188
|
+
case "azimuthal-equidistant":
|
|
30189
|
+
return scaleProjection(azimuthalEquidistant_default, tau5, tau5);
|
|
30190
|
+
case "conic-conformal":
|
|
30191
|
+
return conicProjection2(conicConformal_default, tau5, tau5);
|
|
30192
|
+
case "conic-equal-area":
|
|
30193
|
+
return conicProjection2(conicEqualArea_default, 6.1702, 2.9781);
|
|
30194
|
+
case "conic-equidistant":
|
|
30195
|
+
return conicProjection2(conicEquidistant_default, 7.312, 3.6282);
|
|
30196
|
+
case "equal-earth":
|
|
30197
|
+
return scaleProjection(equalEarth_default, 5.4133, 2.6347);
|
|
30198
|
+
case "equirectangular":
|
|
30199
|
+
return scaleProjection(equirectangular_default, tau5, pi4);
|
|
30200
|
+
case "gnomonic":
|
|
30201
|
+
return scaleProjection(gnomonic_default, 3.4641, 3.4641);
|
|
30202
|
+
case "identity":
|
|
30203
|
+
return { type: identity8 };
|
|
30204
|
+
case "reflect-y":
|
|
30205
|
+
return { type: reflectY };
|
|
30206
|
+
case "mercator":
|
|
30207
|
+
return scaleProjection(mercator_default, tau5, tau5);
|
|
30208
|
+
case "orthographic":
|
|
30209
|
+
return scaleProjection(orthographic_default, 2, 2);
|
|
30210
|
+
case "stereographic":
|
|
30211
|
+
return scaleProjection(stereographic_default, 2, 2);
|
|
30212
|
+
case "transverse-mercator":
|
|
30213
|
+
return scaleProjection(transverseMercator_default, tau5, tau5);
|
|
30214
|
+
default:
|
|
30215
|
+
throw new Error(`unknown projection type: ${projection3}`);
|
|
30198
30216
|
}
|
|
30199
|
-
|
|
30200
|
-
|
|
30201
|
-
|
|
30202
|
-
|
|
30217
|
+
}
|
|
30218
|
+
function maybePostClip(clip, x12, y12, x22, y22) {
|
|
30219
|
+
if (clip === false || clip == null || typeof clip === "number")
|
|
30220
|
+
return (s2) => s2;
|
|
30221
|
+
if (clip === true)
|
|
30222
|
+
clip = "frame";
|
|
30223
|
+
switch (`${clip}`.toLowerCase()) {
|
|
30224
|
+
case "frame":
|
|
30225
|
+
return clipRectangle(x12, y12, x22, y22);
|
|
30226
|
+
default:
|
|
30227
|
+
throw new Error(`unknown projection clip type: ${clip}`);
|
|
30203
30228
|
}
|
|
30204
|
-
|
|
30205
|
-
|
|
30206
|
-
mark2.strokeWidth = impliedNumber(cstrokeWidth, 1);
|
|
30207
|
-
mark2.strokeOpacity = impliedNumber(cstrokeOpacity, 1);
|
|
30208
|
-
mark2.strokeLinejoin = impliedString(strokeLinejoin, "miter");
|
|
30209
|
-
mark2.strokeLinecap = impliedString(strokeLinecap, "butt");
|
|
30210
|
-
mark2.strokeMiterlimit = impliedNumber(strokeMiterlimit, 4);
|
|
30211
|
-
mark2.strokeDasharray = impliedString(strokeDasharray, "none");
|
|
30212
|
-
mark2.strokeDashoffset = impliedString(strokeDashoffset, "0");
|
|
30213
|
-
}
|
|
30214
|
-
mark2.target = string(target);
|
|
30215
|
-
mark2.ariaLabel = string(cariaLabel);
|
|
30216
|
-
mark2.ariaDescription = string(ariaDescription);
|
|
30217
|
-
mark2.ariaHidden = string(ariaHidden);
|
|
30218
|
-
mark2.opacity = impliedNumber(copacity, 1);
|
|
30219
|
-
mark2.mixBlendMode = impliedString(mixBlendMode, "normal");
|
|
30220
|
-
mark2.imageFilter = impliedString(imageFilter, "none");
|
|
30221
|
-
mark2.paintOrder = impliedString(paintOrder, "normal");
|
|
30222
|
-
mark2.pointerEvents = impliedString(pointerEvents, "auto");
|
|
30223
|
-
mark2.shapeRendering = impliedString(shapeRendering, "auto");
|
|
30229
|
+
}
|
|
30230
|
+
function scaleProjection(createProjection2, kx2, ky2) {
|
|
30224
30231
|
return {
|
|
30225
|
-
|
|
30226
|
-
|
|
30227
|
-
|
|
30228
|
-
|
|
30229
|
-
|
|
30230
|
-
|
|
30231
|
-
|
|
30232
|
-
|
|
30233
|
-
|
|
30232
|
+
type: ({ width: width2, height: height2, rotate, precision = 0.15, clip }) => {
|
|
30233
|
+
const projection3 = createProjection2();
|
|
30234
|
+
if (precision != null)
|
|
30235
|
+
projection3.precision?.(precision);
|
|
30236
|
+
if (rotate != null)
|
|
30237
|
+
projection3.rotate?.(rotate);
|
|
30238
|
+
if (typeof clip === "number")
|
|
30239
|
+
projection3.clipAngle?.(clip);
|
|
30240
|
+
projection3.scale(Math.min(width2 / kx2, height2 / ky2));
|
|
30241
|
+
projection3.translate([width2 / 2, height2 / 2]);
|
|
30242
|
+
return projection3;
|
|
30243
|
+
},
|
|
30244
|
+
aspectRatio: ky2 / kx2
|
|
30234
30245
|
};
|
|
30235
30246
|
}
|
|
30236
|
-
function
|
|
30237
|
-
|
|
30238
|
-
|
|
30239
|
-
|
|
30240
|
-
|
|
30241
|
-
|
|
30242
|
-
|
|
30243
|
-
|
|
30244
|
-
|
|
30245
|
-
|
|
30246
|
-
selection2.text((i) => formatDefault(T[i]));
|
|
30247
|
-
}
|
|
30248
|
-
function applyTextGroup(selection2, T) {
|
|
30249
|
-
if (T)
|
|
30250
|
-
selection2.text(([i]) => formatDefault(T[i]));
|
|
30251
|
-
}
|
|
30252
|
-
function applyChannelStyles(selection2, { target, tip: tip2 }, {
|
|
30253
|
-
ariaLabel: AL,
|
|
30254
|
-
title: T,
|
|
30255
|
-
fill: F,
|
|
30256
|
-
fillOpacity: FO,
|
|
30257
|
-
stroke: S,
|
|
30258
|
-
strokeOpacity: SO,
|
|
30259
|
-
strokeWidth: SW,
|
|
30260
|
-
opacity: O,
|
|
30261
|
-
href: H
|
|
30262
|
-
}) {
|
|
30263
|
-
if (AL)
|
|
30264
|
-
applyAttr(selection2, "aria-label", (i) => AL[i]);
|
|
30265
|
-
if (F)
|
|
30266
|
-
applyAttr(selection2, "fill", (i) => F[i]);
|
|
30267
|
-
if (FO)
|
|
30268
|
-
applyAttr(selection2, "fill-opacity", (i) => FO[i]);
|
|
30269
|
-
if (S)
|
|
30270
|
-
applyAttr(selection2, "stroke", (i) => S[i]);
|
|
30271
|
-
if (SO)
|
|
30272
|
-
applyAttr(selection2, "stroke-opacity", (i) => SO[i]);
|
|
30273
|
-
if (SW)
|
|
30274
|
-
applyAttr(selection2, "stroke-width", (i) => SW[i]);
|
|
30275
|
-
if (O)
|
|
30276
|
-
applyAttr(selection2, "opacity", (i) => O[i]);
|
|
30277
|
-
if (H)
|
|
30278
|
-
applyHref(selection2, (i) => H[i], target);
|
|
30279
|
-
if (!tip2)
|
|
30280
|
-
applyTitle(selection2, T);
|
|
30281
|
-
}
|
|
30282
|
-
function applyGroupedChannelStyles(selection2, { target, tip: tip2 }, {
|
|
30283
|
-
ariaLabel: AL,
|
|
30284
|
-
title: T,
|
|
30285
|
-
fill: F,
|
|
30286
|
-
fillOpacity: FO,
|
|
30287
|
-
stroke: S,
|
|
30288
|
-
strokeOpacity: SO,
|
|
30289
|
-
strokeWidth: SW,
|
|
30290
|
-
opacity: O,
|
|
30291
|
-
href: H
|
|
30292
|
-
}) {
|
|
30293
|
-
if (AL)
|
|
30294
|
-
applyAttr(selection2, "aria-label", ([i]) => AL[i]);
|
|
30295
|
-
if (F)
|
|
30296
|
-
applyAttr(selection2, "fill", ([i]) => F[i]);
|
|
30297
|
-
if (FO)
|
|
30298
|
-
applyAttr(selection2, "fill-opacity", ([i]) => FO[i]);
|
|
30299
|
-
if (S)
|
|
30300
|
-
applyAttr(selection2, "stroke", ([i]) => S[i]);
|
|
30301
|
-
if (SO)
|
|
30302
|
-
applyAttr(selection2, "stroke-opacity", ([i]) => SO[i]);
|
|
30303
|
-
if (SW)
|
|
30304
|
-
applyAttr(selection2, "stroke-width", ([i]) => SW[i]);
|
|
30305
|
-
if (O)
|
|
30306
|
-
applyAttr(selection2, "opacity", ([i]) => O[i]);
|
|
30307
|
-
if (H)
|
|
30308
|
-
applyHref(selection2, ([i]) => H[i], target);
|
|
30309
|
-
if (!tip2)
|
|
30310
|
-
applyTitleGroup(selection2, T);
|
|
30311
|
-
}
|
|
30312
|
-
function groupAesthetics({
|
|
30313
|
-
ariaLabel: AL,
|
|
30314
|
-
title: T,
|
|
30315
|
-
fill: F,
|
|
30316
|
-
fillOpacity: FO,
|
|
30317
|
-
stroke: S,
|
|
30318
|
-
strokeOpacity: SO,
|
|
30319
|
-
strokeWidth: SW,
|
|
30320
|
-
opacity: O,
|
|
30321
|
-
href: H
|
|
30322
|
-
}, { tip: tip2 }) {
|
|
30323
|
-
return [AL, tip2 ? void 0 : T, F, FO, S, SO, SW, O, H].filter((c4) => c4 !== void 0);
|
|
30324
|
-
}
|
|
30325
|
-
function groupZ2(I, Z, z) {
|
|
30326
|
-
const G = group(I, (i) => Z[i]);
|
|
30327
|
-
if (z === void 0 && G.size > 1 + I.length >> 1) {
|
|
30328
|
-
warn(
|
|
30329
|
-
`Warning: the implicit z channel has high cardinality. This may occur when the fill or stroke channel is associated with quantitative data rather than ordinal or categorical data. You can suppress this warning by setting the z option explicitly; if this data represents a single series, set z to null.`
|
|
30330
|
-
);
|
|
30331
|
-
}
|
|
30332
|
-
return G.values();
|
|
30333
|
-
}
|
|
30334
|
-
function* groupIndex(I, position3, mark2, channels) {
|
|
30335
|
-
const { z } = mark2;
|
|
30336
|
-
const { z: Z } = channels;
|
|
30337
|
-
const A5 = groupAesthetics(channels, mark2);
|
|
30338
|
-
const C3 = [...position3, ...A5];
|
|
30339
|
-
for (const G of Z ? groupZ2(I, Z, z) : [I]) {
|
|
30340
|
-
let Ag;
|
|
30341
|
-
let Gg;
|
|
30342
|
-
out:
|
|
30343
|
-
for (const i of G) {
|
|
30344
|
-
for (const c4 of C3) {
|
|
30345
|
-
if (!defined(c4[i])) {
|
|
30346
|
-
if (Gg)
|
|
30347
|
-
Gg.push(-1);
|
|
30348
|
-
continue out;
|
|
30349
|
-
}
|
|
30350
|
-
}
|
|
30351
|
-
if (Ag === void 0) {
|
|
30352
|
-
if (Gg)
|
|
30353
|
-
yield Gg;
|
|
30354
|
-
Ag = A5.map((c4) => keyof2(c4[i])), Gg = [i];
|
|
30355
|
-
continue;
|
|
30356
|
-
}
|
|
30357
|
-
Gg.push(i);
|
|
30358
|
-
for (let j = 0; j < A5.length; ++j) {
|
|
30359
|
-
const k2 = keyof2(A5[j][i]);
|
|
30360
|
-
if (k2 !== Ag[j]) {
|
|
30361
|
-
yield Gg;
|
|
30362
|
-
Ag = A5.map((c4) => keyof2(c4[i])), Gg = [i];
|
|
30363
|
-
continue out;
|
|
30364
|
-
}
|
|
30247
|
+
function conicProjection2(createProjection2, kx2, ky2) {
|
|
30248
|
+
const { type: type2, aspectRatio: aspectRatio2 } = scaleProjection(createProjection2, kx2, ky2);
|
|
30249
|
+
return {
|
|
30250
|
+
type: (options) => {
|
|
30251
|
+
const { parallels, domain, width: width2, height: height2 } = options;
|
|
30252
|
+
const projection3 = type2(options);
|
|
30253
|
+
if (parallels != null) {
|
|
30254
|
+
projection3.parallels(parallels);
|
|
30255
|
+
if (domain === void 0) {
|
|
30256
|
+
projection3.fitSize([width2, height2], { type: "Sphere" });
|
|
30365
30257
|
}
|
|
30366
30258
|
}
|
|
30367
|
-
|
|
30368
|
-
|
|
30369
|
-
|
|
30370
|
-
}
|
|
30371
|
-
function maybeClip(clip) {
|
|
30372
|
-
if (clip === true)
|
|
30373
|
-
clip = "frame";
|
|
30374
|
-
else if (clip === false)
|
|
30375
|
-
clip = null;
|
|
30376
|
-
else if (clip != null)
|
|
30377
|
-
clip = keyword(clip, "clip", ["frame", "sphere"]);
|
|
30378
|
-
return clip;
|
|
30259
|
+
return projection3;
|
|
30260
|
+
},
|
|
30261
|
+
aspectRatio: aspectRatio2
|
|
30262
|
+
};
|
|
30379
30263
|
}
|
|
30380
|
-
|
|
30381
|
-
|
|
30382
|
-
|
|
30383
|
-
|
|
30384
|
-
|
|
30385
|
-
const { width: width2, height: height2, marginLeft: marginLeft2, marginRight: marginRight2, marginTop: marginTop2, marginBottom: marginBottom2 } = dimensions;
|
|
30386
|
-
const id2 = getClipId();
|
|
30387
|
-
clipUrl = `url(#${id2})`;
|
|
30388
|
-
selection2 = create3("svg:g", context).call(
|
|
30389
|
-
(g) => g.append("svg:clipPath").attr("id", id2).append("rect").attr("x", marginLeft2).attr("y", marginTop2).attr("width", width2 - marginRight2 - marginLeft2).attr("height", height2 - marginTop2 - marginBottom2)
|
|
30390
|
-
).each(function() {
|
|
30391
|
-
this.appendChild(selection2.node());
|
|
30392
|
-
selection2.node = () => this;
|
|
30393
|
-
});
|
|
30394
|
-
break;
|
|
30264
|
+
var identity8 = constant({ stream: (stream) => stream });
|
|
30265
|
+
var reflectY = constant(
|
|
30266
|
+
transform_default({
|
|
30267
|
+
point(x3, y3) {
|
|
30268
|
+
this.stream.point(x3, -y3);
|
|
30395
30269
|
}
|
|
30396
|
-
|
|
30397
|
-
|
|
30398
|
-
|
|
30399
|
-
|
|
30400
|
-
|
|
30401
|
-
|
|
30402
|
-
|
|
30403
|
-
|
|
30270
|
+
})
|
|
30271
|
+
);
|
|
30272
|
+
function project(cx, cy, values2, projection3) {
|
|
30273
|
+
const x3 = values2[cx];
|
|
30274
|
+
const y3 = values2[cy];
|
|
30275
|
+
const n = x3.length;
|
|
30276
|
+
const X3 = values2[cx] = new Float64Array(n).fill(NaN);
|
|
30277
|
+
const Y3 = values2[cy] = new Float64Array(n).fill(NaN);
|
|
30278
|
+
let i;
|
|
30279
|
+
const stream = projection3.stream({
|
|
30280
|
+
point(x4, y4) {
|
|
30281
|
+
X3[i] = x4;
|
|
30282
|
+
Y3[i] = y4;
|
|
30404
30283
|
}
|
|
30405
|
-
}
|
|
30406
|
-
|
|
30407
|
-
|
|
30408
|
-
applyAttr(selection2, "aria-hidden", mark2.ariaHidden);
|
|
30409
|
-
applyAttr(selection2, "clip-path", clipUrl);
|
|
30410
|
-
}
|
|
30411
|
-
function applyIndirectStyles(selection2, mark2, dimensions, context) {
|
|
30412
|
-
applyClip(selection2, mark2, dimensions, context);
|
|
30413
|
-
applyAttr(selection2, "fill", mark2.fill);
|
|
30414
|
-
applyAttr(selection2, "fill-opacity", mark2.fillOpacity);
|
|
30415
|
-
applyAttr(selection2, "stroke", mark2.stroke);
|
|
30416
|
-
applyAttr(selection2, "stroke-width", mark2.strokeWidth);
|
|
30417
|
-
applyAttr(selection2, "stroke-opacity", mark2.strokeOpacity);
|
|
30418
|
-
applyAttr(selection2, "stroke-linejoin", mark2.strokeLinejoin);
|
|
30419
|
-
applyAttr(selection2, "stroke-linecap", mark2.strokeLinecap);
|
|
30420
|
-
applyAttr(selection2, "stroke-miterlimit", mark2.strokeMiterlimit);
|
|
30421
|
-
applyAttr(selection2, "stroke-dasharray", mark2.strokeDasharray);
|
|
30422
|
-
applyAttr(selection2, "stroke-dashoffset", mark2.strokeDashoffset);
|
|
30423
|
-
applyAttr(selection2, "shape-rendering", mark2.shapeRendering);
|
|
30424
|
-
applyAttr(selection2, "filter", mark2.imageFilter);
|
|
30425
|
-
applyAttr(selection2, "paint-order", mark2.paintOrder);
|
|
30426
|
-
const { pointerEvents = context.pointerSticky === false ? "none" : void 0 } = mark2;
|
|
30427
|
-
applyAttr(selection2, "pointer-events", pointerEvents);
|
|
30428
|
-
}
|
|
30429
|
-
function applyDirectStyles(selection2, mark2) {
|
|
30430
|
-
applyStyle(selection2, "mix-blend-mode", mark2.mixBlendMode);
|
|
30431
|
-
applyAttr(selection2, "opacity", mark2.opacity);
|
|
30432
|
-
}
|
|
30433
|
-
function applyHref(selection2, href, target) {
|
|
30434
|
-
selection2.each(function(i) {
|
|
30435
|
-
const h = href(i);
|
|
30436
|
-
if (h != null) {
|
|
30437
|
-
const a2 = this.ownerDocument.createElementNS(namespaces_default.svg, "a");
|
|
30438
|
-
a2.setAttribute("fill", "inherit");
|
|
30439
|
-
a2.setAttributeNS(namespaces_default.xlink, "href", h);
|
|
30440
|
-
if (target != null)
|
|
30441
|
-
a2.setAttribute("target", target);
|
|
30442
|
-
this.parentNode.insertBefore(a2, this).appendChild(this);
|
|
30443
|
-
}
|
|
30444
|
-
});
|
|
30445
|
-
}
|
|
30446
|
-
function applyAttr(selection2, name2, value) {
|
|
30447
|
-
if (value != null)
|
|
30448
|
-
selection2.attr(name2, value);
|
|
30449
|
-
}
|
|
30450
|
-
function applyStyle(selection2, name2, value) {
|
|
30451
|
-
if (value != null)
|
|
30452
|
-
selection2.style(name2, value);
|
|
30453
|
-
}
|
|
30454
|
-
function applyTransform(selection2, mark2, { x: x3, y: y3 }, tx = offset, ty = offset) {
|
|
30455
|
-
tx += mark2.dx;
|
|
30456
|
-
ty += mark2.dy;
|
|
30457
|
-
if (x3?.bandwidth)
|
|
30458
|
-
tx += x3.bandwidth() / 2;
|
|
30459
|
-
if (y3?.bandwidth)
|
|
30460
|
-
ty += y3.bandwidth() / 2;
|
|
30461
|
-
if (tx || ty)
|
|
30462
|
-
selection2.attr("transform", `translate(${tx},${ty})`);
|
|
30463
|
-
}
|
|
30464
|
-
function impliedString(value, impliedValue) {
|
|
30465
|
-
if ((value = string(value)) !== impliedValue)
|
|
30466
|
-
return value;
|
|
30467
|
-
}
|
|
30468
|
-
function impliedNumber(value, impliedValue) {
|
|
30469
|
-
if ((value = number5(value)) !== impliedValue)
|
|
30470
|
-
return value;
|
|
30471
|
-
}
|
|
30472
|
-
var validClassName = /^-?([_a-z]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])([_a-z0-9-]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*$/i;
|
|
30473
|
-
function maybeClassName(name2) {
|
|
30474
|
-
if (name2 === void 0)
|
|
30475
|
-
return "plot-d6a7b5";
|
|
30476
|
-
name2 = `${name2}`;
|
|
30477
|
-
if (!validClassName.test(name2))
|
|
30478
|
-
throw new Error(`invalid class name: ${name2}`);
|
|
30479
|
-
return name2;
|
|
30480
|
-
}
|
|
30481
|
-
function applyInlineStyles(selection2, style2) {
|
|
30482
|
-
if (typeof style2 === "string") {
|
|
30483
|
-
selection2.property("style", style2);
|
|
30484
|
-
} else if (style2 != null) {
|
|
30485
|
-
for (const element of selection2) {
|
|
30486
|
-
Object.assign(element.style, style2);
|
|
30487
|
-
}
|
|
30488
|
-
}
|
|
30489
|
-
}
|
|
30490
|
-
function applyFrameAnchor({ frameAnchor }, { width: width2, height: height2, marginTop: marginTop2, marginRight: marginRight2, marginBottom: marginBottom2, marginLeft: marginLeft2 }) {
|
|
30491
|
-
return [
|
|
30492
|
-
/left$/.test(frameAnchor) ? marginLeft2 : /right$/.test(frameAnchor) ? width2 - marginRight2 : (marginLeft2 + width2 - marginRight2) / 2,
|
|
30493
|
-
/^top/.test(frameAnchor) ? marginTop2 : /^bottom/.test(frameAnchor) ? height2 - marginBottom2 : (marginTop2 + height2 - marginBottom2) / 2
|
|
30494
|
-
];
|
|
30495
|
-
}
|
|
30496
|
-
|
|
30497
|
-
// ../../node_modules/@observablehq/plot/src/context.js
|
|
30498
|
-
function createContext(options = {}) {
|
|
30499
|
-
const { document: document2 = typeof window !== "undefined" ? window.document : void 0, clip } = options;
|
|
30500
|
-
return { document: document2, clip: maybeClip(clip) };
|
|
30501
|
-
}
|
|
30502
|
-
function create3(name2, { document: document2 }) {
|
|
30503
|
-
return select_default2(creator_default(name2).call(document2.documentElement));
|
|
30504
|
-
}
|
|
30505
|
-
|
|
30506
|
-
// ../../node_modules/@observablehq/plot/src/projection.js
|
|
30507
|
-
var pi4 = Math.PI;
|
|
30508
|
-
var tau5 = 2 * pi4;
|
|
30509
|
-
var defaultAspectRatio = 0.618;
|
|
30510
|
-
function createProjection({
|
|
30511
|
-
projection: projection3,
|
|
30512
|
-
inset: globalInset = 0,
|
|
30513
|
-
insetTop = globalInset,
|
|
30514
|
-
insetRight = globalInset,
|
|
30515
|
-
insetBottom = globalInset,
|
|
30516
|
-
insetLeft = globalInset
|
|
30517
|
-
} = {}, dimensions) {
|
|
30518
|
-
if (projection3 == null)
|
|
30519
|
-
return;
|
|
30520
|
-
if (typeof projection3.stream === "function")
|
|
30521
|
-
return projection3;
|
|
30522
|
-
let options;
|
|
30523
|
-
let domain;
|
|
30524
|
-
let clip = "frame";
|
|
30525
|
-
if (isObject2(projection3)) {
|
|
30526
|
-
let inset2;
|
|
30527
|
-
({
|
|
30528
|
-
type: projection3,
|
|
30529
|
-
domain,
|
|
30530
|
-
inset: inset2,
|
|
30531
|
-
insetTop = inset2 !== void 0 ? inset2 : insetTop,
|
|
30532
|
-
insetRight = inset2 !== void 0 ? inset2 : insetRight,
|
|
30533
|
-
insetBottom = inset2 !== void 0 ? inset2 : insetBottom,
|
|
30534
|
-
insetLeft = inset2 !== void 0 ? inset2 : insetLeft,
|
|
30535
|
-
clip = clip,
|
|
30536
|
-
...options
|
|
30537
|
-
} = projection3);
|
|
30538
|
-
if (projection3 == null)
|
|
30539
|
-
return;
|
|
30540
|
-
}
|
|
30541
|
-
if (typeof projection3 !== "function")
|
|
30542
|
-
({ type: projection3 } = namedProjection(projection3));
|
|
30543
|
-
const { width: width2, height: height2, marginLeft: marginLeft2, marginRight: marginRight2, marginTop: marginTop2, marginBottom: marginBottom2 } = dimensions;
|
|
30544
|
-
const dx = width2 - marginLeft2 - marginRight2 - insetLeft - insetRight;
|
|
30545
|
-
const dy = height2 - marginTop2 - marginBottom2 - insetTop - insetBottom;
|
|
30546
|
-
projection3 = projection3?.({ width: dx, height: dy, clip, ...options });
|
|
30547
|
-
if (projection3 == null)
|
|
30548
|
-
return;
|
|
30549
|
-
clip = maybePostClip(clip, marginLeft2, marginTop2, width2 - marginRight2, height2 - marginBottom2);
|
|
30550
|
-
let tx = marginLeft2 + insetLeft;
|
|
30551
|
-
let ty = marginTop2 + insetTop;
|
|
30552
|
-
let transform3;
|
|
30553
|
-
if (domain != null) {
|
|
30554
|
-
const [[x06, y06], [x12, y12]] = path_default(projection3).bounds(domain);
|
|
30555
|
-
const k2 = Math.min(dx / (x12 - x06), dy / (y12 - y06));
|
|
30556
|
-
if (k2 > 0) {
|
|
30557
|
-
tx -= (k2 * (x06 + x12) - dx) / 2;
|
|
30558
|
-
ty -= (k2 * (y06 + y12) - dy) / 2;
|
|
30559
|
-
transform3 = Object.assign(
|
|
30560
|
-
transform_default({
|
|
30561
|
-
point(x3, y3) {
|
|
30562
|
-
this.stream.point(x3 * k2 + tx, y3 * k2 + ty);
|
|
30563
|
-
}
|
|
30564
|
-
}),
|
|
30565
|
-
{ invert: ([x3, y3]) => [(x3 - tx) / k2, (y3 - ty) / k2] }
|
|
30566
|
-
);
|
|
30567
|
-
} else {
|
|
30568
|
-
warn(`Warning: the projection could not be fit to the specified domain; using the default scale.`);
|
|
30569
|
-
}
|
|
30570
|
-
}
|
|
30571
|
-
transform3 ??= tx === 0 && ty === 0 ? identity8() : Object.assign(
|
|
30572
|
-
transform_default({
|
|
30573
|
-
point(x3, y3) {
|
|
30574
|
-
this.stream.point(x3 + tx, y3 + ty);
|
|
30575
|
-
}
|
|
30576
|
-
}),
|
|
30577
|
-
{ invert: ([x3, y3]) => [x3 - tx, y3 - ty] }
|
|
30578
|
-
);
|
|
30579
|
-
return {
|
|
30580
|
-
stream: (s2) => projection3.stream(transform3.stream(clip(s2))),
|
|
30581
|
-
invert: (p) => projection3.invert(transform3.invert(p))
|
|
30582
|
-
};
|
|
30583
|
-
}
|
|
30584
|
-
function namedProjection(projection3) {
|
|
30585
|
-
switch (`${projection3}`.toLowerCase()) {
|
|
30586
|
-
case "albers-usa":
|
|
30587
|
-
return scaleProjection(albersUsa_default, 0.7463, 0.4673);
|
|
30588
|
-
case "albers":
|
|
30589
|
-
return conicProjection2(albers_default, 0.7463, 0.4673);
|
|
30590
|
-
case "azimuthal-equal-area":
|
|
30591
|
-
return scaleProjection(azimuthalEqualArea_default, 4, 4);
|
|
30592
|
-
case "azimuthal-equidistant":
|
|
30593
|
-
return scaleProjection(azimuthalEquidistant_default, tau5, tau5);
|
|
30594
|
-
case "conic-conformal":
|
|
30595
|
-
return conicProjection2(conicConformal_default, tau5, tau5);
|
|
30596
|
-
case "conic-equal-area":
|
|
30597
|
-
return conicProjection2(conicEqualArea_default, 6.1702, 2.9781);
|
|
30598
|
-
case "conic-equidistant":
|
|
30599
|
-
return conicProjection2(conicEquidistant_default, 7.312, 3.6282);
|
|
30600
|
-
case "equal-earth":
|
|
30601
|
-
return scaleProjection(equalEarth_default, 5.4133, 2.6347);
|
|
30602
|
-
case "equirectangular":
|
|
30603
|
-
return scaleProjection(equirectangular_default, tau5, pi4);
|
|
30604
|
-
case "gnomonic":
|
|
30605
|
-
return scaleProjection(gnomonic_default, 3.4641, 3.4641);
|
|
30606
|
-
case "identity":
|
|
30607
|
-
return { type: identity8 };
|
|
30608
|
-
case "reflect-y":
|
|
30609
|
-
return { type: reflectY };
|
|
30610
|
-
case "mercator":
|
|
30611
|
-
return scaleProjection(mercator_default, tau5, tau5);
|
|
30612
|
-
case "orthographic":
|
|
30613
|
-
return scaleProjection(orthographic_default, 2, 2);
|
|
30614
|
-
case "stereographic":
|
|
30615
|
-
return scaleProjection(stereographic_default, 2, 2);
|
|
30616
|
-
case "transverse-mercator":
|
|
30617
|
-
return scaleProjection(transverseMercator_default, tau5, tau5);
|
|
30618
|
-
default:
|
|
30619
|
-
throw new Error(`unknown projection type: ${projection3}`);
|
|
30620
|
-
}
|
|
30621
|
-
}
|
|
30622
|
-
function maybePostClip(clip, x12, y12, x22, y22) {
|
|
30623
|
-
if (clip === false || clip == null || typeof clip === "number")
|
|
30624
|
-
return (s2) => s2;
|
|
30625
|
-
if (clip === true)
|
|
30626
|
-
clip = "frame";
|
|
30627
|
-
switch (`${clip}`.toLowerCase()) {
|
|
30628
|
-
case "frame":
|
|
30629
|
-
return clipRectangle(x12, y12, x22, y22);
|
|
30630
|
-
default:
|
|
30631
|
-
throw new Error(`unknown projection clip type: ${clip}`);
|
|
30632
|
-
}
|
|
30633
|
-
}
|
|
30634
|
-
function scaleProjection(createProjection2, kx2, ky2) {
|
|
30635
|
-
return {
|
|
30636
|
-
type: ({ width: width2, height: height2, rotate, precision = 0.15, clip }) => {
|
|
30637
|
-
const projection3 = createProjection2();
|
|
30638
|
-
if (precision != null)
|
|
30639
|
-
projection3.precision?.(precision);
|
|
30640
|
-
if (rotate != null)
|
|
30641
|
-
projection3.rotate?.(rotate);
|
|
30642
|
-
if (typeof clip === "number")
|
|
30643
|
-
projection3.clipAngle?.(clip);
|
|
30644
|
-
projection3.scale(Math.min(width2 / kx2, height2 / ky2));
|
|
30645
|
-
projection3.translate([width2 / 2, height2 / 2]);
|
|
30646
|
-
return projection3;
|
|
30647
|
-
},
|
|
30648
|
-
aspectRatio: ky2 / kx2
|
|
30649
|
-
};
|
|
30650
|
-
}
|
|
30651
|
-
function conicProjection2(createProjection2, kx2, ky2) {
|
|
30652
|
-
const { type: type2, aspectRatio: aspectRatio2 } = scaleProjection(createProjection2, kx2, ky2);
|
|
30653
|
-
return {
|
|
30654
|
-
type: (options) => {
|
|
30655
|
-
const { parallels, domain, width: width2, height: height2 } = options;
|
|
30656
|
-
const projection3 = type2(options);
|
|
30657
|
-
if (parallels != null) {
|
|
30658
|
-
projection3.parallels(parallels);
|
|
30659
|
-
if (domain === void 0) {
|
|
30660
|
-
projection3.fitSize([width2, height2], { type: "Sphere" });
|
|
30661
|
-
}
|
|
30662
|
-
}
|
|
30663
|
-
return projection3;
|
|
30664
|
-
},
|
|
30665
|
-
aspectRatio: aspectRatio2
|
|
30666
|
-
};
|
|
30667
|
-
}
|
|
30668
|
-
var identity8 = constant({
|
|
30669
|
-
stream: (stream) => stream,
|
|
30670
|
-
invert: (p) => p
|
|
30671
|
-
});
|
|
30672
|
-
var reflectY = constant(
|
|
30673
|
-
Object.assign(
|
|
30674
|
-
transform_default({
|
|
30675
|
-
point(x3, y3) {
|
|
30676
|
-
this.stream.point(x3, -y3);
|
|
30677
|
-
}
|
|
30678
|
-
}),
|
|
30679
|
-
{ invert: ([x3, y3]) => [x3, -y3] }
|
|
30680
|
-
)
|
|
30681
|
-
);
|
|
30682
|
-
function project(cx, cy, values2, projection3) {
|
|
30683
|
-
const x3 = values2[cx];
|
|
30684
|
-
const y3 = values2[cy];
|
|
30685
|
-
const n = x3.length;
|
|
30686
|
-
const X3 = values2[cx] = new Float64Array(n).fill(NaN);
|
|
30687
|
-
const Y3 = values2[cy] = new Float64Array(n).fill(NaN);
|
|
30688
|
-
let i;
|
|
30689
|
-
const stream = projection3.stream({
|
|
30690
|
-
point(x4, y4) {
|
|
30691
|
-
X3[i] = x4;
|
|
30692
|
-
Y3[i] = y4;
|
|
30693
|
-
}
|
|
30694
|
-
});
|
|
30695
|
-
for (i = 0; i < n; ++i) {
|
|
30696
|
-
stream.point(x3[i], y3[i]);
|
|
30284
|
+
});
|
|
30285
|
+
for (i = 0; i < n; ++i) {
|
|
30286
|
+
stream.point(x3[i], y3[i]);
|
|
30697
30287
|
}
|
|
30698
30288
|
}
|
|
30699
30289
|
function hasProjection({ projection: projection3 } = {}) {
|
|
@@ -30762,23 +30352,11 @@ function getGeometryChannels(channel) {
|
|
|
30762
30352
|
}
|
|
30763
30353
|
|
|
30764
30354
|
// ../../node_modules/@observablehq/plot/src/scales/schemes.js
|
|
30765
|
-
var schemeObservable10 = [
|
|
30766
|
-
"#4269d0",
|
|
30767
|
-
"#efb118",
|
|
30768
|
-
"#ff725c",
|
|
30769
|
-
"#6cc5b0",
|
|
30770
|
-
"#3ca951",
|
|
30771
|
-
"#ff8ab7",
|
|
30772
|
-
"#a463f2",
|
|
30773
|
-
"#97bbf5",
|
|
30774
|
-
"#9c6b4e",
|
|
30775
|
-
"#9498a0"
|
|
30776
|
-
];
|
|
30777
30355
|
var categoricalSchemes = /* @__PURE__ */ new Map([
|
|
30778
30356
|
["accent", Accent_default],
|
|
30779
30357
|
["category10", category10_default],
|
|
30780
30358
|
["dark2", Dark2_default],
|
|
30781
|
-
["observable10",
|
|
30359
|
+
["observable10", observable10_default],
|
|
30782
30360
|
["paired", Paired_default],
|
|
30783
30361
|
["pastel1", Pastel1_default],
|
|
30784
30362
|
["pastel2", Pastel2_default],
|
|
@@ -31813,111 +31391,517 @@ function inferScaleType(key, channels, { type: type2, domain, range: range3, sch
|
|
|
31813
31391
|
if (isCategoricalScheme(scheme28))
|
|
31814
31392
|
return "categorical";
|
|
31815
31393
|
}
|
|
31816
|
-
return "linear";
|
|
31394
|
+
return "linear";
|
|
31395
|
+
}
|
|
31396
|
+
function asOrdinalType(kind) {
|
|
31397
|
+
switch (kind) {
|
|
31398
|
+
case position:
|
|
31399
|
+
return "point";
|
|
31400
|
+
case color2:
|
|
31401
|
+
return ordinalImplicit;
|
|
31402
|
+
default:
|
|
31403
|
+
return "ordinal";
|
|
31404
|
+
}
|
|
31405
|
+
}
|
|
31406
|
+
function isOrdinalScale({ type: type2 }) {
|
|
31407
|
+
return type2 === "ordinal" || type2 === "point" || type2 === "band" || type2 === ordinalImplicit;
|
|
31408
|
+
}
|
|
31409
|
+
function isThresholdScale({ type: type2 }) {
|
|
31410
|
+
return type2 === "threshold";
|
|
31411
|
+
}
|
|
31412
|
+
function isBandScale({ type: type2 }) {
|
|
31413
|
+
return type2 === "point" || type2 === "band";
|
|
31414
|
+
}
|
|
31415
|
+
function isCollapsed(scale3) {
|
|
31416
|
+
if (scale3 === void 0)
|
|
31417
|
+
return true;
|
|
31418
|
+
const domain = scale3.domain();
|
|
31419
|
+
const value = scale3(domain[0]);
|
|
31420
|
+
for (let i = 1, n = domain.length; i < n; ++i) {
|
|
31421
|
+
if (scale3(domain[i]) - value) {
|
|
31422
|
+
return false;
|
|
31423
|
+
}
|
|
31424
|
+
}
|
|
31425
|
+
return true;
|
|
31426
|
+
}
|
|
31427
|
+
function coerceType(channels, { domain, ...options }, coerceValues) {
|
|
31428
|
+
for (const c4 of channels) {
|
|
31429
|
+
if (c4.value !== void 0) {
|
|
31430
|
+
if (domain === void 0)
|
|
31431
|
+
domain = c4.value?.domain;
|
|
31432
|
+
c4.value = coerceValues(c4.value);
|
|
31433
|
+
}
|
|
31434
|
+
}
|
|
31435
|
+
return {
|
|
31436
|
+
domain: domain === void 0 ? domain : coerceValues(domain),
|
|
31437
|
+
...options
|
|
31438
|
+
};
|
|
31439
|
+
}
|
|
31440
|
+
function coerceSymbols(values2) {
|
|
31441
|
+
return map2(values2, maybeSymbol);
|
|
31442
|
+
}
|
|
31443
|
+
function scale2(options = {}) {
|
|
31444
|
+
let scale3;
|
|
31445
|
+
for (const key in options) {
|
|
31446
|
+
if (!registry.has(key))
|
|
31447
|
+
continue;
|
|
31448
|
+
if (!isScaleOptions(options[key]))
|
|
31449
|
+
continue;
|
|
31450
|
+
if (scale3 !== void 0)
|
|
31451
|
+
throw new Error("ambiguous scale definition; multiple scales found");
|
|
31452
|
+
scale3 = exposeScale(normalizeScale(key, options[key]));
|
|
31453
|
+
}
|
|
31454
|
+
if (scale3 === void 0)
|
|
31455
|
+
throw new Error("invalid scale definition; no scale found");
|
|
31456
|
+
return scale3;
|
|
31457
|
+
}
|
|
31458
|
+
function exposeScales(scales2) {
|
|
31459
|
+
return (key) => {
|
|
31460
|
+
if (!registry.has(key = `${key}`))
|
|
31461
|
+
throw new Error(`unknown scale: ${key}`);
|
|
31462
|
+
return scales2[key];
|
|
31463
|
+
};
|
|
31464
|
+
}
|
|
31465
|
+
function exposeScale({ scale: scale3, type: type2, domain, range: range3, interpolate, interval: interval2, transform: transform3, percent, pivot }) {
|
|
31466
|
+
if (type2 === "identity")
|
|
31467
|
+
return { type: "identity", apply: (d) => d, invert: (d) => d };
|
|
31468
|
+
const unknown = scale3.unknown ? scale3.unknown() : void 0;
|
|
31469
|
+
return {
|
|
31470
|
+
type: type2,
|
|
31471
|
+
domain: slice3(domain),
|
|
31472
|
+
// defensive copy
|
|
31473
|
+
...range3 !== void 0 && { range: slice3(range3) },
|
|
31474
|
+
// defensive copy
|
|
31475
|
+
...transform3 !== void 0 && { transform: transform3 },
|
|
31476
|
+
...percent && { percent },
|
|
31477
|
+
// only exposed if truthy
|
|
31478
|
+
...unknown !== void 0 && { unknown },
|
|
31479
|
+
...interval2 !== void 0 && { interval: interval2 },
|
|
31480
|
+
// quantitative
|
|
31481
|
+
...interpolate !== void 0 && { interpolate },
|
|
31482
|
+
...scale3.clamp && { clamp: scale3.clamp() },
|
|
31483
|
+
// diverging (always asymmetric; we never want to apply the symmetric transform twice)
|
|
31484
|
+
...pivot !== void 0 && { pivot, symmetric: false },
|
|
31485
|
+
// log, diverging-log
|
|
31486
|
+
...scale3.base && { base: scale3.base() },
|
|
31487
|
+
// pow, diverging-pow
|
|
31488
|
+
...scale3.exponent && { exponent: scale3.exponent() },
|
|
31489
|
+
// symlog, diverging-symlog
|
|
31490
|
+
...scale3.constant && { constant: scale3.constant() },
|
|
31491
|
+
// band, point
|
|
31492
|
+
...scale3.align && { align: scale3.align(), round: scale3.round() },
|
|
31493
|
+
...scale3.padding && (scale3.paddingInner ? { paddingInner: scale3.paddingInner(), paddingOuter: scale3.paddingOuter() } : { padding: scale3.padding() }),
|
|
31494
|
+
...scale3.bandwidth && { bandwidth: scale3.bandwidth(), step: scale3.step() },
|
|
31495
|
+
// utilities
|
|
31496
|
+
apply: (t) => scale3(t),
|
|
31497
|
+
...scale3.invert && { invert: (t) => scale3.invert(t) }
|
|
31498
|
+
};
|
|
31499
|
+
}
|
|
31500
|
+
|
|
31501
|
+
// ../../node_modules/@observablehq/plot/src/memoize.js
|
|
31502
|
+
function memoize1(compute) {
|
|
31503
|
+
let cacheValue, cacheKeys;
|
|
31504
|
+
return (...keys) => {
|
|
31505
|
+
if (cacheKeys?.length !== keys.length || cacheKeys.some((k2, i) => k2 !== keys[i])) {
|
|
31506
|
+
cacheKeys = keys;
|
|
31507
|
+
cacheValue = compute(...keys);
|
|
31508
|
+
}
|
|
31509
|
+
return cacheValue;
|
|
31510
|
+
};
|
|
31511
|
+
}
|
|
31512
|
+
|
|
31513
|
+
// ../../node_modules/@observablehq/plot/src/format.js
|
|
31514
|
+
var numberFormat = memoize1((locale3) => {
|
|
31515
|
+
return new Intl.NumberFormat(locale3);
|
|
31516
|
+
});
|
|
31517
|
+
var monthFormat = memoize1((locale3, month) => {
|
|
31518
|
+
return new Intl.DateTimeFormat(locale3, { timeZone: "UTC", ...month && { month } });
|
|
31519
|
+
});
|
|
31520
|
+
var weekdayFormat = memoize1((locale3, weekday) => {
|
|
31521
|
+
return new Intl.DateTimeFormat(locale3, { timeZone: "UTC", ...weekday && { weekday } });
|
|
31522
|
+
});
|
|
31523
|
+
function formatNumber(locale3 = "en-US") {
|
|
31524
|
+
const format3 = numberFormat(locale3);
|
|
31525
|
+
return (i) => i != null && !isNaN(i) ? format3.format(i) : void 0;
|
|
31526
|
+
}
|
|
31527
|
+
function formatMonth(locale3 = "en-US", format3 = "short") {
|
|
31528
|
+
const fmt = monthFormat(locale3, format3);
|
|
31529
|
+
return (i) => i != null && !isNaN(i = +new Date(Date.UTC(2e3, +i))) ? fmt.format(i) : void 0;
|
|
31530
|
+
}
|
|
31531
|
+
function formatWeekday(locale3 = "en-US", format3 = "short") {
|
|
31532
|
+
const fmt = weekdayFormat(locale3, format3);
|
|
31533
|
+
return (i) => i != null && !isNaN(i = +new Date(Date.UTC(2001, 0, +i))) ? fmt.format(i) : void 0;
|
|
31534
|
+
}
|
|
31535
|
+
function formatIsoDate(date2) {
|
|
31536
|
+
return format2(date2, "Invalid Date");
|
|
31537
|
+
}
|
|
31538
|
+
function formatAuto(locale3 = "en-US") {
|
|
31539
|
+
const number7 = formatNumber(locale3);
|
|
31540
|
+
return (v2) => (v2 instanceof Date ? formatIsoDate : typeof v2 === "number" ? number7 : string)(v2);
|
|
31541
|
+
}
|
|
31542
|
+
var formatDefault = formatAuto();
|
|
31543
|
+
|
|
31544
|
+
// ../../node_modules/@observablehq/plot/src/style.js
|
|
31545
|
+
var offset = (typeof window !== "undefined" ? window.devicePixelRatio > 1 : typeof it === "undefined") ? 0 : 0.5;
|
|
31546
|
+
var nextClipId = 0;
|
|
31547
|
+
function getClipId() {
|
|
31548
|
+
return `plot-clip-${++nextClipId}`;
|
|
31549
|
+
}
|
|
31550
|
+
function styles(mark2, {
|
|
31551
|
+
title,
|
|
31552
|
+
href,
|
|
31553
|
+
ariaLabel: variaLabel,
|
|
31554
|
+
ariaDescription,
|
|
31555
|
+
ariaHidden,
|
|
31556
|
+
target,
|
|
31557
|
+
fill,
|
|
31558
|
+
fillOpacity,
|
|
31559
|
+
stroke,
|
|
31560
|
+
strokeWidth,
|
|
31561
|
+
strokeOpacity,
|
|
31562
|
+
strokeLinejoin,
|
|
31563
|
+
strokeLinecap,
|
|
31564
|
+
strokeMiterlimit,
|
|
31565
|
+
strokeDasharray,
|
|
31566
|
+
strokeDashoffset,
|
|
31567
|
+
opacity: opacity2,
|
|
31568
|
+
mixBlendMode,
|
|
31569
|
+
imageFilter,
|
|
31570
|
+
paintOrder,
|
|
31571
|
+
pointerEvents,
|
|
31572
|
+
shapeRendering,
|
|
31573
|
+
channels
|
|
31574
|
+
}, {
|
|
31575
|
+
ariaLabel: cariaLabel,
|
|
31576
|
+
fill: defaultFill = "currentColor",
|
|
31577
|
+
fillOpacity: defaultFillOpacity,
|
|
31578
|
+
stroke: defaultStroke = "none",
|
|
31579
|
+
strokeOpacity: defaultStrokeOpacity,
|
|
31580
|
+
strokeWidth: defaultStrokeWidth,
|
|
31581
|
+
strokeLinecap: defaultStrokeLinecap,
|
|
31582
|
+
strokeLinejoin: defaultStrokeLinejoin,
|
|
31583
|
+
strokeMiterlimit: defaultStrokeMiterlimit,
|
|
31584
|
+
paintOrder: defaultPaintOrder
|
|
31585
|
+
}) {
|
|
31586
|
+
if (defaultFill === null) {
|
|
31587
|
+
fill = null;
|
|
31588
|
+
fillOpacity = null;
|
|
31589
|
+
}
|
|
31590
|
+
if (defaultStroke === null) {
|
|
31591
|
+
stroke = null;
|
|
31592
|
+
strokeOpacity = null;
|
|
31593
|
+
}
|
|
31594
|
+
if (isNoneish(defaultFill)) {
|
|
31595
|
+
if (!isNoneish(defaultStroke) && (!isNoneish(fill) || channels?.fill))
|
|
31596
|
+
defaultStroke = "none";
|
|
31597
|
+
} else {
|
|
31598
|
+
if (isNoneish(defaultStroke) && (!isNoneish(stroke) || channels?.stroke))
|
|
31599
|
+
defaultFill = "none";
|
|
31600
|
+
}
|
|
31601
|
+
const [vfill, cfill] = maybeColorChannel(fill, defaultFill);
|
|
31602
|
+
const [vfillOpacity, cfillOpacity] = maybeNumberChannel(fillOpacity, defaultFillOpacity);
|
|
31603
|
+
const [vstroke, cstroke] = maybeColorChannel(stroke, defaultStroke);
|
|
31604
|
+
const [vstrokeOpacity, cstrokeOpacity] = maybeNumberChannel(strokeOpacity, defaultStrokeOpacity);
|
|
31605
|
+
const [vopacity, copacity] = maybeNumberChannel(opacity2);
|
|
31606
|
+
if (!isNone(cstroke)) {
|
|
31607
|
+
if (strokeWidth === void 0)
|
|
31608
|
+
strokeWidth = defaultStrokeWidth;
|
|
31609
|
+
if (strokeLinecap === void 0)
|
|
31610
|
+
strokeLinecap = defaultStrokeLinecap;
|
|
31611
|
+
if (strokeLinejoin === void 0)
|
|
31612
|
+
strokeLinejoin = defaultStrokeLinejoin;
|
|
31613
|
+
if (strokeMiterlimit === void 0 && !isRound(strokeLinejoin))
|
|
31614
|
+
strokeMiterlimit = defaultStrokeMiterlimit;
|
|
31615
|
+
if (!isNone(cfill) && paintOrder === void 0)
|
|
31616
|
+
paintOrder = defaultPaintOrder;
|
|
31617
|
+
}
|
|
31618
|
+
const [vstrokeWidth, cstrokeWidth] = maybeNumberChannel(strokeWidth);
|
|
31619
|
+
if (defaultFill !== null) {
|
|
31620
|
+
mark2.fill = impliedString(cfill, "currentColor");
|
|
31621
|
+
mark2.fillOpacity = impliedNumber(cfillOpacity, 1);
|
|
31622
|
+
}
|
|
31623
|
+
if (defaultStroke !== null) {
|
|
31624
|
+
mark2.stroke = impliedString(cstroke, "none");
|
|
31625
|
+
mark2.strokeWidth = impliedNumber(cstrokeWidth, 1);
|
|
31626
|
+
mark2.strokeOpacity = impliedNumber(cstrokeOpacity, 1);
|
|
31627
|
+
mark2.strokeLinejoin = impliedString(strokeLinejoin, "miter");
|
|
31628
|
+
mark2.strokeLinecap = impliedString(strokeLinecap, "butt");
|
|
31629
|
+
mark2.strokeMiterlimit = impliedNumber(strokeMiterlimit, 4);
|
|
31630
|
+
mark2.strokeDasharray = impliedString(strokeDasharray, "none");
|
|
31631
|
+
mark2.strokeDashoffset = impliedString(strokeDashoffset, "0");
|
|
31632
|
+
}
|
|
31633
|
+
mark2.target = string(target);
|
|
31634
|
+
mark2.ariaLabel = string(cariaLabel);
|
|
31635
|
+
mark2.ariaDescription = string(ariaDescription);
|
|
31636
|
+
mark2.ariaHidden = string(ariaHidden);
|
|
31637
|
+
mark2.opacity = impliedNumber(copacity, 1);
|
|
31638
|
+
mark2.mixBlendMode = impliedString(mixBlendMode, "normal");
|
|
31639
|
+
mark2.imageFilter = impliedString(imageFilter, "none");
|
|
31640
|
+
mark2.paintOrder = impliedString(paintOrder, "normal");
|
|
31641
|
+
mark2.pointerEvents = impliedString(pointerEvents, "auto");
|
|
31642
|
+
mark2.shapeRendering = impliedString(shapeRendering, "auto");
|
|
31643
|
+
return {
|
|
31644
|
+
title: { value: title, optional: true, filter: null },
|
|
31645
|
+
href: { value: href, optional: true, filter: null },
|
|
31646
|
+
ariaLabel: { value: variaLabel, optional: true, filter: null },
|
|
31647
|
+
fill: { value: vfill, scale: "auto", optional: true },
|
|
31648
|
+
fillOpacity: { value: vfillOpacity, scale: "auto", optional: true },
|
|
31649
|
+
stroke: { value: vstroke, scale: "auto", optional: true },
|
|
31650
|
+
strokeOpacity: { value: vstrokeOpacity, scale: "auto", optional: true },
|
|
31651
|
+
strokeWidth: { value: vstrokeWidth, optional: true },
|
|
31652
|
+
opacity: { value: vopacity, scale: "auto", optional: true }
|
|
31653
|
+
};
|
|
31654
|
+
}
|
|
31655
|
+
function applyTitle(selection2, L) {
|
|
31656
|
+
if (L)
|
|
31657
|
+
selection2.filter((i) => nonempty(L[i])).append("title").call(applyText, L);
|
|
31658
|
+
}
|
|
31659
|
+
function applyTitleGroup(selection2, L) {
|
|
31660
|
+
if (L)
|
|
31661
|
+
selection2.filter(([i]) => nonempty(L[i])).append("title").call(applyTextGroup, L);
|
|
31662
|
+
}
|
|
31663
|
+
function applyText(selection2, T) {
|
|
31664
|
+
if (T)
|
|
31665
|
+
selection2.text((i) => formatDefault(T[i]));
|
|
31666
|
+
}
|
|
31667
|
+
function applyTextGroup(selection2, T) {
|
|
31668
|
+
if (T)
|
|
31669
|
+
selection2.text(([i]) => formatDefault(T[i]));
|
|
31670
|
+
}
|
|
31671
|
+
function applyChannelStyles(selection2, { target, tip: tip2 }, {
|
|
31672
|
+
ariaLabel: AL,
|
|
31673
|
+
title: T,
|
|
31674
|
+
fill: F,
|
|
31675
|
+
fillOpacity: FO,
|
|
31676
|
+
stroke: S,
|
|
31677
|
+
strokeOpacity: SO,
|
|
31678
|
+
strokeWidth: SW,
|
|
31679
|
+
opacity: O,
|
|
31680
|
+
href: H
|
|
31681
|
+
}) {
|
|
31682
|
+
if (AL)
|
|
31683
|
+
applyAttr(selection2, "aria-label", (i) => AL[i]);
|
|
31684
|
+
if (F)
|
|
31685
|
+
applyAttr(selection2, "fill", (i) => F[i]);
|
|
31686
|
+
if (FO)
|
|
31687
|
+
applyAttr(selection2, "fill-opacity", (i) => FO[i]);
|
|
31688
|
+
if (S)
|
|
31689
|
+
applyAttr(selection2, "stroke", (i) => S[i]);
|
|
31690
|
+
if (SO)
|
|
31691
|
+
applyAttr(selection2, "stroke-opacity", (i) => SO[i]);
|
|
31692
|
+
if (SW)
|
|
31693
|
+
applyAttr(selection2, "stroke-width", (i) => SW[i]);
|
|
31694
|
+
if (O)
|
|
31695
|
+
applyAttr(selection2, "opacity", (i) => O[i]);
|
|
31696
|
+
if (H)
|
|
31697
|
+
applyHref(selection2, (i) => H[i], target);
|
|
31698
|
+
if (!tip2)
|
|
31699
|
+
applyTitle(selection2, T);
|
|
31700
|
+
}
|
|
31701
|
+
function applyGroupedChannelStyles(selection2, { target, tip: tip2 }, {
|
|
31702
|
+
ariaLabel: AL,
|
|
31703
|
+
title: T,
|
|
31704
|
+
fill: F,
|
|
31705
|
+
fillOpacity: FO,
|
|
31706
|
+
stroke: S,
|
|
31707
|
+
strokeOpacity: SO,
|
|
31708
|
+
strokeWidth: SW,
|
|
31709
|
+
opacity: O,
|
|
31710
|
+
href: H
|
|
31711
|
+
}) {
|
|
31712
|
+
if (AL)
|
|
31713
|
+
applyAttr(selection2, "aria-label", ([i]) => AL[i]);
|
|
31714
|
+
if (F)
|
|
31715
|
+
applyAttr(selection2, "fill", ([i]) => F[i]);
|
|
31716
|
+
if (FO)
|
|
31717
|
+
applyAttr(selection2, "fill-opacity", ([i]) => FO[i]);
|
|
31718
|
+
if (S)
|
|
31719
|
+
applyAttr(selection2, "stroke", ([i]) => S[i]);
|
|
31720
|
+
if (SO)
|
|
31721
|
+
applyAttr(selection2, "stroke-opacity", ([i]) => SO[i]);
|
|
31722
|
+
if (SW)
|
|
31723
|
+
applyAttr(selection2, "stroke-width", ([i]) => SW[i]);
|
|
31724
|
+
if (O)
|
|
31725
|
+
applyAttr(selection2, "opacity", ([i]) => O[i]);
|
|
31726
|
+
if (H)
|
|
31727
|
+
applyHref(selection2, ([i]) => H[i], target);
|
|
31728
|
+
if (!tip2)
|
|
31729
|
+
applyTitleGroup(selection2, T);
|
|
31730
|
+
}
|
|
31731
|
+
function groupAesthetics({
|
|
31732
|
+
ariaLabel: AL,
|
|
31733
|
+
title: T,
|
|
31734
|
+
fill: F,
|
|
31735
|
+
fillOpacity: FO,
|
|
31736
|
+
stroke: S,
|
|
31737
|
+
strokeOpacity: SO,
|
|
31738
|
+
strokeWidth: SW,
|
|
31739
|
+
opacity: O,
|
|
31740
|
+
href: H
|
|
31741
|
+
}, { tip: tip2 }) {
|
|
31742
|
+
return [AL, tip2 ? void 0 : T, F, FO, S, SO, SW, O, H].filter((c4) => c4 !== void 0);
|
|
31743
|
+
}
|
|
31744
|
+
function groupZ2(I, Z, z) {
|
|
31745
|
+
const G = group(I, (i) => Z[i]);
|
|
31746
|
+
if (z === void 0 && G.size > 1 + I.length >> 1) {
|
|
31747
|
+
warn(
|
|
31748
|
+
`Warning: the implicit z channel has high cardinality. This may occur when the fill or stroke channel is associated with quantitative data rather than ordinal or categorical data. You can suppress this warning by setting the z option explicitly; if this data represents a single series, set z to null.`
|
|
31749
|
+
);
|
|
31750
|
+
}
|
|
31751
|
+
return G.values();
|
|
31752
|
+
}
|
|
31753
|
+
function* groupIndex(I, position3, mark2, channels) {
|
|
31754
|
+
const { z } = mark2;
|
|
31755
|
+
const { z: Z } = channels;
|
|
31756
|
+
const A5 = groupAesthetics(channels, mark2);
|
|
31757
|
+
const C3 = [...position3, ...A5];
|
|
31758
|
+
for (const G of Z ? groupZ2(I, Z, z) : [I]) {
|
|
31759
|
+
let Ag;
|
|
31760
|
+
let Gg;
|
|
31761
|
+
out:
|
|
31762
|
+
for (const i of G) {
|
|
31763
|
+
for (const c4 of C3) {
|
|
31764
|
+
if (!defined(c4[i])) {
|
|
31765
|
+
if (Gg)
|
|
31766
|
+
Gg.push(-1);
|
|
31767
|
+
continue out;
|
|
31768
|
+
}
|
|
31769
|
+
}
|
|
31770
|
+
if (Ag === void 0) {
|
|
31771
|
+
if (Gg)
|
|
31772
|
+
yield Gg;
|
|
31773
|
+
Ag = A5.map((c4) => keyof2(c4[i])), Gg = [i];
|
|
31774
|
+
continue;
|
|
31775
|
+
}
|
|
31776
|
+
Gg.push(i);
|
|
31777
|
+
for (let j = 0; j < A5.length; ++j) {
|
|
31778
|
+
const k2 = keyof2(A5[j][i]);
|
|
31779
|
+
if (k2 !== Ag[j]) {
|
|
31780
|
+
yield Gg;
|
|
31781
|
+
Ag = A5.map((c4) => keyof2(c4[i])), Gg = [i];
|
|
31782
|
+
continue out;
|
|
31783
|
+
}
|
|
31784
|
+
}
|
|
31785
|
+
}
|
|
31786
|
+
if (Gg)
|
|
31787
|
+
yield Gg;
|
|
31788
|
+
}
|
|
31817
31789
|
}
|
|
31818
|
-
function
|
|
31819
|
-
|
|
31820
|
-
|
|
31821
|
-
|
|
31822
|
-
case
|
|
31823
|
-
|
|
31824
|
-
|
|
31825
|
-
|
|
31790
|
+
function applyClip(selection2, mark2, dimensions, context) {
|
|
31791
|
+
let clipUrl;
|
|
31792
|
+
const { clip = context.clip } = mark2;
|
|
31793
|
+
switch (clip) {
|
|
31794
|
+
case "frame": {
|
|
31795
|
+
const { width: width2, height: height2, marginLeft: marginLeft2, marginRight: marginRight2, marginTop: marginTop2, marginBottom: marginBottom2 } = dimensions;
|
|
31796
|
+
const id2 = getClipId();
|
|
31797
|
+
clipUrl = `url(#${id2})`;
|
|
31798
|
+
selection2 = create3("svg:g", context).call(
|
|
31799
|
+
(g) => g.append("svg:clipPath").attr("id", id2).append("rect").attr("x", marginLeft2).attr("y", marginTop2).attr("width", width2 - marginRight2 - marginLeft2).attr("height", height2 - marginTop2 - marginBottom2)
|
|
31800
|
+
).each(function() {
|
|
31801
|
+
this.appendChild(selection2.node());
|
|
31802
|
+
selection2.node = () => this;
|
|
31803
|
+
});
|
|
31804
|
+
break;
|
|
31805
|
+
}
|
|
31806
|
+
case "sphere": {
|
|
31807
|
+
const { projection: projection3 } = context;
|
|
31808
|
+
if (!projection3)
|
|
31809
|
+
throw new Error(`the "sphere" clip option requires a projection`);
|
|
31810
|
+
const id2 = getClipId();
|
|
31811
|
+
clipUrl = `url(#${id2})`;
|
|
31812
|
+
selection2.append("clipPath").attr("id", id2).append("path").attr("d", path_default(projection3)({ type: "Sphere" }));
|
|
31813
|
+
break;
|
|
31814
|
+
}
|
|
31826
31815
|
}
|
|
31816
|
+
applyAttr(selection2, "aria-label", mark2.ariaLabel);
|
|
31817
|
+
applyAttr(selection2, "aria-description", mark2.ariaDescription);
|
|
31818
|
+
applyAttr(selection2, "aria-hidden", mark2.ariaHidden);
|
|
31819
|
+
applyAttr(selection2, "clip-path", clipUrl);
|
|
31827
31820
|
}
|
|
31828
|
-
function
|
|
31829
|
-
|
|
31830
|
-
|
|
31831
|
-
|
|
31832
|
-
|
|
31821
|
+
function applyIndirectStyles(selection2, mark2, dimensions, context) {
|
|
31822
|
+
applyClip(selection2, mark2, dimensions, context);
|
|
31823
|
+
applyAttr(selection2, "fill", mark2.fill);
|
|
31824
|
+
applyAttr(selection2, "fill-opacity", mark2.fillOpacity);
|
|
31825
|
+
applyAttr(selection2, "stroke", mark2.stroke);
|
|
31826
|
+
applyAttr(selection2, "stroke-width", mark2.strokeWidth);
|
|
31827
|
+
applyAttr(selection2, "stroke-opacity", mark2.strokeOpacity);
|
|
31828
|
+
applyAttr(selection2, "stroke-linejoin", mark2.strokeLinejoin);
|
|
31829
|
+
applyAttr(selection2, "stroke-linecap", mark2.strokeLinecap);
|
|
31830
|
+
applyAttr(selection2, "stroke-miterlimit", mark2.strokeMiterlimit);
|
|
31831
|
+
applyAttr(selection2, "stroke-dasharray", mark2.strokeDasharray);
|
|
31832
|
+
applyAttr(selection2, "stroke-dashoffset", mark2.strokeDashoffset);
|
|
31833
|
+
applyAttr(selection2, "shape-rendering", mark2.shapeRendering);
|
|
31834
|
+
applyAttr(selection2, "filter", mark2.imageFilter);
|
|
31835
|
+
applyAttr(selection2, "paint-order", mark2.paintOrder);
|
|
31836
|
+
const { pointerEvents = context.pointerSticky === false ? "none" : void 0 } = mark2;
|
|
31837
|
+
applyAttr(selection2, "pointer-events", pointerEvents);
|
|
31833
31838
|
}
|
|
31834
|
-
function
|
|
31835
|
-
|
|
31839
|
+
function applyDirectStyles(selection2, mark2) {
|
|
31840
|
+
applyStyle(selection2, "mix-blend-mode", mark2.mixBlendMode);
|
|
31841
|
+
applyAttr(selection2, "opacity", mark2.opacity);
|
|
31836
31842
|
}
|
|
31837
|
-
function
|
|
31838
|
-
|
|
31839
|
-
|
|
31840
|
-
|
|
31841
|
-
|
|
31842
|
-
|
|
31843
|
-
|
|
31844
|
-
|
|
31843
|
+
function applyHref(selection2, href, target) {
|
|
31844
|
+
selection2.each(function(i) {
|
|
31845
|
+
const h = href(i);
|
|
31846
|
+
if (h != null) {
|
|
31847
|
+
const a2 = this.ownerDocument.createElementNS(namespaces_default.svg, "a");
|
|
31848
|
+
a2.setAttribute("fill", "inherit");
|
|
31849
|
+
a2.setAttributeNS(namespaces_default.xlink, "href", h);
|
|
31850
|
+
if (target != null)
|
|
31851
|
+
a2.setAttribute("target", target);
|
|
31852
|
+
this.parentNode.insertBefore(a2, this).appendChild(this);
|
|
31845
31853
|
}
|
|
31846
|
-
}
|
|
31847
|
-
return true;
|
|
31854
|
+
});
|
|
31848
31855
|
}
|
|
31849
|
-
function
|
|
31850
|
-
|
|
31851
|
-
|
|
31852
|
-
if (domain === void 0)
|
|
31853
|
-
domain = c4.value?.domain;
|
|
31854
|
-
c4.value = coerceValues(c4.value);
|
|
31855
|
-
}
|
|
31856
|
-
}
|
|
31857
|
-
return {
|
|
31858
|
-
domain: domain === void 0 ? domain : coerceValues(domain),
|
|
31859
|
-
...options
|
|
31860
|
-
};
|
|
31856
|
+
function applyAttr(selection2, name2, value) {
|
|
31857
|
+
if (value != null)
|
|
31858
|
+
selection2.attr(name2, value);
|
|
31861
31859
|
}
|
|
31862
|
-
function
|
|
31863
|
-
|
|
31860
|
+
function applyStyle(selection2, name2, value) {
|
|
31861
|
+
if (value != null)
|
|
31862
|
+
selection2.style(name2, value);
|
|
31864
31863
|
}
|
|
31865
|
-
function
|
|
31866
|
-
|
|
31867
|
-
|
|
31868
|
-
|
|
31869
|
-
|
|
31870
|
-
|
|
31871
|
-
|
|
31872
|
-
|
|
31873
|
-
|
|
31874
|
-
scale3 = exposeScale(normalizeScale(key, options[key]));
|
|
31875
|
-
}
|
|
31876
|
-
if (scale3 === void 0)
|
|
31877
|
-
throw new Error("invalid scale definition; no scale found");
|
|
31878
|
-
return scale3;
|
|
31864
|
+
function applyTransform(selection2, mark2, { x: x3, y: y3 }, tx = offset, ty = offset) {
|
|
31865
|
+
tx += mark2.dx;
|
|
31866
|
+
ty += mark2.dy;
|
|
31867
|
+
if (x3?.bandwidth)
|
|
31868
|
+
tx += x3.bandwidth() / 2;
|
|
31869
|
+
if (y3?.bandwidth)
|
|
31870
|
+
ty += y3.bandwidth() / 2;
|
|
31871
|
+
if (tx || ty)
|
|
31872
|
+
selection2.attr("transform", `translate(${tx},${ty})`);
|
|
31879
31873
|
}
|
|
31880
|
-
function
|
|
31881
|
-
|
|
31882
|
-
|
|
31883
|
-
throw new Error(`unknown scale: ${key}`);
|
|
31884
|
-
return scales2[key];
|
|
31885
|
-
};
|
|
31874
|
+
function impliedString(value, impliedValue) {
|
|
31875
|
+
if ((value = string(value)) !== impliedValue)
|
|
31876
|
+
return value;
|
|
31886
31877
|
}
|
|
31887
|
-
function
|
|
31888
|
-
if (
|
|
31889
|
-
return
|
|
31890
|
-
|
|
31891
|
-
|
|
31892
|
-
|
|
31893
|
-
|
|
31894
|
-
|
|
31895
|
-
|
|
31896
|
-
|
|
31897
|
-
|
|
31898
|
-
|
|
31899
|
-
|
|
31900
|
-
|
|
31901
|
-
|
|
31902
|
-
|
|
31903
|
-
|
|
31904
|
-
|
|
31905
|
-
|
|
31906
|
-
|
|
31907
|
-
|
|
31908
|
-
|
|
31909
|
-
|
|
31910
|
-
|
|
31911
|
-
|
|
31912
|
-
|
|
31913
|
-
|
|
31914
|
-
...scale3.align && { align: scale3.align(), round: scale3.round() },
|
|
31915
|
-
...scale3.padding && (scale3.paddingInner ? { paddingInner: scale3.paddingInner(), paddingOuter: scale3.paddingOuter() } : { padding: scale3.padding() }),
|
|
31916
|
-
...scale3.bandwidth && { bandwidth: scale3.bandwidth(), step: scale3.step() },
|
|
31917
|
-
// utilities
|
|
31918
|
-
apply: (t) => scale3(t),
|
|
31919
|
-
...scale3.invert && { invert: (t) => scale3.invert(t) }
|
|
31920
|
-
};
|
|
31878
|
+
function impliedNumber(value, impliedValue) {
|
|
31879
|
+
if ((value = number5(value)) !== impliedValue)
|
|
31880
|
+
return value;
|
|
31881
|
+
}
|
|
31882
|
+
var validClassName = /^-?([_a-z]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])([_a-z0-9-]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*$/i;
|
|
31883
|
+
function maybeClassName(name2) {
|
|
31884
|
+
if (name2 === void 0)
|
|
31885
|
+
return "plot-d6a7b5";
|
|
31886
|
+
name2 = `${name2}`;
|
|
31887
|
+
if (!validClassName.test(name2))
|
|
31888
|
+
throw new Error(`invalid class name: ${name2}`);
|
|
31889
|
+
return name2;
|
|
31890
|
+
}
|
|
31891
|
+
function applyInlineStyles(selection2, style2) {
|
|
31892
|
+
if (typeof style2 === "string") {
|
|
31893
|
+
selection2.property("style", style2);
|
|
31894
|
+
} else if (style2 != null) {
|
|
31895
|
+
for (const element of selection2) {
|
|
31896
|
+
Object.assign(element.style, style2);
|
|
31897
|
+
}
|
|
31898
|
+
}
|
|
31899
|
+
}
|
|
31900
|
+
function applyFrameAnchor({ frameAnchor }, { width: width2, height: height2, marginTop: marginTop2, marginRight: marginRight2, marginBottom: marginBottom2, marginLeft: marginLeft2 }) {
|
|
31901
|
+
return [
|
|
31902
|
+
/left$/.test(frameAnchor) ? marginLeft2 : /right$/.test(frameAnchor) ? width2 - marginRight2 : (marginLeft2 + width2 - marginRight2) / 2,
|
|
31903
|
+
/^top/.test(frameAnchor) ? marginTop2 : /^bottom/.test(frameAnchor) ? height2 - marginBottom2 : (marginTop2 + height2 - marginBottom2) / 2
|
|
31904
|
+
];
|
|
31921
31905
|
}
|
|
31922
31906
|
|
|
31923
31907
|
// ../../node_modules/@observablehq/plot/src/dimensions.js
|
|
@@ -33663,19 +33647,28 @@ function axisTickKy(k2, anchor, data, {
|
|
|
33663
33647
|
y: y3 = k2 === "y" ? void 0 : null,
|
|
33664
33648
|
...options
|
|
33665
33649
|
}) {
|
|
33666
|
-
return axisMark(
|
|
33667
|
-
|
|
33668
|
-
|
|
33669
|
-
|
|
33670
|
-
|
|
33671
|
-
|
|
33672
|
-
|
|
33673
|
-
|
|
33674
|
-
|
|
33675
|
-
|
|
33676
|
-
|
|
33677
|
-
|
|
33678
|
-
|
|
33650
|
+
return axisMark(
|
|
33651
|
+
vectorY,
|
|
33652
|
+
k2,
|
|
33653
|
+
data,
|
|
33654
|
+
{
|
|
33655
|
+
ariaLabel: `${k2}-axis tick`,
|
|
33656
|
+
ariaHidden: true
|
|
33657
|
+
},
|
|
33658
|
+
{
|
|
33659
|
+
strokeWidth,
|
|
33660
|
+
strokeLinecap,
|
|
33661
|
+
strokeLinejoin,
|
|
33662
|
+
facetAnchor,
|
|
33663
|
+
frameAnchor,
|
|
33664
|
+
y: y3,
|
|
33665
|
+
...options,
|
|
33666
|
+
dx: anchor === "left" ? +dx - offset + +insetLeft : +dx + offset - insetRight,
|
|
33667
|
+
anchor: "start",
|
|
33668
|
+
length: tickSize,
|
|
33669
|
+
shape: anchor === "left" ? shapeTickLeft : shapeTickRight
|
|
33670
|
+
}
|
|
33671
|
+
);
|
|
33679
33672
|
}
|
|
33680
33673
|
function axisTickKx(k2, anchor, data, {
|
|
33681
33674
|
strokeWidth = 1,
|
|
@@ -33691,19 +33684,28 @@ function axisTickKx(k2, anchor, data, {
|
|
|
33691
33684
|
x: x3 = k2 === "x" ? void 0 : null,
|
|
33692
33685
|
...options
|
|
33693
33686
|
}) {
|
|
33694
|
-
return axisMark(
|
|
33695
|
-
|
|
33696
|
-
|
|
33697
|
-
|
|
33698
|
-
|
|
33699
|
-
|
|
33700
|
-
|
|
33701
|
-
|
|
33702
|
-
|
|
33703
|
-
|
|
33704
|
-
|
|
33705
|
-
|
|
33706
|
-
|
|
33687
|
+
return axisMark(
|
|
33688
|
+
vectorX,
|
|
33689
|
+
k2,
|
|
33690
|
+
data,
|
|
33691
|
+
{
|
|
33692
|
+
ariaLabel: `${k2}-axis tick`,
|
|
33693
|
+
ariaHidden: true
|
|
33694
|
+
},
|
|
33695
|
+
{
|
|
33696
|
+
strokeWidth,
|
|
33697
|
+
strokeLinejoin,
|
|
33698
|
+
strokeLinecap,
|
|
33699
|
+
facetAnchor,
|
|
33700
|
+
frameAnchor,
|
|
33701
|
+
x: x3,
|
|
33702
|
+
...options,
|
|
33703
|
+
dy: anchor === "bottom" ? +dy - offset - insetBottom : +dy + offset + +insetTop,
|
|
33704
|
+
anchor: "start",
|
|
33705
|
+
length: tickSize,
|
|
33706
|
+
shape: anchor === "bottom" ? shapeTickBottom : shapeTickTop
|
|
33707
|
+
}
|
|
33708
|
+
);
|
|
33707
33709
|
}
|
|
33708
33710
|
function axisTextKy(k2, anchor, data, {
|
|
33709
33711
|
facetAnchor = anchor + (k2 === "y" ? "-empty" : ""),
|
|
@@ -33725,9 +33727,8 @@ function axisTextKy(k2, anchor, data, {
|
|
|
33725
33727
|
return axisMark(
|
|
33726
33728
|
textY,
|
|
33727
33729
|
k2,
|
|
33728
|
-
anchor,
|
|
33729
|
-
`${k2}-axis tick label`,
|
|
33730
33730
|
data,
|
|
33731
|
+
{ ariaLabel: `${k2}-axis tick label` },
|
|
33731
33732
|
{
|
|
33732
33733
|
facetAnchor,
|
|
33733
33734
|
frameAnchor,
|
|
@@ -33768,9 +33769,8 @@ function axisTextKx(k2, anchor, data, {
|
|
|
33768
33769
|
return axisMark(
|
|
33769
33770
|
textX,
|
|
33770
33771
|
k2,
|
|
33771
|
-
anchor,
|
|
33772
|
-
`${k2}-axis tick label`,
|
|
33773
33772
|
data,
|
|
33773
|
+
{ ariaLabel: `${k2}-axis tick label` },
|
|
33774
33774
|
{
|
|
33775
33775
|
facetAnchor,
|
|
33776
33776
|
frameAnchor,
|
|
@@ -33814,7 +33814,7 @@ function gridKy(k2, anchor, data, {
|
|
|
33814
33814
|
x2: x22 = anchor === "right" ? x3 : null,
|
|
33815
33815
|
...options
|
|
33816
33816
|
}) {
|
|
33817
|
-
return axisMark(ruleY, k2,
|
|
33817
|
+
return axisMark(ruleY, k2, data, { ariaLabel: `${k2}-grid`, ariaHidden: true }, { y: y3, x1: x12, x2: x22, ...gridDefaults(options) });
|
|
33818
33818
|
}
|
|
33819
33819
|
function gridKx(k2, anchor, data, {
|
|
33820
33820
|
x: x3 = k2 === "x" ? void 0 : null,
|
|
@@ -33823,7 +33823,7 @@ function gridKx(k2, anchor, data, {
|
|
|
33823
33823
|
y2: y22 = anchor === "bottom" ? y3 : null,
|
|
33824
33824
|
...options
|
|
33825
33825
|
}) {
|
|
33826
|
-
return axisMark(ruleX, k2,
|
|
33826
|
+
return axisMark(ruleX, k2, data, { ariaLabel: `${k2}-grid`, ariaHidden: true }, { x: x3, y1: y12, y2: y22, ...gridDefaults(options) });
|
|
33827
33827
|
}
|
|
33828
33828
|
function gridDefaults({
|
|
33829
33829
|
color: color3 = "currentColor",
|
|
@@ -33868,7 +33868,7 @@ function labelOptions({
|
|
|
33868
33868
|
initializer: initializer2
|
|
33869
33869
|
};
|
|
33870
33870
|
}
|
|
33871
|
-
function axisMark(mark2, k2,
|
|
33871
|
+
function axisMark(mark2, k2, data, properties, options, initialize) {
|
|
33872
33872
|
let channels;
|
|
33873
33873
|
function axisInitializer(data2, facets, _channels, scales2, dimensions, context) {
|
|
33874
33874
|
const initializeFacets = data2 == null && (k2 === "fx" || k2 === "fy");
|
|
@@ -33940,7 +33940,8 @@ function axisMark(mark2, k2, anchor, ariaLabel, data, options, initialize) {
|
|
|
33940
33940
|
} else {
|
|
33941
33941
|
channels = {};
|
|
33942
33942
|
}
|
|
33943
|
-
|
|
33943
|
+
if (properties !== void 0)
|
|
33944
|
+
Object.assign(m, properties);
|
|
33944
33945
|
if (m.clip === void 0)
|
|
33945
33946
|
m.clip = false;
|
|
33946
33947
|
return m;
|
|
@@ -34840,7 +34841,6 @@ function plot(options = {}) {
|
|
|
34840
34841
|
}
|
|
34841
34842
|
figure.scale = exposeScales(scales2.scales);
|
|
34842
34843
|
figure.legend = exposeLegends(scaleDescriptors, context, options);
|
|
34843
|
-
figure.projection = context.projection;
|
|
34844
34844
|
const w = consumeWarnings();
|
|
34845
34845
|
if (w > 0) {
|
|
34846
34846
|
select_default2(svg).append("text").attr("x", width2).attr("y", 20).attr("dy", "-1em").attr("text-anchor", "end").attr("font-family", "initial").text("\u26A0\uFE0F").append("title").text(`${w.toLocaleString("en-US")} warning${w === 1 ? "" : "s"}. Please check the console.`);
|
|
@@ -35370,6 +35370,8 @@ function binn(bx, by, gx, gy, {
|
|
|
35370
35370
|
for (const [f, I] of maybeGroup(facet, G)) {
|
|
35371
35371
|
for (const [k3, g] of maybeGroup(I, K2)) {
|
|
35372
35372
|
for (const [b, extent4] of bin3(g)) {
|
|
35373
|
+
if (G)
|
|
35374
|
+
extent4.z = f;
|
|
35373
35375
|
if (filter3 && !filter3.reduce(b, extent4))
|
|
35374
35376
|
continue;
|
|
35375
35377
|
groupFacet.push(i++);
|
|
@@ -35389,7 +35391,7 @@ function binn(bx, by, gx, gy, {
|
|
|
35389
35391
|
for (const o of outputs)
|
|
35390
35392
|
o.reduce(b, extent4);
|
|
35391
35393
|
if (sort3)
|
|
35392
|
-
sort3.reduce(b);
|
|
35394
|
+
sort3.reduce(b, extent4);
|
|
35393
35395
|
}
|
|
35394
35396
|
}
|
|
35395
35397
|
}
|
|
@@ -35556,6 +35558,8 @@ function maybeBinReduceFallback(reduce) {
|
|
|
35556
35558
|
return reduceY1;
|
|
35557
35559
|
case "y2":
|
|
35558
35560
|
return reduceY22;
|
|
35561
|
+
case "z":
|
|
35562
|
+
return reduceZ;
|
|
35559
35563
|
}
|
|
35560
35564
|
throw new Error(`invalid bin reduce: ${reduce}`);
|
|
35561
35565
|
}
|
|
@@ -45068,8 +45072,10 @@ async function astToDOM(ast, options) {
|
|
|
45068
45072
|
await ctx.coordinator.exec(queries);
|
|
45069
45073
|
}
|
|
45070
45074
|
for (const [name2, node] of Object.entries(params)) {
|
|
45071
|
-
|
|
45072
|
-
|
|
45075
|
+
if (!ctx.activeParams.has(name2)) {
|
|
45076
|
+
const param = node.instantiate(ctx);
|
|
45077
|
+
ctx.activeParams.set(name2, param);
|
|
45078
|
+
}
|
|
45073
45079
|
}
|
|
45074
45080
|
return {
|
|
45075
45081
|
element: ast.root.instantiate(ctx),
|
|
@@ -45080,12 +45086,12 @@ var InstantiateContext = class {
|
|
|
45080
45086
|
constructor({
|
|
45081
45087
|
api = createAPIContext(),
|
|
45082
45088
|
plotDefaults = [],
|
|
45083
|
-
|
|
45089
|
+
params = /* @__PURE__ */ new Map(),
|
|
45084
45090
|
baseURL = null
|
|
45085
45091
|
} = {}) {
|
|
45086
45092
|
this.api = api;
|
|
45087
45093
|
this.plotDefaults = plotDefaults;
|
|
45088
|
-
this.activeParams =
|
|
45094
|
+
this.activeParams = params;
|
|
45089
45095
|
this.baseURL = baseURL;
|
|
45090
45096
|
this.coordinator = api.context.coordinator;
|
|
45091
45097
|
}
|