@hpcc-js/common 2.71.14 → 2.71.16
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/index.es6.js +1297 -2527
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +1315 -2545
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +4 -4
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.es6.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { classID2Meta, hashSum, isArray } from '@hpcc-js/util';
|
|
2
2
|
|
|
3
3
|
var PKG_NAME = "@hpcc-js/common";
|
|
4
|
-
var PKG_VERSION = "2.71.
|
|
5
|
-
var BUILD_VERSION = "2.
|
|
4
|
+
var PKG_VERSION = "2.71.16";
|
|
5
|
+
var BUILD_VERSION = "2.105.6";
|
|
6
6
|
|
|
7
7
|
/******************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1416,34 +1416,34 @@ function selection_interrupt(name) {
|
|
|
1416
1416
|
});
|
|
1417
1417
|
}
|
|
1418
1418
|
|
|
1419
|
-
function define
|
|
1419
|
+
function define(constructor, factory, prototype) {
|
|
1420
1420
|
constructor.prototype = factory.prototype = prototype;
|
|
1421
1421
|
prototype.constructor = constructor;
|
|
1422
1422
|
}
|
|
1423
1423
|
|
|
1424
|
-
function extend
|
|
1424
|
+
function extend(parent, definition) {
|
|
1425
1425
|
var prototype = Object.create(parent.prototype);
|
|
1426
1426
|
for (var key in definition) prototype[key] = definition[key];
|
|
1427
1427
|
return prototype;
|
|
1428
1428
|
}
|
|
1429
1429
|
|
|
1430
|
-
function Color
|
|
1430
|
+
function Color() {}
|
|
1431
1431
|
|
|
1432
|
-
var darker
|
|
1433
|
-
var brighter
|
|
1432
|
+
var darker = 0.7;
|
|
1433
|
+
var brighter = 1 / darker;
|
|
1434
1434
|
|
|
1435
|
-
var reI
|
|
1436
|
-
reN
|
|
1437
|
-
reP
|
|
1438
|
-
reHex
|
|
1439
|
-
reRgbInteger
|
|
1440
|
-
reRgbPercent
|
|
1441
|
-
reRgbaInteger
|
|
1442
|
-
reRgbaPercent
|
|
1443
|
-
reHslPercent
|
|
1444
|
-
reHslaPercent
|
|
1435
|
+
var reI = "\\s*([+-]?\\d+)\\s*",
|
|
1436
|
+
reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
1437
|
+
reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
1438
|
+
reHex = /^#([0-9a-f]{3,8})$/,
|
|
1439
|
+
reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),
|
|
1440
|
+
reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),
|
|
1441
|
+
reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),
|
|
1442
|
+
reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),
|
|
1443
|
+
reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),
|
|
1444
|
+
reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
|
|
1445
1445
|
|
|
1446
|
-
var named
|
|
1446
|
+
var named = {
|
|
1447
1447
|
aliceblue: 0xf0f8ff,
|
|
1448
1448
|
antiquewhite: 0xfaebd7,
|
|
1449
1449
|
aqua: 0x00ffff,
|
|
@@ -1594,132 +1594,149 @@ var named$3 = {
|
|
|
1594
1594
|
yellowgreen: 0x9acd32
|
|
1595
1595
|
};
|
|
1596
1596
|
|
|
1597
|
-
define
|
|
1598
|
-
copy
|
|
1597
|
+
define(Color, color, {
|
|
1598
|
+
copy(channels) {
|
|
1599
1599
|
return Object.assign(new this.constructor, this, channels);
|
|
1600
1600
|
},
|
|
1601
|
-
displayable
|
|
1601
|
+
displayable() {
|
|
1602
1602
|
return this.rgb().displayable();
|
|
1603
1603
|
},
|
|
1604
|
-
hex: color_formatHex
|
|
1605
|
-
formatHex: color_formatHex
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1604
|
+
hex: color_formatHex, // Deprecated! Use color.formatHex.
|
|
1605
|
+
formatHex: color_formatHex,
|
|
1606
|
+
formatHex8: color_formatHex8,
|
|
1607
|
+
formatHsl: color_formatHsl,
|
|
1608
|
+
formatRgb: color_formatRgb,
|
|
1609
|
+
toString: color_formatRgb
|
|
1609
1610
|
});
|
|
1610
1611
|
|
|
1611
|
-
function color_formatHex
|
|
1612
|
+
function color_formatHex() {
|
|
1612
1613
|
return this.rgb().formatHex();
|
|
1613
1614
|
}
|
|
1614
1615
|
|
|
1615
|
-
function
|
|
1616
|
-
return
|
|
1616
|
+
function color_formatHex8() {
|
|
1617
|
+
return this.rgb().formatHex8();
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
function color_formatHsl() {
|
|
1621
|
+
return hslConvert(this).formatHsl();
|
|
1617
1622
|
}
|
|
1618
1623
|
|
|
1619
|
-
function color_formatRgb
|
|
1624
|
+
function color_formatRgb() {
|
|
1620
1625
|
return this.rgb().formatRgb();
|
|
1621
1626
|
}
|
|
1622
1627
|
|
|
1623
|
-
function color
|
|
1628
|
+
function color(format) {
|
|
1624
1629
|
var m, l;
|
|
1625
1630
|
format = (format + "").trim().toLowerCase();
|
|
1626
|
-
return (m = reHex
|
|
1627
|
-
: l === 3 ? new Rgb
|
|
1628
|
-
: l === 8 ? rgba
|
|
1629
|
-
: l === 4 ? rgba
|
|
1631
|
+
return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
|
|
1632
|
+
: l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
|
|
1633
|
+
: l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
|
|
1634
|
+
: l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
|
|
1630
1635
|
: null) // invalid hex
|
|
1631
|
-
: (m = reRgbInteger
|
|
1632
|
-
: (m = reRgbPercent
|
|
1633
|
-
: (m = reRgbaInteger
|
|
1634
|
-
: (m = reRgbaPercent
|
|
1635
|
-
: (m = reHslPercent
|
|
1636
|
-
: (m = reHslaPercent
|
|
1637
|
-
: named
|
|
1638
|
-
: format === "transparent" ? new Rgb
|
|
1636
|
+
: (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
|
|
1637
|
+
: (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
|
|
1638
|
+
: (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
|
|
1639
|
+
: (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
|
|
1640
|
+
: (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
1641
|
+
: (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
1642
|
+
: named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
|
|
1643
|
+
: format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
|
|
1639
1644
|
: null;
|
|
1640
1645
|
}
|
|
1641
1646
|
|
|
1642
|
-
function rgbn
|
|
1643
|
-
return new Rgb
|
|
1647
|
+
function rgbn(n) {
|
|
1648
|
+
return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
1644
1649
|
}
|
|
1645
1650
|
|
|
1646
|
-
function rgba
|
|
1651
|
+
function rgba(r, g, b, a) {
|
|
1647
1652
|
if (a <= 0) r = g = b = NaN;
|
|
1648
|
-
return new Rgb
|
|
1653
|
+
return new Rgb(r, g, b, a);
|
|
1649
1654
|
}
|
|
1650
1655
|
|
|
1651
|
-
function rgbConvert
|
|
1652
|
-
if (!(o instanceof Color
|
|
1653
|
-
if (!o) return new Rgb
|
|
1656
|
+
function rgbConvert(o) {
|
|
1657
|
+
if (!(o instanceof Color)) o = color(o);
|
|
1658
|
+
if (!o) return new Rgb;
|
|
1654
1659
|
o = o.rgb();
|
|
1655
|
-
return new Rgb
|
|
1660
|
+
return new Rgb(o.r, o.g, o.b, o.opacity);
|
|
1656
1661
|
}
|
|
1657
1662
|
|
|
1658
|
-
function rgb
|
|
1659
|
-
return arguments.length === 1 ? rgbConvert
|
|
1663
|
+
function rgb(r, g, b, opacity) {
|
|
1664
|
+
return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
|
|
1660
1665
|
}
|
|
1661
1666
|
|
|
1662
|
-
function Rgb
|
|
1667
|
+
function Rgb(r, g, b, opacity) {
|
|
1663
1668
|
this.r = +r;
|
|
1664
1669
|
this.g = +g;
|
|
1665
1670
|
this.b = +b;
|
|
1666
1671
|
this.opacity = +opacity;
|
|
1667
1672
|
}
|
|
1668
1673
|
|
|
1669
|
-
define
|
|
1670
|
-
brighter
|
|
1671
|
-
k = k == null ? brighter
|
|
1672
|
-
return new Rgb
|
|
1674
|
+
define(Rgb, rgb, extend(Color, {
|
|
1675
|
+
brighter(k) {
|
|
1676
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
1677
|
+
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
1673
1678
|
},
|
|
1674
|
-
darker
|
|
1675
|
-
k = k == null ? darker
|
|
1676
|
-
return new Rgb
|
|
1679
|
+
darker(k) {
|
|
1680
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
1681
|
+
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
1677
1682
|
},
|
|
1678
|
-
rgb
|
|
1683
|
+
rgb() {
|
|
1679
1684
|
return this;
|
|
1680
1685
|
},
|
|
1681
|
-
|
|
1686
|
+
clamp() {
|
|
1687
|
+
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
|
1688
|
+
},
|
|
1689
|
+
displayable() {
|
|
1682
1690
|
return (-0.5 <= this.r && this.r < 255.5)
|
|
1683
1691
|
&& (-0.5 <= this.g && this.g < 255.5)
|
|
1684
1692
|
&& (-0.5 <= this.b && this.b < 255.5)
|
|
1685
1693
|
&& (0 <= this.opacity && this.opacity <= 1);
|
|
1686
1694
|
},
|
|
1687
|
-
hex: rgb_formatHex
|
|
1688
|
-
formatHex: rgb_formatHex
|
|
1689
|
-
|
|
1690
|
-
|
|
1695
|
+
hex: rgb_formatHex, // Deprecated! Use color.formatHex.
|
|
1696
|
+
formatHex: rgb_formatHex,
|
|
1697
|
+
formatHex8: rgb_formatHex8,
|
|
1698
|
+
formatRgb: rgb_formatRgb,
|
|
1699
|
+
toString: rgb_formatRgb
|
|
1691
1700
|
}));
|
|
1692
1701
|
|
|
1693
|
-
function rgb_formatHex
|
|
1694
|
-
return
|
|
1702
|
+
function rgb_formatHex() {
|
|
1703
|
+
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
function rgb_formatHex8() {
|
|
1707
|
+
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
function rgb_formatRgb() {
|
|
1711
|
+
const a = clampa(this.opacity);
|
|
1712
|
+
return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
function clampa(opacity) {
|
|
1716
|
+
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
|
1695
1717
|
}
|
|
1696
1718
|
|
|
1697
|
-
function
|
|
1698
|
-
|
|
1699
|
-
return (a === 1 ? "rgb(" : "rgba(")
|
|
1700
|
-
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
|
1701
|
-
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
|
1702
|
-
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
|
1703
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
1719
|
+
function clampi(value) {
|
|
1720
|
+
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
1704
1721
|
}
|
|
1705
1722
|
|
|
1706
|
-
function hex
|
|
1707
|
-
value =
|
|
1723
|
+
function hex(value) {
|
|
1724
|
+
value = clampi(value);
|
|
1708
1725
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
1709
1726
|
}
|
|
1710
1727
|
|
|
1711
|
-
function hsla
|
|
1728
|
+
function hsla(h, s, l, a) {
|
|
1712
1729
|
if (a <= 0) h = s = l = NaN;
|
|
1713
1730
|
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
1714
1731
|
else if (s <= 0) h = NaN;
|
|
1715
|
-
return new Hsl
|
|
1732
|
+
return new Hsl(h, s, l, a);
|
|
1716
1733
|
}
|
|
1717
1734
|
|
|
1718
|
-
function hslConvert
|
|
1719
|
-
if (o instanceof Hsl
|
|
1720
|
-
if (!(o instanceof Color
|
|
1721
|
-
if (!o) return new Hsl
|
|
1722
|
-
if (o instanceof Hsl
|
|
1735
|
+
function hslConvert(o) {
|
|
1736
|
+
if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
|
|
1737
|
+
if (!(o instanceof Color)) o = color(o);
|
|
1738
|
+
if (!o) return new Hsl;
|
|
1739
|
+
if (o instanceof Hsl) return o;
|
|
1723
1740
|
o = o.rgb();
|
|
1724
1741
|
var r = o.r / 255,
|
|
1725
1742
|
g = o.g / 255,
|
|
@@ -1738,233 +1755,249 @@ function hslConvert$3(o) {
|
|
|
1738
1755
|
} else {
|
|
1739
1756
|
s = l > 0 && l < 1 ? 0 : h;
|
|
1740
1757
|
}
|
|
1741
|
-
return new Hsl
|
|
1758
|
+
return new Hsl(h, s, l, o.opacity);
|
|
1742
1759
|
}
|
|
1743
1760
|
|
|
1744
|
-
function hsl$
|
|
1745
|
-
return arguments.length === 1 ? hslConvert
|
|
1761
|
+
function hsl$2(h, s, l, opacity) {
|
|
1762
|
+
return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
|
|
1746
1763
|
}
|
|
1747
1764
|
|
|
1748
|
-
function Hsl
|
|
1765
|
+
function Hsl(h, s, l, opacity) {
|
|
1749
1766
|
this.h = +h;
|
|
1750
1767
|
this.s = +s;
|
|
1751
1768
|
this.l = +l;
|
|
1752
1769
|
this.opacity = +opacity;
|
|
1753
1770
|
}
|
|
1754
1771
|
|
|
1755
|
-
define
|
|
1756
|
-
brighter
|
|
1757
|
-
k = k == null ? brighter
|
|
1758
|
-
return new Hsl
|
|
1772
|
+
define(Hsl, hsl$2, extend(Color, {
|
|
1773
|
+
brighter(k) {
|
|
1774
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
1775
|
+
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
1759
1776
|
},
|
|
1760
|
-
darker
|
|
1761
|
-
k = k == null ? darker
|
|
1762
|
-
return new Hsl
|
|
1777
|
+
darker(k) {
|
|
1778
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
1779
|
+
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
1763
1780
|
},
|
|
1764
|
-
rgb
|
|
1781
|
+
rgb() {
|
|
1765
1782
|
var h = this.h % 360 + (this.h < 0) * 360,
|
|
1766
1783
|
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
1767
1784
|
l = this.l,
|
|
1768
1785
|
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
1769
1786
|
m1 = 2 * l - m2;
|
|
1770
|
-
return new Rgb
|
|
1771
|
-
hsl2rgb
|
|
1772
|
-
hsl2rgb
|
|
1773
|
-
hsl2rgb
|
|
1787
|
+
return new Rgb(
|
|
1788
|
+
hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
1789
|
+
hsl2rgb(h, m1, m2),
|
|
1790
|
+
hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
1774
1791
|
this.opacity
|
|
1775
1792
|
);
|
|
1776
1793
|
},
|
|
1777
|
-
|
|
1794
|
+
clamp() {
|
|
1795
|
+
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
|
1796
|
+
},
|
|
1797
|
+
displayable() {
|
|
1778
1798
|
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
|
1779
1799
|
&& (0 <= this.l && this.l <= 1)
|
|
1780
1800
|
&& (0 <= this.opacity && this.opacity <= 1);
|
|
1781
1801
|
},
|
|
1782
|
-
formatHsl
|
|
1783
|
-
|
|
1784
|
-
return
|
|
1785
|
-
+ (this.h || 0) + ", "
|
|
1786
|
-
+ (this.s || 0) * 100 + "%, "
|
|
1787
|
-
+ (this.l || 0) * 100 + "%"
|
|
1788
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
1802
|
+
formatHsl() {
|
|
1803
|
+
const a = clampa(this.opacity);
|
|
1804
|
+
return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
|
|
1789
1805
|
}
|
|
1790
1806
|
}));
|
|
1791
1807
|
|
|
1808
|
+
function clamph(value) {
|
|
1809
|
+
value = (value || 0) % 360;
|
|
1810
|
+
return value < 0 ? value + 360 : value;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
function clampt(value) {
|
|
1814
|
+
return Math.max(0, Math.min(1, value || 0));
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1792
1817
|
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
1793
|
-
function hsl2rgb
|
|
1818
|
+
function hsl2rgb(h, m1, m2) {
|
|
1794
1819
|
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
|
1795
1820
|
: h < 180 ? m2
|
|
1796
1821
|
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
1797
1822
|
: m1) * 255;
|
|
1798
1823
|
}
|
|
1799
1824
|
|
|
1800
|
-
|
|
1801
|
-
|
|
1825
|
+
const radians = Math.PI / 180;
|
|
1826
|
+
const degrees$1 = 180 / Math.PI;
|
|
1802
1827
|
|
|
1803
1828
|
// https://observablehq.com/@mbostock/lab-and-rgb
|
|
1804
|
-
|
|
1805
|
-
Xn
|
|
1806
|
-
Yn
|
|
1807
|
-
Zn
|
|
1808
|
-
t0$
|
|
1809
|
-
t1$
|
|
1810
|
-
t2
|
|
1811
|
-
t3
|
|
1812
|
-
|
|
1813
|
-
function labConvert
|
|
1814
|
-
if (o instanceof Lab
|
|
1815
|
-
if (o instanceof Hcl
|
|
1816
|
-
if (!(o instanceof Rgb
|
|
1817
|
-
var r = rgb2lrgb
|
|
1818
|
-
g = rgb2lrgb
|
|
1819
|
-
b = rgb2lrgb
|
|
1820
|
-
y = xyz2lab
|
|
1829
|
+
const K = 18,
|
|
1830
|
+
Xn = 0.96422,
|
|
1831
|
+
Yn = 1,
|
|
1832
|
+
Zn = 0.82521,
|
|
1833
|
+
t0$1 = 4 / 29,
|
|
1834
|
+
t1$1 = 6 / 29,
|
|
1835
|
+
t2 = 3 * t1$1 * t1$1,
|
|
1836
|
+
t3 = t1$1 * t1$1 * t1$1;
|
|
1837
|
+
|
|
1838
|
+
function labConvert(o) {
|
|
1839
|
+
if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
|
|
1840
|
+
if (o instanceof Hcl) return hcl2lab(o);
|
|
1841
|
+
if (!(o instanceof Rgb)) o = rgbConvert(o);
|
|
1842
|
+
var r = rgb2lrgb(o.r),
|
|
1843
|
+
g = rgb2lrgb(o.g),
|
|
1844
|
+
b = rgb2lrgb(o.b),
|
|
1845
|
+
y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
|
|
1821
1846
|
if (r === g && g === b) x = z = y; else {
|
|
1822
|
-
x = xyz2lab
|
|
1823
|
-
z = xyz2lab
|
|
1847
|
+
x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
|
|
1848
|
+
z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
|
|
1824
1849
|
}
|
|
1825
|
-
return new Lab
|
|
1850
|
+
return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
function gray(l, opacity) {
|
|
1854
|
+
return new Lab(l, 0, 0, opacity == null ? 1 : opacity);
|
|
1826
1855
|
}
|
|
1827
1856
|
|
|
1828
|
-
function lab$
|
|
1829
|
-
return arguments.length === 1 ? labConvert
|
|
1857
|
+
function lab$1(l, a, b, opacity) {
|
|
1858
|
+
return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
|
|
1830
1859
|
}
|
|
1831
1860
|
|
|
1832
|
-
function Lab
|
|
1861
|
+
function Lab(l, a, b, opacity) {
|
|
1833
1862
|
this.l = +l;
|
|
1834
1863
|
this.a = +a;
|
|
1835
1864
|
this.b = +b;
|
|
1836
1865
|
this.opacity = +opacity;
|
|
1837
1866
|
}
|
|
1838
1867
|
|
|
1839
|
-
define
|
|
1840
|
-
brighter
|
|
1841
|
-
return new Lab
|
|
1868
|
+
define(Lab, lab$1, extend(Color, {
|
|
1869
|
+
brighter(k) {
|
|
1870
|
+
return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
1842
1871
|
},
|
|
1843
|
-
darker
|
|
1844
|
-
return new Lab
|
|
1872
|
+
darker(k) {
|
|
1873
|
+
return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
1845
1874
|
},
|
|
1846
|
-
rgb
|
|
1875
|
+
rgb() {
|
|
1847
1876
|
var y = (this.l + 16) / 116,
|
|
1848
1877
|
x = isNaN(this.a) ? y : y + this.a / 500,
|
|
1849
1878
|
z = isNaN(this.b) ? y : y - this.b / 200;
|
|
1850
|
-
x = Xn
|
|
1851
|
-
y = Yn
|
|
1852
|
-
z = Zn
|
|
1853
|
-
return new Rgb
|
|
1854
|
-
lrgb2rgb
|
|
1855
|
-
lrgb2rgb
|
|
1856
|
-
lrgb2rgb
|
|
1879
|
+
x = Xn * lab2xyz(x);
|
|
1880
|
+
y = Yn * lab2xyz(y);
|
|
1881
|
+
z = Zn * lab2xyz(z);
|
|
1882
|
+
return new Rgb(
|
|
1883
|
+
lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
|
|
1884
|
+
lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
|
|
1885
|
+
lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
|
|
1857
1886
|
this.opacity
|
|
1858
1887
|
);
|
|
1859
1888
|
}
|
|
1860
1889
|
}));
|
|
1861
1890
|
|
|
1862
|
-
function xyz2lab
|
|
1863
|
-
return t > t3
|
|
1891
|
+
function xyz2lab(t) {
|
|
1892
|
+
return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0$1;
|
|
1864
1893
|
}
|
|
1865
1894
|
|
|
1866
|
-
function lab2xyz
|
|
1867
|
-
return t > t1$
|
|
1895
|
+
function lab2xyz(t) {
|
|
1896
|
+
return t > t1$1 ? t * t * t : t2 * (t - t0$1);
|
|
1868
1897
|
}
|
|
1869
1898
|
|
|
1870
|
-
function lrgb2rgb
|
|
1899
|
+
function lrgb2rgb(x) {
|
|
1871
1900
|
return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
|
|
1872
1901
|
}
|
|
1873
1902
|
|
|
1874
|
-
function rgb2lrgb
|
|
1903
|
+
function rgb2lrgb(x) {
|
|
1875
1904
|
return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
|
|
1876
1905
|
}
|
|
1877
1906
|
|
|
1878
|
-
function hclConvert
|
|
1879
|
-
if (o instanceof Hcl
|
|
1880
|
-
if (!(o instanceof Lab
|
|
1881
|
-
if (o.a === 0 && o.b === 0) return new Hcl
|
|
1882
|
-
var h = Math.atan2(o.b, o.a) *
|
|
1883
|
-
return new Hcl
|
|
1907
|
+
function hclConvert(o) {
|
|
1908
|
+
if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
|
|
1909
|
+
if (!(o instanceof Lab)) o = labConvert(o);
|
|
1910
|
+
if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
|
|
1911
|
+
var h = Math.atan2(o.b, o.a) * degrees$1;
|
|
1912
|
+
return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
function lch(l, c, h, opacity) {
|
|
1916
|
+
return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
|
|
1884
1917
|
}
|
|
1885
1918
|
|
|
1886
|
-
function hcl$
|
|
1887
|
-
return arguments.length === 1 ? hclConvert
|
|
1919
|
+
function hcl$2(h, c, l, opacity) {
|
|
1920
|
+
return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
|
|
1888
1921
|
}
|
|
1889
1922
|
|
|
1890
|
-
function Hcl
|
|
1923
|
+
function Hcl(h, c, l, opacity) {
|
|
1891
1924
|
this.h = +h;
|
|
1892
1925
|
this.c = +c;
|
|
1893
1926
|
this.l = +l;
|
|
1894
1927
|
this.opacity = +opacity;
|
|
1895
1928
|
}
|
|
1896
1929
|
|
|
1897
|
-
function hcl2lab
|
|
1898
|
-
if (isNaN(o.h)) return new Lab
|
|
1899
|
-
var h = o.h *
|
|
1900
|
-
return new Lab
|
|
1930
|
+
function hcl2lab(o) {
|
|
1931
|
+
if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
|
|
1932
|
+
var h = o.h * radians;
|
|
1933
|
+
return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
|
|
1901
1934
|
}
|
|
1902
1935
|
|
|
1903
|
-
define
|
|
1904
|
-
brighter
|
|
1905
|
-
return new Hcl
|
|
1936
|
+
define(Hcl, hcl$2, extend(Color, {
|
|
1937
|
+
brighter(k) {
|
|
1938
|
+
return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
|
|
1906
1939
|
},
|
|
1907
|
-
darker
|
|
1908
|
-
return new Hcl
|
|
1940
|
+
darker(k) {
|
|
1941
|
+
return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
|
|
1909
1942
|
},
|
|
1910
|
-
rgb
|
|
1911
|
-
return hcl2lab
|
|
1943
|
+
rgb() {
|
|
1944
|
+
return hcl2lab(this).rgb();
|
|
1912
1945
|
}
|
|
1913
1946
|
}));
|
|
1914
1947
|
|
|
1915
|
-
var A
|
|
1916
|
-
B
|
|
1917
|
-
C
|
|
1918
|
-
D
|
|
1919
|
-
E
|
|
1920
|
-
ED
|
|
1921
|
-
EB
|
|
1922
|
-
BC_DA
|
|
1923
|
-
|
|
1924
|
-
function cubehelixConvert
|
|
1925
|
-
if (o instanceof Cubehelix
|
|
1926
|
-
if (!(o instanceof Rgb
|
|
1948
|
+
var A = -0.14861,
|
|
1949
|
+
B = +1.78277,
|
|
1950
|
+
C = -0.29227,
|
|
1951
|
+
D = -0.90649,
|
|
1952
|
+
E = +1.97294,
|
|
1953
|
+
ED = E * D,
|
|
1954
|
+
EB = E * B,
|
|
1955
|
+
BC_DA = B * C - D * A;
|
|
1956
|
+
|
|
1957
|
+
function cubehelixConvert(o) {
|
|
1958
|
+
if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
|
|
1959
|
+
if (!(o instanceof Rgb)) o = rgbConvert(o);
|
|
1927
1960
|
var r = o.r / 255,
|
|
1928
1961
|
g = o.g / 255,
|
|
1929
1962
|
b = o.b / 255,
|
|
1930
|
-
l = (BC_DA
|
|
1963
|
+
l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
|
|
1931
1964
|
bl = b - l,
|
|
1932
|
-
k = (E
|
|
1933
|
-
s = Math.sqrt(k * k + bl * bl) / (E
|
|
1934
|
-
h = s ? Math.atan2(k, bl) *
|
|
1935
|
-
return new Cubehelix
|
|
1965
|
+
k = (E * (g - l) - C * bl) / D,
|
|
1966
|
+
s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
|
|
1967
|
+
h = s ? Math.atan2(k, bl) * degrees$1 - 120 : NaN;
|
|
1968
|
+
return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
|
|
1936
1969
|
}
|
|
1937
1970
|
|
|
1938
|
-
function cubehelix$
|
|
1939
|
-
return arguments.length === 1 ? cubehelixConvert
|
|
1971
|
+
function cubehelix$3(h, s, l, opacity) {
|
|
1972
|
+
return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
|
|
1940
1973
|
}
|
|
1941
1974
|
|
|
1942
|
-
function Cubehelix
|
|
1975
|
+
function Cubehelix(h, s, l, opacity) {
|
|
1943
1976
|
this.h = +h;
|
|
1944
1977
|
this.s = +s;
|
|
1945
1978
|
this.l = +l;
|
|
1946
1979
|
this.opacity = +opacity;
|
|
1947
1980
|
}
|
|
1948
1981
|
|
|
1949
|
-
define
|
|
1950
|
-
brighter
|
|
1951
|
-
k = k == null ? brighter
|
|
1952
|
-
return new Cubehelix
|
|
1982
|
+
define(Cubehelix, cubehelix$3, extend(Color, {
|
|
1983
|
+
brighter(k) {
|
|
1984
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
1985
|
+
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
|
|
1953
1986
|
},
|
|
1954
|
-
darker
|
|
1955
|
-
k = k == null ? darker
|
|
1956
|
-
return new Cubehelix
|
|
1987
|
+
darker(k) {
|
|
1988
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
1989
|
+
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
|
|
1957
1990
|
},
|
|
1958
|
-
rgb
|
|
1959
|
-
var h = isNaN(this.h) ? 0 : (this.h + 120) *
|
|
1991
|
+
rgb() {
|
|
1992
|
+
var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,
|
|
1960
1993
|
l = +this.l,
|
|
1961
1994
|
a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
|
|
1962
1995
|
cosh = Math.cos(h),
|
|
1963
1996
|
sinh = Math.sin(h);
|
|
1964
|
-
return new Rgb
|
|
1965
|
-
255 * (l + a * (A
|
|
1966
|
-
255 * (l + a * (C
|
|
1967
|
-
255 * (l + a * (E
|
|
1997
|
+
return new Rgb(
|
|
1998
|
+
255 * (l + a * (A * cosh + B * sinh)),
|
|
1999
|
+
255 * (l + a * (C * cosh + D * sinh)),
|
|
2000
|
+
255 * (l + a * (E * cosh)),
|
|
1968
2001
|
this.opacity
|
|
1969
2002
|
);
|
|
1970
2003
|
}
|
|
@@ -2039,8 +2072,8 @@ function nogamma(a, b) {
|
|
|
2039
2072
|
var interpolateRgb = (function rgbGamma(y) {
|
|
2040
2073
|
var color = gamma(y);
|
|
2041
2074
|
|
|
2042
|
-
function rgb(start, end) {
|
|
2043
|
-
var r = color((start = rgb
|
|
2075
|
+
function rgb$1(start, end) {
|
|
2076
|
+
var r = color((start = rgb(start)).r, (end = rgb(end)).r),
|
|
2044
2077
|
g = color(start.g, end.g),
|
|
2045
2078
|
b = color(start.b, end.b),
|
|
2046
2079
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2053,9 +2086,9 @@ var interpolateRgb = (function rgbGamma(y) {
|
|
|
2053
2086
|
};
|
|
2054
2087
|
}
|
|
2055
2088
|
|
|
2056
|
-
rgb.gamma = rgbGamma;
|
|
2089
|
+
rgb$1.gamma = rgbGamma;
|
|
2057
2090
|
|
|
2058
|
-
return rgb;
|
|
2091
|
+
return rgb$1;
|
|
2059
2092
|
})(1);
|
|
2060
2093
|
|
|
2061
2094
|
function rgbSpline(spline) {
|
|
@@ -2066,7 +2099,7 @@ function rgbSpline(spline) {
|
|
|
2066
2099
|
b = new Array(n),
|
|
2067
2100
|
i, color;
|
|
2068
2101
|
for (i = 0; i < n; ++i) {
|
|
2069
|
-
color = rgb
|
|
2102
|
+
color = rgb(colors[i]);
|
|
2070
2103
|
r[i] = color.r || 0;
|
|
2071
2104
|
g[i] = color.g || 0;
|
|
2072
2105
|
b[i] = color.b || 0;
|
|
@@ -2224,8 +2257,8 @@ function interpolate$1(a, b) {
|
|
|
2224
2257
|
var t = typeof b, c;
|
|
2225
2258
|
return b == null || t === "boolean" ? constant$5(b)
|
|
2226
2259
|
: (t === "number" ? reinterpolate$1
|
|
2227
|
-
: t === "string" ? ((c = color
|
|
2228
|
-
: b instanceof color
|
|
2260
|
+
: t === "string" ? ((c = color(b)) ? (b = c, interpolateRgb) : interpolateString)
|
|
2261
|
+
: b instanceof color ? interpolateRgb
|
|
2229
2262
|
: b instanceof Date ? date$1
|
|
2230
2263
|
: isNumberArray(b) ? numberArray
|
|
2231
2264
|
: Array.isArray(b) ? genericArray
|
|
@@ -2431,9 +2464,9 @@ function interpolateZoom(p0, p1) {
|
|
|
2431
2464
|
return i;
|
|
2432
2465
|
}
|
|
2433
2466
|
|
|
2434
|
-
function hsl
|
|
2467
|
+
function hsl(hue) {
|
|
2435
2468
|
return function(start, end) {
|
|
2436
|
-
var h = hue((start = hsl$
|
|
2469
|
+
var h = hue((start = hsl$2(start)).h, (end = hsl$2(end)).h),
|
|
2437
2470
|
s = nogamma(start.s, end.s),
|
|
2438
2471
|
l = nogamma(start.l, end.l),
|
|
2439
2472
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2447,11 +2480,11 @@ function hsl$3(hue) {
|
|
|
2447
2480
|
}
|
|
2448
2481
|
}
|
|
2449
2482
|
|
|
2450
|
-
var hsl$
|
|
2451
|
-
var hslLong = hsl
|
|
2483
|
+
var hsl$1 = hsl(hue$1);
|
|
2484
|
+
var hslLong = hsl(nogamma);
|
|
2452
2485
|
|
|
2453
|
-
function lab
|
|
2454
|
-
var l = nogamma((start = lab$
|
|
2486
|
+
function lab(start, end) {
|
|
2487
|
+
var l = nogamma((start = lab$1(start)).l, (end = lab$1(end)).l),
|
|
2455
2488
|
a = nogamma(start.a, end.a),
|
|
2456
2489
|
b = nogamma(start.b, end.b),
|
|
2457
2490
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2464,9 +2497,9 @@ function lab$1(start, end) {
|
|
|
2464
2497
|
};
|
|
2465
2498
|
}
|
|
2466
2499
|
|
|
2467
|
-
function hcl
|
|
2500
|
+
function hcl(hue) {
|
|
2468
2501
|
return function(start, end) {
|
|
2469
|
-
var h = hue((start = hcl$
|
|
2502
|
+
var h = hue((start = hcl$2(start)).h, (end = hcl$2(end)).h),
|
|
2470
2503
|
c = nogamma(start.c, end.c),
|
|
2471
2504
|
l = nogamma(start.l, end.l),
|
|
2472
2505
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2480,15 +2513,15 @@ function hcl$1(hue) {
|
|
|
2480
2513
|
}
|
|
2481
2514
|
}
|
|
2482
2515
|
|
|
2483
|
-
var hcl$
|
|
2484
|
-
var hclLong = hcl
|
|
2516
|
+
var hcl$1 = hcl(hue$1);
|
|
2517
|
+
var hclLong = hcl(nogamma);
|
|
2485
2518
|
|
|
2486
|
-
function cubehelix$
|
|
2519
|
+
function cubehelix$1(hue) {
|
|
2487
2520
|
return (function cubehelixGamma(y) {
|
|
2488
2521
|
y = +y;
|
|
2489
2522
|
|
|
2490
2523
|
function cubehelix(start, end) {
|
|
2491
|
-
var h = hue((start = cubehelix$
|
|
2524
|
+
var h = hue((start = cubehelix$3(start)).h, (end = cubehelix$3(end)).h),
|
|
2492
2525
|
s = nogamma(start.s, end.s),
|
|
2493
2526
|
l = nogamma(start.l, end.l),
|
|
2494
2527
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2507,8 +2540,8 @@ function cubehelix$3(hue) {
|
|
|
2507
2540
|
})(1);
|
|
2508
2541
|
}
|
|
2509
2542
|
|
|
2510
|
-
var cubehelix$
|
|
2511
|
-
var cubehelixLong = cubehelix$
|
|
2543
|
+
var cubehelix$2 = cubehelix$1(hue$1);
|
|
2544
|
+
var cubehelixLong = cubehelix$1(nogamma);
|
|
2512
2545
|
|
|
2513
2546
|
function piecewise(interpolate, values) {
|
|
2514
2547
|
var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);
|
|
@@ -2605,430 +2638,49 @@ function tweenValue(transition, name, value) {
|
|
|
2605
2638
|
};
|
|
2606
2639
|
}
|
|
2607
2640
|
|
|
2608
|
-
function
|
|
2609
|
-
|
|
2610
|
-
|
|
2641
|
+
function interpolate(a, b) {
|
|
2642
|
+
var c;
|
|
2643
|
+
return (typeof b === "number" ? reinterpolate$1
|
|
2644
|
+
: b instanceof color ? interpolateRgb
|
|
2645
|
+
: (c = color(b)) ? (b = c, interpolateRgb)
|
|
2646
|
+
: interpolateString)(a, b);
|
|
2611
2647
|
}
|
|
2612
2648
|
|
|
2613
|
-
function
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2649
|
+
function attrRemove(name) {
|
|
2650
|
+
return function() {
|
|
2651
|
+
this.removeAttribute(name);
|
|
2652
|
+
};
|
|
2617
2653
|
}
|
|
2618
2654
|
|
|
2619
|
-
function
|
|
2655
|
+
function attrRemoveNS(fullname) {
|
|
2656
|
+
return function() {
|
|
2657
|
+
this.removeAttributeNS(fullname.space, fullname.local);
|
|
2658
|
+
};
|
|
2659
|
+
}
|
|
2620
2660
|
|
|
2621
|
-
|
|
2622
|
-
var
|
|
2661
|
+
function attrConstant(name, interpolate, value1) {
|
|
2662
|
+
var string00,
|
|
2663
|
+
string1 = value1 + "",
|
|
2664
|
+
interpolate0;
|
|
2665
|
+
return function() {
|
|
2666
|
+
var string0 = this.getAttribute(name);
|
|
2667
|
+
return string0 === string1 ? null
|
|
2668
|
+
: string0 === string00 ? interpolate0
|
|
2669
|
+
: interpolate0 = interpolate(string00 = string0, value1);
|
|
2670
|
+
};
|
|
2671
|
+
}
|
|
2623
2672
|
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
var named$2 = {
|
|
2636
|
-
aliceblue: 0xf0f8ff,
|
|
2637
|
-
antiquewhite: 0xfaebd7,
|
|
2638
|
-
aqua: 0x00ffff,
|
|
2639
|
-
aquamarine: 0x7fffd4,
|
|
2640
|
-
azure: 0xf0ffff,
|
|
2641
|
-
beige: 0xf5f5dc,
|
|
2642
|
-
bisque: 0xffe4c4,
|
|
2643
|
-
black: 0x000000,
|
|
2644
|
-
blanchedalmond: 0xffebcd,
|
|
2645
|
-
blue: 0x0000ff,
|
|
2646
|
-
blueviolet: 0x8a2be2,
|
|
2647
|
-
brown: 0xa52a2a,
|
|
2648
|
-
burlywood: 0xdeb887,
|
|
2649
|
-
cadetblue: 0x5f9ea0,
|
|
2650
|
-
chartreuse: 0x7fff00,
|
|
2651
|
-
chocolate: 0xd2691e,
|
|
2652
|
-
coral: 0xff7f50,
|
|
2653
|
-
cornflowerblue: 0x6495ed,
|
|
2654
|
-
cornsilk: 0xfff8dc,
|
|
2655
|
-
crimson: 0xdc143c,
|
|
2656
|
-
cyan: 0x00ffff,
|
|
2657
|
-
darkblue: 0x00008b,
|
|
2658
|
-
darkcyan: 0x008b8b,
|
|
2659
|
-
darkgoldenrod: 0xb8860b,
|
|
2660
|
-
darkgray: 0xa9a9a9,
|
|
2661
|
-
darkgreen: 0x006400,
|
|
2662
|
-
darkgrey: 0xa9a9a9,
|
|
2663
|
-
darkkhaki: 0xbdb76b,
|
|
2664
|
-
darkmagenta: 0x8b008b,
|
|
2665
|
-
darkolivegreen: 0x556b2f,
|
|
2666
|
-
darkorange: 0xff8c00,
|
|
2667
|
-
darkorchid: 0x9932cc,
|
|
2668
|
-
darkred: 0x8b0000,
|
|
2669
|
-
darksalmon: 0xe9967a,
|
|
2670
|
-
darkseagreen: 0x8fbc8f,
|
|
2671
|
-
darkslateblue: 0x483d8b,
|
|
2672
|
-
darkslategray: 0x2f4f4f,
|
|
2673
|
-
darkslategrey: 0x2f4f4f,
|
|
2674
|
-
darkturquoise: 0x00ced1,
|
|
2675
|
-
darkviolet: 0x9400d3,
|
|
2676
|
-
deeppink: 0xff1493,
|
|
2677
|
-
deepskyblue: 0x00bfff,
|
|
2678
|
-
dimgray: 0x696969,
|
|
2679
|
-
dimgrey: 0x696969,
|
|
2680
|
-
dodgerblue: 0x1e90ff,
|
|
2681
|
-
firebrick: 0xb22222,
|
|
2682
|
-
floralwhite: 0xfffaf0,
|
|
2683
|
-
forestgreen: 0x228b22,
|
|
2684
|
-
fuchsia: 0xff00ff,
|
|
2685
|
-
gainsboro: 0xdcdcdc,
|
|
2686
|
-
ghostwhite: 0xf8f8ff,
|
|
2687
|
-
gold: 0xffd700,
|
|
2688
|
-
goldenrod: 0xdaa520,
|
|
2689
|
-
gray: 0x808080,
|
|
2690
|
-
green: 0x008000,
|
|
2691
|
-
greenyellow: 0xadff2f,
|
|
2692
|
-
grey: 0x808080,
|
|
2693
|
-
honeydew: 0xf0fff0,
|
|
2694
|
-
hotpink: 0xff69b4,
|
|
2695
|
-
indianred: 0xcd5c5c,
|
|
2696
|
-
indigo: 0x4b0082,
|
|
2697
|
-
ivory: 0xfffff0,
|
|
2698
|
-
khaki: 0xf0e68c,
|
|
2699
|
-
lavender: 0xe6e6fa,
|
|
2700
|
-
lavenderblush: 0xfff0f5,
|
|
2701
|
-
lawngreen: 0x7cfc00,
|
|
2702
|
-
lemonchiffon: 0xfffacd,
|
|
2703
|
-
lightblue: 0xadd8e6,
|
|
2704
|
-
lightcoral: 0xf08080,
|
|
2705
|
-
lightcyan: 0xe0ffff,
|
|
2706
|
-
lightgoldenrodyellow: 0xfafad2,
|
|
2707
|
-
lightgray: 0xd3d3d3,
|
|
2708
|
-
lightgreen: 0x90ee90,
|
|
2709
|
-
lightgrey: 0xd3d3d3,
|
|
2710
|
-
lightpink: 0xffb6c1,
|
|
2711
|
-
lightsalmon: 0xffa07a,
|
|
2712
|
-
lightseagreen: 0x20b2aa,
|
|
2713
|
-
lightskyblue: 0x87cefa,
|
|
2714
|
-
lightslategray: 0x778899,
|
|
2715
|
-
lightslategrey: 0x778899,
|
|
2716
|
-
lightsteelblue: 0xb0c4de,
|
|
2717
|
-
lightyellow: 0xffffe0,
|
|
2718
|
-
lime: 0x00ff00,
|
|
2719
|
-
limegreen: 0x32cd32,
|
|
2720
|
-
linen: 0xfaf0e6,
|
|
2721
|
-
magenta: 0xff00ff,
|
|
2722
|
-
maroon: 0x800000,
|
|
2723
|
-
mediumaquamarine: 0x66cdaa,
|
|
2724
|
-
mediumblue: 0x0000cd,
|
|
2725
|
-
mediumorchid: 0xba55d3,
|
|
2726
|
-
mediumpurple: 0x9370db,
|
|
2727
|
-
mediumseagreen: 0x3cb371,
|
|
2728
|
-
mediumslateblue: 0x7b68ee,
|
|
2729
|
-
mediumspringgreen: 0x00fa9a,
|
|
2730
|
-
mediumturquoise: 0x48d1cc,
|
|
2731
|
-
mediumvioletred: 0xc71585,
|
|
2732
|
-
midnightblue: 0x191970,
|
|
2733
|
-
mintcream: 0xf5fffa,
|
|
2734
|
-
mistyrose: 0xffe4e1,
|
|
2735
|
-
moccasin: 0xffe4b5,
|
|
2736
|
-
navajowhite: 0xffdead,
|
|
2737
|
-
navy: 0x000080,
|
|
2738
|
-
oldlace: 0xfdf5e6,
|
|
2739
|
-
olive: 0x808000,
|
|
2740
|
-
olivedrab: 0x6b8e23,
|
|
2741
|
-
orange: 0xffa500,
|
|
2742
|
-
orangered: 0xff4500,
|
|
2743
|
-
orchid: 0xda70d6,
|
|
2744
|
-
palegoldenrod: 0xeee8aa,
|
|
2745
|
-
palegreen: 0x98fb98,
|
|
2746
|
-
paleturquoise: 0xafeeee,
|
|
2747
|
-
palevioletred: 0xdb7093,
|
|
2748
|
-
papayawhip: 0xffefd5,
|
|
2749
|
-
peachpuff: 0xffdab9,
|
|
2750
|
-
peru: 0xcd853f,
|
|
2751
|
-
pink: 0xffc0cb,
|
|
2752
|
-
plum: 0xdda0dd,
|
|
2753
|
-
powderblue: 0xb0e0e6,
|
|
2754
|
-
purple: 0x800080,
|
|
2755
|
-
rebeccapurple: 0x663399,
|
|
2756
|
-
red: 0xff0000,
|
|
2757
|
-
rosybrown: 0xbc8f8f,
|
|
2758
|
-
royalblue: 0x4169e1,
|
|
2759
|
-
saddlebrown: 0x8b4513,
|
|
2760
|
-
salmon: 0xfa8072,
|
|
2761
|
-
sandybrown: 0xf4a460,
|
|
2762
|
-
seagreen: 0x2e8b57,
|
|
2763
|
-
seashell: 0xfff5ee,
|
|
2764
|
-
sienna: 0xa0522d,
|
|
2765
|
-
silver: 0xc0c0c0,
|
|
2766
|
-
skyblue: 0x87ceeb,
|
|
2767
|
-
slateblue: 0x6a5acd,
|
|
2768
|
-
slategray: 0x708090,
|
|
2769
|
-
slategrey: 0x708090,
|
|
2770
|
-
snow: 0xfffafa,
|
|
2771
|
-
springgreen: 0x00ff7f,
|
|
2772
|
-
steelblue: 0x4682b4,
|
|
2773
|
-
tan: 0xd2b48c,
|
|
2774
|
-
teal: 0x008080,
|
|
2775
|
-
thistle: 0xd8bfd8,
|
|
2776
|
-
tomato: 0xff6347,
|
|
2777
|
-
turquoise: 0x40e0d0,
|
|
2778
|
-
violet: 0xee82ee,
|
|
2779
|
-
wheat: 0xf5deb3,
|
|
2780
|
-
white: 0xffffff,
|
|
2781
|
-
whitesmoke: 0xf5f5f5,
|
|
2782
|
-
yellow: 0xffff00,
|
|
2783
|
-
yellowgreen: 0x9acd32
|
|
2784
|
-
};
|
|
2785
|
-
|
|
2786
|
-
define$2(Color$2, color$2, {
|
|
2787
|
-
copy: function(channels) {
|
|
2788
|
-
return Object.assign(new this.constructor, this, channels);
|
|
2789
|
-
},
|
|
2790
|
-
displayable: function() {
|
|
2791
|
-
return this.rgb().displayable();
|
|
2792
|
-
},
|
|
2793
|
-
hex: color_formatHex$2, // Deprecated! Use color.formatHex.
|
|
2794
|
-
formatHex: color_formatHex$2,
|
|
2795
|
-
formatHsl: color_formatHsl$2,
|
|
2796
|
-
formatRgb: color_formatRgb$2,
|
|
2797
|
-
toString: color_formatRgb$2
|
|
2798
|
-
});
|
|
2799
|
-
|
|
2800
|
-
function color_formatHex$2() {
|
|
2801
|
-
return this.rgb().formatHex();
|
|
2802
|
-
}
|
|
2803
|
-
|
|
2804
|
-
function color_formatHsl$2() {
|
|
2805
|
-
return hslConvert$2(this).formatHsl();
|
|
2806
|
-
}
|
|
2807
|
-
|
|
2808
|
-
function color_formatRgb$2() {
|
|
2809
|
-
return this.rgb().formatRgb();
|
|
2810
|
-
}
|
|
2811
|
-
|
|
2812
|
-
function color$2(format) {
|
|
2813
|
-
var m, l;
|
|
2814
|
-
format = (format + "").trim().toLowerCase();
|
|
2815
|
-
return (m = reHex$2.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn$2(m) // #ff0000
|
|
2816
|
-
: l === 3 ? new Rgb$2((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
|
|
2817
|
-
: l === 8 ? rgba$2(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
|
|
2818
|
-
: l === 4 ? rgba$2((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
|
|
2819
|
-
: null) // invalid hex
|
|
2820
|
-
: (m = reRgbInteger$2.exec(format)) ? new Rgb$2(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
|
|
2821
|
-
: (m = reRgbPercent$2.exec(format)) ? new Rgb$2(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
|
|
2822
|
-
: (m = reRgbaInteger$2.exec(format)) ? rgba$2(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
|
|
2823
|
-
: (m = reRgbaPercent$2.exec(format)) ? rgba$2(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
|
|
2824
|
-
: (m = reHslPercent$2.exec(format)) ? hsla$2(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
2825
|
-
: (m = reHslaPercent$2.exec(format)) ? hsla$2(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
2826
|
-
: named$2.hasOwnProperty(format) ? rgbn$2(named$2[format]) // eslint-disable-line no-prototype-builtins
|
|
2827
|
-
: format === "transparent" ? new Rgb$2(NaN, NaN, NaN, 0)
|
|
2828
|
-
: null;
|
|
2829
|
-
}
|
|
2830
|
-
|
|
2831
|
-
function rgbn$2(n) {
|
|
2832
|
-
return new Rgb$2(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
2833
|
-
}
|
|
2834
|
-
|
|
2835
|
-
function rgba$2(r, g, b, a) {
|
|
2836
|
-
if (a <= 0) r = g = b = NaN;
|
|
2837
|
-
return new Rgb$2(r, g, b, a);
|
|
2838
|
-
}
|
|
2839
|
-
|
|
2840
|
-
function rgbConvert$2(o) {
|
|
2841
|
-
if (!(o instanceof Color$2)) o = color$2(o);
|
|
2842
|
-
if (!o) return new Rgb$2;
|
|
2843
|
-
o = o.rgb();
|
|
2844
|
-
return new Rgb$2(o.r, o.g, o.b, o.opacity);
|
|
2845
|
-
}
|
|
2846
|
-
|
|
2847
|
-
function rgb$2(r, g, b, opacity) {
|
|
2848
|
-
return arguments.length === 1 ? rgbConvert$2(r) : new Rgb$2(r, g, b, opacity == null ? 1 : opacity);
|
|
2849
|
-
}
|
|
2850
|
-
|
|
2851
|
-
function Rgb$2(r, g, b, opacity) {
|
|
2852
|
-
this.r = +r;
|
|
2853
|
-
this.g = +g;
|
|
2854
|
-
this.b = +b;
|
|
2855
|
-
this.opacity = +opacity;
|
|
2856
|
-
}
|
|
2857
|
-
|
|
2858
|
-
define$2(Rgb$2, rgb$2, extend$2(Color$2, {
|
|
2859
|
-
brighter: function(k) {
|
|
2860
|
-
k = k == null ? brighter$2 : Math.pow(brighter$2, k);
|
|
2861
|
-
return new Rgb$2(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
2862
|
-
},
|
|
2863
|
-
darker: function(k) {
|
|
2864
|
-
k = k == null ? darker$2 : Math.pow(darker$2, k);
|
|
2865
|
-
return new Rgb$2(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
2866
|
-
},
|
|
2867
|
-
rgb: function() {
|
|
2868
|
-
return this;
|
|
2869
|
-
},
|
|
2870
|
-
displayable: function() {
|
|
2871
|
-
return (-0.5 <= this.r && this.r < 255.5)
|
|
2872
|
-
&& (-0.5 <= this.g && this.g < 255.5)
|
|
2873
|
-
&& (-0.5 <= this.b && this.b < 255.5)
|
|
2874
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
2875
|
-
},
|
|
2876
|
-
hex: rgb_formatHex$2, // Deprecated! Use color.formatHex.
|
|
2877
|
-
formatHex: rgb_formatHex$2,
|
|
2878
|
-
formatRgb: rgb_formatRgb$2,
|
|
2879
|
-
toString: rgb_formatRgb$2
|
|
2880
|
-
}));
|
|
2881
|
-
|
|
2882
|
-
function rgb_formatHex$2() {
|
|
2883
|
-
return "#" + hex$2(this.r) + hex$2(this.g) + hex$2(this.b);
|
|
2884
|
-
}
|
|
2885
|
-
|
|
2886
|
-
function rgb_formatRgb$2() {
|
|
2887
|
-
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
2888
|
-
return (a === 1 ? "rgb(" : "rgba(")
|
|
2889
|
-
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
|
2890
|
-
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
|
2891
|
-
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
|
2892
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
2893
|
-
}
|
|
2894
|
-
|
|
2895
|
-
function hex$2(value) {
|
|
2896
|
-
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
2897
|
-
return (value < 16 ? "0" : "") + value.toString(16);
|
|
2898
|
-
}
|
|
2899
|
-
|
|
2900
|
-
function hsla$2(h, s, l, a) {
|
|
2901
|
-
if (a <= 0) h = s = l = NaN;
|
|
2902
|
-
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
2903
|
-
else if (s <= 0) h = NaN;
|
|
2904
|
-
return new Hsl$2(h, s, l, a);
|
|
2905
|
-
}
|
|
2906
|
-
|
|
2907
|
-
function hslConvert$2(o) {
|
|
2908
|
-
if (o instanceof Hsl$2) return new Hsl$2(o.h, o.s, o.l, o.opacity);
|
|
2909
|
-
if (!(o instanceof Color$2)) o = color$2(o);
|
|
2910
|
-
if (!o) return new Hsl$2;
|
|
2911
|
-
if (o instanceof Hsl$2) return o;
|
|
2912
|
-
o = o.rgb();
|
|
2913
|
-
var r = o.r / 255,
|
|
2914
|
-
g = o.g / 255,
|
|
2915
|
-
b = o.b / 255,
|
|
2916
|
-
min = Math.min(r, g, b),
|
|
2917
|
-
max = Math.max(r, g, b),
|
|
2918
|
-
h = NaN,
|
|
2919
|
-
s = max - min,
|
|
2920
|
-
l = (max + min) / 2;
|
|
2921
|
-
if (s) {
|
|
2922
|
-
if (r === max) h = (g - b) / s + (g < b) * 6;
|
|
2923
|
-
else if (g === max) h = (b - r) / s + 2;
|
|
2924
|
-
else h = (r - g) / s + 4;
|
|
2925
|
-
s /= l < 0.5 ? max + min : 2 - max - min;
|
|
2926
|
-
h *= 60;
|
|
2927
|
-
} else {
|
|
2928
|
-
s = l > 0 && l < 1 ? 0 : h;
|
|
2929
|
-
}
|
|
2930
|
-
return new Hsl$2(h, s, l, o.opacity);
|
|
2931
|
-
}
|
|
2932
|
-
|
|
2933
|
-
function hsl$2(h, s, l, opacity) {
|
|
2934
|
-
return arguments.length === 1 ? hslConvert$2(h) : new Hsl$2(h, s, l, opacity == null ? 1 : opacity);
|
|
2935
|
-
}
|
|
2936
|
-
|
|
2937
|
-
function Hsl$2(h, s, l, opacity) {
|
|
2938
|
-
this.h = +h;
|
|
2939
|
-
this.s = +s;
|
|
2940
|
-
this.l = +l;
|
|
2941
|
-
this.opacity = +opacity;
|
|
2942
|
-
}
|
|
2943
|
-
|
|
2944
|
-
define$2(Hsl$2, hsl$2, extend$2(Color$2, {
|
|
2945
|
-
brighter: function(k) {
|
|
2946
|
-
k = k == null ? brighter$2 : Math.pow(brighter$2, k);
|
|
2947
|
-
return new Hsl$2(this.h, this.s, this.l * k, this.opacity);
|
|
2948
|
-
},
|
|
2949
|
-
darker: function(k) {
|
|
2950
|
-
k = k == null ? darker$2 : Math.pow(darker$2, k);
|
|
2951
|
-
return new Hsl$2(this.h, this.s, this.l * k, this.opacity);
|
|
2952
|
-
},
|
|
2953
|
-
rgb: function() {
|
|
2954
|
-
var h = this.h % 360 + (this.h < 0) * 360,
|
|
2955
|
-
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
2956
|
-
l = this.l,
|
|
2957
|
-
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
2958
|
-
m1 = 2 * l - m2;
|
|
2959
|
-
return new Rgb$2(
|
|
2960
|
-
hsl2rgb$2(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
2961
|
-
hsl2rgb$2(h, m1, m2),
|
|
2962
|
-
hsl2rgb$2(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
2963
|
-
this.opacity
|
|
2964
|
-
);
|
|
2965
|
-
},
|
|
2966
|
-
displayable: function() {
|
|
2967
|
-
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
|
2968
|
-
&& (0 <= this.l && this.l <= 1)
|
|
2969
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
2970
|
-
},
|
|
2971
|
-
formatHsl: function() {
|
|
2972
|
-
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
2973
|
-
return (a === 1 ? "hsl(" : "hsla(")
|
|
2974
|
-
+ (this.h || 0) + ", "
|
|
2975
|
-
+ (this.s || 0) * 100 + "%, "
|
|
2976
|
-
+ (this.l || 0) * 100 + "%"
|
|
2977
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
2978
|
-
}
|
|
2979
|
-
}));
|
|
2980
|
-
|
|
2981
|
-
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
2982
|
-
function hsl2rgb$2(h, m1, m2) {
|
|
2983
|
-
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
|
2984
|
-
: h < 180 ? m2
|
|
2985
|
-
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
2986
|
-
: m1) * 255;
|
|
2987
|
-
}
|
|
2988
|
-
|
|
2989
|
-
function interpolate(a, b) {
|
|
2990
|
-
var c;
|
|
2991
|
-
return (typeof b === "number" ? reinterpolate$1
|
|
2992
|
-
: b instanceof color$2 ? interpolateRgb
|
|
2993
|
-
: (c = color$2(b)) ? (b = c, interpolateRgb)
|
|
2994
|
-
: interpolateString)(a, b);
|
|
2995
|
-
}
|
|
2996
|
-
|
|
2997
|
-
function attrRemove(name) {
|
|
2998
|
-
return function() {
|
|
2999
|
-
this.removeAttribute(name);
|
|
3000
|
-
};
|
|
3001
|
-
}
|
|
3002
|
-
|
|
3003
|
-
function attrRemoveNS(fullname) {
|
|
3004
|
-
return function() {
|
|
3005
|
-
this.removeAttributeNS(fullname.space, fullname.local);
|
|
3006
|
-
};
|
|
3007
|
-
}
|
|
3008
|
-
|
|
3009
|
-
function attrConstant(name, interpolate, value1) {
|
|
3010
|
-
var string00,
|
|
3011
|
-
string1 = value1 + "",
|
|
3012
|
-
interpolate0;
|
|
3013
|
-
return function() {
|
|
3014
|
-
var string0 = this.getAttribute(name);
|
|
3015
|
-
return string0 === string1 ? null
|
|
3016
|
-
: string0 === string00 ? interpolate0
|
|
3017
|
-
: interpolate0 = interpolate(string00 = string0, value1);
|
|
3018
|
-
};
|
|
3019
|
-
}
|
|
3020
|
-
|
|
3021
|
-
function attrConstantNS(fullname, interpolate, value1) {
|
|
3022
|
-
var string00,
|
|
3023
|
-
string1 = value1 + "",
|
|
3024
|
-
interpolate0;
|
|
3025
|
-
return function() {
|
|
3026
|
-
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
3027
|
-
return string0 === string1 ? null
|
|
3028
|
-
: string0 === string00 ? interpolate0
|
|
3029
|
-
: interpolate0 = interpolate(string00 = string0, value1);
|
|
3030
|
-
};
|
|
3031
|
-
}
|
|
2673
|
+
function attrConstantNS(fullname, interpolate, value1) {
|
|
2674
|
+
var string00,
|
|
2675
|
+
string1 = value1 + "",
|
|
2676
|
+
interpolate0;
|
|
2677
|
+
return function() {
|
|
2678
|
+
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2679
|
+
return string0 === string1 ? null
|
|
2680
|
+
: string0 === string00 ? interpolate0
|
|
2681
|
+
: interpolate0 = interpolate(string00 = string0, value1);
|
|
2682
|
+
};
|
|
2683
|
+
}
|
|
3032
2684
|
|
|
3033
2685
|
function attrFunction(name, interpolate, value) {
|
|
3034
2686
|
var string00,
|
|
@@ -3808,12 +3460,12 @@ function active(node, name) {
|
|
|
3808
3460
|
return null;
|
|
3809
3461
|
}
|
|
3810
3462
|
|
|
3811
|
-
function
|
|
3463
|
+
function d3Ascending(a, b) {
|
|
3812
3464
|
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
3813
3465
|
}
|
|
3814
3466
|
|
|
3815
|
-
function bisector(compare) {
|
|
3816
|
-
if (compare.length === 1) compare = ascendingComparator(compare);
|
|
3467
|
+
function bisector$1(compare) {
|
|
3468
|
+
if (compare.length === 1) compare = ascendingComparator$1(compare);
|
|
3817
3469
|
return {
|
|
3818
3470
|
left: function(a, x, lo, hi) {
|
|
3819
3471
|
if (lo == null) lo = 0;
|
|
@@ -3838,15 +3490,15 @@ function bisector(compare) {
|
|
|
3838
3490
|
};
|
|
3839
3491
|
}
|
|
3840
3492
|
|
|
3841
|
-
function ascendingComparator(f) {
|
|
3493
|
+
function ascendingComparator$1(f) {
|
|
3842
3494
|
return function(d, x) {
|
|
3843
|
-
return
|
|
3495
|
+
return d3Ascending(f(d), x);
|
|
3844
3496
|
};
|
|
3845
3497
|
}
|
|
3846
3498
|
|
|
3847
|
-
var ascendingBisect = bisector(
|
|
3848
|
-
var bisectRight = ascendingBisect.right;
|
|
3849
|
-
var bisectLeft = ascendingBisect.left;
|
|
3499
|
+
var ascendingBisect$1 = bisector$1(d3Ascending);
|
|
3500
|
+
var bisectRight$1 = ascendingBisect$1.right;
|
|
3501
|
+
var bisectLeft = ascendingBisect$1.left;
|
|
3850
3502
|
|
|
3851
3503
|
function pairs(array, f) {
|
|
3852
3504
|
if (f == null) f = pair;
|
|
@@ -3883,7 +3535,7 @@ function d3Descending(a, b) {
|
|
|
3883
3535
|
return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
|
|
3884
3536
|
}
|
|
3885
3537
|
|
|
3886
|
-
function number$
|
|
3538
|
+
function number$3(x) {
|
|
3887
3539
|
return x === null ? NaN : +x;
|
|
3888
3540
|
}
|
|
3889
3541
|
|
|
@@ -3898,7 +3550,7 @@ function d3Variance(values, valueof) {
|
|
|
3898
3550
|
|
|
3899
3551
|
if (valueof == null) {
|
|
3900
3552
|
while (++i < n) {
|
|
3901
|
-
if (!isNaN(value = number$
|
|
3553
|
+
if (!isNaN(value = number$3(values[i]))) {
|
|
3902
3554
|
delta = value - mean;
|
|
3903
3555
|
mean += delta / ++m;
|
|
3904
3556
|
sum += delta * (value - mean);
|
|
@@ -3908,7 +3560,7 @@ function d3Variance(values, valueof) {
|
|
|
3908
3560
|
|
|
3909
3561
|
else {
|
|
3910
3562
|
while (++i < n) {
|
|
3911
|
-
if (!isNaN(value = number$
|
|
3563
|
+
if (!isNaN(value = number$3(valueof(values[i], i, values)))) {
|
|
3912
3564
|
delta = value - mean;
|
|
3913
3565
|
mean += delta / ++m;
|
|
3914
3566
|
sum += delta * (value - mean);
|
|
@@ -3977,7 +3629,7 @@ function identity$3(x) {
|
|
|
3977
3629
|
return x;
|
|
3978
3630
|
}
|
|
3979
3631
|
|
|
3980
|
-
function
|
|
3632
|
+
function range(start, stop, step) {
|
|
3981
3633
|
start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
|
|
3982
3634
|
|
|
3983
3635
|
var i = -1,
|
|
@@ -3991,11 +3643,11 @@ function sequence(start, stop, step) {
|
|
|
3991
3643
|
return range;
|
|
3992
3644
|
}
|
|
3993
3645
|
|
|
3994
|
-
var e10 = Math.sqrt(50),
|
|
3995
|
-
e5 = Math.sqrt(10),
|
|
3996
|
-
e2 = Math.sqrt(2);
|
|
3646
|
+
var e10$1 = Math.sqrt(50),
|
|
3647
|
+
e5$1 = Math.sqrt(10),
|
|
3648
|
+
e2$1 = Math.sqrt(2);
|
|
3997
3649
|
|
|
3998
|
-
function ticks(start, stop, count) {
|
|
3650
|
+
function ticks$1(start, stop, count) {
|
|
3999
3651
|
var reverse,
|
|
4000
3652
|
i = -1,
|
|
4001
3653
|
n,
|
|
@@ -4005,7 +3657,7 @@ function ticks(start, stop, count) {
|
|
|
4005
3657
|
stop = +stop, start = +start, count = +count;
|
|
4006
3658
|
if (start === stop && count > 0) return [start];
|
|
4007
3659
|
if (reverse = stop < start) n = start, start = stop, stop = n;
|
|
4008
|
-
if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
|
|
3660
|
+
if ((step = tickIncrement$1(start, stop, count)) === 0 || !isFinite(step)) return [];
|
|
4009
3661
|
|
|
4010
3662
|
if (step > 0) {
|
|
4011
3663
|
start = Math.ceil(start / step);
|
|
@@ -4024,22 +3676,22 @@ function ticks(start, stop, count) {
|
|
|
4024
3676
|
return ticks;
|
|
4025
3677
|
}
|
|
4026
3678
|
|
|
4027
|
-
function tickIncrement(start, stop, count) {
|
|
3679
|
+
function tickIncrement$1(start, stop, count) {
|
|
4028
3680
|
var step = (stop - start) / Math.max(0, count),
|
|
4029
3681
|
power = Math.floor(Math.log(step) / Math.LN10),
|
|
4030
3682
|
error = step / Math.pow(10, power);
|
|
4031
3683
|
return power >= 0
|
|
4032
|
-
? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
|
|
4033
|
-
: -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
|
|
3684
|
+
? (error >= e10$1 ? 10 : error >= e5$1 ? 5 : error >= e2$1 ? 2 : 1) * Math.pow(10, power)
|
|
3685
|
+
: -Math.pow(10, -power) / (error >= e10$1 ? 10 : error >= e5$1 ? 5 : error >= e2$1 ? 2 : 1);
|
|
4034
3686
|
}
|
|
4035
3687
|
|
|
4036
|
-
function tickStep(start, stop, count) {
|
|
3688
|
+
function tickStep$1(start, stop, count) {
|
|
4037
3689
|
var step0 = Math.abs(stop - start) / Math.max(0, count),
|
|
4038
3690
|
step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
|
|
4039
3691
|
error = step0 / step1;
|
|
4040
|
-
if (error >= e10) step1 *= 10;
|
|
4041
|
-
else if (error >= e5) step1 *= 5;
|
|
4042
|
-
else if (error >= e2) step1 *= 2;
|
|
3692
|
+
if (error >= e10$1) step1 *= 10;
|
|
3693
|
+
else if (error >= e5$1) step1 *= 5;
|
|
3694
|
+
else if (error >= e2$1) step1 *= 2;
|
|
4043
3695
|
return stop < start ? -step1 : step1;
|
|
4044
3696
|
}
|
|
4045
3697
|
|
|
@@ -4069,8 +3721,8 @@ function histogram() {
|
|
|
4069
3721
|
|
|
4070
3722
|
// Convert number of thresholds into uniform thresholds.
|
|
4071
3723
|
if (!Array.isArray(tz)) {
|
|
4072
|
-
tz = tickStep(x0, x1, tz);
|
|
4073
|
-
tz =
|
|
3724
|
+
tz = tickStep$1(x0, x1, tz);
|
|
3725
|
+
tz = range(Math.ceil(x0 / tz) * tz, x1, tz); // exclusive
|
|
4074
3726
|
}
|
|
4075
3727
|
|
|
4076
3728
|
// Remove any thresholds outside the domain.
|
|
@@ -4092,7 +3744,7 @@ function histogram() {
|
|
|
4092
3744
|
for (i = 0; i < n; ++i) {
|
|
4093
3745
|
x = values[i];
|
|
4094
3746
|
if (x0 <= x && x <= x1) {
|
|
4095
|
-
bins[bisectRight(tz, x, 0, m)].push(data[i]);
|
|
3747
|
+
bins[bisectRight$1(tz, x, 0, m)].push(data[i]);
|
|
4096
3748
|
}
|
|
4097
3749
|
}
|
|
4098
3750
|
|
|
@@ -4114,8 +3766,8 @@ function histogram() {
|
|
|
4114
3766
|
return histogram;
|
|
4115
3767
|
}
|
|
4116
3768
|
|
|
4117
|
-
function
|
|
4118
|
-
if (valueof == null) valueof = number$
|
|
3769
|
+
function quantile$1(values, p, valueof) {
|
|
3770
|
+
if (valueof == null) valueof = number$3;
|
|
4119
3771
|
if (!(n = values.length)) return;
|
|
4120
3772
|
if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);
|
|
4121
3773
|
if (p >= 1) return +valueof(values[n - 1], n - 1, values);
|
|
@@ -4128,8 +3780,8 @@ function threshold$1(values, p, valueof) {
|
|
|
4128
3780
|
}
|
|
4129
3781
|
|
|
4130
3782
|
function freedmanDiaconis(values, min, max) {
|
|
4131
|
-
values = map$3.call(values, number$
|
|
4132
|
-
return Math.ceil((max - min) / (2 * (
|
|
3783
|
+
values = map$3.call(values, number$3).sort(d3Ascending);
|
|
3784
|
+
return Math.ceil((max - min) / (2 * (quantile$1(values, 0.75) - quantile$1(values, 0.25)) * Math.pow(values.length, -1 / 3)));
|
|
4133
3785
|
}
|
|
4134
3786
|
|
|
4135
3787
|
function scott(values, min, max) {
|
|
@@ -4180,14 +3832,14 @@ function d3Mean(values, valueof) {
|
|
|
4180
3832
|
|
|
4181
3833
|
if (valueof == null) {
|
|
4182
3834
|
while (++i < n) {
|
|
4183
|
-
if (!isNaN(value = number$
|
|
3835
|
+
if (!isNaN(value = number$3(values[i]))) sum += value;
|
|
4184
3836
|
else --m;
|
|
4185
3837
|
}
|
|
4186
3838
|
}
|
|
4187
3839
|
|
|
4188
3840
|
else {
|
|
4189
3841
|
while (++i < n) {
|
|
4190
|
-
if (!isNaN(value = number$
|
|
3842
|
+
if (!isNaN(value = number$3(valueof(values[i], i, values)))) sum += value;
|
|
4191
3843
|
else --m;
|
|
4192
3844
|
}
|
|
4193
3845
|
}
|
|
@@ -4203,7 +3855,7 @@ function d3Median(values, valueof) {
|
|
|
4203
3855
|
|
|
4204
3856
|
if (valueof == null) {
|
|
4205
3857
|
while (++i < n) {
|
|
4206
|
-
if (!isNaN(value = number$
|
|
3858
|
+
if (!isNaN(value = number$3(values[i]))) {
|
|
4207
3859
|
numbers.push(value);
|
|
4208
3860
|
}
|
|
4209
3861
|
}
|
|
@@ -4211,13 +3863,13 @@ function d3Median(values, valueof) {
|
|
|
4211
3863
|
|
|
4212
3864
|
else {
|
|
4213
3865
|
while (++i < n) {
|
|
4214
|
-
if (!isNaN(value = number$
|
|
3866
|
+
if (!isNaN(value = number$3(valueof(values[i], i, values)))) {
|
|
4215
3867
|
numbers.push(value);
|
|
4216
3868
|
}
|
|
4217
3869
|
}
|
|
4218
3870
|
}
|
|
4219
3871
|
|
|
4220
|
-
return
|
|
3872
|
+
return quantile$1(numbers.sort(d3Ascending), 0.5);
|
|
4221
3873
|
}
|
|
4222
3874
|
|
|
4223
3875
|
function merge(arrays) {
|
|
@@ -4291,7 +3943,7 @@ function scan(values, compare) {
|
|
|
4291
3943
|
xi,
|
|
4292
3944
|
xj = values[j];
|
|
4293
3945
|
|
|
4294
|
-
if (compare == null) compare =
|
|
3946
|
+
if (compare == null) compare = d3Ascending;
|
|
4295
3947
|
|
|
4296
3948
|
while (++i < n) {
|
|
4297
3949
|
if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) {
|
|
@@ -5091,8 +4743,8 @@ function precisionRound(step, max) {
|
|
|
5091
4743
|
return Math.max(0, exponent(max) - exponent(step)) + 1;
|
|
5092
4744
|
}
|
|
5093
4745
|
|
|
5094
|
-
var t0
|
|
5095
|
-
t1
|
|
4746
|
+
var t0 = new Date,
|
|
4747
|
+
t1 = new Date;
|
|
5096
4748
|
|
|
5097
4749
|
function newInterval(floori, offseti, count, field) {
|
|
5098
4750
|
|
|
@@ -5144,9 +4796,9 @@ function newInterval(floori, offseti, count, field) {
|
|
|
5144
4796
|
|
|
5145
4797
|
if (count) {
|
|
5146
4798
|
interval.count = function(start, end) {
|
|
5147
|
-
t0
|
|
5148
|
-
floori(t0
|
|
5149
|
-
return Math.floor(count(t0
|
|
4799
|
+
t0.setTime(+start), t1.setTime(+end);
|
|
4800
|
+
floori(t0), floori(t1);
|
|
4801
|
+
return Math.floor(count(t0, t1));
|
|
5150
4802
|
};
|
|
5151
4803
|
|
|
5152
4804
|
interval.every = function(step) {
|
|
@@ -7372,7 +7024,7 @@ function multiSort(data, sortBy) {
|
|
|
7372
7024
|
var lVal = l[sortBy[i].idx];
|
|
7373
7025
|
var rVal = r[sortBy[i].idx];
|
|
7374
7026
|
if (lVal !== rVal) {
|
|
7375
|
-
return sortBy[i].reverse ? d3Descending(lVal, rVal) :
|
|
7027
|
+
return sortBy[i].reverse ? d3Descending(lVal, rVal) : d3Ascending(lVal, rVal);
|
|
7376
7028
|
}
|
|
7377
7029
|
}
|
|
7378
7030
|
return 0;
|
|
@@ -9341,730 +8993,168 @@ var CanvasWidget = /** @class */ (function (_super) {
|
|
|
9341
8993
|
}(HTMLWidget));
|
|
9342
8994
|
CanvasWidget.prototype._class += " common_CanvasWidget";
|
|
9343
8995
|
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
8996
|
+
var _version = "1.14.2-dev";
|
|
8997
|
+
function version() {
|
|
8998
|
+
return _version;
|
|
9347
8999
|
}
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9000
|
+
var ieVersion = (function () {
|
|
9001
|
+
var ua = navigator.userAgent;
|
|
9002
|
+
var tem;
|
|
9003
|
+
var M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
|
|
9004
|
+
if (/trident/i.test(M[1])) {
|
|
9005
|
+
tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
|
|
9006
|
+
return parseFloat(tem[1]);
|
|
9007
|
+
}
|
|
9008
|
+
if (/msie/i.test(M[1])) {
|
|
9009
|
+
return parseFloat(M[2]);
|
|
9010
|
+
}
|
|
9011
|
+
return null;
|
|
9012
|
+
})();
|
|
9013
|
+
var isIE = ieVersion !== null;
|
|
9014
|
+
var svgMarkerGlitch = isIE && ieVersion <= 12;
|
|
9015
|
+
var _scrollBarWidth = null;
|
|
9016
|
+
function getScrollbarWidth() {
|
|
9017
|
+
if (_scrollBarWidth === null) {
|
|
9018
|
+
var outer = document.createElement("div");
|
|
9019
|
+
outer.style.visibility = "hidden";
|
|
9020
|
+
outer.style.width = "100px";
|
|
9021
|
+
// @ts-ignore
|
|
9022
|
+
outer.style.msOverflowStyle = "scrollbar";
|
|
9023
|
+
document.body.appendChild(outer);
|
|
9024
|
+
var widthNoScroll = outer.offsetWidth;
|
|
9025
|
+
outer.style.overflow = "scroll";
|
|
9026
|
+
var inner = document.createElement("div");
|
|
9027
|
+
inner.style.width = "100%";
|
|
9028
|
+
outer.appendChild(inner);
|
|
9029
|
+
var widthWithScroll = inner.offsetWidth;
|
|
9030
|
+
outer.parentNode.removeChild(outer);
|
|
9031
|
+
_scrollBarWidth = widthNoScroll - widthWithScroll;
|
|
9032
|
+
}
|
|
9033
|
+
return _scrollBarWidth;
|
|
9353
9034
|
}
|
|
9035
|
+
// Polyfills ---
|
|
9036
|
+
window.MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver || function (callback) {
|
|
9037
|
+
// Just enough for HTMLOverlay and C3 ---
|
|
9038
|
+
this.callback = callback;
|
|
9039
|
+
this.listeners = [];
|
|
9040
|
+
var MutationListener = function (callback2, domNode, type) {
|
|
9041
|
+
this.callback = callback2;
|
|
9042
|
+
this.domNode = domNode;
|
|
9043
|
+
this.type = type;
|
|
9044
|
+
};
|
|
9045
|
+
MutationListener.prototype = {
|
|
9046
|
+
handleEvent: function (evt) {
|
|
9047
|
+
var mutation = {
|
|
9048
|
+
type: this.type,
|
|
9049
|
+
target: this.domNode,
|
|
9050
|
+
addedNodes: [],
|
|
9051
|
+
removedNodes: [],
|
|
9052
|
+
previousSibling: evt.target.previousSibling,
|
|
9053
|
+
nextSibling: evt.target.nextSibling,
|
|
9054
|
+
attributeName: null,
|
|
9055
|
+
attributeNamespace: null,
|
|
9056
|
+
oldValue: null
|
|
9057
|
+
};
|
|
9058
|
+
this.callback([mutation]);
|
|
9059
|
+
}
|
|
9060
|
+
};
|
|
9061
|
+
this.observe = function (domNode, config) {
|
|
9062
|
+
var listener = null;
|
|
9063
|
+
if (config.attributes) {
|
|
9064
|
+
listener = new MutationListener(this.callback, domNode, "attributes");
|
|
9065
|
+
this.listeners.push(listener);
|
|
9066
|
+
domNode.addEventListener("DOMAttrModified", listener, true);
|
|
9067
|
+
}
|
|
9068
|
+
if (config.characterData) {
|
|
9069
|
+
listener = new MutationListener(this.callback, domNode, "characterData");
|
|
9070
|
+
this.listeners.push(listener);
|
|
9071
|
+
domNode.addEventListener("DOMCharacterDataModified", listener, true);
|
|
9072
|
+
}
|
|
9073
|
+
if (config.childList) {
|
|
9074
|
+
listener = new MutationListener(this.callback, domNode, "childList");
|
|
9075
|
+
this.listeners.push(listener);
|
|
9076
|
+
domNode.addEventListener("DOMNodeInserted", listener, true);
|
|
9077
|
+
domNode.addEventListener("DOMNodeRemoved", listener, true);
|
|
9078
|
+
}
|
|
9079
|
+
};
|
|
9080
|
+
this.disconnect = function () {
|
|
9081
|
+
this.listeners.forEach(function (item) {
|
|
9082
|
+
switch (item.type) {
|
|
9083
|
+
case "attributes":
|
|
9084
|
+
item.domNode.removeEventListener("DOMAttrModified", item, true);
|
|
9085
|
+
break;
|
|
9086
|
+
case "characterData":
|
|
9087
|
+
item.domNode.removeEventListener("DOMCharacterDataModified", item, true);
|
|
9088
|
+
break;
|
|
9089
|
+
case "childList":
|
|
9090
|
+
item.domNode.removeEventListener("DOMNodeRemoved", item, true);
|
|
9091
|
+
item.domNode.removeEventListener("DOMNodeInserted", item, true);
|
|
9092
|
+
break;
|
|
9093
|
+
}
|
|
9094
|
+
});
|
|
9095
|
+
this.listeners = [];
|
|
9096
|
+
};
|
|
9097
|
+
};
|
|
9098
|
+
Math.sign = Math.sign || function (x) {
|
|
9099
|
+
x = +x; // convert to a number
|
|
9100
|
+
if (x === 0 || isNaN(x)) {
|
|
9101
|
+
return x;
|
|
9102
|
+
}
|
|
9103
|
+
return x > 0 ? 1 : -1;
|
|
9104
|
+
};
|
|
9354
9105
|
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9106
|
+
var Platform = /*#__PURE__*/Object.freeze({
|
|
9107
|
+
__proto__: null,
|
|
9108
|
+
version: version,
|
|
9109
|
+
ieVersion: ieVersion,
|
|
9110
|
+
isIE: isIE,
|
|
9111
|
+
svgMarkerGlitch: svgMarkerGlitch,
|
|
9112
|
+
getScrollbarWidth: getScrollbarWidth
|
|
9113
|
+
});
|
|
9359
9114
|
|
|
9360
|
-
var
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9115
|
+
var Transition = /** @class */ (function () {
|
|
9116
|
+
function Transition(widget) {
|
|
9117
|
+
this._widget = widget;
|
|
9118
|
+
this._duration = 250;
|
|
9119
|
+
this._delay = 0;
|
|
9120
|
+
this._ease = cubicInOut;
|
|
9121
|
+
}
|
|
9122
|
+
Transition.prototype.duration = function (_) {
|
|
9123
|
+
if (!arguments.length)
|
|
9124
|
+
return this._duration;
|
|
9125
|
+
this._duration = _;
|
|
9126
|
+
return this._widget;
|
|
9127
|
+
};
|
|
9128
|
+
Transition.prototype.delay = function (_) {
|
|
9129
|
+
if (!arguments.length)
|
|
9130
|
+
return this._delay;
|
|
9131
|
+
this._delay = _;
|
|
9132
|
+
return this._widget;
|
|
9133
|
+
};
|
|
9134
|
+
Transition.prototype.ease = function (_) {
|
|
9135
|
+
if (!arguments.length)
|
|
9136
|
+
return this._ease;
|
|
9137
|
+
this._ease = _;
|
|
9138
|
+
return this._widget;
|
|
9139
|
+
};
|
|
9140
|
+
Transition.prototype.apply = function (selection) {
|
|
9141
|
+
if (this._duration || this._delay) {
|
|
9142
|
+
return selection.transition()
|
|
9143
|
+
.duration(this._duration)
|
|
9144
|
+
.delay(this._delay)
|
|
9145
|
+
.ease(this._ease);
|
|
9146
|
+
}
|
|
9147
|
+
return selection;
|
|
9148
|
+
};
|
|
9149
|
+
return Transition;
|
|
9150
|
+
}());
|
|
9370
9151
|
|
|
9371
|
-
var
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
beige: 0xf5f5dc,
|
|
9378
|
-
bisque: 0xffe4c4,
|
|
9379
|
-
black: 0x000000,
|
|
9380
|
-
blanchedalmond: 0xffebcd,
|
|
9381
|
-
blue: 0x0000ff,
|
|
9382
|
-
blueviolet: 0x8a2be2,
|
|
9383
|
-
brown: 0xa52a2a,
|
|
9384
|
-
burlywood: 0xdeb887,
|
|
9385
|
-
cadetblue: 0x5f9ea0,
|
|
9386
|
-
chartreuse: 0x7fff00,
|
|
9387
|
-
chocolate: 0xd2691e,
|
|
9388
|
-
coral: 0xff7f50,
|
|
9389
|
-
cornflowerblue: 0x6495ed,
|
|
9390
|
-
cornsilk: 0xfff8dc,
|
|
9391
|
-
crimson: 0xdc143c,
|
|
9392
|
-
cyan: 0x00ffff,
|
|
9393
|
-
darkblue: 0x00008b,
|
|
9394
|
-
darkcyan: 0x008b8b,
|
|
9395
|
-
darkgoldenrod: 0xb8860b,
|
|
9396
|
-
darkgray: 0xa9a9a9,
|
|
9397
|
-
darkgreen: 0x006400,
|
|
9398
|
-
darkgrey: 0xa9a9a9,
|
|
9399
|
-
darkkhaki: 0xbdb76b,
|
|
9400
|
-
darkmagenta: 0x8b008b,
|
|
9401
|
-
darkolivegreen: 0x556b2f,
|
|
9402
|
-
darkorange: 0xff8c00,
|
|
9403
|
-
darkorchid: 0x9932cc,
|
|
9404
|
-
darkred: 0x8b0000,
|
|
9405
|
-
darksalmon: 0xe9967a,
|
|
9406
|
-
darkseagreen: 0x8fbc8f,
|
|
9407
|
-
darkslateblue: 0x483d8b,
|
|
9408
|
-
darkslategray: 0x2f4f4f,
|
|
9409
|
-
darkslategrey: 0x2f4f4f,
|
|
9410
|
-
darkturquoise: 0x00ced1,
|
|
9411
|
-
darkviolet: 0x9400d3,
|
|
9412
|
-
deeppink: 0xff1493,
|
|
9413
|
-
deepskyblue: 0x00bfff,
|
|
9414
|
-
dimgray: 0x696969,
|
|
9415
|
-
dimgrey: 0x696969,
|
|
9416
|
-
dodgerblue: 0x1e90ff,
|
|
9417
|
-
firebrick: 0xb22222,
|
|
9418
|
-
floralwhite: 0xfffaf0,
|
|
9419
|
-
forestgreen: 0x228b22,
|
|
9420
|
-
fuchsia: 0xff00ff,
|
|
9421
|
-
gainsboro: 0xdcdcdc,
|
|
9422
|
-
ghostwhite: 0xf8f8ff,
|
|
9423
|
-
gold: 0xffd700,
|
|
9424
|
-
goldenrod: 0xdaa520,
|
|
9425
|
-
gray: 0x808080,
|
|
9426
|
-
green: 0x008000,
|
|
9427
|
-
greenyellow: 0xadff2f,
|
|
9428
|
-
grey: 0x808080,
|
|
9429
|
-
honeydew: 0xf0fff0,
|
|
9430
|
-
hotpink: 0xff69b4,
|
|
9431
|
-
indianred: 0xcd5c5c,
|
|
9432
|
-
indigo: 0x4b0082,
|
|
9433
|
-
ivory: 0xfffff0,
|
|
9434
|
-
khaki: 0xf0e68c,
|
|
9435
|
-
lavender: 0xe6e6fa,
|
|
9436
|
-
lavenderblush: 0xfff0f5,
|
|
9437
|
-
lawngreen: 0x7cfc00,
|
|
9438
|
-
lemonchiffon: 0xfffacd,
|
|
9439
|
-
lightblue: 0xadd8e6,
|
|
9440
|
-
lightcoral: 0xf08080,
|
|
9441
|
-
lightcyan: 0xe0ffff,
|
|
9442
|
-
lightgoldenrodyellow: 0xfafad2,
|
|
9443
|
-
lightgray: 0xd3d3d3,
|
|
9444
|
-
lightgreen: 0x90ee90,
|
|
9445
|
-
lightgrey: 0xd3d3d3,
|
|
9446
|
-
lightpink: 0xffb6c1,
|
|
9447
|
-
lightsalmon: 0xffa07a,
|
|
9448
|
-
lightseagreen: 0x20b2aa,
|
|
9449
|
-
lightskyblue: 0x87cefa,
|
|
9450
|
-
lightslategray: 0x778899,
|
|
9451
|
-
lightslategrey: 0x778899,
|
|
9452
|
-
lightsteelblue: 0xb0c4de,
|
|
9453
|
-
lightyellow: 0xffffe0,
|
|
9454
|
-
lime: 0x00ff00,
|
|
9455
|
-
limegreen: 0x32cd32,
|
|
9456
|
-
linen: 0xfaf0e6,
|
|
9457
|
-
magenta: 0xff00ff,
|
|
9458
|
-
maroon: 0x800000,
|
|
9459
|
-
mediumaquamarine: 0x66cdaa,
|
|
9460
|
-
mediumblue: 0x0000cd,
|
|
9461
|
-
mediumorchid: 0xba55d3,
|
|
9462
|
-
mediumpurple: 0x9370db,
|
|
9463
|
-
mediumseagreen: 0x3cb371,
|
|
9464
|
-
mediumslateblue: 0x7b68ee,
|
|
9465
|
-
mediumspringgreen: 0x00fa9a,
|
|
9466
|
-
mediumturquoise: 0x48d1cc,
|
|
9467
|
-
mediumvioletred: 0xc71585,
|
|
9468
|
-
midnightblue: 0x191970,
|
|
9469
|
-
mintcream: 0xf5fffa,
|
|
9470
|
-
mistyrose: 0xffe4e1,
|
|
9471
|
-
moccasin: 0xffe4b5,
|
|
9472
|
-
navajowhite: 0xffdead,
|
|
9473
|
-
navy: 0x000080,
|
|
9474
|
-
oldlace: 0xfdf5e6,
|
|
9475
|
-
olive: 0x808000,
|
|
9476
|
-
olivedrab: 0x6b8e23,
|
|
9477
|
-
orange: 0xffa500,
|
|
9478
|
-
orangered: 0xff4500,
|
|
9479
|
-
orchid: 0xda70d6,
|
|
9480
|
-
palegoldenrod: 0xeee8aa,
|
|
9481
|
-
palegreen: 0x98fb98,
|
|
9482
|
-
paleturquoise: 0xafeeee,
|
|
9483
|
-
palevioletred: 0xdb7093,
|
|
9484
|
-
papayawhip: 0xffefd5,
|
|
9485
|
-
peachpuff: 0xffdab9,
|
|
9486
|
-
peru: 0xcd853f,
|
|
9487
|
-
pink: 0xffc0cb,
|
|
9488
|
-
plum: 0xdda0dd,
|
|
9489
|
-
powderblue: 0xb0e0e6,
|
|
9490
|
-
purple: 0x800080,
|
|
9491
|
-
rebeccapurple: 0x663399,
|
|
9492
|
-
red: 0xff0000,
|
|
9493
|
-
rosybrown: 0xbc8f8f,
|
|
9494
|
-
royalblue: 0x4169e1,
|
|
9495
|
-
saddlebrown: 0x8b4513,
|
|
9496
|
-
salmon: 0xfa8072,
|
|
9497
|
-
sandybrown: 0xf4a460,
|
|
9498
|
-
seagreen: 0x2e8b57,
|
|
9499
|
-
seashell: 0xfff5ee,
|
|
9500
|
-
sienna: 0xa0522d,
|
|
9501
|
-
silver: 0xc0c0c0,
|
|
9502
|
-
skyblue: 0x87ceeb,
|
|
9503
|
-
slateblue: 0x6a5acd,
|
|
9504
|
-
slategray: 0x708090,
|
|
9505
|
-
slategrey: 0x708090,
|
|
9506
|
-
snow: 0xfffafa,
|
|
9507
|
-
springgreen: 0x00ff7f,
|
|
9508
|
-
steelblue: 0x4682b4,
|
|
9509
|
-
tan: 0xd2b48c,
|
|
9510
|
-
teal: 0x008080,
|
|
9511
|
-
thistle: 0xd8bfd8,
|
|
9512
|
-
tomato: 0xff6347,
|
|
9513
|
-
turquoise: 0x40e0d0,
|
|
9514
|
-
violet: 0xee82ee,
|
|
9515
|
-
wheat: 0xf5deb3,
|
|
9516
|
-
white: 0xffffff,
|
|
9517
|
-
whitesmoke: 0xf5f5f5,
|
|
9518
|
-
yellow: 0xffff00,
|
|
9519
|
-
yellowgreen: 0x9acd32
|
|
9520
|
-
};
|
|
9521
|
-
|
|
9522
|
-
define$1(Color$1, color$1, {
|
|
9523
|
-
copy: function(channels) {
|
|
9524
|
-
return Object.assign(new this.constructor, this, channels);
|
|
9525
|
-
},
|
|
9526
|
-
displayable: function() {
|
|
9527
|
-
return this.rgb().displayable();
|
|
9528
|
-
},
|
|
9529
|
-
hex: color_formatHex$1, // Deprecated! Use color.formatHex.
|
|
9530
|
-
formatHex: color_formatHex$1,
|
|
9531
|
-
formatHsl: color_formatHsl$1,
|
|
9532
|
-
formatRgb: color_formatRgb$1,
|
|
9533
|
-
toString: color_formatRgb$1
|
|
9534
|
-
});
|
|
9535
|
-
|
|
9536
|
-
function color_formatHex$1() {
|
|
9537
|
-
return this.rgb().formatHex();
|
|
9538
|
-
}
|
|
9539
|
-
|
|
9540
|
-
function color_formatHsl$1() {
|
|
9541
|
-
return hslConvert$1(this).formatHsl();
|
|
9542
|
-
}
|
|
9543
|
-
|
|
9544
|
-
function color_formatRgb$1() {
|
|
9545
|
-
return this.rgb().formatRgb();
|
|
9546
|
-
}
|
|
9547
|
-
|
|
9548
|
-
function color$1(format) {
|
|
9549
|
-
var m, l;
|
|
9550
|
-
format = (format + "").trim().toLowerCase();
|
|
9551
|
-
return (m = reHex$1.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn$1(m) // #ff0000
|
|
9552
|
-
: l === 3 ? new Rgb$1((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
|
|
9553
|
-
: l === 8 ? rgba$1(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
|
|
9554
|
-
: l === 4 ? rgba$1((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
|
|
9555
|
-
: null) // invalid hex
|
|
9556
|
-
: (m = reRgbInteger$1.exec(format)) ? new Rgb$1(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
|
|
9557
|
-
: (m = reRgbPercent$1.exec(format)) ? new Rgb$1(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
|
|
9558
|
-
: (m = reRgbaInteger$1.exec(format)) ? rgba$1(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
|
|
9559
|
-
: (m = reRgbaPercent$1.exec(format)) ? rgba$1(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
|
|
9560
|
-
: (m = reHslPercent$1.exec(format)) ? hsla$1(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
9561
|
-
: (m = reHslaPercent$1.exec(format)) ? hsla$1(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
9562
|
-
: named$1.hasOwnProperty(format) ? rgbn$1(named$1[format]) // eslint-disable-line no-prototype-builtins
|
|
9563
|
-
: format === "transparent" ? new Rgb$1(NaN, NaN, NaN, 0)
|
|
9564
|
-
: null;
|
|
9565
|
-
}
|
|
9566
|
-
|
|
9567
|
-
function rgbn$1(n) {
|
|
9568
|
-
return new Rgb$1(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
9569
|
-
}
|
|
9570
|
-
|
|
9571
|
-
function rgba$1(r, g, b, a) {
|
|
9572
|
-
if (a <= 0) r = g = b = NaN;
|
|
9573
|
-
return new Rgb$1(r, g, b, a);
|
|
9574
|
-
}
|
|
9575
|
-
|
|
9576
|
-
function rgbConvert$1(o) {
|
|
9577
|
-
if (!(o instanceof Color$1)) o = color$1(o);
|
|
9578
|
-
if (!o) return new Rgb$1;
|
|
9579
|
-
o = o.rgb();
|
|
9580
|
-
return new Rgb$1(o.r, o.g, o.b, o.opacity);
|
|
9581
|
-
}
|
|
9582
|
-
|
|
9583
|
-
function rgb$1(r, g, b, opacity) {
|
|
9584
|
-
return arguments.length === 1 ? rgbConvert$1(r) : new Rgb$1(r, g, b, opacity == null ? 1 : opacity);
|
|
9585
|
-
}
|
|
9586
|
-
|
|
9587
|
-
function Rgb$1(r, g, b, opacity) {
|
|
9588
|
-
this.r = +r;
|
|
9589
|
-
this.g = +g;
|
|
9590
|
-
this.b = +b;
|
|
9591
|
-
this.opacity = +opacity;
|
|
9592
|
-
}
|
|
9593
|
-
|
|
9594
|
-
define$1(Rgb$1, rgb$1, extend$1(Color$1, {
|
|
9595
|
-
brighter: function(k) {
|
|
9596
|
-
k = k == null ? brighter$1 : Math.pow(brighter$1, k);
|
|
9597
|
-
return new Rgb$1(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
9598
|
-
},
|
|
9599
|
-
darker: function(k) {
|
|
9600
|
-
k = k == null ? darker$1 : Math.pow(darker$1, k);
|
|
9601
|
-
return new Rgb$1(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
9602
|
-
},
|
|
9603
|
-
rgb: function() {
|
|
9604
|
-
return this;
|
|
9605
|
-
},
|
|
9606
|
-
displayable: function() {
|
|
9607
|
-
return (-0.5 <= this.r && this.r < 255.5)
|
|
9608
|
-
&& (-0.5 <= this.g && this.g < 255.5)
|
|
9609
|
-
&& (-0.5 <= this.b && this.b < 255.5)
|
|
9610
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
9611
|
-
},
|
|
9612
|
-
hex: rgb_formatHex$1, // Deprecated! Use color.formatHex.
|
|
9613
|
-
formatHex: rgb_formatHex$1,
|
|
9614
|
-
formatRgb: rgb_formatRgb$1,
|
|
9615
|
-
toString: rgb_formatRgb$1
|
|
9616
|
-
}));
|
|
9617
|
-
|
|
9618
|
-
function rgb_formatHex$1() {
|
|
9619
|
-
return "#" + hex$1(this.r) + hex$1(this.g) + hex$1(this.b);
|
|
9620
|
-
}
|
|
9621
|
-
|
|
9622
|
-
function rgb_formatRgb$1() {
|
|
9623
|
-
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
9624
|
-
return (a === 1 ? "rgb(" : "rgba(")
|
|
9625
|
-
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
|
9626
|
-
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
|
9627
|
-
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
|
9628
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
9629
|
-
}
|
|
9630
|
-
|
|
9631
|
-
function hex$1(value) {
|
|
9632
|
-
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
9633
|
-
return (value < 16 ? "0" : "") + value.toString(16);
|
|
9634
|
-
}
|
|
9635
|
-
|
|
9636
|
-
function hsla$1(h, s, l, a) {
|
|
9637
|
-
if (a <= 0) h = s = l = NaN;
|
|
9638
|
-
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
9639
|
-
else if (s <= 0) h = NaN;
|
|
9640
|
-
return new Hsl$1(h, s, l, a);
|
|
9641
|
-
}
|
|
9642
|
-
|
|
9643
|
-
function hslConvert$1(o) {
|
|
9644
|
-
if (o instanceof Hsl$1) return new Hsl$1(o.h, o.s, o.l, o.opacity);
|
|
9645
|
-
if (!(o instanceof Color$1)) o = color$1(o);
|
|
9646
|
-
if (!o) return new Hsl$1;
|
|
9647
|
-
if (o instanceof Hsl$1) return o;
|
|
9648
|
-
o = o.rgb();
|
|
9649
|
-
var r = o.r / 255,
|
|
9650
|
-
g = o.g / 255,
|
|
9651
|
-
b = o.b / 255,
|
|
9652
|
-
min = Math.min(r, g, b),
|
|
9653
|
-
max = Math.max(r, g, b),
|
|
9654
|
-
h = NaN,
|
|
9655
|
-
s = max - min,
|
|
9656
|
-
l = (max + min) / 2;
|
|
9657
|
-
if (s) {
|
|
9658
|
-
if (r === max) h = (g - b) / s + (g < b) * 6;
|
|
9659
|
-
else if (g === max) h = (b - r) / s + 2;
|
|
9660
|
-
else h = (r - g) / s + 4;
|
|
9661
|
-
s /= l < 0.5 ? max + min : 2 - max - min;
|
|
9662
|
-
h *= 60;
|
|
9663
|
-
} else {
|
|
9664
|
-
s = l > 0 && l < 1 ? 0 : h;
|
|
9665
|
-
}
|
|
9666
|
-
return new Hsl$1(h, s, l, o.opacity);
|
|
9667
|
-
}
|
|
9668
|
-
|
|
9669
|
-
function hsl$1(h, s, l, opacity) {
|
|
9670
|
-
return arguments.length === 1 ? hslConvert$1(h) : new Hsl$1(h, s, l, opacity == null ? 1 : opacity);
|
|
9671
|
-
}
|
|
9672
|
-
|
|
9673
|
-
function Hsl$1(h, s, l, opacity) {
|
|
9674
|
-
this.h = +h;
|
|
9675
|
-
this.s = +s;
|
|
9676
|
-
this.l = +l;
|
|
9677
|
-
this.opacity = +opacity;
|
|
9678
|
-
}
|
|
9679
|
-
|
|
9680
|
-
define$1(Hsl$1, hsl$1, extend$1(Color$1, {
|
|
9681
|
-
brighter: function(k) {
|
|
9682
|
-
k = k == null ? brighter$1 : Math.pow(brighter$1, k);
|
|
9683
|
-
return new Hsl$1(this.h, this.s, this.l * k, this.opacity);
|
|
9684
|
-
},
|
|
9685
|
-
darker: function(k) {
|
|
9686
|
-
k = k == null ? darker$1 : Math.pow(darker$1, k);
|
|
9687
|
-
return new Hsl$1(this.h, this.s, this.l * k, this.opacity);
|
|
9688
|
-
},
|
|
9689
|
-
rgb: function() {
|
|
9690
|
-
var h = this.h % 360 + (this.h < 0) * 360,
|
|
9691
|
-
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
9692
|
-
l = this.l,
|
|
9693
|
-
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
9694
|
-
m1 = 2 * l - m2;
|
|
9695
|
-
return new Rgb$1(
|
|
9696
|
-
hsl2rgb$1(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
9697
|
-
hsl2rgb$1(h, m1, m2),
|
|
9698
|
-
hsl2rgb$1(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
9699
|
-
this.opacity
|
|
9700
|
-
);
|
|
9701
|
-
},
|
|
9702
|
-
displayable: function() {
|
|
9703
|
-
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
|
9704
|
-
&& (0 <= this.l && this.l <= 1)
|
|
9705
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
9706
|
-
},
|
|
9707
|
-
formatHsl: function() {
|
|
9708
|
-
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
9709
|
-
return (a === 1 ? "hsl(" : "hsla(")
|
|
9710
|
-
+ (this.h || 0) + ", "
|
|
9711
|
-
+ (this.s || 0) * 100 + "%, "
|
|
9712
|
-
+ (this.l || 0) * 100 + "%"
|
|
9713
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
9714
|
-
}
|
|
9715
|
-
}));
|
|
9716
|
-
|
|
9717
|
-
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
9718
|
-
function hsl2rgb$1(h, m1, m2) {
|
|
9719
|
-
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
|
9720
|
-
: h < 180 ? m2
|
|
9721
|
-
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
9722
|
-
: m1) * 255;
|
|
9723
|
-
}
|
|
9724
|
-
|
|
9725
|
-
var deg2rad$1 = Math.PI / 180;
|
|
9726
|
-
var rad2deg$1 = 180 / Math.PI;
|
|
9727
|
-
|
|
9728
|
-
// https://observablehq.com/@mbostock/lab-and-rgb
|
|
9729
|
-
var K = 18,
|
|
9730
|
-
Xn = 0.96422,
|
|
9731
|
-
Yn = 1,
|
|
9732
|
-
Zn = 0.82521,
|
|
9733
|
-
t0 = 4 / 29,
|
|
9734
|
-
t1 = 6 / 29,
|
|
9735
|
-
t2 = 3 * t1 * t1,
|
|
9736
|
-
t3 = t1 * t1 * t1;
|
|
9737
|
-
|
|
9738
|
-
function labConvert(o) {
|
|
9739
|
-
if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
|
|
9740
|
-
if (o instanceof Hcl) return hcl2lab(o);
|
|
9741
|
-
if (!(o instanceof Rgb$1)) o = rgbConvert$1(o);
|
|
9742
|
-
var r = rgb2lrgb(o.r),
|
|
9743
|
-
g = rgb2lrgb(o.g),
|
|
9744
|
-
b = rgb2lrgb(o.b),
|
|
9745
|
-
y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
|
|
9746
|
-
if (r === g && g === b) x = z = y; else {
|
|
9747
|
-
x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
|
|
9748
|
-
z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
|
|
9749
|
-
}
|
|
9750
|
-
return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
|
|
9751
|
-
}
|
|
9752
|
-
|
|
9753
|
-
function gray(l, opacity) {
|
|
9754
|
-
return new Lab(l, 0, 0, opacity == null ? 1 : opacity);
|
|
9755
|
-
}
|
|
9756
|
-
|
|
9757
|
-
function lab(l, a, b, opacity) {
|
|
9758
|
-
return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
|
|
9759
|
-
}
|
|
9760
|
-
|
|
9761
|
-
function Lab(l, a, b, opacity) {
|
|
9762
|
-
this.l = +l;
|
|
9763
|
-
this.a = +a;
|
|
9764
|
-
this.b = +b;
|
|
9765
|
-
this.opacity = +opacity;
|
|
9766
|
-
}
|
|
9767
|
-
|
|
9768
|
-
define$1(Lab, lab, extend$1(Color$1, {
|
|
9769
|
-
brighter: function(k) {
|
|
9770
|
-
return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
9771
|
-
},
|
|
9772
|
-
darker: function(k) {
|
|
9773
|
-
return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
9774
|
-
},
|
|
9775
|
-
rgb: function() {
|
|
9776
|
-
var y = (this.l + 16) / 116,
|
|
9777
|
-
x = isNaN(this.a) ? y : y + this.a / 500,
|
|
9778
|
-
z = isNaN(this.b) ? y : y - this.b / 200;
|
|
9779
|
-
x = Xn * lab2xyz(x);
|
|
9780
|
-
y = Yn * lab2xyz(y);
|
|
9781
|
-
z = Zn * lab2xyz(z);
|
|
9782
|
-
return new Rgb$1(
|
|
9783
|
-
lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
|
|
9784
|
-
lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
|
|
9785
|
-
lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
|
|
9786
|
-
this.opacity
|
|
9787
|
-
);
|
|
9788
|
-
}
|
|
9789
|
-
}));
|
|
9790
|
-
|
|
9791
|
-
function xyz2lab(t) {
|
|
9792
|
-
return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
|
|
9793
|
-
}
|
|
9794
|
-
|
|
9795
|
-
function lab2xyz(t) {
|
|
9796
|
-
return t > t1 ? t * t * t : t2 * (t - t0);
|
|
9797
|
-
}
|
|
9798
|
-
|
|
9799
|
-
function lrgb2rgb(x) {
|
|
9800
|
-
return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
|
|
9801
|
-
}
|
|
9802
|
-
|
|
9803
|
-
function rgb2lrgb(x) {
|
|
9804
|
-
return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
|
|
9805
|
-
}
|
|
9806
|
-
|
|
9807
|
-
function hclConvert(o) {
|
|
9808
|
-
if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
|
|
9809
|
-
if (!(o instanceof Lab)) o = labConvert(o);
|
|
9810
|
-
if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
|
|
9811
|
-
var h = Math.atan2(o.b, o.a) * rad2deg$1;
|
|
9812
|
-
return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
|
|
9813
|
-
}
|
|
9814
|
-
|
|
9815
|
-
function lch(l, c, h, opacity) {
|
|
9816
|
-
return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
|
|
9817
|
-
}
|
|
9818
|
-
|
|
9819
|
-
function hcl(h, c, l, opacity) {
|
|
9820
|
-
return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
|
|
9821
|
-
}
|
|
9822
|
-
|
|
9823
|
-
function Hcl(h, c, l, opacity) {
|
|
9824
|
-
this.h = +h;
|
|
9825
|
-
this.c = +c;
|
|
9826
|
-
this.l = +l;
|
|
9827
|
-
this.opacity = +opacity;
|
|
9828
|
-
}
|
|
9829
|
-
|
|
9830
|
-
function hcl2lab(o) {
|
|
9831
|
-
if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
|
|
9832
|
-
var h = o.h * deg2rad$1;
|
|
9833
|
-
return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
|
|
9834
|
-
}
|
|
9835
|
-
|
|
9836
|
-
define$1(Hcl, hcl, extend$1(Color$1, {
|
|
9837
|
-
brighter: function(k) {
|
|
9838
|
-
return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
|
|
9839
|
-
},
|
|
9840
|
-
darker: function(k) {
|
|
9841
|
-
return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
|
|
9842
|
-
},
|
|
9843
|
-
rgb: function() {
|
|
9844
|
-
return hcl2lab(this).rgb();
|
|
9845
|
-
}
|
|
9846
|
-
}));
|
|
9847
|
-
|
|
9848
|
-
var A$1 = -0.14861,
|
|
9849
|
-
B$1 = +1.78277,
|
|
9850
|
-
C$1 = -0.29227,
|
|
9851
|
-
D$1 = -0.90649,
|
|
9852
|
-
E$1 = +1.97294,
|
|
9853
|
-
ED$1 = E$1 * D$1,
|
|
9854
|
-
EB$1 = E$1 * B$1,
|
|
9855
|
-
BC_DA$1 = B$1 * C$1 - D$1 * A$1;
|
|
9856
|
-
|
|
9857
|
-
function cubehelixConvert$1(o) {
|
|
9858
|
-
if (o instanceof Cubehelix$1) return new Cubehelix$1(o.h, o.s, o.l, o.opacity);
|
|
9859
|
-
if (!(o instanceof Rgb$1)) o = rgbConvert$1(o);
|
|
9860
|
-
var r = o.r / 255,
|
|
9861
|
-
g = o.g / 255,
|
|
9862
|
-
b = o.b / 255,
|
|
9863
|
-
l = (BC_DA$1 * b + ED$1 * r - EB$1 * g) / (BC_DA$1 + ED$1 - EB$1),
|
|
9864
|
-
bl = b - l,
|
|
9865
|
-
k = (E$1 * (g - l) - C$1 * bl) / D$1,
|
|
9866
|
-
s = Math.sqrt(k * k + bl * bl) / (E$1 * l * (1 - l)), // NaN if l=0 or l=1
|
|
9867
|
-
h = s ? Math.atan2(k, bl) * rad2deg$1 - 120 : NaN;
|
|
9868
|
-
return new Cubehelix$1(h < 0 ? h + 360 : h, s, l, o.opacity);
|
|
9869
|
-
}
|
|
9870
|
-
|
|
9871
|
-
function cubehelix$2(h, s, l, opacity) {
|
|
9872
|
-
return arguments.length === 1 ? cubehelixConvert$1(h) : new Cubehelix$1(h, s, l, opacity == null ? 1 : opacity);
|
|
9873
|
-
}
|
|
9874
|
-
|
|
9875
|
-
function Cubehelix$1(h, s, l, opacity) {
|
|
9876
|
-
this.h = +h;
|
|
9877
|
-
this.s = +s;
|
|
9878
|
-
this.l = +l;
|
|
9879
|
-
this.opacity = +opacity;
|
|
9880
|
-
}
|
|
9881
|
-
|
|
9882
|
-
define$1(Cubehelix$1, cubehelix$2, extend$1(Color$1, {
|
|
9883
|
-
brighter: function(k) {
|
|
9884
|
-
k = k == null ? brighter$1 : Math.pow(brighter$1, k);
|
|
9885
|
-
return new Cubehelix$1(this.h, this.s, this.l * k, this.opacity);
|
|
9886
|
-
},
|
|
9887
|
-
darker: function(k) {
|
|
9888
|
-
k = k == null ? darker$1 : Math.pow(darker$1, k);
|
|
9889
|
-
return new Cubehelix$1(this.h, this.s, this.l * k, this.opacity);
|
|
9890
|
-
},
|
|
9891
|
-
rgb: function() {
|
|
9892
|
-
var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad$1,
|
|
9893
|
-
l = +this.l,
|
|
9894
|
-
a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
|
|
9895
|
-
cosh = Math.cos(h),
|
|
9896
|
-
sinh = Math.sin(h);
|
|
9897
|
-
return new Rgb$1(
|
|
9898
|
-
255 * (l + a * (A$1 * cosh + B$1 * sinh)),
|
|
9899
|
-
255 * (l + a * (C$1 * cosh + D$1 * sinh)),
|
|
9900
|
-
255 * (l + a * (E$1 * cosh)),
|
|
9901
|
-
this.opacity
|
|
9902
|
-
);
|
|
9903
|
-
}
|
|
9904
|
-
}));
|
|
9905
|
-
|
|
9906
|
-
var _version = "1.14.2-dev";
|
|
9907
|
-
function version() {
|
|
9908
|
-
return _version;
|
|
9909
|
-
}
|
|
9910
|
-
var ieVersion = (function () {
|
|
9911
|
-
var ua = navigator.userAgent;
|
|
9912
|
-
var tem;
|
|
9913
|
-
var M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
|
|
9914
|
-
if (/trident/i.test(M[1])) {
|
|
9915
|
-
tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
|
|
9916
|
-
return parseFloat(tem[1]);
|
|
9917
|
-
}
|
|
9918
|
-
if (/msie/i.test(M[1])) {
|
|
9919
|
-
return parseFloat(M[2]);
|
|
9920
|
-
}
|
|
9921
|
-
return null;
|
|
9922
|
-
})();
|
|
9923
|
-
var isIE = ieVersion !== null;
|
|
9924
|
-
var svgMarkerGlitch = isIE && ieVersion <= 12;
|
|
9925
|
-
var _scrollBarWidth = null;
|
|
9926
|
-
function getScrollbarWidth() {
|
|
9927
|
-
if (_scrollBarWidth === null) {
|
|
9928
|
-
var outer = document.createElement("div");
|
|
9929
|
-
outer.style.visibility = "hidden";
|
|
9930
|
-
outer.style.width = "100px";
|
|
9931
|
-
// @ts-ignore
|
|
9932
|
-
outer.style.msOverflowStyle = "scrollbar";
|
|
9933
|
-
document.body.appendChild(outer);
|
|
9934
|
-
var widthNoScroll = outer.offsetWidth;
|
|
9935
|
-
outer.style.overflow = "scroll";
|
|
9936
|
-
var inner = document.createElement("div");
|
|
9937
|
-
inner.style.width = "100%";
|
|
9938
|
-
outer.appendChild(inner);
|
|
9939
|
-
var widthWithScroll = inner.offsetWidth;
|
|
9940
|
-
outer.parentNode.removeChild(outer);
|
|
9941
|
-
_scrollBarWidth = widthNoScroll - widthWithScroll;
|
|
9942
|
-
}
|
|
9943
|
-
return _scrollBarWidth;
|
|
9944
|
-
}
|
|
9945
|
-
// Polyfills ---
|
|
9946
|
-
window.MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver || function (callback) {
|
|
9947
|
-
// Just enough for HTMLOverlay and C3 ---
|
|
9948
|
-
this.callback = callback;
|
|
9949
|
-
this.listeners = [];
|
|
9950
|
-
var MutationListener = function (callback2, domNode, type) {
|
|
9951
|
-
this.callback = callback2;
|
|
9952
|
-
this.domNode = domNode;
|
|
9953
|
-
this.type = type;
|
|
9954
|
-
};
|
|
9955
|
-
MutationListener.prototype = {
|
|
9956
|
-
handleEvent: function (evt) {
|
|
9957
|
-
var mutation = {
|
|
9958
|
-
type: this.type,
|
|
9959
|
-
target: this.domNode,
|
|
9960
|
-
addedNodes: [],
|
|
9961
|
-
removedNodes: [],
|
|
9962
|
-
previousSibling: evt.target.previousSibling,
|
|
9963
|
-
nextSibling: evt.target.nextSibling,
|
|
9964
|
-
attributeName: null,
|
|
9965
|
-
attributeNamespace: null,
|
|
9966
|
-
oldValue: null
|
|
9967
|
-
};
|
|
9968
|
-
this.callback([mutation]);
|
|
9969
|
-
}
|
|
9970
|
-
};
|
|
9971
|
-
this.observe = function (domNode, config) {
|
|
9972
|
-
var listener = null;
|
|
9973
|
-
if (config.attributes) {
|
|
9974
|
-
listener = new MutationListener(this.callback, domNode, "attributes");
|
|
9975
|
-
this.listeners.push(listener);
|
|
9976
|
-
domNode.addEventListener("DOMAttrModified", listener, true);
|
|
9977
|
-
}
|
|
9978
|
-
if (config.characterData) {
|
|
9979
|
-
listener = new MutationListener(this.callback, domNode, "characterData");
|
|
9980
|
-
this.listeners.push(listener);
|
|
9981
|
-
domNode.addEventListener("DOMCharacterDataModified", listener, true);
|
|
9982
|
-
}
|
|
9983
|
-
if (config.childList) {
|
|
9984
|
-
listener = new MutationListener(this.callback, domNode, "childList");
|
|
9985
|
-
this.listeners.push(listener);
|
|
9986
|
-
domNode.addEventListener("DOMNodeInserted", listener, true);
|
|
9987
|
-
domNode.addEventListener("DOMNodeRemoved", listener, true);
|
|
9988
|
-
}
|
|
9989
|
-
};
|
|
9990
|
-
this.disconnect = function () {
|
|
9991
|
-
this.listeners.forEach(function (item) {
|
|
9992
|
-
switch (item.type) {
|
|
9993
|
-
case "attributes":
|
|
9994
|
-
item.domNode.removeEventListener("DOMAttrModified", item, true);
|
|
9995
|
-
break;
|
|
9996
|
-
case "characterData":
|
|
9997
|
-
item.domNode.removeEventListener("DOMCharacterDataModified", item, true);
|
|
9998
|
-
break;
|
|
9999
|
-
case "childList":
|
|
10000
|
-
item.domNode.removeEventListener("DOMNodeRemoved", item, true);
|
|
10001
|
-
item.domNode.removeEventListener("DOMNodeInserted", item, true);
|
|
10002
|
-
break;
|
|
10003
|
-
}
|
|
10004
|
-
});
|
|
10005
|
-
this.listeners = [];
|
|
10006
|
-
};
|
|
10007
|
-
};
|
|
10008
|
-
Math.sign = Math.sign || function (x) {
|
|
10009
|
-
x = +x; // convert to a number
|
|
10010
|
-
if (x === 0 || isNaN(x)) {
|
|
10011
|
-
return x;
|
|
10012
|
-
}
|
|
10013
|
-
return x > 0 ? 1 : -1;
|
|
10014
|
-
};
|
|
10015
|
-
|
|
10016
|
-
var Platform = /*#__PURE__*/Object.freeze({
|
|
10017
|
-
__proto__: null,
|
|
10018
|
-
version: version,
|
|
10019
|
-
ieVersion: ieVersion,
|
|
10020
|
-
isIE: isIE,
|
|
10021
|
-
svgMarkerGlitch: svgMarkerGlitch,
|
|
10022
|
-
getScrollbarWidth: getScrollbarWidth
|
|
10023
|
-
});
|
|
10024
|
-
|
|
10025
|
-
var Transition = /** @class */ (function () {
|
|
10026
|
-
function Transition(widget) {
|
|
10027
|
-
this._widget = widget;
|
|
10028
|
-
this._duration = 250;
|
|
10029
|
-
this._delay = 0;
|
|
10030
|
-
this._ease = cubicInOut;
|
|
10031
|
-
}
|
|
10032
|
-
Transition.prototype.duration = function (_) {
|
|
10033
|
-
if (!arguments.length)
|
|
10034
|
-
return this._duration;
|
|
10035
|
-
this._duration = _;
|
|
10036
|
-
return this._widget;
|
|
10037
|
-
};
|
|
10038
|
-
Transition.prototype.delay = function (_) {
|
|
10039
|
-
if (!arguments.length)
|
|
10040
|
-
return this._delay;
|
|
10041
|
-
this._delay = _;
|
|
10042
|
-
return this._widget;
|
|
10043
|
-
};
|
|
10044
|
-
Transition.prototype.ease = function (_) {
|
|
10045
|
-
if (!arguments.length)
|
|
10046
|
-
return this._ease;
|
|
10047
|
-
this._ease = _;
|
|
10048
|
-
return this._widget;
|
|
10049
|
-
};
|
|
10050
|
-
Transition.prototype.apply = function (selection) {
|
|
10051
|
-
if (this._duration || this._delay) {
|
|
10052
|
-
return selection.transition()
|
|
10053
|
-
.duration(this._duration)
|
|
10054
|
-
.delay(this._delay)
|
|
10055
|
-
.ease(this._ease);
|
|
10056
|
-
}
|
|
10057
|
-
return selection;
|
|
10058
|
-
};
|
|
10059
|
-
return Transition;
|
|
10060
|
-
}());
|
|
10061
|
-
|
|
10062
|
-
var lerp = function (point, that, t) {
|
|
10063
|
-
// From https://github.com/thelonious/js-intersections
|
|
10064
|
-
return {
|
|
10065
|
-
x: point.x + (that.x - point.x) * t,
|
|
10066
|
-
y: point.y + (that.y - point.y) * t
|
|
10067
|
-
};
|
|
9152
|
+
var lerp = function (point, that, t) {
|
|
9153
|
+
// From https://github.com/thelonious/js-intersections
|
|
9154
|
+
return {
|
|
9155
|
+
x: point.x + (that.x - point.x) * t,
|
|
9156
|
+
y: point.y + (that.y - point.y) * t
|
|
9157
|
+
};
|
|
10068
9158
|
};
|
|
10069
9159
|
var intersectLineLine = function (a1, a2, b1, b2) {
|
|
10070
9160
|
// From https://github.com/thelonious/js-intersections
|
|
@@ -10161,11 +9251,11 @@ var SVGGlowFilter = /** @class */ (function () {
|
|
|
10161
9251
|
.attr("mode", "normal");
|
|
10162
9252
|
}
|
|
10163
9253
|
SVGGlowFilter.prototype.rgb2ColorMatrix = function (color) {
|
|
10164
|
-
var rgb = rgb
|
|
9254
|
+
var rgb$1 = rgb(color);
|
|
10165
9255
|
return [
|
|
10166
|
-
rgb.r / 255, 0, 0, 0, rgb.r ? 1 : 0,
|
|
10167
|
-
0, rgb.g / 255, 0, 0, rgb.g ? 1 : 0,
|
|
10168
|
-
0, 0, rgb.b / 255, 0, rgb.b ? 1 : 0,
|
|
9256
|
+
rgb$1.r / 255, 0, 0, 0, rgb$1.r ? 1 : 0,
|
|
9257
|
+
0, rgb$1.g / 255, 0, 0, rgb$1.g ? 1 : 0,
|
|
9258
|
+
0, 0, rgb$1.b / 255, 0, rgb$1.b ? 1 : 0,
|
|
10169
9259
|
0, 0, 0, 1, 0
|
|
10170
9260
|
].join(" ");
|
|
10171
9261
|
};
|
|
@@ -11007,1301 +10097,981 @@ var index = {
|
|
|
11007
10097
|
5: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854"],
|
|
11008
10098
|
6: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f"],
|
|
11009
10099
|
7: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494"],
|
|
11010
|
-
8: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3"]
|
|
11011
|
-
}, Set3: {
|
|
11012
|
-
3: ["#8dd3c7", "#ffffb3", "#bebada"],
|
|
11013
|
-
4: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072"],
|
|
11014
|
-
5: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3"],
|
|
11015
|
-
6: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462"],
|
|
11016
|
-
7: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69"],
|
|
11017
|
-
8: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5"],
|
|
11018
|
-
9: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9"],
|
|
11019
|
-
10: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd"],
|
|
11020
|
-
11: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5"],
|
|
11021
|
-
12: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5", "#ffed6f"]
|
|
11022
|
-
}
|
|
11023
|
-
};
|
|
11024
|
-
|
|
11025
|
-
var _colorbrewer = /*#__PURE__*/Object.freeze({
|
|
11026
|
-
__proto__: null,
|
|
11027
|
-
'default': index
|
|
11028
|
-
});
|
|
11029
|
-
|
|
11030
|
-
var array = Array.prototype;
|
|
11031
|
-
|
|
11032
|
-
var map = array.map;
|
|
11033
|
-
var slice = array.slice;
|
|
11034
|
-
|
|
11035
|
-
var implicit = {name: "implicit"};
|
|
11036
|
-
|
|
11037
|
-
function ordinal$1(range) {
|
|
11038
|
-
var index = map$2(),
|
|
11039
|
-
domain = [],
|
|
11040
|
-
unknown = implicit;
|
|
11041
|
-
|
|
11042
|
-
range = range == null ? [] : slice.call(range);
|
|
11043
|
-
|
|
11044
|
-
function scale(d) {
|
|
11045
|
-
var key = d + "", i = index.get(key);
|
|
11046
|
-
if (!i) {
|
|
11047
|
-
if (unknown !== implicit) return unknown;
|
|
11048
|
-
index.set(key, i = domain.push(d));
|
|
11049
|
-
}
|
|
11050
|
-
return range[(i - 1) % range.length];
|
|
11051
|
-
}
|
|
11052
|
-
|
|
11053
|
-
scale.domain = function(_) {
|
|
11054
|
-
if (!arguments.length) return domain.slice();
|
|
11055
|
-
domain = [], index = map$2();
|
|
11056
|
-
var i = -1, n = _.length, d, key;
|
|
11057
|
-
while (++i < n) if (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d));
|
|
11058
|
-
return scale;
|
|
11059
|
-
};
|
|
11060
|
-
|
|
11061
|
-
scale.range = function(_) {
|
|
11062
|
-
return arguments.length ? (range = slice.call(_), scale) : range.slice();
|
|
11063
|
-
};
|
|
11064
|
-
|
|
11065
|
-
scale.unknown = function(_) {
|
|
11066
|
-
return arguments.length ? (unknown = _, scale) : unknown;
|
|
11067
|
-
};
|
|
11068
|
-
|
|
11069
|
-
scale.copy = function() {
|
|
11070
|
-
return ordinal$1()
|
|
11071
|
-
.domain(domain)
|
|
11072
|
-
.range(range)
|
|
11073
|
-
.unknown(unknown);
|
|
11074
|
-
};
|
|
11075
|
-
|
|
11076
|
-
return scale;
|
|
11077
|
-
}
|
|
11078
|
-
|
|
11079
|
-
function band() {
|
|
11080
|
-
var scale = ordinal$1().unknown(undefined),
|
|
11081
|
-
domain = scale.domain,
|
|
11082
|
-
ordinalRange = scale.range,
|
|
11083
|
-
range = [0, 1],
|
|
11084
|
-
step,
|
|
11085
|
-
bandwidth,
|
|
11086
|
-
round = false,
|
|
11087
|
-
paddingInner = 0,
|
|
11088
|
-
paddingOuter = 0,
|
|
11089
|
-
align = 0.5;
|
|
11090
|
-
|
|
11091
|
-
delete scale.unknown;
|
|
11092
|
-
|
|
11093
|
-
function rescale() {
|
|
11094
|
-
var n = domain().length,
|
|
11095
|
-
reverse = range[1] < range[0],
|
|
11096
|
-
start = range[reverse - 0],
|
|
11097
|
-
stop = range[1 - reverse];
|
|
11098
|
-
step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);
|
|
11099
|
-
if (round) step = Math.floor(step);
|
|
11100
|
-
start += (stop - start - step * (n - paddingInner)) * align;
|
|
11101
|
-
bandwidth = step * (1 - paddingInner);
|
|
11102
|
-
if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);
|
|
11103
|
-
var values = sequence(n).map(function(i) { return start + step * i; });
|
|
11104
|
-
return ordinalRange(reverse ? values.reverse() : values);
|
|
11105
|
-
}
|
|
11106
|
-
|
|
11107
|
-
scale.domain = function(_) {
|
|
11108
|
-
return arguments.length ? (domain(_), rescale()) : domain();
|
|
11109
|
-
};
|
|
11110
|
-
|
|
11111
|
-
scale.range = function(_) {
|
|
11112
|
-
return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();
|
|
11113
|
-
};
|
|
11114
|
-
|
|
11115
|
-
scale.rangeRound = function(_) {
|
|
11116
|
-
return range = [+_[0], +_[1]], round = true, rescale();
|
|
11117
|
-
};
|
|
11118
|
-
|
|
11119
|
-
scale.bandwidth = function() {
|
|
11120
|
-
return bandwidth;
|
|
11121
|
-
};
|
|
11122
|
-
|
|
11123
|
-
scale.step = function() {
|
|
11124
|
-
return step;
|
|
11125
|
-
};
|
|
11126
|
-
|
|
11127
|
-
scale.round = function(_) {
|
|
11128
|
-
return arguments.length ? (round = !!_, rescale()) : round;
|
|
11129
|
-
};
|
|
11130
|
-
|
|
11131
|
-
scale.padding = function(_) {
|
|
11132
|
-
return arguments.length ? (paddingInner = paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
|
|
11133
|
-
};
|
|
11134
|
-
|
|
11135
|
-
scale.paddingInner = function(_) {
|
|
11136
|
-
return arguments.length ? (paddingInner = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
|
|
11137
|
-
};
|
|
11138
|
-
|
|
11139
|
-
scale.paddingOuter = function(_) {
|
|
11140
|
-
return arguments.length ? (paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingOuter;
|
|
11141
|
-
};
|
|
11142
|
-
|
|
11143
|
-
scale.align = function(_) {
|
|
11144
|
-
return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;
|
|
11145
|
-
};
|
|
11146
|
-
|
|
11147
|
-
scale.copy = function() {
|
|
11148
|
-
return band()
|
|
11149
|
-
.domain(domain())
|
|
11150
|
-
.range(range)
|
|
11151
|
-
.round(round)
|
|
11152
|
-
.paddingInner(paddingInner)
|
|
11153
|
-
.paddingOuter(paddingOuter)
|
|
11154
|
-
.align(align);
|
|
11155
|
-
};
|
|
11156
|
-
|
|
11157
|
-
return rescale();
|
|
11158
|
-
}
|
|
11159
|
-
|
|
11160
|
-
function pointish(scale) {
|
|
11161
|
-
var copy = scale.copy;
|
|
11162
|
-
|
|
11163
|
-
scale.padding = scale.paddingOuter;
|
|
11164
|
-
delete scale.paddingInner;
|
|
11165
|
-
delete scale.paddingOuter;
|
|
11166
|
-
|
|
11167
|
-
scale.copy = function() {
|
|
11168
|
-
return pointish(copy());
|
|
11169
|
-
};
|
|
11170
|
-
|
|
11171
|
-
return scale;
|
|
11172
|
-
}
|
|
11173
|
-
|
|
11174
|
-
function point() {
|
|
11175
|
-
return pointish(band().paddingInner(1));
|
|
11176
|
-
}
|
|
11177
|
-
|
|
11178
|
-
function constant$3(x) {
|
|
11179
|
-
return function() {
|
|
11180
|
-
return x;
|
|
11181
|
-
};
|
|
11182
|
-
}
|
|
11183
|
-
|
|
11184
|
-
function number$1(x) {
|
|
11185
|
-
return +x;
|
|
11186
|
-
}
|
|
11187
|
-
|
|
11188
|
-
var unit = [0, 1];
|
|
11189
|
-
|
|
11190
|
-
function deinterpolateLinear(a, b) {
|
|
11191
|
-
return (b -= (a = +a))
|
|
11192
|
-
? function(x) { return (x - a) / b; }
|
|
11193
|
-
: constant$3(b);
|
|
11194
|
-
}
|
|
11195
|
-
|
|
11196
|
-
function deinterpolateClamp(deinterpolate) {
|
|
11197
|
-
return function(a, b) {
|
|
11198
|
-
var d = deinterpolate(a = +a, b = +b);
|
|
11199
|
-
return function(x) { return x <= a ? 0 : x >= b ? 1 : d(x); };
|
|
11200
|
-
};
|
|
11201
|
-
}
|
|
11202
|
-
|
|
11203
|
-
function reinterpolateClamp(reinterpolate) {
|
|
11204
|
-
return function(a, b) {
|
|
11205
|
-
var r = reinterpolate(a = +a, b = +b);
|
|
11206
|
-
return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); };
|
|
11207
|
-
};
|
|
11208
|
-
}
|
|
11209
|
-
|
|
11210
|
-
function bimap(domain, range, deinterpolate, reinterpolate) {
|
|
11211
|
-
var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
|
|
11212
|
-
if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);
|
|
11213
|
-
else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);
|
|
11214
|
-
return function(x) { return r0(d0(x)); };
|
|
11215
|
-
}
|
|
11216
|
-
|
|
11217
|
-
function polymap(domain, range, deinterpolate, reinterpolate) {
|
|
11218
|
-
var j = Math.min(domain.length, range.length) - 1,
|
|
11219
|
-
d = new Array(j),
|
|
11220
|
-
r = new Array(j),
|
|
11221
|
-
i = -1;
|
|
11222
|
-
|
|
11223
|
-
// Reverse descending domains.
|
|
11224
|
-
if (domain[j] < domain[0]) {
|
|
11225
|
-
domain = domain.slice().reverse();
|
|
11226
|
-
range = range.slice().reverse();
|
|
11227
|
-
}
|
|
11228
|
-
|
|
11229
|
-
while (++i < j) {
|
|
11230
|
-
d[i] = deinterpolate(domain[i], domain[i + 1]);
|
|
11231
|
-
r[i] = reinterpolate(range[i], range[i + 1]);
|
|
11232
|
-
}
|
|
11233
|
-
|
|
11234
|
-
return function(x) {
|
|
11235
|
-
var i = bisectRight(domain, x, 1, j) - 1;
|
|
11236
|
-
return r[i](d[i](x));
|
|
11237
|
-
};
|
|
11238
|
-
}
|
|
11239
|
-
|
|
11240
|
-
function copy(source, target) {
|
|
11241
|
-
return target
|
|
11242
|
-
.domain(source.domain())
|
|
11243
|
-
.range(source.range())
|
|
11244
|
-
.interpolate(source.interpolate())
|
|
11245
|
-
.clamp(source.clamp());
|
|
11246
|
-
}
|
|
11247
|
-
|
|
11248
|
-
// deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
|
|
11249
|
-
// reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].
|
|
11250
|
-
function continuous(deinterpolate, reinterpolate) {
|
|
11251
|
-
var domain = unit,
|
|
11252
|
-
range = unit,
|
|
11253
|
-
interpolate = interpolate$1,
|
|
11254
|
-
clamp = false,
|
|
11255
|
-
piecewise,
|
|
11256
|
-
output,
|
|
11257
|
-
input;
|
|
11258
|
-
|
|
11259
|
-
function rescale() {
|
|
11260
|
-
piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;
|
|
11261
|
-
output = input = null;
|
|
11262
|
-
return scale;
|
|
11263
|
-
}
|
|
11264
|
-
|
|
11265
|
-
function scale(x) {
|
|
11266
|
-
return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);
|
|
11267
|
-
}
|
|
11268
|
-
|
|
11269
|
-
scale.invert = function(y) {
|
|
11270
|
-
return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);
|
|
11271
|
-
};
|
|
11272
|
-
|
|
11273
|
-
scale.domain = function(_) {
|
|
11274
|
-
return arguments.length ? (domain = map.call(_, number$1), rescale()) : domain.slice();
|
|
11275
|
-
};
|
|
11276
|
-
|
|
11277
|
-
scale.range = function(_) {
|
|
11278
|
-
return arguments.length ? (range = slice.call(_), rescale()) : range.slice();
|
|
11279
|
-
};
|
|
11280
|
-
|
|
11281
|
-
scale.rangeRound = function(_) {
|
|
11282
|
-
return range = slice.call(_), interpolate = interpolateRound, rescale();
|
|
11283
|
-
};
|
|
11284
|
-
|
|
11285
|
-
scale.clamp = function(_) {
|
|
11286
|
-
return arguments.length ? (clamp = !!_, rescale()) : clamp;
|
|
11287
|
-
};
|
|
11288
|
-
|
|
11289
|
-
scale.interpolate = function(_) {
|
|
11290
|
-
return arguments.length ? (interpolate = _, rescale()) : interpolate;
|
|
11291
|
-
};
|
|
11292
|
-
|
|
11293
|
-
return rescale();
|
|
11294
|
-
}
|
|
11295
|
-
|
|
11296
|
-
function tickFormat(domain, count, specifier) {
|
|
11297
|
-
var start = domain[0],
|
|
11298
|
-
stop = domain[domain.length - 1],
|
|
11299
|
-
step = tickStep(start, stop, count == null ? 10 : count),
|
|
11300
|
-
precision;
|
|
11301
|
-
specifier = formatSpecifier(specifier == null ? ",f" : specifier);
|
|
11302
|
-
switch (specifier.type) {
|
|
11303
|
-
case "s": {
|
|
11304
|
-
var value = Math.max(Math.abs(start), Math.abs(stop));
|
|
11305
|
-
if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;
|
|
11306
|
-
return formatPrefix(specifier, value);
|
|
11307
|
-
}
|
|
11308
|
-
case "":
|
|
11309
|
-
case "e":
|
|
11310
|
-
case "g":
|
|
11311
|
-
case "p":
|
|
11312
|
-
case "r": {
|
|
11313
|
-
if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
|
|
11314
|
-
break;
|
|
11315
|
-
}
|
|
11316
|
-
case "f":
|
|
11317
|
-
case "%": {
|
|
11318
|
-
if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
|
|
11319
|
-
break;
|
|
10100
|
+
8: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3"]
|
|
10101
|
+
}, Set3: {
|
|
10102
|
+
3: ["#8dd3c7", "#ffffb3", "#bebada"],
|
|
10103
|
+
4: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072"],
|
|
10104
|
+
5: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3"],
|
|
10105
|
+
6: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462"],
|
|
10106
|
+
7: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69"],
|
|
10107
|
+
8: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5"],
|
|
10108
|
+
9: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9"],
|
|
10109
|
+
10: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd"],
|
|
10110
|
+
11: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5"],
|
|
10111
|
+
12: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5", "#ffed6f"]
|
|
11320
10112
|
}
|
|
11321
|
-
|
|
11322
|
-
return format(specifier);
|
|
11323
|
-
}
|
|
10113
|
+
};
|
|
11324
10114
|
|
|
11325
|
-
|
|
11326
|
-
|
|
10115
|
+
var _colorbrewer = /*#__PURE__*/Object.freeze({
|
|
10116
|
+
__proto__: null,
|
|
10117
|
+
'default': index
|
|
10118
|
+
});
|
|
11327
10119
|
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
};
|
|
10120
|
+
function ascending(a, b) {
|
|
10121
|
+
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
10122
|
+
}
|
|
11332
10123
|
|
|
11333
|
-
|
|
11334
|
-
|
|
10124
|
+
function bisector(compare) {
|
|
10125
|
+
if (compare.length === 1) compare = ascendingComparator(compare);
|
|
10126
|
+
return {
|
|
10127
|
+
left: function(a, x, lo, hi) {
|
|
10128
|
+
if (lo == null) lo = 0;
|
|
10129
|
+
if (hi == null) hi = a.length;
|
|
10130
|
+
while (lo < hi) {
|
|
10131
|
+
var mid = lo + hi >>> 1;
|
|
10132
|
+
if (compare(a[mid], x) < 0) lo = mid + 1;
|
|
10133
|
+
else hi = mid;
|
|
10134
|
+
}
|
|
10135
|
+
return lo;
|
|
10136
|
+
},
|
|
10137
|
+
right: function(a, x, lo, hi) {
|
|
10138
|
+
if (lo == null) lo = 0;
|
|
10139
|
+
if (hi == null) hi = a.length;
|
|
10140
|
+
while (lo < hi) {
|
|
10141
|
+
var mid = lo + hi >>> 1;
|
|
10142
|
+
if (compare(a[mid], x) > 0) hi = mid;
|
|
10143
|
+
else lo = mid + 1;
|
|
10144
|
+
}
|
|
10145
|
+
return lo;
|
|
10146
|
+
}
|
|
11335
10147
|
};
|
|
10148
|
+
}
|
|
11336
10149
|
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
i1 = d.length - 1,
|
|
11343
|
-
start = d[i0],
|
|
11344
|
-
stop = d[i1],
|
|
11345
|
-
step;
|
|
10150
|
+
function ascendingComparator(f) {
|
|
10151
|
+
return function(d, x) {
|
|
10152
|
+
return ascending(f(d), x);
|
|
10153
|
+
};
|
|
10154
|
+
}
|
|
11346
10155
|
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
step = i0, i0 = i1, i1 = step;
|
|
11350
|
-
}
|
|
10156
|
+
var ascendingBisect = bisector(ascending);
|
|
10157
|
+
var bisectRight = ascendingBisect.right;
|
|
11351
10158
|
|
|
11352
|
-
|
|
10159
|
+
function number$2(x) {
|
|
10160
|
+
return x === null ? NaN : +x;
|
|
10161
|
+
}
|
|
11353
10162
|
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
stop = Math.ceil(stop / step) * step;
|
|
11357
|
-
step = tickIncrement(start, stop, count);
|
|
11358
|
-
} else if (step < 0) {
|
|
11359
|
-
start = Math.ceil(start * step) / step;
|
|
11360
|
-
stop = Math.floor(stop * step) / step;
|
|
11361
|
-
step = tickIncrement(start, stop, count);
|
|
11362
|
-
}
|
|
10163
|
+
function sequence(start, stop, step) {
|
|
10164
|
+
start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
|
|
11363
10165
|
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
domain(d);
|
|
11368
|
-
} else if (step < 0) {
|
|
11369
|
-
d[i0] = Math.ceil(start * step) / step;
|
|
11370
|
-
d[i1] = Math.floor(stop * step) / step;
|
|
11371
|
-
domain(d);
|
|
11372
|
-
}
|
|
10166
|
+
var i = -1,
|
|
10167
|
+
n = Math.max(0, Math.ceil((stop - start) / step)) | 0,
|
|
10168
|
+
range = new Array(n);
|
|
11373
10169
|
|
|
11374
|
-
|
|
11375
|
-
|
|
10170
|
+
while (++i < n) {
|
|
10171
|
+
range[i] = start + i * step;
|
|
10172
|
+
}
|
|
11376
10173
|
|
|
11377
|
-
return
|
|
10174
|
+
return range;
|
|
11378
10175
|
}
|
|
11379
10176
|
|
|
11380
|
-
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
scale.copy = function() {
|
|
11384
|
-
return copy(scale, linear());
|
|
11385
|
-
};
|
|
10177
|
+
var e10 = Math.sqrt(50),
|
|
10178
|
+
e5 = Math.sqrt(10),
|
|
10179
|
+
e2 = Math.sqrt(2);
|
|
11386
10180
|
|
|
11387
|
-
|
|
11388
|
-
|
|
10181
|
+
function ticks(start, stop, count) {
|
|
10182
|
+
var reverse,
|
|
10183
|
+
i = -1,
|
|
10184
|
+
n,
|
|
10185
|
+
ticks,
|
|
10186
|
+
step;
|
|
11389
10187
|
|
|
11390
|
-
|
|
11391
|
-
|
|
10188
|
+
stop = +stop, start = +start, count = +count;
|
|
10189
|
+
if (start === stop && count > 0) return [start];
|
|
10190
|
+
if (reverse = stop < start) n = start, start = stop, stop = n;
|
|
10191
|
+
if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
|
|
11392
10192
|
|
|
11393
|
-
|
|
11394
|
-
|
|
10193
|
+
if (step > 0) {
|
|
10194
|
+
start = Math.ceil(start / step);
|
|
10195
|
+
stop = Math.floor(stop / step);
|
|
10196
|
+
ticks = new Array(n = Math.ceil(stop - start + 1));
|
|
10197
|
+
while (++i < n) ticks[i] = (start + i) * step;
|
|
10198
|
+
} else {
|
|
10199
|
+
start = Math.floor(start * step);
|
|
10200
|
+
stop = Math.ceil(stop * step);
|
|
10201
|
+
ticks = new Array(n = Math.ceil(start - stop + 1));
|
|
10202
|
+
while (++i < n) ticks[i] = (start - i) / step;
|
|
11395
10203
|
}
|
|
11396
10204
|
|
|
11397
|
-
|
|
10205
|
+
if (reverse) ticks.reverse();
|
|
11398
10206
|
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
};
|
|
10207
|
+
return ticks;
|
|
10208
|
+
}
|
|
11402
10209
|
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
|
|
10210
|
+
function tickIncrement(start, stop, count) {
|
|
10211
|
+
var step = (stop - start) / Math.max(0, count),
|
|
10212
|
+
power = Math.floor(Math.log(step) / Math.LN10),
|
|
10213
|
+
error = step / Math.pow(10, power);
|
|
10214
|
+
return power >= 0
|
|
10215
|
+
? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
|
|
10216
|
+
: -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
|
|
10217
|
+
}
|
|
11406
10218
|
|
|
11407
|
-
|
|
10219
|
+
function tickStep(start, stop, count) {
|
|
10220
|
+
var step0 = Math.abs(stop - start) / Math.max(0, count),
|
|
10221
|
+
step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
|
|
10222
|
+
error = step0 / step1;
|
|
10223
|
+
if (error >= e10) step1 *= 10;
|
|
10224
|
+
else if (error >= e5) step1 *= 5;
|
|
10225
|
+
else if (error >= e2) step1 *= 2;
|
|
10226
|
+
return stop < start ? -step1 : step1;
|
|
11408
10227
|
}
|
|
11409
10228
|
|
|
11410
|
-
function
|
|
11411
|
-
|
|
10229
|
+
function threshold$1(values, p, valueof) {
|
|
10230
|
+
if (valueof == null) valueof = number$2;
|
|
10231
|
+
if (!(n = values.length)) return;
|
|
10232
|
+
if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);
|
|
10233
|
+
if (p >= 1) return +valueof(values[n - 1], n - 1, values);
|
|
10234
|
+
var n,
|
|
10235
|
+
i = (n - 1) * p,
|
|
10236
|
+
i0 = Math.floor(i),
|
|
10237
|
+
value0 = +valueof(values[i0], i0, values),
|
|
10238
|
+
value1 = +valueof(values[i0 + 1], i0 + 1, values);
|
|
10239
|
+
return value0 + (value1 - value0) * (i - i0);
|
|
10240
|
+
}
|
|
11412
10241
|
|
|
11413
|
-
|
|
11414
|
-
i1 = domain.length - 1,
|
|
11415
|
-
x0 = domain[i0],
|
|
11416
|
-
x1 = domain[i1],
|
|
11417
|
-
t;
|
|
10242
|
+
var array = Array.prototype;
|
|
11418
10243
|
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
t = x0, x0 = x1, x1 = t;
|
|
11422
|
-
}
|
|
10244
|
+
var map = array.map;
|
|
10245
|
+
var slice = array.slice;
|
|
11423
10246
|
|
|
11424
|
-
|
|
11425
|
-
domain[i1] = interval.ceil(x1);
|
|
11426
|
-
return domain;
|
|
11427
|
-
}
|
|
10247
|
+
var implicit = {name: "implicit"};
|
|
11428
10248
|
|
|
11429
|
-
function
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
}
|
|
10249
|
+
function ordinal$1(range) {
|
|
10250
|
+
var index = map$2(),
|
|
10251
|
+
domain = [],
|
|
10252
|
+
unknown = implicit;
|
|
11434
10253
|
|
|
11435
|
-
|
|
11436
|
-
return a < 0
|
|
11437
|
-
? function(t) { return -Math.pow(-b, t) * Math.pow(-a, 1 - t); }
|
|
11438
|
-
: function(t) { return Math.pow(b, t) * Math.pow(a, 1 - t); };
|
|
11439
|
-
}
|
|
10254
|
+
range = range == null ? [] : slice.call(range);
|
|
11440
10255
|
|
|
11441
|
-
function
|
|
11442
|
-
|
|
11443
|
-
|
|
10256
|
+
function scale(d) {
|
|
10257
|
+
var key = d + "", i = index.get(key);
|
|
10258
|
+
if (!i) {
|
|
10259
|
+
if (unknown !== implicit) return unknown;
|
|
10260
|
+
index.set(key, i = domain.push(d));
|
|
10261
|
+
}
|
|
10262
|
+
return range[(i - 1) % range.length];
|
|
10263
|
+
}
|
|
11444
10264
|
|
|
11445
|
-
function
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11449
|
-
|
|
10265
|
+
scale.domain = function(_) {
|
|
10266
|
+
if (!arguments.length) return domain.slice();
|
|
10267
|
+
domain = [], index = map$2();
|
|
10268
|
+
var i = -1, n = _.length, d, key;
|
|
10269
|
+
while (++i < n) if (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d));
|
|
10270
|
+
return scale;
|
|
10271
|
+
};
|
|
11450
10272
|
|
|
11451
|
-
function
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
|| base === 2 && Math.log2
|
|
11455
|
-
|| (base = Math.log(base), function(x) { return Math.log(x) / base; });
|
|
11456
|
-
}
|
|
10273
|
+
scale.range = function(_) {
|
|
10274
|
+
return arguments.length ? (range = slice.call(_), scale) : range.slice();
|
|
10275
|
+
};
|
|
11457
10276
|
|
|
11458
|
-
function
|
|
11459
|
-
|
|
11460
|
-
|
|
10277
|
+
scale.unknown = function(_) {
|
|
10278
|
+
return arguments.length ? (unknown = _, scale) : unknown;
|
|
10279
|
+
};
|
|
10280
|
+
|
|
10281
|
+
scale.copy = function() {
|
|
10282
|
+
return ordinal$1()
|
|
10283
|
+
.domain(domain)
|
|
10284
|
+
.range(range)
|
|
10285
|
+
.unknown(unknown);
|
|
11461
10286
|
};
|
|
10287
|
+
|
|
10288
|
+
return scale;
|
|
11462
10289
|
}
|
|
11463
10290
|
|
|
11464
|
-
function
|
|
11465
|
-
var scale =
|
|
10291
|
+
function band() {
|
|
10292
|
+
var scale = ordinal$1().unknown(undefined),
|
|
11466
10293
|
domain = scale.domain,
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
10294
|
+
ordinalRange = scale.range,
|
|
10295
|
+
range = [0, 1],
|
|
10296
|
+
step,
|
|
10297
|
+
bandwidth,
|
|
10298
|
+
round = false,
|
|
10299
|
+
paddingInner = 0,
|
|
10300
|
+
paddingOuter = 0,
|
|
10301
|
+
align = 0.5;
|
|
10302
|
+
|
|
10303
|
+
delete scale.unknown;
|
|
11470
10304
|
|
|
11471
10305
|
function rescale() {
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
10306
|
+
var n = domain().length,
|
|
10307
|
+
reverse = range[1] < range[0],
|
|
10308
|
+
start = range[reverse - 0],
|
|
10309
|
+
stop = range[1 - reverse];
|
|
10310
|
+
step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);
|
|
10311
|
+
if (round) step = Math.floor(step);
|
|
10312
|
+
start += (stop - start - step * (n - paddingInner)) * align;
|
|
10313
|
+
bandwidth = step * (1 - paddingInner);
|
|
10314
|
+
if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);
|
|
10315
|
+
var values = sequence(n).map(function(i) { return start + step * i; });
|
|
10316
|
+
return ordinalRange(reverse ? values.reverse() : values);
|
|
11475
10317
|
}
|
|
11476
10318
|
|
|
11477
|
-
scale.base = function(_) {
|
|
11478
|
-
return arguments.length ? (base = +_, rescale()) : base;
|
|
11479
|
-
};
|
|
11480
|
-
|
|
11481
10319
|
scale.domain = function(_) {
|
|
11482
10320
|
return arguments.length ? (domain(_), rescale()) : domain();
|
|
11483
10321
|
};
|
|
11484
10322
|
|
|
11485
|
-
scale.
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
v = d[d.length - 1],
|
|
11489
|
-
r;
|
|
11490
|
-
|
|
11491
|
-
if (r = v < u) i = u, u = v, v = i;
|
|
10323
|
+
scale.range = function(_) {
|
|
10324
|
+
return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();
|
|
10325
|
+
};
|
|
11492
10326
|
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
k,
|
|
11497
|
-
t,
|
|
11498
|
-
n = count == null ? 10 : +count,
|
|
11499
|
-
z = [];
|
|
10327
|
+
scale.rangeRound = function(_) {
|
|
10328
|
+
return range = [+_[0], +_[1]], round = true, rescale();
|
|
10329
|
+
};
|
|
11500
10330
|
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
for (k = 1, p = pows(i); k < base; ++k) {
|
|
11505
|
-
t = p * k;
|
|
11506
|
-
if (t < u) continue;
|
|
11507
|
-
if (t > v) break;
|
|
11508
|
-
z.push(t);
|
|
11509
|
-
}
|
|
11510
|
-
} else for (; i < j; ++i) {
|
|
11511
|
-
for (k = base - 1, p = pows(i); k >= 1; --k) {
|
|
11512
|
-
t = p * k;
|
|
11513
|
-
if (t < u) continue;
|
|
11514
|
-
if (t > v) break;
|
|
11515
|
-
z.push(t);
|
|
11516
|
-
}
|
|
11517
|
-
}
|
|
11518
|
-
} else {
|
|
11519
|
-
z = ticks(i, j, Math.min(j - i, n)).map(pows);
|
|
11520
|
-
}
|
|
10331
|
+
scale.bandwidth = function() {
|
|
10332
|
+
return bandwidth;
|
|
10333
|
+
};
|
|
11521
10334
|
|
|
11522
|
-
|
|
10335
|
+
scale.step = function() {
|
|
10336
|
+
return step;
|
|
11523
10337
|
};
|
|
11524
10338
|
|
|
11525
|
-
scale.
|
|
11526
|
-
|
|
11527
|
-
if (typeof specifier !== "function") specifier = format(specifier);
|
|
11528
|
-
if (count === Infinity) return specifier;
|
|
11529
|
-
if (count == null) count = 10;
|
|
11530
|
-
var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?
|
|
11531
|
-
return function(d) {
|
|
11532
|
-
var i = d / pows(Math.round(logs(d)));
|
|
11533
|
-
if (i * base < base - 0.5) i *= base;
|
|
11534
|
-
return i <= k ? specifier(d) : "";
|
|
11535
|
-
};
|
|
10339
|
+
scale.round = function(_) {
|
|
10340
|
+
return arguments.length ? (round = !!_, rescale()) : round;
|
|
11536
10341
|
};
|
|
11537
10342
|
|
|
11538
|
-
scale.
|
|
11539
|
-
return
|
|
11540
|
-
floor: function(x) { return pows(Math.floor(logs(x))); },
|
|
11541
|
-
ceil: function(x) { return pows(Math.ceil(logs(x))); }
|
|
11542
|
-
}));
|
|
10343
|
+
scale.padding = function(_) {
|
|
10344
|
+
return arguments.length ? (paddingInner = paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
|
|
11543
10345
|
};
|
|
11544
10346
|
|
|
11545
|
-
scale.
|
|
11546
|
-
return
|
|
10347
|
+
scale.paddingInner = function(_) {
|
|
10348
|
+
return arguments.length ? (paddingInner = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
|
|
11547
10349
|
};
|
|
11548
10350
|
|
|
11549
|
-
|
|
11550
|
-
|
|
10351
|
+
scale.paddingOuter = function(_) {
|
|
10352
|
+
return arguments.length ? (paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingOuter;
|
|
10353
|
+
};
|
|
11551
10354
|
|
|
11552
|
-
function
|
|
11553
|
-
|
|
11554
|
-
}
|
|
10355
|
+
scale.align = function(_) {
|
|
10356
|
+
return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;
|
|
10357
|
+
};
|
|
11555
10358
|
|
|
11556
|
-
function
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
10359
|
+
scale.copy = function() {
|
|
10360
|
+
return band()
|
|
10361
|
+
.domain(domain())
|
|
10362
|
+
.range(range)
|
|
10363
|
+
.round(round)
|
|
10364
|
+
.paddingInner(paddingInner)
|
|
10365
|
+
.paddingOuter(paddingOuter)
|
|
10366
|
+
.align(align);
|
|
10367
|
+
};
|
|
11560
10368
|
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
? function(x) { return (raise(x, exponent) - a) / b; }
|
|
11564
|
-
: constant$3(b);
|
|
11565
|
-
}
|
|
10369
|
+
return rescale();
|
|
10370
|
+
}
|
|
11566
10371
|
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
return function(t) { return raise(a + b * t, 1 / exponent); };
|
|
11570
|
-
}
|
|
10372
|
+
function pointish(scale) {
|
|
10373
|
+
var copy = scale.copy;
|
|
11571
10374
|
|
|
11572
|
-
scale.
|
|
11573
|
-
|
|
11574
|
-
|
|
10375
|
+
scale.padding = scale.paddingOuter;
|
|
10376
|
+
delete scale.paddingInner;
|
|
10377
|
+
delete scale.paddingOuter;
|
|
11575
10378
|
|
|
11576
10379
|
scale.copy = function() {
|
|
11577
|
-
return copy(
|
|
10380
|
+
return pointish(copy());
|
|
11578
10381
|
};
|
|
11579
10382
|
|
|
11580
|
-
return
|
|
10383
|
+
return scale;
|
|
11581
10384
|
}
|
|
11582
10385
|
|
|
11583
|
-
function
|
|
11584
|
-
return
|
|
10386
|
+
function point() {
|
|
10387
|
+
return pointish(band().paddingInner(1));
|
|
11585
10388
|
}
|
|
11586
10389
|
|
|
11587
|
-
function
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
10390
|
+
function constant$3(x) {
|
|
10391
|
+
return function() {
|
|
10392
|
+
return x;
|
|
10393
|
+
};
|
|
10394
|
+
}
|
|
11591
10395
|
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
while (++i < n) thresholds[i - 1] = threshold$1(domain, i / n);
|
|
11596
|
-
return scale;
|
|
11597
|
-
}
|
|
10396
|
+
function number$1(x) {
|
|
10397
|
+
return +x;
|
|
10398
|
+
}
|
|
11598
10399
|
|
|
11599
|
-
|
|
11600
|
-
if (!isNaN(x = +x)) return range[bisectRight(thresholds, x)];
|
|
11601
|
-
}
|
|
10400
|
+
var unit = [0, 1];
|
|
11602
10401
|
|
|
11603
|
-
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
];
|
|
11609
|
-
};
|
|
10402
|
+
function deinterpolateLinear(a, b) {
|
|
10403
|
+
return (b -= (a = +a))
|
|
10404
|
+
? function(x) { return (x - a) / b; }
|
|
10405
|
+
: constant$3(b);
|
|
10406
|
+
}
|
|
11610
10407
|
|
|
11611
|
-
|
|
11612
|
-
|
|
11613
|
-
|
|
11614
|
-
|
|
11615
|
-
domain.sort(ascending);
|
|
11616
|
-
return rescale();
|
|
10408
|
+
function deinterpolateClamp(deinterpolate) {
|
|
10409
|
+
return function(a, b) {
|
|
10410
|
+
var d = deinterpolate(a = +a, b = +b);
|
|
10411
|
+
return function(x) { return x <= a ? 0 : x >= b ? 1 : d(x); };
|
|
11617
10412
|
};
|
|
10413
|
+
}
|
|
11618
10414
|
|
|
11619
|
-
|
|
11620
|
-
|
|
10415
|
+
function reinterpolateClamp(reinterpolate) {
|
|
10416
|
+
return function(a, b) {
|
|
10417
|
+
var r = reinterpolate(a = +a, b = +b);
|
|
10418
|
+
return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); };
|
|
11621
10419
|
};
|
|
10420
|
+
}
|
|
11622
10421
|
|
|
11623
|
-
|
|
11624
|
-
|
|
11625
|
-
|
|
10422
|
+
function bimap(domain, range, deinterpolate, reinterpolate) {
|
|
10423
|
+
var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
|
|
10424
|
+
if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);
|
|
10425
|
+
else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);
|
|
10426
|
+
return function(x) { return r0(d0(x)); };
|
|
10427
|
+
}
|
|
11626
10428
|
|
|
11627
|
-
|
|
11628
|
-
|
|
11629
|
-
|
|
11630
|
-
|
|
10429
|
+
function polymap(domain, range, deinterpolate, reinterpolate) {
|
|
10430
|
+
var j = Math.min(domain.length, range.length) - 1,
|
|
10431
|
+
d = new Array(j),
|
|
10432
|
+
r = new Array(j),
|
|
10433
|
+
i = -1;
|
|
10434
|
+
|
|
10435
|
+
// Reverse descending domains.
|
|
10436
|
+
if (domain[j] < domain[0]) {
|
|
10437
|
+
domain = domain.slice().reverse();
|
|
10438
|
+
range = range.slice().reverse();
|
|
10439
|
+
}
|
|
10440
|
+
|
|
10441
|
+
while (++i < j) {
|
|
10442
|
+
d[i] = deinterpolate(domain[i], domain[i + 1]);
|
|
10443
|
+
r[i] = reinterpolate(range[i], range[i + 1]);
|
|
10444
|
+
}
|
|
10445
|
+
|
|
10446
|
+
return function(x) {
|
|
10447
|
+
var i = bisectRight(domain, x, 1, j) - 1;
|
|
10448
|
+
return r[i](d[i](x));
|
|
11631
10449
|
};
|
|
10450
|
+
}
|
|
11632
10451
|
|
|
11633
|
-
|
|
10452
|
+
function copy(source, target) {
|
|
10453
|
+
return target
|
|
10454
|
+
.domain(source.domain())
|
|
10455
|
+
.range(source.range())
|
|
10456
|
+
.interpolate(source.interpolate())
|
|
10457
|
+
.clamp(source.clamp());
|
|
11634
10458
|
}
|
|
11635
10459
|
|
|
11636
|
-
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
10460
|
+
// deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
|
|
10461
|
+
// reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].
|
|
10462
|
+
function continuous(deinterpolate, reinterpolate) {
|
|
10463
|
+
var domain = unit,
|
|
10464
|
+
range = unit,
|
|
10465
|
+
interpolate = interpolate$1,
|
|
10466
|
+
clamp = false,
|
|
10467
|
+
piecewise,
|
|
10468
|
+
output,
|
|
10469
|
+
input;
|
|
11646
10470
|
|
|
11647
10471
|
function rescale() {
|
|
11648
|
-
|
|
11649
|
-
|
|
11650
|
-
while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);
|
|
10472
|
+
piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;
|
|
10473
|
+
output = input = null;
|
|
11651
10474
|
return scale;
|
|
11652
10475
|
}
|
|
11653
10476
|
|
|
10477
|
+
function scale(x) {
|
|
10478
|
+
return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);
|
|
10479
|
+
}
|
|
10480
|
+
|
|
10481
|
+
scale.invert = function(y) {
|
|
10482
|
+
return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);
|
|
10483
|
+
};
|
|
10484
|
+
|
|
11654
10485
|
scale.domain = function(_) {
|
|
11655
|
-
return arguments.length ? (
|
|
10486
|
+
return arguments.length ? (domain = map.call(_, number$1), rescale()) : domain.slice();
|
|
11656
10487
|
};
|
|
11657
10488
|
|
|
11658
10489
|
scale.range = function(_) {
|
|
11659
|
-
return arguments.length ? (
|
|
10490
|
+
return arguments.length ? (range = slice.call(_), rescale()) : range.slice();
|
|
11660
10491
|
};
|
|
11661
10492
|
|
|
11662
|
-
scale.
|
|
11663
|
-
|
|
11664
|
-
return i < 0 ? [NaN, NaN]
|
|
11665
|
-
: i < 1 ? [x0, domain[0]]
|
|
11666
|
-
: i >= n ? [domain[n - 1], x1]
|
|
11667
|
-
: [domain[i - 1], domain[i]];
|
|
10493
|
+
scale.rangeRound = function(_) {
|
|
10494
|
+
return range = slice.call(_), interpolate = interpolateRound, rescale();
|
|
11668
10495
|
};
|
|
11669
10496
|
|
|
11670
|
-
scale.
|
|
11671
|
-
return
|
|
11672
|
-
.domain([x0, x1])
|
|
11673
|
-
.range(range);
|
|
10497
|
+
scale.clamp = function(_) {
|
|
10498
|
+
return arguments.length ? (clamp = !!_, rescale()) : clamp;
|
|
11674
10499
|
};
|
|
11675
10500
|
|
|
11676
|
-
|
|
11677
|
-
|
|
10501
|
+
scale.interpolate = function(_) {
|
|
10502
|
+
return arguments.length ? (interpolate = _, rescale()) : interpolate;
|
|
10503
|
+
};
|
|
11678
10504
|
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
range = [0, 1],
|
|
11682
|
-
n = 1;
|
|
10505
|
+
return rescale();
|
|
10506
|
+
}
|
|
11683
10507
|
|
|
11684
|
-
|
|
11685
|
-
|
|
10508
|
+
function tickFormat(domain, count, specifier) {
|
|
10509
|
+
var start = domain[0],
|
|
10510
|
+
stop = domain[domain.length - 1],
|
|
10511
|
+
step = tickStep(start, stop, count == null ? 10 : count),
|
|
10512
|
+
precision;
|
|
10513
|
+
specifier = formatSpecifier(specifier == null ? ",f" : specifier);
|
|
10514
|
+
switch (specifier.type) {
|
|
10515
|
+
case "s": {
|
|
10516
|
+
var value = Math.max(Math.abs(start), Math.abs(stop));
|
|
10517
|
+
if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;
|
|
10518
|
+
return formatPrefix(specifier, value);
|
|
10519
|
+
}
|
|
10520
|
+
case "":
|
|
10521
|
+
case "e":
|
|
10522
|
+
case "g":
|
|
10523
|
+
case "p":
|
|
10524
|
+
case "r": {
|
|
10525
|
+
if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
|
|
10526
|
+
break;
|
|
10527
|
+
}
|
|
10528
|
+
case "f":
|
|
10529
|
+
case "%": {
|
|
10530
|
+
if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
|
|
10531
|
+
break;
|
|
10532
|
+
}
|
|
11686
10533
|
}
|
|
10534
|
+
return format(specifier);
|
|
10535
|
+
}
|
|
11687
10536
|
|
|
11688
|
-
|
|
11689
|
-
|
|
11690
|
-
};
|
|
11691
|
-
|
|
11692
|
-
scale.range = function(_) {
|
|
11693
|
-
return arguments.length ? (range = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();
|
|
11694
|
-
};
|
|
10537
|
+
function linearish(scale) {
|
|
10538
|
+
var domain = scale.domain;
|
|
11695
10539
|
|
|
11696
|
-
scale.
|
|
11697
|
-
var
|
|
11698
|
-
return [
|
|
10540
|
+
scale.ticks = function(count) {
|
|
10541
|
+
var d = domain();
|
|
10542
|
+
return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
|
|
11699
10543
|
};
|
|
11700
10544
|
|
|
11701
|
-
scale.
|
|
11702
|
-
return
|
|
11703
|
-
.domain(domain)
|
|
11704
|
-
.range(range);
|
|
10545
|
+
scale.tickFormat = function(count, specifier) {
|
|
10546
|
+
return tickFormat(domain(), count, specifier);
|
|
11705
10547
|
};
|
|
11706
10548
|
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
var durationSecond = 1000,
|
|
11711
|
-
durationMinute = durationSecond * 60,
|
|
11712
|
-
durationHour = durationMinute * 60,
|
|
11713
|
-
durationDay = durationHour * 24,
|
|
11714
|
-
durationWeek = durationDay * 7,
|
|
11715
|
-
durationMonth = durationDay * 30,
|
|
11716
|
-
durationYear = durationDay * 365;
|
|
11717
|
-
|
|
11718
|
-
function date(t) {
|
|
11719
|
-
return new Date(t);
|
|
11720
|
-
}
|
|
10549
|
+
scale.nice = function(count) {
|
|
10550
|
+
if (count == null) count = 10;
|
|
11721
10551
|
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
10552
|
+
var d = domain(),
|
|
10553
|
+
i0 = 0,
|
|
10554
|
+
i1 = d.length - 1,
|
|
10555
|
+
start = d[i0],
|
|
10556
|
+
stop = d[i1],
|
|
10557
|
+
step;
|
|
11725
10558
|
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
10559
|
+
if (stop < start) {
|
|
10560
|
+
step = start, start = stop, stop = step;
|
|
10561
|
+
step = i0, i0 = i1, i1 = step;
|
|
10562
|
+
}
|
|
11730
10563
|
|
|
11731
|
-
|
|
11732
|
-
formatSecond = format(":%S"),
|
|
11733
|
-
formatMinute = format("%I:%M"),
|
|
11734
|
-
formatHour = format("%I %p"),
|
|
11735
|
-
formatDay = format("%a %d"),
|
|
11736
|
-
formatWeek = format("%b %d"),
|
|
11737
|
-
formatMonth = format("%B"),
|
|
11738
|
-
formatYear = format("%Y");
|
|
10564
|
+
step = tickIncrement(start, stop, count);
|
|
11739
10565
|
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
[ hour, 1, durationHour ],
|
|
11750
|
-
[ hour, 3, 3 * durationHour ],
|
|
11751
|
-
[ hour, 6, 6 * durationHour ],
|
|
11752
|
-
[ hour, 12, 12 * durationHour ],
|
|
11753
|
-
[ day, 1, durationDay ],
|
|
11754
|
-
[ day, 2, 2 * durationDay ],
|
|
11755
|
-
[ week, 1, durationWeek ],
|
|
11756
|
-
[ month, 1, durationMonth ],
|
|
11757
|
-
[ month, 3, 3 * durationMonth ],
|
|
11758
|
-
[ year, 1, durationYear ]
|
|
11759
|
-
];
|
|
10566
|
+
if (step > 0) {
|
|
10567
|
+
start = Math.floor(start / step) * step;
|
|
10568
|
+
stop = Math.ceil(stop / step) * step;
|
|
10569
|
+
step = tickIncrement(start, stop, count);
|
|
10570
|
+
} else if (step < 0) {
|
|
10571
|
+
start = Math.ceil(start * step) / step;
|
|
10572
|
+
stop = Math.floor(stop * step) / step;
|
|
10573
|
+
step = tickIncrement(start, stop, count);
|
|
10574
|
+
}
|
|
11760
10575
|
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
|
|
11765
|
-
|
|
11766
|
-
|
|
11767
|
-
|
|
11768
|
-
|
|
11769
|
-
|
|
10576
|
+
if (step > 0) {
|
|
10577
|
+
d[i0] = Math.floor(start / step) * step;
|
|
10578
|
+
d[i1] = Math.ceil(stop / step) * step;
|
|
10579
|
+
domain(d);
|
|
10580
|
+
} else if (step < 0) {
|
|
10581
|
+
d[i0] = Math.ceil(start * step) / step;
|
|
10582
|
+
d[i1] = Math.floor(stop * step) / step;
|
|
10583
|
+
domain(d);
|
|
10584
|
+
}
|
|
11770
10585
|
|
|
11771
|
-
|
|
11772
|
-
|
|
10586
|
+
return scale;
|
|
10587
|
+
};
|
|
11773
10588
|
|
|
11774
|
-
|
|
11775
|
-
|
|
11776
|
-
// Otherwise, assume interval is already a time interval and use it.
|
|
11777
|
-
if (typeof interval === "number") {
|
|
11778
|
-
var target = Math.abs(stop - start) / interval,
|
|
11779
|
-
i = bisector(function(i) { return i[2]; }).right(tickIntervals, target);
|
|
11780
|
-
if (i === tickIntervals.length) {
|
|
11781
|
-
step = tickStep(start / durationYear, stop / durationYear, interval);
|
|
11782
|
-
interval = year;
|
|
11783
|
-
} else if (i) {
|
|
11784
|
-
i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
|
|
11785
|
-
step = i[1];
|
|
11786
|
-
interval = i[0];
|
|
11787
|
-
} else {
|
|
11788
|
-
step = Math.max(tickStep(start, stop, interval), 1);
|
|
11789
|
-
interval = millisecond;
|
|
11790
|
-
}
|
|
11791
|
-
}
|
|
10589
|
+
return scale;
|
|
10590
|
+
}
|
|
11792
10591
|
|
|
11793
|
-
|
|
11794
|
-
|
|
10592
|
+
function linear() {
|
|
10593
|
+
var scale = continuous(deinterpolateLinear, reinterpolate$1);
|
|
11795
10594
|
|
|
11796
|
-
scale.
|
|
11797
|
-
return
|
|
10595
|
+
scale.copy = function() {
|
|
10596
|
+
return copy(scale, linear());
|
|
11798
10597
|
};
|
|
11799
10598
|
|
|
11800
|
-
|
|
11801
|
-
|
|
11802
|
-
};
|
|
10599
|
+
return linearish(scale);
|
|
10600
|
+
}
|
|
11803
10601
|
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
t0 = d[0],
|
|
11807
|
-
t1 = d[d.length - 1],
|
|
11808
|
-
r = t1 < t0,
|
|
11809
|
-
t;
|
|
11810
|
-
if (r) t = t0, t0 = t1, t1 = t;
|
|
11811
|
-
t = tickInterval(interval, t0, t1, step);
|
|
11812
|
-
t = t ? t.range(t0, t1 + 1) : []; // inclusive stop
|
|
11813
|
-
return r ? t.reverse() : t;
|
|
11814
|
-
};
|
|
10602
|
+
function identity$1() {
|
|
10603
|
+
var domain = [0, 1];
|
|
11815
10604
|
|
|
11816
|
-
scale
|
|
11817
|
-
return
|
|
11818
|
-
}
|
|
10605
|
+
function scale(x) {
|
|
10606
|
+
return +x;
|
|
10607
|
+
}
|
|
11819
10608
|
|
|
11820
|
-
scale.
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11824
|
-
: scale;
|
|
10609
|
+
scale.invert = scale;
|
|
10610
|
+
|
|
10611
|
+
scale.domain = scale.range = function(_) {
|
|
10612
|
+
return arguments.length ? (domain = map.call(_, number$1), scale) : domain.slice();
|
|
11825
10613
|
};
|
|
11826
10614
|
|
|
11827
10615
|
scale.copy = function() {
|
|
11828
|
-
return
|
|
10616
|
+
return identity$1().domain(domain);
|
|
11829
10617
|
};
|
|
11830
10618
|
|
|
11831
|
-
return scale;
|
|
10619
|
+
return linearish(scale);
|
|
11832
10620
|
}
|
|
11833
10621
|
|
|
11834
|
-
function
|
|
11835
|
-
|
|
11836
|
-
}
|
|
10622
|
+
function nice(domain, interval) {
|
|
10623
|
+
domain = domain.slice();
|
|
11837
10624
|
|
|
11838
|
-
|
|
11839
|
-
|
|
11840
|
-
|
|
10625
|
+
var i0 = 0,
|
|
10626
|
+
i1 = domain.length - 1,
|
|
10627
|
+
x0 = domain[i0],
|
|
10628
|
+
x1 = domain[i1],
|
|
10629
|
+
t;
|
|
11841
10630
|
|
|
11842
|
-
|
|
11843
|
-
|
|
11844
|
-
|
|
11845
|
-
}
|
|
10631
|
+
if (x1 < x0) {
|
|
10632
|
+
t = i0, i0 = i1, i1 = t;
|
|
10633
|
+
t = x0, x0 = x1, x1 = t;
|
|
10634
|
+
}
|
|
10635
|
+
|
|
10636
|
+
domain[i0] = interval.floor(x0);
|
|
10637
|
+
domain[i1] = interval.ceil(x1);
|
|
10638
|
+
return domain;
|
|
11846
10639
|
}
|
|
11847
10640
|
|
|
11848
|
-
|
|
10641
|
+
function deinterpolate(a, b) {
|
|
10642
|
+
return (b = Math.log(b / a))
|
|
10643
|
+
? function(x) { return Math.log(x / a) / b; }
|
|
10644
|
+
: constant$3(b);
|
|
10645
|
+
}
|
|
11849
10646
|
|
|
11850
|
-
|
|
10647
|
+
function reinterpolate(a, b) {
|
|
10648
|
+
return a < 0
|
|
10649
|
+
? function(t) { return -Math.pow(-b, t) * Math.pow(-a, 1 - t); }
|
|
10650
|
+
: function(t) { return Math.pow(b, t) * Math.pow(a, 1 - t); };
|
|
10651
|
+
}
|
|
11851
10652
|
|
|
11852
|
-
|
|
10653
|
+
function pow10(x) {
|
|
10654
|
+
return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x;
|
|
10655
|
+
}
|
|
11853
10656
|
|
|
11854
|
-
|
|
10657
|
+
function powp(base) {
|
|
10658
|
+
return base === 10 ? pow10
|
|
10659
|
+
: base === Math.E ? Math.exp
|
|
10660
|
+
: function(x) { return Math.pow(base, x); };
|
|
10661
|
+
}
|
|
11855
10662
|
|
|
11856
|
-
function
|
|
11857
|
-
|
|
11858
|
-
|
|
10663
|
+
function logp(base) {
|
|
10664
|
+
return base === Math.E ? Math.log
|
|
10665
|
+
: base === 10 && Math.log10
|
|
10666
|
+
|| base === 2 && Math.log2
|
|
10667
|
+
|| (base = Math.log(base), function(x) { return Math.log(x) / base; });
|
|
11859
10668
|
}
|
|
11860
10669
|
|
|
11861
|
-
function
|
|
11862
|
-
|
|
11863
|
-
|
|
11864
|
-
|
|
10670
|
+
function reflect(f) {
|
|
10671
|
+
return function(x) {
|
|
10672
|
+
return -f(-x);
|
|
10673
|
+
};
|
|
11865
10674
|
}
|
|
11866
10675
|
|
|
11867
|
-
function
|
|
10676
|
+
function log() {
|
|
10677
|
+
var scale = continuous(deinterpolate, reinterpolate).domain([1, 10]),
|
|
10678
|
+
domain = scale.domain,
|
|
10679
|
+
base = 10,
|
|
10680
|
+
logs = logp(10),
|
|
10681
|
+
pows = powp(10);
|
|
11868
10682
|
|
|
11869
|
-
|
|
11870
|
-
|
|
10683
|
+
function rescale() {
|
|
10684
|
+
logs = logp(base), pows = powp(base);
|
|
10685
|
+
if (domain()[0] < 0) logs = reflect(logs), pows = reflect(pows);
|
|
10686
|
+
return scale;
|
|
10687
|
+
}
|
|
11871
10688
|
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
|
|
11875
|
-
reHex = /^#([0-9a-f]{3,8})$/,
|
|
11876
|
-
reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
|
|
11877
|
-
reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
|
|
11878
|
-
reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
|
|
11879
|
-
reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
|
|
11880
|
-
reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
|
|
11881
|
-
reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
|
|
10689
|
+
scale.base = function(_) {
|
|
10690
|
+
return arguments.length ? (base = +_, rescale()) : base;
|
|
10691
|
+
};
|
|
11882
10692
|
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
blueviolet: 0x8a2be2,
|
|
11895
|
-
brown: 0xa52a2a,
|
|
11896
|
-
burlywood: 0xdeb887,
|
|
11897
|
-
cadetblue: 0x5f9ea0,
|
|
11898
|
-
chartreuse: 0x7fff00,
|
|
11899
|
-
chocolate: 0xd2691e,
|
|
11900
|
-
coral: 0xff7f50,
|
|
11901
|
-
cornflowerblue: 0x6495ed,
|
|
11902
|
-
cornsilk: 0xfff8dc,
|
|
11903
|
-
crimson: 0xdc143c,
|
|
11904
|
-
cyan: 0x00ffff,
|
|
11905
|
-
darkblue: 0x00008b,
|
|
11906
|
-
darkcyan: 0x008b8b,
|
|
11907
|
-
darkgoldenrod: 0xb8860b,
|
|
11908
|
-
darkgray: 0xa9a9a9,
|
|
11909
|
-
darkgreen: 0x006400,
|
|
11910
|
-
darkgrey: 0xa9a9a9,
|
|
11911
|
-
darkkhaki: 0xbdb76b,
|
|
11912
|
-
darkmagenta: 0x8b008b,
|
|
11913
|
-
darkolivegreen: 0x556b2f,
|
|
11914
|
-
darkorange: 0xff8c00,
|
|
11915
|
-
darkorchid: 0x9932cc,
|
|
11916
|
-
darkred: 0x8b0000,
|
|
11917
|
-
darksalmon: 0xe9967a,
|
|
11918
|
-
darkseagreen: 0x8fbc8f,
|
|
11919
|
-
darkslateblue: 0x483d8b,
|
|
11920
|
-
darkslategray: 0x2f4f4f,
|
|
11921
|
-
darkslategrey: 0x2f4f4f,
|
|
11922
|
-
darkturquoise: 0x00ced1,
|
|
11923
|
-
darkviolet: 0x9400d3,
|
|
11924
|
-
deeppink: 0xff1493,
|
|
11925
|
-
deepskyblue: 0x00bfff,
|
|
11926
|
-
dimgray: 0x696969,
|
|
11927
|
-
dimgrey: 0x696969,
|
|
11928
|
-
dodgerblue: 0x1e90ff,
|
|
11929
|
-
firebrick: 0xb22222,
|
|
11930
|
-
floralwhite: 0xfffaf0,
|
|
11931
|
-
forestgreen: 0x228b22,
|
|
11932
|
-
fuchsia: 0xff00ff,
|
|
11933
|
-
gainsboro: 0xdcdcdc,
|
|
11934
|
-
ghostwhite: 0xf8f8ff,
|
|
11935
|
-
gold: 0xffd700,
|
|
11936
|
-
goldenrod: 0xdaa520,
|
|
11937
|
-
gray: 0x808080,
|
|
11938
|
-
green: 0x008000,
|
|
11939
|
-
greenyellow: 0xadff2f,
|
|
11940
|
-
grey: 0x808080,
|
|
11941
|
-
honeydew: 0xf0fff0,
|
|
11942
|
-
hotpink: 0xff69b4,
|
|
11943
|
-
indianred: 0xcd5c5c,
|
|
11944
|
-
indigo: 0x4b0082,
|
|
11945
|
-
ivory: 0xfffff0,
|
|
11946
|
-
khaki: 0xf0e68c,
|
|
11947
|
-
lavender: 0xe6e6fa,
|
|
11948
|
-
lavenderblush: 0xfff0f5,
|
|
11949
|
-
lawngreen: 0x7cfc00,
|
|
11950
|
-
lemonchiffon: 0xfffacd,
|
|
11951
|
-
lightblue: 0xadd8e6,
|
|
11952
|
-
lightcoral: 0xf08080,
|
|
11953
|
-
lightcyan: 0xe0ffff,
|
|
11954
|
-
lightgoldenrodyellow: 0xfafad2,
|
|
11955
|
-
lightgray: 0xd3d3d3,
|
|
11956
|
-
lightgreen: 0x90ee90,
|
|
11957
|
-
lightgrey: 0xd3d3d3,
|
|
11958
|
-
lightpink: 0xffb6c1,
|
|
11959
|
-
lightsalmon: 0xffa07a,
|
|
11960
|
-
lightseagreen: 0x20b2aa,
|
|
11961
|
-
lightskyblue: 0x87cefa,
|
|
11962
|
-
lightslategray: 0x778899,
|
|
11963
|
-
lightslategrey: 0x778899,
|
|
11964
|
-
lightsteelblue: 0xb0c4de,
|
|
11965
|
-
lightyellow: 0xffffe0,
|
|
11966
|
-
lime: 0x00ff00,
|
|
11967
|
-
limegreen: 0x32cd32,
|
|
11968
|
-
linen: 0xfaf0e6,
|
|
11969
|
-
magenta: 0xff00ff,
|
|
11970
|
-
maroon: 0x800000,
|
|
11971
|
-
mediumaquamarine: 0x66cdaa,
|
|
11972
|
-
mediumblue: 0x0000cd,
|
|
11973
|
-
mediumorchid: 0xba55d3,
|
|
11974
|
-
mediumpurple: 0x9370db,
|
|
11975
|
-
mediumseagreen: 0x3cb371,
|
|
11976
|
-
mediumslateblue: 0x7b68ee,
|
|
11977
|
-
mediumspringgreen: 0x00fa9a,
|
|
11978
|
-
mediumturquoise: 0x48d1cc,
|
|
11979
|
-
mediumvioletred: 0xc71585,
|
|
11980
|
-
midnightblue: 0x191970,
|
|
11981
|
-
mintcream: 0xf5fffa,
|
|
11982
|
-
mistyrose: 0xffe4e1,
|
|
11983
|
-
moccasin: 0xffe4b5,
|
|
11984
|
-
navajowhite: 0xffdead,
|
|
11985
|
-
navy: 0x000080,
|
|
11986
|
-
oldlace: 0xfdf5e6,
|
|
11987
|
-
olive: 0x808000,
|
|
11988
|
-
olivedrab: 0x6b8e23,
|
|
11989
|
-
orange: 0xffa500,
|
|
11990
|
-
orangered: 0xff4500,
|
|
11991
|
-
orchid: 0xda70d6,
|
|
11992
|
-
palegoldenrod: 0xeee8aa,
|
|
11993
|
-
palegreen: 0x98fb98,
|
|
11994
|
-
paleturquoise: 0xafeeee,
|
|
11995
|
-
palevioletred: 0xdb7093,
|
|
11996
|
-
papayawhip: 0xffefd5,
|
|
11997
|
-
peachpuff: 0xffdab9,
|
|
11998
|
-
peru: 0xcd853f,
|
|
11999
|
-
pink: 0xffc0cb,
|
|
12000
|
-
plum: 0xdda0dd,
|
|
12001
|
-
powderblue: 0xb0e0e6,
|
|
12002
|
-
purple: 0x800080,
|
|
12003
|
-
rebeccapurple: 0x663399,
|
|
12004
|
-
red: 0xff0000,
|
|
12005
|
-
rosybrown: 0xbc8f8f,
|
|
12006
|
-
royalblue: 0x4169e1,
|
|
12007
|
-
saddlebrown: 0x8b4513,
|
|
12008
|
-
salmon: 0xfa8072,
|
|
12009
|
-
sandybrown: 0xf4a460,
|
|
12010
|
-
seagreen: 0x2e8b57,
|
|
12011
|
-
seashell: 0xfff5ee,
|
|
12012
|
-
sienna: 0xa0522d,
|
|
12013
|
-
silver: 0xc0c0c0,
|
|
12014
|
-
skyblue: 0x87ceeb,
|
|
12015
|
-
slateblue: 0x6a5acd,
|
|
12016
|
-
slategray: 0x708090,
|
|
12017
|
-
slategrey: 0x708090,
|
|
12018
|
-
snow: 0xfffafa,
|
|
12019
|
-
springgreen: 0x00ff7f,
|
|
12020
|
-
steelblue: 0x4682b4,
|
|
12021
|
-
tan: 0xd2b48c,
|
|
12022
|
-
teal: 0x008080,
|
|
12023
|
-
thistle: 0xd8bfd8,
|
|
12024
|
-
tomato: 0xff6347,
|
|
12025
|
-
turquoise: 0x40e0d0,
|
|
12026
|
-
violet: 0xee82ee,
|
|
12027
|
-
wheat: 0xf5deb3,
|
|
12028
|
-
white: 0xffffff,
|
|
12029
|
-
whitesmoke: 0xf5f5f5,
|
|
12030
|
-
yellow: 0xffff00,
|
|
12031
|
-
yellowgreen: 0x9acd32
|
|
12032
|
-
};
|
|
10693
|
+
scale.domain = function(_) {
|
|
10694
|
+
return arguments.length ? (domain(_), rescale()) : domain();
|
|
10695
|
+
};
|
|
10696
|
+
|
|
10697
|
+
scale.ticks = function(count) {
|
|
10698
|
+
var d = domain(),
|
|
10699
|
+
u = d[0],
|
|
10700
|
+
v = d[d.length - 1],
|
|
10701
|
+
r;
|
|
10702
|
+
|
|
10703
|
+
if (r = v < u) i = u, u = v, v = i;
|
|
12033
10704
|
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
hex: color_formatHex, // Deprecated! Use color.formatHex.
|
|
12042
|
-
formatHex: color_formatHex,
|
|
12043
|
-
formatHsl: color_formatHsl,
|
|
12044
|
-
formatRgb: color_formatRgb,
|
|
12045
|
-
toString: color_formatRgb
|
|
12046
|
-
});
|
|
10705
|
+
var i = logs(u),
|
|
10706
|
+
j = logs(v),
|
|
10707
|
+
p,
|
|
10708
|
+
k,
|
|
10709
|
+
t,
|
|
10710
|
+
n = count == null ? 10 : +count,
|
|
10711
|
+
z = [];
|
|
12047
10712
|
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
10713
|
+
if (!(base % 1) && j - i < n) {
|
|
10714
|
+
i = Math.round(i) - 1, j = Math.round(j) + 1;
|
|
10715
|
+
if (u > 0) for (; i < j; ++i) {
|
|
10716
|
+
for (k = 1, p = pows(i); k < base; ++k) {
|
|
10717
|
+
t = p * k;
|
|
10718
|
+
if (t < u) continue;
|
|
10719
|
+
if (t > v) break;
|
|
10720
|
+
z.push(t);
|
|
10721
|
+
}
|
|
10722
|
+
} else for (; i < j; ++i) {
|
|
10723
|
+
for (k = base - 1, p = pows(i); k >= 1; --k) {
|
|
10724
|
+
t = p * k;
|
|
10725
|
+
if (t < u) continue;
|
|
10726
|
+
if (t > v) break;
|
|
10727
|
+
z.push(t);
|
|
10728
|
+
}
|
|
10729
|
+
}
|
|
10730
|
+
} else {
|
|
10731
|
+
z = ticks(i, j, Math.min(j - i, n)).map(pows);
|
|
10732
|
+
}
|
|
12051
10733
|
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
}
|
|
10734
|
+
return r ? z.reverse() : z;
|
|
10735
|
+
};
|
|
12055
10736
|
|
|
12056
|
-
function
|
|
12057
|
-
|
|
12058
|
-
|
|
10737
|
+
scale.tickFormat = function(count, specifier) {
|
|
10738
|
+
if (specifier == null) specifier = base === 10 ? ".0e" : ",";
|
|
10739
|
+
if (typeof specifier !== "function") specifier = format(specifier);
|
|
10740
|
+
if (count === Infinity) return specifier;
|
|
10741
|
+
if (count == null) count = 10;
|
|
10742
|
+
var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?
|
|
10743
|
+
return function(d) {
|
|
10744
|
+
var i = d / pows(Math.round(logs(d)));
|
|
10745
|
+
if (i * base < base - 0.5) i *= base;
|
|
10746
|
+
return i <= k ? specifier(d) : "";
|
|
10747
|
+
};
|
|
10748
|
+
};
|
|
12059
10749
|
|
|
12060
|
-
function
|
|
12061
|
-
|
|
12062
|
-
|
|
12063
|
-
|
|
12064
|
-
|
|
12065
|
-
|
|
12066
|
-
|
|
12067
|
-
|
|
12068
|
-
|
|
12069
|
-
|
|
12070
|
-
|
|
12071
|
-
|
|
12072
|
-
: (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
12073
|
-
: (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
12074
|
-
: named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
|
|
12075
|
-
: format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
|
|
12076
|
-
: null;
|
|
10750
|
+
scale.nice = function() {
|
|
10751
|
+
return domain(nice(domain(), {
|
|
10752
|
+
floor: function(x) { return pows(Math.floor(logs(x))); },
|
|
10753
|
+
ceil: function(x) { return pows(Math.ceil(logs(x))); }
|
|
10754
|
+
}));
|
|
10755
|
+
};
|
|
10756
|
+
|
|
10757
|
+
scale.copy = function() {
|
|
10758
|
+
return copy(scale, log().base(base));
|
|
10759
|
+
};
|
|
10760
|
+
|
|
10761
|
+
return scale;
|
|
12077
10762
|
}
|
|
12078
10763
|
|
|
12079
|
-
function
|
|
12080
|
-
return
|
|
10764
|
+
function raise(x, exponent) {
|
|
10765
|
+
return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);
|
|
12081
10766
|
}
|
|
12082
10767
|
|
|
12083
|
-
function
|
|
12084
|
-
|
|
12085
|
-
|
|
10768
|
+
function pow() {
|
|
10769
|
+
var exponent = 1,
|
|
10770
|
+
scale = continuous(deinterpolate, reinterpolate),
|
|
10771
|
+
domain = scale.domain;
|
|
10772
|
+
|
|
10773
|
+
function deinterpolate(a, b) {
|
|
10774
|
+
return (b = raise(b, exponent) - (a = raise(a, exponent)))
|
|
10775
|
+
? function(x) { return (raise(x, exponent) - a) / b; }
|
|
10776
|
+
: constant$3(b);
|
|
10777
|
+
}
|
|
10778
|
+
|
|
10779
|
+
function reinterpolate(a, b) {
|
|
10780
|
+
b = raise(b, exponent) - (a = raise(a, exponent));
|
|
10781
|
+
return function(t) { return raise(a + b * t, 1 / exponent); };
|
|
10782
|
+
}
|
|
10783
|
+
|
|
10784
|
+
scale.exponent = function(_) {
|
|
10785
|
+
return arguments.length ? (exponent = +_, domain(domain())) : exponent;
|
|
10786
|
+
};
|
|
10787
|
+
|
|
10788
|
+
scale.copy = function() {
|
|
10789
|
+
return copy(scale, pow().exponent(exponent));
|
|
10790
|
+
};
|
|
10791
|
+
|
|
10792
|
+
return linearish(scale);
|
|
12086
10793
|
}
|
|
12087
10794
|
|
|
12088
|
-
function
|
|
12089
|
-
|
|
12090
|
-
if (!o) return new Rgb;
|
|
12091
|
-
o = o.rgb();
|
|
12092
|
-
return new Rgb(o.r, o.g, o.b, o.opacity);
|
|
10795
|
+
function sqrt() {
|
|
10796
|
+
return pow().exponent(0.5);
|
|
12093
10797
|
}
|
|
12094
10798
|
|
|
12095
|
-
function
|
|
12096
|
-
|
|
10799
|
+
function quantile() {
|
|
10800
|
+
var domain = [],
|
|
10801
|
+
range = [],
|
|
10802
|
+
thresholds = [];
|
|
10803
|
+
|
|
10804
|
+
function rescale() {
|
|
10805
|
+
var i = 0, n = Math.max(1, range.length);
|
|
10806
|
+
thresholds = new Array(n - 1);
|
|
10807
|
+
while (++i < n) thresholds[i - 1] = threshold$1(domain, i / n);
|
|
10808
|
+
return scale;
|
|
10809
|
+
}
|
|
10810
|
+
|
|
10811
|
+
function scale(x) {
|
|
10812
|
+
if (!isNaN(x = +x)) return range[bisectRight(thresholds, x)];
|
|
10813
|
+
}
|
|
10814
|
+
|
|
10815
|
+
scale.invertExtent = function(y) {
|
|
10816
|
+
var i = range.indexOf(y);
|
|
10817
|
+
return i < 0 ? [NaN, NaN] : [
|
|
10818
|
+
i > 0 ? thresholds[i - 1] : domain[0],
|
|
10819
|
+
i < thresholds.length ? thresholds[i] : domain[domain.length - 1]
|
|
10820
|
+
];
|
|
10821
|
+
};
|
|
10822
|
+
|
|
10823
|
+
scale.domain = function(_) {
|
|
10824
|
+
if (!arguments.length) return domain.slice();
|
|
10825
|
+
domain = [];
|
|
10826
|
+
for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);
|
|
10827
|
+
domain.sort(ascending);
|
|
10828
|
+
return rescale();
|
|
10829
|
+
};
|
|
10830
|
+
|
|
10831
|
+
scale.range = function(_) {
|
|
10832
|
+
return arguments.length ? (range = slice.call(_), rescale()) : range.slice();
|
|
10833
|
+
};
|
|
10834
|
+
|
|
10835
|
+
scale.quantiles = function() {
|
|
10836
|
+
return thresholds.slice();
|
|
10837
|
+
};
|
|
10838
|
+
|
|
10839
|
+
scale.copy = function() {
|
|
10840
|
+
return quantile()
|
|
10841
|
+
.domain(domain)
|
|
10842
|
+
.range(range);
|
|
10843
|
+
};
|
|
10844
|
+
|
|
10845
|
+
return scale;
|
|
12097
10846
|
}
|
|
12098
10847
|
|
|
12099
|
-
function
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
|
|
12103
|
-
|
|
10848
|
+
function quantize() {
|
|
10849
|
+
var x0 = 0,
|
|
10850
|
+
x1 = 1,
|
|
10851
|
+
n = 1,
|
|
10852
|
+
domain = [0.5],
|
|
10853
|
+
range = [0, 1];
|
|
10854
|
+
|
|
10855
|
+
function scale(x) {
|
|
10856
|
+
if (x <= x) return range[bisectRight(domain, x, 0, n)];
|
|
10857
|
+
}
|
|
10858
|
+
|
|
10859
|
+
function rescale() {
|
|
10860
|
+
var i = -1;
|
|
10861
|
+
domain = new Array(n);
|
|
10862
|
+
while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);
|
|
10863
|
+
return scale;
|
|
10864
|
+
}
|
|
10865
|
+
|
|
10866
|
+
scale.domain = function(_) {
|
|
10867
|
+
return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];
|
|
10868
|
+
};
|
|
10869
|
+
|
|
10870
|
+
scale.range = function(_) {
|
|
10871
|
+
return arguments.length ? (n = (range = slice.call(_)).length - 1, rescale()) : range.slice();
|
|
10872
|
+
};
|
|
10873
|
+
|
|
10874
|
+
scale.invertExtent = function(y) {
|
|
10875
|
+
var i = range.indexOf(y);
|
|
10876
|
+
return i < 0 ? [NaN, NaN]
|
|
10877
|
+
: i < 1 ? [x0, domain[0]]
|
|
10878
|
+
: i >= n ? [domain[n - 1], x1]
|
|
10879
|
+
: [domain[i - 1], domain[i]];
|
|
10880
|
+
};
|
|
10881
|
+
|
|
10882
|
+
scale.copy = function() {
|
|
10883
|
+
return quantize()
|
|
10884
|
+
.domain([x0, x1])
|
|
10885
|
+
.range(range);
|
|
10886
|
+
};
|
|
10887
|
+
|
|
10888
|
+
return linearish(scale);
|
|
12104
10889
|
}
|
|
12105
10890
|
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
return
|
|
12117
|
-
}
|
|
12118
|
-
displayable: function() {
|
|
12119
|
-
return (-0.5 <= this.r && this.r < 255.5)
|
|
12120
|
-
&& (-0.5 <= this.g && this.g < 255.5)
|
|
12121
|
-
&& (-0.5 <= this.b && this.b < 255.5)
|
|
12122
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
12123
|
-
},
|
|
12124
|
-
hex: rgb_formatHex, // Deprecated! Use color.formatHex.
|
|
12125
|
-
formatHex: rgb_formatHex,
|
|
12126
|
-
formatRgb: rgb_formatRgb,
|
|
12127
|
-
toString: rgb_formatRgb
|
|
12128
|
-
}));
|
|
10891
|
+
function threshold() {
|
|
10892
|
+
var domain = [0.5],
|
|
10893
|
+
range = [0, 1],
|
|
10894
|
+
n = 1;
|
|
10895
|
+
|
|
10896
|
+
function scale(x) {
|
|
10897
|
+
if (x <= x) return range[bisectRight(domain, x, 0, n)];
|
|
10898
|
+
}
|
|
10899
|
+
|
|
10900
|
+
scale.domain = function(_) {
|
|
10901
|
+
return arguments.length ? (domain = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();
|
|
10902
|
+
};
|
|
12129
10903
|
|
|
12130
|
-
function
|
|
12131
|
-
|
|
12132
|
-
}
|
|
10904
|
+
scale.range = function(_) {
|
|
10905
|
+
return arguments.length ? (range = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();
|
|
10906
|
+
};
|
|
12133
10907
|
|
|
12134
|
-
function
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
|
|
12138
|
-
|
|
12139
|
-
|
|
12140
|
-
|
|
10908
|
+
scale.invertExtent = function(y) {
|
|
10909
|
+
var i = range.indexOf(y);
|
|
10910
|
+
return [domain[i - 1], domain[i]];
|
|
10911
|
+
};
|
|
10912
|
+
|
|
10913
|
+
scale.copy = function() {
|
|
10914
|
+
return threshold()
|
|
10915
|
+
.domain(domain)
|
|
10916
|
+
.range(range);
|
|
10917
|
+
};
|
|
10918
|
+
|
|
10919
|
+
return scale;
|
|
12141
10920
|
}
|
|
12142
10921
|
|
|
12143
|
-
|
|
12144
|
-
|
|
12145
|
-
|
|
10922
|
+
var durationSecond = 1000,
|
|
10923
|
+
durationMinute = durationSecond * 60,
|
|
10924
|
+
durationHour = durationMinute * 60,
|
|
10925
|
+
durationDay = durationHour * 24,
|
|
10926
|
+
durationWeek = durationDay * 7,
|
|
10927
|
+
durationMonth = durationDay * 30,
|
|
10928
|
+
durationYear = durationDay * 365;
|
|
10929
|
+
|
|
10930
|
+
function date(t) {
|
|
10931
|
+
return new Date(t);
|
|
12146
10932
|
}
|
|
12147
10933
|
|
|
12148
|
-
function
|
|
12149
|
-
|
|
12150
|
-
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
12151
|
-
else if (s <= 0) h = NaN;
|
|
12152
|
-
return new Hsl(h, s, l, a);
|
|
10934
|
+
function number(t) {
|
|
10935
|
+
return t instanceof Date ? +t : +new Date(+t);
|
|
12153
10936
|
}
|
|
12154
10937
|
|
|
12155
|
-
function
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
|
|
12176
|
-
|
|
10938
|
+
function calendar(year, month, week, day, hour, minute, second, millisecond, format) {
|
|
10939
|
+
var scale = continuous(deinterpolateLinear, reinterpolate$1),
|
|
10940
|
+
invert = scale.invert,
|
|
10941
|
+
domain = scale.domain;
|
|
10942
|
+
|
|
10943
|
+
var formatMillisecond = format(".%L"),
|
|
10944
|
+
formatSecond = format(":%S"),
|
|
10945
|
+
formatMinute = format("%I:%M"),
|
|
10946
|
+
formatHour = format("%I %p"),
|
|
10947
|
+
formatDay = format("%a %d"),
|
|
10948
|
+
formatWeek = format("%b %d"),
|
|
10949
|
+
formatMonth = format("%B"),
|
|
10950
|
+
formatYear = format("%Y");
|
|
10951
|
+
|
|
10952
|
+
var tickIntervals = [
|
|
10953
|
+
[second, 1, durationSecond],
|
|
10954
|
+
[second, 5, 5 * durationSecond],
|
|
10955
|
+
[second, 15, 15 * durationSecond],
|
|
10956
|
+
[second, 30, 30 * durationSecond],
|
|
10957
|
+
[minute, 1, durationMinute],
|
|
10958
|
+
[minute, 5, 5 * durationMinute],
|
|
10959
|
+
[minute, 15, 15 * durationMinute],
|
|
10960
|
+
[minute, 30, 30 * durationMinute],
|
|
10961
|
+
[ hour, 1, durationHour ],
|
|
10962
|
+
[ hour, 3, 3 * durationHour ],
|
|
10963
|
+
[ hour, 6, 6 * durationHour ],
|
|
10964
|
+
[ hour, 12, 12 * durationHour ],
|
|
10965
|
+
[ day, 1, durationDay ],
|
|
10966
|
+
[ day, 2, 2 * durationDay ],
|
|
10967
|
+
[ week, 1, durationWeek ],
|
|
10968
|
+
[ month, 1, durationMonth ],
|
|
10969
|
+
[ month, 3, 3 * durationMonth ],
|
|
10970
|
+
[ year, 1, durationYear ]
|
|
10971
|
+
];
|
|
10972
|
+
|
|
10973
|
+
function tickFormat(date) {
|
|
10974
|
+
return (second(date) < date ? formatMillisecond
|
|
10975
|
+
: minute(date) < date ? formatSecond
|
|
10976
|
+
: hour(date) < date ? formatMinute
|
|
10977
|
+
: day(date) < date ? formatHour
|
|
10978
|
+
: month(date) < date ? (week(date) < date ? formatDay : formatWeek)
|
|
10979
|
+
: year(date) < date ? formatMonth
|
|
10980
|
+
: formatYear)(date);
|
|
12177
10981
|
}
|
|
12178
|
-
return new Hsl(h, s, l, o.opacity);
|
|
12179
|
-
}
|
|
12180
10982
|
|
|
12181
|
-
function
|
|
12182
|
-
|
|
12183
|
-
}
|
|
10983
|
+
function tickInterval(interval, start, stop, step) {
|
|
10984
|
+
if (interval == null) interval = 10;
|
|
12184
10985
|
|
|
12185
|
-
|
|
12186
|
-
|
|
12187
|
-
|
|
12188
|
-
|
|
12189
|
-
|
|
12190
|
-
}
|
|
10986
|
+
// If a desired tick count is specified, pick a reasonable tick interval
|
|
10987
|
+
// based on the extent of the domain and a rough estimate of tick size.
|
|
10988
|
+
// Otherwise, assume interval is already a time interval and use it.
|
|
10989
|
+
if (typeof interval === "number") {
|
|
10990
|
+
var target = Math.abs(stop - start) / interval,
|
|
10991
|
+
i = bisector(function(i) { return i[2]; }).right(tickIntervals, target);
|
|
10992
|
+
if (i === tickIntervals.length) {
|
|
10993
|
+
step = tickStep(start / durationYear, stop / durationYear, interval);
|
|
10994
|
+
interval = year;
|
|
10995
|
+
} else if (i) {
|
|
10996
|
+
i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
|
|
10997
|
+
step = i[1];
|
|
10998
|
+
interval = i[0];
|
|
10999
|
+
} else {
|
|
11000
|
+
step = Math.max(tickStep(start, stop, interval), 1);
|
|
11001
|
+
interval = millisecond;
|
|
11002
|
+
}
|
|
11003
|
+
}
|
|
12191
11004
|
|
|
12192
|
-
|
|
12193
|
-
brighter: function(k) {
|
|
12194
|
-
k = k == null ? brighter : Math.pow(brighter, k);
|
|
12195
|
-
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
12196
|
-
},
|
|
12197
|
-
darker: function(k) {
|
|
12198
|
-
k = k == null ? darker : Math.pow(darker, k);
|
|
12199
|
-
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
12200
|
-
},
|
|
12201
|
-
rgb: function() {
|
|
12202
|
-
var h = this.h % 360 + (this.h < 0) * 360,
|
|
12203
|
-
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
12204
|
-
l = this.l,
|
|
12205
|
-
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
12206
|
-
m1 = 2 * l - m2;
|
|
12207
|
-
return new Rgb(
|
|
12208
|
-
hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
12209
|
-
hsl2rgb(h, m1, m2),
|
|
12210
|
-
hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
12211
|
-
this.opacity
|
|
12212
|
-
);
|
|
12213
|
-
},
|
|
12214
|
-
displayable: function() {
|
|
12215
|
-
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
|
12216
|
-
&& (0 <= this.l && this.l <= 1)
|
|
12217
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
12218
|
-
},
|
|
12219
|
-
formatHsl: function() {
|
|
12220
|
-
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
12221
|
-
return (a === 1 ? "hsl(" : "hsla(")
|
|
12222
|
-
+ (this.h || 0) + ", "
|
|
12223
|
-
+ (this.s || 0) * 100 + "%, "
|
|
12224
|
-
+ (this.l || 0) * 100 + "%"
|
|
12225
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
11005
|
+
return step == null ? interval : interval.every(step);
|
|
12226
11006
|
}
|
|
12227
|
-
}));
|
|
12228
11007
|
|
|
12229
|
-
|
|
12230
|
-
|
|
12231
|
-
|
|
12232
|
-
: h < 180 ? m2
|
|
12233
|
-
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
12234
|
-
: m1) * 255;
|
|
12235
|
-
}
|
|
11008
|
+
scale.invert = function(y) {
|
|
11009
|
+
return new Date(invert(y));
|
|
11010
|
+
};
|
|
12236
11011
|
|
|
12237
|
-
|
|
12238
|
-
|
|
11012
|
+
scale.domain = function(_) {
|
|
11013
|
+
return arguments.length ? domain(map.call(_, number)) : domain().map(date);
|
|
11014
|
+
};
|
|
12239
11015
|
|
|
12240
|
-
|
|
12241
|
-
|
|
12242
|
-
|
|
12243
|
-
|
|
12244
|
-
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
11016
|
+
scale.ticks = function(interval, step) {
|
|
11017
|
+
var d = domain(),
|
|
11018
|
+
t0 = d[0],
|
|
11019
|
+
t1 = d[d.length - 1],
|
|
11020
|
+
r = t1 < t0,
|
|
11021
|
+
t;
|
|
11022
|
+
if (r) t = t0, t0 = t1, t1 = t;
|
|
11023
|
+
t = tickInterval(interval, t0, t1, step);
|
|
11024
|
+
t = t ? t.range(t0, t1 + 1) : []; // inclusive stop
|
|
11025
|
+
return r ? t.reverse() : t;
|
|
11026
|
+
};
|
|
12248
11027
|
|
|
12249
|
-
function
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
11028
|
+
scale.tickFormat = function(count, specifier) {
|
|
11029
|
+
return specifier == null ? tickFormat : format(specifier);
|
|
11030
|
+
};
|
|
11031
|
+
|
|
11032
|
+
scale.nice = function(interval, step) {
|
|
11033
|
+
var d = domain();
|
|
11034
|
+
return (interval = tickInterval(interval, d[0], d[d.length - 1], step))
|
|
11035
|
+
? domain(nice(d, interval))
|
|
11036
|
+
: scale;
|
|
11037
|
+
};
|
|
11038
|
+
|
|
11039
|
+
scale.copy = function() {
|
|
11040
|
+
return copy(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));
|
|
11041
|
+
};
|
|
11042
|
+
|
|
11043
|
+
return scale;
|
|
12261
11044
|
}
|
|
12262
11045
|
|
|
12263
|
-
function
|
|
12264
|
-
return
|
|
11046
|
+
function time() {
|
|
11047
|
+
return calendar(timeYear, timeMonth, sunday, timeDay, timeHour, timeMinute, utcSecond, utcMillisecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]);
|
|
12265
11048
|
}
|
|
12266
11049
|
|
|
12267
|
-
function
|
|
12268
|
-
|
|
12269
|
-
this.s = +s;
|
|
12270
|
-
this.l = +l;
|
|
12271
|
-
this.opacity = +opacity;
|
|
11050
|
+
function utcTime() {
|
|
11051
|
+
return calendar(utcYear$1, utcMonth$1, utcSunday, utcDay$1, utcHour$1, utcMinute$1, utcSecond, utcMillisecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]);
|
|
12272
11052
|
}
|
|
12273
11053
|
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
cosh = Math.cos(h),
|
|
12288
|
-
sinh = Math.sin(h);
|
|
12289
|
-
return new Rgb(
|
|
12290
|
-
255 * (l + a * (A * cosh + B * sinh)),
|
|
12291
|
-
255 * (l + a * (C * cosh + D * sinh)),
|
|
12292
|
-
255 * (l + a * (E * cosh)),
|
|
12293
|
-
this.opacity
|
|
12294
|
-
);
|
|
12295
|
-
}
|
|
12296
|
-
}));
|
|
11054
|
+
function colors(s) {
|
|
11055
|
+
return s.match(/.{6}/g).map(function(x) {
|
|
11056
|
+
return "#" + x;
|
|
11057
|
+
});
|
|
11058
|
+
}
|
|
11059
|
+
|
|
11060
|
+
var d3SchemeCategory10 = colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");
|
|
11061
|
+
|
|
11062
|
+
var d3SchemeCategory20b = colors("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6");
|
|
11063
|
+
|
|
11064
|
+
var d3SchemeCategory20c = colors("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9");
|
|
11065
|
+
|
|
11066
|
+
var d3SchemeCategory20 = colors("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5");
|
|
12297
11067
|
|
|
12298
|
-
var cubehelix = cubehelixLong(cubehelix$
|
|
11068
|
+
var cubehelix = cubehelixLong(cubehelix$3(300, 0.5, 0.0), cubehelix$3(-240, 0.5, 1.0));
|
|
12299
11069
|
|
|
12300
|
-
var warm = cubehelixLong(cubehelix$
|
|
11070
|
+
var warm = cubehelixLong(cubehelix$3(-100, 0.75, 0.35), cubehelix$3(80, 1.50, 0.8));
|
|
12301
11071
|
|
|
12302
|
-
var cool = cubehelixLong(cubehelix$
|
|
11072
|
+
var cool = cubehelixLong(cubehelix$3(260, 0.75, 0.35), cubehelix$3(80, 1.50, 0.8));
|
|
12303
11073
|
|
|
12304
|
-
var rainbow$1 = cubehelix$
|
|
11074
|
+
var rainbow$1 = cubehelix$3();
|
|
12305
11075
|
|
|
12306
11076
|
function rainbow$2(t) {
|
|
12307
11077
|
if (t < 0 || t > 1) t -= Math.floor(t);
|
|
@@ -12524,7 +11294,7 @@ function palette_rainbow(id, _colors, _steps) {
|
|
|
12524
11294
|
var scale_1 = linear()
|
|
12525
11295
|
.domain([0, subPaletteSize])
|
|
12526
11296
|
.range([prevColor, color])
|
|
12527
|
-
.interpolate(lab
|
|
11297
|
+
.interpolate(lab);
|
|
12528
11298
|
for (var i = 0; i < subPaletteSize; ++i) {
|
|
12529
11299
|
range.push(scale_1(i));
|
|
12530
11300
|
}
|
|
@@ -12650,16 +11420,16 @@ m_colorbrewer.RdWhGr = {
|
|
|
12650
11420
|
var ordinal = fetchOrdinalItem;
|
|
12651
11421
|
var rainbow = fetchRainbowItem;
|
|
12652
11422
|
function textColor(backgroundColor) {
|
|
12653
|
-
var rgb;
|
|
11423
|
+
var rgb$1;
|
|
12654
11424
|
switch (backgroundColor) {
|
|
12655
11425
|
case "":
|
|
12656
11426
|
case "transparent":
|
|
12657
|
-
rgb = rgb
|
|
11427
|
+
rgb$1 = rgb("white");
|
|
12658
11428
|
break;
|
|
12659
11429
|
default:
|
|
12660
|
-
rgb = rgb
|
|
11430
|
+
rgb$1 = rgb(backgroundColor);
|
|
12661
11431
|
}
|
|
12662
|
-
return ((rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114) > 149) ? "black" : "white";
|
|
11432
|
+
return ((rgb$1.r * 0.299 + rgb$1.g * 0.587 + rgb$1.b * 0.114) > 149) ? "black" : "white";
|
|
12663
11433
|
}
|
|
12664
11434
|
|
|
12665
11435
|
var Palette = /*#__PURE__*/Object.freeze({
|
|
@@ -16443,5 +15213,5 @@ function brush$1(dim) {
|
|
|
16443
15213
|
|
|
16444
15214
|
var d3Event = function () { return event; };
|
|
16445
15215
|
|
|
16446
|
-
export { BUILD_VERSION, Button, CanvasWidget, Class, Database, Entity, EntityCard, EntityPin, EntityRect, EntityRectList, EntityVertex, FAChar, FormatSpecifier, HTMLWidget, Icon, IconBar, Image$1 as Image, List, Menu, Meta, PKG_NAME, PKG_VERSION, Palette, Platform, ProgressBar, PropertyExt, ResizeSurface, SVGGlowFilter, SVGWidget, SVGZoomWidget, SelectDropDown, SelectionBar, SelectionButton, Shape, Spacer, StickyButton, Surface, Text, TextBox, TitleBar, ToggleButton, Utility, Widget, WidgetArray, active, ascending, autoType, bisectRight as bisect, bisectLeft, bisectRight, bisector, brush, brushSelection, brushX, brushY, point$1 as clientPoint, color
|
|
15216
|
+
export { BUILD_VERSION, Button, CanvasWidget, Class, Database, Entity, EntityCard, EntityPin, EntityRect, EntityRectList, EntityVertex, FAChar, FormatSpecifier, HTMLWidget, Icon, IconBar, Image$1 as Image, List, Menu, Meta, PKG_NAME, PKG_VERSION, Palette, Platform, ProgressBar, PropertyExt, ResizeSurface, SVGGlowFilter, SVGWidget, SVGZoomWidget, SelectDropDown, SelectionBar, SelectionButton, Shape, Spacer, StickyButton, Surface, Text, TextBox, TitleBar, ToggleButton, Utility, Widget, WidgetArray, active, d3Ascending as ascending, autoType, bisectRight$1 as bisect, bisectLeft, bisectRight$1 as bisectRight, bisector$1 as bisector, brush, brushSelection, brushX, brushY, point$1 as clientPoint, color, create$1 as create, creator, cross, csvFormat, csvFormatBody, csvFormatRow, csvFormatRows, csvFormatValue, csvParse, csvParseRows, cubehelix$3 as cubehelix, customEvent, d3Event, d3Descending as descending, d3Deviation as deviation, dispatch, d3Drag as drag, dragDisable, yesdrag as dragEnable, dsv as dsvFormat, backInOut as easeBack, backIn as easeBackIn, backInOut as easeBackInOut, backOut as easeBackOut, bounceOut as easeBounce, bounceIn as easeBounceIn, bounceInOut as easeBounceInOut, bounceOut as easeBounceOut, circleInOut as easeCircle, circleIn as easeCircleIn, circleInOut as easeCircleInOut, circleOut as easeCircleOut, cubicInOut as easeCubic, cubicIn as easeCubicIn, cubicInOut as easeCubicInOut, cubicOut as easeCubicOut, elasticOut as easeElastic, elasticIn as easeElasticIn, elasticInOut as easeElasticInOut, elasticOut as easeElasticOut, expInOut as easeExp, expIn as easeExpIn, expInOut as easeExpInOut, expOut as easeExpOut, linear$1 as easeLinear, polyInOut as easePoly, polyIn as easePolyIn, polyInOut as easePolyInOut, polyOut as easePolyOut, quadInOut as easeQuad, quadIn as easeQuadIn, quadInOut as easeQuadInOut, quadOut as easeQuadOut, sinInOut as easeSin, sinIn as easeSinIn, sinInOut as easeSinInOut, sinOut as easeSinOut, entries, event, extent, fontAwsesomeStyle, format, defaultLocale$1 as formatDefaultLocale, formatLocale$1 as formatLocale, formatPrefix, formatSpecifier, gray, hcl$2 as hcl, histogram, hsl$2 as hsl, interpolate$1 as interpolate, array$2 as interpolateArray, basis$1 as interpolateBasis, basisClosed as interpolateBasisClosed, cool as interpolateCool, cubehelix$2 as interpolateCubehelix, cubehelix as interpolateCubehelixDefault, cubehelixLong as interpolateCubehelixLong, date$1 as interpolateDate, discrete as interpolateDiscrete, hcl$1 as interpolateHcl, hclLong as interpolateHclLong, hsl$1 as interpolateHsl, hslLong as interpolateHslLong, hue as interpolateHue, inferno as interpolateInferno, lab as interpolateLab, magma as interpolateMagma, reinterpolate$1 as interpolateNumber, numberArray as interpolateNumberArray, object as interpolateObject, plasma as interpolatePlasma, rainbow$2 as interpolateRainbow, interpolateRgb, rgbBasis as interpolateRgbBasis, rgbBasisClosed as interpolateRgbBasisClosed, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, d3InterpolateViridis as interpolateViridis, warm as interpolateWarm, interpolateZoom, interrupt, formatIso$1 as isoFormat, parseIso$1 as isoParse, keys, lab$1 as lab, lch, local$1 as local, map$2 as map, matcher, d3Max as max, d3Mean as mean, d3Median as median, merge, d3Min as min, mouse, namespace, namespaces, d3Nest as nest, pairs, permute, piecewise, precisionFixed, precisionPrefix, precisionRound, publish, publishProxy, quantile$1 as quantile, quantize$1 as quantize, range, rgb, band as scaleBand, identity$1 as scaleIdentity, implicit as scaleImplicit, linear as scaleLinear, log as scaleLog, ordinal$1 as scaleOrdinal, point as scalePoint, pow as scalePow, quantile as scaleQuantile, quantize as scaleQuantize, sequential as scaleSequential, sqrt as scaleSqrt, threshold as scaleThreshold, time as scaleTime, utcTime as scaleUtc, scan, d3SchemeCategory10 as schemeCategory10, d3SchemeCategory20 as schemeCategory20, d3SchemeCategory20b as schemeCategory20b, d3SchemeCategory20c as schemeCategory20c, select, selectAll, selection, selector, selectorAll, set, shuffle, styleValue as style, d3Sum as sum, freedmanDiaconis as thresholdFreedmanDiaconis, scott as thresholdScott, sturges as thresholdSturges, tickIncrement$1 as tickIncrement, tickStep$1 as tickStep, ticks$1 as ticks, timeFormat, defaultLocale as timeFormatDefaultLocale, formatLocale as timeFormatLocale, timeParse, touch, touches, transition, transpose, tsvFormat, tsvFormatBody, tsvFormatRow, tsvFormatRows, tsvFormatValue, tsvParse, tsvParseRows, utcFormat, utcParse, d3Values as values, d3Variance as variance, defaultView as window, zip, d3Zoom as zoom, identity as zoomIdentity, transform as zoomTransform };
|
|
16447
15217
|
//# sourceMappingURL=index.es6.js.map
|