diff --git a/d3-legend.js b/d3-legend.js index ca53531..05a71e1 100644 --- a/d3-legend.js +++ b/d3-legend.js @@ -464,11 +464,11 @@ })); },{}],2:[function(require,module,exports){ -// https://d3js.org/d3-collection/ Version 1.0.2. Copyright 2016 Mike Bostock. +// https://d3js.org/d3-collection/ Version 1.0.4. Copyright 2017 Mike Bostock. (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); }(this, (function (exports) { 'use strict'; var prefix = "$"; @@ -553,10 +553,10 @@ var nest = function() { nest; function apply(array, depth, createResult, setResult) { - if (depth >= keys.length) return rollup != null - ? rollup(array) : (sortValues != null - ? array.sort(sortValues) - : array); + if (depth >= keys.length) { + if (sortValues != null) array.sort(sortValues); + return rollup != null ? rollup(array) : array; + } var i = -1, n = array.length, @@ -683,11 +683,11 @@ Object.defineProperty(exports, '__esModule', { value: true }); }))); },{}],3:[function(require,module,exports){ -// https://d3js.org/d3-color/ Version 1.0.2. Copyright 2016 Mike Bostock. +// https://d3js.org/d3-color/ Version 1.0.3. Copyright 2017 Mike Bostock. (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); }(this, (function (exports) { 'use strict'; var define = function(constructor, factory, prototype) { @@ -1634,11 +1634,11 @@ Object.defineProperty(exports, '__esModule', { value: true }); })); },{}],6:[function(require,module,exports){ -// https://d3js.org/d3-interpolate/ Version 1.1.2. Copyright 2016 Mike Bostock. +// https://d3js.org/d3-interpolate/ Version 1.1.5. Copyright 2017 Mike Bostock. (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-color')) : - typeof define === 'function' && define.amd ? define(['exports', 'd3-color'], factory) : - (factory((global.d3 = global.d3 || {}),global.d3)); + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-color')) : + typeof define === 'function' && define.amd ? define(['exports', 'd3-color'], factory) : + (factory((global.d3 = global.d3 || {}),global.d3)); }(this, (function (exports,d3Color) { 'use strict'; function basis(t1, v0, v1, v2, v3) { @@ -1707,14 +1707,14 @@ function nogamma(a, b) { return d ? linear(a, d) : constant(isNaN(a) ? b : a); } -var rgb$1 = (function rgbGamma(y) { +var rgb$1 = ((function rgbGamma(y) { var color$$1 = gamma(y); function rgb$$1(start, end) { var r = color$$1((start = d3Color.rgb(start)).r, (end = d3Color.rgb(end)).r), g = color$$1(start.g, end.g), b = color$$1(start.b, end.b), - opacity = color$$1(start.opacity, end.opacity); + opacity = nogamma(start.opacity, end.opacity); return function(t) { start.r = r(t); start.g = g(t); @@ -1727,7 +1727,7 @@ var rgb$1 = (function rgbGamma(y) { rgb$$1.gamma = rgbGamma; return rgb$$1; -})(1); +}))(1); function rgbSpline(spline) { return function(colors) { @@ -1880,7 +1880,7 @@ var value = function(a, b) { : b instanceof d3Color.color ? rgb$1 : b instanceof Date ? date : Array.isArray(b) ? array - : isNaN(b) ? object + : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object : number)(a, b); }; @@ -4058,11 +4058,11 @@ Object.defineProperty(exports, '__esModule', { value: true }); })); },{}],9:[function(require,module,exports){ -// https://d3js.org/d3-time-format/ Version 2.0.3. Copyright 2016 Mike Bostock. +// https://d3js.org/d3-time-format/ Version 2.1.0. Copyright 2017 Mike Bostock. (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-time')) : - typeof define === 'function' && define.amd ? define(['exports', 'd3-time'], factory) : - (factory((global.d3 = global.d3 || {}),global.d3)); + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-time')) : + typeof define === 'function' && define.amd ? define(['exports', 'd3-time'], factory) : + (factory((global.d3 = global.d3 || {}),global.d3)); }(this, (function (exports,d3Time) { 'use strict'; function localDate(d) { @@ -4116,6 +4116,7 @@ function formatLocale(locale) { "c": null, "d": formatDayOfMonth, "e": formatDayOfMonth, + "f": formatMicroseconds, "H": formatHour24, "I": formatHour12, "j": formatDayOfYear, @@ -4123,9 +4124,13 @@ function formatLocale(locale) { "m": formatMonthNumber, "M": formatMinutes, "p": formatPeriod, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, "S": formatSeconds, + "u": formatWeekdayNumberMonday, "U": formatWeekNumberSunday, - "w": formatWeekdayNumber, + "V": formatWeekNumberISO, + "w": formatWeekdayNumberSunday, "W": formatWeekNumberMonday, "x": null, "X": null, @@ -4143,6 +4148,7 @@ function formatLocale(locale) { "c": null, "d": formatUTCDayOfMonth, "e": formatUTCDayOfMonth, + "f": formatUTCMicroseconds, "H": formatUTCHour24, "I": formatUTCHour12, "j": formatUTCDayOfYear, @@ -4150,9 +4156,13 @@ function formatLocale(locale) { "m": formatUTCMonthNumber, "M": formatUTCMinutes, "p": formatUTCPeriod, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, "S": formatUTCSeconds, + "u": formatUTCWeekdayNumberMonday, "U": formatUTCWeekNumberSunday, - "w": formatUTCWeekdayNumber, + "V": formatUTCWeekNumberISO, + "w": formatUTCWeekdayNumberSunday, "W": formatUTCWeekNumberMonday, "x": null, "X": null, @@ -4170,6 +4180,7 @@ function formatLocale(locale) { "c": parseLocaleDateTime, "d": parseDayOfMonth, "e": parseDayOfMonth, + "f": parseMicroseconds, "H": parseHour24, "I": parseHour24, "j": parseDayOfYear, @@ -4177,9 +4188,13 @@ function formatLocale(locale) { "m": parseMonthNumber, "M": parseMinutes, "p": parsePeriod, + "Q": parseUnixTimestamp, + "s": parseUnixTimestampSeconds, "S": parseSeconds, + "u": parseWeekdayNumberMonday, "U": parseWeekNumberSunday, - "w": parseWeekdayNumber, + "V": parseWeekNumberISO, + "w": parseWeekdayNumberSunday, "W": parseWeekNumberMonday, "x": parseLocaleDate, "X": parseLocaleTime, @@ -4228,16 +4243,38 @@ function formatLocale(locale) { function newParse(specifier, newDate) { return function(string) { var d = newYear(1900), - i = parseSpecifier(d, specifier, string += "", 0); + i = parseSpecifier(d, specifier, string += "", 0), + week, day; if (i != string.length) return null; + // If a UNIX timestamp is specified, return it. + if ("Q" in d) return new Date(d.Q); + // The am-pm flag is 0 for AM, and 1 for PM. if ("p" in d) d.H = d.H % 12 + d.p * 12; // Convert day-of-week and week-of-year to day-of-year. - if ("W" in d || "U" in d) { - if (!("w" in d)) d.w = "W" in d ? 1 : 0; - var day = "Z" in d ? utcDate(newYear(d.y)).getUTCDay() : newDate(newYear(d.y)).getDay(); + if ("V" in d) { + if (d.V < 1 || d.V > 53) return null; + if (!("w" in d)) d.w = 1; + if ("Z" in d) { + week = utcDate(newYear(d.y)), day = week.getUTCDay(); + week = day > 4 || day === 0 ? d3Time.utcMonday.ceil(week) : d3Time.utcMonday(week); + week = d3Time.utcDay.offset(week, (d.V - 1) * 7); + d.y = week.getUTCFullYear(); + d.m = week.getUTCMonth(); + d.d = week.getUTCDate() + (d.w + 6) % 7; + } else { + week = newDate(newYear(d.y)), day = week.getDay(); + week = day > 4 || day === 0 ? d3Time.timeMonday.ceil(week) : d3Time.timeMonday(week); + week = d3Time.timeDay.offset(week, (d.V - 1) * 7); + d.y = week.getFullYear(); + d.m = week.getMonth(); + d.d = week.getDate() + (d.w + 6) % 7; + } + } else if ("W" in d || "U" in d) { + if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; + day = "Z" in d ? utcDate(newYear(d.y)).getUTCDay() : newDate(newYear(d.y)).getDay(); d.m = 0; d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7; } @@ -4381,7 +4418,7 @@ function formatLocale(locale) { var pads = {"-": "", "_": " ", "0": "0"}; var numberRe = /^\s*\d+/; var percentRe = /^%/; -var requoteRe = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g; +var requoteRe = /[\\^$*+?|[\]().{}]/g; function pad(value, fill, width) { var sign = value < 0 ? "-" : "", @@ -4404,18 +4441,28 @@ function formatLookup(names) { return map; } -function parseWeekdayNumber(d, string, i) { +function parseWeekdayNumberSunday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 1)); return n ? (d.w = +n[0], i + n[0].length) : -1; } +function parseWeekdayNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.u = +n[0], i + n[0].length) : -1; +} + function parseWeekNumberSunday(d, string, i) { - var n = numberRe.exec(string.slice(i)); + var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.U = +n[0], i + n[0].length) : -1; } +function parseWeekNumberISO(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.V = +n[0], i + n[0].length) : -1; +} + function parseWeekNumberMonday(d, string, i) { - var n = numberRe.exec(string.slice(i)); + var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.W = +n[0], i + n[0].length) : -1; } @@ -4430,7 +4477,7 @@ function parseYear(d, string, i) { } function parseZone(d, string, i) { - var n = /^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(string.slice(i, i + 6)); + var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; } @@ -4469,11 +4516,26 @@ function parseMilliseconds(d, string, i) { return n ? (d.L = +n[0], i + n[0].length) : -1; } +function parseMicroseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 6)); + return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; +} + function parseLiteralPercent(d, string, i) { var n = percentRe.exec(string.slice(i, i + 1)); return n ? i + n[0].length : -1; } +function parseUnixTimestamp(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.Q = +n[0], i + n[0].length) : -1; +} + +function parseUnixTimestampSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.Q = (+n[0]) * 1000, i + n[0].length) : -1; +} + function formatDayOfMonth(d, p) { return pad(d.getDate(), p, 2); } @@ -4494,6 +4556,10 @@ function formatMilliseconds(d, p) { return pad(d.getMilliseconds(), p, 3); } +function formatMicroseconds(d, p) { + return formatMilliseconds(d, p) + "000"; +} + function formatMonthNumber(d, p) { return pad(d.getMonth() + 1, p, 2); } @@ -4506,11 +4572,22 @@ function formatSeconds(d, p) { return pad(d.getSeconds(), p, 2); } +function formatWeekdayNumberMonday(d) { + var day = d.getDay(); + return day === 0 ? 7 : day; +} + function formatWeekNumberSunday(d, p) { return pad(d3Time.timeSunday.count(d3Time.timeYear(d), d), p, 2); } -function formatWeekdayNumber(d) { +function formatWeekNumberISO(d, p) { + var day = d.getDay(); + d = (day >= 4 || day === 0) ? d3Time.timeThursday(d) : d3Time.timeThursday.ceil(d); + return pad(d3Time.timeThursday.count(d3Time.timeYear(d), d) + (d3Time.timeYear(d).getDay() === 4), p, 2); +} + +function formatWeekdayNumberSunday(d) { return d.getDay(); } @@ -4553,6 +4630,10 @@ function formatUTCMilliseconds(d, p) { return pad(d.getUTCMilliseconds(), p, 3); } +function formatUTCMicroseconds(d, p) { + return formatUTCMilliseconds(d, p) + "000"; +} + function formatUTCMonthNumber(d, p) { return pad(d.getUTCMonth() + 1, p, 2); } @@ -4565,11 +4646,22 @@ function formatUTCSeconds(d, p) { return pad(d.getUTCSeconds(), p, 2); } +function formatUTCWeekdayNumberMonday(d) { + var dow = d.getUTCDay(); + return dow === 0 ? 7 : dow; +} + function formatUTCWeekNumberSunday(d, p) { return pad(d3Time.utcSunday.count(d3Time.utcYear(d), d), p, 2); } -function formatUTCWeekdayNumber(d) { +function formatUTCWeekNumberISO(d, p) { + var day = d.getUTCDay(); + d = (day >= 4 || day === 0) ? d3Time.utcThursday(d) : d3Time.utcThursday.ceil(d); + return pad(d3Time.utcThursday.count(d3Time.utcYear(d), d) + (d3Time.utcYear(d).getUTCDay() === 4), p, 2); +} + +function formatUTCWeekdayNumberSunday(d) { return d.getUTCDay(); } @@ -4593,7 +4685,15 @@ function formatLiteralPercent() { return "%"; } -var locale$1; +function formatUnixTimestamp(d) { + return +d; +} + +function formatUnixTimestampSeconds(d) { + return Math.floor(+d / 1000); +} + +var locale; @@ -4611,12 +4711,12 @@ defaultLocale({ }); function defaultLocale(definition) { - locale$1 = formatLocale(definition); - exports.timeFormat = locale$1.format; - exports.timeParse = locale$1.parse; - exports.utcFormat = locale$1.utcFormat; - exports.utcParse = locale$1.utcParse; - return locale$1; + locale = formatLocale(definition); + exports.timeFormat = locale.format; + exports.timeParse = locale.parse; + exports.utcFormat = locale.utcFormat; + exports.utcParse = locale.utcParse; + return locale; } var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; @@ -4648,11 +4748,11 @@ Object.defineProperty(exports, '__esModule', { value: true }); }))); },{"d3-time":10}],10:[function(require,module,exports){ -// https://d3js.org/d3-time/ Version 1.0.4. Copyright 2016 Mike Bostock. +// https://d3js.org/d3-time/ Version 1.0.7. Copyright 2017 Mike Bostock. (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.d3 = global.d3 || {}))); + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.d3 = global.d3 || {}))); }(this, (function (exports) { 'use strict'; var t0 = new Date; @@ -4693,7 +4793,13 @@ function newInterval(floori, offseti, count, field) { return newInterval(function(date) { if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); }, function(date, step) { - if (date >= date) while (--step >= 0) while (offseti(date, 1), !test(date)) {} // eslint-disable-line no-empty + if (date >= date) { + if (step < 0) while (++step <= 0) { + while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty + } else while (--step >= 0) { + while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty + } + } }); }; @@ -5131,20 +5237,18 @@ function color() { //positions cells and text if (orient === "vertical") { - (function () { - var cellSize = textSize.map(function (d, i) { - return Math.max(d.height, shapeSize[i].height); - }); + var cellSize = textSize.map(function (d, i) { + return Math.max(d.height, shapeSize[i].height); + }); - cellTrans = function cellTrans(d, i) { - var height = (0, _d3Array.sum)(cellSize.slice(0, i)); - return 'translate(0, ' + (height + i * shapePadding) + ')'; - }; + cellTrans = function cellTrans(d, i) { + var height = (0, _d3Array.sum)(cellSize.slice(0, i)); + return 'translate(0, ' + (height + i * shapePadding) + ')'; + }; - textTrans = function textTrans(d, i) { - return 'translate( ' + (shapeSize[i].width + shapeSize[i].x + labelOffset) + ', ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; - }; - })(); + textTrans = function textTrans(d, i) { + return 'translate( ' + (shapeSize[i].width + shapeSize[i].x + labelOffset) + ', ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; + }; } else if (orient === "horizontal") { cellTrans = function cellTrans(d, i) { return 'translate(' + i * (shapeSize[i].width + shapePadding) + ',0)'; @@ -5678,21 +5782,19 @@ function size() { //positions cells and text if (orient === "vertical") { - (function () { - var cellSize = textSize.map(function (d, i) { - return Math.max(d.height, shapeSize[i].height); - }); - var y = shape == "circle" || shape == "line" ? shapeSize[0].height / 2 : 0; - cellTrans = function cellTrans(d, i) { - var height = (0, _d3Array.sum)(cellSize.slice(0, i)); + var cellSize = textSize.map(function (d, i) { + return Math.max(d.height, shapeSize[i].height); + }); + var y = shape == "circle" || shape == "line" ? shapeSize[0].height / 2 : 0; + cellTrans = function cellTrans(d, i) { + var height = (0, _d3Array.sum)(cellSize.slice(0, i)); - return 'translate(0, ' + (y + height + i * shapePadding) + ')'; - }; + return 'translate(0, ' + (y + height + i * shapePadding) + ')'; + }; - textTrans = function textTrans(d, i) { - return 'translate( ' + (maxW + labelOffset) + ',\n ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; - }; - })(); + textTrans = function textTrans(d, i) { + return 'translate( ' + (maxW + labelOffset) + ',\n ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; + }; } else if (orient === "horizontal") { cellTrans = function cellTrans(d, i) { var width = (0, _d3Array.sum)(shapeSize.slice(0, i), function (d) { @@ -5929,19 +6031,17 @@ function symbol() { //positions cells and text if (orient === "vertical") { - (function () { - var cellSize = textSize.map(function (d, i) { - return Math.max(maxH, d.height); - }); + var cellSize = textSize.map(function (d, i) { + return Math.max(maxH, d.height); + }); - cellTrans = function cellTrans(d, i) { - var height = (0, _d3Array.sum)(cellSize.slice(0, i)); - return 'translate(0, ' + (height + i * shapePadding) + ' )'; - }; - textTrans = function textTrans(d, i) { - return 'translate( ' + (maxW + labelOffset) + ',\n ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; - }; - })(); + cellTrans = function cellTrans(d, i) { + var height = (0, _d3Array.sum)(cellSize.slice(0, i)); + return 'translate(0, ' + (height + i * shapePadding) + ' )'; + }; + textTrans = function textTrans(d, i) { + return 'translate( ' + (maxW + labelOffset) + ',\n ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; + }; } else if (orient === "horizontal") { cellTrans = function cellTrans(d, i) { return 'translate( ' + i * (maxW + shapePadding) + ',0)'; @@ -6088,4 +6188,4 @@ d3.legendSymbol = _symbol2.default; d3.legendHelpers = _helpers2.default; },{"./color":11,"./helpers":12,"./size":14,"./symbol":15}]},{},[16]) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvZDMtYXJyYXkvYnVpbGQvZDMtYXJyYXkuanMiLCJub2RlX21vZHV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pKSB7XG4gICAgICAgICAgZCA9IGEgLSBtO1xuICAgICAgICAgIG0gKz0gZCAvICsrajtcbiAgICAgICAgICBzICs9IGQgKiAoYSAtIG0pO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgZWxzZSB7XG4gICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICBpZiAoIWlzTmFOKGEgPSBudW1iZXIoZihhcnJheVtpXSwgaSwgYXJyYXkpKSkpIHtcbiAgICAgICAgICBkID0gYSAtIG07XG4gICAgICAgICAgbSArPSBkIC8gKytqO1xuICAgICAgICAgIHMgKz0gZCAqIChhIC0gbSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoaiA+IDEpIHJldHVybiBzIC8gKGogLSAxKTtcbiAgfVxuXG4gIGZ1bmN0aW9uIGRldmlhdGlvbihhcnJheSwgZikge1xuICAgIHZhciB2ID0gdmFyaWFuY2UoYXJyYXksIGYpO1xuICAgIHJldHVybiB2ID8gTWF0aC5zcXJ0KHYpIDogdjtcbiAgfVxuXG4gIGZ1bmN0aW9uIGV4dGVudChhcnJheSwgZikge1xuICAgIHZhciBpID0gLTEsXG4gICAgICAgIG4gPSBhcnJheS5sZW5ndGgsXG4gICAgICAgIGEsXG4gICAgICAgIGIsXG4gICAgICAgIGM7XG5cbiAgICBpZiAoZiA9PSBudWxsKSB7XG4gICAgICB3aGlsZSAoKytpIDwgbikgaWYgKChiID0gYXJyYXlbaV0pICE9IG51bGwgJiYgYiA+PSBiKSB7IGEgPSBjID0gYjsgYnJlYWs7IH1cbiAgICAgIHdoaWxlICgrK2kgPCBuKSBpZiAoKGIgPSBhcnJheVtpXSkgIT0gbnVsbCkge1xuICAgICAgICBpZiAoYSA+IGIpIGEgPSBiO1xuICAgICAgICBpZiAoYyA8IGIpIGMgPSBiO1xuICAgICAgfVxuICAgIH1cblxuICAgIGVsc2Uge1xuICAgICAgd2hpbGUgKCsraSA8IG4pIGlmICgoYiA9IGY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ZXNbaV0gPSBhcnJheVtpbmRleGVzW2ldXTtcbiAgICByZXR1cm4gcGVybXV0ZXM7XG4gIH1cblxuICBmdW5jdGlvbiBzY2FuKGFycmF5LCBjb21wYXJlKSB7XG4gICAgaWYgKCEobiA9IGFycmF5Lmxlbmd0aCkpIHJldHVybjtcbiAgICB2YXIgaSA9IDAsXG4gICAgICAgIG4sXG4gICAgICAgIGogPSAwLFxuICAgICAgICB4aSxcbiAgICAgICAgeGogPSBhcnJheVtqXTtcblxuICAgIGlmICghY29tcGFyZSkgY29tcGFyZSA9IGFzY2VuZGluZztcblxuICAgIHdoaWxlICgrK2kgPCBuKSBpZiAoY29tcGFyZSh4aSA9IGFycmF5W2ldLCB4aikgPCAwIHx8IGNvbXBhcmUoeGosIHhqKSAhPT0gMCkgeGogPSB4aSwgaiA9IGk7XG5cbiAgICBpZiAoY29tcGFyZSh4aiwgeGopID09PSAwKSByZXR1cm4gajtcbiAgfVxuXG4gIGZ1bmN0aW9uIHNodWZmbGUoYXJyYXksIGkwLCBpMSkge1xuICAgIHZhciBtID0gKGkxID09IG51bGwgPyBhcnJheS5sZW5ndGggOiBpMSkgLSAoaTAgPSBpMCA9PSBudWxsID8gMCA6ICtpMCksXG4gICAgICAgIHQsXG4gICAgICAgIGk7XG5cbiAgICB3aGlsZSAobSkge1xuICAgICAgaSA9IE1hdGgucmFuZG9tKCkgKiBtLS0gfCAwO1xuICAgICAgdCA9IGFycmF5W20gKyBpMF07XG4gICAgICBhcnJheVttICsgaTBdID0gYXJyYXlbaSArIGkwXTtcbiAgICAgIGFycmF5W2kgKyBpMF0gPSB0O1xuICAgIH1cblxuICAgIHJldHVybiBhcnJheTtcbiAgfVxuXG4gIGZ1bmN0aW9uIHN1bShhcnJheSwgZikge1xuICAgIHZhciBzID0gMCxcbiAgICAgICAgbiA9IGFycmF5Lmxlbmd0aCxcbiAgICAgICAgYSxcbiAgICAgICAgaSA9IC0xO1xuXG4gICAgaWYgKGYgPT0gbnVsbCkge1xuIC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Chwb3dzKTtcbiAgICAgIHJldHVybiBzY2FsZTtcbiAgICB9XG5cbiAgICBzY2FsZS5iYXNlID0gZnVuY3Rpb24oXykge1xuICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoYmFzZSA9ICtfLCByZXNjYWxlKCkpIDogYmFzZTtcbiAgICB9O1xuXG4gICAgc2NhbGUuZG9tYWluID0gZnVuY3Rpb24oXykge1xuICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZG9tYWluKF8pLCByZXNjYWxlKCkpIDogZG9tYWluKCk7XG4gICAgfTtcblxuICAgIHNjYWxlLnRpY2tzID0gZnVuY3Rpb24oY291bnQpIHtcbiAgICAgIHZhciBkID0gZG9tYWluKCksXG4gICAgICAgICAgdSA9IGRbMF0sXG4gICAgICAgICAgdiA9IGRbZC5sZW5ndGggLSAxXSxcbiAgICAgICAgICByO1xuXG4gICAgICBpZiAociA9IHYgPCB1KSBpID0gdSwgdSA9IHYsIHYgPSBpO1xuXG4gICAgICB2YXIgaSA9IGxvZ3ModSksXG4gICAgICAgICAgaiA9IGxvZ3ModiksXG4gICAgICAgICAgcCxcbiAgICAgICAgICBrLFxuICAgICAgICAgIHQsXG4gICAgICAgICAgbiA9IGNvdW50ID09IG51bGwgPyAxMCA6ICtjb3VudCxcbiAgICAgICAgICB6ID0gW107XG5cbiAgICAgIGlmICghKGJhc2UgJSAxKSAmJiBqIC0gaSA8IG4pIHtcbiAgICAgICAgaSA9IE1hdGgucm91bmQoaSkgLSAxLCBqID0gTWF0aC5yb3VuZChqKSArIDE7XG4gICAgICAgIGlmICh1ID4gMCkgZm9yICg7IGkgPCBqOyArK2kpIHtcbiAgICAgICAgICBmb3IgKGsgPSAxLCBwID0gcG93cyhpKTsgayA8IGJhc2U7ICsraykge1xuICAgICAgICAgICAgdCA9IHAgKiBrO1xuICAgICAgICAgICAgaWYgKHQgPCB1KSBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICh0ID4gdikgYn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9IGQgLyBwb3dzKE1hdGgucm91bmQobG9ncyhkKSkpO1xuICAgICAgICBpZiAoaSAqIGJhc2UgPCBiYXNlIC0gMC41KSBpICo9IGJhc2U7XG4gICAgICAgIHJldHVybiBpIDw9IGsgPyBzcGVjaWZpZXIoZCkgOiBcIlwiO1xuICAgICAgfTtcbiAgICB9O1xuXG4gICAgc2NhbGUubmljZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgcmV0dXJuIGRvbWFpbihuaWNlKGRvbWFpbigpLCB7XG4gICAgICAgIGZsb29yOiBmdW5jdGlvbih4KSB7IHJldHVybiBwb3dzKE1hdGguZmxvb3IobG9ncyh4KSkpOyB9LFxuICAgICAgICBjZWlsOiBmdW5jdGlvbih4KSB7IHJldHVybiBwb3dzKE1hdGguY2VpbChsb2dzKHgpKSk7IH1cbiAgICAgIH0pKTtcbiAgICB9O1xuXG4gICAgc2NhbGUuY29weSA9IGZ1bmN0aW9uKCkge1xuICAgICAgcmV0dXJuIGNvcHkoc2NhbGUsIGxvZygpLmJhc2UoYmFzZSkpO1xuICAgIH07XG5cbiAgICByZXR1cm4gc2NhbGU7XG4gIH1cblxuICBmdW5jdGlvbiByYWlzZSh4LCBleHBvbmVudCkge1xuICAgIHJldHVybiB4IDwgMCA/IC1NYXRoLnBvdygteCwgZXhwb25lbnQpIDogTWF0aC5wb3coeCwgZXhwb25lbnQpO1xuICB9XG5cbiAgZnVuY3Rpb24gcG93KCkge1xuICAgIHZhciBleHBvbmVudCA9IDEsXG4gICAgICAgIHNjYWxlID0gY29udGludW91cyhkZWludGVycG9sYXRlLCByZWludGVycG9sYXRlKSxcbiAgICAgICAgZG9tYWluID0gc2NhbGUuZG9tYWluO1xuXG4gICAgZnVuY3Rpb24gZGVpbnRlcnBvbGF0ZShhLCBiKSB7XG4gICAgICByZXR1cm4gKGIgPSByYWlzZShiLCBleHBvbmVudCkgLSAoYSA9IHJhaXNlKGEsIGV4cG9uZW50KSkpXG4gICAgICAgICAgPyBmdW5jdGl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O1xuICAgIGkgPSBmdW5jdGlvbih0KSB7XG4gICAgICByZXR1cm4gW1xuICAgICAgICB1eDAgKyB0ICogZHgsXG4gICAgICAgIHV5MCArIHQgKiBkeSxcbiAgICAgICAgdzAgKiBNYXRoLmV4cChyaG8gKiB0ICogUylcbiAgICAgIF07XG4gICAgfTtcbiAgfVxuXG4gIC8vIEdlbmVyYWwgY2FzZS5cbiAgZWxzZSB7XG4gICAgdmFyIGQxID0gTWF0aC5zcXJ0KGQyKSxcbiAgICAgICAgYjAgPSAodzEgKiB3MSAtIHcwICogdzAgKyByaG80ICogZDIpIC8gKDIgKiB3MCAqIHJobzIgKiBkMSksXG4gICAgICAgIGIxID0gKHcxICogdzEgLSB3MCAqIHcwIC0gcmhvNCAqIGQyKSAvICgyICogdzEgKiByaG8yICogZDEpLFxuICAgICAgICByMCA9IE1hdGgubG9nKE1hdGguc3FydChiMCAqIGIwICsgMSkgLSBiMCksXG4gICAgICAgIHIxID0gTWF0aC5sb2coTWF0aC5zcXJ0KGIxICogYjEgKyAxKSAtIGIxKTtcbiAgICBTID0gKHIxIC0gcjApIC8gcmhvO1xuICAgIGkgPSBmdW5jdGlvbih0KSB7XG4gICAgICB2YXIgcyA9IHQgKiBTLFxuICAgICAgICAgIGNvc2hyMCA9IGNvc2gocjApLFxuICAgICAgICAgIHUgPSB3MCAvIChyaG8yICogZDEpICogKGNvc2hyMCAqIHRhbmgocmhvICogcyArIHIwKSAtIHNpbmgocjApKTtcbiAgICAgIHJldHVybiBbXG4gICAgICAgIHV4MCArIHUgKiBkeCxcbiAgICAgICAgdXkwICsgdSAqIGR5LFxuICAgICAgICB3MCAqIGNvc2hyMCAvIGNvc2gocmhvICogcyArIHIwKVxuICAgICAgXTtcbiAgICB9O1xuICB9XG5cbiAgaS5kdXJhdGlvbiA9IFMgKiAxMDAwO1xuXG4gIHJldHVybiBpO1xufTtcblxuZnVuY3Rpb24gaHNsJDEoaHVlJCQxKSB7XG4gIHJldHVybiBmdW5jdGlvb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tcblxuICAgIHNjYWxlLnJhbmdlID0gZnVuY3Rpb24oXykge1xuICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAocmFuZ2UgPSBzbGljZS5jYWxsKF8pLCBzY2FsZSkgOiByYW5nZS5zbGljZSgpO1xuICAgIH07XG5cbiAgICBzY2FsZS51bmtub3duID0gZnVuY3Rpb24oXykge1xuICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAodW5rbm93biA9IF8sIHNjYWxlKSA6IHVua25vd247XG4gICAgfTtcblxuICAgIHNjYWxlLmNvcHkgPSBmdW5jdGlvbigpIHtcbiAgICAgIHJldHVybiBvcmRpbmFsKClcbiAgICAgICAgICAuZG9tYWluKGRvbWFpbilcbiAgICAgICAgICAucmFuZ2UocmFuZ2UpXG4gICAgICAgICAgLnVua25vd24odW5rbm93bik7XG4gICAgfTtcblxuICAgIHJldHVybiBzY2FsZTtcbiAgfVxuXG4gIGZ1bmN0aW9uIGJhbmQoKSB7XG4gICAgdmFyIHNjYWxlID0gb3JkaW5hbCgpLnVua25vd24odW5kZWZpbmVkKSxcbiAgICAgICAgZG9tYWluID0gc2NhbGUuZG9tYWluLFxuICAgICAgICBvcmRpbmFsUmFuZ2UgPSBzY2FsZS5yYW5nZSxcbiAgICAgICAgcmFuZ2UgPSBbMCwgMV0sXG4gICAgICAgIHN0ZXAsXG4gICAgICAgIGJhbmR3aWR0aCxcbiAgICAgICAgcm91bmQgPSBmYWxzZSxcbiAgICAgICAgcGFkZGluZ0lubmVyID0gMCxcbiAgICAgICAgcGFkZGluZ091dGVyID0gMCxcbiAgICAgICAgYWxpZ24gPSAwLjU7XG5cbiAgICBkZWxldGUgc2NhbGUudW5rbm93bjtcblxuICAgIGZ1bmN0aW9uIHJlc2NhbGUoKSB7XG4gICAgICB2YXIgbiA9IGRvbWFpbigpLmxlbmd0aCxcbiAgICAgICAgICByZXZlcnNlID0gcmFuZ2VbMV0gPCByYW5nZVswXSxcbiAgICAgICAg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pIHtcbiAgICAgIHJldHVybiAreDtcbiAgICB9XG5cbiAgICBzY2FsZS5pbnZlcnQgPSBzY2FsZTtcblxuICAgIHNjYWxlLmRvbWFpbiA9IHNjYWxlLnJhbmdlID0gZnVuY3Rpb24oXykge1xuICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyAoZG9tYWluID0gbWFwJDEuY2FsbChfLCBudW1iZXIpLCBzY2FsZSkgOiBkb21haW4uc2xpY2UoKTtcbiAgICB9O1xuXG4gICAgc2NhbGUuY29weSA9IGZ1bmN0aW9uKCkge1xuICAgICAgcmV0dXJuIGlkZW50aXR5KCkuZG9tYWluKGRvbWFpbik7XG4gICAgfTtcblxuICAgIHJldHVybiBsaW5lYXJpc2goc2NhbGUpO1xuICB9XG5cbiAgZnVuY3Rpb24gbmljZShkb21haW4sIGludGVydmFsKSB7XG4gICAgZG9tYWluID0gZG9tYWluLnNsaWNlKCk7XG5cbiAgICB2YXIgaTAgPSAwLFxuICAgICAgICBpMSA9IGRvbWFpbi5sZW5ndGggLSAxLFxuICAgICAgICB4MCA9IGRvbWFpbltpMF0sXG4gICAgICAgIHgxID0gZG9tYWluW2kxXSxcbiAgICAgICAgdDtcblxuICAgIGlmICh4MSA8IHgwKSB7XG4gICAgICB0ID0gaTAsIGkwID0gaTEsIGkxID0gdDtcbiAgICAgIHQgPSB4MCwgeDAgPSB4MSwgeDEgPSB0O1xuICAgIH1cblxuICAgIGRvbWFpbltpMF0gPSBpbnRlcnZhbC5mbG9vcih4MCk7XG4gICAgZG9tYWluW2kxXSA9IGludGVydmFsLmNlaWwoeDEpO1xuICAgIHJldHVybiBkb21haW47XG4gIH1cblxuICBmdW5jdGlvbiBkZWludGVycG9sYXRlJDEoYSwgYikge1xuICAgIHJldHVybiAoYiA9IE1hdGgubG9nKGIgLyBhKSlcbiAgICAgICAgPyBmdW5jdGlvbih4KSB7IHJldHVybiBNYXRoLmxvZyh4IC8gYSkgLyBiOyB9XG4gICAgICAgIDogY29uc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50ZXJwb2xhdGUkMSwgcmVpbnRlcnBvbGF0ZSkuZG9tYWluKFsxLCAxMF0pLFxuICAgICAgICBkb21haW4gPSBzY2FsZS5kb21haW4sXG4gICAgICAgIGJhc2UgPSAxMCxcbiAgICAgICAgbG9ncyA9IGxvZ3AoMTApLFxuICAgICAgICBwb3dzID0gcG93cCgxMCk7XG5cbiAgICBmdW5jdGlvbiByZXNjYWxlKCkge1xuICAgICAgbG9ncyA9IGxvZ3AoYmFzZSksIHBvd3MgPSBwb3dwKGJhc2UpO1xuICAgICAgaWYgKGRvbWFpbigpWzBdIDwgMCkgbG9ncyA9IHJlZmxlY3QobG9ncyksIHBvd3MgPSByZWZsZWN0KHBvd3MpO1xuICAgICAgcmV0dXJuIHNjYWxlO1xuICAgIH1cblxuICAgIHNjYWxlLmJhc2UgPSBmdW5jdGlvbihfKSB7XG4gICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChiYXNlID0gK18sIHJlc2NhbGUoKSkgOiBiYXNlO1xuICAgIH07XG5cbiAgICBzY2FsZS5kb21haW4gPSBmdW5jdGlvbihfKSB7XG4gICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IChkb21haW4oXyksIHJlc2NhbGUoKSkgOiBkb21haW4oKTtcbiAgICB9O1xuXG4gICAgc2NhbGUudGlja3MgPSBmdW5jdGlvbihjb3VudCkge1xuICAgICAgdmFyIGQgPSBkb21haW4oKSxcbiAgICAgICAgICB1ID0gZFswXSxcbiAgICAgICAgICB2ID0gZFtkLmxlbmd0aCAtIDFdLFxuICAgICAgICAgIHI7XG5cbiAgICAgIGlmIChyID0gdiA8IHUpIGkgPSB1LCB1ID0gdiwgdiA9IGk7XG5cbiAgICAgIHZhciBpID0gbG9ncyh1KSxcbiAgICAgICAgICBqID0gbG9ncyh2KSxcbiAgICAgICAgICBwLFxuICAgICAgICAgIGssXG4gICAgICAgICAgdCxcbiAgICAgICAgICBuID0gY291bnQgPT0gbnVsbCA/IDEwIDogK2NvdW50LFxuICAgICAgICAgIHogPSBbXTtcblxuICAgICAgaWYgKCEoYmFzZSAlIDEpICYmIGogLSBpIDwgbikge1xuICAgICAgICBpID0gTWF0aC5yb3VuZChpKSAtIDEsIGogPSBNYXRoLnJvdW5kKGopICsgMTtcbiAgICAgICAgaWYgKHUgPiAwKSBmb3IgKDsgaSA8IGo7ICsraSkge1xuICAgICAgICAgIGZvciAoayA9IDEsIHAgPSBwb3dzKGkpOyBrIDwgYmFzZTsgKytrKSB7XG4gICAgICAgICAgICB0ID0gcCAqIGs7XG4gICAgICAgICAgICBpZiAodCA8IHUpIGNvbnRpbnVlO1xuICAgICAgICAgICAgaWYgKHQgPiB2KSBicmVhaztcbiAgICAgICAgICAgIHoucHVzaCh0KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBmb3IgKDsgaSA8IGo7ICsraSkge1xuICAgICAgICAgIGZvciAoayA9IGJhc2UgLSAxLCBwID0gcG93cyhpKTsgayA+PSAxOyAtLWspIHtcbiAgICAgICAgICAgIHQgPSBwICogaztcbiAgICAgICAgICAgIGlmICh0IDwgdSkgY29udGludWU7XG4gICAgICAgICAgICBpZiAodCA+IHYpIGJyZWFrO1xuICAgICAgICAgICAgei5wdXNoKHQpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgeiA9IGQzQXJyYXkudGlja3MoaSwgaiwgTWF0aC5taW4oaiAtIGksIG4pKS5tYXAocG93cyk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiByID8gei5yZXZlcnNlKCkgOiB6O1xuICAgIH07XG5cbiAgICBzY2FsZS50aWNrRm9ybWF0ID0gZnVuY3Rpb24oY291bnQsIHNwZWNpZmllcikge1xuICAgICAgaWYgKHNwZWNpZmllciA9PSBudWxsKSBzcGVjaWZpZXIgPSBiYXNlID09PSAxMCA/IFwiLjBlXCIgOiBcIixcIjtcbiAgICAgIGlmICh0eXBlb2Ygc3BlY2lmaWVyICE9P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0gZm9ybWF0KFwiJUJcIiksXG4gICAgICAgIGZvcm1hdFllYXIgPSBmb3JtYXQoXCIlWVwiKTtcblxuICAgIHZhciB0aWNrSW50ZXJ2YWxzID0gW1xuICAgICAgW3NlY29uZCwgIDEsICAgICAgZHVyYXRpb25TZWNvbmRdLFxuICAgICAgW3NlY29uZCwgIDUsICA1ICogZHVyYXRpb25TZWNvbmRdLFxuICAgICAgW3NlY29uZCwgMTUsIDE1ICogZHVyYXRpb25TZWNvbmRdLFxuICAgICAgW3NlY29uZCwgMzAsIDMwICogZHVyYXRpb25TZWNvbmRdLFxuICAgICAgW21pbnV0ZSwgIDEsICAgICAgZHVyYXRpb25NaW51dGVdLFxuICAgICAgW21pbnV0ZSwgIDUsICA1ICogZHVyYXRpb25NaW51dGVdLFxuICAgICAgW21pbnV0ZSwgMTUsIDE1ICogZHVyYXRpb25NaW51dGVdLFxuICAgICAgW21pbnV0ZSwgMzAsIDMwICogZHVyYXRpb25NaW51dGVdLFxuICAgICAgWyAgaG91ciwgIDEsICAgICAgZHVyYXRpb25Ib3VyICBdLFxuICAgICAgWyAgaG91ciwgIDMsICAzICogZHVyYXRpb25Ib3VyICBdLFxuICAgICAgWyAgaG91ciwgIDYsICA2ICogZHVyYXRpb25Ib3VyICBdLFxuICAgICAgWyAgaG91ciwgMTIsIDEyICogZHVyYXRpb25Ib3VyICBdLFxuICAgICAgWyAgIGRheSwgIDEsICAgICAgZHVyYXRpb25EYXkgICBdLFxuICAgICAgWyAgIGRheSwgIDIsICAyICogZHVyYXRpb25EYXkgICBdLFxuICAgICAgWyAgd2VlaywgIDEsICAgICAgZHVyYXRpb25XZWVrICBdLFxuICAgICAgWyBtb250aCwgIDEsICAgICAgZHVyYXRpb25Nb250aCBdLFxuICAgICAgWyBtb250aCwgIDMsICAzICogZHVyYXRpb25Nb250aCBdLFxuICAgICAgWyAgeWVhciwgIDEsICAgICAgZHVyYXRpb25ZZWFyICBdXG4gICAgXTtcblxuICAgIGZ1bmN0aW9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gPSBzY2FsZSh0eXBlLmRhdGFbaV0pO1xuXG4gICAgICAgICAgICBpZiAoc2hhcGUgPT09IFwibGluZVwiICYmIG9yaWVudCA9PT0gXCJob3Jpem9udGFsXCIpIHtcbiAgICAgICAgICAgICAgYmJveC5oZWlnaHQgPSBiYm94LmhlaWdodCArIHN0cm9rZTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2hhcGUgPT09IFwibGluZVwiICYmIG9yaWVudCA9PT0gXCJ2ZXJ0aWNhbFwiKXtcbiAgICAgICAgICAgICAgYmJveC53aWR0aCA9IGJib3gud2lkdGg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gYmJveDtcbiAgICAgICAgfSk7XG4gICAgICAvL2NvbnNvbGUubG9nKCdTSEFQRVNJWkUnKVxuICAgICAgY29uc3QgbWF4SCA9IG1heChzaGFwZVNpemUsIGQgPT4gZC5oZWlnaHQgKyBkLnkpLFxuICAgICAgbWF4VyA9IG1heChzaGFwZVNpemUsIGQgPT4gZC53aWR0aCArIGQueCk7XG5cbiAgICAgIGxldCBjZWxsVHJhbnMsXG4gICAgICB0ZXh0VHJhbnMsXG4gICAgICB0ZXh0QWxpZ24gPSAobGFiZWxBbGlnbiA9PSBcInN0YXJ0XCIpID8gMCA6IChsYWJlbEFsaWduID09IFwibWlkZGxlXCIpID8gMC41IDogMTtcblxuICAgICAgLy9wb3NpdGlvbnMgY2VsbHMgYW5kIHRleHRcbiAgICAgIGlmIChvcmllbnQgPT09IFwidmVydGljYWxcIil7XG4gICAgICAgIGNvbnN0IGNlbGxTaXplID0gdGV4dFNpemUubWFwKChkLCBpKSA9PiBNYXRoLm1heChkLmhlaWdodCwgc2hhcGVTaXplW2ldLmhlaWdodCkpXG4gICAgICAgIGNvbnN0IHkgPSBzaGFwZSA9PSBcImNpcmNsZVwiIHx8IHNoYXBlID09IFwibGluZVwiID8gc2hhcGVTaXplWzBdLmhlaWdodC8yIDogMFxuICAgICAgICBjZWxsVHJhbnMg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SBleGlzdGluZyBvbmVzLlxuICAgICAgY2VsbCA9IGNlbGxFbnRlci5tZXJnZShjZWxsKTtcblxuICAgICAgLy8gc2V0cyBwbGFjZW1lbnRcbiAgICAgIGNvbnN0IHRleHQgPSBjZWxsLnNlbGVjdEFsbChcInRleHRcIiksXG4gICAgICAgIHRleHRTaXplID0gdGV4dC5ub2RlcygpLm1hcChkID0+IGQuZ2V0QkJveCgpKSxcbiAgICAgICAgc2hhcGVTaXplID0gc2hhcGVzLm5vZGVzKCkubWFwKCBkID0+IGQuZ2V0QkJveCgpKTtcblxuICAgICAgY29uc3QgbWF4SCA9IG1heChzaGFwZVNpemUsIGQgPT4gZC5oZWlnaHQpLFxuICAgICAgbWF4VyA9IG1heChzaGFwZVNpemUsIGQgPT4gZC53aWR0aCk7XG5cbiAgICAgIGxldCBjZWxsVHJhbnMsXG4gICAgICB0ZXh0VHJhbnMsXG4gICAgICB0ZXh0QWxpZ24gPSAobGFiZWxBbGlnbiA9PSBcInN0YXJ0XCIpID8gMCA6IChsYWJlbEFsaWduID09IFwibWlkZGxlXCIpID8gMC41IDogMTtcblxuICAgICAgLy9wb3NpdGlvbnMgY2VsbHMgYW5kIHRleHRcbiAgICAgIGlmIChvcmllbnQgPT09IFwidmVydGljYWxcIil7XG4gICAgICAgIGNvbnN0IGNlbGxTaXplID0gdGV4dFNpemUubWFwKChkLCBpKSA9PiBNYXRoLm1heChtYXhILCBkLmhlaWdodCkpXG5cbiAgICAgICAgY2VsbFRyYW5zID0gKGQsaSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGhlaWdodCA9IHN1bShjZWxsU2l6ZS5zbGljZSgwLCBpKSk7XG4gICAgICAgICAgcmV0dXJuIGB0cmFuc2xhdGUoMCwgJHsoaGVpZ2h0ICsgKGkgKnNoYXBlUGFkZGluZykpfSApYH07XG4gICAgICAgIHRleHRUcmFucyA9IChkLGkpID0+IGB0cmFuc2xhdGUoICR7KG1heFcgKyBsYWJlbE9mZnNldCl9LFxuICAg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0gXztcbiAgICByZXR1cm4gbGVnZW5kO1xuICB9O1xuXG4gIGxlZ2VuZC50aXRsZSA9IGZ1bmN0aW9uKF8pIHtcbiAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiB0aXRsZTtcbiAgICB0aXRsZSA9IF87XG4gICAgcmV0dXJuIGxlZ2VuZDtcbiAgfTtcblxuICBsZWdlbmQudGl0bGVXaWR0aCA9IGZ1bmN0aW9uKF8pIHtcbiAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiB0aXRsZVdpZHRoO1xuICAgIHRpdGxlV2lkdGggPSBfO1xuICAgIHJldHVybiBsZWdlbmQ7XG4gIH07XG5cbiAgbGVnZW5kLm9uID0gZnVuY3Rpb24oKXtcbiAgICBjb25zdCB2YWx1ZSA9IGxlZ2VuZERpc3BhdGNoZXIub24uYXBwbHkobGVnZW5kRGlzcGF0Y2hlciwgYXJndW1lbnRzKVxuICAgIHJldHVybiB2YWx1ZSA9PT0gbGVnZW5kRGlzcGF0Y2hlciA/IGxlZ2VuZCA6IHZhbHVlO1xuICB9XG5cbiAgcmV0dXJuIGxlZ2VuZDtcblxufTtcbiIsImltcG9ydCBjb2xvciBmcm9tICcuL2NvbG9yJ1xuaW1wb3J0IHNpemUgZnJvbSAnLi9zaXplJ1xuaW1wb3J0IHN5bWJvbCBmcm9tICcuL3N5bWJvbCdcbmltcG9ydCBoZWxwZXJzIGZyb20gJy4vaGVscGVycydcblxuZDMubGVnZW5kQ29sb3IgPSBjb2xvclxuZDMubGVnZW5kU2l6ZSA9IHNpemVcbmQzLmxlZ2VuZFN5bWJvbCA9IHN5bWJvbFxuZDMubGVnZW5kSGVscGVycyA9IGhlbHBlcnNcbiJdfQ== diff --git a/d3-legend.min.js b/d3-legend.min.js index 2ad66c5..aacc267 100644 --- a/d3-legend.min.js +++ b/d3-legend.min.js @@ -1,3 +1,3 @@ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gb?1:a>=b?0:NaN}function c(a){return 1===a.length&&(a=d(a)),{left:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d>>1;a(b[f],c)<0?d=f+1:e=f}return d},right:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d>>1;a(b[f],c)>0?e=f:d=f+1}return d}}}function d(a){return function(c,d){return b(a(c),d)}}function e(a,b){return ba?1:b>=a?0:NaN}function f(a){return null===a?NaN:+a}function g(a,b){var c,d,e=a.length,g=0,h=0,i=-1,j=0;if(null==b)for(;++i1)return h/(j-1)}function h(a,b){var c=g(a,b);return c?Math.sqrt(c):c}function i(a,b){var c,d,e,f=-1,g=a.length;if(null==b){for(;++f=d){c=e=d;break}for(;++fd&&(c=d),e=d){c=e=d;break}for(;++fd&&(c=d),e=M?e*=10:f>=N?e*=5:f>=O&&(e*=2),b=k;)l.pop(),--n;var o,p=new Array(n+1);for(e=0;e<=n;++e)o=p[e]=[],o.x0=e>0?l[e-1]:j,o.x1=e=1)return+c(a[d-1],d-1,a);var d,e=(d-1)*b,g=Math.floor(e),h=+c(a[g],g,a),i=+c(a[g+1],g+1,a);return h+(i-h)*(e-g)}}function r(a,c,d){return a=L.call(a,f).sort(b),Math.ceil((d-c)/(2*(q(a,.75)-q(a,.25))*Math.pow(a.length,-1/3)))}function s(a,b,c){return Math.ceil((c-b)/(3.5*h(a)*Math.pow(a.length,-1/3)))}function t(a,b){var c,d,e=-1,f=a.length;if(null==b){for(;++e=d){c=d;break}for(;++ec&&(c=d)}else{for(;++e=d){c=d;break}for(;++ec&&(c=d)}return c}function u(a,b){var c,d=0,e=a.length,g=-1,h=e;if(null==b)for(;++g=0;)for(d=a[e],b=d.length;--b>=0;)c[--g]=d[b];return c}function x(a,b){var c,d,e=-1,f=a.length;if(null==b){for(;++e=d){c=d;break}for(;++ed&&(c=d)}else{for(;++e=d){c=d;break}for(;++ed&&(c=d)}return c}function y(a){for(var b=0,c=a.length-1,d=a[0],e=new Array(c<0?0:c);b=k.length)return null!=i?i(b):null!=h?b.sort(h):b;for(var g,j,l,m=-1,n=b.length,o=k[d++],p=c(),q=e();++mk.length)return a;var d,e=l[c-1];return null!=i&&c>=k.length?d=a.entries():(d=[],a.each(function(a,e){d.push({key:e,values:b(a,c)})})),null!=e?d.sort(function(a,b){return e(a.key,b.key)}):d}var h,i,j,k=[],l=[];return j={object:function(b){return a(b,0,d,e)},map:function(b){return a(b,0,f,g)},entries:function(c){return b(a(c,0,f,g),0)},key:function(a){return k.push(a),j},sortKeys:function(a){return l[k.length-1]=a,j},sortValues:function(a){return h=a,j},rollup:function(a){return i=a,j}}},l=c.prototype;h.prototype=i.prototype={constructor:h,has:l.has,add:function(a){return a+="",this[j+a]=a,this},remove:l.remove,clear:l.clear,values:l.keys,size:l.size,empty:l.empty,each:l.each};var m=function(a){var b=[];for(var c in a)b.push(c);return b},n=function(a){var b=[];for(var c in a)b.push(a[c]);return b},o=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b};a.nest=k,a.set=i,a.map=c,a.keys=m,a.values=n,a.entries=o,Object.defineProperty(a,"__esModule",{value:!0})})},{}],3:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,b){var c=Object.create(a.prototype);for(var d in b)c[d]=b[d];return c}function c(){}function d(a){var b;return a=(a+"").trim().toLowerCase(),(b=H.exec(a))?(b=parseInt(b[1],16),new i(b>>8&15|b>>4&240,b>>4&15|240&b,(15&b)<<4|15&b,1)):(b=I.exec(a))?e(parseInt(b[1],16)):(b=J.exec(a))?new i(b[1],b[2],b[3],1):(b=K.exec(a))?new i(255*b[1]/100,255*b[2]/100,255*b[3]/100,1):(b=L.exec(a))?f(b[1],b[2],b[3],b[4]):(b=M.exec(a))?f(255*b[1]/100,255*b[2]/100,255*b[3]/100,b[4]):(b=N.exec(a))?j(b[1],b[2]/100,b[3]/100,1):(b=O.exec(a))?j(b[1],b[2]/100,b[3]/100,b[4]):P.hasOwnProperty(a)?e(P[a]):"transparent"===a?new i(NaN,NaN,NaN,0):null}function e(a){return new i(a>>16&255,a>>8&255,255&a,1)}function f(a,b,c,d){return d<=0&&(a=b=c=NaN),new i(a,b,c,d)}function g(a){return a instanceof c||(a=d(a)),a?(a=a.rgb(),new i(a.r,a.g,a.b,a.opacity)):new i}function h(a,b,c,d){return 1===arguments.length?g(a):new i(a,b,c,null==d?1:d)}function i(a,b,c,d){this.r=+a,this.g=+b,this.b=+c,this.opacity=+d}function j(a,b,c,d){return d<=0?a=b=c=NaN:c<=0||c>=1?a=b=NaN:b<=0&&(a=NaN),new m(a,b,c,d)}function k(a){if(a instanceof m)return new m(a.h,a.s,a.l,a.opacity);if(a instanceof c||(a=d(a)),!a)return new m;if(a instanceof m)return a;a=a.rgb();var b=a.r/255,e=a.g/255,f=a.b/255,g=Math.min(b,e,f),h=Math.max(b,e,f),i=NaN,j=h-g,k=(h+g)/2;return j?(i=b===h?(e-f)/j+6*(e0&&k<1?0:i,new m(i,j,k,a.opacity)}function l(a,b,c,d){return 1===arguments.length?k(a):new m(a,b,c,null==d?1:d)}function m(a,b,c,d){this.h=+a,this.s=+b,this.l=+c,this.opacity=+d}function n(a,b,c){return 255*(a<60?b+(c-b)*a/60:a<180?c:a<240?b+(c-b)*(240-a)/60:b)}function o(a){if(a instanceof q)return new q(a.l,a.a,a.b,a.opacity);if(a instanceof x){var b=a.h*Q;return new q(a.l,Math.cos(b)*a.c,Math.sin(b)*a.c,a.opacity)}a instanceof i||(a=g(a));var c=u(a.r),d=u(a.g),e=u(a.b),f=r((.4124564*c+.3575761*d+.1804375*e)/T),h=r((.2126729*c+.7151522*d+.072175*e)/U),j=r((.0193339*c+.119192*d+.9503041*e)/V);return new q(116*h-16,500*(f-h),200*(h-j),a.opacity)}function p(a,b,c,d){return 1===arguments.length?o(a):new q(a,b,c,null==d?1:d)}function q(a,b,c,d){this.l=+a,this.a=+b,this.b=+c,this.opacity=+d}function r(a){return a>Z?Math.pow(a,1/3):a/Y+W}function s(a){return a>X?a*a*a:Y*(a-W)}function t(a){return 255*(a<=.0031308?12.92*a:1.055*Math.pow(a,1/2.4)-.055)}function u(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function v(a){if(a instanceof x)return new x(a.h,a.c,a.l,a.opacity);a instanceof q||(a=o(a));var b=Math.atan2(a.b,a.a)*R;return new x(b<0?b+360:b,Math.sqrt(a.a*a.a+a.b*a.b),a.l,a.opacity)}function w(a,b,c,d){return 1===arguments.length?v(a):new x(a,b,c,null==d?1:d)}function x(a,b,c,d){this.h=+a,this.c=+b,this.l=+c,this.opacity=+d}function y(a){if(a instanceof A)return new A(a.h,a.s,a.l,a.opacity);a instanceof i||(a=g(a));var b=a.r/255,c=a.g/255,d=a.b/255,e=(fa*d+da*b-ea*c)/(fa+da-ea),f=d-e,h=(ca*(c-e)-aa*f)/ba,j=Math.sqrt(h*h+f*f)/(ca*e*(1-e)),k=j?Math.atan2(h,f)*R-120:NaN;return new A(k<0?k+360:k,j,e,a.opacity)}function z(a,b,c,d){return 1===arguments.length?y(a):new A(a,b,c,null==d?1:d)}function A(a,b,c,d){this.h=+a,this.s=+b,this.l=+c,this.opacity=+d}var B=function(a,b,c){a.prototype=b.prototype=c,c.constructor=a},C=.7,D=1/C,E="\\s*([+-]?\\d+)\\s*",F="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",G="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",H=/^#([0-9a-f]{3})$/,I=/^#([0-9a-f]{6})$/,J=new RegExp("^rgb\\("+[E,E,E]+"\\)$"),K=new RegExp("^rgb\\("+[G,G,G]+"\\)$"),L=new RegExp("^rgba\\("+[E,E,E,F]+"\\)$"),M=new RegExp("^rgba\\("+[G,G,G,F]+"\\)$"),N=new RegExp("^hsl\\("+[F,G,G]+"\\)$"),O=new RegExp("^hsla\\("+[F,G,G,F]+"\\)$"),P={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};B(c,d,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),B(i,h,b(c,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new i(this.r*a,this.g*a,this.b*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new i(this.r*a,this.g*a,this.b*a,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var a=this.opacity;return a=isNaN(a)?1:Math.max(0,Math.min(1,a)),(1===a?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===a?")":", "+a+")")}})),B(m,l,b(c,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new m(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new m(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=this.h%360+360*(this.h<0),b=isNaN(a)||isNaN(this.s)?0:this.s,c=this.l,d=c+(c<.5?c:1-c)*b,e=2*c-d;return new i(n(a>=240?a-240:a+120,e,d),n(a,e,d),n(a<120?a+240:a-120,e,d),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Q=Math.PI/180,R=180/Math.PI,S=18,T=.95047,U=1,V=1.08883,W=4/29,X=6/29,Y=3*X*X,Z=X*X*X;B(q,p,b(c,{brighter:function(a){return new q(this.l+S*(null==a?1:a),this.a,this.b,this.opacity)},darker:function(a){return new q(this.l-S*(null==a?1:a),this.a,this.b,this.opacity)},rgb:function(){var a=(this.l+16)/116,b=isNaN(this.a)?a:a+this.a/500,c=isNaN(this.b)?a:a-this.b/200;return a=U*s(a),b=T*s(b),c=V*s(c),new i(t(3.2404542*b-1.5371385*a-.4985314*c),t(-.969266*b+1.8760108*a+.041556*c),t(.0556434*b-.2040259*a+1.0572252*c),this.opacity)}})),B(x,w,b(c,{brighter:function(a){return new x(this.h,this.c,this.l+S*(null==a?1:a),this.opacity)},darker:function(a){return new x(this.h,this.c,this.l-S*(null==a?1:a),this.opacity)},rgb:function(){return o(this).rgb()}}));var $=-.14861,_=1.78277,aa=-.29227,ba=-.90649,ca=1.97294,da=ca*ba,ea=ca*_,fa=_*aa-ba*$;B(A,z,b(c,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new A(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new A(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=isNaN(this.h)?0:(this.h+120)*Q,b=+this.l,c=isNaN(this.s)?0:this.s*b*(1-b),d=Math.cos(a),e=Math.sin(a);return new i(255*(b+c*($*d+_*e)),255*(b+c*(aa*d+ba*e)),255*(b+c*(ca*d)),this.opacity)}})),a.color=d,a.rgb=h,a.hsl=l,a.lab=p,a.hcl=w,a.cubehelix=z,Object.defineProperty(a,"__esModule",{value:!0})})},{}],4:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(){for(var a,b=0,d=arguments.length,e={};b=0&&(c=a.slice(d+1),a=a.slice(0,d)),a&&!b.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:c}})}function e(a,b){for(var c,d=0,e=a.length;d0)for(var c,d,e=new Array(c),f=0;f1?d[0]+d.slice(2):d,+a.slice(c+1)]}function c(a){return a=b(Math.abs(a)),a?a[1]:NaN}function d(a,b){return function(c,d){for(var e=c.length,f=[],g=0,h=a[0],i=0;e>0&&h>0&&(i+h+1>d&&(h=Math.max(1,d-i)),f.push(c.substring(e-=h,e+h)),!((i+=h+1)>d));)h=a[g=(g+1)%a.length];return f.reverse().join(b)}}function e(a,b){a=a.toPrecision(b);a:for(var c,d=a.length,e=1,f=-1;e0&&(f=0)}return f>0?a.slice(0,f)+a.slice(c+1):a}function f(a,c){var d=b(a,c);if(!d)return a+"";var e=d[0],f=d[1],g=f-(p=3*Math.max(-8,Math.min(8,Math.floor(f/3))))+1,h=e.length;return g===h?e:g>h?e+new Array(g-h+1).join("0"):g>0?e.slice(0,g)+"."+e.slice(g):"0."+new Array(1-g).join("0")+b(a,Math.max(0,c+g-1))[0]}function g(a,c){var d=b(a,c);if(!d)return a+"";var e=d[0],f=d[1];return f<0?"0."+new Array(-f).join("0")+e:e.length>f+1?e.slice(0,f+1)+"."+e.slice(f+1):e+new Array(f-e.length+2).join("0")}function h(a){return new i(a)}function i(a){if(!(b=r.exec(a)))throw new Error("invalid format: "+a);var b,c=b[1]||" ",d=b[2]||">",e=b[3]||"-",f=b[4]||"",g=!!b[5],h=b[6]&&+b[6],i=!!b[7],j=b[8]&&+b[8].slice(1),k=b[9]||"";"n"===k?(i=!0,k="g"):q[k]||(k=""),(g||"0"===c&&"="===d)&&(g=!0,c="0",d="="),this.fill=c,this.align=d,this.sign=e,this.symbol=f,this.zero=g,this.width=h,this.comma=i,this.precision=j,this.type=k}function j(a){return a}function k(a){function b(a){function b(a){var b,g,h,j=r,q=s;if("c"===o)q=u(a)+q,a="";else{a=+a;var w=(a<0||1/a<0)&&(a*=-1,!0);if(a=u(a,n),w)for(b=-1,g=a.length,w=!1;++bh||h>57){q=(46===h?i+a.slice(b+1):a.slice(b))+q,a=a.slice(0,b);break}}m&&!k&&(a=f(a,1/0));var x=j.length+a.length+q.length,y=x>1)+j+a+q+y.slice(x)}return y+j+a+q}a=h(a);var c=a.fill,d=a.align,e=a.sign,j=a.symbol,k=a.zero,l=a.width,m=a.comma,n=a.precision,o=a.type,r="$"===j?g[0]:"#"===j&&/[boxX]/.test(o)?"0"+o.toLowerCase():"",s="$"===j?g[1]:/[%p]/.test(o)?"%":"",u=q[o],v=!o||/[defgprs%]/.test(o);return n=null==n?o?6:12:/[gprs]/.test(o)?Math.max(1,Math.min(21,n)):Math.max(0,Math.min(20,n)),b.toString=function(){return a+""},b}function e(a,d){var e=b((a=h(a),a.type="f",a)),f=3*Math.max(-8,Math.min(8,Math.floor(c(d)/3))),g=Math.pow(10,-f),i=t[8+f/3];return function(a){return e(g*a)+i}}var f=a.grouping&&a.thousands?d(a.grouping,a.thousands):j,g=a.currency,i=a.decimal;return{format:b,formatPrefix:e}}function l(b){return s=k(b),a.format=s.format,a.formatPrefix=s.formatPrefix,s}function m(a){return Math.max(0,-c(Math.abs(a)))}function n(a,b){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(c(b)/3)))-c(Math.abs(a)))}function o(a,b){return a=Math.abs(a),b=Math.abs(b)-a,Math.max(0,c(b)-c(a))+1}var p,q={"":e,"%":function(a,b){return(100*a).toFixed(b)},b:function(a){return Math.round(a).toString(2)},c:function(a){return a+""},d:function(a){return Math.round(a).toString(10)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},g:function(a,b){return a.toPrecision(b)},o:function(a){return Math.round(a).toString(8)},p:function(a,b){return g(100*a,b)},r:g,s:f,X:function(a){return Math.round(a).toString(16).toUpperCase()},x:function(a){return Math.round(a).toString(16)}},r=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;i.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var s,t=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];l({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),a.formatDefaultLocale=l,a.formatLocale=k,a.formatSpecifier=h,a.precisionFixed=m,a.precisionPrefix=n,a.precisionRound=o,Object.defineProperty(a,"__esModule",{value:!0})})},{}],6:[function(a,b,c){!function(d,e){"object"==typeof c&&"undefined"!=typeof b?e(c,a("d3-color")):"function"==typeof define&&define.amd?define(["exports","d3-color"],e):e(d.d3=d.d3||{},d.d3)}(this,function(a,b){"use strict";function c(a,b,c,d,e){var f=a*a,g=f*a;return((1-3*a+3*f-g)*b+(4-6*f+3*g)*c+(1+3*a+3*f-3*g)*d+g*e)/6}function d(a,b){return function(c){return a+c*b}}function e(a,b,c){return a=Math.pow(a,c),b=Math.pow(b,c)-a,c=1/c,function(d){return Math.pow(a+d*b,c)}}function f(a,b){var c=b-a;return c?d(a,c>180||c<-180?c-360*Math.round(c/360):c):B(isNaN(a)?b:a)}function g(a){return 1===(a=+a)?h:function(b,c){return c-b?e(b,c,a):B(isNaN(b)?c:b)}}function h(a,b){var c=b-a;return c?d(a,c):B(isNaN(a)?b:a)}function i(a){return function(c){var d,e,f=c.length,g=new Array(f),h=new Array(f),i=new Array(f);for(d=0;d180?b+=360:b-a>180&&(a+=360),f.push({i:c.push(e(c)+"rotate(",null,d)-2,x:H(a,b)})):b&&c.push(e(c)+"rotate("+b+d)}function h(a,b,c,f){a!==b?f.push({i:c.push(e(c)+"skewX(",null,d)-2,x:H(a,b)}):b&&c.push(e(c)+"skewX("+b+d)}function i(a,b,c,d,f,g){if(a!==c||b!==d){var h=f.push(e(f)+"scale(",null,",",null,")");g.push({i:h-4,x:H(a,c)},{i:h-2,x:H(b,d)})}else 1===c&&1===d||f.push(e(f)+"scale("+c+","+d+")")}return function(b,c){var d=[],e=[];return b=a(b),c=a(c),f(b.translateX,b.translateY,c.translateX,c.translateY,d,e),g(b.rotate,c.rotate,d,e),h(b.skewX,c.skewX,d,e),i(b.scaleX,b.scaleY,c.scaleX,c.scaleY,d,e),b=c=null,function(a){for(var b,c=-1,f=e.length;++c=1?(d=1,b-1):Math.floor(d*b),f=a[e],g=a[e+1],h=e>0?a[e-1]:2*f-g,i=ef&&(e=b.slice(f,e),h[g]?h[g]+=e:h[++g]=e),(c=c[0])===(d=d[0])?h[g]?h[g]+=d:h[++g]=d:(h[++g]=null,i.push({i:g,x:H(c,d)})),f=K.lastIndex;return f=c?1:d(a)}}}function q(a){return function(b,c){var d=a(b=+b,c=+c);return function(a){return a<=0?b:a>=1?c:d(a)}}}function r(a,b,c,d){var e=a[0],f=a[1],g=b[0],h=b[1];return f2?s:r,g=h=null,e}function e(b){return(g||(g=f(i,j,l?p(a):a,k)))(+b)}var f,g,h,i=$,j=$,k=d.interpolate,l=!1;return e.invert=function(a){return(h||(h=f(j,i,o,l?q(b):b)))(+a)},e.domain=function(a){return arguments.length?(i=X.call(a,n),c()):i.slice()},e.range=function(a){return arguments.length?(j=Y.call(a),c()):j.slice()},e.rangeRound=function(a){return j=Y.call(a),k=d.interpolateRound,c()},e.clamp=function(a){return arguments.length?(l=!!a,c()):l},e.interpolate=function(a){return arguments.length?(k=a,c()):k},c()}function v(a,c,d){var f,g=a[0],h=a[a.length-1],i=b.tickStep(g,h,null==c?10:c);switch(d=e.formatSpecifier(null==d?",f":d),d.type){case"s":var j=Math.max(Math.abs(g),Math.abs(h));return null!=d.precision||isNaN(f=e.precisionPrefix(i,j))||(d.precision=f),e.formatPrefix(d,j);case"":case"e":case"g":case"p":case"r":null!=d.precision||isNaN(f=e.precisionRound(i,Math.max(Math.abs(g),Math.abs(h))))||(d.precision=f-("e"===d.type));break;case"f":case"%":null!=d.precision||isNaN(f=e.precisionFixed(i))||(d.precision=f-2*("%"===d.type))}return e.format(d)}function w(a){var c=a.domain;return a.ticks=function(a){var d=c();return b.ticks(d[0],d[d.length-1],null==a?10:a)},a.tickFormat=function(a,b){return v(c(),a,b)},a.nice=function(d){var e=c(),f=e.length-1,g=null==d?10:d,h=e[0],i=e[f],j=b.tickStep(h,i,g);return j&&(j=b.tickStep(Math.floor(h/j)*j,Math.ceil(i/j)*j,g),e[0]=Math.floor(h/j)*j,e[f]=Math.ceil(i/j)*j,c(e)),a},a}function x(){var a=u(o,d.interpolateNumber);return a.copy=function(){return t(a,x())},w(a)}function y(){function a(a){return+a}var b=[0,1];return a.invert=a,a.domain=a.range=function(c){return arguments.length?(b=X.call(c,n),a):b.slice()},a.copy=function(){return y().domain(b)},w(a)}function z(a,b){a=a.slice();var c,d=0,e=a.length-1,f=a[d],g=a[e];return g0){for(;nj)break;q.push(m)}}else for(;n=1;--l)if(m=k*l,!(mj)break;q.push(m)}}else q=b.ticks(n,o,Math.min(o-n,p)).map(h);return c?q.reverse():q},c.tickFormat=function(a,b){if(null==b&&(b=10===f?".0e":","),"function"!=typeof b&&(b=e.format(b)),a===1/0)return b;null==a&&(a=10);var d=Math.max(1,f*a/c.ticks().length);return function(a){var c=a/h(Math.round(g(a)));return c*f0?f[b-1]:d[0],b=f?[g[f-1],e]:[g[b-1],g[b]]},a.copy=function(){return L().domain([d,e]).range(h)},w(a)}function M(){function a(a){if(a<=a)return d[b.bisect(c,a,0,e)]}var c=[.5],d=[0,1],e=1;return a.domain=function(b){return arguments.length?(c=Y.call(b),e=Math.min(c.length,d.length-1),a):c.slice()},a.range=function(b){return arguments.length?(d=Y.call(b),e=Math.min(c.length,d.length-1),a):d.slice()},a.invertExtent=function(a){var b=d.indexOf(a);return[c[b-1],c[b]]},a.copy=function(){return M().domain(c).range(d)},a}function N(a){return new Date(a)}function O(a){return a instanceof Date?+a:+new Date(+a)}function P(a,c,e,f,g,h,i,j,k){function l(b){return(i(b)1)&&(a-=Math.floor(a));var b=Math.abs(a-.5);return na.h=360*a-100,na.s=1.5-1.5*b,na.l=.8-.9*b,na+""}function U(a){var b=a.length;return function(c){return a[Math.max(0,Math.min(b-1,Math.floor(c*b)))]}}function V(a){function b(b){var f=(b-c)/(d-c);return a(e?Math.max(0,Math.min(1,f)):f)}var c=0,d=1,e=!1;return b.domain=function(a){return arguments.length?(c=+a[0],d=+a[1],b):[c,d]},b.clamp=function(a){return arguments.length?(e=!!a,b):e},b.interpolator=function(c){return arguments.length?(a=c,b):a},b.copy=function(){return V(a).domain([c,d]).clamp(e)},w(b)}var W=Array.prototype,X=W.map,Y=W.slice,Z={name:"implicit"},$=[0,1],_=1e3,aa=60*_,ba=60*aa,ca=24*ba,da=7*ca,ea=30*ca,fa=365*ca,ga=S("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ha=S("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),ia=S("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),ja=S("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),ka=d.interpolateCubehelixLong(h.cubehelix(300,.5,0),h.cubehelix(-240,.5,1)),la=d.interpolateCubehelixLong(h.cubehelix(-100,.75,.35),h.cubehelix(80,1.5,.8)),ma=d.interpolateCubehelixLong(h.cubehelix(260,.75,.35),h.cubehelix(80,1.5,.8)),na=h.cubehelix(),oa=U(S("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),pa=U(S("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),qa=U(S("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ra=U(S("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));a.scaleBand=j,a.scalePoint=l,a.scaleIdentity=y,a.scaleLinear=x,a.scaleLog=G,a.scaleOrdinal=i,a.scaleImplicit=Z,a.scalePow=I,a.scaleSqrt=J,a.scaleQuantile=K,a.scaleQuantize=L,a.scaleThreshold=M,a.scaleTime=Q,a.scaleUtc=R,a.schemeCategory10=ga,a.schemeCategory20b=ha,a.schemeCategory20c=ia,a.schemeCategory20=ja,a.interpolateCubehelixDefault=ka,a.interpolateRainbow=T,a.interpolateWarm=la,a.interpolateCool=ma,a.interpolateViridis=oa,a.interpolateMagma=pa,a.interpolateInferno=qa,a.interpolatePlasma=ra,a.scaleSequential=V,Object.defineProperty(a,"__esModule",{value:!0})})},{"d3-array":1,"d3-collection":2,"d3-color":3,"d3-format":5,"d3-interpolate":6,"d3-time":10,"d3-time-format":9}],8:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a){var b=a+="",c=b.indexOf(":");return c>=0&&"xmlns"!==(b=a.slice(0,c))&&(a=a.slice(c+1)),Qa.hasOwnProperty(b)?{space:Qa[b],local:a}:a}function c(a){return function(){var b=this.ownerDocument,c=this.namespaceURI;return c===Pa&&b.documentElement.namespaceURI===Pa?b.createElement(a):b.createElementNS(c,a)}}function d(a){return function(){return this.ownerDocument.createElementNS(a.space,a.local)}}function e(a){var e=b(a);return(e.local?d:c)(e)}function f(){return new g}function g(){this._="@"+(++Ra).toString(36)}function h(a,b,c){return a=i(a,b,c),function(b){var c=b.relatedTarget;c&&(c===this||8&c.compareDocumentPosition(this))||a.call(this,b)}}function i(b,c,d){return function(e){var f=a.event;a.event=e;try{b.call(this,this.__data__,c,d)}finally{a.event=f}}}function j(a){return a.trim().split(/^|\s+/).map(function(a){var b="",c=a.indexOf(".");return c>=0&&(b=a.slice(c+1),a=a.slice(0,c)),{type:a,name:b}})}function k(a){return function(){var b=this.__on;if(b){for(var c,d=0,e=-1,f=b.length;d=v&&(v=u+1);!(t=q[v])&&++v=0;)(d=e[f])&&(g&&g!==d.nextSibling&&g.parentNode.insertBefore(d,g),g=d);return this}function I(a){function b(b,c){return b&&c?a(b.__data__,c.__data__):!b-!c}a||(a=J);for(var c=this._groups,d=c.length,e=new Array(d),f=0;fb?1:a>=b?0:NaN}function K(){var a=arguments[0];return arguments[0]=this,a.apply(null,arguments),this}function L(){var a=new Array(this.size()),b=-1;return this.each(function(){a[++b]=this}),a}function M(){for(var a=this._groups,b=0,c=a.length;b1?this.each((null==b?Y:"function"==typeof b?$:Z)(a,b,null==c?"":c)):X(d=this.node()).getComputedStyle(d,null).getPropertyValue(a)}function aa(a){return function(){delete this[a]}}function ba(a,b){return function(){this[a]=b}}function ca(a,b){return function(){var c=b.apply(this,arguments);null==c?delete this[a]:this[a]=c}}function da(a,b){return arguments.length>1?this.each((null==b?aa:"function"==typeof b?ca:ba)(a,b)):this.node()[a]}function ea(a){return a.trim().split(/^|\s+/)}function fa(a){return a.classList||new ga(a)}function ga(a){this._node=a,this._names=ea(a.getAttribute("class")||"")}function ha(a,b){for(var c=fa(a),d=-1,e=b.length;++d=0&&(this._names.splice(b,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(a){return this._names.indexOf(a)>=0}};var Za=[null];Ja.prototype=Ka.prototype={constructor:Ja,select:t,selectAll:w,filter:x,data:E,enter:z,exit:F,merge:G,order:H,sort:I,call:K,nodes:L,node:M,size:N,empty:O,each:P,attr:W,style:_,property:da,classed:ma,text:qa,html:ua,raise:wa,lower:ya,append:za,insert:Ba,remove:Da,datum:Ea,on:m,dispatch:Ia},a.creator=e,a.local=f,a.matcher=Va,a.mouse=q,a.namespace=b,a.namespaces=Qa,a.select=La,a.selectAll=Ma,a.selection=Ka,a.selector=s,a.selectorAll=v,a.touch=Na,a.touches=Oa,a.window=X,a.customEvent=n,Object.defineProperty(a,"__esModule",{value:!0})})},{}],9:[function(a,b,c){!function(d,e){"object"==typeof c&&"undefined"!=typeof b?e(c,a("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-time"],e):e(d.d3=d.d3||{},d.d3)}(this,function(a,b){"use strict";function c(a){if(0<=a.y&&a.y<100){var b=new Date(-1,a.m,a.d,a.H,a.M,a.S,a.L);return b.setFullYear(a.y),b}return new Date(a.y,a.m,a.d,a.H,a.M,a.S,a.L)}function d(a){if(0<=a.y&&a.y<100){var b=new Date(Date.UTC(-1,a.m,a.d,a.H,a.M,a.S,a.L));return b.setUTCFullYear(a.y),b}return new Date(Date.UTC(a.y,a.m,a.d,a.H,a.M,a.S,a.L))}function e(a){return{y:a,m:0,d:1,H:0,M:0,S:0,L:0}}function f(a){function b(a,b){return function(c){var d,e,f,g=[],h=-1,i=0,j=a.length;for(c instanceof Date||(c=new Date(+c));++h=i)return-1;if(e=b.charCodeAt(g++), -37===e){if(e=b.charAt(g++),f=La[e in da?b.charAt(g++):e],!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function h(a,b,c){var d=za.exec(b.slice(c));return d?(a.p=Aa[d[0].toLowerCase()],c+d[0].length):-1}function _(a,b,c){var d=Da.exec(b.slice(c));return d?(a.w=Ea[d[0].toLowerCase()],c+d[0].length):-1}function aa(a,b,c){var d=Ba.exec(b.slice(c));return d?(a.w=Ca[d[0].toLowerCase()],c+d[0].length):-1}function ba(a,b,c){var d=Ha.exec(b.slice(c));return d?(a.m=Ia[d[0].toLowerCase()],c+d[0].length):-1}function ca(a,b,c){var d=Fa.exec(b.slice(c));return d?(a.m=Ga[d[0].toLowerCase()],c+d[0].length):-1}function ea(a,b,c){return g(a,ra,b,c)}function fa(a,b,c){return g(a,sa,b,c)}function ga(a,b,c){return g(a,ta,b,c)}function ha(a){return wa[a.getDay()]}function ia(a){return va[a.getDay()]}function ja(a){return ya[a.getMonth()]}function ka(a){return xa[a.getMonth()]}function la(a){return ua[+(a.getHours()>=12)]}function ma(a){return wa[a.getUTCDay()]}function na(a){return va[a.getUTCDay()]}function oa(a){return ya[a.getUTCMonth()]}function pa(a){return xa[a.getUTCMonth()]}function qa(a){return ua[+(a.getUTCHours()>=12)]}var ra=a.dateTime,sa=a.date,ta=a.time,ua=a.periods,va=a.days,wa=a.shortDays,xa=a.months,ya=a.shortMonths,za=i(ua),Aa=j(ua),Ba=i(va),Ca=j(va),Da=i(wa),Ea=j(wa),Fa=i(xa),Ga=j(xa),Ha=i(ya),Ia=j(ya),Ja={a:ha,A:ia,b:ja,B:ka,c:null,d:y,e:y,H:z,I:A,j:B,L:C,m:D,M:E,p:la,S:F,U:G,w:H,W:I,x:null,X:null,y:J,Y:K,Z:L,"%":$},Ka={a:ma,A:na,b:oa,B:pa,c:null,d:M,e:M,H:N,I:O,j:P,L:Q,m:R,M:S,p:qa,S:T,U:U,w:V,W:W,x:null,X:null,y:X,Y:Y,Z:Z,"%":$},La={a:_,A:aa,b:ba,B:ca,c:ea,d:r,e:r,H:t,I:t,j:s,L:w,m:q,M:u,p:h,S:v,U:l,w:k,W:m,x:fa,X:ga,y:o,Y:n,Z:p,"%":x};return Ja.x=b(sa,Ja),Ja.X=b(ta,Ja),Ja.c=b(ra,Ja),Ka.x=b(sa,Ka),Ka.X=b(ta,Ka),Ka.c=b(ra,Ka),{format:function(a){var c=b(a+="",Ja);return c.toString=function(){return a},c},parse:function(a){var b=f(a+="",c);return b.toString=function(){return a},b},utcFormat:function(a){var c=b(a+="",Ka);return c.toString=function(){return a},c},utcParse:function(a){var b=f(a,d);return b.toString=function(){return a},b}}}function g(a,b,c){var d=a<0?"-":"",e=(d?-a:a)+"",f=e.length;return d+(f68?1900:2e3),c+d[0].length):-1}function p(a,b,c){var d=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(b.slice(c,c+6));return d?(a.Z=d[1]?0:-(d[2]+(d[3]||"00")),c+d[0].length):-1}function q(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.m=d[0]-1,c+d[0].length):-1}function r(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.d=+d[0],c+d[0].length):-1}function s(a,b,c){var d=ea.exec(b.slice(c,c+3));return d?(a.m=0,a.d=+d[0],c+d[0].length):-1}function t(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.H=+d[0],c+d[0].length):-1}function u(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.M=+d[0],c+d[0].length):-1}function v(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.S=+d[0],c+d[0].length):-1}function w(a,b,c){var d=ea.exec(b.slice(c,c+3));return d?(a.L=+d[0],c+d[0].length):-1}function x(a,b,c){var d=fa.exec(b.slice(c,c+1));return d?c+d[0].length:-1}function y(a,b){return g(a.getDate(),b,2)}function z(a,b){return g(a.getHours(),b,2)}function A(a,b){return g(a.getHours()%12||12,b,2)}function B(a,c){return g(1+b.timeDay.count(b.timeYear(a),a),c,3)}function C(a,b){return g(a.getMilliseconds(),b,3)}function D(a,b){return g(a.getMonth()+1,b,2)}function E(a,b){return g(a.getMinutes(),b,2)}function F(a,b){return g(a.getSeconds(),b,2)}function G(a,c){return g(b.timeSunday.count(b.timeYear(a),a),c,2)}function H(a){return a.getDay()}function I(a,c){return g(b.timeMonday.count(b.timeYear(a),a),c,2)}function J(a,b){return g(a.getFullYear()%100,b,2)}function K(a,b){return g(a.getFullYear()%1e4,b,4)}function L(a){var b=a.getTimezoneOffset();return(b>0?"-":(b*=-1,"+"))+g(b/60|0,"0",2)+g(b%60,"0",2)}function M(a,b){return g(a.getUTCDate(),b,2)}function N(a,b){return g(a.getUTCHours(),b,2)}function O(a,b){return g(a.getUTCHours()%12||12,b,2)}function P(a,c){return g(1+b.utcDay.count(b.utcYear(a),a),c,3)}function Q(a,b){return g(a.getUTCMilliseconds(),b,3)}function R(a,b){return g(a.getUTCMonth()+1,b,2)}function S(a,b){return g(a.getUTCMinutes(),b,2)}function T(a,b){return g(a.getUTCSeconds(),b,2)}function U(a,c){return g(b.utcSunday.count(b.utcYear(a),a),c,2)}function V(a){return a.getUTCDay()}function W(a,c){return g(b.utcMonday.count(b.utcYear(a),a),c,2)}function X(a,b){return g(a.getUTCFullYear()%100,b,2)}function Y(a,b){return g(a.getUTCFullYear()%1e4,b,4)}function Z(){return"+0000"}function $(){return"%"}function _(b){return ca=f(b),a.timeFormat=ca.format,a.timeParse=ca.parse,a.utcFormat=ca.utcFormat,a.utcParse=ca.utcParse,ca}function aa(a){return a.toISOString()}function ba(a){var b=new Date(a);return isNaN(b)?null:b}var ca,da={"-":"",_:" ",0:"0"},ea=/^\s*\d+/,fa=/^%/,ga=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;_({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var ha="%Y-%m-%dT%H:%M:%S.%LZ",ia=Date.prototype.toISOString?aa:a.utcFormat(ha),ja=+new Date("2000-01-01T00:00:00.000Z")?ba:a.utcParse(ha);a.timeFormatDefaultLocale=_,a.timeFormatLocale=f,a.isoFormat=ia,a.isoParse=ja,Object.defineProperty(a,"__esModule",{value:!0})})},{"d3-time":10}],10:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,c,d,g){function h(b){return a(b=new Date(+b)),b}return h.floor=h,h.ceil=function(b){return a(b=new Date(b-1)),c(b,1),a(b),b},h.round=function(a){var b=h(a),c=h.ceil(a);return a-b0))return f;do f.push(new Date(+b));while(c(b,e),a(b),b=b)for(;a(b),!d(b);)b.setTime(b-1)},function(a,b){if(a>=a)for(;--b>=0;)for(;c(a,1),!d(a););})},d&&(h.count=function(b,c){return e.setTime(+b),f.setTime(+c),a(e),a(f),Math.floor(d(e,f))},h.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?h.filter(g?function(b){return g(b)%a===0}:function(b){return h.count(0,b)%a===0}):h:null}),h}function c(a){return b(function(b){b.setDate(b.getDate()-(b.getDay()+7-a)%7),b.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+7*b)},function(a,b){return(b-a-(b.getTimezoneOffset()-a.getTimezoneOffset())*j)/m})}function d(a){return b(function(b){b.setUTCDate(b.getUTCDate()-(b.getUTCDay()+7-a)%7),b.setUTCHours(0,0,0,0)},function(a,b){a.setUTCDate(a.getUTCDate()+7*b)},function(a,b){return(b-a)/m})}var e=new Date,f=new Date,g=b(function(){},function(a,b){a.setTime(+a+b)},function(a,b){return b-a});g.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?b(function(b){b.setTime(Math.floor(b/a)*a)},function(b,c){b.setTime(+b+c*a)},function(b,c){return(c-b)/a}):g:null};var h=g.range,i=1e3,j=6e4,k=36e5,l=864e5,m=6048e5,n=b(function(a){a.setTime(Math.floor(a/i)*i)},function(a,b){a.setTime(+a+b*i)},function(a,b){return(b-a)/i},function(a){return a.getUTCSeconds()}),o=n.range,p=b(function(a){a.setTime(Math.floor(a/j)*j)},function(a,b){a.setTime(+a+b*j)},function(a,b){return(b-a)/j},function(a){return a.getMinutes()}),q=p.range,r=b(function(a){var b=a.getTimezoneOffset()*j%k;b<0&&(b+=k),a.setTime(Math.floor((+a-b)/k)*k+b)},function(a,b){a.setTime(+a+b*k)},function(a,b){return(b-a)/k},function(a){return a.getHours()}),s=r.range,t=b(function(a){a.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+b)},function(a,b){return(b-a-(b.getTimezoneOffset()-a.getTimezoneOffset())*j)/l},function(a){return a.getDate()-1}),u=t.range,v=c(0),w=c(1),x=c(2),y=c(3),z=c(4),A=c(5),B=c(6),C=v.range,D=w.range,E=x.range,F=y.range,G=z.range,H=A.range,I=B.range,J=b(function(a){a.setDate(1),a.setHours(0,0,0,0)},function(a,b){a.setMonth(a.getMonth()+b)},function(a,b){return b.getMonth()-a.getMonth()+12*(b.getFullYear()-a.getFullYear())},function(a){return a.getMonth()}),K=J.range,L=b(function(a){a.setMonth(0,1),a.setHours(0,0,0,0)},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a,b){return b.getFullYear()-a.getFullYear()},function(a){return a.getFullYear()});L.every=function(a){return isFinite(a=Math.floor(a))&&a>0?b(function(b){b.setFullYear(Math.floor(b.getFullYear()/a)*a),b.setMonth(0,1),b.setHours(0,0,0,0)},function(b,c){b.setFullYear(b.getFullYear()+c*a)}):null};var M=L.range,N=b(function(a){a.setUTCSeconds(0,0)},function(a,b){a.setTime(+a+b*j)},function(a,b){return(b-a)/j},function(a){return a.getUTCMinutes()}),O=N.range,P=b(function(a){a.setUTCMinutes(0,0,0)},function(a,b){a.setTime(+a+b*k)},function(a,b){return(b-a)/k},function(a){return a.getUTCHours()}),Q=P.range,R=b(function(a){a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCDate(a.getUTCDate()+b)},function(a,b){return(b-a)/l},function(a){return a.getUTCDate()-1}),S=R.range,T=d(0),U=d(1),V=d(2),W=d(3),X=d(4),Y=d(5),Z=d(6),$=T.range,_=U.range,aa=V.range,ba=W.range,ca=X.range,da=Y.range,ea=Z.range,fa=b(function(a){a.setUTCDate(1),a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCMonth(a.getUTCMonth()+b)},function(a,b){return b.getUTCMonth()-a.getUTCMonth()+12*(b.getUTCFullYear()-a.getUTCFullYear())},function(a){return a.getUTCMonth()}),ga=fa.range,ha=b(function(a){a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCFullYear(a.getUTCFullYear()+b)},function(a,b){return b.getUTCFullYear()-a.getUTCFullYear()},function(a){return a.getUTCFullYear()});ha.every=function(a){return isFinite(a=Math.floor(a))&&a>0?b(function(b){b.setUTCFullYear(Math.floor(b.getUTCFullYear()/a)*a),b.setUTCMonth(0,1),b.setUTCHours(0,0,0,0)},function(b,c){b.setUTCFullYear(b.getUTCFullYear()+c*a)}):null};var ia=ha.range;a.timeInterval=b,a.timeMillisecond=g,a.timeMilliseconds=h,a.utcMillisecond=g,a.utcMilliseconds=h,a.timeSecond=n,a.timeSeconds=o,a.utcSecond=n,a.utcSeconds=o,a.timeMinute=p,a.timeMinutes=q,a.timeHour=r,a.timeHours=s,a.timeDay=t,a.timeDays=u,a.timeWeek=v,a.timeWeeks=C,a.timeSunday=v,a.timeSundays=C,a.timeMonday=w,a.timeMondays=D,a.timeTuesday=x,a.timeTuesdays=E,a.timeWednesday=y,a.timeWednesdays=F,a.timeThursday=z,a.timeThursdays=G,a.timeFriday=A,a.timeFridays=H,a.timeSaturday=B,a.timeSaturdays=I,a.timeMonth=J,a.timeMonths=K,a.timeYear=L,a.timeYears=M,a.utcMinute=N,a.utcMinutes=O,a.utcHour=P,a.utcHours=Q,a.utcDay=R,a.utcDays=S,a.utcWeek=T,a.utcWeeks=$,a.utcSunday=T,a.utcSundays=$,a.utcMonday=U,a.utcMondays=_,a.utcTuesday=V,a.utcTuesdays=aa,a.utcWednesday=W,a.utcWednesdays=ba,a.utcThursday=X,a.utcThursdays=ca,a.utcFriday=Y,a.utcFridays=da,a.utcSaturday=Z,a.utcSaturdays=ea,a.utcMonth=fa,a.utcMonths=ga,a.utcYear=ha,a.utcYears=ia,Object.defineProperty(a,"__esModule",{value:!0})})},{}],11:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var h=g.default.d3_calcType(b,y,m,o,s,v),i=a.selectAll("g").data([b]);i.enter().append("g").attr("class",p+"legendCells"),n&&g.default.d3_filterCells(h,n);var j=a.select("."+p+"legendCells").selectAll("."+p+"cell").data(h.data),C=j.enter().append("g").attr("class",p+"cell");C.append(c).attr("class",p+"swatch");var D=a.selectAll("g."+p+"cell "+c);g.default.d3_addEvents(C,B),j.exit().transition().style("opacity",0).remove(),g.default.d3_drawShapes(c,D,e,d,f,z),g.default.d3_addText(a,C,h.labels,p,w),j=C.merge(j);var E=j.selectAll("text"),F=E.nodes().map(function(a){return a.getBBox()}),G=D.nodes().map(function(a){return a.getBBox()});q?D.attr("class",function(a){return p+"swatch "+h.feature(a)}):"line"==c?D.style("stroke",h.feature):D.style("fill",h.feature);var H=void 0,I=void 0,J="start"==u?0:"middle"==u?.5:1;"vertical"===x?!function(){var a=F.map(function(a,b){return Math.max(a.height,G[b].height)});H=function(b,c){var d=(0,k.sum)(a.slice(0,c));return"translate(0, "+(d+c*l)+")"},I=function(a,b){return"translate( "+(G[b].width+G[b].x+t)+", "+(G[b].y+G[b].height/2+5)+")"}}():"horizontal"===x&&(H=function(a,b){return"translate("+b*(G[b].width+l)+",0)"},I=function(a,b){return"translate("+(G[b].width*J+G[b].x)+",\n "+(G[b].height+G[b].y+t+8)+")"}),g.default.d3_placement(x,j,H,E,I,u),g.default.d3_title(a,r,p,A),j.transition().style("opacity",1)}var b=(0,i.scaleLinear)(),c="rect",d=15,e=15,f=10,l=2,m=[5],n=void 0,o=[],p="",q=!1,r="",s=(0,j.format)(".01f"),t=10,u="middle",v="to",w=void 0,x="vertical",y=!1,z=void 0,A=void 0,B=(0,h.dispatch)("cellover","cellout","cellclick");return a.scale=function(c){return arguments.length?(b=c,a):b},a.cells=function(b){return arguments.length?((b.length>1||b>=2)&&(m=b),a):m},a.cellFilter=function(b){return arguments.length?(n=b,a):n},a.shape=function(b,d){return arguments.length?(("rect"==b||"circle"==b||"line"==b||"path"==b&&"string"==typeof d)&&(c=b,z=d),a):c},a.shapeWidth=function(b){return arguments.length?(d=+b,a):d},a.shapeHeight=function(b){return arguments.length?(e=+b,a):e},a.shapeRadius=function(b){return arguments.length?(f=+b,a):f},a.shapePadding=function(b){return arguments.length?(l=+b,a):l},a.labels=function(b){return arguments.length?(o=b,a):o},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(u=b),a):u},a.labelFormat=function(b){return arguments.length?(s="string"==typeof b?(0,j.format)(b):b,a):s},a.labelOffset=function(b){return arguments.length?(t=+b,a):t},a.labelDelimiter=function(b){return arguments.length?(v=b,a):v},a.labelWrap=function(b){return arguments.length?(w=b,a):w},a.useClass=function(b){return arguments.length?(b!==!0&&b!==!1||(q=b),a):q},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(x=b),a):x},a.ascending=function(b){return arguments.length?(y=!!b,a):y},a.classPrefix=function(b){return arguments.length?(p=b,a):p},a.title=function(b){return arguments.length?(r=b,a):r},a.titleWidth=function(b){return arguments.length?(A=b,a):A},a.textWrap=function(b){return arguments.length?(textWrap=b,a):textWrap},a.on=function(){var b=B.on.apply(B,arguments);return b===B?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":13,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],12:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=c.thresholdLabels=function(a){var b=a.i,c=a.genLength,d=a.generatedLabels;return 0===b?d[b].replace("NaN to","Less than"):b===c-1?"More than "+d[c-1].replace(" to NaN",""):d[b]};c.default={thresholdLabels:d}},{}],13:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=a("d3-selection"),f=function(a){return a},g=function(a){for(var b=[],c=0,d=a.length;cb&&f.length>1&&(f.pop(),i.text(f.join(" ")),f=[a],i=c.append("tspan").attr("x",0).attr("dy",g+h+"em").text(a))})},i=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],b=arguments[1],c=arguments[2],e=arguments[3];if("object"===("undefined"==typeof b?"undefined":d(b))){if(0===b.length)return a;for(var f=b.length;f1)d=b;else for(var e=a.domain(),f=(e[e.length-1]-e[0])/(b-1),g=0;g1||b>=2)&&(f=b),a):f},a.cellFilter=function(b){return arguments.length?(l=b,a):l},a.shape=function(b,d){return arguments.length?("rect"!=b&&"circle"!=b&&"line"!=b||(c=b,w=d),a):c},a.shapeWidth=function(b){return arguments.length?(d=+b,a):d},a.shapePadding=function(b){return arguments.length?(e=+b,a):e},a.labels=function(b){return arguments.length?(m=b,a):m},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(r=b),a):r},a.labelFormat=function(b){return arguments.length?(p="string"==typeof b?(0,j.format)(b):b,a):p},a.labelOffset=function(b){return arguments.length?(q=+b,a):q},a.labelDelimiter=function(b){return arguments.length?(s=b,a):s},a.labelWrap=function(b){return arguments.length?(t=b,a):t},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(u=b),a):u},a.ascending=function(b){return arguments.length?(v=!!b,a):v},a.classPrefix=function(b){return arguments.length?(n=b,a):n},a.title=function(b){return arguments.length?(o=b,a):o},a.titleWidth=function(b){return arguments.length?(x=b,a):x},a.on=function(){var b=y.on.apply(y,arguments);return b===y?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":13,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],15:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var h=g.default.d3_calcType(b,x,m,o,r,u),i=a.selectAll("g").data([b]);n&&g.default.d3_filterCells(h,n),i.enter().append("g").attr("class",p+"legendCells");var j=a.select("."+p+"legendCells").selectAll("."+p+"cell").data(h.data),A=j.enter().append("g").attr("class",p+"cell");A.append(c).attr("class",p+"swatch");var B=a.selectAll("g."+p+"cell "+c);g.default.d3_addEvents(A,z),j.exit().transition().style("opacity",0).remove(),g.default.d3_drawShapes(c,B,e,d,f,h.feature),g.default.d3_addText(a,A,h.labels,p,v),j=A.merge(j);var C=j.selectAll("text"),D=C.nodes().map(function(a){return a.getBBox()}),E=B.nodes().map(function(a){return a.getBBox()}),F=(0,k.max)(E,function(a){return a.height}),G=(0,k.max)(E,function(a){return a.width}),H=void 0,I=void 0,J="start"==s?0:"middle"==s?.5:1;"vertical"===w?!function(){var a=D.map(function(a,b){return Math.max(F,a.height)});H=function(b,c){var d=(0,k.sum)(a.slice(0,c));return"translate(0, "+(d+c*l)+" )"},I=function(a,b){return"translate( "+(G+t)+",\n "+(E[b].y+E[b].height/2+5)+")"}}():"horizontal"===w&&(H=function(a,b){return"translate( "+b*(G+l)+",0)"},I=function(a,b){return"translate( "+(E[b].width*J+E[b].x)+",\n "+(F+t)+")"}),g.default.d3_placement(w,j,H,C,I,s),g.default.d3_title(a,q,p,y),j.transition().style("opacity",1)}var b=(0,i.scaleLinear)(),c="path",d=15,e=15,f=10,l=5,m=[5],n=void 0,o=[],p="",q="",r=(0,j.format)(".01f"),s="middle",t=10,u="to",v=void 0,w="vertical",x=!1,y=void 0,z=(0,h.dispatch)("cellover","cellout","cellclick");return a.scale=function(c){return arguments.length?(b=c,a):b},a.cells=function(b){return arguments.length?((b.length>1||b>=2)&&(m=b),a):m},a.cellFilter=function(b){return arguments.length?(n=b,a):n},a.shapePadding=function(b){return arguments.length?(l=+b,a):l},a.labels=function(b){return arguments.length?(o=b,a):o},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(s=b),a):s},a.labelFormat=function(b){return arguments.length?(r="string"==typeof b?(0,j.format)(b):b,a):r},a.labelOffset=function(b){return arguments.length?(t=+b,a):t},a.labelDelimiter=function(b){return arguments.length?(u=b,a):u},a.labelWrap=function(b){return arguments.length?(v=b,a):v},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(w=b),a):w},a.ascending=function(b){return arguments.length?(x=!!b,a):x},a.classPrefix=function(b){return arguments.length?(p=b,a):p},a.title=function(b){return arguments.length?(q=b,a):q},a.titleWidth=function(b){return arguments.length?(y=b,a):y},a.on=function(){var b=z.on.apply(z,arguments);return b===z?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":13,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],16:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}var e=a("./color"),f=d(e),g=a("./size"),h=d(g),i=a("./symbol"),j=d(i),k=a("./helpers"),l=d(k);d3.legendColor=f.default,d3.legendSize=h.default,d3.legendSymbol=j.default,d3.legendHelpers=l.default},{"./color":11,"./helpers":12,"./size":14,"./symbol":15}]},{},[16]); \ No newline at end of file +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gb?1:a>=b?0:NaN}function c(a){return 1===a.length&&(a=d(a)),{left:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d>>1;a(b[f],c)<0?d=f+1:e=f}return d},right:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d>>1;a(b[f],c)>0?e=f:d=f+1}return d}}}function d(a){return function(c,d){return b(a(c),d)}}function e(a,b){return ba?1:b>=a?0:NaN}function f(a){return null===a?NaN:+a}function g(a,b){var c,d,e=a.length,g=0,h=0,i=-1,j=0;if(null==b)for(;++i1)return h/(j-1)}function h(a,b){var c=g(a,b);return c?Math.sqrt(c):c}function i(a,b){var c,d,e,f=-1,g=a.length;if(null==b){for(;++f=d){c=e=d;break}for(;++fd&&(c=d),e=d){c=e=d;break}for(;++fd&&(c=d),e=M?e*=10:f>=N?e*=5:f>=O&&(e*=2),b=k;)l.pop(),--n;var o,p=new Array(n+1);for(e=0;e<=n;++e)o=p[e]=[],o.x0=e>0?l[e-1]:j,o.x1=e=1)return+c(a[d-1],d-1,a);var d,e=(d-1)*b,g=Math.floor(e),h=+c(a[g],g,a);return h+(+c(a[g+1],g+1,a)-h)*(e-g)}}function r(a,c,d){return a=L.call(a,f).sort(b),Math.ceil((d-c)/(2*(q(a,.75)-q(a,.25))*Math.pow(a.length,-1/3)))}function s(a,b,c){return Math.ceil((c-b)/(3.5*h(a)*Math.pow(a.length,-1/3)))}function t(a,b){var c,d,e=-1,f=a.length;if(null==b){for(;++e=d){c=d;break}for(;++ec&&(c=d)}else{for(;++e=d){c=d;break}for(;++ec&&(c=d)}return c}function u(a,b){var c,d=0,e=a.length,g=-1,h=e;if(null==b)for(;++g=0;)for(d=a[e],b=d.length;--b>=0;)c[--g]=d[b];return c}function x(a,b){var c,d,e=-1,f=a.length;if(null==b){for(;++e=d){c=d;break}for(;++ed&&(c=d)}else{for(;++e=d){c=d;break}for(;++ed&&(c=d)}return c}function y(a){for(var b=0,c=a.length-1,d=a[0],e=new Array(c<0?0:c);b=k.length)return null!=h&&b.sort(h),null!=i?i(b):b;for(var g,j,l,m=-1,n=b.length,o=k[d++],p=c(),q=e();++mk.length)return a;var d,e=l[c-1];return null!=i&&c>=k.length?d=a.entries():(d=[],a.each(function(a,e){d.push({key:e,values:b(a,c)})})),null!=e?d.sort(function(a,b){return e(a.key,b.key)}):d}var h,i,j,k=[],l=[];return j={object:function(b){return a(b,0,d,e)},map:function(b){return a(b,0,f,g)},entries:function(c){return b(a(c,0,f,g),0)},key:function(a){return k.push(a),j},sortKeys:function(a){return l[k.length-1]=a,j},sortValues:function(a){return h=a,j},rollup:function(a){return i=a,j}}},l=c.prototype;h.prototype=i.prototype={constructor:h,has:l.has,add:function(a){return a+="",this[j+a]=a,this},remove:l.remove,clear:l.clear,values:l.keys,size:l.size,empty:l.empty,each:l.each};var m=function(a){var b=[];for(var c in a)b.push(c);return b},n=function(a){var b=[];for(var c in a)b.push(a[c]);return b},o=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b};a.nest=k,a.set=i,a.map=c,a.keys=m,a.values=n,a.entries=o,Object.defineProperty(a,"__esModule",{value:!0})})},{}],3:[function(a,b,c){!function(a,d){"object"==typeof c&&void 0!==b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,b){var c=Object.create(a.prototype);for(var d in b)c[d]=b[d];return c}function c(){}function d(a){var b;return a=(a+"").trim().toLowerCase(),(b=H.exec(a))?(b=parseInt(b[1],16),new i(b>>8&15|b>>4&240,b>>4&15|240&b,(15&b)<<4|15&b,1)):(b=I.exec(a))?e(parseInt(b[1],16)):(b=J.exec(a))?new i(b[1],b[2],b[3],1):(b=K.exec(a))?new i(255*b[1]/100,255*b[2]/100,255*b[3]/100,1):(b=L.exec(a))?f(b[1],b[2],b[3],b[4]):(b=M.exec(a))?f(255*b[1]/100,255*b[2]/100,255*b[3]/100,b[4]):(b=N.exec(a))?j(b[1],b[2]/100,b[3]/100,1):(b=O.exec(a))?j(b[1],b[2]/100,b[3]/100,b[4]):P.hasOwnProperty(a)?e(P[a]):"transparent"===a?new i(NaN,NaN,NaN,0):null}function e(a){return new i(a>>16&255,a>>8&255,255&a,1)}function f(a,b,c,d){return d<=0&&(a=b=c=NaN),new i(a,b,c,d)}function g(a){return a instanceof c||(a=d(a)),a?(a=a.rgb(),new i(a.r,a.g,a.b,a.opacity)):new i}function h(a,b,c,d){return 1===arguments.length?g(a):new i(a,b,c,null==d?1:d)}function i(a,b,c,d){this.r=+a,this.g=+b,this.b=+c,this.opacity=+d}function j(a,b,c,d){return d<=0?a=b=c=NaN:c<=0||c>=1?a=b=NaN:b<=0&&(a=NaN),new m(a,b,c,d)}function k(a){if(a instanceof m)return new m(a.h,a.s,a.l,a.opacity);if(a instanceof c||(a=d(a)),!a)return new m;if(a instanceof m)return a;a=a.rgb();var b=a.r/255,e=a.g/255,f=a.b/255,g=Math.min(b,e,f),h=Math.max(b,e,f),i=NaN,j=h-g,k=(h+g)/2;return j?(i=b===h?(e-f)/j+6*(e0&&k<1?0:i,new m(i,j,k,a.opacity)}function l(a,b,c,d){return 1===arguments.length?k(a):new m(a,b,c,null==d?1:d)}function m(a,b,c,d){this.h=+a,this.s=+b,this.l=+c,this.opacity=+d}function n(a,b,c){return 255*(a<60?b+(c-b)*a/60:a<180?c:a<240?b+(c-b)*(240-a)/60:b)}function o(a){if(a instanceof q)return new q(a.l,a.a,a.b,a.opacity);if(a instanceof x){var b=a.h*Q;return new q(a.l,Math.cos(b)*a.c,Math.sin(b)*a.c,a.opacity)}a instanceof i||(a=g(a));var c=u(a.r),d=u(a.g),e=u(a.b),f=r((.4124564*c+.3575761*d+.1804375*e)/T),h=r((.2126729*c+.7151522*d+.072175*e)/U);return new q(116*h-16,500*(f-h),200*(h-r((.0193339*c+.119192*d+.9503041*e)/V)),a.opacity)}function p(a,b,c,d){return 1===arguments.length?o(a):new q(a,b,c,null==d?1:d)}function q(a,b,c,d){this.l=+a,this.a=+b,this.b=+c,this.opacity=+d}function r(a){return a>Z?Math.pow(a,1/3):a/Y+W}function s(a){return a>X?a*a*a:Y*(a-W)}function t(a){return 255*(a<=.0031308?12.92*a:1.055*Math.pow(a,1/2.4)-.055)}function u(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function v(a){if(a instanceof x)return new x(a.h,a.c,a.l,a.opacity);a instanceof q||(a=o(a));var b=Math.atan2(a.b,a.a)*R;return new x(b<0?b+360:b,Math.sqrt(a.a*a.a+a.b*a.b),a.l,a.opacity)}function w(a,b,c,d){return 1===arguments.length?v(a):new x(a,b,c,null==d?1:d)}function x(a,b,c,d){this.h=+a,this.c=+b,this.l=+c,this.opacity=+d}function y(a){if(a instanceof A)return new A(a.h,a.s,a.l,a.opacity);a instanceof i||(a=g(a));var b=a.r/255,c=a.g/255,d=a.b/255,e=(fa*d+da*b-ea*c)/(fa+da-ea),f=d-e,h=(ca*(c-e)-aa*f)/ba,j=Math.sqrt(h*h+f*f)/(ca*e*(1-e)),k=j?Math.atan2(h,f)*R-120:NaN;return new A(k<0?k+360:k,j,e,a.opacity)}function z(a,b,c,d){return 1===arguments.length?y(a):new A(a,b,c,null==d?1:d)}function A(a,b,c,d){this.h=+a,this.s=+b,this.l=+c,this.opacity=+d}var B=function(a,b,c){a.prototype=b.prototype=c,c.constructor=a},C=.7,D=1/C,E="\\s*([+-]?\\d+)\\s*",F="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",G="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",H=/^#([0-9a-f]{3})$/,I=/^#([0-9a-f]{6})$/,J=new RegExp("^rgb\\("+[E,E,E]+"\\)$"),K=new RegExp("^rgb\\("+[G,G,G]+"\\)$"),L=new RegExp("^rgba\\("+[E,E,E,F]+"\\)$"),M=new RegExp("^rgba\\("+[G,G,G,F]+"\\)$"),N=new RegExp("^hsl\\("+[F,G,G]+"\\)$"),O=new RegExp("^hsla\\("+[F,G,G,F]+"\\)$"),P={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};B(c,d,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),B(i,h,b(c,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new i(this.r*a,this.g*a,this.b*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new i(this.r*a,this.g*a,this.b*a,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var a=this.opacity;return a=isNaN(a)?1:Math.max(0,Math.min(1,a)),(1===a?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===a?")":", "+a+")")}})),B(m,l,b(c,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new m(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new m(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=this.h%360+360*(this.h<0),b=isNaN(a)||isNaN(this.s)?0:this.s,c=this.l,d=c+(c<.5?c:1-c)*b,e=2*c-d;return new i(n(a>=240?a-240:a+120,e,d),n(a,e,d),n(a<120?a+240:a-120,e,d),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Q=Math.PI/180,R=180/Math.PI,S=18,T=.95047,U=1,V=1.08883,W=4/29,X=6/29,Y=3*X*X,Z=X*X*X;B(q,p,b(c,{brighter:function(a){return new q(this.l+S*(null==a?1:a),this.a,this.b,this.opacity)},darker:function(a){return new q(this.l-S*(null==a?1:a),this.a,this.b,this.opacity)},rgb:function(){var a=(this.l+16)/116,b=isNaN(this.a)?a:a+this.a/500,c=isNaN(this.b)?a:a-this.b/200;return a=U*s(a),b=T*s(b),c=V*s(c),new i(t(3.2404542*b-1.5371385*a-.4985314*c),t(-.969266*b+1.8760108*a+.041556*c),t(.0556434*b-.2040259*a+1.0572252*c),this.opacity)}})),B(x,w,b(c,{brighter:function(a){return new x(this.h,this.c,this.l+S*(null==a?1:a),this.opacity)},darker:function(a){return new x(this.h,this.c,this.l-S*(null==a?1:a),this.opacity)},rgb:function(){return o(this).rgb()}}));var $=-.14861,_=1.78277,aa=-.29227,ba=-.90649,ca=1.97294,da=ca*ba,ea=ca*_,fa=_*aa-ba*$;B(A,z,b(c,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new A(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new A(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=isNaN(this.h)?0:(this.h+120)*Q,b=+this.l,c=isNaN(this.s)?0:this.s*b*(1-b),d=Math.cos(a),e=Math.sin(a);return new i(255*(b+c*($*d+_*e)),255*(b+c*(aa*d+ba*e)),255*(b+c*(ca*d)),this.opacity)}})),a.color=d,a.rgb=h,a.hsl=l,a.lab=p,a.hcl=w,a.cubehelix=z,Object.defineProperty(a,"__esModule",{value:!0})})},{}],4:[function(a,b,c){!function(a,d){"object"==typeof c&&void 0!==b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(){for(var a,b=0,d=arguments.length,e={};b=0&&(c=a.slice(d+1),a=a.slice(0,d)),a&&!b.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:c}})}function e(a,b){for(var c,d=0,e=a.length;d0)for(var c,d,e=new Array(c),f=0;f1?d[0]+d.slice(2):d,+a.slice(c+1)]}function c(a){return a=b(Math.abs(a)),a?a[1]:NaN}function d(a,b){return function(c,d){for(var e=c.length,f=[],g=0,h=a[0],i=0;e>0&&h>0&&(i+h+1>d&&(h=Math.max(1,d-i)),f.push(c.substring(e-=h,e+h)),!((i+=h+1)>d));)h=a[g=(g+1)%a.length];return f.reverse().join(b)}}function e(a,b){a=a.toPrecision(b);a:for(var c,d=a.length,e=1,f=-1;e0&&(f=0)}return f>0?a.slice(0,f)+a.slice(c+1):a}function f(a,c){var d=b(a,c);if(!d)return a+"";var e=d[0],f=d[1],g=f-(p=3*Math.max(-8,Math.min(8,Math.floor(f/3))))+1,h=e.length;return g===h?e:g>h?e+new Array(g-h+1).join("0"):g>0?e.slice(0,g)+"."+e.slice(g):"0."+new Array(1-g).join("0")+b(a,Math.max(0,c+g-1))[0]}function g(a,c){var d=b(a,c);if(!d)return a+"";var e=d[0],f=d[1];return f<0?"0."+new Array(-f).join("0")+e:e.length>f+1?e.slice(0,f+1)+"."+e.slice(f+1):e+new Array(f-e.length+2).join("0")}function h(a){return new i(a)}function i(a){if(!(b=r.exec(a)))throw new Error("invalid format: "+a);var b,c=b[1]||" ",d=b[2]||">",e=b[3]||"-",f=b[4]||"",g=!!b[5],h=b[6]&&+b[6],i=!!b[7],j=b[8]&&+b[8].slice(1),k=b[9]||"";"n"===k?(i=!0,k="g"):q[k]||(k=""),(g||"0"===c&&"="===d)&&(g=!0,c="0",d="="),this.fill=c,this.align=d,this.sign=e,this.symbol=f,this.zero=g,this.width=h,this.comma=i,this.precision=j,this.type=k}function j(a){return a}function k(a){function b(a){function b(a){var b,g,h,j=r,q=s;if("c"===o)q=u(a)+q,a="";else{a=+a;var w=(a<0||1/a<0)&&(a*=-1,!0);if(a=u(a,n),w)for(b=-1,g=a.length,w=!1;++b(h=a.charCodeAt(b))||h>57){q=(46===h?i+a.slice(b+1):a.slice(b))+q,a=a.slice(0,b);break}}m&&!k&&(a=f(a,1/0));var x=j.length+a.length+q.length,y=x>1)+j+a+q+y.slice(x)}return y+j+a+q}a=h(a);var c=a.fill,d=a.align,e=a.sign,j=a.symbol,k=a.zero,l=a.width,m=a.comma,n=a.precision,o=a.type,r="$"===j?g[0]:"#"===j&&/[boxX]/.test(o)?"0"+o.toLowerCase():"",s="$"===j?g[1]:/[%p]/.test(o)?"%":"",u=q[o],v=!o||/[defgprs%]/.test(o);return n=null==n?o?6:12:/[gprs]/.test(o)?Math.max(1,Math.min(21,n)):Math.max(0,Math.min(20,n)),b.toString=function(){return a+""},b}function e(a,d){var e=b((a=h(a),a.type="f",a)),f=3*Math.max(-8,Math.min(8,Math.floor(c(d)/3))),g=Math.pow(10,-f),i=t[8+f/3];return function(a){return e(g*a)+i}}var f=a.grouping&&a.thousands?d(a.grouping,a.thousands):j,g=a.currency,i=a.decimal;return{format:b,formatPrefix:e}}function l(b){return s=k(b),a.format=s.format,a.formatPrefix=s.formatPrefix,s}function m(a){return Math.max(0,-c(Math.abs(a)))}function n(a,b){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(c(b)/3)))-c(Math.abs(a)))}function o(a,b){return a=Math.abs(a),b=Math.abs(b)-a,Math.max(0,c(b)-c(a))+1}var p,q={"":e,"%":function(a,b){return(100*a).toFixed(b)},b:function(a){return Math.round(a).toString(2)},c:function(a){return a+""},d:function(a){return Math.round(a).toString(10)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},g:function(a,b){return a.toPrecision(b)},o:function(a){return Math.round(a).toString(8)},p:function(a,b){return g(100*a,b)},r:g,s:f,X:function(a){return Math.round(a).toString(16).toUpperCase()},x:function(a){return Math.round(a).toString(16)}},r=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;i.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var s,t=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];l({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),a.formatDefaultLocale=l,a.formatLocale=k,a.formatSpecifier=h,a.precisionFixed=m,a.precisionPrefix=n,a.precisionRound=o,Object.defineProperty(a,"__esModule",{value:!0})})},{}],6:[function(a,b,c){!function(d,e){"object"==typeof c&&void 0!==b?e(c,a("d3-color")):"function"==typeof define&&define.amd?define(["exports","d3-color"],e):e(d.d3=d.d3||{},d.d3)}(this,function(a,b){"use strict";function c(a,b,c,d,e){var f=a*a,g=f*a;return((1-3*a+3*f-g)*b+(4-6*f+3*g)*c+(1+3*a+3*f-3*g)*d+g*e)/6}function d(a,b){return function(c){return a+c*b}}function e(a,b,c){return a=Math.pow(a,c),b=Math.pow(b,c)-a,c=1/c,function(d){return Math.pow(a+d*b,c)}}function f(a,b){var c=b-a;return c?d(a,c>180||c<-180?c-360*Math.round(c/360):c):B(isNaN(a)?b:a)}function g(a){return 1==(a=+a)?h:function(b,c){return c-b?e(b,c,a):B(isNaN(b)?c:b)}}function h(a,b){var c=b-a;return c?d(a,c):B(isNaN(a)?b:a)}function i(a){return function(c){var d,e,f=c.length,g=new Array(f),h=new Array(f),i=new Array(f);for(d=0;d180?b+=360:b-a>180&&(a+=360),f.push({i:c.push(e(c)+"rotate(",null,d)-2,x:H(a,b)})):b&&c.push(e(c)+"rotate("+b+d)}function h(a,b,c,f){a!==b?f.push({i:c.push(e(c)+"skewX(",null,d)-2,x:H(a,b)}):b&&c.push(e(c)+"skewX("+b+d)}function i(a,b,c,d,f,g){if(a!==c||b!==d){var h=f.push(e(f)+"scale(",null,",",null,")");g.push({i:h-4,x:H(a,c)},{i:h-2,x:H(b,d)})}else 1===c&&1===d||f.push(e(f)+"scale("+c+","+d+")")}return function(b,c){var d=[],e=[];return b=a(b),c=a(c),f(b.translateX,b.translateY,c.translateX,c.translateY,d,e),g(b.rotate,c.rotate,d,e),h(b.skewX,c.skewX,d,e),i(b.scaleX,b.scaleY,c.scaleX,c.scaleY,d,e),b=c=null,function(a){for(var b,c=-1,f=e.length;++c=1?(d=1,b-1):Math.floor(d*b),f=a[e],g=a[e+1],h=e>0?a[e-1]:2*f-g,i=ef&&(e=b.slice(f,e),h[g]?h[g]+=e:h[++g]=e),(c=c[0])===(d=d[0])?h[g]?h[g]+=d:h[++g]=d:(h[++g]=null,i.push({i:g,x:H(c,d)})),f=K.lastIndex;return f=c?1:d(a)}}}function q(a){return function(b,c){var d=a(b=+b,c=+c);return function(a){return a<=0?b:a>=1?c:d(a)}}}function r(a,b,c,d){var e=a[0],f=a[1],g=b[0],h=b[1];return f2?s:r,g=h=null,e}function e(b){return(g||(g=f(i,j,l?p(a):a,k)))(+b)}var f,g,h,i=$,j=$,k=d.interpolate,l=!1;return e.invert=function(a){return(h||(h=f(j,i,o,l?q(b):b)))(+a)},e.domain=function(a){return arguments.length?(i=X.call(a,n),c()):i.slice()},e.range=function(a){return arguments.length?(j=Y.call(a),c()):j.slice()},e.rangeRound=function(a){return j=Y.call(a),k=d.interpolateRound,c()},e.clamp=function(a){return arguments.length?(l=!!a,c()):l},e.interpolate=function(a){return arguments.length?(k=a,c()):k},c()}function v(a,c,d){var f,g=a[0],h=a[a.length-1],i=b.tickStep(g,h,null==c?10:c);switch(d=e.formatSpecifier(null==d?",f":d),d.type){case"s":var j=Math.max(Math.abs(g),Math.abs(h));return null!=d.precision||isNaN(f=e.precisionPrefix(i,j))||(d.precision=f),e.formatPrefix(d,j);case"":case"e":case"g":case"p":case"r":null!=d.precision||isNaN(f=e.precisionRound(i,Math.max(Math.abs(g),Math.abs(h))))||(d.precision=f-("e"===d.type));break;case"f":case"%":null!=d.precision||isNaN(f=e.precisionFixed(i))||(d.precision=f-2*("%"===d.type))}return e.format(d)}function w(a){var c=a.domain;return a.ticks=function(a){var d=c();return b.ticks(d[0],d[d.length-1],null==a?10:a)},a.tickFormat=function(a,b){return v(c(),a,b)},a.nice=function(d){var e=c(),f=e.length-1,g=null==d?10:d,h=e[0],i=e[f],j=b.tickStep(h,i,g);return j&&(j=b.tickStep(Math.floor(h/j)*j,Math.ceil(i/j)*j,g),e[0]=Math.floor(h/j)*j,e[f]=Math.ceil(i/j)*j,c(e)),a},a}function x(){var a=u(o,d.interpolateNumber);return a.copy=function(){return t(a,x())},w(a)}function y(){function a(a){return+a}var b=[0,1];return a.invert=a,a.domain=a.range=function(c){return arguments.length?(b=X.call(c,n),a):b.slice()},a.copy=function(){return y().domain(b)},w(a)}function z(a,b){a=a.slice();var c,d=0,e=a.length-1,f=a[d],g=a[e];return g0){for(;nj)break;q.push(m)}}else for(;n=1;--l)if(!((m=k*l)j)break;q.push(m)}}else q=b.ticks(n,o,Math.min(o-n,p)).map(h);return c?q.reverse():q},c.tickFormat=function(a,b){if(null==b&&(b=10===f?".0e":","),"function"!=typeof b&&(b=e.format(b)),a===1/0)return b;null==a&&(a=10);var d=Math.max(1,f*a/c.ticks().length);return function(a){var c=a/h(Math.round(g(a)));return c*f0?f[b-1]:d[0],b=f?[g[f-1],e]:[g[b-1],g[b]]},a.copy=function(){return L().domain([d,e]).range(h)},w(a)}function M(){function a(a){if(a<=a)return d[b.bisect(c,a,0,e)]}var c=[.5],d=[0,1],e=1;return a.domain=function(b){return arguments.length?(c=Y.call(b),e=Math.min(c.length,d.length-1),a):c.slice()},a.range=function(b){return arguments.length?(d=Y.call(b),e=Math.min(c.length,d.length-1),a):d.slice()},a.invertExtent=function(a){var b=d.indexOf(a);return[c[b-1],c[b]]},a.copy=function(){return M().domain(c).range(d)},a}function N(a){return new Date(a)}function O(a){return a instanceof Date?+a:+new Date(+a)}function P(a,c,e,f,g,h,i,j,k){function l(b){return(i(b)1)&&(a-=Math.floor(a));var b=Math.abs(a-.5);return na.h=360*a-100,na.s=1.5-1.5*b,na.l=.8-.9*b,na+""}function U(a){var b=a.length;return function(c){return a[Math.max(0,Math.min(b-1,Math.floor(c*b)))]}}function V(a){function b(b){var f=(b-c)/(d-c);return a(e?Math.max(0,Math.min(1,f)):f)}var c=0,d=1,e=!1;return b.domain=function(a){return arguments.length?(c=+a[0],d=+a[1],b):[c,d]},b.clamp=function(a){return arguments.length?(e=!!a,b):e},b.interpolator=function(c){return arguments.length?(a=c,b):a},b.copy=function(){return V(a).domain([c,d]).clamp(e)},w(b)}var W=Array.prototype,X=W.map,Y=W.slice,Z={name:"implicit"},$=[0,1],_=1e3,aa=60*_,ba=60*aa,ca=24*ba,da=7*ca,ea=30*ca,fa=365*ca,ga=S("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ha=S("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),ia=S("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),ja=S("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),ka=d.interpolateCubehelixLong(h.cubehelix(300,.5,0),h.cubehelix(-240,.5,1)),la=d.interpolateCubehelixLong(h.cubehelix(-100,.75,.35),h.cubehelix(80,1.5,.8)),ma=d.interpolateCubehelixLong(h.cubehelix(260,.75,.35),h.cubehelix(80,1.5,.8)),na=h.cubehelix(),oa=U(S("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),pa=U(S("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),qa=U(S("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ra=U(S("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));a.scaleBand=j,a.scalePoint=l,a.scaleIdentity=y,a.scaleLinear=x,a.scaleLog=G,a.scaleOrdinal=i,a.scaleImplicit=Z,a.scalePow=I,a.scaleSqrt=J,a.scaleQuantile=K,a.scaleQuantize=L,a.scaleThreshold=M,a.scaleTime=Q,a.scaleUtc=R,a.schemeCategory10=ga,a.schemeCategory20b=ha,a.schemeCategory20c=ia,a.schemeCategory20=ja,a.interpolateCubehelixDefault=ka,a.interpolateRainbow=T,a.interpolateWarm=la,a.interpolateCool=ma,a.interpolateViridis=oa,a.interpolateMagma=pa,a.interpolateInferno=qa,a.interpolatePlasma=ra,a.scaleSequential=V,Object.defineProperty(a,"__esModule",{value:!0})})},{"d3-array":1,"d3-collection":2,"d3-color":3,"d3-format":5,"d3-interpolate":6,"d3-time":10,"d3-time-format":9}],8:[function(a,b,c){!function(a,d){"object"==typeof c&&void 0!==b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a){var b=a+="",c=b.indexOf(":");return c>=0&&"xmlns"!==(b=a.slice(0,c))&&(a=a.slice(c+1)),Qa.hasOwnProperty(b)?{space:Qa[b],local:a}:a}function c(a){return function(){var b=this.ownerDocument,c=this.namespaceURI;return c===Pa&&b.documentElement.namespaceURI===Pa?b.createElement(a):b.createElementNS(c,a)}}function d(a){return function(){return this.ownerDocument.createElementNS(a.space,a.local)}}function e(a){var e=b(a);return(e.local?d:c)(e)}function f(){return new g}function g(){this._="@"+(++Ra).toString(36)}function h(a,b,c){return a=i(a,b,c),function(b){var c=b.relatedTarget;c&&(c===this||8&c.compareDocumentPosition(this))||a.call(this,b)}}function i(b,c,d){return function(e){var f=a.event;a.event=e;try{b.call(this,this.__data__,c,d)}finally{a.event=f}}}function j(a){return a.trim().split(/^|\s+/).map(function(a){var b="",c=a.indexOf(".");return c>=0&&(b=a.slice(c+1),a=a.slice(0,c)),{type:a,name:b}})}function k(a){return function(){var b=this.__on;if(b){for(var c,d=0,e=-1,f=b.length;d=u&&(u=t+1);!(s=q[u])&&++u=0;)(d=e[f])&&(g&&g!==d.nextSibling&&g.parentNode.insertBefore(d,g),g=d);return this}function I(a){function b(b,c){return b&&c?a(b.__data__,c.__data__):!b-!c}a||(a=J);for(var c=this._groups,d=c.length,e=new Array(d),f=0;fb?1:a>=b?0:NaN}function K(){var a=arguments[0];return arguments[0]=this,a.apply(null,arguments),this}function L(){var a=new Array(this.size()),b=-1;return this.each(function(){a[++b]=this}),a}function M(){for(var a=this._groups,b=0,c=a.length;b1?this.each((null==b?Y:"function"==typeof b?$:Z)(a,b,null==c?"":c)):X(d=this.node()).getComputedStyle(d,null).getPropertyValue(a)}function aa(a){return function(){delete this[a]}}function ba(a,b){return function(){this[a]=b}}function ca(a,b){return function(){var c=b.apply(this,arguments);null==c?delete this[a]:this[a]=c}}function da(a,b){return arguments.length>1?this.each((null==b?aa:"function"==typeof b?ca:ba)(a,b)):this.node()[a]}function ea(a){return a.trim().split(/^|\s+/)}function fa(a){return a.classList||new ga(a)}function ga(a){this._node=a,this._names=ea(a.getAttribute("class")||"")}function ha(a,b){for(var c=fa(a),d=-1,e=b.length;++d=0&&(this._names.splice(b,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(a){return this._names.indexOf(a)>=0}};var Ya=[null];Ja.prototype=Ka.prototype={constructor:Ja,select:t,selectAll:w,filter:x,data:E,enter:z,exit:F,merge:G,order:H,sort:I,call:K,nodes:L,node:M,size:N,empty:O,each:P,attr:W,style:_,property:da,classed:ma,text:qa,html:ua,raise:wa,lower:ya,append:za,insert:Ba,remove:Da,datum:Ea,on:m,dispatch:Ia},a.creator=e,a.local=f,a.matcher=Va,a.mouse=q,a.namespace=b,a.namespaces=Qa,a.select=La,a.selectAll=Ma,a.selection=Ka,a.selector=s,a.selectorAll=v,a.touch=Na,a.touches=Oa,a.window=X,a.customEvent=n,Object.defineProperty(a,"__esModule",{value:!0})})},{}],9:[function(a,b,c){!function(d,e){"object"==typeof c&&void 0!==b?e(c,a("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-time"],e):e(d.d3=d.d3||{},d.d3)}(this,function(a,b){"use strict";function c(a){if(0<=a.y&&a.y<100){var b=new Date(-1,a.m,a.d,a.H,a.M,a.S,a.L);return b.setFullYear(a.y),b}return new Date(a.y,a.m,a.d,a.H,a.M,a.S,a.L)}function d(a){if(0<=a.y&&a.y<100){var b=new Date(Date.UTC(-1,a.m,a.d,a.H,a.M,a.S,a.L));return b.setUTCFullYear(a.y),b}return new Date(Date.UTC(a.y,a.m,a.d,a.H,a.M,a.S,a.L))}function e(a){return{y:a,m:0,d:1,H:0,M:0,S:0,L:0}}function f(a){function f(a,b){return function(c){var d,e,f,g=[],h=-1,i=0,j=a.length;for(c instanceof Date||(c=new Date(+c));++h53)return null;"w"in j||(j.w=1),"Z"in j?(g=d(e(j.y)),i=g.getUTCDay(),g=i>4||0===i?b.utcMonday.ceil(g):b.utcMonday(g),g=b.utcDay.offset(g,7*(j.V-1)),j.y=g.getUTCFullYear(),j.m=g.getUTCMonth(),j.d=g.getUTCDate()+(j.w+6)%7):(g=c(e(j.y)),i=g.getDay(), +g=i>4||0===i?b.timeMonday.ceil(g):b.timeMonday(g),g=b.timeDay.offset(g,7*(j.V-1)),j.y=g.getFullYear(),j.m=g.getMonth(),j.d=g.getDate()+(j.w+6)%7)}else("W"in j||"U"in j)&&("w"in j||(j.w="u"in j?j.u%7:"W"in j?1:0),i="Z"in j?d(e(j.y)).getUTCDay():c(e(j.y)).getDay(),j.m=0,j.d="W"in j?(j.w+6)%7+7*j.W-(i+5)%7:j.w+7*j.U-(i+6)%7);return"Z"in j?(j.H+=j.Z/100|0,j.M+=j.Z%100,d(j)):c(j)}}function h(a,b,c,d){for(var e,f,g=0,h=b.length,i=c.length;g=i)return-1;if(37===(e=b.charCodeAt(g++))){if(e=b.charAt(g++),!(f=Za[e in qa?b.charAt(g++):e])||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function ma(a,b,c){var d=Na.exec(b.slice(c));return d?(a.p=Oa[d[0].toLowerCase()],c+d[0].length):-1}function na(a,b,c){var d=Ra.exec(b.slice(c));return d?(a.w=Sa[d[0].toLowerCase()],c+d[0].length):-1}function oa(a,b,c){var d=Pa.exec(b.slice(c));return d?(a.w=Qa[d[0].toLowerCase()],c+d[0].length):-1}function pa(a,b,c){var d=Va.exec(b.slice(c));return d?(a.m=Wa[d[0].toLowerCase()],c+d[0].length):-1}function ra(a,b,c){var d=Ta.exec(b.slice(c));return d?(a.m=Ua[d[0].toLowerCase()],c+d[0].length):-1}function sa(a,b,c){return h(a,Fa,b,c)}function ta(a,b,c){return h(a,Ga,b,c)}function ua(a,b,c){return h(a,Ha,b,c)}function va(a){return Ka[a.getDay()]}function wa(a){return Ja[a.getDay()]}function xa(a){return Ma[a.getMonth()]}function ya(a){return La[a.getMonth()]}function za(a){return Ia[+(a.getHours()>=12)]}function Aa(a){return Ka[a.getUTCDay()]}function Ba(a){return Ja[a.getUTCDay()]}function Ca(a){return Ma[a.getUTCMonth()]}function Da(a){return La[a.getUTCMonth()]}function Ea(a){return Ia[+(a.getUTCHours()>=12)]}var Fa=a.dateTime,Ga=a.date,Ha=a.time,Ia=a.periods,Ja=a.days,Ka=a.shortDays,La=a.months,Ma=a.shortMonths,Na=i(Ia),Oa=j(Ia),Pa=i(Ja),Qa=j(Ja),Ra=i(Ka),Sa=j(Ka),Ta=i(La),Ua=j(La),Va=i(Ma),Wa=j(Ma),Xa={a:va,A:wa,b:xa,B:ya,c:null,d:D,e:D,f:I,H:E,I:F,j:G,L:H,m:J,M:K,p:za,Q:ka,s:la,S:L,u:M,U:N,V:O,w:P,W:Q,x:null,X:null,y:R,Y:S,Z:T,"%":ja},Ya={a:Aa,A:Ba,b:Ca,B:Da,c:null,d:U,e:U,f:Z,H:V,I:W,j:X,L:Y,m:$,M:_,p:Ea,Q:ka,s:la,S:aa,u:ba,U:ca,V:da,w:ea,W:fa,x:null,X:null,y:ga,Y:ha,Z:ia,"%":ja},Za={a:na,A:oa,b:pa,B:ra,c:sa,d:t,e:t,f:z,H:v,I:v,j:u,L:y,m:s,M:w,p:ma,Q:B,s:C,S:x,u:l,U:m,V:n,w:k,W:o,x:ta,X:ua,y:q,Y:p,Z:r,"%":A};return Xa.x=f(Ga,Xa),Xa.X=f(Ha,Xa),Xa.c=f(Fa,Xa),Ya.x=f(Ga,Ya),Ya.X=f(Ha,Ya),Ya.c=f(Fa,Ya),{format:function(a){var b=f(a+="",Xa);return b.toString=function(){return a},b},parse:function(a){var b=g(a+="",c);return b.toString=function(){return a},b},utcFormat:function(a){var b=f(a+="",Ya);return b.toString=function(){return a},b},utcParse:function(a){var b=g(a,d);return b.toString=function(){return a},b}}}function g(a,b,c){var d=a<0?"-":"",e=(d?-a:a)+"",f=e.length;return d+(f68?1900:2e3),c+d[0].length):-1}function r(a,b,c){var d=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(b.slice(c,c+6));return d?(a.Z=d[1]?0:-(d[2]+(d[3]||"00")),c+d[0].length):-1}function s(a,b,c){var d=ra.exec(b.slice(c,c+2));return d?(a.m=d[0]-1,c+d[0].length):-1}function t(a,b,c){var d=ra.exec(b.slice(c,c+2));return d?(a.d=+d[0],c+d[0].length):-1}function u(a,b,c){var d=ra.exec(b.slice(c,c+3));return d?(a.m=0,a.d=+d[0],c+d[0].length):-1}function v(a,b,c){var d=ra.exec(b.slice(c,c+2));return d?(a.H=+d[0],c+d[0].length):-1}function w(a,b,c){var d=ra.exec(b.slice(c,c+2));return d?(a.M=+d[0],c+d[0].length):-1}function x(a,b,c){var d=ra.exec(b.slice(c,c+2));return d?(a.S=+d[0],c+d[0].length):-1}function y(a,b,c){var d=ra.exec(b.slice(c,c+3));return d?(a.L=+d[0],c+d[0].length):-1}function z(a,b,c){var d=ra.exec(b.slice(c,c+6));return d?(a.L=Math.floor(d[0]/1e3),c+d[0].length):-1}function A(a,b,c){var d=sa.exec(b.slice(c,c+1));return d?c+d[0].length:-1}function B(a,b,c){var d=ra.exec(b.slice(c));return d?(a.Q=+d[0],c+d[0].length):-1}function C(a,b,c){var d=ra.exec(b.slice(c));return d?(a.Q=1e3*+d[0],c+d[0].length):-1}function D(a,b){return g(a.getDate(),b,2)}function E(a,b){return g(a.getHours(),b,2)}function F(a,b){return g(a.getHours()%12||12,b,2)}function G(a,c){return g(1+b.timeDay.count(b.timeYear(a),a),c,3)}function H(a,b){return g(a.getMilliseconds(),b,3)}function I(a,b){return H(a,b)+"000"}function J(a,b){return g(a.getMonth()+1,b,2)}function K(a,b){return g(a.getMinutes(),b,2)}function L(a,b){return g(a.getSeconds(),b,2)}function M(a){var b=a.getDay();return 0===b?7:b}function N(a,c){return g(b.timeSunday.count(b.timeYear(a),a),c,2)}function O(a,c){var d=a.getDay();return a=d>=4||0===d?b.timeThursday(a):b.timeThursday.ceil(a),g(b.timeThursday.count(b.timeYear(a),a)+(4===b.timeYear(a).getDay()),c,2)}function P(a){return a.getDay()}function Q(a,c){return g(b.timeMonday.count(b.timeYear(a),a),c,2)}function R(a,b){return g(a.getFullYear()%100,b,2)}function S(a,b){return g(a.getFullYear()%1e4,b,4)}function T(a){var b=a.getTimezoneOffset();return(b>0?"-":(b*=-1,"+"))+g(b/60|0,"0",2)+g(b%60,"0",2)}function U(a,b){return g(a.getUTCDate(),b,2)}function V(a,b){return g(a.getUTCHours(),b,2)}function W(a,b){return g(a.getUTCHours()%12||12,b,2)}function X(a,c){return g(1+b.utcDay.count(b.utcYear(a),a),c,3)}function Y(a,b){return g(a.getUTCMilliseconds(),b,3)}function Z(a,b){return Y(a,b)+"000"}function $(a,b){return g(a.getUTCMonth()+1,b,2)}function _(a,b){return g(a.getUTCMinutes(),b,2)}function aa(a,b){return g(a.getUTCSeconds(),b,2)}function ba(a){var b=a.getUTCDay();return 0===b?7:b}function ca(a,c){return g(b.utcSunday.count(b.utcYear(a),a),c,2)}function da(a,c){var d=a.getUTCDay();return a=d>=4||0===d?b.utcThursday(a):b.utcThursday.ceil(a),g(b.utcThursday.count(b.utcYear(a),a)+(4===b.utcYear(a).getUTCDay()),c,2)}function ea(a){return a.getUTCDay()}function fa(a,c){return g(b.utcMonday.count(b.utcYear(a),a),c,2)}function ga(a,b){return g(a.getUTCFullYear()%100,b,2)}function ha(a,b){return g(a.getUTCFullYear()%1e4,b,4)}function ia(){return"+0000"}function ja(){return"%"}function ka(a){return+a}function la(a){return Math.floor(+a/1e3)}function ma(b){return pa=f(b),a.timeFormat=pa.format,a.timeParse=pa.parse,a.utcFormat=pa.utcFormat,a.utcParse=pa.utcParse,pa}function na(a){return a.toISOString()}function oa(a){var b=new Date(a);return isNaN(b)?null:b}var pa,qa={"-":"",_:" ",0:"0"},ra=/^\s*\d+/,sa=/^%/,ta=/[\\^$*+?|[\]().{}]/g;ma({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var ua="%Y-%m-%dT%H:%M:%S.%LZ",va=Date.prototype.toISOString?na:a.utcFormat(ua),wa=+new Date("2000-01-01T00:00:00.000Z")?oa:a.utcParse(ua);a.timeFormatDefaultLocale=ma,a.timeFormatLocale=f,a.isoFormat=va,a.isoParse=wa,Object.defineProperty(a,"__esModule",{value:!0})})},{"d3-time":10}],10:[function(a,b,c){!function(a,d){"object"==typeof c&&void 0!==b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,c,d,g){function h(b){return a(b=new Date(+b)),b}return h.floor=h,h.ceil=function(b){return a(b=new Date(b-1)),c(b,1),a(b),b},h.round=function(a){var b=h(a),c=h.ceil(a);return a-b0))return f;do{f.push(new Date(+b))}while(c(b,e),a(b),b=b)for(;a(b),!d(b);)b.setTime(b-1)},function(a,b){if(a>=a)if(b<0)for(;++b<=0;)for(;c(a,-1),!d(a););else for(;--b>=0;)for(;c(a,1),!d(a););})},d&&(h.count=function(b,c){return e.setTime(+b),f.setTime(+c),a(e),a(f),Math.floor(d(e,f))},h.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?h.filter(g?function(b){return g(b)%a==0}:function(b){return h.count(0,b)%a==0}):h:null}),h}function c(a){return b(function(b){b.setDate(b.getDate()-(b.getDay()+7-a)%7),b.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+7*b)},function(a,b){return(b-a-(b.getTimezoneOffset()-a.getTimezoneOffset())*j)/m})}function d(a){return b(function(b){b.setUTCDate(b.getUTCDate()-(b.getUTCDay()+7-a)%7),b.setUTCHours(0,0,0,0)},function(a,b){a.setUTCDate(a.getUTCDate()+7*b)},function(a,b){return(b-a)/m})}var e=new Date,f=new Date,g=b(function(){},function(a,b){a.setTime(+a+b)},function(a,b){return b-a});g.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?b(function(b){b.setTime(Math.floor(b/a)*a)},function(b,c){b.setTime(+b+c*a)},function(b,c){return(c-b)/a}):g:null};var h=g.range,i=1e3,j=6e4,k=36e5,l=864e5,m=6048e5,n=b(function(a){a.setTime(Math.floor(a/i)*i)},function(a,b){a.setTime(+a+b*i)},function(a,b){return(b-a)/i},function(a){return a.getUTCSeconds()}),o=n.range,p=b(function(a){a.setTime(Math.floor(a/j)*j)},function(a,b){a.setTime(+a+b*j)},function(a,b){return(b-a)/j},function(a){return a.getMinutes()}),q=p.range,r=b(function(a){var b=a.getTimezoneOffset()*j%k;b<0&&(b+=k),a.setTime(Math.floor((+a-b)/k)*k+b)},function(a,b){a.setTime(+a+b*k)},function(a,b){return(b-a)/k},function(a){return a.getHours()}),s=r.range,t=b(function(a){a.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+b)},function(a,b){return(b-a-(b.getTimezoneOffset()-a.getTimezoneOffset())*j)/l},function(a){return a.getDate()-1}),u=t.range,v=c(0),w=c(1),x=c(2),y=c(3),z=c(4),A=c(5),B=c(6),C=v.range,D=w.range,E=x.range,F=y.range,G=z.range,H=A.range,I=B.range,J=b(function(a){a.setDate(1),a.setHours(0,0,0,0)},function(a,b){a.setMonth(a.getMonth()+b)},function(a,b){return b.getMonth()-a.getMonth()+12*(b.getFullYear()-a.getFullYear())},function(a){return a.getMonth()}),K=J.range,L=b(function(a){a.setMonth(0,1),a.setHours(0,0,0,0)},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a,b){return b.getFullYear()-a.getFullYear()},function(a){return a.getFullYear()});L.every=function(a){return isFinite(a=Math.floor(a))&&a>0?b(function(b){b.setFullYear(Math.floor(b.getFullYear()/a)*a),b.setMonth(0,1),b.setHours(0,0,0,0)},function(b,c){b.setFullYear(b.getFullYear()+c*a)}):null};var M=L.range,N=b(function(a){a.setUTCSeconds(0,0)},function(a,b){a.setTime(+a+b*j)},function(a,b){return(b-a)/j},function(a){return a.getUTCMinutes()}),O=N.range,P=b(function(a){a.setUTCMinutes(0,0,0)},function(a,b){a.setTime(+a+b*k)},function(a,b){return(b-a)/k},function(a){return a.getUTCHours()}),Q=P.range,R=b(function(a){a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCDate(a.getUTCDate()+b)},function(a,b){return(b-a)/l},function(a){return a.getUTCDate()-1}),S=R.range,T=d(0),U=d(1),V=d(2),W=d(3),X=d(4),Y=d(5),Z=d(6),$=T.range,_=U.range,aa=V.range,ba=W.range,ca=X.range,da=Y.range,ea=Z.range,fa=b(function(a){a.setUTCDate(1),a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCMonth(a.getUTCMonth()+b)},function(a,b){return b.getUTCMonth()-a.getUTCMonth()+12*(b.getUTCFullYear()-a.getUTCFullYear())},function(a){return a.getUTCMonth()}),ga=fa.range,ha=b(function(a){a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCFullYear(a.getUTCFullYear()+b)},function(a,b){return b.getUTCFullYear()-a.getUTCFullYear()},function(a){return a.getUTCFullYear()});ha.every=function(a){return isFinite(a=Math.floor(a))&&a>0?b(function(b){b.setUTCFullYear(Math.floor(b.getUTCFullYear()/a)*a),b.setUTCMonth(0,1),b.setUTCHours(0,0,0,0)},function(b,c){b.setUTCFullYear(b.getUTCFullYear()+c*a)}):null};var ia=ha.range;a.timeInterval=b,a.timeMillisecond=g,a.timeMilliseconds=h,a.utcMillisecond=g,a.utcMilliseconds=h,a.timeSecond=n,a.timeSeconds=o,a.utcSecond=n,a.utcSeconds=o,a.timeMinute=p,a.timeMinutes=q,a.timeHour=r,a.timeHours=s,a.timeDay=t,a.timeDays=u,a.timeWeek=v,a.timeWeeks=C,a.timeSunday=v,a.timeSundays=C,a.timeMonday=w,a.timeMondays=D,a.timeTuesday=x,a.timeTuesdays=E,a.timeWednesday=y,a.timeWednesdays=F,a.timeThursday=z,a.timeThursdays=G,a.timeFriday=A,a.timeFridays=H,a.timeSaturday=B,a.timeSaturdays=I,a.timeMonth=J,a.timeMonths=K,a.timeYear=L,a.timeYears=M,a.utcMinute=N,a.utcMinutes=O,a.utcHour=P,a.utcHours=Q,a.utcDay=R,a.utcDays=S,a.utcWeek=T,a.utcWeeks=$,a.utcSunday=T,a.utcSundays=$,a.utcMonday=U,a.utcMondays=_,a.utcTuesday=V,a.utcTuesdays=aa,a.utcWednesday=W,a.utcWednesdays=ba,a.utcThursday=X,a.utcThursdays=ca,a.utcFriday=Y,a.utcFridays=da,a.utcSaturday=Z,a.utcSaturdays=ea,a.utcMonth=fa,a.utcMonths=ga,a.utcYear=ha,a.utcYears=ia,Object.defineProperty(a,"__esModule",{value:!0})})},{}],11:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var h=g.default.d3_calcType(b,y,m,o,s,v);a.selectAll("g").data([b]).enter().append("g").attr("class",p+"legendCells"),n&&g.default.d3_filterCells(h,n);var i=a.select("."+p+"legendCells").selectAll("."+p+"cell").data(h.data),j=i.enter().append("g").attr("class",p+"cell");j.append(c).attr("class",p+"swatch");var C=a.selectAll("g."+p+"cell "+c);g.default.d3_addEvents(j,B),i.exit().transition().style("opacity",0).remove(),g.default.d3_drawShapes(c,C,e,d,f,z),g.default.d3_addText(a,j,h.labels,p,w),i=j.merge(i);var D=i.selectAll("text"),E=D.nodes().map(function(a){return a.getBBox()}),F=C.nodes().map(function(a){return a.getBBox()});q?C.attr("class",function(a){return p+"swatch "+h.feature(a)}):"line"==c?C.style("stroke",h.feature):C.style("fill",h.feature);var G=void 0,H=void 0,I="start"==u?0:"middle"==u?.5:1;if("vertical"===x){var J=E.map(function(a,b){return Math.max(a.height,F[b].height)});G=function(a,b){return"translate(0, "+((0,k.sum)(J.slice(0,b))+b*l)+")"},H=function(a,b){return"translate( "+(F[b].width+F[b].x+t)+", "+(F[b].y+F[b].height/2+5)+")"}}else"horizontal"===x&&(G=function(a,b){return"translate("+b*(F[b].width+l)+",0)"},H=function(a,b){return"translate("+(F[b].width*I+F[b].x)+",\n "+(F[b].height+F[b].y+t+8)+")"});g.default.d3_placement(x,i,G,D,H,u),g.default.d3_title(a,r,p,A),i.transition().style("opacity",1)}var b=(0,i.scaleLinear)(),c="rect",d=15,e=15,f=10,l=2,m=[5],n=void 0,o=[],p="",q=!1,r="",s=(0,j.format)(".01f"),t=10,u="middle",v="to",w=void 0,x="vertical",y=!1,z=void 0,A=void 0,B=(0,h.dispatch)("cellover","cellout","cellclick");return a.scale=function(c){return arguments.length?(b=c,a):b},a.cells=function(b){return arguments.length?((b.length>1||b>=2)&&(m=b),a):m},a.cellFilter=function(b){return arguments.length?(n=b,a):n},a.shape=function(b,d){return arguments.length?(("rect"==b||"circle"==b||"line"==b||"path"==b&&"string"==typeof d)&&(c=b,z=d),a):c},a.shapeWidth=function(b){return arguments.length?(d=+b,a):d},a.shapeHeight=function(b){return arguments.length?(e=+b,a):e},a.shapeRadius=function(b){return arguments.length?(f=+b,a):f},a.shapePadding=function(b){return arguments.length?(l=+b,a):l},a.labels=function(b){return arguments.length?(o=b,a):o},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(u=b),a):u},a.labelFormat=function(b){return arguments.length?(s="string"==typeof b?(0,j.format)(b):b,a):s},a.labelOffset=function(b){return arguments.length?(t=+b,a):t},a.labelDelimiter=function(b){return arguments.length?(v=b,a):v},a.labelWrap=function(b){return arguments.length?(w=b,a):w},a.useClass=function(b){return arguments.length?(!0!==b&&!1!==b||(q=b),a):q},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(x=b),a):x},a.ascending=function(b){return arguments.length?(y=!!b,a):y},a.classPrefix=function(b){return arguments.length?(p=b,a):p},a.title=function(b){return arguments.length?(r=b,a):r},a.titleWidth=function(b){return arguments.length?(A=b,a):A},a.textWrap=function(b){return arguments.length?(textWrap=b,a):textWrap},a.on=function(){var b=B.on.apply(B,arguments);return b===B?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":13,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],12:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=c.thresholdLabels=function(a){var b=a.i,c=a.genLength,d=a.generatedLabels;return 0===b?d[b].replace("NaN to","Less than"):b===c-1?"More than "+d[c-1].replace(" to NaN",""):d[b]};c.default={thresholdLabels:d}},{}],13:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=a("d3-selection"),f=function(a){return a},g=function(a){for(var b=[],c=0,d=a.length;cb&&f.length>1&&(f.pop(),i.text(f.join(" ")),f=[a],i=c.append("tspan").attr("x",0).attr("dy",g+h+"em").text(a))})},i=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],b=arguments[1],c=arguments[2],e=arguments[3];if("object"===(void 0===b?"undefined":d(b))){if(0===b.length)return a;for(var f=b.length;f1)d=b;else for(var e=a.domain(),f=(e[e.length-1]-e[0])/(b-1),g=0;g1||b>=2)&&(f=b),a):f},a.cellFilter=function(b){return arguments.length?(l=b,a):l},a.shape=function(b,d){return arguments.length?("rect"!=b&&"circle"!=b&&"line"!=b||(c=b,w=d),a):c},a.shapeWidth=function(b){return arguments.length?(d=+b,a):d},a.shapePadding=function(b){return arguments.length?(e=+b,a):e},a.labels=function(b){return arguments.length?(m=b,a):m},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(r=b),a):r},a.labelFormat=function(b){return arguments.length?(p="string"==typeof b?(0,j.format)(b):b,a):p},a.labelOffset=function(b){return arguments.length?(q=+b,a):q},a.labelDelimiter=function(b){return arguments.length?(s=b,a):s},a.labelWrap=function(b){return arguments.length?(t=b,a):t},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(u=b),a):u},a.ascending=function(b){return arguments.length?(v=!!b,a):v},a.classPrefix=function(b){return arguments.length?(n=b,a):n},a.title=function(b){return arguments.length?(o=b,a):o},a.titleWidth=function(b){return arguments.length?(x=b,a):x},a.on=function(){var b=y.on.apply(y,arguments);return b===y?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":13,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],15:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var h=g.default.d3_calcType(b,x,m,o,r,u),i=a.selectAll("g").data([b]);n&&g.default.d3_filterCells(h,n),i.enter().append("g").attr("class",p+"legendCells");var j=a.select("."+p+"legendCells").selectAll("."+p+"cell").data(h.data),A=j.enter().append("g").attr("class",p+"cell");A.append(c).attr("class",p+"swatch");var B=a.selectAll("g."+p+"cell "+c);g.default.d3_addEvents(A,z),j.exit().transition().style("opacity",0).remove(),g.default.d3_drawShapes(c,B,e,d,f,h.feature),g.default.d3_addText(a,A,h.labels,p,v),j=A.merge(j);var C=j.selectAll("text"),D=C.nodes().map(function(a){return a.getBBox()}),E=B.nodes().map(function(a){return a.getBBox()}),F=(0,k.max)(E,function(a){return a.height}),G=(0,k.max)(E,function(a){return a.width}),H=void 0,I=void 0,J="start"==s?0:"middle"==s?.5:1;if("vertical"===w){var K=D.map(function(a,b){return Math.max(F,a.height)});H=function(a,b){return"translate(0, "+((0,k.sum)(K.slice(0,b))+b*l)+" )"},I=function(a,b){return"translate( "+(G+t)+",\n "+(E[b].y+E[b].height/2+5)+")"}}else"horizontal"===w&&(H=function(a,b){return"translate( "+b*(G+l)+",0)"},I=function(a,b){return"translate( "+(E[b].width*J+E[b].x)+",\n "+(F+t)+")"});g.default.d3_placement(w,j,H,C,I,s),g.default.d3_title(a,q,p,y),j.transition().style("opacity",1)}var b=(0,i.scaleLinear)(),c="path",d=15,e=15,f=10,l=5,m=[5],n=void 0,o=[],p="",q="",r=(0,j.format)(".01f"),s="middle",t=10,u="to",v=void 0,w="vertical",x=!1,y=void 0,z=(0,h.dispatch)("cellover","cellout","cellclick");return a.scale=function(c){return arguments.length?(b=c,a):b},a.cells=function(b){return arguments.length?((b.length>1||b>=2)&&(m=b),a):m},a.cellFilter=function(b){return arguments.length?(n=b,a):n},a.shapePadding=function(b){return arguments.length?(l=+b,a):l},a.labels=function(b){return arguments.length?(o=b,a):o},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(s=b),a):s},a.labelFormat=function(b){return arguments.length?(r="string"==typeof b?(0,j.format)(b):b,a):r},a.labelOffset=function(b){return arguments.length?(t=+b,a):t},a.labelDelimiter=function(b){return arguments.length?(u=b,a):u},a.labelWrap=function(b){return arguments.length?(v=b,a):v},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(w=b),a):w},a.ascending=function(b){return arguments.length?(x=!!b,a):x},a.classPrefix=function(b){return arguments.length?(p=b,a):p},a.title=function(b){return arguments.length?(q=b,a):q},a.titleWidth=function(b){return arguments.length?(y=b,a):y},a.on=function(){var b=z.on.apply(z,arguments);return b===z?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":13,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],16:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}var e=a("./color"),f=d(e),g=a("./size"),h=d(g),i=a("./symbol"),j=d(i),k=a("./helpers"),l=d(k);d3.legendColor=f.default,d3.legendSize=h.default,d3.legendSymbol=j.default,d3.legendHelpers=l.default},{"./color":11,"./helpers":12,"./size":14,"./symbol":15}]},{},[16]); \ No newline at end of file diff --git a/docs/d3-legend.min.js b/docs/d3-legend.min.js index 2ad66c5..aacc267 100644 --- a/docs/d3-legend.min.js +++ b/docs/d3-legend.min.js @@ -1,3 +1,3 @@ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gb?1:a>=b?0:NaN}function c(a){return 1===a.length&&(a=d(a)),{left:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d>>1;a(b[f],c)<0?d=f+1:e=f}return d},right:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d>>1;a(b[f],c)>0?e=f:d=f+1}return d}}}function d(a){return function(c,d){return b(a(c),d)}}function e(a,b){return ba?1:b>=a?0:NaN}function f(a){return null===a?NaN:+a}function g(a,b){var c,d,e=a.length,g=0,h=0,i=-1,j=0;if(null==b)for(;++i1)return h/(j-1)}function h(a,b){var c=g(a,b);return c?Math.sqrt(c):c}function i(a,b){var c,d,e,f=-1,g=a.length;if(null==b){for(;++f=d){c=e=d;break}for(;++fd&&(c=d),e=d){c=e=d;break}for(;++fd&&(c=d),e=M?e*=10:f>=N?e*=5:f>=O&&(e*=2),b=k;)l.pop(),--n;var o,p=new Array(n+1);for(e=0;e<=n;++e)o=p[e]=[],o.x0=e>0?l[e-1]:j,o.x1=e=1)return+c(a[d-1],d-1,a);var d,e=(d-1)*b,g=Math.floor(e),h=+c(a[g],g,a),i=+c(a[g+1],g+1,a);return h+(i-h)*(e-g)}}function r(a,c,d){return a=L.call(a,f).sort(b),Math.ceil((d-c)/(2*(q(a,.75)-q(a,.25))*Math.pow(a.length,-1/3)))}function s(a,b,c){return Math.ceil((c-b)/(3.5*h(a)*Math.pow(a.length,-1/3)))}function t(a,b){var c,d,e=-1,f=a.length;if(null==b){for(;++e=d){c=d;break}for(;++ec&&(c=d)}else{for(;++e=d){c=d;break}for(;++ec&&(c=d)}return c}function u(a,b){var c,d=0,e=a.length,g=-1,h=e;if(null==b)for(;++g=0;)for(d=a[e],b=d.length;--b>=0;)c[--g]=d[b];return c}function x(a,b){var c,d,e=-1,f=a.length;if(null==b){for(;++e=d){c=d;break}for(;++ed&&(c=d)}else{for(;++e=d){c=d;break}for(;++ed&&(c=d)}return c}function y(a){for(var b=0,c=a.length-1,d=a[0],e=new Array(c<0?0:c);b=k.length)return null!=i?i(b):null!=h?b.sort(h):b;for(var g,j,l,m=-1,n=b.length,o=k[d++],p=c(),q=e();++mk.length)return a;var d,e=l[c-1];return null!=i&&c>=k.length?d=a.entries():(d=[],a.each(function(a,e){d.push({key:e,values:b(a,c)})})),null!=e?d.sort(function(a,b){return e(a.key,b.key)}):d}var h,i,j,k=[],l=[];return j={object:function(b){return a(b,0,d,e)},map:function(b){return a(b,0,f,g)},entries:function(c){return b(a(c,0,f,g),0)},key:function(a){return k.push(a),j},sortKeys:function(a){return l[k.length-1]=a,j},sortValues:function(a){return h=a,j},rollup:function(a){return i=a,j}}},l=c.prototype;h.prototype=i.prototype={constructor:h,has:l.has,add:function(a){return a+="",this[j+a]=a,this},remove:l.remove,clear:l.clear,values:l.keys,size:l.size,empty:l.empty,each:l.each};var m=function(a){var b=[];for(var c in a)b.push(c);return b},n=function(a){var b=[];for(var c in a)b.push(a[c]);return b},o=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b};a.nest=k,a.set=i,a.map=c,a.keys=m,a.values=n,a.entries=o,Object.defineProperty(a,"__esModule",{value:!0})})},{}],3:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,b){var c=Object.create(a.prototype);for(var d in b)c[d]=b[d];return c}function c(){}function d(a){var b;return a=(a+"").trim().toLowerCase(),(b=H.exec(a))?(b=parseInt(b[1],16),new i(b>>8&15|b>>4&240,b>>4&15|240&b,(15&b)<<4|15&b,1)):(b=I.exec(a))?e(parseInt(b[1],16)):(b=J.exec(a))?new i(b[1],b[2],b[3],1):(b=K.exec(a))?new i(255*b[1]/100,255*b[2]/100,255*b[3]/100,1):(b=L.exec(a))?f(b[1],b[2],b[3],b[4]):(b=M.exec(a))?f(255*b[1]/100,255*b[2]/100,255*b[3]/100,b[4]):(b=N.exec(a))?j(b[1],b[2]/100,b[3]/100,1):(b=O.exec(a))?j(b[1],b[2]/100,b[3]/100,b[4]):P.hasOwnProperty(a)?e(P[a]):"transparent"===a?new i(NaN,NaN,NaN,0):null}function e(a){return new i(a>>16&255,a>>8&255,255&a,1)}function f(a,b,c,d){return d<=0&&(a=b=c=NaN),new i(a,b,c,d)}function g(a){return a instanceof c||(a=d(a)),a?(a=a.rgb(),new i(a.r,a.g,a.b,a.opacity)):new i}function h(a,b,c,d){return 1===arguments.length?g(a):new i(a,b,c,null==d?1:d)}function i(a,b,c,d){this.r=+a,this.g=+b,this.b=+c,this.opacity=+d}function j(a,b,c,d){return d<=0?a=b=c=NaN:c<=0||c>=1?a=b=NaN:b<=0&&(a=NaN),new m(a,b,c,d)}function k(a){if(a instanceof m)return new m(a.h,a.s,a.l,a.opacity);if(a instanceof c||(a=d(a)),!a)return new m;if(a instanceof m)return a;a=a.rgb();var b=a.r/255,e=a.g/255,f=a.b/255,g=Math.min(b,e,f),h=Math.max(b,e,f),i=NaN,j=h-g,k=(h+g)/2;return j?(i=b===h?(e-f)/j+6*(e0&&k<1?0:i,new m(i,j,k,a.opacity)}function l(a,b,c,d){return 1===arguments.length?k(a):new m(a,b,c,null==d?1:d)}function m(a,b,c,d){this.h=+a,this.s=+b,this.l=+c,this.opacity=+d}function n(a,b,c){return 255*(a<60?b+(c-b)*a/60:a<180?c:a<240?b+(c-b)*(240-a)/60:b)}function o(a){if(a instanceof q)return new q(a.l,a.a,a.b,a.opacity);if(a instanceof x){var b=a.h*Q;return new q(a.l,Math.cos(b)*a.c,Math.sin(b)*a.c,a.opacity)}a instanceof i||(a=g(a));var c=u(a.r),d=u(a.g),e=u(a.b),f=r((.4124564*c+.3575761*d+.1804375*e)/T),h=r((.2126729*c+.7151522*d+.072175*e)/U),j=r((.0193339*c+.119192*d+.9503041*e)/V);return new q(116*h-16,500*(f-h),200*(h-j),a.opacity)}function p(a,b,c,d){return 1===arguments.length?o(a):new q(a,b,c,null==d?1:d)}function q(a,b,c,d){this.l=+a,this.a=+b,this.b=+c,this.opacity=+d}function r(a){return a>Z?Math.pow(a,1/3):a/Y+W}function s(a){return a>X?a*a*a:Y*(a-W)}function t(a){return 255*(a<=.0031308?12.92*a:1.055*Math.pow(a,1/2.4)-.055)}function u(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function v(a){if(a instanceof x)return new x(a.h,a.c,a.l,a.opacity);a instanceof q||(a=o(a));var b=Math.atan2(a.b,a.a)*R;return new x(b<0?b+360:b,Math.sqrt(a.a*a.a+a.b*a.b),a.l,a.opacity)}function w(a,b,c,d){return 1===arguments.length?v(a):new x(a,b,c,null==d?1:d)}function x(a,b,c,d){this.h=+a,this.c=+b,this.l=+c,this.opacity=+d}function y(a){if(a instanceof A)return new A(a.h,a.s,a.l,a.opacity);a instanceof i||(a=g(a));var b=a.r/255,c=a.g/255,d=a.b/255,e=(fa*d+da*b-ea*c)/(fa+da-ea),f=d-e,h=(ca*(c-e)-aa*f)/ba,j=Math.sqrt(h*h+f*f)/(ca*e*(1-e)),k=j?Math.atan2(h,f)*R-120:NaN;return new A(k<0?k+360:k,j,e,a.opacity)}function z(a,b,c,d){return 1===arguments.length?y(a):new A(a,b,c,null==d?1:d)}function A(a,b,c,d){this.h=+a,this.s=+b,this.l=+c,this.opacity=+d}var B=function(a,b,c){a.prototype=b.prototype=c,c.constructor=a},C=.7,D=1/C,E="\\s*([+-]?\\d+)\\s*",F="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",G="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",H=/^#([0-9a-f]{3})$/,I=/^#([0-9a-f]{6})$/,J=new RegExp("^rgb\\("+[E,E,E]+"\\)$"),K=new RegExp("^rgb\\("+[G,G,G]+"\\)$"),L=new RegExp("^rgba\\("+[E,E,E,F]+"\\)$"),M=new RegExp("^rgba\\("+[G,G,G,F]+"\\)$"),N=new RegExp("^hsl\\("+[F,G,G]+"\\)$"),O=new RegExp("^hsla\\("+[F,G,G,F]+"\\)$"),P={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};B(c,d,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),B(i,h,b(c,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new i(this.r*a,this.g*a,this.b*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new i(this.r*a,this.g*a,this.b*a,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var a=this.opacity;return a=isNaN(a)?1:Math.max(0,Math.min(1,a)),(1===a?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===a?")":", "+a+")")}})),B(m,l,b(c,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new m(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new m(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=this.h%360+360*(this.h<0),b=isNaN(a)||isNaN(this.s)?0:this.s,c=this.l,d=c+(c<.5?c:1-c)*b,e=2*c-d;return new i(n(a>=240?a-240:a+120,e,d),n(a,e,d),n(a<120?a+240:a-120,e,d),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Q=Math.PI/180,R=180/Math.PI,S=18,T=.95047,U=1,V=1.08883,W=4/29,X=6/29,Y=3*X*X,Z=X*X*X;B(q,p,b(c,{brighter:function(a){return new q(this.l+S*(null==a?1:a),this.a,this.b,this.opacity)},darker:function(a){return new q(this.l-S*(null==a?1:a),this.a,this.b,this.opacity)},rgb:function(){var a=(this.l+16)/116,b=isNaN(this.a)?a:a+this.a/500,c=isNaN(this.b)?a:a-this.b/200;return a=U*s(a),b=T*s(b),c=V*s(c),new i(t(3.2404542*b-1.5371385*a-.4985314*c),t(-.969266*b+1.8760108*a+.041556*c),t(.0556434*b-.2040259*a+1.0572252*c),this.opacity)}})),B(x,w,b(c,{brighter:function(a){return new x(this.h,this.c,this.l+S*(null==a?1:a),this.opacity)},darker:function(a){return new x(this.h,this.c,this.l-S*(null==a?1:a),this.opacity)},rgb:function(){return o(this).rgb()}}));var $=-.14861,_=1.78277,aa=-.29227,ba=-.90649,ca=1.97294,da=ca*ba,ea=ca*_,fa=_*aa-ba*$;B(A,z,b(c,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new A(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new A(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=isNaN(this.h)?0:(this.h+120)*Q,b=+this.l,c=isNaN(this.s)?0:this.s*b*(1-b),d=Math.cos(a),e=Math.sin(a);return new i(255*(b+c*($*d+_*e)),255*(b+c*(aa*d+ba*e)),255*(b+c*(ca*d)),this.opacity)}})),a.color=d,a.rgb=h,a.hsl=l,a.lab=p,a.hcl=w,a.cubehelix=z,Object.defineProperty(a,"__esModule",{value:!0})})},{}],4:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(){for(var a,b=0,d=arguments.length,e={};b=0&&(c=a.slice(d+1),a=a.slice(0,d)),a&&!b.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:c}})}function e(a,b){for(var c,d=0,e=a.length;d0)for(var c,d,e=new Array(c),f=0;f1?d[0]+d.slice(2):d,+a.slice(c+1)]}function c(a){return a=b(Math.abs(a)),a?a[1]:NaN}function d(a,b){return function(c,d){for(var e=c.length,f=[],g=0,h=a[0],i=0;e>0&&h>0&&(i+h+1>d&&(h=Math.max(1,d-i)),f.push(c.substring(e-=h,e+h)),!((i+=h+1)>d));)h=a[g=(g+1)%a.length];return f.reverse().join(b)}}function e(a,b){a=a.toPrecision(b);a:for(var c,d=a.length,e=1,f=-1;e0&&(f=0)}return f>0?a.slice(0,f)+a.slice(c+1):a}function f(a,c){var d=b(a,c);if(!d)return a+"";var e=d[0],f=d[1],g=f-(p=3*Math.max(-8,Math.min(8,Math.floor(f/3))))+1,h=e.length;return g===h?e:g>h?e+new Array(g-h+1).join("0"):g>0?e.slice(0,g)+"."+e.slice(g):"0."+new Array(1-g).join("0")+b(a,Math.max(0,c+g-1))[0]}function g(a,c){var d=b(a,c);if(!d)return a+"";var e=d[0],f=d[1];return f<0?"0."+new Array(-f).join("0")+e:e.length>f+1?e.slice(0,f+1)+"."+e.slice(f+1):e+new Array(f-e.length+2).join("0")}function h(a){return new i(a)}function i(a){if(!(b=r.exec(a)))throw new Error("invalid format: "+a);var b,c=b[1]||" ",d=b[2]||">",e=b[3]||"-",f=b[4]||"",g=!!b[5],h=b[6]&&+b[6],i=!!b[7],j=b[8]&&+b[8].slice(1),k=b[9]||"";"n"===k?(i=!0,k="g"):q[k]||(k=""),(g||"0"===c&&"="===d)&&(g=!0,c="0",d="="),this.fill=c,this.align=d,this.sign=e,this.symbol=f,this.zero=g,this.width=h,this.comma=i,this.precision=j,this.type=k}function j(a){return a}function k(a){function b(a){function b(a){var b,g,h,j=r,q=s;if("c"===o)q=u(a)+q,a="";else{a=+a;var w=(a<0||1/a<0)&&(a*=-1,!0);if(a=u(a,n),w)for(b=-1,g=a.length,w=!1;++bh||h>57){q=(46===h?i+a.slice(b+1):a.slice(b))+q,a=a.slice(0,b);break}}m&&!k&&(a=f(a,1/0));var x=j.length+a.length+q.length,y=x>1)+j+a+q+y.slice(x)}return y+j+a+q}a=h(a);var c=a.fill,d=a.align,e=a.sign,j=a.symbol,k=a.zero,l=a.width,m=a.comma,n=a.precision,o=a.type,r="$"===j?g[0]:"#"===j&&/[boxX]/.test(o)?"0"+o.toLowerCase():"",s="$"===j?g[1]:/[%p]/.test(o)?"%":"",u=q[o],v=!o||/[defgprs%]/.test(o);return n=null==n?o?6:12:/[gprs]/.test(o)?Math.max(1,Math.min(21,n)):Math.max(0,Math.min(20,n)),b.toString=function(){return a+""},b}function e(a,d){var e=b((a=h(a),a.type="f",a)),f=3*Math.max(-8,Math.min(8,Math.floor(c(d)/3))),g=Math.pow(10,-f),i=t[8+f/3];return function(a){return e(g*a)+i}}var f=a.grouping&&a.thousands?d(a.grouping,a.thousands):j,g=a.currency,i=a.decimal;return{format:b,formatPrefix:e}}function l(b){return s=k(b),a.format=s.format,a.formatPrefix=s.formatPrefix,s}function m(a){return Math.max(0,-c(Math.abs(a)))}function n(a,b){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(c(b)/3)))-c(Math.abs(a)))}function o(a,b){return a=Math.abs(a),b=Math.abs(b)-a,Math.max(0,c(b)-c(a))+1}var p,q={"":e,"%":function(a,b){return(100*a).toFixed(b)},b:function(a){return Math.round(a).toString(2)},c:function(a){return a+""},d:function(a){return Math.round(a).toString(10)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},g:function(a,b){return a.toPrecision(b)},o:function(a){return Math.round(a).toString(8)},p:function(a,b){return g(100*a,b)},r:g,s:f,X:function(a){return Math.round(a).toString(16).toUpperCase()},x:function(a){return Math.round(a).toString(16)}},r=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;i.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var s,t=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];l({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),a.formatDefaultLocale=l,a.formatLocale=k,a.formatSpecifier=h,a.precisionFixed=m,a.precisionPrefix=n,a.precisionRound=o,Object.defineProperty(a,"__esModule",{value:!0})})},{}],6:[function(a,b,c){!function(d,e){"object"==typeof c&&"undefined"!=typeof b?e(c,a("d3-color")):"function"==typeof define&&define.amd?define(["exports","d3-color"],e):e(d.d3=d.d3||{},d.d3)}(this,function(a,b){"use strict";function c(a,b,c,d,e){var f=a*a,g=f*a;return((1-3*a+3*f-g)*b+(4-6*f+3*g)*c+(1+3*a+3*f-3*g)*d+g*e)/6}function d(a,b){return function(c){return a+c*b}}function e(a,b,c){return a=Math.pow(a,c),b=Math.pow(b,c)-a,c=1/c,function(d){return Math.pow(a+d*b,c)}}function f(a,b){var c=b-a;return c?d(a,c>180||c<-180?c-360*Math.round(c/360):c):B(isNaN(a)?b:a)}function g(a){return 1===(a=+a)?h:function(b,c){return c-b?e(b,c,a):B(isNaN(b)?c:b)}}function h(a,b){var c=b-a;return c?d(a,c):B(isNaN(a)?b:a)}function i(a){return function(c){var d,e,f=c.length,g=new Array(f),h=new Array(f),i=new Array(f);for(d=0;d180?b+=360:b-a>180&&(a+=360),f.push({i:c.push(e(c)+"rotate(",null,d)-2,x:H(a,b)})):b&&c.push(e(c)+"rotate("+b+d)}function h(a,b,c,f){a!==b?f.push({i:c.push(e(c)+"skewX(",null,d)-2,x:H(a,b)}):b&&c.push(e(c)+"skewX("+b+d)}function i(a,b,c,d,f,g){if(a!==c||b!==d){var h=f.push(e(f)+"scale(",null,",",null,")");g.push({i:h-4,x:H(a,c)},{i:h-2,x:H(b,d)})}else 1===c&&1===d||f.push(e(f)+"scale("+c+","+d+")")}return function(b,c){var d=[],e=[];return b=a(b),c=a(c),f(b.translateX,b.translateY,c.translateX,c.translateY,d,e),g(b.rotate,c.rotate,d,e),h(b.skewX,c.skewX,d,e),i(b.scaleX,b.scaleY,c.scaleX,c.scaleY,d,e),b=c=null,function(a){for(var b,c=-1,f=e.length;++c=1?(d=1,b-1):Math.floor(d*b),f=a[e],g=a[e+1],h=e>0?a[e-1]:2*f-g,i=ef&&(e=b.slice(f,e),h[g]?h[g]+=e:h[++g]=e),(c=c[0])===(d=d[0])?h[g]?h[g]+=d:h[++g]=d:(h[++g]=null,i.push({i:g,x:H(c,d)})),f=K.lastIndex;return f=c?1:d(a)}}}function q(a){return function(b,c){var d=a(b=+b,c=+c);return function(a){return a<=0?b:a>=1?c:d(a)}}}function r(a,b,c,d){var e=a[0],f=a[1],g=b[0],h=b[1];return f2?s:r,g=h=null,e}function e(b){return(g||(g=f(i,j,l?p(a):a,k)))(+b)}var f,g,h,i=$,j=$,k=d.interpolate,l=!1;return e.invert=function(a){return(h||(h=f(j,i,o,l?q(b):b)))(+a)},e.domain=function(a){return arguments.length?(i=X.call(a,n),c()):i.slice()},e.range=function(a){return arguments.length?(j=Y.call(a),c()):j.slice()},e.rangeRound=function(a){return j=Y.call(a),k=d.interpolateRound,c()},e.clamp=function(a){return arguments.length?(l=!!a,c()):l},e.interpolate=function(a){return arguments.length?(k=a,c()):k},c()}function v(a,c,d){var f,g=a[0],h=a[a.length-1],i=b.tickStep(g,h,null==c?10:c);switch(d=e.formatSpecifier(null==d?",f":d),d.type){case"s":var j=Math.max(Math.abs(g),Math.abs(h));return null!=d.precision||isNaN(f=e.precisionPrefix(i,j))||(d.precision=f),e.formatPrefix(d,j);case"":case"e":case"g":case"p":case"r":null!=d.precision||isNaN(f=e.precisionRound(i,Math.max(Math.abs(g),Math.abs(h))))||(d.precision=f-("e"===d.type));break;case"f":case"%":null!=d.precision||isNaN(f=e.precisionFixed(i))||(d.precision=f-2*("%"===d.type))}return e.format(d)}function w(a){var c=a.domain;return a.ticks=function(a){var d=c();return b.ticks(d[0],d[d.length-1],null==a?10:a)},a.tickFormat=function(a,b){return v(c(),a,b)},a.nice=function(d){var e=c(),f=e.length-1,g=null==d?10:d,h=e[0],i=e[f],j=b.tickStep(h,i,g);return j&&(j=b.tickStep(Math.floor(h/j)*j,Math.ceil(i/j)*j,g),e[0]=Math.floor(h/j)*j,e[f]=Math.ceil(i/j)*j,c(e)),a},a}function x(){var a=u(o,d.interpolateNumber);return a.copy=function(){return t(a,x())},w(a)}function y(){function a(a){return+a}var b=[0,1];return a.invert=a,a.domain=a.range=function(c){return arguments.length?(b=X.call(c,n),a):b.slice()},a.copy=function(){return y().domain(b)},w(a)}function z(a,b){a=a.slice();var c,d=0,e=a.length-1,f=a[d],g=a[e];return g0){for(;nj)break;q.push(m)}}else for(;n=1;--l)if(m=k*l,!(mj)break;q.push(m)}}else q=b.ticks(n,o,Math.min(o-n,p)).map(h);return c?q.reverse():q},c.tickFormat=function(a,b){if(null==b&&(b=10===f?".0e":","),"function"!=typeof b&&(b=e.format(b)),a===1/0)return b;null==a&&(a=10);var d=Math.max(1,f*a/c.ticks().length);return function(a){var c=a/h(Math.round(g(a)));return c*f0?f[b-1]:d[0],b=f?[g[f-1],e]:[g[b-1],g[b]]},a.copy=function(){return L().domain([d,e]).range(h)},w(a)}function M(){function a(a){if(a<=a)return d[b.bisect(c,a,0,e)]}var c=[.5],d=[0,1],e=1;return a.domain=function(b){return arguments.length?(c=Y.call(b),e=Math.min(c.length,d.length-1),a):c.slice()},a.range=function(b){return arguments.length?(d=Y.call(b),e=Math.min(c.length,d.length-1),a):d.slice()},a.invertExtent=function(a){var b=d.indexOf(a);return[c[b-1],c[b]]},a.copy=function(){return M().domain(c).range(d)},a}function N(a){return new Date(a)}function O(a){return a instanceof Date?+a:+new Date(+a)}function P(a,c,e,f,g,h,i,j,k){function l(b){return(i(b)1)&&(a-=Math.floor(a));var b=Math.abs(a-.5);return na.h=360*a-100,na.s=1.5-1.5*b,na.l=.8-.9*b,na+""}function U(a){var b=a.length;return function(c){return a[Math.max(0,Math.min(b-1,Math.floor(c*b)))]}}function V(a){function b(b){var f=(b-c)/(d-c);return a(e?Math.max(0,Math.min(1,f)):f)}var c=0,d=1,e=!1;return b.domain=function(a){return arguments.length?(c=+a[0],d=+a[1],b):[c,d]},b.clamp=function(a){return arguments.length?(e=!!a,b):e},b.interpolator=function(c){return arguments.length?(a=c,b):a},b.copy=function(){return V(a).domain([c,d]).clamp(e)},w(b)}var W=Array.prototype,X=W.map,Y=W.slice,Z={name:"implicit"},$=[0,1],_=1e3,aa=60*_,ba=60*aa,ca=24*ba,da=7*ca,ea=30*ca,fa=365*ca,ga=S("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ha=S("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),ia=S("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),ja=S("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),ka=d.interpolateCubehelixLong(h.cubehelix(300,.5,0),h.cubehelix(-240,.5,1)),la=d.interpolateCubehelixLong(h.cubehelix(-100,.75,.35),h.cubehelix(80,1.5,.8)),ma=d.interpolateCubehelixLong(h.cubehelix(260,.75,.35),h.cubehelix(80,1.5,.8)),na=h.cubehelix(),oa=U(S("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),pa=U(S("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),qa=U(S("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ra=U(S("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));a.scaleBand=j,a.scalePoint=l,a.scaleIdentity=y,a.scaleLinear=x,a.scaleLog=G,a.scaleOrdinal=i,a.scaleImplicit=Z,a.scalePow=I,a.scaleSqrt=J,a.scaleQuantile=K,a.scaleQuantize=L,a.scaleThreshold=M,a.scaleTime=Q,a.scaleUtc=R,a.schemeCategory10=ga,a.schemeCategory20b=ha,a.schemeCategory20c=ia,a.schemeCategory20=ja,a.interpolateCubehelixDefault=ka,a.interpolateRainbow=T,a.interpolateWarm=la,a.interpolateCool=ma,a.interpolateViridis=oa,a.interpolateMagma=pa,a.interpolateInferno=qa,a.interpolatePlasma=ra,a.scaleSequential=V,Object.defineProperty(a,"__esModule",{value:!0})})},{"d3-array":1,"d3-collection":2,"d3-color":3,"d3-format":5,"d3-interpolate":6,"d3-time":10,"d3-time-format":9}],8:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a){var b=a+="",c=b.indexOf(":");return c>=0&&"xmlns"!==(b=a.slice(0,c))&&(a=a.slice(c+1)),Qa.hasOwnProperty(b)?{space:Qa[b],local:a}:a}function c(a){return function(){var b=this.ownerDocument,c=this.namespaceURI;return c===Pa&&b.documentElement.namespaceURI===Pa?b.createElement(a):b.createElementNS(c,a)}}function d(a){return function(){return this.ownerDocument.createElementNS(a.space,a.local)}}function e(a){var e=b(a);return(e.local?d:c)(e)}function f(){return new g}function g(){this._="@"+(++Ra).toString(36)}function h(a,b,c){return a=i(a,b,c),function(b){var c=b.relatedTarget;c&&(c===this||8&c.compareDocumentPosition(this))||a.call(this,b)}}function i(b,c,d){return function(e){var f=a.event;a.event=e;try{b.call(this,this.__data__,c,d)}finally{a.event=f}}}function j(a){return a.trim().split(/^|\s+/).map(function(a){var b="",c=a.indexOf(".");return c>=0&&(b=a.slice(c+1),a=a.slice(0,c)),{type:a,name:b}})}function k(a){return function(){var b=this.__on;if(b){for(var c,d=0,e=-1,f=b.length;d=v&&(v=u+1);!(t=q[v])&&++v=0;)(d=e[f])&&(g&&g!==d.nextSibling&&g.parentNode.insertBefore(d,g),g=d);return this}function I(a){function b(b,c){return b&&c?a(b.__data__,c.__data__):!b-!c}a||(a=J);for(var c=this._groups,d=c.length,e=new Array(d),f=0;fb?1:a>=b?0:NaN}function K(){var a=arguments[0];return arguments[0]=this,a.apply(null,arguments),this}function L(){var a=new Array(this.size()),b=-1;return this.each(function(){a[++b]=this}),a}function M(){for(var a=this._groups,b=0,c=a.length;b1?this.each((null==b?Y:"function"==typeof b?$:Z)(a,b,null==c?"":c)):X(d=this.node()).getComputedStyle(d,null).getPropertyValue(a)}function aa(a){return function(){delete this[a]}}function ba(a,b){return function(){this[a]=b}}function ca(a,b){return function(){var c=b.apply(this,arguments);null==c?delete this[a]:this[a]=c}}function da(a,b){return arguments.length>1?this.each((null==b?aa:"function"==typeof b?ca:ba)(a,b)):this.node()[a]}function ea(a){return a.trim().split(/^|\s+/)}function fa(a){return a.classList||new ga(a)}function ga(a){this._node=a,this._names=ea(a.getAttribute("class")||"")}function ha(a,b){for(var c=fa(a),d=-1,e=b.length;++d=0&&(this._names.splice(b,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(a){return this._names.indexOf(a)>=0}};var Za=[null];Ja.prototype=Ka.prototype={constructor:Ja,select:t,selectAll:w,filter:x,data:E,enter:z,exit:F,merge:G,order:H,sort:I,call:K,nodes:L,node:M,size:N,empty:O,each:P,attr:W,style:_,property:da,classed:ma,text:qa,html:ua,raise:wa,lower:ya,append:za,insert:Ba,remove:Da,datum:Ea,on:m,dispatch:Ia},a.creator=e,a.local=f,a.matcher=Va,a.mouse=q,a.namespace=b,a.namespaces=Qa,a.select=La,a.selectAll=Ma,a.selection=Ka,a.selector=s,a.selectorAll=v,a.touch=Na,a.touches=Oa,a.window=X,a.customEvent=n,Object.defineProperty(a,"__esModule",{value:!0})})},{}],9:[function(a,b,c){!function(d,e){"object"==typeof c&&"undefined"!=typeof b?e(c,a("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-time"],e):e(d.d3=d.d3||{},d.d3)}(this,function(a,b){"use strict";function c(a){if(0<=a.y&&a.y<100){var b=new Date(-1,a.m,a.d,a.H,a.M,a.S,a.L);return b.setFullYear(a.y),b}return new Date(a.y,a.m,a.d,a.H,a.M,a.S,a.L)}function d(a){if(0<=a.y&&a.y<100){var b=new Date(Date.UTC(-1,a.m,a.d,a.H,a.M,a.S,a.L));return b.setUTCFullYear(a.y),b}return new Date(Date.UTC(a.y,a.m,a.d,a.H,a.M,a.S,a.L))}function e(a){return{y:a,m:0,d:1,H:0,M:0,S:0,L:0}}function f(a){function b(a,b){return function(c){var d,e,f,g=[],h=-1,i=0,j=a.length;for(c instanceof Date||(c=new Date(+c));++h=i)return-1;if(e=b.charCodeAt(g++), -37===e){if(e=b.charAt(g++),f=La[e in da?b.charAt(g++):e],!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function h(a,b,c){var d=za.exec(b.slice(c));return d?(a.p=Aa[d[0].toLowerCase()],c+d[0].length):-1}function _(a,b,c){var d=Da.exec(b.slice(c));return d?(a.w=Ea[d[0].toLowerCase()],c+d[0].length):-1}function aa(a,b,c){var d=Ba.exec(b.slice(c));return d?(a.w=Ca[d[0].toLowerCase()],c+d[0].length):-1}function ba(a,b,c){var d=Ha.exec(b.slice(c));return d?(a.m=Ia[d[0].toLowerCase()],c+d[0].length):-1}function ca(a,b,c){var d=Fa.exec(b.slice(c));return d?(a.m=Ga[d[0].toLowerCase()],c+d[0].length):-1}function ea(a,b,c){return g(a,ra,b,c)}function fa(a,b,c){return g(a,sa,b,c)}function ga(a,b,c){return g(a,ta,b,c)}function ha(a){return wa[a.getDay()]}function ia(a){return va[a.getDay()]}function ja(a){return ya[a.getMonth()]}function ka(a){return xa[a.getMonth()]}function la(a){return ua[+(a.getHours()>=12)]}function ma(a){return wa[a.getUTCDay()]}function na(a){return va[a.getUTCDay()]}function oa(a){return ya[a.getUTCMonth()]}function pa(a){return xa[a.getUTCMonth()]}function qa(a){return ua[+(a.getUTCHours()>=12)]}var ra=a.dateTime,sa=a.date,ta=a.time,ua=a.periods,va=a.days,wa=a.shortDays,xa=a.months,ya=a.shortMonths,za=i(ua),Aa=j(ua),Ba=i(va),Ca=j(va),Da=i(wa),Ea=j(wa),Fa=i(xa),Ga=j(xa),Ha=i(ya),Ia=j(ya),Ja={a:ha,A:ia,b:ja,B:ka,c:null,d:y,e:y,H:z,I:A,j:B,L:C,m:D,M:E,p:la,S:F,U:G,w:H,W:I,x:null,X:null,y:J,Y:K,Z:L,"%":$},Ka={a:ma,A:na,b:oa,B:pa,c:null,d:M,e:M,H:N,I:O,j:P,L:Q,m:R,M:S,p:qa,S:T,U:U,w:V,W:W,x:null,X:null,y:X,Y:Y,Z:Z,"%":$},La={a:_,A:aa,b:ba,B:ca,c:ea,d:r,e:r,H:t,I:t,j:s,L:w,m:q,M:u,p:h,S:v,U:l,w:k,W:m,x:fa,X:ga,y:o,Y:n,Z:p,"%":x};return Ja.x=b(sa,Ja),Ja.X=b(ta,Ja),Ja.c=b(ra,Ja),Ka.x=b(sa,Ka),Ka.X=b(ta,Ka),Ka.c=b(ra,Ka),{format:function(a){var c=b(a+="",Ja);return c.toString=function(){return a},c},parse:function(a){var b=f(a+="",c);return b.toString=function(){return a},b},utcFormat:function(a){var c=b(a+="",Ka);return c.toString=function(){return a},c},utcParse:function(a){var b=f(a,d);return b.toString=function(){return a},b}}}function g(a,b,c){var d=a<0?"-":"",e=(d?-a:a)+"",f=e.length;return d+(f68?1900:2e3),c+d[0].length):-1}function p(a,b,c){var d=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(b.slice(c,c+6));return d?(a.Z=d[1]?0:-(d[2]+(d[3]||"00")),c+d[0].length):-1}function q(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.m=d[0]-1,c+d[0].length):-1}function r(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.d=+d[0],c+d[0].length):-1}function s(a,b,c){var d=ea.exec(b.slice(c,c+3));return d?(a.m=0,a.d=+d[0],c+d[0].length):-1}function t(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.H=+d[0],c+d[0].length):-1}function u(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.M=+d[0],c+d[0].length):-1}function v(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.S=+d[0],c+d[0].length):-1}function w(a,b,c){var d=ea.exec(b.slice(c,c+3));return d?(a.L=+d[0],c+d[0].length):-1}function x(a,b,c){var d=fa.exec(b.slice(c,c+1));return d?c+d[0].length:-1}function y(a,b){return g(a.getDate(),b,2)}function z(a,b){return g(a.getHours(),b,2)}function A(a,b){return g(a.getHours()%12||12,b,2)}function B(a,c){return g(1+b.timeDay.count(b.timeYear(a),a),c,3)}function C(a,b){return g(a.getMilliseconds(),b,3)}function D(a,b){return g(a.getMonth()+1,b,2)}function E(a,b){return g(a.getMinutes(),b,2)}function F(a,b){return g(a.getSeconds(),b,2)}function G(a,c){return g(b.timeSunday.count(b.timeYear(a),a),c,2)}function H(a){return a.getDay()}function I(a,c){return g(b.timeMonday.count(b.timeYear(a),a),c,2)}function J(a,b){return g(a.getFullYear()%100,b,2)}function K(a,b){return g(a.getFullYear()%1e4,b,4)}function L(a){var b=a.getTimezoneOffset();return(b>0?"-":(b*=-1,"+"))+g(b/60|0,"0",2)+g(b%60,"0",2)}function M(a,b){return g(a.getUTCDate(),b,2)}function N(a,b){return g(a.getUTCHours(),b,2)}function O(a,b){return g(a.getUTCHours()%12||12,b,2)}function P(a,c){return g(1+b.utcDay.count(b.utcYear(a),a),c,3)}function Q(a,b){return g(a.getUTCMilliseconds(),b,3)}function R(a,b){return g(a.getUTCMonth()+1,b,2)}function S(a,b){return g(a.getUTCMinutes(),b,2)}function T(a,b){return g(a.getUTCSeconds(),b,2)}function U(a,c){return g(b.utcSunday.count(b.utcYear(a),a),c,2)}function V(a){return a.getUTCDay()}function W(a,c){return g(b.utcMonday.count(b.utcYear(a),a),c,2)}function X(a,b){return g(a.getUTCFullYear()%100,b,2)}function Y(a,b){return g(a.getUTCFullYear()%1e4,b,4)}function Z(){return"+0000"}function $(){return"%"}function _(b){return ca=f(b),a.timeFormat=ca.format,a.timeParse=ca.parse,a.utcFormat=ca.utcFormat,a.utcParse=ca.utcParse,ca}function aa(a){return a.toISOString()}function ba(a){var b=new Date(a);return isNaN(b)?null:b}var ca,da={"-":"",_:" ",0:"0"},ea=/^\s*\d+/,fa=/^%/,ga=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;_({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var ha="%Y-%m-%dT%H:%M:%S.%LZ",ia=Date.prototype.toISOString?aa:a.utcFormat(ha),ja=+new Date("2000-01-01T00:00:00.000Z")?ba:a.utcParse(ha);a.timeFormatDefaultLocale=_,a.timeFormatLocale=f,a.isoFormat=ia,a.isoParse=ja,Object.defineProperty(a,"__esModule",{value:!0})})},{"d3-time":10}],10:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,c,d,g){function h(b){return a(b=new Date(+b)),b}return h.floor=h,h.ceil=function(b){return a(b=new Date(b-1)),c(b,1),a(b),b},h.round=function(a){var b=h(a),c=h.ceil(a);return a-b0))return f;do f.push(new Date(+b));while(c(b,e),a(b),b=b)for(;a(b),!d(b);)b.setTime(b-1)},function(a,b){if(a>=a)for(;--b>=0;)for(;c(a,1),!d(a););})},d&&(h.count=function(b,c){return e.setTime(+b),f.setTime(+c),a(e),a(f),Math.floor(d(e,f))},h.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?h.filter(g?function(b){return g(b)%a===0}:function(b){return h.count(0,b)%a===0}):h:null}),h}function c(a){return b(function(b){b.setDate(b.getDate()-(b.getDay()+7-a)%7),b.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+7*b)},function(a,b){return(b-a-(b.getTimezoneOffset()-a.getTimezoneOffset())*j)/m})}function d(a){return b(function(b){b.setUTCDate(b.getUTCDate()-(b.getUTCDay()+7-a)%7),b.setUTCHours(0,0,0,0)},function(a,b){a.setUTCDate(a.getUTCDate()+7*b)},function(a,b){return(b-a)/m})}var e=new Date,f=new Date,g=b(function(){},function(a,b){a.setTime(+a+b)},function(a,b){return b-a});g.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?b(function(b){b.setTime(Math.floor(b/a)*a)},function(b,c){b.setTime(+b+c*a)},function(b,c){return(c-b)/a}):g:null};var h=g.range,i=1e3,j=6e4,k=36e5,l=864e5,m=6048e5,n=b(function(a){a.setTime(Math.floor(a/i)*i)},function(a,b){a.setTime(+a+b*i)},function(a,b){return(b-a)/i},function(a){return a.getUTCSeconds()}),o=n.range,p=b(function(a){a.setTime(Math.floor(a/j)*j)},function(a,b){a.setTime(+a+b*j)},function(a,b){return(b-a)/j},function(a){return a.getMinutes()}),q=p.range,r=b(function(a){var b=a.getTimezoneOffset()*j%k;b<0&&(b+=k),a.setTime(Math.floor((+a-b)/k)*k+b)},function(a,b){a.setTime(+a+b*k)},function(a,b){return(b-a)/k},function(a){return a.getHours()}),s=r.range,t=b(function(a){a.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+b)},function(a,b){return(b-a-(b.getTimezoneOffset()-a.getTimezoneOffset())*j)/l},function(a){return a.getDate()-1}),u=t.range,v=c(0),w=c(1),x=c(2),y=c(3),z=c(4),A=c(5),B=c(6),C=v.range,D=w.range,E=x.range,F=y.range,G=z.range,H=A.range,I=B.range,J=b(function(a){a.setDate(1),a.setHours(0,0,0,0)},function(a,b){a.setMonth(a.getMonth()+b)},function(a,b){return b.getMonth()-a.getMonth()+12*(b.getFullYear()-a.getFullYear())},function(a){return a.getMonth()}),K=J.range,L=b(function(a){a.setMonth(0,1),a.setHours(0,0,0,0)},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a,b){return b.getFullYear()-a.getFullYear()},function(a){return a.getFullYear()});L.every=function(a){return isFinite(a=Math.floor(a))&&a>0?b(function(b){b.setFullYear(Math.floor(b.getFullYear()/a)*a),b.setMonth(0,1),b.setHours(0,0,0,0)},function(b,c){b.setFullYear(b.getFullYear()+c*a)}):null};var M=L.range,N=b(function(a){a.setUTCSeconds(0,0)},function(a,b){a.setTime(+a+b*j)},function(a,b){return(b-a)/j},function(a){return a.getUTCMinutes()}),O=N.range,P=b(function(a){a.setUTCMinutes(0,0,0)},function(a,b){a.setTime(+a+b*k)},function(a,b){return(b-a)/k},function(a){return a.getUTCHours()}),Q=P.range,R=b(function(a){a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCDate(a.getUTCDate()+b)},function(a,b){return(b-a)/l},function(a){return a.getUTCDate()-1}),S=R.range,T=d(0),U=d(1),V=d(2),W=d(3),X=d(4),Y=d(5),Z=d(6),$=T.range,_=U.range,aa=V.range,ba=W.range,ca=X.range,da=Y.range,ea=Z.range,fa=b(function(a){a.setUTCDate(1),a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCMonth(a.getUTCMonth()+b)},function(a,b){return b.getUTCMonth()-a.getUTCMonth()+12*(b.getUTCFullYear()-a.getUTCFullYear())},function(a){return a.getUTCMonth()}),ga=fa.range,ha=b(function(a){a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCFullYear(a.getUTCFullYear()+b)},function(a,b){return b.getUTCFullYear()-a.getUTCFullYear()},function(a){return a.getUTCFullYear()});ha.every=function(a){return isFinite(a=Math.floor(a))&&a>0?b(function(b){b.setUTCFullYear(Math.floor(b.getUTCFullYear()/a)*a),b.setUTCMonth(0,1),b.setUTCHours(0,0,0,0)},function(b,c){b.setUTCFullYear(b.getUTCFullYear()+c*a)}):null};var ia=ha.range;a.timeInterval=b,a.timeMillisecond=g,a.timeMilliseconds=h,a.utcMillisecond=g,a.utcMilliseconds=h,a.timeSecond=n,a.timeSeconds=o,a.utcSecond=n,a.utcSeconds=o,a.timeMinute=p,a.timeMinutes=q,a.timeHour=r,a.timeHours=s,a.timeDay=t,a.timeDays=u,a.timeWeek=v,a.timeWeeks=C,a.timeSunday=v,a.timeSundays=C,a.timeMonday=w,a.timeMondays=D,a.timeTuesday=x,a.timeTuesdays=E,a.timeWednesday=y,a.timeWednesdays=F,a.timeThursday=z,a.timeThursdays=G,a.timeFriday=A,a.timeFridays=H,a.timeSaturday=B,a.timeSaturdays=I,a.timeMonth=J,a.timeMonths=K,a.timeYear=L,a.timeYears=M,a.utcMinute=N,a.utcMinutes=O,a.utcHour=P,a.utcHours=Q,a.utcDay=R,a.utcDays=S,a.utcWeek=T,a.utcWeeks=$,a.utcSunday=T,a.utcSundays=$,a.utcMonday=U,a.utcMondays=_,a.utcTuesday=V,a.utcTuesdays=aa,a.utcWednesday=W,a.utcWednesdays=ba,a.utcThursday=X,a.utcThursdays=ca,a.utcFriday=Y,a.utcFridays=da,a.utcSaturday=Z,a.utcSaturdays=ea,a.utcMonth=fa,a.utcMonths=ga,a.utcYear=ha,a.utcYears=ia,Object.defineProperty(a,"__esModule",{value:!0})})},{}],11:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var h=g.default.d3_calcType(b,y,m,o,s,v),i=a.selectAll("g").data([b]);i.enter().append("g").attr("class",p+"legendCells"),n&&g.default.d3_filterCells(h,n);var j=a.select("."+p+"legendCells").selectAll("."+p+"cell").data(h.data),C=j.enter().append("g").attr("class",p+"cell");C.append(c).attr("class",p+"swatch");var D=a.selectAll("g."+p+"cell "+c);g.default.d3_addEvents(C,B),j.exit().transition().style("opacity",0).remove(),g.default.d3_drawShapes(c,D,e,d,f,z),g.default.d3_addText(a,C,h.labels,p,w),j=C.merge(j);var E=j.selectAll("text"),F=E.nodes().map(function(a){return a.getBBox()}),G=D.nodes().map(function(a){return a.getBBox()});q?D.attr("class",function(a){return p+"swatch "+h.feature(a)}):"line"==c?D.style("stroke",h.feature):D.style("fill",h.feature);var H=void 0,I=void 0,J="start"==u?0:"middle"==u?.5:1;"vertical"===x?!function(){var a=F.map(function(a,b){return Math.max(a.height,G[b].height)});H=function(b,c){var d=(0,k.sum)(a.slice(0,c));return"translate(0, "+(d+c*l)+")"},I=function(a,b){return"translate( "+(G[b].width+G[b].x+t)+", "+(G[b].y+G[b].height/2+5)+")"}}():"horizontal"===x&&(H=function(a,b){return"translate("+b*(G[b].width+l)+",0)"},I=function(a,b){return"translate("+(G[b].width*J+G[b].x)+",\n "+(G[b].height+G[b].y+t+8)+")"}),g.default.d3_placement(x,j,H,E,I,u),g.default.d3_title(a,r,p,A),j.transition().style("opacity",1)}var b=(0,i.scaleLinear)(),c="rect",d=15,e=15,f=10,l=2,m=[5],n=void 0,o=[],p="",q=!1,r="",s=(0,j.format)(".01f"),t=10,u="middle",v="to",w=void 0,x="vertical",y=!1,z=void 0,A=void 0,B=(0,h.dispatch)("cellover","cellout","cellclick");return a.scale=function(c){return arguments.length?(b=c,a):b},a.cells=function(b){return arguments.length?((b.length>1||b>=2)&&(m=b),a):m},a.cellFilter=function(b){return arguments.length?(n=b,a):n},a.shape=function(b,d){return arguments.length?(("rect"==b||"circle"==b||"line"==b||"path"==b&&"string"==typeof d)&&(c=b,z=d),a):c},a.shapeWidth=function(b){return arguments.length?(d=+b,a):d},a.shapeHeight=function(b){return arguments.length?(e=+b,a):e},a.shapeRadius=function(b){return arguments.length?(f=+b,a):f},a.shapePadding=function(b){return arguments.length?(l=+b,a):l},a.labels=function(b){return arguments.length?(o=b,a):o},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(u=b),a):u},a.labelFormat=function(b){return arguments.length?(s="string"==typeof b?(0,j.format)(b):b,a):s},a.labelOffset=function(b){return arguments.length?(t=+b,a):t},a.labelDelimiter=function(b){return arguments.length?(v=b,a):v},a.labelWrap=function(b){return arguments.length?(w=b,a):w},a.useClass=function(b){return arguments.length?(b!==!0&&b!==!1||(q=b),a):q},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(x=b),a):x},a.ascending=function(b){return arguments.length?(y=!!b,a):y},a.classPrefix=function(b){return arguments.length?(p=b,a):p},a.title=function(b){return arguments.length?(r=b,a):r},a.titleWidth=function(b){return arguments.length?(A=b,a):A},a.textWrap=function(b){return arguments.length?(textWrap=b,a):textWrap},a.on=function(){var b=B.on.apply(B,arguments);return b===B?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":13,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],12:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=c.thresholdLabels=function(a){var b=a.i,c=a.genLength,d=a.generatedLabels;return 0===b?d[b].replace("NaN to","Less than"):b===c-1?"More than "+d[c-1].replace(" to NaN",""):d[b]};c.default={thresholdLabels:d}},{}],13:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=a("d3-selection"),f=function(a){return a},g=function(a){for(var b=[],c=0,d=a.length;cb&&f.length>1&&(f.pop(),i.text(f.join(" ")),f=[a],i=c.append("tspan").attr("x",0).attr("dy",g+h+"em").text(a))})},i=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],b=arguments[1],c=arguments[2],e=arguments[3];if("object"===("undefined"==typeof b?"undefined":d(b))){if(0===b.length)return a;for(var f=b.length;f1)d=b;else for(var e=a.domain(),f=(e[e.length-1]-e[0])/(b-1),g=0;g1||b>=2)&&(f=b),a):f},a.cellFilter=function(b){return arguments.length?(l=b,a):l},a.shape=function(b,d){return arguments.length?("rect"!=b&&"circle"!=b&&"line"!=b||(c=b,w=d),a):c},a.shapeWidth=function(b){return arguments.length?(d=+b,a):d},a.shapePadding=function(b){return arguments.length?(e=+b,a):e},a.labels=function(b){return arguments.length?(m=b,a):m},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(r=b),a):r},a.labelFormat=function(b){return arguments.length?(p="string"==typeof b?(0,j.format)(b):b,a):p},a.labelOffset=function(b){return arguments.length?(q=+b,a):q},a.labelDelimiter=function(b){return arguments.length?(s=b,a):s},a.labelWrap=function(b){return arguments.length?(t=b,a):t},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(u=b),a):u},a.ascending=function(b){return arguments.length?(v=!!b,a):v},a.classPrefix=function(b){return arguments.length?(n=b,a):n},a.title=function(b){return arguments.length?(o=b,a):o},a.titleWidth=function(b){return arguments.length?(x=b,a):x},a.on=function(){var b=y.on.apply(y,arguments);return b===y?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":13,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],15:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var h=g.default.d3_calcType(b,x,m,o,r,u),i=a.selectAll("g").data([b]);n&&g.default.d3_filterCells(h,n),i.enter().append("g").attr("class",p+"legendCells");var j=a.select("."+p+"legendCells").selectAll("."+p+"cell").data(h.data),A=j.enter().append("g").attr("class",p+"cell");A.append(c).attr("class",p+"swatch");var B=a.selectAll("g."+p+"cell "+c);g.default.d3_addEvents(A,z),j.exit().transition().style("opacity",0).remove(),g.default.d3_drawShapes(c,B,e,d,f,h.feature),g.default.d3_addText(a,A,h.labels,p,v),j=A.merge(j);var C=j.selectAll("text"),D=C.nodes().map(function(a){return a.getBBox()}),E=B.nodes().map(function(a){return a.getBBox()}),F=(0,k.max)(E,function(a){return a.height}),G=(0,k.max)(E,function(a){return a.width}),H=void 0,I=void 0,J="start"==s?0:"middle"==s?.5:1;"vertical"===w?!function(){var a=D.map(function(a,b){return Math.max(F,a.height)});H=function(b,c){var d=(0,k.sum)(a.slice(0,c));return"translate(0, "+(d+c*l)+" )"},I=function(a,b){return"translate( "+(G+t)+",\n "+(E[b].y+E[b].height/2+5)+")"}}():"horizontal"===w&&(H=function(a,b){return"translate( "+b*(G+l)+",0)"},I=function(a,b){return"translate( "+(E[b].width*J+E[b].x)+",\n "+(F+t)+")"}),g.default.d3_placement(w,j,H,C,I,s),g.default.d3_title(a,q,p,y),j.transition().style("opacity",1)}var b=(0,i.scaleLinear)(),c="path",d=15,e=15,f=10,l=5,m=[5],n=void 0,o=[],p="",q="",r=(0,j.format)(".01f"),s="middle",t=10,u="to",v=void 0,w="vertical",x=!1,y=void 0,z=(0,h.dispatch)("cellover","cellout","cellclick");return a.scale=function(c){return arguments.length?(b=c,a):b},a.cells=function(b){return arguments.length?((b.length>1||b>=2)&&(m=b),a):m},a.cellFilter=function(b){return arguments.length?(n=b,a):n},a.shapePadding=function(b){return arguments.length?(l=+b,a):l},a.labels=function(b){return arguments.length?(o=b,a):o},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(s=b),a):s},a.labelFormat=function(b){return arguments.length?(r="string"==typeof b?(0,j.format)(b):b,a):r},a.labelOffset=function(b){return arguments.length?(t=+b,a):t},a.labelDelimiter=function(b){return arguments.length?(u=b,a):u},a.labelWrap=function(b){return arguments.length?(v=b,a):v},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(w=b),a):w},a.ascending=function(b){return arguments.length?(x=!!b,a):x},a.classPrefix=function(b){return arguments.length?(p=b,a):p},a.title=function(b){return arguments.length?(q=b,a):q},a.titleWidth=function(b){return arguments.length?(y=b,a):y},a.on=function(){var b=z.on.apply(z,arguments);return b===z?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":13,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],16:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}var e=a("./color"),f=d(e),g=a("./size"),h=d(g),i=a("./symbol"),j=d(i),k=a("./helpers"),l=d(k);d3.legendColor=f.default,d3.legendSize=h.default,d3.legendSymbol=j.default,d3.legendHelpers=l.default},{"./color":11,"./helpers":12,"./size":14,"./symbol":15}]},{},[16]); \ No newline at end of file +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gb?1:a>=b?0:NaN}function c(a){return 1===a.length&&(a=d(a)),{left:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d>>1;a(b[f],c)<0?d=f+1:e=f}return d},right:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d>>1;a(b[f],c)>0?e=f:d=f+1}return d}}}function d(a){return function(c,d){return b(a(c),d)}}function e(a,b){return ba?1:b>=a?0:NaN}function f(a){return null===a?NaN:+a}function g(a,b){var c,d,e=a.length,g=0,h=0,i=-1,j=0;if(null==b)for(;++i1)return h/(j-1)}function h(a,b){var c=g(a,b);return c?Math.sqrt(c):c}function i(a,b){var c,d,e,f=-1,g=a.length;if(null==b){for(;++f=d){c=e=d;break}for(;++fd&&(c=d),e=d){c=e=d;break}for(;++fd&&(c=d),e=M?e*=10:f>=N?e*=5:f>=O&&(e*=2),b=k;)l.pop(),--n;var o,p=new Array(n+1);for(e=0;e<=n;++e)o=p[e]=[],o.x0=e>0?l[e-1]:j,o.x1=e=1)return+c(a[d-1],d-1,a);var d,e=(d-1)*b,g=Math.floor(e),h=+c(a[g],g,a);return h+(+c(a[g+1],g+1,a)-h)*(e-g)}}function r(a,c,d){return a=L.call(a,f).sort(b),Math.ceil((d-c)/(2*(q(a,.75)-q(a,.25))*Math.pow(a.length,-1/3)))}function s(a,b,c){return Math.ceil((c-b)/(3.5*h(a)*Math.pow(a.length,-1/3)))}function t(a,b){var c,d,e=-1,f=a.length;if(null==b){for(;++e=d){c=d;break}for(;++ec&&(c=d)}else{for(;++e=d){c=d;break}for(;++ec&&(c=d)}return c}function u(a,b){var c,d=0,e=a.length,g=-1,h=e;if(null==b)for(;++g=0;)for(d=a[e],b=d.length;--b>=0;)c[--g]=d[b];return c}function x(a,b){var c,d,e=-1,f=a.length;if(null==b){for(;++e=d){c=d;break}for(;++ed&&(c=d)}else{for(;++e=d){c=d;break}for(;++ed&&(c=d)}return c}function y(a){for(var b=0,c=a.length-1,d=a[0],e=new Array(c<0?0:c);b=k.length)return null!=h&&b.sort(h),null!=i?i(b):b;for(var g,j,l,m=-1,n=b.length,o=k[d++],p=c(),q=e();++mk.length)return a;var d,e=l[c-1];return null!=i&&c>=k.length?d=a.entries():(d=[],a.each(function(a,e){d.push({key:e,values:b(a,c)})})),null!=e?d.sort(function(a,b){return e(a.key,b.key)}):d}var h,i,j,k=[],l=[];return j={object:function(b){return a(b,0,d,e)},map:function(b){return a(b,0,f,g)},entries:function(c){return b(a(c,0,f,g),0)},key:function(a){return k.push(a),j},sortKeys:function(a){return l[k.length-1]=a,j},sortValues:function(a){return h=a,j},rollup:function(a){return i=a,j}}},l=c.prototype;h.prototype=i.prototype={constructor:h,has:l.has,add:function(a){return a+="",this[j+a]=a,this},remove:l.remove,clear:l.clear,values:l.keys,size:l.size,empty:l.empty,each:l.each};var m=function(a){var b=[];for(var c in a)b.push(c);return b},n=function(a){var b=[];for(var c in a)b.push(a[c]);return b},o=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b};a.nest=k,a.set=i,a.map=c,a.keys=m,a.values=n,a.entries=o,Object.defineProperty(a,"__esModule",{value:!0})})},{}],3:[function(a,b,c){!function(a,d){"object"==typeof c&&void 0!==b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,b){var c=Object.create(a.prototype);for(var d in b)c[d]=b[d];return c}function c(){}function d(a){var b;return a=(a+"").trim().toLowerCase(),(b=H.exec(a))?(b=parseInt(b[1],16),new i(b>>8&15|b>>4&240,b>>4&15|240&b,(15&b)<<4|15&b,1)):(b=I.exec(a))?e(parseInt(b[1],16)):(b=J.exec(a))?new i(b[1],b[2],b[3],1):(b=K.exec(a))?new i(255*b[1]/100,255*b[2]/100,255*b[3]/100,1):(b=L.exec(a))?f(b[1],b[2],b[3],b[4]):(b=M.exec(a))?f(255*b[1]/100,255*b[2]/100,255*b[3]/100,b[4]):(b=N.exec(a))?j(b[1],b[2]/100,b[3]/100,1):(b=O.exec(a))?j(b[1],b[2]/100,b[3]/100,b[4]):P.hasOwnProperty(a)?e(P[a]):"transparent"===a?new i(NaN,NaN,NaN,0):null}function e(a){return new i(a>>16&255,a>>8&255,255&a,1)}function f(a,b,c,d){return d<=0&&(a=b=c=NaN),new i(a,b,c,d)}function g(a){return a instanceof c||(a=d(a)),a?(a=a.rgb(),new i(a.r,a.g,a.b,a.opacity)):new i}function h(a,b,c,d){return 1===arguments.length?g(a):new i(a,b,c,null==d?1:d)}function i(a,b,c,d){this.r=+a,this.g=+b,this.b=+c,this.opacity=+d}function j(a,b,c,d){return d<=0?a=b=c=NaN:c<=0||c>=1?a=b=NaN:b<=0&&(a=NaN),new m(a,b,c,d)}function k(a){if(a instanceof m)return new m(a.h,a.s,a.l,a.opacity);if(a instanceof c||(a=d(a)),!a)return new m;if(a instanceof m)return a;a=a.rgb();var b=a.r/255,e=a.g/255,f=a.b/255,g=Math.min(b,e,f),h=Math.max(b,e,f),i=NaN,j=h-g,k=(h+g)/2;return j?(i=b===h?(e-f)/j+6*(e0&&k<1?0:i,new m(i,j,k,a.opacity)}function l(a,b,c,d){return 1===arguments.length?k(a):new m(a,b,c,null==d?1:d)}function m(a,b,c,d){this.h=+a,this.s=+b,this.l=+c,this.opacity=+d}function n(a,b,c){return 255*(a<60?b+(c-b)*a/60:a<180?c:a<240?b+(c-b)*(240-a)/60:b)}function o(a){if(a instanceof q)return new q(a.l,a.a,a.b,a.opacity);if(a instanceof x){var b=a.h*Q;return new q(a.l,Math.cos(b)*a.c,Math.sin(b)*a.c,a.opacity)}a instanceof i||(a=g(a));var c=u(a.r),d=u(a.g),e=u(a.b),f=r((.4124564*c+.3575761*d+.1804375*e)/T),h=r((.2126729*c+.7151522*d+.072175*e)/U);return new q(116*h-16,500*(f-h),200*(h-r((.0193339*c+.119192*d+.9503041*e)/V)),a.opacity)}function p(a,b,c,d){return 1===arguments.length?o(a):new q(a,b,c,null==d?1:d)}function q(a,b,c,d){this.l=+a,this.a=+b,this.b=+c,this.opacity=+d}function r(a){return a>Z?Math.pow(a,1/3):a/Y+W}function s(a){return a>X?a*a*a:Y*(a-W)}function t(a){return 255*(a<=.0031308?12.92*a:1.055*Math.pow(a,1/2.4)-.055)}function u(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function v(a){if(a instanceof x)return new x(a.h,a.c,a.l,a.opacity);a instanceof q||(a=o(a));var b=Math.atan2(a.b,a.a)*R;return new x(b<0?b+360:b,Math.sqrt(a.a*a.a+a.b*a.b),a.l,a.opacity)}function w(a,b,c,d){return 1===arguments.length?v(a):new x(a,b,c,null==d?1:d)}function x(a,b,c,d){this.h=+a,this.c=+b,this.l=+c,this.opacity=+d}function y(a){if(a instanceof A)return new A(a.h,a.s,a.l,a.opacity);a instanceof i||(a=g(a));var b=a.r/255,c=a.g/255,d=a.b/255,e=(fa*d+da*b-ea*c)/(fa+da-ea),f=d-e,h=(ca*(c-e)-aa*f)/ba,j=Math.sqrt(h*h+f*f)/(ca*e*(1-e)),k=j?Math.atan2(h,f)*R-120:NaN;return new A(k<0?k+360:k,j,e,a.opacity)}function z(a,b,c,d){return 1===arguments.length?y(a):new A(a,b,c,null==d?1:d)}function A(a,b,c,d){this.h=+a,this.s=+b,this.l=+c,this.opacity=+d}var B=function(a,b,c){a.prototype=b.prototype=c,c.constructor=a},C=.7,D=1/C,E="\\s*([+-]?\\d+)\\s*",F="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",G="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",H=/^#([0-9a-f]{3})$/,I=/^#([0-9a-f]{6})$/,J=new RegExp("^rgb\\("+[E,E,E]+"\\)$"),K=new RegExp("^rgb\\("+[G,G,G]+"\\)$"),L=new RegExp("^rgba\\("+[E,E,E,F]+"\\)$"),M=new RegExp("^rgba\\("+[G,G,G,F]+"\\)$"),N=new RegExp("^hsl\\("+[F,G,G]+"\\)$"),O=new RegExp("^hsla\\("+[F,G,G,F]+"\\)$"),P={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};B(c,d,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),B(i,h,b(c,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new i(this.r*a,this.g*a,this.b*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new i(this.r*a,this.g*a,this.b*a,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var a=this.opacity;return a=isNaN(a)?1:Math.max(0,Math.min(1,a)),(1===a?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===a?")":", "+a+")")}})),B(m,l,b(c,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new m(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new m(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=this.h%360+360*(this.h<0),b=isNaN(a)||isNaN(this.s)?0:this.s,c=this.l,d=c+(c<.5?c:1-c)*b,e=2*c-d;return new i(n(a>=240?a-240:a+120,e,d),n(a,e,d),n(a<120?a+240:a-120,e,d),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Q=Math.PI/180,R=180/Math.PI,S=18,T=.95047,U=1,V=1.08883,W=4/29,X=6/29,Y=3*X*X,Z=X*X*X;B(q,p,b(c,{brighter:function(a){return new q(this.l+S*(null==a?1:a),this.a,this.b,this.opacity)},darker:function(a){return new q(this.l-S*(null==a?1:a),this.a,this.b,this.opacity)},rgb:function(){var a=(this.l+16)/116,b=isNaN(this.a)?a:a+this.a/500,c=isNaN(this.b)?a:a-this.b/200;return a=U*s(a),b=T*s(b),c=V*s(c),new i(t(3.2404542*b-1.5371385*a-.4985314*c),t(-.969266*b+1.8760108*a+.041556*c),t(.0556434*b-.2040259*a+1.0572252*c),this.opacity)}})),B(x,w,b(c,{brighter:function(a){return new x(this.h,this.c,this.l+S*(null==a?1:a),this.opacity)},darker:function(a){return new x(this.h,this.c,this.l-S*(null==a?1:a),this.opacity)},rgb:function(){return o(this).rgb()}}));var $=-.14861,_=1.78277,aa=-.29227,ba=-.90649,ca=1.97294,da=ca*ba,ea=ca*_,fa=_*aa-ba*$;B(A,z,b(c,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new A(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new A(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=isNaN(this.h)?0:(this.h+120)*Q,b=+this.l,c=isNaN(this.s)?0:this.s*b*(1-b),d=Math.cos(a),e=Math.sin(a);return new i(255*(b+c*($*d+_*e)),255*(b+c*(aa*d+ba*e)),255*(b+c*(ca*d)),this.opacity)}})),a.color=d,a.rgb=h,a.hsl=l,a.lab=p,a.hcl=w,a.cubehelix=z,Object.defineProperty(a,"__esModule",{value:!0})})},{}],4:[function(a,b,c){!function(a,d){"object"==typeof c&&void 0!==b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(){for(var a,b=0,d=arguments.length,e={};b=0&&(c=a.slice(d+1),a=a.slice(0,d)),a&&!b.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:c}})}function e(a,b){for(var c,d=0,e=a.length;d0)for(var c,d,e=new Array(c),f=0;f1?d[0]+d.slice(2):d,+a.slice(c+1)]}function c(a){return a=b(Math.abs(a)),a?a[1]:NaN}function d(a,b){return function(c,d){for(var e=c.length,f=[],g=0,h=a[0],i=0;e>0&&h>0&&(i+h+1>d&&(h=Math.max(1,d-i)),f.push(c.substring(e-=h,e+h)),!((i+=h+1)>d));)h=a[g=(g+1)%a.length];return f.reverse().join(b)}}function e(a,b){a=a.toPrecision(b);a:for(var c,d=a.length,e=1,f=-1;e0&&(f=0)}return f>0?a.slice(0,f)+a.slice(c+1):a}function f(a,c){var d=b(a,c);if(!d)return a+"";var e=d[0],f=d[1],g=f-(p=3*Math.max(-8,Math.min(8,Math.floor(f/3))))+1,h=e.length;return g===h?e:g>h?e+new Array(g-h+1).join("0"):g>0?e.slice(0,g)+"."+e.slice(g):"0."+new Array(1-g).join("0")+b(a,Math.max(0,c+g-1))[0]}function g(a,c){var d=b(a,c);if(!d)return a+"";var e=d[0],f=d[1];return f<0?"0."+new Array(-f).join("0")+e:e.length>f+1?e.slice(0,f+1)+"."+e.slice(f+1):e+new Array(f-e.length+2).join("0")}function h(a){return new i(a)}function i(a){if(!(b=r.exec(a)))throw new Error("invalid format: "+a);var b,c=b[1]||" ",d=b[2]||">",e=b[3]||"-",f=b[4]||"",g=!!b[5],h=b[6]&&+b[6],i=!!b[7],j=b[8]&&+b[8].slice(1),k=b[9]||"";"n"===k?(i=!0,k="g"):q[k]||(k=""),(g||"0"===c&&"="===d)&&(g=!0,c="0",d="="),this.fill=c,this.align=d,this.sign=e,this.symbol=f,this.zero=g,this.width=h,this.comma=i,this.precision=j,this.type=k}function j(a){return a}function k(a){function b(a){function b(a){var b,g,h,j=r,q=s;if("c"===o)q=u(a)+q,a="";else{a=+a;var w=(a<0||1/a<0)&&(a*=-1,!0);if(a=u(a,n),w)for(b=-1,g=a.length,w=!1;++b(h=a.charCodeAt(b))||h>57){q=(46===h?i+a.slice(b+1):a.slice(b))+q,a=a.slice(0,b);break}}m&&!k&&(a=f(a,1/0));var x=j.length+a.length+q.length,y=x>1)+j+a+q+y.slice(x)}return y+j+a+q}a=h(a);var c=a.fill,d=a.align,e=a.sign,j=a.symbol,k=a.zero,l=a.width,m=a.comma,n=a.precision,o=a.type,r="$"===j?g[0]:"#"===j&&/[boxX]/.test(o)?"0"+o.toLowerCase():"",s="$"===j?g[1]:/[%p]/.test(o)?"%":"",u=q[o],v=!o||/[defgprs%]/.test(o);return n=null==n?o?6:12:/[gprs]/.test(o)?Math.max(1,Math.min(21,n)):Math.max(0,Math.min(20,n)),b.toString=function(){return a+""},b}function e(a,d){var e=b((a=h(a),a.type="f",a)),f=3*Math.max(-8,Math.min(8,Math.floor(c(d)/3))),g=Math.pow(10,-f),i=t[8+f/3];return function(a){return e(g*a)+i}}var f=a.grouping&&a.thousands?d(a.grouping,a.thousands):j,g=a.currency,i=a.decimal;return{format:b,formatPrefix:e}}function l(b){return s=k(b),a.format=s.format,a.formatPrefix=s.formatPrefix,s}function m(a){return Math.max(0,-c(Math.abs(a)))}function n(a,b){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(c(b)/3)))-c(Math.abs(a)))}function o(a,b){return a=Math.abs(a),b=Math.abs(b)-a,Math.max(0,c(b)-c(a))+1}var p,q={"":e,"%":function(a,b){return(100*a).toFixed(b)},b:function(a){return Math.round(a).toString(2)},c:function(a){return a+""},d:function(a){return Math.round(a).toString(10)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},g:function(a,b){return a.toPrecision(b)},o:function(a){return Math.round(a).toString(8)},p:function(a,b){return g(100*a,b)},r:g,s:f,X:function(a){return Math.round(a).toString(16).toUpperCase()},x:function(a){return Math.round(a).toString(16)}},r=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;i.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var s,t=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];l({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),a.formatDefaultLocale=l,a.formatLocale=k,a.formatSpecifier=h,a.precisionFixed=m,a.precisionPrefix=n,a.precisionRound=o,Object.defineProperty(a,"__esModule",{value:!0})})},{}],6:[function(a,b,c){!function(d,e){"object"==typeof c&&void 0!==b?e(c,a("d3-color")):"function"==typeof define&&define.amd?define(["exports","d3-color"],e):e(d.d3=d.d3||{},d.d3)}(this,function(a,b){"use strict";function c(a,b,c,d,e){var f=a*a,g=f*a;return((1-3*a+3*f-g)*b+(4-6*f+3*g)*c+(1+3*a+3*f-3*g)*d+g*e)/6}function d(a,b){return function(c){return a+c*b}}function e(a,b,c){return a=Math.pow(a,c),b=Math.pow(b,c)-a,c=1/c,function(d){return Math.pow(a+d*b,c)}}function f(a,b){var c=b-a;return c?d(a,c>180||c<-180?c-360*Math.round(c/360):c):B(isNaN(a)?b:a)}function g(a){return 1==(a=+a)?h:function(b,c){return c-b?e(b,c,a):B(isNaN(b)?c:b)}}function h(a,b){var c=b-a;return c?d(a,c):B(isNaN(a)?b:a)}function i(a){return function(c){var d,e,f=c.length,g=new Array(f),h=new Array(f),i=new Array(f);for(d=0;d180?b+=360:b-a>180&&(a+=360),f.push({i:c.push(e(c)+"rotate(",null,d)-2,x:H(a,b)})):b&&c.push(e(c)+"rotate("+b+d)}function h(a,b,c,f){a!==b?f.push({i:c.push(e(c)+"skewX(",null,d)-2,x:H(a,b)}):b&&c.push(e(c)+"skewX("+b+d)}function i(a,b,c,d,f,g){if(a!==c||b!==d){var h=f.push(e(f)+"scale(",null,",",null,")");g.push({i:h-4,x:H(a,c)},{i:h-2,x:H(b,d)})}else 1===c&&1===d||f.push(e(f)+"scale("+c+","+d+")")}return function(b,c){var d=[],e=[];return b=a(b),c=a(c),f(b.translateX,b.translateY,c.translateX,c.translateY,d,e),g(b.rotate,c.rotate,d,e),h(b.skewX,c.skewX,d,e),i(b.scaleX,b.scaleY,c.scaleX,c.scaleY,d,e),b=c=null,function(a){for(var b,c=-1,f=e.length;++c=1?(d=1,b-1):Math.floor(d*b),f=a[e],g=a[e+1],h=e>0?a[e-1]:2*f-g,i=ef&&(e=b.slice(f,e),h[g]?h[g]+=e:h[++g]=e),(c=c[0])===(d=d[0])?h[g]?h[g]+=d:h[++g]=d:(h[++g]=null,i.push({i:g,x:H(c,d)})),f=K.lastIndex;return f=c?1:d(a)}}}function q(a){return function(b,c){var d=a(b=+b,c=+c);return function(a){return a<=0?b:a>=1?c:d(a)}}}function r(a,b,c,d){var e=a[0],f=a[1],g=b[0],h=b[1];return f2?s:r,g=h=null,e}function e(b){return(g||(g=f(i,j,l?p(a):a,k)))(+b)}var f,g,h,i=$,j=$,k=d.interpolate,l=!1;return e.invert=function(a){return(h||(h=f(j,i,o,l?q(b):b)))(+a)},e.domain=function(a){return arguments.length?(i=X.call(a,n),c()):i.slice()},e.range=function(a){return arguments.length?(j=Y.call(a),c()):j.slice()},e.rangeRound=function(a){return j=Y.call(a),k=d.interpolateRound,c()},e.clamp=function(a){return arguments.length?(l=!!a,c()):l},e.interpolate=function(a){return arguments.length?(k=a,c()):k},c()}function v(a,c,d){var f,g=a[0],h=a[a.length-1],i=b.tickStep(g,h,null==c?10:c);switch(d=e.formatSpecifier(null==d?",f":d),d.type){case"s":var j=Math.max(Math.abs(g),Math.abs(h));return null!=d.precision||isNaN(f=e.precisionPrefix(i,j))||(d.precision=f),e.formatPrefix(d,j);case"":case"e":case"g":case"p":case"r":null!=d.precision||isNaN(f=e.precisionRound(i,Math.max(Math.abs(g),Math.abs(h))))||(d.precision=f-("e"===d.type));break;case"f":case"%":null!=d.precision||isNaN(f=e.precisionFixed(i))||(d.precision=f-2*("%"===d.type))}return e.format(d)}function w(a){var c=a.domain;return a.ticks=function(a){var d=c();return b.ticks(d[0],d[d.length-1],null==a?10:a)},a.tickFormat=function(a,b){return v(c(),a,b)},a.nice=function(d){var e=c(),f=e.length-1,g=null==d?10:d,h=e[0],i=e[f],j=b.tickStep(h,i,g);return j&&(j=b.tickStep(Math.floor(h/j)*j,Math.ceil(i/j)*j,g),e[0]=Math.floor(h/j)*j,e[f]=Math.ceil(i/j)*j,c(e)),a},a}function x(){var a=u(o,d.interpolateNumber);return a.copy=function(){return t(a,x())},w(a)}function y(){function a(a){return+a}var b=[0,1];return a.invert=a,a.domain=a.range=function(c){return arguments.length?(b=X.call(c,n),a):b.slice()},a.copy=function(){return y().domain(b)},w(a)}function z(a,b){a=a.slice();var c,d=0,e=a.length-1,f=a[d],g=a[e];return g0){for(;nj)break;q.push(m)}}else for(;n=1;--l)if(!((m=k*l)j)break;q.push(m)}}else q=b.ticks(n,o,Math.min(o-n,p)).map(h);return c?q.reverse():q},c.tickFormat=function(a,b){if(null==b&&(b=10===f?".0e":","),"function"!=typeof b&&(b=e.format(b)),a===1/0)return b;null==a&&(a=10);var d=Math.max(1,f*a/c.ticks().length);return function(a){var c=a/h(Math.round(g(a)));return c*f0?f[b-1]:d[0],b=f?[g[f-1],e]:[g[b-1],g[b]]},a.copy=function(){return L().domain([d,e]).range(h)},w(a)}function M(){function a(a){if(a<=a)return d[b.bisect(c,a,0,e)]}var c=[.5],d=[0,1],e=1;return a.domain=function(b){return arguments.length?(c=Y.call(b),e=Math.min(c.length,d.length-1),a):c.slice()},a.range=function(b){return arguments.length?(d=Y.call(b),e=Math.min(c.length,d.length-1),a):d.slice()},a.invertExtent=function(a){var b=d.indexOf(a);return[c[b-1],c[b]]},a.copy=function(){return M().domain(c).range(d)},a}function N(a){return new Date(a)}function O(a){return a instanceof Date?+a:+new Date(+a)}function P(a,c,e,f,g,h,i,j,k){function l(b){return(i(b)1)&&(a-=Math.floor(a));var b=Math.abs(a-.5);return na.h=360*a-100,na.s=1.5-1.5*b,na.l=.8-.9*b,na+""}function U(a){var b=a.length;return function(c){return a[Math.max(0,Math.min(b-1,Math.floor(c*b)))]}}function V(a){function b(b){var f=(b-c)/(d-c);return a(e?Math.max(0,Math.min(1,f)):f)}var c=0,d=1,e=!1;return b.domain=function(a){return arguments.length?(c=+a[0],d=+a[1],b):[c,d]},b.clamp=function(a){return arguments.length?(e=!!a,b):e},b.interpolator=function(c){return arguments.length?(a=c,b):a},b.copy=function(){return V(a).domain([c,d]).clamp(e)},w(b)}var W=Array.prototype,X=W.map,Y=W.slice,Z={name:"implicit"},$=[0,1],_=1e3,aa=60*_,ba=60*aa,ca=24*ba,da=7*ca,ea=30*ca,fa=365*ca,ga=S("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ha=S("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),ia=S("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),ja=S("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),ka=d.interpolateCubehelixLong(h.cubehelix(300,.5,0),h.cubehelix(-240,.5,1)),la=d.interpolateCubehelixLong(h.cubehelix(-100,.75,.35),h.cubehelix(80,1.5,.8)),ma=d.interpolateCubehelixLong(h.cubehelix(260,.75,.35),h.cubehelix(80,1.5,.8)),na=h.cubehelix(),oa=U(S("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),pa=U(S("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),qa=U(S("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ra=U(S("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));a.scaleBand=j,a.scalePoint=l,a.scaleIdentity=y,a.scaleLinear=x,a.scaleLog=G,a.scaleOrdinal=i,a.scaleImplicit=Z,a.scalePow=I,a.scaleSqrt=J,a.scaleQuantile=K,a.scaleQuantize=L,a.scaleThreshold=M,a.scaleTime=Q,a.scaleUtc=R,a.schemeCategory10=ga,a.schemeCategory20b=ha,a.schemeCategory20c=ia,a.schemeCategory20=ja,a.interpolateCubehelixDefault=ka,a.interpolateRainbow=T,a.interpolateWarm=la,a.interpolateCool=ma,a.interpolateViridis=oa,a.interpolateMagma=pa,a.interpolateInferno=qa,a.interpolatePlasma=ra,a.scaleSequential=V,Object.defineProperty(a,"__esModule",{value:!0})})},{"d3-array":1,"d3-collection":2,"d3-color":3,"d3-format":5,"d3-interpolate":6,"d3-time":10,"d3-time-format":9}],8:[function(a,b,c){!function(a,d){"object"==typeof c&&void 0!==b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a){var b=a+="",c=b.indexOf(":");return c>=0&&"xmlns"!==(b=a.slice(0,c))&&(a=a.slice(c+1)),Qa.hasOwnProperty(b)?{space:Qa[b],local:a}:a}function c(a){return function(){var b=this.ownerDocument,c=this.namespaceURI;return c===Pa&&b.documentElement.namespaceURI===Pa?b.createElement(a):b.createElementNS(c,a)}}function d(a){return function(){return this.ownerDocument.createElementNS(a.space,a.local)}}function e(a){var e=b(a);return(e.local?d:c)(e)}function f(){return new g}function g(){this._="@"+(++Ra).toString(36)}function h(a,b,c){return a=i(a,b,c),function(b){var c=b.relatedTarget;c&&(c===this||8&c.compareDocumentPosition(this))||a.call(this,b)}}function i(b,c,d){return function(e){var f=a.event;a.event=e;try{b.call(this,this.__data__,c,d)}finally{a.event=f}}}function j(a){return a.trim().split(/^|\s+/).map(function(a){var b="",c=a.indexOf(".");return c>=0&&(b=a.slice(c+1),a=a.slice(0,c)),{type:a,name:b}})}function k(a){return function(){var b=this.__on;if(b){for(var c,d=0,e=-1,f=b.length;d=u&&(u=t+1);!(s=q[u])&&++u=0;)(d=e[f])&&(g&&g!==d.nextSibling&&g.parentNode.insertBefore(d,g),g=d);return this}function I(a){function b(b,c){return b&&c?a(b.__data__,c.__data__):!b-!c}a||(a=J);for(var c=this._groups,d=c.length,e=new Array(d),f=0;fb?1:a>=b?0:NaN}function K(){var a=arguments[0];return arguments[0]=this,a.apply(null,arguments),this}function L(){var a=new Array(this.size()),b=-1;return this.each(function(){a[++b]=this}),a}function M(){for(var a=this._groups,b=0,c=a.length;b1?this.each((null==b?Y:"function"==typeof b?$:Z)(a,b,null==c?"":c)):X(d=this.node()).getComputedStyle(d,null).getPropertyValue(a)}function aa(a){return function(){delete this[a]}}function ba(a,b){return function(){this[a]=b}}function ca(a,b){return function(){var c=b.apply(this,arguments);null==c?delete this[a]:this[a]=c}}function da(a,b){return arguments.length>1?this.each((null==b?aa:"function"==typeof b?ca:ba)(a,b)):this.node()[a]}function ea(a){return a.trim().split(/^|\s+/)}function fa(a){return a.classList||new ga(a)}function ga(a){this._node=a,this._names=ea(a.getAttribute("class")||"")}function ha(a,b){for(var c=fa(a),d=-1,e=b.length;++d=0&&(this._names.splice(b,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(a){return this._names.indexOf(a)>=0}};var Ya=[null];Ja.prototype=Ka.prototype={constructor:Ja,select:t,selectAll:w,filter:x,data:E,enter:z,exit:F,merge:G,order:H,sort:I,call:K,nodes:L,node:M,size:N,empty:O,each:P,attr:W,style:_,property:da,classed:ma,text:qa,html:ua,raise:wa,lower:ya,append:za,insert:Ba,remove:Da,datum:Ea,on:m,dispatch:Ia},a.creator=e,a.local=f,a.matcher=Va,a.mouse=q,a.namespace=b,a.namespaces=Qa,a.select=La,a.selectAll=Ma,a.selection=Ka,a.selector=s,a.selectorAll=v,a.touch=Na,a.touches=Oa,a.window=X,a.customEvent=n,Object.defineProperty(a,"__esModule",{value:!0})})},{}],9:[function(a,b,c){!function(d,e){"object"==typeof c&&void 0!==b?e(c,a("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-time"],e):e(d.d3=d.d3||{},d.d3)}(this,function(a,b){"use strict";function c(a){if(0<=a.y&&a.y<100){var b=new Date(-1,a.m,a.d,a.H,a.M,a.S,a.L);return b.setFullYear(a.y),b}return new Date(a.y,a.m,a.d,a.H,a.M,a.S,a.L)}function d(a){if(0<=a.y&&a.y<100){var b=new Date(Date.UTC(-1,a.m,a.d,a.H,a.M,a.S,a.L));return b.setUTCFullYear(a.y),b}return new Date(Date.UTC(a.y,a.m,a.d,a.H,a.M,a.S,a.L))}function e(a){return{y:a,m:0,d:1,H:0,M:0,S:0,L:0}}function f(a){function f(a,b){return function(c){var d,e,f,g=[],h=-1,i=0,j=a.length;for(c instanceof Date||(c=new Date(+c));++h53)return null;"w"in j||(j.w=1),"Z"in j?(g=d(e(j.y)),i=g.getUTCDay(),g=i>4||0===i?b.utcMonday.ceil(g):b.utcMonday(g),g=b.utcDay.offset(g,7*(j.V-1)),j.y=g.getUTCFullYear(),j.m=g.getUTCMonth(),j.d=g.getUTCDate()+(j.w+6)%7):(g=c(e(j.y)),i=g.getDay(), +g=i>4||0===i?b.timeMonday.ceil(g):b.timeMonday(g),g=b.timeDay.offset(g,7*(j.V-1)),j.y=g.getFullYear(),j.m=g.getMonth(),j.d=g.getDate()+(j.w+6)%7)}else("W"in j||"U"in j)&&("w"in j||(j.w="u"in j?j.u%7:"W"in j?1:0),i="Z"in j?d(e(j.y)).getUTCDay():c(e(j.y)).getDay(),j.m=0,j.d="W"in j?(j.w+6)%7+7*j.W-(i+5)%7:j.w+7*j.U-(i+6)%7);return"Z"in j?(j.H+=j.Z/100|0,j.M+=j.Z%100,d(j)):c(j)}}function h(a,b,c,d){for(var e,f,g=0,h=b.length,i=c.length;g=i)return-1;if(37===(e=b.charCodeAt(g++))){if(e=b.charAt(g++),!(f=Za[e in qa?b.charAt(g++):e])||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function ma(a,b,c){var d=Na.exec(b.slice(c));return d?(a.p=Oa[d[0].toLowerCase()],c+d[0].length):-1}function na(a,b,c){var d=Ra.exec(b.slice(c));return d?(a.w=Sa[d[0].toLowerCase()],c+d[0].length):-1}function oa(a,b,c){var d=Pa.exec(b.slice(c));return d?(a.w=Qa[d[0].toLowerCase()],c+d[0].length):-1}function pa(a,b,c){var d=Va.exec(b.slice(c));return d?(a.m=Wa[d[0].toLowerCase()],c+d[0].length):-1}function ra(a,b,c){var d=Ta.exec(b.slice(c));return d?(a.m=Ua[d[0].toLowerCase()],c+d[0].length):-1}function sa(a,b,c){return h(a,Fa,b,c)}function ta(a,b,c){return h(a,Ga,b,c)}function ua(a,b,c){return h(a,Ha,b,c)}function va(a){return Ka[a.getDay()]}function wa(a){return Ja[a.getDay()]}function xa(a){return Ma[a.getMonth()]}function ya(a){return La[a.getMonth()]}function za(a){return Ia[+(a.getHours()>=12)]}function Aa(a){return Ka[a.getUTCDay()]}function Ba(a){return Ja[a.getUTCDay()]}function Ca(a){return Ma[a.getUTCMonth()]}function Da(a){return La[a.getUTCMonth()]}function Ea(a){return Ia[+(a.getUTCHours()>=12)]}var Fa=a.dateTime,Ga=a.date,Ha=a.time,Ia=a.periods,Ja=a.days,Ka=a.shortDays,La=a.months,Ma=a.shortMonths,Na=i(Ia),Oa=j(Ia),Pa=i(Ja),Qa=j(Ja),Ra=i(Ka),Sa=j(Ka),Ta=i(La),Ua=j(La),Va=i(Ma),Wa=j(Ma),Xa={a:va,A:wa,b:xa,B:ya,c:null,d:D,e:D,f:I,H:E,I:F,j:G,L:H,m:J,M:K,p:za,Q:ka,s:la,S:L,u:M,U:N,V:O,w:P,W:Q,x:null,X:null,y:R,Y:S,Z:T,"%":ja},Ya={a:Aa,A:Ba,b:Ca,B:Da,c:null,d:U,e:U,f:Z,H:V,I:W,j:X,L:Y,m:$,M:_,p:Ea,Q:ka,s:la,S:aa,u:ba,U:ca,V:da,w:ea,W:fa,x:null,X:null,y:ga,Y:ha,Z:ia,"%":ja},Za={a:na,A:oa,b:pa,B:ra,c:sa,d:t,e:t,f:z,H:v,I:v,j:u,L:y,m:s,M:w,p:ma,Q:B,s:C,S:x,u:l,U:m,V:n,w:k,W:o,x:ta,X:ua,y:q,Y:p,Z:r,"%":A};return Xa.x=f(Ga,Xa),Xa.X=f(Ha,Xa),Xa.c=f(Fa,Xa),Ya.x=f(Ga,Ya),Ya.X=f(Ha,Ya),Ya.c=f(Fa,Ya),{format:function(a){var b=f(a+="",Xa);return b.toString=function(){return a},b},parse:function(a){var b=g(a+="",c);return b.toString=function(){return a},b},utcFormat:function(a){var b=f(a+="",Ya);return b.toString=function(){return a},b},utcParse:function(a){var b=g(a,d);return b.toString=function(){return a},b}}}function g(a,b,c){var d=a<0?"-":"",e=(d?-a:a)+"",f=e.length;return d+(f68?1900:2e3),c+d[0].length):-1}function r(a,b,c){var d=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(b.slice(c,c+6));return d?(a.Z=d[1]?0:-(d[2]+(d[3]||"00")),c+d[0].length):-1}function s(a,b,c){var d=ra.exec(b.slice(c,c+2));return d?(a.m=d[0]-1,c+d[0].length):-1}function t(a,b,c){var d=ra.exec(b.slice(c,c+2));return d?(a.d=+d[0],c+d[0].length):-1}function u(a,b,c){var d=ra.exec(b.slice(c,c+3));return d?(a.m=0,a.d=+d[0],c+d[0].length):-1}function v(a,b,c){var d=ra.exec(b.slice(c,c+2));return d?(a.H=+d[0],c+d[0].length):-1}function w(a,b,c){var d=ra.exec(b.slice(c,c+2));return d?(a.M=+d[0],c+d[0].length):-1}function x(a,b,c){var d=ra.exec(b.slice(c,c+2));return d?(a.S=+d[0],c+d[0].length):-1}function y(a,b,c){var d=ra.exec(b.slice(c,c+3));return d?(a.L=+d[0],c+d[0].length):-1}function z(a,b,c){var d=ra.exec(b.slice(c,c+6));return d?(a.L=Math.floor(d[0]/1e3),c+d[0].length):-1}function A(a,b,c){var d=sa.exec(b.slice(c,c+1));return d?c+d[0].length:-1}function B(a,b,c){var d=ra.exec(b.slice(c));return d?(a.Q=+d[0],c+d[0].length):-1}function C(a,b,c){var d=ra.exec(b.slice(c));return d?(a.Q=1e3*+d[0],c+d[0].length):-1}function D(a,b){return g(a.getDate(),b,2)}function E(a,b){return g(a.getHours(),b,2)}function F(a,b){return g(a.getHours()%12||12,b,2)}function G(a,c){return g(1+b.timeDay.count(b.timeYear(a),a),c,3)}function H(a,b){return g(a.getMilliseconds(),b,3)}function I(a,b){return H(a,b)+"000"}function J(a,b){return g(a.getMonth()+1,b,2)}function K(a,b){return g(a.getMinutes(),b,2)}function L(a,b){return g(a.getSeconds(),b,2)}function M(a){var b=a.getDay();return 0===b?7:b}function N(a,c){return g(b.timeSunday.count(b.timeYear(a),a),c,2)}function O(a,c){var d=a.getDay();return a=d>=4||0===d?b.timeThursday(a):b.timeThursday.ceil(a),g(b.timeThursday.count(b.timeYear(a),a)+(4===b.timeYear(a).getDay()),c,2)}function P(a){return a.getDay()}function Q(a,c){return g(b.timeMonday.count(b.timeYear(a),a),c,2)}function R(a,b){return g(a.getFullYear()%100,b,2)}function S(a,b){return g(a.getFullYear()%1e4,b,4)}function T(a){var b=a.getTimezoneOffset();return(b>0?"-":(b*=-1,"+"))+g(b/60|0,"0",2)+g(b%60,"0",2)}function U(a,b){return g(a.getUTCDate(),b,2)}function V(a,b){return g(a.getUTCHours(),b,2)}function W(a,b){return g(a.getUTCHours()%12||12,b,2)}function X(a,c){return g(1+b.utcDay.count(b.utcYear(a),a),c,3)}function Y(a,b){return g(a.getUTCMilliseconds(),b,3)}function Z(a,b){return Y(a,b)+"000"}function $(a,b){return g(a.getUTCMonth()+1,b,2)}function _(a,b){return g(a.getUTCMinutes(),b,2)}function aa(a,b){return g(a.getUTCSeconds(),b,2)}function ba(a){var b=a.getUTCDay();return 0===b?7:b}function ca(a,c){return g(b.utcSunday.count(b.utcYear(a),a),c,2)}function da(a,c){var d=a.getUTCDay();return a=d>=4||0===d?b.utcThursday(a):b.utcThursday.ceil(a),g(b.utcThursday.count(b.utcYear(a),a)+(4===b.utcYear(a).getUTCDay()),c,2)}function ea(a){return a.getUTCDay()}function fa(a,c){return g(b.utcMonday.count(b.utcYear(a),a),c,2)}function ga(a,b){return g(a.getUTCFullYear()%100,b,2)}function ha(a,b){return g(a.getUTCFullYear()%1e4,b,4)}function ia(){return"+0000"}function ja(){return"%"}function ka(a){return+a}function la(a){return Math.floor(+a/1e3)}function ma(b){return pa=f(b),a.timeFormat=pa.format,a.timeParse=pa.parse,a.utcFormat=pa.utcFormat,a.utcParse=pa.utcParse,pa}function na(a){return a.toISOString()}function oa(a){var b=new Date(a);return isNaN(b)?null:b}var pa,qa={"-":"",_:" ",0:"0"},ra=/^\s*\d+/,sa=/^%/,ta=/[\\^$*+?|[\]().{}]/g;ma({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var ua="%Y-%m-%dT%H:%M:%S.%LZ",va=Date.prototype.toISOString?na:a.utcFormat(ua),wa=+new Date("2000-01-01T00:00:00.000Z")?oa:a.utcParse(ua);a.timeFormatDefaultLocale=ma,a.timeFormatLocale=f,a.isoFormat=va,a.isoParse=wa,Object.defineProperty(a,"__esModule",{value:!0})})},{"d3-time":10}],10:[function(a,b,c){!function(a,d){"object"==typeof c&&void 0!==b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,c,d,g){function h(b){return a(b=new Date(+b)),b}return h.floor=h,h.ceil=function(b){return a(b=new Date(b-1)),c(b,1),a(b),b},h.round=function(a){var b=h(a),c=h.ceil(a);return a-b0))return f;do{f.push(new Date(+b))}while(c(b,e),a(b),b=b)for(;a(b),!d(b);)b.setTime(b-1)},function(a,b){if(a>=a)if(b<0)for(;++b<=0;)for(;c(a,-1),!d(a););else for(;--b>=0;)for(;c(a,1),!d(a););})},d&&(h.count=function(b,c){return e.setTime(+b),f.setTime(+c),a(e),a(f),Math.floor(d(e,f))},h.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?h.filter(g?function(b){return g(b)%a==0}:function(b){return h.count(0,b)%a==0}):h:null}),h}function c(a){return b(function(b){b.setDate(b.getDate()-(b.getDay()+7-a)%7),b.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+7*b)},function(a,b){return(b-a-(b.getTimezoneOffset()-a.getTimezoneOffset())*j)/m})}function d(a){return b(function(b){b.setUTCDate(b.getUTCDate()-(b.getUTCDay()+7-a)%7),b.setUTCHours(0,0,0,0)},function(a,b){a.setUTCDate(a.getUTCDate()+7*b)},function(a,b){return(b-a)/m})}var e=new Date,f=new Date,g=b(function(){},function(a,b){a.setTime(+a+b)},function(a,b){return b-a});g.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?b(function(b){b.setTime(Math.floor(b/a)*a)},function(b,c){b.setTime(+b+c*a)},function(b,c){return(c-b)/a}):g:null};var h=g.range,i=1e3,j=6e4,k=36e5,l=864e5,m=6048e5,n=b(function(a){a.setTime(Math.floor(a/i)*i)},function(a,b){a.setTime(+a+b*i)},function(a,b){return(b-a)/i},function(a){return a.getUTCSeconds()}),o=n.range,p=b(function(a){a.setTime(Math.floor(a/j)*j)},function(a,b){a.setTime(+a+b*j)},function(a,b){return(b-a)/j},function(a){return a.getMinutes()}),q=p.range,r=b(function(a){var b=a.getTimezoneOffset()*j%k;b<0&&(b+=k),a.setTime(Math.floor((+a-b)/k)*k+b)},function(a,b){a.setTime(+a+b*k)},function(a,b){return(b-a)/k},function(a){return a.getHours()}),s=r.range,t=b(function(a){a.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+b)},function(a,b){return(b-a-(b.getTimezoneOffset()-a.getTimezoneOffset())*j)/l},function(a){return a.getDate()-1}),u=t.range,v=c(0),w=c(1),x=c(2),y=c(3),z=c(4),A=c(5),B=c(6),C=v.range,D=w.range,E=x.range,F=y.range,G=z.range,H=A.range,I=B.range,J=b(function(a){a.setDate(1),a.setHours(0,0,0,0)},function(a,b){a.setMonth(a.getMonth()+b)},function(a,b){return b.getMonth()-a.getMonth()+12*(b.getFullYear()-a.getFullYear())},function(a){return a.getMonth()}),K=J.range,L=b(function(a){a.setMonth(0,1),a.setHours(0,0,0,0)},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a,b){return b.getFullYear()-a.getFullYear()},function(a){return a.getFullYear()});L.every=function(a){return isFinite(a=Math.floor(a))&&a>0?b(function(b){b.setFullYear(Math.floor(b.getFullYear()/a)*a),b.setMonth(0,1),b.setHours(0,0,0,0)},function(b,c){b.setFullYear(b.getFullYear()+c*a)}):null};var M=L.range,N=b(function(a){a.setUTCSeconds(0,0)},function(a,b){a.setTime(+a+b*j)},function(a,b){return(b-a)/j},function(a){return a.getUTCMinutes()}),O=N.range,P=b(function(a){a.setUTCMinutes(0,0,0)},function(a,b){a.setTime(+a+b*k)},function(a,b){return(b-a)/k},function(a){return a.getUTCHours()}),Q=P.range,R=b(function(a){a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCDate(a.getUTCDate()+b)},function(a,b){return(b-a)/l},function(a){return a.getUTCDate()-1}),S=R.range,T=d(0),U=d(1),V=d(2),W=d(3),X=d(4),Y=d(5),Z=d(6),$=T.range,_=U.range,aa=V.range,ba=W.range,ca=X.range,da=Y.range,ea=Z.range,fa=b(function(a){a.setUTCDate(1),a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCMonth(a.getUTCMonth()+b)},function(a,b){return b.getUTCMonth()-a.getUTCMonth()+12*(b.getUTCFullYear()-a.getUTCFullYear())},function(a){return a.getUTCMonth()}),ga=fa.range,ha=b(function(a){a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCFullYear(a.getUTCFullYear()+b)},function(a,b){return b.getUTCFullYear()-a.getUTCFullYear()},function(a){return a.getUTCFullYear()});ha.every=function(a){return isFinite(a=Math.floor(a))&&a>0?b(function(b){b.setUTCFullYear(Math.floor(b.getUTCFullYear()/a)*a),b.setUTCMonth(0,1),b.setUTCHours(0,0,0,0)},function(b,c){b.setUTCFullYear(b.getUTCFullYear()+c*a)}):null};var ia=ha.range;a.timeInterval=b,a.timeMillisecond=g,a.timeMilliseconds=h,a.utcMillisecond=g,a.utcMilliseconds=h,a.timeSecond=n,a.timeSeconds=o,a.utcSecond=n,a.utcSeconds=o,a.timeMinute=p,a.timeMinutes=q,a.timeHour=r,a.timeHours=s,a.timeDay=t,a.timeDays=u,a.timeWeek=v,a.timeWeeks=C,a.timeSunday=v,a.timeSundays=C,a.timeMonday=w,a.timeMondays=D,a.timeTuesday=x,a.timeTuesdays=E,a.timeWednesday=y,a.timeWednesdays=F,a.timeThursday=z,a.timeThursdays=G,a.timeFriday=A,a.timeFridays=H,a.timeSaturday=B,a.timeSaturdays=I,a.timeMonth=J,a.timeMonths=K,a.timeYear=L,a.timeYears=M,a.utcMinute=N,a.utcMinutes=O,a.utcHour=P,a.utcHours=Q,a.utcDay=R,a.utcDays=S,a.utcWeek=T,a.utcWeeks=$,a.utcSunday=T,a.utcSundays=$,a.utcMonday=U,a.utcMondays=_,a.utcTuesday=V,a.utcTuesdays=aa,a.utcWednesday=W,a.utcWednesdays=ba,a.utcThursday=X,a.utcThursdays=ca,a.utcFriday=Y,a.utcFridays=da,a.utcSaturday=Z,a.utcSaturdays=ea,a.utcMonth=fa,a.utcMonths=ga,a.utcYear=ha,a.utcYears=ia,Object.defineProperty(a,"__esModule",{value:!0})})},{}],11:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var h=g.default.d3_calcType(b,y,m,o,s,v);a.selectAll("g").data([b]).enter().append("g").attr("class",p+"legendCells"),n&&g.default.d3_filterCells(h,n);var i=a.select("."+p+"legendCells").selectAll("."+p+"cell").data(h.data),j=i.enter().append("g").attr("class",p+"cell");j.append(c).attr("class",p+"swatch");var C=a.selectAll("g."+p+"cell "+c);g.default.d3_addEvents(j,B),i.exit().transition().style("opacity",0).remove(),g.default.d3_drawShapes(c,C,e,d,f,z),g.default.d3_addText(a,j,h.labels,p,w),i=j.merge(i);var D=i.selectAll("text"),E=D.nodes().map(function(a){return a.getBBox()}),F=C.nodes().map(function(a){return a.getBBox()});q?C.attr("class",function(a){return p+"swatch "+h.feature(a)}):"line"==c?C.style("stroke",h.feature):C.style("fill",h.feature);var G=void 0,H=void 0,I="start"==u?0:"middle"==u?.5:1;if("vertical"===x){var J=E.map(function(a,b){return Math.max(a.height,F[b].height)});G=function(a,b){return"translate(0, "+((0,k.sum)(J.slice(0,b))+b*l)+")"},H=function(a,b){return"translate( "+(F[b].width+F[b].x+t)+", "+(F[b].y+F[b].height/2+5)+")"}}else"horizontal"===x&&(G=function(a,b){return"translate("+b*(F[b].width+l)+",0)"},H=function(a,b){return"translate("+(F[b].width*I+F[b].x)+",\n "+(F[b].height+F[b].y+t+8)+")"});g.default.d3_placement(x,i,G,D,H,u),g.default.d3_title(a,r,p,A),i.transition().style("opacity",1)}var b=(0,i.scaleLinear)(),c="rect",d=15,e=15,f=10,l=2,m=[5],n=void 0,o=[],p="",q=!1,r="",s=(0,j.format)(".01f"),t=10,u="middle",v="to",w=void 0,x="vertical",y=!1,z=void 0,A=void 0,B=(0,h.dispatch)("cellover","cellout","cellclick");return a.scale=function(c){return arguments.length?(b=c,a):b},a.cells=function(b){return arguments.length?((b.length>1||b>=2)&&(m=b),a):m},a.cellFilter=function(b){return arguments.length?(n=b,a):n},a.shape=function(b,d){return arguments.length?(("rect"==b||"circle"==b||"line"==b||"path"==b&&"string"==typeof d)&&(c=b,z=d),a):c},a.shapeWidth=function(b){return arguments.length?(d=+b,a):d},a.shapeHeight=function(b){return arguments.length?(e=+b,a):e},a.shapeRadius=function(b){return arguments.length?(f=+b,a):f},a.shapePadding=function(b){return arguments.length?(l=+b,a):l},a.labels=function(b){return arguments.length?(o=b,a):o},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(u=b),a):u},a.labelFormat=function(b){return arguments.length?(s="string"==typeof b?(0,j.format)(b):b,a):s},a.labelOffset=function(b){return arguments.length?(t=+b,a):t},a.labelDelimiter=function(b){return arguments.length?(v=b,a):v},a.labelWrap=function(b){return arguments.length?(w=b,a):w},a.useClass=function(b){return arguments.length?(!0!==b&&!1!==b||(q=b),a):q},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(x=b),a):x},a.ascending=function(b){return arguments.length?(y=!!b,a):y},a.classPrefix=function(b){return arguments.length?(p=b,a):p},a.title=function(b){return arguments.length?(r=b,a):r},a.titleWidth=function(b){return arguments.length?(A=b,a):A},a.textWrap=function(b){return arguments.length?(textWrap=b,a):textWrap},a.on=function(){var b=B.on.apply(B,arguments);return b===B?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":13,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],12:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=c.thresholdLabels=function(a){var b=a.i,c=a.genLength,d=a.generatedLabels;return 0===b?d[b].replace("NaN to","Less than"):b===c-1?"More than "+d[c-1].replace(" to NaN",""):d[b]};c.default={thresholdLabels:d}},{}],13:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=a("d3-selection"),f=function(a){return a},g=function(a){for(var b=[],c=0,d=a.length;cb&&f.length>1&&(f.pop(),i.text(f.join(" ")),f=[a],i=c.append("tspan").attr("x",0).attr("dy",g+h+"em").text(a))})},i=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],b=arguments[1],c=arguments[2],e=arguments[3];if("object"===(void 0===b?"undefined":d(b))){if(0===b.length)return a;for(var f=b.length;f1)d=b;else for(var e=a.domain(),f=(e[e.length-1]-e[0])/(b-1),g=0;g1||b>=2)&&(f=b),a):f},a.cellFilter=function(b){return arguments.length?(l=b,a):l},a.shape=function(b,d){return arguments.length?("rect"!=b&&"circle"!=b&&"line"!=b||(c=b,w=d),a):c},a.shapeWidth=function(b){return arguments.length?(d=+b,a):d},a.shapePadding=function(b){return arguments.length?(e=+b,a):e},a.labels=function(b){return arguments.length?(m=b,a):m},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(r=b),a):r},a.labelFormat=function(b){return arguments.length?(p="string"==typeof b?(0,j.format)(b):b,a):p},a.labelOffset=function(b){return arguments.length?(q=+b,a):q},a.labelDelimiter=function(b){return arguments.length?(s=b,a):s},a.labelWrap=function(b){return arguments.length?(t=b,a):t},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(u=b),a):u},a.ascending=function(b){return arguments.length?(v=!!b,a):v},a.classPrefix=function(b){return arguments.length?(n=b,a):n},a.title=function(b){return arguments.length?(o=b,a):o},a.titleWidth=function(b){return arguments.length?(x=b,a):x},a.on=function(){var b=y.on.apply(y,arguments);return b===y?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":13,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],15:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var h=g.default.d3_calcType(b,x,m,o,r,u),i=a.selectAll("g").data([b]);n&&g.default.d3_filterCells(h,n),i.enter().append("g").attr("class",p+"legendCells");var j=a.select("."+p+"legendCells").selectAll("."+p+"cell").data(h.data),A=j.enter().append("g").attr("class",p+"cell");A.append(c).attr("class",p+"swatch");var B=a.selectAll("g."+p+"cell "+c);g.default.d3_addEvents(A,z),j.exit().transition().style("opacity",0).remove(),g.default.d3_drawShapes(c,B,e,d,f,h.feature),g.default.d3_addText(a,A,h.labels,p,v),j=A.merge(j);var C=j.selectAll("text"),D=C.nodes().map(function(a){return a.getBBox()}),E=B.nodes().map(function(a){return a.getBBox()}),F=(0,k.max)(E,function(a){return a.height}),G=(0,k.max)(E,function(a){return a.width}),H=void 0,I=void 0,J="start"==s?0:"middle"==s?.5:1;if("vertical"===w){var K=D.map(function(a,b){return Math.max(F,a.height)});H=function(a,b){return"translate(0, "+((0,k.sum)(K.slice(0,b))+b*l)+" )"},I=function(a,b){return"translate( "+(G+t)+",\n "+(E[b].y+E[b].height/2+5)+")"}}else"horizontal"===w&&(H=function(a,b){return"translate( "+b*(G+l)+",0)"},I=function(a,b){return"translate( "+(E[b].width*J+E[b].x)+",\n "+(F+t)+")"});g.default.d3_placement(w,j,H,C,I,s),g.default.d3_title(a,q,p,y),j.transition().style("opacity",1)}var b=(0,i.scaleLinear)(),c="path",d=15,e=15,f=10,l=5,m=[5],n=void 0,o=[],p="",q="",r=(0,j.format)(".01f"),s="middle",t=10,u="to",v=void 0,w="vertical",x=!1,y=void 0,z=(0,h.dispatch)("cellover","cellout","cellclick");return a.scale=function(c){return arguments.length?(b=c,a):b},a.cells=function(b){return arguments.length?((b.length>1||b>=2)&&(m=b),a):m},a.cellFilter=function(b){return arguments.length?(n=b,a):n},a.shapePadding=function(b){return arguments.length?(l=+b,a):l},a.labels=function(b){return arguments.length?(o=b,a):o},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(s=b),a):s},a.labelFormat=function(b){return arguments.length?(r="string"==typeof b?(0,j.format)(b):b,a):r},a.labelOffset=function(b){return arguments.length?(t=+b,a):t},a.labelDelimiter=function(b){return arguments.length?(u=b,a):u},a.labelWrap=function(b){return arguments.length?(v=b,a):v},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(w=b),a):w},a.ascending=function(b){return arguments.length?(x=!!b,a):x},a.classPrefix=function(b){return arguments.length?(p=b,a):p},a.title=function(b){return arguments.length?(q=b,a):q},a.titleWidth=function(b){return arguments.length?(y=b,a):y},a.on=function(){var b=z.on.apply(z,arguments);return b===z?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":13,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],16:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}var e=a("./color"),f=d(e),g=a("./size"),h=d(g),i=a("./symbol"),j=d(i),k=a("./helpers"),l=d(k);d3.legendColor=f.default,d3.legendSize=h.default,d3.legendSymbol=j.default,d3.legendHelpers=l.default},{"./color":11,"./helpers":12,"./size":14,"./symbol":15}]},{},[16]); \ No newline at end of file diff --git a/docs/docs.min.js b/docs/docs.min.js index ba54a5e..44987fc 100644 --- a/docs/docs.min.js +++ b/docs/docs.min.js @@ -1,2 +1,2 @@ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g/g,">").replace(/"/g,""").replace(/'/g,"'")}function h(a){return a.replace(/&([#\w]+);/g,function(a,b){return b=b.toLowerCase(),"colon"===b?":":"#"===b.charAt(0)?"x"===b.charAt(1)?String.fromCharCode(parseInt(b.substring(2),16)):String.fromCharCode(+b.substring(1)):""})}function i(a,b){return a=a.source,b=b||"",function c(d,e){return d?(e=e.source||e,e=e.replace(/(^|[^\[])\^/g,"$1"),a=a.replace(d,e),c):new RegExp(a,b)}}function j(){}function k(a){for(var b,c,d=1;dAn error occured:

"+g(m.message+"",!0)+"
";throw m}}var m={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:j,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:j,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:j,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};m.bullet=/(?:[*+-]|\d+\.)/,m.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,m.item=i(m.item,"gm")(/bull/g,m.bullet)(),m.list=i(m.list)(/bull/g,m.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+m.def.source+")")(),m.blockquote=i(m.blockquote)("def",m.def)(),m._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",m.html=i(m.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,m._tag)(),m.paragraph=i(m.paragraph)("hr",m.hr)("heading",m.heading)("lheading",m.lheading)("blockquote",m.blockquote)("tag","<"+m._tag)("def",m.def)(),m.normal=k({},m),m.gfm=k({},m.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),m.gfm.paragraph=i(m.paragraph)("(?!","(?!"+m.gfm.fences.source.replace("\\1","\\2")+"|"+m.list.source.replace("\\1","\\3")+"|")(),m.tables=k({},m.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),a.rules=m,a.lex=function(b,c){var d=new a(c);return d.lex(b)},a.prototype.lex=function(a){return a=a.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(a,!0)},a.prototype.token=function(a,b,c){for(var d,e,f,g,h,i,j,k,l,a=a.replace(/^ +$/gm,"");a;)if((f=this.rules.newline.exec(a))&&(a=a.substring(f[0].length),f[0].length>1&&this.tokens.push({type:"space"})),f=this.rules.code.exec(a))a=a.substring(f[0].length),f=f[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?f:f.replace(/\n+$/,"")});else if(f=this.rules.fences.exec(a))a=a.substring(f[0].length),this.tokens.push({type:"code",lang:f[2],text:f[3]||""});else if(f=this.rules.heading.exec(a))a=a.substring(f[0].length),this.tokens.push({type:"heading",depth:f[1].length,text:f[2]});else if(b&&(f=this.rules.nptable.exec(a))){for(a=a.substring(f[0].length),i={type:"table",header:f[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:f[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:f[3].replace(/\n$/,"").split("\n")},k=0;k ?/gm,""),this.token(f,b,!0),this.tokens.push({type:"blockquote_end"});else if(f=this.rules.list.exec(a)){for(a=a.substring(f[0].length),g=f[2],this.tokens.push({type:"list_start",ordered:g.length>1}),f=f[0].match(this.rules.item),d=!1,l=f.length,k=0;k1&&h.length>1||(a=f.slice(k+1).join("\n")+a,k=l-1)),e=d||/\n\n(?!\s*$)/.test(i),k!==l-1&&(d="\n"===i.charAt(i.length-1),e||(e=d)),this.tokens.push({type:e?"loose_item_start":"list_item_start"}),this.token(i,!1,c),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(f=this.rules.html.exec(a))a=a.substring(f[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===f[1]||"script"===f[1]||"style"===f[1]),text:f[0]});else if(!c&&b&&(f=this.rules.def.exec(a)))a=a.substring(f[0].length),this.tokens.links[f[1].toLowerCase()]={href:f[2],title:f[3]};else if(b&&(f=this.rules.table.exec(a))){for(a=a.substring(f[0].length),i={type:"table",header:f[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:f[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:f[3].replace(/(?: *\| *)?\n$/,"").split("\n")},k=0;k])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:j,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:j,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,n.link=i(n.link)("inside",n._inside)("href",n._href)(),n.reflink=i(n.reflink)("inside",n._inside)(),n.normal=k({},n),n.pedantic=k({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),n.gfm=k({},n.normal,{escape:i(n.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:i(n.text)("]|","~]|")("|","|https?://|")()}),n.breaks=k({},n.gfm,{br:i(n.br)("{2,}","*")(),text:i(n.gfm.text)("{2,}","*")()}),d.rules=n,d.output=function(a,b,c){var e=new d(b,c);return e.output(a)},d.prototype.output=function(a){for(var b,c,d,e,f="";a;)if(e=this.rules.escape.exec(a))a=a.substring(e[0].length),f+=e[1];else if(e=this.rules.autolink.exec(a))a=a.substring(e[0].length),"@"===e[2]?(c=":"===e[1].charAt(6)?this.mangle(e[1].substring(7)):this.mangle(e[1]),d=this.mangle("mailto:")+c):(c=g(e[1]),d=c),f+=this.renderer.link(d,null,c);else if(this.inLink||!(e=this.rules.url.exec(a))){if(e=this.rules.tag.exec(a))!this.inLink&&/^/i.test(e[0])&&(this.inLink=!1),a=a.substring(e[0].length),f+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):g(e[0]):e[0];else if(e=this.rules.link.exec(a))a=a.substring(e[0].length),this.inLink=!0,f+=this.outputLink(e,{href:e[2],title:e[3]}),this.inLink=!1;else if((e=this.rules.reflink.exec(a))||(e=this.rules.nolink.exec(a))){if(a=a.substring(e[0].length),b=(e[2]||e[1]).replace(/\s+/g," "),b=this.links[b.toLowerCase()],!b||!b.href){f+=e[0].charAt(0),a=e[0].substring(1)+a;continue}this.inLink=!0,f+=this.outputLink(e,b),this.inLink=!1}else if(e=this.rules.strong.exec(a))a=a.substring(e[0].length),f+=this.renderer.strong(this.output(e[2]||e[1]));else if(e=this.rules.em.exec(a))a=a.substring(e[0].length),f+=this.renderer.em(this.output(e[2]||e[1]));else if(e=this.rules.code.exec(a))a=a.substring(e[0].length),f+=this.renderer.codespan(g(e[2],!0));else if(e=this.rules.br.exec(a))a=a.substring(e[0].length),f+=this.renderer.br();else if(e=this.rules.del.exec(a))a=a.substring(e[0].length),f+=this.renderer.del(this.output(e[1]));else if(e=this.rules.text.exec(a))a=a.substring(e[0].length),f+=this.renderer.text(g(this.smartypants(e[0])));else if(a)throw new Error("Infinite loop on byte: "+a.charCodeAt(0))}else a=a.substring(e[0].length), -c=g(e[1]),d=c,f+=this.renderer.link(d,null,c);return f},d.prototype.outputLink=function(a,b){var c=g(b.href),d=b.title?g(b.title):null;return"!"!==a[0].charAt(0)?this.renderer.link(c,d,this.output(a[1])):this.renderer.image(c,d,g(a[1]))},d.prototype.smartypants=function(a){return this.options.smartypants?a.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):a},d.prototype.mangle=function(a){if(!this.options.mangle)return a;for(var b,c="",d=a.length,e=0;e.5&&(b="x"+b.toString(16)),c+="&#"+b+";";return c},e.prototype.code=function(a,b,c){if(this.options.highlight){var d=this.options.highlight(a,b);null!=d&&d!==a&&(c=!0,a=d)}return b?'
'+(c?a:g(a,!0))+"\n
\n":"
"+(c?a:g(a,!0))+"\n
"},e.prototype.blockquote=function(a){return"
\n"+a+"
\n"},e.prototype.html=function(a){return a},e.prototype.heading=function(a,b,c){return"'+a+"\n"},e.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},e.prototype.list=function(a,b){var c=b?"ol":"ul";return"<"+c+">\n"+a+"\n"},e.prototype.listitem=function(a){return"
  • "+a+"
  • \n"},e.prototype.paragraph=function(a){return"

    "+a+"

    \n"},e.prototype.table=function(a,b){return"\n\n"+a+"\n\n"+b+"\n
    \n"},e.prototype.tablerow=function(a){return"\n"+a+"\n"},e.prototype.tablecell=function(a,b){var c=b.header?"th":"td",d=b.align?"<"+c+' style="text-align:'+b.align+'">':"<"+c+">";return d+a+"\n"},e.prototype.strong=function(a){return""+a+""},e.prototype.em=function(a){return""+a+""},e.prototype.codespan=function(a){return""+a+""},e.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},e.prototype.del=function(a){return""+a+""},e.prototype.link=function(a,b,c){if(this.options.sanitize){try{var d=decodeURIComponent(h(a)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===d.indexOf("javascript:")||0===d.indexOf("vbscript:"))return""}var f='
    "},e.prototype.image=function(a,b,c){var d=''+c+'":">"},e.prototype.text=function(a){return a},f.parse=function(a,b,c){var d=new f(b,c);return d.parse(a)},f.prototype.parse=function(a){this.inline=new d(a.links,this.options,this.renderer),this.tokens=a.reverse();for(var b="";this.next();)b+=this.tok();return b},f.prototype.next=function(){return this.token=this.tokens.pop()},f.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},f.prototype.parseText=function(){for(var a=this.token.text;"text"===this.peek().type;)a+="\n"+this.next().text;return this.inline.output(a)},f.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var a,b,c,d,e,f="",g="";for(c="",a=0;a/g,">").replace(/"/g,""").replace(/'/g,"'")}function h(a){return a.replace(/&([#\w]+);/g,function(a,b){return b=b.toLowerCase(),"colon"===b?":":"#"===b.charAt(0)?"x"===b.charAt(1)?String.fromCharCode(parseInt(b.substring(2),16)):String.fromCharCode(+b.substring(1)):""})}function i(a,b){return a=a.source,b=b||"",function c(d,e){return d?(e=e.source||e,e=e.replace(/(^|[^\[])\^/g,"$1"),a=a.replace(d,e),c):new RegExp(a,b)}}function j(){}function k(a){for(var b,c,d=1;dAn error occured:

    "+g(n.message+"",!0)+"
    ";throw n}}var m={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:j,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:j,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:j,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};m.bullet=/(?:[*+-]|\d+\.)/,m.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,m.item=i(m.item,"gm")(/bull/g,m.bullet)(),m.list=i(m.list)(/bull/g,m.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+m.def.source+")")(),m.blockquote=i(m.blockquote)("def",m.def)(),m._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",m.html=i(m.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,m._tag)(),m.paragraph=i(m.paragraph)("hr",m.hr)("heading",m.heading)("lheading",m.lheading)("blockquote",m.blockquote)("tag","<"+m._tag)("def",m.def)(),m.normal=k({},m),m.gfm=k({},m.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),m.gfm.paragraph=i(m.paragraph)("(?!","(?!"+m.gfm.fences.source.replace("\\1","\\2")+"|"+m.list.source.replace("\\1","\\3")+"|")(),m.tables=k({},m.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),a.rules=m,a.lex=function(b,c){return new a(c).lex(b)},a.prototype.lex=function(a){return a=a.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(a,!0)},a.prototype.token=function(a,b,c){for(var d,e,f,g,h,i,j,k,l,a=a.replace(/^ +$/gm,"");a;)if((f=this.rules.newline.exec(a))&&(a=a.substring(f[0].length),f[0].length>1&&this.tokens.push({type:"space"})),f=this.rules.code.exec(a))a=a.substring(f[0].length),f=f[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?f:f.replace(/\n+$/,"")});else if(f=this.rules.fences.exec(a))a=a.substring(f[0].length),this.tokens.push({type:"code",lang:f[2],text:f[3]||""});else if(f=this.rules.heading.exec(a))a=a.substring(f[0].length),this.tokens.push({type:"heading",depth:f[1].length,text:f[2]});else if(b&&(f=this.rules.nptable.exec(a))){for(a=a.substring(f[0].length),i={type:"table",header:f[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:f[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:f[3].replace(/\n$/,"").split("\n")},k=0;k ?/gm,""),this.token(f,b,!0),this.tokens.push({type:"blockquote_end"});else if(f=this.rules.list.exec(a)){for(a=a.substring(f[0].length),g=f[2],this.tokens.push({type:"list_start",ordered:g.length>1}),f=f[0].match(this.rules.item),d=!1,l=f.length,k=0;k1&&h.length>1||(a=f.slice(k+1).join("\n")+a,k=l-1)),e=d||/\n\n(?!\s*$)/.test(i),k!==l-1&&(d="\n"===i.charAt(i.length-1),e||(e=d)),this.tokens.push({type:e?"loose_item_start":"list_item_start"}),this.token(i,!1,c),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(f=this.rules.html.exec(a))a=a.substring(f[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===f[1]||"script"===f[1]||"style"===f[1]),text:f[0]});else if(!c&&b&&(f=this.rules.def.exec(a)))a=a.substring(f[0].length),this.tokens.links[f[1].toLowerCase()]={href:f[2],title:f[3]};else if(b&&(f=this.rules.table.exec(a))){for(a=a.substring(f[0].length),i={type:"table",header:f[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:f[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:f[3].replace(/(?: *\| *)?\n$/,"").split("\n")},k=0;k])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:j,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:j,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,n.link=i(n.link)("inside",n._inside)("href",n._href)(),n.reflink=i(n.reflink)("inside",n._inside)(),n.normal=k({},n),n.pedantic=k({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),n.gfm=k({},n.normal,{escape:i(n.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:i(n.text)("]|","~]|")("|","|https?://|")()}),n.breaks=k({},n.gfm,{br:i(n.br)("{2,}","*")(),text:i(n.gfm.text)("{2,}","*")()}),d.rules=n,d.output=function(a,b,c){return new d(b,c).output(a)},d.prototype.output=function(a){for(var b,c,d,e,f="";a;)if(e=this.rules.escape.exec(a))a=a.substring(e[0].length),f+=e[1];else if(e=this.rules.autolink.exec(a))a=a.substring(e[0].length),"@"===e[2]?(c=":"===e[1].charAt(6)?this.mangle(e[1].substring(7)):this.mangle(e[1]),d=this.mangle("mailto:")+c):(c=g(e[1]),d=c),f+=this.renderer.link(d,null,c);else if(this.inLink||!(e=this.rules.url.exec(a))){if(e=this.rules.tag.exec(a))!this.inLink&&/^
    /i.test(e[0])&&(this.inLink=!1),a=a.substring(e[0].length),f+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):g(e[0]):e[0];else if(e=this.rules.link.exec(a))a=a.substring(e[0].length),this.inLink=!0,f+=this.outputLink(e,{href:e[2],title:e[3]}),this.inLink=!1;else if((e=this.rules.reflink.exec(a))||(e=this.rules.nolink.exec(a))){if(a=a.substring(e[0].length),b=(e[2]||e[1]).replace(/\s+/g," "),!(b=this.links[b.toLowerCase()])||!b.href){f+=e[0].charAt(0),a=e[0].substring(1)+a;continue}this.inLink=!0,f+=this.outputLink(e,b),this.inLink=!1}else if(e=this.rules.strong.exec(a))a=a.substring(e[0].length),f+=this.renderer.strong(this.output(e[2]||e[1]));else if(e=this.rules.em.exec(a))a=a.substring(e[0].length),f+=this.renderer.em(this.output(e[2]||e[1]));else if(e=this.rules.code.exec(a))a=a.substring(e[0].length),f+=this.renderer.codespan(g(e[2],!0));else if(e=this.rules.br.exec(a))a=a.substring(e[0].length),f+=this.renderer.br();else if(e=this.rules.del.exec(a))a=a.substring(e[0].length),f+=this.renderer.del(this.output(e[1]));else if(e=this.rules.text.exec(a))a=a.substring(e[0].length),f+=this.renderer.text(g(this.smartypants(e[0])));else if(a)throw new Error("Infinite loop on byte: "+a.charCodeAt(0))}else a=a.substring(e[0].length),c=g(e[1]),d=c, +f+=this.renderer.link(d,null,c);return f},d.prototype.outputLink=function(a,b){var c=g(b.href),d=b.title?g(b.title):null;return"!"!==a[0].charAt(0)?this.renderer.link(c,d,this.output(a[1])):this.renderer.image(c,d,g(a[1]))},d.prototype.smartypants=function(a){return this.options.smartypants?a.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):a},d.prototype.mangle=function(a){if(!this.options.mangle)return a;for(var b,c="",d=a.length,e=0;e.5&&(b="x"+b.toString(16)),c+="&#"+b+";";return c},e.prototype.code=function(a,b,c){if(this.options.highlight){var d=this.options.highlight(a,b);null!=d&&d!==a&&(c=!0,a=d)}return b?'
    '+(c?a:g(a,!0))+"\n
    \n":"
    "+(c?a:g(a,!0))+"\n
    "},e.prototype.blockquote=function(a){return"
    \n"+a+"
    \n"},e.prototype.html=function(a){return a},e.prototype.heading=function(a,b,c){return"'+a+"\n"},e.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},e.prototype.list=function(a,b){var c=b?"ol":"ul";return"<"+c+">\n"+a+"\n"},e.prototype.listitem=function(a){return"
  • "+a+"
  • \n"},e.prototype.paragraph=function(a){return"

    "+a+"

    \n"},e.prototype.table=function(a,b){return"\n\n"+a+"\n\n"+b+"\n
    \n"},e.prototype.tablerow=function(a){return"\n"+a+"\n"},e.prototype.tablecell=function(a,b){var c=b.header?"th":"td";return(b.align?"<"+c+' style="text-align:'+b.align+'">':"<"+c+">")+a+"\n"},e.prototype.strong=function(a){return""+a+""},e.prototype.em=function(a){return""+a+""},e.prototype.codespan=function(a){return""+a+""},e.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},e.prototype.del=function(a){return""+a+""},e.prototype.link=function(a,b,c){if(this.options.sanitize){try{var d=decodeURIComponent(h(a)).replace(/[^\w:]/g,"").toLowerCase()}catch(f){return""}if(0===d.indexOf("javascript:")||0===d.indexOf("vbscript:"))return""}var e='
    "},e.prototype.image=function(a,b,c){var d=''+c+'":">"},e.prototype.text=function(a){return a},f.parse=function(a,b,c){return new f(b,c).parse(a)},f.prototype.parse=function(a){this.inline=new d(a.links,this.options,this.renderer),this.tokens=a.reverse();for(var b="";this.next();)b+=this.tok();return b},f.prototype.next=function(){return this.token=this.tokens.pop()},f.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},f.prototype.parseText=function(){for(var a=this.token.text;"text"===this.peek().type;)a+="\n"+this.next().text;return this.inline.output(a)},f.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var a,b,c,d,e="",f="";for(c="",a=0;a d\n\nconst d3_reverse = (arr) => {\n const mirror = [];\n for (let i = 0, l = arr.length; i < l; i++) {\n mirror[i] = arr[l-i-1];\n }\n return mirror;\n}\n\n//Text wrapping code adapted from Mike Bostock\nconst d3_textWrapping = (text, width) => {\n text.each(function() {\n var text = select(this),\n words = text.text().split(/\\s+/).reverse(),\n word,\n line = [],\n lineNumber = 0,\n lineHeight = 1.2, //ems\n y = text.attr(\"y\"),\n dy = parseFloat(text.attr(\"dy\")) || 0,\n tspan = text.text(null)\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", dy + \"em\");\n\n while (word = words.pop()) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node().getComputedTextLength() > width && line.length > 1) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", lineHeight + dy + \"em\").text(word);\n }\n }\n });\n}\n\n\nconst d3_mergeLabels = (gen=[], labels, domain, range) => {\n\n if (typeof labels === \"object\"){\n if(labels.length === 0) return gen;\n\n let i = labels.length;\n for (; i < gen.length; i++) {\n labels.push(gen[i]);\n }\n return labels;\n } else if (typeof labels === \"function\") {\n const customLabels = []\n const genLength = gen.length\n for (let i=0; i < genLength; i++){\n customLabels.push(labels({\n i,\n genLength,\n generatedLabels : gen,\n domain,\n range }))\n }\n return customLabels\n }\n\n return gen;\n }\n\nconst d3_linearLegend = (scale, cells, labelFormat) => {\n let data = [];\n\n if (cells.length > 1){\n data = cells;\n\n } else {\n const domain = scale.domain(),\n increment = (domain[domain.length - 1] - domain[0])/(cells - 1)\n let i = 0;\n\n for (; i < cells; i++){\n data.push(domain[0] + i*increment);\n }\n }\n\n const labels = data.map(labelFormat);\n return {data: data,\n labels: labels,\n feature: d => scale(d)};\n}\n\nconst d3_quantLegend = (scale, labelFormat, labelDelimiter) => {\n const labels = scale.range().map( d => {\n const invert = scale.invertExtent(d);\n return labelFormat(invert[0]) + \" \" + labelDelimiter + \" \" + labelFormat(invert[1]);\n });\n\n return {data: scale.range(),\n labels: labels,\n feature: d3_identity\n };\n}\n\nconst d3_ordinalLegend= scale => ({data: scale.domain(),\n labels: scale.domain(),\n feature: d => scale(d) }\n)\n\nconst d3_cellOver = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellover\", obj, d);\n}\n\nconst d3_cellOut = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellout\", obj, d);\n}\n\nconst d3_cellClick = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellclick\", obj, d);\n}\n\n\nexport default {\n\n d3_drawShapes: (shape, shapes, shapeHeight, shapeWidth, shapeRadius, path) => {\n if (shape === \"rect\"){\n shapes.attr(\"height\", shapeHeight)\n .attr(\"width\", shapeWidth);\n\n } else if (shape === \"circle\") {\n shapes.attr(\"r\", shapeRadius)\n\n } else if (shape === \"line\") {\n shapes.attr(\"x1\", 0).attr(\"x2\", shapeWidth).attr(\"y1\", 0).attr(\"y2\", 0);\n\n } else if (shape === \"path\") {\n shapes.attr(\"d\", path);\n }\n },\n\n d3_addText: function (svg, enter, labels, classPrefix, labelWidth){\n enter.append(\"text\").attr(\"class\", classPrefix + \"label\");\n const text = svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .data(labels)\n .text(d3_identity);\n\n if (labelWidth){\n svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .call(d3_textWrapping, labelWidth)\n }\n\n return text\n },\n\n d3_calcType: function (scale, ascending, cells, labels, labelFormat, labelDelimiter){\n const type = scale.invertExtent ?\n d3_quantLegend(scale, labelFormat, labelDelimiter) : scale.ticks ?\n d3_linearLegend(scale, cells, labelFormat) : d3_ordinalLegend(scale);\n\n //for d3.scaleSequential that doesn't have a range function\n const range = scale.range && scale.range() || scale.domain() \n type.labels = d3_mergeLabels(type.labels, labels, scale.domain(), range);\n\n if (ascending) {\n type.labels = d3_reverse(type.labels);\n type.data = d3_reverse(type.data);\n }\n\n return type;\n },\n\n d3_filterCells: (type, cellFilter) => {\n let filterCells = type.data.map((d, i) => ({ data: d, label: type.labels[i] }))\n .filter(cellFilter)\n const dataValues = filterCells.map(d => d.data)\n const labelValues = filterCells.map(d => d.label)\n type.data = type.data.filter(d => dataValues.indexOf(d) !== -1)\n type.labels = type.labels.filter(d => labelValues.indexOf(d) !== -1)\n return type\n },\n\n d3_placement: (orient, cell, cellTrans, text, textTrans, labelAlign) => {\n cell.attr(\"transform\", cellTrans);\n text.attr(\"transform\", textTrans);\n if (orient === \"horizontal\"){\n text.style(\"text-anchor\", labelAlign);\n }\n },\n\n d3_addEvents: function(cells, dispatcher){\n cells.on(\"mouseover.legend\", function (d) { d3_cellOver(dispatcher, d, this); })\n .on(\"mouseout.legend\", function (d) { d3_cellOut(dispatcher, d, this); })\n .on(\"click.legend\", function (d) { d3_cellClick(dispatcher, d, this); });\n },\n\n d3_title: (svg, title, classPrefix, titleWidth) => {\n if (title !== \"\"){\n\n const titleText = svg.selectAll('text.' + classPrefix + 'legendTitle');\n\n titleText.data([title])\n .enter()\n .append('text')\n .attr('class', classPrefix + 'legendTitle');\n\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .text(title)\n\n if (titleWidth){\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .call(d3_textWrapping, titleWidth)\n }\n\n const cellsSvg = svg.select('.' + classPrefix + 'legendCells')\n const yOffset = svg.select('.' + classPrefix + 'legendTitle').nodes()\n .map(d => d.getBBox().height)[0],\n\n xOffset = -cellsSvg.nodes().map(function(d) { return d.getBBox().x})[0];\n cellsSvg.attr('transform', 'translate(' + xOffset + ',' + (yOffset) + ')');\n\n }\n }\n}\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { sum } from 'd3-array';\n\nexport default function color(){\n\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n useClass = false,\n title = \"\",\n labelFormat = format(\".01f\"),\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = \"to\",\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg) {\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n \n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n \n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n const shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n cell.exit().transition().style(\"opacity\", 0).remove();\n\n helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, path);\n helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n // sets placement\n const text = cell.selectAll(\"text\"),\n textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map( d => d.getBBox());\n //sets scale\n //everything is fill except for line which is stroke,\n if (!useClass){\n if (shape == \"line\"){\n shapes.style(\"stroke\", type.feature);\n } else {\n shapes.style(\"fill\", type.feature);\n }\n } else {\n shapes.attr(\"class\", d => `${classPrefix}swatch ${type.feature(d)}`);\n }\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(d.height, shapeSize[i].height))\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i));\n return `translate(0, ${height + i*shapePadding})`}\n\n textTrans = (d,i) => `translate( ${(shapeSize[i].width + shapeSize[i].x +\n labelOffset)}, ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => `translate(${(i * (shapeSize[i].width + shapePadding))},0)`\n textTrans = (d,i) => `translate(${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(shapeSize[i].height + shapeSize[i].y + labelOffset + 8)})`;\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n\n cell.transition().style(\"opacity\", 1);\n\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape;\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\" || (_ == \"path\" && (typeof d === 'string')) ){\n shape = _;\n path = d;\n }\n return legend;\n };\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth;\n shapeWidth = +_;\n return legend;\n };\n\n legend.shapeHeight = function(_) {\n if (!arguments.length) return shapeHeight;\n shapeHeight = +_;\n return legend;\n };\n\n legend.shapeRadius = function(_) {\n if (!arguments.length) return shapeRadius;\n shapeRadius = +_;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return labelFormat;\n labelFormat = typeof(_) === 'string' ? format(_) : _;\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.useClass = function(_) {\n if (!arguments.length) return useClass;\n if (_ === true || _ === false){\n useClass = _;\n }\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.textWrap = function(_) {\n if (!arguments.length) return textWrap;\n textWrap = _;\n return legend;\n }\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { sum, max } from 'd3-array';\n\nexport default function size(){\n\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n labelFormat = format(\".01f\"),\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = \"to\",\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg){\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n\n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n const shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n cell.exit().transition().style(\"opacity\", 0).remove();\n\n //creates shape\n if (shape === \"line\"){\n helper.d3_drawShapes(shape, shapes, 0, shapeWidth);\n shapes.attr(\"stroke-width\", type.feature);\n } else {\n helper.d3_drawShapes(shape, shapes, type.feature, type.feature, type.feature, path);\n }\n\n const text = helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n //sets placement\n\n const textSize = text.nodes().map( d => d.getBBox()),\n shapeSize = shapes.nodes().map(\n (d, i) => {\n const bbox = d.getBBox()\n const stroke = scale(type.data[i]);\n\n if (shape === \"line\" && orient === \"horizontal\") {\n bbox.height = bbox.height + stroke;\n } else if (shape === \"line\" && orient === \"vertical\"){\n bbox.width = bbox.width;\n }\n return bbox;\n });\n //console.log('SHAPESIZE')\n const maxH = max(shapeSize, d => d.height + d.y),\n maxW = max(shapeSize, d => d.width + d.x);\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(d.height, shapeSize[i].height))\n const y = shape == \"circle\" || shape == \"line\" ? shapeSize[0].height/2 : 0\n cellTrans = (d,i) => {\n const height = sum(cellSize.slice(0, i));\n \n return `translate(0, ${(y + height + i*shapePadding)})`};\n\n textTrans = (d,i) => `translate( ${(maxW + labelOffset)},\n ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => {\n const width = sum(shapeSize.slice(0, i), d => d.width);\n const y = shape == \"circle\" || shape == \"line\" ? maxH/2 : 0\n return `translate(${(width + i*shapePadding)}, ${y})`; };\n\n textTrans = (d,i) => {\n return `translate( ${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(maxH + labelOffset )})`};\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n\n cell.transition().style(\"opacity\", 1);\n\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n \n legend.shape = function(_, d) {\n if (!arguments.length) return shape;\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\" ){\n shape = _;\n path = d;\n }\n return legend;\n };\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth;\n shapeWidth = +_;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return labelFormat;\n labelFormat = typeof(_) === 'string' ? format(_) : _;\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { sum, max } from 'd3-array';\n\nexport default function symbol(){\n\n let scale = scaleLinear(),\n shape = \"path\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 5,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n labelFormat = format(\".01f\"),\n labelAlign = \"middle\",\n labelOffset = 10,\n labelDelimiter = \"to\",\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg){\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n\n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n const shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n //remove old shapes\n cell.exit().transition().style(\"opacity\", 0).remove();\n\n helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, type.feature);\n helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n // sets placement\n const text = cell.selectAll(\"text\"),\n textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map( d => d.getBBox());\n\n const maxH = max(shapeSize, d => d.height),\n maxW = max(shapeSize, d => d.width);\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(maxH, d.height))\n\n cellTrans = (d,i) => {\n const height = sum(cellSize.slice(0, i));\n return `translate(0, ${(height + (i *shapePadding))} )`};\n textTrans = (d,i) => `translate( ${(maxW + labelOffset)},\n ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => `translate( ${(i * (maxW + shapePadding))},0)`;\n textTrans = (d,i) => `translate( ${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(maxH + labelOffset )})`;\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n cell.transition().style(\"opacity\", 1);\n\n }\n\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n \n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return labelFormat;\n labelFormat = typeof(_) === 'string' ? format(_) : _;\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","export const thresholdLabels = function({ i, genLength, generatedLabels }){\n\n if (i === 0 ){\n return generatedLabels[i].replace('NaN to', 'Less than')\n } else if (i === genLength - 1) {\n return `More than ${generatedLabels[genLength - 1].replace(' to NaN', '')}`\n }\n return generatedLabels[i]\n}\n\nexport default {\n thresholdLabels\n}\n","import legendColor from './src/color'\nimport legendSize from './src/size'\nimport legendSymbol from './src/symbol'\nimport legendHelpers from './src/helpers'\n\nexport { legendColor, legendSize, legendSymbol, legendHelpers }\n\nexport default {\n legendColor,\n legendSize,\n legendSymbol,\n legendHelpers\n};\n"],"names":["d3_identity","d","d3_reverse","arr","mirror","i","l","length","d3_textWrapping","text","width","each","select","words","split","reverse","word","line","lineNumber","lineHeight","attr","dy","parseFloat","tspan","append","pop","push","join","node","getComputedTextLength","d3_mergeLabels","gen","labels","domain","range","customLabels","genLength","d3_linearLegend","scale","cells","labelFormat","data","increment","map","d3_quantLegend","labelDelimiter","invert","invertExtent","d3_ordinalLegend","d3_cellOver","cellDispatcher","obj","call","d3_cellOut","d3_cellClick","shape","shapes","shapeHeight","shapeWidth","shapeRadius","path","svg","enter","classPrefix","labelWidth","selectAll","ascending","type","ticks","cellFilter","filterCells","label","filter","dataValues","labelValues","indexOf","orient","cell","cellTrans","textTrans","labelAlign","style","dispatcher","on","title","titleWidth","titleText","cellsSvg","yOffset","nodes","getBBox","height","xOffset","x","color","scaleLinear","shapePadding","useClass","format","labelOffset","labelWrap","legendDispatcher","dispatch","legend","helper","d3_calcType","legendG","d3_filterCells","cellEnter","d3_addEvents","exit","transition","remove","d3_drawShapes","d3_addText","merge","textSize","shapeSize","feature","textAlign","cellSize","Math","max","sum","slice","y","d3_placement","d3_title","_","arguments","toLowerCase","textWrap","value","apply","size","bbox","stroke","maxH","maxW","symbol","thresholdLabels","generatedLabels","replace"],"mappings":";;;;;;;;;;;;AAEA,IAAMA,cAAe,SAAfA,WAAe,CAACC,CAAD;SAAOA,CAAP;CAArB;;AAEA,IAAMC,aAAa,SAAbA,UAAa,CAACC,GAAD,EAAS;MACpBC,SAAS,EAAf;OACK,IAAIC,IAAI,CAAR,EAAWC,IAAIH,IAAII,MAAxB,EAAgCF,IAAIC,CAApC,EAAuCD,GAAvC,EAA4C;WACnCA,CAAP,IAAYF,IAAIG,IAAED,CAAF,GAAI,CAAR,CAAZ;;SAEKD,MAAP;CALF;;;AASA,IAAMI,kBAAkB,SAAlBA,eAAkB,CAACC,IAAD,EAAOC,KAAP,EAAiB;OAClCC,IAAL,CAAU,YAAW;QACfF,OAAOG,mBAAO,IAAP,CAAX;QACIC,QAAQJ,KAAKA,IAAL,GAAYK,KAAZ,CAAkB,KAAlB,EAAyBC,OAAzB,EADZ;QAEIC,IAFJ;QAGIC,OAAO,EAHX;QAIIC,aAAa,CAJjB;QAKIC,aAAa,GALjB;;QAMQV,KAAKW,IAAL,CAAU,GAAV,CANR;QAOIC,KAAKC,WAAWb,KAAKW,IAAL,CAAU,IAAV,CAAX,KAA+B,CAPxC;QAQIG,QAAQd,KAAKA,IAAL,CAAU,IAAV,EACLe,MADK,CACE,OADF,EAEL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;kBACTiE,CAAd;WACOzB,MAAP;GAHF;;SAMOnB,KAAP,GAAe,UAAS4C,CAAT,EAAY;QACrB,CAACC,UAAU1H,MAAf,EAAuB,OAAO6E,KAAP;YACf4C,CAAR;WACOzB,MAAP;GAHF;;SAMOlB,UAAP,GAAoB,UAAS2C,CAAT,EAAY;QAC1B,CAACC,UAAU1H,MAAf,EAAuB,OAAO8E,UAAP;iBACV2C,CAAb;WACOzB,MAAP;GAHF;;SAMOpB,EAAP,GAAY,YAAU;QACdiD,QAAQ/B,iBAAiBlB,EAAjB,CAAoBkD,KAApB,CAA0BhC,gBAA1B,EAA4C4B,SAA5C,CAAd;WACOG,UAAU/B,gBAAV,GAA6BE,MAA7B,GAAsC6B,KAA7C;GAFF;;SAKO7B,MAAP;;;ACrMK,IAAMqC,kBAAkB,SAAlBA,eAAkB,OAA2C;MAAhCvI,CAAgC,QAAhCA,CAAgC;MAA7B+B,SAA6B,QAA7BA,SAA6B;MAAlByG,eAAkB,QAAlBA,eAAkB;;;MAEpExI,MAAM,CAAV,EAAa;WACJwI,gBAAgBxI,CAAhB,EAAmByI,OAAnB,CAA2B,QAA3B,EAAqC,WAArC,CAAP;GADF,MAEO,IAAIzI,MAAM+B,YAAY,CAAtB,EAAyB;0BACVyG,gBAAgBzG,YAAY,CAA5B,EAA+B0G,OAA/B,CAAuC,SAAvC,EAAkD,EAAlD,CAApB;;SAEKD,gBAAgBxI,CAAhB,CAAP;CAPK;;AAUP,oBAAe;;CAAf;;ACHA,YAAe;oBAAA;kBAAA;sBAAA;;CAAf;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"indexRollup.js","sources":["src/legend.js","src/color.js","src/size.js","src/symbol.js","src/helpers.js","index.js"],"sourcesContent":["import { select } from 'd3-selection'\n\nconst d3_identity = (d) => d\n\nconst d3_reverse = (arr) => {\n const mirror = [];\n for (let i = 0, l = arr.length; i < l; i++) {\n mirror[i] = arr[l-i-1];\n }\n return mirror;\n}\n\n//Text wrapping code adapted from Mike Bostock\nconst d3_textWrapping = (text, width) => {\n text.each(function() {\n var text = select(this),\n words = text.text().split(/\\s+/).reverse(),\n word,\n line = [],\n lineNumber = 0,\n lineHeight = 1.2, //ems\n y = text.attr(\"y\"),\n dy = parseFloat(text.attr(\"dy\")) || 0,\n tspan = text.text(null)\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", dy + \"em\");\n\n while (word = words.pop()) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node().getComputedTextLength() > width && line.length > 1) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", lineHeight + dy + \"em\").text(word);\n }\n }\n });\n}\n\n\nconst d3_mergeLabels = (gen=[], labels, domain, range) => {\n\n if (typeof labels === \"object\"){\n if(labels.length === 0) return gen;\n\n let i = labels.length;\n for (; i < gen.length; i++) {\n labels.push(gen[i]);\n }\n return labels;\n } else if (typeof labels === \"function\") {\n const customLabels = []\n const genLength = gen.length\n for (let i=0; i < genLength; i++){\n customLabels.push(labels({\n i,\n genLength,\n generatedLabels : gen,\n domain,\n range }))\n }\n return customLabels\n }\n\n return gen;\n }\n\nconst d3_linearLegend = (scale, cells, labelFormat) => {\n let data = [];\n\n if (cells.length > 1){\n data = cells;\n\n } else {\n const domain = scale.domain(),\n increment = (domain[domain.length - 1] - domain[0])/(cells - 1)\n let i = 0;\n\n for (; i < cells; i++){\n data.push(domain[0] + i*increment);\n }\n }\n\n const labels = data.map(labelFormat);\n return {data: data,\n labels: labels,\n feature: d => scale(d)};\n}\n\nconst d3_quantLegend = (scale, labelFormat, labelDelimiter) => {\n const labels = scale.range().map( d => {\n const invert = scale.invertExtent(d);\n return labelFormat(invert[0]) + \" \" + labelDelimiter + \" \" + labelFormat(invert[1]);\n });\n\n return {data: scale.range(),\n labels: labels,\n feature: d3_identity\n };\n}\n\nconst d3_ordinalLegend= scale => ({data: scale.domain(),\n labels: scale.domain(),\n feature: d => scale(d) }\n)\n\nconst d3_cellOver = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellover\", obj, d);\n}\n\nconst d3_cellOut = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellout\", obj, d);\n}\n\nconst d3_cellClick = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellclick\", obj, d);\n}\n\n\nexport default {\n\n d3_drawShapes: (shape, shapes, shapeHeight, shapeWidth, shapeRadius, path) => {\n if (shape === \"rect\"){\n shapes.attr(\"height\", shapeHeight)\n .attr(\"width\", shapeWidth);\n\n } else if (shape === \"circle\") {\n shapes.attr(\"r\", shapeRadius)\n\n } else if (shape === \"line\") {\n shapes.attr(\"x1\", 0).attr(\"x2\", shapeWidth).attr(\"y1\", 0).attr(\"y2\", 0);\n\n } else if (shape === \"path\") {\n shapes.attr(\"d\", path);\n }\n },\n\n d3_addText: function (svg, enter, labels, classPrefix, labelWidth){\n enter.append(\"text\").attr(\"class\", classPrefix + \"label\");\n const text = svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .data(labels)\n .text(d3_identity);\n\n if (labelWidth){\n svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .call(d3_textWrapping, labelWidth)\n }\n\n return text\n },\n\n d3_calcType: function (scale, ascending, cells, labels, labelFormat, labelDelimiter){\n const type = scale.invertExtent ?\n d3_quantLegend(scale, labelFormat, labelDelimiter) : scale.ticks ?\n d3_linearLegend(scale, cells, labelFormat) : d3_ordinalLegend(scale);\n\n //for d3.scaleSequential that doesn't have a range function\n const range = scale.range && scale.range() || scale.domain() \n type.labels = d3_mergeLabels(type.labels, labels, scale.domain(), range);\n\n if (ascending) {\n type.labels = d3_reverse(type.labels);\n type.data = d3_reverse(type.data);\n }\n\n return type;\n },\n\n d3_filterCells: (type, cellFilter) => {\n let filterCells = type.data.map((d, i) => ({ data: d, label: type.labels[i] }))\n .filter(cellFilter)\n const dataValues = filterCells.map(d => d.data)\n const labelValues = filterCells.map(d => d.label)\n type.data = type.data.filter(d => dataValues.indexOf(d) !== -1)\n type.labels = type.labels.filter(d => labelValues.indexOf(d) !== -1)\n return type\n },\n\n d3_placement: (orient, cell, cellTrans, text, textTrans, labelAlign) => {\n cell.attr(\"transform\", cellTrans);\n text.attr(\"transform\", textTrans);\n if (orient === \"horizontal\"){\n text.style(\"text-anchor\", labelAlign);\n }\n },\n\n d3_addEvents: function(cells, dispatcher){\n cells.on(\"mouseover.legend\", function (d) { d3_cellOver(dispatcher, d, this); })\n .on(\"mouseout.legend\", function (d) { d3_cellOut(dispatcher, d, this); })\n .on(\"click.legend\", function (d) { d3_cellClick(dispatcher, d, this); });\n },\n\n d3_title: (svg, title, classPrefix, titleWidth) => {\n if (title !== \"\"){\n\n const titleText = svg.selectAll('text.' + classPrefix + 'legendTitle');\n\n titleText.data([title])\n .enter()\n .append('text')\n .attr('class', classPrefix + 'legendTitle');\n\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .text(title)\n\n if (titleWidth){\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .call(d3_textWrapping, titleWidth)\n }\n\n const cellsSvg = svg.select('.' + classPrefix + 'legendCells')\n const yOffset = svg.select('.' + classPrefix + 'legendTitle').nodes()\n .map(d => d.getBBox().height)[0],\n\n xOffset = -cellsSvg.nodes().map(function(d) { return d.getBBox().x})[0];\n cellsSvg.attr('transform', 'translate(' + xOffset + ',' + (yOffset) + ')');\n\n }\n }\n}\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { sum } from 'd3-array';\n\nexport default function color(){\n\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n useClass = false,\n title = \"\",\n labelFormat = format(\".01f\"),\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = \"to\",\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg) {\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n \n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n \n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n const shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n cell.exit().transition().style(\"opacity\", 0).remove();\n\n helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, path);\n helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n // sets placement\n const text = cell.selectAll(\"text\"),\n textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map( d => d.getBBox());\n //sets scale\n //everything is fill except for line which is stroke,\n if (!useClass){\n if (shape == \"line\"){\n shapes.style(\"stroke\", type.feature);\n } else {\n shapes.style(\"fill\", type.feature);\n }\n } else {\n shapes.attr(\"class\", d => `${classPrefix}swatch ${type.feature(d)}`);\n }\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(d.height, shapeSize[i].height))\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i));\n return `translate(0, ${height + i*shapePadding})`}\n\n textTrans = (d,i) => `translate( ${(shapeSize[i].width + shapeSize[i].x +\n labelOffset)}, ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => `translate(${(i * (shapeSize[i].width + shapePadding))},0)`\n textTrans = (d,i) => `translate(${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(shapeSize[i].height + shapeSize[i].y + labelOffset + 8)})`;\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n\n cell.transition().style(\"opacity\", 1);\n\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape;\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\" || (_ == \"path\" && (typeof d === 'string')) ){\n shape = _;\n path = d;\n }\n return legend;\n };\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth;\n shapeWidth = +_;\n return legend;\n };\n\n legend.shapeHeight = function(_) {\n if (!arguments.length) return shapeHeight;\n shapeHeight = +_;\n return legend;\n };\n\n legend.shapeRadius = function(_) {\n if (!arguments.length) return shapeRadius;\n shapeRadius = +_;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return labelFormat;\n labelFormat = typeof(_) === 'string' ? format(_) : _;\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.useClass = function(_) {\n if (!arguments.length) return useClass;\n if (_ === true || _ === false){\n useClass = _;\n }\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.textWrap = function(_) {\n if (!arguments.length) return textWrap;\n textWrap = _;\n return legend;\n }\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { sum, max } from 'd3-array';\n\nexport default function size(){\n\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n labelFormat = format(\".01f\"),\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = \"to\",\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg){\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n\n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n const shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n cell.exit().transition().style(\"opacity\", 0).remove();\n\n //creates shape\n if (shape === \"line\"){\n helper.d3_drawShapes(shape, shapes, 0, shapeWidth);\n shapes.attr(\"stroke-width\", type.feature);\n } else {\n helper.d3_drawShapes(shape, shapes, type.feature, type.feature, type.feature, path);\n }\n\n const text = helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n //sets placement\n\n const textSize = text.nodes().map( d => d.getBBox()),\n shapeSize = shapes.nodes().map(\n (d, i) => {\n const bbox = d.getBBox()\n const stroke = scale(type.data[i]);\n\n if (shape === \"line\" && orient === \"horizontal\") {\n bbox.height = bbox.height + stroke;\n } else if (shape === \"line\" && orient === \"vertical\"){\n bbox.width = bbox.width;\n }\n return bbox;\n });\n //console.log('SHAPESIZE')\n const maxH = max(shapeSize, d => d.height + d.y),\n maxW = max(shapeSize, d => d.width + d.x);\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(d.height, shapeSize[i].height))\n const y = shape == \"circle\" || shape == \"line\" ? shapeSize[0].height/2 : 0\n cellTrans = (d,i) => {\n const height = sum(cellSize.slice(0, i));\n \n return `translate(0, ${(y + height + i*shapePadding)})`};\n\n textTrans = (d,i) => `translate( ${(maxW + labelOffset)},\n ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => {\n const width = sum(shapeSize.slice(0, i), d => d.width);\n const y = shape == \"circle\" || shape == \"line\" ? maxH/2 : 0\n return `translate(${(width + i*shapePadding)}, ${y})`; };\n\n textTrans = (d,i) => {\n return `translate( ${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(maxH + labelOffset )})`};\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n\n cell.transition().style(\"opacity\", 1);\n\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n \n legend.shape = function(_, d) {\n if (!arguments.length) return shape;\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\" ){\n shape = _;\n path = d;\n }\n return legend;\n };\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth;\n shapeWidth = +_;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return labelFormat;\n labelFormat = typeof(_) === 'string' ? format(_) : _;\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { sum, max } from 'd3-array';\n\nexport default function symbol(){\n\n let scale = scaleLinear(),\n shape = \"path\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 5,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n labelFormat = format(\".01f\"),\n labelAlign = \"middle\",\n labelOffset = 10,\n labelDelimiter = \"to\",\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg){\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n\n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n const shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n //remove old shapes\n cell.exit().transition().style(\"opacity\", 0).remove();\n\n helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, type.feature);\n helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n // sets placement\n const text = cell.selectAll(\"text\"),\n textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map( d => d.getBBox());\n\n const maxH = max(shapeSize, d => d.height),\n maxW = max(shapeSize, d => d.width);\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(maxH, d.height))\n\n cellTrans = (d,i) => {\n const height = sum(cellSize.slice(0, i));\n return `translate(0, ${(height + (i *shapePadding))} )`};\n textTrans = (d,i) => `translate( ${(maxW + labelOffset)},\n ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => `translate( ${(i * (maxW + shapePadding))},0)`;\n textTrans = (d,i) => `translate( ${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(maxH + labelOffset )})`;\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n cell.transition().style(\"opacity\", 1);\n\n }\n\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n \n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return labelFormat;\n labelFormat = typeof(_) === 'string' ? format(_) : _;\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","export const thresholdLabels = function({ i, genLength, generatedLabels }){\n\n if (i === 0 ){\n return generatedLabels[i].replace('NaN to', 'Less than')\n } else if (i === genLength - 1) {\n return `More than ${generatedLabels[genLength - 1].replace(' to NaN', '')}`\n }\n return generatedLabels[i]\n}\n\nexport default {\n thresholdLabels\n}\n","import legendColor from './src/color'\nimport legendSize from './src/size'\nimport legendSymbol from './src/symbol'\nimport legendHelpers from './src/helpers'\n\nexport { legendColor, legendSize, legendSymbol, legendHelpers }\n\nexport default {\n legendColor,\n legendSize,\n legendSymbol,\n legendHelpers\n};\n"],"names":["d3_identity","d","d3_reverse","arr","mirror","i","l","length","d3_textWrapping","text","width","each","select","words","split","reverse","word","line","lineNumber","lineHeight","attr","dy","parseFloat","tspan","append","pop","push","join","node","getComputedTextLength","d3_mergeLabels","gen","labels","domain","range","customLabels","genLength","d3_linearLegend","scale","cells","labelFormat","data","increment","map","d3_quantLegend","labelDelimiter","invert","invertExtent","d3_ordinalLegend","d3_cellOver","cellDispatcher","obj","call","d3_cellOut","d3_cellClick","shape","shapes","shapeHeight","shapeWidth","shapeRadius","path","svg","enter","classPrefix","labelWidth","selectAll","ascending","type","ticks","cellFilter","filterCells","label","filter","dataValues","labelValues","indexOf","orient","cell","cellTrans","textTrans","labelAlign","style","dispatcher","on","title","titleWidth","titleText","cellsSvg","yOffset","nodes","getBBox","height","xOffset","x","color","scaleLinear","shapePadding","useClass","format","labelOffset","labelWrap","legendDispatcher","dispatch","legend","helper","d3_calcType","legendG","d3_filterCells","cellEnter","d3_addEvents","exit","transition","remove","d3_drawShapes","d3_addText","merge","textSize","shapeSize","feature","textAlign","cellSize","Math","max","sum","slice","y","d3_placement","d3_title","_","arguments","toLowerCase","textWrap","value","apply","size","bbox","stroke","maxH","maxW","symbol","thresholdLabels","generatedLabels","replace"],"mappings":";;;;;;;;;;;;AAEA,IAAMA,cAAe,SAAfA,WAAe,CAACC,CAAD;SAAOA,CAAP;CAArB;;AAEA,IAAMC,aAAa,SAAbA,UAAa,CAACC,GAAD,EAAS;MACpBC,SAAS,EAAf;OACK,IAAIC,IAAI,CAAR,EA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V,EAAa;WACJwI,gBAAgBxI,CAAhB,EAAmByI,OAAnB,CAA2B,QAA3B,EAAqC,WAArC,CAAP;GADF,MAEO,IAAIzI,MAAM+B,YAAY,CAAtB,EAAyB;0BACVyG,gBAAgBzG,YAAY,CAA5B,EAA+B0G,OAA/B,CAAuC,SAAvC,EAAkD,EAAlD,CAApB;;SAEKD,gBAAgBxI,CAAhB,CAAP;CAPK;;AAUP,oBAAe;;CAAf;;ACHA,YAAe;oBAAA;kBAAA;sBAAA;;CAAf;;;;;;;;;;"} \ No newline at end of file diff --git a/indexRollupNext.js b/indexRollupNext.js index 2415614..41fd810 100644 --- a/indexRollupNext.js +++ b/indexRollupNext.js @@ -320,20 +320,18 @@ function color() { //positions cells and text if (orient === "vertical") { - (function () { - var cellSize = textSize.map(function (d, i) { - return Math.max(d.height, shapeSize[i].height); - }); + var cellSize = textSize.map(function (d, i) { + return Math.max(d.height, shapeSize[i].height); + }); - cellTrans = function cellTrans(d, i) { - var height = sum(cellSize.slice(0, i)); - return 'translate(0, ' + (height + i * shapePadding) + ')'; - }; + cellTrans = function cellTrans(d, i) { + var height = sum(cellSize.slice(0, i)); + return 'translate(0, ' + (height + i * shapePadding) + ')'; + }; - textTrans = function textTrans(d, i) { - return 'translate( ' + (shapeSize[i].width + shapeSize[i].x + labelOffset) + ', ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; - }; - })(); + textTrans = function textTrans(d, i) { + return 'translate( ' + (shapeSize[i].width + shapeSize[i].x + labelOffset) + ', ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; + }; } else if (orient === "horizontal") { cellTrans = function cellTrans(d, i) { return 'translate(' + i * (shapeSize[i].width + shapePadding) + ',0)'; @@ -582,21 +580,19 @@ function size() { //positions cells and text if (orient === "vertical") { - (function () { - var cellSize = textSize.map(function (d, i) { - return Math.max(d.height, shapeSize[i].height); - }); - var y = shape == "circle" || shape == "line" ? shapeSize[0].height / 2 : 0; - cellTrans = function cellTrans(d, i) { - var height = sum(cellSize.slice(0, i)); + var cellSize = textSize.map(function (d, i) { + return Math.max(d.height, shapeSize[i].height); + }); + var y = shape == "circle" || shape == "line" ? shapeSize[0].height / 2 : 0; + cellTrans = function cellTrans(d, i) { + var height = sum(cellSize.slice(0, i)); - return 'translate(0, ' + (y + height + i * shapePadding) + ')'; - }; + return 'translate(0, ' + (y + height + i * shapePadding) + ')'; + }; - textTrans = function textTrans(d, i) { - return 'translate( ' + (maxW + labelOffset) + ',\n ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; - }; - })(); + textTrans = function textTrans(d, i) { + return 'translate( ' + (maxW + labelOffset) + ',\n ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; + }; } else if (orient === "horizontal") { cellTrans = function cellTrans(d, i) { var width = sum(shapeSize.slice(0, i), function (d) { @@ -811,19 +807,17 @@ function symbol() { //positions cells and text if (orient === "vertical") { - (function () { - var cellSize = textSize.map(function (d, i) { - return Math.max(maxH, d.height); - }); + var cellSize = textSize.map(function (d, i) { + return Math.max(maxH, d.height); + }); - cellTrans = function cellTrans(d, i) { - var height = sum(cellSize.slice(0, i)); - return 'translate(0, ' + (height + i * shapePadding) + ' )'; - }; - textTrans = function textTrans(d, i) { - return 'translate( ' + (maxW + labelOffset) + ',\n ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; - }; - })(); + cellTrans = function cellTrans(d, i) { + var height = sum(cellSize.slice(0, i)); + return 'translate(0, ' + (height + i * shapePadding) + ' )'; + }; + textTrans = function textTrans(d, i) { + return 'translate( ' + (maxW + labelOffset) + ',\n ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; + }; } else if (orient === "horizontal") { cellTrans = function cellTrans(d, i) { return 'translate( ' + i * (maxW + shapePadding) + ',0)'; diff --git a/indexRollupNext.js.map b/indexRollupNext.js.map index 2392090..66bdb37 100644 --- a/indexRollupNext.js.map +++ b/indexRollupNext.js.map @@ -1 +1 @@ -{"version":3,"file":"indexRollupNext.js","sources":["src/legend.js","src/color.js","src/size.js","src/symbol.js","src/helpers.js","index.js"],"sourcesContent":["import { select } from 'd3-selection'\n\nconst d3_identity = (d) => d\n\nconst d3_reverse = (arr) => {\n const mirror = [];\n for (let i = 0, l = arr.length; i < l; i++) {\n mirror[i] = arr[l-i-1];\n }\n return mirror;\n}\n\n//Text wrapping code adapted from Mike Bostock\nconst d3_textWrapping = (text, width) => {\n text.each(function() {\n var text = select(this),\n words = text.text().split(/\\s+/).reverse(),\n word,\n line = [],\n lineNumber = 0,\n lineHeight = 1.2, //ems\n y = text.attr(\"y\"),\n dy = parseFloat(text.attr(\"dy\")) || 0,\n tspan = text.text(null)\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", dy + \"em\");\n\n while (word = words.pop()) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node().getComputedTextLength() > width && line.length > 1) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", lineHeight + dy + \"em\").text(word);\n }\n }\n });\n}\n\n\nconst d3_mergeLabels = (gen=[], labels, domain, range) => {\n\n if (typeof labels === \"object\"){\n if(labels.length === 0) return gen;\n\n let i = labels.length;\n for (; i < gen.length; i++) {\n labels.push(gen[i]);\n }\n return labels;\n } else if (typeof labels === \"function\") {\n const customLabels = []\n const genLength = gen.length\n for (let i=0; i < genLength; i++){\n customLabels.push(labels({\n i,\n genLength,\n generatedLabels : gen,\n domain,\n range }))\n }\n return customLabels\n }\n\n return gen;\n }\n\nconst d3_linearLegend = (scale, cells, labelFormat) => {\n let data = [];\n\n if (cells.length > 1){\n data = cells;\n\n } else {\n const domain = scale.domain(),\n increment = (domain[domain.length - 1] - domain[0])/(cells - 1)\n let i = 0;\n\n for (; i < cells; i++){\n data.push(domain[0] + i*increment);\n }\n }\n\n const labels = data.map(labelFormat);\n return {data: data,\n labels: labels,\n feature: d => scale(d)};\n}\n\nconst d3_quantLegend = (scale, labelFormat, labelDelimiter) => {\n const labels = scale.range().map( d => {\n const invert = scale.invertExtent(d);\n return labelFormat(invert[0]) + \" \" + labelDelimiter + \" \" + labelFormat(invert[1]);\n });\n\n return {data: scale.range(),\n labels: labels,\n feature: d3_identity\n };\n}\n\nconst d3_ordinalLegend= scale => ({data: scale.domain(),\n labels: scale.domain(),\n feature: d => scale(d) }\n)\n\nconst d3_cellOver = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellover\", obj, d);\n}\n\nconst d3_cellOut = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellout\", obj, d);\n}\n\nconst d3_cellClick = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellclick\", obj, d);\n}\n\n\nexport default {\n\n d3_drawShapes: (shape, shapes, shapeHeight, shapeWidth, shapeRadius, path) => {\n if (shape === \"rect\"){\n shapes.attr(\"height\", shapeHeight)\n .attr(\"width\", shapeWidth);\n\n } else if (shape === \"circle\") {\n shapes.attr(\"r\", shapeRadius)\n\n } else if (shape === \"line\") {\n shapes.attr(\"x1\", 0).attr(\"x2\", shapeWidth).attr(\"y1\", 0).attr(\"y2\", 0);\n\n } else if (shape === \"path\") {\n shapes.attr(\"d\", path);\n }\n },\n\n d3_addText: function (svg, enter, labels, classPrefix, labelWidth){\n enter.append(\"text\").attr(\"class\", classPrefix + \"label\");\n const text = svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .data(labels)\n .text(d3_identity);\n\n if (labelWidth){\n svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .call(d3_textWrapping, labelWidth)\n }\n\n return text\n },\n\n d3_calcType: function (scale, ascending, cells, labels, labelFormat, labelDelimiter){\n const type = scale.invertExtent ?\n d3_quantLegend(scale, labelFormat, labelDelimiter) : scale.ticks ?\n d3_linearLegend(scale, cells, labelFormat) : d3_ordinalLegend(scale);\n\n //for d3.scaleSequential that doesn't have a range function\n const range = scale.range && scale.range() || scale.domain() \n type.labels = d3_mergeLabels(type.labels, labels, scale.domain(), range);\n\n if (ascending) {\n type.labels = d3_reverse(type.labels);\n type.data = d3_reverse(type.data);\n }\n\n return type;\n },\n\n d3_filterCells: (type, cellFilter) => {\n let filterCells = type.data.map((d, i) => ({ data: d, label: type.labels[i] }))\n .filter(cellFilter)\n const dataValues = filterCells.map(d => d.data)\n const labelValues = filterCells.map(d => d.label)\n type.data = type.data.filter(d => dataValues.indexOf(d) !== -1)\n type.labels = type.labels.filter(d => labelValues.indexOf(d) !== -1)\n return type\n },\n\n d3_placement: (orient, cell, cellTrans, text, textTrans, labelAlign) => {\n cell.attr(\"transform\", cellTrans);\n text.attr(\"transform\", textTrans);\n if (orient === \"horizontal\"){\n text.style(\"text-anchor\", labelAlign);\n }\n },\n\n d3_addEvents: function(cells, dispatcher){\n cells.on(\"mouseover.legend\", function (d) { d3_cellOver(dispatcher, d, this); })\n .on(\"mouseout.legend\", function (d) { d3_cellOut(dispatcher, d, this); })\n .on(\"click.legend\", function (d) { d3_cellClick(dispatcher, d, this); });\n },\n\n d3_title: (svg, title, classPrefix, titleWidth) => {\n if (title !== \"\"){\n\n const titleText = svg.selectAll('text.' + classPrefix + 'legendTitle');\n\n titleText.data([title])\n .enter()\n .append('text')\n .attr('class', classPrefix + 'legendTitle');\n\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .text(title)\n\n if (titleWidth){\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .call(d3_textWrapping, titleWidth)\n }\n\n const cellsSvg = svg.select('.' + classPrefix + 'legendCells')\n const yOffset = svg.select('.' + classPrefix + 'legendTitle').nodes()\n .map(d => d.getBBox().height)[0],\n\n xOffset = -cellsSvg.nodes().map(function(d) { return d.getBBox().x})[0];\n cellsSvg.attr('transform', 'translate(' + xOffset + ',' + (yOffset) + ')');\n\n }\n }\n}\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { sum } from 'd3-array';\n\nexport default function color(){\n\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n useClass = false,\n title = \"\",\n labelFormat = format(\".01f\"),\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = \"to\",\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg) {\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n \n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n \n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n const shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n cell.exit().transition().style(\"opacity\", 0).remove();\n\n helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, path);\n helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n // sets placement\n const text = cell.selectAll(\"text\"),\n textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map( d => d.getBBox());\n //sets scale\n //everything is fill except for line which is stroke,\n if (!useClass){\n if (shape == \"line\"){\n shapes.style(\"stroke\", type.feature);\n } else {\n shapes.style(\"fill\", type.feature);\n }\n } else {\n shapes.attr(\"class\", d => `${classPrefix}swatch ${type.feature(d)}`);\n }\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(d.height, shapeSize[i].height))\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i));\n return `translate(0, ${height + i*shapePadding})`}\n\n textTrans = (d,i) => `translate( ${(shapeSize[i].width + shapeSize[i].x +\n labelOffset)}, ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => `translate(${(i * (shapeSize[i].width + shapePadding))},0)`\n textTrans = (d,i) => `translate(${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(shapeSize[i].height + shapeSize[i].y + labelOffset + 8)})`;\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n\n cell.transition().style(\"opacity\", 1);\n\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape;\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\" || (_ == \"path\" && (typeof d === 'string')) ){\n shape = _;\n path = d;\n }\n return legend;\n };\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth;\n shapeWidth = +_;\n return legend;\n };\n\n legend.shapeHeight = function(_) {\n if (!arguments.length) return shapeHeight;\n shapeHeight = +_;\n return legend;\n };\n\n legend.shapeRadius = function(_) {\n if (!arguments.length) return shapeRadius;\n shapeRadius = +_;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return labelFormat;\n labelFormat = typeof(_) === 'string' ? format(_) : _;\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.useClass = function(_) {\n if (!arguments.length) return useClass;\n if (_ === true || _ === false){\n useClass = _;\n }\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.textWrap = function(_) {\n if (!arguments.length) return textWrap;\n textWrap = _;\n return legend;\n }\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { sum, max } from 'd3-array';\n\nexport default function size(){\n\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n labelFormat = format(\".01f\"),\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = \"to\",\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg){\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n\n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n const shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n cell.exit().transition().style(\"opacity\", 0).remove();\n\n //creates shape\n if (shape === \"line\"){\n helper.d3_drawShapes(shape, shapes, 0, shapeWidth);\n shapes.attr(\"stroke-width\", type.feature);\n } else {\n helper.d3_drawShapes(shape, shapes, type.feature, type.feature, type.feature, path);\n }\n\n const text = helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n //sets placement\n\n const textSize = text.nodes().map( d => d.getBBox()),\n shapeSize = shapes.nodes().map(\n (d, i) => {\n const bbox = d.getBBox()\n const stroke = scale(type.data[i]);\n\n if (shape === \"line\" && orient === \"horizontal\") {\n bbox.height = bbox.height + stroke;\n } else if (shape === \"line\" && orient === \"vertical\"){\n bbox.width = bbox.width;\n }\n return bbox;\n });\n //console.log('SHAPESIZE')\n const maxH = max(shapeSize, d => d.height + d.y),\n maxW = max(shapeSize, d => d.width + d.x);\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(d.height, shapeSize[i].height))\n const y = shape == \"circle\" || shape == \"line\" ? shapeSize[0].height/2 : 0\n cellTrans = (d,i) => {\n const height = sum(cellSize.slice(0, i));\n \n return `translate(0, ${(y + height + i*shapePadding)})`};\n\n textTrans = (d,i) => `translate( ${(maxW + labelOffset)},\n ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => {\n const width = sum(shapeSize.slice(0, i), d => d.width);\n const y = shape == \"circle\" || shape == \"line\" ? maxH/2 : 0\n return `translate(${(width + i*shapePadding)}, ${y})`; };\n\n textTrans = (d,i) => {\n return `translate( ${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(maxH + labelOffset )})`};\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n\n cell.transition().style(\"opacity\", 1);\n\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n \n legend.shape = function(_, d) {\n if (!arguments.length) return shape;\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\" ){\n shape = _;\n path = d;\n }\n return legend;\n };\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth;\n shapeWidth = +_;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return labelFormat;\n labelFormat = typeof(_) === 'string' ? format(_) : _;\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { sum, max } from 'd3-array';\n\nexport default function symbol(){\n\n let scale = scaleLinear(),\n shape = \"path\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 5,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n labelFormat = format(\".01f\"),\n labelAlign = \"middle\",\n labelOffset = 10,\n labelDelimiter = \"to\",\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg){\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n\n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n const shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n //remove old shapes\n cell.exit().transition().style(\"opacity\", 0).remove();\n\n helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, type.feature);\n helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n // sets placement\n const text = cell.selectAll(\"text\"),\n textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map( d => d.getBBox());\n\n const maxH = max(shapeSize, d => d.height),\n maxW = max(shapeSize, d => d.width);\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(maxH, d.height))\n\n cellTrans = (d,i) => {\n const height = sum(cellSize.slice(0, i));\n return `translate(0, ${(height + (i *shapePadding))} )`};\n textTrans = (d,i) => `translate( ${(maxW + labelOffset)},\n ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => `translate( ${(i * (maxW + shapePadding))},0)`;\n textTrans = (d,i) => `translate( ${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(maxH + labelOffset )})`;\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n cell.transition().style(\"opacity\", 1);\n\n }\n\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n \n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return labelFormat;\n labelFormat = typeof(_) === 'string' ? format(_) : _;\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","export const thresholdLabels = function({ i, genLength, generatedLabels }){\n\n if (i === 0 ){\n return generatedLabels[i].replace('NaN to', 'Less than')\n } else if (i === genLength - 1) {\n return `More than ${generatedLabels[genLength - 1].replace(' to NaN', '')}`\n }\n return generatedLabels[i]\n}\n\nexport default {\n thresholdLabels\n}\n","import legendColor from './src/color'\nimport legendSize from './src/size'\nimport legendSymbol from './src/symbol'\nimport legendHelpers from './src/helpers'\n\nexport { legendColor, legendSize, legendSymbol, legendHelpers }\n\nexport default {\n legendColor,\n legendSize,\n legendSymbol,\n legendHelpers\n};\n"],"names":["d3_identity","d","d3_reverse","arr","mirror","i","l","length","d3_textWrapping","text","width","each","select","words","split","reverse","word","line","lineNumber","lineHeight","attr","dy","parseFloat","tspan","append","pop","push","join","node","getComputedTextLength","d3_mergeLabels","gen","labels","domain","range","customLabels","genLength","d3_linearLegend","scale","cells","labelFormat","data","increment","map","d3_quantLegend","labelDelimiter","invert","invertExtent","d3_ordinalLegend","d3_cellOver","cellDispatcher","obj","call","d3_cellOut","d3_cellClick","shape","shapes","shapeHeight","shapeWidth","shapeRadius","path","svg","enter","classPrefix","labelWidth","selectAll","ascending","type","ticks","cellFilter","filterCells","label","filter","dataValues","labelValues","indexOf","orient","cell","cellTrans","textTrans","labelAlign","style","dispatcher","on","title","titleWidth","titleText","cellsSvg","yOffset","nodes","getBBox","height","xOffset","x","color","scaleLinear","shapePadding","useClass","format","labelOffset","labelWrap","legendDispatcher","dispatch","legend","helper","d3_calcType","legendG","d3_filterCells","cellEnter","d3_addEvents","exit","transition","remove","d3_drawShapes","d3_addText","merge","textSize","shapeSize","feature","textAlign","cellSize","Math","max","sum","slice","y","d3_placement","d3_title","_","arguments","toLowerCase","textWrap","value","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B,gBAAV,GAA6BE,MAA7B,GAAsC6B,KAA7C;GAFF;;SAKO7B,MAAP;;;ACrMK,IAAMqC,kBAAkB,SAAlBA,eAAkB,OAA2C;MAAhCvI,CAAgC,QAAhCA,CAAgC;MAA7B+B,SAA6B,QAA7BA,SAA6B;MAAlByG,eAAkB,QAAlBA,eAAkB;;;MAEpExI,MAAM,CAAV,EAAa;WACJwI,gBAAgBxI,CAAhB,EAAmByI,OAAnB,CAA2B,QAA3B,EAAqC,WAArC,CAAP;GADF,MAEO,IAAIzI,MAAM+B,YAAY,CAAtB,EAAyB;0BACVyG,gBAAgBzG,YAAY,CAA5B,EAA+B0G,OAA/B,CAAuC,SAAvC,EAAkD,EAAlD,CAApB;;SAEKD,gBAAgBxI,CAAhB,CAAP;CAPK;;AAUP,oBAAe;;CAAf;;ACHA,YAAe;oBAAA;kBAAA;sBAAA;;CAAf;;"} \ No newline at end of file +{"version":3,"file":"indexRollupNext.js","sources":["src/legend.js","src/color.js","src/size.js","src/symbol.js","src/helpers.js","index.js"],"sourcesContent":["import { select } from 'd3-selection'\n\nconst d3_identity = (d) => d\n\nconst d3_reverse = (arr) => {\n const mirror = [];\n for (let i = 0, l = arr.length; i < l; i++) {\n mirror[i] = arr[l-i-1];\n }\n return mirror;\n}\n\n//Text wrapping code adapted from Mike Bostock\nconst d3_textWrapping = (text, width) => {\n text.each(function() {\n var text = select(this),\n words = text.text().split(/\\s+/).reverse(),\n word,\n line = [],\n lineNumber = 0,\n lineHeight = 1.2, //ems\n y = text.attr(\"y\"),\n dy = parseFloat(text.attr(\"dy\")) || 0,\n tspan = text.text(null)\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", dy + \"em\");\n\n while (word = words.pop()) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node().getComputedTextLength() > width && line.length > 1) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", lineHeight + dy + \"em\").text(word);\n }\n }\n });\n}\n\n\nconst d3_mergeLabels = (gen=[], labels, domain, range) => {\n\n if (typeof labels === \"object\"){\n if(labels.length === 0) return gen;\n\n let i = labels.length;\n for (; i < gen.length; i++) {\n labels.push(gen[i]);\n }\n return labels;\n } else if (typeof labels === \"function\") {\n const customLabels = []\n const genLength = gen.length\n for (let i=0; i < genLength; i++){\n customLabels.push(labels({\n i,\n genLength,\n generatedLabels : gen,\n domain,\n range }))\n }\n return customLabels\n }\n\n return gen;\n }\n\nconst d3_linearLegend = (scale, cells, labelFormat) => {\n let data = [];\n\n if (cells.length > 1){\n data = cells;\n\n } else {\n const domain = scale.domain(),\n increment = (domain[domain.length - 1] - domain[0])/(cells - 1)\n let i = 0;\n\n for (; i < cells; i++){\n data.push(domain[0] + i*increment);\n }\n }\n\n const labels = data.map(labelFormat);\n return {data: data,\n labels: labels,\n feature: d => scale(d)};\n}\n\nconst d3_quantLegend = (scale, labelFormat, labelDelimiter) => {\n const labels = scale.range().map( d => {\n const invert = scale.invertExtent(d);\n return labelFormat(invert[0]) + \" \" + labelDelimiter + \" \" + labelFormat(invert[1]);\n });\n\n return {data: scale.range(),\n labels: labels,\n feature: d3_identity\n };\n}\n\nconst d3_ordinalLegend= scale => ({data: scale.domain(),\n labels: scale.domain(),\n feature: d => scale(d) }\n)\n\nconst d3_cellOver = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellover\", obj, d);\n}\n\nconst d3_cellOut = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellout\", obj, d);\n}\n\nconst d3_cellClick = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellclick\", obj, d);\n}\n\n\nexport default {\n\n d3_drawShapes: (shape, shapes, shapeHeight, shapeWidth, shapeRadius, path) => {\n if (shape === \"rect\"){\n shapes.attr(\"height\", shapeHeight)\n .attr(\"width\", shapeWidth);\n\n } else if (shape === \"circle\") {\n shapes.attr(\"r\", shapeRadius)\n\n } else if (shape === \"line\") {\n shapes.attr(\"x1\", 0).attr(\"x2\", shapeWidth).attr(\"y1\", 0).attr(\"y2\", 0);\n\n } else if (shape === \"path\") {\n shapes.attr(\"d\", path);\n }\n },\n\n d3_addText: function (svg, enter, labels, classPrefix, labelWidth){\n enter.append(\"text\").attr(\"class\", classPrefix + \"label\");\n const text = svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .data(labels)\n .text(d3_identity);\n\n if (labelWidth){\n svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .call(d3_textWrapping, labelWidth)\n }\n\n return text\n },\n\n d3_calcType: function (scale, ascending, cells, labels, labelFormat, labelDelimiter){\n const type = scale.invertExtent ?\n d3_quantLegend(scale, labelFormat, labelDelimiter) : scale.ticks ?\n d3_linearLegend(scale, cells, labelFormat) : d3_ordinalLegend(scale);\n\n //for d3.scaleSequential that doesn't have a range function\n const range = scale.range && scale.range() || scale.domain() \n type.labels = d3_mergeLabels(type.labels, labels, scale.domain(), range);\n\n if (ascending) {\n type.labels = d3_reverse(type.labels);\n type.data = d3_reverse(type.data);\n }\n\n return type;\n },\n\n d3_filterCells: (type, cellFilter) => {\n let filterCells = type.data.map((d, i) => ({ data: d, label: type.labels[i] }))\n .filter(cellFilter)\n const dataValues = filterCells.map(d => d.data)\n const labelValues = filterCells.map(d => d.label)\n type.data = type.data.filter(d => dataValues.indexOf(d) !== -1)\n type.labels = type.labels.filter(d => labelValues.indexOf(d) !== -1)\n return type\n },\n\n d3_placement: (orient, cell, cellTrans, text, textTrans, labelAlign) => {\n cell.attr(\"transform\", cellTrans);\n text.attr(\"transform\", textTrans);\n if (orient === \"horizontal\"){\n text.style(\"text-anchor\", labelAlign);\n }\n },\n\n d3_addEvents: function(cells, dispatcher){\n cells.on(\"mouseover.legend\", function (d) { d3_cellOver(dispatcher, d, this); })\n .on(\"mouseout.legend\", function (d) { d3_cellOut(dispatcher, d, this); })\n .on(\"click.legend\", function (d) { d3_cellClick(dispatcher, d, this); });\n },\n\n d3_title: (svg, title, classPrefix, titleWidth) => {\n if (title !== \"\"){\n\n const titleText = svg.selectAll('text.' + classPrefix + 'legendTitle');\n\n titleText.data([title])\n .enter()\n .append('text')\n .attr('class', classPrefix + 'legendTitle');\n\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .text(title)\n\n if (titleWidth){\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .call(d3_textWrapping, titleWidth)\n }\n\n const cellsSvg = svg.select('.' + classPrefix + 'legendCells')\n const yOffset = svg.select('.' + classPrefix + 'legendTitle').nodes()\n .map(d => d.getBBox().height)[0],\n\n xOffset = -cellsSvg.nodes().map(function(d) { return d.getBBox().x})[0];\n cellsSvg.attr('transform', 'translate(' + xOffset + ',' + (yOffset) + ')');\n\n }\n }\n}\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { sum } from 'd3-array';\n\nexport default function color(){\n\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n useClass = false,\n title = \"\",\n labelFormat = format(\".01f\"),\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = \"to\",\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg) {\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n \n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n \n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n const shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n cell.exit().transition().style(\"opacity\", 0).remove();\n\n helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, path);\n helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n // sets placement\n const text = cell.selectAll(\"text\"),\n textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map( d => d.getBBox());\n //sets scale\n //everything is fill except for line which is stroke,\n if (!useClass){\n if (shape == \"line\"){\n shapes.style(\"stroke\", type.feature);\n } else {\n shapes.style(\"fill\", type.feature);\n }\n } else {\n shapes.attr(\"class\", d => `${classPrefix}swatch ${type.feature(d)}`);\n }\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(d.height, shapeSize[i].height))\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i));\n return `translate(0, ${height + i*shapePadding})`}\n\n textTrans = (d,i) => `translate( ${(shapeSize[i].width + shapeSize[i].x +\n labelOffset)}, ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => `translate(${(i * (shapeSize[i].width + shapePadding))},0)`\n textTrans = (d,i) => `translate(${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(shapeSize[i].height + shapeSize[i].y + labelOffset + 8)})`;\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n\n cell.transition().style(\"opacity\", 1);\n\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape;\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\" || (_ == \"path\" && (typeof d === 'string')) ){\n shape = _;\n path = d;\n }\n return legend;\n };\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth;\n shapeWidth = +_;\n return legend;\n };\n\n legend.shapeHeight = function(_) {\n if (!arguments.length) return shapeHeight;\n shapeHeight = +_;\n return legend;\n };\n\n legend.shapeRadius = function(_) {\n if (!arguments.length) return shapeRadius;\n shapeRadius = +_;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return labelFormat;\n labelFormat = typeof(_) === 'string' ? format(_) : _;\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.useClass = function(_) {\n if (!arguments.length) return useClass;\n if (_ === true || _ === false){\n useClass = _;\n }\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.textWrap = function(_) {\n if (!arguments.length) return textWrap;\n textWrap = _;\n return legend;\n }\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { sum, max } from 'd3-array';\n\nexport default function size(){\n\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n labelFormat = format(\".01f\"),\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = \"to\",\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg){\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n\n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n const shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n cell.exit().transition().style(\"opacity\", 0).remove();\n\n //creates shape\n if (shape === \"line\"){\n helper.d3_drawShapes(shape, shapes, 0, shapeWidth);\n shapes.attr(\"stroke-width\", type.feature);\n } else {\n helper.d3_drawShapes(shape, shapes, type.feature, type.feature, type.feature, path);\n }\n\n const text = helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n //sets placement\n\n const textSize = text.nodes().map( d => d.getBBox()),\n shapeSize = shapes.nodes().map(\n (d, i) => {\n const bbox = d.getBBox()\n const stroke = scale(type.data[i]);\n\n if (shape === \"line\" && orient === \"horizontal\") {\n bbox.height = bbox.height + stroke;\n } else if (shape === \"line\" && orient === \"vertical\"){\n bbox.width = bbox.width;\n }\n return bbox;\n });\n //console.log('SHAPESIZE')\n const maxH = max(shapeSize, d => d.height + d.y),\n maxW = max(shapeSize, d => d.width + d.x);\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(d.height, shapeSize[i].height))\n const y = shape == \"circle\" || shape == \"line\" ? shapeSize[0].height/2 : 0\n cellTrans = (d,i) => {\n const height = sum(cellSize.slice(0, i));\n \n return `translate(0, ${(y + height + i*shapePadding)})`};\n\n textTrans = (d,i) => `translate( ${(maxW + labelOffset)},\n ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => {\n const width = sum(shapeSize.slice(0, i), d => d.width);\n const y = shape == \"circle\" || shape == \"line\" ? maxH/2 : 0\n return `translate(${(width + i*shapePadding)}, ${y})`; };\n\n textTrans = (d,i) => {\n return `translate( ${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(maxH + labelOffset )})`};\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n\n cell.transition().style(\"opacity\", 1);\n\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n \n legend.shape = function(_, d) {\n if (!arguments.length) return shape;\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\" ){\n shape = _;\n path = d;\n }\n return legend;\n };\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth;\n shapeWidth = +_;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return labelFormat;\n labelFormat = typeof(_) === 'string' ? format(_) : _;\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { sum, max } from 'd3-array';\n\nexport default function symbol(){\n\n let scale = scaleLinear(),\n shape = \"path\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 5,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n labelFormat = format(\".01f\"),\n labelAlign = \"middle\",\n labelOffset = 10,\n labelDelimiter = \"to\",\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg){\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n\n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n const shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n //remove old shapes\n cell.exit().transition().style(\"opacity\", 0).remove();\n\n helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, type.feature);\n helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n // sets placement\n const text = cell.selectAll(\"text\"),\n textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map( d => d.getBBox());\n\n const maxH = max(shapeSize, d => d.height),\n maxW = max(shapeSize, d => d.width);\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(maxH, d.height))\n\n cellTrans = (d,i) => {\n const height = sum(cellSize.slice(0, i));\n return `translate(0, ${(height + (i *shapePadding))} )`};\n textTrans = (d,i) => `translate( ${(maxW + labelOffset)},\n ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => `translate( ${(i * (maxW + shapePadding))},0)`;\n textTrans = (d,i) => `translate( ${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(maxH + labelOffset )})`;\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n cell.transition().style(\"opacity\", 1);\n\n }\n\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n \n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return labelFormat;\n labelFormat = typeof(_) === 'string' ? format(_) : _;\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","export const thresholdLabels = function({ i, genLength, generatedLabels }){\n\n if (i === 0 ){\n return generatedLabels[i].replace('NaN to', 'Less than')\n } else if (i === genLength - 1) {\n return `More than ${generatedLabels[genLength - 1].replace(' to NaN', '')}`\n }\n return generatedLabels[i]\n}\n\nexport default {\n thresholdLabels\n}\n","import legendColor from './src/color'\nimport legendSize from './src/size'\nimport legendSymbol from './src/symbol'\nimport legendHelpers from './src/helpers'\n\nexport { legendColor, legendSize, legendSymbol, legendHelpers }\n\nexport default {\n legendColor,\n legendSize,\n legendSymbol,\n legendHelpers\n};\n"],"names":["d3_identity","d","d3_reverse","arr","mirror","i","l","length","d3_textWrapping","text","width","each","select","words","split","reverse","word","line","lineNumber","lineHeight","attr","dy","parseFloat","tspan","append","pop","push","join","node","getComputedTextLength","d3_mergeLabels","gen","labels","domain","range","customLabels","genLength","d3_linearLegend","scale","cells","labelFormat","data","increment","map","d3_quantLegend","labelDelimiter","invert","invertExtent","d3_ordinalLegend","d3_cellOver","cellDispatcher","obj","call","d3_cellOut","d3_cellClick","shape","shapes","shapeHeight","shapeWidth","shapeRadius","path","svg","enter","classPrefix","labelWidth","selectAll","ascending","type","ticks","cellFilter","filterCells","label","filter","dataValues","labelValues","indexOf","orient","cell","cellTrans","textTrans","labelAlign","style","dispatcher","on","title","titleWidth","titleText","cellsSvg","yOffset","nodes","getBBox","height","xOffset","x","color","scaleLinear","shapePadding","useClass","format","labelOffset","labelWrap","legendDispatcher","dispatch","legend","helper","d3_calcType","legendG","d3_filterCells","cellEnter","d3_addEvents","exit","transition","remove","d3_drawShapes","d3_addText","merge","textSize","shapeSize","feature","textAlign","cellSize","Math","max","sum","slice","y","d3_placement","d3_title","_","arguments","toLowerCase","textWrap","value","apply","size","bbox","stroke","maxH","maxW","symbol","thresholdLabels","generatedLabels","replace"],"mappings":";;;;;;;;;;;;AAEA,IAAMA,cAAe,SAAfA,WAAe,CAACC,CAAD;SAAOA,CAAP;CAArB;;AAEA,IAAMC,aAAa,SAAbA,UAAa,CAACC,GAAD,EAAS;MACpBC,SAAS,EAAf;OACK,IAAIC,IAAI,CAAR,EAAWC,IAAIH,IAAII,MAAxB,EAAgCF,IAAIC,CAApC,EAAuCD,GAAvC,EAA4C;WACnCA,CAAP,IAAYF,IAAIG,IAAED,CAAF,GAAI,CAAR,CAAZ;;SAEKD,MAAP;CALF;;;AASA,IAAMI,kBAAkB,SAAlBA,eAAkB,CAACC,IAAD,EAAOC,KAAP,EAAiB;OAClCC,IAAL,CAAU,YAAW;QACfF,OAAOG,OAAO,IAAP,CAAX;QACIC,QAAQJ,KAAKA,IAAL,GAAYK,KAAZ,CAAkB,KAAlB,EAAyBC,OAAzB,EADZ;QAEIC,IAFJ;QAGIC,OAAO,EAHX;QAIIC,aAAa,CAJjB;QAKIC,aAAa,G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AAO2D,SAAP;gBACX,CAAC,CAAC8D,CAAd;WACOzB,MAAP;GAHF;;SAMOxC,WAAP,GAAqB,UAASiE,CAAT,EAAY;QAC3B,CAACC,UAAU1H,MAAf,EAAuB,OAAOwD,WAAP;kBACTiE,CAAd;WACOzB,MAAP;GAHF;;SAMOnB,KAAP,GAAe,UAAS4C,CAAT,EAAY;QACrB,CAACC,UAAU1H,MAAf,EAAuB,OAAO6E,KAAP;YACf4C,CAAR;WACOzB,MAAP;GAHF;;SAMOlB,UAAP,GAAoB,UAAS2C,CAAT,EAAY;QAC1B,CAACC,UAAU1H,MAAf,EAAuB,OAAO8E,UAAP;iBACV2C,CAAb;WACOzB,MAAP;GAHF;;SAMOpB,EAAP,GAAY,YAAU;QACdiD,QAAQ/B,iBAAiBlB,EAAjB,CAAoBkD,KAApB,CAA0BhC,gBAA1B,EAA4C4B,SAA5C,CAAd;WACOG,UAAU/B,gBAAV,GAA6BE,MAA7B,GAAsC6B,KAA7C;GAFF;;SAKO7B,MAAP;;;ACrMK,IAAMqC,kBAAkB,SAAlBA,eAAkB,OAA2C;MAAhCvI,CAAgC,QAAhCA,CAAgC;MAA7B+B,SAA6B,QAA7BA,SAA6B;MAAlByG,eAAkB,QAAlBA,eAAkB;;;MAEpExI,MAAM,CAAV,EAAa;WACJwI,gBAAgBxI,CAAhB,EAAmByI,OAAnB,CAA2B,QAA3B,EAAqC,WAArC,CAAP;GADF,MAEO,IAAIzI,MAAM+B,YAAY,CAAtB,EAAyB;0BACVyG,gBAAgBzG,YAAY,CAA5B,EAA+B0G,OAA/B,CAAuC,SAAvC,EAAkD,EAAlD,CAApB;;SAEKD,gBAAgBxI,CAAhB,CAAP;CAPK;;AAUP,oBAAe;;CAAf;;ACHA,YAAe;oBAAA;kBAAA;sBAAA;;CAAf;;"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..238f11c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6402 @@ +{ + "name": "d3-svg-legend", + "version": "2.24.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/d3-selection": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-1.0.10.tgz", + "integrity": "sha1-3PsN3837GtJq6kNRMjdx4a6pboQ=" + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + }, + "acorn-es7-plugin": { + "version": "1.0.18", + "resolved": "https://registry.npmjs.org/acorn-es7-plugin/-/acorn-es7-plugin-1.0.18.tgz", + "integrity": "sha1-zGyYKYkfmpduMn+CM7B6sBV9iVo=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "requires": { + "string-width": "2.1.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + } + }, + "argparse": { + "version": "0.1.16", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz", + "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=", + "dev": true, + "requires": { + "underscore": "1.7.0", + "underscore.string": "2.4.0" + }, + "dependencies": { + "underscore.string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz", + "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs=", + "dev": true + } + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "array-filter": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-map": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", + "dev": true + }, + "array-reduce": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "asn1.js": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.2.tgz", + "integrity": "sha512-b/OsSjvWEo8Pi8H0zsDd2P6Uqo2TK2pH8gNLSJtNLM2Db0v2QaAZ0pBQJXVjAn4gBuugeVDr7s63ZogpUIwWDg==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "assert": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", + "integrity": "sha1-A5OaYiWCqBLMICMgoLmlbJuBWEk=", + "dev": true, + "requires": { + "util": "0.10.3" + } + }, + "assertion-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz", + "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=", + "dev": true + }, + "ast-types": { + "version": "0.9.14", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.14.tgz", + "integrity": "sha512-Ebvx7/0lLboCdyEmAw/4GqwBeKIijPveXNiVGhCGCNxc7z26T5he7DC6ARxu8ByKuzUZZcLog+VP8GMyZrBzJw==", + "dev": true + }, + "astw": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", + "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=", + "dev": true, + "requires": { + "acorn": "4.0.13" + } + }, + "async": { + "version": "0.1.22", + "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz", + "integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE=", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-core": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", + "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.0", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.0", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + } + }, + "babel-generator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", + "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + } + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true, + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.4" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.4" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true, + "requires": { + "babel-helper-optimise-call-expression": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-external-helpers": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.8.0.tgz", + "integrity": "sha1-/r/lDOyRC238vGyqq93Zn3KxJpc=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true, + "requires": { + "babel-helper-define-map": "6.26.0", + "babel-helper-function-name": "6.24.1", + "babel-helper-optimise-call-expression": "6.24.1", + "babel-helper-replace-supers": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", + "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true, + "requires": { + "babel-helper-replace-supers": "6.24.1", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "6.24.1", + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "regexpu-core": "2.0.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "dev": true, + "requires": { + "regenerator-transform": "0.10.1" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-preset-es2015": { + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.13.2.tgz", + "integrity": "sha1-AGxGmnUovQZvKRfItJVTCdzVPPs=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", + "babel-plugin-transform-es2015-for-of": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-literals": "6.22.0", + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-modules-systemjs": "6.24.1", + "babel-plugin-transform-es2015-modules-umd": "6.24.1", + "babel-plugin-transform-es2015-object-super": "6.24.1", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-template-literals": "6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-regenerator": "6.26.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-runtime": "6.26.0", + "core-js": "2.5.1", + "home-or-tmp": "2.0.0", + "lodash": "4.17.4", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "2.5.1", + "regenerator-runtime": "0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" + } + }, + "babelify": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz", + "integrity": "sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "object-assign": "4.1.1" + } + }, + "babelrc-rollup": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/babelrc-rollup/-/babelrc-rollup-3.0.0.tgz", + "integrity": "sha1-/Ozb4+tkAM9OdpIzwXhqL6/otWw=", + "dev": true, + "requires": { + "resolve": "1.5.0" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=", + "dev": true + }, + "base64-js": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", + "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=", + "dev": true + }, + "binary-extensions": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz", + "integrity": "sha1-muuabF6IY4qtFx4Wf1kAq+JINdA=", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "boxen": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.2.2.tgz", + "integrity": "sha1-Px1AMsMP/qnUsCwyLq8up0HcvOU=", + "dev": true, + "requires": { + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "2.3.0", + "cli-boxes": "1.0.0", + "string-width": "2.1.1", + "term-size": "1.2.0", + "widest-line": "1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-pack": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", + "integrity": "sha1-QZdxmyDG4KqglFHFER5T77b7wY0=", + "dev": true, + "requires": { + "combine-source-map": "0.6.1", + "defined": "1.0.0", + "JSONStream": "1.3.1", + "through2": "1.1.1", + "umd": "3.0.1" + } + }, + "browser-resolve": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "dev": true, + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "browserify": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-10.2.6.tgz", + "integrity": "sha1-3L/veU9Uj1+EmCFIFPaXpcUMCJY=", + "dev": true, + "requires": { + "assert": "1.3.0", + "browser-pack": "5.0.1", + "browser-resolve": "1.11.2", + "browserify-zlib": "0.1.4", + "buffer": "3.6.0", + "builtins": "0.0.7", + "commondir": "0.0.1", + "concat-stream": "1.4.10", + "console-browserify": "1.1.0", + "constants-browserify": "0.0.1", + "crypto-browserify": "3.12.0", + "defined": "1.0.0", + "deps-sort": "1.3.9", + "domain-browser": "1.1.7", + "duplexer2": "0.0.2", + "events": "1.0.2", + "glob": "4.5.3", + "has": "1.0.1", + "htmlescape": "1.1.1", + "http-browserify": "1.7.0", + "https-browserify": "0.0.1", + "inherits": "2.0.3", + "insert-module-globals": "6.6.3", + "isarray": "0.0.1", + "JSONStream": "1.3.1", + "labeled-stream-splicer": "1.0.2", + "module-deps": "3.9.1", + "os-browserify": "0.1.2", + "parents": "1.0.1", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "read-only-stream": "1.1.1", + "readable-stream": "1.1.14", + "resolve": "1.5.0", + "shasum": "1.0.2", + "shell-quote": "0.0.1", + "stream-browserify": "1.0.0", + "string_decoder": "0.10.31", + "subarg": "1.0.0", + "syntax-error": "1.3.0", + "through2": "1.1.1", + "timers-browserify": "1.4.2", + "tty-browserify": "0.0.0", + "url": "0.10.3", + "util": "0.10.3", + "vm-browserify": "0.0.4", + "xtend": "4.0.1" + }, + "dependencies": { + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "dev": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.4.0" + } + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + } + } + }, + "browserify-aes": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz", + "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==", + "dev": true, + "requires": { + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.1.3", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "browserify-cipher": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", + "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", + "dev": true, + "requires": { + "browserify-aes": "1.1.1", + "browserify-des": "1.0.0", + "evp_bytestokey": "1.0.3" + } + }, + "browserify-des": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", + "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "randombytes": "2.0.5" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "elliptic": "6.4.0", + "inherits": "2.0.3", + "parse-asn1": "5.1.0" + } + }, + "browserify-zlib": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", + "dev": true, + "requires": { + "pako": "0.2.9" + } + }, + "buffer": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.0.tgz", + "integrity": "sha1-pyyTb3e5a/UvX357RnGAYoVR3vs=", + "dev": true, + "requires": { + "base64-js": "0.0.8", + "ieee754": "1.1.8", + "isarray": "1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "builtins": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz", + "integrity": "sha1-NVIZzWzxjb58Acx/0tznZc/cVJo=", + "dev": true + }, + "cached-path-relative": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", + "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=", + "dev": true + }, + "camel-case": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-1.2.2.tgz", + "integrity": "sha1-Gsp8TRlTWaLOmVV5NDPG5VQlEfI=", + "dev": true, + "requires": { + "sentence-case": "1.1.3", + "upper-case": "1.1.3" + } + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "2.1.1", + "map-obj": "1.0.1" + } + }, + "capture-stack-trace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chai": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-3.4.1.tgz", + "integrity": "sha1-Mwri+BkSTCYYIDb6XkOojqThvYU=", + "dev": true, + "requires": { + "assertion-error": "1.0.2", + "deep-eql": "0.1.3", + "type-detect": "1.0.0" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "change-case": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-2.1.6.tgz", + "integrity": "sha1-UUryBRMVimj+fwDf9MMy1sKY0vk=", + "dev": true, + "requires": { + "camel-case": "1.2.2", + "constant-case": "1.1.2", + "dot-case": "1.1.2", + "is-lower-case": "1.1.3", + "is-upper-case": "1.1.2", + "lower-case": "1.1.4", + "param-case": "1.1.2", + "pascal-case": "1.1.2", + "path-case": "1.1.2", + "sentence-case": "1.1.3", + "snake-case": "1.1.2", + "swap-case": "1.1.2", + "title-case": "1.1.2", + "upper-case": "1.1.3", + "upper-case-first": "1.1.2" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.1.3", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "clean-css": { + "version": "2.2.23", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-2.2.23.tgz", + "integrity": "sha1-BZC1R4tRbEkD7cLYm9P9vdKGMow=", + "dev": true, + "requires": { + "commander": "2.2.0" + }, + "dependencies": { + "commander": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.2.0.tgz", + "integrity": "sha1-F1rUuTF/P/YV8gHB5XIk9Vo+kd8=", + "dev": true + } + } + }, + "cli": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/cli/-/cli-0.6.6.tgz", + "integrity": "sha1-Aq1Eo4Cr8nraxebwzdewQ9dMU+M=", + "dev": true, + "requires": { + "exit": "0.1.2", + "glob": "3.2.11" + }, + "dependencies": { + "glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", + "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimatch": "0.3.0" + } + }, + "minimatch": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", + "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", + "dev": true, + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + } + } + }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "coffee-script": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz", + "integrity": "sha1-FQ1rTLUiiUNp7+1qIQHCC8f0pPQ=", + "dev": true + }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=", + "dev": true + }, + "combine-source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", + "integrity": "sha1-m0oJwxYDPXaODxHgKfonMOB5rZY=", + "dev": true, + "requires": { + "convert-source-map": "1.1.3", + "inline-source-map": "0.5.0", + "lodash.memoize": "3.0.4", + "source-map": "0.4.4" + }, + "dependencies": { + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "commander": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz", + "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=", + "dev": true + }, + "commondir": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", + "integrity": "sha1-ifAP3NUbUZxXhzP+xWPmptp/W+I=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.10.tgz", + "integrity": "sha1-rMO79WAsuMyYDGrIQPp9hgPj7zY=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "1.1.14", + "typedarray": "0.0.6" + } + }, + "configstore": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", + "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", + "dev": true, + "requires": { + "dot-prop": "4.2.0", + "graceful-fs": "4.1.11", + "make-dir": "1.1.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "0.1.4" + } + }, + "constant-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-1.1.2.tgz", + "integrity": "sha1-jsLKW6ND4Aqjjb9OIA/VrJB+/WM=", + "dev": true, + "requires": { + "snake-case": "1.1.2", + "upper-case": "1.1.3" + } + }, + "constants-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz", + "integrity": "sha1-kld9tSe6bEzwpFaNhLwDH0QeIfI=", + "dev": true + }, + "convert-source-map": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "dev": true + }, + "core-js": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", + "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "elliptic": "6.4.0" + } + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "1.0.0" + } + }, + "create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "ripemd160": "2.0.1", + "sha.js": "2.4.9" + } + }, + "create-hmac": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", + "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "create-hash": "1.1.3", + "inherits": "2.0.3", + "ripemd160": "2.0.1", + "safe-buffer": "5.1.1", + "sha.js": "2.4.9" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.3.0" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + } + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "1.0.0", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.0", + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "diffie-hellman": "5.0.2", + "inherits": "2.0.3", + "pbkdf2": "3.0.14", + "public-encrypt": "4.0.0", + "randombytes": "2.0.5", + "randomfill": "1.0.3" + } + }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "dev": true + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "1.0.2" + } + }, + "d3-array": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.0.1.tgz", + "integrity": "sha1-N1wCh0/NlsFu2fG89bSnvlPzWOc=" + }, + "d3-collection": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/d3-collection/-/d3-collection-1.0.4.tgz", + "integrity": "sha1-NC39EoN8kJdPM/HMCnha6lcNzcI=" + }, + "d3-color": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.0.3.tgz", + "integrity": "sha1-vHZD/KjlOoNH4vva/6I2eWtYUJs=" + }, + "d3-dispatch": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.1.tgz", + "integrity": "sha1-S9ZaQ87P9DGN653yRVKqi/KBqEA=" + }, + "d3-ease": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.3.tgz", + "integrity": "sha1-aL+8NJM4o4DETYrMT7wzBKotjA4=" + }, + "d3-format": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-1.0.2.tgz", + "integrity": "sha1-E4YYMgtLvrQ7XA/zBRkHn7vXN14=" + }, + "d3-interpolate": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.1.5.tgz", + "integrity": "sha1-aeCZ/zkhRxblY8muw+qdHqS4p58=", + "requires": { + "d3-color": "1.0.3" + } + }, + "d3-scale": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-1.0.3.tgz", + "integrity": "sha1-T56PDMLqDzkl/wSsJ63AkEX6TJA=", + "requires": { + "d3-array": "1.0.1", + "d3-collection": "1.0.4", + "d3-color": "1.0.3", + "d3-format": "1.0.2", + "d3-interpolate": "1.1.5", + "d3-time": "1.0.7", + "d3-time-format": "2.1.0" + } + }, + "d3-selection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-1.0.2.tgz", + "integrity": "sha1-rmYq/UcCrJxdoDmyEHoXZPockHA=" + }, + "d3-time": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-1.0.7.tgz", + "integrity": "sha1-lMr27bt4ebuAnQ0fdXK8SEgvcnA=" + }, + "d3-time-format": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.1.0.tgz", + "integrity": "sha512-mqTsfDTylgwE3YE/VNs9oB2OGX274fO0B5j1irbgLQI+X3FPoJg25pesNxrcdZ2nBeRx/6sHDJlDyMIjWL0BGQ==", + "requires": { + "d3-time": "1.0.7" + } + }, + "d3-timer": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.7.tgz", + "integrity": "sha512-vMZXR88XujmG/L5oB96NNKH5lCWwiLM/S2HyyAQLcjWJCloK5shxta4CwOFYLZoY3AWX73v8Lgv4cCAdWtRmOA==" + }, + "d3-transition": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-1.0.3.tgz", + "integrity": "sha1-kdyYa92zCXNjkyCoXbcs5KsaJ7s=", + "requires": { + "d3-color": "1.0.3", + "d3-dispatch": "1.0.1", + "d3-ease": "1.0.3", + "d3-interpolate": "1.1.5", + "d3-selection": "1.0.2", + "d3-timer": "1.0.7" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "dateformat": { + "version": "1.0.2-1.2.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz", + "integrity": "sha1-sCIMAt6YYXQztyhRz0fePfLNvuk=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-eql": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "dev": true, + "requires": { + "type-detect": "0.1.1" + }, + "dependencies": { + "type-detect": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", + "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", + "dev": true + } + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "dev": true + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "deps-sort": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-1.3.9.tgz", + "integrity": "sha1-Kd//U+F7Nq7K51MK27v2IsLtGnE=", + "dev": true, + "requires": { + "JSONStream": "1.3.1", + "shasum": "1.0.2", + "subarg": "1.0.0", + "through2": "1.1.1" + } + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "detective": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.5.0.tgz", + "integrity": "sha1-blqMaybmx6JUsca210kNmOyR7dE=", + "dev": true, + "requires": { + "acorn": "4.0.13", + "defined": "1.0.0" + } + }, + "diff": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", + "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", + "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "miller-rabin": "4.0.1", + "randombytes": "2.0.5" + } + }, + "domain-browser": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", + "dev": true + }, + "dot-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-1.1.2.tgz", + "integrity": "sha1-HnOCaQDeKNbeVIC8HeMdCEKwa+w=", + "dev": true, + "requires": { + "sentence-case": "1.1.3" + } + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "1.0.1" + } + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true, + "requires": { + "readable-stream": "1.1.14" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", + "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=", + "dev": true + }, + "estree-walker": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.2.1.tgz", + "integrity": "sha1-va/oCVOD2EFNXcLs9MkXO225QS4=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "dev": true, + "requires": { + "duplexer": "0.1.1", + "from": "0.1.7", + "map-stream": "0.1.0", + "pause-stream": "0.0.11", + "split": "0.3.3", + "stream-combiner": "0.0.4", + "through": "2.3.8" + } + }, + "eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", + "dev": true + }, + "events": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/events/-/events-1.0.2.tgz", + "integrity": "sha1-dYSdz+k9EPsFfDAFWv29UdBqjiQ=", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "1.3.4", + "safe-buffer": "5.1.1" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "2.2.3" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "findup-sync": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz", + "integrity": "sha1-fz56l7gjksZTvwZYm9hRkOk8NoM=", + "dev": true, + "requires": { + "glob": "3.2.11", + "lodash": "2.4.2" + }, + "dependencies": { + "glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", + "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimatch": "0.3.0" + } + }, + "lodash": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + }, + "minimatch": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", + "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", + "dev": true, + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + } + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.7.0", + "node-pre-gyp": "0.6.39" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "1.0.2", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "dev": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "getobject": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", + "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", + "dev": true + }, + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, + "requires": { + "graceful-fs": "1.2.3", + "inherits": "1.0.2", + "minimatch": "0.2.14" + }, + "dependencies": { + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + } + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "global-dirs": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.0.tgz", + "integrity": "sha1-ENNAOeDfBCcuJizyQiT3IJQ0308=", + "dev": true, + "requires": { + "ini": "1.3.4" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.0", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "growl": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.8.1.tgz", + "integrity": "sha1-Sy3sjZB+k9szZiTc7AGDUC+MlCg=", + "dev": true + }, + "grunt": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz", + "integrity": "sha1-VpN81RlDJK3/bSB2MYMqnWuk5/A=", + "dev": true, + "requires": { + "async": "0.1.22", + "coffee-script": "1.3.3", + "colors": "0.6.2", + "dateformat": "1.0.2-1.2.3", + "eventemitter2": "0.4.14", + "exit": "0.1.2", + "findup-sync": "0.1.3", + "getobject": "0.1.0", + "glob": "3.1.21", + "grunt-legacy-log": "0.1.3", + "grunt-legacy-util": "0.2.0", + "hooker": "0.2.3", + "iconv-lite": "0.2.11", + "js-yaml": "2.0.5", + "lodash": "0.9.2", + "minimatch": "0.2.14", + "nopt": "1.0.10", + "rimraf": "2.2.8", + "underscore.string": "2.2.1", + "which": "1.0.9" + }, + "dependencies": { + "lodash": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz", + "integrity": "sha1-jzSZxSRdNG1oLlsNO0B2fgnxqSw=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + } + } + }, + "grunt-browserify": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/grunt-browserify/-/grunt-browserify-3.8.0.tgz", + "integrity": "sha1-DQDYPZJXgXXN6oY/v4YOPVYhxKM=", + "dev": true, + "requires": { + "async": "0.9.2", + "browserify": "10.2.6", + "glob": "5.0.15", + "lodash": "3.10.1", + "resolve": "1.5.0", + "watchify": "3.9.0" + }, + "dependencies": { + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", + "dev": true + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", + "dev": true + } + } + }, + "grunt-contrib-uglify": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-0.9.1.tgz", + "integrity": "sha1-HrhCAAnxXtGpc2gHdHmrJd7SjRs=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "lodash": "3.10.1", + "maxmin": "1.1.0", + "uglify-js": "2.8.29", + "uri-path": "0.0.2" + }, + "dependencies": { + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", + "dev": true + } + } + }, + "grunt-legacy-log": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz", + "integrity": "sha1-7ClCboAwIa9ZAp+H0vnNczWgVTE=", + "dev": true, + "requires": { + "colors": "0.6.2", + "grunt-legacy-log-utils": "0.1.1", + "hooker": "0.2.3", + "lodash": "2.4.2", + "underscore.string": "2.3.3" + }, + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + }, + "underscore.string": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", + "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=", + "dev": true + } + } + }, + "grunt-legacy-log-utils": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz", + "integrity": "sha1-wHBrndkGThFvNvI/5OawSGcsD34=", + "dev": true, + "requires": { + "colors": "0.6.2", + "lodash": "2.4.2", + "underscore.string": "2.3.3" + }, + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + }, + "underscore.string": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", + "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=", + "dev": true + } + } + }, + "grunt-legacy-util": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz", + "integrity": "sha1-kzJIhNv343qf98Am3/RR2UqeVUs=", + "dev": true, + "requires": { + "async": "0.1.22", + "exit": "0.1.2", + "getobject": "0.1.0", + "hooker": "0.2.3", + "lodash": "0.9.2", + "underscore.string": "2.2.1", + "which": "1.0.9" + }, + "dependencies": { + "lodash": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz", + "integrity": "sha1-jzSZxSRdNG1oLlsNO0B2fgnxqSw=", + "dev": true + } + } + }, + "gzip-size": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-1.0.0.tgz", + "integrity": "sha1-Zs+LEBBHInuVus5uodoMF37Vwi8=", + "dev": true, + "requires": { + "browserify-zlib": "0.1.4", + "concat-stream": "1.4.10" + } + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "dev": true, + "requires": { + "function-bind": "1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.0", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", + "dev": true + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "dev": true + }, + "html-minifier": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-0.6.9.tgz", + "integrity": "sha1-UQXcI29efhqLplHUq5gThvx6vlM=", + "dev": true, + "requires": { + "change-case": "2.1.6", + "clean-css": "2.2.23", + "cli": "0.6.6", + "relateurl": "0.2.7", + "uglify-js": "2.4.24" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "source-map": { + "version": "0.1.34", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.34.tgz", + "integrity": "sha1-p8/omux7FoLDsZjQrPtH19CQVms=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + }, + "uglify-js": { + "version": "2.4.24", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.4.24.tgz", + "integrity": "sha1-+tV1XB4Vd2WLsG/5q25UjJW+vW4=", + "dev": true, + "requires": { + "async": "0.2.10", + "source-map": "0.1.34", + "uglify-to-browserify": "1.0.2", + "yargs": "3.5.4" + } + }, + "yargs": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.5.4.tgz", + "integrity": "sha1-2K/49mXpTDS9JZvevRv68N3TU2E=", + "dev": true, + "requires": { + "camelcase": "1.2.1", + "decamelize": "1.2.0", + "window-size": "0.1.0", + "wordwrap": "0.0.2" + } + } + } + }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", + "dev": true + }, + "http-browserify": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz", + "integrity": "sha1-M3la3nLfiKz7/TZ3PO/tp2RzWyA=", + "dev": true, + "requires": { + "Base64": "0.2.1", + "inherits": "2.0.3" + } + }, + "https-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", + "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", + "dev": true + }, + "iconv-lite": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz", + "integrity": "sha1-HOYKOleGSiktEyH/RgnKS7llrcg=", + "dev": true + }, + "ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=", + "dev": true + }, + "ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "dev": true + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "dev": true + }, + "inline-source-map": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz", + "integrity": "sha1-Skxd2OT7Xps82mDIIt+tyu5m4K8=", + "dev": true, + "requires": { + "source-map": "0.4.4" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "insert-module-globals": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.6.3.tgz", + "integrity": "sha1-IGOOKaMPntHKLjqCX7wsulJG3fw=", + "dev": true, + "requires": { + "combine-source-map": "0.6.1", + "concat-stream": "1.4.10", + "is-buffer": "1.1.6", + "JSONStream": "1.3.1", + "lexical-scope": "1.2.0", + "process": "0.11.10", + "through2": "1.1.1", + "xtend": "4.0.1" + } + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "dev": true, + "requires": { + "loose-envify": "1.3.1" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "1.10.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "dev": true, + "requires": { + "global-dirs": "0.1.0", + "is-path-inside": "1.0.0" + } + }, + "is-lower-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz", + "integrity": "sha1-fhR75HaNxGbbO/shzGCzHmrWk5M=", + "dev": true, + "requires": { + "lower-case": "1.1.4" + } + }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-path-inside": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-upper-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz", + "integrity": "sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8=", + "dev": true, + "requires": { + "upper-case": "1.1.3" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "jade": { + "version": "0.26.3", + "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz", + "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=", + "dev": true, + "requires": { + "commander": "0.6.1", + "mkdirp": "0.3.0" + }, + "dependencies": { + "commander": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", + "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=", + "dev": true + }, + "mkdirp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=", + "dev": true + } + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz", + "integrity": "sha1-olrmUJmZ6X3yeMZxnaEb0Gh3Q6g=", + "dev": true, + "requires": { + "argparse": "0.1.16", + "esprima": "1.0.4" + } + }, + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + }, + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "dev": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "dev": true, + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "labeled-stream-splicer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-1.0.2.tgz", + "integrity": "sha1-RhUzFTd4SYHo/SZOHzpDTE4N3WU=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "isarray": "0.0.1", + "stream-splicer": "1.3.2" + } + }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true, + "requires": { + "package-json": "4.0.1" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "lexical-scope": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", + "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=", + "dev": true, + "requires": { + "astw": "2.2.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "dev": true, + "requires": { + "lodash._basecopy": "3.0.1", + "lodash.keys": "3.1.2" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._bindcallback": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", + "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", + "dev": true + }, + "lodash._createassigner": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", + "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", + "dev": true, + "requires": { + "lodash._bindcallback": "3.0.1", + "lodash._isiterateecall": "3.0.9", + "lodash.restparam": "3.6.1" + } + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash.assign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", + "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", + "dev": true, + "requires": { + "lodash._baseassign": "3.2.0", + "lodash._createassigner": "3.1.1", + "lodash.keys": "3.1.2" + } + }, + "lodash.defaults": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-3.1.2.tgz", + "integrity": "sha1-xzCLGNv4vJNy1wGnNJPGEZK9Liw=", + "dev": true, + "requires": { + "lodash.assign": "3.2.0", + "lodash.restparam": "3.6.1" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", + "dev": true + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "3.0.2" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" + } + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true + }, + "macgyver": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/macgyver/-/macgyver-1.10.1.tgz", + "integrity": "sha1-sJ0VmdizbtWxb1lYlRXZ0UvC/Yg=", + "dev": true + }, + "magic-string": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.16.0.tgz", + "integrity": "sha1-lw67DacZMwEoX7GqZQ85vdgetFo=", + "dev": true, + "requires": { + "vlq": "0.2.3" + } + }, + "make-dir": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz", + "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==", + "dev": true, + "requires": { + "pify": "3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", + "dev": true + }, + "marked": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.5.tgz", + "integrity": "sha1-QROhWsXXvKFYpargciRYe5+hW5Q=", + "dev": true + }, + "maxmin": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-1.1.0.tgz", + "integrity": "sha1-cTZehKmd2Piz99X94vANHn9zvmE=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "figures": "1.7.0", + "gzip-size": "1.0.0", + "pretty-bytes": "1.0.4" + } + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + }, + "dependencies": { + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + } + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0" + } + }, + "minimalistic-assert": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", + "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mocha": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.2.5.tgz", + "integrity": "sha1-07cqT+SeyUOTU/GsiT28Qw2ZMUA=", + "dev": true, + "requires": { + "commander": "2.3.0", + "debug": "2.0.0", + "diff": "1.4.0", + "escape-string-regexp": "1.0.2", + "glob": "3.2.3", + "growl": "1.8.1", + "jade": "0.26.3", + "mkdirp": "0.5.0", + "supports-color": "1.2.1" + }, + "dependencies": { + "debug": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.0.0.tgz", + "integrity": "sha1-ib2d9nMrUSVrxnBTQrugLtEhMe8=", + "dev": true, + "requires": { + "ms": "0.6.2" + } + }, + "escape-string-regexp": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz", + "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=", + "dev": true + }, + "glob": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.3.tgz", + "integrity": "sha1-4xPusknHr/qlxHUoaw4RW1mDlGc=", + "dev": true, + "requires": { + "graceful-fs": "2.0.3", + "inherits": "2.0.3", + "minimatch": "0.2.14" + } + }, + "graceful-fs": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz", + "integrity": "sha1-fNLNsiiko/Nule+mzBQt59GhNtA=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + }, + "mkdirp": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", + "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz", + "integrity": "sha1-2JwhJMb9wTU9Zai3e/GqxLGTcIw=", + "dev": true + }, + "supports-color": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.1.tgz", + "integrity": "sha1-Eu4hUHCGzZjBBY2ewPSsR2t687I=", + "dev": true + } + } + }, + "module-deps": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", + "integrity": "sha1-6nXK+RmQkNJbDVUStaysuW5/h/M=", + "dev": true, + "requires": { + "browser-resolve": "1.11.2", + "concat-stream": "1.4.10", + "defined": "1.0.0", + "detective": "4.5.0", + "duplexer2": "0.0.2", + "inherits": "2.0.3", + "JSONStream": "1.3.1", + "parents": "1.0.1", + "readable-stream": "1.1.14", + "resolve": "1.5.0", + "stream-combiner2": "1.0.2", + "subarg": "1.0.0", + "through2": "1.1.1", + "xtend": "4.0.1" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "nan": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", + "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=", + "dev": true, + "optional": true + }, + "nodemon": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.12.1.tgz", + "integrity": "sha1-mWpW3EnZ8Wu/G3ik3gjxNjSzh40=", + "dev": true, + "requires": { + "chokidar": "1.7.0", + "debug": "2.6.9", + "es6-promise": "3.3.1", + "ignore-by-default": "1.0.1", + "lodash.defaults": "3.1.2", + "minimatch": "3.0.4", + "ps-tree": "1.1.0", + "touch": "3.1.0", + "undefsafe": "0.0.3", + "update-notifier": "2.3.0" + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "requires": { + "abbrev": "1.1.1" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, + "npm-watch": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/npm-watch/-/npm-watch-0.1.7.tgz", + "integrity": "sha1-gAYagjdjv/zWzuvxPbCelLru4To=", + "dev": true, + "requires": { + "nodemon": "1.12.1", + "through2": "2.0.3" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "2.3.3", + "xtend": "4.0.1" + } + } + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-browserify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", + "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "outpipe": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz", + "integrity": "sha1-UM+GFjZeh+Ax4ppeyTOaPaRyX6I=", + "dev": true, + "requires": { + "shell-quote": "1.6.1" + }, + "dependencies": { + "shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "dev": true, + "requires": { + "array-filter": "0.0.1", + "array-map": "0.0.0", + "array-reduce": "0.0.0", + "jsonify": "0.0.0" + } + } + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "6.7.1", + "registry-auth-token": "3.3.1", + "registry-url": "3.1.0", + "semver": "5.4.1" + } + }, + "pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", + "dev": true + }, + "param-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-1.1.2.tgz", + "integrity": "sha1-3LCRpDwlm5Io8cNB57akTqC/l0M=", + "dev": true, + "requires": { + "sentence-case": "1.1.3" + } + }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "dev": true, + "requires": { + "path-platform": "0.11.15" + } + }, + "parse-asn1": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", + "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", + "dev": true, + "requires": { + "asn1.js": "4.9.2", + "browserify-aes": "1.1.1", + "create-hash": "1.1.3", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.14" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, + "pascal-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-1.1.2.tgz", + "integrity": "sha1-Pl1kogBDgwp8STRMLXS0G+DJyZs=", + "dev": true, + "requires": { + "camel-case": "1.2.2", + "upper-case-first": "1.1.2" + } + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/path-case/-/path-case-1.1.2.tgz", + "integrity": "sha1-UM5roNO+090LXCqcRVNpdDRAlRQ=", + "dev": true, + "requires": { + "sentence-case": "1.1.3" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true, + "requires": { + "through": "2.3.8" + } + }, + "pbkdf2": { + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", + "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", + "dev": true, + "requires": { + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "ripemd160": "2.0.1", + "safe-buffer": "5.1.1", + "sha.js": "2.4.9" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-bytes": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", + "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", + "dev": true, + "requires": { + "get-stdin": "4.0.1", + "meow": "3.7.0" + } + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "ps-tree": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", + "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", + "dev": true, + "requires": { + "event-stream": "3.3.4" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", + "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.1.3", + "parse-asn1": "5.1.0", + "randombytes": "2.0.5" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "randombytes": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", + "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "randomfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz", + "integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==", + "dev": true, + "requires": { + "randombytes": "2.0.5", + "safe-buffer": "5.1.1" + } + }, + "rc": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz", + "integrity": "sha1-2M6ctX6NZNnHut2YdsfDTL48cHc=", + "dev": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "read-only-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz", + "integrity": "sha1-Xad8eZ7ROI0++IoYRxu1kk+KC6E=", + "dev": true, + "requires": { + "readable-stream": "1.1.14", + "readable-wrap": "1.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "readable-wrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/readable-wrap/-/readable-wrap-1.0.0.tgz", + "integrity": "sha1-O1ohHGMeEjA6VJkcgGwX564ga/8=", + "dev": true, + "requires": { + "readable-stream": "1.1.14" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.3", + "set-immediate-shim": "1.0.1" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "2.1.0", + "strip-indent": "1.0.1" + } + }, + "regenerate": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==", + "dev": true + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "private": "0.1.8" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "1.3.3", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" + } + }, + "registry-auth-token": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", + "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", + "dev": true, + "requires": { + "rc": "1.2.2", + "safe-buffer": "5.1.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "1.2.2" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "0.5.0" + } + }, + "reify": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.3.8.tgz", + "integrity": "sha1-DhQgXid5f8yMOdLQzGlbVwhV47A=", + "dev": true, + "requires": { + "acorn": "3.3.0", + "acorn-es7-plugin": "1.0.18", + "ast-types": "0.9.14", + "magic-string": "0.16.0" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "resolve": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "dev": true, + "requires": { + "path-parse": "1.0.5" + } + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", + "dev": true + }, + "ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", + "dev": true, + "requires": { + "hash-base": "2.0.2", + "inherits": "2.0.3" + } + }, + "rollup": { + "version": "0.41.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.41.4.tgz", + "integrity": "sha1-qXBYAXYyn56thoVNf9TEbedSrvg=", + "dev": true, + "requires": { + "source-map-support": "0.4.18" + } + }, + "rollup-plugin-babel": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-2.6.1.tgz", + "integrity": "sha1-RwsDSGM3BF1+ij5D/F/ADo24LCY=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "object-assign": "4.1.1", + "rollup-pluginutils": "1.5.2" + } + }, + "rollup-pluginutils": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz", + "integrity": "sha1-HhVud4+UtyVb+hs9AXi+j1xVJAg=", + "dev": true, + "requires": { + "estree-walker": "0.2.1", + "minimatch": "3.0.4" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "5.4.1" + } + }, + "sentence-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-1.1.3.tgz", + "integrity": "sha1-gDSq/CFFdy06vhUJqkLJ4QQtwTk=", + "dev": true, + "requires": { + "lower-case": "1.1.4" + } + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "sha.js": { + "version": "2.4.9", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz", + "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "shasum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "dev": true, + "requires": { + "json-stable-stringify": "0.0.1", + "sha.js": "2.4.9" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-0.0.1.tgz", + "integrity": "sha1-GkEZbzwDM8SCMjWT1ohuzxU92YY=", + "dev": true + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "snake-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-1.1.2.tgz", + "integrity": "sha1-DC8l4wUVjZoY09l3BmGH/vilpmo=", + "dev": true, + "requires": { + "sentence-case": "1.1.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "dev": true + }, + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "dev": true, + "requires": { + "through": "2.3.8" + } + }, + "stream-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-1.0.0.tgz", + "integrity": "sha1-v5tKv7QrJ011FHnkTg/yZWtvEZM=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "1.1.14" + } + }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "dev": true, + "requires": { + "duplexer": "0.1.1" + } + }, + "stream-combiner2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.0.2.tgz", + "integrity": "sha1-unKmtQy/q/qVD8i8h2BL0B62BnE=", + "dev": true, + "requires": { + "duplexer2": "0.0.2", + "through2": "0.5.1" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", + "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "3.0.0" + } + }, + "xtend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=", + "dev": true + } + } + }, + "stream-http": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", + "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", + "dev": true, + "requires": { + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "stream-spec": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/stream-spec/-/stream-spec-0.3.6.tgz", + "integrity": "sha1-L92sSge/Pp+JY8Z3prWmzCEVJV4=", + "dev": true, + "requires": { + "macgyver": "1.10.1" + } + }, + "stream-splicer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-1.3.2.tgz", + "integrity": "sha1-PARBvhW5v04iYnXm3IOWR0VUZmE=", + "dev": true, + "requires": { + "indexof": "0.0.1", + "inherits": "2.0.3", + "isarray": "0.0.1", + "readable-stream": "1.1.14", + "readable-wrap": "1.0.0", + "through2": "1.1.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "stringify": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/stringify/-/stringify-3.1.0.tgz", + "integrity": "sha1-/Wh8NqktGq8JrKvJ5V1RtWcwMis=", + "dev": true, + "requires": { + "html-minifier": "0.6.9", + "stream-spec": "0.3.6", + "through": "2.3.8" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "4.0.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "dev": true, + "requires": { + "minimist": "1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "swap-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz", + "integrity": "sha1-w5IDpFhzhfrTyFCgvRvK+ggZdOM=", + "dev": true, + "requires": { + "lower-case": "1.1.4", + "upper-case": "1.1.3" + } + }, + "syntax-error": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz", + "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=", + "dev": true, + "requires": { + "acorn": "4.0.13" + } + }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "requires": { + "execa": "0.7.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-1.1.1.tgz", + "integrity": "sha1-CEfLxESfNAVXTb3M2buEG4OsNUU=", + "dev": true, + "requires": { + "readable-stream": "1.1.14", + "xtend": "4.0.1" + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "dev": true, + "requires": { + "process": "0.11.10" + } + }, + "title-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/title-case/-/title-case-1.1.2.tgz", + "integrity": "sha1-+uSmrlRr+iLQg6DuqRCkDRLtT1o=", + "dev": true, + "requires": { + "sentence-case": "1.1.3", + "upper-case": "1.1.3" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "requires": { + "nopt": "1.0.10" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "type-detect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz", + "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true + }, + "umd": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", + "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=", + "dev": true + }, + "undefsafe": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-0.0.3.tgz", + "integrity": "sha1-7Mo6A+VrmvFzhbqsgSrIO5lKli8=", + "dev": true + }, + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", + "dev": true + }, + "underscore.string": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz", + "integrity": "sha1-18D6KvXVoaZ/QlPa7pgTLnM/Dxk=", + "dev": true + }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "dev": true, + "requires": { + "crypto-random-string": "1.0.0" + } + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, + "update-notifier": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", + "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", + "dev": true, + "requires": { + "boxen": "1.2.2", + "chalk": "2.3.0", + "configstore": "3.1.1", + "import-lazy": "2.1.0", + "is-installed-globally": "0.1.0", + "is-npm": "1.0.0", + "latest-version": "3.1.0", + "semver-diff": "2.1.0", + "xdg-basedir": "3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "upper-case-first": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz", + "integrity": "sha1-XXm+3P8UQZUY/S7bCgUHybaFkRU=", + "dev": true, + "requires": { + "upper-case": "1.1.3" + } + }, + "uri-path": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-0.0.2.tgz", + "integrity": "sha1-gD6wHy/rF5J9zOD2GH5yt19T9VQ=", + "dev": true + }, + "url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "1.0.4" + } + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "vlq": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", + "dev": true + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "watchify": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/watchify/-/watchify-3.9.0.tgz", + "integrity": "sha1-8HX9LoqGrN6Eztum5cKgvt1SPZ4=", + "dev": true, + "requires": { + "anymatch": "1.3.2", + "browserify": "14.5.0", + "chokidar": "1.7.0", + "defined": "1.0.0", + "outpipe": "1.1.1", + "through2": "2.0.3", + "xtend": "4.0.1" + }, + "dependencies": { + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + } + }, + "base64-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", + "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==", + "dev": true + }, + "browser-pack": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz", + "integrity": "sha1-+GzWzvT1MAyOY+B6TVEvZfv/RTE=", + "dev": true, + "requires": { + "combine-source-map": "0.7.2", + "defined": "1.0.0", + "JSONStream": "1.3.1", + "through2": "2.0.3", + "umd": "3.0.1" + } + }, + "browserify": { + "version": "14.5.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-14.5.0.tgz", + "integrity": "sha512-gKfOsNQv/toWz+60nSPfYzuwSEdzvV2WdxrVPUbPD/qui44rAkB3t3muNtmmGYHqrG56FGwX9SUEQmzNLAeS7g==", + "dev": true, + "requires": { + "assert": "1.4.1", + "browser-pack": "6.0.2", + "browser-resolve": "1.11.2", + "browserify-zlib": "0.2.0", + "buffer": "5.0.8", + "cached-path-relative": "1.0.1", + "concat-stream": "1.5.2", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "defined": "1.0.0", + "deps-sort": "2.0.0", + "domain-browser": "1.1.7", + "duplexer2": "0.1.4", + "events": "1.1.1", + "glob": "7.1.2", + "has": "1.0.1", + "htmlescape": "1.1.1", + "https-browserify": "1.0.0", + "inherits": "2.0.3", + "insert-module-globals": "7.0.1", + "JSONStream": "1.3.1", + "labeled-stream-splicer": "2.0.0", + "module-deps": "4.1.1", + "os-browserify": "0.3.0", + "parents": "1.0.1", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "read-only-stream": "2.0.0", + "readable-stream": "2.3.3", + "resolve": "1.5.0", + "shasum": "1.0.2", + "shell-quote": "1.6.1", + "stream-browserify": "2.0.1", + "stream-http": "2.7.2", + "string_decoder": "1.0.3", + "subarg": "1.0.0", + "syntax-error": "1.3.0", + "through2": "2.0.3", + "timers-browserify": "1.4.2", + "tty-browserify": "0.0.0", + "url": "0.11.0", + "util": "0.10.3", + "vm-browserify": "0.0.4", + "xtend": "4.0.1" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "1.0.6" + } + }, + "buffer": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.0.8.tgz", + "integrity": "sha512-xXvjQhVNz50v2nPeoOsNqWCLGfiv4ji/gXZM28jnVwdLJxH4mFyqgqCKfaK9zf1KUbG6zTkjLOy7ou+jSMarGA==", + "dev": true, + "requires": { + "base64-js": "1.2.1", + "ieee754": "1.1.8" + } + }, + "combine-source-map": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", + "integrity": "sha1-CHAxKFazB6h8xKxIbzqaYq7MwJ4=", + "dev": true, + "requires": { + "convert-source-map": "1.1.3", + "inline-source-map": "0.6.2", + "lodash.memoize": "3.0.4", + "source-map": "0.5.7" + } + }, + "concat-stream": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.0.6", + "typedarray": "0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", + "dev": true + }, + "deps-sort": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", + "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", + "dev": true, + "requires": { + "JSONStream": "1.3.1", + "shasum": "1.0.2", + "subarg": "1.0.0", + "through2": "2.0.3" + } + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "requires": { + "readable-stream": "2.3.3" + } + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "insert-module-globals": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz", + "integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=", + "dev": true, + "requires": { + "combine-source-map": "0.7.2", + "concat-stream": "1.5.2", + "is-buffer": "1.1.6", + "JSONStream": "1.3.1", + "lexical-scope": "1.2.0", + "process": "0.11.10", + "through2": "2.0.3", + "xtend": "4.0.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "labeled-stream-splicer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz", + "integrity": "sha1-pS4dE4AkwAuGscDJH2d5GLiuClk=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "isarray": "0.0.1", + "stream-splicer": "2.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "module-deps": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", + "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", + "dev": true, + "requires": { + "browser-resolve": "1.11.2", + "cached-path-relative": "1.0.1", + "concat-stream": "1.5.2", + "defined": "1.0.0", + "detective": "4.5.0", + "duplexer2": "0.1.4", + "inherits": "2.0.3", + "JSONStream": "1.3.1", + "parents": "1.0.1", + "readable-stream": "2.3.3", + "resolve": "1.5.0", + "stream-combiner2": "1.1.1", + "subarg": "1.0.0", + "through2": "2.0.3", + "xtend": "4.0.1" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "dev": true + }, + "read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "dev": true, + "requires": { + "readable-stream": "2.3.3" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "dev": true, + "requires": { + "array-filter": "0.0.1", + "array-map": "0.0.0", + "array-reduce": "0.0.0", + "jsonify": "0.0.0" + } + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "dev": true, + "requires": { + "duplexer2": "0.1.4", + "readable-stream": "2.3.3" + } + }, + "stream-splicer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", + "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "2.3.3", + "xtend": "4.0.1" + } + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + } + } + }, + "which": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz", + "integrity": "sha1-RgwdoPgQED0DIam2M6+eV15kSG8=", + "dev": true + }, + "widest-line": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", + "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", + "dev": true, + "requires": { + "string-width": "1.0.2" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + } + } + } + } +} diff --git a/src/color.js b/src/color.js index a3142f0..7674c24 100644 --- a/src/color.js +++ b/src/color.js @@ -1,7 +1,8 @@ import helper from './legend'; import { dispatch } from 'd3-dispatch'; import { scaleLinear } from 'd3-scale'; -import { format } from 'd3-format'; +import { formatLocale, formatSpecifier } from 'd3-format'; + import { sum } from 'd3-array'; export default function color(){ @@ -18,10 +19,11 @@ export default function color(){ classPrefix = "", useClass = false, title = "", - labelFormat = format(".01f"), + locale = helper.d3_defaultLocale, + specifier = helper.d3_defaultFormatSpecifier, labelOffset = 10, labelAlign = "middle", - labelDelimiter = "to", + labelDelimiter = helper.d3_defaultDelimiter, labelWrap, orient = "vertical", ascending = false, @@ -31,15 +33,15 @@ export default function color(){ function legend(svg) { - const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter), + const type = helper.d3_calcType(scale, ascending, cells, labels, locale.format(specifier), labelDelimiter), legendG = svg.selectAll('g').data([scale]); legendG.enter().append('g').attr('class', classPrefix + 'legendCells'); - + if (cellFilter){ helper.d3_filterCells(type, cellFilter) } - + let cell = svg.select('.' + classPrefix + 'legendCells') .selectAll("." + classPrefix + "cell").data(type.data) @@ -171,9 +173,15 @@ export default function color(){ return legend; }; + legend.locale = function(_) { + if (!arguments.length) return locale; + locale = formatLocale(_) + return legend + }; + legend.labelFormat = function(_) { - if (!arguments.length) return labelFormat; - labelFormat = typeof(_) === 'string' ? format(_) : _; + if (!arguments.length) return legend.locale().format(specifier); + specifier = formatSpecifier(_) return legend; }; diff --git a/src/legend.js b/src/legend.js index 756d578..518c30b 100644 --- a/src/legend.js +++ b/src/legend.js @@ -1,4 +1,5 @@ import { select } from 'd3-selection' +import { format, formatPrefix } from 'd3-format' const d3_identity = (d) => d @@ -159,7 +160,7 @@ export default { d3_linearLegend(scale, cells, labelFormat) : d3_ordinalLegend(scale); //for d3.scaleSequential that doesn't have a range function - const range = scale.range && scale.range() || scale.domain() + const range = scale.range && scale.range() || scale.domain() type.labels = d3_mergeLabels(type.labels, labels, scale.domain(), range); if (ascending) { @@ -220,5 +221,14 @@ export default { cellsSvg.attr('transform', 'translate(' + xOffset + ',' + (yOffset) + ')'); } - } + }, + + d3_defaultLocale: { + format, + formatPrefix + }, + + d3_defaultFormatSpecifier: '.01f', + + d3_defaultDelimiter: 'to' } diff --git a/src/size.js b/src/size.js index 69351c9..800c90a 100644 --- a/src/size.js +++ b/src/size.js @@ -1,7 +1,7 @@ import helper from './legend'; import { dispatch } from 'd3-dispatch'; import { scaleLinear } from 'd3-scale'; -import { format } from 'd3-format'; +import { formatLocale, formatSpecifier } from 'd3-format'; import { sum, max } from 'd3-array'; export default function size(){ @@ -15,10 +15,11 @@ export default function size(){ labels = [], classPrefix = "", title = "", - labelFormat = format(".01f"), + locale = helper.d3_defaultLocale, + specifier = helper.d3_defaultFormatSpecifier, labelOffset = 10, labelAlign = "middle", - labelDelimiter = "to", + labelDelimiter = helper.d3_defaultDelimiter, labelWrap, orient = "vertical", ascending = false, @@ -28,7 +29,7 @@ export default function size(){ function legend(svg){ - const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter), + const type = helper.d3_calcType(scale, ascending, cells, labels, locale.format(specifier), labelDelimiter), legendG = svg.selectAll('g').data([scale]); if (cellFilter){ @@ -92,7 +93,7 @@ export default function size(){ const y = shape == "circle" || shape == "line" ? shapeSize[0].height/2 : 0 cellTrans = (d,i) => { const height = sum(cellSize.slice(0, i)); - + return `translate(0, ${(y + height + i*shapePadding)})`}; textTrans = (d,i) => `translate( ${(maxW + labelOffset)}, @@ -135,7 +136,7 @@ export default function size(){ cellFilter = _; return legend; }; - + legend.shape = function(_, d) { if (!arguments.length) return shape; if (_ == "rect" || _ == "circle" || _ == "line" ){ @@ -171,9 +172,15 @@ export default function size(){ return legend; }; + legend.locale = function(_) { + if (!arguments.length) return locale; + locale = formatLocale(_) + return legend + }; + legend.labelFormat = function(_) { - if (!arguments.length) return labelFormat; - labelFormat = typeof(_) === 'string' ? format(_) : _; + if (!arguments.length) return legend.locale().format(specifier); + specifier = formatSpecifier(_) return legend; }; diff --git a/src/symbol.js b/src/symbol.js index 01bc396..a0c8178 100644 --- a/src/symbol.js +++ b/src/symbol.js @@ -1,7 +1,7 @@ import helper from './legend'; import { dispatch } from 'd3-dispatch'; import { scaleLinear } from 'd3-scale'; -import { format } from 'd3-format'; +import { formatLocale, formatSpecifier } from 'd3-format'; import { sum, max } from 'd3-array'; export default function symbol(){ @@ -17,10 +17,11 @@ export default function symbol(){ labels = [], classPrefix = "", title = "", - labelFormat = format(".01f"), + locale = helper.d3_defaultLocale, + specifier = helper.d3_defaultFormatSpecifier, labelAlign = "middle", labelOffset = 10, - labelDelimiter = "to", + labelDelimiter = helper.d3_defaultDelimiter, labelWrap, orient = "vertical", ascending = false, @@ -29,7 +30,7 @@ export default function symbol(){ function legend(svg){ - const type = helper.d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter), + const type = helper.d3_calcType(scale, ascending, cells, labels, locale.format(specifier), labelDelimiter), legendG = svg.selectAll('g').data([scale]); if (cellFilter){ @@ -106,7 +107,7 @@ export default function symbol(){ } return legend; }; - + legend.cellFilter = function(_) { if (!arguments.length) return cellFilter; cellFilter = _; @@ -133,9 +134,15 @@ export default function symbol(){ return legend; }; + legend.locale = function(_) { + if (!arguments.length) return locale; + locale = formatLocale(_) + return legend + }; + legend.labelFormat = function(_) { - if (!arguments.length) return labelFormat; - labelFormat = typeof(_) === 'string' ? format(_) : _; + if (!arguments.length) return legend.locale().format(specifier); + specifier = formatSpecifier(_) return legend; }; diff --git a/test/test.js b/test/test.legendcolor.js similarity index 56% rename from test/test.js rename to test/test.legendcolor.js index fd6dd5c..1abf384 100644 --- a/test/test.js +++ b/test/test.legendcolor.js @@ -3,6 +3,7 @@ const chai = require('chai'); const { expect } = chai; import color from '../src/color'; import helper from '../src/legend'; +import { formatLocale, format } from 'd3-format' // describe('d3-legend', function () { // var d3Legend @@ -86,4 +87,67 @@ describe('d3-legend #legendColor', function() { }).to.not.throw(); expect(aLegend).to.be.an('Object'); }); + + it('should have a locale', function () { + let result = color(); + expect(result.locale).to.be.a('function'); + }); + + it('should redefine label\'s format with a string', function () { + let result = color(); + let testValue = 1.00; + let initial = result.labelFormat(); + + result.labelFormat('.2f'); + + expect(initial(testValue)).to.be.not.equal(result.labelFormat()(testValue)); + expect(result.labelFormat()(testValue)).to.be.equal('1.00'); + }); + + it('should redefine label\'s format with a format function', function () { + let result = color(); + let testValue = 1.00; + let initial = result.labelFormat(); + result.labelFormat(format('.2f')); + + expect(initial(testValue)).to.be.not.equal(result.labelFormat()(testValue)); + expect(result.labelFormat()(testValue)).to.be.equal('1.00'); + }); + + it('should redefine the locale with a new locale definition', function () { + let result = color(); + let testValue = 1.00; + + let initial = result.labelFormat(); + let frFr = { + decimal: ',', + thousands: '.', + grouping: [3], + currency: ['', '\u00a0€'], + percent: "\u202f%" + }; + + result.locale(frFr) + expect(initial(testValue)).to.be.not.equal(result.labelFormat()(testValue)); + expect(result.labelFormat()(testValue)).to.be.equal('1,0') + }) + + it('should keep the format specifier after a locale update', function () { + let result = color(); + let testValue = 1.00; + + let initial = result.labelFormat(); + let frFr = { + decimal: ',', + thousands: '.', + grouping: [3], + currency: ['', '\u00a0€'], + percent: "\u202f%" + }; + + result.labelFormat(format('.2f')); + result.locale(frFr) + expect(initial(testValue)).to.be.not.equal(result.labelFormat()(testValue)); + expect(result.labelFormat()(testValue)).to.be.equal('1,00') + }) }); diff --git a/test/test.legendsize.js b/test/test.legendsize.js new file mode 100644 index 0000000..ee83bed --- /dev/null +++ b/test/test.legendsize.js @@ -0,0 +1,75 @@ +/*eslint-env mocha*/ +const chai = require('chai'); +const { expect } = chai; +import size from '../src/size'; +import helper from '../src/legend'; +import { formatLocale, format } from 'd3-format' + +describe('d3-legend #legendSize', function() { + it('exports a function', function() { + expect(size).to.be.a('function'); + }); + + it('should have a locale', function () { + let result = size(); + expect(result.locale).to.be.a('function'); + }); + + it('should redefine label\'s format with a string', function () { + let result = size(); + let testValue = 1.00; + let initial = result.labelFormat(); + + result.labelFormat('.2f'); + + expect(initial(testValue)).to.be.not.equal(result.labelFormat()(testValue)); + expect(result.labelFormat()(testValue)).to.be.equal('1.00'); + }); + + it('should redefine label\'s format with a format function', function () { + let result = size(); + let testValue = 1.00; + let initial = result.labelFormat(); + result.labelFormat(format('.2f')); + + expect(initial(testValue)).to.be.not.equal(result.labelFormat()(testValue)); + expect(result.labelFormat()(testValue)).to.be.equal('1.00'); + }); + + it('should redefine the locale with a new locale definition', function () { + let result = size(); + let testValue = 1.00; + + let initial = result.labelFormat(); + let frFr = { + decimal: ',', + thousands: '.', + grouping: [3], + currency: ['', '\u00a0€'], + percent: "\u202f%" + }; + + result.locale(frFr) + expect(initial(testValue)).to.be.not.equal(result.labelFormat()(testValue)); + expect(result.labelFormat()(testValue)).to.be.equal('1,0') + }) + + it('should keep the format specifier after a locale update', function () { + let result = size(); + let testValue = 1.00; + + let initial = result.labelFormat(); + let frFr = { + decimal: ',', + thousands: '.', + grouping: [3], + currency: ['', '\u00a0€'], + percent: "\u202f%" + }; + + result.labelFormat(format('.2f')); + result.locale(frFr) + expect(initial(testValue)).to.be.not.equal(result.labelFormat()(testValue)); + expect(result.labelFormat()(testValue)).to.be.equal('1,00') + }) +}); diff --git a/test/test.legendsymbol.js b/test/test.legendsymbol.js new file mode 100644 index 0000000..ea097a8 --- /dev/null +++ b/test/test.legendsymbol.js @@ -0,0 +1,75 @@ +/*eslint-env mocha*/ +const chai = require('chai'); +const { expect } = chai; +import symbol from '../src/symbol'; +import helper from '../src/legend'; +import { formatLocale, format } from 'd3-format' + +describe('d3-legend #legendSymbol', function() { + it('exports a function', function() { + expect(symbol).to.be.a('function'); + }); + + it('should have a locale', function () { + let result = symbol(); + expect(result.locale).to.be.a('function'); + }); + + it('should redefine label\'s format with a string', function () { + let result = symbol(); + let testValue = 1.00; + let initial = result.labelFormat(); + + result.labelFormat('.2f'); + + expect(initial(testValue)).to.be.not.equal(result.labelFormat()(testValue)); + expect(result.labelFormat()(testValue)).to.be.equal('1.00'); + }); + + it('should redefine label\'s format with a format function', function () { + let result = symbol(); + let testValue = 1.00; + let initial = result.labelFormat(); + result.labelFormat(format('.2f')); + + expect(initial(testValue)).to.be.not.equal(result.labelFormat()(testValue)); + expect(result.labelFormat()(testValue)).to.be.equal('1.00'); + }); + + it('should redefine the locale with a new locale definition', function () { + let result = symbol(); + let testValue = 1.00; + + let initial = result.labelFormat(); + let frFr = { + decimal: ',', + thousands: '.', + grouping: [3], + currency: ['', '\u00a0€'], + percent: "\u202f%" + }; + + result.locale(frFr) + expect(initial(testValue)).to.be.not.equal(result.labelFormat()(testValue)); + expect(result.labelFormat()(testValue)).to.be.equal('1,0') + }) + + it('should keep the format specifier after a locale update', function () { + let result = symbol(); + let testValue = 1.00; + + let initial = result.labelFormat(); + let frFr = { + decimal: ',', + thousands: '.', + grouping: [3], + currency: ['', '\u00a0€'], + percent: "\u202f%" + }; + + result.labelFormat(format('.2f')); + result.locale(frFr) + expect(initial(testValue)).to.be.not.equal(result.labelFormat()(testValue)); + expect(result.labelFormat()(testValue)).to.be.equal('1,00') + }) +});