billboard.js 3.7.0-next.1 → 3.7.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/billboard.css +6 -1
  2. package/dist/billboard.js +1196 -699
  3. package/dist/billboard.min.css +2 -2
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +2180 -1057
  6. package/dist/billboard.pkgd.min.js +4 -3
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +29 -22
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +29 -22
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +15 -13
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +15 -13
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +219 -158
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +270 -238
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +321 -295
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +258 -231
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +464 -445
  22. package/dist/theme/datalab.css +6 -1
  23. package/dist/theme/datalab.min.css +2 -2
  24. package/dist/theme/graph.css +6 -1
  25. package/dist/theme/graph.min.css +2 -2
  26. package/dist/theme/insight.css +6 -1
  27. package/dist/theme/insight.min.css +2 -2
  28. package/dist-esm/billboard.js +577 -180
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +3 -5
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +10 -9
  31. package/dist-esm/plugin/billboardjs-plugin-stanford.js +10 -9
  32. package/dist-esm/plugin/billboardjs-plugin-tableview.js +4 -8
  33. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +3 -5
  34. package/package.json +17 -16
  35. package/src/Chart/api/legend.ts +1 -0
  36. package/src/Chart/api/load.ts +1 -0
  37. package/src/Chart/api/tooltip.ts +11 -2
  38. package/src/ChartInternal/ChartInternal.ts +35 -25
  39. package/src/ChartInternal/data/IData.ts +8 -0
  40. package/src/ChartInternal/data/convert.helper.ts +35 -21
  41. package/src/ChartInternal/data/data.ts +5 -3
  42. package/src/ChartInternal/data/load.ts +3 -0
  43. package/src/ChartInternal/interactions/interaction.ts +42 -33
  44. package/src/ChartInternal/internals/class.ts +3 -4
  45. package/src/ChartInternal/internals/clip.ts +13 -10
  46. package/src/ChartInternal/internals/legend.ts +3 -2
  47. package/src/ChartInternal/internals/redraw.ts +12 -5
  48. package/src/ChartInternal/internals/scale.ts +7 -2
  49. package/src/ChartInternal/internals/size.ts +41 -26
  50. package/src/ChartInternal/internals/text.ts +60 -32
  51. package/src/ChartInternal/internals/tooltip.ts +12 -8
  52. package/src/ChartInternal/internals/transform.ts +2 -2
  53. package/src/ChartInternal/internals/type.ts +6 -1
  54. package/src/ChartInternal/shape/bar.ts +1 -1
  55. package/src/ChartInternal/shape/radar.ts +2 -2
  56. package/src/ChartInternal/shape/shape.ts +10 -5
  57. package/src/ChartInternal/shape/treemap.ts +293 -0
  58. package/src/config/Options/data/data.ts +6 -3
  59. package/src/config/Options/shape/arc.ts +1 -1
  60. package/src/config/Options/shape/pie.ts +1 -1
  61. package/src/config/Options/shape/polar.ts +1 -1
  62. package/src/config/Options/shape/radar.ts +1 -1
  63. package/src/config/Options/shape/spline.ts +1 -1
  64. package/src/config/Options/shape/treemap.ts +53 -0
  65. package/src/config/Store/State.ts +1 -0
  66. package/src/config/classes.ts +7 -0
  67. package/src/config/const.ts +4 -2
  68. package/src/config/resolver/shape.ts +9 -1
  69. package/src/index.esm.ts +2 -1
  70. package/src/scss/billboard.scss +6 -0
  71. package/src/scss/theme/datalab.scss +6 -0
  72. package/src/scss/theme/graph.scss +6 -0
  73. package/src/scss/theme/insight.scss +6 -0
  74. package/types/bb.d.ts +1 -0
  75. package/types/index.d.ts +1 -0
  76. package/types/options.d.ts +4 -1
  77. package/types/options.shape.d.ts +31 -0
  78. package/types/types.d.ts +2 -1
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.0-next.1
8
+ * @version 3.7.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -186,7 +186,7 @@ var Plugin = /*#__PURE__*/function () {
186
186
  };
187
187
  return Plugin;
188
188
  }();
189
- Plugin.version = "3.7.0-next.1";
189
+ Plugin.version = "3.7.0-next.2";
190
190
 
191
191
  ;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts
192
192
 
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.0-next.1
8
+ * @version 3.7.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}i.d(r,{default:function(){return u}});var o=i(1),s=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();s.version="3.7.0-next.1";var u=function(i){var r,s;function u(t){var n=i.call(this,t)||this;return n.$$=void 0,e(n)||e(n)}s=i,(r=u).prototype=Object.create(s.prototype),r.prototype.constructor=r,n(r,s);var a=u.prototype;return a.$init=function(){var t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},a.pointExpandedR=function(t){var e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,o.select)(t.node().parentNode.parentNode).raise()},a.changeCursorPoint=function(){this.$$.$el.svg.select(".bb-event-rect").style("cursor","pointer")},a.findClosest=function(e,n){var i=this,r=this.$$;return e.filter(function(e){return t(this,i),e&&!r.isBarType(e.id)}.bind(this)).reduce(function(e,o){return t(this,i),r.dist(o,n)<this.getBubbleR(o)?o:e}.bind(this),0)},a.getBubbleR=function(e){var n=this,i=this.options,r=i.minR,o=i.maxR,s=this.getZData(e);if(!s)return r;var u=this.$$.data.targets.reduce(function(e,i){var r=e[0],o=e[1];t(this,n);var s=this.getZData(i.values[0]);return[Math.min(r,s),Math.max(o,s)]}.bind(this),[1e4,0]),a=u[0],c=u[1],f=a>0&&c===a?0:s/c;return Math.abs(f)*(o-r)+r},a.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(s);u.version="0.0.1"}(),r=r.default}()}));
12
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}i.d(r,{default:function(){return u}});var o=i(1),s=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();s.version="3.7.0-next.2";var u=function(i){var r,s;function u(t){var n=i.call(this,t)||this;return n.$$=void 0,e(n)||e(n)}s=i,(r=u).prototype=Object.create(s.prototype),r.prototype.constructor=r,n(r,s);var a=u.prototype;return a.$init=function(){var t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},a.pointExpandedR=function(t){var e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,o.select)(t.node().parentNode.parentNode).raise()},a.changeCursorPoint=function(){this.$$.$el.svg.select(".bb-event-rect").style("cursor","pointer")},a.findClosest=function(e,n){var i=this,r=this.$$;return e.filter(function(e){return t(this,i),e&&!r.isBarType(e.id)}.bind(this)).reduce(function(e,o){return t(this,i),r.dist(o,n)<this.getBubbleR(o)?o:e}.bind(this),0)},a.getBubbleR=function(e){var n=this,i=this.options,r=i.minR,o=i.maxR,s=this.getZData(e);if(!s)return r;var u=this.$$.data.targets.reduce(function(e,i){var r=e[0],o=e[1];t(this,n);var s=this.getZData(i.values[0]);return[Math.min(r,s),Math.max(o,s)]}.bind(this),[1e4,0]),a=u[0],c=u[1],f=a>0&&c===a?0:s/c;return Math.abs(f)*(o-r)+r},a.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(s);u.version="0.0.1"}(),r=r.default}()}));
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.0-next.1
8
+ * @version 3.7.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -317,11 +317,16 @@ var $TOOLTIP = {
317
317
  tooltipContainer: "bb-tooltip-container",
318
318
  tooltipName: "bb-tooltip-name"
319
319
  };
320
+ var $TREEMAP = {
321
+ treemap: "bb-treemap",
322
+ chartTreemap: "bb-chart-treemap",
323
+ chartTreemaps: "bb-chart-treemaps"
324
+ };
320
325
  var $ZOOM = {
321
326
  buttonZoomReset: "bb-zoom-reset",
322
327
  zoomBrush: "bb-zoom-brush"
323
328
  };
324
- /* harmony default export */ var classes = (_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, $COMMON), $ARC), $AREA), $AXIS), $BAR), $CANDLESTICK), $CIRCLE), $COLOR), $DRAG), $GAUGE), $LEGEND), $LINE), $EVENT), $FOCUS), $GRID), $RADAR), $REGION), $SELECT), $SHAPE), $SUBCHART), $TEXT), $TOOLTIP), $ZOOM));
329
+ /* harmony default export */ var classes = (_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, $COMMON), $ARC), $AREA), $AXIS), $BAR), $CANDLESTICK), $CIRCLE), $COLOR), $DRAG), $GAUGE), $LEGEND), $LINE), $EVENT), $FOCUS), $GRID), $RADAR), $REGION), $SELECT), $SHAPE), $SUBCHART), $TEXT), $TOOLTIP), $TREEMAP), $ZOOM));
325
330
  ;// CONCATENATED MODULE: ./src/Plugin/Plugin.ts
326
331
 
327
332
  /**
@@ -395,7 +400,7 @@ var Plugin = /*#__PURE__*/function () {
395
400
  };
396
401
  return Plugin;
397
402
  }();
398
- Plugin.version = "3.7.0-next.1";
403
+ Plugin.version = "3.7.0-next.2";
399
404
 
400
405
  ;// CONCATENATED MODULE: ./src/Plugin/sparkline/Options.ts
401
406
  /**
@@ -575,7 +580,8 @@ function hasValue(dict, value) {
575
580
  * @private
576
581
  */
577
582
  function callFn(fn, thisArg) {
578
- for (var isFn = isFunction(fn), _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
583
+ var isFn = isFunction(fn);
584
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
579
585
  args[_key - 2] = arguments[_key];
580
586
  }
581
587
  isFn && fn.call.apply(fn, [thisArg].concat(args));
@@ -747,8 +753,9 @@ function getPointer(event, element) {
747
753
  function getBrushSelection(ctx) {
748
754
  var event = ctx.event,
749
755
  $el = ctx.$el,
750
- main = $el.subchart.main || $el.main,
751
- selection;
756
+ main = $el.subchart.main || $el.main;
757
+ var selection;
758
+
752
759
  // check from event
753
760
  if (event && event.type === "brush") {
754
761
  selection = event.selection;
@@ -807,8 +814,8 @@ function findIndex(arr, v, start, end, isRotated) {
807
814
  if (start > end) {
808
815
  return -1;
809
816
  }
810
- var mid = Math.floor((start + end) / 2),
811
- _arr$mid = arr[mid],
817
+ var mid = Math.floor((start + end) / 2);
818
+ var _arr$mid = arr[mid],
812
819
  x = _arr$mid.x,
813
820
  _arr$mid$w = _arr$mid.w,
814
821
  w = _arr$mid$w === void 0 ? 0 : _arr$mid$w;
@@ -846,12 +853,12 @@ function brushEmpty(ctx) {
846
853
  * @private
847
854
  */
848
855
  function deepClone() {
849
- for (var _this6 = this, clone = function (v) {
856
+ for (var _this6 = this, _clone = function clone(v) {
850
857
  _newArrowCheck(this, _this6);
851
858
  if (isObject(v) && v.constructor) {
852
859
  var r = new v.constructor();
853
860
  for (var k in v) {
854
- r[k] = clone(v[k]);
861
+ r[k] = _clone(v[k]);
855
862
  }
856
863
  return r;
857
864
  }
@@ -861,7 +868,7 @@ function deepClone() {
861
868
  }
862
869
  return objectN.map(function (v) {
863
870
  _newArrowCheck(this, _this6);
864
- return clone(v);
871
+ return _clone(v);
865
872
  }.bind(this)).reduce(function (a, c) {
866
873
  _newArrowCheck(this, _this6);
867
874
  return util_objectSpread(util_objectSpread({}, a), c);
@@ -1338,12 +1345,12 @@ function loadConfig(config) {
1338
1345
  target,
1339
1346
  keys,
1340
1347
  read,
1341
- find = function () {
1348
+ _find = function find() {
1342
1349
  _newArrowCheck(this, _this);
1343
1350
  var key = keys.shift();
1344
1351
  if (key && target && isObjectType(target) && key in target) {
1345
1352
  target = target[key];
1346
- return find();
1353
+ return _find();
1347
1354
  } else if (!key) {
1348
1355
  return target;
1349
1356
  }
@@ -1353,7 +1360,7 @@ function loadConfig(config) {
1353
1360
  _newArrowCheck(this, _this);
1354
1361
  target = config;
1355
1362
  keys = key.split("_");
1356
- read = find();
1363
+ read = _find();
1357
1364
  if (isDefined(read)) {
1358
1365
  thisConfig[key] = read;
1359
1366
  }
@@ -1450,8 +1457,8 @@ var Sparkline = /*#__PURE__*/function (_Plugin) {
1450
1457
  };
1451
1458
  _proto.validate = function validate() {
1452
1459
  var $$ = this.$$,
1453
- config = this.config,
1454
- msg = "";
1460
+ config = this.config;
1461
+ var msg = "";
1455
1462
  if (!config.selector || !document.querySelector(config.selector)) {
1456
1463
  msg = "No holder elements found from given selector option.";
1457
1464
  }
@@ -1501,8 +1508,8 @@ var Sparkline = /*#__PURE__*/function (_Plugin) {
1501
1508
  config.axis_y_show = !1;
1502
1509
  if (!config.tooltip_position) {
1503
1510
  config.tooltip_position = function (data, width, height) {
1504
- var event = this.internal.state.event,
1505
- top = event.pageY - height * 1.35,
1511
+ var event = this.internal.state.event;
1512
+ var top = event.pageY - height * 1.35,
1506
1513
  left = event.pageX - width / 2;
1507
1514
  if (top < 0) {
1508
1515
  top = 0;
@@ -1579,12 +1586,12 @@ var Sparkline = /*#__PURE__*/function (_Plugin) {
1579
1586
  };
1580
1587
  _proto.$redraw = function $redraw() {
1581
1588
  var _$el$chart$html$match,
1589
+ _this4 = this,
1582
1590
  $$ = this.$$,
1583
1591
  $el = $$.$el,
1584
1592
  el = this.element,
1585
1593
  data = $$.api.data(),
1586
- svgWrapper = (_$el$chart$html$match = $el.chart.html().match(/<svg[^>]*>/)) == null ? void 0 : _$el$chart$html$match[0],
1587
- _this4 = this;
1594
+ svgWrapper = (_$el$chart$html$match = $el.chart.html().match(/<svg[^>]*>/)) == null ? void 0 : _$el$chart$html$match[0];
1588
1595
  // append sparkline holder if is less than the data length
1589
1596
  if (el.length < data.length) {
1590
1597
  var chart = $el.chart.node();
@@ -1600,8 +1607,8 @@ var Sparkline = /*#__PURE__*/function (_Plugin) {
1600
1607
  }.bind(this)).forEach(function (id, i) {
1601
1608
  _newArrowCheck(this, _this4);
1602
1609
  var selector = "." + $COMMON.target + "-" + id,
1603
- shape = $el.main.selectAll(selector),
1604
- svg = el[i].querySelector("svg");
1610
+ shape = $el.main.selectAll(selector);
1611
+ var svg = el[i].querySelector("svg");
1605
1612
  if (!svg) {
1606
1613
  el[i].innerHTML = svgWrapper + "</svg>";
1607
1614
  svg = el[i].querySelector("svg");
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.0-next.1
8
+ * @version 3.7.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.sparkline=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n=[,function(e){e.exports=t},,function(t){t.exports=e}],i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={exports:{}};return n[t](o,o.exports,r),o.exports}r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var o={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function s(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}function a(t,e,n){return(e=s(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function b(t){for(var e,n=1;n<arguments.length;n++)e=null!=arguments[n]?arguments[n]:{},n%2?c(Object(e),!0).forEach((function(n){a(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}r.d(o,{default:function(){return T}});var l={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"},u=(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b({},l),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),{tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"}),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}());u.version="3.7.0-next.1";var d=function(){return{selector:void 0}},h=(r(1),r(3),void 0),f=function(){return t(this,h),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)();f.requestIdleCallback=f.requestIdleCallback||function(e){return t(this,h),setTimeout(e,1)}.bind(void 0),f.requestAnimationFrame=f.requestAnimationFrame||function(e){return t(this,h),setTimeout(e,1)}.bind(void 0);var v=null==f?void 0:f.document,g=void 0;(function(e){return t(this,g),e||0===e}).bind(void 0),function(e){return t(this,g),"function"==typeof e}.bind(void 0);var p=function(e){return t(this,g),"string"==typeof e}.bind(void 0),y=function(e){return t(this,g),"number"==typeof e}.bind(void 0),m=function(e){return t(this,g),void 0===e}.bind(void 0),x=function(e){return t(this,g),void 0!==e}.bind(void 0),O=(function(e){return t(this,g),"boolean"==typeof e}.bind(void 0),function(e){return t(this,g),10*Math.ceil(e/10)}.bind(void 0),function(e){return t(this,g),Math.ceil(e)+.5}.bind(void 0),function(e){return t(this,g),e[1]-e[0]}.bind(void 0),function(e){return t(this,g),"object"==typeof e}.bind(void 0)),j=function(e){return t(this,g),m(e)||null===e||p(e)&&0===e.length||O(e)&&!(e instanceof Date)&&0===Object.keys(e).length||y(e)&&isNaN(e)}.bind(void 0),w=(function(e){return t(this,g),!j(e)}.bind(void 0),function(e){return t(this,g),Array.isArray(e)}.bind(void 0)),$=function(e){return t(this,g),e&&!(null!=e&&e.nodeType)&&O(e)&&!w(e)}.bind(void 0);(function(e){return t(this,g),e.charAt(0).toUpperCase()+e.slice(1)}).bind(void 0);(function(e){return t(this,g),[].slice.call(e)}).bind(void 0);function E(e){for(var n=this,i=arguments.length,r=Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];if(!r.length||1===r.length&&!r[0])return e;var s=r.shift();return $(e)&&$(s)&&Object.keys(s).forEach(function(i){t(this,n);var r=s[i];$(r)?(e[i]||(e[i]={}),e[i]=E(e[i],r)):e[i]=w(r)?r.concat():r}.bind(this)),E.apply(void 0,[e].concat(r))}(function(e,n,i){void 0===i&&(i=1),t(this,g);for(var r=[],o=0|Math.max(0,Math.ceil((n-e)/i)),s=e;s<o;s++)r.push(e+s*i);return r}).bind(void 0),function(){var e=this;t(this,g);var n=function(){return t(this,e),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(i,r,o){void 0===o&&(o=n()),t(this,e),i.dispatchEvent(new MouseEvent(r,o))}.bind(this)}catch(i){return function(i,r,o){void 0===o&&(o=n()),t(this,e);var s=v.createEvent("MouseEvent");s.initMouseEvent(r,o.bubbles,o.cancelable,f,0,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),i.dispatchEvent(s)}.bind(this)}}.bind(void 0)(),function(e,n,i){t(this,g);var r=new Touch(E({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));e.dispatchEvent(new TouchEvent(n,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}.bind(void 0);function _(e){var n,i,r,o=this,s=this.config,a=function(){t(this,o);var e=i.shift();return e&&n&&O(n)&&e in n?(n=n[e],a()):e?void 0:n}.bind(this);Object.keys(s).forEach(function(c){t(this,o),n=e,i=c.split("_"),r=a(),x(r)&&(s[c]=r)}.bind(this)),this.api&&(this.state.orgConfig=e)}var T=function(i){var r,o;function s(t){var n=i.call(this,t)||this;return n.config=void 0,n.element=void 0,n.config=new d,e(n)||e(n)}o=i,(r=s).prototype=Object.create(o.prototype),r.prototype.constructor=r,n(r,o);var a=s.prototype;return a.$beforeInit=function(){_.call(this,this.options),this.validate(),this.element=[].slice.call(document.querySelectorAll(this.config.selector)),this.overrideInternals(),this.overrideOptions(),this.overHandler=this.overHandler.bind(this),this.moveHandler=this.moveHandler.bind(this),this.outHandler=this.outHandler.bind(this)},a.validate=function(){var t=this.$$,e=this.config,n="";if(e.selector&&document.querySelector(e.selector)||(n="No holder elements found from given selector option."),(t.hasType("bubble")||t.hasType("scatter")||t.hasArcType(t.data.targets))&&(n="Contains non supported chart types."),n)throw new Error("[Sparkline plugin] "+n)},a.overrideInternals=function(){var t=this.$$,e=t.getBarW,n=t.getIndices;t.getIndices=function(t,e,i){return"getShapeX"===i?{}:n.call(this,t,e)},t.getBarW=function(t,n){return e.call(this,t,n,1)}},a.overrideOptions=function(){var e=this,n=this.$$.config;if(n.legend_show=!1,n.resize_auto=!1,n.axis_x_show=!1,!1!==n.padding){var i=function(n){return t(this,e),Object.keys(n||{}).length>0}.bind(this);i(n.axis_x_padding)&&(n.axis_x_padding={left:15,right:15,unit:"px"}),i(n.axis_y_padding)&&(n.axis_y_padding=5)}n.axis_y_show=!1,n.tooltip_position||(n.tooltip_position=function(t,e,n){var i=this.internal.state.event,r=i.pageY-1.35*n,o=i.pageX-e/2;return r<0&&(r=0),o<0&&(o=0),{top:r,left:o}})},a.$init=function(){var t,e=this.$$.$el;e.chart.style("width","0").style("height","0").style("pointer-events","none"),(null==(t=e.tooltip)?void 0:t.node())&&document.body.appendChild(e.tooltip.node())},a.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},a.bindEvents=function(e){var n=this;void 0===e&&(e=!0);var i=this.$$.config;if(i.interaction_enabled&&i.tooltip_show){var r=(e?"add":"remove")+"EventListener";this.element.forEach(function(e){t(this,n);var i=e.querySelector("svg");i[r]("mouseover",this.overHandler),i[r]("mousemove",this.moveHandler),i[r]("mouseout",this.outHandler)}.bind(this))}},a.overHandler=function(t){this.$$.state.eventReceiver.rect=t.target.getBoundingClientRect()},a.moveHandler=function(t){var e,n,i=this.$$,r=i.getDataIndexFromEvent(t),o=null==(e=i.api.data(t.target.__id))?void 0:e[0],s=null==o||null==(n=o.values)?void 0:n[r];s&&!s.name&&(s.name=s.id),i.state.event=t,i.setExpand(r,o.id,!0),i.showTooltip([s],t.target)},a.outHandler=function(t){var e=this.$$;e.state.event=t,e.unexpandCircles(),e.hideTooltip()},a.$redraw=function(){var e,n=this.$$,i=n.$el,r=this.element,o=n.api.data(),s=null==(e=i.chart.html().match(/<svg[^>]*>/))?void 0:e[0],a=this;if(r.length<o.length){for(var c=i.chart.node(),b=o.length-r.length;b>0;b--)c.parentNode.insertBefore(r[0].cloneNode(),c.nextSibling);this.element=document.querySelectorAll(this.config.selector),r=this.element}o.map(function(e){return t(this,a),e.id}.bind(this)).forEach(function(e,n){t(this,a);var o="."+l.target+"-"+e,c=i.main.selectAll(o),b=r[n].querySelector("svg");b||(r[n].innerHTML=s+"</svg>",(b=r[n].querySelector("svg")).__id=e),b.querySelector(o)||c.style("opacity",null),c.style("fill","none").style("opacity",null),b.innerHTML="",b.appendChild(c.node())}.bind(this))},a.$willDestroy=function(){var e=this;this.bindEvents(!1),this.element.forEach(function(n){t(this,e),n.innerHTML=""}.bind(this))},s}(u);T.version="0.0.1"}(),o=o.default}()}));
12
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.sparkline=t(e.d3,e.d3))}(this,(function(e,t){return function(){"use strict";var n=[,function(t){t.exports=e},,function(e){e.exports=t}],i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={exports:{}};return n[e](o,o.exports,r),o.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){function e(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}function a(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function b(e){for(var t,n=1;n<arguments.length;n++)t=null!=arguments[n]?arguments[n]:{},n%2?c(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}r.d(o,{default:function(){return T}});var l={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"},u=(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b(b({},l),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),{tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"}),{treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"}),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),function(){function t(e){void 0===e&&(e={}),this.$$=void 0,this.options=void 0,this.options=e}var n=t.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var t=this;Object.keys(this).forEach(function(n){e(this,t),this[n]=null,delete this[n]}.bind(this))},t}());u.version="3.7.0-next.2";var d=function(){return{selector:void 0}},h=(r(1),r(3),void 0),f=function(){return e(this,h),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)();f.requestIdleCallback=f.requestIdleCallback||function(t){return e(this,h),setTimeout(t,1)}.bind(void 0),f.requestAnimationFrame=f.requestAnimationFrame||function(t){return e(this,h),setTimeout(t,1)}.bind(void 0);var v=null==f?void 0:f.document,p=void 0;(function(t){return e(this,p),t||0===t}).bind(void 0),function(t){return e(this,p),"function"==typeof t}.bind(void 0);var g=function(t){return e(this,p),"string"==typeof t}.bind(void 0),y=function(t){return e(this,p),"number"==typeof t}.bind(void 0),m=function(t){return e(this,p),void 0===t}.bind(void 0),x=function(t){return e(this,p),void 0!==t}.bind(void 0),O=(function(t){return e(this,p),"boolean"==typeof t}.bind(void 0),function(t){return e(this,p),10*Math.ceil(t/10)}.bind(void 0),function(t){return e(this,p),Math.ceil(t)+.5}.bind(void 0),function(t){return e(this,p),t[1]-t[0]}.bind(void 0),function(t){return e(this,p),"object"==typeof t}.bind(void 0)),j=function(t){return e(this,p),m(t)||null===t||g(t)&&0===t.length||O(t)&&!(t instanceof Date)&&0===Object.keys(t).length||y(t)&&isNaN(t)}.bind(void 0),w=(function(t){return e(this,p),!j(t)}.bind(void 0),function(t){return e(this,p),Array.isArray(t)}.bind(void 0)),$=function(t){return e(this,p),t&&!(null!=t&&t.nodeType)&&O(t)&&!w(t)}.bind(void 0);(function(t){return e(this,p),t.charAt(0).toUpperCase()+t.slice(1)}).bind(void 0);(function(t){return e(this,p),[].slice.call(t)}).bind(void 0);function E(t){for(var n=this,i=arguments.length,r=Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];if(!r.length||1===r.length&&!r[0])return t;var s=r.shift();return $(t)&&$(s)&&Object.keys(s).forEach(function(i){e(this,n);var r=s[i];$(r)?(t[i]||(t[i]={}),t[i]=E(t[i],r)):t[i]=w(r)?r.concat():r}.bind(this)),E.apply(void 0,[t].concat(r))}(function(t,n,i){void 0===i&&(i=1),e(this,p);for(var r=[],o=0|Math.max(0,Math.ceil((n-t)/i)),s=t;s<o;s++)r.push(t+s*i);return r}).bind(void 0),function(){var t=this;e(this,p);var n=function(){return e(this,t),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(i,r,o){void 0===o&&(o=n()),e(this,t),i.dispatchEvent(new MouseEvent(r,o))}.bind(this)}catch(i){return function(i,r,o){void 0===o&&(o=n()),e(this,t);var s=v.createEvent("MouseEvent");s.initMouseEvent(r,o.bubbles,o.cancelable,f,0,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),i.dispatchEvent(s)}.bind(this)}}.bind(void 0)(),function(t,n,i){e(this,p);var r=new Touch(E({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));t.dispatchEvent(new TouchEvent(n,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}.bind(void 0);function _(t){var n,i,r,o=this,s=this.config,a=function(){e(this,o);var t=i.shift();return t&&n&&O(n)&&t in n?(n=n[t],a()):t?void 0:n}.bind(this);Object.keys(s).forEach(function(c){e(this,o),n=t,i=c.split("_"),r=a(),x(r)&&(s[c]=r)}.bind(this)),this.api&&(this.state.orgConfig=t)}var T=function(i){var r,o;function s(e){var n=i.call(this,e)||this;return n.config=void 0,n.element=void 0,n.config=new d,t(n)||t(n)}o=i,(r=s).prototype=Object.create(o.prototype),r.prototype.constructor=r,n(r,o);var a=s.prototype;return a.$beforeInit=function(){_.call(this,this.options),this.validate(),this.element=[].slice.call(document.querySelectorAll(this.config.selector)),this.overrideInternals(),this.overrideOptions(),this.overHandler=this.overHandler.bind(this),this.moveHandler=this.moveHandler.bind(this),this.outHandler=this.outHandler.bind(this)},a.validate=function(){var e=this.$$,t=this.config,n="";if(t.selector&&document.querySelector(t.selector)||(n="No holder elements found from given selector option."),(e.hasType("bubble")||e.hasType("scatter")||e.hasArcType(e.data.targets))&&(n="Contains non supported chart types."),n)throw new Error("[Sparkline plugin] "+n)},a.overrideInternals=function(){var e=this.$$,t=e.getBarW,n=e.getIndices;e.getIndices=function(e,t,i){return"getShapeX"===i?{}:n.call(this,e,t)},e.getBarW=function(e,n){return t.call(this,e,n,1)}},a.overrideOptions=function(){var t=this,n=this.$$.config;if(n.legend_show=!1,n.resize_auto=!1,n.axis_x_show=!1,!1!==n.padding){var i=function(n){return e(this,t),Object.keys(n||{}).length>0}.bind(this);i(n.axis_x_padding)&&(n.axis_x_padding={left:15,right:15,unit:"px"}),i(n.axis_y_padding)&&(n.axis_y_padding=5)}n.axis_y_show=!1,n.tooltip_position||(n.tooltip_position=function(e,t,n){var i=this.internal.state.event,r=i.pageY-1.35*n,o=i.pageX-t/2;return r<0&&(r=0),o<0&&(o=0),{top:r,left:o}})},a.$init=function(){var e,t=this.$$.$el;t.chart.style("width","0").style("height","0").style("pointer-events","none"),(null==(e=t.tooltip)?void 0:e.node())&&document.body.appendChild(t.tooltip.node())},a.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},a.bindEvents=function(t){var n=this;void 0===t&&(t=!0);var i=this.$$.config;if(i.interaction_enabled&&i.tooltip_show){var r=(t?"add":"remove")+"EventListener";this.element.forEach(function(t){e(this,n);var i=t.querySelector("svg");i[r]("mouseover",this.overHandler),i[r]("mousemove",this.moveHandler),i[r]("mouseout",this.outHandler)}.bind(this))}},a.overHandler=function(e){this.$$.state.eventReceiver.rect=e.target.getBoundingClientRect()},a.moveHandler=function(e){var t,n,i=this.$$,r=i.getDataIndexFromEvent(e),o=null==(t=i.api.data(e.target.__id))?void 0:t[0],s=null==o||null==(n=o.values)?void 0:n[r];s&&!s.name&&(s.name=s.id),i.state.event=e,i.setExpand(r,o.id,!0),i.showTooltip([s],e.target)},a.outHandler=function(e){var t=this.$$;t.state.event=e,t.unexpandCircles(),t.hideTooltip()},a.$redraw=function(){var t,n=this,i=this.$$,r=i.$el,o=this.element,s=i.api.data(),a=null==(t=r.chart.html().match(/<svg[^>]*>/))?void 0:t[0];if(o.length<s.length){for(var c=r.chart.node(),b=s.length-o.length;b>0;b--)c.parentNode.insertBefore(o[0].cloneNode(),c.nextSibling);this.element=document.querySelectorAll(this.config.selector),o=this.element}s.map(function(t){return e(this,n),t.id}.bind(this)).forEach(function(t,i){e(this,n);var s="."+l.target+"-"+t,c=r.main.selectAll(s),b=o[i].querySelector("svg");b||(o[i].innerHTML=a+"</svg>",(b=o[i].querySelector("svg")).__id=t),b.querySelector(s)||c.style("opacity",null),c.style("fill","none").style("opacity",null),b.innerHTML="",b.appendChild(c.node())}.bind(this))},a.$willDestroy=function(){var t=this;this.bindEvents(!1),this.element.forEach(function(n){e(this,t),n.innerHTML=""}.bind(this))},s}(u);T.version="0.0.1"}(),o=o.default}()}));
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.0-next.1
8
+ * @version 3.7.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -354,11 +354,16 @@ var $TOOLTIP = {
354
354
  tooltipContainer: "bb-tooltip-container",
355
355
  tooltipName: "bb-tooltip-name"
356
356
  };
357
+ var $TREEMAP = {
358
+ treemap: "bb-treemap",
359
+ chartTreemap: "bb-chart-treemap",
360
+ chartTreemaps: "bb-chart-treemaps"
361
+ };
357
362
  var $ZOOM = {
358
363
  buttonZoomReset: "bb-zoom-reset",
359
364
  zoomBrush: "bb-zoom-brush"
360
365
  };
361
- /* harmony default export */ var classes = (_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, $COMMON), $ARC), $AREA), $AXIS), $BAR), $CANDLESTICK), $CIRCLE), $COLOR), $DRAG), $GAUGE), $LEGEND), $LINE), $EVENT), $FOCUS), $GRID), $RADAR), $REGION), $SELECT), $SHAPE), $SUBCHART), $TEXT), $TOOLTIP), $ZOOM));
366
+ /* harmony default export */ var classes = (_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, $COMMON), $ARC), $AREA), $AXIS), $BAR), $CANDLESTICK), $CIRCLE), $COLOR), $DRAG), $GAUGE), $LEGEND), $LINE), $EVENT), $FOCUS), $GRID), $RADAR), $REGION), $SELECT), $SHAPE), $SUBCHART), $TEXT), $TOOLTIP), $TREEMAP), $ZOOM));
362
367
  // EXTERNAL MODULE: external {"commonjs":"d3-selection","commonjs2":"d3-selection","amd":"d3-selection","root":"d3"}
363
368
  var external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_ = __webpack_require__(1);
364
369
  // EXTERNAL MODULE: external {"commonjs":"d3-brush","commonjs2":"d3-brush","amd":"d3-brush","root":"d3"}
@@ -508,7 +513,8 @@ function hasValue(dict, value) {
508
513
  * @private
509
514
  */
510
515
  function callFn(fn, thisArg) {
511
- for (var isFn = isFunction(fn), _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
516
+ var isFn = isFunction(fn);
517
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
512
518
  args[_key - 2] = arguments[_key];
513
519
  }
514
520
  isFn && fn.call.apply(fn, [thisArg].concat(args));
@@ -680,8 +686,9 @@ function getPointer(event, element) {
680
686
  function getBrushSelection(ctx) {
681
687
  var event = ctx.event,
682
688
  $el = ctx.$el,
683
- main = $el.subchart.main || $el.main,
684
- selection;
689
+ main = $el.subchart.main || $el.main;
690
+ var selection;
691
+
685
692
  // check from event
686
693
  if (event && event.type === "brush") {
687
694
  selection = event.selection;
@@ -740,8 +747,8 @@ function findIndex(arr, v, start, end, isRotated) {
740
747
  if (start > end) {
741
748
  return -1;
742
749
  }
743
- var mid = Math.floor((start + end) / 2),
744
- _arr$mid = arr[mid],
750
+ var mid = Math.floor((start + end) / 2);
751
+ var _arr$mid = arr[mid],
745
752
  x = _arr$mid.x,
746
753
  _arr$mid$w = _arr$mid.w,
747
754
  w = _arr$mid$w === void 0 ? 0 : _arr$mid$w;
@@ -779,12 +786,12 @@ function brushEmpty(ctx) {
779
786
  * @private
780
787
  */
781
788
  function deepClone() {
782
- for (var _this6 = this, clone = function (v) {
789
+ for (var _this6 = this, _clone = function clone(v) {
783
790
  _newArrowCheck(this, _this6);
784
791
  if (isObject(v) && v.constructor) {
785
792
  var r = new v.constructor();
786
793
  for (var k in v) {
787
- r[k] = clone(v[k]);
794
+ r[k] = _clone(v[k]);
788
795
  }
789
796
  return r;
790
797
  }
@@ -794,7 +801,7 @@ function deepClone() {
794
801
  }
795
802
  return objectN.map(function (v) {
796
803
  _newArrowCheck(this, _this6);
797
- return clone(v);
804
+ return _clone(v);
798
805
  }.bind(this)).reduce(function (a, c) {
799
806
  _newArrowCheck(this, _this6);
800
807
  return util_objectSpread(util_objectSpread({}, a), c);
@@ -1271,12 +1278,12 @@ function loadConfig(config) {
1271
1278
  target,
1272
1279
  keys,
1273
1280
  read,
1274
- find = function () {
1281
+ _find = function find() {
1275
1282
  _newArrowCheck(this, _this);
1276
1283
  var key = keys.shift();
1277
1284
  if (key && target && isObjectType(target) && key in target) {
1278
1285
  target = target[key];
1279
- return find();
1286
+ return _find();
1280
1287
  } else if (!key) {
1281
1288
  return target;
1282
1289
  }
@@ -1286,7 +1293,7 @@ function loadConfig(config) {
1286
1293
  _newArrowCheck(this, _this);
1287
1294
  target = config;
1288
1295
  keys = key.split("_");
1289
- read = find();
1296
+ read = _find();
1290
1297
  if (isDefined(read)) {
1291
1298
  thisConfig[key] = read;
1292
1299
  }
@@ -1370,7 +1377,7 @@ var Plugin = /*#__PURE__*/function () {
1370
1377
  };
1371
1378
  return Plugin;
1372
1379
  }();
1373
- Plugin.version = "3.7.0-next.1";
1380
+ Plugin.version = "3.7.0-next.2";
1374
1381
 
1375
1382
  ;// CONCATENATED MODULE: ./src/Plugin/stanford/Options.ts
1376
1383
  /**
@@ -1553,8 +1560,8 @@ function pointInRegion(point, region) {
1553
1560
  // ray-casting algorithm based on
1554
1561
  // http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
1555
1562
  var x = point.x,
1556
- y = point.value,
1557
- inside = !1;
1563
+ y = point.value;
1564
+ var inside = !1;
1558
1565
  for (var i = 0, j = region.length - 1; i < region.length; j = i++) {
1559
1566
  var xi = region[i].x,
1560
1567
  yi = region[i].y,
@@ -1613,8 +1620,8 @@ function getRegionArea(points) {
1613
1620
  * @private
1614
1621
  */
1615
1622
  function getCentroid(points) {
1616
- var area = getRegionArea(points),
1617
- x = 0,
1623
+ var area = getRegionArea(points);
1624
+ var x = 0,
1618
1625
  y = 0,
1619
1626
  f;
1620
1627
  for (var i = 0, l = points.length, j = l - 1; i < l; j = i, i++) {
@@ -1751,8 +1758,8 @@ var Elements = /*#__PURE__*/function () {
1751
1758
  _proto.xvCustom = function xvCustom(d, xyValue) {
1752
1759
  var $$ = this,
1753
1760
  axis = $$.axis,
1754
- config = $$.config,
1755
- value = xyValue ? d[xyValue] : $$.getBaseValue(d);
1761
+ config = $$.config;
1762
+ var value = xyValue ? d[xyValue] : $$.getBaseValue(d);
1756
1763
  if (axis.isTimeSeries()) {
1757
1764
  value = parseDate.call($$, value);
1758
1765
  } else if (axis.isCategorized() && isString(value)) {
@@ -2038,8 +2045,8 @@ var Stanford = /*#__PURE__*/function (_Plugin) {
2038
2045
  _proto.xvCustom = function xvCustom(d, xyValue) {
2039
2046
  var $$ = this,
2040
2047
  axis = $$.axis,
2041
- config = $$.config,
2042
- value = xyValue ? d[xyValue] : $$.getBaseValue(d);
2048
+ config = $$.config;
2049
+ var value = xyValue ? d[xyValue] : $$.getBaseValue(d);
2043
2050
  if (axis.isTimeSeries()) {
2044
2051
  value = parseDate.call($$, value);
2045
2052
  } else if (axis.isCategorized() && isString(value)) {
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.0-next.1
8
+ * @version 3.7.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):"function"==typeof define&&define.amd?define("bb",["d3-interpolate","d3-color","d3-scale","d3-selection","d3-brush","d3-axis","d3-format"],e):"object"==typeof exports?exports.bb=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.stanford=e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3))}(this,(function(t,e,i,n,r,o,a){return function(){"use strict";var s=[,function(t){t.exports=n},,function(t){t.exports=r},,function(e){e.exports=t},function(t){t.exports=e},function(t){t.exports=i},function(t){t.exports=o},function(t){t.exports=a}],c={};function l(t){var e=c[t];if(void 0!==e)return e.exports;var i=c[t]={exports:{}};return s[t](i,i.exports,l),i.exports}l.d=function(t,e){for(var i in e)l.o(e,i)&&!l.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var u={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}l.d(u,{default:function(){return z}});var n=l(5),r=l(6),o=l(7);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t){var e=function(t,e){if("object"!==a(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===a(e)?e:String(e)}function c(t,e,i){return(e=s(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function b(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function d(t){for(var e,i=1;i<arguments.length;i++)e=null!=arguments[i]?arguments[i]:{},i%2?b(Object(e),!0).forEach((function(i){c(t,i,e[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):b(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}));return t}var h={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},f=(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d({},{button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"}),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),h),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),l(1),l(3),void 0),p=function(){return t(this,f),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)();p.requestIdleCallback=p.requestIdleCallback||function(e){return t(this,f),setTimeout(e,1)}.bind(void 0),p.requestAnimationFrame=p.requestAnimationFrame||function(e){return t(this,f),setTimeout(e,1)}.bind(void 0);var g=null==p?void 0:p.document,v=void 0;(function(e){return t(this,v),e||0===e}).bind(void 0);var y=function(e){return t(this,v),"function"==typeof e}.bind(void 0),x=function(e){return t(this,v),"string"==typeof e}.bind(void 0),m=function(e){return t(this,v),"number"==typeof e}.bind(void 0),w=function(e){return t(this,v),void 0===e}.bind(void 0),S=function(e){return t(this,v),void 0!==e}.bind(void 0),_=(function(e){return t(this,v),"boolean"==typeof e}.bind(void 0),function(e){return t(this,v),10*Math.ceil(e/10)}.bind(void 0),function(e){return t(this,v),Math.ceil(e)+.5}.bind(void 0),function(e){return t(this,v),e[1]-e[0]}.bind(void 0),function(e){return t(this,v),"object"==typeof e}.bind(void 0)),E=function(e){return t(this,v),w(e)||null===e||x(e)&&0===e.length||_(e)&&!(e instanceof Date)&&0===Object.keys(e).length||m(e)&&isNaN(e)}.bind(void 0),O=(function(e){return t(this,v),!E(e)}.bind(void 0),function(e){return t(this,v),Array.isArray(e)}.bind(void 0)),j=function(e){return t(this,v),e&&!(null!=e&&e.nodeType)&&_(e)&&!O(e)}.bind(void 0);(function(e){return t(this,v),e.charAt(0).toUpperCase()+e.slice(1)}).bind(void 0);(function(e){return t(this,v),[].slice.call(e)}).bind(void 0);function C(e){for(var i=this,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(!r.length||1===r.length&&!r[0])return e;var a=r.shift();return j(e)&&j(a)&&Object.keys(a).forEach(function(n){t(this,i);var r=a[n];j(r)?(e[n]||(e[n]={}),e[n]=C(e[n],r)):e[n]=O(r)?r.concat():r}.bind(this)),C.apply(void 0,[e].concat(r))}var $=function(e,i,n){void 0===n&&(n=1),t(this,v);for(var r=[],o=0|Math.max(0,Math.ceil((i-e)/n)),a=e;a<o;a++)r.push(e+a*n);return r}.bind(void 0);(function(){var e=this;t(this,v);var i=function(){return t(this,e),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(n,r,o){void 0===o&&(o=i()),t(this,e),n.dispatchEvent(new MouseEvent(r,o))}.bind(this)}catch(n){return function(n,r,o){void 0===o&&(o=i()),t(this,e);var a=g.createEvent("MouseEvent");a.initMouseEvent(r,o.bubbles,o.cancelable,p,0,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(a)}.bind(this)}}).bind(void 0)(),function(e,i,n){t(this,v);var r=new Touch(C({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));e.dispatchEvent(new TouchEvent(i,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}.bind(void 0);function M(t){var e;if(t instanceof Date)e=t;else if(x(t)){var i,n=this.config;e=null!=(i=this.format.dataTime(n.data_xFormat)(t))?i:new Date(t)}else m(t)&&!isNaN(t)&&(e=new Date(+t));return e&&!isNaN(+e)||console&&console.error&&console.error("Failed to parse x '"+t+"' to Date object"),e}function T(e){var i,n,r,o=this,a=this.config,s=function(){t(this,o);var e=n.shift();return e&&i&&_(i)&&e in i?(i=i[e],s()):e?void 0:i}.bind(this);Object.keys(a).forEach(function(c){t(this,o),i=e,n=c.split("_"),r=s(),S(r)&&(a[c]=r)}.bind(this)),this.api&&(this.state.orgConfig=e)}var k=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var i=e.prototype;return i.$beforeInit=function(){},i.$init=function(){},i.$afterInit=function(){},i.$redraw=function(){},i.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(i){t(this,e),this[i]=null,delete this[i]}.bind(this))},e}();k.version="3.7.0-next.1";var P=function(){return{colors:void 0,epochs:[],lines:[],scale_min:void 0,scale_max:void 0,scale_width:20,scale_format:void 0,padding_top:0,padding_right:0,padding_bottom:0,padding_left:0,regions:[]}},D="bb-colorscale",L="bb-stanford-elements",q="bb-stanford-line",A="bb-stanford-lines",N="bb-stanford-region",F="bb-stanford-regions";function R(t,e){return t.epochs<e.epochs?-1:t.epochs>e.epochs?1:0}function I(t){for(var e,i=function(t){for(var e,i,n=0,r=0,o=t.length,a=o-1;r<o;a=r,r++)e=t[r],i=t[a],n+=e.x*i.y,n-=e.y*i.x;return n/2}(t),n=0,r=0,o=0,a=t.length,s=a-1;o<a;s=o,o++){var c=t[o],l=t[s];e=c.x*l.y-l.x*c.y,n+=(c.x+l.x)*e,r+=(c.y+l.y)*e}return{x:n/(e=6*i),y:r/e}}var B=function(){function e(t){this.owner=void 0,this.owner=t;var e=t.$$.$el.main.select(".bb-chart").append("g").attr("class",L);e.append("g").attr("class",A),e.append("g").attr("class",F)}var i=e.prototype;return i.updateStanfordLines=function(e){var i=this,n=this.owner.$$,r=n.config,o=n.$el.main,a=r.axis_rotated,s=this.xvCustom.bind(n),c=this.yvCustom.bind(n),l=o.select("."+A).style("shape-rendering","geometricprecision").selectAll("."+q).data(this.owner.config.lines);l.exit().transition().duration(e).style("opacity","0").remove();var u=l.enter().append("g");u.append("line").style("opacity","0"),u.merge(l).attr("class",function(e){return t(this,i),q+(e.class?" "+e.class:"")}.bind(this)).select("line").transition().duration(e).attr("x1",function(e){return t(this,i),a?c(e,"y1"):s(e,"x1")}.bind(this)).attr("x2",function(e){return t(this,i),a?c(e,"y2"):s(e,"x2")}.bind(this)).attr("y1",function(e){return t(this,i),a?s(e,"x1"):c(e,"y1")}.bind(this)).attr("y2",function(e){return t(this,i),a?s(e,"x2"):c(e,"y2")}.bind(this)).transition().style("opacity",null)},i.updateStanfordRegions=function(e){var i=this,n=this.owner.$$,r=n.config,o=n.$el.main,a=r.axis_rotated,s=this.xvCustom.bind(n),c=this.yvCustom.bind(n),l=this.owner.countEpochsInRegion.bind(n),u=o.select("."+F).selectAll("."+N).data(this.owner.config.regions);u.exit().transition().duration(e).style("opacity","0").remove();var b=u.enter().append("g");b.append("polygon").style("opacity","0"),b.append("text").attr("transform",a?"rotate(-90)":"").style("opacity","0"),(u=b.merge(u)).attr("class",function(e){return t(this,i),N+(e.class?" "+e.class:"")}.bind(this)).select("polygon").transition().duration(e).attr("points",function(e){var n=this;return t(this,i),e.points.map(function(e){return t(this,n),[a?c(e,"y"):s(e,"x"),a?s(e,"x"):c(e,"y")].join(",")}.bind(this)).join(" ")}.bind(this)).transition().style("opacity",function(e){return t(this,i),(e.opacity?e.opacity:.2)+""}.bind(this)),u.select("text").transition().duration(e).attr("x",function(e){return t(this,i),a?c(I(e.points),"y"):s(I(e.points),"x")}.bind(this)).attr("y",function(e){return t(this,i),a?s(I(e.points),"x"):c(I(e.points),"y")}.bind(this)).text(function(e){if(t(this,i),e.text){var n=l(e.points),r=n.value,o=n.percentage;return e.text(r,o)}return""}.bind(this)).attr("text-anchor","middle").attr("dominant-baseline","middle").transition().style("opacity",null)},i.updateStanfordElements=function(t){void 0===t&&(t=0),this.updateStanfordLines(t),this.updateStanfordRegions(t)},i.xvCustom=function(t,e){var i=this,n=i.axis,r=i.config,o=e?t[e]:i.getBaseValue(t);return n.isTimeSeries()?o=M.call(i,o):n.isCategorized()&&x(o)&&(o=r.axis_x_categories.indexOf(t.value)),Math.ceil(i.scale.x(o))},i.yvCustom=function(t,e){var i=this,n=t.axis&&"y2"===t.axis?i.scale.y2:i.scale.y,r=e?t[e]:i.getBaseValue(t);return Math.ceil(n(r))},e}(),X=l(8),Y=l(9),V=function(){function e(t){this.owner=void 0,this.colorScale=void 0,this.owner=t}var i=e.prototype;return i.drawColorScale=function(){var e=this,i=this.owner,n=i.$$,r=i.config,a=n.data.targets[0],s=n.state.height-r.padding_bottom-r.padding_top,c=r.scale_width,l=$(r.padding_bottom,s,5),u=(0,o.scaleSequential)(a.colors).domain([l[l.length-1],l[0]]);this.colorScale&&this.colorScale.remove(),this.colorScale=n.$el.svg.append("g").attr("width",50).attr("height",s).attr("class",D),this.colorScale.append("g").attr("transform","translate(0, "+r.padding_top+")").selectAll("bars").data(l).enter().append("rect").attr("y",function(i,n){return t(this,e),5*n}.bind(this)).attr("x",0).attr("width",c).attr("height",5).attr("fill",function(i){return t(this,e),u(i)}.bind(this));var b=(0,o.scaleLog)().domain([a.minEpochs,a.maxEpochs]).range([l[0]+r.padding_top+l[l.length-1]+5-1,l[0]+r.padding_top]),d=(0,X.axisRight)(b),h=r.scale_format;"pow10"===h?d.tickValues([1,10,100,1e3,1e4,1e5,1e6,1e7]):y(h)?d.tickFormat(h):d.tickFormat((0,Y.format)("d"));var f=this.colorScale.append("g").attr("class","legend axis").attr("transform","translate("+c+",0)").call(d);"pow10"===h&&f.selectAll(".tick text").text(null).filter(function(i){return t(this,e),i/Math.pow(10,Math.ceil(Math.log(i)/Math.LN10-1e-12))==1}.bind(this)).text(10).append("tspan").attr("dy","-.7em").text(function(i){return t(this,e),Math.round(Math.log(i)/Math.LN10)}.bind(this)),this.colorScale.attr("transform","translate("+(n.state.current.width-this.xForColorScale())+", 0)")},i.xForColorScale=function(){return this.owner.config.padding_right+this.colorScale.node().getBBox().width},i.getColorScalePadding=function(){return this.xForColorScale()+this.owner.config.padding_left+20},e}(),z=function(a){var s,c;function l(t){var i=a.call(this,t)||this;return i.config=void 0,i.colorScale=void 0,i.elements=void 0,i.config=new P,e(i)||e(i)}c=a,(s=l).prototype=Object.create(c.prototype),s.prototype.constructor=s,i(s,c);var u=l.prototype;return u.$beforeInit=function(){var e=this,i=this.$$;i.config.data_xSort=!1,i.isMultipleX=function(){return t(this,e),!0}.bind(this),i.showGridFocus=function(){t(this,e)}.bind(this),i.labelishData=function(i){return t(this,e),i.values}.bind(this),i.opacityForCircle=function(){return t(this,e),1}.bind(this);var n=i.getCurrentPaddingRight.bind(i);i.getCurrentPaddingRight=function(){return t(this,e),n()+(this.colorScale?this.colorScale.getColorScalePadding():0)}.bind(this)},u.$init=function(){var t=this.$$;T.call(this,this.options),t.color=this.getStanfordPointColor.bind(t),this.colorScale=new V(this),this.elements=new B(this),this.convertData(),this.initStanfordData(),this.setStanfordTooltip(),this.colorScale.drawColorScale(),this.$redraw()},u.$redraw=function(t){var e,i;null==(e=this.colorScale)||e.drawColorScale(),null==(i=this.elements)||i.updateStanfordElements(t)},u.getOptions=function(){return new P},u.convertData=function(){var e=this,i=this.$$.data.targets,n=this.options.epochs;i.forEach(function(i){var r=this;t(this,e),i.values.forEach(function(e,i){t(this,r),e.epochs=n[i]}.bind(this)),i.minEpochs=void 0,i.maxEpochs=void 0,i.colors=void 0,i.colorscale=void 0}.bind(this))},u.xvCustom=function(t,e){var i=this,n=i.axis,r=i.config,o=e?t[e]:i.getBaseValue(t);return n.isTimeSeries()?o=M.call(i,o):n.isCategorized()&&x(o)&&(o=r.axis_x_categories.indexOf(t.value)),Math.ceil(i.scale.x(o))},u.yvCustom=function(t,e){var i=this.scale,n=t.axis&&"y2"===t.axis?i.y2:i.y,r=e?t[e]:this.getBaseValue(t);return Math.ceil(n(r))},u.initStanfordData=function(){var e=this,i=this.config,a=this.$$.data.targets[0];a.values.sort(R);var s=a.values.map(function(i){return t(this,e),i.epochs}.bind(this));a.minEpochs=isNaN(i.scale_min)?Math.min.apply(Math,s):i.scale_min,a.maxEpochs=isNaN(i.scale_max)?Math.max.apply(Math,s):i.scale_max,a.colors=y(i.colors)?i.colors:(0,n.interpolateHslLong)((0,r.hsl)(250,1,.5),(0,r.hsl)(0,1,.5)),a.colorscale=(0,o.scaleSequentialLog)(a.colors).domain([a.minEpochs,a.maxEpochs])},u.getStanfordPointColor=function(t){return this.data.targets[0].colorscale(t.epochs)},u.setStanfordTooltip=function(){var e=this.$$.config;E(e.tooltip_contents)&&(e.tooltip_contents=function(i,n,r,o){var a=this,s=e.data_x,c='<table class="'+h.tooltip+'"><tbody>';return i.forEach(function(e){t(this,a);var i=e.id,l=void 0===i?"":i,u=e.value,b=void 0===u?0:u,d=e.epochs,f=void 0===d?0:d,p=e.x;c+="<tr>\n\t\t\t\t\t\t\t<th>"+(s||"")+'</th>\n\t\t\t\t\t\t\t<th class="value">'+n(void 0===p?"":p)+"</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>"+e.id+'</th>\n\t\t\t\t\t\t\t<th class="value">'+r(b)+'</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class="'+h.tooltipName+"-"+l+'">\n\t\t\t\t\t\t\t<td class="name"><span style="background-color:'+o(e)+'"></span>Epochs</td>\n\t\t\t\t\t\t\t<td class="value">'+r(f)+"</td>\n\t\t\t\t\t\t</tr>"}.bind(this)),c+"</tbody></table>"})},u.countEpochsInRegion=function(e){var i=this,n=this.data.targets[0],r=n.values.reduce(function(e,n){return t(this,i),e+ +n.epochs}.bind(this),0),o=n.values.reduce(function(n,r){return t(this,i),function(t,e){for(var i=t.x,n=t.value,r=!1,o=0,a=e.length-1;o<e.length;a=o++){var s=e[o].x,c=e[o].y,l=e[a].x,u=e[a].y;c>n!=u>n&&i<(l-s)*(n-c)/(u-c)+s&&(r=!r)}return r}(r,e)?n+ +r.epochs:n}.bind(this),0);return{value:o,percentage:0!==o?+(o/r*100).toFixed(1):0}},l}(k)}(),u=u.default}()}));
12
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):"function"==typeof define&&define.amd?define("bb",["d3-interpolate","d3-color","d3-scale","d3-selection","d3-brush","d3-axis","d3-format"],e):"object"==typeof exports?exports.bb=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.stanford=e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3))}(this,(function(t,e,i,n,r,o,a){return function(){"use strict";var s=[,function(t){t.exports=n},,function(t){t.exports=r},,function(e){e.exports=t},function(t){t.exports=e},function(t){t.exports=i},function(t){t.exports=o},function(t){t.exports=a}],c={};function l(t){var e=c[t];if(void 0!==e)return e.exports;var i=c[t]={exports:{}};return s[t](i,i.exports,l),i.exports}l.d=function(t,e){for(var i in e)l.o(e,i)&&!l.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var b={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}l.d(b,{default:function(){return z}});var n=l(5),r=l(6),o=l(7);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t){var e=function(t,e){if("object"!==a(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===a(e)?e:String(e)}function c(t,e,i){return(e=s(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function u(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function d(t){for(var e,i=1;i<arguments.length;i++)e=null!=arguments[i]?arguments[i]:{},i%2?u(Object(e),!0).forEach((function(i){c(t,i,e[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}));return t}var h={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},f=(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d({},{button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"}),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),h),{treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"}),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),l(1),l(3),void 0),p=function(){return t(this,f),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)();p.requestIdleCallback=p.requestIdleCallback||function(e){return t(this,f),setTimeout(e,1)}.bind(void 0),p.requestAnimationFrame=p.requestAnimationFrame||function(e){return t(this,f),setTimeout(e,1)}.bind(void 0);var g=null==p?void 0:p.document,v=void 0;(function(e){return t(this,v),e||0===e}).bind(void 0);var y=function(e){return t(this,v),"function"==typeof e}.bind(void 0),x=function(e){return t(this,v),"string"==typeof e}.bind(void 0),m=function(e){return t(this,v),"number"==typeof e}.bind(void 0),w=function(e){return t(this,v),void 0===e}.bind(void 0),S=function(e){return t(this,v),void 0!==e}.bind(void 0),_=(function(e){return t(this,v),"boolean"==typeof e}.bind(void 0),function(e){return t(this,v),10*Math.ceil(e/10)}.bind(void 0),function(e){return t(this,v),Math.ceil(e)+.5}.bind(void 0),function(e){return t(this,v),e[1]-e[0]}.bind(void 0),function(e){return t(this,v),"object"==typeof e}.bind(void 0)),E=function(e){return t(this,v),w(e)||null===e||x(e)&&0===e.length||_(e)&&!(e instanceof Date)&&0===Object.keys(e).length||m(e)&&isNaN(e)}.bind(void 0),O=(function(e){return t(this,v),!E(e)}.bind(void 0),function(e){return t(this,v),Array.isArray(e)}.bind(void 0)),j=function(e){return t(this,v),e&&!(null!=e&&e.nodeType)&&_(e)&&!O(e)}.bind(void 0);(function(e){return t(this,v),e.charAt(0).toUpperCase()+e.slice(1)}).bind(void 0);(function(e){return t(this,v),[].slice.call(e)}).bind(void 0);function C(e){for(var i=this,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(!r.length||1===r.length&&!r[0])return e;var a=r.shift();return j(e)&&j(a)&&Object.keys(a).forEach(function(n){t(this,i);var r=a[n];j(r)?(e[n]||(e[n]={}),e[n]=C(e[n],r)):e[n]=O(r)?r.concat():r}.bind(this)),C.apply(void 0,[e].concat(r))}var $=function(e,i,n){void 0===n&&(n=1),t(this,v);for(var r=[],o=0|Math.max(0,Math.ceil((i-e)/n)),a=e;a<o;a++)r.push(e+a*n);return r}.bind(void 0);(function(){var e=this;t(this,v);var i=function(){return t(this,e),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(n,r,o){void 0===o&&(o=i()),t(this,e),n.dispatchEvent(new MouseEvent(r,o))}.bind(this)}catch(n){return function(n,r,o){void 0===o&&(o=i()),t(this,e);var a=g.createEvent("MouseEvent");a.initMouseEvent(r,o.bubbles,o.cancelable,p,0,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(a)}.bind(this)}}).bind(void 0)(),function(e,i,n){t(this,v);var r=new Touch(C({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));e.dispatchEvent(new TouchEvent(i,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}.bind(void 0);function M(t){var e;if(t instanceof Date)e=t;else if(x(t)){var i,n=this.config;e=null!=(i=this.format.dataTime(n.data_xFormat)(t))?i:new Date(t)}else m(t)&&!isNaN(t)&&(e=new Date(+t));return e&&!isNaN(+e)||console&&console.error&&console.error("Failed to parse x '"+t+"' to Date object"),e}function T(e){var i,n,r,o=this,a=this.config,s=function(){t(this,o);var e=n.shift();return e&&i&&_(i)&&e in i?(i=i[e],s()):e?void 0:i}.bind(this);Object.keys(a).forEach(function(c){t(this,o),i=e,n=c.split("_"),r=s(),S(r)&&(a[c]=r)}.bind(this)),this.api&&(this.state.orgConfig=e)}var k=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var i=e.prototype;return i.$beforeInit=function(){},i.$init=function(){},i.$afterInit=function(){},i.$redraw=function(){},i.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(i){t(this,e),this[i]=null,delete this[i]}.bind(this))},e}();k.version="3.7.0-next.2";var P=function(){return{colors:void 0,epochs:[],lines:[],scale_min:void 0,scale_max:void 0,scale_width:20,scale_format:void 0,padding_top:0,padding_right:0,padding_bottom:0,padding_left:0,regions:[]}},D="bb-colorscale",L="bb-stanford-elements",q="bb-stanford-line",A="bb-stanford-lines",N="bb-stanford-region",F="bb-stanford-regions";function R(t,e){return t.epochs<e.epochs?-1:t.epochs>e.epochs?1:0}function I(t){for(var e,i=function(t){for(var e,i,n=0,r=0,o=t.length,a=o-1;r<o;a=r,r++)e=t[r],i=t[a],n+=e.x*i.y,n-=e.y*i.x;return n/2}(t),n=0,r=0,o=0,a=t.length,s=a-1;o<a;s=o,o++){var c=t[o],l=t[s];e=c.x*l.y-l.x*c.y,n+=(c.x+l.x)*e,r+=(c.y+l.y)*e}return{x:n/(e=6*i),y:r/e}}var B=function(){function e(t){this.owner=void 0,this.owner=t;var e=t.$$.$el.main.select(".bb-chart").append("g").attr("class",L);e.append("g").attr("class",A),e.append("g").attr("class",F)}var i=e.prototype;return i.updateStanfordLines=function(e){var i=this,n=this.owner.$$,r=n.config,o=n.$el.main,a=r.axis_rotated,s=this.xvCustom.bind(n),c=this.yvCustom.bind(n),l=o.select("."+A).style("shape-rendering","geometricprecision").selectAll("."+q).data(this.owner.config.lines);l.exit().transition().duration(e).style("opacity","0").remove();var b=l.enter().append("g");b.append("line").style("opacity","0"),b.merge(l).attr("class",function(e){return t(this,i),q+(e.class?" "+e.class:"")}.bind(this)).select("line").transition().duration(e).attr("x1",function(e){return t(this,i),a?c(e,"y1"):s(e,"x1")}.bind(this)).attr("x2",function(e){return t(this,i),a?c(e,"y2"):s(e,"x2")}.bind(this)).attr("y1",function(e){return t(this,i),a?s(e,"x1"):c(e,"y1")}.bind(this)).attr("y2",function(e){return t(this,i),a?s(e,"x2"):c(e,"y2")}.bind(this)).transition().style("opacity",null)},i.updateStanfordRegions=function(e){var i=this,n=this.owner.$$,r=n.config,o=n.$el.main,a=r.axis_rotated,s=this.xvCustom.bind(n),c=this.yvCustom.bind(n),l=this.owner.countEpochsInRegion.bind(n),b=o.select("."+F).selectAll("."+N).data(this.owner.config.regions);b.exit().transition().duration(e).style("opacity","0").remove();var u=b.enter().append("g");u.append("polygon").style("opacity","0"),u.append("text").attr("transform",a?"rotate(-90)":"").style("opacity","0"),(b=u.merge(b)).attr("class",function(e){return t(this,i),N+(e.class?" "+e.class:"")}.bind(this)).select("polygon").transition().duration(e).attr("points",function(e){var n=this;return t(this,i),e.points.map(function(e){return t(this,n),[a?c(e,"y"):s(e,"x"),a?s(e,"x"):c(e,"y")].join(",")}.bind(this)).join(" ")}.bind(this)).transition().style("opacity",function(e){return t(this,i),(e.opacity?e.opacity:.2)+""}.bind(this)),b.select("text").transition().duration(e).attr("x",function(e){return t(this,i),a?c(I(e.points),"y"):s(I(e.points),"x")}.bind(this)).attr("y",function(e){return t(this,i),a?s(I(e.points),"x"):c(I(e.points),"y")}.bind(this)).text(function(e){if(t(this,i),e.text){var n=l(e.points),r=n.value,o=n.percentage;return e.text(r,o)}return""}.bind(this)).attr("text-anchor","middle").attr("dominant-baseline","middle").transition().style("opacity",null)},i.updateStanfordElements=function(t){void 0===t&&(t=0),this.updateStanfordLines(t),this.updateStanfordRegions(t)},i.xvCustom=function(t,e){var i=this,n=i.axis,r=i.config,o=e?t[e]:i.getBaseValue(t);return n.isTimeSeries()?o=M.call(i,o):n.isCategorized()&&x(o)&&(o=r.axis_x_categories.indexOf(t.value)),Math.ceil(i.scale.x(o))},i.yvCustom=function(t,e){var i=this,n=t.axis&&"y2"===t.axis?i.scale.y2:i.scale.y,r=e?t[e]:i.getBaseValue(t);return Math.ceil(n(r))},e}(),X=l(8),Y=l(9),V=function(){function e(t){this.owner=void 0,this.colorScale=void 0,this.owner=t}var i=e.prototype;return i.drawColorScale=function(){var e=this,i=this.owner,n=i.$$,r=i.config,a=n.data.targets[0],s=n.state.height-r.padding_bottom-r.padding_top,c=r.scale_width,l=$(r.padding_bottom,s,5),b=(0,o.scaleSequential)(a.colors).domain([l[l.length-1],l[0]]);this.colorScale&&this.colorScale.remove(),this.colorScale=n.$el.svg.append("g").attr("width",50).attr("height",s).attr("class",D),this.colorScale.append("g").attr("transform","translate(0, "+r.padding_top+")").selectAll("bars").data(l).enter().append("rect").attr("y",function(i,n){return t(this,e),5*n}.bind(this)).attr("x",0).attr("width",c).attr("height",5).attr("fill",function(i){return t(this,e),b(i)}.bind(this));var u=(0,o.scaleLog)().domain([a.minEpochs,a.maxEpochs]).range([l[0]+r.padding_top+l[l.length-1]+5-1,l[0]+r.padding_top]),d=(0,X.axisRight)(u),h=r.scale_format;"pow10"===h?d.tickValues([1,10,100,1e3,1e4,1e5,1e6,1e7]):y(h)?d.tickFormat(h):d.tickFormat((0,Y.format)("d"));var f=this.colorScale.append("g").attr("class","legend axis").attr("transform","translate("+c+",0)").call(d);"pow10"===h&&f.selectAll(".tick text").text(null).filter(function(i){return t(this,e),i/Math.pow(10,Math.ceil(Math.log(i)/Math.LN10-1e-12))==1}.bind(this)).text(10).append("tspan").attr("dy","-.7em").text(function(i){return t(this,e),Math.round(Math.log(i)/Math.LN10)}.bind(this)),this.colorScale.attr("transform","translate("+(n.state.current.width-this.xForColorScale())+", 0)")},i.xForColorScale=function(){return this.owner.config.padding_right+this.colorScale.node().getBBox().width},i.getColorScalePadding=function(){return this.xForColorScale()+this.owner.config.padding_left+20},e}(),z=function(a){var s,c;function l(t){var i=a.call(this,t)||this;return i.config=void 0,i.colorScale=void 0,i.elements=void 0,i.config=new P,e(i)||e(i)}c=a,(s=l).prototype=Object.create(c.prototype),s.prototype.constructor=s,i(s,c);var b=l.prototype;return b.$beforeInit=function(){var e=this,i=this.$$;i.config.data_xSort=!1,i.isMultipleX=function(){return t(this,e),!0}.bind(this),i.showGridFocus=function(){t(this,e)}.bind(this),i.labelishData=function(i){return t(this,e),i.values}.bind(this),i.opacityForCircle=function(){return t(this,e),1}.bind(this);var n=i.getCurrentPaddingRight.bind(i);i.getCurrentPaddingRight=function(){return t(this,e),n()+(this.colorScale?this.colorScale.getColorScalePadding():0)}.bind(this)},b.$init=function(){var t=this.$$;T.call(this,this.options),t.color=this.getStanfordPointColor.bind(t),this.colorScale=new V(this),this.elements=new B(this),this.convertData(),this.initStanfordData(),this.setStanfordTooltip(),this.colorScale.drawColorScale(),this.$redraw()},b.$redraw=function(t){var e,i;null==(e=this.colorScale)||e.drawColorScale(),null==(i=this.elements)||i.updateStanfordElements(t)},b.getOptions=function(){return new P},b.convertData=function(){var e=this,i=this.$$.data.targets,n=this.options.epochs;i.forEach(function(i){var r=this;t(this,e),i.values.forEach(function(e,i){t(this,r),e.epochs=n[i]}.bind(this)),i.minEpochs=void 0,i.maxEpochs=void 0,i.colors=void 0,i.colorscale=void 0}.bind(this))},b.xvCustom=function(t,e){var i=this,n=i.axis,r=i.config,o=e?t[e]:i.getBaseValue(t);return n.isTimeSeries()?o=M.call(i,o):n.isCategorized()&&x(o)&&(o=r.axis_x_categories.indexOf(t.value)),Math.ceil(i.scale.x(o))},b.yvCustom=function(t,e){var i=this.scale,n=t.axis&&"y2"===t.axis?i.y2:i.y,r=e?t[e]:this.getBaseValue(t);return Math.ceil(n(r))},b.initStanfordData=function(){var e=this,i=this.config,a=this.$$.data.targets[0];a.values.sort(R);var s=a.values.map(function(i){return t(this,e),i.epochs}.bind(this));a.minEpochs=isNaN(i.scale_min)?Math.min.apply(Math,s):i.scale_min,a.maxEpochs=isNaN(i.scale_max)?Math.max.apply(Math,s):i.scale_max,a.colors=y(i.colors)?i.colors:(0,n.interpolateHslLong)((0,r.hsl)(250,1,.5),(0,r.hsl)(0,1,.5)),a.colorscale=(0,o.scaleSequentialLog)(a.colors).domain([a.minEpochs,a.maxEpochs])},b.getStanfordPointColor=function(t){return this.data.targets[0].colorscale(t.epochs)},b.setStanfordTooltip=function(){var e=this.$$.config;E(e.tooltip_contents)&&(e.tooltip_contents=function(i,n,r,o){var a=this,s=e.data_x,c='<table class="'+h.tooltip+'"><tbody>';return i.forEach(function(e){t(this,a);var i=e.id,l=void 0===i?"":i,b=e.value,u=void 0===b?0:b,d=e.epochs,f=void 0===d?0:d,p=e.x;c+="<tr>\n\t\t\t\t\t\t\t<th>"+(s||"")+'</th>\n\t\t\t\t\t\t\t<th class="value">'+n(void 0===p?"":p)+"</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>"+e.id+'</th>\n\t\t\t\t\t\t\t<th class="value">'+r(u)+'</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class="'+h.tooltipName+"-"+l+'">\n\t\t\t\t\t\t\t<td class="name"><span style="background-color:'+o(e)+'"></span>Epochs</td>\n\t\t\t\t\t\t\t<td class="value">'+r(f)+"</td>\n\t\t\t\t\t\t</tr>"}.bind(this)),c+"</tbody></table>"})},b.countEpochsInRegion=function(e){var i=this,n=this.data.targets[0],r=n.values.reduce(function(e,n){return t(this,i),e+ +n.epochs}.bind(this),0),o=n.values.reduce(function(n,r){return t(this,i),function(t,e){for(var i=t.x,n=t.value,r=!1,o=0,a=e.length-1;o<e.length;a=o++){var s=e[o].x,c=e[o].y,l=e[a].x,b=e[a].y;c>n!=b>n&&i<(l-s)*(n-c)/(b-c)+s&&(r=!r)}return r}(r,e)?n+ +r.epochs:n}.bind(this),0);return{value:o,percentage:0!==o?+(o/r*100).toFixed(1):0}},l}(k)}(),b=b.default}()}));
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.0-next.1
8
+ * @version 3.7.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -236,7 +236,7 @@ var Plugin = /*#__PURE__*/function () {
236
236
  };
237
237
  return Plugin;
238
238
  }();
239
- Plugin.version = "3.7.0-next.1";
239
+ Plugin.version = "3.7.0-next.2";
240
240
 
241
241
  ;// CONCATENATED MODULE: ./src/Plugin/tableview/Options.ts
242
242
  /**
@@ -507,7 +507,8 @@ function hasValue(dict, value) {
507
507
  * @private
508
508
  */
509
509
  function callFn(fn, thisArg) {
510
- for (var isFn = isFunction(fn), _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
510
+ var isFn = isFunction(fn);
511
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
511
512
  args[_key - 2] = arguments[_key];
512
513
  }
513
514
  isFn && fn.call.apply(fn, [thisArg].concat(args));
@@ -679,8 +680,9 @@ function getPointer(event, element) {
679
680
  function getBrushSelection(ctx) {
680
681
  var event = ctx.event,
681
682
  $el = ctx.$el,
682
- main = $el.subchart.main || $el.main,
683
- selection;
683
+ main = $el.subchart.main || $el.main;
684
+ var selection;
685
+
684
686
  // check from event
685
687
  if (event && event.type === "brush") {
686
688
  selection = event.selection;
@@ -739,8 +741,8 @@ function findIndex(arr, v, start, end, isRotated) {
739
741
  if (start > end) {
740
742
  return -1;
741
743
  }
742
- var mid = Math.floor((start + end) / 2),
743
- _arr$mid = arr[mid],
744
+ var mid = Math.floor((start + end) / 2);
745
+ var _arr$mid = arr[mid],
744
746
  x = _arr$mid.x,
745
747
  _arr$mid$w = _arr$mid.w,
746
748
  w = _arr$mid$w === void 0 ? 0 : _arr$mid$w;
@@ -778,12 +780,12 @@ function brushEmpty(ctx) {
778
780
  * @private
779
781
  */
780
782
  function deepClone() {
781
- for (var _this6 = this, clone = function (v) {
783
+ for (var _this6 = this, _clone = function clone(v) {
782
784
  _newArrowCheck(this, _this6);
783
785
  if (isObject(v) && v.constructor) {
784
786
  var r = new v.constructor();
785
787
  for (var k in v) {
786
- r[k] = clone(v[k]);
788
+ r[k] = _clone(v[k]);
787
789
  }
788
790
  return r;
789
791
  }
@@ -793,7 +795,7 @@ function deepClone() {
793
795
  }
794
796
  return objectN.map(function (v) {
795
797
  _newArrowCheck(this, _this6);
796
- return clone(v);
798
+ return _clone(v);
797
799
  }.bind(this)).reduce(function (a, c) {
798
800
  _newArrowCheck(this, _this6);
799
801
  return _objectSpread(_objectSpread({}, a), c);
@@ -1270,12 +1272,12 @@ function loadConfig(config) {
1270
1272
  target,
1271
1273
  keys,
1272
1274
  read,
1273
- find = function () {
1275
+ _find = function find() {
1274
1276
  _newArrowCheck(this, _this);
1275
1277
  var key = keys.shift();
1276
1278
  if (key && target && isObjectType(target) && key in target) {
1277
1279
  target = target[key];
1278
- return find();
1280
+ return _find();
1279
1281
  } else if (!key) {
1280
1282
  return target;
1281
1283
  }
@@ -1285,7 +1287,7 @@ function loadConfig(config) {
1285
1287
  _newArrowCheck(this, _this);
1286
1288
  target = config;
1287
1289
  keys = key.split("_");
1288
- read = find();
1290
+ read = _find();
1289
1291
  if (isDefined(read)) {
1290
1292
  thisConfig[key] = read;
1291
1293
  }