billboard.js 3.9.4 → 3.10.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 (100) hide show
  1. package/README.md +2 -2
  2. package/dist/billboard.css +2 -2
  3. package/dist/billboard.js +2742 -2516
  4. package/dist/billboard.min.css +2 -2
  5. package/dist/billboard.min.js +2 -2
  6. package/dist/billboard.pkgd.js +2936 -2704
  7. package/dist/billboard.pkgd.min.js +4 -4
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.js +15 -15
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.js +205 -186
  11. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.js +231 -226
  13. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.js +172 -152
  15. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.js +161 -142
  17. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  18. package/dist/plugin/pkgd/{billboardjs-plugin-bubblecompare.js → billboardjs-plugin-bubblecompare.pkgd.js} +52 -32
  19. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +12 -0
  20. package/dist/plugin/pkgd/{billboardjs-plugin-sparkline.js → billboardjs-plugin-sparkline.pkgd.js} +239 -200
  21. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +12 -0
  22. package/dist/plugin/pkgd/{billboardjs-plugin-stanford.js → billboardjs-plugin-stanford.pkgd.js} +301 -277
  23. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +12 -0
  24. package/dist/plugin/pkgd/{billboardjs-plugin-tableview.js → billboardjs-plugin-tableview.pkgd.js} +206 -166
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +12 -0
  26. package/dist/plugin/pkgd/{billboardjs-plugin-textoverlap.js → billboardjs-plugin-textoverlap.pkgd.js} +308 -278
  27. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +12 -0
  28. package/dist/theme/dark.css +5 -4
  29. package/dist/theme/dark.min.css +2 -2
  30. package/dist/theme/datalab.css +5 -4
  31. package/dist/theme/datalab.min.css +2 -2
  32. package/dist/theme/graph.css +5 -4
  33. package/dist/theme/graph.min.css +2 -2
  34. package/dist/theme/insight.css +5 -4
  35. package/dist/theme/insight.min.css +2 -2
  36. package/dist-esm/billboard.js +718 -509
  37. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +3 -3
  38. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +15 -9
  39. package/dist-esm/plugin/billboardjs-plugin-stanford.js +21 -28
  40. package/dist-esm/plugin/billboardjs-plugin-tableview.js +17 -11
  41. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +13 -7
  42. package/package.json +32 -32
  43. package/src/Chart/api/axis.ts +4 -0
  44. package/src/Chart/api/category.ts +8 -4
  45. package/src/Chart/api/export.ts +1 -2
  46. package/src/Chart/api/subchart.ts +162 -89
  47. package/src/Chart/api/zoom.ts +69 -79
  48. package/src/ChartInternal/Axis/AxisRendererHelper.ts +0 -8
  49. package/src/ChartInternal/data/IData.ts +4 -1
  50. package/src/ChartInternal/data/convert.helper.ts +1 -15
  51. package/src/ChartInternal/data/data.ts +8 -2
  52. package/src/ChartInternal/interactions/eventrect.ts +3 -4
  53. package/src/ChartInternal/interactions/flow.ts +1 -7
  54. package/src/ChartInternal/interactions/interaction.ts +11 -5
  55. package/src/ChartInternal/interactions/subchart.ts +36 -30
  56. package/src/ChartInternal/interactions/zoom.ts +13 -3
  57. package/src/ChartInternal/internals/category.ts +2 -2
  58. package/src/ChartInternal/internals/clip.ts +4 -5
  59. package/src/ChartInternal/internals/color.ts +49 -23
  60. package/src/ChartInternal/internals/domain.ts +46 -10
  61. package/src/ChartInternal/internals/grid.ts +57 -86
  62. package/src/ChartInternal/internals/redraw.ts +1 -6
  63. package/src/ChartInternal/internals/region.ts +35 -12
  64. package/src/ChartInternal/internals/selection.ts +1 -1
  65. package/src/ChartInternal/internals/text.ts +1 -26
  66. package/src/ChartInternal/internals/title.ts +10 -48
  67. package/src/ChartInternal/internals/tooltip.ts +50 -54
  68. package/src/ChartInternal/shape/arc.ts +2 -2
  69. package/src/ChartInternal/shape/candlestick.ts +2 -17
  70. package/src/ChartInternal/shape/point.ts +36 -8
  71. package/src/ChartInternal/shape/radar.ts +1 -1
  72. package/src/ChartInternal/shape/shape.ts +50 -4
  73. package/src/ChartInternal/shape/treemap.ts +2 -2
  74. package/src/Plugin/bubblecompare/index.ts +1 -1
  75. package/src/Plugin/sparkline/index.ts +2 -2
  76. package/src/Plugin/stanford/Elements.ts +10 -2
  77. package/src/Plugin/stanford/index.ts +1 -24
  78. package/src/Plugin/tableview/index.ts +2 -2
  79. package/src/config/Options/axis/x.ts +1 -0
  80. package/src/config/Options/common/main.ts +12 -2
  81. package/src/config/Options/common/point.ts +41 -0
  82. package/src/config/Options/common/tooltip.ts +10 -10
  83. package/src/config/Options/data/axis.ts +3 -1
  84. package/src/config/Options/data/data.ts +10 -2
  85. package/src/config/Options/shape/area.ts +10 -4
  86. package/src/config/Options/shape/bar.ts +10 -4
  87. package/src/config/Store/State.ts +3 -0
  88. package/src/module/Cache.ts +7 -5
  89. package/src/module/browser.ts +34 -14
  90. package/src/module/util.ts +8 -4
  91. package/src/module/worker.ts +24 -13
  92. package/src/scss/billboard.scss +4 -2
  93. package/src/scss/theme/dark.scss +4 -2
  94. package/src/scss/theme/datalab.scss +4 -2
  95. package/src/scss/theme/graph.scss +4 -2
  96. package/src/scss/theme/insight.scss +4 -2
  97. package/types/chart.d.ts +11 -0
  98. package/types/options.d.ts +9 -3
  99. package/types/options.shape.d.ts +26 -0
  100. package/types/types.d.ts +15 -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.9.4
8
+ * @version 3.10.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -17,7 +17,7 @@
17
17
  else if(typeof exports === 'object')
18
18
  exports["bb"] = factory();
19
19
  else
20
- root["bb"] = root["bb"] || {}, root["bb"]["plugin"] = root["bb"]["plugin"] || {}, root["bb"]["plugin"]["textoverlap"] = factory();
20
+ root["bb"] = root["bb"] || {}, root["bb"]["plugin"] = root["bb"]["plugin"] || {}, root["bb"]["plugin"]["textoverlap.pkgd"] = factory();
21
21
  })(this, function() {
22
22
  return /******/ (function() { // webpackBootstrap
23
23
  /******/ var __webpack_modules__ = ([
@@ -1233,10 +1233,10 @@ var store = __webpack_require__(37);
1233
1233
  (module.exports = function (key, value) {
1234
1234
  return store[key] || (store[key] = value !== undefined ? value : {});
1235
1235
  })('versions', []).push({
1236
- version: '3.32.1',
1236
+ version: '3.32.2',
1237
1237
  mode: IS_PURE ? 'pure' : 'global',
1238
1238
  copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
1239
- license: 'https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE',
1239
+ license: 'https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE',
1240
1240
  source: 'https://github.com/zloirock/core-js'
1241
1241
  });
1242
1242
 
@@ -4590,7 +4590,9 @@ try {
4590
4590
  } catch (error) { /* empty */ }
4591
4591
 
4592
4592
  module.exports = function (exec, SKIP_CLOSING) {
4593
- if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
4593
+ try {
4594
+ if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
4595
+ } catch (error) { return false; } // workaround of old WebKit + `eval` bug
4594
4596
  var ITERATION_SUPPORT = false;
4595
4597
  try {
4596
4598
  var object = {};
@@ -4789,12 +4791,15 @@ module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, I
4789
4791
 
4790
4792
  var getIterationMethod = function (KIND) {
4791
4793
  if (KIND === DEFAULT && defaultIterator) return defaultIterator;
4792
- if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
4794
+ if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
4795
+
4793
4796
  switch (KIND) {
4794
4797
  case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
4795
4798
  case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
4796
4799
  case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
4797
- } return function () { return new IteratorConstructor(this); };
4800
+ }
4801
+
4802
+ return function () { return new IteratorConstructor(this); };
4798
4803
  };
4799
4804
 
4800
4805
  var TO_STRING_TAG = NAME + ' Iterator';
@@ -6395,7 +6400,7 @@ var pack = function (number, mantissaLength, bytes) {
6395
6400
  exponent = eMax;
6396
6401
  } else if (exponent + eBias >= 1) {
6397
6402
  mantissa = roundToEven((number * c - 1) * pow(2, mantissaLength));
6398
- exponent = exponent + eBias;
6403
+ exponent += eBias;
6399
6404
  } else {
6400
6405
  mantissa = roundToEven(number * pow(2, eBias - 1) * pow(2, mantissaLength));
6401
6406
  exponent = 0;
@@ -6444,8 +6449,8 @@ var unpack = function (buffer, mantissaLength) {
6444
6449
  } else if (exponent === eMax) {
6445
6450
  return mantissa ? NaN : s ? -Infinity : Infinity;
6446
6451
  } else {
6447
- mantissa = mantissa + pow(2, mantissaLength);
6448
- exponent = exponent - eBias;
6452
+ mantissa += pow(2, mantissaLength);
6453
+ exponent -= eBias;
6449
6454
  } return (s ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
6450
6455
  };
6451
6456
 
@@ -8020,6 +8025,7 @@ var exp = Math.exp;
8020
8025
  // https://tc39.es/ecma262/#sec-math.expm1
8021
8026
  module.exports = (!$expm1
8022
8027
  // Old FF bug
8028
+ // eslint-disable-next-line no-loss-of-precision -- required for old engines
8023
8029
  || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
8024
8030
  // Tor Browser bug
8025
8031
  || $expm1(-2e-17) !== -2e-17
@@ -8385,9 +8391,20 @@ var toNumber = function (argument) {
8385
8391
  if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
8386
8392
  } else if (first === 48) {
8387
8393
  switch (charCodeAt(it, 1)) {
8388
- case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
8389
- case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
8390
- default: return +it;
8394
+ // fast equal of /^0b[01]+$/i
8395
+ case 66:
8396
+ case 98:
8397
+ radix = 2;
8398
+ maxCode = 49;
8399
+ break;
8400
+ // fast equal of /^0o[0-7]+$/i
8401
+ case 79:
8402
+ case 111:
8403
+ radix = 8;
8404
+ maxCode = 55;
8405
+ break;
8406
+ default:
8407
+ return +it;
8391
8408
  }
8392
8409
  digits = stringSlice(it, 2);
8393
8410
  length = digits.length;
@@ -11446,7 +11463,7 @@ var handleNCG = function (string) {
11446
11463
  for (; index <= length; index++) {
11447
11464
  chr = charAt(string, index);
11448
11465
  if (chr === '\\') {
11449
- chr = chr + charAt(string, ++index);
11466
+ chr += charAt(string, ++index);
11450
11467
  } else if (chr === ']') {
11451
11468
  brackets = false;
11452
11469
  } else if (!brackets) switch (true) {
@@ -12477,7 +12494,10 @@ module.exports = function (KEY, exec, FORCED, SHAM) {
12477
12494
  re[SYMBOL] = /./[SYMBOL];
12478
12495
  }
12479
12496
 
12480
- re.exec = function () { execCalled = true; return null; };
12497
+ re.exec = function () {
12498
+ execCalled = true;
12499
+ return null;
12500
+ };
12481
12501
 
12482
12502
  re[SYMBOL]('');
12483
12503
  return !execCalled;
@@ -16406,7 +16426,7 @@ var checkBasicSemantic = function (structuredCloneImplementation) {
16406
16426
  var set1 = new global.Set([7]);
16407
16427
  var set2 = structuredCloneImplementation(set1);
16408
16428
  var number = structuredCloneImplementation(Object(7));
16409
- return set2 === set1 || !set2.has(7) || typeof number != 'object' || number !== 7;
16429
+ return set2 === set1 || !set2.has(7) || typeof number != 'object' || +number !== 7;
16410
16430
  }) && structuredCloneImplementation;
16411
16431
  };
16412
16432
 
@@ -18366,7 +18386,7 @@ var encode = function (input) {
18366
18386
  var q = delta;
18367
18387
  var k = base;
18368
18388
  while (true) {
18369
- var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
18389
+ var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
18370
18390
  if (q < t) break;
18371
18391
  var qMinusT = q - t;
18372
18392
  var baseMinusT = base - t;
@@ -22213,8 +22233,8 @@ function defaultGetY(p) {
22213
22233
  }
22214
22234
 
22215
22235
  ;// CONCATENATED MODULE: ./node_modules/d3-delaunay/src/path.js
22216
- var path_epsilon = 1e-6;
22217
- var Path = /*#__PURE__*/function () {
22236
+ const path_epsilon = 1e-6;
22237
+ let Path = /*#__PURE__*/function () {
22218
22238
  function Path() {
22219
22239
  this._x0 = this._y0 =
22220
22240
  // start of current subpath
@@ -22236,7 +22256,7 @@ var Path = /*#__PURE__*/function () {
22236
22256
  };
22237
22257
  _proto.arc = function arc(x, y, r) {
22238
22258
  x = +x, y = +y, r = +r;
22239
- var x0 = x + r,
22259
+ const x0 = x + r,
22240
22260
  y0 = y;
22241
22261
  if (r < 0) throw new Error("negative radius");
22242
22262
  if (this._x1 === null) this._ += "M" + x0 + "," + y0;else if (Math.abs(this._x1 - x0) > path_epsilon || Math.abs(this._y1 - y0) > path_epsilon) this._ += "L" + x0 + "," + y0;
@@ -22253,7 +22273,7 @@ var Path = /*#__PURE__*/function () {
22253
22273
  }();
22254
22274
 
22255
22275
  ;// CONCATENATED MODULE: ./node_modules/d3-delaunay/src/polygon.js
22256
- var Polygon = /*#__PURE__*/function () {
22276
+ let Polygon = /*#__PURE__*/function () {
22257
22277
  function Polygon() {
22258
22278
  this._ = [];
22259
22279
  }
@@ -22273,21 +22293,16 @@ var Polygon = /*#__PURE__*/function () {
22273
22293
  return Polygon;
22274
22294
  }();
22275
22295
 
22276
- ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/readOnlyError.js
22277
- function _readOnlyError(name) {
22278
- throw new TypeError("\"" + name + "\" is read-only");
22279
- }
22280
22296
  ;// CONCATENATED MODULE: ./node_modules/d3-delaunay/src/voronoi.js
22281
22297
 
22282
-
22283
22298
  function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: !0 }; return { done: !1, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
22284
22299
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
22285
22300
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
22286
22301
 
22287
22302
 
22288
- var Voronoi = /*#__PURE__*/function () {
22303
+ let Voronoi = /*#__PURE__*/function () {
22289
22304
  function Voronoi(delaunay, _temp) {
22290
- var _ref = _temp === void 0 ? [0, 0, 960, 500] : _temp,
22305
+ let _ref = _temp === void 0 ? [0, 0, 960, 500] : _temp,
22291
22306
  xmin = _ref[0],
22292
22307
  ymin = _ref[1],
22293
22308
  xmax = _ref[2],
@@ -22307,29 +22322,29 @@ var Voronoi = /*#__PURE__*/function () {
22307
22322
  return this;
22308
22323
  };
22309
22324
  _proto._init = function _init() {
22310
- var _this$delaunay = this.delaunay,
22325
+ const _this$delaunay = this.delaunay,
22311
22326
  points = _this$delaunay.points,
22312
22327
  hull = _this$delaunay.hull,
22313
22328
  triangles = _this$delaunay.triangles,
22314
22329
  vectors = this.vectors;
22315
- var bx, by; // lazily computed barycenter of the hull
22330
+ let bx, by; // lazily computed barycenter of the hull
22316
22331
 
22317
22332
  // Compute circumcenters.
22318
- var circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2);
22319
- for (var i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) {
22320
- var t1 = triangles[i] * 2,
22333
+ const circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2);
22334
+ for (let i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) {
22335
+ const t1 = triangles[i] * 2,
22321
22336
  t2 = triangles[i + 1] * 2,
22322
22337
  t3 = triangles[i + 2] * 2,
22323
- _x = points[t1],
22324
- _y = points[t1 + 1],
22338
+ x1 = points[t1],
22339
+ y1 = points[t1 + 1],
22325
22340
  x2 = points[t2],
22326
22341
  y2 = points[t2 + 1],
22327
22342
  x3 = points[t3],
22328
22343
  y3 = points[t3 + 1],
22329
- dx = x2 - _x,
22330
- dy = y2 - _y,
22331
- ex = x3 - _x,
22332
- ey = y3 - _y,
22344
+ dx = x2 - x1,
22345
+ dy = y2 - y1,
22346
+ ex = x3 - x1,
22347
+ ey = y3 - y1,
22333
22348
  ab = (dx * ey - dy * ex) * 2;
22334
22349
  if (Math.abs(ab) < 1e-9) {
22335
22350
  // For a degenerate triangle, the circumcenter is at the infinity, in a
@@ -22338,44 +22353,44 @@ var Voronoi = /*#__PURE__*/function () {
22338
22353
  if (bx === undefined) {
22339
22354
  bx = by = 0;
22340
22355
  for (var _iterator = _createForOfIteratorHelperLoose(hull), _step; !(_step = _iterator()).done;) {
22341
- var _i = _step.value;
22342
- bx += points[_i * 2], by += points[_i * 2 + 1];
22356
+ const i = _step.value;
22357
+ bx += points[i * 2], by += points[i * 2 + 1];
22343
22358
  }
22344
22359
  bx /= hull.length, by /= hull.length;
22345
22360
  }
22346
- var a = 1e9 * Math.sign((bx - _x) * ey - (by - _y) * ex);
22347
- x = (_x + x3) / 2 - a * ey;
22348
- y = (_y + y3) / 2 + a * ex;
22361
+ const a = 1e9 * Math.sign((bx - x1) * ey - (by - y1) * ex);
22362
+ x = (x1 + x3) / 2 - a * ey;
22363
+ y = (y1 + y3) / 2 + a * ex;
22349
22364
  } else {
22350
- var d = 1 / ab,
22365
+ const d = 1 / ab,
22351
22366
  bl = dx * dx + dy * dy,
22352
22367
  cl = ex * ex + ey * ey;
22353
- x = _x + (ey * bl - dy * cl) * d;
22354
- y = _y + (dx * cl - ex * bl) * d;
22368
+ x = x1 + (ey * bl - dy * cl) * d;
22369
+ y = y1 + (dx * cl - ex * bl) * d;
22355
22370
  }
22356
22371
  circumcenters[j] = x;
22357
22372
  circumcenters[j + 1] = y;
22358
22373
  }
22359
22374
 
22360
22375
  // Compute exterior cell rays.
22361
- var h = hull[hull.length - 1],
22376
+ let h = hull[hull.length - 1],
22362
22377
  p0,
22363
22378
  p1 = h * 4,
22364
22379
  x0,
22365
- _x = points[2 * h],
22380
+ x1 = points[2 * h],
22366
22381
  y0,
22367
- _y = points[2 * h + 1];
22382
+ y1 = points[2 * h + 1];
22368
22383
  vectors.fill(0);
22369
- for (var _i2 = 0; _i2 < hull.length; ++_i2) {
22370
- h = hull[_i2];
22371
- p0 = p1, x0 = _x, y0 = _y;
22372
- p1 = h * 4, (points[2 * h], _readOnlyError("x1")), (points[2 * h + 1], _readOnlyError("y1"));
22373
- vectors[p0 + 2] = vectors[p1] = y0 - _y;
22374
- vectors[p0 + 3] = vectors[p1 + 1] = _x - x0;
22384
+ for (let i = 0; i < hull.length; ++i) {
22385
+ h = hull[i];
22386
+ p0 = p1, x0 = x1, y0 = y1;
22387
+ p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1];
22388
+ vectors[p0 + 2] = vectors[p1] = y0 - y1;
22389
+ vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0;
22375
22390
  }
22376
22391
  };
22377
22392
  _proto.render = function render(context) {
22378
- var buffer = context == null ? context = new Path() : undefined,
22393
+ const buffer = context == null ? context = new Path() : undefined,
22379
22394
  _this$delaunay2 = this.delaunay,
22380
22395
  halfedges = _this$delaunay2.halfedges,
22381
22396
  inedges = _this$delaunay2.inedges,
@@ -22383,10 +22398,10 @@ var Voronoi = /*#__PURE__*/function () {
22383
22398
  circumcenters = this.circumcenters,
22384
22399
  vectors = this.vectors;
22385
22400
  if (hull.length <= 1) return null;
22386
- for (var i = 0, n = halfedges.length; i < n; ++i) {
22387
- var j = halfedges[i];
22401
+ for (let i = 0, n = halfedges.length; i < n; ++i) {
22402
+ const j = halfedges[i];
22388
22403
  if (j < i) continue;
22389
- var ti = Math.floor(i / 3) * 2,
22404
+ const ti = Math.floor(i / 3) * 2,
22390
22405
  tj = Math.floor(j / 3) * 2,
22391
22406
  xi = circumcenters[ti],
22392
22407
  yi = circumcenters[ti + 1],
@@ -22394,11 +22409,11 @@ var Voronoi = /*#__PURE__*/function () {
22394
22409
  yj = circumcenters[tj + 1];
22395
22410
  this._renderSegment(xi, yi, xj, yj, context);
22396
22411
  }
22397
- var h0,
22412
+ let h0,
22398
22413
  h1 = hull[hull.length - 1];
22399
- for (var _i3 = 0; _i3 < hull.length; ++_i3) {
22400
- h0 = h1, h1 = hull[_i3];
22401
- var t = Math.floor(inedges[h1] / 3) * 2,
22414
+ for (let i = 0; i < hull.length; ++i) {
22415
+ h0 = h1, h1 = hull[i];
22416
+ const t = Math.floor(inedges[h1] / 3) * 2,
22402
22417
  x = circumcenters[t],
22403
22418
  y = circumcenters[t + 1],
22404
22419
  v = h0 * 4,
@@ -22408,19 +22423,19 @@ var Voronoi = /*#__PURE__*/function () {
22408
22423
  return buffer && buffer.value();
22409
22424
  };
22410
22425
  _proto.renderBounds = function renderBounds(context) {
22411
- var buffer = context == null ? context = new Path() : undefined;
22426
+ const buffer = context == null ? context = new Path() : undefined;
22412
22427
  context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin);
22413
22428
  return buffer && buffer.value();
22414
22429
  };
22415
22430
  _proto.renderCell = function renderCell(i, context) {
22416
- var buffer = context == null ? context = new Path() : undefined,
22431
+ const buffer = context == null ? context = new Path() : undefined,
22417
22432
  points = this._clip(i);
22418
22433
  if (points === null || !points.length) return;
22419
22434
  context.moveTo(points[0], points[1]);
22420
- var n = points.length;
22435
+ let n = points.length;
22421
22436
  while (points[0] === points[n - 2] && points[1] === points[n - 1] && n > 1) n -= 2;
22422
- for (var _i4 = 2; _i4 < n; _i4 += 2) {
22423
- if (points[_i4] !== points[_i4 - 2] || points[_i4 + 1] !== points[_i4 - 1]) context.lineTo(points[_i4], points[_i4 + 1]);
22437
+ for (let i = 2; i < n; i += 2) {
22438
+ if (points[i] !== points[i - 2] || points[i + 1] !== points[i - 1]) context.lineTo(points[i], points[i + 1]);
22424
22439
  }
22425
22440
  context.closePath();
22426
22441
  return buffer && buffer.value();
@@ -22456,13 +22471,13 @@ var Voronoi = /*#__PURE__*/function () {
22456
22471
  }, cellPolygons, this);
22457
22472
  });
22458
22473
  _proto.cellPolygon = function cellPolygon(i) {
22459
- var polygon = new Polygon();
22474
+ const polygon = new Polygon();
22460
22475
  this.renderCell(i, polygon);
22461
22476
  return polygon.value();
22462
22477
  };
22463
22478
  _proto._renderSegment = function _renderSegment(x0, y0, x1, y1, context) {
22464
- var S;
22465
- var c0 = this._regioncode(x0, y0),
22479
+ let S;
22480
+ const c0 = this._regioncode(x0, y0),
22466
22481
  c1 = this._regioncode(x1, y1);
22467
22482
  if (c0 === 0 && c1 === 0) {
22468
22483
  context.moveTo(x0, y0);
@@ -22535,17 +22550,17 @@ var Voronoi = /*#__PURE__*/function () {
22535
22550
  }, neighbors, this);
22536
22551
  });
22537
22552
  _proto._cell = function _cell(i) {
22538
- var circumcenters = this.circumcenters,
22553
+ const circumcenters = this.circumcenters,
22539
22554
  _this$delaunay3 = this.delaunay,
22540
22555
  inedges = _this$delaunay3.inedges,
22541
22556
  halfedges = _this$delaunay3.halfedges,
22542
22557
  triangles = _this$delaunay3.triangles,
22543
22558
  e0 = inedges[i];
22544
22559
  if (e0 === -1) return null; // coincident point
22545
- var points = [];
22546
- var e = e0;
22560
+ const points = [];
22561
+ let e = e0;
22547
22562
  do {
22548
- var t = Math.floor(e / 3);
22563
+ const t = Math.floor(e / 3);
22549
22564
  points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]);
22550
22565
  e = e % 3 === 2 ? e - 2 : e + 1;
22551
22566
  if (triangles[e] !== i) break; // bad triangulation
@@ -22558,15 +22573,15 @@ var Voronoi = /*#__PURE__*/function () {
22558
22573
  if (i === 0 && this.delaunay.hull.length === 1) {
22559
22574
  return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];
22560
22575
  }
22561
- var points = this._cell(i);
22576
+ const points = this._cell(i);
22562
22577
  if (points === null) return null;
22563
- var V = this.vectors,
22578
+ const V = this.vectors,
22564
22579
  v = i * 4;
22565
22580
  return this._simplify(V[v] || V[v + 1] ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3]) : this._clipFinite(i, points));
22566
22581
  };
22567
22582
  _proto._clipFinite = function _clipFinite(i, points) {
22568
- var n = points.length;
22569
- var P = null,
22583
+ const n = points.length;
22584
+ let P = null,
22570
22585
  x0,
22571
22586
  y0,
22572
22587
  x1 = points[n - 2],
@@ -22575,18 +22590,14 @@ var Voronoi = /*#__PURE__*/function () {
22575
22590
  c1 = this._regioncode(x1, y1),
22576
22591
  e0,
22577
22592
  e1 = 0;
22578
- for (var j = 0; j < n; j += 2) {
22593
+ for (let j = 0; j < n; j += 2) {
22579
22594
  x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1];
22580
22595
  c0 = c1, c1 = this._regioncode(x1, y1);
22581
22596
  if (c0 === 0 && c1 === 0) {
22582
22597
  e0 = e1, e1 = 0;
22583
22598
  if (P) P.push(x1, y1);else P = [x1, y1];
22584
22599
  } else {
22585
- var S = void 0,
22586
- sx0 = void 0,
22587
- sy0 = void 0,
22588
- sx1 = void 0,
22589
- sy1 = void 0;
22600
+ let S, sx0, sy0, sx1, sy1;
22590
22601
  if (c0 === 0) {
22591
22602
  if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue;
22592
22603
  var _S = S;
@@ -22620,7 +22631,7 @@ var Voronoi = /*#__PURE__*/function () {
22620
22631
  };
22621
22632
  _proto._clipSegment = function _clipSegment(x0, y0, x1, y1, c0, c1) {
22622
22633
  // for more robustness, always consider the segment in the same order
22623
- var flip = c0 < c1;
22634
+ const flip = c0 < c1;
22624
22635
  if (flip) {
22625
22636
  var _ref2 = [x1, y1, x0, y0, c1, c0];
22626
22637
  x0 = _ref2[0];
@@ -22633,22 +22644,22 @@ var Voronoi = /*#__PURE__*/function () {
22633
22644
  while (!0) {
22634
22645
  if (c0 === 0 && c1 === 0) return flip ? [x1, y1, x0, y0] : [x0, y0, x1, y1];
22635
22646
  if (c0 & c1) return null;
22636
- var x = void 0,
22637
- y = void 0,
22647
+ let x,
22648
+ y,
22638
22649
  c = c0 || c1;
22639
22650
  if (c & 8) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax;else if (c & 4) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin;else if (c & 2) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax;else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin;
22640
22651
  if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0);else x1 = x, y1 = y, c1 = this._regioncode(x1, y1);
22641
22652
  }
22642
22653
  };
22643
22654
  _proto._clipInfinite = function _clipInfinite(i, points, vx0, vy0, vxn, vyn) {
22644
- var P = Array.from(points),
22655
+ let P = Array.from(points),
22645
22656
  p;
22646
22657
  if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]);
22647
22658
  if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]);
22648
22659
  if (P = this._clipFinite(i, P)) {
22649
- for (var j = 0, n = P.length, _c, _c2 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) {
22650
- _c = _c2, _c2 = this._edgecode(P[j], P[j + 1]);
22651
- if (_c && _c2) j = this._edge(i, _c, _c2, P, j), n = P.length;
22660
+ for (let j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) {
22661
+ c0 = c1, c1 = this._edgecode(P[j], P[j + 1]);
22662
+ if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length;
22652
22663
  }
22653
22664
  } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) {
22654
22665
  P = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax];
@@ -22657,8 +22668,7 @@ var Voronoi = /*#__PURE__*/function () {
22657
22668
  };
22658
22669
  _proto._edge = function _edge(i, e0, e1, P, j) {
22659
22670
  while (e0 !== e1) {
22660
- var x = void 0,
22661
- y = void 0;
22671
+ let x, y;
22662
22672
  switch (e0) {
22663
22673
  case 5:
22664
22674
  e0 = 4;
@@ -22702,7 +22712,7 @@ var Voronoi = /*#__PURE__*/function () {
22702
22712
  return j;
22703
22713
  };
22704
22714
  _proto._project = function _project(x0, y0, vx, vy) {
22705
- var t = Infinity,
22715
+ let t = Infinity,
22706
22716
  c,
22707
22717
  x,
22708
22718
  y;
@@ -22734,8 +22744,8 @@ var Voronoi = /*#__PURE__*/function () {
22734
22744
  };
22735
22745
  _proto._simplify = function _simplify(P) {
22736
22746
  if (P && P.length > 4) {
22737
- for (var i = 0; i < P.length; i += 2) {
22738
- var j = (i + 2) % P.length,
22747
+ for (let i = 0; i < P.length; i += 2) {
22748
+ const j = (i + 2) % P.length,
22739
22749
  k = (i + 4) % P.length;
22740
22750
  if (P[i] === P[j] && P[j] === P[k] || P[i + 1] === P[j + 1] && P[j + 1] === P[k + 1]) {
22741
22751
  P.splice(j, 2), i -= 2;
@@ -22759,7 +22769,7 @@ function delaunay_arrayLikeToArray(arr, len) { if (len == null || len > arr.leng
22759
22769
 
22760
22770
 
22761
22771
 
22762
- var tau = 2 * Math.PI,
22772
+ const tau = 2 * Math.PI,
22763
22773
  pow = Math.pow;
22764
22774
  function pointX(p) {
22765
22775
  return p[0];
@@ -22770,10 +22780,10 @@ function pointY(p) {
22770
22780
 
22771
22781
  // A triangulation is collinear if all its triangles have a non-null area
22772
22782
  function collinear(d) {
22773
- var triangles = d.triangles,
22783
+ const triangles = d.triangles,
22774
22784
  coords = d.coords;
22775
- for (var i = 0; i < triangles.length; i += 3) {
22776
- var a = 2 * triangles[i],
22785
+ for (let i = 0; i < triangles.length; i += 3) {
22786
+ const a = 2 * triangles[i],
22777
22787
  b = 2 * triangles[i + 1],
22778
22788
  c = 2 * triangles[i + 2],
22779
22789
  cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1]) - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]);
@@ -22784,7 +22794,7 @@ function collinear(d) {
22784
22794
  function jitter(x, y, r) {
22785
22795
  return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r];
22786
22796
  }
22787
- var Delaunay = /*#__PURE__*/function () {
22797
+ let Delaunay = /*#__PURE__*/function () {
22788
22798
  Delaunay.from = function from(points, fx, fy, that) {
22789
22799
  if (fx === void 0) {
22790
22800
  fx = pointX;
@@ -22808,9 +22818,10 @@ var Delaunay = /*#__PURE__*/function () {
22808
22818
  return this;
22809
22819
  };
22810
22820
  _proto._init = function _init() {
22811
- var _this = this,
22812
- d = this._delaunator,
22821
+ var _this = this;
22822
+ const d = this._delaunator,
22813
22823
  points = this.points;
22824
+
22814
22825
  // check for collinear
22815
22826
  if (d.hull && d.hull.length > 2 && collinear(d)) {
22816
22827
  this.collinear = Int32Array.from({
@@ -22822,12 +22833,12 @@ var Delaunay = /*#__PURE__*/function () {
22822
22833
  _newArrowCheck(this, _this);
22823
22834
  return points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1];
22824
22835
  }.bind(this)); // for exact neighbors
22825
- var e = this.collinear[0],
22836
+ const e = this.collinear[0],
22826
22837
  f = this.collinear[this.collinear.length - 1],
22827
22838
  bounds = [points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1]],
22828
22839
  r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]);
22829
- for (var i = 0, n = points.length / 2; i < n; ++i) {
22830
- var p = jitter(points[2 * i], points[2 * i + 1], r);
22840
+ for (let i = 0, n = points.length / 2; i < n; ++i) {
22841
+ const p = jitter(points[2 * i], points[2 * i + 1], r);
22831
22842
  points[2 * i] = p[0];
22832
22843
  points[2 * i + 1] = p[1];
22833
22844
  }
@@ -22835,7 +22846,7 @@ var Delaunay = /*#__PURE__*/function () {
22835
22846
  } else {
22836
22847
  delete this.collinear;
22837
22848
  }
22838
- var halfedges = this.halfedges = this._delaunator.halfedges,
22849
+ const halfedges = this.halfedges = this._delaunator.halfedges,
22839
22850
  hull = this.hull = this._delaunator.hull,
22840
22851
  triangles = this.triangles = this._delaunator.triangles,
22841
22852
  inedges = this.inedges.fill(-1),
@@ -22843,12 +22854,12 @@ var Delaunay = /*#__PURE__*/function () {
22843
22854
  // Compute an index from each point to an (arbitrary) incoming halfedge
22844
22855
  // Used to give the first neighbor of each point; for this reason,
22845
22856
  // on the hull we give priority to exterior halfedges
22846
- for (var _e = 0, _n = halfedges.length; _e < _n; ++_e) {
22847
- var _p = triangles[_e % 3 === 2 ? _e - 2 : _e + 1];
22848
- if (halfedges[_e] === -1 || inedges[_p] === -1) inedges[_p] = _e;
22857
+ for (let e = 0, n = halfedges.length; e < n; ++e) {
22858
+ const p = triangles[e % 3 === 2 ? e - 2 : e + 1];
22859
+ if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e;
22849
22860
  }
22850
- for (var _i = 0, _n2 = hull.length; _i < _n2; ++_i) {
22851
- hullIndex[hull[_i]] = _i;
22861
+ for (let i = 0, n = hull.length; i < n; ++i) {
22862
+ hullIndex[hull[i]] = i;
22852
22863
  }
22853
22864
 
22854
22865
  // degenerate case: 1 or 2 (distinct) points
@@ -22945,26 +22956,26 @@ var Delaunay = /*#__PURE__*/function () {
22945
22956
  i = 0;
22946
22957
  }
22947
22958
  if ((x = +x, x !== x) || (y = +y, y !== y)) return -1;
22948
- var i0 = i;
22949
- var c;
22959
+ const i0 = i;
22960
+ let c;
22950
22961
  while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c;
22951
22962
  return c;
22952
22963
  };
22953
22964
  _proto._step = function _step(i, x, y) {
22954
- var inedges = this.inedges,
22965
+ const inedges = this.inedges,
22955
22966
  hull = this.hull,
22956
22967
  _hullIndex = this._hullIndex,
22957
22968
  halfedges = this.halfedges,
22958
22969
  triangles = this.triangles,
22959
22970
  points = this.points;
22960
22971
  if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1);
22961
- var c = i,
22972
+ let c = i,
22962
22973
  dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2);
22963
- var e0 = inedges[i];
22964
- var e = e0;
22974
+ const e0 = inedges[i];
22975
+ let e = e0;
22965
22976
  do {
22966
- var t = triangles[e];
22967
- var dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2);
22977
+ let t = triangles[e];
22978
+ const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2);
22968
22979
  if (dt < dc) dc = dt, c = t;
22969
22980
  e = e % 3 === 2 ? e - 2 : e + 1;
22970
22981
  if (triangles[e] !== i) break; // bad triangulation
@@ -22980,14 +22991,14 @@ var Delaunay = /*#__PURE__*/function () {
22980
22991
  return c;
22981
22992
  };
22982
22993
  _proto.render = function render(context) {
22983
- var buffer = context == null ? context = new Path() : undefined,
22994
+ const buffer = context == null ? context = new Path() : undefined,
22984
22995
  points = this.points,
22985
22996
  halfedges = this.halfedges,
22986
22997
  triangles = this.triangles;
22987
- for (var i = 0, n = halfedges.length; i < n; ++i) {
22988
- var j = halfedges[i];
22998
+ for (let i = 0, n = halfedges.length; i < n; ++i) {
22999
+ const j = halfedges[i];
22989
23000
  if (j < i) continue;
22990
- var ti = triangles[i] * 2,
23001
+ const ti = triangles[i] * 2,
22991
23002
  tj = triangles[j] * 2;
22992
23003
  context.moveTo(points[ti], points[ti + 1]);
22993
23004
  context.lineTo(points[tj], points[tj + 1]);
@@ -22998,10 +23009,10 @@ var Delaunay = /*#__PURE__*/function () {
22998
23009
  _proto.renderPoints = function renderPoints(context, r) {
22999
23010
  if (r === undefined && (!context || typeof context.moveTo !== "function")) r = context, context = null;
23000
23011
  r = r == undefined ? 2 : +r;
23001
- var buffer = context == null ? context = new Path() : undefined,
23012
+ const buffer = context == null ? context = new Path() : undefined,
23002
23013
  points = this.points;
23003
- for (var i = 0, n = points.length; i < n; i += 2) {
23004
- var x = points[i],
23014
+ for (let i = 0, n = points.length; i < n; i += 2) {
23015
+ const x = points[i],
23005
23016
  y = points[i + 1];
23006
23017
  context.moveTo(x + r, y);
23007
23018
  context.arc(x, y, r, 0, tau);
@@ -23009,26 +23020,26 @@ var Delaunay = /*#__PURE__*/function () {
23009
23020
  return buffer && buffer.value();
23010
23021
  };
23011
23022
  _proto.renderHull = function renderHull(context) {
23012
- var buffer = context == null ? context = new Path() : undefined,
23023
+ const buffer = context == null ? context = new Path() : undefined,
23013
23024
  hull = this.hull,
23014
23025
  points = this.points,
23015
23026
  h = hull[0] * 2,
23016
23027
  n = hull.length;
23017
23028
  context.moveTo(points[h], points[h + 1]);
23018
- for (var i = 1; i < n; ++i) {
23019
- var _h = 2 * hull[i];
23020
- context.lineTo(points[_h], points[_h + 1]);
23029
+ for (let i = 1; i < n; ++i) {
23030
+ const h = 2 * hull[i];
23031
+ context.lineTo(points[h], points[h + 1]);
23021
23032
  }
23022
23033
  context.closePath();
23023
23034
  return buffer && buffer.value();
23024
23035
  };
23025
23036
  _proto.hullPolygon = function hullPolygon() {
23026
- var polygon = new Polygon();
23037
+ const polygon = new Polygon();
23027
23038
  this.renderHull(polygon);
23028
23039
  return polygon.value();
23029
23040
  };
23030
23041
  _proto.renderTriangle = function renderTriangle(i, context) {
23031
- var buffer = context == null ? context = new Path() : undefined,
23042
+ const buffer = context == null ? context = new Path() : undefined,
23032
23043
  points = this.points,
23033
23044
  triangles = this.triangles,
23034
23045
  t0 = triangles[i *= 3] * 2,
@@ -23065,7 +23076,7 @@ var Delaunay = /*#__PURE__*/function () {
23065
23076
  }, trianglePolygons, this);
23066
23077
  });
23067
23078
  _proto.trianglePolygon = function trianglePolygon(i) {
23068
- var polygon = new Polygon();
23079
+ const polygon = new Polygon();
23069
23080
  this.renderTriangle(i, polygon);
23070
23081
  return polygon.value();
23071
23082
  };
@@ -23073,10 +23084,10 @@ var Delaunay = /*#__PURE__*/function () {
23073
23084
  }();
23074
23085
 
23075
23086
  function flatArray(points, fx, fy, that) {
23076
- var n = points.length,
23087
+ const n = points.length,
23077
23088
  array = new Float64Array(n * 2);
23078
- for (var i = 0; i < n; ++i) {
23079
- var p = points[i];
23089
+ for (let i = 0; i < n; ++i) {
23090
+ const p = points[i];
23080
23091
  array[i * 2] = fx.call(that, p, i, points);
23081
23092
  array[i * 2 + 1] = fy.call(that, p, i, points);
23082
23093
  }
@@ -23191,7 +23202,7 @@ function _defineProperty(obj, key, value) {
23191
23202
  }
23192
23203
  ;// CONCATENATED MODULE: ./node_modules/d3-selection/src/sourceEvent.js
23193
23204
  /* harmony default export */ function sourceEvent(event) {
23194
- var sourceEvent;
23205
+ let sourceEvent;
23195
23206
  while (sourceEvent = event.sourceEvent) event = sourceEvent;
23196
23207
  return event;
23197
23208
  }
@@ -23674,7 +23685,7 @@ function size_createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeo
23674
23685
  function size_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return size_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return size_arrayLikeToArray(o, minLen); }
23675
23686
  function size_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
23676
23687
  /* harmony default export */ function size() {
23677
- var size = 0;
23688
+ let size = 0;
23678
23689
  for (var _iterator = size_createForOfIteratorHelperLoose(this), _step; !(_step = _iterator()).done;) {
23679
23690
  _step.value;
23680
23691
  ++size;
@@ -24224,10 +24235,10 @@ Selection.prototype = selection.prototype = (_selection$prototype = {
24224
24235
  ;// CONCATENATED MODULE: ./node_modules/d3-drag/src/noevent.js
24225
24236
  // These are typically used in conjunction with noevent to ensure that we can
24226
24237
  // preventDefault on the event.
24227
- var nonpassive = {
24238
+ const nonpassive = {
24228
24239
  passive: !1
24229
24240
  };
24230
- var nonpassivecapture = {
24241
+ const nonpassivecapture = {
24231
24242
  capture: !0,
24232
24243
  passive: !1
24233
24244
  };
@@ -24542,7 +24553,7 @@ function rgb_formatHex8() {
24542
24553
  return "#" + hex(this.r) + hex(this.g) + hex(this.b) + hex((isNaN(this.opacity) ? 1 : this.opacity) * 255);
24543
24554
  }
24544
24555
  function rgb_formatRgb() {
24545
- var a = clampa(this.opacity);
24556
+ const a = clampa(this.opacity);
24546
24557
  return "" + (a === 1 ? "rgb(" : "rgba(") + clampi(this.r) + ", " + clampi(this.g) + ", " + clampi(this.b) + (a === 1 ? ")" : ", " + a + ")");
24547
24558
  }
24548
24559
  function clampa(opacity) {
@@ -24615,7 +24626,7 @@ src_define(Hsl, hsl, extend(Color, {
24615
24626
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
24616
24627
  },
24617
24628
  formatHsl: function formatHsl() {
24618
- var a = clampa(this.opacity);
24629
+ const a = clampa(this.opacity);
24619
24630
  return "" + (a === 1 ? "hsl(" : "hsla(") + clamph(this.h) + ", " + clampt(this.s) * 100 + "%, " + clampt(this.l) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
24620
24631
  }
24621
24632
  }));
@@ -25223,7 +25234,7 @@ var svgNode;
25223
25234
 
25224
25235
  /* eslint-disable no-undef */
25225
25236
  function parseCss(value) {
25226
- var m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
25237
+ const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
25227
25238
  return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
25228
25239
  }
25229
25240
  function parseSvg(value) {
@@ -25978,7 +25989,7 @@ var src_constant_this = undefined;
25978
25989
  }).bind(undefined));
25979
25990
  ;// CONCATENATED MODULE: ./node_modules/d3-brush/src/event.js
25980
25991
  function BrushEvent(type, _ref) {
25981
- var sourceEvent = _ref.sourceEvent,
25992
+ let sourceEvent = _ref.sourceEvent,
25982
25993
  target = _ref.target,
25983
25994
  selection = _ref.selection,
25984
25995
  mode = _ref.mode,
@@ -26047,7 +26058,7 @@ var MODE_DRAG = {
26047
26058
  MODE_CENTER = {
26048
26059
  name: "center"
26049
26060
  };
26050
- var abs = Math.abs,
26061
+ const abs = Math.abs,
26051
26062
  max = Math.max,
26052
26063
  min = Math.min;
26053
26064
  function number1(e) {
@@ -26333,7 +26344,7 @@ function brush_brush(dim) {
26333
26344
  lockY,
26334
26345
  points = Array.from(event.touches || [event], function (t) {
26335
26346
  _newArrowCheck(this, _this);
26336
- var i = t.identifier;
26347
+ const i = t.identifier;
26337
26348
  t = src_pointer(t, that);
26338
26349
  t.point0 = t.slice();
26339
26350
  t.identifier = i;
@@ -26343,7 +26354,7 @@ function brush_brush(dim) {
26343
26354
  var emit = emitter(that, arguments, !0).beforestart();
26344
26355
  if (type === "overlay") {
26345
26356
  if (selection) moving = !0;
26346
- var pts = [points[0], points[1] || points[0]];
26357
+ const pts = [points[0], points[1] || points[0]];
26347
26358
  state.selection = selection = [[w0 = dim === Y ? W : min(pts[0][0], pts[1][0]), n0 = dim === X ? N : min(pts[0][1], pts[1][1])], [e0 = dim === Y ? E : max(pts[0][0], pts[1][0]), s0 = dim === X ? S : max(pts[0][1], pts[1][1])]];
26348
26359
  if (points.length > 1) move(event);
26349
26360
  } else {
@@ -26370,26 +26381,26 @@ function brush_brush(dim) {
26370
26381
  emit.start(event, mode.name);
26371
26382
  function moved(event) {
26372
26383
  for (var _iterator = brush_createForOfIteratorHelperLoose(event.changedTouches || [event]), _step; !(_step = _iterator()).done;) {
26373
- var p = _step.value;
26384
+ const p = _step.value;
26374
26385
  for (var _iterator3 = brush_createForOfIteratorHelperLoose(points), _step3; !(_step3 = _iterator3()).done;) {
26375
- var d = _step3.value;
26386
+ const d = _step3.value;
26376
26387
  if (d.identifier === p.identifier) d.cur = src_pointer(p, that);
26377
26388
  }
26378
26389
  }
26379
26390
  if (shifting && !lockX && !lockY && points.length === 1) {
26380
- var point = points[0];
26391
+ const point = points[0];
26381
26392
  if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1])) lockY = !0;else lockX = !0;
26382
26393
  }
26383
26394
  for (var _iterator2 = brush_createForOfIteratorHelperLoose(points), _step2; !(_step2 = _iterator2()).done;) {
26384
- var _point = _step2.value;
26385
- if (_point.cur) _point[0] = _point.cur[0], _point[1] = _point.cur[1];
26395
+ const point = _step2.value;
26396
+ if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];
26386
26397
  }
26387
26398
  moving = !0;
26388
26399
  src_noevent(event);
26389
26400
  move(event);
26390
26401
  }
26391
26402
  function move(event) {
26392
- var point = points[0],
26403
+ const point = points[0],
26393
26404
  point0 = point.point0;
26394
26405
  var t;
26395
26406
  dx = point[0] - point0[0];
@@ -26580,7 +26591,6 @@ function brush_brush(dim) {
26580
26591
 
26581
26592
  ;// CONCATENATED MODULE: ./src/module/browser.ts
26582
26593
 
26583
- var browser_this = undefined;
26584
26594
  /**
26585
26595
  * Copyright (c) 2017 ~ present NAVER Corp.
26586
26596
  * billboard.js project is licensed under the MIT license
@@ -26591,26 +26601,41 @@ var browser_this = undefined;
26591
26601
  */
26592
26602
  /* eslint-disable no-new-func, no-undef */
26593
26603
 
26594
- var win = function () {
26595
- _newArrowCheck(this, browser_this);
26596
- var root = typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis || typeof global === "object" && global !== null && global.Object === Object && global || typeof self === "object" && self !== null && self.Object === Object && self;
26597
- return root || Function("return this")();
26598
- }.bind(undefined)(),
26599
- hasRAF = typeof win.requestAnimationFrame === "function",
26600
- hasRIC = typeof win.requestIdleCallback === "function",
26601
- requestAnimationFrame = hasRAF ? win.requestAnimationFrame : function (cb) {
26602
- _newArrowCheck(this, browser_this);
26604
+
26605
+ /**
26606
+ * Get global object
26607
+ * @returns {object} window object
26608
+ * @private
26609
+ */
26610
+ function getGlobal() {
26611
+ return typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis || typeof global === "object" && global !== null && global.Object === Object && global || typeof self === "object" && self !== null && self.Object === Object && self || Function("return this")();
26612
+ }
26613
+
26614
+ /**
26615
+ * Get fallback object
26616
+ * @param {object} w global object
26617
+ * @returns {Array} fallback object array
26618
+ * @private
26619
+ */
26620
+ function getFallback(w) {
26621
+ var _this = this;
26622
+ const hasRAF = typeof (w == null ? void 0 : w.requestAnimationFrame) === "function",
26623
+ hasRIC = typeof (w == null ? void 0 : w.requestIdleCallback) === "function";
26624
+ return [hasRAF ? w.requestAnimationFrame : function (cb) {
26625
+ _newArrowCheck(this, _this);
26603
26626
  return setTimeout(cb, 1);
26604
- }.bind(undefined),
26605
- cancelAnimationFrame = hasRAF ? win.cancelAnimationFrame : function (id) {
26606
- _newArrowCheck(this, browser_this);
26627
+ }.bind(this), hasRAF ? w.cancelAnimationFrame : function (id) {
26628
+ _newArrowCheck(this, _this);
26607
26629
  return clearTimeout(id);
26608
- }.bind(undefined),
26609
- requestIdleCallback = hasRIC ? win.requestIdleCallback : requestAnimationFrame,
26610
- cancelIdleCallback = hasRIC ? win.cancelIdleCallback : cancelAnimationFrame,
26611
- doc = win == null ? void 0 : win.document;
26612
- /* eslint-enable no-new-func, no-undef */
26613
- // fallback for non-supported environments
26630
+ }.bind(this), hasRIC ? w.requestIdleCallback : requestAnimationFrame, hasRIC ? w.cancelIdleCallback : cancelAnimationFrame];
26631
+ }
26632
+ const win = getGlobal(),
26633
+ doc = win == null ? void 0 : win.document,
26634
+ _getFallback = getFallback(win),
26635
+ requestAnimationFrame = _getFallback[0],
26636
+ cancelAnimationFrame = _getFallback[1],
26637
+ requestIdleCallback = _getFallback[2],
26638
+ cancelIdleCallback = _getFallback[3];
26614
26639
  ;// CONCATENATED MODULE: ./src/module/util.ts
26615
26640
 
26616
26641
 
@@ -26626,7 +26651,7 @@ function _objectSpread(e) { for (var r = 1, t; r < arguments.length; r++) { t =
26626
26651
 
26627
26652
 
26628
26653
 
26629
- var isValue = function (v) {
26654
+ const isValue = function (v) {
26630
26655
  _newArrowCheck(this, util_this);
26631
26656
  return v || v === 0;
26632
26657
  }.bind(undefined),
@@ -26719,8 +26744,8 @@ function getOption(options, key, defaultValue) {
26719
26744
  * @private
26720
26745
  */
26721
26746
  function hasValue(dict, value) {
26722
- var _this2 = this,
26723
- found = !1;
26747
+ var _this2 = this;
26748
+ let found = !1;
26724
26749
  Object.keys(dict).forEach(function (key) {
26725
26750
  _newArrowCheck(this, _this2);
26726
26751
  return dict[key] === value && (found = !0);
@@ -26737,7 +26762,7 @@ function hasValue(dict, value) {
26737
26762
  * @private
26738
26763
  */
26739
26764
  function callFn(fn, thisArg) {
26740
- var isFn = isFunction(fn);
26765
+ const isFn = isFunction(fn);
26741
26766
  for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
26742
26767
  args[_key - 2] = arguments[_key];
26743
26768
  }
@@ -26752,14 +26777,15 @@ function callFn(fn, thisArg) {
26752
26777
  * @private
26753
26778
  */
26754
26779
  function endall(transition, cb) {
26755
- var _this3 = this,
26756
- n = 0,
26757
- end = function () {
26758
- for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
26759
- args[_key2] = arguments[_key2];
26760
- }
26761
- --n || cb.apply.apply(cb, [this].concat(args));
26762
- };
26780
+ var _this3 = this;
26781
+ let n = 0;
26782
+ const end = function () {
26783
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
26784
+ args[_key2] = arguments[_key2];
26785
+ }
26786
+ --n || cb.apply.apply(cb, [this].concat(args));
26787
+ };
26788
+
26763
26789
  // if is transition selection
26764
26790
  if ("duration" in transition) {
26765
26791
  transition.each(function () {
@@ -26778,8 +26804,8 @@ function endall(transition, cb) {
26778
26804
  * @returns {string}
26779
26805
  * @private
26780
26806
  */
26781
- function sanitise(str) {
26782
- return isString(str) ? str.replace(/</g, "&lt;").replace(/>/g, "&gt;") : str;
26807
+ function sanitize(str) {
26808
+ return isString(str) ? str.replace(/<(script|img)?/ig, "&lt;").replace(/(script)?>/ig, "&gt;") : str;
26783
26809
  }
26784
26810
 
26785
26811
  /**
@@ -26804,12 +26830,12 @@ function setTextValue(node, text, dy, toMiddle) {
26804
26830
  if (text.indexOf("\n") === -1) {
26805
26831
  node.text(text);
26806
26832
  } else {
26807
- var diff = [node.text(), text].map(function (v) {
26833
+ const diff = [node.text(), text].map(function (v) {
26808
26834
  _newArrowCheck(this, _this4);
26809
26835
  return v.replace(/[\s\n]/g, "");
26810
26836
  }.bind(this));
26811
26837
  if (diff[0] !== diff[1]) {
26812
- var multiline = text.split("\n"),
26838
+ const multiline = text.split("\n"),
26813
26839
  len = toMiddle ? multiline.length - 1 : 1;
26814
26840
  // reset possible text
26815
26841
  node.html("");
@@ -26835,7 +26861,7 @@ function getRectSegList(path) {
26835
26861
  * | |
26836
26862
  * seg0 ---------- seg3
26837
26863
  * */
26838
- var _path$getBBox = path.getBBox(),
26864
+ const _path$getBBox = path.getBBox(),
26839
26865
  x = _path$getBBox.x,
26840
26866
  y = _path$getBBox.y,
26841
26867
  width = _path$getBBox.width,
@@ -26869,7 +26895,7 @@ function getRectSegList(path) {
26869
26895
  * @private
26870
26896
  */
26871
26897
  function getPathBox(path) {
26872
- var _path$getBoundingClie = path.getBoundingClientRect(),
26898
+ const _path$getBoundingClie = path.getBoundingClientRect(),
26873
26899
  width = _path$getBoundingClie.width,
26874
26900
  height = _path$getBoundingClie.height,
26875
26901
  items = getRectSegList(path),
@@ -26892,9 +26918,12 @@ function getPathBox(path) {
26892
26918
  */
26893
26919
  function getPointer(event, element) {
26894
26920
  var _ref,
26895
- touches = event && ((_ref = event.touches || event.sourceEvent && event.sourceEvent.touches) == null ? void 0 : _ref[0]),
26896
- pointer = src_pointer(touches || event, element),
26897
26921
  _this5 = this;
26922
+ const touches = event && ((_ref = event.touches || event.sourceEvent && event.sourceEvent.touches) == null ? void 0 : _ref[0]);
26923
+ let pointer = [0, 0];
26924
+ try {
26925
+ pointer = src_pointer(touches || event, element);
26926
+ } catch (e) {}
26898
26927
  return pointer.map(function (v) {
26899
26928
  _newArrowCheck(this, _this5);
26900
26929
  return isNaN(v) ? 0 : v;
@@ -26908,10 +26937,10 @@ function getPointer(event, element) {
26908
26937
  * @private
26909
26938
  */
26910
26939
  function getBrushSelection(ctx) {
26911
- var event = ctx.event,
26940
+ const event = ctx.event,
26912
26941
  $el = ctx.$el,
26913
26942
  main = $el.subchart.main || $el.main;
26914
- var selection;
26943
+ let selection;
26915
26944
 
26916
26945
  // check from event
26917
26946
  if (event && event.type === "brush") {
@@ -26931,7 +26960,7 @@ function getBrushSelection(ctx) {
26931
26960
  * @private
26932
26961
  */
26933
26962
  function getBoundingRect(node) {
26934
- var needEvaluate = !("rect" in node) || "rect" in node && node.hasAttribute("width") && node.rect.width !== +node.getAttribute("width");
26963
+ const needEvaluate = !("rect" in node) || "rect" in node && node.hasAttribute("width") && node.rect.width !== +node.getAttribute("width");
26935
26964
  return needEvaluate ? node.rect = node.getBoundingClientRect() : node.rect;
26936
26965
  }
26937
26966
 
@@ -26953,7 +26982,7 @@ function getRandom(asStr, min, max) {
26953
26982
  if (max === void 0) {
26954
26983
  max = 1e4;
26955
26984
  }
26956
- var crpt = win.crypto || win.msCrypto,
26985
+ const crpt = win.crypto || win.msCrypto,
26957
26986
  rand = crpt ? min + crpt.getRandomValues(new Uint32Array(1))[0] % (max - min + 1) : Math.floor(Math.random() * (max - min) + min);
26958
26987
  return asStr ? rand + "" : rand;
26959
26988
  }
@@ -26972,8 +27001,8 @@ function findIndex(arr, v, start, end, isRotated) {
26972
27001
  if (start > end) {
26973
27002
  return -1;
26974
27003
  }
26975
- var mid = Math.floor((start + end) / 2);
26976
- var _arr$mid = arr[mid],
27004
+ const mid = Math.floor((start + end) / 2);
27005
+ let _arr$mid = arr[mid],
26977
27006
  x = _arr$mid.x,
26978
27007
  _arr$mid$w = _arr$mid.w,
26979
27008
  w = _arr$mid$w === void 0 ? 0 : _arr$mid$w;
@@ -26994,7 +27023,7 @@ function findIndex(arr, v, start, end, isRotated) {
26994
27023
  * @private
26995
27024
  */
26996
27025
  function brushEmpty(ctx) {
26997
- var selection = getBrushSelection(ctx);
27026
+ const selection = getBrushSelection(ctx);
26998
27027
  if (selection) {
26999
27028
  // brush selected area
27000
27029
  // two-dimensional: [[x0, y0], [x1, y1]]
@@ -27011,17 +27040,19 @@ function brushEmpty(ctx) {
27011
27040
  * @private
27012
27041
  */
27013
27042
  function deepClone() {
27014
- for (var _this6 = this, _clone = function clone(v) {
27015
- _newArrowCheck(this, _this6);
27016
- if (isObject(v) && v.constructor) {
27017
- var r = new v.constructor();
27018
- for (var k in v) {
27019
- r[k] = _clone(v[k]);
27020
- }
27021
- return r;
27043
+ var _this6 = this;
27044
+ const _clone = function clone(v) {
27045
+ _newArrowCheck(this, _this6);
27046
+ if (isObject(v) && v.constructor) {
27047
+ const r = new v.constructor();
27048
+ for (const k in v) {
27049
+ r[k] = _clone(v[k]);
27022
27050
  }
27023
- return v;
27024
- }.bind(this), _len3 = arguments.length, objectN = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
27051
+ return r;
27052
+ }
27053
+ return v;
27054
+ }.bind(this);
27055
+ for (var _len3 = arguments.length, objectN = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
27025
27056
  objectN[_key3] = arguments[_key3];
27026
27057
  }
27027
27058
  return objectN.map(function (v) {
@@ -27053,7 +27084,7 @@ function util_extend(target, source) {
27053
27084
  }
27054
27085
 
27055
27086
  // exclude name with only numbers
27056
- for (var p in source) {
27087
+ for (const p in source) {
27057
27088
  if (/^\d+$/.test(p) || p in target) {
27058
27089
  continue;
27059
27090
  }
@@ -27068,7 +27099,7 @@ function util_extend(target, source) {
27068
27099
  * @returns {string} capitalized string
27069
27100
  * @private
27070
27101
  */
27071
- var capitalize = function (str) {
27102
+ const capitalize = function (str) {
27072
27103
  _newArrowCheck(this, util_this);
27073
27104
  return str.charAt(0).toUpperCase() + str.slice(1);
27074
27105
  }.bind(undefined);
@@ -27097,7 +27128,7 @@ function camelize(str, separator) {
27097
27128
  * @returns {Array}
27098
27129
  * @private
27099
27130
  */
27100
- var toArray = function (v) {
27131
+ const toArray = function (v) {
27101
27132
  _newArrowCheck(this, util_this);
27102
27133
  return [].slice.call(v);
27103
27134
  }.bind(undefined);
@@ -27111,8 +27142,8 @@ var toArray = function (v) {
27111
27142
  * @private
27112
27143
  */
27113
27144
  function addCssRules(style, selector, prop) {
27114
- var _this9 = this,
27115
- rootSelctor = style.rootSelctor,
27145
+ var _this9 = this;
27146
+ const rootSelctor = style.rootSelctor,
27116
27147
  sheet = style.sheet,
27117
27148
  getSelector = function (s) {
27118
27149
  _newArrowCheck(this, _this9);
@@ -27129,8 +27160,8 @@ function addCssRules(style, selector, prop) {
27129
27160
  * @private
27130
27161
  */
27131
27162
  function getCssRules(styleSheets) {
27132
- var _this10 = this,
27133
- rules = [];
27163
+ var _this10 = this;
27164
+ let rules = [];
27134
27165
  styleSheets.forEach(function (sheet) {
27135
27166
  _newArrowCheck(this, _this10);
27136
27167
  try {
@@ -27152,7 +27183,7 @@ function getCssRules(styleSheets) {
27152
27183
  * @private
27153
27184
  */
27154
27185
  function getTranslation(node) {
27155
- var transform = node ? node.transform : null,
27186
+ const transform = node ? node.transform : null,
27156
27187
  baseVal = transform && transform.baseVal;
27157
27188
  return baseVal && baseVal.numberOfItems ? baseVal.getItem(0).matrix : {
27158
27189
  a: 0,
@@ -27171,8 +27202,8 @@ function getTranslation(node) {
27171
27202
  * @private
27172
27203
  */
27173
27204
  function getUnique(data) {
27174
- var _this11 = this,
27175
- isDate = data[0] instanceof Date,
27205
+ var _this11 = this;
27206
+ const isDate = data[0] instanceof Date,
27176
27207
  d = (isDate ? data.map(Number) : data).filter(function (v, i, self) {
27177
27208
  _newArrowCheck(this, _this11);
27178
27209
  return self.indexOf(v) === i;
@@ -27211,11 +27242,11 @@ function mergeObj(target) {
27211
27242
  if (!objectN.length || objectN.length === 1 && !objectN[0]) {
27212
27243
  return target;
27213
27244
  }
27214
- var source = objectN.shift();
27245
+ const source = objectN.shift();
27215
27246
  if (isObject(target) && isObject(source)) {
27216
27247
  Object.keys(source).forEach(function (key) {
27217
27248
  _newArrowCheck(this, _this13);
27218
- var value = source[key];
27249
+ const value = source[key];
27219
27250
  if (isObject(value)) {
27220
27251
  target[key] || (target[key] = {});
27221
27252
  target[key] = mergeObj(target[key], value);
@@ -27239,7 +27270,7 @@ function sortValue(data, isAsc) {
27239
27270
  if (isAsc === void 0) {
27240
27271
  isAsc = !0;
27241
27272
  }
27242
- var fn;
27273
+ let fn;
27243
27274
  if (data[0] instanceof Date) {
27244
27275
  fn = isAsc ? function (a, b) {
27245
27276
  _newArrowCheck(this, _this14);
@@ -27272,11 +27303,11 @@ function sortValue(data, isAsc) {
27272
27303
  * @private
27273
27304
  */
27274
27305
  function getMinMax(type, data) {
27275
- var _this15 = this,
27276
- res = data.filter(function (v) {
27277
- _newArrowCheck(this, _this15);
27278
- return notEmpty(v);
27279
- }.bind(this));
27306
+ var _this15 = this;
27307
+ let res = data.filter(function (v) {
27308
+ _newArrowCheck(this, _this15);
27309
+ return notEmpty(v);
27310
+ }.bind(this));
27280
27311
  if (res.length) {
27281
27312
  if (isNumber(res[0])) {
27282
27313
  res = Math[type].apply(Math, res);
@@ -27297,14 +27328,14 @@ function getMinMax(type, data) {
27297
27328
  * @returns {Array}
27298
27329
  * @private
27299
27330
  */
27300
- var getRange = function (start, end, step) {
27331
+ const getRange = function (start, end, step) {
27301
27332
  if (step === void 0) {
27302
27333
  step = 1;
27303
27334
  }
27304
27335
  _newArrowCheck(this, util_this);
27305
- var res = [],
27336
+ const res = [],
27306
27337
  n = Math.max(0, Math.ceil((end - start) / step)) | 0;
27307
- for (var i = start; i < n; i++) {
27338
+ for (let i = start; i < n; i++) {
27308
27339
  res.push(start + i * step);
27309
27340
  }
27310
27341
  return res;
@@ -27313,7 +27344,7 @@ var getRange = function (start, end, step) {
27313
27344
  mouse: function () {
27314
27345
  var _this16 = this;
27315
27346
  _newArrowCheck(this, util_this);
27316
- var getParams = function () {
27347
+ const getParams = function () {
27317
27348
  _newArrowCheck(this, _this16);
27318
27349
  return {
27319
27350
  bubbles: !1,
@@ -27341,7 +27372,7 @@ var getRange = function (start, end, step) {
27341
27372
  params = getParams();
27342
27373
  }
27343
27374
  _newArrowCheck(this, _this16);
27344
- var mouseEvent = doc.createEvent("MouseEvent");
27375
+ const mouseEvent = doc.createEvent("MouseEvent");
27345
27376
 
27346
27377
  // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
27347
27378
  mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0,
@@ -27353,7 +27384,7 @@ var getRange = function (start, end, step) {
27353
27384
  }.bind(undefined)(),
27354
27385
  touch: function touch(el, eventType, params) {
27355
27386
  _newArrowCheck(this, util_this);
27356
- var touchObj = new Touch(mergeObj({
27387
+ const touchObj = new Touch(mergeObj({
27357
27388
  identifier: Date.now(),
27358
27389
  target: el,
27359
27390
  radiusX: 2.5,
@@ -27379,8 +27410,8 @@ var getRange = function (start, end, step) {
27379
27410
  * @private
27380
27411
  */
27381
27412
  function tplProcess(tpl, data) {
27382
- var res = tpl;
27383
- for (var x in data) {
27413
+ let res = tpl;
27414
+ for (const x in data) {
27384
27415
  res = res.replace(new RegExp("{=" + x + "}", "g"), data[x]);
27385
27416
  }
27386
27417
  return res;
@@ -27394,13 +27425,14 @@ function tplProcess(tpl, data) {
27394
27425
  * @private
27395
27426
  */
27396
27427
  function parseDate(date) {
27397
- var parsedDate;
27428
+ let parsedDate;
27398
27429
  if (date instanceof Date) {
27399
27430
  parsedDate = date;
27400
27431
  } else if (isString(date)) {
27401
- var _format$dataTime,
27402
- config = this.config,
27432
+ var _format$dataTime;
27433
+ const config = this.config,
27403
27434
  format = this.format;
27435
+
27404
27436
  // if fails to parse, try by new Date()
27405
27437
  // https://github.com/naver/billboard.js/issues/1714
27406
27438
  parsedDate = (_format$dataTime = format.dataTime(config.data_xFormat)(date)) != null ? _format$dataTime : new Date(date);
@@ -27430,11 +27462,11 @@ function isTabVisible() {
27430
27462
  * @private
27431
27463
  */
27432
27464
  function convertInputType(mouse, touch) {
27433
- var _this17 = this,
27434
- DocumentTouch = win.DocumentTouch,
27465
+ var _this17 = this;
27466
+ const DocumentTouch = win.DocumentTouch,
27435
27467
  matchMedia = win.matchMedia,
27436
- navigator = win.navigator,
27437
- hasTouch = !1;
27468
+ navigator = win.navigator;
27469
+ let hasTouch = !1;
27438
27470
  if (touch) {
27439
27471
  // Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
27440
27472
  if (navigator && "maxTouchPoints" in navigator) {
@@ -27450,7 +27482,7 @@ function convertInputType(mouse, touch) {
27450
27482
  hasTouch = !0;
27451
27483
  } else {
27452
27484
  // Only as a last resort, fall back to user agent sniffing
27453
- var UA = navigator.userAgent;
27485
+ const UA = navigator.userAgent;
27454
27486
  hasTouch = /\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(UA) || /\b(Android|Windows Phone|iPad|iPod)\b/i.test(UA);
27455
27487
  }
27456
27488
  }
@@ -27459,7 +27491,7 @@ function convertInputType(mouse, touch) {
27459
27491
  // Check if agent has mouse using any-hover, touch devices (e.g iPad) with external mouse will return true as long as mouse is connected
27460
27492
  // https://css-tricks.com/interaction-media-features-and-their-potential-for-incorrect-assumptions/#aa-testing-the-capabilities-of-all-inputs
27461
27493
  // Demo: https://patrickhlauke.github.io/touch/pointer-hover-any-pointer-any-hover/
27462
- var hasMouse = mouse && ["any-hover:hover", "any-pointer:fine"].some(function (v) {
27494
+ const hasMouse = mouse && ["any-hover:hover", "any-pointer:fine"].some(function (v) {
27463
27495
  _newArrowCheck(this, _this17);
27464
27496
  return matchMedia == null ? void 0 : matchMedia("(" + v + ")").matches;
27465
27497
  }.bind(this));
@@ -27498,22 +27530,20 @@ function runUntil(fn, conditionFn) {
27498
27530
  * @private
27499
27531
  */
27500
27532
  function loadConfig(config) {
27501
- var _this = this,
27502
- thisConfig = this.config,
27503
- target,
27504
- keys,
27505
- read,
27506
- _find = function find() {
27507
- _newArrowCheck(this, _this);
27508
- var key = keys.shift();
27509
- if (key && target && isObjectType(target) && key in target) {
27510
- target = target[key];
27511
- return _find();
27512
- } else if (!key) {
27513
- return target;
27514
- }
27515
- return undefined;
27516
- }.bind(this);
27533
+ var _this = this;
27534
+ const thisConfig = this.config;
27535
+ let target, keys, read;
27536
+ const _find = function find() {
27537
+ _newArrowCheck(this, _this);
27538
+ const key = keys.shift();
27539
+ if (key && target && isObjectType(target) && key in target) {
27540
+ target = target[key];
27541
+ return _find();
27542
+ } else if (!key) {
27543
+ return target;
27544
+ }
27545
+ return undefined;
27546
+ }.bind(this);
27517
27547
  Object.keys(thisConfig).forEach(function (key) {
27518
27548
  _newArrowCheck(this, _this);
27519
27549
  target = config;
@@ -27548,7 +27578,7 @@ function loadConfig(config) {
27548
27578
  * @example
27549
27579
  * bb.plugin.stanford.version; // ex) 1.9.0
27550
27580
  */
27551
- var Plugin = /*#__PURE__*/function () {
27581
+ let Plugin = /*#__PURE__*/function () {
27552
27582
  /**
27553
27583
  * Constructor
27554
27584
  * @param {Any} options config option object
@@ -27602,7 +27632,7 @@ var Plugin = /*#__PURE__*/function () {
27602
27632
  };
27603
27633
  return Plugin;
27604
27634
  }();
27605
- Plugin.version = "3.9.4";
27635
+ Plugin.version = "3.10.0-next.2";
27606
27636
 
27607
27637
  ;// CONCATENATED MODULE: ./src/Plugin/textoverlap/Options.ts
27608
27638
  /**
@@ -27617,7 +27647,7 @@ Plugin.version = "3.9.4";
27617
27647
  * @returns {TextOverlapOptions}
27618
27648
  * @private
27619
27649
  */
27620
- var Options = function () {
27650
+ let Options = function () {
27621
27651
  return {
27622
27652
  /**
27623
27653
  * Selector string for target text nodes within chart element.
@@ -27712,7 +27742,7 @@ var Options = function () {
27712
27742
  * ]
27713
27743
  * })
27714
27744
  */
27715
- var TextOverlap = /*#__PURE__*/function (_Plugin) {
27745
+ let TextOverlap = /*#__PURE__*/function (_Plugin) {
27716
27746
  _inheritsLoose(TextOverlap, _Plugin);
27717
27747
  function TextOverlap(options) {
27718
27748
  var _this = _Plugin.call(this, options) || this;
@@ -27725,7 +27755,7 @@ var TextOverlap = /*#__PURE__*/function (_Plugin) {
27725
27755
  loadConfig.call(this, this.options);
27726
27756
  };
27727
27757
  _proto.$redraw = function $redraw() {
27728
- var $el = this.$$.$el,
27758
+ const $el = this.$$.$el,
27729
27759
  selector = this.config.selector,
27730
27760
  text = selector ? $el.main.selectAll(selector) : $el.text;
27731
27761
  text.empty() || this.preventLabelOverlap(text);
@@ -27738,16 +27768,16 @@ var TextOverlap = /*#__PURE__*/function (_Plugin) {
27738
27768
  * @private
27739
27769
  */;
27740
27770
  _proto.generateVoronoi = function generateVoronoi(points) {
27741
- var _this2 = this,
27742
- $$ = this.$$,
27771
+ var _this2 = this;
27772
+ const $$ = this.$$,
27743
27773
  scale = $$.scale,
27744
27774
  _map = ["x", "y"].map(function (v) {
27745
27775
  _newArrowCheck(this, _this2);
27746
27776
  return scale[v].domain();
27747
27777
  }.bind(this)),
27748
27778
  min = _map[0],
27749
- max = _map[1],
27750
- _ref = [max[0], min[1]];
27779
+ max = _map[1];
27780
+ var _ref = [max[0], min[1]];
27751
27781
  min[1] = _ref[0];
27752
27782
  max[0] = _ref[1];
27753
27783
  return Delaunay.from(points).voronoi([].concat(min, max)); // bounds = [xmin, ymin, xmax, ymax], default value: [0, 0, 960, 500]
@@ -27759,20 +27789,20 @@ var TextOverlap = /*#__PURE__*/function (_Plugin) {
27759
27789
  * @private
27760
27790
  */;
27761
27791
  _proto.preventLabelOverlap = function preventLabelOverlap(text) {
27762
- var _this3 = this,
27763
- _this$config = this.config,
27792
+ var _this3 = this;
27793
+ const _this$config = this.config,
27764
27794
  extent = _this$config.extent,
27765
27795
  area = _this$config.area,
27766
27796
  points = text.data().map(function (v) {
27767
27797
  _newArrowCheck(this, _this3);
27768
27798
  return [v.index, v.value];
27769
27799
  }.bind(this)),
27770
- voronoi = this.generateVoronoi(points),
27771
- i = 0;
27800
+ voronoi = this.generateVoronoi(points);
27801
+ let i = 0;
27772
27802
  text.each(function () {
27773
- var cell = voronoi.cellPolygon(i);
27803
+ const cell = voronoi.cellPolygon(i);
27774
27804
  if (cell && this) {
27775
- var _points$i = points[i],
27805
+ const _points$i = points[i],
27776
27806
  x = _points$i[0],
27777
27807
  y = _points$i[1],
27778
27808
  _d3PolygonCentroid = centroid(cell),