diff --git a/spec.json b/spec.json index 9bf9ddb929..a1bb1ddb7b 100644 --- a/spec.json +++ b/spec.json @@ -126,6 +126,10 @@ "default": 25, "minimum": 0, "description": "Truncate labels that are too long." + }, + "labelAngle": { + "type": "integer", + "description": "Angle by which to rotate labels. Set to 0 to force horizontal." } } }, @@ -266,6 +270,10 @@ "default": 25, "minimum": 0, "description": "Truncate labels that are too long." + }, + "labelAngle": { + "type": "integer", + "description": "Angle by which to rotate labels. Set to 0 to force horizontal." } } }, @@ -383,6 +391,10 @@ "default": 25, "minimum": 0, "description": "Truncate labels that are too long." + }, + "labelAngle": { + "type": "integer", + "description": "Angle by which to rotate labels. Set to 0 to force horizontal." } } }, @@ -481,6 +493,10 @@ "default": 12, "minimum": 0, "description": "Truncate labels that are too long." + }, + "labelAngle": { + "type": "integer", + "description": "Angle by which to rotate labels. Set to 0 to force horizontal." } } }, @@ -561,7 +577,15 @@ } } }, - "legend": {"type": "boolean","default": true}, + "legend": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A title for the legend. (Shows field name and its function by default.)" + } + } + }, "value": {"type": "integer","default": 30,"minimum": 0}, "sort": { "type": "array", @@ -702,7 +726,15 @@ } } }, - "legend": {"type": "boolean","default": true}, + "legend": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A title for the legend. (Shows field name and its function by default.)" + } + } + }, "value": {"type": "string","role": "color","default": "steelblue"}, "opacity": {"type": "number","minimum": 0,"maximum": 1}, "sort": { @@ -756,7 +788,15 @@ "supportedTypes": {"Q": 1} }, "aggregate": {"type": "string","enum": ["count"],"supportedTypes": {"N": 1,"O": 1}}, - "legend": {"type": "boolean","default": true}, + "legend": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A title for the legend. (Shows field name and its function by default.)" + } + } + }, "value": { "type": "string", "enum": ["circle","square","cross","diamond","triangle-up","triangle-down"], diff --git a/vega-lite.js b/vega-lite.js index ac70d90d55..2245587491 100644 --- a/vega-lite.js +++ b/vega-lite.js @@ -3796,6 +3796,7 @@ module.exports = (function() { return field && vlfield.isType(field, type); }; + proto.isTypes = function(et, type) { var field = this.field(et); return field && vlfield.isTypes(field, type); @@ -3829,6 +3830,10 @@ module.exports = (function() { return vlenc.isAggregate(this._enc); }; + proto.dataTable = function() { + return this.isAggregate() ? AGGREGATE : RAW; + }; + Encoding.isAggregate = function(spec) { return vlenc.isAggregate(spec.encoding); }; @@ -3849,6 +3854,26 @@ module.exports = (function() { return (this.is('bar') || this.is('area')) && this.has('color'); }; + proto.details = function() { + var encoding = this; + return this.reduce(function(refs, field, encType) { + if (!field.aggregate && (encType !== X && encType !== Y)) { + refs.push(encoding.fieldRef(encType)); + } + return refs; + }, []); + }; + + proto.facets = function() { + var encoding = this; + return this.reduce(function(refs, field, encType) { + if (!field.aggregate && (encType == ROW || encType == COL)) { + refs.push(encoding.fieldRef(encType)); + } + return refs; + }, []); + }; + proto.cardinality = function(encType, stats) { return vlfield.cardinality(this.field(encType), stats, this.config('filterNull')); }; @@ -3857,13 +3882,13 @@ module.exports = (function() { return !this.isAggregate(); }; - proto.data = function(name) { - return name ? this._data[name] : this._data; + proto.data = function() { + return this._data; }; // returns whether the encoding has values embedded proto.hasValues = function() { - var vals = this.data('values'); + var vals = this.data().values; return vals && vals.length; }; @@ -3939,59 +3964,7 @@ module.exports = (function() { return Encoding; })(); -},{"./consts":32,"./enc":34,"./field":35,"./globals":36,"./schema/schema":37,"./util":39}],15:[function(require,module,exports){ -'use strict'; - -require('../globals'); - -var util = require('../util'); - -module.exports = aggregates; - -function aggregates(dataTable, encoding, opt) { - opt = opt || {}; - - var dims = {}, meas = {}, detail = {}, facets = {}; - - encoding.forEach(function(field, encType) { - if (field.aggregate) { - if (field.aggregate === 'count') { - meas.count = {op: 'count', field: '*'}; - }else { - meas[field.aggregate + '|'+ field.name] = { - op: field.aggregate, - field: encoding.fieldRef(encType, {nofn: true}) - }; - } - } else { - dims[field.name] = encoding.fieldRef(encType); - if (encType == ROW || encType == COL) { - facets[field.name] = dims[field.name]; - }else if (encType !== X && encType !== Y) { - detail[field.name] = dims[field.name]; - } - } - }); - dims = util.vals(dims); - meas = util.vals(meas); - - if (meas.length > 0) { - if (!dataTable.transform) dataTable.transform = []; - dataTable.transform.push({ - type: 'aggregate', - groupby: dims, - fields: meas - }); - } - return { - details: util.vals(detail), - dims: dims, - facets: util.vals(facets), - aggregated: meas.length > 0 - }; -} - -},{"../globals":36,"../util":39}],16:[function(require,module,exports){ +},{"./consts":29,"./enc":31,"./field":32,"./globals":33,"./schema/schema":35,"./util":37}],15:[function(require,module,exports){ 'use strict'; require('../globals'); @@ -4019,10 +3992,12 @@ axis.def = function(name, encoding, layout, stats, opt) { // Add axis label custom scale (for bin / time) def = axis.labels.scale(def, encoding, name); def = axis.labels.format(def, name, encoding, stats); + def = axis.labels.angle(def, encoding, name); // for x-axis, set ticks for Q or rotate scale for ordinal scale if (name == X) { - if (encoding.isDimension(X) || encoding.isType(X, T)) { + if ((encoding.isDimension(X) || encoding.isType(X, T)) && + !('angle' in getter(def, ['properties', 'labels']))) { // TODO(kanitw): Jul 19, 2015 - #506 add condition for rotation def = axis.labels.rotate(def); } else { // Q @@ -4191,6 +4166,14 @@ axis.labels.format = function (def, name, encoding, stats) { return def; }; +axis.labels.angle = function(def, encoding, name) { + var angle = encoding.axis(name).labelAngle; + if (typeof angle === 'undefined') return def; + + setter(def, ['properties', 'labels', 'angle', 'value'], angle); + return def; +}; + axis.labels.rotate = function(def) { var align = def.orient ==='top' ? 'left' : 'right'; setter(def, ['properties','labels', 'angle', 'value'], 270); @@ -4212,33 +4195,7 @@ axis.titleOffset = function (encoding, layout, name) { return getter(layout, [name, 'axisTitleOffset']); }; -},{"../globals":36,"../util":39,"./time":31}],17:[function(require,module,exports){ -'use strict'; - -require('../globals'); - -module.exports = binning; - -function binning(dataTable, encoding, opt) { - opt = opt || {}; - - if (!dataTable.transform) dataTable.transform = []; - - encoding.forEach(function(field, encType) { - if (encoding.bin(encType)) { - dataTable.transform.push({ - type: 'bin', - field: encoding.fieldRef(encType, {nofn: true}), - output: encoding.fieldRef(encType), - maxbins: encoding.bin(encType).maxbins - }); - } - }); - - return dataTable; -} - -},{"../globals":36}],18:[function(require,module,exports){ +},{"../globals":33,"../util":37,"./time":28}],16:[function(require,module,exports){ 'use strict'; var summary = module.exports = require('datalib/src/stats').summary; @@ -4249,13 +4206,11 @@ var compiler = module.exports = {}; var Encoding = require('../Encoding'), axis = compiler.axis = require('./axis'), - filter = compiler.filter = require('./filter'), legend = compiler.legend = require('./legend'), marks = compiler.marks = require('./marks'), scale = compiler.scale = require('./scale'); -compiler.aggregate = require('./aggregate'); -compiler.bin = require('./bin'); +compiler.data = require('./data'); compiler.facet = require('./facet'); compiler.group = require('./group'); compiler.layout = require('./layout'); @@ -4263,7 +4218,6 @@ compiler.sort = require('./sort'); compiler.stack = require('./stack'); compiler.style = require('./style'); compiler.subfacet = require('./subfacet'); -compiler.template = require('./template'); compiler.time = require('./time'); compiler.compile = function (spec, stats, theme) { @@ -4274,29 +4228,38 @@ compiler.shorthand = function (shorthand, stats, config, theme) { return compiler.compileEncoding(Encoding.fromShorthand(shorthand, config, theme), stats); }; + compiler.compileEncoding = function (encoding, stats) { // no need to pass stats if you pass in the data if (!stats && encoding.hasValues()) { - stats = summary(encoding.data('values')).reduce(function(s, p) { + stats = summary(encoding.data().values).reduce(function(s, p) { s[p.field] = p; return s; }, {}); } - var layout = compiler.layout(encoding, stats), - spec = compiler.template(encoding, layout, stats); + var layout = compiler.layout(encoding, stats); - // .data related stuff - var rawTable = spec.data[0], - dataTable = spec.data[1]; + var spec = { + width: layout.width, + height: layout.height, + padding: 'auto', + data: compiler.data(encoding), + // global scales contains only time unit scales + scales: compiler.time.scales(encoding) + }; - rawTable = filter.addFilters(rawTable, encoding); // modify rawTable - spec = compiler.time(spec, encoding); // modify rawTable, add scales - dataTable = compiler.bin(dataTable, encoding); // modify dataTable - var aggResult = compiler.aggregate(dataTable, encoding); // modify dataTable - var sorting = compiler.sort(spec.data, encoding, stats); // append new data + // FIXME remove compiler.sort after migrating to vega 2. + spec.data = compiler.sort(spec.data, encoding, stats); // append new data // marks + + // TODO this line is temporary and should be refactored + spec.marks = [compiler.group.def('cell', { + width: layout.cellWidth ? {value: layout.cellWidth} : undefined, + height: layout.cellHeight ? {value: layout.cellHeight} : undefined + })]; + var style = compiler.style(encoding, stats), group = spec.marks[0], mdefs = marks.def(encoding, layout, style, stats), @@ -4310,11 +4273,10 @@ compiler.compileEncoding = function (encoding, stats) { // handle subfacets - var details = aggResult.details, - hasDetails = details && details.length > 0, - stack = hasDetails && compiler.stack(spec.data, encoding, mdef, aggResult.facets); // modify spec.data, mdef.{from,properties} + var details = encoding.details(), + stack = encoding.isAggregate() && details.length > 0 && compiler.stack(spec.data, encoding, mdef); // modify spec.data, mdef.{from,properties} - if (hasDetails && (stack || lineType)) { + if (details.length > 0 && (stack || lineType)) { //subfacet to group stack / line together in one group compiler.subfacet(group, mdef, details, stack, encoding); } @@ -4335,10 +4297,10 @@ compiler.compileEncoding = function (encoding, stats) { // Small Multiples if (encoding.has(ROW) || encoding.has(COL)) { - spec = compiler.facet(group, encoding, layout, style, sorting, spec, singleScaleNames, stack, stats); + spec = compiler.facet(group, encoding, layout, spec, singleScaleNames, stack, stats); spec.legends = legend.defs(encoding, style); } else { - group.scales = scale.defs(singleScaleNames, encoding, layout, stats, style, sorting, {stack: stack}); + group.scales = scale.defs(singleScaleNames, encoding, layout, stats, {stack: stack}); group.axes = []; if (encoding.has(X)) group.axes.push(axis.def(X, encoding, layout, stats)); @@ -4347,13 +4309,209 @@ compiler.compileEncoding = function (encoding, stats) { group.legends = legend.defs(encoding, style); } - filter.filterLessThanZero(dataTable, encoding); + return spec; }; -},{"../Encoding":14,"../globals":36,"./aggregate":15,"./axis":16,"./bin":17,"./facet":19,"./filter":20,"./group":21,"./layout":22,"./legend":23,"./marks":24,"./scale":25,"./sort":26,"./stack":27,"./style":28,"./subfacet":29,"./template":30,"./time":31,"datalib/src/stats":11}],19:[function(require,module,exports){ +},{"../Encoding":14,"../globals":33,"./axis":15,"./data":17,"./facet":18,"./group":19,"./layout":20,"./legend":21,"./marks":22,"./scale":23,"./sort":24,"./stack":25,"./style":26,"./subfacet":27,"./time":28,"datalib/src/stats":11}],17:[function(require,module,exports){ +'use strict'; + +require('../globals'); + +module.exports = data; + +var vlfield = require('../field'), + util = require('../util'), + time = require('./time'); + +function data(encoding) { + var def = [data.raw(encoding)]; + + var aggregate = data.aggregate(encoding); + if (aggregate) def.push(data.aggregate(encoding)); + + // TODO add "having" filter here () + + // append non-zero filter at the end for the data table + data.filterNonZeroForLog(def[def.length - 1], encoding); + + return def; +} + +data.raw = function(encoding) { + var raw = {name: RAW}; + + // Data source (url or inline) + if (encoding.hasValues()) { + raw.values = encoding.data().values; + } else { + raw.url = encoding.data().url; + raw.format = {type: encoding.data().formatType}; + } + + // Set format.parse if needed + var parse = data.raw.formatParse(encoding); + if (parse) { + raw.format = raw.format || {}; + raw.format.parse = parse; + } + + raw.transform = data.raw.transform(encoding); + return raw; +}; + +data.raw.formatParse = function(encoding) { + var parse; + + encoding.forEach(function(field) { + if (field.type == T) { + parse = parse || {}; + parse[field.name] = 'date'; + } else if (field.type == Q) { + if (vlfield.isCount(field)) return; + parse = parse || {}; + parse[field.name] = 'number'; + } + }); + + return parse; +}; + +data.raw.transform = function(encoding) { + // time and bin should come before filter so we can filter by time and bin + return data.raw.transform.time(encoding).concat( + data.raw.transform.bin(encoding) + ).concat( + data.raw.transform.filter(encoding) + ); +}; + +var BINARY = { + '>': true, + '>=': true, + '=': true, + '!=': true, + '<': true, + '<=': true +}; + +data.raw.transform.time = function(encoding) { + return encoding.reduce(function(transform, field, encType) { + if (field.type === T && field.timeUnit) { + transform.push({ + type: 'formula', + field: encoding.fieldRef(encType), + expr: time.formula(field.timeUnit, encoding.fieldRef(encType, {nofn: true, d: true})) + }); + } + return transform; + }, []); +}; + +data.raw.transform.bin = function(encoding) { + return encoding.reduce(function(transform, field, encType) { + if (encoding.bin(encType)) { + transform.push({ + type: 'bin', + field: encoding.fieldRef(encType, {nofn: true}), + output: encoding.fieldRef(encType), + maxbins: encoding.bin(encType).maxbins + }); + } + return transform; + }, []); +}; + +data.raw.transform.filter = function(encoding) { + var filters = encoding.filter().reduce(function(f, filter) { + var condition = ''; + var operator = filter.operator; + var operands = filter.operands; + + var d = 'd.' + (encoding._vega2 ? '' : 'data.'); + + if (BINARY[operator]) { + // expects a field and a value + if (operator === '=') { + operator = '=='; + } + + var op1 = operands[0]; + var op2 = operands[1]; + condition = d + op1 + ' ' + operator + ' ' + op2; + } else if (operator === 'notNull') { + // expects a number of fields + for (var j=0; j 0) { + return { + name: AGGREGATE, + source: RAW, + transform: [{ + type: 'aggregate', + groupby: dims, + fields: meas + }] + }; + } + + return null; +}; + +data.filterNonZeroForLog = function(dataTable, encoding) { + encoding.forEach(function(field, encType) { + if (encoding.scale(encType).type === 'log') { + dataTable.transform.push({ + type: 'filter', + test: encoding.fieldRef(encType, {d: 1}) + ' > 0' + }); + } + }); +}; + +},{"../field":32,"../globals":33,"../util":37,"./time":28}],18:[function(require,module,exports){ 'use strict'; require('../globals'); @@ -4366,7 +4524,7 @@ var axis = require('./axis'), module.exports = faceting; -function faceting(group, encoding, layout, style, sorting, spec, singleScaleNames, stack, stats) { +function faceting(group, encoding, layout, spec, singleScaleNames, stack, stats) { var enter = group.properties.enter; var facetKeys = [], cellAxes = [], from, axesGrp; @@ -4458,8 +4616,6 @@ function faceting(group, encoding, layout, style, sorting, spec, singleScaleName encoding, layout, stats, - style, - sorting, {stack: stack, facet: true} )); // row/col scales + cell scales @@ -4474,81 +4630,7 @@ function faceting(group, encoding, layout, style, sorting, spec, singleScaleName return spec; } -},{"../globals":36,"../util":39,"./axis":16,"./group":21,"./scale":25}],20:[function(require,module,exports){ -'use strict'; - -require('../globals'); - -var filter = module.exports = {}; - -var BINARY = { - '>': true, - '>=': true, - '=': true, - '!=': true, - '<': true, - '<=': true -}; - -filter.addFilters = function(rawTable, encoding) { - var filters = encoding.filter(); // apply filters to raw data before aggregation - - if (!rawTable.transform) - rawTable.transform = []; - - // add custom filters - for (var i=0, l=filters.length; i0' - }); - } - }); -}; - -},{"../globals":36}],21:[function(require,module,exports){ +},{"../globals":33,"../util":37,"./axis":15,"./group":19,"./scale":23}],19:[function(require,module,exports){ 'use strict'; module.exports = { @@ -4575,7 +4657,7 @@ function groupdef(name, opt) { }; } -},{}],22:[function(require,module,exports){ +},{}],20:[function(require,module,exports){ 'use strict'; require('../globals'); @@ -4732,7 +4814,7 @@ function offset(encoding, stats, layout) { return layout; } -},{"../globals":36,"../util":39,"./time":31,"d3-format":5}],23:[function(require,module,exports){ +},{"../globals":33,"../util":37,"./time":28,"d3-format":5}],21:[function(require,module,exports){ 'use strict'; require('../globals'); @@ -4776,7 +4858,7 @@ legend.defs = function(encoding, style) { legend.def = function(name, encoding, def, style) { var timeUnit = encoding.field(name).timeUnit; - def.title = encoding.fieldTitle(name); + def.title = legend.title(name, encoding); def = legend.style(name, encoding, def, style); if (encoding.isType(name, T) && @@ -4837,7 +4919,16 @@ legend.style = function(name, e, def, style) { } return def; }; -},{"../globals":36,"../util":39,"./time":31}],24:[function(require,module,exports){ + +legend.title = function(name, encoding) { + var leg = encoding.field(name).legend; + + if (leg.title) return leg.title; + + return encoding.fieldTitle(name); +}; + +},{"../globals":33,"../util":37,"./time":28}],22:[function(require,module,exports){ 'use strict'; require('../globals'); @@ -4847,7 +4938,8 @@ var marks = module.exports = {}; marks.def = function(encoding, layout, style, stats) { var defs = [], - mark = marks[encoding.marktype()]; + mark = marks[encoding.marktype()], + from = encoding.dataTable(); // to add a background to text, we need to add it before the text if (encoding.marktype() === TEXT && encoding.has(COLOR)) { @@ -4860,7 +4952,7 @@ marks.def = function(encoding, layout, style, stats) { }; defs.push({ type: 'rect', - from: {data: TABLE}, + from: {data: from}, properties: {enter: bg, update: bg} }); } @@ -4869,7 +4961,7 @@ marks.def = function(encoding, layout, style, stats) { var p = mark.prop(encoding, layout, style, stats); defs.push({ type: mark.type, - from: {data: TABLE}, + from: {data: from}, properties: {enter: p, update: p} }); @@ -5280,14 +5372,15 @@ function text_props(e, layout, style, stats) { return p; } -},{"../globals":36}],25:[function(require,module,exports){ +},{"../globals":33}],23:[function(require,module,exports){ 'use strict'; require('../globals'); var util = require('../util'), time = require('./time'), colorbrewer = require('colorbrewer'), interpolate = require('d3-color').interpolateHsl, - schema = require('../schema/schema'); + schema = require('../schema/schema'), + vlsort = require('./sort'); var scale = module.exports = {}; @@ -5298,14 +5391,14 @@ scale.names = function(props) { }, {})); }; -scale.defs = function(names, encoding, layout, stats, style, sorting, opt) { +scale.defs = function(names, encoding, layout, stats, opt) { opt = opt || {}; return names.reduce(function(a, name) { var s = { name: name, type: scale.type(name, encoding), - domain: scale.domain(name, encoding, stats, sorting, opt) + domain: scale.domain(name, encoding, stats, opt) }; s.sort = scale.sort(s, encoding, name) || undefined; @@ -5339,7 +5432,7 @@ scale.type = function(name, encoding) { } }; -scale.domain = function (name, encoding, stats, sorting, opt) { +scale.domain = function (name, encoding, stats, opt) { var field = encoding.field(name); if (encoding.isType(name, T)) { @@ -5373,6 +5466,8 @@ scale.domain = function (name, encoding, stats, sorting, opt) { scaleUseRawDomain : encoding.config('useRawDomain'), notCountOrSum = !aggregate || (aggregate !=='count' && aggregate !== 'sum'); + // FIXME revise this part + if ( useRawDomain && notCountOrSum && ( // Q always uses non-ordinal scale except when it's binned and thus uses ordinal scale. (encoding.isType(name, Q) && !field.bin) || @@ -5383,7 +5478,11 @@ scale.domain = function (name, encoding, stats, sorting, opt) { return {data: RAW, field: encoding.fieldRef(name, {nofn: !timeUnit})}; } - return {data: sorting.getDataset(name), field: encoding.fieldRef(name)}; + var data = encoding.sort(name, stats).length > 0 ? + vlsort.getDataName(name): + encoding.dataTable(); + + return {data: data, field: encoding.fieldRef(name)}; }; @@ -5572,21 +5671,20 @@ scale.color.interpolate = function (start, end, cardinality) { return util.range(cardinality).map(function(i) { return interpolator(i*1.0/(cardinality-1)); }); }; -},{"../globals":36,"../schema/schema":37,"../util":39,"./time":31,"colorbrewer":3,"d3-color":4}],26:[function(require,module,exports){ +},{"../globals":33,"../schema/schema":35,"../util":37,"./sort":24,"./time":28,"colorbrewer":3,"d3-color":4}],24:[function(require,module,exports){ 'use strict'; require('../globals'); var vlfield = require('../field'); -module.exports = addSortTransforms; +module.exports = sort; // adds new transforms that produce sorted fields -function addSortTransforms(data, encoding, stats, opt) { +function sort(data, encoding, stats, opt) { // jshint unused:false var datasetMapping = {}; - var counter = 0; encoding.forEach(function(field, encType) { var sortBy = encoding.sort(encType, stats); @@ -5603,7 +5701,7 @@ function addSortTransforms(data, encoding, stats, opt) { return reverse + vlfield.fieldRef(d, {data: !encoding._vega2}); }); - var dataName = 'sorted' + counter++; + var dataName = sort.getDataName(encType); var transforms = [ { @@ -5627,19 +5725,15 @@ function addSortTransforms(data, encoding, stats, opt) { } }); - return { - getDataset: function(encType) { - var data = datasetMapping[encType]; - if (!data) { - return TABLE; - } - return data; - } - }; + return data; } +sort.getDataName = function(encType) { + return 'sorted-' + encType; +}; + -},{"../field":35,"../globals":36}],27:[function(require,module,exports){ +},{"../field":32,"../globals":33}],25:[function(require,module,exports){ 'use strict'; require('../globals'); @@ -5648,7 +5742,7 @@ var marks = require('./marks'); module.exports = stacking; -function stacking(data, encoding, mdef, facets) { +function stacking(data, encoding, mdef) { if (!marks[encoding.marktype()].stack) return false; // TODO: add || encoding.has(LOD) here once LOD is implemented @@ -5656,7 +5750,8 @@ function stacking(data, encoding, mdef, facets) { var dim=null, val=null, idx =null, isXMeasure = encoding.isMeasure(X), - isYMeasure = encoding.isMeasure(Y); + isYMeasure = encoding.isMeasure(Y), + facets = encoding.facets(); if (isXMeasure && !isYMeasure) { dim = Y; @@ -5673,7 +5768,7 @@ function stacking(data, encoding, mdef, facets) { // add transform to compute sums for scale var stacked = { name: STACKED, - source: TABLE, + source: encoding.dataTable(), transform: [{ type: 'aggregate', groupby: [encoding.fieldRef(dim)].concat(facets), // dim and other facets @@ -5709,7 +5804,7 @@ function stacking(data, encoding, mdef, facets) { return val; //return stack encoding } -},{"../globals":36,"./marks":24}],28:[function(require,module,exports){ +},{"../globals":33,"./marks":22}],26:[function(require,module,exports){ 'use strict'; require('../globals'); @@ -5781,7 +5876,7 @@ function estimateOpacity(encoding,stats) { } -},{"../field":35,"../globals":36}],29:[function(require,module,exports){ +},{"../field":32,"../globals":33}],27:[function(require,module,exports){ 'use strict'; require('../globals'); @@ -5807,104 +5902,16 @@ function subfaceting(group, mdef, details, stack, encoding) { } } -},{"../globals":36,"./group":21}],30:[function(require,module,exports){ -'use strict'; - -require('../globals'); - -var groupdef = require('./group').def, - vlfield = require('../field'); - -module.exports = template; - -function template(encoding, layout, stats) { - // jshint unused:false - - // TODO(kanitw): Jul 22, 2015 - split this file into data and template - var data = {name: RAW, format: {}}, - table = {name: TABLE, source: RAW}, - dataUrl = encoding.data('url'), - dataType = encoding.data('formatType'), - values = encoding.data('values'); - - if (encoding.hasValues()) { - data.values = values; - } else { - data.url = dataUrl; - data.format.type = dataType; - } - - encoding.forEach(function(field, encType) { - var name; - if (field.type == T) { - data.format.parse = data.format.parse || {}; - data.format.parse[field.name] = 'date'; - } else if (field.type == Q) { - data.format.parse = data.format.parse || {}; - if (vlfield.isCount(field)) { - name = 'count'; - } else { - name = field.name; - } - data.format.parse[name] = 'number'; - } - }); - - return { - width: layout.width, - height: layout.height, - padding: 'auto', - data: [data, table], - marks: [groupdef('cell', { - width: layout.cellWidth ? {value: layout.cellWidth} : undefined, - height: layout.cellHeight ? {value: layout.cellHeight} : undefined - })] - }; -} - -},{"../field":35,"../globals":36,"./group":21}],31:[function(require,module,exports){ +},{"../globals":33,"./group":19}],28:[function(require,module,exports){ 'use strict'; var util = require('../util'), d3_time_format = require('d3-time-format'); -module.exports = time; +var time = module.exports = {}; var LONG_DATE = new Date(2014, 8, 17); -function time(spec, encoding) { // FIXME refactor to reduce side effect #276 - // jshint unused:false - var timeFields = {}, timeUnits = {}; - - // find unique formula transformation and bin function - encoding.forEach(function(field, encType) { - if (field.type === T && field.timeUnit) { - timeFields[encoding.fieldRef(encType)] = { - field: field, - encType: encType - }; - timeUnits[field.timeUnit] = true; - } - }); - - // add formula transform - var data = spec.data[0], - transform = data.transform = data.transform || []; - - for (var f in timeFields) { - var tf = timeFields[f]; - time.transform(transform, encoding, tf.encType, tf.field); - } - - // add scales - var scales = spec.scales = spec.scales || []; - for (var timeUnit in timeUnits) { - var scale = time.scale.def(timeUnit, encoding); - if (scale) scales.push(scale); - } - return spec; -} - time.cardinality = function(field, stats, filterNull, type) { var timeUnit = field.timeUnit; switch (timeUnit) { @@ -5927,6 +5934,12 @@ time.cardinality = function(field, stats, filterNull, type) { return null; }; +time.formula = function(timeUnit, fieldRef) { + // TODO(kanitw): add formula to other time format + var fn = 'utc' + timeUnit; + return fn + '(' + fieldRef + ')'; +}; + time.maxLength = function(timeUnit, encoding) { switch (timeUnit) { case 'seconds': @@ -5950,26 +5963,6 @@ time.maxLength = function(timeUnit, encoding) { return d3_time_format.utcFormat(timeFormat)(LONG_DATE).length; }; -function fieldFn(func, field) { - return 'utc' + func + '(d.data.'+ field.name +')'; -} - -/** - * @return {String} date binning formula of the given field - */ -time.formula = function(field) { - return fieldFn(field.timeUnit, field); -}; - -/** add formula transforms to data */ -time.transform = function(transform, encoding, encType, field) { - transform.push({ - type: 'formula', - field: encoding.fieldRef(encType), - expr: time.formula(field) - }); -}; - time.range = function(timeUnit, encoding) { var labelLength = encoding.config('timeScaleLabelLength'), scaleLabel; @@ -5990,6 +5983,24 @@ time.range = function(timeUnit, encoding) { }; +/** + * @param {Object} encoding + * @return {Array} scales for time unit names + */ +time.scales = function(encoding) { + var scales = encoding.reduce(function(scales, field) { + var timeUnit = field.timeUnit; + if (field.type === T && timeUnit && !scales[timeUnit]) { + var scale = time.scale.def(field.timeUnit, encoding); + if (scale) scales[timeUnit] = scale; + } + return scales; + }, {}); + + return util.vals(scales); +}; + + time.scale = {}; /** append custom time scales for axis label */ @@ -6051,7 +6062,7 @@ time.hasScale = function(timeUnit) { return false; }; -},{"../util":39,"d3-time-format":6}],32:[function(require,module,exports){ +},{"../util":37,"d3-time-format":6}],29:[function(require,module,exports){ 'use strict'; require('./globals'); @@ -6067,7 +6078,7 @@ consts.shorthand = { func: '_' }; -},{"./globals":36}],33:[function(require,module,exports){ +},{"./globals":33}],30:[function(require,module,exports){ 'use strict'; require('./globals'); @@ -6098,7 +6109,7 @@ vldata.stats = function(data) { } }); }; -},{"./globals":36,"datalib/src/stats":11}],34:[function(require,module,exports){ +},{"./globals":33,"datalib/src/stats":11}],31:[function(require,module,exports){ // utility for enc 'use strict'; @@ -6197,7 +6208,7 @@ vlenc.fromShorthand = function(shorthand) { return m; }, {}); }; -},{"./consts":32,"./field":35,"./schema/schema":37,"./util":39}],35:[function(require,module,exports){ +},{"./consts":29,"./field":32,"./schema/schema":35,"./util":37}],32:[function(require,module,exports){ 'use strict'; // utility for field @@ -6217,6 +6228,7 @@ var vlfield = module.exports = {}; * @param opt * opt.nofn -- exclude bin, aggregate, timeUnit * opt.data - include 'data.' + * opt.d - include 'd.' * opt.fn - replace fn with custom function prefix * opt.prefn - prepend fn with custom function prefix @@ -6225,7 +6237,9 @@ var vlfield = module.exports = {}; vlfield.fieldRef = function(field, opt) { opt = opt || {}; - var f = (opt.data ? 'data.' : '') + (opt.prefn || ''), + var f = (opt.d ? 'd.' : '') + + (opt.data ? 'data.' : '') + + (opt.prefn || ''), nofn = opt.nofn || opt.fn, name = field.name; @@ -6372,14 +6386,14 @@ vlfield.cardinality = function(field, stats, filterNull) { (stat.nulls > 0 && filterNull[type] ? 1 : 0); }; -},{"./compiler/time":31,"./consts":32,"./globals":36,"./schema/schema":37,"./util":39}],36:[function(require,module,exports){ +},{"./compiler/time":28,"./consts":29,"./globals":33,"./schema/schema":35,"./util":37}],33:[function(require,module,exports){ (function (global){ 'use strict'; // declare global constant var g = global || window; -g.TABLE = 'table'; +g.AGGREGATE = 'aggregate'; g.RAW = 'raw'; g.STACKED = 'stacked'; g.INDEX = 'index'; @@ -6401,7 +6415,27 @@ g.T = 'T'; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],37:[function(require,module,exports){ +},{}],34:[function(require,module,exports){ +'use strict'; + +// TODO(kanitw): chat with Vega team and possibly move this to vega-logging +module.exports = function(prefix) { + // Borrowed some ideas from http://stackoverflow.com/a/15653260/866989 + // and https://github.com/patik/console.log-wrapper/blob/master/consolelog.js + var METHODS = ['error', 'info', 'debug', 'warn', 'log']; + + return METHODS.reduce(function(logger, fn) { + var cfn = console[fn] ? fn : 'log'; + if (console[cfn].bind === 'undefined') { // IE < 10 + logger[fn] = Function.prototype.bind.call(console[cfn], console, prefix); + } + else { + logger[fn] = console[cfn].bind(console, prefix); + } + return logger; + }, {}); +}; +},{}],35:[function(require,module,exports){ // Package of defining Vega-lite Specification's json schema 'use strict'; @@ -6569,7 +6603,7 @@ var axisMixin = { enum: ['top', 'right', 'left', 'bottom'], description: 'The orientation of the axis. One of top, bottom, left or right. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart).' }, - ticks :{ + ticks: { type: 'integer', default: 5, description: 'A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the underlying scale\'s range.' @@ -6602,7 +6636,12 @@ var axisMixin = { default: 25, minimum: 0, description: 'Truncate labels that are too long.' - } + }, + labelAngle: { + type: 'integer', + default: undefined, // auto + description: 'Angle by which to rotate labels. Set to 0 to force horizontal.' + }, } } } @@ -6661,8 +6700,14 @@ var legendMixin = { type: 'object', properties: { legend: { - type: 'boolean', - default: true + type: 'object', + properties: { + title: { + type: 'string', + default: undefined, + description: 'A title for the legend. (Shows field name and its function by default.)' + } + } } } }; @@ -7162,7 +7207,7 @@ schema.instantiate = function() { return schema.util.instantiate(schema.schema); }; -},{"../globals":36,"../util":39,"./schemautil":38,"colorbrewer":3}],38:[function(require,module,exports){ +},{"../globals":33,"../util":37,"./schemautil":36,"colorbrewer":3}],36:[function(require,module,exports){ 'use strict'; var schemautil = module.exports = {}, @@ -7250,13 +7295,14 @@ function merge(dest, src) { } return dest; } -},{"../util":39}],39:[function(require,module,exports){ +},{"../util":37}],37:[function(require,module,exports){ 'use strict'; var util = module.exports = require('datalib/src/util'); util.extend(util, require('datalib/src/generate')); util.extend(util, require('datalib/src/stats')); +util.extend(util, require('./logger')('[VL Error]')); util.bin = require('datalib/src/bins/bins'); util.isin = function(item, array) { @@ -7352,12 +7398,8 @@ util.getter = function(x, p, noaugment) { return x; }; -util.error = function(msg) { - console.error('[VL Error]', msg); -}; - -},{"datalib/src/bins/bins":8,"datalib/src/generate":9,"datalib/src/stats":11,"datalib/src/util":13}],40:[function(require,module,exports){ +},{"./logger":34,"datalib/src/bins/bins":8,"datalib/src/generate":9,"datalib/src/stats":11,"datalib/src/util":13}],38:[function(require,module,exports){ 'use strict'; require('./globals'); @@ -7380,6 +7422,6 @@ vl.toShorthand = vl.Encoding.shorthand; vl.format = require('d3-format').format; module.exports = vl; -},{"./Encoding":14,"./compiler/compiler":18,"./consts":32,"./data":33,"./enc":34,"./field":35,"./globals":36,"./schema/schema":37,"./util":39,"d3-format":5}]},{},[40])(40) +},{"./Encoding":14,"./compiler/compiler":16,"./consts":29,"./data":30,"./enc":31,"./field":32,"./globals":33,"./schema/schema":35,"./util":37,"d3-format":5}]},{},[38])(38) }); -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvYnJvd3NlcmlmeS9ub2RlX21vZHVsZXMvYnJvd3Nlci1yZXNvbHZlL2VtcHR5LmpzIiwibm9kZV9tb2R1bGVzL2NvbG9yYnJ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AxODAgPyBtMlxuICAgICAgICA6IGggPCAyNDAgPyBtMSArIChtMiAtIG0xKSAqICgyNDAgLSBoKSAvIDYwXG4gICAgICAgIDogbTEpICogMjU1O1xuICB9XG5cbiAgX19wcm90b3R5cGUucmdiID0gZnVuY3Rpb24oKSB7XG4gICAgdmFyIGggPSB0aGlzLmggJSAzNjAgKyAodGhpcy5oIDwgMCkgKiAzNjAsXG4gICAgICAgIHMgPSBpc05hTihoKSB8fCBpc05hTih0aGlzLnMpID8gMCA6IHRoaXMucyxcbiAgICAgICAgbCA9IHRoaXMubCxcbiAgICAgICAgbTIgPSBsIDw9IC41ID8gbCAqICgxICsgcykgOiBsICsgcyAtIGwgKiBzLFxuICAgICAgICBtMSA9IDIgKiBsIC0gbTI7XG4gICAgcmV0dXJuIG5ldyBSZ2IoXG4gICAgICBoc2wycmdiKGggPj0gMjQwID8gaCAtIDI0MCA6IGggKyAxMjAsIG0xLCBtMiksXG4gICAgICBoc2wycmdiKGgsIG0xLCBtMiksXG4gICAgICBoc2wycmdiKGggPCAxMjAgPyBoICsgMjQwIDogaCAtIDEyMCwgbTEsIG0yKVxuICAgICk7XG4gIH07XG5cbiAgdmFyIGhzbCA9IGZ1bmN0aW9uKGgsIHMsIGwpIHtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgaWYgKGggaW5zdGFuY2VvZiBIc2wpIHtcbiAgICAgICAgbCA9IGgubDtcbiAgICAgICAgcyA9IGgucztcbiAgICAgICAgaCA9IGguaDtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGlmICghKGggaW5zdGFuY2VvZiBDb2xvcikpIGggPSBjb2xvcihoKTtcbiAgICAgICAgaWYgKGgpIHtcbiAgICAgICAgICBpZiAoaCBpbnN0YW5jZW9mIEhzbCkgcmV0dXJuIGg7XG4gICAgICAgICAgaCA9IGgucmdiKCk7XG4gICAgICAgICAgdmFyIHIgPSBoLnIgLyAyNTUsXG4gICAgICAgICAgICAgIGcgPSBoLmcgLyAyNTUsXG4gICAgICAgICAgICAgIGIgPSBoLmIgLyAyNTUsXG4gICAgICAgICAgICAgIG1pbiA9IE1hdGgubWluKHIsIGcsIGIpLFxuICAgICAgICAgICAgICBtYXggPSBNYXRoLm1heChyLCBnLCBiKSxcbiAgICAgICAgICAgICAgcmFuZ2UgPSBtYXggLSBtaW47XG4gICAgICAgICAgbCA9IChtYXggKyBtaW4pIC8gMjtcbiAgICAgICAgICBpZiAocmFuZ2UpIHtcbiAgICAgICAgICAgIHMgPSBsIDwgLjUgPyByYW5nZSAvIChtYXggKyBtaW4pIDogcmFuZ2UgLyAoMiAtIG1heCAtIG1pbik7XG4gICAgICAgICAgICBpZiAociA9PT0gbWF4KSBoID0gKGcgLSBiKSAvIHJhbmdlICsgKGcgPCBiKSAqIDY7XG4gICAgICAgICAgICBlbHNlIGlmIChnID09PSBtYXgpIGggPSAoYiAtIHIpIC8gcmFuZ2UgKyAyO1xuICAgICAgICAgICAgZWxzZSBoID0gKHIgLSBnKSAvIHJhbmdlICsgNDtcbiAgICAgICAgICAgIGggKj0gNjA7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGggPSBOYU47XG4gICAgICAgICAgICBzID0gbCA+IDAgJiYgbCA8IDEgPyAwIDogaDtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaCA9IHMgPSBsID0gTmFOO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBuZXcgSHNsKGgsIHMsIGwpO1xuICB9XG5cbiAgdmFyIHJlSGV4MyA9IC9eIyhbMC05YS1mXXszfSkkLyxcbiAgICAgIHJlSGV4NiA9IC9eIyhbMC05YS1mXXs2fSkkLyxcbiAgICAgIHJlUmdiSW50ZWdlciA9IC9ecmdiXFwoXFxzKihbLStdP1xcZCspXFxzKixcXHMqKFstK10/XFxkKylcXHMqLFxccyooWy0rXT9cXGQrKVxccypcXCkkLyxcbiAgICAg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ZW9mIEhjbCkge1xuICAgICAgICB2YXIgaCA9IGwuaCAqIGRlZzJyYWQ7XG4gICAgICAgIGIgPSBNYXRoLnNpbihoKSAqIGwuYztcbiAgICAgICAgYSA9IE1hdGguY29zKGgpICogbC5jO1xuICAgICAgICBsID0gbC5sO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKCEobCBpbnN0YW5jZW9mIFJnYikpIGwgPSByZ2IobCk7XG4gICAgICAgIHZhciByID0gcmdiMnh5eihsLnIpLFxuICAgICAgICAgICAgZyA9IHJnYjJ4eXoobC5nKSxcbiAgICAgICAgICAgIGIgPSByZ2IyeHl6KGwuYiksXG4gICAgICAgICAgICB4ID0geHl6MmxhYigoMC40MTI0NTY0ICogciArIDAuMzU3NTc2MSAqIGcgKyAwLjE4MDQzNzUgKiBiKSAvIFhuKSxcbiAgICAgICAgICAgIHkgPSB4eXoybGFiKCgwLjIxMjY3MjkgKiByICsgMC43MTUxNTIyICogZyArIDAuMDcyMTc1MCAqIGIpIC8gWW4pLFxuICAgICAgICAgICAgeiA9IHh5ejJsYWIoKDAuMDE5MzMzOSAqIHIgKyAwLjExOTE5MjAgKiBnICsgMC45NTAzMDQxICogYikgLyBabik7XG4gICAgICAgIGIgPSAyMDAgKiAoeSAtIHopO1xuICAgICAgICBhID0gNTAwICogKHggLSB5KTtcbiAgICAgICAgbCA9IDExNiAqIHkgLSAxNjtcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIG5ldyBMYWIobCwgYSwgYik7XG4gIH1cbiAgbGFiLnByb3RvdHlwZSA9IExhYi5wcm90b3R5cGU7XG4gIHZhciByYWQyZGVnID0gMTgwIC8gTWF0aC5QSTtcblxuICB2YXIgaGNsID0gZnVuY3Rpb24oaCwgYywgbCkge1xuICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAxKSB7XG4gICAgICBpZiAoaCBpbnN0YW5jZW9mIEhjbCkge1xuICAgICAgICBsID0gaC5sO1xuICAgICAgICBjID0gaC5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AgICAgYmggPSBpc05hTihiLmgpID8gMCA6IGIuaCAtIGFoLFxuICAgICAgICBiYyA9IGlzTmFOKGIuYykgPyAwIDogYi5jIC0gYWMsXG4gICAgICAgIGJsID0gYi5sIC0gYWw7XG4gICAgcmV0dXJuIGZ1bmN0aW9uKHQpIHtcbiAgICAgIGEuaCA9IGFoICsgYmggKiB0O1xuICAgICAgYS5jID0gYWMgKyBiYyAqIHQ7XG4gICAgICBhLmwgPSBhbCArIGJsICogdDtcbiAgICAgIHJldHVybiBhICsgXCJcIjtcbiAgICB9O1xuICB9XG5cbiAgdmFyIGludGVycG9sYXRlSGNsID0gZnVuY3Rpb24oYSwgYikge1xuICAgIGEgPSBoY2woYSk7XG4gICAgYiA9IGhjbChiKTtcbiAgICB2YXIgYWggPSBpc05hTihhLmgpID8gYi5oIDogYS5oLFxuICAgICAgICBhYyA9IGlzTmFOKGEuYykgPyBiLmMgOiBhLmMsXG4gICAgICAgIGFsID0gYS5sLFxuICAgICAgICBiaCA9IGlzTmFOKGIuaCkgPyAwIDogZGVsdGFIdWUoYi5oLCBhaCksXG4gICAgICAgIGJjID0gaXNOYU4oYi5jKSA/IDAgOiBiLmMgLSBhYyxcbiAgICAgICAgYmwgPSBiLmwgLSBhbDtcbiAgICByZXR1cm4gZnVuY3Rpb24odCkge1xuICAgICAgYS5oID0gYWggKyBiaCAqIHQ7XG4gICAgICBhLmMgPSBhYyArIGJjICogdDtcbiAgICAgIGEubCA9IGFsICsgYmwgKiB0O1xuICAgICAgcmV0dXJuIGEgKyBcIlwiO1xuICAgIH07XG4gIH1cblxuICB2YXIgaW50ZXJwb2xhdGVMYWIgPSBmdW5jdGlvbihhLCBiKSB7XG4gICAgYSA9IGxhYihhKTtcbiAgICBiID0gbGFiKGIpO1xuICAgIHZhciBhbCA9IGEubCxcbiAgICAgICAgYWEgPSBhLmEsXG4gICAgICAgIGFiID0gYS5iLFxuICAgICAgICBibCA9IGIubCAtIGFsLFxuICAgICAgICBiYSA9IGIuYS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BlbHNlIHtcbiAgICAgICAgICBzLnplcm8gPSBzcGVjLnplcm8gPT09IHVuZGVmaW5lZCA/IHRydWUgOiBzcGVjLnplcm87XG4gICAgICAgIH1cblxuICAgICAgICBzLnJldmVyc2UgPSBzcGVjLnJldmVyc2U7XG4gICAgICB9XG5cbiAgICAgIHMucm91bmQgPSB0cnVlO1xuXG4gICAgICBpZiAocy50eXBlID09PSAndGltZScpIHtcbiAgICAgICAgcy5uaWNlID0gdGltZVVuaXQgfHwgZW5jb2RpbmcuY29uZmlnKCd0aW1lU2NhbGVOaWNlJyk7XG4gICAgICB9ZWxzZSB7XG4gICAgICAgIHMubmljZSA9IHRydWU7XG4gICAgICB9XG4gICAgICBicmVhaztcbiAgICBjYXNlIFJPVzogLy8gc3VwcG9ydCBvbmx5IG9yZGluYWxcbiAgICAgIHMuYmFuZFdpZHRoID0gbGF5b3V0LmNlbGxIZWlnaHQ7XG4gICAgICBzLnJvdW5kID0gdHJ1ZTtcbiAgICAgIHMubmljZSA9IHRydWU7XG4gICAgICBicmVhaztcbiAgICBjYXNlIENPTDogLy8gc3VwcG9ydCBvbmx5IG9yZGluYWxcbiAgICAgIHMuYmFuZFdpZHRoID0gbGF5b3V0LmNlbGxXaWR0aDtcbiAgICAgIHMucm91bmQgPSB0cnVlO1xuICAgICAgcy5uaWNlID0gdHJ1ZTtcbiAgICAgIGJyZWFrO1xuICAgIGNhc2UgU0laRTpcbiAgICAgIGlmIChlbmNvZGluZy5pcygnYmFyJykpIHtcbiAgICAgICAgLy8gRklYTUUgdGhpcyBpcyBkZWZpbml0ZWx5IGluY29ycmVjdFxuICAgICAgICAvLyBidXQgbGV0J3MgZml4IGl0IGxhdGVyIHNpbmNlIGJhciBzaXplIGlzIGEgYmFkIGVuY29kaW5nIGFueXdheVxuICAgICAgICBzLnJhbmdlID0gWzMsIE1hdGgubWF4KGVuY29kaW5nLmJhbmRTaXplKFgpLCBlbmNvZGluZy5iYW5kU2l6ZShZKSldO1xuICAgICAgfSB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ICdvYmplY3QnLFxuICBwcm9wZXJ0aWVzOiB7XG4gICAgc29ydDoge1xuICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgIGRlZmF1bHQ6IFtdLFxuICAgICAgaXRlbXM6IHtcbiAgICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICAgIHN1cHBvcnRlZFR5cGVzOiB0b01hcChbTiwgT10pLFxuICAgICAgICByZXF1aXJlZDogWyduYW1lJywgJ2FnZ3JlZ2F0ZSddLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgbmFtZToge1xuICAgICAgICAgICAgdHlwZTogJ3N0cmluZydcbiAgICAgICAgICB9LFxuICAgICAgICAgIGFnZ3JlZ2F0ZToge1xuICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXG4gICAgICAgICAgICBlbnVtOiBbJ2F2ZycsICdzdW0nLCAnbWluJywgJ21heCcsICdjb3VudCddXG4gICAgICAgICAgfSxcbiAgICAgICAgICByZXZlcnNlOiB7XG4gICAgICAgICAgICB0eXBlOiAnYm9vbGVhbicsXG4gICAgICAgICAgICBkZWZhdWx0OiBmYWxzZVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxufTtcblxudmFyIGJhbmRNaXhpbiA9IHtcbiAgdHlwZTogJ29iamVjdCcsXG4gIHByb3BlcnRpZXM6IHtcbiAgICBiYW5kOiB7XG4gICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgc2l6ZToge1xuICAgICAgICAgIHR5cGU6ICdpbnRlZ2VyJyxcbiAgICAgICAgICBtaW5pbXVtOiAwLFxuICAgICAgICAgIGRlZmF1bHQ6IHVuZGVmaW5lZFxuICAgICAgICB9LFxuICAgICAgICBwYWRkaW5nOiB7XG4gICAgICAgICAgdHlwZTogJ2ludGVnZXInLFxuICAgICAgICAgIG1pbmltdW06IDAsXG4gICAgICAgICAgZGVmYXVsdDogMV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HMsIGwpIHtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgaWYgKGggaW5zdGFuY2VvZiBIc2wpIHtcbiAgICAgICAgbCA9IGgubDtcbiAgICAgICAgcyA9IGgucztcbiAgICAgICAgaCA9IGguaDtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGlmICghKGggaW5zdGFuY2VvZiBDb2xvcikpIGggPSBjb2xvcihoKTtcbiAgICAgICAgaWYgKGgpIHtcbiAgICAgICAgICBpZiAoaCBpbnN0YW5jZW9mIEhzbCkgcmV0dXJuIGg7XG4gICAgICAgICAgaCA9IGgucmdiKCk7XG4gICAgICAgICAgdmFyIHIgPSBoLnIgLyAyNTUsXG4gICAgICAgICAgICAgIGcgPSBoLmcgLyAyNTUsXG4gICAgICAgICAgICAgIGIgPSBoLmIgLyAyNTUsXG4gICAgICAgICAgICAgIG1pbiA9IE1hdGgubWluKHIsIGcsIGIpLFxuICAgICAgICAgICAgICBtYXggPSBNYXRoLm1heChyLCBnLCBiKSxcbiAgICAgICAgICAgICAgcmFuZ2UgPSBtYXggLSBtaW47XG4gICAgICAgICAgbCA9IChtYXggKyBtaW4pIC8gMjtcbiAgICAgICAgICBpZiAocmFuZ2UpIHtcbiAgICAgICAgICAgIHMgPSBsIDwgLjUgPyByYW5nZSAvIChtYXggKyBtaW4pIDogcmFuZ2UgLyAoMiAtIG1heCAtIG1pbik7XG4gICAgICAgICAgICBpZiAociA9PT0gbWF4KSBoID0gKGcgLSBiKSAvIHJhbmdlICsgKGcgPCBiKSAqIDY7XG4gICAgICAgICAgICBlbHNlIGlmIChnID09PSBtYXgpIGggPSAoYiAtIHIpIC8gcmFuZ2UgKyAyO1xuICAgICAgICAgICAgZWxzZSBoID0gKHIgLSBnKSAvIHJhbmdlICsgNDtcbiAgICAgICAgICAgIGggKj0gNjA7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGggPSBOYU47XG4gICAgICAgICAgICBzID0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mwgLSBhbDtcbiAgICByZXR1cm4gZnVuY3Rpb24odCkge1xuICAgICAgYS5oID0gYWggKyBiaCAqIHQ7XG4gICAgICBhLmMgPSBhYyArIGJjICogdDtcbiAgICAgIGEubCA9IGFsICsgYmwgKiB0O1xuICAgICAgcmV0dXJuIGEgKyBcIlwiO1xuICAgIH07XG4gIH1cblxuICB2YXIgaW50ZXJwb2xhdGVMYWIgPSBmdW5jdGlvbihhLCBiKSB7XG4gICAgYSA9IGxhYihhKTtcbiAgICBiID0gbGFiKGIpO1xuICAgIHZhciBhbCA9IGEubCxcbiAgICAgICAgYWEgPSBhLmEsXG4gICAgICAgIGFiID0gYS5iLFxuICAgICAgICBibCA9IGIubCAtIGFsLFxuICAgICAgICBiYSA9IGIuYSAtIGFhLFxuICAgICAgICBiYiA9IGIuYiAtIGFiO1xuICAgIHJldHVybiBmdW5jdGlvbih0KSB7XG4gICAgICBhLmwgPSBhbCArIGJsICogdDtcbiAgICAgIGEuYSA9IGFhICsgYmEgKiB0O1xuICAgICAgYS5iID0gYWIgKyBiYiAqIHQ7XG4gICAgICByZXR1cm4gYSArIFwiXCI7XG4gICAgfTtcbiAgfVxuXG4gIHZhciBpbnRlcnBvbGF0ZUhzbExvbmcgPSBmdW5jdGlvbihhLCBiKSB7XG4gICAgYSA9IGhzbChhKTtcbiAgICBiID0gaHNsKGIpO1xuICAgIHZhciBhaCA9IGlzTmFOKGEuaCkgPyBiLmggOiBhLmgsXG4gICAgICAgIGFzID0gaXNOYU4oYS5zKSA/IGIucyA6IGEucyxcbiAgICAgICAgYWwgPSBhLmwsXG4gICAgICAgIGJoID0gaXNOYU4oYi5oKSA/IDAgOiBiLmggLSBhaCxcbiAgICAgICAgYnMgPSBpc05hTihiLnMpID8gMCA6IGIucyAtIGFzLFxuICAgICAgICBibCA9IGIubCAtIGFsO1xuICAgIHJldHVybiBmdW5jdGlvbih0KSB7XG4gICAgICBhLmggPSBhaCArIGJoICogdDtcbiAgICAgIGEucyA9IGFzICsg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nLFxuICAgICAgICAgIGRlZmF1bHQ6IHRydWUsXG4gICAgICAgICAgc3VwcG9ydGVkVHlwZXM6IHRvTWFwKFtRLCBUXSlcbiAgICAgICAgfSxcbiAgICAgICAgbmljZToge1xuICAgICAgICAgIHR5cGU6ICdzdHJpbmcnLFxuICAgICAgICAgIGVudW06IFsnc2Vjb25kJywgJ21pbnV0ZScsICdob3VyJywgJ2RheScsICd3ZWVrJywgJ21vbnRoJywgJ3llYXInXSxcbiAgICAgICAgICBzdXBwb3J0ZWRUeXBlczogdG9NYXAoW1RdKVxuICAgICAgICB9LFxuICAgICAgICB1c2VSYXdEb21haW46IHtcbiAgICAgICAgICB0eXBlOiAnYm9vbGVhbicsXG4gICAgICAgICAgZGVmYXVsdDogdW5kZWZpbmVkLFxuICAgICAgICAgIGRlc2NyaXB0aW9uOiAnVXNlIHRoZSByYXcgZGF0YSByYW5nZSBhcyBzY2FsZSBkb21haW4gaW5zdGVhZCBvZiAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgJ2FnZ3JlZ2F0ZWQgZGF0YSBmb3IgYWdncmVnYXRlIGF4aXMuICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAnVGhpcyBvcHRpb24gZG9lcyBub3Qgd29yayB3aXRoIHN1bSBvciBjb3VudCBhZ2dyZWdhdGUnICtcbiAgICAgICAgICAgICAgICAgICAgICAgJ2FzIHRoZXkgbWlnaHQgaGF2ZSBhIHN1YnN0YW50aWFsbHkgbGFyZ2VyIHNjYWxlIHJhbmdlLicgK1xuICAgICAgICAgICAgICAgICAgICAgICAnQnkgZGVmYXVsdCwgdXNlIHZhbHVlIGZyb20gY29uZmlnLnVzZVJhd0RvbWFpbi4nXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbn0pO1xuXG52YXIgb25seU9yZGluYWxGaWVsZCA9IG1lcmdlKGNsb25lKHNjaGVtYS5maWVsZCksIHtcbiAgdHlwZTogJ29iamVjdCcsXG4gIHN1cHBvcnRlZFJv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AgICAgICAgIH0sXG4gICAgICAgICAgYWdncmVnYXRlOiB7XG4gICAgICAgICAgICB0eXBlOiAnc3RyaW5nJyxcbiAgICAgICAgICAgIGVudW06IFsnYXZnJywgJ3N1bScsICdtaW4nLCAnbWF4JywgJ2NvdW50J11cbiAgICAgICAgICB9LFxuICAgICAgICAgIHJldmVyc2U6IHtcbiAgICAgICAgICAgIHR5cGU6ICdib29sZWFuJyxcbiAgICAgICAgICAgIGRlZmF1bHQ6IGZhbHNlXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG59O1xuXG52YXIgYmFuZE1peGluID0ge1xuICB0eXBlOiAnb2JqZWN0JyxcbiAgcHJvcGVydGllczoge1xuICAgIGJhbmQ6IHtcbiAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgcHJvcGVydGllczoge1xuICAgICAgICBzaXplOiB7XG4gICAgICAgICAgdHlwZTogJ2ludGVnZXInLFxuICAgICAgICAgIG1pbmltdW06IDAsXG4gICAgICAgICAgZGVmYXVsdDogdW5kZWZpbmVkXG4gICAgICAgIH0sXG4gICAgICAgIHBhZGRpbmc6IHtcbiAgICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgICAgbWluaW11bTogMCxcbiAgICAgICAgICBkZWZhdWx0OiAxXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbn07XG5cbnZhciBsZWdlbmRNaXhpbiA9IHtcbiAgdHlwZTogJ29iamVjdCcsXG4gIHByb3BlcnRpZXM6IHtcbiAgICBsZWdlbmQ6IHtcbiAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgcHJvcGVydGllczoge1xuICAgICAgICB0aXRsZToge1xuICAgICAgICAgIHR5cGU6ICdzdHJpbmcnLFxuICAgICAgICAgIGRlZmF1bHQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICBkZXNjcmlwdGlvbjogJ0EgdGl0bGUgZm9yIHRoZSBsZWdlbmQuIChTa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nQgJiYgIShwW2ldIGluIHgpKXtcbiAgICAgIHggPSB4W3BbaV1dID0ge307XG4gICAgfSBlbHNlIHtcbiAgICAgIHggPSB4W3BbaV1dO1xuICAgIH1cbiAgfVxuICByZXR1cm4geDtcbn07XG5cbiIsIid1c2Ugc3RyaWN0JztcblxucmVxdWlyZSgnLi9nbG9iYWxzJyk7XG5cbnZhciB1dGlsID0gcmVxdWlyZSgnLi91dGlsJyksXG4gICAgY29uc3RzID0gcmVxdWlyZSgnLi9jb25zdHMnKTtcblxudmFyIHZsID0ge307XG5cbnV0aWwuZXh0ZW5kKHZsLCBjb25zdHMsIHV0aWwpO1xuXG52bC5FbmNvZGluZyA9IHJlcXVpcmUoJy4vRW5jb2RpbmcnKTtcbnZsLmNvbXBpbGVyID0gcmVxdWlyZSgnLi9jb21waWxlci9jb21waWxlcicpO1xudmwuY29tcGlsZSA9IHZsLmNvbXBpbGVyLmNvbXBpbGU7XG52bC5kYXRhID0gcmVxdWlyZSgnLi9kYXRhJyk7XG52bC5lbmMgPSByZXF1aXJlKCcuL2VuYycpO1xudmwuZmllbGQgPSByZXF1aXJlKCcuL2ZpZWxkJyk7XG52bC5zY2hlbWEgPSByZXF1aXJlKCcuL3NjaGVtYS9zY2hlbWEnKTtcbnZsLnRvU2hvcnRoYW5kID0gdmwuRW5jb2Rpbmcuc2hvcnRoYW5kO1xudmwuZm9ybWF0ID0gcmVxdWlyZSgnZDMtZm9ybWF0JykuZm9ybWF0O1xuXG5tb2R1bGUuZXhwb3J0cyA9IHZsOyJdfQ== diff --git a/vega-lite.min.js b/vega-lite.min.js index 3038d80c9f..b8f1c08807 100644 --- a/vega-lite.min.js +++ b/vega-lite.min.js @@ -1,7 +1,7 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.vl=e()}}(function(){var e;return function t(e,n,a){function r(f,c){if(!n[f]){if(!e[f]){var o="function"==typeof require&&require;if(!c&&o)return o(f,!0);if(i)return i(f,!0);var s=new Error("Cannot find module '"+f+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[f]={exports:{}};e[f][0].call(u.exports,function(t){var n=e[f][1][t];return r(n?n:t)},u,u.exports,t,e,n,a)}return n[f].exports}for(var i="function"==typeof require&&require,f=0;fe?"0"+e.toString(16):e.toString(16))+(16>t?"0"+t.toString(16):t.toString(16))+(16>n?"0"+n.toString(16):n.toString(16))}function r(e){return y(e>>16&255,e>>8&255,255&e)}function i(e,t,n){this.h=+e,this.s=Math.max(0,Math.min(1,+t)),this.l=Math.max(0,Math.min(1,+n))}function f(e,t,n){return 255*(60>e?t+(n-t)*e/60:180>e?n:240>e?t+(n-t)*(240-e)/60:t)}function c(e,t,n){this.l=+e,this.a=+t,this.b=+n}function o(e){return 255*(.0031308>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function s(e){return e>E?e*e*e:U*(e-Y)}function u(e){return e>X?Math.pow(e,1/3):e/U+Y}function d(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function l(e,t,n){this.h=+e,this.c=+t,this.l=+n}function b(e,t,n){this.h=+e,this.s=+t,this.l=+n}t.prototype={toString:function(){return this.rgb()+""}};var h=(new Map).set("aliceblue",15792383).set("antiquewhite",16444375).set("aqua",65535).set("aquamarine",8388564).set("azure",15794175).set("beige",16119260).set("bisque",16770244).set("black",0).set("blanchedalmond",16772045).set("blue",255).set("blueviolet",9055202).set("brown",10824234).set("burlywood",14596231).set("cadetblue",6266528).set("chartreuse",8388352).set("chocolate",13789470).set("coral",16744272).set("cornflowerblue",6591981).set("cornsilk",16775388).set("crimson",14423100).set("cyan",65535).set("darkblue",139).set("darkcyan",35723).set("darkgoldenrod",12092939).set("darkgray",11119017).set("darkgreen",25600).set("darkgrey",11119017).set("darkkhaki",12433259).set("darkmagenta",9109643).set("darkolivegreen",5597999).set("darkorange",16747520).set("darkorchid",10040012).set("darkred",9109504).set("darksalmon",15308410).set("darkseagreen",9419919).set("darkslateblue",4734347).set("darkslategray",3100495).set("darkslategrey",3100495).set("darkturquoise",52945).set("darkviolet",9699539).set("deeppink",16716947).set("deepskyblue",49151).set("dimgray",6908265).set("dimgrey",6908265).set("dodgerblue",2003199).set("firebrick",11674146).set("floralwhite",16775920).set("forestgreen",2263842).set("fuchsia",16711935).set("gainsboro",14474460).set("ghostwhite",16316671).set("gold",16766720).set("goldenrod",14329120).set("gray",8421504).set("green",32768).set("greenyellow",11403055).set("grey",8421504).set("honeydew",15794160).set("hotpink",16738740).set("indianred",13458524).set("indigo",4915330).set("ivory",16777200).set("khaki",15787660).set("lavender",15132410).set("lavenderblush",16773365).set("lawngreen",8190976).set("lemonchiffon",16775885).set("lightblue",11393254).set("lightcoral",15761536).set("lightcyan",14745599).set("lightgoldenrodyellow",16448210).set("lightgray",13882323).set("lightgreen",9498256).set("lightgrey",13882323).set("lightpink",16758465).set("lightsalmon",16752762).set("lightseagreen",2142890).set("lightskyblue",8900346).set("lightslategray",7833753).set("lightslategrey",7833753).set("lightsteelblue",11584734).set("lightyellow",16777184).set("lime",65280).set("limegreen",3329330).set("linen",16445670).set("magenta",16711935).set("maroon",8388608).set("mediumaquamarine",6737322).set("mediumblue",205).set("mediumorchid",12211667).set("mediumpurple",9662683).set("mediumseagreen",3978097).set("mediumslateblue",8087790).set("mediumspringgreen",64154).set("mediumturquoise",4772300).set("mediumvioletred",13047173).set("midnightblue",1644912).set("mintcream",16121850).set("mistyrose",16770273).set("moccasin",16770229).set("navajowhite",16768685).set("navy",128).set("oldlace",16643558).set("olive",8421376).set("olivedrab",7048739).set("orange",16753920).set("orangered",16729344).set("orchid",14315734).set("palegoldenrod",15657130).set("palegreen",10025880).set("paleturquoise",11529966).set("palevioletred",14381203).set("papayawhip",16773077).set("peachpuff",16767673).set("peru",13468991).set("pink",16761035).set("plum",14524637).set("powderblue",11591910).set("purple",8388736).set("rebeccapurple",6697881).set("red",16711680).set("rosybrown",12357519).set("royalblue",4286945).set("saddlebrown",9127187).set("salmon",16416882).set("sandybrown",16032864).set("seagreen",3050327).set("seashell",16774638).set("sienna",10506797).set("silver",12632256).set("skyblue",8900331).set("slateblue",6970061).set("slategray",7372944).set("slategrey",7372944).set("snow",16775930).set("springgreen",65407).set("steelblue",4620980).set("tan",13808780).set("teal",32896).set("thistle",14204888).set("tomato",16737095).set("turquoise",4251856).set("violet",15631086).set("wheat",16113331).set("white",16777215).set("whitesmoke",16119285).set("yellow",16776960).set("yellowgreen",10145074),g=n.prototype=new t,p=.7;g.darker=function(e){return e=null==e?p:Math.pow(p,e),new n(this.r*e,this.g*e,this.b*e)};var m=1/p;g.brighter=function(e){return e=null==e?m:Math.pow(m,e),new n(this.r*e,this.g*e,this.b*e)},g.rgb=function(){return this},g.toString=function(){return a(this.r,this.g,this.b)};var y=function(e,a,r){return 1===arguments.length&&(e instanceof t||(e=k(e)),e?(e=e.rgb(),r=e.b,a=e.g,e=e.r):e=a=r=0/0),new n(e,a,r)},v=i.prototype=new t;v.brighter=function(e){return e=null==e?m:Math.pow(m,e),new i(this.h,this.s,this.l*e)},v.darker=function(e){return e=null==e?p:Math.pow(p,e),new i(this.h,this.s,this.l*e)},v.rgb=function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,a=this.l,r=.5>=a?a*(1+t):a+t-a*t,i=2*a-r;return new n(f(e>=240?e-240:e+120,i,r),f(e,i,r),f(120>e?e+240:e-120,i,r))};var x=function(e,n,a){if(1===arguments.length)if(e instanceof i)a=e.l,n=e.s,e=e.h;else if(e instanceof t||(e=k(e)),e){if(e instanceof i)return e;e=e.rgb();var r=e.r/255,f=e.g/255,c=e.b/255,o=Math.min(r,f,c),s=Math.max(r,f,c),u=s-o;a=(s+o)/2,u?(n=.5>a?u/(s+o):u/(2-s-o),e=r===s?(f-c)/u+6*(c>f):f===s?(c-r)/u+2:(r-f)/u+4,e*=60):(e=0/0,n=a>0&&1>a?0:e)}else e=n=a=0/0;return new i(e,n,a)},O=/^#([0-9a-f]{3})$/,w=/^#([0-9a-f]{6})$/,T=/^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/,M=/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,S=/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,k=function(e){var t;return e=(e+"").trim().toLowerCase(),(t=O.exec(e))?(t=parseInt(t[1],16),y(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t)):(t=w.exec(e))?r(parseInt(t[1],16)):(t=T.exec(e))?y(t[1],t[2],t[3]):(t=M.exec(e))?y(2.55*t[1],2.55*t[2],2.55*t[3]):(t=S.exec(e))?x(t[1],.01*t[2],.01*t[3]):h.has(e)?r(h.get(e)):null};k.prototype=t.prototype,y.prototype=n.prototype,x.prototype=i.prototype;var C=c.prototype=new t,R=18;C.brighter=function(e){return new c(this.l+R*(null==e?1:e),this.a,this.b)},C.darker=function(e){return new c(this.l-R*(null==e?1:e),this.a,this.b)};var D=.95047,L=1,N=1.08883,Y=4/29,E=6/29,U=3*E*E,X=E*E*E;C.rgb=function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,a=isNaN(this.b)?e:e-this.b/200;return e=L*s(e),t=D*s(t),a=N*s(a),new n(o(3.2404542*t-1.5371385*e-.4985314*a),o(-.969266*t+1.8760108*e+.041556*a),o(.0556434*t-.2040259*e+1.0572252*a))};var A=Math.PI/180,_=l.prototype=new t;_.brighter=function(e){return new l(this.h,this.c,this.l+R*(null==e?1:e))},_.darker=function(e){return new l(this.h,this.c,this.l-R*(null==e?1:e))},_.rgb=function(){return F(this).rgb()};var F=function(e,t,a){if(1===arguments.length)if(e instanceof c)a=e.b,t=e.a,e=e.l;else if(e instanceof l){var r=e.h*A;a=Math.sin(r)*e.c,t=Math.cos(r)*e.c,e=e.l}else{e instanceof n||(e=y(e));var i=d(e.r),f=d(e.g),a=d(e.b),o=u((.4124564*i+.3575761*f+.1804375*a)/D),s=u((.2126729*i+.7151522*f+.072175*a)/L),b=u((.0193339*i+.119192*f+.9503041*a)/N);a=200*(s-b),t=500*(o-s),e=116*s-16}return new c(e,t,a)};F.prototype=c.prototype;var $=180/Math.PI,W=function(e,t,n){return 1===arguments.length&&(e instanceof l?(n=e.l,t=e.c,e=e.h):(e instanceof c||(e=F(e)),n=e.l,t=Math.sqrt(e.a*e.a+e.b*e.b),e=Math.atan2(e.b,e.a)*$,0>e&&(e+=360))),new l(e,t,n)};W.prototype=l.prototype;var z=b.prototype=new t;z.brighter=function(e){return e=null==e?m:Math.pow(m,e),new b(this.h,this.s,this.l*e)},z.darker=function(e){return e=null==e?p:Math.pow(p,e),new b(this.h,this.s,this.l*e)};var H=1,j=-.14861,B=1.78277,q=-.29227,P=-.90649,I=1.97294,Z=I*P,Q=I*B,V=B*q-P*j,G=function(e,t,a){if(1===arguments.length)if(e instanceof b)a=e.l,t=e.s,e=e.h;else{e instanceof n||(e=y(e));var r=e.r/255,i=e.g/255,f=e.b/255;a=(V*f+Z*r-Q*i)/(V+Z-Q);var c=f-a,o=(I*(i-a)-q*c)/P,s=Math.pow(a,H);t=Math.sqrt(o*o+c*c)/(I*s*(1-s)),e=t?Math.atan2(o,c)*$-120:0/0,0>e&&(e+=360)}return new b(e,t,a)};z.rgb=function(){var e=isNaN(this.h)?0:(this.h+120)*A,t=Math.pow(this.l,H),a=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new n(255*(t+a*(j*r+B*i)),255*(t+a*(q*r+P*i)),255*(t+a*I*r))},G.prototype=b.prototype;var J=function(e,t){e=G(e),t=G(t);var n=isNaN(e.h)?t.h:e.h,a=isNaN(e.s)?t.s:e.s,r=e.l,i=isNaN(t.h)?0:t.h-n,f=isNaN(t.s)?0:t.s-a,c=t.l-r;return function(t){return e.h=n+i*t,e.s=a+f*t,e.l=r+c*t,e+""}},K=function(e,t){var n=(e-t)%360;return n+(n>180?-360:-180>n?360:0)},ee=function(e,t){e=G(e),t=G(t);var n=isNaN(e.h)?t.h:e.h,a=isNaN(e.s)?t.s:e.s,r=e.l,i=isNaN(t.h)?0:K(t.h,n),f=isNaN(t.s)?0:t.s-a,c=t.l-r;return function(t){return e.h=n+i*t,e.s=a+f*t,e.l=r+c*t,e+""}},te=function(e,t){e=W(e),t=W(t);var n=isNaN(e.h)?t.h:e.h,a=isNaN(e.c)?t.c:e.c,r=e.l,i=isNaN(t.h)?0:t.h-n,f=isNaN(t.c)?0:t.c-a,c=t.l-r;return function(t){return e.h=n+i*t,e.c=a+f*t,e.l=r+c*t,e+""}},ne=function(e,t){e=W(e),t=W(t);var n=isNaN(e.h)?t.h:e.h,a=isNaN(e.c)?t.c:e.c,r=e.l,i=isNaN(t.h)?0:K(t.h,n),f=isNaN(t.c)?0:t.c-a,c=t.l-r;return function(t){return e.h=n+i*t,e.c=a+f*t,e.l=r+c*t,e+""}},ae=function(e,t){e=F(e),t=F(t);var n=e.l,a=e.a,r=e.b,i=t.l-n,f=t.a-a,c=t.b-r;return function(t){return e.l=n+i*t,e.a=a+f*t,e.b=r+c*t,e+""}},re=function(e,t){e=x(e),t=x(t);var n=isNaN(e.h)?t.h:e.h,a=isNaN(e.s)?t.s:e.s,r=e.l,i=isNaN(t.h)?0:t.h-n,f=isNaN(t.s)?0:t.s-a,c=t.l-r;return function(t){return e.h=n+i*t,e.s=a+f*t,e.l=r+c*t,e+""}},ie=function(e,t){e=x(e),t=x(t);var n=isNaN(e.h)?t.h:e.h,a=isNaN(e.s)?t.s:e.s,r=e.l,i=isNaN(t.h)?0:K(t.h,n),f=isNaN(t.s)?0:t.s-a,c=t.l-r;return function(t){return e.h=n+i*t,e.s=a+f*t,e.l=r+c*t,e+""}},fe=function(e,t){e=y(e),t=y(t);var n=e.r,r=e.g,i=e.b,f=t.r-n,c=t.g-r,o=t.b-i;return function(e){return a(Math.round(n+f*e),Math.round(r+c*e),Math.round(i+o*e))}};e.color=k,e.rgb=y,e.hsl=x,e.lab=F,e.hcl=W,e.cubehelix=G,e.interpolateRgb=fe,e.interpolateHsl=ie,e.interpolateHslLong=re,e.interpolateLab=ae,e.interpolateHcl=ne,e.interpolateHclLong=te,e.interpolateCubehelix=ee,e.interpolateCubehelixLong=J})},{}],5:[function(t,n,a){!function(t,r){"object"==typeof a&&"undefined"!=typeof n?r(a):"function"==typeof e&&e.amd?e(["exports"],r):r(t.format={})}(this,function(e){"use strict";function t(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,a=e.slice(0,n);return[a.length>1?a[0]+a.slice(2):a,+e.slice(n+1)]}function n(e){return e=t(Math.abs(e)),e?e[1]:0/0}function a(e,n){var a=t(e,n);if(!a)return e+"";var r=a[0],i=a[1],f=i-(h=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,c=r.length;return f===c?r:f>c?r+new Array(f-c+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+t(e,n+f-1)[0]}function r(e,n){var a=t(e,n);if(!a)return e+"";var r=a[0],i=a[1];return 0>i?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}function i(e,t){e=e.toPrecision(t);e:for(var n,a=e.length,r=1,i=-1;a>r;++r)switch(e[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;case"e":break e;default:i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(n+1):e}function f(e){if(!(t=m.exec(e)))throw new Error("invalid format: "+e);var t,n=t[1]||" ",a=t[2]||">",r=t[3]||"-",i=t[4]||"",f=!!t[5],c=t[6]&&+t[6],o=!!t[7],s=t[8]&&+t[8].slice(1),u=t[9]||"";"n"===u?(o=!0,u="g"):p[u]||(u=""),(f||"0"===n&&"="===a)&&(f=!0,n="0",a="="),this.fill=n,this.align=a,this.sign=r,this.symbol=i,this.zero=f,this.width=c,this.comma=o,this.precision=s,this.type=u}function c(e){return new f(e)}function o(e){return e}function s(e,t){return function(n,a){for(var r=n.length,i=[],f=0,c=e[0],o=0;r>0&&c>0&&(o+c+1>a&&(c=Math.max(1,a-o)),i.push(n.substring(r-=c,r+c)),!((o+=c+1)>a));)c=e[f=(f+1)%e.length];return i.reverse().join(t)}}function u(e){function t(e){e=c(e);var t=e.fill,n=e.align,a=e.sign,o=e.symbol,s=e.zero,u=e.width,d=e.comma,l=e.precision,b=e.type,m="$"===o?i[0]:"#"===o&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",y="$"===o?i[1]:/[%p]/.test(b)?"%":"",v=p[b],x=!b||/[defgprs%]/.test(b); +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.vl=e()}}(function(){var e;return function t(e,n,a){function r(f,c){if(!n[f]){if(!e[f]){var o="function"==typeof require&&require;if(!c&&o)return o(f,!0);if(i)return i(f,!0);var u=new Error("Cannot find module '"+f+"'");throw u.code="MODULE_NOT_FOUND",u}var s=n[f]={exports:{}};e[f][0].call(s.exports,function(t){var n=e[f][1][t];return r(n?n:t)},s,s.exports,t,e,n,a)}return n[f].exports}for(var i="function"==typeof require&&require,f=0;fe?"0"+e.toString(16):e.toString(16))+(16>t?"0"+t.toString(16):t.toString(16))+(16>n?"0"+n.toString(16):n.toString(16))}function r(e){return y(e>>16&255,e>>8&255,255&e)}function i(e,t,n){this.h=+e,this.s=Math.max(0,Math.min(1,+t)),this.l=Math.max(0,Math.min(1,+n))}function f(e,t,n){return 255*(60>e?t+(n-t)*e/60:180>e?n:240>e?t+(n-t)*(240-e)/60:t)}function c(e,t,n){this.l=+e,this.a=+t,this.b=+n}function o(e){return 255*(.0031308>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function u(e){return e>U?e*e*e:E*(e-Y)}function s(e){return e>A?Math.pow(e,1/3):e/E+Y}function d(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function l(e,t,n){this.h=+e,this.c=+t,this.l=+n}function b(e,t,n){this.h=+e,this.s=+t,this.l=+n}t.prototype={toString:function(){return this.rgb()+""}};var h=(new Map).set("aliceblue",15792383).set("antiquewhite",16444375).set("aqua",65535).set("aquamarine",8388564).set("azure",15794175).set("beige",16119260).set("bisque",16770244).set("black",0).set("blanchedalmond",16772045).set("blue",255).set("blueviolet",9055202).set("brown",10824234).set("burlywood",14596231).set("cadetblue",6266528).set("chartreuse",8388352).set("chocolate",13789470).set("coral",16744272).set("cornflowerblue",6591981).set("cornsilk",16775388).set("crimson",14423100).set("cyan",65535).set("darkblue",139).set("darkcyan",35723).set("darkgoldenrod",12092939).set("darkgray",11119017).set("darkgreen",25600).set("darkgrey",11119017).set("darkkhaki",12433259).set("darkmagenta",9109643).set("darkolivegreen",5597999).set("darkorange",16747520).set("darkorchid",10040012).set("darkred",9109504).set("darksalmon",15308410).set("darkseagreen",9419919).set("darkslateblue",4734347).set("darkslategray",3100495).set("darkslategrey",3100495).set("darkturquoise",52945).set("darkviolet",9699539).set("deeppink",16716947).set("deepskyblue",49151).set("dimgray",6908265).set("dimgrey",6908265).set("dodgerblue",2003199).set("firebrick",11674146).set("floralwhite",16775920).set("forestgreen",2263842).set("fuchsia",16711935).set("gainsboro",14474460).set("ghostwhite",16316671).set("gold",16766720).set("goldenrod",14329120).set("gray",8421504).set("green",32768).set("greenyellow",11403055).set("grey",8421504).set("honeydew",15794160).set("hotpink",16738740).set("indianred",13458524).set("indigo",4915330).set("ivory",16777200).set("khaki",15787660).set("lavender",15132410).set("lavenderblush",16773365).set("lawngreen",8190976).set("lemonchiffon",16775885).set("lightblue",11393254).set("lightcoral",15761536).set("lightcyan",14745599).set("lightgoldenrodyellow",16448210).set("lightgray",13882323).set("lightgreen",9498256).set("lightgrey",13882323).set("lightpink",16758465).set("lightsalmon",16752762).set("lightseagreen",2142890).set("lightskyblue",8900346).set("lightslategray",7833753).set("lightslategrey",7833753).set("lightsteelblue",11584734).set("lightyellow",16777184).set("lime",65280).set("limegreen",3329330).set("linen",16445670).set("magenta",16711935).set("maroon",8388608).set("mediumaquamarine",6737322).set("mediumblue",205).set("mediumorchid",12211667).set("mediumpurple",9662683).set("mediumseagreen",3978097).set("mediumslateblue",8087790).set("mediumspringgreen",64154).set("mediumturquoise",4772300).set("mediumvioletred",13047173).set("midnightblue",1644912).set("mintcream",16121850).set("mistyrose",16770273).set("moccasin",16770229).set("navajowhite",16768685).set("navy",128).set("oldlace",16643558).set("olive",8421376).set("olivedrab",7048739).set("orange",16753920).set("orangered",16729344).set("orchid",14315734).set("palegoldenrod",15657130).set("palegreen",10025880).set("paleturquoise",11529966).set("palevioletred",14381203).set("papayawhip",16773077).set("peachpuff",16767673).set("peru",13468991).set("pink",16761035).set("plum",14524637).set("powderblue",11591910).set("purple",8388736).set("rebeccapurple",6697881).set("red",16711680).set("rosybrown",12357519).set("royalblue",4286945).set("saddlebrown",9127187).set("salmon",16416882).set("sandybrown",16032864).set("seagreen",3050327).set("seashell",16774638).set("sienna",10506797).set("silver",12632256).set("skyblue",8900331).set("slateblue",6970061).set("slategray",7372944).set("slategrey",7372944).set("snow",16775930).set("springgreen",65407).set("steelblue",4620980).set("tan",13808780).set("teal",32896).set("thistle",14204888).set("tomato",16737095).set("turquoise",4251856).set("violet",15631086).set("wheat",16113331).set("white",16777215).set("whitesmoke",16119285).set("yellow",16776960).set("yellowgreen",10145074),g=n.prototype=new t,p=.7;g.darker=function(e){return e=null==e?p:Math.pow(p,e),new n(this.r*e,this.g*e,this.b*e)};var m=1/p;g.brighter=function(e){return e=null==e?m:Math.pow(m,e),new n(this.r*e,this.g*e,this.b*e)},g.rgb=function(){return this},g.toString=function(){return a(this.r,this.g,this.b)};var y=function(e,a,r){return 1===arguments.length&&(e instanceof t||(e=k(e)),e?(e=e.rgb(),r=e.b,a=e.g,e=e.r):e=a=r=0/0),new n(e,a,r)},v=i.prototype=new t;v.brighter=function(e){return e=null==e?m:Math.pow(m,e),new i(this.h,this.s,this.l*e)},v.darker=function(e){return e=null==e?p:Math.pow(p,e),new i(this.h,this.s,this.l*e)},v.rgb=function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,a=this.l,r=.5>=a?a*(1+t):a+t-a*t,i=2*a-r;return new n(f(e>=240?e-240:e+120,i,r),f(e,i,r),f(120>e?e+240:e-120,i,r))};var x=function(e,n,a){if(1===arguments.length)if(e instanceof i)a=e.l,n=e.s,e=e.h;else if(e instanceof t||(e=k(e)),e){if(e instanceof i)return e;e=e.rgb();var r=e.r/255,f=e.g/255,c=e.b/255,o=Math.min(r,f,c),u=Math.max(r,f,c),s=u-o;a=(u+o)/2,s?(n=.5>a?s/(u+o):s/(2-u-o),e=r===u?(f-c)/s+6*(c>f):f===u?(c-r)/s+2:(r-f)/s+4,e*=60):(e=0/0,n=a>0&&1>a?0:e)}else e=n=a=0/0;return new i(e,n,a)},O=/^#([0-9a-f]{3})$/,w=/^#([0-9a-f]{6})$/,T=/^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/,M=/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,S=/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,k=function(e){var t;return e=(e+"").trim().toLowerCase(),(t=O.exec(e))?(t=parseInt(t[1],16),y(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t)):(t=w.exec(e))?r(parseInt(t[1],16)):(t=T.exec(e))?y(t[1],t[2],t[3]):(t=M.exec(e))?y(2.55*t[1],2.55*t[2],2.55*t[3]):(t=S.exec(e))?x(t[1],.01*t[2],.01*t[3]):h.has(e)?r(h.get(e)):null};k.prototype=t.prototype,y.prototype=n.prototype,x.prototype=i.prototype;var C=c.prototype=new t,R=18;C.brighter=function(e){return new c(this.l+R*(null==e?1:e),this.a,this.b)},C.darker=function(e){return new c(this.l-R*(null==e?1:e),this.a,this.b)};var N=.95047,D=1,L=1.08883,Y=4/29,U=6/29,E=3*U*U,A=U*U*U;C.rgb=function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,a=isNaN(this.b)?e:e-this.b/200;return e=D*u(e),t=N*u(t),a=L*u(a),new n(o(3.2404542*t-1.5371385*e-.4985314*a),o(-.969266*t+1.8760108*e+.041556*a),o(.0556434*t-.2040259*e+1.0572252*a))};var X=Math.PI/180,_=l.prototype=new t;_.brighter=function(e){return new l(this.h,this.c,this.l+R*(null==e?1:e))},_.darker=function(e){return new l(this.h,this.c,this.l-R*(null==e?1:e))},_.rgb=function(){return F(this).rgb()};var F=function(e,t,a){if(1===arguments.length)if(e instanceof c)a=e.b,t=e.a,e=e.l;else if(e instanceof l){var r=e.h*X;a=Math.sin(r)*e.c,t=Math.cos(r)*e.c,e=e.l}else{e instanceof n||(e=y(e));var i=d(e.r),f=d(e.g),a=d(e.b),o=s((.4124564*i+.3575761*f+.1804375*a)/N),u=s((.2126729*i+.7151522*f+.072175*a)/D),b=s((.0193339*i+.119192*f+.9503041*a)/L);a=200*(u-b),t=500*(o-u),e=116*u-16}return new c(e,t,a)};F.prototype=c.prototype;var $=180/Math.PI,W=function(e,t,n){return 1===arguments.length&&(e instanceof l?(n=e.l,t=e.c,e=e.h):(e instanceof c||(e=F(e)),n=e.l,t=Math.sqrt(e.a*e.a+e.b*e.b),e=Math.atan2(e.b,e.a)*$,0>e&&(e+=360))),new l(e,t,n)};W.prototype=l.prototype;var z=b.prototype=new t;z.brighter=function(e){return e=null==e?m:Math.pow(m,e),new b(this.h,this.s,this.l*e)},z.darker=function(e){return e=null==e?p:Math.pow(p,e),new b(this.h,this.s,this.l*e)};var j=1,H=-.14861,B=1.78277,q=-.29227,P=-.90649,I=1.97294,Z=I*P,G=I*B,Q=B*q-P*H,V=function(e,t,a){if(1===arguments.length)if(e instanceof b)a=e.l,t=e.s,e=e.h;else{e instanceof n||(e=y(e));var r=e.r/255,i=e.g/255,f=e.b/255;a=(Q*f+Z*r-G*i)/(Q+Z-G);var c=f-a,o=(I*(i-a)-q*c)/P,u=Math.pow(a,j);t=Math.sqrt(o*o+c*c)/(I*u*(1-u)),e=t?Math.atan2(o,c)*$-120:0/0,0>e&&(e+=360)}return new b(e,t,a)};z.rgb=function(){var e=isNaN(this.h)?0:(this.h+120)*X,t=Math.pow(this.l,j),a=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new n(255*(t+a*(H*r+B*i)),255*(t+a*(q*r+P*i)),255*(t+a*I*r))},V.prototype=b.prototype;var J=function(e,t){e=V(e),t=V(t);var n=isNaN(e.h)?t.h:e.h,a=isNaN(e.s)?t.s:e.s,r=e.l,i=isNaN(t.h)?0:t.h-n,f=isNaN(t.s)?0:t.s-a,c=t.l-r;return function(t){return e.h=n+i*t,e.s=a+f*t,e.l=r+c*t,e+""}},K=function(e,t){var n=(e-t)%360;return n+(n>180?-360:-180>n?360:0)},ee=function(e,t){e=V(e),t=V(t);var n=isNaN(e.h)?t.h:e.h,a=isNaN(e.s)?t.s:e.s,r=e.l,i=isNaN(t.h)?0:K(t.h,n),f=isNaN(t.s)?0:t.s-a,c=t.l-r;return function(t){return e.h=n+i*t,e.s=a+f*t,e.l=r+c*t,e+""}},te=function(e,t){e=W(e),t=W(t);var n=isNaN(e.h)?t.h:e.h,a=isNaN(e.c)?t.c:e.c,r=e.l,i=isNaN(t.h)?0:t.h-n,f=isNaN(t.c)?0:t.c-a,c=t.l-r;return function(t){return e.h=n+i*t,e.c=a+f*t,e.l=r+c*t,e+""}},ne=function(e,t){e=W(e),t=W(t);var n=isNaN(e.h)?t.h:e.h,a=isNaN(e.c)?t.c:e.c,r=e.l,i=isNaN(t.h)?0:K(t.h,n),f=isNaN(t.c)?0:t.c-a,c=t.l-r;return function(t){return e.h=n+i*t,e.c=a+f*t,e.l=r+c*t,e+""}},ae=function(e,t){e=F(e),t=F(t);var n=e.l,a=e.a,r=e.b,i=t.l-n,f=t.a-a,c=t.b-r;return function(t){return e.l=n+i*t,e.a=a+f*t,e.b=r+c*t,e+""}},re=function(e,t){e=x(e),t=x(t);var n=isNaN(e.h)?t.h:e.h,a=isNaN(e.s)?t.s:e.s,r=e.l,i=isNaN(t.h)?0:t.h-n,f=isNaN(t.s)?0:t.s-a,c=t.l-r;return function(t){return e.h=n+i*t,e.s=a+f*t,e.l=r+c*t,e+""}},ie=function(e,t){e=x(e),t=x(t);var n=isNaN(e.h)?t.h:e.h,a=isNaN(e.s)?t.s:e.s,r=e.l,i=isNaN(t.h)?0:K(t.h,n),f=isNaN(t.s)?0:t.s-a,c=t.l-r;return function(t){return e.h=n+i*t,e.s=a+f*t,e.l=r+c*t,e+""}},fe=function(e,t){e=y(e),t=y(t);var n=e.r,r=e.g,i=e.b,f=t.r-n,c=t.g-r,o=t.b-i;return function(e){return a(Math.round(n+f*e),Math.round(r+c*e),Math.round(i+o*e))}};e.color=k,e.rgb=y,e.hsl=x,e.lab=F,e.hcl=W,e.cubehelix=V,e.interpolateRgb=fe,e.interpolateHsl=ie,e.interpolateHslLong=re,e.interpolateLab=ae,e.interpolateHcl=ne,e.interpolateHclLong=te,e.interpolateCubehelix=ee,e.interpolateCubehelixLong=J})},{}],5:[function(t,n,a){!function(t,r){"object"==typeof a&&"undefined"!=typeof n?r(a):"function"==typeof e&&e.amd?e(["exports"],r):r(t.format={})}(this,function(e){"use strict";function t(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,a=e.slice(0,n);return[a.length>1?a[0]+a.slice(2):a,+e.slice(n+1)]}function n(e){return e=t(Math.abs(e)),e?e[1]:0/0}function a(e,n){var a=t(e,n);if(!a)return e+"";var r=a[0],i=a[1],f=i-(h=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,c=r.length;return f===c?r:f>c?r+new Array(f-c+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+t(e,n+f-1)[0]}function r(e,n){var a=t(e,n);if(!a)return e+"";var r=a[0],i=a[1];return 0>i?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}function i(e,t){e=e.toPrecision(t);e:for(var n,a=e.length,r=1,i=-1;a>r;++r)switch(e[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;case"e":break e;default:i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(n+1):e}function f(e){if(!(t=m.exec(e)))throw new Error("invalid format: "+e);var t,n=t[1]||" ",a=t[2]||">",r=t[3]||"-",i=t[4]||"",f=!!t[5],c=t[6]&&+t[6],o=!!t[7],u=t[8]&&+t[8].slice(1),s=t[9]||"";"n"===s?(o=!0,s="g"):p[s]||(s=""),(f||"0"===n&&"="===a)&&(f=!0,n="0",a="="),this.fill=n,this.align=a,this.sign=r,this.symbol=i,this.zero=f,this.width=c,this.comma=o,this.precision=u,this.type=s}function c(e){return new f(e)}function o(e){return e}function u(e,t){return function(n,a){for(var r=n.length,i=[],f=0,c=e[0],o=0;r>0&&c>0&&(o+c+1>a&&(c=Math.max(1,a-o)),i.push(n.substring(r-=c,r+c)),!((o+=c+1)>a));)c=e[f=(f+1)%e.length];return i.reverse().join(t)}}function s(e){function t(e){e=c(e);var t=e.fill,n=e.align,a=e.sign,o=e.symbol,u=e.zero,s=e.width,d=e.comma,l=e.precision,b=e.type,m="$"===o?i[0]:"#"===o&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",y="$"===o?i[1]:/[%p]/.test(b)?"%":"",v=p[b],x=!b||/[defgprs%]/.test(b); -return l=null==l?b?6:12:/[gprs]/.test(b)?Math.max(1,Math.min(21,l)):Math.max(0,Math.min(20,l)),function(e){var i=m,c=y;if("c"===b)c=v(e)+c,e="";else{e=+e;var o=(0>e||0>1/e)&&(e*=-1,!0);if(e=v(e,l),i=(o?"("===a?a:"-":"-"===a||"("===a?"":a)+i,c=c+("s"===b?g[8+h/3]:"")+(o&&"("===a?")":""),x)for(var p,O=-1,w=e.length;++Op||p>57){c=(46===p?f+e.slice(O+1):e.slice(O))+c,e=e.slice(0,O);break}}d&&!s&&(e=r(e,1/0));var T=i.length+e.length+c.length,M=u>T?new Array(u-T+1).join(t):"";switch(d&&s&&(e=r(M+e,M.length?u-c.length:1/0),M=""),n){case"<":return i+e+c+M;case"=":return i+M+e+c;case"^":return M.slice(0,T=M.length>>1)+i+e+c+M.slice(T)}return M+i+e+c}}function a(e,a){var r=t((e=c(e),e.type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(n(a)/3))),f=Math.pow(10,-i),o=g[8+i/3];return function(e){return r(f*e)+o}}var r=e.grouping&&e.thousands?s(e.grouping,e.thousands):o,i=e.currency,f=e.decimal;return{format:t,formatPrefix:a}}function d(e,t){return Math.max(0,n(Math.abs(t))-n(Math.abs(e)))+1}function l(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(n(t)/3)))-n(Math.abs(e)))}function b(e){return Math.max(0,-n(Math.abs(e)))}var h,g=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],p={"":i,"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return r(100*e,t)},r:r,s:a,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},m=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;f.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 y=u({decimal:".",thousands:",",grouping:[3],currency:["$",""]});e.format=y.format,e.formatPrefix=y.formatPrefix,e.formatSpecifier=c,e.localeFormat=u,e.precisionFixed=b,e.precisionPrefix=l,e.precisionRound=d})},{}],6:[function(t,n,a){"undefined"==typeof Map?(Map=function(){this.clear()},Map.prototype={set:function(e,t){return this._[e]=t,this},get:function(e){return this._[e]},has:function(e){return e in this._},"delete":function(e){return e in this._&&delete this._[e]},clear:function(){this._=Object.create(null)},get size(){var e=0;for(var t in this._)++e;return e},forEach:function(e){for(var t in this._)e(this._[t],t,this)}}):function(){var e=new Map;e.set(0,0)!==e&&(e=e.set,Map.prototype.set=function(){return e.apply(this,arguments),this})}(),function(t,r){"object"==typeof a&&"undefined"!=typeof n?r(a):"function"==typeof e&&e.amd?e(["exports"],r):r(t.timeFormat={})}(this,function(e){"use strict";function t(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function n(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function a(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}function r(e,t,n){var a=ae.exec(t.slice(n,n+1));return a?n+a[0].length:-1}function i(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function f(e,t,n){var a=re.exec(t.slice(n,n+1));return a?(e.w=+a[0],n+a[0].length):-1}function c(e,t,n){var a=re.exec(t.slice(n));return a?(e.U=+a[0],n+a[0].length):-1}function o(e,t,n){var a=re.exec(t.slice(n));return a?(e.W=+a[0],n+a[0].length):-1}function s(e,t,n){var a=re.exec(t.slice(n,n+2));return a?(e.y=+a[0]+(+a[0]>68?1900:2e3),n+a[0].length):-1}function u(e,t,n){var a=re.exec(t.slice(n,n+2));return a?(e.m=a[0]-1,n+a[0].length):-1}function d(e,t,n){var a=re.exec(t.slice(n,n+2));return a?(e.d=+a[0],n+a[0].length):-1}function l(e,t,n){var a=re.exec(t.slice(n,n+3));return a?(e.m=0,e.d=+a[0],n+a[0].length):-1}function b(e,t,n){var a=re.exec(t.slice(n,n+2));return a?(e.H=+a[0],n+a[0].length):-1}function h(e,t,n){var a=re.exec(t.slice(n,n+2));return a?(e.M=+a[0],n+a[0].length):-1}function g(e,t,n){var a=re.exec(t.slice(n,n+2));return a?(e.S=+a[0],n+a[0].length):-1}function p(e,t,n){var a=re.exec(t.slice(n,n+3));return a?(e.L=+a[0],n+a[0].length):-1}function m(e,t,n){var a=re.exec(t.slice(n,n+4));return a?(e.y=+a[0],n+a[0].length):-1}function y(){return"%"}function v(){return"+0000"}function x(e,t,n){var a=0>e?"-":"",r=(a?-e:e)+"",i=r.length;return a+(n>i?new Array(n-i+1).join(t)+r:r)}function O(e,t){return x(e.getUTCFullYear()%1e4,t,4)}function w(e,t){return x(e.getUTCFullYear()%100,t,2)}function T(e,t,n){function a(t){return e(t=new Date(+t)),t}return a.floor=a,a.round=function(n){var a=new Date(+n),r=new Date(n-1);return e(a),e(r),t(r,1),r-n>n-a?a:r},a.ceil=function(n){return e(n=new Date(n-1)),t(n,1),n},a.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},a.range=function(n,a,r){var i=[];if(n=new Date(n-1),a=new Date(+a),r=null==r?1:Math.floor(r),!(a>n&&r>0))return i;for(t(n,1),e(n),a>n&&i.push(new Date(+n));t(n,r),e(n),a>n;)i.push(new Date(+n));return i},a.filter=function(n){return T(function(t){for(;e(t),!n(t);)t.setTime(t-1)},function(e,a){for(;--a>=0;)for(;t(e,1),!n(e););})},n&&(a.count=function(t,a){return fe.setTime(+t),ie.setTime(+a),e(fe),e(ie),Math.floor(n(fe,ie))}),a}function M(e){return T(function(t){t.setUTCHours(0,0,0,0),t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/6048e5})}function S(e,t){return x(oe.count(ce(e),e),t,2)}function k(e){return e.getUTCDay()}function C(e,t){return x(se.count(ce(e),e),t,2)}function R(e,t){return x(e.getUTCSeconds(),t,2)}function D(e,t){return x(e.getUTCMinutes(),t,2)}function L(e,t){return x(e.getUTCMonth()+1,t,2)}function N(e,t){return x(e.getUTCMilliseconds(),t,3)}function Y(e,t){return x(1+ue.count(ce(e),e),t,3)}function E(e,t){return x(e.getUTCHours()%12||12,t,2)}function U(e,t){return x(e.getUTCHours(),t,2)}function X(e,t){return x(e.getUTCDate(),t,2)}function A(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+x(t/60|0,"0",2)+x(t%60,"0",2)}function _(e,t){return x(e.getFullYear()%1e4,t,4)}function F(e,t){return x(e.getFullYear()%100,t,2)}function $(e){return T(function(t){t.setHours(0,0,0,0),t.setDate(t.getDate()-(t.getDay()+7-e)%7)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5})}function W(e,t){return x(le.count(de(e),e),t,2)}function z(e){return e.getDay()}function H(e,t){return x(be.count(de(e),e),t,2)}function j(e,t){return x(e.getSeconds(),t,2)}function B(e,t){return x(e.getMinutes(),t,2)}function q(e,t){return x(e.getMonth()+1,t,2)}function P(e,t){return x(e.getMilliseconds(),t,3)}function I(e,t){return x(1+he.count(de(e),e),t,3)}function Z(e,t){return x(e.getHours()%12||12,t,2)}function Q(e,t){return x(e.getHours(),t,2)}function V(e,t){return x(e.getDate(),t,2)}function G(e){for(var t=new Map,n=-1,a=e.length;++nf;){if(a>=o)return-1;if(r=t.charCodeAt(f++),37===r){if(r=t.charAt(f++),i=Ae[r in ne?t.charAt(f++):r],!i||(a=i(e,n,a))<0)return-1}else if(r!=n.charCodeAt(a++))return-1}return a}function $(e,t,n){var a=Re.exec(t.slice(n));return a?(e.w=De.get(a[0].toLowerCase()),n+a[0].length):-1}function J(e,t,n){var a=ke.exec(t.slice(n));return a?(e.w=Ce.get(a[0].toLowerCase()),n+a[0].length):-1}function ee(e,t,n){var a=Ye.exec(t.slice(n));return a?(e.m=Ee.get(a[0].toLowerCase()),n+a[0].length):-1}function te(e,t,n){var a=Le.exec(t.slice(n));return a?(e.m=Ne.get(a[0].toLowerCase()),n+a[0].length):-1}function ae(e,t,n){return M(e,me,t,n)}function re(e,t,n){return M(e,ye,t,n)}function ie(e,t,n){return M(e,ve,t,n)}function fe(e,t,n){var a=Se.get(t.slice(n,n+=2).toLowerCase());return null==a?-1:(e.p=a,n)}function ce(e){return we[e.getDay()]}function oe(e){return Oe[e.getDay()]}function se(e){return Me[e.getMonth()]}function ue(e){return Te[e.getMonth()]}function de(e){return xe[+(e.getHours()>=12)]}function le(e){return we[e.getUTCDay()]}function be(e){return Oe[e.getUTCDay()]}function he(e){return Me[e.getUTCMonth()]}function ge(e){return Te[e.getUTCMonth()]}function pe(e){return xe[+(e.getUTCHours()>=12)]}var me=e.dateTime,ye=e.date,ve=e.time,xe=e.periods,Oe=e.days,we=e.shortDays,Te=e.months,Me=e.shortMonths,Se=G(xe),ke=K(Oe),Ce=G(Oe),Re=K(we),De=G(we),Le=K(Te),Ne=G(Te),Ye=K(Me),Ee=G(Me),Ue={a:ce,A:oe,b:se,B:ue,c:null,d:V,e:V,H:Q,I:Z,j:I,L:P,m:q,M:B,p:de,S:j,U:H,w:z,W:W,x:null,X:null,y:F,Y:_,Z:A,"%":y},Xe={a:le,A:be,b:he,B:ge,c:null,d:X,e:X,H:U,I:E,j:Y,L:N,m:L,M:D,p:pe,S:R,U:C,w:k,W:S,x:null,X:null,y:w,Y:O,Z:v,"%":y},Ae={a:$,A:J,b:ee,B:te,c:ae,d:d,e:d,H:b,I:b,j:l,L:p,m:u,M:h,p:fe,S:g,U:c,w:f,W:o,x:re,X:ie,y:s,Y:m,Z:i,"%":r};return Ue.x=x(ye,Ue),Ue.X=x(ve,Ue),Ue.c=x(me,Ue),Xe.x=x(ye,Xe),Xe.X=x(ve,Xe),Xe.c=x(me,Xe),{format:function(e){var t=x(e+="",Ue);return t.parse=T(e,n),t.toString=function(){return e},t},utcFormat:function(e){var n=x(e+="",Xe);return n.parse=T(e,t),n.toString=function(){return e},n}}}function te(e){return e.toISOString()}var ne={"-":"",_:" ",0:"0"},ae=/^%/,re=/^\s*\d+/,ie=new Date,fe=new Date,ce=T(function(e){e.setUTCHours(0,0,0,0),e.setUTCMonth(0,1)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),oe=M(1),se=M(0),ue=T(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5}),de=T(function(e){e.setHours(0,0,0,0),e.setMonth(0,1)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()}),le=$(1),be=$(0),he=T(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),ge=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,pe=ee({dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",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"]});e.format=pe.format,e.utcFormat=pe.utcFormat;var me="%Y-%m-%dT%H:%M:%S.%LZ";te.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},te.toString=function(){return me};var ye=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?te:pe.utcFormat(me),ve=ye;e.isoFormat=ve,e.localeFormat=ee})},{}],7:[function(t,n,a){!function(t,r){"object"==typeof a&&"undefined"!=typeof n?r(a):"function"==typeof e&&e.amd?e(["exports"],r):r(t.time={})}(this,function(e){"use strict";function t(e,n,a){function f(t){return e(t=new Date(+t)),t}return f.floor=f,f.round=function(t){var a=new Date(+t),r=new Date(t-1);return e(a),e(r),n(r,1),r-t>t-a?a:r},f.ceil=function(t){return e(t=new Date(t-1)),n(t,1),t},f.offset=function(e,t){return n(e=new Date(+e),null==t?1:Math.floor(t)),e},f.range=function(t,a,r){var i=[];if(t=new Date(t-1),a=new Date(+a),r=null==r?1:Math.floor(r),!(a>t&&r>0))return i;for(n(t,1),e(t),a>t&&i.push(new Date(+t));n(t,r),e(t),a>t;)i.push(new Date(+t));return i},f.filter=function(a){return t(function(t){for(;e(t),!a(t);)t.setTime(t-1)},function(e,t){for(;--t>=0;)for(;n(e,1),!a(e););})},a&&(f.count=function(t,n){return i.setTime(+t),r.setTime(+n),e(i),e(r),Math.floor(a(i,r))}),f}function n(e){return t(function(t){t.setHours(0,0,0,0),t.setDate(t.getDate()-(t.getDay()+7-e)%7)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5})}function a(e){return t(function(t){t.setUTCHours(0,0,0,0),t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/6048e5})}var r=new Date,i=new Date,f=t(function(e){e.setMilliseconds(0)},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3});e.seconds=f.range;var c=t(function(e){e.setSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4});e.minutes=c.range;var o=t(function(e){e.setMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5});e.hours=o.range;var s=t(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5});e.days=s.range,e.sunday=n(0),e.sundays=e.sunday.range,e.monday=n(1),e.mondays=e.monday.range,e.tuesday=n(2),e.tuesdays=e.tuesday.range,e.wednesday=n(3),e.wednesdays=e.wednesday.range,e.thursday=n(4),e.thursdays=e.thursday.range,e.friday=n(5),e.fridays=e.friday.range,e.saturday=n(6),e.saturdays=e.saturday.range;var u=e.sunday;e.weeks=u.range;var d=t(function(e){e.setHours(0,0,0,0),e.setDate(1)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())});e.months=d.range;var l=t(function(e){e.setHours(0,0,0,0),e.setMonth(0,1)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()});e.years=l.range;var b=t(function(e){e.setUTCMilliseconds(0)},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3});e.utcSeconds=b.range;var h=t(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4});e.utcMinutes=h.range;var g=t(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5});e.utcHours=g.range;var p=t(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5});e.utcDays=p.range,e.utcSunday=a(0),e.utcSundays=e.utcSunday.range,e.utcMonday=a(1),e.utcMondays=e.utcMonday.range,e.utcTuesday=a(2),e.utcTuesdays=e.utcTuesday.range,e.utcWednesday=a(3),e.utcWednesdays=e.utcWednesday.range,e.utcThursday=a(4),e.utcThursdays=e.utcThursday.range,e.utcFriday=a(5),e.utcFridays=e.utcFriday.range,e.utcSaturday=a(6),e.utcSaturdays=e.utcSaturday.range;var m=e.utcSunday;e.utcWeeks=m.range;var y=t(function(e){e.setUTCHours(0,0,0,0),e.setUTCDate(1)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())});e.utcMonths=y.range;var v=t(function(e){e.setUTCHours(0,0,0,0),e.setUTCMonth(0,1)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()});e.utcYears=v.range,e.interval=t,e.second=f,e.minute=c,e.hour=o,e.day=s,e.week=u,e.month=d,e.year=l,e.utcSecond=b,e.utcMinute=h,e.utcHour=g,e.utcDay=p,e.utcWeek=m,e.utcMonth=y,e.utcYear=v})},{}],8:[function(e,t,n){function a(e){if(!e)throw Error("Missing binning options.");var t,n,a,c,o,s,u,d=e.maxbins||15,l=e.base||10,b=Math.log(l),h=e.div||[5,2],g=e.min,p=e.max,m=p-g;if(e.step)t=e.step;else if(e.steps)t=e.steps[Math.min(e.steps.length-1,r(e.steps,m/d,0,e.steps.length))];else{n=Math.ceil(Math.log(d)/b),a=e.minstep||0,t=Math.max(a,Math.pow(l,Math.round(Math.log(m)/b)-n));do t*=l;while(Math.ceil(m/t)>d);for(s=0;s=a&&d>=m/o&&(t=o)}return o=Math.log(t),c=o>=0?0:~~(-o/b)+1,u=Math.pow(l,-c-1),g=Math.min(g,Math.floor(g/t+u)*t),p=Math.ceil(p/t)*t,{start:g,stop:p,step:t,unit:{precision:c},value:i,index:f}}function r(e,t,n,a){for(;a>n;){var r=n+a>>>1;s.cmp(e[r],t)<0?n=r+1:a=r}return n}function i(e){return this.step*Math.floor(e/this.step+d)}function f(e){return Math.floor((e-this.start)/this.step+d)}function c(e){return this.unit.date(i.call(this,e))}function o(e){return f.call(this,this.unit.unit(e))}var s=e("../util"),u=e("../time"),d=1e-15;a.date=function(e){if(!e)throw Error("Missing date binning options.");var t=e.utc?u.utc:u,n=e.min,r=e.max,i=e.maxbins||20,f=e.minbins||4,s=+r-+n,d=e.unit?t[e.unit]:t.find(s,f,i),l=a({min:null!=d.min?d.min:d.unit(n),max:null!=d.max?d.max:d.unit(r),maxbins:i,minstep:d.minstep,steps:d.step});return l.unit=d,l.index=o,e.raw||(l.value=c),l},t.exports=a},{"../time":12,"../util":13}],9:[function(e,t,n){var a=t.exports={};a.repeat=function(e,t){var n,a=Array(t);for(n=0;t>n;++n)a[n]=e;return a},a.zeros=function(e){return a.repeat(0,e)},a.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("Infinite range");var a,r=[],i=-1;if(0>n)for(;(a=e+n*++i)>t;)r.push(a);else for(;(a=e+n*++i)1);return r=Math.sqrt(-2*Math.log(a)/a),n=e+f*r*t,e+i*r*t};return r.samples=function(e){return a.zeros(e).map(r)},r}},{}],10:[function(e,t,n){function a(e,t){return t?void(e[s]=t):e&&e[s]||null}function r(e,t){t=o.$(t);var n,a,r;if(e[s]&&(n=t(e[s]),o.isString(n)))return n;for(a=0,r=e.length;!o.isValid(n)&&r>a;++a)n=t?t(e[a]):e[a];return o.isDate(n)?"date":o.isNumber(n)?"number":o.isBoolean(n)?"boolean":o.isString(n)?"string":null}function i(e,t){return e.length?(t=t||o.keys(e[0]),t.reduce(function(t,n){return t[n]=r(e,n),t},{})):void 0}function f(e,t){t=o.$(t);var n,a,r,i=["boolean","integer","number","date"];for(n=0;ni;++i)r=t?t(e[i]):e[i],r in c||(c[r]=1,n.push(r));return n},f.count=function(e){return e&&e.length||0},f.count.valid=function(e,t){t=a.$(t);var n,r,i,f=0;for(r=0,i=e.length;i>r;++r)n=t?t(e[r]):e[r],a.isValid(n)&&(f+=1);return f},f.count.missing=function(e,t){t=a.$(t);var n,r,i,f=0;for(r=0,i=e.length;i>r;++r)n=t?t(e[r]):e[r],null==n&&(f+=1);return f},f.count.distinct=function(e,t){t=a.$(t);var n,r,i,f={},c=0;for(r=0,i=e.length;i>r;++r)n=t?t(e[r]):e[r],n in f||(f[n]=1,c+=1);return c},f.count.map=function(e,t){t=a.$(t);var n,r,i,f={};for(r=0,i=e.length;i>r;++r)n=t?t(e[r]):e[r],f[n]=n in f?f[n]+1:1;return f},f.median=function(e,t){return t&&(e=e.map(a.$(t))),e=e.filter(a.isValid).sort(a.cmp),f.quantile(e,.5)},f.quartile=function(e,t){t&&(e=e.map(a.$(t))),e=e.filter(a.isValid).sort(a.cmp);var n=f.quantile;return[n(e,.25),n(e,.5),n(e,.75)]},f.quantile=function(e,t,n){void 0===n&&(n=t,t=a.identity),t=a.$(t);var r=(e.length-1)*n+1,i=Math.floor(r),f=+t(e[i-1]),c=r-i;return c?f+c*(t(e[i])-f):f},f.sum=function(e,t){t=a.$(t);for(var n,r=0,i=0,f=e.length;f>i;++i)n=t?t(e[i]):e[i],a.isValid(n)&&(r+=n);return r},f.mean=function(e,t){t=a.$(t);var n,r,i,f,c,o=0;for(r=0,f=0,i=e.length;i>r;++r)c=t?t(e[r]):e[r],a.isValid(c)&&(n=c-o,o+=n/++f);return o},f.variance=function(e,t){if(t=a.$(t),!a.isArray(e)||e.length<2)return 0;var n,r,i,f,c=0,o=0;for(r=0,i=0;rf;++f)if(i=t?t(e[f]):e[f],a.isValid(i)){n=r=i;break}for(;c>f;++f)i=t?t(e[f]):e[f],a.isValid(i)&&(n>i&&(n=i),i>r&&(r=i));return[n,r]},f.extent.index=function(e,t){t=a.$(t);var n,r,i,f,c=-1,o=-1,s=e.length;for(f=0;s>f;++f)if(i=t?t(e[f]):e[f],a.isValid(i)){n=r=i,c=o=f;break}for(;s>f;++f)i=t?t(e[f]):e[f],a.isValid(i)&&(n>i&&(n=i,c=f),i>r&&(r=i,o=f));return[c,o]},f.dot=function(e,t,n){var r,i,f=0;if(n)for(t=a.$(t),n=a.$(n),r=0;rn;++n){if(r=f[n].val,0>s&&u===r)s=n-1;else if(s>-1&&u!==r){for(i=1+(n-1+s)/2;n>s;++s)o[f[s].idx]=i;s=-1}o[f[n].idx]=n+1,u=r}if(s>-1)for(i=1+(c-1+s)/2;c>s;++s)o[f[s].idx]=i;return o},f.cor=function(e,t,n){var r=n;n=r?e.map(a.$(n)):t,t=r?e.map(a.$(t)):e;var i=f.dot(t,n),c=f.mean(t),o=f.mean(n),s=f.stdev(t),u=f.stdev(n),d=e.length;return(i-d*c*o)/((d-1)*s*u)},f.cor.rank=function(e,t,n){var r,i,c,o=n?f.rank(e,a.$(t)):f.rank(e),s=n?f.rank(e,a.$(n)):f.rank(t),u=e.length;for(r=0,i=0;u>r;++r)c=o[r]-s[r],i+=c*c;return 1-6*i/(u*(u*u-1))},f.cor.dist=function(e,t,n){var r,i,c,o,s=n?e.map(a.$(t)):e,u=n?e.map(a.$(n)):t,d=f.dist.mat(s),l=f.dist.mat(u),b=d.length;for(r=0,i=0,c=0,o=0;b>r;++r)i+=d[r]*d[r],c+=l[r]*l[r],o+=d[r]*l[r];return Math.sqrt(o/Math.sqrt(i*c))},f.dist=function(e,t,n,r){var i,f,c=a.isFunction(n)||a.isString(n),o=e,s=c?e:t,u=c?r:n,d=2===u||null==u,l=e.length,b=0;for(c&&(t=a.$(t),n=a.$(n)),f=0;l>f;++f)i=c?t(o[f])-n(s[f]):o[f]-s[f],b+=d?i*i:Math.pow(Math.abs(i),u);return d?Math.sqrt(b):Math.pow(b,1/u)},f.dist.mat=function(e){var t,n,a,r=e.length,f=r*r,c=Array(f),o=i.zeros(r),s=0;for(n=0;r>n;++n)for(c[n*r+n]=0,a=n+1;r>a;++a)c[n*r+a]=t=Math.abs(e[n]-e[a]),c[a*r+n]=t,o[n]+=t,o[a]+=t;for(n=0;r>n;++n)s+=o[n],o[n]/=r;for(s/=f,n=0;r>n;++n)for(a=n;r>a;++a)c[n*r+a]+=s-o[n]-o[a],c[a*r+n]=c[n*r+a];return c},f.entropy=function(e,t){t=a.$(t);var n,r,i=0,f=0,c=e.length;for(n=0;c>n;++n)i+=t?t(e[n]):e[n];if(0===i)return 0;for(n=0;c>n;++n)r=(t?t(e[n]):e[n])/i,r&&(f+=r*Math.log(r));return-f/Math.LN2},f.mutual=function(e,t,n,r){var i,f,c,o=r?e.map(a.$(t)):e,s=r?e.map(a.$(n)):t,u=r?e.map(a.$(r)):n,d={},l={},b=u.length,h=0,g=0,p=0;for(c=0;b>c;++c)d[o[c]]=0,l[s[c]]=0;for(c=0;b>c;++c)d[o[c]]+=u[c],l[s[c]]+=u[c],h+=u[c];for(f=1/(h*Math.LN2),c=0;b>c;++c)0!==u[c]&&(i=h*u[c]/(d[o[c]]*l[s[c]]),g+=u[c]*f*Math.log(i),p+=u[c]*f*Math.log(u[c]/h));return[g,1+g/p]},f.mutual.info=function(e,t,n,a){return f.mutual(e,t,n,a)[0]},f.mutual.dist=function(e,t,n,a){return f.mutual(e,t,n,a)[1]},f.profile=function(e,t){var n,i,c,o,s,u=0,d=0,l=0,b=0,h=null,g=null,p=0,m=[],y={};for(c=0;cs)&&(h=s),(null===g||s>g)&&(g=s),n=s-u,u+=n/++d,p+=n*(s-u),m.push(s));return p/=d-1,i=Math.sqrt(p),m.sort(a.cmp),{type:r(e,t),unique:y,count:e.length,valid:d,missing:l,distinct:b,min:h,max:g,mean:u,stdev:i,median:o=f.quantile(m,.5),q1:f.quantile(m,.25),q3:f.quantile(m,.75),modeskew:0===i?0:(u-o)/i}},f.summary=function(e,t){t=t||a.keys(e[0]);var n=t.map(function(t){var n=f.profile(e,a.$(t));return n.field=t,n});return n.__summary__=!0,n},t.exports=f},{"./generate":9,"./import/type":10,"./util":13}],12:[function(e,t,n){function a(e){return s.setTime(+e),s}function r(e,t,n,a,r,i){var f={type:e,date:t,unit:n};return a?f.step=a:f.minstep=1,null!=r&&(f.min=r),null!=i&&(f.max=i),f}function i(e,t,n,a,i,f){return r(e,function(e){return t.offset(n,e)},function(e){return t.count(n,e)},a,i,f)}function f(e,t,n,a){var r,i,f,c=h[0];for(r=1,i=h.length;i>r;++r)if(c=h[r],t>c[0]){if(f=t/c[0],f>a)return e[h[r-1][1]];if(f>=n)return e[c[1]]}return e[h[i-1][1]]}function c(e){var t,n,a={};for(t=0,n=e.length;n>t;++t)a[e[t].type]=e[t];return a.find=function(t,n,a){return f(e,t,n,a)},a}var o=e("d3-time"),s=new Date,u=new Date(0,0,1).setFullYear(0),d=new Date(Date.UTC(0,0,1)).setUTCFullYear(0),l=[i("second",o.second,u),i("minute",o.minute,u),i("hour",o.hour,u),i("day",o.day,u,[1,7]),i("month",o.month,u,[1,3,6]),i("year",o.year,u),r("seconds",function(e){return new Date(1970,0,1,0,0,e)},function(e){return a(e).getSeconds()},null,0,59),r("minutes",function(e){return new Date(1970,0,1,0,e)},function(e){return a(e).getMinutes()},null,0,59),r("hours",function(e){return new Date(1970,0,1,e)},function(e){return a(e).getHours()},null,0,23),r("weekdays",function(e){return new Date(1970,0,4+e)},function(e){return a(e).getDay()},[1],0,6),r("dates",function(e){return new Date(1970,0,e)},function(e){return a(e).getDate()},[1],1,31),r("months",function(e){return new Date(1970,e%12,1)},function(e){return a(e).getMonth()},[1],0,11)],b=[i("second",o.utcSecond,d),i("minute",o.utcMinute,d),i("hour",o.utcHour,d),i("day",o.utcDay,d,[1,7]),i("month",o.utcMonth,d,[1,3,6]),i("year",o.utcYear,d),r("seconds",function(e){return new Date(Date.UTC(1970,0,1,0,0,e))},function(e){return a(e).getUTCSeconds()},null,0,59),r("minutes",function(e){return new Date(Date.UTC(1970,0,1,0,e))},function(e){return a(e).getUTCMinutes()},null,0,59),r("hours",function(e){return new Date(Date.UTC(1970,0,1,e))},function(e){return a(e).getUTCHours()},null,0,23),r("weekdays",function(e){return new Date(Date.UTC(1970,0,4+e))},function(e){return a(e).getUTCDay()},[1],0,6),r("dates",function(e){return new Date(Date.UTC(1970,0,e))},function(e){return a(e).getUTCDate()},[1],1,31),r("months",function(e){return new Date(Date.UTC(1970,e%12,1))},function(e){return a(e).getUTCMonth()},[1],0,11)],h=[[31536e6,5],[7776e6,4],[2592e6,4],[12096e5,3],[6048e5,3],[1728e5,3],[864e5,3],[432e5,2],[216e5,2],[108e5,2],[36e5,2],[18e5,1],[9e5,1],[3e5,1],[6e4,1],[3e4,0],[15e3,0],[5e3,0],[1e3,0]];t.exports=c(l),t.exports.utc=c(b)},{"d3-time":7}],13:[function(e,t,n){function a(e){return e.replace(l,"$1\\'")}function r(e,t){var n,a="";for(n=0;e>n;++n)a+=t;return a}function i(e,t,n){var a=0,r=e.split(b);return e=n?(r=r.reverse()).filter(function(e){return a+=e.length,t>=a}).reverse():r.filter(function(e){return a+=e.length,t>=a}),e.length?e.join("").trim():r[0].slice(0,t)}var f=e("buffer"),c=e("./time"),o=c.utc,s=t.exports={},u="__name__";s.namedfunc=function(e,t){return t[u]=e,t},s.name=function(e){return null==e?null:e[u]},s.identity=function(e){return e},s["true"]=s.namedfunc("true",function(){return!0}),s["false"]=s.namedfunc("false",function(){return!1}),s.duplicate=function(e){return JSON.parse(JSON.stringify(e))},s.equal=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},s.extend=function(e){for(var t,n,a=1,r=arguments.length;r>a;++a){t=arguments[a];for(n in t)e[n]=t[n]}return e},s.length=function(e){return null!=e&&null!=e.length?e.length:null},s.keys=function(e){var t,n=[];for(t in e)n.push(t);return n},s.vals=function(e){var t,n=[];for(t in e)n.push(e[t]);return n},s.toMap=function(e,t){return(t=s.$(t))?e.reduce(function(e,n){return e[t(n)]=1,e},{}):e.reduce(function(e,t){return e[t]=1,e},{})},s.keystr=function(e){var t=e.length;if(!t)return"";for(var n=String(e[0]),a=1;t>a;++a)n+="|"+String(e[a]);return n};var d=Object.prototype.toString;s.isObject=function(e){return e===Object(e)},s.isFunction=function(e){return"[object Function]"===d.call(e)},s.isString=function(e){return"string"==typeof value||"[object String]"===d.call(e)},s.isArray=Array.isArray||function(e){return"[object Array]"===d.call(e)},s.isNumber=function(e){return"number"==typeof e||"[object Number]"===d.call(e)},s.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==d.call(e)},s.isDate=function(e){return"[object Date]"===d.call(e)},s.isValid=function(e){return null!=e&&e===e},s.isBuffer=f.Buffer&&f.Buffer.isBuffer||s["false"],s.number=function(e){return null==e||""===e?null:+e},s["boolean"]=function(e){return null==e||""===e?null:"false"===e?!1:!!e},s.date=function(e){return null==e||""===e?null:Date.parse(e)},s.array=function(e){return null!=e?s.isArray(e)?e:[e]:[]},s.str=function(e){return s.isArray(e)?"["+e.map(s.str)+"]":s.isObject(e)?JSON.stringify(e):s.isString(e)?"'"+a(e)+"'":e};var l=/(^|[^\\])'/g;s.field=function(e){return String(e).split("\\.").map(function(e){return e.split(".")}).reduce(function(e,t){return e.length&&(e[e.length-1]+="."+t.shift()),e.push.apply(e,t),e},[])},s.accessor=function(e){var t;return null==e||s.isFunction(e)?e:s.namedfunc(e,(t=s.field(e)).length>1?function(e){return t.reduce(function(e,t){return e[t]},e)}:function(t){return t[e]})},s.$=s.accessor,s.mutator=function(e){var t;return s.isString(e)&&(t=s.field(e)).length>1?function(e,n){for(var a=0;ar;++r){if(f=e[r],c=f(n),o=f(a),o>c)return-1*t[r];if(c>o)return t[r]}return 0}},s.cmp=function(e,t){return t>e?-1:e>t?1:e>=t?0:null===e?-1:null===t?1:0/0},s.numcmp=function(e,t){return e-t},s.stablesort=function(e,t,n){var a=e.reduce(function(e,t,a){return e[n(t)]=a,e},{});return e.sort(function(e,r){var i=t(e),f=t(r);return f>i?-1:i>f?1:a[n(e)]-a[n(r)]}),e},s.pad=function(e,t,n,a){a=a||" ";var i=t-e.length;if(0>=i)return e;switch(n){case"left":return r(i,a)+e;case"middle":case"center":return r(Math.floor(i/2),a)+e+r(Math.ceil(i/2),a);default:return e+r(i,a)}},s.truncate=function(e,t,n,a,r){var f=e.length;if(t>=f)return e;r=void 0!==r?String(r):"…";var c=Math.max(0,t-r.length);switch(n){ -case"left":return r+(a?i(e,c,1):e.slice(f-c));case"middle":case"center":var o=Math.ceil(c/2),s=Math.floor(c/2);return(a?i(e,o):e.slice(0,o))+r+(a?i(e,s,1):e.slice(f-s));default:return(a?i(e,c):e.slice(0,c))+r}};var b=/([\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u2028\u2029\u3000\uFEFF])/},{"./time":12,buffer:1}],14:[function(e,t,n){"use strict";e("./globals");var a=e("./consts"),r=e("./util"),i=e("./field"),f=e("./enc"),c=e("./schema/schema");t.exports=function(){function e(e,t){var n=c.instantiate(),a=c.util.merge(n,t||{},e);this._data=a.data,this._marktype=a.marktype,this._enc=a.encoding,this._config=a.config,this._filter=a.filter}var t=e.prototype;return e.fromShorthand=function(t,n,r,i){var c=a.shorthand,o=t.split(c.delim),s=o.shift().split(c.assign)[1].trim(),u=f.fromShorthand(o);return new e({data:n,marktype:s,encoding:u,config:r,filter:[]},i)},e.fromSpec=function(t,n){return new e(t,n)},t.toShorthand=function(){var e=a.shorthand;return"mark"+e.assign+this._marktype+e.delim+f.shorthand(this._enc)},e.shorthand=function(e){var t=a.shorthand;return"mark"+t.assign+e.marktype+t.delim+f.shorthand(e.encoding)},e.specFromShorthand=function(t,n,a,r){return e.fromShorthand(t,n,a).toSpec(r)},t.toSpec=function(e,t){var n,a=r.duplicate(this._enc);n={marktype:this._marktype,encoding:a,filter:this._filter},e||(n.config=r.duplicate(this._config)),t||(n.data=r.duplicate(this._data));var i=c.instantiate();return c.util.subtract(n,i)},t.marktype=function(){return this._marktype},t.is=function(e){return this._marktype===e},t.has=function(e){return void 0!==this._enc[e].name},t.field=function(e){return this._enc[e]},t.filter=function(){var e=[],t=this.fields(),n=this;return r.forEach(t,function(t,a){"*"!==a&&(n.config("filterNull").Q&&t.containsType[Q]||n.config("filterNull").T&&t.containsType[T]||n.config("filterNull").O&&t.containsType[O]||n.config("filterNull").N&&t.containsType[N])&&e.push({operands:[a],operator:"notNull"})}),e.concat(this._filter)},t.fieldRef=function(e,t){return t=t||{},t.data=!this._vega2&&t.data!==!1,i.fieldRef(this._enc[e],t)},t.fieldName=function(e){return this._enc[e].name},t.fields=function(){return f.fields(this._enc)},t.fieldTitle=function(e){if(i.isCount(this._enc[e]))return i.count.displayName;var t=this._enc[e].aggregate||this._enc[e].timeUnit||this._enc[e].bin&&"bin";if(t){var n="avg"===t?"MEAN":t.toUpperCase();return n+"("+this._enc[e].name+")"}return this._enc[e].name},t.scale=function(e){return this._enc[e].scale||{}},t.axis=function(e){return this._enc[e].axis||{}},t.bandSize=function(e,t){return t=t||e===Y&&this.has(ROW)&&this.has(Y)||e===X&&this.has(COL)&&this.has(X),this.field(e).band.size||this.config(t?"smallBandSize":"largeBandSize")},t.aggregate=function(e){return this._enc[e].aggregate},t.bin=function(e){var t=this._enc[e].bin;return t==={}?!1:t===!0?{maxbins:c.MAXBINS_DEFAULT}:t},t.value=function(e){return this._enc[e].value},t.numberFormat=function(e){var t=e.max>this.config("maxSmallNumber")?"largeNumberFormat":"smallNumberFormat";return this.config(t)},t.sort=function(t,n){var a=this._enc[t].sort,r=this._enc,f=i.isTypes;if((!a||0===a.length)&&e.toggleSort.support({encoding:this._enc},n,!0)&&this.config("toggleSort")===Q){var c=f(r.x,[N,O])?r.y:r.x;f(r[t],[N,O])&&(a=[{name:c.name,aggregate:c.aggregate,type:c.type,reverse:!0}])}return a},t.map=function(e){return f.map(this._enc,e)},t.reduce=function(e,t){return f.reduce(this._enc,e,t)},t.forEach=function(e){return f.forEach(this._enc,e)},t.type=function(e){return this.has(e)?this._enc[e].type:null},t.isType=function(e,t){var n=this.field(e);return n&&i.isType(n,t)},t.isTypes=function(e,t){var n=this.field(e);return n&&i.isTypes(n,t)},e.isOrdinalScale=function(e,t){return i.isOrdinalScale(e.field(t))},e.isDimension=function(e,t){return i.isDimension(e.field(t))},e.isMeasure=function(e,t){return i.isMeasure(e.field(t))},t.isOrdinalScale=function(t){return this.has(t)&&e.isOrdinalScale(this,t)},t.isDimension=function(t){return this.has(t)&&e.isDimension(this,t)},t.isMeasure=function(t){return this.has(t)&&e.isMeasure(this,t)},t.isAggregate=function(){return f.isAggregate(this._enc)},e.isAggregate=function(e){return f.isAggregate(e.encoding)},e.alwaysNoOcclusion=function(e){return f.isAggregate(e.encoding)},e.isStack=function(e){return("bar"===e.marktype||"area"===e.marktype)&&e.encoding.color},t.isStack=function(){return(this.is("bar")||this.is("area"))&&this.has("color")},t.cardinality=function(e,t){return i.cardinality(this.field(e),t,this.config("filterNull"))},t.isRaw=function(){return!this.isAggregate()},t.data=function(e){return e?this._data[e]:this._data},t.hasValues=function(){var e=this.data("values");return e&&e.length},t.config=function(e){return this._config[e]},e.transpose=function(e){var t=e.encoding,n=r.duplicate(e.encoding);return n.x=t.y,n.y=t.x,n.row=t.col,n.col=t.row,e.encoding=n,e},e.toggleSort=function(e){return e.config=e.config||{},e.config.toggleSort=e.config.toggleSort===Q?N:Q,e},e.toggleSort.direction=function(t){if(e.toggleSort.support(t)){var n=t.encoding;return n.x.type===N?"x":"y"}},e.toggleSort.mode=function(e){return e.config.toggleSort},e.toggleSort.support=function(t,n){var a=t.encoding,r=i.isTypes;return!f.has(a,ROW)&&!f.has(a,COL)&&f.has(a,X)&&f.has(a,Y)&&e.alwaysNoOcclusion(t,n)?r(a.x,[N,O])&&i.isMeasure(a.y)?"x":r(a.y,[N,O])&&i.isMeasure(a.x)?"y":!1:!1},e.toggleFilterNullO=function(e){return e.config=e.config||{},e.config.filterNull=e.config.filterNull||{T:!0,Q:!0},e.config.filterNull.O=!e.config.filterNull.O,e},e.toggleFilterNullO.support=function(e,t){var n=f.fields(e.encoding);for(var a in n){var r=n[a];if(r.containsType.O&&a in t&&t[a].nulls>0)return!0}return!1},e}()},{"./consts":32,"./enc":34,"./field":35,"./globals":36,"./schema/schema":37,"./util":39}],15:[function(e,t,n){"use strict";function a(e,t,n){n=n||{};var a={},i={},f={},c={};return t.forEach(function(e,n){e.aggregate?"count"===e.aggregate?i.count={op:"count",field:"*"}:i[e.aggregate+"|"+e.name]={op:e.aggregate,field:t.fieldRef(n,{nofn:!0})}:(a[e.name]=t.fieldRef(n),n==ROW||n==COL?c[e.name]=a[e.name]:n!==X&&n!==Y&&(f[e.name]=a[e.name]))}),a=r.vals(a),i=r.vals(i),i.length>0&&(e.transform||(e.transform=[]),e.transform.push({type:"aggregate",groupby:a,fields:i})),{details:r.vals(f),dims:a,facets:r.vals(c),aggregated:i.length>0}}e("../globals");var r=e("../util");t.exports=a},{"../globals":36,"../util":39}],16:[function(e,t,n){"use strict";e("../globals");var a=e("../util"),r=a.setter,i=a.getter,f=e("./time"),c=t.exports={};c.def=function(e,t,n,a,r){var i=e==COL,f=e==ROW,o=i?"x":f?"y":e,s={type:o,scale:e,properties:{},layer:t.field(e).axis.layer,orient:c.orient(e,t,a)};return s=c.labels.scale(s,t,e),s=c.labels.format(s,e,t,a),e==X&&(t.isDimension(X)||t.isType(X,T)?s=c.labels.rotate(s):s.ticks=t.field(e).axis.ticks),s.titleOffset=c.titleOffset(t,n,e),f&&(s.offset=c.titleOffset(t,n,Y)+20),s=c.grid(s,e,t,n),s=c.title(s,e,t,n,r),(f||i)&&(s=c.hideTicks(s)),s},c.orient=function(e,t,n){var a=t.field(e).axis.orient;return a?a:e===COL?"top":e===X&&t.has(Y)&&t.isOrdinalScale(Y)&&t.cardinality(Y,n)>30?"top":void 0},c.grid=function(e,t,n,a){var r=a.cellPadding,i=t==COL,f=t==ROW;return n.axis(t).grid&&(e.grid=!0,e.properties.grid=i?{x:{offset:a.cellWidth*(1+r/2),scale:"col"},y:{value:-a.cellHeight*(r/2)},stroke:{value:n.config("cellGridColor")},opacity:{value:n.config("cellGridOpacity")}}:f?{y:{offset:-a.cellHeight*(r/2),scale:"row"},x:{value:e.offset},x2:{offset:e.offset+.05*a.cellWidth,group:"mark.group.width",mult:1},stroke:{value:n.config("cellGridColor")},opacity:{value:n.config("cellGridOpacity")}}:{stroke:{value:n.config("gridColor")},opacity:{value:n.config("gridOpacity")}}),e},c.hideTicks=function(e){return e.properties.ticks={opacity:{value:0}},e.properties.majorTicks={opacity:{value:0}},e.properties.axis={opacity:{value:0}},e},c.title=function(e,t,n,r){var i=n.field(t).axis;if(i.title)e.title=i.title;else{var f,c=n.fieldTitle(t);i.titleMaxLength?f=i.titleMaxLength:t===X?f=r.cellWidth/n.config("characterWidth"):t===Y&&(f=r.cellHeight/n.config("characterWidth")),e.title=f?a.truncate(c,f):c}return t===ROW&&(e.properties.title={angle:{value:0},align:{value:"right"},baseline:{value:"middle"},dy:{value:-r.height/2-20}}),e},c.labels={},c.labels.scale=function(e,t,n){var a=t.field(n).timeUnit;return t.isType(n,T)&&a&&f.hasScale(a)&&r(e,["properties","labels","text","scale"],"time-"+a),e},c.labels.format=function(e,t,n,a){var i=a[n.field(t).name];if(n.axis(t).format)e.format=n.axis(t).format;else if(n.isType(t,Q)||"number"===i.type)e.format=n.numberFormat(i);else if(n.isType(t,T)){var f=n.field(t).timeUnit;f?"year"===f&&(e.format="d"):e.format=n.config("timeFormat")}else n.isTypes(t,[N,O])&&n.axis(t).maxLabelLength&&r(e,["properties","labels","text","template"],"{{data | truncate:"+n.axis(t).maxLabelLength+"}}");return e},c.labels.rotate=function(e){var t="top"===e.orient?"left":"right";return r(e,["properties","labels","angle","value"],270),r(e,["properties","labels","align","value"],t),r(e,["properties","labels","baseline","value"],"middle"),e},c.titleOffset=function(e,t,n){var a=e.axis(n).titleOffset;if(a)return a;switch(n){case ROW:return 0;case COL:return 35}return i(t,[n,"axisTitleOffset"])}},{"../globals":36,"../util":39,"./time":31}],17:[function(e,t,n){"use strict";function a(e,t,n){return n=n||{},e.transform||(e.transform=[]),t.forEach(function(n,a){t.bin(a)&&e.transform.push({type:"bin",field:t.fieldRef(a,{nofn:!0}),output:t.fieldRef(a),maxbins:t.bin(a).maxbins})}),e}e("../globals"),t.exports=a},{"../globals":36}],18:[function(e,t,n){"use strict";var a=t.exports=e("datalib/src/stats").summary;e("../globals");var r=t.exports={},i=e("../Encoding"),f=r.axis=e("./axis"),c=r.filter=e("./filter"),o=r.legend=e("./legend"),s=r.marks=e("./marks"),u=r.scale=e("./scale");r.aggregate=e("./aggregate"),r.bin=e("./bin"),r.facet=e("./facet"),r.group=e("./group"),r.layout=e("./layout"),r.sort=e("./sort"),r.stack=e("./stack"),r.style=e("./style"),r.subfacet=e("./subfacet"),r.template=e("./template"),r.time=e("./time"),r.compile=function(e,t,n){return r.compileEncoding(i.fromSpec(e,n),t)},r.shorthand=function(e,t,n,a){return r.compileEncoding(i.fromShorthand(e,n,a),t)},r.compileEncoding=function(e,t){!t&&e.hasValues()&&(t=a(e.data("values")).reduce(function(e,t){return e[t.field]=t,e},{}));var n=r.layout(e,t),i=r.template(e,n,t),d=i.data[0],l=i.data[1];d=c.addFilters(d,e),i=r.time(i,e),l=r.bin(l,e);for(var b=r.aggregate(l,e),h=r.sort(i.data,e,t),g=r.style(e,t),p=i.marks[0],m=s.def(e,n,g,t),y=m[m.length-1],v=0;v0,T=w&&r.stack(i.data,e,y,b.facets);if(w&&(T||x)&&r.subfacet(p,y,O,T,e),x){var M=e.isMeasure(X)&&e.isDimension(Y)?Y:X;y.from||(y.from={}),y.from.transform=[{type:"sort",by:"-"+e.fieldRef(M)}]}var S=[].concat.apply([],m.map(function(e){return u.names(e.properties.update)}));return e.has(ROW)||e.has(COL)?(i=r.facet(p,e,n,g,h,i,S,T,t),i.legends=o.defs(e,g)):(p.scales=u.defs(S,e,n,t,g,h,{stack:T}),p.axes=[],e.has(X)&&p.axes.push(f.def(X,e,n,t)),e.has(Y)&&p.axes.push(f.def(Y,e,n,t)),p.legends=o.defs(e,g)),c.filterLessThanZero(l,e),i}},{"../Encoding":14,"../globals":36,"./aggregate":15,"./axis":16,"./bin":17,"./facet":19,"./filter":20,"./group":21,"./layout":22,"./legend":23,"./marks":24,"./scale":25,"./sort":26,"./stack":27,"./style":28,"./subfacet":29,"./template":30,"./time":31,"datalib/src/stats":11}],19:[function(e,t,n){"use strict";function a(e,t,n,a,o,s,u,d,l){var b,h,g=e.properties.enter,p=[],m=[],y=t.has(ROW),v=t.has(COL);g.fill={value:t.config("cellBackgroundColor")},e.from={data:e.marks[0].from.data};for(var x=0;x0&&(e.axes=m);var w=e.from.transform||(e.from.transform=[]);return w.unshift({type:"facet",keys:p}),s}e("../globals");var r=e("../util"),i=e("./axis"),f=e("./group").def,c=e("./scale");t.exports=a},{"../globals":36,"../util":39,"./axis":16,"./group":21,"./scale":25}],20:[function(e,t,n){"use strict";e("../globals");var a=t.exports={},r={">":!0,">=":!0,"=":!0,"!=":!0,"<":!0,"<=":!0};a.addFilters=function(e,t){var n=t.filter();e.transform||(e.transform=[]);for(var a=0,i=n.length;i>a;a++){var f=n[a],c="",o=f.operator,s=f.operands,u="d."+(t._vega2?"":"data.");if(r[o]){"="===o&&(o="==");var d=s[0],l=s[1];c=u+d+o+l}else if("notNull"===o)for(var b=0;b0"})})}},{"../globals":36}],21:[function(e,t,n){"use strict";function a(e,t){return t=t||{},{_name:e||void 0,type:"group",from:t.from,properties:{enter:{x:t.x||void 0,y:t.y||void 0,width:t.width||{group:"width"},height:t.height||{group:"height"}}},scales:t.scales||void 0,axes:t.axes||void 0,marks:t.marks||[]}}t.exports={def:a}},{}],22:[function(e,t,n){"use strict";function a(e,t){var n=r(e,t);return n=c(e,t,n)}function r(e,t){var n,a,r=e.has(ROW),i=e.has(COL),f=e.has(X),c=e.has(Y),o=e.marktype(),s=f&&e.isDimension(X)?e.cardinality(X,t):1,u=c&&e.isDimension(Y)?e.cardinality(Y,t):1,d=s>e.config("largeBandMaxCardinality")||u>e.config("largeBandMaxCardinality"),l=e.config("cellPadding");n=f?e.isOrdinalScale(X)?(s+e.field(X).band.padding)*e.bandSize(X,d):i||r?e.field(COL).width:e.config("singleWidth"):o===TEXT?e.config("textCellWidth"):e.bandSize(X),a=c?e.isOrdinalScale(Y)?(u+e.field(Y).band.padding)*e.bandSize(Y,d):i||r?e.field(ROW).height:e.config("singleHeight"):e.bandSize(Y);var b=n,h=a;if(i){var g=e.cardinality(COL,t);b=n*((1+l)*(g-1)+1)}if(r){var p=e.cardinality(ROW,t);h=a*((1+l)*(p-1)+1)}return{cellWidth:n,cellHeight:a,cellPadding:l,width:b,height:h,x:{useSmallBand:d},y:{useSmallBand:d}}}function i(e,t,n){var a=e.numberFormat(t,n);return d.format(a)(n.max).length}function f(e,t,n){var a=e.field(n),r=t[a.name];return a.bin?i(e,n,r):e.isType(n,Q)?i(e,n,r):e.isType(n,T)?u.maxLength(e.field(n).timeUnit,e):e.isTypes(n,[N,O])?"number"===r.type?i(e,n,r):Math.min(r.max,e.axis(n).maxLabelLength||1/0):void 0}function c(e,t,n){return[X,Y].forEach(function(a){var r,i=a===X?20:22;e.isDimension(a)||e.isType(a,T)?r=f(e,t,a):(e.isType(a,Q)||"count"===e.aggregate(a))&&a===Y&&(r=f(e,t,a)),r?s(n,[a,"axisTitleOffset"],e.config("characterWidth")*r+i):s(n,[a,"axisTitleOffset"],3*e.config("characterWidth")+i)}),n}e("../globals");var o=e("../util"),s=o.setter,u=e("./time"),d=e("d3-format");t.exports=a},{"../globals":36,"../util":39,"./time":31,"d3-format":5}],23:[function(e,t,n){"use strict";e("../globals");var a=e("./time"),r=e("../util"),i=r.setter,f=r.getter,c=t.exports={};c.defs=function(e,t){var n=[];return e.has(COLOR)&&e.field(COLOR).legend&&n.push(c.def(COLOR,e,{fill:COLOR,orient:"right"},t)),e.has(SIZE)&&e.field(SIZE).legend&&n.push(c.def(SIZE,e,{size:SIZE,orient:1===n.length?"left":"right"},t)),e.has(SHAPE)&&e.field(SHAPE).legend&&(2===n.length&&console.error("Vega-lite currently only supports two legends"),n.push(c.def(SHAPE,e,{shape:SHAPE,orient:1===n.length?"left":"right"},t))),n},c.def=function(e,t,n,r){var f=t.field(e).timeUnit;return n.title=t.fieldTitle(e),n=c.style(e,t,n,r),t.isType(e,T)&&f&&a.hasScale(f)&&i(n,["properties","labels","text","scale"],"time-"+f),n},c.style=function(e,t,n,a){var r=f(n,["properties","symbols"]),i=t.marktype();switch(i){case"bar":case"tick":case"text":r.stroke={value:"transparent"},r.shape={value:"square"};break;case"circle":case"square":r.shape={value:i};case"point":t.field(SHAPE).filled?(r.fill=t.has(COLOR)&&e===COLOR?{scale:COLOR,field:"data"}:{value:t.value(COLOR)},r.stroke={value:"transparent"}):(r.stroke=t.has(COLOR)&&e===COLOR?{scale:COLOR,field:"data"}:{value:t.value(COLOR)},r.fill={value:"transparent"},r.strokeWidth={value:t.config("strokeWidth")});break;case"line":case"area":}var c=t.field(COLOR).opacity||a.opacity;return c&&(r.opacity={value:c}),n}},{"../globals":36,"../util":39,"./time":31}],24:[function(e,t,n){"use strict";function a(e,t,n){var a={};e.isMeasure(X)?(a.x={scale:X,field:e.fieldRef(X)},(!e.has(Y)||e.isDimension(Y))&&(a.x2={value:0})):e.has(X)?a.xc={scale:X,field:e.fieldRef(X)}:a.x={value:0,offset:e.config("singleBarOffset")},a.x2||(a.width=!e.has(X)||e.isOrdinalScale(X)?e.has(SIZE)?{scale:SIZE,field:e.fieldRef(SIZE)}:{value:e.bandSize(X,t.x.useSmallBand),offset:-1}:{value:2}),e.isMeasure(Y)?(a.y={scale:Y,field:e.fieldRef(Y)},a.y2={group:"height"}):(e.has(Y)?a.yc={scale:Y,field:e.fieldRef(Y)}:a.y2={group:"height",offset:-e.config("singleBarOffset")},a.height=e.has(SIZE)?{scale:SIZE,field:e.fieldRef(SIZE)}:{value:e.bandSize(Y,t.y.useSmallBand),offset:-1}),a.fill=e.has(COLOR)?{scale:COLOR,field:e.fieldRef(COLOR)}:{value:e.value(COLOR)};var r=e.field(COLOR).opacity;return r&&(a.opacity={value:r}),a}function r(e,t,n){var a={};e.has(X)?a.x={scale:X,field:e.fieldRef(X)}:e.has(X)||(a.x={value:e.bandSize(X,t.x.useSmallBand)/2}),e.has(Y)?a.y={scale:Y,field:e.fieldRef(Y)}:e.has(Y)||(a.y={value:e.bandSize(Y,t.y.useSmallBand)/2}),e.has(SIZE)?a.size={scale:SIZE,field:e.fieldRef(SIZE)}:e.has(SIZE)||(a.size={value:e.value(SIZE)}),e.has(SHAPE)?a.shape={scale:SHAPE,field:e.fieldRef(SHAPE)}:e.has(SHAPE)||(a.shape={value:e.value(SHAPE)}),e.field(SHAPE).filled?e.has(COLOR)?a.fill={scale:COLOR,field:e.fieldRef(COLOR)}:e.has(COLOR)||(a.fill={value:e.value(COLOR)}):(e.has(COLOR)?a.stroke={scale:COLOR,field:e.fieldRef(COLOR)}:e.has(COLOR)||(a.stroke={value:e.value(COLOR)}),a.strokeWidth={value:e.config("strokeWidth")});var r=e.field(COLOR).opacity||n.opacity;return r&&(a.opacity={value:r}),a}function i(e,t,n){var a={};e.has(X)?a.x={scale:X,field:e.fieldRef(X)}:e.has(X)||(a.x={value:0}),e.has(Y)?a.y={scale:Y,field:e.fieldRef(Y)}:e.has(Y)||(a.y={group:"height"}),e.has(COLOR)?a.stroke={scale:COLOR,field:e.fieldRef(COLOR)}:e.has(COLOR)||(a.stroke={value:e.value(COLOR)});var r=e.field(COLOR).opacity;return r&&(a.opacity={value:r}),a.strokeWidth={value:e.config("strokeWidth")},a}function f(e,t,n){var a={};e.isMeasure(X)?(a.x={scale:X,field:e.fieldRef(X)},e.isDimension(Y)&&(a.x2={scale:X,value:0},a.orient={value:"horizontal"})):a.x=e.has(X)?{scale:X,field:e.fieldRef(X)}:{value:0},e.isMeasure(Y)?(a.y={scale:Y,field:e.fieldRef(Y)},a.y2={scale:Y,value:0}):a.y=e.has(Y)?{scale:Y,field:e.fieldRef(Y)}:{group:"height"},e.has(COLOR)?a.fill={scale:COLOR,field:e.fieldRef(COLOR)}:e.has(COLOR)||(a.fill={value:e.value(COLOR)});var r=e.field(COLOR).opacity;return r&&(a.opacity={value:r}),a}function c(e,t,n){var a={};e.has(X)?(a.x={scale:X,field:e.fieldRef(X)},e.isDimension(X)&&(a.x.offset=-e.bandSize(X,t.x.useSmallBand)/3)):e.has(X)||(a.x={value:0}),e.has(Y)?(a.y={scale:Y,field:e.fieldRef(Y)},e.isDimension(Y)&&(a.y.offset=-e.bandSize(Y,t.y.useSmallBand)/3)):e.has(Y)||(a.y={value:0}),a.width=!e.has(X)||e.isDimension(X)?{value:e.bandSize(X,t.y.useSmallBand)/1.5}:{value:1},a.height=!e.has(Y)||e.isDimension(Y)?{value:e.bandSize(Y,t.y.useSmallBand)/1.5}:{value:1},a.fill=e.has(COLOR)?{scale:COLOR,field:e.fieldRef(COLOR)}:{value:e.value(COLOR)};var r=e.field(COLOR).opacity||n.opacity;return r&&(a.opacity={value:r}),a}function o(e){return function(t,n,a){var r={};t.has(X)?r.x={scale:X,field:t.fieldRef(X)}:t.has(X)||(r.x={value:t.bandSize(X,n.x.useSmallBand)/2}),t.has(Y)?r.y={scale:Y,field:t.fieldRef(Y)}:t.has(Y)||(r.y={value:t.bandSize(Y,n.y.useSmallBand)/2}),t.has(SIZE)?r.size={scale:SIZE,field:t.fieldRef(SIZE)}:t.has(X)||(r.size={value:t.value(SIZE)}),r.shape={value:e},t.has(COLOR)?r.fill={scale:COLOR,field:t.fieldRef(COLOR)}:t.has(COLOR)||(r.fill={value:t.value(COLOR)});var i=t.field(COLOR).opacity||a.opacity;return i&&(r.opacity={value:i}),r}}function s(e,t,n,a){var r={},i=e.field(TEXT);e.has(X)?r.x={scale:X,field:e.fieldRef(X)}:e.has(X)||(r.x=e.has(TEXT)&&e.isType(TEXT,Q)?{value:t.cellWidth-5}:{value:e.bandSize(X,t.x.useSmallBand)/2}),e.has(Y)?r.y={scale:Y,field:e.fieldRef(Y)}:e.has(Y)||(r.y={value:e.bandSize(Y,t.y.useSmallBand)/2}),e.has(SIZE)?r.fontSize={scale:SIZE,field:e.fieldRef(SIZE)}:e.has(SIZE)||(r.fontSize={value:i.font.size}),r.fill={value:i.color};var f=e.field(COLOR).opacity||n.opacity;if(f&&(r.opacity={value:f}),e.has(TEXT))if(e.isType(TEXT,Q)){var c=a[e.fieldName(TEXT)],o=i.format||e.numberFormat(c);r.text={template:"{{"+e.fieldRef(TEXT)+" | number:'"+o+"'}}"},r.align={value:i.align}}else r.text={field:e.fieldRef(TEXT)};else r.text={value:i.placeholder};return r.font={value:i.font.family},r.fontWeight={value:i.font.weight},r.fontStyle={value:i.font.style},r.baseline={value:i.baseline},r}e("../globals");var u=t.exports={};u.def=function(e,t,n,a){var r=[],i=u[e.marktype()];if(e.marktype()===TEXT&&e.has(COLOR)){var f={x:{value:0},y:{value:0},x2:{value:t.cellWidth},y2:{value:t.cellHeight},fill:{scale:COLOR,field:e.fieldRef(COLOR)}};r.push({type:"rect",from:{data:TABLE},properties:{enter:f,update:f}})}var c=i.prop(e,t,n,a);return r.push({type:i.type,from:{data:TABLE},properties:{enter:c,update:c}}),r},u.bar={type:"rect",stack:!0,prop:a,supportedEncoding:{row:1,col:1,x:1,y:1,size:1,color:1}},u.line={type:"line",line:!0,prop:i,requiredEncoding:["x","y"],supportedEncoding:{row:1,col:1,x:1,y:1,color:1,detail:1}},u.area={type:"area",stack:!0,line:!0,requiredEncoding:["x","y"],prop:f,supportedEncoding:{row:1,col:1,x:1,y:1,color:1}},u.tick={type:"rect",prop:c,supportedEncoding:{row:1,col:1,x:1,y:1,color:1,detail:1}},u.circle={type:"symbol",prop:o("circle"),supportedEncoding:{row:1,col:1,x:1,y:1,size:1,color:1,detail:1}},u.square={type:"symbol",prop:o("square"),supportedEncoding:u.circle.supportedEncoding},u.point={type:"symbol",prop:r,supportedEncoding:{row:1,col:1,x:1,y:1,size:1,color:1,shape:1,detail:1}},u.text={type:"text",prop:s,requiredEncoding:["text"],supportedEncoding:{row:1,col:1,size:1,color:1,text:1}}},{"../globals":36}],25:[function(e,t,n){"use strict";e("../globals");var a=e("../util"),r=e("./time"),i=e("colorbrewer"),f=e("d3-color").interpolateHsl,c=e("../schema/schema"),o=t.exports={};o.names=function(e){return a.keys(a.keys(e).reduce(function(t,n){return e[n]&&e[n].scale&&(t[e[n].scale]=1),t},{}))},o.defs=function(e,t,n,a,r,i,f){return f=f||{},e.reduce(function(e,r){var c={name:r,type:o.type(r,t),domain:o.domain(r,t,a,i,f)};return c.sort=o.sort(c,t,r)||void 0,o.range(c,t,n,a,f),e.push(c),e},[])},o.sort=function(e,t,n){return"ordinal"===e.type&&(!!t.bin(n)||0===t.sort(n).length)},o.type=function(e,t){switch(t.type(e)){case N:case O:return"ordinal";case T:var n=t.field(e).timeUnit;return n?r.scale.type(n,e):"time";case Q:return t.bin(e)?e===COLOR?"linear":"ordinal":t.scale(e).type}},o.domain=function(e,t,n,i,f){var o=t.field(e);if(t.isType(e,T)){var s=r.scale.domain(o.timeUnit,e);if(s)return s}if(o.bin){var u=n[o.name],d=a.getbins(u,o.bin.maxbins||c.MAXBINS_DEFAULT),l=(d.stop-d.start)/d.step;return a.range(l).map(function(e){return d.start+d.step*e})}if(e==f.stack)return{data:STACKED,field:t.fieldRef(e,{data:!t._vega2,prefn:(f.facet?"max_":"")+"sum_"})};var b=t.aggregate(e),h=o.timeUnit,g=t.scale(e).useRawDomain,p=void 0!==g?g:t.config("useRawDomain"),m=!b||"count"!==b&&"sum"!==b;return p&&m&&(t.isType(e,Q)&&!o.bin||t.isType(e,T)&&(!h||!r.isOrdinalFn(h)))?{data:RAW,field:t.fieldRef(e,{nofn:!h})}:{data:i.getDataset(e),field:t.fieldRef(e)}},o.range=function(e,t,n,a){var r=t.scale(e.name),i=t.field(e.name),f=i.timeUnit;switch(e.name){case X:e.range=n.cellWidth?[0,n.cellWidth]:"width","ordinal"===e.type?e.bandWidth=t.bandSize(X,n.x.useSmallBand):(e.zero=t.isType(e.name,T)&&"year"===f?!1:void 0===r.zero?!0:r.zero,e.reverse=r.reverse),e.round=!0,e.nice="time"===e.type?f||t.config("timeScaleNice"):!0;break;case Y:"ordinal"===e.type?(e.range=n.cellHeight?i.bin?[n.cellHeight,0]:[0,n.cellHeight]:"height",e.bandWidth=t.bandSize(Y,n.y.useSmallBand)):(e.range=n.cellHeight?[n.cellHeight,0]:"height",e.zero=t.isType(e.name,T)&&"year"===f?!1:void 0===r.zero?!0:r.zero,e.reverse=r.reverse),e.round=!0,e.nice="time"===e.type?f||t.config("timeScaleNice"):!0;break;case ROW:e.bandWidth=n.cellHeight,e.round=!0,e.nice=!0;break;case COL:e.bandWidth=n.cellWidth,e.round=!0,e.nice=!0;break;case SIZE:if(t.is("bar"))e.range=[3,Math.max(t.bandSize(X),t.bandSize(Y))];else if(t.is(TEXT))e.range=[8,40];else{var c=Math.min(t.bandSize(X),t.bandSize(Y))-1;e.range=[10,.8*c*c]}e.round=!0,e.zero=!1;break;case SHAPE:e.range="shapes";break;case COLOR:e.range=o.color(e,t,a),"ordinal"!==e.type&&(e.zero=!1);break;default:throw new Error("Unknown encoding name: "+e.name)}switch(e.name){case ROW:case COL:e.padding=t.config("cellPadding"),e.outerPadding=0;break;case X:case Y:"ordinal"===e.type&&(e.points=!0,e.padding=t.field(e.name).band.padding)}},o.color=function(e,t,n){var a=t.scale(COLOR),r=a.range,i=t.cardinality(COLOR,n),f=t.type(COLOR);if(void 0===r){var c=a.ordinalPalette,s=a.quantitativeRange;return"ordinal"===e.type?f===N?(r=10>=i?a.c10palette:a.c20palette,o.color.palette(r,i,f)):c?o.color.palette(c,i,f):o.color.interpolate(s[0],s[1],i):[s[0],s[1]]}},o.color.palette=function(e,t,n){switch(e){case"category10k":return["#2ca02c","#e377c2","#7f7f7f","#17becf","#8c564b","#d62728","#bcbd22","#9467bd","#ff7f0e","#1f77b4"];case"category10":return["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];case"category20":return["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"];case"category20b":return["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"];case"category20c":return["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"]}if(e in i){var r=i[e];if(t in r)return r[t];if(n===N)return r[Math.max.apply(null,a.keys(r))];var f=3>t?3:Math.max.apply(null,a.keys(r)),c=0,s=f-1;return o.color.interpolate(r[f][c],r[f][s],t)}return e},o.color.interpolate=function(e,t,n){var r=f(e,t);return a.range(n).map(function(e){return r(1*e/(n-1))})}},{"../globals":36,"../schema/schema":37,"../util":39,"./time":31,colorbrewer:3,"d3-color":4}],26:[function(e,t,n){"use strict";function a(e,t,n,a){var i={},f=0;return t.forEach(function(a,c){var o=t.sort(c,n);if(o.length>0){var s=o.map(function(e){return{op:e.aggregate,field:r.fieldRef(e,{nofn:!0,data:!t._vega2})}}),u=o.map(function(e){var n=e.reverse?"-":"";return n+r.fieldRef(e,{data:!t._vega2})}),d="sorted"+f++,l=[{type:"aggregate",groupby:[t.fieldRef(c)],fields:s},{type:"sort",by:u}];e.push({name:d,source:RAW,transform:l}),i[c]=d}}),{getDataset:function(e){var t=i[e];return t?t:TABLE}}}e("../globals");var r=e("../field");t.exports=a},{"../field":35,"../globals":36}],27:[function(e,t,n){"use strict";function a(e,t,n,a){if(!r[t.marktype()].stack)return!1;if(!t.has(COLOR))return!1;var i=null,f=null,c=null,o=t.isMeasure(X),s=t.isMeasure(Y);if(o&&!s)i=Y,f=X,c=0;else{if(!s||o)return null;i=X,f=Y,c=1}var u={name:STACKED,source:TABLE,transform:[{type:"aggregate",groupby:[t.fieldRef(i)].concat(a),fields:[{op:"sum",field:t.fieldRef(f)}]}]};return a&&a.length>0&&u.transform.push({type:"aggregate",groupby:a,fields:[{op:"max",field:t.fieldName(f,{fn:"sum"})}]}),e.push(u),n.from.transform=[{type:"stack",point:t.fieldRef(i),height:t.fieldRef(f),output:{y1:f,y0:f+"2"}}],n.properties.update[f]=n.properties.enter[f]={scale:f,field:f},n.properties.update[f+"2"]=n.properties.enter[f+"2"]={scale:f,field:f+"2"},f}e("../globals");var r=e("./marks");t.exports=a},{"../globals":36,"./marks":24}],28:[function(e,t,n){"use strict";function a(e,t){if(!t)return 1;var n=0;if(e.isAggregate())n=1,e.forEach(function(a,i){i===ROW||i===COL||(i===X||i===Y)&&r.isOrdinalScale(a)||(n*=e.cardinality(i,t))});else{if(!t["*"])return 1;n=t["*"].max;var a=1;e.has(ROW)&&(a*=e.cardinality(ROW,t)),e.has(COL)&&(a*=e.cardinality(COL,t)),n/=a}var i=0;return i=25>=n?1:200>n?.8:1e3>n||e.is("tick")?.7:.3}e("../globals");var r=e("../field");t.exports=function(e,t){return{opacity:a(e,t)}}},{"../field":35,"../globals":36}],29:[function(e,t,n){"use strict";function a(e,t,n,a,i){var f=e.marks,c=r("subfacet",{marks:f});e.marks=[c],c.from=t.from,delete t.from;var o=c.from.transform||(c.from.transform=[]);o.unshift({type:"facet",keys:n}),a&&i.has(COLOR)&&o.unshift({type:"sort",by:i.fieldRef(COLOR)})}e("../globals");var r=e("./group").def;t.exports=a},{"../globals":36,"./group":21}],30:[function(e,t,n){"use strict";function a(e,t,n){var a={name:RAW,format:{}},f={name:TABLE,source:RAW},c=e.data("url"),o=e.data("formatType"),s=e.data("values");return e.hasValues()?a.values=s:(a.url=c,a.format.type=o),e.forEach(function(e,t){var n;e.type==T?(a.format.parse=a.format.parse||{},a.format.parse[e.name]="date"):e.type==Q&&(a.format.parse=a.format.parse||{},n=i.isCount(e)?"count":e.name,a.format.parse[n]="number")}),{width:t.width,height:t.height,padding:"auto",data:[a,f],marks:[r("cell",{width:t.cellWidth?{value:t.cellWidth}:void 0,height:t.cellHeight?{value:t.cellHeight}:void 0})]}}e("../globals");var r=e("./group").def,i=e("../field");t.exports=a},{"../field":35,"../globals":36,"./group":21}],31:[function(e,t,n){"use strict";function a(e,t){var n={},r={};t.forEach(function(e,a){e.type===T&&e.timeUnit&&(n[t.fieldRef(a)]={field:e,encType:a},r[e.timeUnit]=!0)});var i=e.data[0],f=i.transform=i.transform||[];for(var c in n){var o=n[c];a.transform(f,t,o.encType,o.field)}var s=e.scales=e.scales||[];for(var u in r){var d=a.scale.def(u,t);d&&s.push(d)}return e}function r(e,t){return"utc"+e+"(d.data."+t.name+")"}var i=e("../util"),f=e("d3-time-format");t.exports=a;var c=new Date(2014,8,17);a.cardinality=function(e,t,n,a){var r=e.timeUnit;switch(r){case"seconds":return 60;case"minutes":return 60;case"hours":return 24;case"day":return 7;case"date":return 31;case"month":return 12;case"year":var i=t[e.name],f=t["year_"+e.name];return f?f.distinct-(i.nulls>0&&n[a]?1:0):null}return null},a.maxLength=function(e,t){switch(e){case"seconds":case"minutes":case"hours":case"date":return 2;case"month":case"day":var n=a.range(e,t);return n?Math.max.apply(null,n.map(function(e){return e.length})):2;case"year":return 4}var r=t.config("timeFormat");return f.utcFormat(r)(c).length},a.formula=function(e){return r(e.timeUnit,e)},a.transform=function(e,t,n,r){e.push({type:"formula",field:t.fieldRef(n),expr:a.formula(r)})},a.range=function(e,t){var n,a=t.config("timeScaleLabelLength");switch(e){case"day":n=t.config("dayScaleLabel");break; +return l=null==l?b?6:12:/[gprs]/.test(b)?Math.max(1,Math.min(21,l)):Math.max(0,Math.min(20,l)),function(e){var i=m,c=y;if("c"===b)c=v(e)+c,e="";else{e=+e;var o=(0>e||0>1/e)&&(e*=-1,!0);if(e=v(e,l),i=(o?"("===a?a:"-":"-"===a||"("===a?"":a)+i,c=c+("s"===b?g[8+h/3]:"")+(o&&"("===a?")":""),x)for(var p,O=-1,w=e.length;++Op||p>57){c=(46===p?f+e.slice(O+1):e.slice(O))+c,e=e.slice(0,O);break}}d&&!u&&(e=r(e,1/0));var T=i.length+e.length+c.length,M=s>T?new Array(s-T+1).join(t):"";switch(d&&u&&(e=r(M+e,M.length?s-c.length:1/0),M=""),n){case"<":return i+e+c+M;case"=":return i+M+e+c;case"^":return M.slice(0,T=M.length>>1)+i+e+c+M.slice(T)}return M+i+e+c}}function a(e,a){var r=t((e=c(e),e.type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(n(a)/3))),f=Math.pow(10,-i),o=g[8+i/3];return function(e){return r(f*e)+o}}var r=e.grouping&&e.thousands?u(e.grouping,e.thousands):o,i=e.currency,f=e.decimal;return{format:t,formatPrefix:a}}function d(e,t){return Math.max(0,n(Math.abs(t))-n(Math.abs(e)))+1}function l(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(n(t)/3)))-n(Math.abs(e)))}function b(e){return Math.max(0,-n(Math.abs(e)))}var h,g=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],p={"":i,"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return r(100*e,t)},r:r,s:a,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},m=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;f.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 y=s({decimal:".",thousands:",",grouping:[3],currency:["$",""]});e.format=y.format,e.formatPrefix=y.formatPrefix,e.formatSpecifier=c,e.localeFormat=s,e.precisionFixed=b,e.precisionPrefix=l,e.precisionRound=d})},{}],6:[function(t,n,a){"undefined"==typeof Map?(Map=function(){this.clear()},Map.prototype={set:function(e,t){return this._[e]=t,this},get:function(e){return this._[e]},has:function(e){return e in this._},"delete":function(e){return e in this._&&delete this._[e]},clear:function(){this._=Object.create(null)},get size(){var e=0;for(var t in this._)++e;return e},forEach:function(e){for(var t in this._)e(this._[t],t,this)}}):function(){var e=new Map;e.set(0,0)!==e&&(e=e.set,Map.prototype.set=function(){return e.apply(this,arguments),this})}(),function(t,r){"object"==typeof a&&"undefined"!=typeof n?r(a):"function"==typeof e&&e.amd?e(["exports"],r):r(t.timeFormat={})}(this,function(e){"use strict";function t(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function n(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function a(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}function r(e,t,n){var a=ae.exec(t.slice(n,n+1));return a?n+a[0].length:-1}function i(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function f(e,t,n){var a=re.exec(t.slice(n,n+1));return a?(e.w=+a[0],n+a[0].length):-1}function c(e,t,n){var a=re.exec(t.slice(n));return a?(e.U=+a[0],n+a[0].length):-1}function o(e,t,n){var a=re.exec(t.slice(n));return a?(e.W=+a[0],n+a[0].length):-1}function u(e,t,n){var a=re.exec(t.slice(n,n+2));return a?(e.y=+a[0]+(+a[0]>68?1900:2e3),n+a[0].length):-1}function s(e,t,n){var a=re.exec(t.slice(n,n+2));return a?(e.m=a[0]-1,n+a[0].length):-1}function d(e,t,n){var a=re.exec(t.slice(n,n+2));return a?(e.d=+a[0],n+a[0].length):-1}function l(e,t,n){var a=re.exec(t.slice(n,n+3));return a?(e.m=0,e.d=+a[0],n+a[0].length):-1}function b(e,t,n){var a=re.exec(t.slice(n,n+2));return a?(e.H=+a[0],n+a[0].length):-1}function h(e,t,n){var a=re.exec(t.slice(n,n+2));return a?(e.M=+a[0],n+a[0].length):-1}function g(e,t,n){var a=re.exec(t.slice(n,n+2));return a?(e.S=+a[0],n+a[0].length):-1}function p(e,t,n){var a=re.exec(t.slice(n,n+3));return a?(e.L=+a[0],n+a[0].length):-1}function m(e,t,n){var a=re.exec(t.slice(n,n+4));return a?(e.y=+a[0],n+a[0].length):-1}function y(){return"%"}function v(){return"+0000"}function x(e,t,n){var a=0>e?"-":"",r=(a?-e:e)+"",i=r.length;return a+(n>i?new Array(n-i+1).join(t)+r:r)}function O(e,t){return x(e.getUTCFullYear()%1e4,t,4)}function w(e,t){return x(e.getUTCFullYear()%100,t,2)}function T(e,t,n){function a(t){return e(t=new Date(+t)),t}return a.floor=a,a.round=function(n){var a=new Date(+n),r=new Date(n-1);return e(a),e(r),t(r,1),r-n>n-a?a:r},a.ceil=function(n){return e(n=new Date(n-1)),t(n,1),n},a.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},a.range=function(n,a,r){var i=[];if(n=new Date(n-1),a=new Date(+a),r=null==r?1:Math.floor(r),!(a>n&&r>0))return i;for(t(n,1),e(n),a>n&&i.push(new Date(+n));t(n,r),e(n),a>n;)i.push(new Date(+n));return i},a.filter=function(n){return T(function(t){for(;e(t),!n(t);)t.setTime(t-1)},function(e,a){for(;--a>=0;)for(;t(e,1),!n(e););})},n&&(a.count=function(t,a){return fe.setTime(+t),ie.setTime(+a),e(fe),e(ie),Math.floor(n(fe,ie))}),a}function M(e){return T(function(t){t.setUTCHours(0,0,0,0),t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/6048e5})}function S(e,t){return x(oe.count(ce(e),e),t,2)}function k(e){return e.getUTCDay()}function C(e,t){return x(ue.count(ce(e),e),t,2)}function R(e,t){return x(e.getUTCSeconds(),t,2)}function N(e,t){return x(e.getUTCMinutes(),t,2)}function D(e,t){return x(e.getUTCMonth()+1,t,2)}function L(e,t){return x(e.getUTCMilliseconds(),t,3)}function Y(e,t){return x(1+se.count(ce(e),e),t,3)}function U(e,t){return x(e.getUTCHours()%12||12,t,2)}function E(e,t){return x(e.getUTCHours(),t,2)}function A(e,t){return x(e.getUTCDate(),t,2)}function X(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+x(t/60|0,"0",2)+x(t%60,"0",2)}function _(e,t){return x(e.getFullYear()%1e4,t,4)}function F(e,t){return x(e.getFullYear()%100,t,2)}function $(e){return T(function(t){t.setHours(0,0,0,0),t.setDate(t.getDate()-(t.getDay()+7-e)%7)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5})}function W(e,t){return x(le.count(de(e),e),t,2)}function z(e){return e.getDay()}function j(e,t){return x(be.count(de(e),e),t,2)}function H(e,t){return x(e.getSeconds(),t,2)}function B(e,t){return x(e.getMinutes(),t,2)}function q(e,t){return x(e.getMonth()+1,t,2)}function P(e,t){return x(e.getMilliseconds(),t,3)}function I(e,t){return x(1+he.count(de(e),e),t,3)}function Z(e,t){return x(e.getHours()%12||12,t,2)}function G(e,t){return x(e.getHours(),t,2)}function Q(e,t){return x(e.getDate(),t,2)}function V(e){for(var t=new Map,n=-1,a=e.length;++nf;){if(a>=o)return-1;if(r=t.charCodeAt(f++),37===r){if(r=t.charAt(f++),i=Xe[r in ne?t.charAt(f++):r],!i||(a=i(e,n,a))<0)return-1}else if(r!=n.charCodeAt(a++))return-1}return a}function $(e,t,n){var a=Re.exec(t.slice(n));return a?(e.w=Ne.get(a[0].toLowerCase()),n+a[0].length):-1}function J(e,t,n){var a=ke.exec(t.slice(n));return a?(e.w=Ce.get(a[0].toLowerCase()),n+a[0].length):-1}function ee(e,t,n){var a=Ye.exec(t.slice(n));return a?(e.m=Ue.get(a[0].toLowerCase()),n+a[0].length):-1}function te(e,t,n){var a=De.exec(t.slice(n));return a?(e.m=Le.get(a[0].toLowerCase()),n+a[0].length):-1}function ae(e,t,n){return M(e,me,t,n)}function re(e,t,n){return M(e,ye,t,n)}function ie(e,t,n){return M(e,ve,t,n)}function fe(e,t,n){var a=Se.get(t.slice(n,n+=2).toLowerCase());return null==a?-1:(e.p=a,n)}function ce(e){return we[e.getDay()]}function oe(e){return Oe[e.getDay()]}function ue(e){return Me[e.getMonth()]}function se(e){return Te[e.getMonth()]}function de(e){return xe[+(e.getHours()>=12)]}function le(e){return we[e.getUTCDay()]}function be(e){return Oe[e.getUTCDay()]}function he(e){return Me[e.getUTCMonth()]}function ge(e){return Te[e.getUTCMonth()]}function pe(e){return xe[+(e.getUTCHours()>=12)]}var me=e.dateTime,ye=e.date,ve=e.time,xe=e.periods,Oe=e.days,we=e.shortDays,Te=e.months,Me=e.shortMonths,Se=V(xe),ke=K(Oe),Ce=V(Oe),Re=K(we),Ne=V(we),De=K(Te),Le=V(Te),Ye=K(Me),Ue=V(Me),Ee={a:ce,A:oe,b:ue,B:se,c:null,d:Q,e:Q,H:G,I:Z,j:I,L:P,m:q,M:B,p:de,S:H,U:j,w:z,W:W,x:null,X:null,y:F,Y:_,Z:X,"%":y},Ae={a:le,A:be,b:he,B:ge,c:null,d:A,e:A,H:E,I:U,j:Y,L:L,m:D,M:N,p:pe,S:R,U:C,w:k,W:S,x:null,X:null,y:w,Y:O,Z:v,"%":y},Xe={a:$,A:J,b:ee,B:te,c:ae,d:d,e:d,H:b,I:b,j:l,L:p,m:s,M:h,p:fe,S:g,U:c,w:f,W:o,x:re,X:ie,y:u,Y:m,Z:i,"%":r};return Ee.x=x(ye,Ee),Ee.X=x(ve,Ee),Ee.c=x(me,Ee),Ae.x=x(ye,Ae),Ae.X=x(ve,Ae),Ae.c=x(me,Ae),{format:function(e){var t=x(e+="",Ee);return t.parse=T(e,n),t.toString=function(){return e},t},utcFormat:function(e){var n=x(e+="",Ae);return n.parse=T(e,t),n.toString=function(){return e},n}}}function te(e){return e.toISOString()}var ne={"-":"",_:" ",0:"0"},ae=/^%/,re=/^\s*\d+/,ie=new Date,fe=new Date,ce=T(function(e){e.setUTCHours(0,0,0,0),e.setUTCMonth(0,1)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),oe=M(1),ue=M(0),se=T(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5}),de=T(function(e){e.setHours(0,0,0,0),e.setMonth(0,1)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()}),le=$(1),be=$(0),he=T(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),ge=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,pe=ee({dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",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"]});e.format=pe.format,e.utcFormat=pe.utcFormat;var me="%Y-%m-%dT%H:%M:%S.%LZ";te.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},te.toString=function(){return me};var ye=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?te:pe.utcFormat(me),ve=ye;e.isoFormat=ve,e.localeFormat=ee})},{}],7:[function(t,n,a){!function(t,r){"object"==typeof a&&"undefined"!=typeof n?r(a):"function"==typeof e&&e.amd?e(["exports"],r):r(t.time={})}(this,function(e){"use strict";function t(e,n,a){function f(t){return e(t=new Date(+t)),t}return f.floor=f,f.round=function(t){var a=new Date(+t),r=new Date(t-1);return e(a),e(r),n(r,1),r-t>t-a?a:r},f.ceil=function(t){return e(t=new Date(t-1)),n(t,1),t},f.offset=function(e,t){return n(e=new Date(+e),null==t?1:Math.floor(t)),e},f.range=function(t,a,r){var i=[];if(t=new Date(t-1),a=new Date(+a),r=null==r?1:Math.floor(r),!(a>t&&r>0))return i;for(n(t,1),e(t),a>t&&i.push(new Date(+t));n(t,r),e(t),a>t;)i.push(new Date(+t));return i},f.filter=function(a){return t(function(t){for(;e(t),!a(t);)t.setTime(t-1)},function(e,t){for(;--t>=0;)for(;n(e,1),!a(e););})},a&&(f.count=function(t,n){return i.setTime(+t),r.setTime(+n),e(i),e(r),Math.floor(a(i,r))}),f}function n(e){return t(function(t){t.setHours(0,0,0,0),t.setDate(t.getDate()-(t.getDay()+7-e)%7)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5})}function a(e){return t(function(t){t.setUTCHours(0,0,0,0),t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/6048e5})}var r=new Date,i=new Date,f=t(function(e){e.setMilliseconds(0)},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3});e.seconds=f.range;var c=t(function(e){e.setSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4});e.minutes=c.range;var o=t(function(e){e.setMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5});e.hours=o.range;var u=t(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5});e.days=u.range,e.sunday=n(0),e.sundays=e.sunday.range,e.monday=n(1),e.mondays=e.monday.range,e.tuesday=n(2),e.tuesdays=e.tuesday.range,e.wednesday=n(3),e.wednesdays=e.wednesday.range,e.thursday=n(4),e.thursdays=e.thursday.range,e.friday=n(5),e.fridays=e.friday.range,e.saturday=n(6),e.saturdays=e.saturday.range;var s=e.sunday;e.weeks=s.range;var d=t(function(e){e.setHours(0,0,0,0),e.setDate(1)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())});e.months=d.range;var l=t(function(e){e.setHours(0,0,0,0),e.setMonth(0,1)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()});e.years=l.range;var b=t(function(e){e.setUTCMilliseconds(0)},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3});e.utcSeconds=b.range;var h=t(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4});e.utcMinutes=h.range;var g=t(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5});e.utcHours=g.range;var p=t(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5});e.utcDays=p.range,e.utcSunday=a(0),e.utcSundays=e.utcSunday.range,e.utcMonday=a(1),e.utcMondays=e.utcMonday.range,e.utcTuesday=a(2),e.utcTuesdays=e.utcTuesday.range,e.utcWednesday=a(3),e.utcWednesdays=e.utcWednesday.range,e.utcThursday=a(4),e.utcThursdays=e.utcThursday.range,e.utcFriday=a(5),e.utcFridays=e.utcFriday.range,e.utcSaturday=a(6),e.utcSaturdays=e.utcSaturday.range;var m=e.utcSunday;e.utcWeeks=m.range;var y=t(function(e){e.setUTCHours(0,0,0,0),e.setUTCDate(1)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())});e.utcMonths=y.range;var v=t(function(e){e.setUTCHours(0,0,0,0),e.setUTCMonth(0,1)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()});e.utcYears=v.range,e.interval=t,e.second=f,e.minute=c,e.hour=o,e.day=u,e.week=s,e.month=d,e.year=l,e.utcSecond=b,e.utcMinute=h,e.utcHour=g,e.utcDay=p,e.utcWeek=m,e.utcMonth=y,e.utcYear=v})},{}],8:[function(e,t,n){function a(e){if(!e)throw Error("Missing binning options.");var t,n,a,c,o,u,s,d=e.maxbins||15,l=e.base||10,b=Math.log(l),h=e.div||[5,2],g=e.min,p=e.max,m=p-g;if(e.step)t=e.step;else if(e.steps)t=e.steps[Math.min(e.steps.length-1,r(e.steps,m/d,0,e.steps.length))];else{n=Math.ceil(Math.log(d)/b),a=e.minstep||0,t=Math.max(a,Math.pow(l,Math.round(Math.log(m)/b)-n));do t*=l;while(Math.ceil(m/t)>d);for(u=0;u=a&&d>=m/o&&(t=o)}return o=Math.log(t),c=o>=0?0:~~(-o/b)+1,s=Math.pow(l,-c-1),g=Math.min(g,Math.floor(g/t+s)*t),p=Math.ceil(p/t)*t,{start:g,stop:p,step:t,unit:{precision:c},value:i,index:f}}function r(e,t,n,a){for(;a>n;){var r=n+a>>>1;u.cmp(e[r],t)<0?n=r+1:a=r}return n}function i(e){return this.step*Math.floor(e/this.step+d)}function f(e){return Math.floor((e-this.start)/this.step+d)}function c(e){return this.unit.date(i.call(this,e))}function o(e){return f.call(this,this.unit.unit(e))}var u=e("../util"),s=e("../time"),d=1e-15;a.date=function(e){if(!e)throw Error("Missing date binning options.");var t=e.utc?s.utc:s,n=e.min,r=e.max,i=e.maxbins||20,f=e.minbins||4,u=+r-+n,d=e.unit?t[e.unit]:t.find(u,f,i),l=a({min:null!=d.min?d.min:d.unit(n),max:null!=d.max?d.max:d.unit(r),maxbins:i,minstep:d.minstep,steps:d.step});return l.unit=d,l.index=o,e.raw||(l.value=c),l},t.exports=a},{"../time":12,"../util":13}],9:[function(e,t,n){var a=t.exports={};a.repeat=function(e,t){var n,a=Array(t);for(n=0;t>n;++n)a[n]=e;return a},a.zeros=function(e){return a.repeat(0,e)},a.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("Infinite range");var a,r=[],i=-1;if(0>n)for(;(a=e+n*++i)>t;)r.push(a);else for(;(a=e+n*++i)1);return r=Math.sqrt(-2*Math.log(a)/a),n=e+f*r*t,e+i*r*t};return r.samples=function(e){return a.zeros(e).map(r)},r}},{}],10:[function(e,t,n){function a(e,t){return t?void(e[u]=t):e&&e[u]||null}function r(e,t){t=o.$(t);var n,a,r;if(e[u]&&(n=t(e[u]),o.isString(n)))return n;for(a=0,r=e.length;!o.isValid(n)&&r>a;++a)n=t?t(e[a]):e[a];return o.isDate(n)?"date":o.isNumber(n)?"number":o.isBoolean(n)?"boolean":o.isString(n)?"string":null}function i(e,t){return e.length?(t=t||o.keys(e[0]),t.reduce(function(t,n){return t[n]=r(e,n),t},{})):void 0}function f(e,t){t=o.$(t);var n,a,r,i=["boolean","integer","number","date"];for(n=0;ni;++i)r=t?t(e[i]):e[i],r in c||(c[r]=1,n.push(r));return n},f.count=function(e){return e&&e.length||0},f.count.valid=function(e,t){t=a.$(t);var n,r,i,f=0;for(r=0,i=e.length;i>r;++r)n=t?t(e[r]):e[r],a.isValid(n)&&(f+=1);return f},f.count.missing=function(e,t){t=a.$(t);var n,r,i,f=0;for(r=0,i=e.length;i>r;++r)n=t?t(e[r]):e[r],null==n&&(f+=1);return f},f.count.distinct=function(e,t){t=a.$(t);var n,r,i,f={},c=0;for(r=0,i=e.length;i>r;++r)n=t?t(e[r]):e[r],n in f||(f[n]=1,c+=1);return c},f.count.map=function(e,t){t=a.$(t);var n,r,i,f={};for(r=0,i=e.length;i>r;++r)n=t?t(e[r]):e[r],f[n]=n in f?f[n]+1:1;return f},f.median=function(e,t){return t&&(e=e.map(a.$(t))),e=e.filter(a.isValid).sort(a.cmp),f.quantile(e,.5)},f.quartile=function(e,t){t&&(e=e.map(a.$(t))),e=e.filter(a.isValid).sort(a.cmp);var n=f.quantile;return[n(e,.25),n(e,.5),n(e,.75)]},f.quantile=function(e,t,n){void 0===n&&(n=t,t=a.identity),t=a.$(t);var r=(e.length-1)*n+1,i=Math.floor(r),f=+t(e[i-1]),c=r-i;return c?f+c*(t(e[i])-f):f},f.sum=function(e,t){t=a.$(t);for(var n,r=0,i=0,f=e.length;f>i;++i)n=t?t(e[i]):e[i],a.isValid(n)&&(r+=n);return r},f.mean=function(e,t){t=a.$(t);var n,r,i,f,c,o=0;for(r=0,f=0,i=e.length;i>r;++r)c=t?t(e[r]):e[r],a.isValid(c)&&(n=c-o,o+=n/++f);return o},f.variance=function(e,t){if(t=a.$(t),!a.isArray(e)||e.length<2)return 0;var n,r,i,f,c=0,o=0;for(r=0,i=0;rf;++f)if(i=t?t(e[f]):e[f],a.isValid(i)){n=r=i;break}for(;c>f;++f)i=t?t(e[f]):e[f],a.isValid(i)&&(n>i&&(n=i),i>r&&(r=i));return[n,r]},f.extent.index=function(e,t){t=a.$(t);var n,r,i,f,c=-1,o=-1,u=e.length;for(f=0;u>f;++f)if(i=t?t(e[f]):e[f],a.isValid(i)){n=r=i,c=o=f;break}for(;u>f;++f)i=t?t(e[f]):e[f],a.isValid(i)&&(n>i&&(n=i,c=f),i>r&&(r=i,o=f));return[c,o]},f.dot=function(e,t,n){var r,i,f=0;if(n)for(t=a.$(t),n=a.$(n),r=0;rn;++n){if(r=f[n].val,0>u&&s===r)u=n-1;else if(u>-1&&s!==r){for(i=1+(n-1+u)/2;n>u;++u)o[f[u].idx]=i;u=-1}o[f[n].idx]=n+1,s=r}if(u>-1)for(i=1+(c-1+u)/2;c>u;++u)o[f[u].idx]=i;return o},f.cor=function(e,t,n){var r=n;n=r?e.map(a.$(n)):t,t=r?e.map(a.$(t)):e;var i=f.dot(t,n),c=f.mean(t),o=f.mean(n),u=f.stdev(t),s=f.stdev(n),d=e.length;return(i-d*c*o)/((d-1)*u*s)},f.cor.rank=function(e,t,n){var r,i,c,o=n?f.rank(e,a.$(t)):f.rank(e),u=n?f.rank(e,a.$(n)):f.rank(t),s=e.length;for(r=0,i=0;s>r;++r)c=o[r]-u[r],i+=c*c;return 1-6*i/(s*(s*s-1))},f.cor.dist=function(e,t,n){var r,i,c,o,u=n?e.map(a.$(t)):e,s=n?e.map(a.$(n)):t,d=f.dist.mat(u),l=f.dist.mat(s),b=d.length;for(r=0,i=0,c=0,o=0;b>r;++r)i+=d[r]*d[r],c+=l[r]*l[r],o+=d[r]*l[r];return Math.sqrt(o/Math.sqrt(i*c))},f.dist=function(e,t,n,r){var i,f,c=a.isFunction(n)||a.isString(n),o=e,u=c?e:t,s=c?r:n,d=2===s||null==s,l=e.length,b=0;for(c&&(t=a.$(t),n=a.$(n)),f=0;l>f;++f)i=c?t(o[f])-n(u[f]):o[f]-u[f],b+=d?i*i:Math.pow(Math.abs(i),s);return d?Math.sqrt(b):Math.pow(b,1/s)},f.dist.mat=function(e){var t,n,a,r=e.length,f=r*r,c=Array(f),o=i.zeros(r),u=0;for(n=0;r>n;++n)for(c[n*r+n]=0,a=n+1;r>a;++a)c[n*r+a]=t=Math.abs(e[n]-e[a]),c[a*r+n]=t,o[n]+=t,o[a]+=t;for(n=0;r>n;++n)u+=o[n],o[n]/=r;for(u/=f,n=0;r>n;++n)for(a=n;r>a;++a)c[n*r+a]+=u-o[n]-o[a],c[a*r+n]=c[n*r+a];return c},f.entropy=function(e,t){t=a.$(t);var n,r,i=0,f=0,c=e.length;for(n=0;c>n;++n)i+=t?t(e[n]):e[n];if(0===i)return 0;for(n=0;c>n;++n)r=(t?t(e[n]):e[n])/i,r&&(f+=r*Math.log(r));return-f/Math.LN2},f.mutual=function(e,t,n,r){var i,f,c,o=r?e.map(a.$(t)):e,u=r?e.map(a.$(n)):t,s=r?e.map(a.$(r)):n,d={},l={},b=s.length,h=0,g=0,p=0;for(c=0;b>c;++c)d[o[c]]=0,l[u[c]]=0;for(c=0;b>c;++c)d[o[c]]+=s[c],l[u[c]]+=s[c],h+=s[c];for(f=1/(h*Math.LN2),c=0;b>c;++c)0!==s[c]&&(i=h*s[c]/(d[o[c]]*l[u[c]]),g+=s[c]*f*Math.log(i),p+=s[c]*f*Math.log(s[c]/h));return[g,1+g/p]},f.mutual.info=function(e,t,n,a){return f.mutual(e,t,n,a)[0]},f.mutual.dist=function(e,t,n,a){return f.mutual(e,t,n,a)[1]},f.profile=function(e,t){var n,i,c,o,u,s=0,d=0,l=0,b=0,h=null,g=null,p=0,m=[],y={};for(c=0;cu)&&(h=u),(null===g||u>g)&&(g=u),n=u-s,s+=n/++d,p+=n*(u-s),m.push(u));return p/=d-1,i=Math.sqrt(p),m.sort(a.cmp),{type:r(e,t),unique:y,count:e.length,valid:d,missing:l,distinct:b,min:h,max:g,mean:s,stdev:i,median:o=f.quantile(m,.5),q1:f.quantile(m,.25),q3:f.quantile(m,.75),modeskew:0===i?0:(s-o)/i}},f.summary=function(e,t){t=t||a.keys(e[0]);var n=t.map(function(t){var n=f.profile(e,a.$(t));return n.field=t,n});return n.__summary__=!0,n},t.exports=f},{"./generate":9,"./import/type":10,"./util":13}],12:[function(e,t,n){function a(e){return u.setTime(+e),u}function r(e,t,n,a,r,i){var f={type:e,date:t,unit:n};return a?f.step=a:f.minstep=1,null!=r&&(f.min=r),null!=i&&(f.max=i),f}function i(e,t,n,a,i,f){return r(e,function(e){return t.offset(n,e)},function(e){return t.count(n,e)},a,i,f)}function f(e,t,n,a){var r,i,f,c=h[0];for(r=1,i=h.length;i>r;++r)if(c=h[r],t>c[0]){if(f=t/c[0],f>a)return e[h[r-1][1]];if(f>=n)return e[c[1]]}return e[h[i-1][1]]}function c(e){var t,n,a={};for(t=0,n=e.length;n>t;++t)a[e[t].type]=e[t];return a.find=function(t,n,a){return f(e,t,n,a)},a}var o=e("d3-time"),u=new Date,s=new Date(0,0,1).setFullYear(0),d=new Date(Date.UTC(0,0,1)).setUTCFullYear(0),l=[i("second",o.second,s),i("minute",o.minute,s),i("hour",o.hour,s),i("day",o.day,s,[1,7]),i("month",o.month,s,[1,3,6]),i("year",o.year,s),r("seconds",function(e){return new Date(1970,0,1,0,0,e)},function(e){return a(e).getSeconds()},null,0,59),r("minutes",function(e){return new Date(1970,0,1,0,e)},function(e){return a(e).getMinutes()},null,0,59),r("hours",function(e){return new Date(1970,0,1,e)},function(e){return a(e).getHours()},null,0,23),r("weekdays",function(e){return new Date(1970,0,4+e)},function(e){return a(e).getDay()},[1],0,6),r("dates",function(e){return new Date(1970,0,e)},function(e){return a(e).getDate()},[1],1,31),r("months",function(e){return new Date(1970,e%12,1)},function(e){return a(e).getMonth()},[1],0,11)],b=[i("second",o.utcSecond,d),i("minute",o.utcMinute,d),i("hour",o.utcHour,d),i("day",o.utcDay,d,[1,7]),i("month",o.utcMonth,d,[1,3,6]),i("year",o.utcYear,d),r("seconds",function(e){return new Date(Date.UTC(1970,0,1,0,0,e))},function(e){return a(e).getUTCSeconds()},null,0,59),r("minutes",function(e){return new Date(Date.UTC(1970,0,1,0,e))},function(e){return a(e).getUTCMinutes()},null,0,59),r("hours",function(e){return new Date(Date.UTC(1970,0,1,e))},function(e){return a(e).getUTCHours()},null,0,23),r("weekdays",function(e){return new Date(Date.UTC(1970,0,4+e))},function(e){return a(e).getUTCDay()},[1],0,6),r("dates",function(e){return new Date(Date.UTC(1970,0,e))},function(e){return a(e).getUTCDate()},[1],1,31),r("months",function(e){return new Date(Date.UTC(1970,e%12,1))},function(e){return a(e).getUTCMonth()},[1],0,11)],h=[[31536e6,5],[7776e6,4],[2592e6,4],[12096e5,3],[6048e5,3],[1728e5,3],[864e5,3],[432e5,2],[216e5,2],[108e5,2],[36e5,2],[18e5,1],[9e5,1],[3e5,1],[6e4,1],[3e4,0],[15e3,0],[5e3,0],[1e3,0]];t.exports=c(l),t.exports.utc=c(b)},{"d3-time":7}],13:[function(e,t,n){function a(e){return e.replace(l,"$1\\'")}function r(e,t){var n,a="";for(n=0;e>n;++n)a+=t;return a}function i(e,t,n){var a=0,r=e.split(b);return e=n?(r=r.reverse()).filter(function(e){return a+=e.length,t>=a}).reverse():r.filter(function(e){return a+=e.length,t>=a}),e.length?e.join("").trim():r[0].slice(0,t)}var f=e("buffer"),c=e("./time"),o=c.utc,u=t.exports={},s="__name__";u.namedfunc=function(e,t){return t[s]=e,t},u.name=function(e){return null==e?null:e[s]},u.identity=function(e){return e},u["true"]=u.namedfunc("true",function(){return!0}),u["false"]=u.namedfunc("false",function(){return!1}),u.duplicate=function(e){return JSON.parse(JSON.stringify(e))},u.equal=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},u.extend=function(e){for(var t,n,a=1,r=arguments.length;r>a;++a){t=arguments[a];for(n in t)e[n]=t[n]}return e},u.length=function(e){return null!=e&&null!=e.length?e.length:null},u.keys=function(e){var t,n=[];for(t in e)n.push(t);return n},u.vals=function(e){var t,n=[];for(t in e)n.push(e[t]);return n},u.toMap=function(e,t){return(t=u.$(t))?e.reduce(function(e,n){return e[t(n)]=1,e},{}):e.reduce(function(e,t){return e[t]=1,e},{})},u.keystr=function(e){var t=e.length;if(!t)return"";for(var n=String(e[0]),a=1;t>a;++a)n+="|"+String(e[a]);return n};var d=Object.prototype.toString;u.isObject=function(e){return e===Object(e)},u.isFunction=function(e){return"[object Function]"===d.call(e)},u.isString=function(e){return"string"==typeof value||"[object String]"===d.call(e)},u.isArray=Array.isArray||function(e){return"[object Array]"===d.call(e)},u.isNumber=function(e){return"number"==typeof e||"[object Number]"===d.call(e)},u.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==d.call(e)},u.isDate=function(e){return"[object Date]"===d.call(e)},u.isValid=function(e){return null!=e&&e===e},u.isBuffer=f.Buffer&&f.Buffer.isBuffer||u["false"],u.number=function(e){return null==e||""===e?null:+e},u["boolean"]=function(e){return null==e||""===e?null:"false"===e?!1:!!e},u.date=function(e){return null==e||""===e?null:Date.parse(e)},u.array=function(e){return null!=e?u.isArray(e)?e:[e]:[]},u.str=function(e){return u.isArray(e)?"["+e.map(u.str)+"]":u.isObject(e)?JSON.stringify(e):u.isString(e)?"'"+a(e)+"'":e};var l=/(^|[^\\])'/g;u.field=function(e){return String(e).split("\\.").map(function(e){return e.split(".")}).reduce(function(e,t){return e.length&&(e[e.length-1]+="."+t.shift()),e.push.apply(e,t),e},[])},u.accessor=function(e){var t;return null==e||u.isFunction(e)?e:u.namedfunc(e,(t=u.field(e)).length>1?function(e){return t.reduce(function(e,t){return e[t]},e)}:function(t){return t[e]})},u.$=u.accessor,u.mutator=function(e){var t;return u.isString(e)&&(t=u.field(e)).length>1?function(e,n){for(var a=0;ar;++r){if(f=e[r],c=f(n),o=f(a),o>c)return-1*t[r];if(c>o)return t[r]}return 0}},u.cmp=function(e,t){return t>e?-1:e>t?1:e>=t?0:null===e?-1:null===t?1:0/0},u.numcmp=function(e,t){return e-t},u.stablesort=function(e,t,n){var a=e.reduce(function(e,t,a){return e[n(t)]=a,e},{});return e.sort(function(e,r){var i=t(e),f=t(r);return f>i?-1:i>f?1:a[n(e)]-a[n(r)]}),e},u.pad=function(e,t,n,a){a=a||" ";var i=t-e.length;if(0>=i)return e;switch(n){case"left":return r(i,a)+e;case"middle":case"center":return r(Math.floor(i/2),a)+e+r(Math.ceil(i/2),a);default:return e+r(i,a)}},u.truncate=function(e,t,n,a,r){var f=e.length;if(t>=f)return e;r=void 0!==r?String(r):"…";var c=Math.max(0,t-r.length);switch(n){ +case"left":return r+(a?i(e,c,1):e.slice(f-c));case"middle":case"center":var o=Math.ceil(c/2),u=Math.floor(c/2);return(a?i(e,o):e.slice(0,o))+r+(a?i(e,u,1):e.slice(f-u));default:return(a?i(e,c):e.slice(0,c))+r}};var b=/([\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u2028\u2029\u3000\uFEFF])/},{"./time":12,buffer:1}],14:[function(e,t,n){"use strict";e("./globals");var a=e("./consts"),r=e("./util"),i=e("./field"),f=e("./enc"),c=e("./schema/schema");t.exports=function(){function e(e,t){var n=c.instantiate(),a=c.util.merge(n,t||{},e);this._data=a.data,this._marktype=a.marktype,this._enc=a.encoding,this._config=a.config,this._filter=a.filter}var t=e.prototype;return e.fromShorthand=function(t,n,r,i){var c=a.shorthand,o=t.split(c.delim),u=o.shift().split(c.assign)[1].trim(),s=f.fromShorthand(o);return new e({data:n,marktype:u,encoding:s,config:r,filter:[]},i)},e.fromSpec=function(t,n){return new e(t,n)},t.toShorthand=function(){var e=a.shorthand;return"mark"+e.assign+this._marktype+e.delim+f.shorthand(this._enc)},e.shorthand=function(e){var t=a.shorthand;return"mark"+t.assign+e.marktype+t.delim+f.shorthand(e.encoding)},e.specFromShorthand=function(t,n,a,r){return e.fromShorthand(t,n,a).toSpec(r)},t.toSpec=function(e,t){var n,a=r.duplicate(this._enc);n={marktype:this._marktype,encoding:a,filter:this._filter},e||(n.config=r.duplicate(this._config)),t||(n.data=r.duplicate(this._data));var i=c.instantiate();return c.util.subtract(n,i)},t.marktype=function(){return this._marktype},t.is=function(e){return this._marktype===e},t.has=function(e){return void 0!==this._enc[e].name},t.field=function(e){return this._enc[e]},t.filter=function(){var e=[],t=this.fields(),n=this;return r.forEach(t,function(t,a){"*"!==a&&(n.config("filterNull").Q&&t.containsType[Q]||n.config("filterNull").T&&t.containsType[T]||n.config("filterNull").O&&t.containsType[O]||n.config("filterNull").N&&t.containsType[N])&&e.push({operands:[a],operator:"notNull"})}),e.concat(this._filter)},t.fieldRef=function(e,t){return t=t||{},t.data=!this._vega2&&t.data!==!1,i.fieldRef(this._enc[e],t)},t.fieldName=function(e){return this._enc[e].name},t.fields=function(){return f.fields(this._enc)},t.fieldTitle=function(e){if(i.isCount(this._enc[e]))return i.count.displayName;var t=this._enc[e].aggregate||this._enc[e].timeUnit||this._enc[e].bin&&"bin";if(t){var n="avg"===t?"MEAN":t.toUpperCase();return n+"("+this._enc[e].name+")"}return this._enc[e].name},t.scale=function(e){return this._enc[e].scale||{}},t.axis=function(e){return this._enc[e].axis||{}},t.bandSize=function(e,t){return t=t||e===Y&&this.has(ROW)&&this.has(Y)||e===X&&this.has(COL)&&this.has(X),this.field(e).band.size||this.config(t?"smallBandSize":"largeBandSize")},t.aggregate=function(e){return this._enc[e].aggregate},t.bin=function(e){var t=this._enc[e].bin;return t==={}?!1:t===!0?{maxbins:c.MAXBINS_DEFAULT}:t},t.value=function(e){return this._enc[e].value},t.numberFormat=function(e){var t=e.max>this.config("maxSmallNumber")?"largeNumberFormat":"smallNumberFormat";return this.config(t)},t.sort=function(t,n){var a=this._enc[t].sort,r=this._enc,f=i.isTypes;if((!a||0===a.length)&&e.toggleSort.support({encoding:this._enc},n,!0)&&this.config("toggleSort")===Q){var c=f(r.x,[N,O])?r.y:r.x;f(r[t],[N,O])&&(a=[{name:c.name,aggregate:c.aggregate,type:c.type,reverse:!0}])}return a},t.map=function(e){return f.map(this._enc,e)},t.reduce=function(e,t){return f.reduce(this._enc,e,t)},t.forEach=function(e){return f.forEach(this._enc,e)},t.type=function(e){return this.has(e)?this._enc[e].type:null},t.isType=function(e,t){var n=this.field(e);return n&&i.isType(n,t)},t.isTypes=function(e,t){var n=this.field(e);return n&&i.isTypes(n,t)},e.isOrdinalScale=function(e,t){return i.isOrdinalScale(e.field(t))},e.isDimension=function(e,t){return i.isDimension(e.field(t))},e.isMeasure=function(e,t){return i.isMeasure(e.field(t))},t.isOrdinalScale=function(t){return this.has(t)&&e.isOrdinalScale(this,t)},t.isDimension=function(t){return this.has(t)&&e.isDimension(this,t)},t.isMeasure=function(t){return this.has(t)&&e.isMeasure(this,t)},t.isAggregate=function(){return f.isAggregate(this._enc)},t.dataTable=function(){return this.isAggregate()?AGGREGATE:RAW},e.isAggregate=function(e){return f.isAggregate(e.encoding)},e.alwaysNoOcclusion=function(e){return f.isAggregate(e.encoding)},e.isStack=function(e){return("bar"===e.marktype||"area"===e.marktype)&&e.encoding.color},t.isStack=function(){return(this.is("bar")||this.is("area"))&&this.has("color")},t.details=function(){var e=this;return this.reduce(function(t,n,a){return n.aggregate||a===X||a===Y||t.push(e.fieldRef(a)),t},[])},t.facets=function(){var e=this;return this.reduce(function(t,n,a){return n.aggregate||a!=ROW&&a!=COL||t.push(e.fieldRef(a)),t},[])},t.cardinality=function(e,t){return i.cardinality(this.field(e),t,this.config("filterNull"))},t.isRaw=function(){return!this.isAggregate()},t.data=function(){return this._data},t.hasValues=function(){var e=this.data().values;return e&&e.length},t.config=function(e){return this._config[e]},e.transpose=function(e){var t=e.encoding,n=r.duplicate(e.encoding);return n.x=t.y,n.y=t.x,n.row=t.col,n.col=t.row,e.encoding=n,e},e.toggleSort=function(e){return e.config=e.config||{},e.config.toggleSort=e.config.toggleSort===Q?N:Q,e},e.toggleSort.direction=function(t){if(e.toggleSort.support(t)){var n=t.encoding;return n.x.type===N?"x":"y"}},e.toggleSort.mode=function(e){return e.config.toggleSort},e.toggleSort.support=function(t,n){var a=t.encoding,r=i.isTypes;return!f.has(a,ROW)&&!f.has(a,COL)&&f.has(a,X)&&f.has(a,Y)&&e.alwaysNoOcclusion(t,n)?r(a.x,[N,O])&&i.isMeasure(a.y)?"x":r(a.y,[N,O])&&i.isMeasure(a.x)?"y":!1:!1},e.toggleFilterNullO=function(e){return e.config=e.config||{},e.config.filterNull=e.config.filterNull||{T:!0,Q:!0},e.config.filterNull.O=!e.config.filterNull.O,e},e.toggleFilterNullO.support=function(e,t){var n=f.fields(e.encoding);for(var a in n){var r=n[a];if(r.containsType.O&&a in t&&t[a].nulls>0)return!0}return!1},e}()},{"./consts":29,"./enc":31,"./field":32,"./globals":33,"./schema/schema":35,"./util":37}],15:[function(e,t,n){"use strict";e("../globals");var a=e("../util"),r=a.setter,i=a.getter,f=e("./time"),c=t.exports={};c.def=function(e,t,n,a,r){var f=e==COL,o=e==ROW,u=f?"x":o?"y":e,s={type:u,scale:e,properties:{},layer:t.field(e).axis.layer,orient:c.orient(e,t,a)};return s=c.labels.scale(s,t,e),s=c.labels.format(s,e,t,a),s=c.labels.angle(s,t,e),e==X&&(!t.isDimension(X)&&!t.isType(X,T)||"angle"in i(s,["properties","labels"])?s.ticks=t.field(e).axis.ticks:s=c.labels.rotate(s)),s.titleOffset=c.titleOffset(t,n,e),o&&(s.offset=c.titleOffset(t,n,Y)+20),s=c.grid(s,e,t,n),s=c.title(s,e,t,n,r),(o||f)&&(s=c.hideTicks(s)),s},c.orient=function(e,t,n){var a=t.field(e).axis.orient;return a?a:e===COL?"top":e===X&&t.has(Y)&&t.isOrdinalScale(Y)&&t.cardinality(Y,n)>30?"top":void 0},c.grid=function(e,t,n,a){var r=a.cellPadding,i=t==COL,f=t==ROW;return n.axis(t).grid&&(e.grid=!0,e.properties.grid=i?{x:{offset:a.cellWidth*(1+r/2),scale:"col"},y:{value:-a.cellHeight*(r/2)},stroke:{value:n.config("cellGridColor")},opacity:{value:n.config("cellGridOpacity")}}:f?{y:{offset:-a.cellHeight*(r/2),scale:"row"},x:{value:e.offset},x2:{offset:e.offset+.05*a.cellWidth,group:"mark.group.width",mult:1},stroke:{value:n.config("cellGridColor")},opacity:{value:n.config("cellGridOpacity")}}:{stroke:{value:n.config("gridColor")},opacity:{value:n.config("gridOpacity")}}),e},c.hideTicks=function(e){return e.properties.ticks={opacity:{value:0}},e.properties.majorTicks={opacity:{value:0}},e.properties.axis={opacity:{value:0}},e},c.title=function(e,t,n,r){var i=n.field(t).axis;if(i.title)e.title=i.title;else{var f,c=n.fieldTitle(t);i.titleMaxLength?f=i.titleMaxLength:t===X?f=r.cellWidth/n.config("characterWidth"):t===Y&&(f=r.cellHeight/n.config("characterWidth")),e.title=f?a.truncate(c,f):c}return t===ROW&&(e.properties.title={angle:{value:0},align:{value:"right"},baseline:{value:"middle"},dy:{value:-r.height/2-20}}),e},c.labels={},c.labels.scale=function(e,t,n){var a=t.field(n).timeUnit;return t.isType(n,T)&&a&&f.hasScale(a)&&r(e,["properties","labels","text","scale"],"time-"+a),e},c.labels.format=function(e,t,n,a){var i=a[n.field(t).name];if(n.axis(t).format)e.format=n.axis(t).format;else if(n.isType(t,Q)||"number"===i.type)e.format=n.numberFormat(i);else if(n.isType(t,T)){var f=n.field(t).timeUnit;f?"year"===f&&(e.format="d"):e.format=n.config("timeFormat")}else n.isTypes(t,[N,O])&&n.axis(t).maxLabelLength&&r(e,["properties","labels","text","template"],"{{data | truncate:"+n.axis(t).maxLabelLength+"}}");return e},c.labels.angle=function(e,t,n){var a=t.axis(n).labelAngle;return"undefined"==typeof a?e:(r(e,["properties","labels","angle","value"],a),e)},c.labels.rotate=function(e){var t="top"===e.orient?"left":"right";return r(e,["properties","labels","angle","value"],270),r(e,["properties","labels","align","value"],t),r(e,["properties","labels","baseline","value"],"middle"),e},c.titleOffset=function(e,t,n){var a=e.axis(n).titleOffset;if(a)return a;switch(n){case ROW:return 0;case COL:return 35}return i(t,[n,"axisTitleOffset"])}},{"../globals":33,"../util":37,"./time":28}],16:[function(e,t,n){"use strict";var a=t.exports=e("datalib/src/stats").summary;e("../globals");var r=t.exports={},i=e("../Encoding"),f=r.axis=e("./axis"),c=r.legend=e("./legend"),o=r.marks=e("./marks"),u=r.scale=e("./scale");r.data=e("./data"),r.facet=e("./facet"),r.group=e("./group"),r.layout=e("./layout"),r.sort=e("./sort"),r.stack=e("./stack"),r.style=e("./style"),r.subfacet=e("./subfacet"),r.time=e("./time"),r.compile=function(e,t,n){return r.compileEncoding(i.fromSpec(e,n),t)},r.shorthand=function(e,t,n,a){return r.compileEncoding(i.fromShorthand(e,n,a),t)},r.compileEncoding=function(e,t){!t&&e.hasValues()&&(t=a(e.data().values).reduce(function(e,t){return e[t.field]=t,e},{}));var n=r.layout(e,t),i={width:n.width,height:n.height,padding:"auto",data:r.data(e),scales:r.time.scales(e)};i.data=r.sort(i.data,e,t),i.marks=[r.group.def("cell",{width:n.cellWidth?{value:n.cellWidth}:void 0,height:n.cellHeight?{value:n.cellHeight}:void 0})];for(var s=r.style(e,t),d=i.marks[0],l=o.def(e,n,s,t),b=l[l.length-1],h=0;h0&&r.stack(i.data,e,b);if(p.length>0&&(m||g)&&r.subfacet(d,b,p,m,e),g){var y=e.isMeasure(X)&&e.isDimension(Y)?Y:X;b.from||(b.from={}),b.from.transform=[{type:"sort",by:"-"+e.fieldRef(y)}]}var v=[].concat.apply([],l.map(function(e){return u.names(e.properties.update)}));return e.has(ROW)||e.has(COL)?(i=r.facet(d,e,n,i,v,m,t),i.legends=c.defs(e,s)):(d.scales=u.defs(v,e,n,t,{stack:m}),d.axes=[],e.has(X)&&d.axes.push(f.def(X,e,n,t)),e.has(Y)&&d.axes.push(f.def(Y,e,n,t)),d.legends=c.defs(e,s)),i}},{"../Encoding":14,"../globals":33,"./axis":15,"./data":17,"./facet":18,"./group":19,"./layout":20,"./legend":21,"./marks":22,"./scale":23,"./sort":24,"./stack":25,"./style":26,"./subfacet":27,"./time":28,"datalib/src/stats":11}],17:[function(e,t,n){"use strict";function a(e){var t=[a.raw(e)],n=a.aggregate(e);return n&&t.push(a.aggregate(e)),a.filterNonZeroForLog(t[t.length-1],e),t}e("../globals"),t.exports=a;var r=e("../field"),i=e("../util"),f=e("./time");a.raw=function(e){var t={name:RAW};e.hasValues()?t.values=e.data().values:(t.url=e.data().url,t.format={type:e.data().formatType});var n=a.raw.formatParse(e);return n&&(t.format=t.format||{},t.format.parse=n),t.transform=a.raw.transform(e),t},a.raw.formatParse=function(e){var t;return e.forEach(function(e){if(e.type==T)t=t||{},t[e.name]="date";else if(e.type==Q){if(r.isCount(e))return;t=t||{},t[e.name]="number"}}),t},a.raw.transform=function(e){return a.raw.transform.time(e).concat(a.raw.transform.bin(e)).concat(a.raw.transform.filter(e))};var c={">":!0,">=":!0,"=":!0,"!=":!0,"<":!0,"<=":!0};a.raw.transform.time=function(e){return e.reduce(function(t,n,a){return n.type===T&&n.timeUnit&&t.push({type:"formula",field:e.fieldRef(a),expr:f.formula(n.timeUnit,e.fieldRef(a,{nofn:!0,d:!0}))}),t},[])},a.raw.transform.bin=function(e){return e.reduce(function(t,n,a){return e.bin(a)&&t.push({type:"bin",field:e.fieldRef(a,{nofn:!0}),output:e.fieldRef(a),maxbins:e.bin(a).maxbins}),t},[])},a.raw.transform.filter=function(e){var t=e.filter().reduce(function(t,n){var a="",r=n.operator,f=n.operands,o="d."+(e._vega2?"":"data.");if(c[r]){"="===r&&(r="==");var u=f[0],s=f[1];a=o+u+" "+r+" "+s}else{if("notNull"!==r)return i.warn("Unsupported operator: ",r),t;for(var d=0;d0?{name:AGGREGATE,source:RAW,transform:[{type:"aggregate",groupby:t,fields:n}]}:null},a.filterNonZeroForLog=function(e,t){t.forEach(function(n,a){"log"===t.scale(a).type&&e.transform.push({type:"filter",test:t.fieldRef(a,{d:1})+" > 0"})})}},{"../field":32,"../globals":33,"../util":37,"./time":28}],18:[function(e,t,n){"use strict";function a(e,t,n,a,o,u,s){var d,l,b=e.properties.enter,h=[],g=[],p=t.has(ROW),m=t.has(COL);b.fill={value:t.config("cellBackgroundColor")},e.from={data:e.marks[0].from.data};for(var y=0;y0&&(e.axes=g);var x=e.from.transform||(e.from.transform=[]);return x.unshift({type:"facet",keys:h}),a}e("../globals");var r=e("../util"),i=e("./axis"),f=e("./group").def,c=e("./scale");t.exports=a},{"../globals":33,"../util":37,"./axis":15,"./group":19,"./scale":23}],19:[function(e,t,n){"use strict";function a(e,t){return t=t||{},{_name:e||void 0,type:"group",from:t.from,properties:{enter:{x:t.x||void 0,y:t.y||void 0,width:t.width||{group:"width"},height:t.height||{group:"height"}}},scales:t.scales||void 0,axes:t.axes||void 0,marks:t.marks||[]}}t.exports={def:a}},{}],20:[function(e,t,n){"use strict";function a(e,t){var n=r(e,t);return n=c(e,t,n)}function r(e,t){var n,a,r=e.has(ROW),i=e.has(COL),f=e.has(X),c=e.has(Y),o=e.marktype(),u=f&&e.isDimension(X)?e.cardinality(X,t):1,s=c&&e.isDimension(Y)?e.cardinality(Y,t):1,d=u>e.config("largeBandMaxCardinality")||s>e.config("largeBandMaxCardinality"),l=e.config("cellPadding");n=f?e.isOrdinalScale(X)?(u+e.field(X).band.padding)*e.bandSize(X,d):i||r?e.field(COL).width:e.config("singleWidth"):o===TEXT?e.config("textCellWidth"):e.bandSize(X),a=c?e.isOrdinalScale(Y)?(s+e.field(Y).band.padding)*e.bandSize(Y,d):i||r?e.field(ROW).height:e.config("singleHeight"):e.bandSize(Y);var b=n,h=a;if(i){var g=e.cardinality(COL,t);b=n*((1+l)*(g-1)+1)}if(r){var p=e.cardinality(ROW,t);h=a*((1+l)*(p-1)+1)}return{cellWidth:n,cellHeight:a,cellPadding:l,width:b,height:h,x:{useSmallBand:d},y:{useSmallBand:d}}}function i(e,t,n){var a=e.numberFormat(t,n);return d.format(a)(n.max).length}function f(e,t,n){var a=e.field(n),r=t[a.name];return a.bin?i(e,n,r):e.isType(n,Q)?i(e,n,r):e.isType(n,T)?s.maxLength(e.field(n).timeUnit,e):e.isTypes(n,[N,O])?"number"===r.type?i(e,n,r):Math.min(r.max,e.axis(n).maxLabelLength||1/0):void 0}function c(e,t,n){return[X,Y].forEach(function(a){var r,i=a===X?20:22;e.isDimension(a)||e.isType(a,T)?r=f(e,t,a):(e.isType(a,Q)||"count"===e.aggregate(a))&&a===Y&&(r=f(e,t,a)),r?u(n,[a,"axisTitleOffset"],e.config("characterWidth")*r+i):u(n,[a,"axisTitleOffset"],3*e.config("characterWidth")+i)}),n}e("../globals");var o=e("../util"),u=o.setter,s=e("./time"),d=e("d3-format");t.exports=a},{"../globals":33,"../util":37,"./time":28,"d3-format":5}],21:[function(e,t,n){"use strict";e("../globals");var a=e("./time"),r=e("../util"),i=r.setter,f=r.getter,c=t.exports={};c.defs=function(e,t){var n=[];return e.has(COLOR)&&e.field(COLOR).legend&&n.push(c.def(COLOR,e,{fill:COLOR,orient:"right"},t)),e.has(SIZE)&&e.field(SIZE).legend&&n.push(c.def(SIZE,e,{size:SIZE,orient:1===n.length?"left":"right"},t)),e.has(SHAPE)&&e.field(SHAPE).legend&&(2===n.length&&console.error("Vega-lite currently only supports two legends"),n.push(c.def(SHAPE,e,{shape:SHAPE,orient:1===n.length?"left":"right"},t))),n},c.def=function(e,t,n,r){var f=t.field(e).timeUnit;return n.title=c.title(e,t),n=c.style(e,t,n,r),t.isType(e,T)&&f&&a.hasScale(f)&&i(n,["properties","labels","text","scale"],"time-"+f),n},c.style=function(e,t,n,a){var r=f(n,["properties","symbols"]),i=t.marktype();switch(i){case"bar":case"tick":case"text":r.stroke={value:"transparent"},r.shape={value:"square"};break;case"circle":case"square":r.shape={value:i};case"point":t.field(SHAPE).filled?(r.fill=t.has(COLOR)&&e===COLOR?{scale:COLOR,field:"data"}:{value:t.value(COLOR)},r.stroke={value:"transparent"}):(r.stroke=t.has(COLOR)&&e===COLOR?{scale:COLOR,field:"data"}:{value:t.value(COLOR)},r.fill={value:"transparent"},r.strokeWidth={value:t.config("strokeWidth")});break;case"line":case"area":}var c=t.field(COLOR).opacity||a.opacity;return c&&(r.opacity={value:c}),n},c.title=function(e,t){var n=t.field(e).legend;return n.title?n.title:t.fieldTitle(e)}},{"../globals":33,"../util":37,"./time":28}],22:[function(e,t,n){"use strict";function a(e,t,n){var a={};e.isMeasure(X)?(a.x={scale:X,field:e.fieldRef(X)},(!e.has(Y)||e.isDimension(Y))&&(a.x2={value:0})):e.has(X)?a.xc={scale:X,field:e.fieldRef(X)}:a.x={value:0,offset:e.config("singleBarOffset")},a.x2||(a.width=!e.has(X)||e.isOrdinalScale(X)?e.has(SIZE)?{scale:SIZE,field:e.fieldRef(SIZE)}:{value:e.bandSize(X,t.x.useSmallBand),offset:-1}:{value:2}),e.isMeasure(Y)?(a.y={scale:Y,field:e.fieldRef(Y)},a.y2={group:"height"}):(e.has(Y)?a.yc={scale:Y,field:e.fieldRef(Y)}:a.y2={group:"height",offset:-e.config("singleBarOffset")},a.height=e.has(SIZE)?{scale:SIZE,field:e.fieldRef(SIZE)}:{value:e.bandSize(Y,t.y.useSmallBand),offset:-1}),a.fill=e.has(COLOR)?{scale:COLOR,field:e.fieldRef(COLOR)}:{value:e.value(COLOR)};var r=e.field(COLOR).opacity;return r&&(a.opacity={value:r}),a}function r(e,t,n){var a={};e.has(X)?a.x={scale:X,field:e.fieldRef(X)}:e.has(X)||(a.x={value:e.bandSize(X,t.x.useSmallBand)/2}),e.has(Y)?a.y={scale:Y,field:e.fieldRef(Y)}:e.has(Y)||(a.y={value:e.bandSize(Y,t.y.useSmallBand)/2}),e.has(SIZE)?a.size={scale:SIZE,field:e.fieldRef(SIZE)}:e.has(SIZE)||(a.size={value:e.value(SIZE)}),e.has(SHAPE)?a.shape={scale:SHAPE,field:e.fieldRef(SHAPE)}:e.has(SHAPE)||(a.shape={value:e.value(SHAPE)}),e.field(SHAPE).filled?e.has(COLOR)?a.fill={scale:COLOR,field:e.fieldRef(COLOR)}:e.has(COLOR)||(a.fill={value:e.value(COLOR)}):(e.has(COLOR)?a.stroke={scale:COLOR,field:e.fieldRef(COLOR)}:e.has(COLOR)||(a.stroke={value:e.value(COLOR)}),a.strokeWidth={value:e.config("strokeWidth")});var r=e.field(COLOR).opacity||n.opacity;return r&&(a.opacity={value:r}),a}function i(e,t,n){var a={};e.has(X)?a.x={scale:X,field:e.fieldRef(X)}:e.has(X)||(a.x={value:0}),e.has(Y)?a.y={scale:Y,field:e.fieldRef(Y)}:e.has(Y)||(a.y={group:"height"}),e.has(COLOR)?a.stroke={scale:COLOR,field:e.fieldRef(COLOR)}:e.has(COLOR)||(a.stroke={value:e.value(COLOR)});var r=e.field(COLOR).opacity;return r&&(a.opacity={value:r}),a.strokeWidth={value:e.config("strokeWidth")},a}function f(e,t,n){var a={};e.isMeasure(X)?(a.x={scale:X,field:e.fieldRef(X)},e.isDimension(Y)&&(a.x2={scale:X,value:0},a.orient={value:"horizontal"})):a.x=e.has(X)?{scale:X,field:e.fieldRef(X)}:{value:0},e.isMeasure(Y)?(a.y={scale:Y,field:e.fieldRef(Y)},a.y2={scale:Y,value:0}):a.y=e.has(Y)?{scale:Y,field:e.fieldRef(Y)}:{group:"height"},e.has(COLOR)?a.fill={scale:COLOR,field:e.fieldRef(COLOR)}:e.has(COLOR)||(a.fill={value:e.value(COLOR)});var r=e.field(COLOR).opacity;return r&&(a.opacity={value:r}),a}function c(e,t,n){var a={};e.has(X)?(a.x={scale:X,field:e.fieldRef(X)},e.isDimension(X)&&(a.x.offset=-e.bandSize(X,t.x.useSmallBand)/3)):e.has(X)||(a.x={value:0}),e.has(Y)?(a.y={scale:Y,field:e.fieldRef(Y)},e.isDimension(Y)&&(a.y.offset=-e.bandSize(Y,t.y.useSmallBand)/3)):e.has(Y)||(a.y={value:0}),a.width=!e.has(X)||e.isDimension(X)?{value:e.bandSize(X,t.y.useSmallBand)/1.5}:{value:1},a.height=!e.has(Y)||e.isDimension(Y)?{value:e.bandSize(Y,t.y.useSmallBand)/1.5}:{value:1},a.fill=e.has(COLOR)?{scale:COLOR,field:e.fieldRef(COLOR)}:{value:e.value(COLOR)};var r=e.field(COLOR).opacity||n.opacity;return r&&(a.opacity={value:r}),a}function o(e){return function(t,n,a){var r={};t.has(X)?r.x={scale:X,field:t.fieldRef(X)}:t.has(X)||(r.x={value:t.bandSize(X,n.x.useSmallBand)/2}),t.has(Y)?r.y={scale:Y,field:t.fieldRef(Y)}:t.has(Y)||(r.y={value:t.bandSize(Y,n.y.useSmallBand)/2}),t.has(SIZE)?r.size={scale:SIZE,field:t.fieldRef(SIZE)}:t.has(X)||(r.size={value:t.value(SIZE)}),r.shape={value:e},t.has(COLOR)?r.fill={scale:COLOR,field:t.fieldRef(COLOR)}:t.has(COLOR)||(r.fill={value:t.value(COLOR)});var i=t.field(COLOR).opacity||a.opacity;return i&&(r.opacity={value:i}),r}}function u(e,t,n,a){var r={},i=e.field(TEXT);e.has(X)?r.x={scale:X,field:e.fieldRef(X)}:e.has(X)||(r.x=e.has(TEXT)&&e.isType(TEXT,Q)?{value:t.cellWidth-5}:{value:e.bandSize(X,t.x.useSmallBand)/2}),e.has(Y)?r.y={scale:Y,field:e.fieldRef(Y)}:e.has(Y)||(r.y={value:e.bandSize(Y,t.y.useSmallBand)/2}),e.has(SIZE)?r.fontSize={scale:SIZE,field:e.fieldRef(SIZE)}:e.has(SIZE)||(r.fontSize={value:i.font.size}),r.fill={value:i.color};var f=e.field(COLOR).opacity||n.opacity;if(f&&(r.opacity={value:f}),e.has(TEXT))if(e.isType(TEXT,Q)){var c=a[e.fieldName(TEXT)],o=i.format||e.numberFormat(c);r.text={template:"{{"+e.fieldRef(TEXT)+" | number:'"+o+"'}}"},r.align={value:i.align}}else r.text={field:e.fieldRef(TEXT)};else r.text={value:i.placeholder};return r.font={value:i.font.family},r.fontWeight={value:i.font.weight},r.fontStyle={value:i.font.style},r.baseline={value:i.baseline},r}e("../globals");var s=t.exports={};s.def=function(e,t,n,a){var r=[],i=s[e.marktype()],f=e.dataTable();if(e.marktype()===TEXT&&e.has(COLOR)){var c={x:{value:0},y:{value:0},x2:{value:t.cellWidth},y2:{value:t.cellHeight},fill:{scale:COLOR,field:e.fieldRef(COLOR)}};r.push({type:"rect",from:{data:f},properties:{enter:c,update:c}})}var o=i.prop(e,t,n,a);return r.push({type:i.type,from:{data:f},properties:{enter:o,update:o}}),r},s.bar={type:"rect",stack:!0,prop:a,supportedEncoding:{row:1,col:1,x:1,y:1,size:1,color:1}},s.line={type:"line",line:!0,prop:i,requiredEncoding:["x","y"],supportedEncoding:{row:1,col:1,x:1,y:1,color:1,detail:1}},s.area={type:"area",stack:!0,line:!0,requiredEncoding:["x","y"],prop:f,supportedEncoding:{row:1,col:1,x:1,y:1,color:1}},s.tick={type:"rect",prop:c,supportedEncoding:{row:1,col:1,x:1,y:1,color:1,detail:1}},s.circle={type:"symbol",prop:o("circle"),supportedEncoding:{row:1,col:1,x:1,y:1,size:1,color:1,detail:1}},s.square={type:"symbol",prop:o("square"),supportedEncoding:s.circle.supportedEncoding},s.point={type:"symbol",prop:r,supportedEncoding:{row:1,col:1,x:1,y:1,size:1,color:1,shape:1,detail:1}},s.text={type:"text",prop:u,requiredEncoding:["text"],supportedEncoding:{row:1,col:1,size:1,color:1,text:1}}},{"../globals":33}],23:[function(e,t,n){"use strict";e("../globals");var a=e("../util"),r=e("./time"),i=e("colorbrewer"),f=e("d3-color").interpolateHsl,c=e("../schema/schema"),o=e("./sort"),u=t.exports={};u.names=function(e){return a.keys(a.keys(e).reduce(function(t,n){return e[n]&&e[n].scale&&(t[e[n].scale]=1),t},{}))},u.defs=function(e,t,n,a,r){return r=r||{},e.reduce(function(e,i){var f={name:i,type:u.type(i,t),domain:u.domain(i,t,a,r)};return f.sort=u.sort(f,t,i)||void 0,u.range(f,t,n,a,r),e.push(f),e},[])},u.sort=function(e,t,n){return"ordinal"===e.type&&(!!t.bin(n)||0===t.sort(n).length)},u.type=function(e,t){switch(t.type(e)){case N:case O:return"ordinal";case T:var n=t.field(e).timeUnit;return n?r.scale.type(n,e):"time";case Q:return t.bin(e)?e===COLOR?"linear":"ordinal":t.scale(e).type}},u.domain=function(e,t,n,i){var f=t.field(e);if(t.isType(e,T)){var u=r.scale.domain(f.timeUnit,e);if(u)return u}if(f.bin){var s=n[f.name],d=a.getbins(s,f.bin.maxbins||c.MAXBINS_DEFAULT),l=(d.stop-d.start)/d.step;return a.range(l).map(function(e){return d.start+d.step*e})}if(e==i.stack)return{data:STACKED,field:t.fieldRef(e,{data:!t._vega2,prefn:(i.facet?"max_":"")+"sum_"})};var b=t.aggregate(e),h=f.timeUnit,g=t.scale(e).useRawDomain,p=void 0!==g?g:t.config("useRawDomain"),m=!b||"count"!==b&&"sum"!==b;if(p&&m&&(t.isType(e,Q)&&!f.bin||t.isType(e,T)&&(!h||!r.isOrdinalFn(h))))return{data:RAW,field:t.fieldRef(e,{nofn:!h})};var y=t.sort(e,n).length>0?o.getDataName(e):t.dataTable();return{data:y,field:t.fieldRef(e)}},u.range=function(e,t,n,a){var r=t.scale(e.name),i=t.field(e.name),f=i.timeUnit;switch(e.name){case X:e.range=n.cellWidth?[0,n.cellWidth]:"width","ordinal"===e.type?e.bandWidth=t.bandSize(X,n.x.useSmallBand):(e.zero=t.isType(e.name,T)&&"year"===f?!1:void 0===r.zero?!0:r.zero,e.reverse=r.reverse),e.round=!0,e.nice="time"===e.type?f||t.config("timeScaleNice"):!0;break;case Y:"ordinal"===e.type?(e.range=n.cellHeight?i.bin?[n.cellHeight,0]:[0,n.cellHeight]:"height",e.bandWidth=t.bandSize(Y,n.y.useSmallBand)):(e.range=n.cellHeight?[n.cellHeight,0]:"height",e.zero=t.isType(e.name,T)&&"year"===f?!1:void 0===r.zero?!0:r.zero,e.reverse=r.reverse),e.round=!0,e.nice="time"===e.type?f||t.config("timeScaleNice"):!0;break;case ROW:e.bandWidth=n.cellHeight,e.round=!0,e.nice=!0;break;case COL:e.bandWidth=n.cellWidth,e.round=!0,e.nice=!0;break;case SIZE:if(t.is("bar"))e.range=[3,Math.max(t.bandSize(X),t.bandSize(Y))];else if(t.is(TEXT))e.range=[8,40];else{var c=Math.min(t.bandSize(X),t.bandSize(Y))-1;e.range=[10,.8*c*c]}e.round=!0,e.zero=!1;break;case SHAPE:e.range="shapes";break;case COLOR:e.range=u.color(e,t,a),"ordinal"!==e.type&&(e.zero=!1);break;default:throw new Error("Unknown encoding name: "+e.name)}switch(e.name){case ROW:case COL:e.padding=t.config("cellPadding"),e.outerPadding=0;break;case X:case Y:"ordinal"===e.type&&(e.points=!0,e.padding=t.field(e.name).band.padding)}},u.color=function(e,t,n){var a=t.scale(COLOR),r=a.range,i=t.cardinality(COLOR,n),f=t.type(COLOR);if(void 0===r){var c=a.ordinalPalette,o=a.quantitativeRange;return"ordinal"===e.type?f===N?(r=10>=i?a.c10palette:a.c20palette,u.color.palette(r,i,f)):c?u.color.palette(c,i,f):u.color.interpolate(o[0],o[1],i):[o[0],o[1]]}},u.color.palette=function(e,t,n){switch(e){case"category10k":return["#2ca02c","#e377c2","#7f7f7f","#17becf","#8c564b","#d62728","#bcbd22","#9467bd","#ff7f0e","#1f77b4"];case"category10":return["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];case"category20":return["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"];case"category20b":return["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"];case"category20c":return["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"]}if(e in i){var r=i[e];if(t in r)return r[t];if(n===N)return r[Math.max.apply(null,a.keys(r))];var f=3>t?3:Math.max.apply(null,a.keys(r)),c=0,o=f-1;return u.color.interpolate(r[f][c],r[f][o],t)}return e},u.color.interpolate=function(e,t,n){var r=f(e,t);return a.range(n).map(function(e){return r(1*e/(n-1))})}},{"../globals":33,"../schema/schema":35,"../util":37,"./sort":24,"./time":28,colorbrewer:3,"d3-color":4}],24:[function(e,t,n){"use strict";function a(e,t,n,i){var f={};return t.forEach(function(i,c){var o=t.sort(c,n);if(o.length>0){var u=o.map(function(e){return{op:e.aggregate,field:r.fieldRef(e,{nofn:!0,data:!t._vega2})}}),s=o.map(function(e){var n=e.reverse?"-":"";return n+r.fieldRef(e,{data:!t._vega2})}),d=a.getDataName(c),l=[{type:"aggregate",groupby:[t.fieldRef(c)],fields:u},{type:"sort",by:s}];e.push({name:d,source:RAW,transform:l}),f[c]=d}}),e}e("../globals");var r=e("../field");t.exports=a,a.getDataName=function(e){return"sorted-"+e}},{"../field":32,"../globals":33}],25:[function(e,t,n){"use strict";function a(e,t,n){if(!r[t.marktype()].stack)return!1;if(!t.has(COLOR))return!1;var a=null,i=null,f=null,c=t.isMeasure(X),o=t.isMeasure(Y),u=t.facets();if(c&&!o)a=Y,i=X,f=0;else{if(!o||c)return null;a=X,i=Y,f=1}var s={name:STACKED,source:t.dataTable(),transform:[{type:"aggregate",groupby:[t.fieldRef(a)].concat(u),fields:[{op:"sum",field:t.fieldRef(i)}]}]};return u&&u.length>0&&s.transform.push({type:"aggregate",groupby:u,fields:[{op:"max",field:t.fieldName(i,{fn:"sum"})}]}),e.push(s),n.from.transform=[{type:"stack",point:t.fieldRef(a),height:t.fieldRef(i),output:{y1:i,y0:i+"2"}}],n.properties.update[i]=n.properties.enter[i]={scale:i,field:i},n.properties.update[i+"2"]=n.properties.enter[i+"2"]={scale:i,field:i+"2"},i}e("../globals");var r=e("./marks");t.exports=a},{"../globals":33,"./marks":22}],26:[function(e,t,n){"use strict";function a(e,t){if(!t)return 1;var n=0;if(e.isAggregate())n=1,e.forEach(function(a,i){i===ROW||i===COL||(i===X||i===Y)&&r.isOrdinalScale(a)||(n*=e.cardinality(i,t))});else{if(!t["*"])return 1;n=t["*"].max;var a=1;e.has(ROW)&&(a*=e.cardinality(ROW,t)),e.has(COL)&&(a*=e.cardinality(COL,t)),n/=a}var i=0;return i=25>=n?1:200>n?.8:1e3>n||e.is("tick")?.7:.3}e("../globals");var r=e("../field");t.exports=function(e,t){return{opacity:a(e,t)}}},{"../field":32,"../globals":33}],27:[function(e,t,n){"use strict";function a(e,t,n,a,i){var f=e.marks,c=r("subfacet",{marks:f});e.marks=[c],c.from=t.from,delete t.from;var o=c.from.transform||(c.from.transform=[]);o.unshift({type:"facet",keys:n}),a&&i.has(COLOR)&&o.unshift({type:"sort",by:i.fieldRef(COLOR)})}e("../globals");var r=e("./group").def;t.exports=a},{"../globals":33,"./group":19}],28:[function(e,t,n){"use strict";var a=e("../util"),r=e("d3-time-format"),i=t.exports={},f=new Date(2014,8,17);i.cardinality=function(e,t,n,a){var r=e.timeUnit;switch(r){case"seconds":return 60;case"minutes":return 60;case"hours":return 24;case"day":return 7;case"date":return 31;case"month":return 12;case"year":var i=t[e.name],f=t["year_"+e.name];return f?f.distinct-(i.nulls>0&&n[a]?1:0):null}return null},i.formula=function(e,t){var n="utc"+e;return n+"("+t+")"},i.maxLength=function(e,t){switch(e){case"seconds":case"minutes":case"hours":case"date":return 2;case"month":case"day":var n=i.range(e,t);return n?Math.max.apply(null,n.map(function(e){return e.length})):2;case"year":return 4}var a=t.config("timeFormat");return r.utcFormat(a)(f).length},i.range=function(e,t){var n,a=t.config("timeScaleLabelLength"); -case"month":n=t.config("monthScaleLabel")}return n?a?n.map(function(e){return e.substr(0,a)}):n:void 0},a.scale={},a.scale.def=function(e,t){var n=a.range(e,t);return n?{name:"time-"+e,type:"ordinal",domain:a.scale.domain(e),range:n}:null},a.isOrdinalFn=function(e){switch(e){case"seconds":case"minutes":case"hours":case"day":case"date":case"month":return!0}return!1},a.scale.type=function(e,t){return t===COLOR?"linear":a.isOrdinalFn(e)||t===COL||t===ROW?"ordinal":"linear"},a.scale.domain=function(e,t){var n=t===COLOR;switch(e){case"seconds":case"minutes":return n?[0,59]:i.range(0,60);case"hours":return n?[0,23]:i.range(0,24);case"day":return n?[0,6]:i.range(0,7);case"date":return n?[1,31]:i.range(1,32);case"month":return n?[0,11]:i.range(0,12)}return null},a.hasScale=function(e){switch(e){case"day":case"month":return!0}return!1}},{"../util":39,"d3-time-format":6}],32:[function(e,t,n){"use strict";e("./globals");var a=t.exports={};a.encodingTypes=[X,Y,ROW,COL,SIZE,SHAPE,COLOR,TEXT,DETAIL],a.shorthand={delim:"|",assign:"=",type:",",func:"_"}},{"./globals":36}],33:[function(e,t,n){"use strict";e("./globals");var a=e("datalib/src/stats"),r=t.exports={};r.types={"boolean":N,number:Q,integer:Q,date:T,string:N},r.stats=function(e){var t=a.summary(e);return t.reduce(function(e,t){return e[t.field]=t,e},{"*":{max:e.length,min:0}})}},{"./globals":36,"datalib/src/stats":11}],34:[function(e,t,n){"use strict";var a=e("./consts"),r=a.shorthand,i=e("./field"),f=e("./util"),c=e("./schema/schema"),o=c.encTypes,s=t.exports={};s.countRetinal=function(e){var t=0;return e.color&&t++,e.size&&t++,e.shape&&t++,t},s.has=function(e,t){var n=e&&e[t];return n&&n.name},s.isAggregate=function(e){for(var t in e)if(s.has(e,t)&&e[t].aggregate)return!0;return!1},s.forEach=function(e,t){var n=0;o.forEach(function(a){s.has(e,a)&&t(e[a],a,n++)})},s.map=function(e,t){var n=[];return o.forEach(function(a){s.has(e,a)&&n.push(t(e[a],a,e))}),n},s.reduce=function(e,t,n){var a=n;return o.forEach(function(n){s.has(e,n)&&(a=t(a,e[n],n,e))}),a},s.fields=function(e){return s.reduce(e,function(e,t){var n=e[t.name]=e[t.name]||[],a=n.containsType=n.containsType||{};return-1===n.indexOf(t)&&(n.push(t),a[t.type]=!0),e},{})},s.shorthand=function(e){return s.map(e,function(e,t){return t+r.assign+i.shorthand(e)}).join(r.delim)},s.fromShorthand=function(e){var t=f.isArray(e)?e:e.split(r.delim);return t.reduce(function(e,t){var n=t.split(r.assign),a=n[0].trim(),f=n[1];return e[a]=i.fromShorthand(f),e},{})}},{"./consts":32,"./field":35,"./schema/schema":37,"./util":39}],35:[function(e,t,n){"use strict";function a(e){return d(e,[N,O])||!!e.bin||u(e,T)&&!!e.timeUnit}e("./globals");var r=e("./consts"),i=r.shorthand,f=e("./compiler/time"),c=e("./util"),o=e("./schema/schema"),s=t.exports={};s.fieldRef=function(e,t){t=t||{};var n=(t.data?"data.":"")+(t.prefn||""),a=t.nofn||t.fn,r=e.name;return s.isCount(e)?n+"count":!a&&e.bin?n+"bin_"+r:!a&&e.aggregate?n+e.aggregate+"_"+r:!a&&e.timeUnit?n+e.timeUnit+"_"+r:t.fn?n+t.fn+"_"+r:n+r},s.shorthand=function(e){var t=r.shorthand;return(e.aggregate?e.aggregate+t.func:"")+(e.timeUnit?e.timeUnit+t.func:"")+(e.bin?"bin"+t.func:"")+(e.name||"")+t.type+e.type},s.shorthands=function(e,t){return t=t||i.delim,e.map(s.shorthand).join(t)},s.fromShorthand=function(e){var t,n=e.split(i.type),a={name:n[0].trim(),type:n[1].trim()};for(t in o.aggregate["enum"]){var r=o.aggregate["enum"][t];if(0===a.name.indexOf(r+"_")){a.name=a.name.substr(r.length+1),"count"==r&&0===a.name.length&&(a.name="*"),a.aggregate=r;break}}for(t in o.timefns){var f=o.timefns[t];if(a.name&&0===a.name.indexOf(f+"_")){a.name=a.name.substr(a.length+1),a.timeUnit=f;break}}return a.name&&0===a.name.indexOf("bin_")&&(a.name=a.name.substr(4),a.bin=!0),a};var u=s.isType=function(e,t){return e.type===t},d=s.isTypes=function(e,t){for(var n=0;n0&&n[r]?1:0)}},{"./compiler/time":31,"./consts":32,"./globals":36,"./schema/schema":37,"./util":39}],36:[function(e,t,n){(function(e){"use strict";var t=e||window;t.TABLE="table",t.RAW="raw",t.STACKED="stacked",t.INDEX="index",t.X="x",t.Y="y",t.ROW="row",t.COL="col",t.SIZE="size",t.SHAPE="shape",t.COLOR="color",t.TEXT="text",t.DETAIL="detail",t.N="N",t.O="O",t.Q="Q",t.T="T"}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,n){"use strict";e("../globals");var a=t.exports={},r=e("../util"),i=r.toMap,f=e("colorbrewer");a.util=e("./schemautil"),a.marktype={type:"string","enum":["point","tick","bar","line","area","circle","square","text"]},a.aggregate={type:"string","enum":["avg","sum","median","min","max","count"],supportedEnums:{Q:["avg","median","sum","min","max","count"],O:["median","min","max"],N:[],T:["avg","median","min","max"],"":["count"]},supportedTypes:i([Q,N,O,T,""])},a.getSupportedRole=function(e){return a.schema.properties.encoding.properties[e].supportedRole},a.timeUnits=["year","month","day","date","hours","minutes","seconds"],a.defaultTimeFn="month",a.timeUnit={type:"string","enum":a.timeUnits,supportedTypes:i([T])},a.scale_type={type:"string","enum":["linear","log","pow","sqrt","quantile"],"default":"linear",supportedTypes:i([Q])},a.field={type:"object",properties:{name:{type:"string"}}};var c=r.duplicate,o=a.util.merge;a.MAXBINS_DEFAULT=15;var s={type:["boolean","object"],"default":!1,properties:{maxbins:{type:"integer","default":a.MAXBINS_DEFAULT,minimum:2,description:"Maximum number of bins."}},supportedTypes:i([Q])},u=o(c(a.field),{type:"object",properties:{type:{type:"string","enum":[N,O,Q,T]},aggregate:a.aggregate,timeUnit:a.timeUnit,bin:s,scale:{type:"object",properties:{type:a.scale_type,reverse:{type:"boolean","default":!1,supportedTypes:i([Q,T])},zero:{type:"boolean",description:"Include zero","default":!0,supportedTypes:i([Q,T])},nice:{type:"string","enum":["second","minute","hour","day","week","month","year"],supportedTypes:i([T])},useRawDomain:{type:"boolean","default":void 0,description:"Use the raw data range as scale domain instead of aggregated data for aggregate axis. This option does not work with sum or count aggregateas they might have a substantially larger scale range.By default, use value from config.useRawDomain."}}}}}),d=o(c(a.field),{type:"object",supportedRole:{dimension:!0},properties:{type:{type:"string","enum":[N,O,Q,T]},timeUnit:a.timeUnit,bin:s,aggregate:{type:"string","enum":["count"],supportedTypes:i([N,O])}}}),l={type:"object",supportedMarktypes:{point:!0,tick:!0,bar:!0,line:!0,area:!0,circle:!0,square:!0},properties:{axis:{type:"object",properties:{grid:{type:"boolean","default":!0,description:"A flag indicate if gridlines should be created in addition to ticks."},layer:{type:"string","default":"back",description:"A string indicating if the axis (and any gridlines) should be placed above or below the data marks."},orient:{type:"string","default":void 0,"enum":["top","right","left","bottom"],description:"The orientation of the axis. One of top, bottom, left or right. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart)."},ticks:{type:"integer","default":5,description:'A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the underlying scale\'s range.'},title:{type:"string","default":void 0,description:"A title for the axis. (Shows field name and its function by default.)"},titleMaxLength:{type:"integer","default":void 0,description:"Max length for axis title if the title is automatically generated from the field's description"},titleOffset:{type:"integer","default":void 0,description:"A title offset value for the axis."},format:{type:"string","default":void 0,description:"The formatting pattern for axis labels. If not undefined, this will be determined by small/largeNumberFormat and the max value of the field."},maxLabelLength:{type:"integer","default":25,minimum:0,description:"Truncate labels that are too long."}}}}},b={type:"object",properties:{sort:{type:"array","default":[],items:{type:"object",supportedTypes:i([N,O]),required:["name","aggregate"],properties:{name:{type:"string"},aggregate:{type:"string","enum":["avg","sum","min","max","count"]},reverse:{type:"boolean","default":!1}}}}}},h={type:"object",properties:{band:{type:"object",properties:{size:{type:"integer",minimum:0,"default":void 0},padding:{type:"integer",minimum:0,"default":1}}}}},g={type:"object",properties:{legend:{type:"boolean","default":!0}}},p={type:"object",supportedMarktypes:{text:!0},properties:{align:{type:"string","default":"right"},baseline:{type:"string","default":"middle"},color:{type:"string",role:"color","default":"#000000"},margin:{type:"integer","default":4,minimum:0},placeholder:{type:"string","default":"Abc"},font:{type:"object",properties:{weight:{type:"string","enum":["normal","bold"],"default":"normal"},size:{type:"integer","default":10,minimum:0},family:{type:"string","default":"Helvetica Neue"},style:{type:"string","default":"normal","enum":["normal","italic"]}}},format:{type:"string","default":void 0,description:"The formatting pattern for text value. If not undefined, this will be determined by small/largeNumberFormat and the max value of the field."}}},m={type:"object",supportedMarktypes:{point:!0,bar:!0,circle:!0,square:!0,text:!0},properties:{value:{type:"integer","default":30,minimum:0}}},y={type:"object",supportedMarktypes:{point:!0,tick:!0,bar:!0,line:!0,area:!0,circle:!0,square:!0,text:!0},properties:{value:{type:"string",role:"color","default":"steelblue"},opacity:{type:"number","default":void 0,minimum:0,maximum:1},scale:{type:"object",properties:{range:{type:["string","array"],"default":void 0,description:"color palette, if undefined vega-lite will use data propertyto pick one from c10palette, c20palette, or ordinalPalette"},c10palette:{type:"string","default":"category10","enum":["category10","category10k","Pastel1","Pastel2","Set1","Set2","Set3"]},c20palette:{type:"string","default":"category20","enum":["category20","category20b","category20c"]},ordinalPalette:{type:"string","default":void 0,"enum":r.keys(f)},quantitativeRange:{type:"array","default":["#AFC6A3","#09622A"],items:{type:"string",role:"color"}}}}}},v={type:"object",supportedMarktypes:{point:!0,circle:!0,square:!0},properties:{value:{type:"string","enum":["circle","square","cross","diamond","triangle-up","triangle-down"],"default":"circle"},filled:{type:"boolean","default":!1,description:"whether the shape's color should be used as fill color instead of stroke color"}}},x={type:"object",supportedMarktypes:{point:!0,tick:!0,line:!0,circle:!0,square:!0}},w={properties:{height:{type:"number",minimum:0,"default":150}}},M={properties:{width:{type:"number",minimum:0,"default":150},axis:{properties:{maxLabelLength:{type:"integer","default":12,minimum:0,description:"Truncate labels that are too long."}}}}},S={type:"object",supportedMarktypes:{point:!0,tick:!0,bar:!0,line:!0,area:!0,circle:!0,square:!0,text:!0},properties:{padding:{type:"number",minimum:0,maximum:1,"default":.1}}},k={required:["name","type"]},C=o(c(u),{supportedRole:{measure:!0,dimension:!0}}),R=o(c(u),{supportedRole:{measure:!0,dimension:"ordinal-only"}}),D=o(c(u),{supportedRole:{measure:!0}}),L=o(c(C),l,h,k,b),Y=c(L),E=o(c(d),k,S,b),U=o(c(E),l,w),X=o(c(E),l,M),A=o(c(R),g,m,b),_=o(c(C),g,y,b),F=o(c(d),g,v,b),$=o(c(d),x,b),W=o(c(D),p,b),z={type:"array",items:{type:"object",properties:{operands:{type:"array",items:{type:["string","boolean","integer","number"]}},operator:{type:"string","enum":[">",">=","=","!=","<","<=","notNull"]}}}},H={type:"object",properties:{formatType:{type:"string","enum":["json","csv"],"default":"json"},url:{type:"string","default":void 0},values:{type:"array","default":void 0,description:"Pass array of objects instead of a url to a file.",items:{type:"object",additionalProperties:!0}}}},j={type:"object",properties:{width:{type:"integer","default":void 0},height:{type:"integer","default":void 0},viewport:{type:"array",items:{type:"integer"},"default":void 0},gridColor:{type:"string",role:"color","default":"black"},gridOpacity:{type:"number",minimum:0,maximum:1,"default":.08},filterNull:{type:"object",properties:{O:{type:"boolean","default":!1},Q:{type:"boolean","default":!0},T:{type:"boolean","default":!0}}},toggleSort:{type:"string","default":O},singleHeight:{type:"integer","default":200,minimum:0},singleWidth:{type:"integer","default":200,minimum:0},largeBandSize:{type:"integer","default":21,minimum:0},smallBandSize:{type:"integer","default":12,minimum:0},largeBandMaxCardinality:{type:"integer","default":10},cellPadding:{type:"number","default":.1},cellGridColor:{type:"string",role:"color","default":"black"},cellGridOpacity:{type:"number",minimum:0,maximum:1,"default":.15},cellBackgroundColor:{type:"string",role:"color","default":"transparent"},textCellWidth:{type:"integer","default":90,minimum:0},strokeWidth:{type:"integer","default":2,minimum:0},singleBarOffset:{type:"integer","default":5,minimum:0},timeScaleLabelLength:{type:"integer","default":3,minimum:0,description:"Max length for values in dayScaleLabel and monthScaleLabel. Zero means using full names in dayScaleLabel/monthScaleLabel."},dayScaleLabel:{type:"array",items:{type:"string"},"default":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],description:"Axis labels for day of week, starting from Sunday.(Consistent with Javascript -- See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay."},monthScaleLabel:{type:"array",items:{type:"string"},"default":["January","February","March","April","May","June","July","August","September","October","November","December"],description:"Axis labels for month."},characterWidth:{type:"integer","default":6},maxSmallNumber:{type:"number","default":1e4,description:"maximum number that a field will be considered smallNumber.Used for axis labelling."},smallNumberFormat:{type:"string","default":"",description:"D3 Number format for axis labels and text tables for number <= maxSmallNumber. Used for axis labelling."},largeNumberFormat:{type:"string","default":".3s",description:"D3 Number format for axis labels and text tables for number > maxSmallNumber."},timeFormat:{type:"string","default":"%Y-%m-%d",description:"Date format for axis labels."},useRawDomain:{type:"boolean","default":!1,description:"Use the raw data range as scale domain instead of aggregated data for aggregate axis. This option does not work with sum or count aggregateas they might have a substantially larger scale range.By default, use value from config.useRawDomain."}}};a.schema={$schema:"http://json-schema.org/draft-04/schema#",description:"Schema for Vega-lite specification",type:"object",required:["marktype","encoding","data"],properties:{data:H,marktype:a.marktype,encoding:{type:"object",properties:{x:L,y:Y,row:U,col:X,size:A,color:_,shape:F,text:W,detail:$}},filter:z,config:j}},a.encTypes=r.keys(a.schema.properties.encoding.properties),a.instantiate=function(){return a.util.instantiate(a.schema)}},{"../globals":36,"../util":39,"./schemautil":38,colorbrewer:3}],38:[function(e,t,n){"use strict";function a(e,t){if("object"!=typeof t||null===t)return e;for(var n in t)t.hasOwnProperty(n)&&void 0!==t[n]&&("object"!=typeof t[n]||null===t[n]?e[n]=t[n]:"object"!=typeof e[n]||null===e[n]?e[n]=a(t[n].constructor===Array?[]:{},t[n]):a(e[n],t[n]));return e}var r=t.exports={},i=e("../util"),f=function(e){return 0===Object.keys(e).length};r.extend=function(e,t){return r.merge(r.instantiate(t),e)},r.instantiate=function(e){var t;if(void 0===e)return void 0;if("default"in e)return t=e["default"],i.isObject(t)?i.duplicate(t):t;if("object"===e.type){var n={};for(var a in e.properties)t=r.instantiate(e.properties[a]),void 0!==t&&(n[a]=t);return n}return"array"===e.type?[]:void 0},r.subtract=function(e,t){var n={};for(var a in e){var c=t[a],o=e[a];if(!t||c!==o)if("object"==typeof o&&!i.isArray(o)&&c){var s=r.subtract(o,c);f(s)||(n[a]=s)}else(!i.isArray(o)||o.length>0)&&(n[a]=o)}return n},r.merge=function(){for(var e=arguments[0],t=1;t0&&n[r]?1:0)}},{"./compiler/time":28,"./consts":29,"./globals":33,"./schema/schema":35,"./util":37}],33:[function(e,t,n){(function(e){"use strict";var t=e||window;t.AGGREGATE="aggregate",t.RAW="raw",t.STACKED="stacked",t.INDEX="index",t.X="x",t.Y="y",t.ROW="row",t.COL="col",t.SIZE="size",t.SHAPE="shape",t.COLOR="color",t.TEXT="text",t.DETAIL="detail",t.N="N",t.O="O",t.Q="Q",t.T="T"}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],34:[function(e,t,n){"use strict";t.exports=function(e){var t=["error","info","debug","warn","log"];return t.reduce(function(t,n){var a=console[n]?n:"log";return t[n]="undefined"===console[a].bind?Function.prototype.bind.call(console[a],console,e):console[a].bind(console,e),t},{})}},{}],35:[function(e,t,n){"use strict";e("../globals");var a=t.exports={},r=e("../util"),i=r.toMap,f=e("colorbrewer");a.util=e("./schemautil"),a.marktype={type:"string","enum":["point","tick","bar","line","area","circle","square","text"]},a.aggregate={type:"string","enum":["avg","sum","median","min","max","count"],supportedEnums:{Q:["avg","median","sum","min","max","count"],O:["median","min","max"],N:[],T:["avg","median","min","max"],"":["count"]},supportedTypes:i([Q,N,O,T,""])},a.getSupportedRole=function(e){return a.schema.properties.encoding.properties[e].supportedRole},a.timeUnits=["year","month","day","date","hours","minutes","seconds"],a.defaultTimeFn="month",a.timeUnit={type:"string","enum":a.timeUnits,supportedTypes:i([T])},a.scale_type={type:"string","enum":["linear","log","pow","sqrt","quantile"],"default":"linear",supportedTypes:i([Q])},a.field={type:"object",properties:{name:{type:"string"}}};var c=r.duplicate,o=a.util.merge;a.MAXBINS_DEFAULT=15;var u={type:["boolean","object"],"default":!1,properties:{maxbins:{type:"integer","default":a.MAXBINS_DEFAULT,minimum:2,description:"Maximum number of bins."}},supportedTypes:i([Q])},s=o(c(a.field),{type:"object",properties:{type:{type:"string","enum":[N,O,Q,T]},aggregate:a.aggregate,timeUnit:a.timeUnit,bin:u,scale:{type:"object",properties:{type:a.scale_type,reverse:{type:"boolean","default":!1,supportedTypes:i([Q,T])},zero:{type:"boolean",description:"Include zero","default":!0,supportedTypes:i([Q,T])},nice:{type:"string","enum":["second","minute","hour","day","week","month","year"],supportedTypes:i([T])},useRawDomain:{type:"boolean","default":void 0,description:"Use the raw data range as scale domain instead of aggregated data for aggregate axis. This option does not work with sum or count aggregateas they might have a substantially larger scale range.By default, use value from config.useRawDomain."}}}}}),d=o(c(a.field),{type:"object",supportedRole:{dimension:!0},properties:{type:{type:"string","enum":[N,O,Q,T]},timeUnit:a.timeUnit,bin:u,aggregate:{type:"string","enum":["count"],supportedTypes:i([N,O])}}}),l={type:"object",supportedMarktypes:{point:!0,tick:!0,bar:!0,line:!0,area:!0,circle:!0,square:!0},properties:{axis:{type:"object",properties:{grid:{type:"boolean","default":!0,description:"A flag indicate if gridlines should be created in addition to ticks."},layer:{type:"string","default":"back",description:"A string indicating if the axis (and any gridlines) should be placed above or below the data marks."},orient:{type:"string","default":void 0,"enum":["top","right","left","bottom"],description:"The orientation of the axis. One of top, bottom, left or right. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart)."},ticks:{type:"integer","default":5,description:'A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the underlying scale\'s range.'},title:{type:"string","default":void 0,description:"A title for the axis. (Shows field name and its function by default.)"},titleMaxLength:{type:"integer","default":void 0,description:"Max length for axis title if the title is automatically generated from the field's description"},titleOffset:{type:"integer","default":void 0,description:"A title offset value for the axis."},format:{type:"string","default":void 0,description:"The formatting pattern for axis labels. If not undefined, this will be determined by small/largeNumberFormat and the max value of the field."},maxLabelLength:{type:"integer","default":25,minimum:0,description:"Truncate labels that are too long."},labelAngle:{type:"integer","default":void 0,description:"Angle by which to rotate labels. Set to 0 to force horizontal."}}}}},b={type:"object",properties:{sort:{type:"array","default":[],items:{type:"object",supportedTypes:i([N,O]),required:["name","aggregate"],properties:{name:{type:"string"},aggregate:{type:"string","enum":["avg","sum","min","max","count"]},reverse:{type:"boolean","default":!1}}}}}},h={type:"object",properties:{band:{type:"object",properties:{size:{type:"integer",minimum:0,"default":void 0},padding:{type:"integer",minimum:0,"default":1}}}}},g={type:"object",properties:{legend:{type:"object",properties:{title:{type:"string","default":void 0,description:"A title for the legend. (Shows field name and its function by default.)"}}}}},p={type:"object",supportedMarktypes:{text:!0},properties:{align:{type:"string","default":"right"},baseline:{type:"string","default":"middle"},color:{type:"string",role:"color","default":"#000000"},margin:{type:"integer","default":4,minimum:0},placeholder:{type:"string","default":"Abc"},font:{type:"object",properties:{weight:{type:"string","enum":["normal","bold"],"default":"normal"},size:{type:"integer","default":10,minimum:0},family:{type:"string","default":"Helvetica Neue"},style:{type:"string","default":"normal","enum":["normal","italic"]}}},format:{type:"string","default":void 0,description:"The formatting pattern for text value. If not undefined, this will be determined by small/largeNumberFormat and the max value of the field."}}},m={type:"object",supportedMarktypes:{point:!0,bar:!0,circle:!0,square:!0,text:!0},properties:{value:{type:"integer","default":30,minimum:0}}},y={type:"object",supportedMarktypes:{point:!0,tick:!0,bar:!0,line:!0,area:!0,circle:!0,square:!0,text:!0},properties:{value:{type:"string",role:"color","default":"steelblue"},opacity:{type:"number","default":void 0,minimum:0,maximum:1},scale:{type:"object",properties:{range:{type:["string","array"],"default":void 0,description:"color palette, if undefined vega-lite will use data propertyto pick one from c10palette, c20palette, or ordinalPalette"},c10palette:{type:"string","default":"category10","enum":["category10","category10k","Pastel1","Pastel2","Set1","Set2","Set3"]},c20palette:{type:"string","default":"category20","enum":["category20","category20b","category20c"]},ordinalPalette:{type:"string","default":void 0,"enum":r.keys(f)},quantitativeRange:{type:"array","default":["#AFC6A3","#09622A"],items:{type:"string",role:"color"}}}}}},v={type:"object",supportedMarktypes:{point:!0,circle:!0,square:!0},properties:{value:{type:"string","enum":["circle","square","cross","diamond","triangle-up","triangle-down"],"default":"circle"},filled:{type:"boolean","default":!1,description:"whether the shape's color should be used as fill color instead of stroke color"}}},x={type:"object",supportedMarktypes:{point:!0,tick:!0,line:!0,circle:!0,square:!0}},w={properties:{height:{type:"number",minimum:0,"default":150}}},M={properties:{width:{type:"number",minimum:0,"default":150},axis:{properties:{maxLabelLength:{type:"integer","default":12,minimum:0,description:"Truncate labels that are too long."}}}}},S={type:"object",supportedMarktypes:{point:!0,tick:!0,bar:!0,line:!0,area:!0,circle:!0,square:!0,text:!0},properties:{padding:{type:"number",minimum:0,maximum:1,"default":.1}}},k={required:["name","type"]},C=o(c(s),{supportedRole:{measure:!0,dimension:!0}}),R=o(c(s),{supportedRole:{measure:!0,dimension:"ordinal-only"}}),D=o(c(s),{supportedRole:{measure:!0}}),L=o(c(C),l,h,k,b),Y=c(L),U=o(c(d),k,S,b),E=o(c(U),l,w),A=o(c(U),l,M),X=o(c(R),g,m,b),_=o(c(C),g,y,b),F=o(c(d),g,v,b),$=o(c(d),x,b),W=o(c(D),p,b),z={type:"array",items:{type:"object",properties:{operands:{type:"array",items:{type:["string","boolean","integer","number"]}},operator:{type:"string","enum":[">",">=","=","!=","<","<=","notNull"]}}}},j={type:"object",properties:{formatType:{type:"string","enum":["json","csv"],"default":"json"},url:{type:"string","default":void 0},values:{type:"array","default":void 0,description:"Pass array of objects instead of a url to a file.",items:{type:"object",additionalProperties:!0}}}},H={type:"object",properties:{width:{type:"integer","default":void 0},height:{type:"integer","default":void 0},viewport:{type:"array",items:{type:"integer"},"default":void 0},gridColor:{type:"string",role:"color","default":"black"},gridOpacity:{type:"number",minimum:0,maximum:1,"default":.08},filterNull:{type:"object",properties:{O:{type:"boolean","default":!1},Q:{type:"boolean","default":!0},T:{type:"boolean","default":!0}}},toggleSort:{type:"string","default":O},singleHeight:{type:"integer","default":200,minimum:0},singleWidth:{type:"integer","default":200,minimum:0},largeBandSize:{type:"integer","default":21,minimum:0},smallBandSize:{type:"integer","default":12,minimum:0},largeBandMaxCardinality:{type:"integer","default":10},cellPadding:{type:"number","default":.1},cellGridColor:{type:"string",role:"color","default":"black"},cellGridOpacity:{type:"number",minimum:0,maximum:1,"default":.15},cellBackgroundColor:{type:"string",role:"color","default":"transparent"},textCellWidth:{type:"integer","default":90,minimum:0},strokeWidth:{type:"integer","default":2,minimum:0},singleBarOffset:{type:"integer","default":5,minimum:0},timeScaleLabelLength:{type:"integer","default":3,minimum:0,description:"Max length for values in dayScaleLabel and monthScaleLabel. Zero means using full names in dayScaleLabel/monthScaleLabel."},dayScaleLabel:{type:"array",items:{type:"string"},"default":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],description:"Axis labels for day of week, starting from Sunday.(Consistent with Javascript -- See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay."},monthScaleLabel:{type:"array",items:{type:"string"},"default":["January","February","March","April","May","June","July","August","September","October","November","December"],description:"Axis labels for month."},characterWidth:{type:"integer","default":6},maxSmallNumber:{type:"number","default":1e4,description:"maximum number that a field will be considered smallNumber.Used for axis labelling."},smallNumberFormat:{type:"string","default":"",description:"D3 Number format for axis labels and text tables for number <= maxSmallNumber. Used for axis labelling."},largeNumberFormat:{type:"string","default":".3s",description:"D3 Number format for axis labels and text tables for number > maxSmallNumber."},timeFormat:{type:"string","default":"%Y-%m-%d",description:"Date format for axis labels."},useRawDomain:{type:"boolean","default":!1,description:"Use the raw data range as scale domain instead of aggregated data for aggregate axis. This option does not work with sum or count aggregateas they might have a substantially larger scale range.By default, use value from config.useRawDomain."}}};a.schema={$schema:"http://json-schema.org/draft-04/schema#",description:"Schema for Vega-lite specification",type:"object",required:["marktype","encoding","data"],properties:{data:j,marktype:a.marktype,encoding:{type:"object",properties:{x:L,y:Y,row:E,col:A,size:X,color:_,shape:F,text:W,detail:$}},filter:z,config:H}},a.encTypes=r.keys(a.schema.properties.encoding.properties),a.instantiate=function(){return a.util.instantiate(a.schema)}},{"../globals":33,"../util":37,"./schemautil":36,colorbrewer:3}],36:[function(e,t,n){"use strict";function a(e,t){if("object"!=typeof t||null===t)return e;for(var n in t)t.hasOwnProperty(n)&&void 0!==t[n]&&("object"!=typeof t[n]||null===t[n]?e[n]=t[n]:"object"!=typeof e[n]||null===e[n]?e[n]=a(t[n].constructor===Array?[]:{},t[n]):a(e[n],t[n]));return e}var r=t.exports={},i=e("../util"),f=function(e){return 0===Object.keys(e).length};r.extend=function(e,t){return r.merge(r.instantiate(t),e)},r.instantiate=function(e){var t;if(void 0===e)return void 0;if("default"in e)return t=e["default"],i.isObject(t)?i.duplicate(t):t;if("object"===e.type){var n={};for(var a in e.properties)t=r.instantiate(e.properties[a]),void 0!==t&&(n[a]=t);return n}return"array"===e.type?[]:void 0},r.subtract=function(e,t){var n={};for(var a in e){var c=t[a],o=e[a];if(!t||c!==o)if("object"==typeof o&&!i.isArray(o)&&c){var u=r.subtract(o,c);f(u)||(n[a]=u)}else(!i.isArray(o)||o.length>0)&&(n[a]=o)}return n},r.merge=function(){for(var e=arguments[0],t=1;t",">=","=","!=","<","<=","filters","condition","op1","op2","console","warn",21,"_name",22,"vllayout","box","hasX","hasY","xCardinality","yCardinality","TEXT","colCardinality","rowCardinality","getMaxNumberLength","d3_format","getMaxLength","extraOffset","d3-format",23,"COLOR","SIZE","SHAPE","shape","symbols","filled","strokeWidth",24,"bar_props","xc","y2","yc","point_props","line_props","area_props","tick_props","filled_point_props","text_props","fontSize","font","text","placeholder","family","fontWeight","weight","fontStyle","TABLE","prop","bar","supportedEncoding","requiredEncoding","area","tick","circle","square","point",25,"interpolate","props","domain","fieldStat","getbins","numbins","STACKED","prefn","scaleUseRawDomain","useRawDomain","notCountOrSum","isOrdinalFn","RAW","getDataset","bandWidth","nice","outerPadding","points","colorScale","ordinalPalette","quantitativeRange","c10palette","c20palette","palette","ps","to","interpolator","../schema/schema","d3-color",26,"addSortTransforms","datasetMapping","counter","byClause","dataName","transforms","source","../field",27,"stacking","dim","isXMeasure","isYMeasure","stacked","y1","y0",28,"estimateOpacity","numPoints","numMultiples",29,"subfaceting",30,"table","dataUrl","dataType","url",31,"timeFields","timeUnits","tf","fieldFn","func","d3_time_format","LONG_DATE","stat","yearstat","formula","expr","scaleLabel","labelLength","substr","isColor","d3-time-format",32,"encodingTypes","DETAIL",33,"vldata","*",34,"encTypes","countRetinal","fieldDef","arr","enctype",35,"shorthands","timefns","tu","./compiler/time",36,"INDEX",37,"enum","supportedEnums","supportedTypes","getSupportedRole","supportedRole","defaultTimeFn","scale_type","default","clone","minimum","description","typicalField","onlyOrdinalField","dimension","axisMixin","supportedMarktypes","sortMixin","items","required","bandMixin","legendMixin","textMixin","role","margin","sizeMixin","colorMixin","maximum","shapeMixin","detailMixin","rowMixin","colMixin","facetMixin","requiredNameType","multiRoleField","measure","quantitativeField","onlyQuantitativeField","additionalProperties","viewport","gridColor","gridOpacity","singleHeight","singleWidth","largeBandSize","smallBandSize","largeBandMaxCardinality","cellGridColor","cellGridOpacity","cellBackgroundColor","textCellWidth","singleBarOffset","timeScaleLabelLength","dayScaleLabel","monthScaleLabel","characterWidth","maxSmallNumber","smallNumberFormat","largeNumberFormat","$schema","./schemautil",38,"dest","src","hasOwnProperty","constructor","schemautil","isEmpty","instance","changes","ins",39,"isin","item","thisArg","any","noaugment","msg","datalib/src/bins/bins","datalib/src/generate","datalib/src/util",40,"./Encoding","./compiler/compiler","./data"],"mappings":"CAAA,SAAAA,GAAA,GAAA,gBAAAC,UAAA,mBAAAC,QAAAA,OAAAD,QAAAD,QAAA,IAAA,kBAAAG,SAAAA,OAAAC,IAAAD,UAAAH,OAAA,CAAA,GAAAK,EAAAA,GAAA,mBAAAC,QAAAA,OAAA,mBAAAC,QAAAA,OAAA,mBAAAC,MAAAA,KAAAC,KAAAJ,EAAAK,GAAAV,MAAA,WAAA,GAAAG,EAAA,OAAA,SAAAQ,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAhB,GAAA,GAAAqB,OAAA,uBA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A,GAAA7mC,GAAA,EAAAA,EAAA4K,EAAAvK,SAAAL,EAIAmF,EAHA0hC,GAAAj8B,EAAA5K,IAAAmF,GAGAA,EAAAyF,EAAA5K,IAFAmF,EAAAyF,EAAA5K,MAKA,OAAAmF,IAGAma,EAAAqY,MAAA,SAAAmP,GACAnO,QAAAhB,MAAA,aAAAmP,MtCylOGC,wBAAwB,EAAEC,uBAAuB,EAAE/P,oBAAoB,GAAGgQ,mBAAmB,KAAKC,IAAI,SAASnnC,EAAQjB,EAAOD,GuC/rOjI,YAEAkB,GAAA,YAEA,IAAAuf,GAAAvf,EAAA,UACAqrB,EAAArrB,EAAA,YAEAT,IAEAggB,GAAA6I,OAAA7oB,EAAA8rB,EAAA9L,GAEAhgB,EAAAksB,SAAAzrB,EAAA,cACAT,EAAA80B,SAAAr0B,EAAA,uBACAT,EAAAs1B,QAAAt1B,EAAA80B,SAAAQ,QACAt1B,EAAA+hB,KAAAthB,EAAA,UACAT,EAAAqtB,IAAA5sB,EAAA,SACAT,EAAA2mB,MAAAlmB,EAAA,WACAT,EAAAisB,OAAAxrB,EAAA,mBACAT,EAAAutB,YAAAvtB,EAAAksB,SAAAgB,UACAltB,EAAAiF,OAAAxE,EAAA,aAAAwE,OAEAzF,EAAAD,QAAAS,IvCisOG6nC,aAAa,GAAGC,sBAAsB,GAAGxW,WAAW,GAAGyW,SAAS,GAAGxW,QAAQ,GAAGC,UAAU,GAAGC,YAAY,GAAGC,kBAAkB,GAAG3K,SAAS,GAAGwT,YAAY,SAAS,KAAK","file":"vega-lite.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o> 16 & 0xff, n >> 8 & 0xff, n & 0xff);\n }\n\n function Hsl(h, s, l) {\n this.h = +h;\n this.s = Math.max(0, Math.min(1, +s));\n this.l = Math.max(0, Math.min(1, +l));\n }\n\n var __prototype = Hsl.prototype = new Color;\n\n __prototype.brighter = function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k);\n };\n\n __prototype.darker = function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k);\n };/* From FvD 13.37, CSS Color Module Level 3 */\n\n function hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n }\n\n __prototype.rgb = function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l <= .5 ? l * (1 + s) : l + s - l * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2)\n );\n };\n\n var hsl = function(h, s, l) {\n if (arguments.length === 1) {\n if (h instanceof Hsl) {\n l = h.l;\n s = h.s;\n h = h.h;\n } else {\n if (!(h instanceof Color)) h = color(h);\n if (h) {\n if (h instanceof Hsl) return h;\n h = h.rgb();\n var r = h.r / 255,\n g = h.g / 255,\n b = h.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n range = max - min;\n l = (max + min) / 2;\n if (range) {\n s = l < .5 ? range / (max + min) : range / (2 - max - min);\n if (r === max) h = (g - b) / range + (g < b) * 6;\n else if (g === max) h = (b - r) / range + 2;\n else h = (r - g) / range + 4;\n h *= 60;\n } else {\n h = NaN;\n s = l > 0 && l < 1 ? 0 : h;\n }\n } else {\n h = s = l = NaN;\n }\n }\n }\n return new Hsl(h, s, l);\n }\n\n var reHex3 = /^#([0-9a-f]{3})$/,\n reHex6 = /^#([0-9a-f]{6})$/,\n reRgbInteger = /^rgb\\(\\s*([-+]?\\d+)\\s*,\\s*([-+]?\\d+)\\s*,\\s*([-+]?\\d+)\\s*\\)$/,\n reRgbPercent = /^rgb\\(\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*\\)$/,\n reHslPercent = /^hsl\\(\\s*([-+]?\\d+(?:\\.\\d+)?)\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*\\)$/;\n\n var color = function(format) {\n var m;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf))) // #f00\n : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000\n : (m = reRgbInteger.exec(format)) ? rgb(m[1], m[2], m[3]) // rgb(255,0,0)\n : (m = reRgbPercent.exec(format)) ? rgb(m[1] * 2.55, m[2] * 2.55, m[3] * 2.55) // rgb(100%,0%,0%)\n : (m = reHslPercent.exec(format)) ? hsl(m[1], m[2] * .01, m[3] * .01) // hsl(120,50%,50%)\n : named.has(format) ? rgbn(named.get(format))\n : null;\n }// Done lazily to avoid circular dependency between Color, Rgb and Hsl.\n\n color.prototype = Color.prototype;\n rgb.prototype = Rgb.prototype;\n hsl.prototype = Hsl.prototype;\n\n function Lab(l, a, b) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n }\n\n var ___prototype = Lab.prototype = new Color;\n\n var Kn = 18;\n\n ___prototype.brighter = function(k) {\n return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b);\n };\n\n ___prototype.darker = function(k) {\n return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b);\n };\n\n function xyz2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n }\n\n var Xn = 0.950470, // D65 standard referent\n Yn = 1,\n Zn = 1.088830,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\n function lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n }\n\n ___prototype.rgb = function() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n y = Yn * lab2xyz(y);\n x = Xn * lab2xyz(x);\n z = Zn * lab2xyz(z);\n return new Rgb(\n xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z)\n );\n };\n\n function xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n }\n\n function rgb2xyz(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n }\n\n var deg2rad = Math.PI / 180;\n\n function Hcl(h, c, l) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n }\n\n var ____prototype = Hcl.prototype = new Color;\n\n ____prototype.brighter = function(k) {\n return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k));\n };\n\n ____prototype.darker = function(k) {\n return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k));\n };\n\n ____prototype.rgb = function() {\n return lab(this).rgb();\n };\n\n var lab = function(l, a, b) {\n if (arguments.length === 1) {\n if (l instanceof Lab) {\n b = l.b;\n a = l.a;\n l = l.l;\n } else if (l instanceof Hcl) {\n var h = l.h * deg2rad;\n b = Math.sin(h) * l.c;\n a = Math.cos(h) * l.c;\n l = l.l;\n } else {\n if (!(l instanceof Rgb)) l = rgb(l);\n var r = rgb2xyz(l.r),\n g = rgb2xyz(l.g),\n b = rgb2xyz(l.b),\n x = xyz2lab((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / Xn),\n y = xyz2lab((0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / Yn),\n z = xyz2lab((0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / Zn);\n b = 200 * (y - z);\n a = 500 * (x - y);\n l = 116 * y - 16;\n }\n }\n return new Lab(l, a, b);\n }\n lab.prototype = Lab.prototype;\n var rad2deg = 180 / Math.PI;\n\n var hcl = function(h, c, l) {\n if (arguments.length === 1) {\n if (h instanceof Hcl) {\n l = h.l;\n c = h.c;\n h = h.h;\n } else {\n if (!(h instanceof Lab)) h = lab(h);\n l = h.l;\n c = Math.sqrt(h.a * h.a + h.b * h.b);\n h = Math.atan2(h.b, h.a) * rad2deg;\n if (h < 0) h += 360;\n }\n }\n return new Hcl(h, c, l);\n }\n hcl.prototype = Hcl.prototype;\n\n function Cubehelix(h, s, l) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n }\n\n var prototype = Cubehelix.prototype = new Color;\n\n prototype.brighter = function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Cubehelix(this.h, this.s, this.l * k);\n };\n\n prototype.darker = function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Cubehelix(this.h, this.s, this.l * k);\n };\n\n var gamma = 1, // Default gamma. TODO Customize.\n A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\n var cubehelix = function(h, s, l) {\n if (arguments.length === 1) {\n if (h instanceof Cubehelix) {\n l = h.l;\n s = h.s;\n h = h.h;\n } else {\n if (!(h instanceof Rgb)) h = rgb(h);\n var r = h.r / 255, g = h.g / 255, b = h.b / 255;\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB);\n var bl = b - l, k = (E * (g - l) - C * bl) / D, lgamma = Math.pow(l, gamma);\n s = Math.sqrt(k * k + bl * bl) / (E * lgamma * (1 - lgamma)); // NaN if lgamma=0 or lgamma=1\n h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n if (h < 0) h += 360;\n }\n }\n return new Cubehelix(h, s, l);\n }\n\n prototype.rgb = function() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n l = Math.pow(this.l, gamma),\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new Rgb(\n 255 * (l + a * (A * cosh + B * sinh)),\n 255 * (l + a * (C * cosh + D * sinh)),\n 255 * (l + a * (E * cosh))\n );\n };\n cubehelix.prototype = Cubehelix.prototype;\n\n var interpolateCubehelixLong = function(a, b) {\n a = cubehelix(a);\n b = cubehelix(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : b.h - ah,\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n var deltaHue = function(h, h0) {\n var delta = (h - h0) % 360;\n return delta + (delta > 180 ? -360 : delta < -180 ? 360 : 0);\n }\n\n var interpolateCubehelix = function(a, b) {\n a = cubehelix(a);\n b = cubehelix(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : deltaHue(b.h, ah),\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateHclLong = function(a, b) {\n a = hcl(a);\n b = hcl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n ac = isNaN(a.c) ? b.c : a.c,\n al = a.l,\n bh = isNaN(b.h) ? 0 : b.h - ah,\n bc = isNaN(b.c) ? 0 : b.c - ac,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.c = ac + bc * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateHcl = function(a, b) {\n a = hcl(a);\n b = hcl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n ac = isNaN(a.c) ? b.c : a.c,\n al = a.l,\n bh = isNaN(b.h) ? 0 : deltaHue(b.h, ah),\n bc = isNaN(b.c) ? 0 : b.c - ac,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.c = ac + bc * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateLab = function(a, b) {\n a = lab(a);\n b = lab(b);\n var al = a.l,\n aa = a.a,\n ab = a.b,\n bl = b.l - al,\n ba = b.a - aa,\n bb = b.b - ab;\n return function(t) {\n a.l = al + bl * t;\n a.a = aa + ba * t;\n a.b = ab + bb * t;\n return a + \"\";\n };\n }\n\n var interpolateHslLong = function(a, b) {\n a = hsl(a);\n b = hsl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : b.h - ah,\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateHsl = function(a, b) {\n a = hsl(a);\n b = hsl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : deltaHue(b.h, ah),\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateRgb = function(a, b) {\n a = rgb(a);\n b = rgb(b);\n var ar = a.r,\n ag = a.g,\n ab = a.b,\n br = b.r - ar,\n bg = b.g - ag,\n bb = b.b - ab;\n return function(t) {\n return format(Math.round(ar + br * t), Math.round(ag + bg * t), Math.round(ab + bb * t));\n };\n }\n\n exports.color = color;\n exports.rgb = rgb;\n exports.hsl = hsl;\n exports.lab = lab;\n exports.hcl = hcl;\n exports.cubehelix = cubehelix;\n exports.interpolateRgb = interpolateRgb;\n exports.interpolateHsl = interpolateHsl;\n exports.interpolateHslLong = interpolateHslLong;\n exports.interpolateLab = interpolateLab;\n exports.interpolateHcl = interpolateHcl;\n exports.interpolateHclLong = interpolateHclLong;\n exports.interpolateCubehelix = interpolateCubehelix;\n exports.interpolateCubehelixLong = interpolateCubehelixLong;\n\n}));\n},{}],5:[function(require,module,exports){\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n factory((global.format = {}));\n}(this, function (exports) { 'use strict';\n\n var prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\n\n // Computes the decimal coefficient and exponent of the specified number x with\n // significant digits p, where x is positive and p is in [1, 21] or undefined.\n // For example, formatDecimal(1.23) returns [\"123\", 0].\n function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }\n\n function exponent(x) {\n return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;\n }\n\n var prefixExponent;\n\n function formatPrefixAuto(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimal(x, p + i - 1)[0]; // less than 1y!\n }\n\n function formatRounded(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n }\n\n function formatDefault(x, p) {\n x = x.toPrecision(p);\n\n out: for (var n = x.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (x[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n case \"e\": break out;\n default: if (i0 > 0) i0 = 0; break;\n }\n }\n\n return i0 > 0 ? x.slice(0, i0) + x.slice(i1 + 1) : x;\n }\n\n var formatTypes = {\n \"\": formatDefault,\n \"%\": function(x, p) { return (x * 100).toFixed(p); },\n \"b\": function(x) { return Math.round(x).toString(2); },\n \"c\": function(x) { return x + \"\"; },\n \"d\": function(x) { return Math.round(x).toString(10); },\n \"e\": function(x, p) { return x.toExponential(p); },\n \"f\": function(x, p) { return x.toFixed(p); },\n \"g\": function(x, p) { return x.toPrecision(p); },\n \"o\": function(x) { return Math.round(x).toString(8); },\n \"p\": function(x, p) { return formatRounded(x * 100, p); },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n \"x\": function(x) { return Math.round(x).toString(16); }\n };\n\n\n // [[fill]align][sign][symbol][0][width][,][.precision][type]\n var re = /^(?:(.)?([<>=^]))?([+\\-\\( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?([a-z%])?$/i;\n\n function FormatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n\n var match,\n fill = match[1] || \" \",\n align = match[2] || \">\",\n sign = match[3] || \"-\",\n symbol = match[4] || \"\",\n zero = !!match[5],\n width = match[6] && +match[6],\n comma = !!match[7],\n precision = match[8] && +match[8].slice(1),\n type = match[9] || \"\";\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // Map invalid types to the default format.\n else if (!formatTypes[type]) type = \"\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n this.fill = fill;\n this.align = align;\n this.sign = sign;\n this.symbol = symbol;\n this.zero = zero;\n this.width = width;\n this.comma = comma;\n this.precision = precision;\n this.type = type;\n }\n\n FormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width == null ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision == null ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + this.type;\n };\n\n function formatSpecifier(specifier) {\n return new FormatSpecifier(specifier);\n }\n\n function identity(x) {\n return x;\n }\n\n function formatGroup(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n }\n\n function localeFormat(locale) {\n var group = locale.grouping && locale.thousands ? formatGroup(locale.grouping, locale.thousands) : identity,\n currency = locale.currency,\n decimal = locale.decimal;\n\n function format(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n type = specifier.type;\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currency[0] : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currency[1] : /[%p]/.test(type) ? \"%\" : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = !type || /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision == null ? (type ? 6 : 12)\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n return function(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Convert negative to positive, and compute the prefix.\n // Note that -0 is not less than 0, but 1 / -0 is!\n var valueNegative = (value < 0 || 1 / value < 0) && (value *= -1, true);\n\n // Perform the initial formatting.\n value = formatType(value, precision);\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : \"-\") : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = valueSuffix + (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n var i = -1, n = value.length, c;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": return valuePrefix + value + valueSuffix + padding;\n case \"=\": return valuePrefix + padding + value + valueSuffix;\n case \"^\": return padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);\n }\n return padding + valuePrefix + value + valueSuffix;\n };\n }\n\n function formatPrefix(specifier, value) {\n var f = format((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: format,\n formatPrefix: formatPrefix\n };\n }\n\n var locale = localeFormat({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n });\n\n exports.format = locale.format;\n exports.formatPrefix = locale.formatPrefix;\n\n function precisionRound(step, max) {\n return Math.max(0, exponent(Math.abs(max)) - exponent(Math.abs(step))) + 1;\n }\n\n function precisionPrefix(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n }\n\n function precisionFixed(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n }\n\n exports.formatSpecifier = formatSpecifier;\n exports.localeFormat = localeFormat;\n exports.precisionFixed = precisionFixed;\n exports.precisionPrefix = precisionPrefix;\n exports.precisionRound = precisionRound;\n\n}));\n},{}],6:[function(require,module,exports){\nif (typeof Map === \"undefined\") {\n Map = function() { this.clear(); };\n Map.prototype = {\n set: function(k, v) { this._[k] = v; return this; },\n get: function(k) { return this._[k]; },\n has: function(k) { return k in this._; },\n delete: function(k) { return k in this._ && delete this._[k]; },\n clear: function() { this._ = Object.create(null); },\n get size() { var n = 0; for (var k in this._) ++n; return n; },\n forEach: function(c) { for (var k in this._) c(this._[k], k, this); }\n };\n} else (function() {\n var m = new Map;\n if (m.set(0, 0) !== m) {\n m = m.set;\n Map.prototype.set = function() { m.apply(this, arguments); return this; };\n }\n})();\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n factory((global.timeFormat = {}));\n}(this, function (exports) { 'use strict';\n\n function utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n }\n\n function localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n }\n\n var pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"};\n\n function newYear(y) {\n return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0};\n }\n\n var percentRe = /^%/;\n\n function parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n }\n\n function parseZone(d, string, i) {\n return /^[+-]\\d{4}$/.test(string = string.slice(i, i + 5))\n ? (d.Z = -string, i + 5) // sign differs from getTimezoneOffset!\n : -1;\n }\n\n var numberRe = /^\\s*\\d+/;\n\n function parseWeekdayNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n }\n\n function parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n }\n\n function parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n }\n\n function parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n }\n\n function parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n }\n\n function parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n }\n\n function parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n }\n\n function parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n }\n\n function parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n }\n\n function parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n }\n\n function formatLiteralPercent() {\n return \"%\";\n }\n\n function formatUTCZone() {\n return \"+0000\";\n }\n\n function pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n }\n\n function formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n }\n\n function formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n }\n\n var t1 = new Date;\n\n var t0 = new Date;\n\n function newInterval(floori, offseti, count) {\n\n function interval(date) {\n return floori(date = new Date(+date)), date;\n }\n\n interval.floor = interval;\n\n interval.round = function(date) {\n var d0 = new Date(+date),\n d1 = new Date(date - 1);\n floori(d0), floori(d1), offseti(d1, 1);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), date;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [];\n start = new Date(start - 1);\n stop = new Date(+stop);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n offseti(start, 1), floori(start);\n if (start < stop) range.push(new Date(+start));\n while (offseti(start, step), floori(start), start < stop) range.push(new Date(+start));\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n while (--step >= 0) while (offseti(date, 1), !test(date));\n });\n };\n\n if (count) interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n return interval;\n }\n\n var utcYear = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCMonth(0, 1);\n }, function(date, offset) {\n date.setUTCFullYear(date.getUTCFullYear() + offset);\n }, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n });\n\n function utcWeekday(i) {\n return newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n }, function(date, offset) {\n date.setUTCDate(date.getUTCDate() + offset * 7);\n }, function(start, end) {\n return (end - start) / 6048e5;\n });\n }\n\n var utcMonday = utcWeekday(1);\n\n function formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d), d), p, 2);\n }\n\n function formatUTCWeekdayNumber(d) {\n return d.getUTCDay();\n }\n\n var utcSunday = utcWeekday(0);\n\n function formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d), d), p, 2);\n }\n\n function formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n }\n\n function formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n }\n\n function formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n }\n\n function formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n }\n\n var utcDay = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, offset) {\n date.setUTCDate(date.getUTCDate() + offset);\n }, function(start, end) {\n return (end - start) / 864e5;\n });\n\n function formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n }\n\n function formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n }\n\n function formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n }\n\n function formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n }\n\n function formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n }\n\n function formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n }\n\n function formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n }\n\n var year = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setMonth(0, 1);\n }, function(date, offset) {\n date.setFullYear(date.getFullYear() + offset);\n }, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n });\n\n function weekday(i) {\n return newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n }, function(date, offset) {\n date.setDate(date.getDate() + offset * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 6048e5;\n });\n }\n\n var monday = weekday(1);\n\n function formatWeekNumberMonday(d, p) {\n return pad(monday.count(year(d), d), p, 2);\n }\n\n function formatWeekdayNumber(d) {\n return d.getDay();\n }\n\n var sunday = weekday(0);\n\n function formatWeekNumberSunday(d, p) {\n return pad(sunday.count(year(d), d), p, 2);\n }\n\n function formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n }\n\n function formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n }\n\n function formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n }\n\n function formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n }\n\n var day = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n }, function(date, offset) {\n date.setDate(date.getDate() + offset);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 864e5;\n });\n\n function formatDayOfYear(d, p) {\n return pad(1 + day.count(year(d), d), p, 3);\n }\n\n function formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n }\n\n function formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n }\n\n function formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n }\n\n function formatLookup(names) {\n var map = new Map, i = -1, n = names.length;\n while (++i < n) map.set(names[i].toLowerCase(), i);\n return map;\n }\n\n var requoteRe = /[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g;\n\n function requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n }\n\n function formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n }\n\n function localeFormat(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"S\": formatSeconds,\n \"U\": formatWeekNumberSunday,\n \"w\": formatWeekdayNumber,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"S\": formatUTCSeconds,\n \"U\": formatUTCWeekNumberSunday,\n \"w\": formatUTCWeekdayNumber,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"S\": parseSeconds,\n \"U\": parseWeekNumberSunday,\n \"w\": parseWeekdayNumber,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n if (format = formats[c]) c = format(date, pad == null ? (c === \"e\" ? \" \" : \"0\") : pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, newDate) {\n return function(string) {\n var d = newYear(1900),\n i = parseSpecifier(d, specifier, string, 0);\n if (i != string.length) return null;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n if (\"w\" in d && (\"W\" in d || \"U\" in d)) {\n var day = utcDate(newYear(d.y)).getUTCDay();\n if (\"W\" in d) d.U = d.W, d.w = (d.w + 6) % 7, --day;\n d.m = 0;\n d.d = d.w + d.U * 7 - (day + 6) % 7;\n }\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n if (\"w\" in d && (\"W\" in d || \"U\" in d)) {\n var day = newDate(newYear(d.y)).getDay();\n if (\"W\" in d) d.U = d.W, d.w = (d.w + 6) % 7, --day;\n d.m = 0;\n d.d = d.w + d.U * 7 - (day + 6) % 7;\n }\n return newDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function parsePeriod(d, string, i) {\n var n = periodLookup.get(string.slice(i, i += 2).toLowerCase());\n return n == null ? -1 : (d.p = n, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.parse = newParse(specifier, localDate);\n f.toString = function() { return specifier; };\n return f;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.parse = newParse(specifier, utcDate);\n f.toString = function() { return specifier; };\n return f;\n }\n };\n }\n\n var locale = localeFormat({\n dateTime: \"%a %b %e %X %Y\",\n date: \"%m/%d/%Y\",\n time: \"%H:%M:%S\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n });\n\n exports.format = locale.format;\n exports.utcFormat = locale.utcFormat;\n\n var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\n function formatIsoNative(date) {\n return date.toISOString();\n }\n\n formatIsoNative.parse = function(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n };\n\n formatIsoNative.toString = function() {\n return isoSpecifier;\n };\n\n var formatIso = Date.prototype.toISOString && +new Date(\"2000-01-01T00:00:00.000Z\")\n ? formatIsoNative\n : locale.utcFormat(isoSpecifier);\n\n var isoFormat = formatIso;\n\n exports.isoFormat = isoFormat;\n exports.localeFormat = localeFormat;\n\n}));\n},{}],7:[function(require,module,exports){\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n factory((global.time = {}));\n}(this, function (exports) { 'use strict';\n\n var t1 = new Date;\n\n var t0 = new Date;\n\n function newInterval(floori, offseti, count) {\n\n function interval(date) {\n return floori(date = new Date(+date)), date;\n }\n\n interval.floor = interval;\n\n interval.round = function(date) {\n var d0 = new Date(+date),\n d1 = new Date(date - 1);\n floori(d0), floori(d1), offseti(d1, 1);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), date;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [];\n start = new Date(start - 1);\n stop = new Date(+stop);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n offseti(start, 1), floori(start);\n if (start < stop) range.push(new Date(+start));\n while (offseti(start, step), floori(start), start < stop) range.push(new Date(+start));\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n while (--step >= 0) while (offseti(date, 1), !test(date));\n });\n };\n\n if (count) interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n return interval;\n }\n\n var second = newInterval(function(date) {\n date.setMilliseconds(0);\n }, function(date, step) {\n date.setTime(+date + step * 1e3);\n }, function(start, end) {\n return (end - start) / 1e3;\n });\n\n exports.seconds = second.range;\n\n var minute = newInterval(function(date) {\n date.setSeconds(0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 6e4);\n }, function(start, end) {\n return (end - start) / 6e4;\n });\n\n exports.minutes = minute.range;\n\n var hour = newInterval(function(date) {\n date.setMinutes(0, 0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 36e5);\n }, function(start, end) {\n return (end - start) / 36e5;\n });\n\n exports.hours = hour.range;\n\n var day = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 864e5;\n });\n\n exports.days = day.range;\n\n function weekday(i) {\n return newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 6048e5;\n });\n }\n\n exports.sunday = weekday(0);\n\n exports.sundays = exports.sunday.range;\n\n exports.monday = weekday(1);\n\n exports.mondays = exports.monday.range;\n\n exports.tuesday = weekday(2);\n\n exports.tuesdays = exports.tuesday.range;\n\n exports.wednesday = weekday(3);\n\n exports.wednesdays = exports.wednesday.range;\n\n exports.thursday = weekday(4);\n\n exports.thursdays = exports.thursday.range;\n\n exports.friday = weekday(5);\n\n exports.fridays = exports.friday.range;\n\n exports.saturday = weekday(6);\n\n exports.saturdays = exports.saturday.range;\n\n var week = exports.sunday;\n\n exports.weeks = week.range;\n\n var month = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setDate(1);\n }, function(date, step) {\n date.setMonth(date.getMonth() + step);\n }, function(start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n });\n\n exports.months = month.range;\n\n var year = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setMonth(0, 1);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n }, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n });\n\n exports.years = year.range;\n\n var utcSecond = newInterval(function(date) {\n date.setUTCMilliseconds(0);\n }, function(date, step) {\n date.setTime(+date + step * 1e3);\n }, function(start, end) {\n return (end - start) / 1e3;\n });\n\n exports.utcSeconds = utcSecond.range;\n\n var utcMinute = newInterval(function(date) {\n date.setUTCSeconds(0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 6e4);\n }, function(start, end) {\n return (end - start) / 6e4;\n });\n\n exports.utcMinutes = utcMinute.range;\n\n var utcHour = newInterval(function(date) {\n date.setUTCMinutes(0, 0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 36e5);\n }, function(start, end) {\n return (end - start) / 36e5;\n });\n\n exports.utcHours = utcHour.range;\n\n var utcDay = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n }, function(start, end) {\n return (end - start) / 864e5;\n });\n\n exports.utcDays = utcDay.range;\n\n function utcWeekday(i) {\n return newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / 6048e5;\n });\n }\n\n exports.utcSunday = utcWeekday(0);\n\n exports.utcSundays = exports.utcSunday.range;\n\n exports.utcMonday = utcWeekday(1);\n\n exports.utcMondays = exports.utcMonday.range;\n\n exports.utcTuesday = utcWeekday(2);\n\n exports.utcTuesdays = exports.utcTuesday.range;\n\n exports.utcWednesday = utcWeekday(3);\n\n exports.utcWednesdays = exports.utcWednesday.range;\n\n exports.utcThursday = utcWeekday(4);\n\n exports.utcThursdays = exports.utcThursday.range;\n\n exports.utcFriday = utcWeekday(5);\n\n exports.utcFridays = exports.utcFriday.range;\n\n exports.utcSaturday = utcWeekday(6);\n\n exports.utcSaturdays = exports.utcSaturday.range;\n\n var utcWeek = exports.utcSunday;\n\n exports.utcWeeks = utcWeek.range;\n\n var utcMonth = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCDate(1);\n }, function(date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n }, function(start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n });\n\n exports.utcMonths = utcMonth.range;\n\n var utcYear = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCMonth(0, 1);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n }, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n });\n\n exports.utcYears = utcYear.range;\n\n exports.interval = newInterval;\n exports.second = second;\n exports.minute = minute;\n exports.hour = hour;\n exports.day = day;\n exports.week = week;\n exports.month = month;\n exports.year = year;\n exports.utcSecond = utcSecond;\n exports.utcMinute = utcMinute;\n exports.utcHour = utcHour;\n exports.utcDay = utcDay;\n exports.utcWeek = utcWeek;\n exports.utcMonth = utcMonth;\n exports.utcYear = utcYear;\n\n}));\n},{}],8:[function(require,module,exports){\nvar util = require('../util'),\n time = require('../time'),\n EPSILON = 1e-15;\n\nfunction bins(opt) {\n if (!opt) { throw Error(\"Missing binning options.\"); }\n\n // determine range\n var maxb = opt.maxbins || 15,\n base = opt.base || 10,\n logb = Math.log(base),\n div = opt.div || [5, 2], \n min = opt.min,\n max = opt.max,\n span = max - min,\n step, level, minstep, precision, v, i, eps;\n\n if (opt.step) {\n // if step size is explicitly given, use that\n step = opt.step;\n } else if (opt.steps) {\n // if provided, limit choice to acceptable step sizes\n step = opt.steps[Math.min(\n opt.steps.length - 1,\n bisect(opt.steps, span/maxb, 0, opt.steps.length)\n )];\n } else {\n // else use span to determine step size\n level = Math.ceil(Math.log(maxb) / logb);\n minstep = opt.minstep || 0;\n step = Math.max(\n minstep,\n Math.pow(base, Math.round(Math.log(span) / logb) - level)\n );\n \n // increase step size if too many bins\n do { step *= base; } while (Math.ceil(span/step) > maxb);\n\n // decrease step size if allowed\n for (i=0; i= minstep && span / v <= maxb) step = v;\n }\n }\n\n // update precision, min and max\n v = Math.log(step);\n precision = v >= 0 ? 0 : ~~(-v / logb) + 1;\n eps = Math.pow(base, -precision - 1);\n min = Math.min(min, Math.floor(min / step + eps) * step);\n max = Math.ceil(max / step) * step;\n\n return {\n start: min,\n stop: max,\n step: step,\n unit: {precision: precision},\n value: value,\n index: index\n };\n}\n\nfunction bisect(a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (util.cmp(a[mid], x) < 0) { lo = mid + 1; }\n else { hi = mid; }\n }\n return lo;\n}\n\nfunction value(v) {\n return this.step * Math.floor(v / this.step + EPSILON);\n}\n\nfunction index(v) {\n return Math.floor((v - this.start) / this.step + EPSILON);\n}\n\nfunction date_value(v) {\n return this.unit.date(value.call(this, v));\n}\n\nfunction date_index(v) {\n return index.call(this, this.unit.unit(v));\n}\n\nbins.date = function(opt) {\n if (!opt) { throw Error(\"Missing date binning options.\"); }\n\n // find time step, then bin\n var units = opt.utc ? time.utc : time,\n dmin = opt.min,\n dmax = opt.max,\n maxb = opt.maxbins || 20,\n minb = opt.minbins || 4,\n span = (+dmax) - (+dmin),\n unit = opt.unit ? units[opt.unit] : units.find(span, minb, maxb),\n spec = bins({\n min: unit.min != null ? unit.min : unit.unit(dmin),\n max: unit.max != null ? unit.max : unit.unit(dmax),\n maxbins: maxb,\n minstep: unit.minstep,\n steps: unit.step\n });\n\n spec.unit = unit;\n spec.index = date_index;\n if (!opt.raw) spec.value = date_value;\n return spec;\n};\n\nmodule.exports = bins;\n\n},{\"../time\":12,\"../util\":13}],9:[function(require,module,exports){\nvar gen = module.exports = {};\n\ngen.repeat = function(val, n) {\n var a = Array(n), i;\n for (i=0; i stop) range.push(j);\n else while ((j = start + step * ++i) < stop) range.push(j);\n return range;\n};\n\ngen.random = {};\n\ngen.random.uniform = function(min, max) {\n if (max === undefined) {\n max = min === undefined ? 1 : min;\n min = 0;\n }\n var d = max - min;\n var f = function() {\n return min + d * Math.random();\n };\n f.samples = function(n) { return gen.zeros(n).map(f); };\n return f;\n};\n\ngen.random.integer = function(a, b) {\n if (b === undefined) {\n b = a;\n a = 0;\n }\n var d = b - a;\n var f = function() {\n return a + Math.floor(d * Math.random());\n };\n f.samples = function(n) { return gen.zeros(n).map(f); };\n return f;\n};\n\ngen.random.normal = function(mean, stdev) {\n mean = mean || 0;\n stdev = stdev || 1;\n var next;\n var f = function() {\n var x = 0, y = 0, rds, c;\n if (next !== undefined) {\n x = next;\n next = undefined;\n return x;\n }\n do {\n x = Math.random()*2-1;\n y = Math.random()*2-1;\n rds = x*x + y*y;\n } while (rds === 0 || rds > 1);\n c = Math.sqrt(-2*Math.log(rds)/rds); // Box-Muller transform\n next = mean + y*c*stdev;\n return mean + x*c*stdev;\n };\n f.samples = function(n) { return gen.zeros(n).map(f); };\n return f;\n};\n},{}],10:[function(require,module,exports){\nvar util = require('../util');\n\nvar TYPES = '__types__';\n\nvar PARSERS = {\n boolean: util.boolean,\n integer: util.number,\n number: util.number,\n date: util.date,\n string: function(x) { return x==='' ? null : x; }\n};\n\nvar TESTS = {\n boolean: function(x) { return x==='true' || x==='false' || util.isBoolean(x); },\n integer: function(x) { return TESTS.number(x) && (x=+x) === ~~x; },\n number: function(x) { return !isNaN(+x) && !util.isDate(x); },\n date: function(x) { return !isNaN(Date.parse(x)); }\n};\n\nfunction annotation(data, types) {\n if (!types) return data && data[TYPES] || null;\n data[TYPES] = types;\n}\n\nfunction type(values, f) {\n f = util.$(f);\n var v, i, n;\n\n // if data array has type annotations, use them\n if (values[TYPES]) {\n v = f(values[TYPES]);\n if (util.isString(v)) return v;\n }\n\n for (i=0, n=values.length; !util.isValid(v) && i b) b = v;\n }\n }\n return [a, b];\n};\n\n// Find the integer indices of the minimum and maximum values.\nstats.extent.index = function(values, f) {\n f = util.$(f);\n var x = -1, y = -1, a, b, v, i, n = values.length;\n for (i=0; i b) { b = v; y = i; }\n }\n }\n return [x, y];\n};\n\n// Compute the dot product of two arrays of numbers.\nstats.dot = function(values, a, b) {\n var sum = 0, i, v;\n if (!b) {\n if (values.length !== a.length) {\n throw Error('Array lengths must match.');\n }\n for (i=0; i -1 && p !== v) {\n mu = 1 + (i-1 + tie) / 2;\n for (; tie -1) {\n mu = 1 + (n-1 + tie) / 2;\n for (; tie max) max = x;\n delta = x - mean;\n mean = mean + delta / (++valid);\n M2 = M2 + delta * (x - mean);\n vals.push(x);\n }\n }\n M2 = M2 / (valid - 1);\n sd = Math.sqrt(M2);\n\n // sort values for median and iqr\n vals.sort(util.cmp);\n\n return {\n type: type(values, f),\n unique: u,\n count: values.length,\n valid: valid,\n missing: missing,\n distinct: distinct,\n min: min,\n max: max,\n mean: mean,\n stdev: sd,\n median: (v = stats.quantile(vals, 0.5)),\n q1: stats.quantile(vals, 0.25),\n q3: stats.quantile(vals, 0.75),\n modeskew: sd === 0 ? 0 : (mean - v) / sd\n };\n};\n\n// Compute profiles for all variables in a data set.\nstats.summary = function(data, fields) {\n fields = fields || util.keys(data[0]);\n var s = fields.map(function(f) {\n var p = stats.profile(data, util.$(f));\n return (p.field = f, p);\n });\n return (s.__summary__ = true, s);\n};\n\nmodule.exports = stats;\n},{\"./generate\":9,\"./import/type\":10,\"./util\":13}],12:[function(require,module,exports){\nvar d3_time = require('d3-time');\n\nvar tempDate = new Date(),\n baseDate = new Date(0, 0, 1).setFullYear(0), // Jan 1, 0 AD\n utcBaseDate = new Date(Date.UTC(0, 0, 1)).setUTCFullYear(0);\n\nfunction date(d) {\n return (tempDate.setTime(+d), tempDate);\n}\n\n// create a time unit entry\nfunction entry(type, date, unit, step, min, max) {\n var e = {\n type: type,\n date: date,\n unit: unit\n };\n if (step) {\n e.step = step;\n } else {\n e.minstep = 1;\n }\n if (min != null) e.min = min;\n if (max != null) e.max = max;\n return e;\n}\n\nfunction create(type, unit, base, step, min, max) {\n return entry(type,\n function(d) { return unit.offset(base, d); },\n function(d) { return unit.count(base, d); },\n step, min, max);\n}\n\nvar locale = [\n create('second', d3_time.second, baseDate),\n create('minute', d3_time.minute, baseDate),\n create('hour', d3_time.hour, baseDate),\n create('day', d3_time.day, baseDate, [1, 7]),\n create('month', d3_time.month, baseDate, [1, 3, 6]),\n create('year', d3_time.year, baseDate),\n\n // periodic units\n entry('seconds',\n function(d) { return new Date(1970, 0, 1, 0, 0, d); },\n function(d) { return date(d).getSeconds(); },\n null, 0, 59\n ),\n entry('minutes',\n function(d) { return new Date(1970, 0, 1, 0, d); },\n function(d) { return date(d).getMinutes(); },\n null, 0, 59\n ),\n entry('hours',\n function(d) { return new Date(1970, 0, 1, d); },\n function(d) { return date(d).getHours(); },\n null, 0, 23\n ),\n entry('weekdays',\n function(d) { return new Date(1970, 0, 4+d); },\n function(d) { return date(d).getDay(); },\n [1], 0, 6\n ),\n entry('dates',\n function(d) { return new Date(1970, 0, d); },\n function(d) { return date(d).getDate(); },\n [1], 1, 31\n ),\n entry('months',\n function(d) { return new Date(1970, d % 12, 1); },\n function(d) { return date(d).getMonth(); },\n [1], 0, 11\n )\n];\n\nvar utc = [\n create('second', d3_time.utcSecond, utcBaseDate),\n create('minute', d3_time.utcMinute, utcBaseDate),\n create('hour', d3_time.utcHour, utcBaseDate),\n create('day', d3_time.utcDay, utcBaseDate, [1, 7]),\n create('month', d3_time.utcMonth, utcBaseDate, [1, 3, 6]),\n create('year', d3_time.utcYear, utcBaseDate),\n\n // periodic units\n entry('seconds',\n function(d) { return new Date(Date.UTC(1970, 0, 1, 0, 0, d)); },\n function(d) { return date(d).getUTCSeconds(); },\n null, 0, 59\n ),\n entry('minutes',\n function(d) { return new Date(Date.UTC(1970, 0, 1, 0, d)); },\n function(d) { return date(d).getUTCMinutes(); },\n null, 0, 59\n ),\n entry('hours',\n function(d) { return new Date(Date.UTC(1970, 0, 1, d)); },\n function(d) { return date(d).getUTCHours(); },\n null, 0, 23\n ),\n entry('weekdays',\n function(d) { return new Date(Date.UTC(1970, 0, 4+d)); },\n function(d) { return date(d).getUTCDay(); },\n [1], 0, 6\n ),\n entry('dates',\n function(d) { return new Date(Date.UTC(1970, 0, d)); },\n function(d) { return date(d).getUTCDate(); },\n [1], 1, 31\n ),\n entry('months',\n function(d) { return new Date(Date.UTC(1970, d % 12, 1)); },\n function(d) { return date(d).getUTCMonth(); },\n [1], 0, 11\n )\n];\n\nvar STEPS = [\n [31536e6, 5], // 1-year\n [7776e6, 4], // 3-month\n [2592e6, 4], // 1-month\n [12096e5, 3], // 2-week\n [6048e5, 3], // 1-week\n [1728e5, 3], // 2-day\n [864e5, 3], // 1-day\n [432e5, 2], // 12-hour\n [216e5, 2], // 6-hour\n [108e5, 2], // 3-hour\n [36e5, 2], // 1-hour\n [18e5, 1], // 30-minute\n [9e5, 1], // 15-minute\n [3e5, 1], // 5-minute\n [6e4, 1], // 1-minute\n [3e4, 0], // 30-second\n [15e3, 0], // 15-second\n [5e3, 0], // 5-second\n [1e3, 0] // 1-second\n];\n\nfunction find(units, span, minb, maxb) {\n var step = STEPS[0], i, n, bins;\n\n for (i=1, n=STEPS.length; i step[0]) {\n bins = span / step[0];\n if (bins > maxb) {\n return units[STEPS[i-1][1]];\n }\n if (bins >= minb) {\n return units[step[1]];\n }\n }\n }\n return units[STEPS[n-1][1]];\n}\n\nfunction toUnitMap(units) {\n var map = {}, i, n;\n for (i=0, n=units.length; i 1 ?\n function(x) { return s.reduce(function(x,f) { return x[f]; }, x); } :\n function(x) { return x[f]; }\n );\n};\n\n// short-cut for accessor\nu.$ = u.accessor;\n\nu.mutator = function(f) {\n var s;\n return u.isString(f) && (s=u.field(f)).length > 1 ?\n function(x, v) {\n for (var i=0; i y) return sign[i];\n }\n return 0;\n };\n};\n\nu.cmp = function(a, b) {\n if (a < b) {\n return -1;\n } else if (a > b) {\n return 1;\n } else if (a >= b) {\n return 0;\n } else if (a === null) {\n return -1;\n } else if (b === null) {\n return 1;\n }\n return NaN;\n};\n\nu.numcmp = function(a, b) { return a - b; };\n\nu.stablesort = function(array, sortBy, keyFn) {\n var indices = array.reduce(function(idx, v, i) {\n return (idx[keyFn(v)] = i, idx);\n }, {});\n\n array.sort(function(a, b) {\n var sa = sortBy(a),\n sb = sortBy(b);\n return sa < sb ? -1 : sa > sb ? 1\n : (indices[keyFn(a)] - indices[keyFn(b)]);\n });\n\n return array;\n};\n\n\n// string functions\n\nu.pad = function(s, length, pos, padchar) {\n padchar = padchar || \" \";\n var d = length - s.length;\n if (d <= 0) return s;\n switch (pos) {\n case 'left':\n return strrep(d, padchar) + s;\n case 'middle':\n case 'center':\n return strrep(Math.floor(d/2), padchar) +\n s + strrep(Math.ceil(d/2), padchar);\n default:\n return s + strrep(d, padchar);\n }\n};\n\nfunction strrep(n, str) {\n var s = \"\", i;\n for (i=0; i this.config('maxSmallNumber') ?\n 'largeNumberFormat': 'smallNumberFormat';\n return this.config(formatConfig);\n };\n\n proto.sort = function(et, stats) {\n var sort = this._enc[et].sort,\n enc = this._enc,\n isTypes = vlfield.isTypes;\n\n if ((!sort || sort.length===0) &&\n // FIXME\n Encoding.toggleSort.support({encoding:this._enc}, stats, true) && //HACK\n this.config('toggleSort') === Q\n ) {\n var qField = isTypes(enc.x, [N, O]) ? enc.y : enc.x;\n\n if (isTypes(enc[et], [N, O])) {\n sort = [{\n name: qField.name,\n aggregate: qField.aggregate,\n type: qField.type,\n reverse: true\n }];\n }\n }\n\n return sort;\n };\n\n proto.map = function(f) {\n return vlenc.map(this._enc, f);\n };\n\n proto.reduce = function(f, init) {\n return vlenc.reduce(this._enc, f, init);\n };\n\n proto.forEach = function(f) {\n return vlenc.forEach(this._enc, f);\n };\n\n proto.type = function(et) {\n return this.has(et) ? this._enc[et].type : null;\n };\n\n proto.isType = function(et, type) {\n var field = this.field(et);\n return field && vlfield.isType(field, type);\n };\n\n proto.isTypes = function(et, type) {\n var field = this.field(et);\n return field && vlfield.isTypes(field, type);\n };\n\n Encoding.isOrdinalScale = function(encoding, encType) {\n return vlfield.isOrdinalScale(encoding.field(encType));\n };\n\n Encoding.isDimension = function(encoding, encType) {\n return vlfield.isDimension(encoding.field(encType));\n };\n\n Encoding.isMeasure = function(encoding, encType) {\n return vlfield.isMeasure(encoding.field(encType));\n };\n\n proto.isOrdinalScale = function(encType) {\n return this.has(encType) && Encoding.isOrdinalScale(this, encType);\n };\n\n proto.isDimension = function(encType) {\n return this.has(encType) && Encoding.isDimension(this, encType);\n };\n\n proto.isMeasure = function(encType) {\n return this.has(encType) && Encoding.isMeasure(this, encType);\n };\n\n proto.isAggregate = function() {\n return vlenc.isAggregate(this._enc);\n };\n\n Encoding.isAggregate = function(spec) {\n return vlenc.isAggregate(spec.encoding);\n };\n\n Encoding.alwaysNoOcclusion = function(spec) {\n // FIXME raw OxQ with # of rows = # of O\n return vlenc.isAggregate(spec.encoding);\n };\n\n Encoding.isStack = function(spec) {\n // FIXME update this once we have control for stack ...\n return (spec.marktype === 'bar' || spec.marktype === 'area') &&\n spec.encoding.color;\n };\n\n proto.isStack = function() {\n // FIXME update this once we have control for stack ...\n return (this.is('bar') || this.is('area')) && this.has('color');\n };\n\n proto.cardinality = function(encType, stats) {\n return vlfield.cardinality(this.field(encType), stats, this.config('filterNull'));\n };\n\n proto.isRaw = function() {\n return !this.isAggregate();\n };\n\n proto.data = function(name) {\n return name ? this._data[name] : this._data;\n };\n\n // returns whether the encoding has values embedded\n proto.hasValues = function() {\n var vals = this.data('values');\n return vals && vals.length;\n };\n\n proto.config = function(name) {\n return this._config[name];\n };\n\n Encoding.transpose = function(spec) {\n var oldenc = spec.encoding,\n enc = util.duplicate(spec.encoding);\n enc.x = oldenc.y;\n enc.y = oldenc.x;\n enc.row = oldenc.col;\n enc.col = oldenc.row;\n spec.encoding = enc;\n return spec;\n };\n\n // FIXME: REMOVE everything below here\n\n Encoding.toggleSort = function(spec) {\n spec.config = spec.config || {};\n spec.config.toggleSort = spec.config.toggleSort === Q ? N : Q;\n return spec;\n };\n\n\n Encoding.toggleSort.direction = function(spec) {\n if (!Encoding.toggleSort.support(spec)) { return; }\n var enc = spec.encoding;\n return enc.x.type === N ? 'x' : 'y';\n };\n\n Encoding.toggleSort.mode = function(spec) {\n return spec.config.toggleSort;\n };\n\n Encoding.toggleSort.support = function(spec, stats) {\n var enc = spec.encoding,\n isTypes = vlfield.isTypes;\n\n if (vlenc.has(enc, ROW) || vlenc.has(enc, COL) ||\n !vlenc.has(enc, X) || !vlenc.has(enc, Y) ||\n !Encoding.alwaysNoOcclusion(spec, stats)) {\n return false;\n }\n\n return ( isTypes(enc.x, [N,O]) && vlfield.isMeasure(enc.y)) ? 'x' :\n ( isTypes(enc.y, [N,O]) && vlfield.isMeasure(enc.x)) ? 'y' : false;\n };\n\n Encoding.toggleFilterNullO = function(spec) {\n spec.config = spec.config || {};\n spec.config.filterNull = spec.config.filterNull || { //FIXME\n T: true,\n Q: true\n };\n spec.config.filterNull.O = !spec.config.filterNull.O;\n return spec;\n };\n\n Encoding.toggleFilterNullO.support = function(spec, stats) {\n var fields = vlenc.fields(spec.encoding);\n for (var fieldName in fields) {\n var fieldList = fields[fieldName];\n if (fieldList.containsType.O && fieldName in stats && stats[fieldName].nulls > 0) {\n return true;\n }\n }\n return false;\n };\n\n return Encoding;\n})();\n\n},{\"./consts\":32,\"./enc\":34,\"./field\":35,\"./globals\":36,\"./schema/schema\":37,\"./util\":39}],15:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar util = require('../util');\n\nmodule.exports = aggregates;\n\nfunction aggregates(dataTable, encoding, opt) {\n opt = opt || {};\n\n var dims = {}, meas = {}, detail = {}, facets = {};\n\n encoding.forEach(function(field, encType) {\n if (field.aggregate) {\n if (field.aggregate === 'count') {\n meas.count = {op: 'count', field: '*'};\n }else {\n meas[field.aggregate + '|'+ field.name] = {\n op: field.aggregate,\n field: encoding.fieldRef(encType, {nofn: true})\n };\n }\n } else {\n dims[field.name] = encoding.fieldRef(encType);\n if (encType == ROW || encType == COL) {\n facets[field.name] = dims[field.name];\n }else if (encType !== X && encType !== Y) {\n detail[field.name] = dims[field.name];\n }\n }\n });\n dims = util.vals(dims);\n meas = util.vals(meas);\n\n if (meas.length > 0) {\n if (!dataTable.transform) dataTable.transform = [];\n dataTable.transform.push({\n type: 'aggregate',\n groupby: dims,\n fields: meas\n });\n }\n return {\n details: util.vals(detail),\n dims: dims,\n facets: util.vals(facets),\n aggregated: meas.length > 0\n };\n}\n\n},{\"../globals\":36,\"../util\":39}],16:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar util = require('../util'),\n setter = util.setter,\n getter = util.getter,\n time = require('./time');\n\nvar axis = module.exports = {};\n\naxis.def = function(name, encoding, layout, stats, opt) {\n var isCol = name == COL,\n isRow = name == ROW,\n type = isCol ? 'x' : isRow ? 'y' : name;\n\n var def = {\n type: type,\n scale: name,\n properties: {},\n layer: encoding.field(name).axis.layer,\n orient: axis.orient(name, encoding, stats)\n };\n\n // Add axis label custom scale (for bin / time)\n def = axis.labels.scale(def, encoding, name);\n def = axis.labels.format(def, name, encoding, stats);\n\n // for x-axis, set ticks for Q or rotate scale for ordinal scale\n if (name == X) {\n if (encoding.isDimension(X) || encoding.isType(X, T)) {\n // TODO(kanitw): Jul 19, 2015 - #506 add condition for rotation\n def = axis.labels.rotate(def);\n } else { // Q\n def.ticks = encoding.field(name).axis.ticks;\n }\n }\n\n // TitleOffset depends on labels rotation\n def.titleOffset = axis.titleOffset(encoding, layout, name);\n\n //def.offset is used in axis.grid\n if(isRow) def.offset = axis.titleOffset(encoding, layout, Y) + 20;\n // FIXME(kanitw): Jul 19, 2015 - offset for column when x is put on top\n\n def = axis.grid(def, name, encoding, layout);\n def = axis.title(def, name, encoding, layout, opt);\n\n if (isRow || isCol) def = axis.hideTicks(def);\n\n return def;\n};\n\naxis.orient = function(name, encoding, stats) {\n var orient = encoding.field(name).axis.orient;\n if (orient) return orient;\n\n if (name===COL) return 'top';\n\n // x-axis for long y - put on top\n if (name===X && encoding.has(Y) && encoding.isOrdinalScale(Y) && encoding.cardinality(Y, stats) > 30) {\n return 'top';\n }\n\n return undefined;\n};\n\naxis.grid = function(def, name, encoding, layout) {\n var cellPadding = layout.cellPadding,\n isCol = name == COL,\n isRow = name == ROW;\n\n if (encoding.axis(name).grid) {\n def.grid = true;\n\n if (isCol) {\n // set grid property -- put the lines on the right the cell\n def.properties.grid = {\n x: {\n offset: layout.cellWidth * (1+ cellPadding/2.0),\n // default value(s) -- vega doesn't do recursive merge\n scale: 'col'\n },\n y: {\n value: -layout.cellHeight * (cellPadding/2),\n },\n stroke: { value: encoding.config('cellGridColor') },\n opacity: { value: encoding.config('cellGridOpacity') }\n };\n } else if (isRow) {\n // set grid property -- put the lines on the top\n def.properties.grid = {\n y: {\n offset: -layout.cellHeight * (cellPadding/2),\n // default value(s) -- vega doesn't do recursive merge\n scale: 'row'\n },\n x: {\n value: def.offset\n },\n x2: {\n offset: def.offset + (layout.cellWidth * 0.05),\n // default value(s) -- vega doesn't do recursive merge\n group: 'mark.group.width',\n mult: 1\n },\n stroke: { value: encoding.config('cellGridColor') },\n opacity: { value: encoding.config('cellGridOpacity') }\n };\n } else {\n def.properties.grid = {\n stroke: { value: encoding.config('gridColor') },\n opacity: { value: encoding.config('gridOpacity') }\n };\n }\n }\n return def;\n};\n\naxis.hideTicks = function(def) {\n def.properties.ticks = {opacity: {value: 0}};\n def.properties.majorTicks = {opacity: {value: 0}};\n def.properties.axis = {opacity: {value: 0}};\n return def;\n};\n\naxis.title = function (def, name, encoding, layout) {\n var ax = encoding.field(name).axis;\n\n if (ax.title) {\n def.title = ax.title;\n } else {\n // if not defined, automatically determine axis title from field def\n var fieldTitle = encoding.fieldTitle(name),\n maxLength;\n\n if (ax.titleMaxLength) {\n maxLength = ax.titleMaxLength;\n } else if (name===X) {\n maxLength = layout.cellWidth / encoding.config('characterWidth');\n } else if (name === Y) {\n maxLength = layout.cellHeight / encoding.config('characterWidth');\n }\n\n def.title = maxLength ? util.truncate(fieldTitle, maxLength) : fieldTitle;\n }\n\n if (name === ROW) {\n def.properties.title = {\n angle: {value: 0},\n align: {value: 'right'},\n baseline: {value: 'middle'},\n dy: {value: (-layout.height/2) -20}\n };\n }\n\n return def;\n};\n\naxis.labels = {};\n\n/** add custom label for time type and bin */\naxis.labels.scale = function(def, encoding, name) {\n // time\n var timeUnit = encoding.field(name).timeUnit;\n if (encoding.isType(name, T) && timeUnit && (time.hasScale(timeUnit))) {\n setter(def, ['properties','labels','text','scale'], 'time-'+ timeUnit);\n }\n // FIXME bin\n return def;\n};\n\n/**\n * Determine number format or truncate if maxLabel length is presented.\n */\naxis.labels.format = function (def, name, encoding, stats) {\n var fieldStats = stats[encoding.field(name).name];\n\n if (encoding.axis(name).format) {\n def.format = encoding.axis(name).format;\n } else if (encoding.isType(name, Q) || fieldStats.type === 'number') {\n def.format = encoding.numberFormat(fieldStats);\n } else if (encoding.isType(name, T)) {\n var timeUnit = encoding.field(name).timeUnit;\n if (!timeUnit) {\n def.format = encoding.config('timeFormat');\n } else if (timeUnit === 'year') {\n def.format = 'd';\n }\n } else if (encoding.isTypes(name, [N, O]) && encoding.axis(name).maxLabelLength) {\n setter(def,\n ['properties','labels','text','template'],\n '{{data | truncate:' + encoding.axis(name).maxLabelLength + '}}'\n );\n }\n\n return def;\n};\n\naxis.labels.rotate = function(def) {\n var align = def.orient ==='top' ? 'left' : 'right';\n setter(def, ['properties','labels', 'angle', 'value'], 270);\n setter(def, ['properties','labels', 'align', 'value'], align);\n setter(def, ['properties','labels', 'baseline', 'value'], 'middle');\n return def;\n};\n\naxis.titleOffset = function (encoding, layout, name) {\n // return specified value if specified\n var value = encoding.axis(name).titleOffset;\n if (value) return value;\n\n switch (name) {\n //FIXME make this adjustable\n case ROW: return 0;\n case COL: return 35;\n }\n return getter(layout, [name, 'axisTitleOffset']);\n};\n\n},{\"../globals\":36,\"../util\":39,\"./time\":31}],17:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nmodule.exports = binning;\n\nfunction binning(dataTable, encoding, opt) {\n opt = opt || {};\n\n if (!dataTable.transform) dataTable.transform = [];\n\n encoding.forEach(function(field, encType) {\n if (encoding.bin(encType)) {\n dataTable.transform.push({\n type: 'bin',\n field: encoding.fieldRef(encType, {nofn: true}),\n output: encoding.fieldRef(encType),\n maxbins: encoding.bin(encType).maxbins\n });\n }\n });\n\n return dataTable;\n}\n\n},{\"../globals\":36}],18:[function(require,module,exports){\n'use strict';\n\nvar summary = module.exports = require('datalib/src/stats').summary;\n\nrequire('../globals');\n\nvar compiler = module.exports = {};\n\nvar Encoding = require('../Encoding'),\n axis = compiler.axis = require('./axis'),\n filter = compiler.filter = require('./filter'),\n legend = compiler.legend = require('./legend'),\n marks = compiler.marks = require('./marks'),\n scale = compiler.scale = require('./scale');\n\ncompiler.aggregate = require('./aggregate');\ncompiler.bin = require('./bin');\ncompiler.facet = require('./facet');\ncompiler.group = require('./group');\ncompiler.layout = require('./layout');\ncompiler.sort = require('./sort');\ncompiler.stack = require('./stack');\ncompiler.style = require('./style');\ncompiler.subfacet = require('./subfacet');\ncompiler.template = require('./template');\ncompiler.time = require('./time');\n\ncompiler.compile = function (spec, stats, theme) {\n return compiler.compileEncoding(Encoding.fromSpec(spec, theme), stats);\n};\n\ncompiler.shorthand = function (shorthand, stats, config, theme) {\n return compiler.compileEncoding(Encoding.fromShorthand(shorthand, config, theme), stats);\n};\n\ncompiler.compileEncoding = function (encoding, stats) {\n // no need to pass stats if you pass in the data\n if (!stats && encoding.hasValues()) {\n stats = summary(encoding.data('values')).reduce(function(s, p) {\n s[p.field] = p;\n return s;\n }, {});\n }\n\n var layout = compiler.layout(encoding, stats),\n spec = compiler.template(encoding, layout, stats);\n\n // .data related stuff\n var rawTable = spec.data[0],\n dataTable = spec.data[1];\n\n rawTable = filter.addFilters(rawTable, encoding); // modify rawTable\n spec = compiler.time(spec, encoding); // modify rawTable, add scales\n dataTable = compiler.bin(dataTable, encoding); // modify dataTable\n var aggResult = compiler.aggregate(dataTable, encoding); // modify dataTable\n var sorting = compiler.sort(spec.data, encoding, stats); // append new data\n\n // marks\n var style = compiler.style(encoding, stats),\n group = spec.marks[0],\n mdefs = marks.def(encoding, layout, style, stats),\n mdef = mdefs[mdefs.length - 1]; // TODO: remove this dirty hack by refactoring the whole flow\n\n for (var i = 0; i < mdefs.length; i++) {\n group.marks.push(mdefs[i]);\n }\n\n var lineType = marks[encoding.marktype()].line;\n\n // handle subfacets\n\n var details = aggResult.details,\n hasDetails = details && details.length > 0,\n stack = hasDetails && compiler.stack(spec.data, encoding, mdef, aggResult.facets); // modify spec.data, mdef.{from,properties}\n\n if (hasDetails && (stack || lineType)) {\n //subfacet to group stack / line together in one group\n compiler.subfacet(group, mdef, details, stack, encoding);\n }\n\n // auto-sort line/area values\n //TODO(kanitw): have some config to turn off auto-sort for line (for line chart that encodes temporal information)\n if (lineType) {\n var f = (encoding.isMeasure(X) && encoding.isDimension(Y)) ? Y : X;\n if (!mdef.from) mdef.from = {};\n // TODO: why - ?\n mdef.from.transform = [{type: 'sort', by: '-' + encoding.fieldRef(f)}];\n }\n\n // get a flattened list of all scale names that are used in the vl spec\n var singleScaleNames = [].concat.apply([], mdefs.map(function(markProps) {\n return scale.names(markProps.properties.update);\n }));\n\n // Small Multiples\n if (encoding.has(ROW) || encoding.has(COL)) {\n spec = compiler.facet(group, encoding, layout, style, sorting, spec, singleScaleNames, stack, stats);\n spec.legends = legend.defs(encoding, style);\n } else {\n group.scales = scale.defs(singleScaleNames, encoding, layout, stats, style, sorting, {stack: stack});\n\n group.axes = [];\n if (encoding.has(X)) group.axes.push(axis.def(X, encoding, layout, stats));\n if (encoding.has(Y)) group.axes.push(axis.def(Y, encoding, layout, stats));\n\n group.legends = legend.defs(encoding, style);\n }\n\n filter.filterLessThanZero(dataTable, encoding);\n\n return spec;\n};\n\n\n},{\"../Encoding\":14,\"../globals\":36,\"./aggregate\":15,\"./axis\":16,\"./bin\":17,\"./facet\":19,\"./filter\":20,\"./group\":21,\"./layout\":22,\"./legend\":23,\"./marks\":24,\"./scale\":25,\"./sort\":26,\"./stack\":27,\"./style\":28,\"./subfacet\":29,\"./template\":30,\"./time\":31,\"datalib/src/stats\":11}],19:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar util = require('../util');\n\nvar axis = require('./axis'),\n groupdef = require('./group').def,\n scale = require('./scale');\n\nmodule.exports = faceting;\n\nfunction faceting(group, encoding, layout, style, sorting, spec, singleScaleNames, stack, stats) {\n var enter = group.properties.enter;\n var facetKeys = [], cellAxes = [], from, axesGrp;\n\n var hasRow = encoding.has(ROW), hasCol = encoding.has(COL);\n\n enter.fill = {value: encoding.config('cellBackgroundColor')};\n\n //move \"from\" to cell level and add facet transform\n group.from = {data: group.marks[0].from.data};\n\n // Hack, this needs to be refactored\n for (var i = 0; i < group.marks.length; i++) {\n var mark = group.marks[i];\n if (mark.from.transform) {\n delete mark.from.data; //need to keep transform for subfacetting case\n } else {\n delete mark.from;\n }\n }\n\n if (hasRow) {\n if (!encoding.isDimension(ROW)) {\n util.error('Row encoding should be ordinal.');\n }\n enter.y = {scale: ROW, field: 'keys.' + facetKeys.length};\n enter.height = {'value': layout.cellHeight}; // HACK\n\n facetKeys.push(encoding.fieldRef(ROW));\n\n if (hasCol) {\n from = util.duplicate(group.from);\n from.transform = from.transform || [];\n from.transform.unshift({type: 'facet', keys: [encoding.fieldRef(COL)]});\n }\n\n axesGrp = groupdef('x-axes', {\n axes: encoding.has(X) ? [axis.def(X, encoding, layout, stats)] : undefined,\n x: hasCol ? {scale: COL, field: 'keys.0'} : {value: 0},\n width: hasCol && {'value': layout.cellWidth}, //HACK?\n from: from\n });\n\n spec.marks.unshift(axesGrp); // need to prepend so it appears under the plots\n (spec.axes = spec.axes || []);\n spec.axes.push(axis.def(ROW, encoding, layout, stats));\n } else { // doesn't have row\n if (encoding.has(X)) {\n //keep x axis in the cell\n cellAxes.push(axis.def(X, encoding, layout, stats));\n }\n }\n\n if (hasCol) {\n if (!encoding.isDimension(COL)) {\n util.error('Col encoding should be ordinal.');\n }\n enter.x = {scale: COL, field: 'keys.' + facetKeys.length};\n enter.width = {'value': layout.cellWidth}; // HACK\n\n facetKeys.push(encoding.fieldRef(COL));\n\n if (hasRow) {\n from = util.duplicate(group.from);\n from.transform = from.transform || [];\n from.transform.unshift({type: 'facet', keys: [encoding.fieldRef(ROW)]});\n }\n\n axesGrp = groupdef('y-axes', {\n axes: encoding.has(Y) ? [axis.def(Y, encoding, layout, stats)] : undefined,\n y: hasRow && {scale: ROW, field: 'keys.0'},\n x: hasRow && {value: 0},\n height: hasRow && {'value': layout.cellHeight}, //HACK?\n from: from\n });\n\n spec.marks.unshift(axesGrp); // need to prepend so it appears under the plots\n (spec.axes = spec.axes || []);\n spec.axes.push(axis.def(COL, encoding, layout, stats));\n } else { // doesn't have col\n if (encoding.has(Y)) {\n cellAxes.push(axis.def(Y, encoding, layout, stats));\n }\n }\n\n // assuming equal cellWidth here\n // TODO: support heterogenous cellWidth (maybe by using multiple scales?)\n spec.scales = (spec.scales || []).concat(scale.defs(\n scale.names(enter).concat(singleScaleNames),\n encoding,\n layout,\n stats,\n style,\n sorting,\n {stack: stack, facet: true}\n )); // row/col scales + cell scales\n\n if (cellAxes.length > 0) {\n group.axes = cellAxes;\n }\n\n // add facet transform\n var trans = (group.from.transform || (group.from.transform = []));\n trans.unshift({type: 'facet', keys: facetKeys});\n\n return spec;\n}\n\n},{\"../globals\":36,\"../util\":39,\"./axis\":16,\"./group\":21,\"./scale\":25}],20:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar filter = module.exports = {};\n\nvar BINARY = {\n '>': true,\n '>=': true,\n '=': true,\n '!=': true,\n '<': true,\n '<=': true\n};\n\nfilter.addFilters = function(rawTable, encoding) {\n var filters = encoding.filter(); // apply filters to raw data before aggregation\n\n if (!rawTable.transform)\n rawTable.transform = [];\n\n // add custom filters\n for (var i=0, l=filters.length; i0'\n });\n }\n });\n};\n\n},{\"../globals\":36}],21:[function(require,module,exports){\n'use strict';\n\nmodule.exports = {\n def: groupdef\n};\n\nfunction groupdef(name, opt) {\n opt = opt || {};\n return {\n _name: name || undefined,\n type: 'group',\n from: opt.from,\n properties: {\n enter: {\n x: opt.x || undefined,\n y: opt.y || undefined,\n width: opt.width || {group: 'width'},\n height: opt.height || {group: 'height'}\n }\n },\n scales: opt.scales || undefined,\n axes: opt.axes || undefined,\n marks: opt.marks || []\n };\n}\n\n},{}],22:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar util = require('../util'),\n setter = util.setter,\n time = require('./time'),\n d3_format = require('d3-format');\n\nmodule.exports = vllayout;\n\nfunction vllayout(encoding, stats) {\n var layout = box(encoding, stats);\n layout = offset(encoding, stats, layout);\n return layout;\n}\n\n/*\n HACK to set chart size\n NOTE: this fails for plots driven by derived values (e.g., aggregates)\n One solution is to update Vega to support auto-sizing\n In the meantime, auto-padding (mostly) does the trick\n */\nfunction box(encoding, stats) {\n var hasRow = encoding.has(ROW),\n hasCol = encoding.has(COL),\n hasX = encoding.has(X),\n hasY = encoding.has(Y),\n marktype = encoding.marktype();\n\n // FIXME/HACK we need to take filter into account\n var xCardinality = hasX && encoding.isDimension(X) ? encoding.cardinality(X, stats) : 1,\n yCardinality = hasY && encoding.isDimension(Y) ? encoding.cardinality(Y, stats) : 1;\n\n var useSmallBand = xCardinality > encoding.config('largeBandMaxCardinality') ||\n yCardinality > encoding.config('largeBandMaxCardinality');\n\n var cellWidth, cellHeight, cellPadding = encoding.config('cellPadding');\n\n // set cellWidth\n if (hasX) {\n if (encoding.isOrdinalScale(X)) {\n // for ordinal, hasCol or not doesn't matter -- we scale based on cardinality\n cellWidth = (xCardinality + encoding.field(X).band.padding) * encoding.bandSize(X, useSmallBand);\n } else {\n cellWidth = hasCol || hasRow ? encoding.field(COL).width : encoding.config('singleWidth');\n }\n } else {\n if (marktype === TEXT) {\n cellWidth = encoding.config('textCellWidth');\n } else {\n cellWidth = encoding.bandSize(X);\n }\n }\n\n // set cellHeight\n if (hasY) {\n if (encoding.isOrdinalScale(Y)) {\n // for ordinal, hasCol or not doesn't matter -- we scale based on cardinality\n cellHeight = (yCardinality + encoding.field(Y).band.padding) * encoding.bandSize(Y, useSmallBand);\n } else {\n cellHeight = hasCol || hasRow ? encoding.field(ROW).height : encoding.config('singleHeight');\n }\n } else {\n cellHeight = encoding.bandSize(Y);\n }\n\n // Cell bands use rangeBands(). There are n-1 padding. Outerpadding = 0 for cells\n\n var width = cellWidth, height = cellHeight;\n if (hasCol) {\n var colCardinality = encoding.cardinality(COL, stats);\n width = cellWidth * ((1 + cellPadding) * (colCardinality - 1) + 1);\n }\n if (hasRow) {\n var rowCardinality = encoding.cardinality(ROW, stats);\n height = cellHeight * ((1 + cellPadding) * (rowCardinality - 1) + 1);\n }\n\n return {\n // width and height of the whole cell\n cellWidth: cellWidth,\n cellHeight: cellHeight,\n cellPadding: cellPadding,\n // width and height of the chart\n width: width,\n height: height,\n // information about x and y, such as band size\n x: {useSmallBand: useSmallBand},\n y: {useSmallBand: useSmallBand}\n };\n}\n\n\n// FIXME fieldStats.max isn't always the longest\nfunction getMaxNumberLength(encoding, et, fieldStats) {\n var format = encoding.numberFormat(et, fieldStats);\n\n return d3_format.format(format)(fieldStats.max).length;\n}\n\nfunction getMaxLength(encoding, stats, et) {\n var field = encoding.field(et),\n fieldStats = stats[field.name];\n\n if (field.bin) {\n // TODO once bin support range, need to update this\n return getMaxNumberLength(encoding, et, fieldStats);\n } if (encoding.isType(et, Q)) {\n return getMaxNumberLength(encoding, et, fieldStats);\n } else if (encoding.isType(et, T)) {\n return time.maxLength(encoding.field(et).timeUnit, encoding);\n } else if (encoding.isTypes(et, [N, O])) {\n if(fieldStats.type === 'number') {\n return getMaxNumberLength(encoding, et, fieldStats);\n } else {\n return Math.min(fieldStats.max, encoding.axis(et).maxLabelLength || Infinity);\n }\n }\n}\n\nfunction offset(encoding, stats, layout) {\n [X, Y].forEach(function (et) {\n // TODO(kanitw): Jul 19, 2015 - create a set of visual test for extraOffset\n var extraOffset = et === X ? 20 : 22,\n maxLength;\n if (encoding.isDimension(et) || encoding.isType(et, T)) {\n maxLength = getMaxLength(encoding, stats, et);\n } else if (\n // TODO once we have #512 (allow using inferred type)\n // Need to adjust condition here.\n encoding.isType(et, Q) ||\n encoding.aggregate(et) === 'count'\n ) {\n if (\n et===Y\n // || (et===X && false)\n // FIXME determine when X would rotate, but should move this to axis.js first #506\n ) {\n maxLength = getMaxLength(encoding, stats, et);\n }\n } else {\n // nothing\n }\n\n if (maxLength) {\n setter(layout,[et, 'axisTitleOffset'], encoding.config('characterWidth') * maxLength + extraOffset);\n } else {\n // if no max length (no rotation case), use maxLength = 3\n setter(layout,[et, 'axisTitleOffset'], encoding.config('characterWidth') * 3 + extraOffset);\n }\n\n });\n return layout;\n}\n\n},{\"../globals\":36,\"../util\":39,\"./time\":31,\"d3-format\":5}],23:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar time = require('./time'),\n util = require('../util'),\n setter = util.setter,\n getter = util.getter;\n\nvar legend = module.exports = {};\n\nlegend.defs = function(encoding, style) {\n var defs = [];\n\n if (encoding.has(COLOR) && encoding.field(COLOR).legend) {\n defs.push(legend.def(COLOR, encoding, {\n fill: COLOR,\n orient: 'right'\n }, style));\n }\n\n if (encoding.has(SIZE) && encoding.field(SIZE).legend) {\n defs.push(legend.def(SIZE, encoding, {\n size: SIZE,\n orient: defs.length === 1 ? 'left' : 'right'\n }, style));\n }\n\n if (encoding.has(SHAPE) && encoding.field(SHAPE).legend) {\n if (defs.length === 2) {\n console.error('Vega-lite currently only supports two legends');\n }\n defs.push(legend.def(SHAPE, encoding, {\n shape: SHAPE,\n orient: defs.length === 1 ? 'left' : 'right'\n }, style));\n }\n return defs;\n};\n\nlegend.def = function(name, encoding, def, style) {\n var timeUnit = encoding.field(name).timeUnit;\n\n def.title = encoding.fieldTitle(name);\n def = legend.style(name, encoding, def, style);\n\n if (encoding.isType(name, T) &&\n timeUnit &&\n time.hasScale(timeUnit)\n ) {\n setter(def, ['properties', 'labels', 'text', 'scale'], 'time-'+ timeUnit);\n }\n\n return def;\n};\n\nlegend.style = function(name, e, def, style) {\n var symbols = getter(def, ['properties', 'symbols']),\n marktype = e.marktype();\n\n switch (marktype) {\n case 'bar':\n case 'tick':\n case 'text':\n symbols.stroke = {value: 'transparent'};\n symbols.shape = {value: 'square'};\n break;\n\n case 'circle':\n case 'square':\n symbols.shape = {value: marktype};\n /* fall through */\n case 'point':\n // fill or stroke\n if (e.field(SHAPE).filled) {\n if (e.has(COLOR) && name === COLOR) {\n symbols.fill = {scale: COLOR, field: 'data'};\n } else {\n symbols.fill = {value: e.value(COLOR)};\n }\n symbols.stroke = {value: 'transparent'};\n } else {\n if (e.has(COLOR) && name === COLOR) {\n symbols.stroke = {scale: COLOR, field: 'data'};\n } else {\n symbols.stroke = {value: e.value(COLOR)};\n }\n symbols.fill = {value: 'transparent'};\n symbols.strokeWidth = {value: e.config('strokeWidth')};\n }\n\n break;\n case 'line':\n case 'area':\n // TODO use shape here after implementing #508\n break;\n }\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if (opacity) {\n symbols.opacity = {value: opacity};\n }\n return def;\n};\n},{\"../globals\":36,\"../util\":39,\"./time\":31}],24:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar marks = module.exports = {};\n\nmarks.def = function(encoding, layout, style, stats) {\n\n var defs = [],\n mark = marks[encoding.marktype()];\n\n // to add a background to text, we need to add it before the text\n if (encoding.marktype() === TEXT && encoding.has(COLOR)) {\n var bg = {\n x: {value: 0},\n y: {value: 0},\n x2: {value: layout.cellWidth},\n y2: {value: layout.cellHeight},\n fill: {scale: COLOR, field: encoding.fieldRef(COLOR)}\n };\n defs.push({\n type: 'rect',\n from: {data: TABLE},\n properties: {enter: bg, update: bg}\n });\n }\n\n // add the mark def for the main thing\n var p = mark.prop(encoding, layout, style, stats);\n defs.push({\n type: mark.type,\n from: {data: TABLE},\n properties: {enter: p, update: p}\n });\n\n return defs;\n};\n\nmarks.bar = {\n type: 'rect',\n stack: true,\n prop: bar_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1}\n};\n\nmarks.line = {\n type: 'line',\n line: true,\n prop: line_props,\n requiredEncoding: ['x', 'y'],\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, detail:1}\n};\n\nmarks.area = {\n type: 'area',\n stack: true,\n line: true,\n requiredEncoding: ['x', 'y'],\n prop: area_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1}\n};\n\nmarks.tick = {\n type: 'rect',\n prop: tick_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, detail: 1}\n};\n\nmarks.circle = {\n type: 'symbol',\n prop: filled_point_props('circle'),\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, detail: 1}\n};\n\nmarks.square = {\n type: 'symbol',\n prop: filled_point_props('square'),\n supportedEncoding: marks.circle.supportedEncoding\n};\n\nmarks.point = {\n type: 'symbol',\n prop: point_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, shape: 1, detail: 1}\n};\n\nmarks.text = {\n type: 'text',\n prop: text_props,\n requiredEncoding: ['text'],\n supportedEncoding: {row: 1, col: 1, size: 1, color: 1, text: 1}\n};\n\nfunction bar_props(e, layout, style) {\n // jshint unused:false\n\n var p = {};\n\n // x's and width\n if (e.isMeasure(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n if (!e.has(Y) || e.isDimension(Y)) {\n p.x2 = {value: 0};\n }\n } else {\n if (e.has(X)) { // is ordinal\n p.xc = {scale: X, field: e.fieldRef(X)};\n } else {\n p.x = {value: 0, offset: e.config('singleBarOffset')};\n }\n }\n\n // width\n if (!p.x2) {\n if (!e.has(X) || e.isOrdinalScale(X)) { // no X or X is ordinal\n if (e.has(SIZE)) {\n p.width = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else {\n p.width = {\n value: e.bandSize(X, layout.x.useSmallBand),\n offset: -1\n };\n }\n } else { // X is Quant or Time Scale\n p.width = {value: 2};\n }\n }\n\n // y's & height\n if (e.isMeasure(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n p.y2 = {group: 'height'};\n } else {\n if (e.has(Y)) { // is ordinal\n p.yc = {scale: Y, field: e.fieldRef(Y)};\n } else {\n p.y2 = {group: 'height', offset: -e.config('singleBarOffset')};\n }\n\n if (e.has(SIZE)) {\n p.height = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else {\n p.height = {\n value: e.bandSize(Y, layout.y.useSmallBand),\n offset: -1\n };\n }\n }\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else {\n p.fill = {value: e.value(COLOR)};\n }\n\n // opacity\n var opacity = e.field(COLOR).opacity;\n if (opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction point_props(e, layout, style) {\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n p.x = {value: e.bandSize(X, layout.x.useSmallBand) / 2};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {value: e.bandSize(Y, layout.y.useSmallBand) / 2};\n }\n\n // size\n if (e.has(SIZE)) {\n p.size = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else if (!e.has(SIZE)) {\n p.size = {value: e.value(SIZE)};\n }\n\n // shape\n if (e.has(SHAPE)) {\n p.shape = {scale: SHAPE, field: e.fieldRef(SHAPE)};\n } else if (!e.has(SHAPE)) {\n p.shape = {value: e.value(SHAPE)};\n }\n\n // fill or stroke\n if (e.field(SHAPE).filled) {\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.fill = {value: e.value(COLOR)};\n }\n } else {\n if (e.has(COLOR)) {\n p.stroke = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.stroke = {value: e.value(COLOR)};\n }\n p.strokeWidth = {value: e.config('strokeWidth')};\n }\n\n // opacity\n var opacity = e.field(COLOR).opacity || style.opacity;\n if (opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction line_props(e,layout, style) {\n // jshint unused:false\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n p.x = {value: 0};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {group: 'height'};\n }\n\n // stroke\n if (e.has(COLOR)) {\n p.stroke = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.stroke = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity;\n if (opacity) p.opacity = {value: opacity};\n\n p.strokeWidth = {value: e.config('strokeWidth')};\n\n return p;\n}\n\nfunction area_props(e, layout, style) {\n // jshint unused:false\n var p = {};\n\n // x\n if (e.isMeasure(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n if (e.isDimension(Y)) {\n p.x2 = {scale: X, value: 0};\n p.orient = {value: 'horizontal'};\n }\n } else if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else {\n p.x = {value: 0};\n }\n\n // y\n if (e.isMeasure(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n p.y2 = {scale: Y, value: 0};\n } else if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else {\n p.y = {group: 'height'};\n }\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.fill = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity;\n if (opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction tick_props(e, layout, style) {\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n if (e.isDimension(X)) {\n p.x.offset = -e.bandSize(X, layout.x.useSmallBand) / 3;\n }\n } else if (!e.has(X)) {\n p.x = {value: 0};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n if (e.isDimension(Y)) {\n p.y.offset = -e.bandSize(Y, layout.y.useSmallBand) / 3;\n }\n } else if (!e.has(Y)) {\n p.y = {value: 0};\n }\n\n // width\n if (!e.has(X) || e.isDimension(X)) {\n p.width = {value: e.bandSize(X, layout.y.useSmallBand) / 1.5};\n } else {\n p.width = {value: 1};\n }\n\n // height\n if (!e.has(Y) || e.isDimension(Y)) {\n p.height = {value: e.bandSize(Y, layout.y.useSmallBand) / 1.5};\n } else {\n p.height = {value: 1};\n }\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else {\n p.fill = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if(opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction filled_point_props(shape) {\n return function(e, layout, style) {\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n p.x = {value: e.bandSize(X, layout.x.useSmallBand) / 2};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {value: e.bandSize(Y, layout.y.useSmallBand) / 2};\n }\n\n // size\n if (e.has(SIZE)) {\n p.size = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else if (!e.has(X)) {\n p.size = {value: e.value(SIZE)};\n }\n\n // shape\n p.shape = {value: shape};\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.fill = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if(opacity) p.opacity = {value: opacity};\n\n return p;\n };\n}\n\nfunction text_props(e, layout, style, stats) {\n var p = {},\n field = e.field(TEXT);\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n if (e.has(TEXT) && e.isType(TEXT, Q)) {\n p.x = {value: layout.cellWidth-5};\n } else {\n p.x = {value: e.bandSize(X, layout.x.useSmallBand) / 2};\n }\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {value: e.bandSize(Y, layout.y.useSmallBand) / 2};\n }\n\n // size\n if (e.has(SIZE)) {\n p.fontSize = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else if (!e.has(SIZE)) {\n p.fontSize = {value: field.font.size};\n }\n\n // fill\n // color should be set to background\n p.fill = {value: field.color};\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if(opacity) p.opacity = {value: opacity};\n\n // text\n if (e.has(TEXT)) {\n if (e.isType(TEXT, Q)) {\n var fieldStats = stats[e.fieldName(TEXT)],\n numberFormat = field.format || e.numberFormat(fieldStats);\n\n p.text = {template: '{{' + e.fieldRef(TEXT) + ' | number:\\'' +\n numberFormat +'\\'}}'};\n p.align = {value: field.align};\n } else {\n p.text = {field: e.fieldRef(TEXT)};\n }\n } else {\n p.text = {value: field.placeholder};\n }\n\n p.font = {value: field.font.family};\n p.fontWeight = {value: field.font.weight};\n p.fontStyle = {value: field.font.style};\n p.baseline = {value: field.baseline};\n\n return p;\n}\n\n},{\"../globals\":36}],25:[function(require,module,exports){\n'use strict';\nrequire('../globals');\nvar util = require('../util'),\n time = require('./time'),\n colorbrewer = require('colorbrewer'),\n interpolate = require('d3-color').interpolateHsl,\n schema = require('../schema/schema');\n\nvar scale = module.exports = {};\n\nscale.names = function(props) {\n return util.keys(util.keys(props).reduce(function(a, x) {\n if (props[x] && props[x].scale) a[props[x].scale] = 1;\n return a;\n }, {}));\n};\n\nscale.defs = function(names, encoding, layout, stats, style, sorting, opt) {\n opt = opt || {};\n\n return names.reduce(function(a, name) {\n var s = {\n name: name,\n type: scale.type(name, encoding),\n domain: scale.domain(name, encoding, stats, sorting, opt)\n };\n\n s.sort = scale.sort(s, encoding, name) || undefined;\n\n scale.range(s, encoding, layout, stats, opt);\n\n return (a.push(s), a);\n }, []);\n};\n\nscale.sort = function(s, encoding, name) {\n return s.type === 'ordinal' && (\n !!encoding.bin(name) ||\n encoding.sort(name).length === 0\n );\n};\n\nscale.type = function(name, encoding) {\n\n switch (encoding.type(name)) {\n case N: //fall through\n case O: return 'ordinal';\n case T:\n var timeUnit = encoding.field(name).timeUnit;\n return timeUnit ? time.scale.type(timeUnit, name) : 'time';\n case Q:\n if (encoding.bin(name)) {\n return name === COLOR ? 'linear' : 'ordinal';\n }\n return encoding.scale(name).type;\n }\n};\n\nscale.domain = function (name, encoding, stats, sorting, opt) {\n var field = encoding.field(name);\n\n if (encoding.isType(name, T)) {\n var range = time.scale.domain(field.timeUnit, name);\n if(range) return range;\n }\n\n if (field.bin) {\n // TODO(kanitw): this must be changed in vg2\n var fieldStat = stats[field.name],\n bins = util.getbins(fieldStat, field.bin.maxbins || schema.MAXBINS_DEFAULT),\n numbins = (bins.stop - bins.start) / bins.step;\n return util.range(numbins).map(function(i) {\n return bins.start + bins.step * i;\n });\n }\n\n if (name == opt.stack) {\n return {\n data: STACKED,\n field: encoding.fieldRef(name, {\n data: !encoding._vega2,\n prefn: (opt.facet ? 'max_' : '') + 'sum_'\n })\n };\n }\n var aggregate = encoding.aggregate(name),\n timeUnit = field.timeUnit,\n scaleUseRawDomain = encoding.scale(name).useRawDomain,\n useRawDomain = scaleUseRawDomain !== undefined ?\n scaleUseRawDomain : encoding.config('useRawDomain'),\n notCountOrSum = !aggregate || (aggregate !=='count' && aggregate !== 'sum');\n\n if ( useRawDomain && notCountOrSum && (\n // Q always uses non-ordinal scale except when it's binned and thus uses ordinal scale.\n (encoding.isType(name, Q) && !field.bin) ||\n // T uses non-ordinal scale when there's no unit or when the unit is not ordinal.\n (encoding.isType(name, T) && (!timeUnit || !time.isOrdinalFn(timeUnit)))\n )\n ) {\n return {data: RAW, field: encoding.fieldRef(name, {nofn: !timeUnit})};\n }\n\n return {data: sorting.getDataset(name), field: encoding.fieldRef(name)};\n};\n\n\nscale.range = function (s, encoding, layout, stats) {\n var spec = encoding.scale(s.name),\n field = encoding.field(s.name),\n timeUnit = field.timeUnit;\n\n switch (s.name) {\n case X:\n s.range = layout.cellWidth ? [0, layout.cellWidth] : 'width';\n if (s.type === 'ordinal') {\n s.bandWidth = encoding.bandSize(X, layout.x.useSmallBand);\n } else {\n if (encoding.isType(s.name,T) && timeUnit === 'year') {\n s.zero = false;\n } else {\n s.zero = spec.zero === undefined ? true : spec.zero;\n }\n\n s.reverse = spec.reverse;\n }\n s.round = true;\n if (s.type === 'time') {\n s.nice = timeUnit || encoding.config('timeScaleNice');\n }else {\n s.nice = true;\n }\n break;\n case Y:\n if (s.type === 'ordinal') {\n s.range = layout.cellHeight ?\n (field.bin ? [layout.cellHeight, 0] : [0, layout.cellHeight]) :\n 'height';\n s.bandWidth = encoding.bandSize(Y, layout.y.useSmallBand);\n } else {\n s.range = layout.cellHeight ? [layout.cellHeight, 0] : 'height';\n if (encoding.isType(s.name,T) && timeUnit === 'year') {\n s.zero = false;\n } else {\n s.zero = spec.zero === undefined ? true : spec.zero;\n }\n\n s.reverse = spec.reverse;\n }\n\n s.round = true;\n\n if (s.type === 'time') {\n s.nice = timeUnit || encoding.config('timeScaleNice');\n }else {\n s.nice = true;\n }\n break;\n case ROW: // support only ordinal\n s.bandWidth = layout.cellHeight;\n s.round = true;\n s.nice = true;\n break;\n case COL: // support only ordinal\n s.bandWidth = layout.cellWidth;\n s.round = true;\n s.nice = true;\n break;\n case SIZE:\n if (encoding.is('bar')) {\n // FIXME this is definitely incorrect\n // but let's fix it later since bar size is a bad encoding anyway\n s.range = [3, Math.max(encoding.bandSize(X), encoding.bandSize(Y))];\n } else if (encoding.is(TEXT)) {\n s.range = [8, 40];\n } else { //point\n var bandSize = Math.min(encoding.bandSize(X), encoding.bandSize(Y)) - 1;\n s.range = [10, 0.8 * bandSize*bandSize];\n }\n s.round = true;\n s.zero = false;\n break;\n case SHAPE:\n s.range = 'shapes';\n break;\n case COLOR:\n s.range = scale.color(s, encoding, stats);\n if (s.type !== 'ordinal') s.zero = false;\n break;\n default:\n throw new Error('Unknown encoding name: '+ s.name);\n }\n\n // FIXME(kanitw): Jul 29, 2015 - consolidate this with above\n switch (s.name) {\n case ROW:\n case COL:\n s.padding = encoding.config('cellPadding');\n s.outerPadding = 0;\n break;\n case X:\n case Y:\n if (s.type === 'ordinal') { //&& !s.bandWidth\n s.points = true;\n s.padding = encoding.field(s.name).band.padding;\n }\n }\n};\n\nscale.color = function(s, encoding, stats) {\n var colorScale = encoding.scale(COLOR),\n range = colorScale.range,\n cardinality = encoding.cardinality(COLOR, stats),\n type = encoding.type(COLOR);\n\n if (range === undefined) {\n var ordinalPalette = colorScale.ordinalPalette,\n quantitativeRange = colorScale.quantitativeRange;\n\n if (s.type === 'ordinal') {\n if (type === N) {\n // use categorical color scale\n if (cardinality <= 10) {\n range = colorScale.c10palette;\n } else {\n range = colorScale.c20palette;\n }\n return scale.color.palette(range, cardinality, type);\n } else {\n if (ordinalPalette) {\n return scale.color.palette(ordinalPalette, cardinality, type);\n }\n return scale.color.interpolate(quantitativeRange[0], quantitativeRange[1], cardinality);\n }\n } else { //time or quantitative\n return [quantitativeRange[0], quantitativeRange[1]];\n }\n }\n};\n\nscale.color.palette = function(range, cardinality, type) {\n // FIXME(kanitw): Jul 29, 2015 - check range is string\n switch (range) {\n case 'category10k':\n // tableau's category 10, ordered by perceptual kernel study results\n // https://github.com/uwdata/perceptual-kernels\n return ['#2ca02c', '#e377c2', '#7f7f7f', '#17becf', '#8c564b', '#d62728', '#bcbd22', '#9467bd', '#ff7f0e', '#1f77b4'];\n\n // d3/tableau category10/20/20b/20c\n case 'category10':\n return ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'];\n\n case 'category20':\n return ['#1f77b4', '#aec7e8', '#ff7f0e', '#ffbb78', '#2ca02c', '#98df8a', '#d62728', '#ff9896', '#9467bd', '#c5b0d5', '#8c564b', '#c49c94', '#e377c2', '#f7b6d2', '#7f7f7f', '#c7c7c7', '#bcbd22', '#dbdb8d', '#17becf', '#9edae5'];\n\n case 'category20b':\n return ['#393b79', '#5254a3', '#6b6ecf', '#9c9ede', '#637939', '#8ca252', '#b5cf6b', '#cedb9c', '#8c6d31', '#bd9e39', '#e7ba52', '#e7cb94', '#843c39', '#ad494a', '#d6616b', '#e7969c', '#7b4173', '#a55194', '#ce6dbd', '#de9ed6'];\n\n case 'category20c':\n return ['#3182bd', '#6baed6', '#9ecae1', '#c6dbef', '#e6550d', '#fd8d3c', '#fdae6b', '#fdd0a2', '#31a354', '#74c476', '#a1d99b', '#c7e9c0', '#756bb1', '#9e9ac8', '#bcbddc', '#dadaeb', '#636363', '#969696', '#bdbdbd', '#d9d9d9'];\n }\n\n // TODO add our own set of custom ordinal color palette\n\n if (range in colorbrewer) {\n var palette = colorbrewer[range];\n\n // if cardinality pre-defined, use it.\n if (cardinality in palette) return palette[cardinality];\n\n // if not, use the highest cardinality one for nominal\n if (type === N) {\n return palette[Math.max.apply(null, util.keys(palette))];\n }\n\n // otherwise, interpolate\n var ps = cardinality < 3 ? 3 : Math.max.apply(null, util.keys(palette)),\n from = 0 , to = ps - 1;\n // FIXME add config for from / to\n\n return scale.color.interpolate(palette[ps][from], palette[ps][to], cardinality);\n }\n\n return range;\n};\n\nscale.color.interpolate = function (start, end, cardinality) {\n\n var interpolator = interpolate(start, end);\n return util.range(cardinality).map(function(i) { return interpolator(i*1.0/(cardinality-1)); });\n};\n\n},{\"../globals\":36,\"../schema/schema\":37,\"../util\":39,\"./time\":31,\"colorbrewer\":3,\"d3-color\":4}],26:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar vlfield = require('../field');\n\nmodule.exports = addSortTransforms;\n\n// adds new transforms that produce sorted fields\nfunction addSortTransforms(data, encoding, stats, opt) {\n // jshint unused:false\n\n var datasetMapping = {};\n var counter = 0;\n\n encoding.forEach(function(field, encType) {\n var sortBy = encoding.sort(encType, stats);\n if (sortBy.length > 0) {\n var fields = sortBy.map(function(d) {\n return {\n op: d.aggregate,\n field: vlfield.fieldRef(d, {nofn: true, data: !encoding._vega2})\n };\n });\n\n var byClause = sortBy.map(function(d) {\n var reverse = (d.reverse ? '-' : '');\n return reverse + vlfield.fieldRef(d, {data: !encoding._vega2});\n });\n\n var dataName = 'sorted' + counter++;\n\n var transforms = [\n {\n type: 'aggregate',\n groupby: [ encoding.fieldRef(encType) ],\n fields: fields\n },\n {\n type: 'sort',\n by: byClause\n }\n ];\n\n data.push({\n name: dataName,\n source: RAW,\n transform: transforms\n });\n\n datasetMapping[encType] = dataName;\n }\n });\n\n return {\n getDataset: function(encType) {\n var data = datasetMapping[encType];\n if (!data) {\n return TABLE;\n }\n return data;\n }\n };\n}\n\n\n},{\"../field\":35,\"../globals\":36}],27:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar marks = require('./marks');\n\nmodule.exports = stacking;\n\nfunction stacking(data, encoding, mdef, facets) {\n if (!marks[encoding.marktype()].stack) return false;\n\n // TODO: add || encoding.has(LOD) here once LOD is implemented\n if (!encoding.has(COLOR)) return false;\n\n var dim=null, val=null, idx =null,\n isXMeasure = encoding.isMeasure(X),\n isYMeasure = encoding.isMeasure(Y);\n\n if (isXMeasure && !isYMeasure) {\n dim = Y;\n val = X;\n idx = 0;\n } else if (isYMeasure && !isXMeasure) {\n dim = X;\n val = Y;\n idx = 1;\n } else {\n return null; // no stack encoding\n }\n\n // add transform to compute sums for scale\n var stacked = {\n name: STACKED,\n source: TABLE,\n transform: [{\n type: 'aggregate',\n groupby: [encoding.fieldRef(dim)].concat(facets), // dim and other facets\n fields: [{op: 'sum', field: encoding.fieldRef(val)}] // TODO check if field with aggregate is correct?\n }]\n };\n\n if (facets && facets.length > 0) {\n stacked.transform.push({ //calculate max for each facet\n type: 'aggregate',\n groupby: facets,\n fields: [{\n op: 'max',\n field: encoding.fieldName(val, {fn: 'sum'})\n }]\n });\n }\n\n data.push(stacked);\n\n // add stack transform to mark\n mdef.from.transform = [{\n type: 'stack',\n point: encoding.fieldRef(dim),\n height: encoding.fieldRef(val),\n output: {y1: val, y0: val + '2'}\n }];\n\n // TODO: This is super hack-ish -- consolidate into modular mark properties?\n mdef.properties.update[val] = mdef.properties.enter[val] = {scale: val, field: val};\n mdef.properties.update[val + '2'] = mdef.properties.enter[val + '2'] = {scale: val, field: val + '2'};\n\n return val; //return stack encoding\n}\n\n},{\"../globals\":36,\"./marks\":24}],28:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar vlfield = require('../field');\n\nmodule.exports = function(encoding, stats) {\n return {\n opacity: estimateOpacity(encoding, stats),\n };\n};\n\nfunction estimateOpacity(encoding,stats) {\n if (!stats) {\n return 1;\n }\n\n var numPoints = 0;\n\n if (encoding.isAggregate()) { // aggregate plot\n numPoints = 1;\n\n // get number of points in each \"cell\"\n // by calculating product of cardinality\n // for each non faceting and non-ordinal X / Y fields\n // note that ordinal x,y are not include since we can\n // consider that ordinal x are subdividing the cell into subcells anyway\n encoding.forEach(function(field, encType) {\n\n if (encType !== ROW && encType !== COL &&\n !((encType === X || encType === Y) &&\n vlfield.isOrdinalScale(field))\n ) {\n numPoints *= encoding.cardinality(encType, stats);\n }\n });\n\n } else { // raw plot\n\n // TODO: error handling\n if (!stats['*'])\n return 1;\n\n numPoints = stats['*'].max; // count\n\n // small multiples divide number of points\n var numMultiples = 1;\n if (encoding.has(ROW)) {\n numMultiples *= encoding.cardinality(ROW, stats);\n }\n if (encoding.has(COL)) {\n numMultiples *= encoding.cardinality(COL, stats);\n }\n numPoints /= numMultiples;\n }\n\n var opacity = 0;\n if (numPoints <= 25) {\n opacity = 1;\n } else if (numPoints < 200) {\n opacity = 0.8;\n } else if (numPoints < 1000 || encoding.is('tick')) {\n opacity = 0.7;\n } else {\n opacity = 0.3;\n }\n\n return opacity;\n}\n\n\n},{\"../field\":35,\"../globals\":36}],29:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar groupdef = require('./group').def;\n\nmodule.exports = subfaceting;\n\nfunction subfaceting(group, mdef, details, stack, encoding) {\n var m = group.marks,\n g = groupdef('subfacet', {marks: m});\n\n group.marks = [g];\n g.from = mdef.from;\n delete mdef.from;\n\n //TODO test LOD -- we should support stack / line without color (LOD) field\n var trans = (g.from.transform || (g.from.transform = []));\n trans.unshift({type: 'facet', keys: details});\n\n if (stack && encoding.has(COLOR)) {\n trans.unshift({type: 'sort', by: encoding.fieldRef(COLOR)});\n }\n}\n\n},{\"../globals\":36,\"./group\":21}],30:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar groupdef = require('./group').def,\n vlfield = require('../field');\n\nmodule.exports = template;\n\nfunction template(encoding, layout, stats) {\n // jshint unused:false\n\n // TODO(kanitw): Jul 22, 2015 - split this file into data and template\n var data = {name: RAW, format: {}},\n table = {name: TABLE, source: RAW},\n dataUrl = encoding.data('url'),\n dataType = encoding.data('formatType'),\n values = encoding.data('values');\n\n if (encoding.hasValues()) {\n data.values = values;\n } else {\n data.url = dataUrl;\n data.format.type = dataType;\n }\n\n encoding.forEach(function(field, encType) {\n var name;\n if (field.type == T) {\n data.format.parse = data.format.parse || {};\n data.format.parse[field.name] = 'date';\n } else if (field.type == Q) {\n data.format.parse = data.format.parse || {};\n if (vlfield.isCount(field)) {\n name = 'count';\n } else {\n name = field.name;\n }\n data.format.parse[name] = 'number';\n }\n });\n\n return {\n width: layout.width,\n height: layout.height,\n padding: 'auto',\n data: [data, table],\n marks: [groupdef('cell', {\n width: layout.cellWidth ? {value: layout.cellWidth} : undefined,\n height: layout.cellHeight ? {value: layout.cellHeight} : undefined\n })]\n };\n}\n\n},{\"../field\":35,\"../globals\":36,\"./group\":21}],31:[function(require,module,exports){\n'use strict';\n\nvar util = require('../util'),\n d3_time_format = require('d3-time-format');\n\nmodule.exports = time;\n\nvar LONG_DATE = new Date(2014, 8, 17);\n\nfunction time(spec, encoding) { // FIXME refactor to reduce side effect #276\n // jshint unused:false\n var timeFields = {}, timeUnits = {};\n\n // find unique formula transformation and bin function\n encoding.forEach(function(field, encType) {\n if (field.type === T && field.timeUnit) {\n timeFields[encoding.fieldRef(encType)] = {\n field: field,\n encType: encType\n };\n timeUnits[field.timeUnit] = true;\n }\n });\n\n // add formula transform\n var data = spec.data[0],\n transform = data.transform = data.transform || [];\n\n for (var f in timeFields) {\n var tf = timeFields[f];\n time.transform(transform, encoding, tf.encType, tf.field);\n }\n\n // add scales\n var scales = spec.scales = spec.scales || [];\n for (var timeUnit in timeUnits) {\n var scale = time.scale.def(timeUnit, encoding);\n if (scale) scales.push(scale);\n }\n return spec;\n}\n\ntime.cardinality = function(field, stats, filterNull, type) {\n var timeUnit = field.timeUnit;\n switch (timeUnit) {\n case 'seconds': return 60;\n case 'minutes': return 60;\n case 'hours': return 24;\n case 'day': return 7;\n case 'date': return 31;\n case 'month': return 12;\n case 'year':\n var stat = stats[field.name],\n yearstat = stats['year_'+field.name];\n\n if (!yearstat) { return null; }\n\n return yearstat.distinct -\n (stat.nulls > 0 && filterNull[type] ? 1 : 0);\n }\n\n return null;\n};\n\ntime.maxLength = function(timeUnit, encoding) {\n switch (timeUnit) {\n case 'seconds':\n case 'minutes':\n case 'hours':\n case 'date':\n return 2;\n case 'month':\n case 'day':\n var range = time.range(timeUnit, encoding);\n if (range) {\n // return the longest name in the range\n return Math.max.apply(null, range.map(function(r) {return r.length;}));\n }\n return 2;\n case 'year':\n return 4; //'1998'\n }\n // no time unit\n var timeFormat = encoding.config('timeFormat');\n return d3_time_format.utcFormat(timeFormat)(LONG_DATE).length;\n};\n\nfunction fieldFn(func, field) {\n return 'utc' + func + '(d.data.'+ field.name +')';\n}\n\n/**\n * @return {String} date binning formula of the given field\n */\ntime.formula = function(field) {\n return fieldFn(field.timeUnit, field);\n};\n\n/** add formula transforms to data */\ntime.transform = function(transform, encoding, encType, field) {\n transform.push({\n type: 'formula',\n field: encoding.fieldRef(encType),\n expr: time.formula(field)\n });\n};\n\ntime.range = function(timeUnit, encoding) {\n var labelLength = encoding.config('timeScaleLabelLength'),\n scaleLabel;\n switch (timeUnit) {\n case 'day':\n scaleLabel = encoding.config('dayScaleLabel');\n break;\n case 'month':\n scaleLabel = encoding.config('monthScaleLabel');\n break;\n }\n if (scaleLabel) {\n return labelLength ? scaleLabel.map(\n function(s) { return s.substr(0, labelLength);}\n ) : scaleLabel;\n }\n return;\n};\n\n\ntime.scale = {};\n\n/** append custom time scales for axis label */\ntime.scale.def = function(timeUnit, encoding) {\n var range = time.range(timeUnit, encoding);\n\n if (range) {\n return {\n name: 'time-'+timeUnit,\n type: 'ordinal',\n domain: time.scale.domain(timeUnit),\n range: range\n };\n }\n return null;\n};\n\ntime.isOrdinalFn = function(timeUnit) {\n switch (timeUnit) {\n case 'seconds':\n case 'minutes':\n case 'hours':\n case 'day':\n case 'date':\n case 'month':\n return true;\n }\n return false;\n};\n\ntime.scale.type = function(timeUnit, name) {\n if (name === COLOR) {\n return 'linear'; // time has order, so use interpolated ordinal color scale.\n }\n\n return time.isOrdinalFn(timeUnit) || name === COL || name === ROW ? 'ordinal' : 'linear';\n};\n\ntime.scale.domain = function(timeUnit, name) {\n var isColor = name === COLOR;\n switch (timeUnit) {\n case 'seconds':\n case 'minutes': return isColor ? [0,59] : util.range(0, 60);\n case 'hours': return isColor ? [0,23] : util.range(0, 24);\n case 'day': return isColor ? [0,6] : util.range(0, 7);\n case 'date': return isColor ? [1,31] : util.range(1, 32);\n case 'month': return isColor ? [0,11] : util.range(0, 12);\n }\n return null;\n};\n\n/** whether a particular time function has custom scale for labels implemented in time.scale */\ntime.hasScale = function(timeUnit) {\n switch (timeUnit) {\n case 'day':\n case 'month':\n return true;\n }\n return false;\n};\n\n},{\"../util\":39,\"d3-time-format\":6}],32:[function(require,module,exports){\n'use strict';\n\nrequire('./globals');\n\nvar consts = module.exports = {};\n\nconsts.encodingTypes = [X, Y, ROW, COL, SIZE, SHAPE, COLOR, TEXT, DETAIL];\n\nconsts.shorthand = {\n delim: '|',\n assign: '=',\n type: ',',\n func: '_'\n};\n\n},{\"./globals\":36}],33:[function(require,module,exports){\n'use strict';\n\nrequire('./globals');\n\nvar stats = require('datalib/src/stats');\n\nvar vldata = module.exports = {};\n\n/** Mapping from datalib's inferred type to Vega-lite's type */\nvldata.types = {\n 'boolean': N,\n 'number': Q,\n 'integer': Q,\n 'date': T,\n 'string': N\n};\n\nvldata.stats = function(data) {\n var summary = stats.summary(data);\n\n return summary.reduce(function(s, profile) {\n s[profile.field] = profile;\n return s;\n }, {\n '*': {\n max: data.length,\n min: 0\n }\n });\n};\n},{\"./globals\":36,\"datalib/src/stats\":11}],34:[function(require,module,exports){\n// utility for enc\n\n'use strict';\n\nvar consts = require('./consts'),\n c = consts.shorthand,\n vlfield = require('./field'),\n util = require('./util'),\n schema = require('./schema/schema'),\n encTypes = schema.encTypes;\n\nvar vlenc = module.exports = {};\n\nvlenc.countRetinal = function(enc) {\n var count = 0;\n if (enc.color) count++;\n if (enc.size) count++;\n if (enc.shape) count++;\n return count;\n};\n\nvlenc.has = function(enc, encType) {\n var fieldDef = enc && enc[encType];\n return fieldDef && fieldDef.name;\n};\n\nvlenc.isAggregate = function(enc) {\n for (var k in enc) {\n if (vlenc.has(enc, k) && enc[k].aggregate) {\n return true;\n }\n }\n return false;\n};\n\nvlenc.forEach = function(enc, f) {\n var i = 0;\n encTypes.forEach(function(k) {\n if (vlenc.has(enc, k)) {\n f(enc[k], k, i++);\n }\n });\n};\n\nvlenc.map = function(enc, f) {\n var arr = [];\n encTypes.forEach(function(k) {\n if (vlenc.has(enc, k)) {\n arr.push(f(enc[k], k, enc));\n }\n });\n return arr;\n};\n\nvlenc.reduce = function(enc, f, init) {\n var r = init;\n encTypes.forEach(function(k) {\n if (vlenc.has(enc, k)) {\n r = f(r, enc[k], k, enc);\n }\n });\n return r;\n};\n\n/*\n * return key-value pairs of field name and list of fields of that field name\n */\nvlenc.fields = function(enc) {\n return vlenc.reduce(enc, function (m, field) {\n var fieldList = m[field.name] = m[field.name] || [],\n containsType = fieldList.containsType = fieldList.containsType || {};\n\n if (fieldList.indexOf(field) === -1) {\n fieldList.push(field);\n // augment the array with containsType.Q / O / N / T\n containsType[field.type] = true;\n }\n return m;\n }, {});\n};\n\nvlenc.shorthand = function(enc) {\n return vlenc.map(enc, function(field, et) {\n return et + c.assign + vlfield.shorthand(field);\n }).join(c.delim);\n};\n\nvlenc.fromShorthand = function(shorthand) {\n var enc = util.isArray(shorthand) ? shorthand : shorthand.split(c.delim);\n return enc.reduce(function(m, e) {\n var split = e.split(c.assign),\n enctype = split[0].trim(),\n field = split[1];\n\n m[enctype] = vlfield.fromShorthand(field);\n return m;\n }, {});\n};\n},{\"./consts\":32,\"./field\":35,\"./schema/schema\":37,\"./util\":39}],35:[function(require,module,exports){\n'use strict';\n\n// utility for field\n\nrequire('./globals');\n\nvar consts = require('./consts'),\n c = consts.shorthand,\n time = require('./compiler/time'),\n util = require('./util'),\n schema = require('./schema/schema');\n\nvar vlfield = module.exports = {};\n\n/**\n * @param field\n * @param opt\n * opt.nofn -- exclude bin, aggregate, timeUnit\n * opt.data - include 'data.'\n * opt.fn - replace fn with custom function prefix\n * opt.prefn - prepend fn with custom function prefix\n\n * @return {[type]} [description]\n */\nvlfield.fieldRef = function(field, opt) {\n opt = opt || {};\n\n var f = (opt.data ? 'data.' : '') + (opt.prefn || ''),\n nofn = opt.nofn || opt.fn,\n name = field.name;\n\n if (vlfield.isCount(field)) {\n return f + 'count';\n } else if (!nofn && field.bin) {\n return f + 'bin_' + name;\n } else if (!nofn && field.aggregate) {\n return f + field.aggregate + '_' + name;\n } else if (!nofn && field.timeUnit) {\n return f + field.timeUnit + '_' + name;\n } else if (opt.fn) {\n return f + opt.fn + '_' + name;\n } else {\n return f + name;\n }\n};\n\nvlfield.shorthand = function(f) {\n var c = consts.shorthand;\n return (f.aggregate ? f.aggregate + c.func : '') +\n (f.timeUnit ? f.timeUnit + c.func : '') +\n (f.bin ? 'bin' + c.func : '') +\n (f.name || '') + c.type + f.type;\n};\n\nvlfield.shorthands = function(fields, delim) {\n delim = delim || c.delim;\n return fields.map(vlfield.shorthand).join(delim);\n};\n\nvlfield.fromShorthand = function(shorthand) {\n var split = shorthand.split(c.type), i;\n var o = {\n name: split[0].trim(),\n type: split[1].trim()\n };\n\n // check aggregate type\n for (i in schema.aggregate.enum) {\n var a = schema.aggregate.enum[i];\n if (o.name.indexOf(a + '_') === 0) {\n o.name = o.name.substr(a.length + 1);\n if (a == 'count' && o.name.length === 0) o.name = '*';\n o.aggregate = a;\n break;\n }\n }\n\n // check time timeUnit\n for (i in schema.timefns) {\n var tu = schema.timefns[i];\n if (o.name && o.name.indexOf(tu + '_') === 0) {\n o.name = o.name.substr(o.length + 1);\n o.timeUnit = tu;\n break;\n }\n }\n\n // check bin\n if (o.name && o.name.indexOf('bin_') === 0) {\n o.name = o.name.substr(4);\n o.bin = true;\n }\n\n return o;\n};\n\nvar isType = vlfield.isType = function (fieldDef, type) {\n return fieldDef.type === type;\n};\n\nvar isTypes = vlfield.isTypes = function (fieldDef, types) {\n for (var t=0; t 0 && filterNull[type] ? 1 : 0);\n};\n\n},{\"./compiler/time\":31,\"./consts\":32,\"./globals\":36,\"./schema/schema\":37,\"./util\":39}],36:[function(require,module,exports){\n(function (global){\n'use strict';\n\n// declare global constant\nvar g = global || window;\n\ng.TABLE = 'table';\ng.RAW = 'raw';\ng.STACKED = 'stacked';\ng.INDEX = 'index';\n\ng.X = 'x';\ng.Y = 'y';\ng.ROW = 'row';\ng.COL = 'col';\ng.SIZE = 'size';\ng.SHAPE = 'shape';\ng.COLOR = 'color';\ng.TEXT = 'text';\ng.DETAIL = 'detail';\n\ng.N = 'N';\ng.O = 'O';\ng.Q = 'Q';\ng.T = 'T';\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],37:[function(require,module,exports){\n// Package of defining Vega-lite Specification's json schema\n'use strict';\n\nrequire('../globals');\n\nvar schema = module.exports = {},\n util = require('../util'),\n toMap = util.toMap,\n colorbrewer = require('colorbrewer');\n\nschema.util = require('./schemautil');\n\nschema.marktype = {\n type: 'string',\n enum: ['point', 'tick', 'bar', 'line', 'area', 'circle', 'square', 'text']\n};\n\nschema.aggregate = {\n type: 'string',\n enum: ['avg', 'sum', 'median', 'min', 'max', 'count'],\n supportedEnums: {\n Q: ['avg', 'median', 'sum', 'min', 'max', 'count'],\n O: ['median','min','max'],\n N: [],\n T: ['avg', 'median', 'min', 'max'],\n '': ['count']\n },\n supportedTypes: toMap([Q, N, O, T, ''])\n};\n\nschema.getSupportedRole = function(encType) {\n return schema.schema.properties.encoding.properties[encType].supportedRole;\n};\n\nschema.timeUnits = ['year', 'month', 'day', 'date', 'hours', 'minutes', 'seconds'];\n\nschema.defaultTimeFn = 'month';\n\nschema.timeUnit = {\n type: 'string',\n enum: schema.timeUnits,\n supportedTypes: toMap([T])\n};\n\nschema.scale_type = {\n type: 'string',\n // TODO(kanitw) read vega's schema here, add description\n enum: ['linear', 'log', 'pow', 'sqrt', 'quantile'],\n default: 'linear',\n supportedTypes: toMap([Q])\n};\n\nschema.field = {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n }\n }\n};\n\nvar clone = util.duplicate;\nvar merge = schema.util.merge;\n\nschema.MAXBINS_DEFAULT = 15;\n\nvar bin = {\n type: ['boolean', 'object'],\n default: false,\n properties: {\n maxbins: {\n type: 'integer',\n default: schema.MAXBINS_DEFAULT,\n minimum: 2,\n description: 'Maximum number of bins.'\n }\n },\n supportedTypes: toMap([Q]) // TODO: add O after finishing #81\n};\n\nvar typicalField = merge(clone(schema.field), {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: [N, O, Q, T]\n },\n aggregate: schema.aggregate,\n timeUnit: schema.timeUnit,\n bin: bin,\n scale: {\n type: 'object',\n properties: {\n type: schema.scale_type,\n reverse: {\n type: 'boolean',\n default: false,\n supportedTypes: toMap([Q, T])\n },\n zero: {\n type: 'boolean',\n description: 'Include zero',\n default: true,\n supportedTypes: toMap([Q, T])\n },\n nice: {\n type: 'string',\n enum: ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'],\n supportedTypes: toMap([T])\n },\n useRawDomain: {\n type: 'boolean',\n default: undefined,\n description: 'Use the raw data range as scale domain instead of ' +\n 'aggregated data for aggregate axis. ' +\n 'This option does not work with sum or count aggregate' +\n 'as they might have a substantially larger scale range.' +\n 'By default, use value from config.useRawDomain.'\n }\n }\n }\n }\n});\n\nvar onlyOrdinalField = merge(clone(schema.field), {\n type: 'object',\n supportedRole: {\n dimension: true\n },\n properties: {\n type: {\n type: 'string',\n enum: [N, O, Q, T] // ordinal-only field supports Q when bin is applied and T when time unit is applied.\n },\n timeUnit: schema.timeUnit,\n bin: bin,\n aggregate: {\n type: 'string',\n enum: ['count'],\n supportedTypes: toMap([N, O]) // FIXME this looks weird to me\n }\n }\n});\n\nvar axisMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true},\n properties: {\n axis: {\n type: 'object',\n properties: {\n grid: {\n type: 'boolean',\n default: true,\n description: 'A flag indicate if gridlines should be created in addition to ticks.'\n },\n layer: {\n type: 'string',\n default: 'back',\n description: 'A string indicating if the axis (and any gridlines) should be placed above or below the data marks.'\n },\n orient: {\n type: 'string',\n default: undefined,\n enum: ['top', 'right', 'left', 'bottom'],\n description: 'The orientation of the axis. One of top, bottom, left or right. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart).'\n },\n ticks :{\n type: 'integer',\n default: 5,\n description: 'A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale\\'s range.'\n },\n title: {\n type: 'string',\n default: undefined,\n description: 'A title for the axis. (Shows field name and its function by default.)'\n },\n titleMaxLength: {\n type: 'integer',\n default: undefined,\n description: 'Max length for axis title if the title is automatically generated from the field\\'s description'\n },\n titleOffset: {\n type: 'integer',\n default: undefined, // auto\n description: 'A title offset value for the axis.'\n },\n format: {\n type: 'string',\n default: undefined, // auto\n description: 'The formatting pattern for axis labels. '+\n 'If not undefined, this will be determined by ' +\n 'small/largeNumberFormat and the max value ' +\n 'of the field.'\n },\n maxLabelLength: {\n type: 'integer',\n default: 25,\n minimum: 0,\n description: 'Truncate labels that are too long.'\n }\n }\n }\n }\n};\n\nvar sortMixin = {\n type: 'object',\n properties: {\n sort: {\n type: 'array',\n default: [],\n items: {\n type: 'object',\n supportedTypes: toMap([N, O]),\n required: ['name', 'aggregate'],\n properties: {\n name: {\n type: 'string'\n },\n aggregate: {\n type: 'string',\n enum: ['avg', 'sum', 'min', 'max', 'count']\n },\n reverse: {\n type: 'boolean',\n default: false\n }\n }\n }\n }\n }\n};\n\nvar bandMixin = {\n type: 'object',\n properties: {\n band: {\n type: 'object',\n properties: {\n size: {\n type: 'integer',\n minimum: 0,\n default: undefined\n },\n padding: {\n type: 'integer',\n minimum: 0,\n default: 1\n }\n }\n }\n }\n};\n\nvar legendMixin = {\n type: 'object',\n properties: {\n legend: {\n type: 'boolean',\n default: true\n }\n }\n};\n\nvar textMixin = {\n type: 'object',\n supportedMarktypes: {'text': true},\n properties: {\n align: {\n type: 'string',\n default: 'right'\n },\n baseline: {\n type: 'string',\n default: 'middle'\n },\n color: {\n type: 'string',\n role: 'color',\n default: '#000000'\n },\n margin: {\n type: 'integer',\n default: 4,\n minimum: 0\n },\n placeholder: {\n type: 'string',\n default: 'Abc'\n },\n font: {\n type: 'object',\n properties: {\n weight: {\n type: 'string',\n enum: ['normal', 'bold'],\n default: 'normal'\n },\n size: {\n type: 'integer',\n default: 10,\n minimum: 0\n },\n family: {\n type: 'string',\n default: 'Helvetica Neue'\n },\n style: {\n type: 'string',\n default: 'normal',\n enum: ['normal', 'italic']\n }\n }\n },\n format: {\n type: 'string',\n default: undefined, // auto\n description: 'The formatting pattern for text value. '+\n 'If not undefined, this will be determined by ' +\n 'small/largeNumberFormat and the max value ' +\n 'of the field.'\n },\n }\n};\n\nvar sizeMixin = {\n type: 'object',\n supportedMarktypes: {point: true, bar: true, circle: true, square: true, text: true},\n properties: {\n value: {\n type: 'integer',\n default: 30,\n minimum: 0\n }\n }\n};\n\nvar colorMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true, 'text': true},\n properties: {\n value: {\n type: 'string',\n role: 'color',\n default: 'steelblue'\n },\n opacity: {\n type: 'number',\n default: undefined, // auto\n minimum: 0,\n maximum: 1\n },\n scale: {\n type: 'object',\n properties: {\n range: {\n type: ['string', 'array'],\n default: undefined,\n description:\n 'color palette, if undefined vega-lite will use data property' +\n 'to pick one from c10palette, c20palette, or ordinalPalette'\n //FIXME\n },\n c10palette: {\n type: 'string',\n default: 'category10',\n enum: [\n // Tableau\n 'category10', 'category10k',\n // Color Brewer\n 'Pastel1', 'Pastel2', 'Set1', 'Set2', 'Set3'\n ]\n },\n c20palette: {\n type: 'string',\n default: 'category20',\n enum: ['category20', 'category20b', 'category20c']\n },\n ordinalPalette: {\n type: 'string',\n default: undefined,\n enum: util.keys(colorbrewer)\n },\n quantitativeRange: {\n type: 'array',\n default: ['#AFC6A3', '#09622A'], // tableau greens\n // default: ['#ccece6', '#00441b'], // BuGn.9 [2-8]\n items: {\n type: 'string',\n role: 'color'\n }\n }\n }\n }\n }\n};\n\nvar shapeMixin = {\n type: 'object',\n supportedMarktypes: {point: true, circle: true, square: true},\n properties: {\n value: {\n type: 'string',\n enum: ['circle', 'square', 'cross', 'diamond', 'triangle-up', 'triangle-down'],\n default: 'circle'\n },\n filled: {\n type: 'boolean',\n default: false,\n description: 'whether the shape\\'s color should be used as fill color instead of stroke color'\n }\n }\n};\n\nvar detailMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, line: true, circle: true, square: true}\n};\n\nvar rowMixin = {\n properties: {\n height: {\n type: 'number',\n minimum: 0,\n default: 150\n }\n }\n};\n\nvar colMixin = {\n properties: {\n width: {\n type: 'number',\n minimum: 0,\n default: 150\n },\n axis: {\n properties: {\n maxLabelLength: {\n type: 'integer',\n default: 12,\n minimum: 0,\n description: 'Truncate labels that are too long.'\n }\n }\n }\n }\n};\n\nvar facetMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true, text: true},\n properties: {\n padding: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n default: 0.1\n }\n }\n};\n\nvar requiredNameType = {\n required: ['name', 'type']\n};\n\nvar multiRoleField = merge(clone(typicalField), {\n supportedRole: {\n measure: true,\n dimension: true\n }\n});\n\nvar quantitativeField = merge(clone(typicalField), {\n supportedRole: {\n measure: true,\n dimension: 'ordinal-only' // using size to encoding category lead to order interpretation\n }\n});\n\nvar onlyQuantitativeField = merge(clone(typicalField), {\n supportedRole: {\n measure: true\n }\n});\n\nvar x = merge(clone(multiRoleField), axisMixin, bandMixin, requiredNameType, sortMixin);\nvar y = clone(x);\n\nvar facet = merge(clone(onlyOrdinalField), requiredNameType, facetMixin, sortMixin);\nvar row = merge(clone(facet), axisMixin, rowMixin);\nvar col = merge(clone(facet), axisMixin, colMixin);\n\nvar size = merge(clone(quantitativeField), legendMixin, sizeMixin, sortMixin);\nvar color = merge(clone(multiRoleField), legendMixin, colorMixin, sortMixin);\n\nvar shape = merge(clone(onlyOrdinalField), legendMixin, shapeMixin, sortMixin);\nvar detail = merge(clone(onlyOrdinalField), detailMixin, sortMixin);\n\n// we only put aggregated measure in pivot table\nvar text = merge(clone(onlyQuantitativeField), textMixin, sortMixin);\n\n// TODO add label\n\nvar filter = {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n operands: {\n type: 'array',\n items: {\n type: ['string', 'boolean', 'integer', 'number']\n }\n },\n operator: {\n type: 'string',\n enum: ['>', '>=', '=', '!=', '<', '<=', 'notNull']\n }\n }\n }\n};\n\nvar data = {\n type: 'object',\n properties: {\n // data source\n formatType: {\n type: 'string',\n enum: ['json', 'csv'],\n default: 'json'\n },\n url: {\n type: 'string',\n default: undefined\n },\n values: {\n type: 'array',\n default: undefined,\n description: 'Pass array of objects instead of a url to a file.',\n items: {\n type: 'object',\n additionalProperties: true\n }\n }\n }\n};\n\nvar config = {\n type: 'object',\n properties: {\n // template\n width: {\n type: 'integer',\n default: undefined\n },\n height: {\n type: 'integer',\n default: undefined\n },\n viewport: {\n type: 'array',\n items: {\n type: 'integer'\n },\n default: undefined\n },\n gridColor: {\n type: 'string',\n role: 'color',\n default: 'black'\n },\n gridOpacity: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n default: 0.08\n },\n\n // filter null\n filterNull: {\n type: 'object',\n properties: {\n O: {type:'boolean', default: false},\n Q: {type:'boolean', default: true},\n T: {type:'boolean', default: true}\n }\n },\n toggleSort: {\n type: 'string',\n default: O\n },\n\n // single plot\n singleHeight: {\n // will be overwritten by bandWidth * (cardinality + padding)\n type: 'integer',\n default: 200,\n minimum: 0\n },\n singleWidth: {\n // will be overwritten by bandWidth * (cardinality + padding)\n type: 'integer',\n default: 200,\n minimum: 0\n },\n // band size\n largeBandSize: {\n type: 'integer',\n default: 21,\n minimum: 0\n },\n smallBandSize: {\n //small multiples or single plot with high cardinality\n type: 'integer',\n default: 12,\n minimum: 0\n },\n largeBandMaxCardinality: {\n type: 'integer',\n default: 10\n },\n // small multiples\n cellPadding: {\n type: 'number',\n default: 0.1\n },\n cellGridColor: {\n type: 'string',\n role: 'color',\n default: 'black'\n },\n cellGridOpacity: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n default: 0.15\n },\n cellBackgroundColor: {\n type: 'string',\n role: 'color',\n default: 'transparent'\n },\n textCellWidth: {\n type: 'integer',\n default: 90,\n minimum: 0\n },\n\n // marks\n strokeWidth: {\n type: 'integer',\n default: 2,\n minimum: 0\n },\n singleBarOffset: {\n type: 'integer',\n default: 5,\n minimum: 0\n },\n // scales\n timeScaleLabelLength: {\n type: 'integer',\n default: 3,\n minimum: 0,\n description: 'Max length for values in dayScaleLabel and monthScaleLabel. Zero means using full names in dayScaleLabel/monthScaleLabel.'\n },\n dayScaleLabel: {\n type: 'array',\n items: {\n type: 'string'\n },\n default: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n description: 'Axis labels for day of week, starting from Sunday.' +\n '(Consistent with Javascript -- See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay.'\n },\n monthScaleLabel: {\n type: 'array',\n items: {\n type: 'string'\n },\n default: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n description: 'Axis labels for month.'\n },\n // other\n characterWidth: {\n type: 'integer',\n default: 6\n },\n maxSmallNumber: {\n type: 'number',\n default: 10000,\n description: 'maximum number that a field will be considered smallNumber.'+\n 'Used for axis labelling.'\n },\n smallNumberFormat: {\n type: 'string',\n default: '',\n description: 'D3 Number format for axis labels and text tables '+\n 'for number <= maxSmallNumber. Used for axis labelling.'\n },\n largeNumberFormat: {\n type: 'string',\n default: '.3s',\n description: 'D3 Number format for axis labels and text tables ' +\n 'for number > maxSmallNumber.'\n },\n timeFormat: {\n type: 'string',\n default: '%Y-%m-%d',\n description: 'Date format for axis labels.'\n },\n useRawDomain: {\n type: 'boolean',\n default: false,\n description: 'Use the raw data range as scale domain instead of ' +\n 'aggregated data for aggregate axis. ' +\n 'This option does not work with sum or count aggregate' +\n 'as they might have a substantially larger scale range.' +\n 'By default, use value from config.useRawDomain.'\n }\n }\n};\n\n/** @type Object Schema of a vega-lite specification */\nschema.schema = {\n $schema: 'http://json-schema.org/draft-04/schema#',\n description: 'Schema for Vega-lite specification',\n type: 'object',\n required: ['marktype', 'encoding', 'data'],\n properties: {\n data: data,\n marktype: schema.marktype,\n encoding: {\n type: 'object',\n properties: {\n x: x,\n y: y,\n row: row,\n col: col,\n size: size,\n color: color,\n shape: shape,\n text: text,\n detail: detail\n }\n },\n filter: filter,\n config: config\n }\n};\n\nschema.encTypes = util.keys(schema.schema.properties.encoding.properties);\n\n/** Instantiate a verbose vl spec from the schema */\nschema.instantiate = function() {\n return schema.util.instantiate(schema.schema);\n};\n\n},{\"../globals\":36,\"../util\":39,\"./schemautil\":38,\"colorbrewer\":3}],38:[function(require,module,exports){\n'use strict';\n\nvar schemautil = module.exports = {},\n util = require('../util');\n\nvar isEmpty = function(obj) {\n return Object.keys(obj).length === 0;\n};\n\nschemautil.extend = function(instance, schema) {\n return schemautil.merge(schemautil.instantiate(schema), instance);\n};\n\n// instantiate a schema\nschemautil.instantiate = function(schema) {\n var val;\n if (schema === undefined) {\n return undefined;\n } else if ('default' in schema) {\n val = schema.default;\n return util.isObject(val) ? util.duplicate(val) : val;\n } else if (schema.type === 'object') {\n var instance = {};\n for (var name in schema.properties) {\n val = schemautil.instantiate(schema.properties[name]);\n if (val !== undefined) {\n instance[name] = val;\n }\n }\n return instance;\n } else if (schema.type === 'array') {\n return [];\n }\n return undefined;\n};\n\n// remove all defaults from an instance\nschemautil.subtract = function(instance, defaults) {\n var changes = {};\n for (var prop in instance) {\n var def = defaults[prop];\n var ins = instance[prop];\n // Note: does not properly subtract arrays\n if (!defaults || def !== ins) {\n if (typeof ins === 'object' && !util.isArray(ins) && def) {\n var c = schemautil.subtract(ins, def);\n if (!isEmpty(c))\n changes[prop] = c;\n } else if (!util.isArray(ins) || ins.length > 0) {\n changes[prop] = ins;\n }\n }\n }\n return changes;\n};\n\nschemautil.merge = function(/*dest*, src0, src1, ...*/){\n var dest = arguments[0];\n for (var i=1 ; i> 16 & 0xff, n >> 8 & 0xff, n & 0xff);\n }\n\n function Hsl(h, s, l) {\n this.h = +h;\n this.s = Math.max(0, Math.min(1, +s));\n this.l = Math.max(0, Math.min(1, +l));\n }\n\n var __prototype = Hsl.prototype = new Color;\n\n __prototype.brighter = function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k);\n };\n\n __prototype.darker = function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k);\n };/* From FvD 13.37, CSS Color Module Level 3 */\n\n function hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n }\n\n __prototype.rgb = function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l <= .5 ? l * (1 + s) : l + s - l * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2)\n );\n };\n\n var hsl = function(h, s, l) {\n if (arguments.length === 1) {\n if (h instanceof Hsl) {\n l = h.l;\n s = h.s;\n h = h.h;\n } else {\n if (!(h instanceof Color)) h = color(h);\n if (h) {\n if (h instanceof Hsl) return h;\n h = h.rgb();\n var r = h.r / 255,\n g = h.g / 255,\n b = h.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n range = max - min;\n l = (max + min) / 2;\n if (range) {\n s = l < .5 ? range / (max + min) : range / (2 - max - min);\n if (r === max) h = (g - b) / range + (g < b) * 6;\n else if (g === max) h = (b - r) / range + 2;\n else h = (r - g) / range + 4;\n h *= 60;\n } else {\n h = NaN;\n s = l > 0 && l < 1 ? 0 : h;\n }\n } else {\n h = s = l = NaN;\n }\n }\n }\n return new Hsl(h, s, l);\n }\n\n var reHex3 = /^#([0-9a-f]{3})$/,\n reHex6 = /^#([0-9a-f]{6})$/,\n reRgbInteger = /^rgb\\(\\s*([-+]?\\d+)\\s*,\\s*([-+]?\\d+)\\s*,\\s*([-+]?\\d+)\\s*\\)$/,\n reRgbPercent = /^rgb\\(\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*\\)$/,\n reHslPercent = /^hsl\\(\\s*([-+]?\\d+(?:\\.\\d+)?)\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*\\)$/;\n\n var color = function(format) {\n var m;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf))) // #f00\n : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000\n : (m = reRgbInteger.exec(format)) ? rgb(m[1], m[2], m[3]) // rgb(255,0,0)\n : (m = reRgbPercent.exec(format)) ? rgb(m[1] * 2.55, m[2] * 2.55, m[3] * 2.55) // rgb(100%,0%,0%)\n : (m = reHslPercent.exec(format)) ? hsl(m[1], m[2] * .01, m[3] * .01) // hsl(120,50%,50%)\n : named.has(format) ? rgbn(named.get(format))\n : null;\n }// Done lazily to avoid circular dependency between Color, Rgb and Hsl.\n\n color.prototype = Color.prototype;\n rgb.prototype = Rgb.prototype;\n hsl.prototype = Hsl.prototype;\n\n function Lab(l, a, b) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n }\n\n var ___prototype = Lab.prototype = new Color;\n\n var Kn = 18;\n\n ___prototype.brighter = function(k) {\n return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b);\n };\n\n ___prototype.darker = function(k) {\n return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b);\n };\n\n function xyz2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n }\n\n var Xn = 0.950470, // D65 standard referent\n Yn = 1,\n Zn = 1.088830,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\n function lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n }\n\n ___prototype.rgb = function() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n y = Yn * lab2xyz(y);\n x = Xn * lab2xyz(x);\n z = Zn * lab2xyz(z);\n return new Rgb(\n xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z)\n );\n };\n\n function xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n }\n\n function rgb2xyz(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n }\n\n var deg2rad = Math.PI / 180;\n\n function Hcl(h, c, l) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n }\n\n var ____prototype = Hcl.prototype = new Color;\n\n ____prototype.brighter = function(k) {\n return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k));\n };\n\n ____prototype.darker = function(k) {\n return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k));\n };\n\n ____prototype.rgb = function() {\n return lab(this).rgb();\n };\n\n var lab = function(l, a, b) {\n if (arguments.length === 1) {\n if (l instanceof Lab) {\n b = l.b;\n a = l.a;\n l = l.l;\n } else if (l instanceof Hcl) {\n var h = l.h * deg2rad;\n b = Math.sin(h) * l.c;\n a = Math.cos(h) * l.c;\n l = l.l;\n } else {\n if (!(l instanceof Rgb)) l = rgb(l);\n var r = rgb2xyz(l.r),\n g = rgb2xyz(l.g),\n b = rgb2xyz(l.b),\n x = xyz2lab((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / Xn),\n y = xyz2lab((0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / Yn),\n z = xyz2lab((0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / Zn);\n b = 200 * (y - z);\n a = 500 * (x - y);\n l = 116 * y - 16;\n }\n }\n return new Lab(l, a, b);\n }\n lab.prototype = Lab.prototype;\n var rad2deg = 180 / Math.PI;\n\n var hcl = function(h, c, l) {\n if (arguments.length === 1) {\n if (h instanceof Hcl) {\n l = h.l;\n c = h.c;\n h = h.h;\n } else {\n if (!(h instanceof Lab)) h = lab(h);\n l = h.l;\n c = Math.sqrt(h.a * h.a + h.b * h.b);\n h = Math.atan2(h.b, h.a) * rad2deg;\n if (h < 0) h += 360;\n }\n }\n return new Hcl(h, c, l);\n }\n hcl.prototype = Hcl.prototype;\n\n function Cubehelix(h, s, l) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n }\n\n var prototype = Cubehelix.prototype = new Color;\n\n prototype.brighter = function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Cubehelix(this.h, this.s, this.l * k);\n };\n\n prototype.darker = function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Cubehelix(this.h, this.s, this.l * k);\n };\n\n var gamma = 1, // Default gamma. TODO Customize.\n A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\n var cubehelix = function(h, s, l) {\n if (arguments.length === 1) {\n if (h instanceof Cubehelix) {\n l = h.l;\n s = h.s;\n h = h.h;\n } else {\n if (!(h instanceof Rgb)) h = rgb(h);\n var r = h.r / 255, g = h.g / 255, b = h.b / 255;\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB);\n var bl = b - l, k = (E * (g - l) - C * bl) / D, lgamma = Math.pow(l, gamma);\n s = Math.sqrt(k * k + bl * bl) / (E * lgamma * (1 - lgamma)); // NaN if lgamma=0 or lgamma=1\n h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n if (h < 0) h += 360;\n }\n }\n return new Cubehelix(h, s, l);\n }\n\n prototype.rgb = function() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n l = Math.pow(this.l, gamma),\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new Rgb(\n 255 * (l + a * (A * cosh + B * sinh)),\n 255 * (l + a * (C * cosh + D * sinh)),\n 255 * (l + a * (E * cosh))\n );\n };\n cubehelix.prototype = Cubehelix.prototype;\n\n var interpolateCubehelixLong = function(a, b) {\n a = cubehelix(a);\n b = cubehelix(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : b.h - ah,\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n var deltaHue = function(h, h0) {\n var delta = (h - h0) % 360;\n return delta + (delta > 180 ? -360 : delta < -180 ? 360 : 0);\n }\n\n var interpolateCubehelix = function(a, b) {\n a = cubehelix(a);\n b = cubehelix(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : deltaHue(b.h, ah),\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateHclLong = function(a, b) {\n a = hcl(a);\n b = hcl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n ac = isNaN(a.c) ? b.c : a.c,\n al = a.l,\n bh = isNaN(b.h) ? 0 : b.h - ah,\n bc = isNaN(b.c) ? 0 : b.c - ac,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.c = ac + bc * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateHcl = function(a, b) {\n a = hcl(a);\n b = hcl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n ac = isNaN(a.c) ? b.c : a.c,\n al = a.l,\n bh = isNaN(b.h) ? 0 : deltaHue(b.h, ah),\n bc = isNaN(b.c) ? 0 : b.c - ac,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.c = ac + bc * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateLab = function(a, b) {\n a = lab(a);\n b = lab(b);\n var al = a.l,\n aa = a.a,\n ab = a.b,\n bl = b.l - al,\n ba = b.a - aa,\n bb = b.b - ab;\n return function(t) {\n a.l = al + bl * t;\n a.a = aa + ba * t;\n a.b = ab + bb * t;\n return a + \"\";\n };\n }\n\n var interpolateHslLong = function(a, b) {\n a = hsl(a);\n b = hsl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : b.h - ah,\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateHsl = function(a, b) {\n a = hsl(a);\n b = hsl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : deltaHue(b.h, ah),\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateRgb = function(a, b) {\n a = rgb(a);\n b = rgb(b);\n var ar = a.r,\n ag = a.g,\n ab = a.b,\n br = b.r - ar,\n bg = b.g - ag,\n bb = b.b - ab;\n return function(t) {\n return format(Math.round(ar + br * t), Math.round(ag + bg * t), Math.round(ab + bb * t));\n };\n }\n\n exports.color = color;\n exports.rgb = rgb;\n exports.hsl = hsl;\n exports.lab = lab;\n exports.hcl = hcl;\n exports.cubehelix = cubehelix;\n exports.interpolateRgb = interpolateRgb;\n exports.interpolateHsl = interpolateHsl;\n exports.interpolateHslLong = interpolateHslLong;\n exports.interpolateLab = interpolateLab;\n exports.interpolateHcl = interpolateHcl;\n exports.interpolateHclLong = interpolateHclLong;\n exports.interpolateCubehelix = interpolateCubehelix;\n exports.interpolateCubehelixLong = interpolateCubehelixLong;\n\n}));","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n factory((global.format = {}));\n}(this, function (exports) { 'use strict';\n\n var prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\n\n // Computes the decimal coefficient and exponent of the specified number x with\n // significant digits p, where x is positive and p is in [1, 21] or undefined.\n // For example, formatDecimal(1.23) returns [\"123\", 0].\n function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }\n\n function exponent(x) {\n return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;\n }\n\n var prefixExponent;\n\n function formatPrefixAuto(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimal(x, p + i - 1)[0]; // less than 1y!\n }\n\n function formatRounded(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n }\n\n function formatDefault(x, p) {\n x = x.toPrecision(p);\n\n out: for (var n = x.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (x[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n case \"e\": break out;\n default: if (i0 > 0) i0 = 0; break;\n }\n }\n\n return i0 > 0 ? x.slice(0, i0) + x.slice(i1 + 1) : x;\n }\n\n var formatTypes = {\n \"\": formatDefault,\n \"%\": function(x, p) { return (x * 100).toFixed(p); },\n \"b\": function(x) { return Math.round(x).toString(2); },\n \"c\": function(x) { return x + \"\"; },\n \"d\": function(x) { return Math.round(x).toString(10); },\n \"e\": function(x, p) { return x.toExponential(p); },\n \"f\": function(x, p) { return x.toFixed(p); },\n \"g\": function(x, p) { return x.toPrecision(p); },\n \"o\": function(x) { return Math.round(x).toString(8); },\n \"p\": function(x, p) { return formatRounded(x * 100, p); },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n \"x\": function(x) { return Math.round(x).toString(16); }\n };\n\n\n // [[fill]align][sign][symbol][0][width][,][.precision][type]\n var re = /^(?:(.)?([<>=^]))?([+\\-\\( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?([a-z%])?$/i;\n\n function FormatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n\n var match,\n fill = match[1] || \" \",\n align = match[2] || \">\",\n sign = match[3] || \"-\",\n symbol = match[4] || \"\",\n zero = !!match[5],\n width = match[6] && +match[6],\n comma = !!match[7],\n precision = match[8] && +match[8].slice(1),\n type = match[9] || \"\";\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // Map invalid types to the default format.\n else if (!formatTypes[type]) type = \"\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n this.fill = fill;\n this.align = align;\n this.sign = sign;\n this.symbol = symbol;\n this.zero = zero;\n this.width = width;\n this.comma = comma;\n this.precision = precision;\n this.type = type;\n }\n\n FormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width == null ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision == null ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + this.type;\n };\n\n function formatSpecifier(specifier) {\n return new FormatSpecifier(specifier);\n }\n\n function identity(x) {\n return x;\n }\n\n function formatGroup(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n }\n\n function localeFormat(locale) {\n var group = locale.grouping && locale.thousands ? formatGroup(locale.grouping, locale.thousands) : identity,\n currency = locale.currency,\n decimal = locale.decimal;\n\n function format(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n type = specifier.type;\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currency[0] : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currency[1] : /[%p]/.test(type) ? \"%\" : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = !type || /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision == null ? (type ? 6 : 12)\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n return function(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Convert negative to positive, and compute the prefix.\n // Note that -0 is not less than 0, but 1 / -0 is!\n var valueNegative = (value < 0 || 1 / value < 0) && (value *= -1, true);\n\n // Perform the initial formatting.\n value = formatType(value, precision);\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : \"-\") : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = valueSuffix + (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n var i = -1, n = value.length, c;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": return valuePrefix + value + valueSuffix + padding;\n case \"=\": return valuePrefix + padding + value + valueSuffix;\n case \"^\": return padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);\n }\n return padding + valuePrefix + value + valueSuffix;\n };\n }\n\n function formatPrefix(specifier, value) {\n var f = format((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: format,\n formatPrefix: formatPrefix\n };\n }\n\n var locale = localeFormat({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n });\n\n exports.format = locale.format;\n exports.formatPrefix = locale.formatPrefix;\n\n function precisionRound(step, max) {\n return Math.max(0, exponent(Math.abs(max)) - exponent(Math.abs(step))) + 1;\n }\n\n function precisionPrefix(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n }\n\n function precisionFixed(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n }\n\n exports.formatSpecifier = formatSpecifier;\n exports.localeFormat = localeFormat;\n exports.precisionFixed = precisionFixed;\n exports.precisionPrefix = precisionPrefix;\n exports.precisionRound = precisionRound;\n\n}));","if (typeof Map === \"undefined\") {\n Map = function() { this.clear(); };\n Map.prototype = {\n set: function(k, v) { this._[k] = v; return this; },\n get: function(k) { return this._[k]; },\n has: function(k) { return k in this._; },\n delete: function(k) { return k in this._ && delete this._[k]; },\n clear: function() { this._ = Object.create(null); },\n get size() { var n = 0; for (var k in this._) ++n; return n; },\n forEach: function(c) { for (var k in this._) c(this._[k], k, this); }\n };\n} else (function() {\n var m = new Map;\n if (m.set(0, 0) !== m) {\n m = m.set;\n Map.prototype.set = function() { m.apply(this, arguments); return this; };\n }\n})();\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n factory((global.timeFormat = {}));\n}(this, function (exports) { 'use strict';\n\n function utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n }\n\n function localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n }\n\n var pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"};\n\n function newYear(y) {\n return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0};\n }\n\n var percentRe = /^%/;\n\n function parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n }\n\n function parseZone(d, string, i) {\n return /^[+-]\\d{4}$/.test(string = string.slice(i, i + 5))\n ? (d.Z = -string, i + 5) // sign differs from getTimezoneOffset!\n : -1;\n }\n\n var numberRe = /^\\s*\\d+/;\n\n function parseWeekdayNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n }\n\n function parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n }\n\n function parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n }\n\n function parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n }\n\n function parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n }\n\n function parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n }\n\n function parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n }\n\n function parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n }\n\n function parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n }\n\n function parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n }\n\n function formatLiteralPercent() {\n return \"%\";\n }\n\n function formatUTCZone() {\n return \"+0000\";\n }\n\n function pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n }\n\n function formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n }\n\n function formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n }\n\n var t1 = new Date;\n\n var t0 = new Date;\n\n function newInterval(floori, offseti, count) {\n\n function interval(date) {\n return floori(date = new Date(+date)), date;\n }\n\n interval.floor = interval;\n\n interval.round = function(date) {\n var d0 = new Date(+date),\n d1 = new Date(date - 1);\n floori(d0), floori(d1), offseti(d1, 1);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), date;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [];\n start = new Date(start - 1);\n stop = new Date(+stop);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n offseti(start, 1), floori(start);\n if (start < stop) range.push(new Date(+start));\n while (offseti(start, step), floori(start), start < stop) range.push(new Date(+start));\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n while (--step >= 0) while (offseti(date, 1), !test(date));\n });\n };\n\n if (count) interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n return interval;\n }\n\n var utcYear = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCMonth(0, 1);\n }, function(date, offset) {\n date.setUTCFullYear(date.getUTCFullYear() + offset);\n }, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n });\n\n function utcWeekday(i) {\n return newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n }, function(date, offset) {\n date.setUTCDate(date.getUTCDate() + offset * 7);\n }, function(start, end) {\n return (end - start) / 6048e5;\n });\n }\n\n var utcMonday = utcWeekday(1);\n\n function formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d), d), p, 2);\n }\n\n function formatUTCWeekdayNumber(d) {\n return d.getUTCDay();\n }\n\n var utcSunday = utcWeekday(0);\n\n function formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d), d), p, 2);\n }\n\n function formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n }\n\n function formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n }\n\n function formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n }\n\n function formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n }\n\n var utcDay = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, offset) {\n date.setUTCDate(date.getUTCDate() + offset);\n }, function(start, end) {\n return (end - start) / 864e5;\n });\n\n function formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n }\n\n function formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n }\n\n function formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n }\n\n function formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n }\n\n function formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n }\n\n function formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n }\n\n function formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n }\n\n var year = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setMonth(0, 1);\n }, function(date, offset) {\n date.setFullYear(date.getFullYear() + offset);\n }, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n });\n\n function weekday(i) {\n return newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n }, function(date, offset) {\n date.setDate(date.getDate() + offset * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 6048e5;\n });\n }\n\n var monday = weekday(1);\n\n function formatWeekNumberMonday(d, p) {\n return pad(monday.count(year(d), d), p, 2);\n }\n\n function formatWeekdayNumber(d) {\n return d.getDay();\n }\n\n var sunday = weekday(0);\n\n function formatWeekNumberSunday(d, p) {\n return pad(sunday.count(year(d), d), p, 2);\n }\n\n function formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n }\n\n function formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n }\n\n function formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n }\n\n function formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n }\n\n var day = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n }, function(date, offset) {\n date.setDate(date.getDate() + offset);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 864e5;\n });\n\n function formatDayOfYear(d, p) {\n return pad(1 + day.count(year(d), d), p, 3);\n }\n\n function formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n }\n\n function formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n }\n\n function formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n }\n\n function formatLookup(names) {\n var map = new Map, i = -1, n = names.length;\n while (++i < n) map.set(names[i].toLowerCase(), i);\n return map;\n }\n\n var requoteRe = /[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g;\n\n function requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n }\n\n function formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n }\n\n function localeFormat(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"S\": formatSeconds,\n \"U\": formatWeekNumberSunday,\n \"w\": formatWeekdayNumber,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"S\": formatUTCSeconds,\n \"U\": formatUTCWeekNumberSunday,\n \"w\": formatUTCWeekdayNumber,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"S\": parseSeconds,\n \"U\": parseWeekNumberSunday,\n \"w\": parseWeekdayNumber,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n if (format = formats[c]) c = format(date, pad == null ? (c === \"e\" ? \" \" : \"0\") : pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, newDate) {\n return function(string) {\n var d = newYear(1900),\n i = parseSpecifier(d, specifier, string, 0);\n if (i != string.length) return null;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n if (\"w\" in d && (\"W\" in d || \"U\" in d)) {\n var day = utcDate(newYear(d.y)).getUTCDay();\n if (\"W\" in d) d.U = d.W, d.w = (d.w + 6) % 7, --day;\n d.m = 0;\n d.d = d.w + d.U * 7 - (day + 6) % 7;\n }\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n if (\"w\" in d && (\"W\" in d || \"U\" in d)) {\n var day = newDate(newYear(d.y)).getDay();\n if (\"W\" in d) d.U = d.W, d.w = (d.w + 6) % 7, --day;\n d.m = 0;\n d.d = d.w + d.U * 7 - (day + 6) % 7;\n }\n return newDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function parsePeriod(d, string, i) {\n var n = periodLookup.get(string.slice(i, i += 2).toLowerCase());\n return n == null ? -1 : (d.p = n, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.parse = newParse(specifier, localDate);\n f.toString = function() { return specifier; };\n return f;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.parse = newParse(specifier, utcDate);\n f.toString = function() { return specifier; };\n return f;\n }\n };\n }\n\n var locale = localeFormat({\n dateTime: \"%a %b %e %X %Y\",\n date: \"%m/%d/%Y\",\n time: \"%H:%M:%S\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n });\n\n exports.format = locale.format;\n exports.utcFormat = locale.utcFormat;\n\n var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\n function formatIsoNative(date) {\n return date.toISOString();\n }\n\n formatIsoNative.parse = function(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n };\n\n formatIsoNative.toString = function() {\n return isoSpecifier;\n };\n\n var formatIso = Date.prototype.toISOString && +new Date(\"2000-01-01T00:00:00.000Z\")\n ? formatIsoNative\n : locale.utcFormat(isoSpecifier);\n\n var isoFormat = formatIso;\n\n exports.isoFormat = isoFormat;\n exports.localeFormat = localeFormat;\n\n}));","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n factory((global.time = {}));\n}(this, function (exports) { 'use strict';\n\n var t1 = new Date;\n\n var t0 = new Date;\n\n function newInterval(floori, offseti, count) {\n\n function interval(date) {\n return floori(date = new Date(+date)), date;\n }\n\n interval.floor = interval;\n\n interval.round = function(date) {\n var d0 = new Date(+date),\n d1 = new Date(date - 1);\n floori(d0), floori(d1), offseti(d1, 1);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), date;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [];\n start = new Date(start - 1);\n stop = new Date(+stop);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n offseti(start, 1), floori(start);\n if (start < stop) range.push(new Date(+start));\n while (offseti(start, step), floori(start), start < stop) range.push(new Date(+start));\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n while (--step >= 0) while (offseti(date, 1), !test(date));\n });\n };\n\n if (count) interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n return interval;\n }\n\n var second = newInterval(function(date) {\n date.setMilliseconds(0);\n }, function(date, step) {\n date.setTime(+date + step * 1e3);\n }, function(start, end) {\n return (end - start) / 1e3;\n });\n\n exports.seconds = second.range;\n\n var minute = newInterval(function(date) {\n date.setSeconds(0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 6e4);\n }, function(start, end) {\n return (end - start) / 6e4;\n });\n\n exports.minutes = minute.range;\n\n var hour = newInterval(function(date) {\n date.setMinutes(0, 0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 36e5);\n }, function(start, end) {\n return (end - start) / 36e5;\n });\n\n exports.hours = hour.range;\n\n var day = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 864e5;\n });\n\n exports.days = day.range;\n\n function weekday(i) {\n return newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 6048e5;\n });\n }\n\n exports.sunday = weekday(0);\n\n exports.sundays = exports.sunday.range;\n\n exports.monday = weekday(1);\n\n exports.mondays = exports.monday.range;\n\n exports.tuesday = weekday(2);\n\n exports.tuesdays = exports.tuesday.range;\n\n exports.wednesday = weekday(3);\n\n exports.wednesdays = exports.wednesday.range;\n\n exports.thursday = weekday(4);\n\n exports.thursdays = exports.thursday.range;\n\n exports.friday = weekday(5);\n\n exports.fridays = exports.friday.range;\n\n exports.saturday = weekday(6);\n\n exports.saturdays = exports.saturday.range;\n\n var week = exports.sunday;\n\n exports.weeks = week.range;\n\n var month = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setDate(1);\n }, function(date, step) {\n date.setMonth(date.getMonth() + step);\n }, function(start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n });\n\n exports.months = month.range;\n\n var year = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setMonth(0, 1);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n }, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n });\n\n exports.years = year.range;\n\n var utcSecond = newInterval(function(date) {\n date.setUTCMilliseconds(0);\n }, function(date, step) {\n date.setTime(+date + step * 1e3);\n }, function(start, end) {\n return (end - start) / 1e3;\n });\n\n exports.utcSeconds = utcSecond.range;\n\n var utcMinute = newInterval(function(date) {\n date.setUTCSeconds(0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 6e4);\n }, function(start, end) {\n return (end - start) / 6e4;\n });\n\n exports.utcMinutes = utcMinute.range;\n\n var utcHour = newInterval(function(date) {\n date.setUTCMinutes(0, 0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 36e5);\n }, function(start, end) {\n return (end - start) / 36e5;\n });\n\n exports.utcHours = utcHour.range;\n\n var utcDay = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n }, function(start, end) {\n return (end - start) / 864e5;\n });\n\n exports.utcDays = utcDay.range;\n\n function utcWeekday(i) {\n return newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / 6048e5;\n });\n }\n\n exports.utcSunday = utcWeekday(0);\n\n exports.utcSundays = exports.utcSunday.range;\n\n exports.utcMonday = utcWeekday(1);\n\n exports.utcMondays = exports.utcMonday.range;\n\n exports.utcTuesday = utcWeekday(2);\n\n exports.utcTuesdays = exports.utcTuesday.range;\n\n exports.utcWednesday = utcWeekday(3);\n\n exports.utcWednesdays = exports.utcWednesday.range;\n\n exports.utcThursday = utcWeekday(4);\n\n exports.utcThursdays = exports.utcThursday.range;\n\n exports.utcFriday = utcWeekday(5);\n\n exports.utcFridays = exports.utcFriday.range;\n\n exports.utcSaturday = utcWeekday(6);\n\n exports.utcSaturdays = exports.utcSaturday.range;\n\n var utcWeek = exports.utcSunday;\n\n exports.utcWeeks = utcWeek.range;\n\n var utcMonth = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCDate(1);\n }, function(date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n }, function(start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n });\n\n exports.utcMonths = utcMonth.range;\n\n var utcYear = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCMonth(0, 1);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n }, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n });\n\n exports.utcYears = utcYear.range;\n\n exports.interval = newInterval;\n exports.second = second;\n exports.minute = minute;\n exports.hour = hour;\n exports.day = day;\n exports.week = week;\n exports.month = month;\n exports.year = year;\n exports.utcSecond = utcSecond;\n exports.utcMinute = utcMinute;\n exports.utcHour = utcHour;\n exports.utcDay = utcDay;\n exports.utcWeek = utcWeek;\n exports.utcMonth = utcMonth;\n exports.utcYear = utcYear;\n\n}));","var util = require('../util'),\n time = require('../time'),\n EPSILON = 1e-15;\n\nfunction bins(opt) {\n if (!opt) { throw Error(\"Missing binning options.\"); }\n\n // determine range\n var maxb = opt.maxbins || 15,\n base = opt.base || 10,\n logb = Math.log(base),\n div = opt.div || [5, 2], \n min = opt.min,\n max = opt.max,\n span = max - min,\n step, level, minstep, precision, v, i, eps;\n\n if (opt.step) {\n // if step size is explicitly given, use that\n step = opt.step;\n } else if (opt.steps) {\n // if provided, limit choice to acceptable step sizes\n step = opt.steps[Math.min(\n opt.steps.length - 1,\n bisect(opt.steps, span/maxb, 0, opt.steps.length)\n )];\n } else {\n // else use span to determine step size\n level = Math.ceil(Math.log(maxb) / logb);\n minstep = opt.minstep || 0;\n step = Math.max(\n minstep,\n Math.pow(base, Math.round(Math.log(span) / logb) - level)\n );\n \n // increase step size if too many bins\n do { step *= base; } while (Math.ceil(span/step) > maxb);\n\n // decrease step size if allowed\n for (i=0; i= minstep && span / v <= maxb) step = v;\n }\n }\n\n // update precision, min and max\n v = Math.log(step);\n precision = v >= 0 ? 0 : ~~(-v / logb) + 1;\n eps = Math.pow(base, -precision - 1);\n min = Math.min(min, Math.floor(min / step + eps) * step);\n max = Math.ceil(max / step) * step;\n\n return {\n start: min,\n stop: max,\n step: step,\n unit: {precision: precision},\n value: value,\n index: index\n };\n}\n\nfunction bisect(a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (util.cmp(a[mid], x) < 0) { lo = mid + 1; }\n else { hi = mid; }\n }\n return lo;\n}\n\nfunction value(v) {\n return this.step * Math.floor(v / this.step + EPSILON);\n}\n\nfunction index(v) {\n return Math.floor((v - this.start) / this.step + EPSILON);\n}\n\nfunction date_value(v) {\n return this.unit.date(value.call(this, v));\n}\n\nfunction date_index(v) {\n return index.call(this, this.unit.unit(v));\n}\n\nbins.date = function(opt) {\n if (!opt) { throw Error(\"Missing date binning options.\"); }\n\n // find time step, then bin\n var units = opt.utc ? time.utc : time,\n dmin = opt.min,\n dmax = opt.max,\n maxb = opt.maxbins || 20,\n minb = opt.minbins || 4,\n span = (+dmax) - (+dmin),\n unit = opt.unit ? units[opt.unit] : units.find(span, minb, maxb),\n spec = bins({\n min: unit.min != null ? unit.min : unit.unit(dmin),\n max: unit.max != null ? unit.max : unit.unit(dmax),\n maxbins: maxb,\n minstep: unit.minstep,\n steps: unit.step\n });\n\n spec.unit = unit;\n spec.index = date_index;\n if (!opt.raw) spec.value = date_value;\n return spec;\n};\n\nmodule.exports = bins;\n","var gen = module.exports = {};\n\ngen.repeat = function(val, n) {\n var a = Array(n), i;\n for (i=0; i stop) range.push(j);\n else while ((j = start + step * ++i) < stop) range.push(j);\n return range;\n};\n\ngen.random = {};\n\ngen.random.uniform = function(min, max) {\n if (max === undefined) {\n max = min === undefined ? 1 : min;\n min = 0;\n }\n var d = max - min;\n var f = function() {\n return min + d * Math.random();\n };\n f.samples = function(n) { return gen.zeros(n).map(f); };\n return f;\n};\n\ngen.random.integer = function(a, b) {\n if (b === undefined) {\n b = a;\n a = 0;\n }\n var d = b - a;\n var f = function() {\n return a + Math.floor(d * Math.random());\n };\n f.samples = function(n) { return gen.zeros(n).map(f); };\n return f;\n};\n\ngen.random.normal = function(mean, stdev) {\n mean = mean || 0;\n stdev = stdev || 1;\n var next;\n var f = function() {\n var x = 0, y = 0, rds, c;\n if (next !== undefined) {\n x = next;\n next = undefined;\n return x;\n }\n do {\n x = Math.random()*2-1;\n y = Math.random()*2-1;\n rds = x*x + y*y;\n } while (rds === 0 || rds > 1);\n c = Math.sqrt(-2*Math.log(rds)/rds); // Box-Muller transform\n next = mean + y*c*stdev;\n return mean + x*c*stdev;\n };\n f.samples = function(n) { return gen.zeros(n).map(f); };\n return f;\n};","var util = require('../util');\n\nvar TYPES = '__types__';\n\nvar PARSERS = {\n boolean: util.boolean,\n integer: util.number,\n number: util.number,\n date: util.date,\n string: function(x) { return x==='' ? null : x; }\n};\n\nvar TESTS = {\n boolean: function(x) { return x==='true' || x==='false' || util.isBoolean(x); },\n integer: function(x) { return TESTS.number(x) && (x=+x) === ~~x; },\n number: function(x) { return !isNaN(+x) && !util.isDate(x); },\n date: function(x) { return !isNaN(Date.parse(x)); }\n};\n\nfunction annotation(data, types) {\n if (!types) return data && data[TYPES] || null;\n data[TYPES] = types;\n}\n\nfunction type(values, f) {\n f = util.$(f);\n var v, i, n;\n\n // if data array has type annotations, use them\n if (values[TYPES]) {\n v = f(values[TYPES]);\n if (util.isString(v)) return v;\n }\n\n for (i=0, n=values.length; !util.isValid(v) && i b) b = v;\n }\n }\n return [a, b];\n};\n\n// Find the integer indices of the minimum and maximum values.\nstats.extent.index = function(values, f) {\n f = util.$(f);\n var x = -1, y = -1, a, b, v, i, n = values.length;\n for (i=0; i b) { b = v; y = i; }\n }\n }\n return [x, y];\n};\n\n// Compute the dot product of two arrays of numbers.\nstats.dot = function(values, a, b) {\n var sum = 0, i, v;\n if (!b) {\n if (values.length !== a.length) {\n throw Error('Array lengths must match.');\n }\n for (i=0; i -1 && p !== v) {\n mu = 1 + (i-1 + tie) / 2;\n for (; tie -1) {\n mu = 1 + (n-1 + tie) / 2;\n for (; tie max) max = x;\n delta = x - mean;\n mean = mean + delta / (++valid);\n M2 = M2 + delta * (x - mean);\n vals.push(x);\n }\n }\n M2 = M2 / (valid - 1);\n sd = Math.sqrt(M2);\n\n // sort values for median and iqr\n vals.sort(util.cmp);\n\n return {\n type: type(values, f),\n unique: u,\n count: values.length,\n valid: valid,\n missing: missing,\n distinct: distinct,\n min: min,\n max: max,\n mean: mean,\n stdev: sd,\n median: (v = stats.quantile(vals, 0.5)),\n q1: stats.quantile(vals, 0.25),\n q3: stats.quantile(vals, 0.75),\n modeskew: sd === 0 ? 0 : (mean - v) / sd\n };\n};\n\n// Compute profiles for all variables in a data set.\nstats.summary = function(data, fields) {\n fields = fields || util.keys(data[0]);\n var s = fields.map(function(f) {\n var p = stats.profile(data, util.$(f));\n return (p.field = f, p);\n });\n return (s.__summary__ = true, s);\n};\n\nmodule.exports = stats;","var d3_time = require('d3-time');\n\nvar tempDate = new Date(),\n baseDate = new Date(0, 0, 1).setFullYear(0), // Jan 1, 0 AD\n utcBaseDate = new Date(Date.UTC(0, 0, 1)).setUTCFullYear(0);\n\nfunction date(d) {\n return (tempDate.setTime(+d), tempDate);\n}\n\n// create a time unit entry\nfunction entry(type, date, unit, step, min, max) {\n var e = {\n type: type,\n date: date,\n unit: unit\n };\n if (step) {\n e.step = step;\n } else {\n e.minstep = 1;\n }\n if (min != null) e.min = min;\n if (max != null) e.max = max;\n return e;\n}\n\nfunction create(type, unit, base, step, min, max) {\n return entry(type,\n function(d) { return unit.offset(base, d); },\n function(d) { return unit.count(base, d); },\n step, min, max);\n}\n\nvar locale = [\n create('second', d3_time.second, baseDate),\n create('minute', d3_time.minute, baseDate),\n create('hour', d3_time.hour, baseDate),\n create('day', d3_time.day, baseDate, [1, 7]),\n create('month', d3_time.month, baseDate, [1, 3, 6]),\n create('year', d3_time.year, baseDate),\n\n // periodic units\n entry('seconds',\n function(d) { return new Date(1970, 0, 1, 0, 0, d); },\n function(d) { return date(d).getSeconds(); },\n null, 0, 59\n ),\n entry('minutes',\n function(d) { return new Date(1970, 0, 1, 0, d); },\n function(d) { return date(d).getMinutes(); },\n null, 0, 59\n ),\n entry('hours',\n function(d) { return new Date(1970, 0, 1, d); },\n function(d) { return date(d).getHours(); },\n null, 0, 23\n ),\n entry('weekdays',\n function(d) { return new Date(1970, 0, 4+d); },\n function(d) { return date(d).getDay(); },\n [1], 0, 6\n ),\n entry('dates',\n function(d) { return new Date(1970, 0, d); },\n function(d) { return date(d).getDate(); },\n [1], 1, 31\n ),\n entry('months',\n function(d) { return new Date(1970, d % 12, 1); },\n function(d) { return date(d).getMonth(); },\n [1], 0, 11\n )\n];\n\nvar utc = [\n create('second', d3_time.utcSecond, utcBaseDate),\n create('minute', d3_time.utcMinute, utcBaseDate),\n create('hour', d3_time.utcHour, utcBaseDate),\n create('day', d3_time.utcDay, utcBaseDate, [1, 7]),\n create('month', d3_time.utcMonth, utcBaseDate, [1, 3, 6]),\n create('year', d3_time.utcYear, utcBaseDate),\n\n // periodic units\n entry('seconds',\n function(d) { return new Date(Date.UTC(1970, 0, 1, 0, 0, d)); },\n function(d) { return date(d).getUTCSeconds(); },\n null, 0, 59\n ),\n entry('minutes',\n function(d) { return new Date(Date.UTC(1970, 0, 1, 0, d)); },\n function(d) { return date(d).getUTCMinutes(); },\n null, 0, 59\n ),\n entry('hours',\n function(d) { return new Date(Date.UTC(1970, 0, 1, d)); },\n function(d) { return date(d).getUTCHours(); },\n null, 0, 23\n ),\n entry('weekdays',\n function(d) { return new Date(Date.UTC(1970, 0, 4+d)); },\n function(d) { return date(d).getUTCDay(); },\n [1], 0, 6\n ),\n entry('dates',\n function(d) { return new Date(Date.UTC(1970, 0, d)); },\n function(d) { return date(d).getUTCDate(); },\n [1], 1, 31\n ),\n entry('months',\n function(d) { return new Date(Date.UTC(1970, d % 12, 1)); },\n function(d) { return date(d).getUTCMonth(); },\n [1], 0, 11\n )\n];\n\nvar STEPS = [\n [31536e6, 5], // 1-year\n [7776e6, 4], // 3-month\n [2592e6, 4], // 1-month\n [12096e5, 3], // 2-week\n [6048e5, 3], // 1-week\n [1728e5, 3], // 2-day\n [864e5, 3], // 1-day\n [432e5, 2], // 12-hour\n [216e5, 2], // 6-hour\n [108e5, 2], // 3-hour\n [36e5, 2], // 1-hour\n [18e5, 1], // 30-minute\n [9e5, 1], // 15-minute\n [3e5, 1], // 5-minute\n [6e4, 1], // 1-minute\n [3e4, 0], // 30-second\n [15e3, 0], // 15-second\n [5e3, 0], // 5-second\n [1e3, 0] // 1-second\n];\n\nfunction find(units, span, minb, maxb) {\n var step = STEPS[0], i, n, bins;\n\n for (i=1, n=STEPS.length; i step[0]) {\n bins = span / step[0];\n if (bins > maxb) {\n return units[STEPS[i-1][1]];\n }\n if (bins >= minb) {\n return units[step[1]];\n }\n }\n }\n return units[STEPS[n-1][1]];\n}\n\nfunction toUnitMap(units) {\n var map = {}, i, n;\n for (i=0, n=units.length; i 1 ?\n function(x) { return s.reduce(function(x,f) { return x[f]; }, x); } :\n function(x) { return x[f]; }\n );\n};\n\n// short-cut for accessor\nu.$ = u.accessor;\n\nu.mutator = function(f) {\n var s;\n return u.isString(f) && (s=u.field(f)).length > 1 ?\n function(x, v) {\n for (var i=0; i y) return sign[i];\n }\n return 0;\n };\n};\n\nu.cmp = function(a, b) {\n if (a < b) {\n return -1;\n } else if (a > b) {\n return 1;\n } else if (a >= b) {\n return 0;\n } else if (a === null) {\n return -1;\n } else if (b === null) {\n return 1;\n }\n return NaN;\n};\n\nu.numcmp = function(a, b) { return a - b; };\n\nu.stablesort = function(array, sortBy, keyFn) {\n var indices = array.reduce(function(idx, v, i) {\n return (idx[keyFn(v)] = i, idx);\n }, {});\n\n array.sort(function(a, b) {\n var sa = sortBy(a),\n sb = sortBy(b);\n return sa < sb ? -1 : sa > sb ? 1\n : (indices[keyFn(a)] - indices[keyFn(b)]);\n });\n\n return array;\n};\n\n\n// string functions\n\nu.pad = function(s, length, pos, padchar) {\n padchar = padchar || \" \";\n var d = length - s.length;\n if (d <= 0) return s;\n switch (pos) {\n case 'left':\n return strrep(d, padchar) + s;\n case 'middle':\n case 'center':\n return strrep(Math.floor(d/2), padchar) +\n s + strrep(Math.ceil(d/2), padchar);\n default:\n return s + strrep(d, padchar);\n }\n};\n\nfunction strrep(n, str) {\n var s = \"\", i;\n for (i=0; i this.config('maxSmallNumber') ?\n 'largeNumberFormat': 'smallNumberFormat';\n return this.config(formatConfig);\n };\n\n proto.sort = function(et, stats) {\n var sort = this._enc[et].sort,\n enc = this._enc,\n isTypes = vlfield.isTypes;\n\n if ((!sort || sort.length===0) &&\n // FIXME\n Encoding.toggleSort.support({encoding:this._enc}, stats, true) && //HACK\n this.config('toggleSort') === Q\n ) {\n var qField = isTypes(enc.x, [N, O]) ? enc.y : enc.x;\n\n if (isTypes(enc[et], [N, O])) {\n sort = [{\n name: qField.name,\n aggregate: qField.aggregate,\n type: qField.type,\n reverse: true\n }];\n }\n }\n\n return sort;\n };\n\n proto.map = function(f) {\n return vlenc.map(this._enc, f);\n };\n\n proto.reduce = function(f, init) {\n return vlenc.reduce(this._enc, f, init);\n };\n\n proto.forEach = function(f) {\n return vlenc.forEach(this._enc, f);\n };\n\n proto.type = function(et) {\n return this.has(et) ? this._enc[et].type : null;\n };\n\n proto.isType = function(et, type) {\n var field = this.field(et);\n return field && vlfield.isType(field, type);\n };\n\n proto.isTypes = function(et, type) {\n var field = this.field(et);\n return field && vlfield.isTypes(field, type);\n };\n\n Encoding.isOrdinalScale = function(encoding, encType) {\n return vlfield.isOrdinalScale(encoding.field(encType));\n };\n\n Encoding.isDimension = function(encoding, encType) {\n return vlfield.isDimension(encoding.field(encType));\n };\n\n Encoding.isMeasure = function(encoding, encType) {\n return vlfield.isMeasure(encoding.field(encType));\n };\n\n proto.isOrdinalScale = function(encType) {\n return this.has(encType) && Encoding.isOrdinalScale(this, encType);\n };\n\n proto.isDimension = function(encType) {\n return this.has(encType) && Encoding.isDimension(this, encType);\n };\n\n proto.isMeasure = function(encType) {\n return this.has(encType) && Encoding.isMeasure(this, encType);\n };\n\n proto.isAggregate = function() {\n return vlenc.isAggregate(this._enc);\n };\n\n Encoding.isAggregate = function(spec) {\n return vlenc.isAggregate(spec.encoding);\n };\n\n Encoding.alwaysNoOcclusion = function(spec) {\n // FIXME raw OxQ with # of rows = # of O\n return vlenc.isAggregate(spec.encoding);\n };\n\n Encoding.isStack = function(spec) {\n // FIXME update this once we have control for stack ...\n return (spec.marktype === 'bar' || spec.marktype === 'area') &&\n spec.encoding.color;\n };\n\n proto.isStack = function() {\n // FIXME update this once we have control for stack ...\n return (this.is('bar') || this.is('area')) && this.has('color');\n };\n\n proto.cardinality = function(encType, stats) {\n return vlfield.cardinality(this.field(encType), stats, this.config('filterNull'));\n };\n\n proto.isRaw = function() {\n return !this.isAggregate();\n };\n\n proto.data = function(name) {\n return name ? this._data[name] : this._data;\n };\n\n // returns whether the encoding has values embedded\n proto.hasValues = function() {\n var vals = this.data('values');\n return vals && vals.length;\n };\n\n proto.config = function(name) {\n return this._config[name];\n };\n\n Encoding.transpose = function(spec) {\n var oldenc = spec.encoding,\n enc = util.duplicate(spec.encoding);\n enc.x = oldenc.y;\n enc.y = oldenc.x;\n enc.row = oldenc.col;\n enc.col = oldenc.row;\n spec.encoding = enc;\n return spec;\n };\n\n // FIXME: REMOVE everything below here\n\n Encoding.toggleSort = function(spec) {\n spec.config = spec.config || {};\n spec.config.toggleSort = spec.config.toggleSort === Q ? N : Q;\n return spec;\n };\n\n\n Encoding.toggleSort.direction = function(spec) {\n if (!Encoding.toggleSort.support(spec)) { return; }\n var enc = spec.encoding;\n return enc.x.type === N ? 'x' : 'y';\n };\n\n Encoding.toggleSort.mode = function(spec) {\n return spec.config.toggleSort;\n };\n\n Encoding.toggleSort.support = function(spec, stats) {\n var enc = spec.encoding,\n isTypes = vlfield.isTypes;\n\n if (vlenc.has(enc, ROW) || vlenc.has(enc, COL) ||\n !vlenc.has(enc, X) || !vlenc.has(enc, Y) ||\n !Encoding.alwaysNoOcclusion(spec, stats)) {\n return false;\n }\n\n return ( isTypes(enc.x, [N,O]) && vlfield.isMeasure(enc.y)) ? 'x' :\n ( isTypes(enc.y, [N,O]) && vlfield.isMeasure(enc.x)) ? 'y' : false;\n };\n\n Encoding.toggleFilterNullO = function(spec) {\n spec.config = spec.config || {};\n spec.config.filterNull = spec.config.filterNull || { //FIXME\n T: true,\n Q: true\n };\n spec.config.filterNull.O = !spec.config.filterNull.O;\n return spec;\n };\n\n Encoding.toggleFilterNullO.support = function(spec, stats) {\n var fields = vlenc.fields(spec.encoding);\n for (var fieldName in fields) {\n var fieldList = fields[fieldName];\n if (fieldList.containsType.O && fieldName in stats && stats[fieldName].nulls > 0) {\n return true;\n }\n }\n return false;\n };\n\n return Encoding;\n})();\n","'use strict';\n\nrequire('../globals');\n\nvar util = require('../util');\n\nmodule.exports = aggregates;\n\nfunction aggregates(dataTable, encoding, opt) {\n opt = opt || {};\n\n var dims = {}, meas = {}, detail = {}, facets = {};\n\n encoding.forEach(function(field, encType) {\n if (field.aggregate) {\n if (field.aggregate === 'count') {\n meas.count = {op: 'count', field: '*'};\n }else {\n meas[field.aggregate + '|'+ field.name] = {\n op: field.aggregate,\n field: encoding.fieldRef(encType, {nofn: true})\n };\n }\n } else {\n dims[field.name] = encoding.fieldRef(encType);\n if (encType == ROW || encType == COL) {\n facets[field.name] = dims[field.name];\n }else if (encType !== X && encType !== Y) {\n detail[field.name] = dims[field.name];\n }\n }\n });\n dims = util.vals(dims);\n meas = util.vals(meas);\n\n if (meas.length > 0) {\n if (!dataTable.transform) dataTable.transform = [];\n dataTable.transform.push({\n type: 'aggregate',\n groupby: dims,\n fields: meas\n });\n }\n return {\n details: util.vals(detail),\n dims: dims,\n facets: util.vals(facets),\n aggregated: meas.length > 0\n };\n}\n","'use strict';\n\nrequire('../globals');\n\nvar util = require('../util'),\n setter = util.setter,\n getter = util.getter,\n time = require('./time');\n\nvar axis = module.exports = {};\n\naxis.def = function(name, encoding, layout, stats, opt) {\n var isCol = name == COL,\n isRow = name == ROW,\n type = isCol ? 'x' : isRow ? 'y' : name;\n\n var def = {\n type: type,\n scale: name,\n properties: {},\n layer: encoding.field(name).axis.layer,\n orient: axis.orient(name, encoding, stats)\n };\n\n // Add axis label custom scale (for bin / time)\n def = axis.labels.scale(def, encoding, name);\n def = axis.labels.format(def, name, encoding, stats);\n\n // for x-axis, set ticks for Q or rotate scale for ordinal scale\n if (name == X) {\n if (encoding.isDimension(X) || encoding.isType(X, T)) {\n // TODO(kanitw): Jul 19, 2015 - #506 add condition for rotation\n def = axis.labels.rotate(def);\n } else { // Q\n def.ticks = encoding.field(name).axis.ticks;\n }\n }\n\n // TitleOffset depends on labels rotation\n def.titleOffset = axis.titleOffset(encoding, layout, name);\n\n //def.offset is used in axis.grid\n if(isRow) def.offset = axis.titleOffset(encoding, layout, Y) + 20;\n // FIXME(kanitw): Jul 19, 2015 - offset for column when x is put on top\n\n def = axis.grid(def, name, encoding, layout);\n def = axis.title(def, name, encoding, layout, opt);\n\n if (isRow || isCol) def = axis.hideTicks(def);\n\n return def;\n};\n\naxis.orient = function(name, encoding, stats) {\n var orient = encoding.field(name).axis.orient;\n if (orient) return orient;\n\n if (name===COL) return 'top';\n\n // x-axis for long y - put on top\n if (name===X && encoding.has(Y) && encoding.isOrdinalScale(Y) && encoding.cardinality(Y, stats) > 30) {\n return 'top';\n }\n\n return undefined;\n};\n\naxis.grid = function(def, name, encoding, layout) {\n var cellPadding = layout.cellPadding,\n isCol = name == COL,\n isRow = name == ROW;\n\n if (encoding.axis(name).grid) {\n def.grid = true;\n\n if (isCol) {\n // set grid property -- put the lines on the right the cell\n def.properties.grid = {\n x: {\n offset: layout.cellWidth * (1+ cellPadding/2.0),\n // default value(s) -- vega doesn't do recursive merge\n scale: 'col'\n },\n y: {\n value: -layout.cellHeight * (cellPadding/2),\n },\n stroke: { value: encoding.config('cellGridColor') },\n opacity: { value: encoding.config('cellGridOpacity') }\n };\n } else if (isRow) {\n // set grid property -- put the lines on the top\n def.properties.grid = {\n y: {\n offset: -layout.cellHeight * (cellPadding/2),\n // default value(s) -- vega doesn't do recursive merge\n scale: 'row'\n },\n x: {\n value: def.offset\n },\n x2: {\n offset: def.offset + (layout.cellWidth * 0.05),\n // default value(s) -- vega doesn't do recursive merge\n group: 'mark.group.width',\n mult: 1\n },\n stroke: { value: encoding.config('cellGridColor') },\n opacity: { value: encoding.config('cellGridOpacity') }\n };\n } else {\n def.properties.grid = {\n stroke: { value: encoding.config('gridColor') },\n opacity: { value: encoding.config('gridOpacity') }\n };\n }\n }\n return def;\n};\n\naxis.hideTicks = function(def) {\n def.properties.ticks = {opacity: {value: 0}};\n def.properties.majorTicks = {opacity: {value: 0}};\n def.properties.axis = {opacity: {value: 0}};\n return def;\n};\n\naxis.title = function (def, name, encoding, layout) {\n var ax = encoding.field(name).axis;\n\n if (ax.title) {\n def.title = ax.title;\n } else {\n // if not defined, automatically determine axis title from field def\n var fieldTitle = encoding.fieldTitle(name),\n maxLength;\n\n if (ax.titleMaxLength) {\n maxLength = ax.titleMaxLength;\n } else if (name===X) {\n maxLength = layout.cellWidth / encoding.config('characterWidth');\n } else if (name === Y) {\n maxLength = layout.cellHeight / encoding.config('characterWidth');\n }\n\n def.title = maxLength ? util.truncate(fieldTitle, maxLength) : fieldTitle;\n }\n\n if (name === ROW) {\n def.properties.title = {\n angle: {value: 0},\n align: {value: 'right'},\n baseline: {value: 'middle'},\n dy: {value: (-layout.height/2) -20}\n };\n }\n\n return def;\n};\n\naxis.labels = {};\n\n/** add custom label for time type and bin */\naxis.labels.scale = function(def, encoding, name) {\n // time\n var timeUnit = encoding.field(name).timeUnit;\n if (encoding.isType(name, T) && timeUnit && (time.hasScale(timeUnit))) {\n setter(def, ['properties','labels','text','scale'], 'time-'+ timeUnit);\n }\n // FIXME bin\n return def;\n};\n\n/**\n * Determine number format or truncate if maxLabel length is presented.\n */\naxis.labels.format = function (def, name, encoding, stats) {\n var fieldStats = stats[encoding.field(name).name];\n\n if (encoding.axis(name).format) {\n def.format = encoding.axis(name).format;\n } else if (encoding.isType(name, Q) || fieldStats.type === 'number') {\n def.format = encoding.numberFormat(fieldStats);\n } else if (encoding.isType(name, T)) {\n var timeUnit = encoding.field(name).timeUnit;\n if (!timeUnit) {\n def.format = encoding.config('timeFormat');\n } else if (timeUnit === 'year') {\n def.format = 'd';\n }\n } else if (encoding.isTypes(name, [N, O]) && encoding.axis(name).maxLabelLength) {\n setter(def,\n ['properties','labels','text','template'],\n '{{data | truncate:' + encoding.axis(name).maxLabelLength + '}}'\n );\n }\n\n return def;\n};\n\naxis.labels.rotate = function(def) {\n var align = def.orient ==='top' ? 'left' : 'right';\n setter(def, ['properties','labels', 'angle', 'value'], 270);\n setter(def, ['properties','labels', 'align', 'value'], align);\n setter(def, ['properties','labels', 'baseline', 'value'], 'middle');\n return def;\n};\n\naxis.titleOffset = function (encoding, layout, name) {\n // return specified value if specified\n var value = encoding.axis(name).titleOffset;\n if (value) return value;\n\n switch (name) {\n //FIXME make this adjustable\n case ROW: return 0;\n case COL: return 35;\n }\n return getter(layout, [name, 'axisTitleOffset']);\n};\n","'use strict';\n\nrequire('../globals');\n\nmodule.exports = binning;\n\nfunction binning(dataTable, encoding, opt) {\n opt = opt || {};\n\n if (!dataTable.transform) dataTable.transform = [];\n\n encoding.forEach(function(field, encType) {\n if (encoding.bin(encType)) {\n dataTable.transform.push({\n type: 'bin',\n field: encoding.fieldRef(encType, {nofn: true}),\n output: encoding.fieldRef(encType),\n maxbins: encoding.bin(encType).maxbins\n });\n }\n });\n\n return dataTable;\n}\n","'use strict';\n\nvar summary = module.exports = require('datalib/src/stats').summary;\n\nrequire('../globals');\n\nvar compiler = module.exports = {};\n\nvar Encoding = require('../Encoding'),\n axis = compiler.axis = require('./axis'),\n filter = compiler.filter = require('./filter'),\n legend = compiler.legend = require('./legend'),\n marks = compiler.marks = require('./marks'),\n scale = compiler.scale = require('./scale');\n\ncompiler.aggregate = require('./aggregate');\ncompiler.bin = require('./bin');\ncompiler.facet = require('./facet');\ncompiler.group = require('./group');\ncompiler.layout = require('./layout');\ncompiler.sort = require('./sort');\ncompiler.stack = require('./stack');\ncompiler.style = require('./style');\ncompiler.subfacet = require('./subfacet');\ncompiler.template = require('./template');\ncompiler.time = require('./time');\n\ncompiler.compile = function (spec, stats, theme) {\n return compiler.compileEncoding(Encoding.fromSpec(spec, theme), stats);\n};\n\ncompiler.shorthand = function (shorthand, stats, config, theme) {\n return compiler.compileEncoding(Encoding.fromShorthand(shorthand, config, theme), stats);\n};\n\ncompiler.compileEncoding = function (encoding, stats) {\n // no need to pass stats if you pass in the data\n if (!stats && encoding.hasValues()) {\n stats = summary(encoding.data('values')).reduce(function(s, p) {\n s[p.field] = p;\n return s;\n }, {});\n }\n\n var layout = compiler.layout(encoding, stats),\n spec = compiler.template(encoding, layout, stats);\n\n // .data related stuff\n var rawTable = spec.data[0],\n dataTable = spec.data[1];\n\n rawTable = filter.addFilters(rawTable, encoding); // modify rawTable\n spec = compiler.time(spec, encoding); // modify rawTable, add scales\n dataTable = compiler.bin(dataTable, encoding); // modify dataTable\n var aggResult = compiler.aggregate(dataTable, encoding); // modify dataTable\n var sorting = compiler.sort(spec.data, encoding, stats); // append new data\n\n // marks\n var style = compiler.style(encoding, stats),\n group = spec.marks[0],\n mdefs = marks.def(encoding, layout, style, stats),\n mdef = mdefs[mdefs.length - 1]; // TODO: remove this dirty hack by refactoring the whole flow\n\n for (var i = 0; i < mdefs.length; i++) {\n group.marks.push(mdefs[i]);\n }\n\n var lineType = marks[encoding.marktype()].line;\n\n // handle subfacets\n\n var details = aggResult.details,\n hasDetails = details && details.length > 0,\n stack = hasDetails && compiler.stack(spec.data, encoding, mdef, aggResult.facets); // modify spec.data, mdef.{from,properties}\n\n if (hasDetails && (stack || lineType)) {\n //subfacet to group stack / line together in one group\n compiler.subfacet(group, mdef, details, stack, encoding);\n }\n\n // auto-sort line/area values\n //TODO(kanitw): have some config to turn off auto-sort for line (for line chart that encodes temporal information)\n if (lineType) {\n var f = (encoding.isMeasure(X) && encoding.isDimension(Y)) ? Y : X;\n if (!mdef.from) mdef.from = {};\n // TODO: why - ?\n mdef.from.transform = [{type: 'sort', by: '-' + encoding.fieldRef(f)}];\n }\n\n // get a flattened list of all scale names that are used in the vl spec\n var singleScaleNames = [].concat.apply([], mdefs.map(function(markProps) {\n return scale.names(markProps.properties.update);\n }));\n\n // Small Multiples\n if (encoding.has(ROW) || encoding.has(COL)) {\n spec = compiler.facet(group, encoding, layout, style, sorting, spec, singleScaleNames, stack, stats);\n spec.legends = legend.defs(encoding, style);\n } else {\n group.scales = scale.defs(singleScaleNames, encoding, layout, stats, style, sorting, {stack: stack});\n\n group.axes = [];\n if (encoding.has(X)) group.axes.push(axis.def(X, encoding, layout, stats));\n if (encoding.has(Y)) group.axes.push(axis.def(Y, encoding, layout, stats));\n\n group.legends = legend.defs(encoding, style);\n }\n\n filter.filterLessThanZero(dataTable, encoding);\n\n return spec;\n};\n\n","'use strict';\n\nrequire('../globals');\n\nvar util = require('../util');\n\nvar axis = require('./axis'),\n groupdef = require('./group').def,\n scale = require('./scale');\n\nmodule.exports = faceting;\n\nfunction faceting(group, encoding, layout, style, sorting, spec, singleScaleNames, stack, stats) {\n var enter = group.properties.enter;\n var facetKeys = [], cellAxes = [], from, axesGrp;\n\n var hasRow = encoding.has(ROW), hasCol = encoding.has(COL);\n\n enter.fill = {value: encoding.config('cellBackgroundColor')};\n\n //move \"from\" to cell level and add facet transform\n group.from = {data: group.marks[0].from.data};\n\n // Hack, this needs to be refactored\n for (var i = 0; i < group.marks.length; i++) {\n var mark = group.marks[i];\n if (mark.from.transform) {\n delete mark.from.data; //need to keep transform for subfacetting case\n } else {\n delete mark.from;\n }\n }\n\n if (hasRow) {\n if (!encoding.isDimension(ROW)) {\n util.error('Row encoding should be ordinal.');\n }\n enter.y = {scale: ROW, field: 'keys.' + facetKeys.length};\n enter.height = {'value': layout.cellHeight}; // HACK\n\n facetKeys.push(encoding.fieldRef(ROW));\n\n if (hasCol) {\n from = util.duplicate(group.from);\n from.transform = from.transform || [];\n from.transform.unshift({type: 'facet', keys: [encoding.fieldRef(COL)]});\n }\n\n axesGrp = groupdef('x-axes', {\n axes: encoding.has(X) ? [axis.def(X, encoding, layout, stats)] : undefined,\n x: hasCol ? {scale: COL, field: 'keys.0'} : {value: 0},\n width: hasCol && {'value': layout.cellWidth}, //HACK?\n from: from\n });\n\n spec.marks.unshift(axesGrp); // need to prepend so it appears under the plots\n (spec.axes = spec.axes || []);\n spec.axes.push(axis.def(ROW, encoding, layout, stats));\n } else { // doesn't have row\n if (encoding.has(X)) {\n //keep x axis in the cell\n cellAxes.push(axis.def(X, encoding, layout, stats));\n }\n }\n\n if (hasCol) {\n if (!encoding.isDimension(COL)) {\n util.error('Col encoding should be ordinal.');\n }\n enter.x = {scale: COL, field: 'keys.' + facetKeys.length};\n enter.width = {'value': layout.cellWidth}; // HACK\n\n facetKeys.push(encoding.fieldRef(COL));\n\n if (hasRow) {\n from = util.duplicate(group.from);\n from.transform = from.transform || [];\n from.transform.unshift({type: 'facet', keys: [encoding.fieldRef(ROW)]});\n }\n\n axesGrp = groupdef('y-axes', {\n axes: encoding.has(Y) ? [axis.def(Y, encoding, layout, stats)] : undefined,\n y: hasRow && {scale: ROW, field: 'keys.0'},\n x: hasRow && {value: 0},\n height: hasRow && {'value': layout.cellHeight}, //HACK?\n from: from\n });\n\n spec.marks.unshift(axesGrp); // need to prepend so it appears under the plots\n (spec.axes = spec.axes || []);\n spec.axes.push(axis.def(COL, encoding, layout, stats));\n } else { // doesn't have col\n if (encoding.has(Y)) {\n cellAxes.push(axis.def(Y, encoding, layout, stats));\n }\n }\n\n // assuming equal cellWidth here\n // TODO: support heterogenous cellWidth (maybe by using multiple scales?)\n spec.scales = (spec.scales || []).concat(scale.defs(\n scale.names(enter).concat(singleScaleNames),\n encoding,\n layout,\n stats,\n style,\n sorting,\n {stack: stack, facet: true}\n )); // row/col scales + cell scales\n\n if (cellAxes.length > 0) {\n group.axes = cellAxes;\n }\n\n // add facet transform\n var trans = (group.from.transform || (group.from.transform = []));\n trans.unshift({type: 'facet', keys: facetKeys});\n\n return spec;\n}\n","'use strict';\n\nrequire('../globals');\n\nvar filter = module.exports = {};\n\nvar BINARY = {\n '>': true,\n '>=': true,\n '=': true,\n '!=': true,\n '<': true,\n '<=': true\n};\n\nfilter.addFilters = function(rawTable, encoding) {\n var filters = encoding.filter(); // apply filters to raw data before aggregation\n\n if (!rawTable.transform)\n rawTable.transform = [];\n\n // add custom filters\n for (var i=0, l=filters.length; i0'\n });\n }\n });\n};\n","'use strict';\n\nmodule.exports = {\n def: groupdef\n};\n\nfunction groupdef(name, opt) {\n opt = opt || {};\n return {\n _name: name || undefined,\n type: 'group',\n from: opt.from,\n properties: {\n enter: {\n x: opt.x || undefined,\n y: opt.y || undefined,\n width: opt.width || {group: 'width'},\n height: opt.height || {group: 'height'}\n }\n },\n scales: opt.scales || undefined,\n axes: opt.axes || undefined,\n marks: opt.marks || []\n };\n}\n","'use strict';\n\nrequire('../globals');\n\nvar util = require('../util'),\n setter = util.setter,\n time = require('./time'),\n d3_format = require('d3-format');\n\nmodule.exports = vllayout;\n\nfunction vllayout(encoding, stats) {\n var layout = box(encoding, stats);\n layout = offset(encoding, stats, layout);\n return layout;\n}\n\n/*\n HACK to set chart size\n NOTE: this fails for plots driven by derived values (e.g., aggregates)\n One solution is to update Vega to support auto-sizing\n In the meantime, auto-padding (mostly) does the trick\n */\nfunction box(encoding, stats) {\n var hasRow = encoding.has(ROW),\n hasCol = encoding.has(COL),\n hasX = encoding.has(X),\n hasY = encoding.has(Y),\n marktype = encoding.marktype();\n\n // FIXME/HACK we need to take filter into account\n var xCardinality = hasX && encoding.isDimension(X) ? encoding.cardinality(X, stats) : 1,\n yCardinality = hasY && encoding.isDimension(Y) ? encoding.cardinality(Y, stats) : 1;\n\n var useSmallBand = xCardinality > encoding.config('largeBandMaxCardinality') ||\n yCardinality > encoding.config('largeBandMaxCardinality');\n\n var cellWidth, cellHeight, cellPadding = encoding.config('cellPadding');\n\n // set cellWidth\n if (hasX) {\n if (encoding.isOrdinalScale(X)) {\n // for ordinal, hasCol or not doesn't matter -- we scale based on cardinality\n cellWidth = (xCardinality + encoding.field(X).band.padding) * encoding.bandSize(X, useSmallBand);\n } else {\n cellWidth = hasCol || hasRow ? encoding.field(COL).width : encoding.config('singleWidth');\n }\n } else {\n if (marktype === TEXT) {\n cellWidth = encoding.config('textCellWidth');\n } else {\n cellWidth = encoding.bandSize(X);\n }\n }\n\n // set cellHeight\n if (hasY) {\n if (encoding.isOrdinalScale(Y)) {\n // for ordinal, hasCol or not doesn't matter -- we scale based on cardinality\n cellHeight = (yCardinality + encoding.field(Y).band.padding) * encoding.bandSize(Y, useSmallBand);\n } else {\n cellHeight = hasCol || hasRow ? encoding.field(ROW).height : encoding.config('singleHeight');\n }\n } else {\n cellHeight = encoding.bandSize(Y);\n }\n\n // Cell bands use rangeBands(). There are n-1 padding. Outerpadding = 0 for cells\n\n var width = cellWidth, height = cellHeight;\n if (hasCol) {\n var colCardinality = encoding.cardinality(COL, stats);\n width = cellWidth * ((1 + cellPadding) * (colCardinality - 1) + 1);\n }\n if (hasRow) {\n var rowCardinality = encoding.cardinality(ROW, stats);\n height = cellHeight * ((1 + cellPadding) * (rowCardinality - 1) + 1);\n }\n\n return {\n // width and height of the whole cell\n cellWidth: cellWidth,\n cellHeight: cellHeight,\n cellPadding: cellPadding,\n // width and height of the chart\n width: width,\n height: height,\n // information about x and y, such as band size\n x: {useSmallBand: useSmallBand},\n y: {useSmallBand: useSmallBand}\n };\n}\n\n\n// FIXME fieldStats.max isn't always the longest\nfunction getMaxNumberLength(encoding, et, fieldStats) {\n var format = encoding.numberFormat(et, fieldStats);\n\n return d3_format.format(format)(fieldStats.max).length;\n}\n\nfunction getMaxLength(encoding, stats, et) {\n var field = encoding.field(et),\n fieldStats = stats[field.name];\n\n if (field.bin) {\n // TODO once bin support range, need to update this\n return getMaxNumberLength(encoding, et, fieldStats);\n } if (encoding.isType(et, Q)) {\n return getMaxNumberLength(encoding, et, fieldStats);\n } else if (encoding.isType(et, T)) {\n return time.maxLength(encoding.field(et).timeUnit, encoding);\n } else if (encoding.isTypes(et, [N, O])) {\n if(fieldStats.type === 'number') {\n return getMaxNumberLength(encoding, et, fieldStats);\n } else {\n return Math.min(fieldStats.max, encoding.axis(et).maxLabelLength || Infinity);\n }\n }\n}\n\nfunction offset(encoding, stats, layout) {\n [X, Y].forEach(function (et) {\n // TODO(kanitw): Jul 19, 2015 - create a set of visual test for extraOffset\n var extraOffset = et === X ? 20 : 22,\n maxLength;\n if (encoding.isDimension(et) || encoding.isType(et, T)) {\n maxLength = getMaxLength(encoding, stats, et);\n } else if (\n // TODO once we have #512 (allow using inferred type)\n // Need to adjust condition here.\n encoding.isType(et, Q) ||\n encoding.aggregate(et) === 'count'\n ) {\n if (\n et===Y\n // || (et===X && false)\n // FIXME determine when X would rotate, but should move this to axis.js first #506\n ) {\n maxLength = getMaxLength(encoding, stats, et);\n }\n } else {\n // nothing\n }\n\n if (maxLength) {\n setter(layout,[et, 'axisTitleOffset'], encoding.config('characterWidth') * maxLength + extraOffset);\n } else {\n // if no max length (no rotation case), use maxLength = 3\n setter(layout,[et, 'axisTitleOffset'], encoding.config('characterWidth') * 3 + extraOffset);\n }\n\n });\n return layout;\n}\n","'use strict';\n\nrequire('../globals');\n\nvar time = require('./time'),\n util = require('../util'),\n setter = util.setter,\n getter = util.getter;\n\nvar legend = module.exports = {};\n\nlegend.defs = function(encoding, style) {\n var defs = [];\n\n if (encoding.has(COLOR) && encoding.field(COLOR).legend) {\n defs.push(legend.def(COLOR, encoding, {\n fill: COLOR,\n orient: 'right'\n }, style));\n }\n\n if (encoding.has(SIZE) && encoding.field(SIZE).legend) {\n defs.push(legend.def(SIZE, encoding, {\n size: SIZE,\n orient: defs.length === 1 ? 'left' : 'right'\n }, style));\n }\n\n if (encoding.has(SHAPE) && encoding.field(SHAPE).legend) {\n if (defs.length === 2) {\n console.error('Vega-lite currently only supports two legends');\n }\n defs.push(legend.def(SHAPE, encoding, {\n shape: SHAPE,\n orient: defs.length === 1 ? 'left' : 'right'\n }, style));\n }\n return defs;\n};\n\nlegend.def = function(name, encoding, def, style) {\n var timeUnit = encoding.field(name).timeUnit;\n\n def.title = encoding.fieldTitle(name);\n def = legend.style(name, encoding, def, style);\n\n if (encoding.isType(name, T) &&\n timeUnit &&\n time.hasScale(timeUnit)\n ) {\n setter(def, ['properties', 'labels', 'text', 'scale'], 'time-'+ timeUnit);\n }\n\n return def;\n};\n\nlegend.style = function(name, e, def, style) {\n var symbols = getter(def, ['properties', 'symbols']),\n marktype = e.marktype();\n\n switch (marktype) {\n case 'bar':\n case 'tick':\n case 'text':\n symbols.stroke = {value: 'transparent'};\n symbols.shape = {value: 'square'};\n break;\n\n case 'circle':\n case 'square':\n symbols.shape = {value: marktype};\n /* fall through */\n case 'point':\n // fill or stroke\n if (e.field(SHAPE).filled) {\n if (e.has(COLOR) && name === COLOR) {\n symbols.fill = {scale: COLOR, field: 'data'};\n } else {\n symbols.fill = {value: e.value(COLOR)};\n }\n symbols.stroke = {value: 'transparent'};\n } else {\n if (e.has(COLOR) && name === COLOR) {\n symbols.stroke = {scale: COLOR, field: 'data'};\n } else {\n symbols.stroke = {value: e.value(COLOR)};\n }\n symbols.fill = {value: 'transparent'};\n symbols.strokeWidth = {value: e.config('strokeWidth')};\n }\n\n break;\n case 'line':\n case 'area':\n // TODO use shape here after implementing #508\n break;\n }\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if (opacity) {\n symbols.opacity = {value: opacity};\n }\n return def;\n};","'use strict';\n\nrequire('../globals');\n\nvar marks = module.exports = {};\n\nmarks.def = function(encoding, layout, style, stats) {\n\n var defs = [],\n mark = marks[encoding.marktype()];\n\n // to add a background to text, we need to add it before the text\n if (encoding.marktype() === TEXT && encoding.has(COLOR)) {\n var bg = {\n x: {value: 0},\n y: {value: 0},\n x2: {value: layout.cellWidth},\n y2: {value: layout.cellHeight},\n fill: {scale: COLOR, field: encoding.fieldRef(COLOR)}\n };\n defs.push({\n type: 'rect',\n from: {data: TABLE},\n properties: {enter: bg, update: bg}\n });\n }\n\n // add the mark def for the main thing\n var p = mark.prop(encoding, layout, style, stats);\n defs.push({\n type: mark.type,\n from: {data: TABLE},\n properties: {enter: p, update: p}\n });\n\n return defs;\n};\n\nmarks.bar = {\n type: 'rect',\n stack: true,\n prop: bar_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1}\n};\n\nmarks.line = {\n type: 'line',\n line: true,\n prop: line_props,\n requiredEncoding: ['x', 'y'],\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, detail:1}\n};\n\nmarks.area = {\n type: 'area',\n stack: true,\n line: true,\n requiredEncoding: ['x', 'y'],\n prop: area_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1}\n};\n\nmarks.tick = {\n type: 'rect',\n prop: tick_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, detail: 1}\n};\n\nmarks.circle = {\n type: 'symbol',\n prop: filled_point_props('circle'),\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, detail: 1}\n};\n\nmarks.square = {\n type: 'symbol',\n prop: filled_point_props('square'),\n supportedEncoding: marks.circle.supportedEncoding\n};\n\nmarks.point = {\n type: 'symbol',\n prop: point_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, shape: 1, detail: 1}\n};\n\nmarks.text = {\n type: 'text',\n prop: text_props,\n requiredEncoding: ['text'],\n supportedEncoding: {row: 1, col: 1, size: 1, color: 1, text: 1}\n};\n\nfunction bar_props(e, layout, style) {\n // jshint unused:false\n\n var p = {};\n\n // x's and width\n if (e.isMeasure(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n if (!e.has(Y) || e.isDimension(Y)) {\n p.x2 = {value: 0};\n }\n } else {\n if (e.has(X)) { // is ordinal\n p.xc = {scale: X, field: e.fieldRef(X)};\n } else {\n p.x = {value: 0, offset: e.config('singleBarOffset')};\n }\n }\n\n // width\n if (!p.x2) {\n if (!e.has(X) || e.isOrdinalScale(X)) { // no X or X is ordinal\n if (e.has(SIZE)) {\n p.width = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else {\n p.width = {\n value: e.bandSize(X, layout.x.useSmallBand),\n offset: -1\n };\n }\n } else { // X is Quant or Time Scale\n p.width = {value: 2};\n }\n }\n\n // y's & height\n if (e.isMeasure(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n p.y2 = {group: 'height'};\n } else {\n if (e.has(Y)) { // is ordinal\n p.yc = {scale: Y, field: e.fieldRef(Y)};\n } else {\n p.y2 = {group: 'height', offset: -e.config('singleBarOffset')};\n }\n\n if (e.has(SIZE)) {\n p.height = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else {\n p.height = {\n value: e.bandSize(Y, layout.y.useSmallBand),\n offset: -1\n };\n }\n }\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else {\n p.fill = {value: e.value(COLOR)};\n }\n\n // opacity\n var opacity = e.field(COLOR).opacity;\n if (opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction point_props(e, layout, style) {\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n p.x = {value: e.bandSize(X, layout.x.useSmallBand) / 2};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {value: e.bandSize(Y, layout.y.useSmallBand) / 2};\n }\n\n // size\n if (e.has(SIZE)) {\n p.size = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else if (!e.has(SIZE)) {\n p.size = {value: e.value(SIZE)};\n }\n\n // shape\n if (e.has(SHAPE)) {\n p.shape = {scale: SHAPE, field: e.fieldRef(SHAPE)};\n } else if (!e.has(SHAPE)) {\n p.shape = {value: e.value(SHAPE)};\n }\n\n // fill or stroke\n if (e.field(SHAPE).filled) {\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.fill = {value: e.value(COLOR)};\n }\n } else {\n if (e.has(COLOR)) {\n p.stroke = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.stroke = {value: e.value(COLOR)};\n }\n p.strokeWidth = {value: e.config('strokeWidth')};\n }\n\n // opacity\n var opacity = e.field(COLOR).opacity || style.opacity;\n if (opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction line_props(e,layout, style) {\n // jshint unused:false\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n p.x = {value: 0};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {group: 'height'};\n }\n\n // stroke\n if (e.has(COLOR)) {\n p.stroke = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.stroke = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity;\n if (opacity) p.opacity = {value: opacity};\n\n p.strokeWidth = {value: e.config('strokeWidth')};\n\n return p;\n}\n\nfunction area_props(e, layout, style) {\n // jshint unused:false\n var p = {};\n\n // x\n if (e.isMeasure(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n if (e.isDimension(Y)) {\n p.x2 = {scale: X, value: 0};\n p.orient = {value: 'horizontal'};\n }\n } else if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else {\n p.x = {value: 0};\n }\n\n // y\n if (e.isMeasure(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n p.y2 = {scale: Y, value: 0};\n } else if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else {\n p.y = {group: 'height'};\n }\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.fill = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity;\n if (opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction tick_props(e, layout, style) {\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n if (e.isDimension(X)) {\n p.x.offset = -e.bandSize(X, layout.x.useSmallBand) / 3;\n }\n } else if (!e.has(X)) {\n p.x = {value: 0};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n if (e.isDimension(Y)) {\n p.y.offset = -e.bandSize(Y, layout.y.useSmallBand) / 3;\n }\n } else if (!e.has(Y)) {\n p.y = {value: 0};\n }\n\n // width\n if (!e.has(X) || e.isDimension(X)) {\n p.width = {value: e.bandSize(X, layout.y.useSmallBand) / 1.5};\n } else {\n p.width = {value: 1};\n }\n\n // height\n if (!e.has(Y) || e.isDimension(Y)) {\n p.height = {value: e.bandSize(Y, layout.y.useSmallBand) / 1.5};\n } else {\n p.height = {value: 1};\n }\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else {\n p.fill = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if(opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction filled_point_props(shape) {\n return function(e, layout, style) {\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n p.x = {value: e.bandSize(X, layout.x.useSmallBand) / 2};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {value: e.bandSize(Y, layout.y.useSmallBand) / 2};\n }\n\n // size\n if (e.has(SIZE)) {\n p.size = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else if (!e.has(X)) {\n p.size = {value: e.value(SIZE)};\n }\n\n // shape\n p.shape = {value: shape};\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.fill = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if(opacity) p.opacity = {value: opacity};\n\n return p;\n };\n}\n\nfunction text_props(e, layout, style, stats) {\n var p = {},\n field = e.field(TEXT);\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n if (e.has(TEXT) && e.isType(TEXT, Q)) {\n p.x = {value: layout.cellWidth-5};\n } else {\n p.x = {value: e.bandSize(X, layout.x.useSmallBand) / 2};\n }\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {value: e.bandSize(Y, layout.y.useSmallBand) / 2};\n }\n\n // size\n if (e.has(SIZE)) {\n p.fontSize = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else if (!e.has(SIZE)) {\n p.fontSize = {value: field.font.size};\n }\n\n // fill\n // color should be set to background\n p.fill = {value: field.color};\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if(opacity) p.opacity = {value: opacity};\n\n // text\n if (e.has(TEXT)) {\n if (e.isType(TEXT, Q)) {\n var fieldStats = stats[e.fieldName(TEXT)],\n numberFormat = field.format || e.numberFormat(fieldStats);\n\n p.text = {template: '{{' + e.fieldRef(TEXT) + ' | number:\\'' +\n numberFormat +'\\'}}'};\n p.align = {value: field.align};\n } else {\n p.text = {field: e.fieldRef(TEXT)};\n }\n } else {\n p.text = {value: field.placeholder};\n }\n\n p.font = {value: field.font.family};\n p.fontWeight = {value: field.font.weight};\n p.fontStyle = {value: field.font.style};\n p.baseline = {value: field.baseline};\n\n return p;\n}\n","'use strict';\nrequire('../globals');\nvar util = require('../util'),\n time = require('./time'),\n colorbrewer = require('colorbrewer'),\n interpolate = require('d3-color').interpolateHsl,\n schema = require('../schema/schema');\n\nvar scale = module.exports = {};\n\nscale.names = function(props) {\n return util.keys(util.keys(props).reduce(function(a, x) {\n if (props[x] && props[x].scale) a[props[x].scale] = 1;\n return a;\n }, {}));\n};\n\nscale.defs = function(names, encoding, layout, stats, style, sorting, opt) {\n opt = opt || {};\n\n return names.reduce(function(a, name) {\n var s = {\n name: name,\n type: scale.type(name, encoding),\n domain: scale.domain(name, encoding, stats, sorting, opt)\n };\n\n s.sort = scale.sort(s, encoding, name) || undefined;\n\n scale.range(s, encoding, layout, stats, opt);\n\n return (a.push(s), a);\n }, []);\n};\n\nscale.sort = function(s, encoding, name) {\n return s.type === 'ordinal' && (\n !!encoding.bin(name) ||\n encoding.sort(name).length === 0\n );\n};\n\nscale.type = function(name, encoding) {\n\n switch (encoding.type(name)) {\n case N: //fall through\n case O: return 'ordinal';\n case T:\n var timeUnit = encoding.field(name).timeUnit;\n return timeUnit ? time.scale.type(timeUnit, name) : 'time';\n case Q:\n if (encoding.bin(name)) {\n return name === COLOR ? 'linear' : 'ordinal';\n }\n return encoding.scale(name).type;\n }\n};\n\nscale.domain = function (name, encoding, stats, sorting, opt) {\n var field = encoding.field(name);\n\n if (encoding.isType(name, T)) {\n var range = time.scale.domain(field.timeUnit, name);\n if(range) return range;\n }\n\n if (field.bin) {\n // TODO(kanitw): this must be changed in vg2\n var fieldStat = stats[field.name],\n bins = util.getbins(fieldStat, field.bin.maxbins || schema.MAXBINS_DEFAULT),\n numbins = (bins.stop - bins.start) / bins.step;\n return util.range(numbins).map(function(i) {\n return bins.start + bins.step * i;\n });\n }\n\n if (name == opt.stack) {\n return {\n data: STACKED,\n field: encoding.fieldRef(name, {\n data: !encoding._vega2,\n prefn: (opt.facet ? 'max_' : '') + 'sum_'\n })\n };\n }\n var aggregate = encoding.aggregate(name),\n timeUnit = field.timeUnit,\n scaleUseRawDomain = encoding.scale(name).useRawDomain,\n useRawDomain = scaleUseRawDomain !== undefined ?\n scaleUseRawDomain : encoding.config('useRawDomain'),\n notCountOrSum = !aggregate || (aggregate !=='count' && aggregate !== 'sum');\n\n if ( useRawDomain && notCountOrSum && (\n // Q always uses non-ordinal scale except when it's binned and thus uses ordinal scale.\n (encoding.isType(name, Q) && !field.bin) ||\n // T uses non-ordinal scale when there's no unit or when the unit is not ordinal.\n (encoding.isType(name, T) && (!timeUnit || !time.isOrdinalFn(timeUnit)))\n )\n ) {\n return {data: RAW, field: encoding.fieldRef(name, {nofn: !timeUnit})};\n }\n\n return {data: sorting.getDataset(name), field: encoding.fieldRef(name)};\n};\n\n\nscale.range = function (s, encoding, layout, stats) {\n var spec = encoding.scale(s.name),\n field = encoding.field(s.name),\n timeUnit = field.timeUnit;\n\n switch (s.name) {\n case X:\n s.range = layout.cellWidth ? [0, layout.cellWidth] : 'width';\n if (s.type === 'ordinal') {\n s.bandWidth = encoding.bandSize(X, layout.x.useSmallBand);\n } else {\n if (encoding.isType(s.name,T) && timeUnit === 'year') {\n s.zero = false;\n } else {\n s.zero = spec.zero === undefined ? true : spec.zero;\n }\n\n s.reverse = spec.reverse;\n }\n s.round = true;\n if (s.type === 'time') {\n s.nice = timeUnit || encoding.config('timeScaleNice');\n }else {\n s.nice = true;\n }\n break;\n case Y:\n if (s.type === 'ordinal') {\n s.range = layout.cellHeight ?\n (field.bin ? [layout.cellHeight, 0] : [0, layout.cellHeight]) :\n 'height';\n s.bandWidth = encoding.bandSize(Y, layout.y.useSmallBand);\n } else {\n s.range = layout.cellHeight ? [layout.cellHeight, 0] : 'height';\n if (encoding.isType(s.name,T) && timeUnit === 'year') {\n s.zero = false;\n } else {\n s.zero = spec.zero === undefined ? true : spec.zero;\n }\n\n s.reverse = spec.reverse;\n }\n\n s.round = true;\n\n if (s.type === 'time') {\n s.nice = timeUnit || encoding.config('timeScaleNice');\n }else {\n s.nice = true;\n }\n break;\n case ROW: // support only ordinal\n s.bandWidth = layout.cellHeight;\n s.round = true;\n s.nice = true;\n break;\n case COL: // support only ordinal\n s.bandWidth = layout.cellWidth;\n s.round = true;\n s.nice = true;\n break;\n case SIZE:\n if (encoding.is('bar')) {\n // FIXME this is definitely incorrect\n // but let's fix it later since bar size is a bad encoding anyway\n s.range = [3, Math.max(encoding.bandSize(X), encoding.bandSize(Y))];\n } else if (encoding.is(TEXT)) {\n s.range = [8, 40];\n } else { //point\n var bandSize = Math.min(encoding.bandSize(X), encoding.bandSize(Y)) - 1;\n s.range = [10, 0.8 * bandSize*bandSize];\n }\n s.round = true;\n s.zero = false;\n break;\n case SHAPE:\n s.range = 'shapes';\n break;\n case COLOR:\n s.range = scale.color(s, encoding, stats);\n if (s.type !== 'ordinal') s.zero = false;\n break;\n default:\n throw new Error('Unknown encoding name: '+ s.name);\n }\n\n // FIXME(kanitw): Jul 29, 2015 - consolidate this with above\n switch (s.name) {\n case ROW:\n case COL:\n s.padding = encoding.config('cellPadding');\n s.outerPadding = 0;\n break;\n case X:\n case Y:\n if (s.type === 'ordinal') { //&& !s.bandWidth\n s.points = true;\n s.padding = encoding.field(s.name).band.padding;\n }\n }\n};\n\nscale.color = function(s, encoding, stats) {\n var colorScale = encoding.scale(COLOR),\n range = colorScale.range,\n cardinality = encoding.cardinality(COLOR, stats),\n type = encoding.type(COLOR);\n\n if (range === undefined) {\n var ordinalPalette = colorScale.ordinalPalette,\n quantitativeRange = colorScale.quantitativeRange;\n\n if (s.type === 'ordinal') {\n if (type === N) {\n // use categorical color scale\n if (cardinality <= 10) {\n range = colorScale.c10palette;\n } else {\n range = colorScale.c20palette;\n }\n return scale.color.palette(range, cardinality, type);\n } else {\n if (ordinalPalette) {\n return scale.color.palette(ordinalPalette, cardinality, type);\n }\n return scale.color.interpolate(quantitativeRange[0], quantitativeRange[1], cardinality);\n }\n } else { //time or quantitative\n return [quantitativeRange[0], quantitativeRange[1]];\n }\n }\n};\n\nscale.color.palette = function(range, cardinality, type) {\n // FIXME(kanitw): Jul 29, 2015 - check range is string\n switch (range) {\n case 'category10k':\n // tableau's category 10, ordered by perceptual kernel study results\n // https://github.com/uwdata/perceptual-kernels\n return ['#2ca02c', '#e377c2', '#7f7f7f', '#17becf', '#8c564b', '#d62728', '#bcbd22', '#9467bd', '#ff7f0e', '#1f77b4'];\n\n // d3/tableau category10/20/20b/20c\n case 'category10':\n return ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'];\n\n case 'category20':\n return ['#1f77b4', '#aec7e8', '#ff7f0e', '#ffbb78', '#2ca02c', '#98df8a', '#d62728', '#ff9896', '#9467bd', '#c5b0d5', '#8c564b', '#c49c94', '#e377c2', '#f7b6d2', '#7f7f7f', '#c7c7c7', '#bcbd22', '#dbdb8d', '#17becf', '#9edae5'];\n\n case 'category20b':\n return ['#393b79', '#5254a3', '#6b6ecf', '#9c9ede', '#637939', '#8ca252', '#b5cf6b', '#cedb9c', '#8c6d31', '#bd9e39', '#e7ba52', '#e7cb94', '#843c39', '#ad494a', '#d6616b', '#e7969c', '#7b4173', '#a55194', '#ce6dbd', '#de9ed6'];\n\n case 'category20c':\n return ['#3182bd', '#6baed6', '#9ecae1', '#c6dbef', '#e6550d', '#fd8d3c', '#fdae6b', '#fdd0a2', '#31a354', '#74c476', '#a1d99b', '#c7e9c0', '#756bb1', '#9e9ac8', '#bcbddc', '#dadaeb', '#636363', '#969696', '#bdbdbd', '#d9d9d9'];\n }\n\n // TODO add our own set of custom ordinal color palette\n\n if (range in colorbrewer) {\n var palette = colorbrewer[range];\n\n // if cardinality pre-defined, use it.\n if (cardinality in palette) return palette[cardinality];\n\n // if not, use the highest cardinality one for nominal\n if (type === N) {\n return palette[Math.max.apply(null, util.keys(palette))];\n }\n\n // otherwise, interpolate\n var ps = cardinality < 3 ? 3 : Math.max.apply(null, util.keys(palette)),\n from = 0 , to = ps - 1;\n // FIXME add config for from / to\n\n return scale.color.interpolate(palette[ps][from], palette[ps][to], cardinality);\n }\n\n return range;\n};\n\nscale.color.interpolate = function (start, end, cardinality) {\n\n var interpolator = interpolate(start, end);\n return util.range(cardinality).map(function(i) { return interpolator(i*1.0/(cardinality-1)); });\n};\n","'use strict';\n\nrequire('../globals');\n\nvar vlfield = require('../field');\n\nmodule.exports = addSortTransforms;\n\n// adds new transforms that produce sorted fields\nfunction addSortTransforms(data, encoding, stats, opt) {\n // jshint unused:false\n\n var datasetMapping = {};\n var counter = 0;\n\n encoding.forEach(function(field, encType) {\n var sortBy = encoding.sort(encType, stats);\n if (sortBy.length > 0) {\n var fields = sortBy.map(function(d) {\n return {\n op: d.aggregate,\n field: vlfield.fieldRef(d, {nofn: true, data: !encoding._vega2})\n };\n });\n\n var byClause = sortBy.map(function(d) {\n var reverse = (d.reverse ? '-' : '');\n return reverse + vlfield.fieldRef(d, {data: !encoding._vega2});\n });\n\n var dataName = 'sorted' + counter++;\n\n var transforms = [\n {\n type: 'aggregate',\n groupby: [ encoding.fieldRef(encType) ],\n fields: fields\n },\n {\n type: 'sort',\n by: byClause\n }\n ];\n\n data.push({\n name: dataName,\n source: RAW,\n transform: transforms\n });\n\n datasetMapping[encType] = dataName;\n }\n });\n\n return {\n getDataset: function(encType) {\n var data = datasetMapping[encType];\n if (!data) {\n return TABLE;\n }\n return data;\n }\n };\n}\n\n","'use strict';\n\nrequire('../globals');\n\nvar marks = require('./marks');\n\nmodule.exports = stacking;\n\nfunction stacking(data, encoding, mdef, facets) {\n if (!marks[encoding.marktype()].stack) return false;\n\n // TODO: add || encoding.has(LOD) here once LOD is implemented\n if (!encoding.has(COLOR)) return false;\n\n var dim=null, val=null, idx =null,\n isXMeasure = encoding.isMeasure(X),\n isYMeasure = encoding.isMeasure(Y);\n\n if (isXMeasure && !isYMeasure) {\n dim = Y;\n val = X;\n idx = 0;\n } else if (isYMeasure && !isXMeasure) {\n dim = X;\n val = Y;\n idx = 1;\n } else {\n return null; // no stack encoding\n }\n\n // add transform to compute sums for scale\n var stacked = {\n name: STACKED,\n source: TABLE,\n transform: [{\n type: 'aggregate',\n groupby: [encoding.fieldRef(dim)].concat(facets), // dim and other facets\n fields: [{op: 'sum', field: encoding.fieldRef(val)}] // TODO check if field with aggregate is correct?\n }]\n };\n\n if (facets && facets.length > 0) {\n stacked.transform.push({ //calculate max for each facet\n type: 'aggregate',\n groupby: facets,\n fields: [{\n op: 'max',\n field: encoding.fieldName(val, {fn: 'sum'})\n }]\n });\n }\n\n data.push(stacked);\n\n // add stack transform to mark\n mdef.from.transform = [{\n type: 'stack',\n point: encoding.fieldRef(dim),\n height: encoding.fieldRef(val),\n output: {y1: val, y0: val + '2'}\n }];\n\n // TODO: This is super hack-ish -- consolidate into modular mark properties?\n mdef.properties.update[val] = mdef.properties.enter[val] = {scale: val, field: val};\n mdef.properties.update[val + '2'] = mdef.properties.enter[val + '2'] = {scale: val, field: val + '2'};\n\n return val; //return stack encoding\n}\n","'use strict';\n\nrequire('../globals');\n\nvar vlfield = require('../field');\n\nmodule.exports = function(encoding, stats) {\n return {\n opacity: estimateOpacity(encoding, stats),\n };\n};\n\nfunction estimateOpacity(encoding,stats) {\n if (!stats) {\n return 1;\n }\n\n var numPoints = 0;\n\n if (encoding.isAggregate()) { // aggregate plot\n numPoints = 1;\n\n // get number of points in each \"cell\"\n // by calculating product of cardinality\n // for each non faceting and non-ordinal X / Y fields\n // note that ordinal x,y are not include since we can\n // consider that ordinal x are subdividing the cell into subcells anyway\n encoding.forEach(function(field, encType) {\n\n if (encType !== ROW && encType !== COL &&\n !((encType === X || encType === Y) &&\n vlfield.isOrdinalScale(field))\n ) {\n numPoints *= encoding.cardinality(encType, stats);\n }\n });\n\n } else { // raw plot\n\n // TODO: error handling\n if (!stats['*'])\n return 1;\n\n numPoints = stats['*'].max; // count\n\n // small multiples divide number of points\n var numMultiples = 1;\n if (encoding.has(ROW)) {\n numMultiples *= encoding.cardinality(ROW, stats);\n }\n if (encoding.has(COL)) {\n numMultiples *= encoding.cardinality(COL, stats);\n }\n numPoints /= numMultiples;\n }\n\n var opacity = 0;\n if (numPoints <= 25) {\n opacity = 1;\n } else if (numPoints < 200) {\n opacity = 0.8;\n } else if (numPoints < 1000 || encoding.is('tick')) {\n opacity = 0.7;\n } else {\n opacity = 0.3;\n }\n\n return opacity;\n}\n\n","'use strict';\n\nrequire('../globals');\n\nvar groupdef = require('./group').def;\n\nmodule.exports = subfaceting;\n\nfunction subfaceting(group, mdef, details, stack, encoding) {\n var m = group.marks,\n g = groupdef('subfacet', {marks: m});\n\n group.marks = [g];\n g.from = mdef.from;\n delete mdef.from;\n\n //TODO test LOD -- we should support stack / line without color (LOD) field\n var trans = (g.from.transform || (g.from.transform = []));\n trans.unshift({type: 'facet', keys: details});\n\n if (stack && encoding.has(COLOR)) {\n trans.unshift({type: 'sort', by: encoding.fieldRef(COLOR)});\n }\n}\n","'use strict';\n\nrequire('../globals');\n\nvar groupdef = require('./group').def,\n vlfield = require('../field');\n\nmodule.exports = template;\n\nfunction template(encoding, layout, stats) {\n // jshint unused:false\n\n // TODO(kanitw): Jul 22, 2015 - split this file into data and template\n var data = {name: RAW, format: {}},\n table = {name: TABLE, source: RAW},\n dataUrl = encoding.data('url'),\n dataType = encoding.data('formatType'),\n values = encoding.data('values');\n\n if (encoding.hasValues()) {\n data.values = values;\n } else {\n data.url = dataUrl;\n data.format.type = dataType;\n }\n\n encoding.forEach(function(field, encType) {\n var name;\n if (field.type == T) {\n data.format.parse = data.format.parse || {};\n data.format.parse[field.name] = 'date';\n } else if (field.type == Q) {\n data.format.parse = data.format.parse || {};\n if (vlfield.isCount(field)) {\n name = 'count';\n } else {\n name = field.name;\n }\n data.format.parse[name] = 'number';\n }\n });\n\n return {\n width: layout.width,\n height: layout.height,\n padding: 'auto',\n data: [data, table],\n marks: [groupdef('cell', {\n width: layout.cellWidth ? {value: layout.cellWidth} : undefined,\n height: layout.cellHeight ? {value: layout.cellHeight} : undefined\n })]\n };\n}\n","'use strict';\n\nvar util = require('../util'),\n d3_time_format = require('d3-time-format');\n\nmodule.exports = time;\n\nvar LONG_DATE = new Date(2014, 8, 17);\n\nfunction time(spec, encoding) { // FIXME refactor to reduce side effect #276\n // jshint unused:false\n var timeFields = {}, timeUnits = {};\n\n // find unique formula transformation and bin function\n encoding.forEach(function(field, encType) {\n if (field.type === T && field.timeUnit) {\n timeFields[encoding.fieldRef(encType)] = {\n field: field,\n encType: encType\n };\n timeUnits[field.timeUnit] = true;\n }\n });\n\n // add formula transform\n var data = spec.data[0],\n transform = data.transform = data.transform || [];\n\n for (var f in timeFields) {\n var tf = timeFields[f];\n time.transform(transform, encoding, tf.encType, tf.field);\n }\n\n // add scales\n var scales = spec.scales = spec.scales || [];\n for (var timeUnit in timeUnits) {\n var scale = time.scale.def(timeUnit, encoding);\n if (scale) scales.push(scale);\n }\n return spec;\n}\n\ntime.cardinality = function(field, stats, filterNull, type) {\n var timeUnit = field.timeUnit;\n switch (timeUnit) {\n case 'seconds': return 60;\n case 'minutes': return 60;\n case 'hours': return 24;\n case 'day': return 7;\n case 'date': return 31;\n case 'month': return 12;\n case 'year':\n var stat = stats[field.name],\n yearstat = stats['year_'+field.name];\n\n if (!yearstat) { return null; }\n\n return yearstat.distinct -\n (stat.nulls > 0 && filterNull[type] ? 1 : 0);\n }\n\n return null;\n};\n\ntime.maxLength = function(timeUnit, encoding) {\n switch (timeUnit) {\n case 'seconds':\n case 'minutes':\n case 'hours':\n case 'date':\n return 2;\n case 'month':\n case 'day':\n var range = time.range(timeUnit, encoding);\n if (range) {\n // return the longest name in the range\n return Math.max.apply(null, range.map(function(r) {return r.length;}));\n }\n return 2;\n case 'year':\n return 4; //'1998'\n }\n // no time unit\n var timeFormat = encoding.config('timeFormat');\n return d3_time_format.utcFormat(timeFormat)(LONG_DATE).length;\n};\n\nfunction fieldFn(func, field) {\n return 'utc' + func + '(d.data.'+ field.name +')';\n}\n\n/**\n * @return {String} date binning formula of the given field\n */\ntime.formula = function(field) {\n return fieldFn(field.timeUnit, field);\n};\n\n/** add formula transforms to data */\ntime.transform = function(transform, encoding, encType, field) {\n transform.push({\n type: 'formula',\n field: encoding.fieldRef(encType),\n expr: time.formula(field)\n });\n};\n\ntime.range = function(timeUnit, encoding) {\n var labelLength = encoding.config('timeScaleLabelLength'),\n scaleLabel;\n switch (timeUnit) {\n case 'day':\n scaleLabel = encoding.config('dayScaleLabel');\n break;\n case 'month':\n scaleLabel = encoding.config('monthScaleLabel');\n break;\n }\n if (scaleLabel) {\n return labelLength ? scaleLabel.map(\n function(s) { return s.substr(0, labelLength);}\n ) : scaleLabel;\n }\n return;\n};\n\n\ntime.scale = {};\n\n/** append custom time scales for axis label */\ntime.scale.def = function(timeUnit, encoding) {\n var range = time.range(timeUnit, encoding);\n\n if (range) {\n return {\n name: 'time-'+timeUnit,\n type: 'ordinal',\n domain: time.scale.domain(timeUnit),\n range: range\n };\n }\n return null;\n};\n\ntime.isOrdinalFn = function(timeUnit) {\n switch (timeUnit) {\n case 'seconds':\n case 'minutes':\n case 'hours':\n case 'day':\n case 'date':\n case 'month':\n return true;\n }\n return false;\n};\n\ntime.scale.type = function(timeUnit, name) {\n if (name === COLOR) {\n return 'linear'; // time has order, so use interpolated ordinal color scale.\n }\n\n return time.isOrdinalFn(timeUnit) || name === COL || name === ROW ? 'ordinal' : 'linear';\n};\n\ntime.scale.domain = function(timeUnit, name) {\n var isColor = name === COLOR;\n switch (timeUnit) {\n case 'seconds':\n case 'minutes': return isColor ? [0,59] : util.range(0, 60);\n case 'hours': return isColor ? [0,23] : util.range(0, 24);\n case 'day': return isColor ? [0,6] : util.range(0, 7);\n case 'date': return isColor ? [1,31] : util.range(1, 32);\n case 'month': return isColor ? [0,11] : util.range(0, 12);\n }\n return null;\n};\n\n/** whether a particular time function has custom scale for labels implemented in time.scale */\ntime.hasScale = function(timeUnit) {\n switch (timeUnit) {\n case 'day':\n case 'month':\n return true;\n }\n return false;\n};\n","'use strict';\n\nrequire('./globals');\n\nvar consts = module.exports = {};\n\nconsts.encodingTypes = [X, Y, ROW, COL, SIZE, SHAPE, COLOR, TEXT, DETAIL];\n\nconsts.shorthand = {\n delim: '|',\n assign: '=',\n type: ',',\n func: '_'\n};\n","'use strict';\n\nrequire('./globals');\n\nvar stats = require('datalib/src/stats');\n\nvar vldata = module.exports = {};\n\n/** Mapping from datalib's inferred type to Vega-lite's type */\nvldata.types = {\n 'boolean': N,\n 'number': Q,\n 'integer': Q,\n 'date': T,\n 'string': N\n};\n\nvldata.stats = function(data) {\n var summary = stats.summary(data);\n\n return summary.reduce(function(s, profile) {\n s[profile.field] = profile;\n return s;\n }, {\n '*': {\n max: data.length,\n min: 0\n }\n });\n};","// utility for enc\n\n'use strict';\n\nvar consts = require('./consts'),\n c = consts.shorthand,\n vlfield = require('./field'),\n util = require('./util'),\n schema = require('./schema/schema'),\n encTypes = schema.encTypes;\n\nvar vlenc = module.exports = {};\n\nvlenc.countRetinal = function(enc) {\n var count = 0;\n if (enc.color) count++;\n if (enc.size) count++;\n if (enc.shape) count++;\n return count;\n};\n\nvlenc.has = function(enc, encType) {\n var fieldDef = enc && enc[encType];\n return fieldDef && fieldDef.name;\n};\n\nvlenc.isAggregate = function(enc) {\n for (var k in enc) {\n if (vlenc.has(enc, k) && enc[k].aggregate) {\n return true;\n }\n }\n return false;\n};\n\nvlenc.forEach = function(enc, f) {\n var i = 0;\n encTypes.forEach(function(k) {\n if (vlenc.has(enc, k)) {\n f(enc[k], k, i++);\n }\n });\n};\n\nvlenc.map = function(enc, f) {\n var arr = [];\n encTypes.forEach(function(k) {\n if (vlenc.has(enc, k)) {\n arr.push(f(enc[k], k, enc));\n }\n });\n return arr;\n};\n\nvlenc.reduce = function(enc, f, init) {\n var r = init;\n encTypes.forEach(function(k) {\n if (vlenc.has(enc, k)) {\n r = f(r, enc[k], k, enc);\n }\n });\n return r;\n};\n\n/*\n * return key-value pairs of field name and list of fields of that field name\n */\nvlenc.fields = function(enc) {\n return vlenc.reduce(enc, function (m, field) {\n var fieldList = m[field.name] = m[field.name] || [],\n containsType = fieldList.containsType = fieldList.containsType || {};\n\n if (fieldList.indexOf(field) === -1) {\n fieldList.push(field);\n // augment the array with containsType.Q / O / N / T\n containsType[field.type] = true;\n }\n return m;\n }, {});\n};\n\nvlenc.shorthand = function(enc) {\n return vlenc.map(enc, function(field, et) {\n return et + c.assign + vlfield.shorthand(field);\n }).join(c.delim);\n};\n\nvlenc.fromShorthand = function(shorthand) {\n var enc = util.isArray(shorthand) ? shorthand : shorthand.split(c.delim);\n return enc.reduce(function(m, e) {\n var split = e.split(c.assign),\n enctype = split[0].trim(),\n field = split[1];\n\n m[enctype] = vlfield.fromShorthand(field);\n return m;\n }, {});\n};","'use strict';\n\n// utility for field\n\nrequire('./globals');\n\nvar consts = require('./consts'),\n c = consts.shorthand,\n time = require('./compiler/time'),\n util = require('./util'),\n schema = require('./schema/schema');\n\nvar vlfield = module.exports = {};\n\n/**\n * @param field\n * @param opt\n * opt.nofn -- exclude bin, aggregate, timeUnit\n * opt.data - include 'data.'\n * opt.fn - replace fn with custom function prefix\n * opt.prefn - prepend fn with custom function prefix\n\n * @return {[type]} [description]\n */\nvlfield.fieldRef = function(field, opt) {\n opt = opt || {};\n\n var f = (opt.data ? 'data.' : '') + (opt.prefn || ''),\n nofn = opt.nofn || opt.fn,\n name = field.name;\n\n if (vlfield.isCount(field)) {\n return f + 'count';\n } else if (!nofn && field.bin) {\n return f + 'bin_' + name;\n } else if (!nofn && field.aggregate) {\n return f + field.aggregate + '_' + name;\n } else if (!nofn && field.timeUnit) {\n return f + field.timeUnit + '_' + name;\n } else if (opt.fn) {\n return f + opt.fn + '_' + name;\n } else {\n return f + name;\n }\n};\n\nvlfield.shorthand = function(f) {\n var c = consts.shorthand;\n return (f.aggregate ? f.aggregate + c.func : '') +\n (f.timeUnit ? f.timeUnit + c.func : '') +\n (f.bin ? 'bin' + c.func : '') +\n (f.name || '') + c.type + f.type;\n};\n\nvlfield.shorthands = function(fields, delim) {\n delim = delim || c.delim;\n return fields.map(vlfield.shorthand).join(delim);\n};\n\nvlfield.fromShorthand = function(shorthand) {\n var split = shorthand.split(c.type), i;\n var o = {\n name: split[0].trim(),\n type: split[1].trim()\n };\n\n // check aggregate type\n for (i in schema.aggregate.enum) {\n var a = schema.aggregate.enum[i];\n if (o.name.indexOf(a + '_') === 0) {\n o.name = o.name.substr(a.length + 1);\n if (a == 'count' && o.name.length === 0) o.name = '*';\n o.aggregate = a;\n break;\n }\n }\n\n // check time timeUnit\n for (i in schema.timefns) {\n var tu = schema.timefns[i];\n if (o.name && o.name.indexOf(tu + '_') === 0) {\n o.name = o.name.substr(o.length + 1);\n o.timeUnit = tu;\n break;\n }\n }\n\n // check bin\n if (o.name && o.name.indexOf('bin_') === 0) {\n o.name = o.name.substr(4);\n o.bin = true;\n }\n\n return o;\n};\n\nvar isType = vlfield.isType = function (fieldDef, type) {\n return fieldDef.type === type;\n};\n\nvar isTypes = vlfield.isTypes = function (fieldDef, types) {\n for (var t=0; t 0 && filterNull[type] ? 1 : 0);\n};\n","'use strict';\n\n// declare global constant\nvar g = global || window;\n\ng.TABLE = 'table';\ng.RAW = 'raw';\ng.STACKED = 'stacked';\ng.INDEX = 'index';\n\ng.X = 'x';\ng.Y = 'y';\ng.ROW = 'row';\ng.COL = 'col';\ng.SIZE = 'size';\ng.SHAPE = 'shape';\ng.COLOR = 'color';\ng.TEXT = 'text';\ng.DETAIL = 'detail';\n\ng.N = 'N';\ng.O = 'O';\ng.Q = 'Q';\ng.T = 'T';\n","// Package of defining Vega-lite Specification's json schema\n'use strict';\n\nrequire('../globals');\n\nvar schema = module.exports = {},\n util = require('../util'),\n toMap = util.toMap,\n colorbrewer = require('colorbrewer');\n\nschema.util = require('./schemautil');\n\nschema.marktype = {\n type: 'string',\n enum: ['point', 'tick', 'bar', 'line', 'area', 'circle', 'square', 'text']\n};\n\nschema.aggregate = {\n type: 'string',\n enum: ['avg', 'sum', 'median', 'min', 'max', 'count'],\n supportedEnums: {\n Q: ['avg', 'median', 'sum', 'min', 'max', 'count'],\n O: ['median','min','max'],\n N: [],\n T: ['avg', 'median', 'min', 'max'],\n '': ['count']\n },\n supportedTypes: toMap([Q, N, O, T, ''])\n};\n\nschema.getSupportedRole = function(encType) {\n return schema.schema.properties.encoding.properties[encType].supportedRole;\n};\n\nschema.timeUnits = ['year', 'month', 'day', 'date', 'hours', 'minutes', 'seconds'];\n\nschema.defaultTimeFn = 'month';\n\nschema.timeUnit = {\n type: 'string',\n enum: schema.timeUnits,\n supportedTypes: toMap([T])\n};\n\nschema.scale_type = {\n type: 'string',\n // TODO(kanitw) read vega's schema here, add description\n enum: ['linear', 'log', 'pow', 'sqrt', 'quantile'],\n default: 'linear',\n supportedTypes: toMap([Q])\n};\n\nschema.field = {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n }\n }\n};\n\nvar clone = util.duplicate;\nvar merge = schema.util.merge;\n\nschema.MAXBINS_DEFAULT = 15;\n\nvar bin = {\n type: ['boolean', 'object'],\n default: false,\n properties: {\n maxbins: {\n type: 'integer',\n default: schema.MAXBINS_DEFAULT,\n minimum: 2,\n description: 'Maximum number of bins.'\n }\n },\n supportedTypes: toMap([Q]) // TODO: add O after finishing #81\n};\n\nvar typicalField = merge(clone(schema.field), {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: [N, O, Q, T]\n },\n aggregate: schema.aggregate,\n timeUnit: schema.timeUnit,\n bin: bin,\n scale: {\n type: 'object',\n properties: {\n type: schema.scale_type,\n reverse: {\n type: 'boolean',\n default: false,\n supportedTypes: toMap([Q, T])\n },\n zero: {\n type: 'boolean',\n description: 'Include zero',\n default: true,\n supportedTypes: toMap([Q, T])\n },\n nice: {\n type: 'string',\n enum: ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'],\n supportedTypes: toMap([T])\n },\n useRawDomain: {\n type: 'boolean',\n default: undefined,\n description: 'Use the raw data range as scale domain instead of ' +\n 'aggregated data for aggregate axis. ' +\n 'This option does not work with sum or count aggregate' +\n 'as they might have a substantially larger scale range.' +\n 'By default, use value from config.useRawDomain.'\n }\n }\n }\n }\n});\n\nvar onlyOrdinalField = merge(clone(schema.field), {\n type: 'object',\n supportedRole: {\n dimension: true\n },\n properties: {\n type: {\n type: 'string',\n enum: [N, O, Q, T] // ordinal-only field supports Q when bin is applied and T when time unit is applied.\n },\n timeUnit: schema.timeUnit,\n bin: bin,\n aggregate: {\n type: 'string',\n enum: ['count'],\n supportedTypes: toMap([N, O]) // FIXME this looks weird to me\n }\n }\n});\n\nvar axisMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true},\n properties: {\n axis: {\n type: 'object',\n properties: {\n grid: {\n type: 'boolean',\n default: true,\n description: 'A flag indicate if gridlines should be created in addition to ticks.'\n },\n layer: {\n type: 'string',\n default: 'back',\n description: 'A string indicating if the axis (and any gridlines) should be placed above or below the data marks.'\n },\n orient: {\n type: 'string',\n default: undefined,\n enum: ['top', 'right', 'left', 'bottom'],\n description: 'The orientation of the axis. One of top, bottom, left or right. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart).'\n },\n ticks :{\n type: 'integer',\n default: 5,\n description: 'A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale\\'s range.'\n },\n title: {\n type: 'string',\n default: undefined,\n description: 'A title for the axis. (Shows field name and its function by default.)'\n },\n titleMaxLength: {\n type: 'integer',\n default: undefined,\n description: 'Max length for axis title if the title is automatically generated from the field\\'s description'\n },\n titleOffset: {\n type: 'integer',\n default: undefined, // auto\n description: 'A title offset value for the axis.'\n },\n format: {\n type: 'string',\n default: undefined, // auto\n description: 'The formatting pattern for axis labels. '+\n 'If not undefined, this will be determined by ' +\n 'small/largeNumberFormat and the max value ' +\n 'of the field.'\n },\n maxLabelLength: {\n type: 'integer',\n default: 25,\n minimum: 0,\n description: 'Truncate labels that are too long.'\n }\n }\n }\n }\n};\n\nvar sortMixin = {\n type: 'object',\n properties: {\n sort: {\n type: 'array',\n default: [],\n items: {\n type: 'object',\n supportedTypes: toMap([N, O]),\n required: ['name', 'aggregate'],\n properties: {\n name: {\n type: 'string'\n },\n aggregate: {\n type: 'string',\n enum: ['avg', 'sum', 'min', 'max', 'count']\n },\n reverse: {\n type: 'boolean',\n default: false\n }\n }\n }\n }\n }\n};\n\nvar bandMixin = {\n type: 'object',\n properties: {\n band: {\n type: 'object',\n properties: {\n size: {\n type: 'integer',\n minimum: 0,\n default: undefined\n },\n padding: {\n type: 'integer',\n minimum: 0,\n default: 1\n }\n }\n }\n }\n};\n\nvar legendMixin = {\n type: 'object',\n properties: {\n legend: {\n type: 'boolean',\n default: true\n }\n }\n};\n\nvar textMixin = {\n type: 'object',\n supportedMarktypes: {'text': true},\n properties: {\n align: {\n type: 'string',\n default: 'right'\n },\n baseline: {\n type: 'string',\n default: 'middle'\n },\n color: {\n type: 'string',\n role: 'color',\n default: '#000000'\n },\n margin: {\n type: 'integer',\n default: 4,\n minimum: 0\n },\n placeholder: {\n type: 'string',\n default: 'Abc'\n },\n font: {\n type: 'object',\n properties: {\n weight: {\n type: 'string',\n enum: ['normal', 'bold'],\n default: 'normal'\n },\n size: {\n type: 'integer',\n default: 10,\n minimum: 0\n },\n family: {\n type: 'string',\n default: 'Helvetica Neue'\n },\n style: {\n type: 'string',\n default: 'normal',\n enum: ['normal', 'italic']\n }\n }\n },\n format: {\n type: 'string',\n default: undefined, // auto\n description: 'The formatting pattern for text value. '+\n 'If not undefined, this will be determined by ' +\n 'small/largeNumberFormat and the max value ' +\n 'of the field.'\n },\n }\n};\n\nvar sizeMixin = {\n type: 'object',\n supportedMarktypes: {point: true, bar: true, circle: true, square: true, text: true},\n properties: {\n value: {\n type: 'integer',\n default: 30,\n minimum: 0\n }\n }\n};\n\nvar colorMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true, 'text': true},\n properties: {\n value: {\n type: 'string',\n role: 'color',\n default: 'steelblue'\n },\n opacity: {\n type: 'number',\n default: undefined, // auto\n minimum: 0,\n maximum: 1\n },\n scale: {\n type: 'object',\n properties: {\n range: {\n type: ['string', 'array'],\n default: undefined,\n description:\n 'color palette, if undefined vega-lite will use data property' +\n 'to pick one from c10palette, c20palette, or ordinalPalette'\n //FIXME\n },\n c10palette: {\n type: 'string',\n default: 'category10',\n enum: [\n // Tableau\n 'category10', 'category10k',\n // Color Brewer\n 'Pastel1', 'Pastel2', 'Set1', 'Set2', 'Set3'\n ]\n },\n c20palette: {\n type: 'string',\n default: 'category20',\n enum: ['category20', 'category20b', 'category20c']\n },\n ordinalPalette: {\n type: 'string',\n default: undefined,\n enum: util.keys(colorbrewer)\n },\n quantitativeRange: {\n type: 'array',\n default: ['#AFC6A3', '#09622A'], // tableau greens\n // default: ['#ccece6', '#00441b'], // BuGn.9 [2-8]\n items: {\n type: 'string',\n role: 'color'\n }\n }\n }\n }\n }\n};\n\nvar shapeMixin = {\n type: 'object',\n supportedMarktypes: {point: true, circle: true, square: true},\n properties: {\n value: {\n type: 'string',\n enum: ['circle', 'square', 'cross', 'diamond', 'triangle-up', 'triangle-down'],\n default: 'circle'\n },\n filled: {\n type: 'boolean',\n default: false,\n description: 'whether the shape\\'s color should be used as fill color instead of stroke color'\n }\n }\n};\n\nvar detailMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, line: true, circle: true, square: true}\n};\n\nvar rowMixin = {\n properties: {\n height: {\n type: 'number',\n minimum: 0,\n default: 150\n }\n }\n};\n\nvar colMixin = {\n properties: {\n width: {\n type: 'number',\n minimum: 0,\n default: 150\n },\n axis: {\n properties: {\n maxLabelLength: {\n type: 'integer',\n default: 12,\n minimum: 0,\n description: 'Truncate labels that are too long.'\n }\n }\n }\n }\n};\n\nvar facetMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true, text: true},\n properties: {\n padding: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n default: 0.1\n }\n }\n};\n\nvar requiredNameType = {\n required: ['name', 'type']\n};\n\nvar multiRoleField = merge(clone(typicalField), {\n supportedRole: {\n measure: true,\n dimension: true\n }\n});\n\nvar quantitativeField = merge(clone(typicalField), {\n supportedRole: {\n measure: true,\n dimension: 'ordinal-only' // using size to encoding category lead to order interpretation\n }\n});\n\nvar onlyQuantitativeField = merge(clone(typicalField), {\n supportedRole: {\n measure: true\n }\n});\n\nvar x = merge(clone(multiRoleField), axisMixin, bandMixin, requiredNameType, sortMixin);\nvar y = clone(x);\n\nvar facet = merge(clone(onlyOrdinalField), requiredNameType, facetMixin, sortMixin);\nvar row = merge(clone(facet), axisMixin, rowMixin);\nvar col = merge(clone(facet), axisMixin, colMixin);\n\nvar size = merge(clone(quantitativeField), legendMixin, sizeMixin, sortMixin);\nvar color = merge(clone(multiRoleField), legendMixin, colorMixin, sortMixin);\n\nvar shape = merge(clone(onlyOrdinalField), legendMixin, shapeMixin, sortMixin);\nvar detail = merge(clone(onlyOrdinalField), detailMixin, sortMixin);\n\n// we only put aggregated measure in pivot table\nvar text = merge(clone(onlyQuantitativeField), textMixin, sortMixin);\n\n// TODO add label\n\nvar filter = {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n operands: {\n type: 'array',\n items: {\n type: ['string', 'boolean', 'integer', 'number']\n }\n },\n operator: {\n type: 'string',\n enum: ['>', '>=', '=', '!=', '<', '<=', 'notNull']\n }\n }\n }\n};\n\nvar data = {\n type: 'object',\n properties: {\n // data source\n formatType: {\n type: 'string',\n enum: ['json', 'csv'],\n default: 'json'\n },\n url: {\n type: 'string',\n default: undefined\n },\n values: {\n type: 'array',\n default: undefined,\n description: 'Pass array of objects instead of a url to a file.',\n items: {\n type: 'object',\n additionalProperties: true\n }\n }\n }\n};\n\nvar config = {\n type: 'object',\n properties: {\n // template\n width: {\n type: 'integer',\n default: undefined\n },\n height: {\n type: 'integer',\n default: undefined\n },\n viewport: {\n type: 'array',\n items: {\n type: 'integer'\n },\n default: undefined\n },\n gridColor: {\n type: 'string',\n role: 'color',\n default: 'black'\n },\n gridOpacity: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n default: 0.08\n },\n\n // filter null\n filterNull: {\n type: 'object',\n properties: {\n O: {type:'boolean', default: false},\n Q: {type:'boolean', default: true},\n T: {type:'boolean', default: true}\n }\n },\n toggleSort: {\n type: 'string',\n default: O\n },\n\n // single plot\n singleHeight: {\n // will be overwritten by bandWidth * (cardinality + padding)\n type: 'integer',\n default: 200,\n minimum: 0\n },\n singleWidth: {\n // will be overwritten by bandWidth * (cardinality + padding)\n type: 'integer',\n default: 200,\n minimum: 0\n },\n // band size\n largeBandSize: {\n type: 'integer',\n default: 21,\n minimum: 0\n },\n smallBandSize: {\n //small multiples or single plot with high cardinality\n type: 'integer',\n default: 12,\n minimum: 0\n },\n largeBandMaxCardinality: {\n type: 'integer',\n default: 10\n },\n // small multiples\n cellPadding: {\n type: 'number',\n default: 0.1\n },\n cellGridColor: {\n type: 'string',\n role: 'color',\n default: 'black'\n },\n cellGridOpacity: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n default: 0.15\n },\n cellBackgroundColor: {\n type: 'string',\n role: 'color',\n default: 'transparent'\n },\n textCellWidth: {\n type: 'integer',\n default: 90,\n minimum: 0\n },\n\n // marks\n strokeWidth: {\n type: 'integer',\n default: 2,\n minimum: 0\n },\n singleBarOffset: {\n type: 'integer',\n default: 5,\n minimum: 0\n },\n // scales\n timeScaleLabelLength: {\n type: 'integer',\n default: 3,\n minimum: 0,\n description: 'Max length for values in dayScaleLabel and monthScaleLabel. Zero means using full names in dayScaleLabel/monthScaleLabel.'\n },\n dayScaleLabel: {\n type: 'array',\n items: {\n type: 'string'\n },\n default: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n description: 'Axis labels for day of week, starting from Sunday.' +\n '(Consistent with Javascript -- See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay.'\n },\n monthScaleLabel: {\n type: 'array',\n items: {\n type: 'string'\n },\n default: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n description: 'Axis labels for month.'\n },\n // other\n characterWidth: {\n type: 'integer',\n default: 6\n },\n maxSmallNumber: {\n type: 'number',\n default: 10000,\n description: 'maximum number that a field will be considered smallNumber.'+\n 'Used for axis labelling.'\n },\n smallNumberFormat: {\n type: 'string',\n default: '',\n description: 'D3 Number format for axis labels and text tables '+\n 'for number <= maxSmallNumber. Used for axis labelling.'\n },\n largeNumberFormat: {\n type: 'string',\n default: '.3s',\n description: 'D3 Number format for axis labels and text tables ' +\n 'for number > maxSmallNumber.'\n },\n timeFormat: {\n type: 'string',\n default: '%Y-%m-%d',\n description: 'Date format for axis labels.'\n },\n useRawDomain: {\n type: 'boolean',\n default: false,\n description: 'Use the raw data range as scale domain instead of ' +\n 'aggregated data for aggregate axis. ' +\n 'This option does not work with sum or count aggregate' +\n 'as they might have a substantially larger scale range.' +\n 'By default, use value from config.useRawDomain.'\n }\n }\n};\n\n/** @type Object Schema of a vega-lite specification */\nschema.schema = {\n $schema: 'http://json-schema.org/draft-04/schema#',\n description: 'Schema for Vega-lite specification',\n type: 'object',\n required: ['marktype', 'encoding', 'data'],\n properties: {\n data: data,\n marktype: schema.marktype,\n encoding: {\n type: 'object',\n properties: {\n x: x,\n y: y,\n row: row,\n col: col,\n size: size,\n color: color,\n shape: shape,\n text: text,\n detail: detail\n }\n },\n filter: filter,\n config: config\n }\n};\n\nschema.encTypes = util.keys(schema.schema.properties.encoding.properties);\n\n/** Instantiate a verbose vl spec from the schema */\nschema.instantiate = function() {\n return schema.util.instantiate(schema.schema);\n};\n","'use strict';\n\nvar schemautil = module.exports = {},\n util = require('../util');\n\nvar isEmpty = function(obj) {\n return Object.keys(obj).length === 0;\n};\n\nschemautil.extend = function(instance, schema) {\n return schemautil.merge(schemautil.instantiate(schema), instance);\n};\n\n// instantiate a schema\nschemautil.instantiate = function(schema) {\n var val;\n if (schema === undefined) {\n return undefined;\n } else if ('default' in schema) {\n val = schema.default;\n return util.isObject(val) ? util.duplicate(val) : val;\n } else if (schema.type === 'object') {\n var instance = {};\n for (var name in schema.properties) {\n val = schemautil.instantiate(schema.properties[name]);\n if (val !== undefined) {\n instance[name] = val;\n }\n }\n return instance;\n } else if (schema.type === 'array') {\n return [];\n }\n return undefined;\n};\n\n// remove all defaults from an instance\nschemautil.subtract = function(instance, defaults) {\n var changes = {};\n for (var prop in instance) {\n var def = defaults[prop];\n var ins = instance[prop];\n // Note: does not properly subtract arrays\n if (!defaults || def !== ins) {\n if (typeof ins === 'object' && !util.isArray(ins) && def) {\n var c = schemautil.subtract(ins, def);\n if (!isEmpty(c))\n changes[prop] = c;\n } else if (!util.isArray(ins) || ins.length > 0) {\n changes[prop] = ins;\n }\n }\n }\n return changes;\n};\n\nschemautil.merge = function(/*dest*, src0, src1, ...*/){\n var dest = arguments[0];\n for (var i=1 ; i",">=","=","!=","<","<=","expr","formula","nofn","output","filters","condition","op1","op2","warn","dims","meas","source","groupby","../field",18,"faceting","axesGrp","enter","facetKeys","cellAxes","hasRow","hasCol","mark","error","unshift","groupdef","trans",19,"_name",20,"vllayout","box","hasX","hasY","xCardinality","yCardinality","TEXT","colCardinality","rowCardinality","getMaxNumberLength","d3_format","getMaxLength","extraOffset","d3-format",21,"COLOR","SIZE","SHAPE","console","shape","symbols","filled","strokeWidth","leg",22,"bar_props","xc","y2","yc","point_props","line_props","area_props","tick_props","filled_point_props","text_props","fontSize","font","text","template","placeholder","family","fontWeight","weight","fontStyle","prop","bar","supportedEncoding","requiredEncoding","detail","area","tick","circle","square","point",23,"interpolate","vlsort","props","domain","fieldStat","getbins","numbins","STACKED","prefn","scaleUseRawDomain","useRawDomain","notCountOrSum","isOrdinalFn","getDataName","bandWidth","nice","outerPadding","points","colorScale","ordinalPalette","quantitativeRange","c10palette","c20palette","palette","ps","to","interpolator","../schema/schema","d3-color",24,"datasetMapping","byClause","dataName","transforms",25,"stacking","dim","isXMeasure","isYMeasure","stacked","y1","y0",26,"estimateOpacity","numPoints","numMultiples",27,"subfaceting",28,"d3_time_format","LONG_DATE","stat","yearstat","scaleLabel","labelLength","substr","isColor","d3-time-format",29,"encodingTypes","DETAIL","func",30,"vldata","*",31,"encTypes","countRetinal","fieldDef","arr","enctype",32,"shorthands","timefns","tu","./compiler/time",33,"INDEX",34,"METHODS","logger","cfn","bind","Function",35,"enum","supportedEnums","supportedTypes","getSupportedRole","supportedRole","timeUnits","defaultTimeFn","scale_type","default","clone","minimum","description","typicalField","onlyOrdinalField","dimension","axisMixin","supportedMarktypes","sortMixin","items","required","bandMixin","legendMixin","textMixin","role","margin","sizeMixin","colorMixin","maximum","shapeMixin","detailMixin","rowMixin","colMixin","facetMixin","requiredNameType","multiRoleField","measure","quantitativeField","onlyQuantitativeField","additionalProperties","viewport","gridColor","gridOpacity","singleHeight","singleWidth","largeBandSize","smallBandSize","largeBandMaxCardinality","cellGridColor","cellGridOpacity","cellBackgroundColor","textCellWidth","singleBarOffset","timeScaleLabelLength","dayScaleLabel","monthScaleLabel","characterWidth","maxSmallNumber","smallNumberFormat","largeNumberFormat","$schema","./schemautil",36,"dest","src","hasOwnProperty","constructor","schemautil","isEmpty","instance","changes","ins",37,"isin","item","thisArg","any","noaugment","./logger","datalib/src/bins/bins","datalib/src/generate","datalib/src/util",38,"./Encoding","./compiler/compiler"],"mappings":"CAAA,SAAAA,GAAA,GAAA,gBAAAC,UAAA,mBAAAC,QAAAA,OAAAD,QAAAD,QAAA,IAAA,kBAAAG,SAAAA,OAAAC,IAAAD,UAAAH,OAAA,CAAA,GAAAK,EAAAA,GAAA,mBAAAC,QAAAA,OAAA,mBAAAC,QAAAA,OAAA,mBAAAC,MAAAA,KAAAC,KAAAJ,EAAAK,GAAAV,MAAA,WAAA,GAAAG,EAAA,OAAA,SAAAQ,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAhB,GAAA,GAAAqB,OAAA,uBAAAL,EAAA,IAAA,MAAAhB,GAAAsB,KAAA,mBAAAtB,EAAA,GAAAuB,GAAAV,EAAAG,IAAAf,WAAA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,EAAA,WACAT,EAAAisB,OAAAxrB,EAAA,mBACAT,EAAAutB,YAAAvtB,EAAAksB,SAAAgB,UACAltB,EAAAiF,OAAAxE,EAAA,aAAAwE,OAEAzF,EAAAD,QAAAS,IrC2uOGknC,aAAa,GAAGC,sBAAsB,GAAGvV,WAAW,GAAGmE,SAAS,GAAGlE,QAAQ,GAAGC,UAAU,GAAGC,YAAY,GAAGC,kBAAkB,GAAGjL,SAAS,GAAGkT,YAAY,SAAS,KAAK","file":"vega-lite.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o> 16 & 0xff, n >> 8 & 0xff, n & 0xff);\n }\n\n function Hsl(h, s, l) {\n this.h = +h;\n this.s = Math.max(0, Math.min(1, +s));\n this.l = Math.max(0, Math.min(1, +l));\n }\n\n var __prototype = Hsl.prototype = new Color;\n\n __prototype.brighter = function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k);\n };\n\n __prototype.darker = function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k);\n };/* From FvD 13.37, CSS Color Module Level 3 */\n\n function hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n }\n\n __prototype.rgb = function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l <= .5 ? l * (1 + s) : l + s - l * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2)\n );\n };\n\n var hsl = function(h, s, l) {\n if (arguments.length === 1) {\n if (h instanceof Hsl) {\n l = h.l;\n s = h.s;\n h = h.h;\n } else {\n if (!(h instanceof Color)) h = color(h);\n if (h) {\n if (h instanceof Hsl) return h;\n h = h.rgb();\n var r = h.r / 255,\n g = h.g / 255,\n b = h.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n range = max - min;\n l = (max + min) / 2;\n if (range) {\n s = l < .5 ? range / (max + min) : range / (2 - max - min);\n if (r === max) h = (g - b) / range + (g < b) * 6;\n else if (g === max) h = (b - r) / range + 2;\n else h = (r - g) / range + 4;\n h *= 60;\n } else {\n h = NaN;\n s = l > 0 && l < 1 ? 0 : h;\n }\n } else {\n h = s = l = NaN;\n }\n }\n }\n return new Hsl(h, s, l);\n }\n\n var reHex3 = /^#([0-9a-f]{3})$/,\n reHex6 = /^#([0-9a-f]{6})$/,\n reRgbInteger = /^rgb\\(\\s*([-+]?\\d+)\\s*,\\s*([-+]?\\d+)\\s*,\\s*([-+]?\\d+)\\s*\\)$/,\n reRgbPercent = /^rgb\\(\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*\\)$/,\n reHslPercent = /^hsl\\(\\s*([-+]?\\d+(?:\\.\\d+)?)\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*\\)$/;\n\n var color = function(format) {\n var m;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf))) // #f00\n : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000\n : (m = reRgbInteger.exec(format)) ? rgb(m[1], m[2], m[3]) // rgb(255,0,0)\n : (m = reRgbPercent.exec(format)) ? rgb(m[1] * 2.55, m[2] * 2.55, m[3] * 2.55) // rgb(100%,0%,0%)\n : (m = reHslPercent.exec(format)) ? hsl(m[1], m[2] * .01, m[3] * .01) // hsl(120,50%,50%)\n : named.has(format) ? rgbn(named.get(format))\n : null;\n }// Done lazily to avoid circular dependency between Color, Rgb and Hsl.\n\n color.prototype = Color.prototype;\n rgb.prototype = Rgb.prototype;\n hsl.prototype = Hsl.prototype;\n\n function Lab(l, a, b) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n }\n\n var ___prototype = Lab.prototype = new Color;\n\n var Kn = 18;\n\n ___prototype.brighter = function(k) {\n return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b);\n };\n\n ___prototype.darker = function(k) {\n return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b);\n };\n\n function xyz2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n }\n\n var Xn = 0.950470, // D65 standard referent\n Yn = 1,\n Zn = 1.088830,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\n function lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n }\n\n ___prototype.rgb = function() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n y = Yn * lab2xyz(y);\n x = Xn * lab2xyz(x);\n z = Zn * lab2xyz(z);\n return new Rgb(\n xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z)\n );\n };\n\n function xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n }\n\n function rgb2xyz(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n }\n\n var deg2rad = Math.PI / 180;\n\n function Hcl(h, c, l) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n }\n\n var ____prototype = Hcl.prototype = new Color;\n\n ____prototype.brighter = function(k) {\n return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k));\n };\n\n ____prototype.darker = function(k) {\n return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k));\n };\n\n ____prototype.rgb = function() {\n return lab(this).rgb();\n };\n\n var lab = function(l, a, b) {\n if (arguments.length === 1) {\n if (l instanceof Lab) {\n b = l.b;\n a = l.a;\n l = l.l;\n } else if (l instanceof Hcl) {\n var h = l.h * deg2rad;\n b = Math.sin(h) * l.c;\n a = Math.cos(h) * l.c;\n l = l.l;\n } else {\n if (!(l instanceof Rgb)) l = rgb(l);\n var r = rgb2xyz(l.r),\n g = rgb2xyz(l.g),\n b = rgb2xyz(l.b),\n x = xyz2lab((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / Xn),\n y = xyz2lab((0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / Yn),\n z = xyz2lab((0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / Zn);\n b = 200 * (y - z);\n a = 500 * (x - y);\n l = 116 * y - 16;\n }\n }\n return new Lab(l, a, b);\n }\n lab.prototype = Lab.prototype;\n var rad2deg = 180 / Math.PI;\n\n var hcl = function(h, c, l) {\n if (arguments.length === 1) {\n if (h instanceof Hcl) {\n l = h.l;\n c = h.c;\n h = h.h;\n } else {\n if (!(h instanceof Lab)) h = lab(h);\n l = h.l;\n c = Math.sqrt(h.a * h.a + h.b * h.b);\n h = Math.atan2(h.b, h.a) * rad2deg;\n if (h < 0) h += 360;\n }\n }\n return new Hcl(h, c, l);\n }\n hcl.prototype = Hcl.prototype;\n\n function Cubehelix(h, s, l) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n }\n\n var prototype = Cubehelix.prototype = new Color;\n\n prototype.brighter = function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Cubehelix(this.h, this.s, this.l * k);\n };\n\n prototype.darker = function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Cubehelix(this.h, this.s, this.l * k);\n };\n\n var gamma = 1, // Default gamma. TODO Customize.\n A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\n var cubehelix = function(h, s, l) {\n if (arguments.length === 1) {\n if (h instanceof Cubehelix) {\n l = h.l;\n s = h.s;\n h = h.h;\n } else {\n if (!(h instanceof Rgb)) h = rgb(h);\n var r = h.r / 255, g = h.g / 255, b = h.b / 255;\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB);\n var bl = b - l, k = (E * (g - l) - C * bl) / D, lgamma = Math.pow(l, gamma);\n s = Math.sqrt(k * k + bl * bl) / (E * lgamma * (1 - lgamma)); // NaN if lgamma=0 or lgamma=1\n h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n if (h < 0) h += 360;\n }\n }\n return new Cubehelix(h, s, l);\n }\n\n prototype.rgb = function() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n l = Math.pow(this.l, gamma),\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new Rgb(\n 255 * (l + a * (A * cosh + B * sinh)),\n 255 * (l + a * (C * cosh + D * sinh)),\n 255 * (l + a * (E * cosh))\n );\n };\n cubehelix.prototype = Cubehelix.prototype;\n\n var interpolateCubehelixLong = function(a, b) {\n a = cubehelix(a);\n b = cubehelix(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : b.h - ah,\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n var deltaHue = function(h, h0) {\n var delta = (h - h0) % 360;\n return delta + (delta > 180 ? -360 : delta < -180 ? 360 : 0);\n }\n\n var interpolateCubehelix = function(a, b) {\n a = cubehelix(a);\n b = cubehelix(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : deltaHue(b.h, ah),\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateHclLong = function(a, b) {\n a = hcl(a);\n b = hcl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n ac = isNaN(a.c) ? b.c : a.c,\n al = a.l,\n bh = isNaN(b.h) ? 0 : b.h - ah,\n bc = isNaN(b.c) ? 0 : b.c - ac,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.c = ac + bc * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateHcl = function(a, b) {\n a = hcl(a);\n b = hcl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n ac = isNaN(a.c) ? b.c : a.c,\n al = a.l,\n bh = isNaN(b.h) ? 0 : deltaHue(b.h, ah),\n bc = isNaN(b.c) ? 0 : b.c - ac,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.c = ac + bc * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateLab = function(a, b) {\n a = lab(a);\n b = lab(b);\n var al = a.l,\n aa = a.a,\n ab = a.b,\n bl = b.l - al,\n ba = b.a - aa,\n bb = b.b - ab;\n return function(t) {\n a.l = al + bl * t;\n a.a = aa + ba * t;\n a.b = ab + bb * t;\n return a + \"\";\n };\n }\n\n var interpolateHslLong = function(a, b) {\n a = hsl(a);\n b = hsl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : b.h - ah,\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateHsl = function(a, b) {\n a = hsl(a);\n b = hsl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : deltaHue(b.h, ah),\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateRgb = function(a, b) {\n a = rgb(a);\n b = rgb(b);\n var ar = a.r,\n ag = a.g,\n ab = a.b,\n br = b.r - ar,\n bg = b.g - ag,\n bb = b.b - ab;\n return function(t) {\n return format(Math.round(ar + br * t), Math.round(ag + bg * t), Math.round(ab + bb * t));\n };\n }\n\n exports.color = color;\n exports.rgb = rgb;\n exports.hsl = hsl;\n exports.lab = lab;\n exports.hcl = hcl;\n exports.cubehelix = cubehelix;\n exports.interpolateRgb = interpolateRgb;\n exports.interpolateHsl = interpolateHsl;\n exports.interpolateHslLong = interpolateHslLong;\n exports.interpolateLab = interpolateLab;\n exports.interpolateHcl = interpolateHcl;\n exports.interpolateHclLong = interpolateHclLong;\n exports.interpolateCubehelix = interpolateCubehelix;\n exports.interpolateCubehelixLong = interpolateCubehelixLong;\n\n}));\n},{}],5:[function(require,module,exports){\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n factory((global.format = {}));\n}(this, function (exports) { 'use strict';\n\n var prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\n\n // Computes the decimal coefficient and exponent of the specified number x with\n // significant digits p, where x is positive and p is in [1, 21] or undefined.\n // For example, formatDecimal(1.23) returns [\"123\", 0].\n function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }\n\n function exponent(x) {\n return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;\n }\n\n var prefixExponent;\n\n function formatPrefixAuto(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimal(x, p + i - 1)[0]; // less than 1y!\n }\n\n function formatRounded(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n }\n\n function formatDefault(x, p) {\n x = x.toPrecision(p);\n\n out: for (var n = x.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (x[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n case \"e\": break out;\n default: if (i0 > 0) i0 = 0; break;\n }\n }\n\n return i0 > 0 ? x.slice(0, i0) + x.slice(i1 + 1) : x;\n }\n\n var formatTypes = {\n \"\": formatDefault,\n \"%\": function(x, p) { return (x * 100).toFixed(p); },\n \"b\": function(x) { return Math.round(x).toString(2); },\n \"c\": function(x) { return x + \"\"; },\n \"d\": function(x) { return Math.round(x).toString(10); },\n \"e\": function(x, p) { return x.toExponential(p); },\n \"f\": function(x, p) { return x.toFixed(p); },\n \"g\": function(x, p) { return x.toPrecision(p); },\n \"o\": function(x) { return Math.round(x).toString(8); },\n \"p\": function(x, p) { return formatRounded(x * 100, p); },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n \"x\": function(x) { return Math.round(x).toString(16); }\n };\n\n\n // [[fill]align][sign][symbol][0][width][,][.precision][type]\n var re = /^(?:(.)?([<>=^]))?([+\\-\\( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?([a-z%])?$/i;\n\n function FormatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n\n var match,\n fill = match[1] || \" \",\n align = match[2] || \">\",\n sign = match[3] || \"-\",\n symbol = match[4] || \"\",\n zero = !!match[5],\n width = match[6] && +match[6],\n comma = !!match[7],\n precision = match[8] && +match[8].slice(1),\n type = match[9] || \"\";\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // Map invalid types to the default format.\n else if (!formatTypes[type]) type = \"\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n this.fill = fill;\n this.align = align;\n this.sign = sign;\n this.symbol = symbol;\n this.zero = zero;\n this.width = width;\n this.comma = comma;\n this.precision = precision;\n this.type = type;\n }\n\n FormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width == null ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision == null ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + this.type;\n };\n\n function formatSpecifier(specifier) {\n return new FormatSpecifier(specifier);\n }\n\n function identity(x) {\n return x;\n }\n\n function formatGroup(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n }\n\n function localeFormat(locale) {\n var group = locale.grouping && locale.thousands ? formatGroup(locale.grouping, locale.thousands) : identity,\n currency = locale.currency,\n decimal = locale.decimal;\n\n function format(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n type = specifier.type;\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currency[0] : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currency[1] : /[%p]/.test(type) ? \"%\" : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = !type || /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision == null ? (type ? 6 : 12)\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n return function(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Convert negative to positive, and compute the prefix.\n // Note that -0 is not less than 0, but 1 / -0 is!\n var valueNegative = (value < 0 || 1 / value < 0) && (value *= -1, true);\n\n // Perform the initial formatting.\n value = formatType(value, precision);\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : \"-\") : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = valueSuffix + (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n var i = -1, n = value.length, c;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": return valuePrefix + value + valueSuffix + padding;\n case \"=\": return valuePrefix + padding + value + valueSuffix;\n case \"^\": return padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);\n }\n return padding + valuePrefix + value + valueSuffix;\n };\n }\n\n function formatPrefix(specifier, value) {\n var f = format((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: format,\n formatPrefix: formatPrefix\n };\n }\n\n var locale = localeFormat({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n });\n\n exports.format = locale.format;\n exports.formatPrefix = locale.formatPrefix;\n\n function precisionRound(step, max) {\n return Math.max(0, exponent(Math.abs(max)) - exponent(Math.abs(step))) + 1;\n }\n\n function precisionPrefix(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n }\n\n function precisionFixed(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n }\n\n exports.formatSpecifier = formatSpecifier;\n exports.localeFormat = localeFormat;\n exports.precisionFixed = precisionFixed;\n exports.precisionPrefix = precisionPrefix;\n exports.precisionRound = precisionRound;\n\n}));\n},{}],6:[function(require,module,exports){\nif (typeof Map === \"undefined\") {\n Map = function() { this.clear(); };\n Map.prototype = {\n set: function(k, v) { this._[k] = v; return this; },\n get: function(k) { return this._[k]; },\n has: function(k) { return k in this._; },\n delete: function(k) { return k in this._ && delete this._[k]; },\n clear: function() { this._ = Object.create(null); },\n get size() { var n = 0; for (var k in this._) ++n; return n; },\n forEach: function(c) { for (var k in this._) c(this._[k], k, this); }\n };\n} else (function() {\n var m = new Map;\n if (m.set(0, 0) !== m) {\n m = m.set;\n Map.prototype.set = function() { m.apply(this, arguments); return this; };\n }\n})();\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n factory((global.timeFormat = {}));\n}(this, function (exports) { 'use strict';\n\n function utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n }\n\n function localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n }\n\n var pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"};\n\n function newYear(y) {\n return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0};\n }\n\n var percentRe = /^%/;\n\n function parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n }\n\n function parseZone(d, string, i) {\n return /^[+-]\\d{4}$/.test(string = string.slice(i, i + 5))\n ? (d.Z = -string, i + 5) // sign differs from getTimezoneOffset!\n : -1;\n }\n\n var numberRe = /^\\s*\\d+/;\n\n function parseWeekdayNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n }\n\n function parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n }\n\n function parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n }\n\n function parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n }\n\n function parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n }\n\n function parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n }\n\n function parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n }\n\n function parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n }\n\n function parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n }\n\n function parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n }\n\n function formatLiteralPercent() {\n return \"%\";\n }\n\n function formatUTCZone() {\n return \"+0000\";\n }\n\n function pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n }\n\n function formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n }\n\n function formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n }\n\n var t1 = new Date;\n\n var t0 = new Date;\n\n function newInterval(floori, offseti, count) {\n\n function interval(date) {\n return floori(date = new Date(+date)), date;\n }\n\n interval.floor = interval;\n\n interval.round = function(date) {\n var d0 = new Date(+date),\n d1 = new Date(date - 1);\n floori(d0), floori(d1), offseti(d1, 1);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), date;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [];\n start = new Date(start - 1);\n stop = new Date(+stop);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n offseti(start, 1), floori(start);\n if (start < stop) range.push(new Date(+start));\n while (offseti(start, step), floori(start), start < stop) range.push(new Date(+start));\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n while (--step >= 0) while (offseti(date, 1), !test(date));\n });\n };\n\n if (count) interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n return interval;\n }\n\n var utcYear = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCMonth(0, 1);\n }, function(date, offset) {\n date.setUTCFullYear(date.getUTCFullYear() + offset);\n }, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n });\n\n function utcWeekday(i) {\n return newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n }, function(date, offset) {\n date.setUTCDate(date.getUTCDate() + offset * 7);\n }, function(start, end) {\n return (end - start) / 6048e5;\n });\n }\n\n var utcMonday = utcWeekday(1);\n\n function formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d), d), p, 2);\n }\n\n function formatUTCWeekdayNumber(d) {\n return d.getUTCDay();\n }\n\n var utcSunday = utcWeekday(0);\n\n function formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d), d), p, 2);\n }\n\n function formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n }\n\n function formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n }\n\n function formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n }\n\n function formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n }\n\n var utcDay = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, offset) {\n date.setUTCDate(date.getUTCDate() + offset);\n }, function(start, end) {\n return (end - start) / 864e5;\n });\n\n function formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n }\n\n function formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n }\n\n function formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n }\n\n function formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n }\n\n function formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n }\n\n function formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n }\n\n function formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n }\n\n var year = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setMonth(0, 1);\n }, function(date, offset) {\n date.setFullYear(date.getFullYear() + offset);\n }, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n });\n\n function weekday(i) {\n return newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n }, function(date, offset) {\n date.setDate(date.getDate() + offset * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 6048e5;\n });\n }\n\n var monday = weekday(1);\n\n function formatWeekNumberMonday(d, p) {\n return pad(monday.count(year(d), d), p, 2);\n }\n\n function formatWeekdayNumber(d) {\n return d.getDay();\n }\n\n var sunday = weekday(0);\n\n function formatWeekNumberSunday(d, p) {\n return pad(sunday.count(year(d), d), p, 2);\n }\n\n function formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n }\n\n function formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n }\n\n function formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n }\n\n function formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n }\n\n var day = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n }, function(date, offset) {\n date.setDate(date.getDate() + offset);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 864e5;\n });\n\n function formatDayOfYear(d, p) {\n return pad(1 + day.count(year(d), d), p, 3);\n }\n\n function formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n }\n\n function formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n }\n\n function formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n }\n\n function formatLookup(names) {\n var map = new Map, i = -1, n = names.length;\n while (++i < n) map.set(names[i].toLowerCase(), i);\n return map;\n }\n\n var requoteRe = /[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g;\n\n function requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n }\n\n function formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n }\n\n function localeFormat(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"S\": formatSeconds,\n \"U\": formatWeekNumberSunday,\n \"w\": formatWeekdayNumber,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"S\": formatUTCSeconds,\n \"U\": formatUTCWeekNumberSunday,\n \"w\": formatUTCWeekdayNumber,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"S\": parseSeconds,\n \"U\": parseWeekNumberSunday,\n \"w\": parseWeekdayNumber,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n if (format = formats[c]) c = format(date, pad == null ? (c === \"e\" ? \" \" : \"0\") : pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, newDate) {\n return function(string) {\n var d = newYear(1900),\n i = parseSpecifier(d, specifier, string, 0);\n if (i != string.length) return null;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n if (\"w\" in d && (\"W\" in d || \"U\" in d)) {\n var day = utcDate(newYear(d.y)).getUTCDay();\n if (\"W\" in d) d.U = d.W, d.w = (d.w + 6) % 7, --day;\n d.m = 0;\n d.d = d.w + d.U * 7 - (day + 6) % 7;\n }\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n if (\"w\" in d && (\"W\" in d || \"U\" in d)) {\n var day = newDate(newYear(d.y)).getDay();\n if (\"W\" in d) d.U = d.W, d.w = (d.w + 6) % 7, --day;\n d.m = 0;\n d.d = d.w + d.U * 7 - (day + 6) % 7;\n }\n return newDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function parsePeriod(d, string, i) {\n var n = periodLookup.get(string.slice(i, i += 2).toLowerCase());\n return n == null ? -1 : (d.p = n, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.parse = newParse(specifier, localDate);\n f.toString = function() { return specifier; };\n return f;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.parse = newParse(specifier, utcDate);\n f.toString = function() { return specifier; };\n return f;\n }\n };\n }\n\n var locale = localeFormat({\n dateTime: \"%a %b %e %X %Y\",\n date: \"%m/%d/%Y\",\n time: \"%H:%M:%S\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n });\n\n exports.format = locale.format;\n exports.utcFormat = locale.utcFormat;\n\n var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\n function formatIsoNative(date) {\n return date.toISOString();\n }\n\n formatIsoNative.parse = function(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n };\n\n formatIsoNative.toString = function() {\n return isoSpecifier;\n };\n\n var formatIso = Date.prototype.toISOString && +new Date(\"2000-01-01T00:00:00.000Z\")\n ? formatIsoNative\n : locale.utcFormat(isoSpecifier);\n\n var isoFormat = formatIso;\n\n exports.isoFormat = isoFormat;\n exports.localeFormat = localeFormat;\n\n}));\n},{}],7:[function(require,module,exports){\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n factory((global.time = {}));\n}(this, function (exports) { 'use strict';\n\n var t1 = new Date;\n\n var t0 = new Date;\n\n function newInterval(floori, offseti, count) {\n\n function interval(date) {\n return floori(date = new Date(+date)), date;\n }\n\n interval.floor = interval;\n\n interval.round = function(date) {\n var d0 = new Date(+date),\n d1 = new Date(date - 1);\n floori(d0), floori(d1), offseti(d1, 1);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), date;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [];\n start = new Date(start - 1);\n stop = new Date(+stop);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n offseti(start, 1), floori(start);\n if (start < stop) range.push(new Date(+start));\n while (offseti(start, step), floori(start), start < stop) range.push(new Date(+start));\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n while (--step >= 0) while (offseti(date, 1), !test(date));\n });\n };\n\n if (count) interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n return interval;\n }\n\n var second = newInterval(function(date) {\n date.setMilliseconds(0);\n }, function(date, step) {\n date.setTime(+date + step * 1e3);\n }, function(start, end) {\n return (end - start) / 1e3;\n });\n\n exports.seconds = second.range;\n\n var minute = newInterval(function(date) {\n date.setSeconds(0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 6e4);\n }, function(start, end) {\n return (end - start) / 6e4;\n });\n\n exports.minutes = minute.range;\n\n var hour = newInterval(function(date) {\n date.setMinutes(0, 0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 36e5);\n }, function(start, end) {\n return (end - start) / 36e5;\n });\n\n exports.hours = hour.range;\n\n var day = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 864e5;\n });\n\n exports.days = day.range;\n\n function weekday(i) {\n return newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 6048e5;\n });\n }\n\n exports.sunday = weekday(0);\n\n exports.sundays = exports.sunday.range;\n\n exports.monday = weekday(1);\n\n exports.mondays = exports.monday.range;\n\n exports.tuesday = weekday(2);\n\n exports.tuesdays = exports.tuesday.range;\n\n exports.wednesday = weekday(3);\n\n exports.wednesdays = exports.wednesday.range;\n\n exports.thursday = weekday(4);\n\n exports.thursdays = exports.thursday.range;\n\n exports.friday = weekday(5);\n\n exports.fridays = exports.friday.range;\n\n exports.saturday = weekday(6);\n\n exports.saturdays = exports.saturday.range;\n\n var week = exports.sunday;\n\n exports.weeks = week.range;\n\n var month = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setDate(1);\n }, function(date, step) {\n date.setMonth(date.getMonth() + step);\n }, function(start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n });\n\n exports.months = month.range;\n\n var year = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setMonth(0, 1);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n }, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n });\n\n exports.years = year.range;\n\n var utcSecond = newInterval(function(date) {\n date.setUTCMilliseconds(0);\n }, function(date, step) {\n date.setTime(+date + step * 1e3);\n }, function(start, end) {\n return (end - start) / 1e3;\n });\n\n exports.utcSeconds = utcSecond.range;\n\n var utcMinute = newInterval(function(date) {\n date.setUTCSeconds(0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 6e4);\n }, function(start, end) {\n return (end - start) / 6e4;\n });\n\n exports.utcMinutes = utcMinute.range;\n\n var utcHour = newInterval(function(date) {\n date.setUTCMinutes(0, 0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 36e5);\n }, function(start, end) {\n return (end - start) / 36e5;\n });\n\n exports.utcHours = utcHour.range;\n\n var utcDay = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n }, function(start, end) {\n return (end - start) / 864e5;\n });\n\n exports.utcDays = utcDay.range;\n\n function utcWeekday(i) {\n return newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / 6048e5;\n });\n }\n\n exports.utcSunday = utcWeekday(0);\n\n exports.utcSundays = exports.utcSunday.range;\n\n exports.utcMonday = utcWeekday(1);\n\n exports.utcMondays = exports.utcMonday.range;\n\n exports.utcTuesday = utcWeekday(2);\n\n exports.utcTuesdays = exports.utcTuesday.range;\n\n exports.utcWednesday = utcWeekday(3);\n\n exports.utcWednesdays = exports.utcWednesday.range;\n\n exports.utcThursday = utcWeekday(4);\n\n exports.utcThursdays = exports.utcThursday.range;\n\n exports.utcFriday = utcWeekday(5);\n\n exports.utcFridays = exports.utcFriday.range;\n\n exports.utcSaturday = utcWeekday(6);\n\n exports.utcSaturdays = exports.utcSaturday.range;\n\n var utcWeek = exports.utcSunday;\n\n exports.utcWeeks = utcWeek.range;\n\n var utcMonth = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCDate(1);\n }, function(date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n }, function(start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n });\n\n exports.utcMonths = utcMonth.range;\n\n var utcYear = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCMonth(0, 1);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n }, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n });\n\n exports.utcYears = utcYear.range;\n\n exports.interval = newInterval;\n exports.second = second;\n exports.minute = minute;\n exports.hour = hour;\n exports.day = day;\n exports.week = week;\n exports.month = month;\n exports.year = year;\n exports.utcSecond = utcSecond;\n exports.utcMinute = utcMinute;\n exports.utcHour = utcHour;\n exports.utcDay = utcDay;\n exports.utcWeek = utcWeek;\n exports.utcMonth = utcMonth;\n exports.utcYear = utcYear;\n\n}));\n},{}],8:[function(require,module,exports){\nvar util = require('../util'),\n time = require('../time'),\n EPSILON = 1e-15;\n\nfunction bins(opt) {\n if (!opt) { throw Error(\"Missing binning options.\"); }\n\n // determine range\n var maxb = opt.maxbins || 15,\n base = opt.base || 10,\n logb = Math.log(base),\n div = opt.div || [5, 2], \n min = opt.min,\n max = opt.max,\n span = max - min,\n step, level, minstep, precision, v, i, eps;\n\n if (opt.step) {\n // if step size is explicitly given, use that\n step = opt.step;\n } else if (opt.steps) {\n // if provided, limit choice to acceptable step sizes\n step = opt.steps[Math.min(\n opt.steps.length - 1,\n bisect(opt.steps, span/maxb, 0, opt.steps.length)\n )];\n } else {\n // else use span to determine step size\n level = Math.ceil(Math.log(maxb) / logb);\n minstep = opt.minstep || 0;\n step = Math.max(\n minstep,\n Math.pow(base, Math.round(Math.log(span) / logb) - level)\n );\n \n // increase step size if too many bins\n do { step *= base; } while (Math.ceil(span/step) > maxb);\n\n // decrease step size if allowed\n for (i=0; i= minstep && span / v <= maxb) step = v;\n }\n }\n\n // update precision, min and max\n v = Math.log(step);\n precision = v >= 0 ? 0 : ~~(-v / logb) + 1;\n eps = Math.pow(base, -precision - 1);\n min = Math.min(min, Math.floor(min / step + eps) * step);\n max = Math.ceil(max / step) * step;\n\n return {\n start: min,\n stop: max,\n step: step,\n unit: {precision: precision},\n value: value,\n index: index\n };\n}\n\nfunction bisect(a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (util.cmp(a[mid], x) < 0) { lo = mid + 1; }\n else { hi = mid; }\n }\n return lo;\n}\n\nfunction value(v) {\n return this.step * Math.floor(v / this.step + EPSILON);\n}\n\nfunction index(v) {\n return Math.floor((v - this.start) / this.step + EPSILON);\n}\n\nfunction date_value(v) {\n return this.unit.date(value.call(this, v));\n}\n\nfunction date_index(v) {\n return index.call(this, this.unit.unit(v));\n}\n\nbins.date = function(opt) {\n if (!opt) { throw Error(\"Missing date binning options.\"); }\n\n // find time step, then bin\n var units = opt.utc ? time.utc : time,\n dmin = opt.min,\n dmax = opt.max,\n maxb = opt.maxbins || 20,\n minb = opt.minbins || 4,\n span = (+dmax) - (+dmin),\n unit = opt.unit ? units[opt.unit] : units.find(span, minb, maxb),\n spec = bins({\n min: unit.min != null ? unit.min : unit.unit(dmin),\n max: unit.max != null ? unit.max : unit.unit(dmax),\n maxbins: maxb,\n minstep: unit.minstep,\n steps: unit.step\n });\n\n spec.unit = unit;\n spec.index = date_index;\n if (!opt.raw) spec.value = date_value;\n return spec;\n};\n\nmodule.exports = bins;\n\n},{\"../time\":12,\"../util\":13}],9:[function(require,module,exports){\nvar gen = module.exports = {};\n\ngen.repeat = function(val, n) {\n var a = Array(n), i;\n for (i=0; i stop) range.push(j);\n else while ((j = start + step * ++i) < stop) range.push(j);\n return range;\n};\n\ngen.random = {};\n\ngen.random.uniform = function(min, max) {\n if (max === undefined) {\n max = min === undefined ? 1 : min;\n min = 0;\n }\n var d = max - min;\n var f = function() {\n return min + d * Math.random();\n };\n f.samples = function(n) { return gen.zeros(n).map(f); };\n return f;\n};\n\ngen.random.integer = function(a, b) {\n if (b === undefined) {\n b = a;\n a = 0;\n }\n var d = b - a;\n var f = function() {\n return a + Math.floor(d * Math.random());\n };\n f.samples = function(n) { return gen.zeros(n).map(f); };\n return f;\n};\n\ngen.random.normal = function(mean, stdev) {\n mean = mean || 0;\n stdev = stdev || 1;\n var next;\n var f = function() {\n var x = 0, y = 0, rds, c;\n if (next !== undefined) {\n x = next;\n next = undefined;\n return x;\n }\n do {\n x = Math.random()*2-1;\n y = Math.random()*2-1;\n rds = x*x + y*y;\n } while (rds === 0 || rds > 1);\n c = Math.sqrt(-2*Math.log(rds)/rds); // Box-Muller transform\n next = mean + y*c*stdev;\n return mean + x*c*stdev;\n };\n f.samples = function(n) { return gen.zeros(n).map(f); };\n return f;\n};\n},{}],10:[function(require,module,exports){\nvar util = require('../util');\n\nvar TYPES = '__types__';\n\nvar PARSERS = {\n boolean: util.boolean,\n integer: util.number,\n number: util.number,\n date: util.date,\n string: function(x) { return x==='' ? null : x; }\n};\n\nvar TESTS = {\n boolean: function(x) { return x==='true' || x==='false' || util.isBoolean(x); },\n integer: function(x) { return TESTS.number(x) && (x=+x) === ~~x; },\n number: function(x) { return !isNaN(+x) && !util.isDate(x); },\n date: function(x) { return !isNaN(Date.parse(x)); }\n};\n\nfunction annotation(data, types) {\n if (!types) return data && data[TYPES] || null;\n data[TYPES] = types;\n}\n\nfunction type(values, f) {\n f = util.$(f);\n var v, i, n;\n\n // if data array has type annotations, use them\n if (values[TYPES]) {\n v = f(values[TYPES]);\n if (util.isString(v)) return v;\n }\n\n for (i=0, n=values.length; !util.isValid(v) && i b) b = v;\n }\n }\n return [a, b];\n};\n\n// Find the integer indices of the minimum and maximum values.\nstats.extent.index = function(values, f) {\n f = util.$(f);\n var x = -1, y = -1, a, b, v, i, n = values.length;\n for (i=0; i b) { b = v; y = i; }\n }\n }\n return [x, y];\n};\n\n// Compute the dot product of two arrays of numbers.\nstats.dot = function(values, a, b) {\n var sum = 0, i, v;\n if (!b) {\n if (values.length !== a.length) {\n throw Error('Array lengths must match.');\n }\n for (i=0; i -1 && p !== v) {\n mu = 1 + (i-1 + tie) / 2;\n for (; tie -1) {\n mu = 1 + (n-1 + tie) / 2;\n for (; tie max) max = x;\n delta = x - mean;\n mean = mean + delta / (++valid);\n M2 = M2 + delta * (x - mean);\n vals.push(x);\n }\n }\n M2 = M2 / (valid - 1);\n sd = Math.sqrt(M2);\n\n // sort values for median and iqr\n vals.sort(util.cmp);\n\n return {\n type: type(values, f),\n unique: u,\n count: values.length,\n valid: valid,\n missing: missing,\n distinct: distinct,\n min: min,\n max: max,\n mean: mean,\n stdev: sd,\n median: (v = stats.quantile(vals, 0.5)),\n q1: stats.quantile(vals, 0.25),\n q3: stats.quantile(vals, 0.75),\n modeskew: sd === 0 ? 0 : (mean - v) / sd\n };\n};\n\n// Compute profiles for all variables in a data set.\nstats.summary = function(data, fields) {\n fields = fields || util.keys(data[0]);\n var s = fields.map(function(f) {\n var p = stats.profile(data, util.$(f));\n return (p.field = f, p);\n });\n return (s.__summary__ = true, s);\n};\n\nmodule.exports = stats;\n},{\"./generate\":9,\"./import/type\":10,\"./util\":13}],12:[function(require,module,exports){\nvar d3_time = require('d3-time');\n\nvar tempDate = new Date(),\n baseDate = new Date(0, 0, 1).setFullYear(0), // Jan 1, 0 AD\n utcBaseDate = new Date(Date.UTC(0, 0, 1)).setUTCFullYear(0);\n\nfunction date(d) {\n return (tempDate.setTime(+d), tempDate);\n}\n\n// create a time unit entry\nfunction entry(type, date, unit, step, min, max) {\n var e = {\n type: type,\n date: date,\n unit: unit\n };\n if (step) {\n e.step = step;\n } else {\n e.minstep = 1;\n }\n if (min != null) e.min = min;\n if (max != null) e.max = max;\n return e;\n}\n\nfunction create(type, unit, base, step, min, max) {\n return entry(type,\n function(d) { return unit.offset(base, d); },\n function(d) { return unit.count(base, d); },\n step, min, max);\n}\n\nvar locale = [\n create('second', d3_time.second, baseDate),\n create('minute', d3_time.minute, baseDate),\n create('hour', d3_time.hour, baseDate),\n create('day', d3_time.day, baseDate, [1, 7]),\n create('month', d3_time.month, baseDate, [1, 3, 6]),\n create('year', d3_time.year, baseDate),\n\n // periodic units\n entry('seconds',\n function(d) { return new Date(1970, 0, 1, 0, 0, d); },\n function(d) { return date(d).getSeconds(); },\n null, 0, 59\n ),\n entry('minutes',\n function(d) { return new Date(1970, 0, 1, 0, d); },\n function(d) { return date(d).getMinutes(); },\n null, 0, 59\n ),\n entry('hours',\n function(d) { return new Date(1970, 0, 1, d); },\n function(d) { return date(d).getHours(); },\n null, 0, 23\n ),\n entry('weekdays',\n function(d) { return new Date(1970, 0, 4+d); },\n function(d) { return date(d).getDay(); },\n [1], 0, 6\n ),\n entry('dates',\n function(d) { return new Date(1970, 0, d); },\n function(d) { return date(d).getDate(); },\n [1], 1, 31\n ),\n entry('months',\n function(d) { return new Date(1970, d % 12, 1); },\n function(d) { return date(d).getMonth(); },\n [1], 0, 11\n )\n];\n\nvar utc = [\n create('second', d3_time.utcSecond, utcBaseDate),\n create('minute', d3_time.utcMinute, utcBaseDate),\n create('hour', d3_time.utcHour, utcBaseDate),\n create('day', d3_time.utcDay, utcBaseDate, [1, 7]),\n create('month', d3_time.utcMonth, utcBaseDate, [1, 3, 6]),\n create('year', d3_time.utcYear, utcBaseDate),\n\n // periodic units\n entry('seconds',\n function(d) { return new Date(Date.UTC(1970, 0, 1, 0, 0, d)); },\n function(d) { return date(d).getUTCSeconds(); },\n null, 0, 59\n ),\n entry('minutes',\n function(d) { return new Date(Date.UTC(1970, 0, 1, 0, d)); },\n function(d) { return date(d).getUTCMinutes(); },\n null, 0, 59\n ),\n entry('hours',\n function(d) { return new Date(Date.UTC(1970, 0, 1, d)); },\n function(d) { return date(d).getUTCHours(); },\n null, 0, 23\n ),\n entry('weekdays',\n function(d) { return new Date(Date.UTC(1970, 0, 4+d)); },\n function(d) { return date(d).getUTCDay(); },\n [1], 0, 6\n ),\n entry('dates',\n function(d) { return new Date(Date.UTC(1970, 0, d)); },\n function(d) { return date(d).getUTCDate(); },\n [1], 1, 31\n ),\n entry('months',\n function(d) { return new Date(Date.UTC(1970, d % 12, 1)); },\n function(d) { return date(d).getUTCMonth(); },\n [1], 0, 11\n )\n];\n\nvar STEPS = [\n [31536e6, 5], // 1-year\n [7776e6, 4], // 3-month\n [2592e6, 4], // 1-month\n [12096e5, 3], // 2-week\n [6048e5, 3], // 1-week\n [1728e5, 3], // 2-day\n [864e5, 3], // 1-day\n [432e5, 2], // 12-hour\n [216e5, 2], // 6-hour\n [108e5, 2], // 3-hour\n [36e5, 2], // 1-hour\n [18e5, 1], // 30-minute\n [9e5, 1], // 15-minute\n [3e5, 1], // 5-minute\n [6e4, 1], // 1-minute\n [3e4, 0], // 30-second\n [15e3, 0], // 15-second\n [5e3, 0], // 5-second\n [1e3, 0] // 1-second\n];\n\nfunction find(units, span, minb, maxb) {\n var step = STEPS[0], i, n, bins;\n\n for (i=1, n=STEPS.length; i step[0]) {\n bins = span / step[0];\n if (bins > maxb) {\n return units[STEPS[i-1][1]];\n }\n if (bins >= minb) {\n return units[step[1]];\n }\n }\n }\n return units[STEPS[n-1][1]];\n}\n\nfunction toUnitMap(units) {\n var map = {}, i, n;\n for (i=0, n=units.length; i 1 ?\n function(x) { return s.reduce(function(x,f) { return x[f]; }, x); } :\n function(x) { return x[f]; }\n );\n};\n\n// short-cut for accessor\nu.$ = u.accessor;\n\nu.mutator = function(f) {\n var s;\n return u.isString(f) && (s=u.field(f)).length > 1 ?\n function(x, v) {\n for (var i=0; i y) return sign[i];\n }\n return 0;\n };\n};\n\nu.cmp = function(a, b) {\n if (a < b) {\n return -1;\n } else if (a > b) {\n return 1;\n } else if (a >= b) {\n return 0;\n } else if (a === null) {\n return -1;\n } else if (b === null) {\n return 1;\n }\n return NaN;\n};\n\nu.numcmp = function(a, b) { return a - b; };\n\nu.stablesort = function(array, sortBy, keyFn) {\n var indices = array.reduce(function(idx, v, i) {\n return (idx[keyFn(v)] = i, idx);\n }, {});\n\n array.sort(function(a, b) {\n var sa = sortBy(a),\n sb = sortBy(b);\n return sa < sb ? -1 : sa > sb ? 1\n : (indices[keyFn(a)] - indices[keyFn(b)]);\n });\n\n return array;\n};\n\n\n// string functions\n\nu.pad = function(s, length, pos, padchar) {\n padchar = padchar || \" \";\n var d = length - s.length;\n if (d <= 0) return s;\n switch (pos) {\n case 'left':\n return strrep(d, padchar) + s;\n case 'middle':\n case 'center':\n return strrep(Math.floor(d/2), padchar) +\n s + strrep(Math.ceil(d/2), padchar);\n default:\n return s + strrep(d, padchar);\n }\n};\n\nfunction strrep(n, str) {\n var s = \"\", i;\n for (i=0; i this.config('maxSmallNumber') ?\n 'largeNumberFormat': 'smallNumberFormat';\n return this.config(formatConfig);\n };\n\n proto.sort = function(et, stats) {\n var sort = this._enc[et].sort,\n enc = this._enc,\n isTypes = vlfield.isTypes;\n\n if ((!sort || sort.length===0) &&\n // FIXME\n Encoding.toggleSort.support({encoding:this._enc}, stats, true) && //HACK\n this.config('toggleSort') === Q\n ) {\n var qField = isTypes(enc.x, [N, O]) ? enc.y : enc.x;\n\n if (isTypes(enc[et], [N, O])) {\n sort = [{\n name: qField.name,\n aggregate: qField.aggregate,\n type: qField.type,\n reverse: true\n }];\n }\n }\n\n return sort;\n };\n\n proto.map = function(f) {\n return vlenc.map(this._enc, f);\n };\n\n proto.reduce = function(f, init) {\n return vlenc.reduce(this._enc, f, init);\n };\n\n proto.forEach = function(f) {\n return vlenc.forEach(this._enc, f);\n };\n\n proto.type = function(et) {\n return this.has(et) ? this._enc[et].type : null;\n };\n\n proto.isType = function(et, type) {\n var field = this.field(et);\n return field && vlfield.isType(field, type);\n };\n\n\n proto.isTypes = function(et, type) {\n var field = this.field(et);\n return field && vlfield.isTypes(field, type);\n };\n\n Encoding.isOrdinalScale = function(encoding, encType) {\n return vlfield.isOrdinalScale(encoding.field(encType));\n };\n\n Encoding.isDimension = function(encoding, encType) {\n return vlfield.isDimension(encoding.field(encType));\n };\n\n Encoding.isMeasure = function(encoding, encType) {\n return vlfield.isMeasure(encoding.field(encType));\n };\n\n proto.isOrdinalScale = function(encType) {\n return this.has(encType) && Encoding.isOrdinalScale(this, encType);\n };\n\n proto.isDimension = function(encType) {\n return this.has(encType) && Encoding.isDimension(this, encType);\n };\n\n proto.isMeasure = function(encType) {\n return this.has(encType) && Encoding.isMeasure(this, encType);\n };\n\n proto.isAggregate = function() {\n return vlenc.isAggregate(this._enc);\n };\n\n proto.dataTable = function() {\n return this.isAggregate() ? AGGREGATE : RAW;\n };\n\n Encoding.isAggregate = function(spec) {\n return vlenc.isAggregate(spec.encoding);\n };\n\n Encoding.alwaysNoOcclusion = function(spec) {\n // FIXME raw OxQ with # of rows = # of O\n return vlenc.isAggregate(spec.encoding);\n };\n\n Encoding.isStack = function(spec) {\n // FIXME update this once we have control for stack ...\n return (spec.marktype === 'bar' || spec.marktype === 'area') &&\n spec.encoding.color;\n };\n\n proto.isStack = function() {\n // FIXME update this once we have control for stack ...\n return (this.is('bar') || this.is('area')) && this.has('color');\n };\n\n proto.details = function() {\n var encoding = this;\n return this.reduce(function(refs, field, encType) {\n if (!field.aggregate && (encType !== X && encType !== Y)) {\n refs.push(encoding.fieldRef(encType));\n }\n return refs;\n }, []);\n };\n\n proto.facets = function() {\n var encoding = this;\n return this.reduce(function(refs, field, encType) {\n if (!field.aggregate && (encType == ROW || encType == COL)) {\n refs.push(encoding.fieldRef(encType));\n }\n return refs;\n }, []);\n };\n\n proto.cardinality = function(encType, stats) {\n return vlfield.cardinality(this.field(encType), stats, this.config('filterNull'));\n };\n\n proto.isRaw = function() {\n return !this.isAggregate();\n };\n\n proto.data = function() {\n return this._data;\n };\n\n // returns whether the encoding has values embedded\n proto.hasValues = function() {\n var vals = this.data().values;\n return vals && vals.length;\n };\n\n proto.config = function(name) {\n return this._config[name];\n };\n\n Encoding.transpose = function(spec) {\n var oldenc = spec.encoding,\n enc = util.duplicate(spec.encoding);\n enc.x = oldenc.y;\n enc.y = oldenc.x;\n enc.row = oldenc.col;\n enc.col = oldenc.row;\n spec.encoding = enc;\n return spec;\n };\n\n // FIXME: REMOVE everything below here\n\n Encoding.toggleSort = function(spec) {\n spec.config = spec.config || {};\n spec.config.toggleSort = spec.config.toggleSort === Q ? N : Q;\n return spec;\n };\n\n\n Encoding.toggleSort.direction = function(spec) {\n if (!Encoding.toggleSort.support(spec)) { return; }\n var enc = spec.encoding;\n return enc.x.type === N ? 'x' : 'y';\n };\n\n Encoding.toggleSort.mode = function(spec) {\n return spec.config.toggleSort;\n };\n\n Encoding.toggleSort.support = function(spec, stats) {\n var enc = spec.encoding,\n isTypes = vlfield.isTypes;\n\n if (vlenc.has(enc, ROW) || vlenc.has(enc, COL) ||\n !vlenc.has(enc, X) || !vlenc.has(enc, Y) ||\n !Encoding.alwaysNoOcclusion(spec, stats)) {\n return false;\n }\n\n return ( isTypes(enc.x, [N,O]) && vlfield.isMeasure(enc.y)) ? 'x' :\n ( isTypes(enc.y, [N,O]) && vlfield.isMeasure(enc.x)) ? 'y' : false;\n };\n\n Encoding.toggleFilterNullO = function(spec) {\n spec.config = spec.config || {};\n spec.config.filterNull = spec.config.filterNull || { //FIXME\n T: true,\n Q: true\n };\n spec.config.filterNull.O = !spec.config.filterNull.O;\n return spec;\n };\n\n Encoding.toggleFilterNullO.support = function(spec, stats) {\n var fields = vlenc.fields(spec.encoding);\n for (var fieldName in fields) {\n var fieldList = fields[fieldName];\n if (fieldList.containsType.O && fieldName in stats && stats[fieldName].nulls > 0) {\n return true;\n }\n }\n return false;\n };\n\n return Encoding;\n})();\n\n},{\"./consts\":29,\"./enc\":31,\"./field\":32,\"./globals\":33,\"./schema/schema\":35,\"./util\":37}],15:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar util = require('../util'),\n setter = util.setter,\n getter = util.getter,\n time = require('./time');\n\nvar axis = module.exports = {};\n\naxis.def = function(name, encoding, layout, stats, opt) {\n var isCol = name == COL,\n isRow = name == ROW,\n type = isCol ? 'x' : isRow ? 'y' : name;\n\n var def = {\n type: type,\n scale: name,\n properties: {},\n layer: encoding.field(name).axis.layer,\n orient: axis.orient(name, encoding, stats)\n };\n\n // Add axis label custom scale (for bin / time)\n def = axis.labels.scale(def, encoding, name);\n def = axis.labels.format(def, name, encoding, stats);\n def = axis.labels.angle(def, encoding, name);\n\n // for x-axis, set ticks for Q or rotate scale for ordinal scale\n if (name == X) {\n if ((encoding.isDimension(X) || encoding.isType(X, T)) &&\n !('angle' in getter(def, ['properties', 'labels']))) {\n // TODO(kanitw): Jul 19, 2015 - #506 add condition for rotation\n def = axis.labels.rotate(def);\n } else { // Q\n def.ticks = encoding.field(name).axis.ticks;\n }\n }\n\n // TitleOffset depends on labels rotation\n def.titleOffset = axis.titleOffset(encoding, layout, name);\n\n //def.offset is used in axis.grid\n if(isRow) def.offset = axis.titleOffset(encoding, layout, Y) + 20;\n // FIXME(kanitw): Jul 19, 2015 - offset for column when x is put on top\n\n def = axis.grid(def, name, encoding, layout);\n def = axis.title(def, name, encoding, layout, opt);\n\n if (isRow || isCol) def = axis.hideTicks(def);\n\n return def;\n};\n\naxis.orient = function(name, encoding, stats) {\n var orient = encoding.field(name).axis.orient;\n if (orient) return orient;\n\n if (name===COL) return 'top';\n\n // x-axis for long y - put on top\n if (name===X && encoding.has(Y) && encoding.isOrdinalScale(Y) && encoding.cardinality(Y, stats) > 30) {\n return 'top';\n }\n\n return undefined;\n};\n\naxis.grid = function(def, name, encoding, layout) {\n var cellPadding = layout.cellPadding,\n isCol = name == COL,\n isRow = name == ROW;\n\n if (encoding.axis(name).grid) {\n def.grid = true;\n\n if (isCol) {\n // set grid property -- put the lines on the right the cell\n def.properties.grid = {\n x: {\n offset: layout.cellWidth * (1+ cellPadding/2.0),\n // default value(s) -- vega doesn't do recursive merge\n scale: 'col'\n },\n y: {\n value: -layout.cellHeight * (cellPadding/2),\n },\n stroke: { value: encoding.config('cellGridColor') },\n opacity: { value: encoding.config('cellGridOpacity') }\n };\n } else if (isRow) {\n // set grid property -- put the lines on the top\n def.properties.grid = {\n y: {\n offset: -layout.cellHeight * (cellPadding/2),\n // default value(s) -- vega doesn't do recursive merge\n scale: 'row'\n },\n x: {\n value: def.offset\n },\n x2: {\n offset: def.offset + (layout.cellWidth * 0.05),\n // default value(s) -- vega doesn't do recursive merge\n group: 'mark.group.width',\n mult: 1\n },\n stroke: { value: encoding.config('cellGridColor') },\n opacity: { value: encoding.config('cellGridOpacity') }\n };\n } else {\n def.properties.grid = {\n stroke: { value: encoding.config('gridColor') },\n opacity: { value: encoding.config('gridOpacity') }\n };\n }\n }\n return def;\n};\n\naxis.hideTicks = function(def) {\n def.properties.ticks = {opacity: {value: 0}};\n def.properties.majorTicks = {opacity: {value: 0}};\n def.properties.axis = {opacity: {value: 0}};\n return def;\n};\n\naxis.title = function (def, name, encoding, layout) {\n var ax = encoding.field(name).axis;\n\n if (ax.title) {\n def.title = ax.title;\n } else {\n // if not defined, automatically determine axis title from field def\n var fieldTitle = encoding.fieldTitle(name),\n maxLength;\n\n if (ax.titleMaxLength) {\n maxLength = ax.titleMaxLength;\n } else if (name===X) {\n maxLength = layout.cellWidth / encoding.config('characterWidth');\n } else if (name === Y) {\n maxLength = layout.cellHeight / encoding.config('characterWidth');\n }\n\n def.title = maxLength ? util.truncate(fieldTitle, maxLength) : fieldTitle;\n }\n\n if (name === ROW) {\n def.properties.title = {\n angle: {value: 0},\n align: {value: 'right'},\n baseline: {value: 'middle'},\n dy: {value: (-layout.height/2) -20}\n };\n }\n\n return def;\n};\n\naxis.labels = {};\n\n/** add custom label for time type and bin */\naxis.labels.scale = function(def, encoding, name) {\n // time\n var timeUnit = encoding.field(name).timeUnit;\n if (encoding.isType(name, T) && timeUnit && (time.hasScale(timeUnit))) {\n setter(def, ['properties','labels','text','scale'], 'time-'+ timeUnit);\n }\n // FIXME bin\n return def;\n};\n\n/**\n * Determine number format or truncate if maxLabel length is presented.\n */\naxis.labels.format = function (def, name, encoding, stats) {\n var fieldStats = stats[encoding.field(name).name];\n\n if (encoding.axis(name).format) {\n def.format = encoding.axis(name).format;\n } else if (encoding.isType(name, Q) || fieldStats.type === 'number') {\n def.format = encoding.numberFormat(fieldStats);\n } else if (encoding.isType(name, T)) {\n var timeUnit = encoding.field(name).timeUnit;\n if (!timeUnit) {\n def.format = encoding.config('timeFormat');\n } else if (timeUnit === 'year') {\n def.format = 'd';\n }\n } else if (encoding.isTypes(name, [N, O]) && encoding.axis(name).maxLabelLength) {\n setter(def,\n ['properties','labels','text','template'],\n '{{data | truncate:' + encoding.axis(name).maxLabelLength + '}}'\n );\n }\n\n return def;\n};\n\naxis.labels.angle = function(def, encoding, name) {\n var angle = encoding.axis(name).labelAngle;\n if (typeof angle === 'undefined') return def;\n\n setter(def, ['properties', 'labels', 'angle', 'value'], angle);\n return def;\n};\n\naxis.labels.rotate = function(def) {\n var align = def.orient ==='top' ? 'left' : 'right';\n setter(def, ['properties','labels', 'angle', 'value'], 270);\n setter(def, ['properties','labels', 'align', 'value'], align);\n setter(def, ['properties','labels', 'baseline', 'value'], 'middle');\n return def;\n};\n\naxis.titleOffset = function (encoding, layout, name) {\n // return specified value if specified\n var value = encoding.axis(name).titleOffset;\n if (value) return value;\n\n switch (name) {\n //FIXME make this adjustable\n case ROW: return 0;\n case COL: return 35;\n }\n return getter(layout, [name, 'axisTitleOffset']);\n};\n\n},{\"../globals\":33,\"../util\":37,\"./time\":28}],16:[function(require,module,exports){\n'use strict';\n\nvar summary = module.exports = require('datalib/src/stats').summary;\n\nrequire('../globals');\n\nvar compiler = module.exports = {};\n\nvar Encoding = require('../Encoding'),\n axis = compiler.axis = require('./axis'),\n legend = compiler.legend = require('./legend'),\n marks = compiler.marks = require('./marks'),\n scale = compiler.scale = require('./scale');\n\ncompiler.data = require('./data');\ncompiler.facet = require('./facet');\ncompiler.group = require('./group');\ncompiler.layout = require('./layout');\ncompiler.sort = require('./sort');\ncompiler.stack = require('./stack');\ncompiler.style = require('./style');\ncompiler.subfacet = require('./subfacet');\ncompiler.time = require('./time');\n\ncompiler.compile = function (spec, stats, theme) {\n return compiler.compileEncoding(Encoding.fromSpec(spec, theme), stats);\n};\n\ncompiler.shorthand = function (shorthand, stats, config, theme) {\n return compiler.compileEncoding(Encoding.fromShorthand(shorthand, config, theme), stats);\n};\n\n\ncompiler.compileEncoding = function (encoding, stats) {\n // no need to pass stats if you pass in the data\n if (!stats && encoding.hasValues()) {\n stats = summary(encoding.data().values).reduce(function(s, p) {\n s[p.field] = p;\n return s;\n }, {});\n }\n\n var layout = compiler.layout(encoding, stats);\n\n var spec = {\n width: layout.width,\n height: layout.height,\n padding: 'auto',\n data: compiler.data(encoding),\n // global scales contains only time unit scales\n scales: compiler.time.scales(encoding)\n };\n\n // FIXME remove compiler.sort after migrating to vega 2.\n spec.data = compiler.sort(spec.data, encoding, stats); // append new data\n\n // marks\n\n // TODO this line is temporary and should be refactored\n spec.marks = [compiler.group.def('cell', {\n width: layout.cellWidth ? {value: layout.cellWidth} : undefined,\n height: layout.cellHeight ? {value: layout.cellHeight} : undefined\n })];\n\n var style = compiler.style(encoding, stats),\n group = spec.marks[0],\n mdefs = marks.def(encoding, layout, style, stats),\n mdef = mdefs[mdefs.length - 1]; // TODO: remove this dirty hack by refactoring the whole flow\n\n for (var i = 0; i < mdefs.length; i++) {\n group.marks.push(mdefs[i]);\n }\n\n var lineType = marks[encoding.marktype()].line;\n\n // handle subfacets\n\n var details = encoding.details(),\n stack = encoding.isAggregate() && details.length > 0 && compiler.stack(spec.data, encoding, mdef); // modify spec.data, mdef.{from,properties}\n\n if (details.length > 0 && (stack || lineType)) {\n //subfacet to group stack / line together in one group\n compiler.subfacet(group, mdef, details, stack, encoding);\n }\n\n // auto-sort line/area values\n //TODO(kanitw): have some config to turn off auto-sort for line (for line chart that encodes temporal information)\n if (lineType) {\n var f = (encoding.isMeasure(X) && encoding.isDimension(Y)) ? Y : X;\n if (!mdef.from) mdef.from = {};\n // TODO: why - ?\n mdef.from.transform = [{type: 'sort', by: '-' + encoding.fieldRef(f)}];\n }\n\n // get a flattened list of all scale names that are used in the vl spec\n var singleScaleNames = [].concat.apply([], mdefs.map(function(markProps) {\n return scale.names(markProps.properties.update);\n }));\n\n // Small Multiples\n if (encoding.has(ROW) || encoding.has(COL)) {\n spec = compiler.facet(group, encoding, layout, spec, singleScaleNames, stack, stats);\n spec.legends = legend.defs(encoding, style);\n } else {\n group.scales = scale.defs(singleScaleNames, encoding, layout, stats, {stack: stack});\n\n group.axes = [];\n if (encoding.has(X)) group.axes.push(axis.def(X, encoding, layout, stats));\n if (encoding.has(Y)) group.axes.push(axis.def(Y, encoding, layout, stats));\n\n group.legends = legend.defs(encoding, style);\n }\n\n\n\n return spec;\n};\n\n\n},{\"../Encoding\":14,\"../globals\":33,\"./axis\":15,\"./data\":17,\"./facet\":18,\"./group\":19,\"./layout\":20,\"./legend\":21,\"./marks\":22,\"./scale\":23,\"./sort\":24,\"./stack\":25,\"./style\":26,\"./subfacet\":27,\"./time\":28,\"datalib/src/stats\":11}],17:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nmodule.exports = data;\n\nvar vlfield = require('../field'),\n util = require('../util'),\n time = require('./time');\n\nfunction data(encoding) {\n var def = [data.raw(encoding)];\n\n var aggregate = data.aggregate(encoding);\n if (aggregate) def.push(data.aggregate(encoding));\n\n // TODO add \"having\" filter here ()\n\n // append non-zero filter at the end for the data table\n data.filterNonZeroForLog(def[def.length - 1], encoding);\n\n return def;\n}\n\ndata.raw = function(encoding) {\n var raw = {name: RAW};\n\n // Data source (url or inline)\n if (encoding.hasValues()) {\n raw.values = encoding.data().values;\n } else {\n raw.url = encoding.data().url;\n raw.format = {type: encoding.data().formatType};\n }\n\n // Set format.parse if needed\n var parse = data.raw.formatParse(encoding);\n if (parse) {\n raw.format = raw.format || {};\n raw.format.parse = parse;\n }\n\n raw.transform = data.raw.transform(encoding);\n return raw;\n};\n\ndata.raw.formatParse = function(encoding) {\n var parse;\n\n encoding.forEach(function(field) {\n if (field.type == T) {\n parse = parse || {};\n parse[field.name] = 'date';\n } else if (field.type == Q) {\n if (vlfield.isCount(field)) return;\n parse = parse || {};\n parse[field.name] = 'number';\n }\n });\n\n return parse;\n};\n\ndata.raw.transform = function(encoding) {\n // time and bin should come before filter so we can filter by time and bin\n return data.raw.transform.time(encoding).concat(\n data.raw.transform.bin(encoding)\n ).concat(\n data.raw.transform.filter(encoding)\n );\n};\n\nvar BINARY = {\n '>': true,\n '>=': true,\n '=': true,\n '!=': true,\n '<': true,\n '<=': true\n};\n\ndata.raw.transform.time = function(encoding) {\n return encoding.reduce(function(transform, field, encType) {\n if (field.type === T && field.timeUnit) {\n transform.push({\n type: 'formula',\n field: encoding.fieldRef(encType),\n expr: time.formula(field.timeUnit, encoding.fieldRef(encType, {nofn: true, d: true}))\n });\n }\n return transform;\n }, []);\n};\n\ndata.raw.transform.bin = function(encoding) {\n return encoding.reduce(function(transform, field, encType) {\n if (encoding.bin(encType)) {\n transform.push({\n type: 'bin',\n field: encoding.fieldRef(encType, {nofn: true}),\n output: encoding.fieldRef(encType),\n maxbins: encoding.bin(encType).maxbins\n });\n }\n return transform;\n }, []);\n};\n\ndata.raw.transform.filter = function(encoding) {\n var filters = encoding.filter().reduce(function(f, filter) {\n var condition = '';\n var operator = filter.operator;\n var operands = filter.operands;\n\n var d = 'd.' + (encoding._vega2 ? '' : 'data.');\n\n if (BINARY[operator]) {\n // expects a field and a value\n if (operator === '=') {\n operator = '==';\n }\n\n var op1 = operands[0];\n var op2 = operands[1];\n condition = d + op1 + ' ' + operator + ' ' + op2;\n } else if (operator === 'notNull') {\n // expects a number of fields\n for (var j=0; j 0) {\n return {\n name: AGGREGATE,\n source: RAW,\n transform: [{\n type: 'aggregate',\n groupby: dims,\n fields: meas\n }]\n };\n }\n\n return null;\n};\n\ndata.filterNonZeroForLog = function(dataTable, encoding) {\n encoding.forEach(function(field, encType) {\n if (encoding.scale(encType).type === 'log') {\n dataTable.transform.push({\n type: 'filter',\n test: encoding.fieldRef(encType, {d: 1}) + ' > 0'\n });\n }\n });\n};\n\n},{\"../field\":32,\"../globals\":33,\"../util\":37,\"./time\":28}],18:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar util = require('../util');\n\nvar axis = require('./axis'),\n groupdef = require('./group').def,\n scale = require('./scale');\n\nmodule.exports = faceting;\n\nfunction faceting(group, encoding, layout, spec, singleScaleNames, stack, stats) {\n var enter = group.properties.enter;\n var facetKeys = [], cellAxes = [], from, axesGrp;\n\n var hasRow = encoding.has(ROW), hasCol = encoding.has(COL);\n\n enter.fill = {value: encoding.config('cellBackgroundColor')};\n\n //move \"from\" to cell level and add facet transform\n group.from = {data: group.marks[0].from.data};\n\n // Hack, this needs to be refactored\n for (var i = 0; i < group.marks.length; i++) {\n var mark = group.marks[i];\n if (mark.from.transform) {\n delete mark.from.data; //need to keep transform for subfacetting case\n } else {\n delete mark.from;\n }\n }\n\n if (hasRow) {\n if (!encoding.isDimension(ROW)) {\n util.error('Row encoding should be ordinal.');\n }\n enter.y = {scale: ROW, field: 'keys.' + facetKeys.length};\n enter.height = {'value': layout.cellHeight}; // HACK\n\n facetKeys.push(encoding.fieldRef(ROW));\n\n if (hasCol) {\n from = util.duplicate(group.from);\n from.transform = from.transform || [];\n from.transform.unshift({type: 'facet', keys: [encoding.fieldRef(COL)]});\n }\n\n axesGrp = groupdef('x-axes', {\n axes: encoding.has(X) ? [axis.def(X, encoding, layout, stats)] : undefined,\n x: hasCol ? {scale: COL, field: 'keys.0'} : {value: 0},\n width: hasCol && {'value': layout.cellWidth}, //HACK?\n from: from\n });\n\n spec.marks.unshift(axesGrp); // need to prepend so it appears under the plots\n (spec.axes = spec.axes || []);\n spec.axes.push(axis.def(ROW, encoding, layout, stats));\n } else { // doesn't have row\n if (encoding.has(X)) {\n //keep x axis in the cell\n cellAxes.push(axis.def(X, encoding, layout, stats));\n }\n }\n\n if (hasCol) {\n if (!encoding.isDimension(COL)) {\n util.error('Col encoding should be ordinal.');\n }\n enter.x = {scale: COL, field: 'keys.' + facetKeys.length};\n enter.width = {'value': layout.cellWidth}; // HACK\n\n facetKeys.push(encoding.fieldRef(COL));\n\n if (hasRow) {\n from = util.duplicate(group.from);\n from.transform = from.transform || [];\n from.transform.unshift({type: 'facet', keys: [encoding.fieldRef(ROW)]});\n }\n\n axesGrp = groupdef('y-axes', {\n axes: encoding.has(Y) ? [axis.def(Y, encoding, layout, stats)] : undefined,\n y: hasRow && {scale: ROW, field: 'keys.0'},\n x: hasRow && {value: 0},\n height: hasRow && {'value': layout.cellHeight}, //HACK?\n from: from\n });\n\n spec.marks.unshift(axesGrp); // need to prepend so it appears under the plots\n (spec.axes = spec.axes || []);\n spec.axes.push(axis.def(COL, encoding, layout, stats));\n } else { // doesn't have col\n if (encoding.has(Y)) {\n cellAxes.push(axis.def(Y, encoding, layout, stats));\n }\n }\n\n // assuming equal cellWidth here\n // TODO: support heterogenous cellWidth (maybe by using multiple scales?)\n spec.scales = (spec.scales || []).concat(scale.defs(\n scale.names(enter).concat(singleScaleNames),\n encoding,\n layout,\n stats,\n {stack: stack, facet: true}\n )); // row/col scales + cell scales\n\n if (cellAxes.length > 0) {\n group.axes = cellAxes;\n }\n\n // add facet transform\n var trans = (group.from.transform || (group.from.transform = []));\n trans.unshift({type: 'facet', keys: facetKeys});\n\n return spec;\n}\n\n},{\"../globals\":33,\"../util\":37,\"./axis\":15,\"./group\":19,\"./scale\":23}],19:[function(require,module,exports){\n'use strict';\n\nmodule.exports = {\n def: groupdef\n};\n\nfunction groupdef(name, opt) {\n opt = opt || {};\n return {\n _name: name || undefined,\n type: 'group',\n from: opt.from,\n properties: {\n enter: {\n x: opt.x || undefined,\n y: opt.y || undefined,\n width: opt.width || {group: 'width'},\n height: opt.height || {group: 'height'}\n }\n },\n scales: opt.scales || undefined,\n axes: opt.axes || undefined,\n marks: opt.marks || []\n };\n}\n\n},{}],20:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar util = require('../util'),\n setter = util.setter,\n time = require('./time'),\n d3_format = require('d3-format');\n\nmodule.exports = vllayout;\n\nfunction vllayout(encoding, stats) {\n var layout = box(encoding, stats);\n layout = offset(encoding, stats, layout);\n return layout;\n}\n\n/*\n HACK to set chart size\n NOTE: this fails for plots driven by derived values (e.g., aggregates)\n One solution is to update Vega to support auto-sizing\n In the meantime, auto-padding (mostly) does the trick\n */\nfunction box(encoding, stats) {\n var hasRow = encoding.has(ROW),\n hasCol = encoding.has(COL),\n hasX = encoding.has(X),\n hasY = encoding.has(Y),\n marktype = encoding.marktype();\n\n // FIXME/HACK we need to take filter into account\n var xCardinality = hasX && encoding.isDimension(X) ? encoding.cardinality(X, stats) : 1,\n yCardinality = hasY && encoding.isDimension(Y) ? encoding.cardinality(Y, stats) : 1;\n\n var useSmallBand = xCardinality > encoding.config('largeBandMaxCardinality') ||\n yCardinality > encoding.config('largeBandMaxCardinality');\n\n var cellWidth, cellHeight, cellPadding = encoding.config('cellPadding');\n\n // set cellWidth\n if (hasX) {\n if (encoding.isOrdinalScale(X)) {\n // for ordinal, hasCol or not doesn't matter -- we scale based on cardinality\n cellWidth = (xCardinality + encoding.field(X).band.padding) * encoding.bandSize(X, useSmallBand);\n } else {\n cellWidth = hasCol || hasRow ? encoding.field(COL).width : encoding.config('singleWidth');\n }\n } else {\n if (marktype === TEXT) {\n cellWidth = encoding.config('textCellWidth');\n } else {\n cellWidth = encoding.bandSize(X);\n }\n }\n\n // set cellHeight\n if (hasY) {\n if (encoding.isOrdinalScale(Y)) {\n // for ordinal, hasCol or not doesn't matter -- we scale based on cardinality\n cellHeight = (yCardinality + encoding.field(Y).band.padding) * encoding.bandSize(Y, useSmallBand);\n } else {\n cellHeight = hasCol || hasRow ? encoding.field(ROW).height : encoding.config('singleHeight');\n }\n } else {\n cellHeight = encoding.bandSize(Y);\n }\n\n // Cell bands use rangeBands(). There are n-1 padding. Outerpadding = 0 for cells\n\n var width = cellWidth, height = cellHeight;\n if (hasCol) {\n var colCardinality = encoding.cardinality(COL, stats);\n width = cellWidth * ((1 + cellPadding) * (colCardinality - 1) + 1);\n }\n if (hasRow) {\n var rowCardinality = encoding.cardinality(ROW, stats);\n height = cellHeight * ((1 + cellPadding) * (rowCardinality - 1) + 1);\n }\n\n return {\n // width and height of the whole cell\n cellWidth: cellWidth,\n cellHeight: cellHeight,\n cellPadding: cellPadding,\n // width and height of the chart\n width: width,\n height: height,\n // information about x and y, such as band size\n x: {useSmallBand: useSmallBand},\n y: {useSmallBand: useSmallBand}\n };\n}\n\n\n// FIXME fieldStats.max isn't always the longest\nfunction getMaxNumberLength(encoding, et, fieldStats) {\n var format = encoding.numberFormat(et, fieldStats);\n\n return d3_format.format(format)(fieldStats.max).length;\n}\n\nfunction getMaxLength(encoding, stats, et) {\n var field = encoding.field(et),\n fieldStats = stats[field.name];\n\n if (field.bin) {\n // TODO once bin support range, need to update this\n return getMaxNumberLength(encoding, et, fieldStats);\n } if (encoding.isType(et, Q)) {\n return getMaxNumberLength(encoding, et, fieldStats);\n } else if (encoding.isType(et, T)) {\n return time.maxLength(encoding.field(et).timeUnit, encoding);\n } else if (encoding.isTypes(et, [N, O])) {\n if(fieldStats.type === 'number') {\n return getMaxNumberLength(encoding, et, fieldStats);\n } else {\n return Math.min(fieldStats.max, encoding.axis(et).maxLabelLength || Infinity);\n }\n }\n}\n\nfunction offset(encoding, stats, layout) {\n [X, Y].forEach(function (et) {\n // TODO(kanitw): Jul 19, 2015 - create a set of visual test for extraOffset\n var extraOffset = et === X ? 20 : 22,\n maxLength;\n if (encoding.isDimension(et) || encoding.isType(et, T)) {\n maxLength = getMaxLength(encoding, stats, et);\n } else if (\n // TODO once we have #512 (allow using inferred type)\n // Need to adjust condition here.\n encoding.isType(et, Q) ||\n encoding.aggregate(et) === 'count'\n ) {\n if (\n et===Y\n // || (et===X && false)\n // FIXME determine when X would rotate, but should move this to axis.js first #506\n ) {\n maxLength = getMaxLength(encoding, stats, et);\n }\n } else {\n // nothing\n }\n\n if (maxLength) {\n setter(layout,[et, 'axisTitleOffset'], encoding.config('characterWidth') * maxLength + extraOffset);\n } else {\n // if no max length (no rotation case), use maxLength = 3\n setter(layout,[et, 'axisTitleOffset'], encoding.config('characterWidth') * 3 + extraOffset);\n }\n\n });\n return layout;\n}\n\n},{\"../globals\":33,\"../util\":37,\"./time\":28,\"d3-format\":5}],21:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar time = require('./time'),\n util = require('../util'),\n setter = util.setter,\n getter = util.getter;\n\nvar legend = module.exports = {};\n\nlegend.defs = function(encoding, style) {\n var defs = [];\n\n if (encoding.has(COLOR) && encoding.field(COLOR).legend) {\n defs.push(legend.def(COLOR, encoding, {\n fill: COLOR,\n orient: 'right'\n }, style));\n }\n\n if (encoding.has(SIZE) && encoding.field(SIZE).legend) {\n defs.push(legend.def(SIZE, encoding, {\n size: SIZE,\n orient: defs.length === 1 ? 'left' : 'right'\n }, style));\n }\n\n if (encoding.has(SHAPE) && encoding.field(SHAPE).legend) {\n if (defs.length === 2) {\n console.error('Vega-lite currently only supports two legends');\n }\n defs.push(legend.def(SHAPE, encoding, {\n shape: SHAPE,\n orient: defs.length === 1 ? 'left' : 'right'\n }, style));\n }\n return defs;\n};\n\nlegend.def = function(name, encoding, def, style) {\n var timeUnit = encoding.field(name).timeUnit;\n\n def.title = legend.title(name, encoding);\n def = legend.style(name, encoding, def, style);\n\n if (encoding.isType(name, T) &&\n timeUnit &&\n time.hasScale(timeUnit)\n ) {\n setter(def, ['properties', 'labels', 'text', 'scale'], 'time-'+ timeUnit);\n }\n\n return def;\n};\n\nlegend.style = function(name, e, def, style) {\n var symbols = getter(def, ['properties', 'symbols']),\n marktype = e.marktype();\n\n switch (marktype) {\n case 'bar':\n case 'tick':\n case 'text':\n symbols.stroke = {value: 'transparent'};\n symbols.shape = {value: 'square'};\n break;\n\n case 'circle':\n case 'square':\n symbols.shape = {value: marktype};\n /* fall through */\n case 'point':\n // fill or stroke\n if (e.field(SHAPE).filled) {\n if (e.has(COLOR) && name === COLOR) {\n symbols.fill = {scale: COLOR, field: 'data'};\n } else {\n symbols.fill = {value: e.value(COLOR)};\n }\n symbols.stroke = {value: 'transparent'};\n } else {\n if (e.has(COLOR) && name === COLOR) {\n symbols.stroke = {scale: COLOR, field: 'data'};\n } else {\n symbols.stroke = {value: e.value(COLOR)};\n }\n symbols.fill = {value: 'transparent'};\n symbols.strokeWidth = {value: e.config('strokeWidth')};\n }\n\n break;\n case 'line':\n case 'area':\n // TODO use shape here after implementing #508\n break;\n }\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if (opacity) {\n symbols.opacity = {value: opacity};\n }\n return def;\n};\n\nlegend.title = function(name, encoding) {\n var leg = encoding.field(name).legend;\n\n if (leg.title) return leg.title;\n\n return encoding.fieldTitle(name);\n};\n\n},{\"../globals\":33,\"../util\":37,\"./time\":28}],22:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar marks = module.exports = {};\n\nmarks.def = function(encoding, layout, style, stats) {\n\n var defs = [],\n mark = marks[encoding.marktype()],\n from = encoding.dataTable();\n\n // to add a background to text, we need to add it before the text\n if (encoding.marktype() === TEXT && encoding.has(COLOR)) {\n var bg = {\n x: {value: 0},\n y: {value: 0},\n x2: {value: layout.cellWidth},\n y2: {value: layout.cellHeight},\n fill: {scale: COLOR, field: encoding.fieldRef(COLOR)}\n };\n defs.push({\n type: 'rect',\n from: {data: from},\n properties: {enter: bg, update: bg}\n });\n }\n\n // add the mark def for the main thing\n var p = mark.prop(encoding, layout, style, stats);\n defs.push({\n type: mark.type,\n from: {data: from},\n properties: {enter: p, update: p}\n });\n\n return defs;\n};\n\nmarks.bar = {\n type: 'rect',\n stack: true,\n prop: bar_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1}\n};\n\nmarks.line = {\n type: 'line',\n line: true,\n prop: line_props,\n requiredEncoding: ['x', 'y'],\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, detail:1}\n};\n\nmarks.area = {\n type: 'area',\n stack: true,\n line: true,\n requiredEncoding: ['x', 'y'],\n prop: area_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1}\n};\n\nmarks.tick = {\n type: 'rect',\n prop: tick_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, detail: 1}\n};\n\nmarks.circle = {\n type: 'symbol',\n prop: filled_point_props('circle'),\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, detail: 1}\n};\n\nmarks.square = {\n type: 'symbol',\n prop: filled_point_props('square'),\n supportedEncoding: marks.circle.supportedEncoding\n};\n\nmarks.point = {\n type: 'symbol',\n prop: point_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, shape: 1, detail: 1}\n};\n\nmarks.text = {\n type: 'text',\n prop: text_props,\n requiredEncoding: ['text'],\n supportedEncoding: {row: 1, col: 1, size: 1, color: 1, text: 1}\n};\n\nfunction bar_props(e, layout, style) {\n // jshint unused:false\n\n var p = {};\n\n // x's and width\n if (e.isMeasure(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n if (!e.has(Y) || e.isDimension(Y)) {\n p.x2 = {value: 0};\n }\n } else {\n if (e.has(X)) { // is ordinal\n p.xc = {scale: X, field: e.fieldRef(X)};\n } else {\n p.x = {value: 0, offset: e.config('singleBarOffset')};\n }\n }\n\n // width\n if (!p.x2) {\n if (!e.has(X) || e.isOrdinalScale(X)) { // no X or X is ordinal\n if (e.has(SIZE)) {\n p.width = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else {\n p.width = {\n value: e.bandSize(X, layout.x.useSmallBand),\n offset: -1\n };\n }\n } else { // X is Quant or Time Scale\n p.width = {value: 2};\n }\n }\n\n // y's & height\n if (e.isMeasure(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n p.y2 = {group: 'height'};\n } else {\n if (e.has(Y)) { // is ordinal\n p.yc = {scale: Y, field: e.fieldRef(Y)};\n } else {\n p.y2 = {group: 'height', offset: -e.config('singleBarOffset')};\n }\n\n if (e.has(SIZE)) {\n p.height = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else {\n p.height = {\n value: e.bandSize(Y, layout.y.useSmallBand),\n offset: -1\n };\n }\n }\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else {\n p.fill = {value: e.value(COLOR)};\n }\n\n // opacity\n var opacity = e.field(COLOR).opacity;\n if (opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction point_props(e, layout, style) {\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n p.x = {value: e.bandSize(X, layout.x.useSmallBand) / 2};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {value: e.bandSize(Y, layout.y.useSmallBand) / 2};\n }\n\n // size\n if (e.has(SIZE)) {\n p.size = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else if (!e.has(SIZE)) {\n p.size = {value: e.value(SIZE)};\n }\n\n // shape\n if (e.has(SHAPE)) {\n p.shape = {scale: SHAPE, field: e.fieldRef(SHAPE)};\n } else if (!e.has(SHAPE)) {\n p.shape = {value: e.value(SHAPE)};\n }\n\n // fill or stroke\n if (e.field(SHAPE).filled) {\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.fill = {value: e.value(COLOR)};\n }\n } else {\n if (e.has(COLOR)) {\n p.stroke = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.stroke = {value: e.value(COLOR)};\n }\n p.strokeWidth = {value: e.config('strokeWidth')};\n }\n\n // opacity\n var opacity = e.field(COLOR).opacity || style.opacity;\n if (opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction line_props(e,layout, style) {\n // jshint unused:false\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n p.x = {value: 0};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {group: 'height'};\n }\n\n // stroke\n if (e.has(COLOR)) {\n p.stroke = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.stroke = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity;\n if (opacity) p.opacity = {value: opacity};\n\n p.strokeWidth = {value: e.config('strokeWidth')};\n\n return p;\n}\n\nfunction area_props(e, layout, style) {\n // jshint unused:false\n var p = {};\n\n // x\n if (e.isMeasure(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n if (e.isDimension(Y)) {\n p.x2 = {scale: X, value: 0};\n p.orient = {value: 'horizontal'};\n }\n } else if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else {\n p.x = {value: 0};\n }\n\n // y\n if (e.isMeasure(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n p.y2 = {scale: Y, value: 0};\n } else if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else {\n p.y = {group: 'height'};\n }\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.fill = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity;\n if (opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction tick_props(e, layout, style) {\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n if (e.isDimension(X)) {\n p.x.offset = -e.bandSize(X, layout.x.useSmallBand) / 3;\n }\n } else if (!e.has(X)) {\n p.x = {value: 0};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n if (e.isDimension(Y)) {\n p.y.offset = -e.bandSize(Y, layout.y.useSmallBand) / 3;\n }\n } else if (!e.has(Y)) {\n p.y = {value: 0};\n }\n\n // width\n if (!e.has(X) || e.isDimension(X)) {\n p.width = {value: e.bandSize(X, layout.y.useSmallBand) / 1.5};\n } else {\n p.width = {value: 1};\n }\n\n // height\n if (!e.has(Y) || e.isDimension(Y)) {\n p.height = {value: e.bandSize(Y, layout.y.useSmallBand) / 1.5};\n } else {\n p.height = {value: 1};\n }\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else {\n p.fill = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if(opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction filled_point_props(shape) {\n return function(e, layout, style) {\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n p.x = {value: e.bandSize(X, layout.x.useSmallBand) / 2};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {value: e.bandSize(Y, layout.y.useSmallBand) / 2};\n }\n\n // size\n if (e.has(SIZE)) {\n p.size = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else if (!e.has(X)) {\n p.size = {value: e.value(SIZE)};\n }\n\n // shape\n p.shape = {value: shape};\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.fill = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if(opacity) p.opacity = {value: opacity};\n\n return p;\n };\n}\n\nfunction text_props(e, layout, style, stats) {\n var p = {},\n field = e.field(TEXT);\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n if (e.has(TEXT) && e.isType(TEXT, Q)) {\n p.x = {value: layout.cellWidth-5};\n } else {\n p.x = {value: e.bandSize(X, layout.x.useSmallBand) / 2};\n }\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {value: e.bandSize(Y, layout.y.useSmallBand) / 2};\n }\n\n // size\n if (e.has(SIZE)) {\n p.fontSize = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else if (!e.has(SIZE)) {\n p.fontSize = {value: field.font.size};\n }\n\n // fill\n // color should be set to background\n p.fill = {value: field.color};\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if(opacity) p.opacity = {value: opacity};\n\n // text\n if (e.has(TEXT)) {\n if (e.isType(TEXT, Q)) {\n var fieldStats = stats[e.fieldName(TEXT)],\n numberFormat = field.format || e.numberFormat(fieldStats);\n\n p.text = {template: '{{' + e.fieldRef(TEXT) + ' | number:\\'' +\n numberFormat +'\\'}}'};\n p.align = {value: field.align};\n } else {\n p.text = {field: e.fieldRef(TEXT)};\n }\n } else {\n p.text = {value: field.placeholder};\n }\n\n p.font = {value: field.font.family};\n p.fontWeight = {value: field.font.weight};\n p.fontStyle = {value: field.font.style};\n p.baseline = {value: field.baseline};\n\n return p;\n}\n\n},{\"../globals\":33}],23:[function(require,module,exports){\n'use strict';\nrequire('../globals');\nvar util = require('../util'),\n time = require('./time'),\n colorbrewer = require('colorbrewer'),\n interpolate = require('d3-color').interpolateHsl,\n schema = require('../schema/schema'),\n vlsort = require('./sort');\n\nvar scale = module.exports = {};\n\nscale.names = function(props) {\n return util.keys(util.keys(props).reduce(function(a, x) {\n if (props[x] && props[x].scale) a[props[x].scale] = 1;\n return a;\n }, {}));\n};\n\nscale.defs = function(names, encoding, layout, stats, opt) {\n opt = opt || {};\n\n return names.reduce(function(a, name) {\n var s = {\n name: name,\n type: scale.type(name, encoding),\n domain: scale.domain(name, encoding, stats, opt)\n };\n\n s.sort = scale.sort(s, encoding, name) || undefined;\n\n scale.range(s, encoding, layout, stats, opt);\n\n return (a.push(s), a);\n }, []);\n};\n\nscale.sort = function(s, encoding, name) {\n return s.type === 'ordinal' && (\n !!encoding.bin(name) ||\n encoding.sort(name).length === 0\n );\n};\n\nscale.type = function(name, encoding) {\n\n switch (encoding.type(name)) {\n case N: //fall through\n case O: return 'ordinal';\n case T:\n var timeUnit = encoding.field(name).timeUnit;\n return timeUnit ? time.scale.type(timeUnit, name) : 'time';\n case Q:\n if (encoding.bin(name)) {\n return name === COLOR ? 'linear' : 'ordinal';\n }\n return encoding.scale(name).type;\n }\n};\n\nscale.domain = function (name, encoding, stats, opt) {\n var field = encoding.field(name);\n\n if (encoding.isType(name, T)) {\n var range = time.scale.domain(field.timeUnit, name);\n if(range) return range;\n }\n\n if (field.bin) {\n // TODO(kanitw): this must be changed in vg2\n var fieldStat = stats[field.name],\n bins = util.getbins(fieldStat, field.bin.maxbins || schema.MAXBINS_DEFAULT),\n numbins = (bins.stop - bins.start) / bins.step;\n return util.range(numbins).map(function(i) {\n return bins.start + bins.step * i;\n });\n }\n\n if (name == opt.stack) {\n return {\n data: STACKED,\n field: encoding.fieldRef(name, {\n data: !encoding._vega2,\n prefn: (opt.facet ? 'max_' : '') + 'sum_'\n })\n };\n }\n var aggregate = encoding.aggregate(name),\n timeUnit = field.timeUnit,\n scaleUseRawDomain = encoding.scale(name).useRawDomain,\n useRawDomain = scaleUseRawDomain !== undefined ?\n scaleUseRawDomain : encoding.config('useRawDomain'),\n notCountOrSum = !aggregate || (aggregate !=='count' && aggregate !== 'sum');\n\n // FIXME revise this part\n\n if ( useRawDomain && notCountOrSum && (\n // Q always uses non-ordinal scale except when it's binned and thus uses ordinal scale.\n (encoding.isType(name, Q) && !field.bin) ||\n // T uses non-ordinal scale when there's no unit or when the unit is not ordinal.\n (encoding.isType(name, T) && (!timeUnit || !time.isOrdinalFn(timeUnit)))\n )\n ) {\n return {data: RAW, field: encoding.fieldRef(name, {nofn: !timeUnit})};\n }\n\n var data = encoding.sort(name, stats).length > 0 ?\n vlsort.getDataName(name):\n encoding.dataTable();\n\n return {data: data, field: encoding.fieldRef(name)};\n};\n\n\nscale.range = function (s, encoding, layout, stats) {\n var spec = encoding.scale(s.name),\n field = encoding.field(s.name),\n timeUnit = field.timeUnit;\n\n switch (s.name) {\n case X:\n s.range = layout.cellWidth ? [0, layout.cellWidth] : 'width';\n if (s.type === 'ordinal') {\n s.bandWidth = encoding.bandSize(X, layout.x.useSmallBand);\n } else {\n if (encoding.isType(s.name,T) && timeUnit === 'year') {\n s.zero = false;\n } else {\n s.zero = spec.zero === undefined ? true : spec.zero;\n }\n\n s.reverse = spec.reverse;\n }\n s.round = true;\n if (s.type === 'time') {\n s.nice = timeUnit || encoding.config('timeScaleNice');\n }else {\n s.nice = true;\n }\n break;\n case Y:\n if (s.type === 'ordinal') {\n s.range = layout.cellHeight ?\n (field.bin ? [layout.cellHeight, 0] : [0, layout.cellHeight]) :\n 'height';\n s.bandWidth = encoding.bandSize(Y, layout.y.useSmallBand);\n } else {\n s.range = layout.cellHeight ? [layout.cellHeight, 0] : 'height';\n if (encoding.isType(s.name,T) && timeUnit === 'year') {\n s.zero = false;\n } else {\n s.zero = spec.zero === undefined ? true : spec.zero;\n }\n\n s.reverse = spec.reverse;\n }\n\n s.round = true;\n\n if (s.type === 'time') {\n s.nice = timeUnit || encoding.config('timeScaleNice');\n }else {\n s.nice = true;\n }\n break;\n case ROW: // support only ordinal\n s.bandWidth = layout.cellHeight;\n s.round = true;\n s.nice = true;\n break;\n case COL: // support only ordinal\n s.bandWidth = layout.cellWidth;\n s.round = true;\n s.nice = true;\n break;\n case SIZE:\n if (encoding.is('bar')) {\n // FIXME this is definitely incorrect\n // but let's fix it later since bar size is a bad encoding anyway\n s.range = [3, Math.max(encoding.bandSize(X), encoding.bandSize(Y))];\n } else if (encoding.is(TEXT)) {\n s.range = [8, 40];\n } else { //point\n var bandSize = Math.min(encoding.bandSize(X), encoding.bandSize(Y)) - 1;\n s.range = [10, 0.8 * bandSize*bandSize];\n }\n s.round = true;\n s.zero = false;\n break;\n case SHAPE:\n s.range = 'shapes';\n break;\n case COLOR:\n s.range = scale.color(s, encoding, stats);\n if (s.type !== 'ordinal') s.zero = false;\n break;\n default:\n throw new Error('Unknown encoding name: '+ s.name);\n }\n\n // FIXME(kanitw): Jul 29, 2015 - consolidate this with above\n switch (s.name) {\n case ROW:\n case COL:\n s.padding = encoding.config('cellPadding');\n s.outerPadding = 0;\n break;\n case X:\n case Y:\n if (s.type === 'ordinal') { //&& !s.bandWidth\n s.points = true;\n s.padding = encoding.field(s.name).band.padding;\n }\n }\n};\n\nscale.color = function(s, encoding, stats) {\n var colorScale = encoding.scale(COLOR),\n range = colorScale.range,\n cardinality = encoding.cardinality(COLOR, stats),\n type = encoding.type(COLOR);\n\n if (range === undefined) {\n var ordinalPalette = colorScale.ordinalPalette,\n quantitativeRange = colorScale.quantitativeRange;\n\n if (s.type === 'ordinal') {\n if (type === N) {\n // use categorical color scale\n if (cardinality <= 10) {\n range = colorScale.c10palette;\n } else {\n range = colorScale.c20palette;\n }\n return scale.color.palette(range, cardinality, type);\n } else {\n if (ordinalPalette) {\n return scale.color.palette(ordinalPalette, cardinality, type);\n }\n return scale.color.interpolate(quantitativeRange[0], quantitativeRange[1], cardinality);\n }\n } else { //time or quantitative\n return [quantitativeRange[0], quantitativeRange[1]];\n }\n }\n};\n\nscale.color.palette = function(range, cardinality, type) {\n // FIXME(kanitw): Jul 29, 2015 - check range is string\n switch (range) {\n case 'category10k':\n // tableau's category 10, ordered by perceptual kernel study results\n // https://github.com/uwdata/perceptual-kernels\n return ['#2ca02c', '#e377c2', '#7f7f7f', '#17becf', '#8c564b', '#d62728', '#bcbd22', '#9467bd', '#ff7f0e', '#1f77b4'];\n\n // d3/tableau category10/20/20b/20c\n case 'category10':\n return ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'];\n\n case 'category20':\n return ['#1f77b4', '#aec7e8', '#ff7f0e', '#ffbb78', '#2ca02c', '#98df8a', '#d62728', '#ff9896', '#9467bd', '#c5b0d5', '#8c564b', '#c49c94', '#e377c2', '#f7b6d2', '#7f7f7f', '#c7c7c7', '#bcbd22', '#dbdb8d', '#17becf', '#9edae5'];\n\n case 'category20b':\n return ['#393b79', '#5254a3', '#6b6ecf', '#9c9ede', '#637939', '#8ca252', '#b5cf6b', '#cedb9c', '#8c6d31', '#bd9e39', '#e7ba52', '#e7cb94', '#843c39', '#ad494a', '#d6616b', '#e7969c', '#7b4173', '#a55194', '#ce6dbd', '#de9ed6'];\n\n case 'category20c':\n return ['#3182bd', '#6baed6', '#9ecae1', '#c6dbef', '#e6550d', '#fd8d3c', '#fdae6b', '#fdd0a2', '#31a354', '#74c476', '#a1d99b', '#c7e9c0', '#756bb1', '#9e9ac8', '#bcbddc', '#dadaeb', '#636363', '#969696', '#bdbdbd', '#d9d9d9'];\n }\n\n // TODO add our own set of custom ordinal color palette\n\n if (range in colorbrewer) {\n var palette = colorbrewer[range];\n\n // if cardinality pre-defined, use it.\n if (cardinality in palette) return palette[cardinality];\n\n // if not, use the highest cardinality one for nominal\n if (type === N) {\n return palette[Math.max.apply(null, util.keys(palette))];\n }\n\n // otherwise, interpolate\n var ps = cardinality < 3 ? 3 : Math.max.apply(null, util.keys(palette)),\n from = 0 , to = ps - 1;\n // FIXME add config for from / to\n\n return scale.color.interpolate(palette[ps][from], palette[ps][to], cardinality);\n }\n\n return range;\n};\n\nscale.color.interpolate = function (start, end, cardinality) {\n\n var interpolator = interpolate(start, end);\n return util.range(cardinality).map(function(i) { return interpolator(i*1.0/(cardinality-1)); });\n};\n\n},{\"../globals\":33,\"../schema/schema\":35,\"../util\":37,\"./sort\":24,\"./time\":28,\"colorbrewer\":3,\"d3-color\":4}],24:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar vlfield = require('../field');\n\nmodule.exports = sort;\n\n// adds new transforms that produce sorted fields\nfunction sort(data, encoding, stats, opt) {\n // jshint unused:false\n\n var datasetMapping = {};\n\n encoding.forEach(function(field, encType) {\n var sortBy = encoding.sort(encType, stats);\n if (sortBy.length > 0) {\n var fields = sortBy.map(function(d) {\n return {\n op: d.aggregate,\n field: vlfield.fieldRef(d, {nofn: true, data: !encoding._vega2})\n };\n });\n\n var byClause = sortBy.map(function(d) {\n var reverse = (d.reverse ? '-' : '');\n return reverse + vlfield.fieldRef(d, {data: !encoding._vega2});\n });\n\n var dataName = sort.getDataName(encType);\n\n var transforms = [\n {\n type: 'aggregate',\n groupby: [ encoding.fieldRef(encType) ],\n fields: fields\n },\n {\n type: 'sort',\n by: byClause\n }\n ];\n\n data.push({\n name: dataName,\n source: RAW,\n transform: transforms\n });\n\n datasetMapping[encType] = dataName;\n }\n });\n\n return data;\n}\n\nsort.getDataName = function(encType) {\n return 'sorted-' + encType;\n};\n\n\n},{\"../field\":32,\"../globals\":33}],25:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar marks = require('./marks');\n\nmodule.exports = stacking;\n\nfunction stacking(data, encoding, mdef) {\n if (!marks[encoding.marktype()].stack) return false;\n\n // TODO: add || encoding.has(LOD) here once LOD is implemented\n if (!encoding.has(COLOR)) return false;\n\n var dim=null, val=null, idx =null,\n isXMeasure = encoding.isMeasure(X),\n isYMeasure = encoding.isMeasure(Y),\n facets = encoding.facets();\n\n if (isXMeasure && !isYMeasure) {\n dim = Y;\n val = X;\n idx = 0;\n } else if (isYMeasure && !isXMeasure) {\n dim = X;\n val = Y;\n idx = 1;\n } else {\n return null; // no stack encoding\n }\n\n // add transform to compute sums for scale\n var stacked = {\n name: STACKED,\n source: encoding.dataTable(),\n transform: [{\n type: 'aggregate',\n groupby: [encoding.fieldRef(dim)].concat(facets), // dim and other facets\n fields: [{op: 'sum', field: encoding.fieldRef(val)}] // TODO check if field with aggregate is correct?\n }]\n };\n\n if (facets && facets.length > 0) {\n stacked.transform.push({ //calculate max for each facet\n type: 'aggregate',\n groupby: facets,\n fields: [{\n op: 'max',\n field: encoding.fieldName(val, {fn: 'sum'})\n }]\n });\n }\n\n data.push(stacked);\n\n // add stack transform to mark\n mdef.from.transform = [{\n type: 'stack',\n point: encoding.fieldRef(dim),\n height: encoding.fieldRef(val),\n output: {y1: val, y0: val + '2'}\n }];\n\n // TODO: This is super hack-ish -- consolidate into modular mark properties?\n mdef.properties.update[val] = mdef.properties.enter[val] = {scale: val, field: val};\n mdef.properties.update[val + '2'] = mdef.properties.enter[val + '2'] = {scale: val, field: val + '2'};\n\n return val; //return stack encoding\n}\n\n},{\"../globals\":33,\"./marks\":22}],26:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar vlfield = require('../field');\n\nmodule.exports = function(encoding, stats) {\n return {\n opacity: estimateOpacity(encoding, stats),\n };\n};\n\nfunction estimateOpacity(encoding,stats) {\n if (!stats) {\n return 1;\n }\n\n var numPoints = 0;\n\n if (encoding.isAggregate()) { // aggregate plot\n numPoints = 1;\n\n // get number of points in each \"cell\"\n // by calculating product of cardinality\n // for each non faceting and non-ordinal X / Y fields\n // note that ordinal x,y are not include since we can\n // consider that ordinal x are subdividing the cell into subcells anyway\n encoding.forEach(function(field, encType) {\n\n if (encType !== ROW && encType !== COL &&\n !((encType === X || encType === Y) &&\n vlfield.isOrdinalScale(field))\n ) {\n numPoints *= encoding.cardinality(encType, stats);\n }\n });\n\n } else { // raw plot\n\n // TODO: error handling\n if (!stats['*'])\n return 1;\n\n numPoints = stats['*'].max; // count\n\n // small multiples divide number of points\n var numMultiples = 1;\n if (encoding.has(ROW)) {\n numMultiples *= encoding.cardinality(ROW, stats);\n }\n if (encoding.has(COL)) {\n numMultiples *= encoding.cardinality(COL, stats);\n }\n numPoints /= numMultiples;\n }\n\n var opacity = 0;\n if (numPoints <= 25) {\n opacity = 1;\n } else if (numPoints < 200) {\n opacity = 0.8;\n } else if (numPoints < 1000 || encoding.is('tick')) {\n opacity = 0.7;\n } else {\n opacity = 0.3;\n }\n\n return opacity;\n}\n\n\n},{\"../field\":32,\"../globals\":33}],27:[function(require,module,exports){\n'use strict';\n\nrequire('../globals');\n\nvar groupdef = require('./group').def;\n\nmodule.exports = subfaceting;\n\nfunction subfaceting(group, mdef, details, stack, encoding) {\n var m = group.marks,\n g = groupdef('subfacet', {marks: m});\n\n group.marks = [g];\n g.from = mdef.from;\n delete mdef.from;\n\n //TODO test LOD -- we should support stack / line without color (LOD) field\n var trans = (g.from.transform || (g.from.transform = []));\n trans.unshift({type: 'facet', keys: details});\n\n if (stack && encoding.has(COLOR)) {\n trans.unshift({type: 'sort', by: encoding.fieldRef(COLOR)});\n }\n}\n\n},{\"../globals\":33,\"./group\":19}],28:[function(require,module,exports){\n'use strict';\n\nvar util = require('../util'),\n d3_time_format = require('d3-time-format');\n\nvar time = module.exports = {};\n\nvar LONG_DATE = new Date(2014, 8, 17);\n\ntime.cardinality = function(field, stats, filterNull, type) {\n var timeUnit = field.timeUnit;\n switch (timeUnit) {\n case 'seconds': return 60;\n case 'minutes': return 60;\n case 'hours': return 24;\n case 'day': return 7;\n case 'date': return 31;\n case 'month': return 12;\n case 'year':\n var stat = stats[field.name],\n yearstat = stats['year_'+field.name];\n\n if (!yearstat) { return null; }\n\n return yearstat.distinct -\n (stat.nulls > 0 && filterNull[type] ? 1 : 0);\n }\n\n return null;\n};\n\ntime.formula = function(timeUnit, fieldRef) {\n // TODO(kanitw): add formula to other time format\n var fn = 'utc' + timeUnit;\n return fn + '(' + fieldRef + ')';\n};\n\ntime.maxLength = function(timeUnit, encoding) {\n switch (timeUnit) {\n case 'seconds':\n case 'minutes':\n case 'hours':\n case 'date':\n return 2;\n case 'month':\n case 'day':\n var range = time.range(timeUnit, encoding);\n if (range) {\n // return the longest name in the range\n return Math.max.apply(null, range.map(function(r) {return r.length;}));\n }\n return 2;\n case 'year':\n return 4; //'1998'\n }\n // no time unit\n var timeFormat = encoding.config('timeFormat');\n return d3_time_format.utcFormat(timeFormat)(LONG_DATE).length;\n};\n\ntime.range = function(timeUnit, encoding) {\n var labelLength = encoding.config('timeScaleLabelLength'),\n scaleLabel;\n switch (timeUnit) {\n case 'day':\n scaleLabel = encoding.config('dayScaleLabel');\n break;\n case 'month':\n scaleLabel = encoding.config('monthScaleLabel');\n break;\n }\n if (scaleLabel) {\n return labelLength ? scaleLabel.map(\n function(s) { return s.substr(0, labelLength);}\n ) : scaleLabel;\n }\n return;\n};\n\n\n/**\n * @param {Object} encoding\n * @return {Array} scales for time unit names\n */\ntime.scales = function(encoding) {\n var scales = encoding.reduce(function(scales, field) {\n var timeUnit = field.timeUnit;\n if (field.type === T && timeUnit && !scales[timeUnit]) {\n var scale = time.scale.def(field.timeUnit, encoding);\n if (scale) scales[timeUnit] = scale;\n }\n return scales;\n }, {});\n\n return util.vals(scales);\n};\n\n\ntime.scale = {};\n\n/** append custom time scales for axis label */\ntime.scale.def = function(timeUnit, encoding) {\n var range = time.range(timeUnit, encoding);\n\n if (range) {\n return {\n name: 'time-'+timeUnit,\n type: 'ordinal',\n domain: time.scale.domain(timeUnit),\n range: range\n };\n }\n return null;\n};\n\ntime.isOrdinalFn = function(timeUnit) {\n switch (timeUnit) {\n case 'seconds':\n case 'minutes':\n case 'hours':\n case 'day':\n case 'date':\n case 'month':\n return true;\n }\n return false;\n};\n\ntime.scale.type = function(timeUnit, name) {\n if (name === COLOR) {\n return 'linear'; // time has order, so use interpolated ordinal color scale.\n }\n\n return time.isOrdinalFn(timeUnit) || name === COL || name === ROW ? 'ordinal' : 'linear';\n};\n\ntime.scale.domain = function(timeUnit, name) {\n var isColor = name === COLOR;\n switch (timeUnit) {\n case 'seconds':\n case 'minutes': return isColor ? [0,59] : util.range(0, 60);\n case 'hours': return isColor ? [0,23] : util.range(0, 24);\n case 'day': return isColor ? [0,6] : util.range(0, 7);\n case 'date': return isColor ? [1,31] : util.range(1, 32);\n case 'month': return isColor ? [0,11] : util.range(0, 12);\n }\n return null;\n};\n\n/** whether a particular time function has custom scale for labels implemented in time.scale */\ntime.hasScale = function(timeUnit) {\n switch (timeUnit) {\n case 'day':\n case 'month':\n return true;\n }\n return false;\n};\n\n},{\"../util\":37,\"d3-time-format\":6}],29:[function(require,module,exports){\n'use strict';\n\nrequire('./globals');\n\nvar consts = module.exports = {};\n\nconsts.encodingTypes = [X, Y, ROW, COL, SIZE, SHAPE, COLOR, TEXT, DETAIL];\n\nconsts.shorthand = {\n delim: '|',\n assign: '=',\n type: ',',\n func: '_'\n};\n\n},{\"./globals\":33}],30:[function(require,module,exports){\n'use strict';\n\nrequire('./globals');\n\nvar stats = require('datalib/src/stats');\n\nvar vldata = module.exports = {};\n\n/** Mapping from datalib's inferred type to Vega-lite's type */\nvldata.types = {\n 'boolean': N,\n 'number': Q,\n 'integer': Q,\n 'date': T,\n 'string': N\n};\n\nvldata.stats = function(data) {\n var summary = stats.summary(data);\n\n return summary.reduce(function(s, profile) {\n s[profile.field] = profile;\n return s;\n }, {\n '*': {\n max: data.length,\n min: 0\n }\n });\n};\n},{\"./globals\":33,\"datalib/src/stats\":11}],31:[function(require,module,exports){\n// utility for enc\n\n'use strict';\n\nvar consts = require('./consts'),\n c = consts.shorthand,\n vlfield = require('./field'),\n util = require('./util'),\n schema = require('./schema/schema'),\n encTypes = schema.encTypes;\n\nvar vlenc = module.exports = {};\n\nvlenc.countRetinal = function(enc) {\n var count = 0;\n if (enc.color) count++;\n if (enc.size) count++;\n if (enc.shape) count++;\n return count;\n};\n\nvlenc.has = function(enc, encType) {\n var fieldDef = enc && enc[encType];\n return fieldDef && fieldDef.name;\n};\n\nvlenc.isAggregate = function(enc) {\n for (var k in enc) {\n if (vlenc.has(enc, k) && enc[k].aggregate) {\n return true;\n }\n }\n return false;\n};\n\nvlenc.forEach = function(enc, f) {\n var i = 0;\n encTypes.forEach(function(k) {\n if (vlenc.has(enc, k)) {\n f(enc[k], k, i++);\n }\n });\n};\n\nvlenc.map = function(enc, f) {\n var arr = [];\n encTypes.forEach(function(k) {\n if (vlenc.has(enc, k)) {\n arr.push(f(enc[k], k, enc));\n }\n });\n return arr;\n};\n\nvlenc.reduce = function(enc, f, init) {\n var r = init;\n encTypes.forEach(function(k) {\n if (vlenc.has(enc, k)) {\n r = f(r, enc[k], k, enc);\n }\n });\n return r;\n};\n\n/*\n * return key-value pairs of field name and list of fields of that field name\n */\nvlenc.fields = function(enc) {\n return vlenc.reduce(enc, function (m, field) {\n var fieldList = m[field.name] = m[field.name] || [],\n containsType = fieldList.containsType = fieldList.containsType || {};\n\n if (fieldList.indexOf(field) === -1) {\n fieldList.push(field);\n // augment the array with containsType.Q / O / N / T\n containsType[field.type] = true;\n }\n return m;\n }, {});\n};\n\nvlenc.shorthand = function(enc) {\n return vlenc.map(enc, function(field, et) {\n return et + c.assign + vlfield.shorthand(field);\n }).join(c.delim);\n};\n\nvlenc.fromShorthand = function(shorthand) {\n var enc = util.isArray(shorthand) ? shorthand : shorthand.split(c.delim);\n return enc.reduce(function(m, e) {\n var split = e.split(c.assign),\n enctype = split[0].trim(),\n field = split[1];\n\n m[enctype] = vlfield.fromShorthand(field);\n return m;\n }, {});\n};\n},{\"./consts\":29,\"./field\":32,\"./schema/schema\":35,\"./util\":37}],32:[function(require,module,exports){\n'use strict';\n\n// utility for field\n\nrequire('./globals');\n\nvar consts = require('./consts'),\n c = consts.shorthand,\n time = require('./compiler/time'),\n util = require('./util'),\n schema = require('./schema/schema');\n\nvar vlfield = module.exports = {};\n\n/**\n * @param field\n * @param opt\n * opt.nofn -- exclude bin, aggregate, timeUnit\n * opt.data - include 'data.'\n * opt.d - include 'd.'\n * opt.fn - replace fn with custom function prefix\n * opt.prefn - prepend fn with custom function prefix\n\n * @return {[type]} [description]\n */\nvlfield.fieldRef = function(field, opt) {\n opt = opt || {};\n\n var f = (opt.d ? 'd.' : '') +\n (opt.data ? 'data.' : '') +\n (opt.prefn || ''),\n nofn = opt.nofn || opt.fn,\n name = field.name;\n\n if (vlfield.isCount(field)) {\n return f + 'count';\n } else if (!nofn && field.bin) {\n return f + 'bin_' + name;\n } else if (!nofn && field.aggregate) {\n return f + field.aggregate + '_' + name;\n } else if (!nofn && field.timeUnit) {\n return f + field.timeUnit + '_' + name;\n } else if (opt.fn) {\n return f + opt.fn + '_' + name;\n } else {\n return f + name;\n }\n};\n\nvlfield.shorthand = function(f) {\n var c = consts.shorthand;\n return (f.aggregate ? f.aggregate + c.func : '') +\n (f.timeUnit ? f.timeUnit + c.func : '') +\n (f.bin ? 'bin' + c.func : '') +\n (f.name || '') + c.type + f.type;\n};\n\nvlfield.shorthands = function(fields, delim) {\n delim = delim || c.delim;\n return fields.map(vlfield.shorthand).join(delim);\n};\n\nvlfield.fromShorthand = function(shorthand) {\n var split = shorthand.split(c.type), i;\n var o = {\n name: split[0].trim(),\n type: split[1].trim()\n };\n\n // check aggregate type\n for (i in schema.aggregate.enum) {\n var a = schema.aggregate.enum[i];\n if (o.name.indexOf(a + '_') === 0) {\n o.name = o.name.substr(a.length + 1);\n if (a == 'count' && o.name.length === 0) o.name = '*';\n o.aggregate = a;\n break;\n }\n }\n\n // check time timeUnit\n for (i in schema.timefns) {\n var tu = schema.timefns[i];\n if (o.name && o.name.indexOf(tu + '_') === 0) {\n o.name = o.name.substr(o.length + 1);\n o.timeUnit = tu;\n break;\n }\n }\n\n // check bin\n if (o.name && o.name.indexOf('bin_') === 0) {\n o.name = o.name.substr(4);\n o.bin = true;\n }\n\n return o;\n};\n\nvar isType = vlfield.isType = function (fieldDef, type) {\n return fieldDef.type === type;\n};\n\nvar isTypes = vlfield.isTypes = function (fieldDef, types) {\n for (var t=0; t 0 && filterNull[type] ? 1 : 0);\n};\n\n},{\"./compiler/time\":28,\"./consts\":29,\"./globals\":33,\"./schema/schema\":35,\"./util\":37}],33:[function(require,module,exports){\n(function (global){\n'use strict';\n\n// declare global constant\nvar g = global || window;\n\ng.AGGREGATE = 'aggregate';\ng.RAW = 'raw';\ng.STACKED = 'stacked';\ng.INDEX = 'index';\n\ng.X = 'x';\ng.Y = 'y';\ng.ROW = 'row';\ng.COL = 'col';\ng.SIZE = 'size';\ng.SHAPE = 'shape';\ng.COLOR = 'color';\ng.TEXT = 'text';\ng.DETAIL = 'detail';\n\ng.N = 'N';\ng.O = 'O';\ng.Q = 'Q';\ng.T = 'T';\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],34:[function(require,module,exports){\n'use strict';\n\n// TODO(kanitw): chat with Vega team and possibly move this to vega-logging\nmodule.exports = function(prefix) {\n // Borrowed some ideas from http://stackoverflow.com/a/15653260/866989\n // and https://github.com/patik/console.log-wrapper/blob/master/consolelog.js\n var METHODS = ['error', 'info', 'debug', 'warn', 'log'];\n\n return METHODS.reduce(function(logger, fn) {\n var cfn = console[fn] ? fn : 'log';\n if (console[cfn].bind === 'undefined') { // IE < 10\n logger[fn] = Function.prototype.bind.call(console[cfn], console, prefix);\n }\n else {\n logger[fn] = console[cfn].bind(console, prefix);\n }\n return logger;\n }, {});\n};\n},{}],35:[function(require,module,exports){\n// Package of defining Vega-lite Specification's json schema\n'use strict';\n\nrequire('../globals');\n\nvar schema = module.exports = {},\n util = require('../util'),\n toMap = util.toMap,\n colorbrewer = require('colorbrewer');\n\nschema.util = require('./schemautil');\n\nschema.marktype = {\n type: 'string',\n enum: ['point', 'tick', 'bar', 'line', 'area', 'circle', 'square', 'text']\n};\n\nschema.aggregate = {\n type: 'string',\n enum: ['avg', 'sum', 'median', 'min', 'max', 'count'],\n supportedEnums: {\n Q: ['avg', 'median', 'sum', 'min', 'max', 'count'],\n O: ['median','min','max'],\n N: [],\n T: ['avg', 'median', 'min', 'max'],\n '': ['count']\n },\n supportedTypes: toMap([Q, N, O, T, ''])\n};\n\nschema.getSupportedRole = function(encType) {\n return schema.schema.properties.encoding.properties[encType].supportedRole;\n};\n\nschema.timeUnits = ['year', 'month', 'day', 'date', 'hours', 'minutes', 'seconds'];\n\nschema.defaultTimeFn = 'month';\n\nschema.timeUnit = {\n type: 'string',\n enum: schema.timeUnits,\n supportedTypes: toMap([T])\n};\n\nschema.scale_type = {\n type: 'string',\n // TODO(kanitw) read vega's schema here, add description\n enum: ['linear', 'log', 'pow', 'sqrt', 'quantile'],\n default: 'linear',\n supportedTypes: toMap([Q])\n};\n\nschema.field = {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n }\n }\n};\n\nvar clone = util.duplicate;\nvar merge = schema.util.merge;\n\nschema.MAXBINS_DEFAULT = 15;\n\nvar bin = {\n type: ['boolean', 'object'],\n default: false,\n properties: {\n maxbins: {\n type: 'integer',\n default: schema.MAXBINS_DEFAULT,\n minimum: 2,\n description: 'Maximum number of bins.'\n }\n },\n supportedTypes: toMap([Q]) // TODO: add O after finishing #81\n};\n\nvar typicalField = merge(clone(schema.field), {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: [N, O, Q, T]\n },\n aggregate: schema.aggregate,\n timeUnit: schema.timeUnit,\n bin: bin,\n scale: {\n type: 'object',\n properties: {\n type: schema.scale_type,\n reverse: {\n type: 'boolean',\n default: false,\n supportedTypes: toMap([Q, T])\n },\n zero: {\n type: 'boolean',\n description: 'Include zero',\n default: true,\n supportedTypes: toMap([Q, T])\n },\n nice: {\n type: 'string',\n enum: ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'],\n supportedTypes: toMap([T])\n },\n useRawDomain: {\n type: 'boolean',\n default: undefined,\n description: 'Use the raw data range as scale domain instead of ' +\n 'aggregated data for aggregate axis. ' +\n 'This option does not work with sum or count aggregate' +\n 'as they might have a substantially larger scale range.' +\n 'By default, use value from config.useRawDomain.'\n }\n }\n }\n }\n});\n\nvar onlyOrdinalField = merge(clone(schema.field), {\n type: 'object',\n supportedRole: {\n dimension: true\n },\n properties: {\n type: {\n type: 'string',\n enum: [N, O, Q, T] // ordinal-only field supports Q when bin is applied and T when time unit is applied.\n },\n timeUnit: schema.timeUnit,\n bin: bin,\n aggregate: {\n type: 'string',\n enum: ['count'],\n supportedTypes: toMap([N, O]) // FIXME this looks weird to me\n }\n }\n});\n\nvar axisMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true},\n properties: {\n axis: {\n type: 'object',\n properties: {\n grid: {\n type: 'boolean',\n default: true,\n description: 'A flag indicate if gridlines should be created in addition to ticks.'\n },\n layer: {\n type: 'string',\n default: 'back',\n description: 'A string indicating if the axis (and any gridlines) should be placed above or below the data marks.'\n },\n orient: {\n type: 'string',\n default: undefined,\n enum: ['top', 'right', 'left', 'bottom'],\n description: 'The orientation of the axis. One of top, bottom, left or right. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart).'\n },\n ticks: {\n type: 'integer',\n default: 5,\n description: 'A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale\\'s range.'\n },\n title: {\n type: 'string',\n default: undefined,\n description: 'A title for the axis. (Shows field name and its function by default.)'\n },\n titleMaxLength: {\n type: 'integer',\n default: undefined,\n description: 'Max length for axis title if the title is automatically generated from the field\\'s description'\n },\n titleOffset: {\n type: 'integer',\n default: undefined, // auto\n description: 'A title offset value for the axis.'\n },\n format: {\n type: 'string',\n default: undefined, // auto\n description: 'The formatting pattern for axis labels. '+\n 'If not undefined, this will be determined by ' +\n 'small/largeNumberFormat and the max value ' +\n 'of the field.'\n },\n maxLabelLength: {\n type: 'integer',\n default: 25,\n minimum: 0,\n description: 'Truncate labels that are too long.'\n },\n labelAngle: {\n type: 'integer',\n default: undefined, // auto\n description: 'Angle by which to rotate labels. Set to 0 to force horizontal.'\n },\n }\n }\n }\n};\n\nvar sortMixin = {\n type: 'object',\n properties: {\n sort: {\n type: 'array',\n default: [],\n items: {\n type: 'object',\n supportedTypes: toMap([N, O]),\n required: ['name', 'aggregate'],\n properties: {\n name: {\n type: 'string'\n },\n aggregate: {\n type: 'string',\n enum: ['avg', 'sum', 'min', 'max', 'count']\n },\n reverse: {\n type: 'boolean',\n default: false\n }\n }\n }\n }\n }\n};\n\nvar bandMixin = {\n type: 'object',\n properties: {\n band: {\n type: 'object',\n properties: {\n size: {\n type: 'integer',\n minimum: 0,\n default: undefined\n },\n padding: {\n type: 'integer',\n minimum: 0,\n default: 1\n }\n }\n }\n }\n};\n\nvar legendMixin = {\n type: 'object',\n properties: {\n legend: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n default: undefined,\n description: 'A title for the legend. (Shows field name and its function by default.)'\n }\n }\n }\n }\n};\n\nvar textMixin = {\n type: 'object',\n supportedMarktypes: {'text': true},\n properties: {\n align: {\n type: 'string',\n default: 'right'\n },\n baseline: {\n type: 'string',\n default: 'middle'\n },\n color: {\n type: 'string',\n role: 'color',\n default: '#000000'\n },\n margin: {\n type: 'integer',\n default: 4,\n minimum: 0\n },\n placeholder: {\n type: 'string',\n default: 'Abc'\n },\n font: {\n type: 'object',\n properties: {\n weight: {\n type: 'string',\n enum: ['normal', 'bold'],\n default: 'normal'\n },\n size: {\n type: 'integer',\n default: 10,\n minimum: 0\n },\n family: {\n type: 'string',\n default: 'Helvetica Neue'\n },\n style: {\n type: 'string',\n default: 'normal',\n enum: ['normal', 'italic']\n }\n }\n },\n format: {\n type: 'string',\n default: undefined, // auto\n description: 'The formatting pattern for text value. '+\n 'If not undefined, this will be determined by ' +\n 'small/largeNumberFormat and the max value ' +\n 'of the field.'\n },\n }\n};\n\nvar sizeMixin = {\n type: 'object',\n supportedMarktypes: {point: true, bar: true, circle: true, square: true, text: true},\n properties: {\n value: {\n type: 'integer',\n default: 30,\n minimum: 0\n }\n }\n};\n\nvar colorMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true, 'text': true},\n properties: {\n value: {\n type: 'string',\n role: 'color',\n default: 'steelblue'\n },\n opacity: {\n type: 'number',\n default: undefined, // auto\n minimum: 0,\n maximum: 1\n },\n scale: {\n type: 'object',\n properties: {\n range: {\n type: ['string', 'array'],\n default: undefined,\n description:\n 'color palette, if undefined vega-lite will use data property' +\n 'to pick one from c10palette, c20palette, or ordinalPalette'\n //FIXME\n },\n c10palette: {\n type: 'string',\n default: 'category10',\n enum: [\n // Tableau\n 'category10', 'category10k',\n // Color Brewer\n 'Pastel1', 'Pastel2', 'Set1', 'Set2', 'Set3'\n ]\n },\n c20palette: {\n type: 'string',\n default: 'category20',\n enum: ['category20', 'category20b', 'category20c']\n },\n ordinalPalette: {\n type: 'string',\n default: undefined,\n enum: util.keys(colorbrewer)\n },\n quantitativeRange: {\n type: 'array',\n default: ['#AFC6A3', '#09622A'], // tableau greens\n // default: ['#ccece6', '#00441b'], // BuGn.9 [2-8]\n items: {\n type: 'string',\n role: 'color'\n }\n }\n }\n }\n }\n};\n\nvar shapeMixin = {\n type: 'object',\n supportedMarktypes: {point: true, circle: true, square: true},\n properties: {\n value: {\n type: 'string',\n enum: ['circle', 'square', 'cross', 'diamond', 'triangle-up', 'triangle-down'],\n default: 'circle'\n },\n filled: {\n type: 'boolean',\n default: false,\n description: 'whether the shape\\'s color should be used as fill color instead of stroke color'\n }\n }\n};\n\nvar detailMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, line: true, circle: true, square: true}\n};\n\nvar rowMixin = {\n properties: {\n height: {\n type: 'number',\n minimum: 0,\n default: 150\n }\n }\n};\n\nvar colMixin = {\n properties: {\n width: {\n type: 'number',\n minimum: 0,\n default: 150\n },\n axis: {\n properties: {\n maxLabelLength: {\n type: 'integer',\n default: 12,\n minimum: 0,\n description: 'Truncate labels that are too long.'\n }\n }\n }\n }\n};\n\nvar facetMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true, text: true},\n properties: {\n padding: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n default: 0.1\n }\n }\n};\n\nvar requiredNameType = {\n required: ['name', 'type']\n};\n\nvar multiRoleField = merge(clone(typicalField), {\n supportedRole: {\n measure: true,\n dimension: true\n }\n});\n\nvar quantitativeField = merge(clone(typicalField), {\n supportedRole: {\n measure: true,\n dimension: 'ordinal-only' // using size to encoding category lead to order interpretation\n }\n});\n\nvar onlyQuantitativeField = merge(clone(typicalField), {\n supportedRole: {\n measure: true\n }\n});\n\nvar x = merge(clone(multiRoleField), axisMixin, bandMixin, requiredNameType, sortMixin);\nvar y = clone(x);\n\nvar facet = merge(clone(onlyOrdinalField), requiredNameType, facetMixin, sortMixin);\nvar row = merge(clone(facet), axisMixin, rowMixin);\nvar col = merge(clone(facet), axisMixin, colMixin);\n\nvar size = merge(clone(quantitativeField), legendMixin, sizeMixin, sortMixin);\nvar color = merge(clone(multiRoleField), legendMixin, colorMixin, sortMixin);\n\nvar shape = merge(clone(onlyOrdinalField), legendMixin, shapeMixin, sortMixin);\nvar detail = merge(clone(onlyOrdinalField), detailMixin, sortMixin);\n\n// we only put aggregated measure in pivot table\nvar text = merge(clone(onlyQuantitativeField), textMixin, sortMixin);\n\n// TODO add label\n\nvar filter = {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n operands: {\n type: 'array',\n items: {\n type: ['string', 'boolean', 'integer', 'number']\n }\n },\n operator: {\n type: 'string',\n enum: ['>', '>=', '=', '!=', '<', '<=', 'notNull']\n }\n }\n }\n};\n\nvar data = {\n type: 'object',\n properties: {\n // data source\n formatType: {\n type: 'string',\n enum: ['json', 'csv'],\n default: 'json'\n },\n url: {\n type: 'string',\n default: undefined\n },\n values: {\n type: 'array',\n default: undefined,\n description: 'Pass array of objects instead of a url to a file.',\n items: {\n type: 'object',\n additionalProperties: true\n }\n }\n }\n};\n\nvar config = {\n type: 'object',\n properties: {\n // template\n width: {\n type: 'integer',\n default: undefined\n },\n height: {\n type: 'integer',\n default: undefined\n },\n viewport: {\n type: 'array',\n items: {\n type: 'integer'\n },\n default: undefined\n },\n gridColor: {\n type: 'string',\n role: 'color',\n default: 'black'\n },\n gridOpacity: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n default: 0.08\n },\n\n // filter null\n filterNull: {\n type: 'object',\n properties: {\n O: {type:'boolean', default: false},\n Q: {type:'boolean', default: true},\n T: {type:'boolean', default: true}\n }\n },\n toggleSort: {\n type: 'string',\n default: O\n },\n\n // single plot\n singleHeight: {\n // will be overwritten by bandWidth * (cardinality + padding)\n type: 'integer',\n default: 200,\n minimum: 0\n },\n singleWidth: {\n // will be overwritten by bandWidth * (cardinality + padding)\n type: 'integer',\n default: 200,\n minimum: 0\n },\n // band size\n largeBandSize: {\n type: 'integer',\n default: 21,\n minimum: 0\n },\n smallBandSize: {\n //small multiples or single plot with high cardinality\n type: 'integer',\n default: 12,\n minimum: 0\n },\n largeBandMaxCardinality: {\n type: 'integer',\n default: 10\n },\n // small multiples\n cellPadding: {\n type: 'number',\n default: 0.1\n },\n cellGridColor: {\n type: 'string',\n role: 'color',\n default: 'black'\n },\n cellGridOpacity: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n default: 0.15\n },\n cellBackgroundColor: {\n type: 'string',\n role: 'color',\n default: 'transparent'\n },\n textCellWidth: {\n type: 'integer',\n default: 90,\n minimum: 0\n },\n\n // marks\n strokeWidth: {\n type: 'integer',\n default: 2,\n minimum: 0\n },\n singleBarOffset: {\n type: 'integer',\n default: 5,\n minimum: 0\n },\n // scales\n timeScaleLabelLength: {\n type: 'integer',\n default: 3,\n minimum: 0,\n description: 'Max length for values in dayScaleLabel and monthScaleLabel. Zero means using full names in dayScaleLabel/monthScaleLabel.'\n },\n dayScaleLabel: {\n type: 'array',\n items: {\n type: 'string'\n },\n default: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n description: 'Axis labels for day of week, starting from Sunday.' +\n '(Consistent with Javascript -- See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay.'\n },\n monthScaleLabel: {\n type: 'array',\n items: {\n type: 'string'\n },\n default: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n description: 'Axis labels for month.'\n },\n // other\n characterWidth: {\n type: 'integer',\n default: 6\n },\n maxSmallNumber: {\n type: 'number',\n default: 10000,\n description: 'maximum number that a field will be considered smallNumber.'+\n 'Used for axis labelling.'\n },\n smallNumberFormat: {\n type: 'string',\n default: '',\n description: 'D3 Number format for axis labels and text tables '+\n 'for number <= maxSmallNumber. Used for axis labelling.'\n },\n largeNumberFormat: {\n type: 'string',\n default: '.3s',\n description: 'D3 Number format for axis labels and text tables ' +\n 'for number > maxSmallNumber.'\n },\n timeFormat: {\n type: 'string',\n default: '%Y-%m-%d',\n description: 'Date format for axis labels.'\n },\n useRawDomain: {\n type: 'boolean',\n default: false,\n description: 'Use the raw data range as scale domain instead of ' +\n 'aggregated data for aggregate axis. ' +\n 'This option does not work with sum or count aggregate' +\n 'as they might have a substantially larger scale range.' +\n 'By default, use value from config.useRawDomain.'\n }\n }\n};\n\n/** @type Object Schema of a vega-lite specification */\nschema.schema = {\n $schema: 'http://json-schema.org/draft-04/schema#',\n description: 'Schema for Vega-lite specification',\n type: 'object',\n required: ['marktype', 'encoding', 'data'],\n properties: {\n data: data,\n marktype: schema.marktype,\n encoding: {\n type: 'object',\n properties: {\n x: x,\n y: y,\n row: row,\n col: col,\n size: size,\n color: color,\n shape: shape,\n text: text,\n detail: detail\n }\n },\n filter: filter,\n config: config\n }\n};\n\nschema.encTypes = util.keys(schema.schema.properties.encoding.properties);\n\n/** Instantiate a verbose vl spec from the schema */\nschema.instantiate = function() {\n return schema.util.instantiate(schema.schema);\n};\n\n},{\"../globals\":33,\"../util\":37,\"./schemautil\":36,\"colorbrewer\":3}],36:[function(require,module,exports){\n'use strict';\n\nvar schemautil = module.exports = {},\n util = require('../util');\n\nvar isEmpty = function(obj) {\n return Object.keys(obj).length === 0;\n};\n\nschemautil.extend = function(instance, schema) {\n return schemautil.merge(schemautil.instantiate(schema), instance);\n};\n\n// instantiate a schema\nschemautil.instantiate = function(schema) {\n var val;\n if (schema === undefined) {\n return undefined;\n } else if ('default' in schema) {\n val = schema.default;\n return util.isObject(val) ? util.duplicate(val) : val;\n } else if (schema.type === 'object') {\n var instance = {};\n for (var name in schema.properties) {\n val = schemautil.instantiate(schema.properties[name]);\n if (val !== undefined) {\n instance[name] = val;\n }\n }\n return instance;\n } else if (schema.type === 'array') {\n return [];\n }\n return undefined;\n};\n\n// remove all defaults from an instance\nschemautil.subtract = function(instance, defaults) {\n var changes = {};\n for (var prop in instance) {\n var def = defaults[prop];\n var ins = instance[prop];\n // Note: does not properly subtract arrays\n if (!defaults || def !== ins) {\n if (typeof ins === 'object' && !util.isArray(ins) && def) {\n var c = schemautil.subtract(ins, def);\n if (!isEmpty(c))\n changes[prop] = c;\n } else if (!util.isArray(ins) || ins.length > 0) {\n changes[prop] = ins;\n }\n }\n }\n return changes;\n};\n\nschemautil.merge = function(/*dest*, src0, src1, ...*/){\n var dest = arguments[0];\n for (var i=1 ; i> 16 & 0xff, n >> 8 & 0xff, n & 0xff);\n }\n\n function Hsl(h, s, l) {\n this.h = +h;\n this.s = Math.max(0, Math.min(1, +s));\n this.l = Math.max(0, Math.min(1, +l));\n }\n\n var __prototype = Hsl.prototype = new Color;\n\n __prototype.brighter = function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k);\n };\n\n __prototype.darker = function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k);\n };/* From FvD 13.37, CSS Color Module Level 3 */\n\n function hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n }\n\n __prototype.rgb = function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l <= .5 ? l * (1 + s) : l + s - l * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2)\n );\n };\n\n var hsl = function(h, s, l) {\n if (arguments.length === 1) {\n if (h instanceof Hsl) {\n l = h.l;\n s = h.s;\n h = h.h;\n } else {\n if (!(h instanceof Color)) h = color(h);\n if (h) {\n if (h instanceof Hsl) return h;\n h = h.rgb();\n var r = h.r / 255,\n g = h.g / 255,\n b = h.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n range = max - min;\n l = (max + min) / 2;\n if (range) {\n s = l < .5 ? range / (max + min) : range / (2 - max - min);\n if (r === max) h = (g - b) / range + (g < b) * 6;\n else if (g === max) h = (b - r) / range + 2;\n else h = (r - g) / range + 4;\n h *= 60;\n } else {\n h = NaN;\n s = l > 0 && l < 1 ? 0 : h;\n }\n } else {\n h = s = l = NaN;\n }\n }\n }\n return new Hsl(h, s, l);\n }\n\n var reHex3 = /^#([0-9a-f]{3})$/,\n reHex6 = /^#([0-9a-f]{6})$/,\n reRgbInteger = /^rgb\\(\\s*([-+]?\\d+)\\s*,\\s*([-+]?\\d+)\\s*,\\s*([-+]?\\d+)\\s*\\)$/,\n reRgbPercent = /^rgb\\(\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*\\)$/,\n reHslPercent = /^hsl\\(\\s*([-+]?\\d+(?:\\.\\d+)?)\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*,\\s*([-+]?\\d+(?:\\.\\d+)?)%\\s*\\)$/;\n\n var color = function(format) {\n var m;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf))) // #f00\n : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000\n : (m = reRgbInteger.exec(format)) ? rgb(m[1], m[2], m[3]) // rgb(255,0,0)\n : (m = reRgbPercent.exec(format)) ? rgb(m[1] * 2.55, m[2] * 2.55, m[3] * 2.55) // rgb(100%,0%,0%)\n : (m = reHslPercent.exec(format)) ? hsl(m[1], m[2] * .01, m[3] * .01) // hsl(120,50%,50%)\n : named.has(format) ? rgbn(named.get(format))\n : null;\n }// Done lazily to avoid circular dependency between Color, Rgb and Hsl.\n\n color.prototype = Color.prototype;\n rgb.prototype = Rgb.prototype;\n hsl.prototype = Hsl.prototype;\n\n function Lab(l, a, b) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n }\n\n var ___prototype = Lab.prototype = new Color;\n\n var Kn = 18;\n\n ___prototype.brighter = function(k) {\n return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b);\n };\n\n ___prototype.darker = function(k) {\n return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b);\n };\n\n function xyz2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n }\n\n var Xn = 0.950470, // D65 standard referent\n Yn = 1,\n Zn = 1.088830,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\n function lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n }\n\n ___prototype.rgb = function() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n y = Yn * lab2xyz(y);\n x = Xn * lab2xyz(x);\n z = Zn * lab2xyz(z);\n return new Rgb(\n xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z)\n );\n };\n\n function xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n }\n\n function rgb2xyz(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n }\n\n var deg2rad = Math.PI / 180;\n\n function Hcl(h, c, l) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n }\n\n var ____prototype = Hcl.prototype = new Color;\n\n ____prototype.brighter = function(k) {\n return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k));\n };\n\n ____prototype.darker = function(k) {\n return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k));\n };\n\n ____prototype.rgb = function() {\n return lab(this).rgb();\n };\n\n var lab = function(l, a, b) {\n if (arguments.length === 1) {\n if (l instanceof Lab) {\n b = l.b;\n a = l.a;\n l = l.l;\n } else if (l instanceof Hcl) {\n var h = l.h * deg2rad;\n b = Math.sin(h) * l.c;\n a = Math.cos(h) * l.c;\n l = l.l;\n } else {\n if (!(l instanceof Rgb)) l = rgb(l);\n var r = rgb2xyz(l.r),\n g = rgb2xyz(l.g),\n b = rgb2xyz(l.b),\n x = xyz2lab((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / Xn),\n y = xyz2lab((0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / Yn),\n z = xyz2lab((0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / Zn);\n b = 200 * (y - z);\n a = 500 * (x - y);\n l = 116 * y - 16;\n }\n }\n return new Lab(l, a, b);\n }\n lab.prototype = Lab.prototype;\n var rad2deg = 180 / Math.PI;\n\n var hcl = function(h, c, l) {\n if (arguments.length === 1) {\n if (h instanceof Hcl) {\n l = h.l;\n c = h.c;\n h = h.h;\n } else {\n if (!(h instanceof Lab)) h = lab(h);\n l = h.l;\n c = Math.sqrt(h.a * h.a + h.b * h.b);\n h = Math.atan2(h.b, h.a) * rad2deg;\n if (h < 0) h += 360;\n }\n }\n return new Hcl(h, c, l);\n }\n hcl.prototype = Hcl.prototype;\n\n function Cubehelix(h, s, l) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n }\n\n var prototype = Cubehelix.prototype = new Color;\n\n prototype.brighter = function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Cubehelix(this.h, this.s, this.l * k);\n };\n\n prototype.darker = function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Cubehelix(this.h, this.s, this.l * k);\n };\n\n var gamma = 1, // Default gamma. TODO Customize.\n A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\n var cubehelix = function(h, s, l) {\n if (arguments.length === 1) {\n if (h instanceof Cubehelix) {\n l = h.l;\n s = h.s;\n h = h.h;\n } else {\n if (!(h instanceof Rgb)) h = rgb(h);\n var r = h.r / 255, g = h.g / 255, b = h.b / 255;\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB);\n var bl = b - l, k = (E * (g - l) - C * bl) / D, lgamma = Math.pow(l, gamma);\n s = Math.sqrt(k * k + bl * bl) / (E * lgamma * (1 - lgamma)); // NaN if lgamma=0 or lgamma=1\n h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n if (h < 0) h += 360;\n }\n }\n return new Cubehelix(h, s, l);\n }\n\n prototype.rgb = function() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n l = Math.pow(this.l, gamma),\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new Rgb(\n 255 * (l + a * (A * cosh + B * sinh)),\n 255 * (l + a * (C * cosh + D * sinh)),\n 255 * (l + a * (E * cosh))\n );\n };\n cubehelix.prototype = Cubehelix.prototype;\n\n var interpolateCubehelixLong = function(a, b) {\n a = cubehelix(a);\n b = cubehelix(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : b.h - ah,\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n var deltaHue = function(h, h0) {\n var delta = (h - h0) % 360;\n return delta + (delta > 180 ? -360 : delta < -180 ? 360 : 0);\n }\n\n var interpolateCubehelix = function(a, b) {\n a = cubehelix(a);\n b = cubehelix(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : deltaHue(b.h, ah),\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateHclLong = function(a, b) {\n a = hcl(a);\n b = hcl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n ac = isNaN(a.c) ? b.c : a.c,\n al = a.l,\n bh = isNaN(b.h) ? 0 : b.h - ah,\n bc = isNaN(b.c) ? 0 : b.c - ac,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.c = ac + bc * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateHcl = function(a, b) {\n a = hcl(a);\n b = hcl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n ac = isNaN(a.c) ? b.c : a.c,\n al = a.l,\n bh = isNaN(b.h) ? 0 : deltaHue(b.h, ah),\n bc = isNaN(b.c) ? 0 : b.c - ac,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.c = ac + bc * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateLab = function(a, b) {\n a = lab(a);\n b = lab(b);\n var al = a.l,\n aa = a.a,\n ab = a.b,\n bl = b.l - al,\n ba = b.a - aa,\n bb = b.b - ab;\n return function(t) {\n a.l = al + bl * t;\n a.a = aa + ba * t;\n a.b = ab + bb * t;\n return a + \"\";\n };\n }\n\n var interpolateHslLong = function(a, b) {\n a = hsl(a);\n b = hsl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : b.h - ah,\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateHsl = function(a, b) {\n a = hsl(a);\n b = hsl(b);\n var ah = isNaN(a.h) ? b.h : a.h,\n as = isNaN(a.s) ? b.s : a.s,\n al = a.l,\n bh = isNaN(b.h) ? 0 : deltaHue(b.h, ah),\n bs = isNaN(b.s) ? 0 : b.s - as,\n bl = b.l - al;\n return function(t) {\n a.h = ah + bh * t;\n a.s = as + bs * t;\n a.l = al + bl * t;\n return a + \"\";\n };\n }\n\n var interpolateRgb = function(a, b) {\n a = rgb(a);\n b = rgb(b);\n var ar = a.r,\n ag = a.g,\n ab = a.b,\n br = b.r - ar,\n bg = b.g - ag,\n bb = b.b - ab;\n return function(t) {\n return format(Math.round(ar + br * t), Math.round(ag + bg * t), Math.round(ab + bb * t));\n };\n }\n\n exports.color = color;\n exports.rgb = rgb;\n exports.hsl = hsl;\n exports.lab = lab;\n exports.hcl = hcl;\n exports.cubehelix = cubehelix;\n exports.interpolateRgb = interpolateRgb;\n exports.interpolateHsl = interpolateHsl;\n exports.interpolateHslLong = interpolateHslLong;\n exports.interpolateLab = interpolateLab;\n exports.interpolateHcl = interpolateHcl;\n exports.interpolateHclLong = interpolateHclLong;\n exports.interpolateCubehelix = interpolateCubehelix;\n exports.interpolateCubehelixLong = interpolateCubehelixLong;\n\n}));","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n factory((global.format = {}));\n}(this, function (exports) { 'use strict';\n\n var prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\n\n // Computes the decimal coefficient and exponent of the specified number x with\n // significant digits p, where x is positive and p is in [1, 21] or undefined.\n // For example, formatDecimal(1.23) returns [\"123\", 0].\n function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }\n\n function exponent(x) {\n return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;\n }\n\n var prefixExponent;\n\n function formatPrefixAuto(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimal(x, p + i - 1)[0]; // less than 1y!\n }\n\n function formatRounded(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n }\n\n function formatDefault(x, p) {\n x = x.toPrecision(p);\n\n out: for (var n = x.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (x[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n case \"e\": break out;\n default: if (i0 > 0) i0 = 0; break;\n }\n }\n\n return i0 > 0 ? x.slice(0, i0) + x.slice(i1 + 1) : x;\n }\n\n var formatTypes = {\n \"\": formatDefault,\n \"%\": function(x, p) { return (x * 100).toFixed(p); },\n \"b\": function(x) { return Math.round(x).toString(2); },\n \"c\": function(x) { return x + \"\"; },\n \"d\": function(x) { return Math.round(x).toString(10); },\n \"e\": function(x, p) { return x.toExponential(p); },\n \"f\": function(x, p) { return x.toFixed(p); },\n \"g\": function(x, p) { return x.toPrecision(p); },\n \"o\": function(x) { return Math.round(x).toString(8); },\n \"p\": function(x, p) { return formatRounded(x * 100, p); },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n \"x\": function(x) { return Math.round(x).toString(16); }\n };\n\n\n // [[fill]align][sign][symbol][0][width][,][.precision][type]\n var re = /^(?:(.)?([<>=^]))?([+\\-\\( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?([a-z%])?$/i;\n\n function FormatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n\n var match,\n fill = match[1] || \" \",\n align = match[2] || \">\",\n sign = match[3] || \"-\",\n symbol = match[4] || \"\",\n zero = !!match[5],\n width = match[6] && +match[6],\n comma = !!match[7],\n precision = match[8] && +match[8].slice(1),\n type = match[9] || \"\";\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // Map invalid types to the default format.\n else if (!formatTypes[type]) type = \"\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n this.fill = fill;\n this.align = align;\n this.sign = sign;\n this.symbol = symbol;\n this.zero = zero;\n this.width = width;\n this.comma = comma;\n this.precision = precision;\n this.type = type;\n }\n\n FormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width == null ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision == null ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + this.type;\n };\n\n function formatSpecifier(specifier) {\n return new FormatSpecifier(specifier);\n }\n\n function identity(x) {\n return x;\n }\n\n function formatGroup(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n }\n\n function localeFormat(locale) {\n var group = locale.grouping && locale.thousands ? formatGroup(locale.grouping, locale.thousands) : identity,\n currency = locale.currency,\n decimal = locale.decimal;\n\n function format(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n type = specifier.type;\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currency[0] : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currency[1] : /[%p]/.test(type) ? \"%\" : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = !type || /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision == null ? (type ? 6 : 12)\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n return function(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Convert negative to positive, and compute the prefix.\n // Note that -0 is not less than 0, but 1 / -0 is!\n var valueNegative = (value < 0 || 1 / value < 0) && (value *= -1, true);\n\n // Perform the initial formatting.\n value = formatType(value, precision);\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : \"-\") : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = valueSuffix + (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n var i = -1, n = value.length, c;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": return valuePrefix + value + valueSuffix + padding;\n case \"=\": return valuePrefix + padding + value + valueSuffix;\n case \"^\": return padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);\n }\n return padding + valuePrefix + value + valueSuffix;\n };\n }\n\n function formatPrefix(specifier, value) {\n var f = format((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: format,\n formatPrefix: formatPrefix\n };\n }\n\n var locale = localeFormat({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n });\n\n exports.format = locale.format;\n exports.formatPrefix = locale.formatPrefix;\n\n function precisionRound(step, max) {\n return Math.max(0, exponent(Math.abs(max)) - exponent(Math.abs(step))) + 1;\n }\n\n function precisionPrefix(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n }\n\n function precisionFixed(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n }\n\n exports.formatSpecifier = formatSpecifier;\n exports.localeFormat = localeFormat;\n exports.precisionFixed = precisionFixed;\n exports.precisionPrefix = precisionPrefix;\n exports.precisionRound = precisionRound;\n\n}));","if (typeof Map === \"undefined\") {\n Map = function() { this.clear(); };\n Map.prototype = {\n set: function(k, v) { this._[k] = v; return this; },\n get: function(k) { return this._[k]; },\n has: function(k) { return k in this._; },\n delete: function(k) { return k in this._ && delete this._[k]; },\n clear: function() { this._ = Object.create(null); },\n get size() { var n = 0; for (var k in this._) ++n; return n; },\n forEach: function(c) { for (var k in this._) c(this._[k], k, this); }\n };\n} else (function() {\n var m = new Map;\n if (m.set(0, 0) !== m) {\n m = m.set;\n Map.prototype.set = function() { m.apply(this, arguments); return this; };\n }\n})();\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n factory((global.timeFormat = {}));\n}(this, function (exports) { 'use strict';\n\n function utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n }\n\n function localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n }\n\n var pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"};\n\n function newYear(y) {\n return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0};\n }\n\n var percentRe = /^%/;\n\n function parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n }\n\n function parseZone(d, string, i) {\n return /^[+-]\\d{4}$/.test(string = string.slice(i, i + 5))\n ? (d.Z = -string, i + 5) // sign differs from getTimezoneOffset!\n : -1;\n }\n\n var numberRe = /^\\s*\\d+/;\n\n function parseWeekdayNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n }\n\n function parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n }\n\n function parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n }\n\n function parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n }\n\n function parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n }\n\n function parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n }\n\n function parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n }\n\n function parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n }\n\n function parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n }\n\n function parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n }\n\n function formatLiteralPercent() {\n return \"%\";\n }\n\n function formatUTCZone() {\n return \"+0000\";\n }\n\n function pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n }\n\n function formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n }\n\n function formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n }\n\n var t1 = new Date;\n\n var t0 = new Date;\n\n function newInterval(floori, offseti, count) {\n\n function interval(date) {\n return floori(date = new Date(+date)), date;\n }\n\n interval.floor = interval;\n\n interval.round = function(date) {\n var d0 = new Date(+date),\n d1 = new Date(date - 1);\n floori(d0), floori(d1), offseti(d1, 1);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), date;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [];\n start = new Date(start - 1);\n stop = new Date(+stop);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n offseti(start, 1), floori(start);\n if (start < stop) range.push(new Date(+start));\n while (offseti(start, step), floori(start), start < stop) range.push(new Date(+start));\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n while (--step >= 0) while (offseti(date, 1), !test(date));\n });\n };\n\n if (count) interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n return interval;\n }\n\n var utcYear = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCMonth(0, 1);\n }, function(date, offset) {\n date.setUTCFullYear(date.getUTCFullYear() + offset);\n }, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n });\n\n function utcWeekday(i) {\n return newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n }, function(date, offset) {\n date.setUTCDate(date.getUTCDate() + offset * 7);\n }, function(start, end) {\n return (end - start) / 6048e5;\n });\n }\n\n var utcMonday = utcWeekday(1);\n\n function formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d), d), p, 2);\n }\n\n function formatUTCWeekdayNumber(d) {\n return d.getUTCDay();\n }\n\n var utcSunday = utcWeekday(0);\n\n function formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d), d), p, 2);\n }\n\n function formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n }\n\n function formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n }\n\n function formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n }\n\n function formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n }\n\n var utcDay = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, offset) {\n date.setUTCDate(date.getUTCDate() + offset);\n }, function(start, end) {\n return (end - start) / 864e5;\n });\n\n function formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n }\n\n function formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n }\n\n function formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n }\n\n function formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n }\n\n function formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n }\n\n function formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n }\n\n function formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n }\n\n var year = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setMonth(0, 1);\n }, function(date, offset) {\n date.setFullYear(date.getFullYear() + offset);\n }, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n });\n\n function weekday(i) {\n return newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n }, function(date, offset) {\n date.setDate(date.getDate() + offset * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 6048e5;\n });\n }\n\n var monday = weekday(1);\n\n function formatWeekNumberMonday(d, p) {\n return pad(monday.count(year(d), d), p, 2);\n }\n\n function formatWeekdayNumber(d) {\n return d.getDay();\n }\n\n var sunday = weekday(0);\n\n function formatWeekNumberSunday(d, p) {\n return pad(sunday.count(year(d), d), p, 2);\n }\n\n function formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n }\n\n function formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n }\n\n function formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n }\n\n function formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n }\n\n var day = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n }, function(date, offset) {\n date.setDate(date.getDate() + offset);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 864e5;\n });\n\n function formatDayOfYear(d, p) {\n return pad(1 + day.count(year(d), d), p, 3);\n }\n\n function formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n }\n\n function formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n }\n\n function formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n }\n\n function formatLookup(names) {\n var map = new Map, i = -1, n = names.length;\n while (++i < n) map.set(names[i].toLowerCase(), i);\n return map;\n }\n\n var requoteRe = /[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g;\n\n function requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n }\n\n function formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n }\n\n function localeFormat(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"S\": formatSeconds,\n \"U\": formatWeekNumberSunday,\n \"w\": formatWeekdayNumber,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"S\": formatUTCSeconds,\n \"U\": formatUTCWeekNumberSunday,\n \"w\": formatUTCWeekdayNumber,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"S\": parseSeconds,\n \"U\": parseWeekNumberSunday,\n \"w\": parseWeekdayNumber,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n if (format = formats[c]) c = format(date, pad == null ? (c === \"e\" ? \" \" : \"0\") : pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, newDate) {\n return function(string) {\n var d = newYear(1900),\n i = parseSpecifier(d, specifier, string, 0);\n if (i != string.length) return null;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n if (\"w\" in d && (\"W\" in d || \"U\" in d)) {\n var day = utcDate(newYear(d.y)).getUTCDay();\n if (\"W\" in d) d.U = d.W, d.w = (d.w + 6) % 7, --day;\n d.m = 0;\n d.d = d.w + d.U * 7 - (day + 6) % 7;\n }\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n if (\"w\" in d && (\"W\" in d || \"U\" in d)) {\n var day = newDate(newYear(d.y)).getDay();\n if (\"W\" in d) d.U = d.W, d.w = (d.w + 6) % 7, --day;\n d.m = 0;\n d.d = d.w + d.U * 7 - (day + 6) % 7;\n }\n return newDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function parsePeriod(d, string, i) {\n var n = periodLookup.get(string.slice(i, i += 2).toLowerCase());\n return n == null ? -1 : (d.p = n, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.parse = newParse(specifier, localDate);\n f.toString = function() { return specifier; };\n return f;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.parse = newParse(specifier, utcDate);\n f.toString = function() { return specifier; };\n return f;\n }\n };\n }\n\n var locale = localeFormat({\n dateTime: \"%a %b %e %X %Y\",\n date: \"%m/%d/%Y\",\n time: \"%H:%M:%S\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n });\n\n exports.format = locale.format;\n exports.utcFormat = locale.utcFormat;\n\n var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\n function formatIsoNative(date) {\n return date.toISOString();\n }\n\n formatIsoNative.parse = function(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n };\n\n formatIsoNative.toString = function() {\n return isoSpecifier;\n };\n\n var formatIso = Date.prototype.toISOString && +new Date(\"2000-01-01T00:00:00.000Z\")\n ? formatIsoNative\n : locale.utcFormat(isoSpecifier);\n\n var isoFormat = formatIso;\n\n exports.isoFormat = isoFormat;\n exports.localeFormat = localeFormat;\n\n}));","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n factory((global.time = {}));\n}(this, function (exports) { 'use strict';\n\n var t1 = new Date;\n\n var t0 = new Date;\n\n function newInterval(floori, offseti, count) {\n\n function interval(date) {\n return floori(date = new Date(+date)), date;\n }\n\n interval.floor = interval;\n\n interval.round = function(date) {\n var d0 = new Date(+date),\n d1 = new Date(date - 1);\n floori(d0), floori(d1), offseti(d1, 1);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), date;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [];\n start = new Date(start - 1);\n stop = new Date(+stop);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n offseti(start, 1), floori(start);\n if (start < stop) range.push(new Date(+start));\n while (offseti(start, step), floori(start), start < stop) range.push(new Date(+start));\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n while (--step >= 0) while (offseti(date, 1), !test(date));\n });\n };\n\n if (count) interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n return interval;\n }\n\n var second = newInterval(function(date) {\n date.setMilliseconds(0);\n }, function(date, step) {\n date.setTime(+date + step * 1e3);\n }, function(start, end) {\n return (end - start) / 1e3;\n });\n\n exports.seconds = second.range;\n\n var minute = newInterval(function(date) {\n date.setSeconds(0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 6e4);\n }, function(start, end) {\n return (end - start) / 6e4;\n });\n\n exports.minutes = minute.range;\n\n var hour = newInterval(function(date) {\n date.setMinutes(0, 0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 36e5);\n }, function(start, end) {\n return (end - start) / 36e5;\n });\n\n exports.hours = hour.range;\n\n var day = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 864e5;\n });\n\n exports.days = day.range;\n\n function weekday(i) {\n return newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * 6e4) / 6048e5;\n });\n }\n\n exports.sunday = weekday(0);\n\n exports.sundays = exports.sunday.range;\n\n exports.monday = weekday(1);\n\n exports.mondays = exports.monday.range;\n\n exports.tuesday = weekday(2);\n\n exports.tuesdays = exports.tuesday.range;\n\n exports.wednesday = weekday(3);\n\n exports.wednesdays = exports.wednesday.range;\n\n exports.thursday = weekday(4);\n\n exports.thursdays = exports.thursday.range;\n\n exports.friday = weekday(5);\n\n exports.fridays = exports.friday.range;\n\n exports.saturday = weekday(6);\n\n exports.saturdays = exports.saturday.range;\n\n var week = exports.sunday;\n\n exports.weeks = week.range;\n\n var month = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setDate(1);\n }, function(date, step) {\n date.setMonth(date.getMonth() + step);\n }, function(start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n });\n\n exports.months = month.range;\n\n var year = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n date.setMonth(0, 1);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n }, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n });\n\n exports.years = year.range;\n\n var utcSecond = newInterval(function(date) {\n date.setUTCMilliseconds(0);\n }, function(date, step) {\n date.setTime(+date + step * 1e3);\n }, function(start, end) {\n return (end - start) / 1e3;\n });\n\n exports.utcSeconds = utcSecond.range;\n\n var utcMinute = newInterval(function(date) {\n date.setUTCSeconds(0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 6e4);\n }, function(start, end) {\n return (end - start) / 6e4;\n });\n\n exports.utcMinutes = utcMinute.range;\n\n var utcHour = newInterval(function(date) {\n date.setUTCMinutes(0, 0, 0);\n }, function(date, step) {\n date.setTime(+date + step * 36e5);\n }, function(start, end) {\n return (end - start) / 36e5;\n });\n\n exports.utcHours = utcHour.range;\n\n var utcDay = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n }, function(start, end) {\n return (end - start) / 864e5;\n });\n\n exports.utcDays = utcDay.range;\n\n function utcWeekday(i) {\n return newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / 6048e5;\n });\n }\n\n exports.utcSunday = utcWeekday(0);\n\n exports.utcSundays = exports.utcSunday.range;\n\n exports.utcMonday = utcWeekday(1);\n\n exports.utcMondays = exports.utcMonday.range;\n\n exports.utcTuesday = utcWeekday(2);\n\n exports.utcTuesdays = exports.utcTuesday.range;\n\n exports.utcWednesday = utcWeekday(3);\n\n exports.utcWednesdays = exports.utcWednesday.range;\n\n exports.utcThursday = utcWeekday(4);\n\n exports.utcThursdays = exports.utcThursday.range;\n\n exports.utcFriday = utcWeekday(5);\n\n exports.utcFridays = exports.utcFriday.range;\n\n exports.utcSaturday = utcWeekday(6);\n\n exports.utcSaturdays = exports.utcSaturday.range;\n\n var utcWeek = exports.utcSunday;\n\n exports.utcWeeks = utcWeek.range;\n\n var utcMonth = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCDate(1);\n }, function(date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n }, function(start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n });\n\n exports.utcMonths = utcMonth.range;\n\n var utcYear = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n date.setUTCMonth(0, 1);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n }, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n });\n\n exports.utcYears = utcYear.range;\n\n exports.interval = newInterval;\n exports.second = second;\n exports.minute = minute;\n exports.hour = hour;\n exports.day = day;\n exports.week = week;\n exports.month = month;\n exports.year = year;\n exports.utcSecond = utcSecond;\n exports.utcMinute = utcMinute;\n exports.utcHour = utcHour;\n exports.utcDay = utcDay;\n exports.utcWeek = utcWeek;\n exports.utcMonth = utcMonth;\n exports.utcYear = utcYear;\n\n}));","var util = require('../util'),\n time = require('../time'),\n EPSILON = 1e-15;\n\nfunction bins(opt) {\n if (!opt) { throw Error(\"Missing binning options.\"); }\n\n // determine range\n var maxb = opt.maxbins || 15,\n base = opt.base || 10,\n logb = Math.log(base),\n div = opt.div || [5, 2], \n min = opt.min,\n max = opt.max,\n span = max - min,\n step, level, minstep, precision, v, i, eps;\n\n if (opt.step) {\n // if step size is explicitly given, use that\n step = opt.step;\n } else if (opt.steps) {\n // if provided, limit choice to acceptable step sizes\n step = opt.steps[Math.min(\n opt.steps.length - 1,\n bisect(opt.steps, span/maxb, 0, opt.steps.length)\n )];\n } else {\n // else use span to determine step size\n level = Math.ceil(Math.log(maxb) / logb);\n minstep = opt.minstep || 0;\n step = Math.max(\n minstep,\n Math.pow(base, Math.round(Math.log(span) / logb) - level)\n );\n \n // increase step size if too many bins\n do { step *= base; } while (Math.ceil(span/step) > maxb);\n\n // decrease step size if allowed\n for (i=0; i= minstep && span / v <= maxb) step = v;\n }\n }\n\n // update precision, min and max\n v = Math.log(step);\n precision = v >= 0 ? 0 : ~~(-v / logb) + 1;\n eps = Math.pow(base, -precision - 1);\n min = Math.min(min, Math.floor(min / step + eps) * step);\n max = Math.ceil(max / step) * step;\n\n return {\n start: min,\n stop: max,\n step: step,\n unit: {precision: precision},\n value: value,\n index: index\n };\n}\n\nfunction bisect(a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (util.cmp(a[mid], x) < 0) { lo = mid + 1; }\n else { hi = mid; }\n }\n return lo;\n}\n\nfunction value(v) {\n return this.step * Math.floor(v / this.step + EPSILON);\n}\n\nfunction index(v) {\n return Math.floor((v - this.start) / this.step + EPSILON);\n}\n\nfunction date_value(v) {\n return this.unit.date(value.call(this, v));\n}\n\nfunction date_index(v) {\n return index.call(this, this.unit.unit(v));\n}\n\nbins.date = function(opt) {\n if (!opt) { throw Error(\"Missing date binning options.\"); }\n\n // find time step, then bin\n var units = opt.utc ? time.utc : time,\n dmin = opt.min,\n dmax = opt.max,\n maxb = opt.maxbins || 20,\n minb = opt.minbins || 4,\n span = (+dmax) - (+dmin),\n unit = opt.unit ? units[opt.unit] : units.find(span, minb, maxb),\n spec = bins({\n min: unit.min != null ? unit.min : unit.unit(dmin),\n max: unit.max != null ? unit.max : unit.unit(dmax),\n maxbins: maxb,\n minstep: unit.minstep,\n steps: unit.step\n });\n\n spec.unit = unit;\n spec.index = date_index;\n if (!opt.raw) spec.value = date_value;\n return spec;\n};\n\nmodule.exports = bins;\n","var gen = module.exports = {};\n\ngen.repeat = function(val, n) {\n var a = Array(n), i;\n for (i=0; i stop) range.push(j);\n else while ((j = start + step * ++i) < stop) range.push(j);\n return range;\n};\n\ngen.random = {};\n\ngen.random.uniform = function(min, max) {\n if (max === undefined) {\n max = min === undefined ? 1 : min;\n min = 0;\n }\n var d = max - min;\n var f = function() {\n return min + d * Math.random();\n };\n f.samples = function(n) { return gen.zeros(n).map(f); };\n return f;\n};\n\ngen.random.integer = function(a, b) {\n if (b === undefined) {\n b = a;\n a = 0;\n }\n var d = b - a;\n var f = function() {\n return a + Math.floor(d * Math.random());\n };\n f.samples = function(n) { return gen.zeros(n).map(f); };\n return f;\n};\n\ngen.random.normal = function(mean, stdev) {\n mean = mean || 0;\n stdev = stdev || 1;\n var next;\n var f = function() {\n var x = 0, y = 0, rds, c;\n if (next !== undefined) {\n x = next;\n next = undefined;\n return x;\n }\n do {\n x = Math.random()*2-1;\n y = Math.random()*2-1;\n rds = x*x + y*y;\n } while (rds === 0 || rds > 1);\n c = Math.sqrt(-2*Math.log(rds)/rds); // Box-Muller transform\n next = mean + y*c*stdev;\n return mean + x*c*stdev;\n };\n f.samples = function(n) { return gen.zeros(n).map(f); };\n return f;\n};","var util = require('../util');\n\nvar TYPES = '__types__';\n\nvar PARSERS = {\n boolean: util.boolean,\n integer: util.number,\n number: util.number,\n date: util.date,\n string: function(x) { return x==='' ? null : x; }\n};\n\nvar TESTS = {\n boolean: function(x) { return x==='true' || x==='false' || util.isBoolean(x); },\n integer: function(x) { return TESTS.number(x) && (x=+x) === ~~x; },\n number: function(x) { return !isNaN(+x) && !util.isDate(x); },\n date: function(x) { return !isNaN(Date.parse(x)); }\n};\n\nfunction annotation(data, types) {\n if (!types) return data && data[TYPES] || null;\n data[TYPES] = types;\n}\n\nfunction type(values, f) {\n f = util.$(f);\n var v, i, n;\n\n // if data array has type annotations, use them\n if (values[TYPES]) {\n v = f(values[TYPES]);\n if (util.isString(v)) return v;\n }\n\n for (i=0, n=values.length; !util.isValid(v) && i b) b = v;\n }\n }\n return [a, b];\n};\n\n// Find the integer indices of the minimum and maximum values.\nstats.extent.index = function(values, f) {\n f = util.$(f);\n var x = -1, y = -1, a, b, v, i, n = values.length;\n for (i=0; i b) { b = v; y = i; }\n }\n }\n return [x, y];\n};\n\n// Compute the dot product of two arrays of numbers.\nstats.dot = function(values, a, b) {\n var sum = 0, i, v;\n if (!b) {\n if (values.length !== a.length) {\n throw Error('Array lengths must match.');\n }\n for (i=0; i -1 && p !== v) {\n mu = 1 + (i-1 + tie) / 2;\n for (; tie -1) {\n mu = 1 + (n-1 + tie) / 2;\n for (; tie max) max = x;\n delta = x - mean;\n mean = mean + delta / (++valid);\n M2 = M2 + delta * (x - mean);\n vals.push(x);\n }\n }\n M2 = M2 / (valid - 1);\n sd = Math.sqrt(M2);\n\n // sort values for median and iqr\n vals.sort(util.cmp);\n\n return {\n type: type(values, f),\n unique: u,\n count: values.length,\n valid: valid,\n missing: missing,\n distinct: distinct,\n min: min,\n max: max,\n mean: mean,\n stdev: sd,\n median: (v = stats.quantile(vals, 0.5)),\n q1: stats.quantile(vals, 0.25),\n q3: stats.quantile(vals, 0.75),\n modeskew: sd === 0 ? 0 : (mean - v) / sd\n };\n};\n\n// Compute profiles for all variables in a data set.\nstats.summary = function(data, fields) {\n fields = fields || util.keys(data[0]);\n var s = fields.map(function(f) {\n var p = stats.profile(data, util.$(f));\n return (p.field = f, p);\n });\n return (s.__summary__ = true, s);\n};\n\nmodule.exports = stats;","var d3_time = require('d3-time');\n\nvar tempDate = new Date(),\n baseDate = new Date(0, 0, 1).setFullYear(0), // Jan 1, 0 AD\n utcBaseDate = new Date(Date.UTC(0, 0, 1)).setUTCFullYear(0);\n\nfunction date(d) {\n return (tempDate.setTime(+d), tempDate);\n}\n\n// create a time unit entry\nfunction entry(type, date, unit, step, min, max) {\n var e = {\n type: type,\n date: date,\n unit: unit\n };\n if (step) {\n e.step = step;\n } else {\n e.minstep = 1;\n }\n if (min != null) e.min = min;\n if (max != null) e.max = max;\n return e;\n}\n\nfunction create(type, unit, base, step, min, max) {\n return entry(type,\n function(d) { return unit.offset(base, d); },\n function(d) { return unit.count(base, d); },\n step, min, max);\n}\n\nvar locale = [\n create('second', d3_time.second, baseDate),\n create('minute', d3_time.minute, baseDate),\n create('hour', d3_time.hour, baseDate),\n create('day', d3_time.day, baseDate, [1, 7]),\n create('month', d3_time.month, baseDate, [1, 3, 6]),\n create('year', d3_time.year, baseDate),\n\n // periodic units\n entry('seconds',\n function(d) { return new Date(1970, 0, 1, 0, 0, d); },\n function(d) { return date(d).getSeconds(); },\n null, 0, 59\n ),\n entry('minutes',\n function(d) { return new Date(1970, 0, 1, 0, d); },\n function(d) { return date(d).getMinutes(); },\n null, 0, 59\n ),\n entry('hours',\n function(d) { return new Date(1970, 0, 1, d); },\n function(d) { return date(d).getHours(); },\n null, 0, 23\n ),\n entry('weekdays',\n function(d) { return new Date(1970, 0, 4+d); },\n function(d) { return date(d).getDay(); },\n [1], 0, 6\n ),\n entry('dates',\n function(d) { return new Date(1970, 0, d); },\n function(d) { return date(d).getDate(); },\n [1], 1, 31\n ),\n entry('months',\n function(d) { return new Date(1970, d % 12, 1); },\n function(d) { return date(d).getMonth(); },\n [1], 0, 11\n )\n];\n\nvar utc = [\n create('second', d3_time.utcSecond, utcBaseDate),\n create('minute', d3_time.utcMinute, utcBaseDate),\n create('hour', d3_time.utcHour, utcBaseDate),\n create('day', d3_time.utcDay, utcBaseDate, [1, 7]),\n create('month', d3_time.utcMonth, utcBaseDate, [1, 3, 6]),\n create('year', d3_time.utcYear, utcBaseDate),\n\n // periodic units\n entry('seconds',\n function(d) { return new Date(Date.UTC(1970, 0, 1, 0, 0, d)); },\n function(d) { return date(d).getUTCSeconds(); },\n null, 0, 59\n ),\n entry('minutes',\n function(d) { return new Date(Date.UTC(1970, 0, 1, 0, d)); },\n function(d) { return date(d).getUTCMinutes(); },\n null, 0, 59\n ),\n entry('hours',\n function(d) { return new Date(Date.UTC(1970, 0, 1, d)); },\n function(d) { return date(d).getUTCHours(); },\n null, 0, 23\n ),\n entry('weekdays',\n function(d) { return new Date(Date.UTC(1970, 0, 4+d)); },\n function(d) { return date(d).getUTCDay(); },\n [1], 0, 6\n ),\n entry('dates',\n function(d) { return new Date(Date.UTC(1970, 0, d)); },\n function(d) { return date(d).getUTCDate(); },\n [1], 1, 31\n ),\n entry('months',\n function(d) { return new Date(Date.UTC(1970, d % 12, 1)); },\n function(d) { return date(d).getUTCMonth(); },\n [1], 0, 11\n )\n];\n\nvar STEPS = [\n [31536e6, 5], // 1-year\n [7776e6, 4], // 3-month\n [2592e6, 4], // 1-month\n [12096e5, 3], // 2-week\n [6048e5, 3], // 1-week\n [1728e5, 3], // 2-day\n [864e5, 3], // 1-day\n [432e5, 2], // 12-hour\n [216e5, 2], // 6-hour\n [108e5, 2], // 3-hour\n [36e5, 2], // 1-hour\n [18e5, 1], // 30-minute\n [9e5, 1], // 15-minute\n [3e5, 1], // 5-minute\n [6e4, 1], // 1-minute\n [3e4, 0], // 30-second\n [15e3, 0], // 15-second\n [5e3, 0], // 5-second\n [1e3, 0] // 1-second\n];\n\nfunction find(units, span, minb, maxb) {\n var step = STEPS[0], i, n, bins;\n\n for (i=1, n=STEPS.length; i step[0]) {\n bins = span / step[0];\n if (bins > maxb) {\n return units[STEPS[i-1][1]];\n }\n if (bins >= minb) {\n return units[step[1]];\n }\n }\n }\n return units[STEPS[n-1][1]];\n}\n\nfunction toUnitMap(units) {\n var map = {}, i, n;\n for (i=0, n=units.length; i 1 ?\n function(x) { return s.reduce(function(x,f) { return x[f]; }, x); } :\n function(x) { return x[f]; }\n );\n};\n\n// short-cut for accessor\nu.$ = u.accessor;\n\nu.mutator = function(f) {\n var s;\n return u.isString(f) && (s=u.field(f)).length > 1 ?\n function(x, v) {\n for (var i=0; i y) return sign[i];\n }\n return 0;\n };\n};\n\nu.cmp = function(a, b) {\n if (a < b) {\n return -1;\n } else if (a > b) {\n return 1;\n } else if (a >= b) {\n return 0;\n } else if (a === null) {\n return -1;\n } else if (b === null) {\n return 1;\n }\n return NaN;\n};\n\nu.numcmp = function(a, b) { return a - b; };\n\nu.stablesort = function(array, sortBy, keyFn) {\n var indices = array.reduce(function(idx, v, i) {\n return (idx[keyFn(v)] = i, idx);\n }, {});\n\n array.sort(function(a, b) {\n var sa = sortBy(a),\n sb = sortBy(b);\n return sa < sb ? -1 : sa > sb ? 1\n : (indices[keyFn(a)] - indices[keyFn(b)]);\n });\n\n return array;\n};\n\n\n// string functions\n\nu.pad = function(s, length, pos, padchar) {\n padchar = padchar || \" \";\n var d = length - s.length;\n if (d <= 0) return s;\n switch (pos) {\n case 'left':\n return strrep(d, padchar) + s;\n case 'middle':\n case 'center':\n return strrep(Math.floor(d/2), padchar) +\n s + strrep(Math.ceil(d/2), padchar);\n default:\n return s + strrep(d, padchar);\n }\n};\n\nfunction strrep(n, str) {\n var s = \"\", i;\n for (i=0; i this.config('maxSmallNumber') ?\n 'largeNumberFormat': 'smallNumberFormat';\n return this.config(formatConfig);\n };\n\n proto.sort = function(et, stats) {\n var sort = this._enc[et].sort,\n enc = this._enc,\n isTypes = vlfield.isTypes;\n\n if ((!sort || sort.length===0) &&\n // FIXME\n Encoding.toggleSort.support({encoding:this._enc}, stats, true) && //HACK\n this.config('toggleSort') === Q\n ) {\n var qField = isTypes(enc.x, [N, O]) ? enc.y : enc.x;\n\n if (isTypes(enc[et], [N, O])) {\n sort = [{\n name: qField.name,\n aggregate: qField.aggregate,\n type: qField.type,\n reverse: true\n }];\n }\n }\n\n return sort;\n };\n\n proto.map = function(f) {\n return vlenc.map(this._enc, f);\n };\n\n proto.reduce = function(f, init) {\n return vlenc.reduce(this._enc, f, init);\n };\n\n proto.forEach = function(f) {\n return vlenc.forEach(this._enc, f);\n };\n\n proto.type = function(et) {\n return this.has(et) ? this._enc[et].type : null;\n };\n\n proto.isType = function(et, type) {\n var field = this.field(et);\n return field && vlfield.isType(field, type);\n };\n\n\n proto.isTypes = function(et, type) {\n var field = this.field(et);\n return field && vlfield.isTypes(field, type);\n };\n\n Encoding.isOrdinalScale = function(encoding, encType) {\n return vlfield.isOrdinalScale(encoding.field(encType));\n };\n\n Encoding.isDimension = function(encoding, encType) {\n return vlfield.isDimension(encoding.field(encType));\n };\n\n Encoding.isMeasure = function(encoding, encType) {\n return vlfield.isMeasure(encoding.field(encType));\n };\n\n proto.isOrdinalScale = function(encType) {\n return this.has(encType) && Encoding.isOrdinalScale(this, encType);\n };\n\n proto.isDimension = function(encType) {\n return this.has(encType) && Encoding.isDimension(this, encType);\n };\n\n proto.isMeasure = function(encType) {\n return this.has(encType) && Encoding.isMeasure(this, encType);\n };\n\n proto.isAggregate = function() {\n return vlenc.isAggregate(this._enc);\n };\n\n proto.dataTable = function() {\n return this.isAggregate() ? AGGREGATE : RAW;\n };\n\n Encoding.isAggregate = function(spec) {\n return vlenc.isAggregate(spec.encoding);\n };\n\n Encoding.alwaysNoOcclusion = function(spec) {\n // FIXME raw OxQ with # of rows = # of O\n return vlenc.isAggregate(spec.encoding);\n };\n\n Encoding.isStack = function(spec) {\n // FIXME update this once we have control for stack ...\n return (spec.marktype === 'bar' || spec.marktype === 'area') &&\n spec.encoding.color;\n };\n\n proto.isStack = function() {\n // FIXME update this once we have control for stack ...\n return (this.is('bar') || this.is('area')) && this.has('color');\n };\n\n proto.details = function() {\n var encoding = this;\n return this.reduce(function(refs, field, encType) {\n if (!field.aggregate && (encType !== X && encType !== Y)) {\n refs.push(encoding.fieldRef(encType));\n }\n return refs;\n }, []);\n };\n\n proto.facets = function() {\n var encoding = this;\n return this.reduce(function(refs, field, encType) {\n if (!field.aggregate && (encType == ROW || encType == COL)) {\n refs.push(encoding.fieldRef(encType));\n }\n return refs;\n }, []);\n };\n\n proto.cardinality = function(encType, stats) {\n return vlfield.cardinality(this.field(encType), stats, this.config('filterNull'));\n };\n\n proto.isRaw = function() {\n return !this.isAggregate();\n };\n\n proto.data = function() {\n return this._data;\n };\n\n // returns whether the encoding has values embedded\n proto.hasValues = function() {\n var vals = this.data().values;\n return vals && vals.length;\n };\n\n proto.config = function(name) {\n return this._config[name];\n };\n\n Encoding.transpose = function(spec) {\n var oldenc = spec.encoding,\n enc = util.duplicate(spec.encoding);\n enc.x = oldenc.y;\n enc.y = oldenc.x;\n enc.row = oldenc.col;\n enc.col = oldenc.row;\n spec.encoding = enc;\n return spec;\n };\n\n // FIXME: REMOVE everything below here\n\n Encoding.toggleSort = function(spec) {\n spec.config = spec.config || {};\n spec.config.toggleSort = spec.config.toggleSort === Q ? N : Q;\n return spec;\n };\n\n\n Encoding.toggleSort.direction = function(spec) {\n if (!Encoding.toggleSort.support(spec)) { return; }\n var enc = spec.encoding;\n return enc.x.type === N ? 'x' : 'y';\n };\n\n Encoding.toggleSort.mode = function(spec) {\n return spec.config.toggleSort;\n };\n\n Encoding.toggleSort.support = function(spec, stats) {\n var enc = spec.encoding,\n isTypes = vlfield.isTypes;\n\n if (vlenc.has(enc, ROW) || vlenc.has(enc, COL) ||\n !vlenc.has(enc, X) || !vlenc.has(enc, Y) ||\n !Encoding.alwaysNoOcclusion(spec, stats)) {\n return false;\n }\n\n return ( isTypes(enc.x, [N,O]) && vlfield.isMeasure(enc.y)) ? 'x' :\n ( isTypes(enc.y, [N,O]) && vlfield.isMeasure(enc.x)) ? 'y' : false;\n };\n\n Encoding.toggleFilterNullO = function(spec) {\n spec.config = spec.config || {};\n spec.config.filterNull = spec.config.filterNull || { //FIXME\n T: true,\n Q: true\n };\n spec.config.filterNull.O = !spec.config.filterNull.O;\n return spec;\n };\n\n Encoding.toggleFilterNullO.support = function(spec, stats) {\n var fields = vlenc.fields(spec.encoding);\n for (var fieldName in fields) {\n var fieldList = fields[fieldName];\n if (fieldList.containsType.O && fieldName in stats && stats[fieldName].nulls > 0) {\n return true;\n }\n }\n return false;\n };\n\n return Encoding;\n})();\n","'use strict';\n\nrequire('../globals');\n\nvar util = require('../util'),\n setter = util.setter,\n getter = util.getter,\n time = require('./time');\n\nvar axis = module.exports = {};\n\naxis.def = function(name, encoding, layout, stats, opt) {\n var isCol = name == COL,\n isRow = name == ROW,\n type = isCol ? 'x' : isRow ? 'y' : name;\n\n var def = {\n type: type,\n scale: name,\n properties: {},\n layer: encoding.field(name).axis.layer,\n orient: axis.orient(name, encoding, stats)\n };\n\n // Add axis label custom scale (for bin / time)\n def = axis.labels.scale(def, encoding, name);\n def = axis.labels.format(def, name, encoding, stats);\n def = axis.labels.angle(def, encoding, name);\n\n // for x-axis, set ticks for Q or rotate scale for ordinal scale\n if (name == X) {\n if ((encoding.isDimension(X) || encoding.isType(X, T)) &&\n !('angle' in getter(def, ['properties', 'labels']))) {\n // TODO(kanitw): Jul 19, 2015 - #506 add condition for rotation\n def = axis.labels.rotate(def);\n } else { // Q\n def.ticks = encoding.field(name).axis.ticks;\n }\n }\n\n // TitleOffset depends on labels rotation\n def.titleOffset = axis.titleOffset(encoding, layout, name);\n\n //def.offset is used in axis.grid\n if(isRow) def.offset = axis.titleOffset(encoding, layout, Y) + 20;\n // FIXME(kanitw): Jul 19, 2015 - offset for column when x is put on top\n\n def = axis.grid(def, name, encoding, layout);\n def = axis.title(def, name, encoding, layout, opt);\n\n if (isRow || isCol) def = axis.hideTicks(def);\n\n return def;\n};\n\naxis.orient = function(name, encoding, stats) {\n var orient = encoding.field(name).axis.orient;\n if (orient) return orient;\n\n if (name===COL) return 'top';\n\n // x-axis for long y - put on top\n if (name===X && encoding.has(Y) && encoding.isOrdinalScale(Y) && encoding.cardinality(Y, stats) > 30) {\n return 'top';\n }\n\n return undefined;\n};\n\naxis.grid = function(def, name, encoding, layout) {\n var cellPadding = layout.cellPadding,\n isCol = name == COL,\n isRow = name == ROW;\n\n if (encoding.axis(name).grid) {\n def.grid = true;\n\n if (isCol) {\n // set grid property -- put the lines on the right the cell\n def.properties.grid = {\n x: {\n offset: layout.cellWidth * (1+ cellPadding/2.0),\n // default value(s) -- vega doesn't do recursive merge\n scale: 'col'\n },\n y: {\n value: -layout.cellHeight * (cellPadding/2),\n },\n stroke: { value: encoding.config('cellGridColor') },\n opacity: { value: encoding.config('cellGridOpacity') }\n };\n } else if (isRow) {\n // set grid property -- put the lines on the top\n def.properties.grid = {\n y: {\n offset: -layout.cellHeight * (cellPadding/2),\n // default value(s) -- vega doesn't do recursive merge\n scale: 'row'\n },\n x: {\n value: def.offset\n },\n x2: {\n offset: def.offset + (layout.cellWidth * 0.05),\n // default value(s) -- vega doesn't do recursive merge\n group: 'mark.group.width',\n mult: 1\n },\n stroke: { value: encoding.config('cellGridColor') },\n opacity: { value: encoding.config('cellGridOpacity') }\n };\n } else {\n def.properties.grid = {\n stroke: { value: encoding.config('gridColor') },\n opacity: { value: encoding.config('gridOpacity') }\n };\n }\n }\n return def;\n};\n\naxis.hideTicks = function(def) {\n def.properties.ticks = {opacity: {value: 0}};\n def.properties.majorTicks = {opacity: {value: 0}};\n def.properties.axis = {opacity: {value: 0}};\n return def;\n};\n\naxis.title = function (def, name, encoding, layout) {\n var ax = encoding.field(name).axis;\n\n if (ax.title) {\n def.title = ax.title;\n } else {\n // if not defined, automatically determine axis title from field def\n var fieldTitle = encoding.fieldTitle(name),\n maxLength;\n\n if (ax.titleMaxLength) {\n maxLength = ax.titleMaxLength;\n } else if (name===X) {\n maxLength = layout.cellWidth / encoding.config('characterWidth');\n } else if (name === Y) {\n maxLength = layout.cellHeight / encoding.config('characterWidth');\n }\n\n def.title = maxLength ? util.truncate(fieldTitle, maxLength) : fieldTitle;\n }\n\n if (name === ROW) {\n def.properties.title = {\n angle: {value: 0},\n align: {value: 'right'},\n baseline: {value: 'middle'},\n dy: {value: (-layout.height/2) -20}\n };\n }\n\n return def;\n};\n\naxis.labels = {};\n\n/** add custom label for time type and bin */\naxis.labels.scale = function(def, encoding, name) {\n // time\n var timeUnit = encoding.field(name).timeUnit;\n if (encoding.isType(name, T) && timeUnit && (time.hasScale(timeUnit))) {\n setter(def, ['properties','labels','text','scale'], 'time-'+ timeUnit);\n }\n // FIXME bin\n return def;\n};\n\n/**\n * Determine number format or truncate if maxLabel length is presented.\n */\naxis.labels.format = function (def, name, encoding, stats) {\n var fieldStats = stats[encoding.field(name).name];\n\n if (encoding.axis(name).format) {\n def.format = encoding.axis(name).format;\n } else if (encoding.isType(name, Q) || fieldStats.type === 'number') {\n def.format = encoding.numberFormat(fieldStats);\n } else if (encoding.isType(name, T)) {\n var timeUnit = encoding.field(name).timeUnit;\n if (!timeUnit) {\n def.format = encoding.config('timeFormat');\n } else if (timeUnit === 'year') {\n def.format = 'd';\n }\n } else if (encoding.isTypes(name, [N, O]) && encoding.axis(name).maxLabelLength) {\n setter(def,\n ['properties','labels','text','template'],\n '{{data | truncate:' + encoding.axis(name).maxLabelLength + '}}'\n );\n }\n\n return def;\n};\n\naxis.labels.angle = function(def, encoding, name) {\n var angle = encoding.axis(name).labelAngle;\n if (typeof angle === 'undefined') return def;\n\n setter(def, ['properties', 'labels', 'angle', 'value'], angle);\n return def;\n};\n\naxis.labels.rotate = function(def) {\n var align = def.orient ==='top' ? 'left' : 'right';\n setter(def, ['properties','labels', 'angle', 'value'], 270);\n setter(def, ['properties','labels', 'align', 'value'], align);\n setter(def, ['properties','labels', 'baseline', 'value'], 'middle');\n return def;\n};\n\naxis.titleOffset = function (encoding, layout, name) {\n // return specified value if specified\n var value = encoding.axis(name).titleOffset;\n if (value) return value;\n\n switch (name) {\n //FIXME make this adjustable\n case ROW: return 0;\n case COL: return 35;\n }\n return getter(layout, [name, 'axisTitleOffset']);\n};\n","'use strict';\n\nvar summary = module.exports = require('datalib/src/stats').summary;\n\nrequire('../globals');\n\nvar compiler = module.exports = {};\n\nvar Encoding = require('../Encoding'),\n axis = compiler.axis = require('./axis'),\n legend = compiler.legend = require('./legend'),\n marks = compiler.marks = require('./marks'),\n scale = compiler.scale = require('./scale');\n\ncompiler.data = require('./data');\ncompiler.facet = require('./facet');\ncompiler.group = require('./group');\ncompiler.layout = require('./layout');\ncompiler.sort = require('./sort');\ncompiler.stack = require('./stack');\ncompiler.style = require('./style');\ncompiler.subfacet = require('./subfacet');\ncompiler.time = require('./time');\n\ncompiler.compile = function (spec, stats, theme) {\n return compiler.compileEncoding(Encoding.fromSpec(spec, theme), stats);\n};\n\ncompiler.shorthand = function (shorthand, stats, config, theme) {\n return compiler.compileEncoding(Encoding.fromShorthand(shorthand, config, theme), stats);\n};\n\n\ncompiler.compileEncoding = function (encoding, stats) {\n // no need to pass stats if you pass in the data\n if (!stats && encoding.hasValues()) {\n stats = summary(encoding.data().values).reduce(function(s, p) {\n s[p.field] = p;\n return s;\n }, {});\n }\n\n var layout = compiler.layout(encoding, stats);\n\n var spec = {\n width: layout.width,\n height: layout.height,\n padding: 'auto',\n data: compiler.data(encoding),\n // global scales contains only time unit scales\n scales: compiler.time.scales(encoding)\n };\n\n // FIXME remove compiler.sort after migrating to vega 2.\n spec.data = compiler.sort(spec.data, encoding, stats); // append new data\n\n // marks\n\n // TODO this line is temporary and should be refactored\n spec.marks = [compiler.group.def('cell', {\n width: layout.cellWidth ? {value: layout.cellWidth} : undefined,\n height: layout.cellHeight ? {value: layout.cellHeight} : undefined\n })];\n\n var style = compiler.style(encoding, stats),\n group = spec.marks[0],\n mdefs = marks.def(encoding, layout, style, stats),\n mdef = mdefs[mdefs.length - 1]; // TODO: remove this dirty hack by refactoring the whole flow\n\n for (var i = 0; i < mdefs.length; i++) {\n group.marks.push(mdefs[i]);\n }\n\n var lineType = marks[encoding.marktype()].line;\n\n // handle subfacets\n\n var details = encoding.details(),\n stack = encoding.isAggregate() && details.length > 0 && compiler.stack(spec.data, encoding, mdef); // modify spec.data, mdef.{from,properties}\n\n if (details.length > 0 && (stack || lineType)) {\n //subfacet to group stack / line together in one group\n compiler.subfacet(group, mdef, details, stack, encoding);\n }\n\n // auto-sort line/area values\n //TODO(kanitw): have some config to turn off auto-sort for line (for line chart that encodes temporal information)\n if (lineType) {\n var f = (encoding.isMeasure(X) && encoding.isDimension(Y)) ? Y : X;\n if (!mdef.from) mdef.from = {};\n // TODO: why - ?\n mdef.from.transform = [{type: 'sort', by: '-' + encoding.fieldRef(f)}];\n }\n\n // get a flattened list of all scale names that are used in the vl spec\n var singleScaleNames = [].concat.apply([], mdefs.map(function(markProps) {\n return scale.names(markProps.properties.update);\n }));\n\n // Small Multiples\n if (encoding.has(ROW) || encoding.has(COL)) {\n spec = compiler.facet(group, encoding, layout, spec, singleScaleNames, stack, stats);\n spec.legends = legend.defs(encoding, style);\n } else {\n group.scales = scale.defs(singleScaleNames, encoding, layout, stats, {stack: stack});\n\n group.axes = [];\n if (encoding.has(X)) group.axes.push(axis.def(X, encoding, layout, stats));\n if (encoding.has(Y)) group.axes.push(axis.def(Y, encoding, layout, stats));\n\n group.legends = legend.defs(encoding, style);\n }\n\n\n\n return spec;\n};\n\n","'use strict';\n\nrequire('../globals');\n\nmodule.exports = data;\n\nvar vlfield = require('../field'),\n util = require('../util'),\n time = require('./time');\n\nfunction data(encoding) {\n var def = [data.raw(encoding)];\n\n var aggregate = data.aggregate(encoding);\n if (aggregate) def.push(data.aggregate(encoding));\n\n // TODO add \"having\" filter here ()\n\n // append non-zero filter at the end for the data table\n data.filterNonZeroForLog(def[def.length - 1], encoding);\n\n return def;\n}\n\ndata.raw = function(encoding) {\n var raw = {name: RAW};\n\n // Data source (url or inline)\n if (encoding.hasValues()) {\n raw.values = encoding.data().values;\n } else {\n raw.url = encoding.data().url;\n raw.format = {type: encoding.data().formatType};\n }\n\n // Set format.parse if needed\n var parse = data.raw.formatParse(encoding);\n if (parse) {\n raw.format = raw.format || {};\n raw.format.parse = parse;\n }\n\n raw.transform = data.raw.transform(encoding);\n return raw;\n};\n\ndata.raw.formatParse = function(encoding) {\n var parse;\n\n encoding.forEach(function(field) {\n if (field.type == T) {\n parse = parse || {};\n parse[field.name] = 'date';\n } else if (field.type == Q) {\n if (vlfield.isCount(field)) return;\n parse = parse || {};\n parse[field.name] = 'number';\n }\n });\n\n return parse;\n};\n\ndata.raw.transform = function(encoding) {\n // time and bin should come before filter so we can filter by time and bin\n return data.raw.transform.time(encoding).concat(\n data.raw.transform.bin(encoding)\n ).concat(\n data.raw.transform.filter(encoding)\n );\n};\n\nvar BINARY = {\n '>': true,\n '>=': true,\n '=': true,\n '!=': true,\n '<': true,\n '<=': true\n};\n\ndata.raw.transform.time = function(encoding) {\n return encoding.reduce(function(transform, field, encType) {\n if (field.type === T && field.timeUnit) {\n transform.push({\n type: 'formula',\n field: encoding.fieldRef(encType),\n expr: time.formula(field.timeUnit, encoding.fieldRef(encType, {nofn: true, d: true}))\n });\n }\n return transform;\n }, []);\n};\n\ndata.raw.transform.bin = function(encoding) {\n return encoding.reduce(function(transform, field, encType) {\n if (encoding.bin(encType)) {\n transform.push({\n type: 'bin',\n field: encoding.fieldRef(encType, {nofn: true}),\n output: encoding.fieldRef(encType),\n maxbins: encoding.bin(encType).maxbins\n });\n }\n return transform;\n }, []);\n};\n\ndata.raw.transform.filter = function(encoding) {\n var filters = encoding.filter().reduce(function(f, filter) {\n var condition = '';\n var operator = filter.operator;\n var operands = filter.operands;\n\n var d = 'd.' + (encoding._vega2 ? '' : 'data.');\n\n if (BINARY[operator]) {\n // expects a field and a value\n if (operator === '=') {\n operator = '==';\n }\n\n var op1 = operands[0];\n var op2 = operands[1];\n condition = d + op1 + ' ' + operator + ' ' + op2;\n } else if (operator === 'notNull') {\n // expects a number of fields\n for (var j=0; j 0) {\n return {\n name: AGGREGATE,\n source: RAW,\n transform: [{\n type: 'aggregate',\n groupby: dims,\n fields: meas\n }]\n };\n }\n\n return null;\n};\n\ndata.filterNonZeroForLog = function(dataTable, encoding) {\n encoding.forEach(function(field, encType) {\n if (encoding.scale(encType).type === 'log') {\n dataTable.transform.push({\n type: 'filter',\n test: encoding.fieldRef(encType, {d: 1}) + ' > 0'\n });\n }\n });\n};\n","'use strict';\n\nrequire('../globals');\n\nvar util = require('../util');\n\nvar axis = require('./axis'),\n groupdef = require('./group').def,\n scale = require('./scale');\n\nmodule.exports = faceting;\n\nfunction faceting(group, encoding, layout, spec, singleScaleNames, stack, stats) {\n var enter = group.properties.enter;\n var facetKeys = [], cellAxes = [], from, axesGrp;\n\n var hasRow = encoding.has(ROW), hasCol = encoding.has(COL);\n\n enter.fill = {value: encoding.config('cellBackgroundColor')};\n\n //move \"from\" to cell level and add facet transform\n group.from = {data: group.marks[0].from.data};\n\n // Hack, this needs to be refactored\n for (var i = 0; i < group.marks.length; i++) {\n var mark = group.marks[i];\n if (mark.from.transform) {\n delete mark.from.data; //need to keep transform for subfacetting case\n } else {\n delete mark.from;\n }\n }\n\n if (hasRow) {\n if (!encoding.isDimension(ROW)) {\n util.error('Row encoding should be ordinal.');\n }\n enter.y = {scale: ROW, field: 'keys.' + facetKeys.length};\n enter.height = {'value': layout.cellHeight}; // HACK\n\n facetKeys.push(encoding.fieldRef(ROW));\n\n if (hasCol) {\n from = util.duplicate(group.from);\n from.transform = from.transform || [];\n from.transform.unshift({type: 'facet', keys: [encoding.fieldRef(COL)]});\n }\n\n axesGrp = groupdef('x-axes', {\n axes: encoding.has(X) ? [axis.def(X, encoding, layout, stats)] : undefined,\n x: hasCol ? {scale: COL, field: 'keys.0'} : {value: 0},\n width: hasCol && {'value': layout.cellWidth}, //HACK?\n from: from\n });\n\n spec.marks.unshift(axesGrp); // need to prepend so it appears under the plots\n (spec.axes = spec.axes || []);\n spec.axes.push(axis.def(ROW, encoding, layout, stats));\n } else { // doesn't have row\n if (encoding.has(X)) {\n //keep x axis in the cell\n cellAxes.push(axis.def(X, encoding, layout, stats));\n }\n }\n\n if (hasCol) {\n if (!encoding.isDimension(COL)) {\n util.error('Col encoding should be ordinal.');\n }\n enter.x = {scale: COL, field: 'keys.' + facetKeys.length};\n enter.width = {'value': layout.cellWidth}; // HACK\n\n facetKeys.push(encoding.fieldRef(COL));\n\n if (hasRow) {\n from = util.duplicate(group.from);\n from.transform = from.transform || [];\n from.transform.unshift({type: 'facet', keys: [encoding.fieldRef(ROW)]});\n }\n\n axesGrp = groupdef('y-axes', {\n axes: encoding.has(Y) ? [axis.def(Y, encoding, layout, stats)] : undefined,\n y: hasRow && {scale: ROW, field: 'keys.0'},\n x: hasRow && {value: 0},\n height: hasRow && {'value': layout.cellHeight}, //HACK?\n from: from\n });\n\n spec.marks.unshift(axesGrp); // need to prepend so it appears under the plots\n (spec.axes = spec.axes || []);\n spec.axes.push(axis.def(COL, encoding, layout, stats));\n } else { // doesn't have col\n if (encoding.has(Y)) {\n cellAxes.push(axis.def(Y, encoding, layout, stats));\n }\n }\n\n // assuming equal cellWidth here\n // TODO: support heterogenous cellWidth (maybe by using multiple scales?)\n spec.scales = (spec.scales || []).concat(scale.defs(\n scale.names(enter).concat(singleScaleNames),\n encoding,\n layout,\n stats,\n {stack: stack, facet: true}\n )); // row/col scales + cell scales\n\n if (cellAxes.length > 0) {\n group.axes = cellAxes;\n }\n\n // add facet transform\n var trans = (group.from.transform || (group.from.transform = []));\n trans.unshift({type: 'facet', keys: facetKeys});\n\n return spec;\n}\n","'use strict';\n\nmodule.exports = {\n def: groupdef\n};\n\nfunction groupdef(name, opt) {\n opt = opt || {};\n return {\n _name: name || undefined,\n type: 'group',\n from: opt.from,\n properties: {\n enter: {\n x: opt.x || undefined,\n y: opt.y || undefined,\n width: opt.width || {group: 'width'},\n height: opt.height || {group: 'height'}\n }\n },\n scales: opt.scales || undefined,\n axes: opt.axes || undefined,\n marks: opt.marks || []\n };\n}\n","'use strict';\n\nrequire('../globals');\n\nvar util = require('../util'),\n setter = util.setter,\n time = require('./time'),\n d3_format = require('d3-format');\n\nmodule.exports = vllayout;\n\nfunction vllayout(encoding, stats) {\n var layout = box(encoding, stats);\n layout = offset(encoding, stats, layout);\n return layout;\n}\n\n/*\n HACK to set chart size\n NOTE: this fails for plots driven by derived values (e.g., aggregates)\n One solution is to update Vega to support auto-sizing\n In the meantime, auto-padding (mostly) does the trick\n */\nfunction box(encoding, stats) {\n var hasRow = encoding.has(ROW),\n hasCol = encoding.has(COL),\n hasX = encoding.has(X),\n hasY = encoding.has(Y),\n marktype = encoding.marktype();\n\n // FIXME/HACK we need to take filter into account\n var xCardinality = hasX && encoding.isDimension(X) ? encoding.cardinality(X, stats) : 1,\n yCardinality = hasY && encoding.isDimension(Y) ? encoding.cardinality(Y, stats) : 1;\n\n var useSmallBand = xCardinality > encoding.config('largeBandMaxCardinality') ||\n yCardinality > encoding.config('largeBandMaxCardinality');\n\n var cellWidth, cellHeight, cellPadding = encoding.config('cellPadding');\n\n // set cellWidth\n if (hasX) {\n if (encoding.isOrdinalScale(X)) {\n // for ordinal, hasCol or not doesn't matter -- we scale based on cardinality\n cellWidth = (xCardinality + encoding.field(X).band.padding) * encoding.bandSize(X, useSmallBand);\n } else {\n cellWidth = hasCol || hasRow ? encoding.field(COL).width : encoding.config('singleWidth');\n }\n } else {\n if (marktype === TEXT) {\n cellWidth = encoding.config('textCellWidth');\n } else {\n cellWidth = encoding.bandSize(X);\n }\n }\n\n // set cellHeight\n if (hasY) {\n if (encoding.isOrdinalScale(Y)) {\n // for ordinal, hasCol or not doesn't matter -- we scale based on cardinality\n cellHeight = (yCardinality + encoding.field(Y).band.padding) * encoding.bandSize(Y, useSmallBand);\n } else {\n cellHeight = hasCol || hasRow ? encoding.field(ROW).height : encoding.config('singleHeight');\n }\n } else {\n cellHeight = encoding.bandSize(Y);\n }\n\n // Cell bands use rangeBands(). There are n-1 padding. Outerpadding = 0 for cells\n\n var width = cellWidth, height = cellHeight;\n if (hasCol) {\n var colCardinality = encoding.cardinality(COL, stats);\n width = cellWidth * ((1 + cellPadding) * (colCardinality - 1) + 1);\n }\n if (hasRow) {\n var rowCardinality = encoding.cardinality(ROW, stats);\n height = cellHeight * ((1 + cellPadding) * (rowCardinality - 1) + 1);\n }\n\n return {\n // width and height of the whole cell\n cellWidth: cellWidth,\n cellHeight: cellHeight,\n cellPadding: cellPadding,\n // width and height of the chart\n width: width,\n height: height,\n // information about x and y, such as band size\n x: {useSmallBand: useSmallBand},\n y: {useSmallBand: useSmallBand}\n };\n}\n\n\n// FIXME fieldStats.max isn't always the longest\nfunction getMaxNumberLength(encoding, et, fieldStats) {\n var format = encoding.numberFormat(et, fieldStats);\n\n return d3_format.format(format)(fieldStats.max).length;\n}\n\nfunction getMaxLength(encoding, stats, et) {\n var field = encoding.field(et),\n fieldStats = stats[field.name];\n\n if (field.bin) {\n // TODO once bin support range, need to update this\n return getMaxNumberLength(encoding, et, fieldStats);\n } if (encoding.isType(et, Q)) {\n return getMaxNumberLength(encoding, et, fieldStats);\n } else if (encoding.isType(et, T)) {\n return time.maxLength(encoding.field(et).timeUnit, encoding);\n } else if (encoding.isTypes(et, [N, O])) {\n if(fieldStats.type === 'number') {\n return getMaxNumberLength(encoding, et, fieldStats);\n } else {\n return Math.min(fieldStats.max, encoding.axis(et).maxLabelLength || Infinity);\n }\n }\n}\n\nfunction offset(encoding, stats, layout) {\n [X, Y].forEach(function (et) {\n // TODO(kanitw): Jul 19, 2015 - create a set of visual test for extraOffset\n var extraOffset = et === X ? 20 : 22,\n maxLength;\n if (encoding.isDimension(et) || encoding.isType(et, T)) {\n maxLength = getMaxLength(encoding, stats, et);\n } else if (\n // TODO once we have #512 (allow using inferred type)\n // Need to adjust condition here.\n encoding.isType(et, Q) ||\n encoding.aggregate(et) === 'count'\n ) {\n if (\n et===Y\n // || (et===X && false)\n // FIXME determine when X would rotate, but should move this to axis.js first #506\n ) {\n maxLength = getMaxLength(encoding, stats, et);\n }\n } else {\n // nothing\n }\n\n if (maxLength) {\n setter(layout,[et, 'axisTitleOffset'], encoding.config('characterWidth') * maxLength + extraOffset);\n } else {\n // if no max length (no rotation case), use maxLength = 3\n setter(layout,[et, 'axisTitleOffset'], encoding.config('characterWidth') * 3 + extraOffset);\n }\n\n });\n return layout;\n}\n","'use strict';\n\nrequire('../globals');\n\nvar time = require('./time'),\n util = require('../util'),\n setter = util.setter,\n getter = util.getter;\n\nvar legend = module.exports = {};\n\nlegend.defs = function(encoding, style) {\n var defs = [];\n\n if (encoding.has(COLOR) && encoding.field(COLOR).legend) {\n defs.push(legend.def(COLOR, encoding, {\n fill: COLOR,\n orient: 'right'\n }, style));\n }\n\n if (encoding.has(SIZE) && encoding.field(SIZE).legend) {\n defs.push(legend.def(SIZE, encoding, {\n size: SIZE,\n orient: defs.length === 1 ? 'left' : 'right'\n }, style));\n }\n\n if (encoding.has(SHAPE) && encoding.field(SHAPE).legend) {\n if (defs.length === 2) {\n console.error('Vega-lite currently only supports two legends');\n }\n defs.push(legend.def(SHAPE, encoding, {\n shape: SHAPE,\n orient: defs.length === 1 ? 'left' : 'right'\n }, style));\n }\n return defs;\n};\n\nlegend.def = function(name, encoding, def, style) {\n var timeUnit = encoding.field(name).timeUnit;\n\n def.title = legend.title(name, encoding);\n def = legend.style(name, encoding, def, style);\n\n if (encoding.isType(name, T) &&\n timeUnit &&\n time.hasScale(timeUnit)\n ) {\n setter(def, ['properties', 'labels', 'text', 'scale'], 'time-'+ timeUnit);\n }\n\n return def;\n};\n\nlegend.style = function(name, e, def, style) {\n var symbols = getter(def, ['properties', 'symbols']),\n marktype = e.marktype();\n\n switch (marktype) {\n case 'bar':\n case 'tick':\n case 'text':\n symbols.stroke = {value: 'transparent'};\n symbols.shape = {value: 'square'};\n break;\n\n case 'circle':\n case 'square':\n symbols.shape = {value: marktype};\n /* fall through */\n case 'point':\n // fill or stroke\n if (e.field(SHAPE).filled) {\n if (e.has(COLOR) && name === COLOR) {\n symbols.fill = {scale: COLOR, field: 'data'};\n } else {\n symbols.fill = {value: e.value(COLOR)};\n }\n symbols.stroke = {value: 'transparent'};\n } else {\n if (e.has(COLOR) && name === COLOR) {\n symbols.stroke = {scale: COLOR, field: 'data'};\n } else {\n symbols.stroke = {value: e.value(COLOR)};\n }\n symbols.fill = {value: 'transparent'};\n symbols.strokeWidth = {value: e.config('strokeWidth')};\n }\n\n break;\n case 'line':\n case 'area':\n // TODO use shape here after implementing #508\n break;\n }\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if (opacity) {\n symbols.opacity = {value: opacity};\n }\n return def;\n};\n\nlegend.title = function(name, encoding) {\n var leg = encoding.field(name).legend;\n\n if (leg.title) return leg.title;\n\n return encoding.fieldTitle(name);\n};\n","'use strict';\n\nrequire('../globals');\n\nvar marks = module.exports = {};\n\nmarks.def = function(encoding, layout, style, stats) {\n\n var defs = [],\n mark = marks[encoding.marktype()],\n from = encoding.dataTable();\n\n // to add a background to text, we need to add it before the text\n if (encoding.marktype() === TEXT && encoding.has(COLOR)) {\n var bg = {\n x: {value: 0},\n y: {value: 0},\n x2: {value: layout.cellWidth},\n y2: {value: layout.cellHeight},\n fill: {scale: COLOR, field: encoding.fieldRef(COLOR)}\n };\n defs.push({\n type: 'rect',\n from: {data: from},\n properties: {enter: bg, update: bg}\n });\n }\n\n // add the mark def for the main thing\n var p = mark.prop(encoding, layout, style, stats);\n defs.push({\n type: mark.type,\n from: {data: from},\n properties: {enter: p, update: p}\n });\n\n return defs;\n};\n\nmarks.bar = {\n type: 'rect',\n stack: true,\n prop: bar_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1}\n};\n\nmarks.line = {\n type: 'line',\n line: true,\n prop: line_props,\n requiredEncoding: ['x', 'y'],\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, detail:1}\n};\n\nmarks.area = {\n type: 'area',\n stack: true,\n line: true,\n requiredEncoding: ['x', 'y'],\n prop: area_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1}\n};\n\nmarks.tick = {\n type: 'rect',\n prop: tick_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, detail: 1}\n};\n\nmarks.circle = {\n type: 'symbol',\n prop: filled_point_props('circle'),\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, detail: 1}\n};\n\nmarks.square = {\n type: 'symbol',\n prop: filled_point_props('square'),\n supportedEncoding: marks.circle.supportedEncoding\n};\n\nmarks.point = {\n type: 'symbol',\n prop: point_props,\n supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, shape: 1, detail: 1}\n};\n\nmarks.text = {\n type: 'text',\n prop: text_props,\n requiredEncoding: ['text'],\n supportedEncoding: {row: 1, col: 1, size: 1, color: 1, text: 1}\n};\n\nfunction bar_props(e, layout, style) {\n // jshint unused:false\n\n var p = {};\n\n // x's and width\n if (e.isMeasure(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n if (!e.has(Y) || e.isDimension(Y)) {\n p.x2 = {value: 0};\n }\n } else {\n if (e.has(X)) { // is ordinal\n p.xc = {scale: X, field: e.fieldRef(X)};\n } else {\n p.x = {value: 0, offset: e.config('singleBarOffset')};\n }\n }\n\n // width\n if (!p.x2) {\n if (!e.has(X) || e.isOrdinalScale(X)) { // no X or X is ordinal\n if (e.has(SIZE)) {\n p.width = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else {\n p.width = {\n value: e.bandSize(X, layout.x.useSmallBand),\n offset: -1\n };\n }\n } else { // X is Quant or Time Scale\n p.width = {value: 2};\n }\n }\n\n // y's & height\n if (e.isMeasure(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n p.y2 = {group: 'height'};\n } else {\n if (e.has(Y)) { // is ordinal\n p.yc = {scale: Y, field: e.fieldRef(Y)};\n } else {\n p.y2 = {group: 'height', offset: -e.config('singleBarOffset')};\n }\n\n if (e.has(SIZE)) {\n p.height = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else {\n p.height = {\n value: e.bandSize(Y, layout.y.useSmallBand),\n offset: -1\n };\n }\n }\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else {\n p.fill = {value: e.value(COLOR)};\n }\n\n // opacity\n var opacity = e.field(COLOR).opacity;\n if (opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction point_props(e, layout, style) {\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n p.x = {value: e.bandSize(X, layout.x.useSmallBand) / 2};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {value: e.bandSize(Y, layout.y.useSmallBand) / 2};\n }\n\n // size\n if (e.has(SIZE)) {\n p.size = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else if (!e.has(SIZE)) {\n p.size = {value: e.value(SIZE)};\n }\n\n // shape\n if (e.has(SHAPE)) {\n p.shape = {scale: SHAPE, field: e.fieldRef(SHAPE)};\n } else if (!e.has(SHAPE)) {\n p.shape = {value: e.value(SHAPE)};\n }\n\n // fill or stroke\n if (e.field(SHAPE).filled) {\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.fill = {value: e.value(COLOR)};\n }\n } else {\n if (e.has(COLOR)) {\n p.stroke = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.stroke = {value: e.value(COLOR)};\n }\n p.strokeWidth = {value: e.config('strokeWidth')};\n }\n\n // opacity\n var opacity = e.field(COLOR).opacity || style.opacity;\n if (opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction line_props(e,layout, style) {\n // jshint unused:false\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n p.x = {value: 0};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {group: 'height'};\n }\n\n // stroke\n if (e.has(COLOR)) {\n p.stroke = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.stroke = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity;\n if (opacity) p.opacity = {value: opacity};\n\n p.strokeWidth = {value: e.config('strokeWidth')};\n\n return p;\n}\n\nfunction area_props(e, layout, style) {\n // jshint unused:false\n var p = {};\n\n // x\n if (e.isMeasure(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n if (e.isDimension(Y)) {\n p.x2 = {scale: X, value: 0};\n p.orient = {value: 'horizontal'};\n }\n } else if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else {\n p.x = {value: 0};\n }\n\n // y\n if (e.isMeasure(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n p.y2 = {scale: Y, value: 0};\n } else if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else {\n p.y = {group: 'height'};\n }\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.fill = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity;\n if (opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction tick_props(e, layout, style) {\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n if (e.isDimension(X)) {\n p.x.offset = -e.bandSize(X, layout.x.useSmallBand) / 3;\n }\n } else if (!e.has(X)) {\n p.x = {value: 0};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n if (e.isDimension(Y)) {\n p.y.offset = -e.bandSize(Y, layout.y.useSmallBand) / 3;\n }\n } else if (!e.has(Y)) {\n p.y = {value: 0};\n }\n\n // width\n if (!e.has(X) || e.isDimension(X)) {\n p.width = {value: e.bandSize(X, layout.y.useSmallBand) / 1.5};\n } else {\n p.width = {value: 1};\n }\n\n // height\n if (!e.has(Y) || e.isDimension(Y)) {\n p.height = {value: e.bandSize(Y, layout.y.useSmallBand) / 1.5};\n } else {\n p.height = {value: 1};\n }\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else {\n p.fill = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if(opacity) p.opacity = {value: opacity};\n\n return p;\n}\n\nfunction filled_point_props(shape) {\n return function(e, layout, style) {\n var p = {};\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n p.x = {value: e.bandSize(X, layout.x.useSmallBand) / 2};\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {value: e.bandSize(Y, layout.y.useSmallBand) / 2};\n }\n\n // size\n if (e.has(SIZE)) {\n p.size = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else if (!e.has(X)) {\n p.size = {value: e.value(SIZE)};\n }\n\n // shape\n p.shape = {value: shape};\n\n // fill\n if (e.has(COLOR)) {\n p.fill = {scale: COLOR, field: e.fieldRef(COLOR)};\n } else if (!e.has(COLOR)) {\n p.fill = {value: e.value(COLOR)};\n }\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if(opacity) p.opacity = {value: opacity};\n\n return p;\n };\n}\n\nfunction text_props(e, layout, style, stats) {\n var p = {},\n field = e.field(TEXT);\n\n // x\n if (e.has(X)) {\n p.x = {scale: X, field: e.fieldRef(X)};\n } else if (!e.has(X)) {\n if (e.has(TEXT) && e.isType(TEXT, Q)) {\n p.x = {value: layout.cellWidth-5};\n } else {\n p.x = {value: e.bandSize(X, layout.x.useSmallBand) / 2};\n }\n }\n\n // y\n if (e.has(Y)) {\n p.y = {scale: Y, field: e.fieldRef(Y)};\n } else if (!e.has(Y)) {\n p.y = {value: e.bandSize(Y, layout.y.useSmallBand) / 2};\n }\n\n // size\n if (e.has(SIZE)) {\n p.fontSize = {scale: SIZE, field: e.fieldRef(SIZE)};\n } else if (!e.has(SIZE)) {\n p.fontSize = {value: field.font.size};\n }\n\n // fill\n // color should be set to background\n p.fill = {value: field.color};\n\n var opacity = e.field(COLOR).opacity || style.opacity;\n if(opacity) p.opacity = {value: opacity};\n\n // text\n if (e.has(TEXT)) {\n if (e.isType(TEXT, Q)) {\n var fieldStats = stats[e.fieldName(TEXT)],\n numberFormat = field.format || e.numberFormat(fieldStats);\n\n p.text = {template: '{{' + e.fieldRef(TEXT) + ' | number:\\'' +\n numberFormat +'\\'}}'};\n p.align = {value: field.align};\n } else {\n p.text = {field: e.fieldRef(TEXT)};\n }\n } else {\n p.text = {value: field.placeholder};\n }\n\n p.font = {value: field.font.family};\n p.fontWeight = {value: field.font.weight};\n p.fontStyle = {value: field.font.style};\n p.baseline = {value: field.baseline};\n\n return p;\n}\n","'use strict';\nrequire('../globals');\nvar util = require('../util'),\n time = require('./time'),\n colorbrewer = require('colorbrewer'),\n interpolate = require('d3-color').interpolateHsl,\n schema = require('../schema/schema'),\n vlsort = require('./sort');\n\nvar scale = module.exports = {};\n\nscale.names = function(props) {\n return util.keys(util.keys(props).reduce(function(a, x) {\n if (props[x] && props[x].scale) a[props[x].scale] = 1;\n return a;\n }, {}));\n};\n\nscale.defs = function(names, encoding, layout, stats, opt) {\n opt = opt || {};\n\n return names.reduce(function(a, name) {\n var s = {\n name: name,\n type: scale.type(name, encoding),\n domain: scale.domain(name, encoding, stats, opt)\n };\n\n s.sort = scale.sort(s, encoding, name) || undefined;\n\n scale.range(s, encoding, layout, stats, opt);\n\n return (a.push(s), a);\n }, []);\n};\n\nscale.sort = function(s, encoding, name) {\n return s.type === 'ordinal' && (\n !!encoding.bin(name) ||\n encoding.sort(name).length === 0\n );\n};\n\nscale.type = function(name, encoding) {\n\n switch (encoding.type(name)) {\n case N: //fall through\n case O: return 'ordinal';\n case T:\n var timeUnit = encoding.field(name).timeUnit;\n return timeUnit ? time.scale.type(timeUnit, name) : 'time';\n case Q:\n if (encoding.bin(name)) {\n return name === COLOR ? 'linear' : 'ordinal';\n }\n return encoding.scale(name).type;\n }\n};\n\nscale.domain = function (name, encoding, stats, opt) {\n var field = encoding.field(name);\n\n if (encoding.isType(name, T)) {\n var range = time.scale.domain(field.timeUnit, name);\n if(range) return range;\n }\n\n if (field.bin) {\n // TODO(kanitw): this must be changed in vg2\n var fieldStat = stats[field.name],\n bins = util.getbins(fieldStat, field.bin.maxbins || schema.MAXBINS_DEFAULT),\n numbins = (bins.stop - bins.start) / bins.step;\n return util.range(numbins).map(function(i) {\n return bins.start + bins.step * i;\n });\n }\n\n if (name == opt.stack) {\n return {\n data: STACKED,\n field: encoding.fieldRef(name, {\n data: !encoding._vega2,\n prefn: (opt.facet ? 'max_' : '') + 'sum_'\n })\n };\n }\n var aggregate = encoding.aggregate(name),\n timeUnit = field.timeUnit,\n scaleUseRawDomain = encoding.scale(name).useRawDomain,\n useRawDomain = scaleUseRawDomain !== undefined ?\n scaleUseRawDomain : encoding.config('useRawDomain'),\n notCountOrSum = !aggregate || (aggregate !=='count' && aggregate !== 'sum');\n\n // FIXME revise this part\n\n if ( useRawDomain && notCountOrSum && (\n // Q always uses non-ordinal scale except when it's binned and thus uses ordinal scale.\n (encoding.isType(name, Q) && !field.bin) ||\n // T uses non-ordinal scale when there's no unit or when the unit is not ordinal.\n (encoding.isType(name, T) && (!timeUnit || !time.isOrdinalFn(timeUnit)))\n )\n ) {\n return {data: RAW, field: encoding.fieldRef(name, {nofn: !timeUnit})};\n }\n\n var data = encoding.sort(name, stats).length > 0 ?\n vlsort.getDataName(name):\n encoding.dataTable();\n\n return {data: data, field: encoding.fieldRef(name)};\n};\n\n\nscale.range = function (s, encoding, layout, stats) {\n var spec = encoding.scale(s.name),\n field = encoding.field(s.name),\n timeUnit = field.timeUnit;\n\n switch (s.name) {\n case X:\n s.range = layout.cellWidth ? [0, layout.cellWidth] : 'width';\n if (s.type === 'ordinal') {\n s.bandWidth = encoding.bandSize(X, layout.x.useSmallBand);\n } else {\n if (encoding.isType(s.name,T) && timeUnit === 'year') {\n s.zero = false;\n } else {\n s.zero = spec.zero === undefined ? true : spec.zero;\n }\n\n s.reverse = spec.reverse;\n }\n s.round = true;\n if (s.type === 'time') {\n s.nice = timeUnit || encoding.config('timeScaleNice');\n }else {\n s.nice = true;\n }\n break;\n case Y:\n if (s.type === 'ordinal') {\n s.range = layout.cellHeight ?\n (field.bin ? [layout.cellHeight, 0] : [0, layout.cellHeight]) :\n 'height';\n s.bandWidth = encoding.bandSize(Y, layout.y.useSmallBand);\n } else {\n s.range = layout.cellHeight ? [layout.cellHeight, 0] : 'height';\n if (encoding.isType(s.name,T) && timeUnit === 'year') {\n s.zero = false;\n } else {\n s.zero = spec.zero === undefined ? true : spec.zero;\n }\n\n s.reverse = spec.reverse;\n }\n\n s.round = true;\n\n if (s.type === 'time') {\n s.nice = timeUnit || encoding.config('timeScaleNice');\n }else {\n s.nice = true;\n }\n break;\n case ROW: // support only ordinal\n s.bandWidth = layout.cellHeight;\n s.round = true;\n s.nice = true;\n break;\n case COL: // support only ordinal\n s.bandWidth = layout.cellWidth;\n s.round = true;\n s.nice = true;\n break;\n case SIZE:\n if (encoding.is('bar')) {\n // FIXME this is definitely incorrect\n // but let's fix it later since bar size is a bad encoding anyway\n s.range = [3, Math.max(encoding.bandSize(X), encoding.bandSize(Y))];\n } else if (encoding.is(TEXT)) {\n s.range = [8, 40];\n } else { //point\n var bandSize = Math.min(encoding.bandSize(X), encoding.bandSize(Y)) - 1;\n s.range = [10, 0.8 * bandSize*bandSize];\n }\n s.round = true;\n s.zero = false;\n break;\n case SHAPE:\n s.range = 'shapes';\n break;\n case COLOR:\n s.range = scale.color(s, encoding, stats);\n if (s.type !== 'ordinal') s.zero = false;\n break;\n default:\n throw new Error('Unknown encoding name: '+ s.name);\n }\n\n // FIXME(kanitw): Jul 29, 2015 - consolidate this with above\n switch (s.name) {\n case ROW:\n case COL:\n s.padding = encoding.config('cellPadding');\n s.outerPadding = 0;\n break;\n case X:\n case Y:\n if (s.type === 'ordinal') { //&& !s.bandWidth\n s.points = true;\n s.padding = encoding.field(s.name).band.padding;\n }\n }\n};\n\nscale.color = function(s, encoding, stats) {\n var colorScale = encoding.scale(COLOR),\n range = colorScale.range,\n cardinality = encoding.cardinality(COLOR, stats),\n type = encoding.type(COLOR);\n\n if (range === undefined) {\n var ordinalPalette = colorScale.ordinalPalette,\n quantitativeRange = colorScale.quantitativeRange;\n\n if (s.type === 'ordinal') {\n if (type === N) {\n // use categorical color scale\n if (cardinality <= 10) {\n range = colorScale.c10palette;\n } else {\n range = colorScale.c20palette;\n }\n return scale.color.palette(range, cardinality, type);\n } else {\n if (ordinalPalette) {\n return scale.color.palette(ordinalPalette, cardinality, type);\n }\n return scale.color.interpolate(quantitativeRange[0], quantitativeRange[1], cardinality);\n }\n } else { //time or quantitative\n return [quantitativeRange[0], quantitativeRange[1]];\n }\n }\n};\n\nscale.color.palette = function(range, cardinality, type) {\n // FIXME(kanitw): Jul 29, 2015 - check range is string\n switch (range) {\n case 'category10k':\n // tableau's category 10, ordered by perceptual kernel study results\n // https://github.com/uwdata/perceptual-kernels\n return ['#2ca02c', '#e377c2', '#7f7f7f', '#17becf', '#8c564b', '#d62728', '#bcbd22', '#9467bd', '#ff7f0e', '#1f77b4'];\n\n // d3/tableau category10/20/20b/20c\n case 'category10':\n return ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'];\n\n case 'category20':\n return ['#1f77b4', '#aec7e8', '#ff7f0e', '#ffbb78', '#2ca02c', '#98df8a', '#d62728', '#ff9896', '#9467bd', '#c5b0d5', '#8c564b', '#c49c94', '#e377c2', '#f7b6d2', '#7f7f7f', '#c7c7c7', '#bcbd22', '#dbdb8d', '#17becf', '#9edae5'];\n\n case 'category20b':\n return ['#393b79', '#5254a3', '#6b6ecf', '#9c9ede', '#637939', '#8ca252', '#b5cf6b', '#cedb9c', '#8c6d31', '#bd9e39', '#e7ba52', '#e7cb94', '#843c39', '#ad494a', '#d6616b', '#e7969c', '#7b4173', '#a55194', '#ce6dbd', '#de9ed6'];\n\n case 'category20c':\n return ['#3182bd', '#6baed6', '#9ecae1', '#c6dbef', '#e6550d', '#fd8d3c', '#fdae6b', '#fdd0a2', '#31a354', '#74c476', '#a1d99b', '#c7e9c0', '#756bb1', '#9e9ac8', '#bcbddc', '#dadaeb', '#636363', '#969696', '#bdbdbd', '#d9d9d9'];\n }\n\n // TODO add our own set of custom ordinal color palette\n\n if (range in colorbrewer) {\n var palette = colorbrewer[range];\n\n // if cardinality pre-defined, use it.\n if (cardinality in palette) return palette[cardinality];\n\n // if not, use the highest cardinality one for nominal\n if (type === N) {\n return palette[Math.max.apply(null, util.keys(palette))];\n }\n\n // otherwise, interpolate\n var ps = cardinality < 3 ? 3 : Math.max.apply(null, util.keys(palette)),\n from = 0 , to = ps - 1;\n // FIXME add config for from / to\n\n return scale.color.interpolate(palette[ps][from], palette[ps][to], cardinality);\n }\n\n return range;\n};\n\nscale.color.interpolate = function (start, end, cardinality) {\n\n var interpolator = interpolate(start, end);\n return util.range(cardinality).map(function(i) { return interpolator(i*1.0/(cardinality-1)); });\n};\n","'use strict';\n\nrequire('../globals');\n\nvar vlfield = require('../field');\n\nmodule.exports = sort;\n\n// adds new transforms that produce sorted fields\nfunction sort(data, encoding, stats, opt) {\n // jshint unused:false\n\n var datasetMapping = {};\n\n encoding.forEach(function(field, encType) {\n var sortBy = encoding.sort(encType, stats);\n if (sortBy.length > 0) {\n var fields = sortBy.map(function(d) {\n return {\n op: d.aggregate,\n field: vlfield.fieldRef(d, {nofn: true, data: !encoding._vega2})\n };\n });\n\n var byClause = sortBy.map(function(d) {\n var reverse = (d.reverse ? '-' : '');\n return reverse + vlfield.fieldRef(d, {data: !encoding._vega2});\n });\n\n var dataName = sort.getDataName(encType);\n\n var transforms = [\n {\n type: 'aggregate',\n groupby: [ encoding.fieldRef(encType) ],\n fields: fields\n },\n {\n type: 'sort',\n by: byClause\n }\n ];\n\n data.push({\n name: dataName,\n source: RAW,\n transform: transforms\n });\n\n datasetMapping[encType] = dataName;\n }\n });\n\n return data;\n}\n\nsort.getDataName = function(encType) {\n return 'sorted-' + encType;\n};\n\n","'use strict';\n\nrequire('../globals');\n\nvar marks = require('./marks');\n\nmodule.exports = stacking;\n\nfunction stacking(data, encoding, mdef) {\n if (!marks[encoding.marktype()].stack) return false;\n\n // TODO: add || encoding.has(LOD) here once LOD is implemented\n if (!encoding.has(COLOR)) return false;\n\n var dim=null, val=null, idx =null,\n isXMeasure = encoding.isMeasure(X),\n isYMeasure = encoding.isMeasure(Y),\n facets = encoding.facets();\n\n if (isXMeasure && !isYMeasure) {\n dim = Y;\n val = X;\n idx = 0;\n } else if (isYMeasure && !isXMeasure) {\n dim = X;\n val = Y;\n idx = 1;\n } else {\n return null; // no stack encoding\n }\n\n // add transform to compute sums for scale\n var stacked = {\n name: STACKED,\n source: encoding.dataTable(),\n transform: [{\n type: 'aggregate',\n groupby: [encoding.fieldRef(dim)].concat(facets), // dim and other facets\n fields: [{op: 'sum', field: encoding.fieldRef(val)}] // TODO check if field with aggregate is correct?\n }]\n };\n\n if (facets && facets.length > 0) {\n stacked.transform.push({ //calculate max for each facet\n type: 'aggregate',\n groupby: facets,\n fields: [{\n op: 'max',\n field: encoding.fieldName(val, {fn: 'sum'})\n }]\n });\n }\n\n data.push(stacked);\n\n // add stack transform to mark\n mdef.from.transform = [{\n type: 'stack',\n point: encoding.fieldRef(dim),\n height: encoding.fieldRef(val),\n output: {y1: val, y0: val + '2'}\n }];\n\n // TODO: This is super hack-ish -- consolidate into modular mark properties?\n mdef.properties.update[val] = mdef.properties.enter[val] = {scale: val, field: val};\n mdef.properties.update[val + '2'] = mdef.properties.enter[val + '2'] = {scale: val, field: val + '2'};\n\n return val; //return stack encoding\n}\n","'use strict';\n\nrequire('../globals');\n\nvar vlfield = require('../field');\n\nmodule.exports = function(encoding, stats) {\n return {\n opacity: estimateOpacity(encoding, stats),\n };\n};\n\nfunction estimateOpacity(encoding,stats) {\n if (!stats) {\n return 1;\n }\n\n var numPoints = 0;\n\n if (encoding.isAggregate()) { // aggregate plot\n numPoints = 1;\n\n // get number of points in each \"cell\"\n // by calculating product of cardinality\n // for each non faceting and non-ordinal X / Y fields\n // note that ordinal x,y are not include since we can\n // consider that ordinal x are subdividing the cell into subcells anyway\n encoding.forEach(function(field, encType) {\n\n if (encType !== ROW && encType !== COL &&\n !((encType === X || encType === Y) &&\n vlfield.isOrdinalScale(field))\n ) {\n numPoints *= encoding.cardinality(encType, stats);\n }\n });\n\n } else { // raw plot\n\n // TODO: error handling\n if (!stats['*'])\n return 1;\n\n numPoints = stats['*'].max; // count\n\n // small multiples divide number of points\n var numMultiples = 1;\n if (encoding.has(ROW)) {\n numMultiples *= encoding.cardinality(ROW, stats);\n }\n if (encoding.has(COL)) {\n numMultiples *= encoding.cardinality(COL, stats);\n }\n numPoints /= numMultiples;\n }\n\n var opacity = 0;\n if (numPoints <= 25) {\n opacity = 1;\n } else if (numPoints < 200) {\n opacity = 0.8;\n } else if (numPoints < 1000 || encoding.is('tick')) {\n opacity = 0.7;\n } else {\n opacity = 0.3;\n }\n\n return opacity;\n}\n\n","'use strict';\n\nrequire('../globals');\n\nvar groupdef = require('./group').def;\n\nmodule.exports = subfaceting;\n\nfunction subfaceting(group, mdef, details, stack, encoding) {\n var m = group.marks,\n g = groupdef('subfacet', {marks: m});\n\n group.marks = [g];\n g.from = mdef.from;\n delete mdef.from;\n\n //TODO test LOD -- we should support stack / line without color (LOD) field\n var trans = (g.from.transform || (g.from.transform = []));\n trans.unshift({type: 'facet', keys: details});\n\n if (stack && encoding.has(COLOR)) {\n trans.unshift({type: 'sort', by: encoding.fieldRef(COLOR)});\n }\n}\n","'use strict';\n\nvar util = require('../util'),\n d3_time_format = require('d3-time-format');\n\nvar time = module.exports = {};\n\nvar LONG_DATE = new Date(2014, 8, 17);\n\ntime.cardinality = function(field, stats, filterNull, type) {\n var timeUnit = field.timeUnit;\n switch (timeUnit) {\n case 'seconds': return 60;\n case 'minutes': return 60;\n case 'hours': return 24;\n case 'day': return 7;\n case 'date': return 31;\n case 'month': return 12;\n case 'year':\n var stat = stats[field.name],\n yearstat = stats['year_'+field.name];\n\n if (!yearstat) { return null; }\n\n return yearstat.distinct -\n (stat.nulls > 0 && filterNull[type] ? 1 : 0);\n }\n\n return null;\n};\n\ntime.formula = function(timeUnit, fieldRef) {\n // TODO(kanitw): add formula to other time format\n var fn = 'utc' + timeUnit;\n return fn + '(' + fieldRef + ')';\n};\n\ntime.maxLength = function(timeUnit, encoding) {\n switch (timeUnit) {\n case 'seconds':\n case 'minutes':\n case 'hours':\n case 'date':\n return 2;\n case 'month':\n case 'day':\n var range = time.range(timeUnit, encoding);\n if (range) {\n // return the longest name in the range\n return Math.max.apply(null, range.map(function(r) {return r.length;}));\n }\n return 2;\n case 'year':\n return 4; //'1998'\n }\n // no time unit\n var timeFormat = encoding.config('timeFormat');\n return d3_time_format.utcFormat(timeFormat)(LONG_DATE).length;\n};\n\ntime.range = function(timeUnit, encoding) {\n var labelLength = encoding.config('timeScaleLabelLength'),\n scaleLabel;\n switch (timeUnit) {\n case 'day':\n scaleLabel = encoding.config('dayScaleLabel');\n break;\n case 'month':\n scaleLabel = encoding.config('monthScaleLabel');\n break;\n }\n if (scaleLabel) {\n return labelLength ? scaleLabel.map(\n function(s) { return s.substr(0, labelLength);}\n ) : scaleLabel;\n }\n return;\n};\n\n\n/**\n * @param {Object} encoding\n * @return {Array} scales for time unit names\n */\ntime.scales = function(encoding) {\n var scales = encoding.reduce(function(scales, field) {\n var timeUnit = field.timeUnit;\n if (field.type === T && timeUnit && !scales[timeUnit]) {\n var scale = time.scale.def(field.timeUnit, encoding);\n if (scale) scales[timeUnit] = scale;\n }\n return scales;\n }, {});\n\n return util.vals(scales);\n};\n\n\ntime.scale = {};\n\n/** append custom time scales for axis label */\ntime.scale.def = function(timeUnit, encoding) {\n var range = time.range(timeUnit, encoding);\n\n if (range) {\n return {\n name: 'time-'+timeUnit,\n type: 'ordinal',\n domain: time.scale.domain(timeUnit),\n range: range\n };\n }\n return null;\n};\n\ntime.isOrdinalFn = function(timeUnit) {\n switch (timeUnit) {\n case 'seconds':\n case 'minutes':\n case 'hours':\n case 'day':\n case 'date':\n case 'month':\n return true;\n }\n return false;\n};\n\ntime.scale.type = function(timeUnit, name) {\n if (name === COLOR) {\n return 'linear'; // time has order, so use interpolated ordinal color scale.\n }\n\n return time.isOrdinalFn(timeUnit) || name === COL || name === ROW ? 'ordinal' : 'linear';\n};\n\ntime.scale.domain = function(timeUnit, name) {\n var isColor = name === COLOR;\n switch (timeUnit) {\n case 'seconds':\n case 'minutes': return isColor ? [0,59] : util.range(0, 60);\n case 'hours': return isColor ? [0,23] : util.range(0, 24);\n case 'day': return isColor ? [0,6] : util.range(0, 7);\n case 'date': return isColor ? [1,31] : util.range(1, 32);\n case 'month': return isColor ? [0,11] : util.range(0, 12);\n }\n return null;\n};\n\n/** whether a particular time function has custom scale for labels implemented in time.scale */\ntime.hasScale = function(timeUnit) {\n switch (timeUnit) {\n case 'day':\n case 'month':\n return true;\n }\n return false;\n};\n","'use strict';\n\nrequire('./globals');\n\nvar consts = module.exports = {};\n\nconsts.encodingTypes = [X, Y, ROW, COL, SIZE, SHAPE, COLOR, TEXT, DETAIL];\n\nconsts.shorthand = {\n delim: '|',\n assign: '=',\n type: ',',\n func: '_'\n};\n","'use strict';\n\nrequire('./globals');\n\nvar stats = require('datalib/src/stats');\n\nvar vldata = module.exports = {};\n\n/** Mapping from datalib's inferred type to Vega-lite's type */\nvldata.types = {\n 'boolean': N,\n 'number': Q,\n 'integer': Q,\n 'date': T,\n 'string': N\n};\n\nvldata.stats = function(data) {\n var summary = stats.summary(data);\n\n return summary.reduce(function(s, profile) {\n s[profile.field] = profile;\n return s;\n }, {\n '*': {\n max: data.length,\n min: 0\n }\n });\n};","// utility for enc\n\n'use strict';\n\nvar consts = require('./consts'),\n c = consts.shorthand,\n vlfield = require('./field'),\n util = require('./util'),\n schema = require('./schema/schema'),\n encTypes = schema.encTypes;\n\nvar vlenc = module.exports = {};\n\nvlenc.countRetinal = function(enc) {\n var count = 0;\n if (enc.color) count++;\n if (enc.size) count++;\n if (enc.shape) count++;\n return count;\n};\n\nvlenc.has = function(enc, encType) {\n var fieldDef = enc && enc[encType];\n return fieldDef && fieldDef.name;\n};\n\nvlenc.isAggregate = function(enc) {\n for (var k in enc) {\n if (vlenc.has(enc, k) && enc[k].aggregate) {\n return true;\n }\n }\n return false;\n};\n\nvlenc.forEach = function(enc, f) {\n var i = 0;\n encTypes.forEach(function(k) {\n if (vlenc.has(enc, k)) {\n f(enc[k], k, i++);\n }\n });\n};\n\nvlenc.map = function(enc, f) {\n var arr = [];\n encTypes.forEach(function(k) {\n if (vlenc.has(enc, k)) {\n arr.push(f(enc[k], k, enc));\n }\n });\n return arr;\n};\n\nvlenc.reduce = function(enc, f, init) {\n var r = init;\n encTypes.forEach(function(k) {\n if (vlenc.has(enc, k)) {\n r = f(r, enc[k], k, enc);\n }\n });\n return r;\n};\n\n/*\n * return key-value pairs of field name and list of fields of that field name\n */\nvlenc.fields = function(enc) {\n return vlenc.reduce(enc, function (m, field) {\n var fieldList = m[field.name] = m[field.name] || [],\n containsType = fieldList.containsType = fieldList.containsType || {};\n\n if (fieldList.indexOf(field) === -1) {\n fieldList.push(field);\n // augment the array with containsType.Q / O / N / T\n containsType[field.type] = true;\n }\n return m;\n }, {});\n};\n\nvlenc.shorthand = function(enc) {\n return vlenc.map(enc, function(field, et) {\n return et + c.assign + vlfield.shorthand(field);\n }).join(c.delim);\n};\n\nvlenc.fromShorthand = function(shorthand) {\n var enc = util.isArray(shorthand) ? shorthand : shorthand.split(c.delim);\n return enc.reduce(function(m, e) {\n var split = e.split(c.assign),\n enctype = split[0].trim(),\n field = split[1];\n\n m[enctype] = vlfield.fromShorthand(field);\n return m;\n }, {});\n};","'use strict';\n\n// utility for field\n\nrequire('./globals');\n\nvar consts = require('./consts'),\n c = consts.shorthand,\n time = require('./compiler/time'),\n util = require('./util'),\n schema = require('./schema/schema');\n\nvar vlfield = module.exports = {};\n\n/**\n * @param field\n * @param opt\n * opt.nofn -- exclude bin, aggregate, timeUnit\n * opt.data - include 'data.'\n * opt.d - include 'd.'\n * opt.fn - replace fn with custom function prefix\n * opt.prefn - prepend fn with custom function prefix\n\n * @return {[type]} [description]\n */\nvlfield.fieldRef = function(field, opt) {\n opt = opt || {};\n\n var f = (opt.d ? 'd.' : '') +\n (opt.data ? 'data.' : '') +\n (opt.prefn || ''),\n nofn = opt.nofn || opt.fn,\n name = field.name;\n\n if (vlfield.isCount(field)) {\n return f + 'count';\n } else if (!nofn && field.bin) {\n return f + 'bin_' + name;\n } else if (!nofn && field.aggregate) {\n return f + field.aggregate + '_' + name;\n } else if (!nofn && field.timeUnit) {\n return f + field.timeUnit + '_' + name;\n } else if (opt.fn) {\n return f + opt.fn + '_' + name;\n } else {\n return f + name;\n }\n};\n\nvlfield.shorthand = function(f) {\n var c = consts.shorthand;\n return (f.aggregate ? f.aggregate + c.func : '') +\n (f.timeUnit ? f.timeUnit + c.func : '') +\n (f.bin ? 'bin' + c.func : '') +\n (f.name || '') + c.type + f.type;\n};\n\nvlfield.shorthands = function(fields, delim) {\n delim = delim || c.delim;\n return fields.map(vlfield.shorthand).join(delim);\n};\n\nvlfield.fromShorthand = function(shorthand) {\n var split = shorthand.split(c.type), i;\n var o = {\n name: split[0].trim(),\n type: split[1].trim()\n };\n\n // check aggregate type\n for (i in schema.aggregate.enum) {\n var a = schema.aggregate.enum[i];\n if (o.name.indexOf(a + '_') === 0) {\n o.name = o.name.substr(a.length + 1);\n if (a == 'count' && o.name.length === 0) o.name = '*';\n o.aggregate = a;\n break;\n }\n }\n\n // check time timeUnit\n for (i in schema.timefns) {\n var tu = schema.timefns[i];\n if (o.name && o.name.indexOf(tu + '_') === 0) {\n o.name = o.name.substr(o.length + 1);\n o.timeUnit = tu;\n break;\n }\n }\n\n // check bin\n if (o.name && o.name.indexOf('bin_') === 0) {\n o.name = o.name.substr(4);\n o.bin = true;\n }\n\n return o;\n};\n\nvar isType = vlfield.isType = function (fieldDef, type) {\n return fieldDef.type === type;\n};\n\nvar isTypes = vlfield.isTypes = function (fieldDef, types) {\n for (var t=0; t 0 && filterNull[type] ? 1 : 0);\n};\n","'use strict';\n\n// declare global constant\nvar g = global || window;\n\ng.AGGREGATE = 'aggregate';\ng.RAW = 'raw';\ng.STACKED = 'stacked';\ng.INDEX = 'index';\n\ng.X = 'x';\ng.Y = 'y';\ng.ROW = 'row';\ng.COL = 'col';\ng.SIZE = 'size';\ng.SHAPE = 'shape';\ng.COLOR = 'color';\ng.TEXT = 'text';\ng.DETAIL = 'detail';\n\ng.N = 'N';\ng.O = 'O';\ng.Q = 'Q';\ng.T = 'T';\n","'use strict';\n\n// TODO(kanitw): chat with Vega team and possibly move this to vega-logging\nmodule.exports = function(prefix) {\n // Borrowed some ideas from http://stackoverflow.com/a/15653260/866989\n // and https://github.com/patik/console.log-wrapper/blob/master/consolelog.js\n var METHODS = ['error', 'info', 'debug', 'warn', 'log'];\n\n return METHODS.reduce(function(logger, fn) {\n var cfn = console[fn] ? fn : 'log';\n if (console[cfn].bind === 'undefined') { // IE < 10\n logger[fn] = Function.prototype.bind.call(console[cfn], console, prefix);\n }\n else {\n logger[fn] = console[cfn].bind(console, prefix);\n }\n return logger;\n }, {});\n};","// Package of defining Vega-lite Specification's json schema\n'use strict';\n\nrequire('../globals');\n\nvar schema = module.exports = {},\n util = require('../util'),\n toMap = util.toMap,\n colorbrewer = require('colorbrewer');\n\nschema.util = require('./schemautil');\n\nschema.marktype = {\n type: 'string',\n enum: ['point', 'tick', 'bar', 'line', 'area', 'circle', 'square', 'text']\n};\n\nschema.aggregate = {\n type: 'string',\n enum: ['avg', 'sum', 'median', 'min', 'max', 'count'],\n supportedEnums: {\n Q: ['avg', 'median', 'sum', 'min', 'max', 'count'],\n O: ['median','min','max'],\n N: [],\n T: ['avg', 'median', 'min', 'max'],\n '': ['count']\n },\n supportedTypes: toMap([Q, N, O, T, ''])\n};\n\nschema.getSupportedRole = function(encType) {\n return schema.schema.properties.encoding.properties[encType].supportedRole;\n};\n\nschema.timeUnits = ['year', 'month', 'day', 'date', 'hours', 'minutes', 'seconds'];\n\nschema.defaultTimeFn = 'month';\n\nschema.timeUnit = {\n type: 'string',\n enum: schema.timeUnits,\n supportedTypes: toMap([T])\n};\n\nschema.scale_type = {\n type: 'string',\n // TODO(kanitw) read vega's schema here, add description\n enum: ['linear', 'log', 'pow', 'sqrt', 'quantile'],\n default: 'linear',\n supportedTypes: toMap([Q])\n};\n\nschema.field = {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n }\n }\n};\n\nvar clone = util.duplicate;\nvar merge = schema.util.merge;\n\nschema.MAXBINS_DEFAULT = 15;\n\nvar bin = {\n type: ['boolean', 'object'],\n default: false,\n properties: {\n maxbins: {\n type: 'integer',\n default: schema.MAXBINS_DEFAULT,\n minimum: 2,\n description: 'Maximum number of bins.'\n }\n },\n supportedTypes: toMap([Q]) // TODO: add O after finishing #81\n};\n\nvar typicalField = merge(clone(schema.field), {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: [N, O, Q, T]\n },\n aggregate: schema.aggregate,\n timeUnit: schema.timeUnit,\n bin: bin,\n scale: {\n type: 'object',\n properties: {\n type: schema.scale_type,\n reverse: {\n type: 'boolean',\n default: false,\n supportedTypes: toMap([Q, T])\n },\n zero: {\n type: 'boolean',\n description: 'Include zero',\n default: true,\n supportedTypes: toMap([Q, T])\n },\n nice: {\n type: 'string',\n enum: ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'],\n supportedTypes: toMap([T])\n },\n useRawDomain: {\n type: 'boolean',\n default: undefined,\n description: 'Use the raw data range as scale domain instead of ' +\n 'aggregated data for aggregate axis. ' +\n 'This option does not work with sum or count aggregate' +\n 'as they might have a substantially larger scale range.' +\n 'By default, use value from config.useRawDomain.'\n }\n }\n }\n }\n});\n\nvar onlyOrdinalField = merge(clone(schema.field), {\n type: 'object',\n supportedRole: {\n dimension: true\n },\n properties: {\n type: {\n type: 'string',\n enum: [N, O, Q, T] // ordinal-only field supports Q when bin is applied and T when time unit is applied.\n },\n timeUnit: schema.timeUnit,\n bin: bin,\n aggregate: {\n type: 'string',\n enum: ['count'],\n supportedTypes: toMap([N, O]) // FIXME this looks weird to me\n }\n }\n});\n\nvar axisMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true},\n properties: {\n axis: {\n type: 'object',\n properties: {\n grid: {\n type: 'boolean',\n default: true,\n description: 'A flag indicate if gridlines should be created in addition to ticks.'\n },\n layer: {\n type: 'string',\n default: 'back',\n description: 'A string indicating if the axis (and any gridlines) should be placed above or below the data marks.'\n },\n orient: {\n type: 'string',\n default: undefined,\n enum: ['top', 'right', 'left', 'bottom'],\n description: 'The orientation of the axis. One of top, bottom, left or right. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart).'\n },\n ticks: {\n type: 'integer',\n default: 5,\n description: 'A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale\\'s range.'\n },\n title: {\n type: 'string',\n default: undefined,\n description: 'A title for the axis. (Shows field name and its function by default.)'\n },\n titleMaxLength: {\n type: 'integer',\n default: undefined,\n description: 'Max length for axis title if the title is automatically generated from the field\\'s description'\n },\n titleOffset: {\n type: 'integer',\n default: undefined, // auto\n description: 'A title offset value for the axis.'\n },\n format: {\n type: 'string',\n default: undefined, // auto\n description: 'The formatting pattern for axis labels. '+\n 'If not undefined, this will be determined by ' +\n 'small/largeNumberFormat and the max value ' +\n 'of the field.'\n },\n maxLabelLength: {\n type: 'integer',\n default: 25,\n minimum: 0,\n description: 'Truncate labels that are too long.'\n },\n labelAngle: {\n type: 'integer',\n default: undefined, // auto\n description: 'Angle by which to rotate labels. Set to 0 to force horizontal.'\n },\n }\n }\n }\n};\n\nvar sortMixin = {\n type: 'object',\n properties: {\n sort: {\n type: 'array',\n default: [],\n items: {\n type: 'object',\n supportedTypes: toMap([N, O]),\n required: ['name', 'aggregate'],\n properties: {\n name: {\n type: 'string'\n },\n aggregate: {\n type: 'string',\n enum: ['avg', 'sum', 'min', 'max', 'count']\n },\n reverse: {\n type: 'boolean',\n default: false\n }\n }\n }\n }\n }\n};\n\nvar bandMixin = {\n type: 'object',\n properties: {\n band: {\n type: 'object',\n properties: {\n size: {\n type: 'integer',\n minimum: 0,\n default: undefined\n },\n padding: {\n type: 'integer',\n minimum: 0,\n default: 1\n }\n }\n }\n }\n};\n\nvar legendMixin = {\n type: 'object',\n properties: {\n legend: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n default: undefined,\n description: 'A title for the legend. (Shows field name and its function by default.)'\n }\n }\n }\n }\n};\n\nvar textMixin = {\n type: 'object',\n supportedMarktypes: {'text': true},\n properties: {\n align: {\n type: 'string',\n default: 'right'\n },\n baseline: {\n type: 'string',\n default: 'middle'\n },\n color: {\n type: 'string',\n role: 'color',\n default: '#000000'\n },\n margin: {\n type: 'integer',\n default: 4,\n minimum: 0\n },\n placeholder: {\n type: 'string',\n default: 'Abc'\n },\n font: {\n type: 'object',\n properties: {\n weight: {\n type: 'string',\n enum: ['normal', 'bold'],\n default: 'normal'\n },\n size: {\n type: 'integer',\n default: 10,\n minimum: 0\n },\n family: {\n type: 'string',\n default: 'Helvetica Neue'\n },\n style: {\n type: 'string',\n default: 'normal',\n enum: ['normal', 'italic']\n }\n }\n },\n format: {\n type: 'string',\n default: undefined, // auto\n description: 'The formatting pattern for text value. '+\n 'If not undefined, this will be determined by ' +\n 'small/largeNumberFormat and the max value ' +\n 'of the field.'\n },\n }\n};\n\nvar sizeMixin = {\n type: 'object',\n supportedMarktypes: {point: true, bar: true, circle: true, square: true, text: true},\n properties: {\n value: {\n type: 'integer',\n default: 30,\n minimum: 0\n }\n }\n};\n\nvar colorMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true, 'text': true},\n properties: {\n value: {\n type: 'string',\n role: 'color',\n default: 'steelblue'\n },\n opacity: {\n type: 'number',\n default: undefined, // auto\n minimum: 0,\n maximum: 1\n },\n scale: {\n type: 'object',\n properties: {\n range: {\n type: ['string', 'array'],\n default: undefined,\n description:\n 'color palette, if undefined vega-lite will use data property' +\n 'to pick one from c10palette, c20palette, or ordinalPalette'\n //FIXME\n },\n c10palette: {\n type: 'string',\n default: 'category10',\n enum: [\n // Tableau\n 'category10', 'category10k',\n // Color Brewer\n 'Pastel1', 'Pastel2', 'Set1', 'Set2', 'Set3'\n ]\n },\n c20palette: {\n type: 'string',\n default: 'category20',\n enum: ['category20', 'category20b', 'category20c']\n },\n ordinalPalette: {\n type: 'string',\n default: undefined,\n enum: util.keys(colorbrewer)\n },\n quantitativeRange: {\n type: 'array',\n default: ['#AFC6A3', '#09622A'], // tableau greens\n // default: ['#ccece6', '#00441b'], // BuGn.9 [2-8]\n items: {\n type: 'string',\n role: 'color'\n }\n }\n }\n }\n }\n};\n\nvar shapeMixin = {\n type: 'object',\n supportedMarktypes: {point: true, circle: true, square: true},\n properties: {\n value: {\n type: 'string',\n enum: ['circle', 'square', 'cross', 'diamond', 'triangle-up', 'triangle-down'],\n default: 'circle'\n },\n filled: {\n type: 'boolean',\n default: false,\n description: 'whether the shape\\'s color should be used as fill color instead of stroke color'\n }\n }\n};\n\nvar detailMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, line: true, circle: true, square: true}\n};\n\nvar rowMixin = {\n properties: {\n height: {\n type: 'number',\n minimum: 0,\n default: 150\n }\n }\n};\n\nvar colMixin = {\n properties: {\n width: {\n type: 'number',\n minimum: 0,\n default: 150\n },\n axis: {\n properties: {\n maxLabelLength: {\n type: 'integer',\n default: 12,\n minimum: 0,\n description: 'Truncate labels that are too long.'\n }\n }\n }\n }\n};\n\nvar facetMixin = {\n type: 'object',\n supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true, text: true},\n properties: {\n padding: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n default: 0.1\n }\n }\n};\n\nvar requiredNameType = {\n required: ['name', 'type']\n};\n\nvar multiRoleField = merge(clone(typicalField), {\n supportedRole: {\n measure: true,\n dimension: true\n }\n});\n\nvar quantitativeField = merge(clone(typicalField), {\n supportedRole: {\n measure: true,\n dimension: 'ordinal-only' // using size to encoding category lead to order interpretation\n }\n});\n\nvar onlyQuantitativeField = merge(clone(typicalField), {\n supportedRole: {\n measure: true\n }\n});\n\nvar x = merge(clone(multiRoleField), axisMixin, bandMixin, requiredNameType, sortMixin);\nvar y = clone(x);\n\nvar facet = merge(clone(onlyOrdinalField), requiredNameType, facetMixin, sortMixin);\nvar row = merge(clone(facet), axisMixin, rowMixin);\nvar col = merge(clone(facet), axisMixin, colMixin);\n\nvar size = merge(clone(quantitativeField), legendMixin, sizeMixin, sortMixin);\nvar color = merge(clone(multiRoleField), legendMixin, colorMixin, sortMixin);\n\nvar shape = merge(clone(onlyOrdinalField), legendMixin, shapeMixin, sortMixin);\nvar detail = merge(clone(onlyOrdinalField), detailMixin, sortMixin);\n\n// we only put aggregated measure in pivot table\nvar text = merge(clone(onlyQuantitativeField), textMixin, sortMixin);\n\n// TODO add label\n\nvar filter = {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n operands: {\n type: 'array',\n items: {\n type: ['string', 'boolean', 'integer', 'number']\n }\n },\n operator: {\n type: 'string',\n enum: ['>', '>=', '=', '!=', '<', '<=', 'notNull']\n }\n }\n }\n};\n\nvar data = {\n type: 'object',\n properties: {\n // data source\n formatType: {\n type: 'string',\n enum: ['json', 'csv'],\n default: 'json'\n },\n url: {\n type: 'string',\n default: undefined\n },\n values: {\n type: 'array',\n default: undefined,\n description: 'Pass array of objects instead of a url to a file.',\n items: {\n type: 'object',\n additionalProperties: true\n }\n }\n }\n};\n\nvar config = {\n type: 'object',\n properties: {\n // template\n width: {\n type: 'integer',\n default: undefined\n },\n height: {\n type: 'integer',\n default: undefined\n },\n viewport: {\n type: 'array',\n items: {\n type: 'integer'\n },\n default: undefined\n },\n gridColor: {\n type: 'string',\n role: 'color',\n default: 'black'\n },\n gridOpacity: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n default: 0.08\n },\n\n // filter null\n filterNull: {\n type: 'object',\n properties: {\n O: {type:'boolean', default: false},\n Q: {type:'boolean', default: true},\n T: {type:'boolean', default: true}\n }\n },\n toggleSort: {\n type: 'string',\n default: O\n },\n\n // single plot\n singleHeight: {\n // will be overwritten by bandWidth * (cardinality + padding)\n type: 'integer',\n default: 200,\n minimum: 0\n },\n singleWidth: {\n // will be overwritten by bandWidth * (cardinality + padding)\n type: 'integer',\n default: 200,\n minimum: 0\n },\n // band size\n largeBandSize: {\n type: 'integer',\n default: 21,\n minimum: 0\n },\n smallBandSize: {\n //small multiples or single plot with high cardinality\n type: 'integer',\n default: 12,\n minimum: 0\n },\n largeBandMaxCardinality: {\n type: 'integer',\n default: 10\n },\n // small multiples\n cellPadding: {\n type: 'number',\n default: 0.1\n },\n cellGridColor: {\n type: 'string',\n role: 'color',\n default: 'black'\n },\n cellGridOpacity: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n default: 0.15\n },\n cellBackgroundColor: {\n type: 'string',\n role: 'color',\n default: 'transparent'\n },\n textCellWidth: {\n type: 'integer',\n default: 90,\n minimum: 0\n },\n\n // marks\n strokeWidth: {\n type: 'integer',\n default: 2,\n minimum: 0\n },\n singleBarOffset: {\n type: 'integer',\n default: 5,\n minimum: 0\n },\n // scales\n timeScaleLabelLength: {\n type: 'integer',\n default: 3,\n minimum: 0,\n description: 'Max length for values in dayScaleLabel and monthScaleLabel. Zero means using full names in dayScaleLabel/monthScaleLabel.'\n },\n dayScaleLabel: {\n type: 'array',\n items: {\n type: 'string'\n },\n default: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n description: 'Axis labels for day of week, starting from Sunday.' +\n '(Consistent with Javascript -- See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay.'\n },\n monthScaleLabel: {\n type: 'array',\n items: {\n type: 'string'\n },\n default: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n description: 'Axis labels for month.'\n },\n // other\n characterWidth: {\n type: 'integer',\n default: 6\n },\n maxSmallNumber: {\n type: 'number',\n default: 10000,\n description: 'maximum number that a field will be considered smallNumber.'+\n 'Used for axis labelling.'\n },\n smallNumberFormat: {\n type: 'string',\n default: '',\n description: 'D3 Number format for axis labels and text tables '+\n 'for number <= maxSmallNumber. Used for axis labelling.'\n },\n largeNumberFormat: {\n type: 'string',\n default: '.3s',\n description: 'D3 Number format for axis labels and text tables ' +\n 'for number > maxSmallNumber.'\n },\n timeFormat: {\n type: 'string',\n default: '%Y-%m-%d',\n description: 'Date format for axis labels.'\n },\n useRawDomain: {\n type: 'boolean',\n default: false,\n description: 'Use the raw data range as scale domain instead of ' +\n 'aggregated data for aggregate axis. ' +\n 'This option does not work with sum or count aggregate' +\n 'as they might have a substantially larger scale range.' +\n 'By default, use value from config.useRawDomain.'\n }\n }\n};\n\n/** @type Object Schema of a vega-lite specification */\nschema.schema = {\n $schema: 'http://json-schema.org/draft-04/schema#',\n description: 'Schema for Vega-lite specification',\n type: 'object',\n required: ['marktype', 'encoding', 'data'],\n properties: {\n data: data,\n marktype: schema.marktype,\n encoding: {\n type: 'object',\n properties: {\n x: x,\n y: y,\n row: row,\n col: col,\n size: size,\n color: color,\n shape: shape,\n text: text,\n detail: detail\n }\n },\n filter: filter,\n config: config\n }\n};\n\nschema.encTypes = util.keys(schema.schema.properties.encoding.properties);\n\n/** Instantiate a verbose vl spec from the schema */\nschema.instantiate = function() {\n return schema.util.instantiate(schema.schema);\n};\n","'use strict';\n\nvar schemautil = module.exports = {},\n util = require('../util');\n\nvar isEmpty = function(obj) {\n return Object.keys(obj).length === 0;\n};\n\nschemautil.extend = function(instance, schema) {\n return schemautil.merge(schemautil.instantiate(schema), instance);\n};\n\n// instantiate a schema\nschemautil.instantiate = function(schema) {\n var val;\n if (schema === undefined) {\n return undefined;\n } else if ('default' in schema) {\n val = schema.default;\n return util.isObject(val) ? util.duplicate(val) : val;\n } else if (schema.type === 'object') {\n var instance = {};\n for (var name in schema.properties) {\n val = schemautil.instantiate(schema.properties[name]);\n if (val !== undefined) {\n instance[name] = val;\n }\n }\n return instance;\n } else if (schema.type === 'array') {\n return [];\n }\n return undefined;\n};\n\n// remove all defaults from an instance\nschemautil.subtract = function(instance, defaults) {\n var changes = {};\n for (var prop in instance) {\n var def = defaults[prop];\n var ins = instance[prop];\n // Note: does not properly subtract arrays\n if (!defaults || def !== ins) {\n if (typeof ins === 'object' && !util.isArray(ins) && def) {\n var c = schemautil.subtract(ins, def);\n if (!isEmpty(c))\n changes[prop] = c;\n } else if (!util.isArray(ins) || ins.length > 0) {\n changes[prop] = ins;\n }\n }\n }\n return changes;\n};\n\nschemautil.merge = function(/*dest*, src0, src1, ...*/){\n var dest = arguments[0];\n for (var i=1 ; i