@spscommerce/ds-react-charts 4.29.2 → 4.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.es.js CHANGED
@@ -23,7 +23,7 @@ import * as DSColors from "@spscommerce/ds-colors";
23
23
  import { SpsTooltip } from "@spscommerce/ds-react";
24
24
  import { code } from "@spscommerce/utils";
25
25
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
26
- var propTypes$2 = { exports: {} };
26
+ var propTypes$3 = { exports: {} };
27
27
  var ReactPropTypesSecret$1 = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
28
28
  var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
29
29
  var ReactPropTypesSecret = ReactPropTypesSecret_1;
@@ -71,9 +71,9 @@ var factoryWithThrowingShims = function() {
71
71
  return ReactPropTypes;
72
72
  };
73
73
  {
74
- propTypes$2.exports = factoryWithThrowingShims();
74
+ propTypes$3.exports = factoryWithThrowingShims();
75
75
  }
76
- var _pt = propTypes$2.exports;
76
+ var _pt = propTypes$3.exports;
77
77
  var classnames = { exports: {} };
78
78
  /*!
79
79
  Copyright (c) 2018 Jed Watson.
@@ -85,8 +85,8 @@ var classnames = { exports: {} };
85
85
  var hasOwn = {}.hasOwnProperty;
86
86
  function classNames() {
87
87
  var classes = [];
88
- for (var i = 0; i < arguments.length; i++) {
89
- var arg = arguments[i];
88
+ for (var i2 = 0; i2 < arguments.length; i2++) {
89
+ var arg = arguments[i2];
90
90
  if (!arg)
91
91
  continue;
92
92
  var argType = typeof arg;
@@ -122,10 +122,10 @@ var classnames = { exports: {} };
122
122
  })();
123
123
  })(classnames);
124
124
  var cx = classnames.exports;
125
- function _extends$j() {
126
- _extends$j = Object.assign || function(target) {
127
- for (var i = 1; i < arguments.length; i++) {
128
- var source = arguments[i];
125
+ function _extends$k() {
126
+ _extends$k = Object.assign || function(target) {
127
+ for (var i2 = 1; i2 < arguments.length; i2++) {
128
+ var source = arguments[i2];
129
129
  for (var key in source) {
130
130
  if (Object.prototype.hasOwnProperty.call(source, key)) {
131
131
  target[key] = source[key];
@@ -134,16 +134,16 @@ function _extends$j() {
134
134
  }
135
135
  return target;
136
136
  };
137
- return _extends$j.apply(this, arguments);
137
+ return _extends$k.apply(this, arguments);
138
138
  }
139
- function _objectWithoutPropertiesLoose$f(source, excluded) {
139
+ function _objectWithoutPropertiesLoose$g(source, excluded) {
140
140
  if (source == null)
141
141
  return {};
142
142
  var target = {};
143
143
  var sourceKeys = Object.keys(source);
144
- var key, i;
145
- for (i = 0; i < sourceKeys.length; i++) {
146
- key = sourceKeys[i];
144
+ var key, i2;
145
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
146
+ key = sourceKeys[i2];
147
147
  if (excluded.indexOf(key) >= 0)
148
148
  continue;
149
149
  target[key] = source[key];
@@ -151,8 +151,8 @@ function _objectWithoutPropertiesLoose$f(source, excluded) {
151
151
  return target;
152
152
  }
153
153
  function Group(_ref) {
154
- var _ref$top = _ref.top, top = _ref$top === void 0 ? 0 : _ref$top, _ref$left = _ref.left, left = _ref$left === void 0 ? 0 : _ref$left, transform = _ref.transform, className = _ref.className, children = _ref.children, innerRef = _ref.innerRef, restProps = _objectWithoutPropertiesLoose$f(_ref, ["top", "left", "transform", "className", "children", "innerRef"]);
155
- return /* @__PURE__ */ React__default.createElement("g", _extends$j({
154
+ var _ref$top = _ref.top, top = _ref$top === void 0 ? 0 : _ref$top, _ref$left = _ref.left, left = _ref$left === void 0 ? 0 : _ref$left, transform = _ref.transform, className = _ref.className, children = _ref.children, innerRef = _ref.innerRef, restProps = _objectWithoutPropertiesLoose$g(_ref, ["top", "left", "transform", "className", "children", "innerRef"]);
155
+ return /* @__PURE__ */ React__default.createElement("g", _extends$k({
156
156
  ref: innerRef,
157
157
  className: cx("visx-group", className),
158
158
  transform: transform || "translate(" + left + ", " + top + ")"
@@ -175,8 +175,8 @@ var slice = Array.prototype.slice;
175
175
  function stackOffsetNone(series, order) {
176
176
  if (!((n = series.length) > 1))
177
177
  return;
178
- for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {
179
- s0 = s1, s1 = series[order[i]];
178
+ for (var i2 = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i2 < n; ++i2) {
179
+ s0 = s1, s1 = series[order[i2]];
180
180
  for (j = 0; j < m; ++j) {
181
181
  s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];
182
182
  }
@@ -194,16 +194,16 @@ function stackValue(d, key) {
194
194
  function d3stack() {
195
195
  var keys = constant$1([]), order = stackOrderNone, offset = stackOffsetNone, value = stackValue;
196
196
  function stack2(data) {
197
- var kz = keys.apply(this, arguments), i, m = data.length, n = kz.length, sz = new Array(n), oz;
198
- for (i = 0; i < n; ++i) {
199
- for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {
197
+ var kz = keys.apply(this, arguments), i2, m = data.length, n = kz.length, sz = new Array(n), oz;
198
+ for (i2 = 0; i2 < n; ++i2) {
199
+ for (var ki = kz[i2], si = sz[i2] = new Array(m), j = 0, sij; j < m; ++j) {
200
200
  si[j] = sij = [0, +value(data[j], ki, j, data)];
201
201
  sij.data = data[j];
202
202
  }
203
203
  si.key = ki;
204
204
  }
205
- for (i = 0, oz = order(sz); i < n; ++i) {
206
- sz[oz[i]].index = i;
205
+ for (i2 = 0, oz = order(sz); i2 < n; ++i2) {
206
+ sz[oz[i2]].index = i2;
207
207
  }
208
208
  offset(sz, oz);
209
209
  return sz;
@@ -225,21 +225,21 @@ function d3stack() {
225
225
  function stackOffsetExpand(series, order) {
226
226
  if (!((n = series.length) > 0))
227
227
  return;
228
- for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {
229
- for (y = i = 0; i < n; ++i)
230
- y += series[i][j][1] || 0;
228
+ for (var i2, n, j = 0, m = series[0].length, y; j < m; ++j) {
229
+ for (y = i2 = 0; i2 < n; ++i2)
230
+ y += series[i2][j][1] || 0;
231
231
  if (y)
232
- for (i = 0; i < n; ++i)
233
- series[i][j][1] /= y;
232
+ for (i2 = 0; i2 < n; ++i2)
233
+ series[i2][j][1] /= y;
234
234
  }
235
235
  stackOffsetNone(series, order);
236
236
  }
237
237
  function stackOffsetDiverging(series, order) {
238
238
  if (!((n = series.length) > 0))
239
239
  return;
240
- for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {
241
- for (yp = yn = 0, i = 0; i < n; ++i) {
242
- if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) {
240
+ for (var i2, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {
241
+ for (yp = yn = 0, i2 = 0; i2 < n; ++i2) {
242
+ if ((dy = (d = series[order[i2]][j])[1] - d[0]) > 0) {
243
243
  d[0] = yp, d[1] = yp += dy;
244
244
  } else if (dy < 0) {
245
245
  d[1] = yn, d[0] = yn += dy;
@@ -253,8 +253,8 @@ function stackOffsetSilhouette(series, order) {
253
253
  if (!((n = series.length) > 0))
254
254
  return;
255
255
  for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {
256
- for (var i = 0, y = 0; i < n; ++i)
257
- y += series[i][j][1] || 0;
256
+ for (var i2 = 0, y = 0; i2 < n; ++i2)
257
+ y += series[i2][j][1] || 0;
258
258
  s0[j][1] += s0[j][0] = -y / 2;
259
259
  }
260
260
  stackOffsetNone(series, order);
@@ -263,9 +263,9 @@ function stackOffsetWiggle(series, order) {
263
263
  if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0))
264
264
  return;
265
265
  for (var y = 0, j = 1, s0, m, n; j < m; ++j) {
266
- for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {
267
- var si = series[order[i]], sij0 = si[j][1] || 0, sij1 = si[j - 1][1] || 0, s3 = (sij0 - sij1) / 2;
268
- for (var k = 0; k < i; ++k) {
266
+ for (var i2 = 0, s1 = 0, s2 = 0; i2 < n; ++i2) {
267
+ var si = series[order[i2]], sij0 = si[j][1] || 0, sij1 = si[j - 1][1] || 0, s3 = (sij0 - sij1) / 2;
268
+ for (var k = 0; k < i2; ++k) {
269
269
  var sk = series[order[k]], skj0 = sk[j][1] || 0, skj1 = sk[j - 1][1] || 0;
270
270
  s3 += skj0 - skj1;
271
271
  }
@@ -285,10 +285,10 @@ function appearance(series) {
285
285
  });
286
286
  }
287
287
  function peak(series) {
288
- var i = -1, j = 0, n = series.length, vi, vj = -Infinity;
289
- while (++i < n)
290
- if ((vi = +series[i][1]) > vj)
291
- vj = vi, j = i;
288
+ var i2 = -1, j = 0, n = series.length, vi, vj = -Infinity;
289
+ while (++i2 < n)
290
+ if ((vi = +series[i2][1]) > vj)
291
+ vj = vi, j = i2;
292
292
  return j;
293
293
  }
294
294
  function stackOrderAscending(series) {
@@ -298,9 +298,9 @@ function stackOrderAscending(series) {
298
298
  });
299
299
  }
300
300
  function sum(series) {
301
- var s = 0, i = -1, n = series.length, v;
302
- while (++i < n)
303
- if (v = +series[i][1])
301
+ var s = 0, i2 = -1, n = series.length, v;
302
+ while (++i2 < n)
303
+ if (v = +series[i2][1])
304
304
  s += v;
305
305
  return s;
306
306
  }
@@ -308,9 +308,9 @@ function stackOrderDescending(series) {
308
308
  return stackOrderAscending(series).reverse();
309
309
  }
310
310
  function stackOrderInsideOut(series) {
311
- var n = series.length, i, j, sums = series.map(sum), order = appearance(series), top = 0, bottom = 0, tops = [], bottoms = [];
312
- for (i = 0; i < n; ++i) {
313
- j = order[i];
311
+ var n = series.length, i2, j, sums = series.map(sum), order = appearance(series), top = 0, bottom = 0, tops = [], bottoms = [];
312
+ for (i2 = 0; i2 < n; ++i2) {
313
+ j = order[i2];
314
314
  if (top < bottom) {
315
315
  top += sums[j];
316
316
  tops.push(j);
@@ -350,11 +350,11 @@ var STACK_OFFSETS = {
350
350
  function stackOffset(offset) {
351
351
  return offset && STACK_OFFSETS[offset] || STACK_OFFSETS.none;
352
352
  }
353
- var _excluded$d = ["from", "to", "fill", "className", "innerRef"];
354
- function _extends$i() {
355
- _extends$i = Object.assign || function(target) {
356
- for (var i = 1; i < arguments.length; i++) {
357
- var source = arguments[i];
353
+ var _excluded$e = ["from", "to", "fill", "className", "innerRef"];
354
+ function _extends$j() {
355
+ _extends$j = Object.assign || function(target) {
356
+ for (var i2 = 1; i2 < arguments.length; i2++) {
357
+ var source = arguments[i2];
358
358
  for (var key in source) {
359
359
  if (Object.prototype.hasOwnProperty.call(source, key)) {
360
360
  target[key] = source[key];
@@ -363,16 +363,16 @@ function _extends$i() {
363
363
  }
364
364
  return target;
365
365
  };
366
- return _extends$i.apply(this, arguments);
366
+ return _extends$j.apply(this, arguments);
367
367
  }
368
- function _objectWithoutPropertiesLoose$e(source, excluded) {
368
+ function _objectWithoutPropertiesLoose$f(source, excluded) {
369
369
  if (source == null)
370
370
  return {};
371
371
  var target = {};
372
372
  var sourceKeys = Object.keys(source);
373
- var key, i;
374
- for (i = 0; i < sourceKeys.length; i++) {
375
- key = sourceKeys[i];
373
+ var key, i2;
374
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
375
+ key = sourceKeys[i2];
376
376
  if (excluded.indexOf(key) >= 0)
377
377
  continue;
378
378
  target[key] = source[key];
@@ -386,9 +386,9 @@ function Line$1(_ref) {
386
386
  } : _ref$from, _ref$to = _ref.to, to = _ref$to === void 0 ? {
387
387
  x: 1,
388
388
  y: 1
389
- } : _ref$to, _ref$fill = _ref.fill, fill = _ref$fill === void 0 ? "transparent" : _ref$fill, className = _ref.className, innerRef = _ref.innerRef, restProps = _objectWithoutPropertiesLoose$e(_ref, _excluded$d);
389
+ } : _ref$to, _ref$fill = _ref.fill, fill = _ref$fill === void 0 ? "transparent" : _ref$fill, className = _ref.className, innerRef = _ref.innerRef, restProps = _objectWithoutPropertiesLoose$f(_ref, _excluded$e);
390
390
  var isRectilinear = from.x === to.x || from.y === to.y;
391
- return /* @__PURE__ */ React__default.createElement("line", _extends$i({
391
+ return /* @__PURE__ */ React__default.createElement("line", _extends$j({
392
392
  ref: innerRef,
393
393
  className: cx("visx-line", className),
394
394
  x1: from.x,
@@ -399,11 +399,11 @@ function Line$1(_ref) {
399
399
  shapeRendering: isRectilinear ? "crispEdges" : "auto"
400
400
  }, restProps));
401
401
  }
402
- var _excluded$c = ["className", "innerRef"];
403
- function _extends$h() {
404
- _extends$h = Object.assign || function(target) {
405
- for (var i = 1; i < arguments.length; i++) {
406
- var source = arguments[i];
402
+ var _excluded$d = ["className", "innerRef"];
403
+ function _extends$i() {
404
+ _extends$i = Object.assign || function(target) {
405
+ for (var i2 = 1; i2 < arguments.length; i2++) {
406
+ var source = arguments[i2];
407
407
  for (var key in source) {
408
408
  if (Object.prototype.hasOwnProperty.call(source, key)) {
409
409
  target[key] = source[key];
@@ -412,16 +412,16 @@ function _extends$h() {
412
412
  }
413
413
  return target;
414
414
  };
415
- return _extends$h.apply(this, arguments);
415
+ return _extends$i.apply(this, arguments);
416
416
  }
417
- function _objectWithoutPropertiesLoose$d(source, excluded) {
417
+ function _objectWithoutPropertiesLoose$e(source, excluded) {
418
418
  if (source == null)
419
419
  return {};
420
420
  var target = {};
421
421
  var sourceKeys = Object.keys(source);
422
- var key, i;
423
- for (i = 0; i < sourceKeys.length; i++) {
424
- key = sourceKeys[i];
422
+ var key, i2;
423
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
424
+ key = sourceKeys[i2];
425
425
  if (excluded.indexOf(key) >= 0)
426
426
  continue;
427
427
  target[key] = source[key];
@@ -429,17 +429,17 @@ function _objectWithoutPropertiesLoose$d(source, excluded) {
429
429
  return target;
430
430
  }
431
431
  function Bar(_ref) {
432
- var className = _ref.className, innerRef = _ref.innerRef, restProps = _objectWithoutPropertiesLoose$d(_ref, _excluded$c);
433
- return /* @__PURE__ */ React__default.createElement("rect", _extends$h({
432
+ var className = _ref.className, innerRef = _ref.innerRef, restProps = _objectWithoutPropertiesLoose$e(_ref, _excluded$d);
433
+ return /* @__PURE__ */ React__default.createElement("rect", _extends$i({
434
434
  ref: innerRef,
435
435
  className: cx("visx-bar", className)
436
436
  }, restProps));
437
437
  }
438
- var _excluded$b = ["className", "innerRef", "x", "y", "width", "height", "radius", "all", "top", "bottom", "left", "right", "topLeft", "topRight", "bottomLeft", "bottomRight"];
439
- function _extends$g() {
440
- _extends$g = Object.assign || function(target) {
441
- for (var i = 1; i < arguments.length; i++) {
442
- var source = arguments[i];
438
+ var _excluded$c = ["className", "innerRef", "x", "y", "width", "height", "radius", "all", "top", "bottom", "left", "right", "topLeft", "topRight", "bottomLeft", "bottomRight"];
439
+ function _extends$h() {
440
+ _extends$h = Object.assign || function(target) {
441
+ for (var i2 = 1; i2 < arguments.length; i2++) {
442
+ var source = arguments[i2];
443
443
  for (var key in source) {
444
444
  if (Object.prototype.hasOwnProperty.call(source, key)) {
445
445
  target[key] = source[key];
@@ -448,16 +448,16 @@ function _extends$g() {
448
448
  }
449
449
  return target;
450
450
  };
451
- return _extends$g.apply(this, arguments);
451
+ return _extends$h.apply(this, arguments);
452
452
  }
453
- function _objectWithoutPropertiesLoose$c(source, excluded) {
453
+ function _objectWithoutPropertiesLoose$d(source, excluded) {
454
454
  if (source == null)
455
455
  return {};
456
456
  var target = {};
457
457
  var sourceKeys = Object.keys(source);
458
- var key, i;
459
- for (i = 0; i < sourceKeys.length; i++) {
460
- key = sourceKeys[i];
458
+ var key, i2;
459
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
460
+ key = sourceKeys[i2];
461
461
  if (excluded.indexOf(key) >= 0)
462
462
  continue;
463
463
  target[key] = source[key];
@@ -465,7 +465,7 @@ function _objectWithoutPropertiesLoose$c(source, excluded) {
465
465
  return target;
466
466
  }
467
467
  function BarRounded(_ref) {
468
- var className = _ref.className, innerRef = _ref.innerRef, x = _ref.x, y = _ref.y, width = _ref.width, height = _ref.height, radius = _ref.radius, _ref$all = _ref.all, all = _ref$all === void 0 ? false : _ref$all, _ref$top = _ref.top, top = _ref$top === void 0 ? false : _ref$top, _ref$bottom = _ref.bottom, bottom = _ref$bottom === void 0 ? false : _ref$bottom, _ref$left = _ref.left, left = _ref$left === void 0 ? false : _ref$left, _ref$right = _ref.right, right = _ref$right === void 0 ? false : _ref$right, _ref$topLeft = _ref.topLeft, topLeft = _ref$topLeft === void 0 ? false : _ref$topLeft, _ref$topRight = _ref.topRight, topRight = _ref$topRight === void 0 ? false : _ref$topRight, _ref$bottomLeft = _ref.bottomLeft, bottomLeft = _ref$bottomLeft === void 0 ? false : _ref$bottomLeft, _ref$bottomRight = _ref.bottomRight, bottomRight = _ref$bottomRight === void 0 ? false : _ref$bottomRight, restProps = _objectWithoutPropertiesLoose$c(_ref, _excluded$b);
468
+ var className = _ref.className, innerRef = _ref.innerRef, x = _ref.x, y = _ref.y, width = _ref.width, height = _ref.height, radius = _ref.radius, _ref$all = _ref.all, all = _ref$all === void 0 ? false : _ref$all, _ref$top = _ref.top, top = _ref$top === void 0 ? false : _ref$top, _ref$bottom = _ref.bottom, bottom = _ref$bottom === void 0 ? false : _ref$bottom, _ref$left = _ref.left, left = _ref$left === void 0 ? false : _ref$left, _ref$right = _ref.right, right = _ref$right === void 0 ? false : _ref$right, _ref$topLeft = _ref.topLeft, topLeft = _ref$topLeft === void 0 ? false : _ref$topLeft, _ref$topRight = _ref.topRight, topRight = _ref$topRight === void 0 ? false : _ref$topRight, _ref$bottomLeft = _ref.bottomLeft, bottomLeft = _ref$bottomLeft === void 0 ? false : _ref$bottomLeft, _ref$bottomRight = _ref.bottomRight, bottomRight = _ref$bottomRight === void 0 ? false : _ref$bottomRight, restProps = _objectWithoutPropertiesLoose$d(_ref, _excluded$c);
469
469
  topRight = all || top || right || topRight;
470
470
  bottomRight = all || bottom || right || bottomRight;
471
471
  bottomLeft = all || bottom || left || bottomLeft;
@@ -473,7 +473,7 @@ function BarRounded(_ref) {
473
473
  radius = Math.min(radius, Math.min(width, height) / 2);
474
474
  var diameter = 2 * radius;
475
475
  var path = ("M" + (x + radius) + "," + y + " h" + (width - diameter) + "\n " + (topRight ? "a" + radius + "," + radius + " 0 0 1 " + radius + "," + radius : "h" + radius + "v" + radius) + "\n v" + (height - diameter) + "\n " + (bottomRight ? "a" + radius + "," + radius + " 0 0 1 " + -radius + "," + radius : "v" + radius + "h" + -radius) + "\n h" + (diameter - width) + "\n " + (bottomLeft ? "a" + radius + "," + radius + " 0 0 1 " + -radius + "," + -radius : "h" + -radius + "v" + -radius) + "\n v" + (diameter - height) + "\n " + (topLeft ? "a" + radius + "," + radius + " 0 0 1 " + radius + "," + -radius : "v" + -radius + "h" + radius) + "\nz").split("\n").join("");
476
- return /* @__PURE__ */ React__default.createElement("path", _extends$g({
476
+ return /* @__PURE__ */ React__default.createElement("path", _extends$h({
477
477
  ref: innerRef,
478
478
  className: cx("visx-bar-rounded", className),
479
479
  d: path
@@ -493,11 +493,11 @@ function getFirstItem(d) {
493
493
  function getSecondItem(d) {
494
494
  return d == null ? void 0 : d[1];
495
495
  }
496
- var _excluded$a = ["data", "className", "top", "left", "y", "x0", "x1", "xScale", "yScale", "color", "keys", "value", "order", "offset", "children"];
497
- function _extends$f() {
498
- _extends$f = Object.assign || function(target) {
499
- for (var i = 1; i < arguments.length; i++) {
500
- var source = arguments[i];
496
+ var _excluded$b = ["data", "className", "top", "left", "y", "x0", "x1", "xScale", "yScale", "color", "keys", "value", "order", "offset", "children"];
497
+ function _extends$g() {
498
+ _extends$g = Object.assign || function(target) {
499
+ for (var i2 = 1; i2 < arguments.length; i2++) {
500
+ var source = arguments[i2];
501
501
  for (var key in source) {
502
502
  if (Object.prototype.hasOwnProperty.call(source, key)) {
503
503
  target[key] = source[key];
@@ -506,16 +506,16 @@ function _extends$f() {
506
506
  }
507
507
  return target;
508
508
  };
509
- return _extends$f.apply(this, arguments);
509
+ return _extends$g.apply(this, arguments);
510
510
  }
511
- function _objectWithoutPropertiesLoose$b(source, excluded) {
511
+ function _objectWithoutPropertiesLoose$c(source, excluded) {
512
512
  if (source == null)
513
513
  return {};
514
514
  var target = {};
515
515
  var sourceKeys = Object.keys(source);
516
- var key, i;
517
- for (i = 0; i < sourceKeys.length; i++) {
518
- key = sourceKeys[i];
516
+ var key, i2;
517
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
518
+ key = sourceKeys[i2];
519
519
  if (excluded.indexOf(key) >= 0)
520
520
  continue;
521
521
  target[key] = source[key];
@@ -523,7 +523,7 @@ function _objectWithoutPropertiesLoose$b(source, excluded) {
523
523
  return target;
524
524
  }
525
525
  function BarStackHorizontal(_ref) {
526
- var data = _ref.data, className = _ref.className, top = _ref.top, left = _ref.left, y = _ref.y, _ref$x = _ref.x0, x0 = _ref$x === void 0 ? getFirstItem : _ref$x, _ref$x2 = _ref.x1, x1 = _ref$x2 === void 0 ? getSecondItem : _ref$x2, xScale = _ref.xScale, yScale = _ref.yScale, color2 = _ref.color, keys = _ref.keys, value = _ref.value, order = _ref.order, offset = _ref.offset, children = _ref.children, restProps = _objectWithoutPropertiesLoose$b(_ref, _excluded$a);
526
+ var data = _ref.data, className = _ref.className, top = _ref.top, left = _ref.left, y = _ref.y, _ref$x = _ref.x0, x0 = _ref$x === void 0 ? getFirstItem : _ref$x, _ref$x2 = _ref.x1, x1 = _ref$x2 === void 0 ? getSecondItem : _ref$x2, xScale = _ref.xScale, yScale = _ref.yScale, color2 = _ref.color, keys = _ref.keys, value = _ref.value, order = _ref.order, offset = _ref.offset, children = _ref.children, restProps = _objectWithoutPropertiesLoose$c(_ref, _excluded$b);
527
527
  var stack2 = d3stack();
528
528
  if (keys)
529
529
  stack2.keys(keys);
@@ -535,10 +535,10 @@ function BarStackHorizontal(_ref) {
535
535
  stack2.offset(stackOffset(offset));
536
536
  var stacks = stack2(data);
537
537
  var barHeight = getBandwidth(yScale);
538
- var barStacks = stacks.map(function(barStack, i) {
538
+ var barStacks = stacks.map(function(barStack, i2) {
539
539
  var key = barStack.key;
540
540
  return {
541
- index: i,
541
+ index: i2,
542
542
  key,
543
543
  bars: barStack.map(function(bar, j) {
544
544
  var barWidth = (xScale(x1(bar)) || 0) - (xScale(x0(bar)) || 0);
@@ -565,7 +565,7 @@ function BarStackHorizontal(_ref) {
565
565
  left
566
566
  }, barStacks.map(function(barStack) {
567
567
  return barStack.bars.map(function(bar) {
568
- return /* @__PURE__ */ React__default.createElement(Bar, _extends$f({
568
+ return /* @__PURE__ */ React__default.createElement(Bar, _extends$g({
569
569
  key: "bar-stack-" + barStack.index + "-" + bar.index,
570
570
  x: bar.x,
571
571
  y: bar.y,
@@ -619,8 +619,8 @@ function bisector(f) {
619
619
  lo = 0;
620
620
  if (hi == null)
621
621
  hi = a.length;
622
- const i = left(a, x, lo, hi - 1);
623
- return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;
622
+ const i2 = left(a, x, lo, hi - 1);
623
+ return i2 > lo && delta(a[i2 - 1], x) > -delta(a[i2], x) ? i2 - 1 : i2;
624
624
  }
625
625
  return { left, center, right };
626
626
  }
@@ -636,7 +636,7 @@ bisector(number$1).center;
636
636
  var bisect = bisectRight;
637
637
  var e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2);
638
638
  function ticks(start, stop, count) {
639
- var reverse, i = -1, n, ticks2, step;
639
+ var reverse, i2 = -1, n, ticks2, step;
640
640
  stop = +stop, start = +start, count = +count;
641
641
  if (start === stop && count > 0)
642
642
  return [start];
@@ -651,8 +651,8 @@ function ticks(start, stop, count) {
651
651
  if (r1 * step > stop)
652
652
  --r1;
653
653
  ticks2 = new Array(n = r1 - r0 + 1);
654
- while (++i < n)
655
- ticks2[i] = (r0 + i) * step;
654
+ while (++i2 < n)
655
+ ticks2[i2] = (r0 + i2) * step;
656
656
  } else {
657
657
  step = -step;
658
658
  let r0 = Math.round(start * step), r1 = Math.round(stop * step);
@@ -661,8 +661,8 @@ function ticks(start, stop, count) {
661
661
  if (r1 / step > stop)
662
662
  --r1;
663
663
  ticks2 = new Array(n = r1 - r0 + 1);
664
- while (++i < n)
665
- ticks2[i] = (r0 + i) / step;
664
+ while (++i2 < n)
665
+ ticks2[i2] = (r0 + i2) / step;
666
666
  }
667
667
  if (reverse)
668
668
  ticks2.reverse();
@@ -684,9 +684,9 @@ function tickStep(start, stop, count) {
684
684
  }
685
685
  function sequence(start, stop, step) {
686
686
  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
687
- var i = -1, n = Math.max(0, Math.ceil((stop - start) / step)) | 0, range2 = new Array(n);
688
- while (++i < n) {
689
- range2[i] = start + i * step;
687
+ var i2 = -1, n = Math.max(0, Math.ceil((stop - start) / step)) | 0, range2 = new Array(n);
688
+ while (++i2 < n) {
689
+ range2[i2] = start + i2 * step;
690
690
  }
691
691
  return range2;
692
692
  }
@@ -707,13 +707,13 @@ const implicit = Symbol("implicit");
707
707
  function ordinal() {
708
708
  var index = new Map(), domain = [], range2 = [], unknown = implicit;
709
709
  function scale(d) {
710
- var key = d + "", i = index.get(key);
711
- if (!i) {
710
+ var key = d + "", i2 = index.get(key);
711
+ if (!i2) {
712
712
  if (unknown !== implicit)
713
713
  return unknown;
714
- index.set(key, i = domain.push(d));
714
+ index.set(key, i2 = domain.push(d));
715
715
  }
716
- return range2[(i - 1) % range2.length];
716
+ return range2[(i2 - 1) % range2.length];
717
717
  }
718
718
  scale.domain = function(_) {
719
719
  if (!arguments.length)
@@ -751,8 +751,8 @@ function band() {
751
751
  bandwidth = step * (1 - paddingInner);
752
752
  if (round)
753
753
  start = Math.round(start), bandwidth = Math.round(bandwidth);
754
- var values = sequence(n).map(function(i) {
755
- return start + step * i;
754
+ var values = sequence(n).map(function(i2) {
755
+ return start + step * i2;
756
756
  });
757
757
  return ordinalRange(reverse ? values.reverse() : values);
758
758
  }
@@ -1277,10 +1277,10 @@ var interpolateRgb = function rgbGamma(y) {
1277
1277
  function numberArray(a, b) {
1278
1278
  if (!b)
1279
1279
  b = [];
1280
- var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i;
1280
+ var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i2;
1281
1281
  return function(t) {
1282
- for (i = 0; i < n; ++i)
1283
- c[i] = a[i] * (1 - t) + b[i] * t;
1282
+ for (i2 = 0; i2 < n; ++i2)
1283
+ c[i2] = a[i2] * (1 - t) + b[i2] * t;
1284
1284
  return c;
1285
1285
  };
1286
1286
  }
@@ -1288,14 +1288,14 @@ function isNumberArray(x) {
1288
1288
  return ArrayBuffer.isView(x) && !(x instanceof DataView);
1289
1289
  }
1290
1290
  function genericArray(a, b) {
1291
- var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x = new Array(na), c = new Array(nb), i;
1292
- for (i = 0; i < na; ++i)
1293
- x[i] = interpolate(a[i], b[i]);
1294
- for (; i < nb; ++i)
1295
- c[i] = b[i];
1291
+ var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x = new Array(na), c = new Array(nb), i2;
1292
+ for (i2 = 0; i2 < na; ++i2)
1293
+ x[i2] = interpolate(a[i2], b[i2]);
1294
+ for (; i2 < nb; ++i2)
1295
+ c[i2] = b[i2];
1296
1296
  return function(t) {
1297
- for (i = 0; i < na; ++i)
1298
- c[i] = x[i](t);
1297
+ for (i2 = 0; i2 < na; ++i2)
1298
+ c[i2] = x[i2](t);
1299
1299
  return c;
1300
1300
  };
1301
1301
  }
@@ -1311,21 +1311,21 @@ function interpolateNumber(a, b) {
1311
1311
  };
1312
1312
  }
1313
1313
  function object(a, b) {
1314
- var i = {}, c = {}, k;
1314
+ var i2 = {}, c = {}, k;
1315
1315
  if (a === null || typeof a !== "object")
1316
1316
  a = {};
1317
1317
  if (b === null || typeof b !== "object")
1318
1318
  b = {};
1319
1319
  for (k in b) {
1320
1320
  if (k in a) {
1321
- i[k] = interpolate(a[k], b[k]);
1321
+ i2[k] = interpolate(a[k], b[k]);
1322
1322
  } else {
1323
1323
  c[k] = b[k];
1324
1324
  }
1325
1325
  }
1326
1326
  return function(t) {
1327
- for (k in i)
1328
- c[k] = i[k](t);
1327
+ for (k in i2)
1328
+ c[k] = i2[k](t);
1329
1329
  return c;
1330
1330
  };
1331
1331
  }
@@ -1341,37 +1341,37 @@ function one(b) {
1341
1341
  };
1342
1342
  }
1343
1343
  function string(a, b) {
1344
- var bi = reA.lastIndex = reB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = [];
1344
+ var bi = reA.lastIndex = reB.lastIndex = 0, am, bm, bs, i2 = -1, s = [], q = [];
1345
1345
  a = a + "", b = b + "";
1346
1346
  while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
1347
1347
  if ((bs = bm.index) > bi) {
1348
1348
  bs = b.slice(bi, bs);
1349
- if (s[i])
1350
- s[i] += bs;
1349
+ if (s[i2])
1350
+ s[i2] += bs;
1351
1351
  else
1352
- s[++i] = bs;
1352
+ s[++i2] = bs;
1353
1353
  }
1354
1354
  if ((am = am[0]) === (bm = bm[0])) {
1355
- if (s[i])
1356
- s[i] += bm;
1355
+ if (s[i2])
1356
+ s[i2] += bm;
1357
1357
  else
1358
- s[++i] = bm;
1358
+ s[++i2] = bm;
1359
1359
  } else {
1360
- s[++i] = null;
1361
- q.push({ i, x: interpolateNumber(am, bm) });
1360
+ s[++i2] = null;
1361
+ q.push({ i: i2, x: interpolateNumber(am, bm) });
1362
1362
  }
1363
1363
  bi = reB.lastIndex;
1364
1364
  }
1365
1365
  if (bi < b.length) {
1366
1366
  bs = b.slice(bi);
1367
- if (s[i])
1368
- s[i] += bs;
1367
+ if (s[i2])
1368
+ s[i2] += bs;
1369
1369
  else
1370
- s[++i] = bs;
1370
+ s[++i2] = bs;
1371
1371
  }
1372
1372
  return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function(t) {
1373
- for (var i2 = 0, o; i2 < b; ++i2)
1374
- s[(o = q[i2]).i] = o.x(t);
1373
+ for (var i3 = 0, o; i3 < b; ++i3)
1374
+ s[(o = q[i3]).i] = o.x(t);
1375
1375
  return s.join("");
1376
1376
  });
1377
1377
  }
@@ -1477,18 +1477,18 @@ function bimap(domain, range2, interpolate2) {
1477
1477
  };
1478
1478
  }
1479
1479
  function polymap(domain, range2, interpolate2) {
1480
- var j = Math.min(domain.length, range2.length) - 1, d = new Array(j), r = new Array(j), i = -1;
1480
+ var j = Math.min(domain.length, range2.length) - 1, d = new Array(j), r = new Array(j), i2 = -1;
1481
1481
  if (domain[j] < domain[0]) {
1482
1482
  domain = domain.slice().reverse();
1483
1483
  range2 = range2.slice().reverse();
1484
1484
  }
1485
- while (++i < j) {
1486
- d[i] = normalize(domain[i], domain[i + 1]);
1487
- r[i] = interpolate2(range2[i], range2[i + 1]);
1485
+ while (++i2 < j) {
1486
+ d[i2] = normalize(domain[i2], domain[i2 + 1]);
1487
+ r[i2] = interpolate2(range2[i2], range2[i2 + 1]);
1488
1488
  }
1489
1489
  return function(x) {
1490
- var i2 = bisect(domain, x, 1, j) - 1;
1491
- return r[i2](d[i2](x));
1490
+ var i3 = bisect(domain, x, 1, j) - 1;
1491
+ return r[i3](d[i3](x));
1492
1492
  };
1493
1493
  }
1494
1494
  function copy(source, target) {
@@ -1540,12 +1540,12 @@ function formatDecimal(x) {
1540
1540
  return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
1541
1541
  }
1542
1542
  function formatDecimalParts(x, p) {
1543
- if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0)
1543
+ if ((i2 = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0)
1544
1544
  return null;
1545
- var i, coefficient = x.slice(0, i);
1545
+ var i2, coefficient = x.slice(0, i2);
1546
1546
  return [
1547
1547
  coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
1548
- +x.slice(i + 1)
1548
+ +x.slice(i2 + 1)
1549
1549
  ];
1550
1550
  }
1551
1551
  function exponent(x) {
@@ -1553,11 +1553,11 @@ function exponent(x) {
1553
1553
  }
1554
1554
  function formatGroup(grouping, thousands) {
1555
1555
  return function(value, width) {
1556
- var i = value.length, t = [], j = 0, g = grouping[0], length = 0;
1557
- while (i > 0 && g > 0) {
1556
+ var i2 = value.length, t = [], j = 0, g = grouping[0], length = 0;
1557
+ while (i2 > 0 && g > 0) {
1558
1558
  if (length + g + 1 > width)
1559
1559
  g = Math.max(1, width - length);
1560
- t.push(value.substring(i -= g, i + g));
1560
+ t.push(value.substring(i2 -= g, i2 + g));
1561
1561
  if ((length += g + 1) > width)
1562
1562
  break;
1563
1563
  g = grouping[j = (j + 1) % grouping.length];
@@ -1567,8 +1567,8 @@ function formatGroup(grouping, thousands) {
1567
1567
  }
1568
1568
  function formatNumerals(numerals) {
1569
1569
  return function(value) {
1570
- return value.replace(/[0-9]/g, function(i) {
1571
- return numerals[+i];
1570
+ return value.replace(/[0-9]/g, function(i2) {
1571
+ return numerals[+i2];
1572
1572
  });
1573
1573
  };
1574
1574
  }
@@ -1608,18 +1608,18 @@ FormatSpecifier.prototype.toString = function() {
1608
1608
  };
1609
1609
  function formatTrim(s) {
1610
1610
  out:
1611
- for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
1612
- switch (s[i]) {
1611
+ for (var n = s.length, i2 = 1, i0 = -1, i1; i2 < n; ++i2) {
1612
+ switch (s[i2]) {
1613
1613
  case ".":
1614
- i0 = i1 = i;
1614
+ i0 = i1 = i2;
1615
1615
  break;
1616
1616
  case "0":
1617
1617
  if (i0 === 0)
1618
- i0 = i;
1619
- i1 = i;
1618
+ i0 = i2;
1619
+ i1 = i2;
1620
1620
  break;
1621
1621
  default:
1622
- if (!+s[i])
1622
+ if (!+s[i2])
1623
1623
  break out;
1624
1624
  if (i0 > 0)
1625
1625
  i0 = 0;
@@ -1633,8 +1633,8 @@ function formatPrefixAuto(x, p) {
1633
1633
  var d = formatDecimalParts(x, p);
1634
1634
  if (!d)
1635
1635
  return x + "";
1636
- var coefficient = d[0], exponent2 = d[1], i = exponent2 - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent2 / 3))) * 3) + 1, n = coefficient.length;
1637
- return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0];
1636
+ var coefficient = d[0], exponent2 = d[1], i2 = exponent2 - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent2 / 3))) * 3) + 1, n = coefficient.length;
1637
+ return i2 === n ? coefficient : i2 > n ? coefficient + new Array(i2 - n + 1).join("0") : i2 > 0 ? coefficient.slice(0, i2) + "." + coefficient.slice(i2) : "0." + new Array(1 - i2).join("0") + formatDecimalParts(x, Math.max(0, p + i2 - 1))[0];
1638
1638
  }
1639
1639
  function formatRounded(x, p) {
1640
1640
  var d = formatDecimalParts(x, p);
@@ -1677,7 +1677,7 @@ function formatLocale(locale2) {
1677
1677
  var formatType = formatTypes[type2], maybeSuffix = /[defgprs%]/.test(type2);
1678
1678
  precision = precision === void 0 ? 6 : /[gprs]/.test(type2) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
1679
1679
  function format2(value) {
1680
- var valuePrefix = prefix, valueSuffix = suffix, i, n, c;
1680
+ var valuePrefix = prefix, valueSuffix = suffix, i2, n, c;
1681
1681
  if (type2 === "c") {
1682
1682
  valueSuffix = formatType(value) + valueSuffix;
1683
1683
  value = "";
@@ -1692,11 +1692,11 @@ function formatLocale(locale2) {
1692
1692
  valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
1693
1693
  valueSuffix = (type2 === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
1694
1694
  if (maybeSuffix) {
1695
- i = -1, n = value.length;
1696
- while (++i < n) {
1697
- if (c = value.charCodeAt(i), 48 > c || c > 57) {
1698
- valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
1699
- value = value.slice(0, i);
1695
+ i2 = -1, n = value.length;
1696
+ while (++i2 < n) {
1697
+ if (c = value.charCodeAt(i2), 48 > c || c > 57) {
1698
+ valueSuffix = (c === 46 ? decimal + value.slice(i2 + 1) : value.slice(i2)) + valueSuffix;
1699
+ value = value.slice(0, i2);
1700
1700
  break;
1701
1701
  }
1702
1702
  }
@@ -1948,9 +1948,9 @@ var hour = newInterval(function(date2) {
1948
1948
  var timeHour = hour;
1949
1949
  var day = newInterval((date2) => date2.setHours(0, 0, 0, 0), (date2, step) => date2.setDate(date2.getDate() + step), (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay, (date2) => date2.getDate() - 1);
1950
1950
  var timeDay = day;
1951
- function weekday(i) {
1951
+ function weekday(i2) {
1952
1952
  return newInterval(function(date2) {
1953
- date2.setDate(date2.getDate() - (date2.getDay() + 7 - i) % 7);
1953
+ date2.setDate(date2.getDate() - (date2.getDay() + 7 - i2) % 7);
1954
1954
  date2.setHours(0, 0, 0, 0);
1955
1955
  }, function(date2, step) {
1956
1956
  date2.setDate(date2.getDate() + step * 7);
@@ -2026,9 +2026,9 @@ var utcDay = newInterval(function(date2) {
2026
2026
  return date2.getUTCDate() - 1;
2027
2027
  });
2028
2028
  var utcDay$1 = utcDay;
2029
- function utcWeekday(i) {
2029
+ function utcWeekday(i2) {
2030
2030
  return newInterval(function(date2) {
2031
- date2.setUTCDate(date2.getUTCDate() - (date2.getUTCDay() + 7 - i) % 7);
2031
+ date2.setUTCDate(date2.getUTCDate() - (date2.getUTCDay() + 7 - i2) % 7);
2032
2032
  date2.setUTCHours(0, 0, 0, 0);
2033
2033
  }, function(date2, step) {
2034
2034
  date2.setUTCDate(date2.getUTCDate() + step * 7);
@@ -2327,10 +2327,10 @@ function getTicks(scale, numTicks) {
2327
2327
  function toString(x) {
2328
2328
  return x == null ? void 0 : x.toString();
2329
2329
  }
2330
- function _extends$e() {
2331
- _extends$e = Object.assign || function(target) {
2332
- for (var i = 1; i < arguments.length; i++) {
2333
- var source = arguments[i];
2330
+ function _extends$f() {
2331
+ _extends$f = Object.assign || function(target) {
2332
+ for (var i2 = 1; i2 < arguments.length; i2++) {
2333
+ var source = arguments[i2];
2334
2334
  for (var key in source) {
2335
2335
  if (Object.prototype.hasOwnProperty.call(source, key)) {
2336
2336
  target[key] = source[key];
@@ -2339,16 +2339,16 @@ function _extends$e() {
2339
2339
  }
2340
2340
  return target;
2341
2341
  };
2342
- return _extends$e.apply(this, arguments);
2342
+ return _extends$f.apply(this, arguments);
2343
2343
  }
2344
- function _objectWithoutPropertiesLoose$a(source, excluded) {
2344
+ function _objectWithoutPropertiesLoose$b(source, excluded) {
2345
2345
  if (source == null)
2346
2346
  return {};
2347
2347
  var target = {};
2348
2348
  var sourceKeys = Object.keys(source);
2349
- var key, i;
2350
- for (i = 0; i < sourceKeys.length; i++) {
2351
- key = sourceKeys[i];
2349
+ var key, i2;
2350
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
2351
+ key = sourceKeys[i2];
2352
2352
  if (excluded.indexOf(key) >= 0)
2353
2353
  continue;
2354
2354
  target[key] = source[key];
@@ -2356,7 +2356,7 @@ function _objectWithoutPropertiesLoose$a(source, excluded) {
2356
2356
  return target;
2357
2357
  }
2358
2358
  function LinearGradient(_ref) {
2359
- var children = _ref.children, id = _ref.id, from = _ref.from, to = _ref.to, _x1 = _ref.x1, _y1 = _ref.y1, _x2 = _ref.x2, _y2 = _ref.y2, _ref$fromOffset = _ref.fromOffset, fromOffset = _ref$fromOffset === void 0 ? "0%" : _ref$fromOffset, _ref$fromOpacity = _ref.fromOpacity, fromOpacity = _ref$fromOpacity === void 0 ? 1 : _ref$fromOpacity, _ref$toOffset = _ref.toOffset, toOffset = _ref$toOffset === void 0 ? "100%" : _ref$toOffset, _ref$toOpacity = _ref.toOpacity, toOpacity = _ref$toOpacity === void 0 ? 1 : _ref$toOpacity, rotate = _ref.rotate, transform = _ref.transform, _ref$vertical = _ref.vertical, vertical = _ref$vertical === void 0 ? true : _ref$vertical, restProps = _objectWithoutPropertiesLoose$a(_ref, ["children", "id", "from", "to", "x1", "y1", "x2", "y2", "fromOffset", "fromOpacity", "toOffset", "toOpacity", "rotate", "transform", "vertical"]);
2359
+ var children = _ref.children, id = _ref.id, from = _ref.from, to = _ref.to, _x1 = _ref.x1, _y1 = _ref.y1, _x2 = _ref.x2, _y2 = _ref.y2, _ref$fromOffset = _ref.fromOffset, fromOffset = _ref$fromOffset === void 0 ? "0%" : _ref$fromOffset, _ref$fromOpacity = _ref.fromOpacity, fromOpacity = _ref$fromOpacity === void 0 ? 1 : _ref$fromOpacity, _ref$toOffset = _ref.toOffset, toOffset = _ref$toOffset === void 0 ? "100%" : _ref$toOffset, _ref$toOpacity = _ref.toOpacity, toOpacity = _ref$toOpacity === void 0 ? 1 : _ref$toOpacity, rotate = _ref.rotate, transform = _ref.transform, _ref$vertical = _ref.vertical, vertical = _ref$vertical === void 0 ? true : _ref$vertical, restProps = _objectWithoutPropertiesLoose$b(_ref, ["children", "id", "from", "to", "x1", "y1", "x2", "y2", "fromOffset", "fromOpacity", "toOffset", "toOpacity", "rotate", "transform", "vertical"]);
2360
2360
  var x1 = _x1;
2361
2361
  var x2 = _x2;
2362
2362
  var y1 = _y1;
@@ -2367,7 +2367,7 @@ function LinearGradient(_ref) {
2367
2367
  y1 = "0";
2368
2368
  y2 = "1";
2369
2369
  }
2370
- return /* @__PURE__ */ React__default.createElement("defs", null, /* @__PURE__ */ React__default.createElement("linearGradient", _extends$e({
2370
+ return /* @__PURE__ */ React__default.createElement("defs", null, /* @__PURE__ */ React__default.createElement("linearGradient", _extends$f({
2371
2371
  id,
2372
2372
  x1,
2373
2373
  y1,
@@ -2425,14 +2425,14 @@ function range$1(a, b, str) {
2425
2425
  var begs, beg, left, right, result;
2426
2426
  var ai = str.indexOf(a);
2427
2427
  var bi = str.indexOf(b, ai + 1);
2428
- var i = ai;
2428
+ var i2 = ai;
2429
2429
  if (ai >= 0 && bi > 0) {
2430
2430
  begs = [];
2431
2431
  left = str.length;
2432
- while (i >= 0 && !result) {
2433
- if (i == ai) {
2434
- begs.push(i);
2435
- ai = str.indexOf(a, i + 1);
2432
+ while (i2 >= 0 && !result) {
2433
+ if (i2 == ai) {
2434
+ begs.push(i2);
2435
+ ai = str.indexOf(a, i2 + 1);
2436
2436
  } else if (begs.length == 1) {
2437
2437
  result = [begs.pop(), bi];
2438
2438
  } else {
@@ -2441,9 +2441,9 @@ function range$1(a, b, str) {
2441
2441
  left = beg;
2442
2442
  right = bi;
2443
2443
  }
2444
- bi = str.indexOf(b, i + 1);
2444
+ bi = str.indexOf(b, i2 + 1);
2445
2445
  }
2446
- i = ai < bi && ai >= 0 ? ai : bi;
2446
+ i2 = ai < bi && ai >= 0 ? ai : bi;
2447
2447
  }
2448
2448
  if (begs.length) {
2449
2449
  result = [left, right];
@@ -2475,17 +2475,17 @@ function range(a, b, str) {
2475
2475
  var begs, beg, left, right, result;
2476
2476
  var ai = str.indexOf(a);
2477
2477
  var bi = str.indexOf(b, ai + 1);
2478
- var i = ai;
2478
+ var i2 = ai;
2479
2479
  if (ai >= 0 && bi > 0) {
2480
2480
  if (a === b) {
2481
2481
  return [ai, bi];
2482
2482
  }
2483
2483
  begs = [];
2484
2484
  left = str.length;
2485
- while (i >= 0 && !result) {
2486
- if (i == ai) {
2487
- begs.push(i);
2488
- ai = str.indexOf(a, i + 1);
2485
+ while (i2 >= 0 && !result) {
2486
+ if (i2 == ai) {
2487
+ begs.push(i2);
2488
+ ai = str.indexOf(a, i2 + 1);
2489
2489
  } else if (begs.length == 1) {
2490
2490
  result = [begs.pop(), bi];
2491
2491
  } else {
@@ -2494,9 +2494,9 @@ function range(a, b, str) {
2494
2494
  left = beg;
2495
2495
  right = bi;
2496
2496
  }
2497
- bi = str.indexOf(b, i + 1);
2497
+ bi = str.indexOf(b, i2 + 1);
2498
2498
  }
2499
- i = ai < bi && ai >= 0 ? ai : bi;
2499
+ i2 = ai < bi && ai >= 0 ? ai : bi;
2500
2500
  }
2501
2501
  if (begs.length) {
2502
2502
  result = [left, right];
@@ -2571,8 +2571,8 @@ Mexp$4.math = {
2571
2571
  choice = other;
2572
2572
  other = r;
2573
2573
  }
2574
- for (var i = choice + 1; i <= n; i++) {
2575
- pro *= i;
2574
+ for (var i2 = choice + 1; i2 <= n; i2++) {
2575
+ pro *= i2;
2576
2576
  }
2577
2577
  return pro / Mexp$4.math.fact(other);
2578
2578
  },
@@ -2594,16 +2594,16 @@ Mexp$4.math = {
2594
2594
  if (n % 1 !== 0)
2595
2595
  return "NaN";
2596
2596
  var pro = 1;
2597
- for (var i = 2; i <= n; i++) {
2598
- pro *= i;
2597
+ for (var i2 = 2; i2 <= n; i2++) {
2598
+ pro *= i2;
2599
2599
  }
2600
2600
  return pro;
2601
2601
  },
2602
2602
  inverse: function(x) {
2603
2603
  return 1 / x;
2604
2604
  },
2605
- log: function(i) {
2606
- return Math.log(i) / Math.log(10);
2605
+ log: function(i2) {
2606
+ return Math.log(i2) / Math.log(10);
2607
2607
  },
2608
2608
  mod: function(a, b) {
2609
2609
  return a % b;
@@ -2613,16 +2613,16 @@ Mexp$4.math = {
2613
2613
  },
2614
2614
  P: function(n, r) {
2615
2615
  var pro = 1;
2616
- for (var i = Math.floor(n) - Math.floor(r) + 1; i <= Math.floor(n); i++) {
2617
- pro *= i;
2616
+ for (var i2 = Math.floor(n) - Math.floor(r) + 1; i2 <= Math.floor(n); i2++) {
2617
+ pro *= i2;
2618
2618
  }
2619
2619
  return pro;
2620
2620
  },
2621
2621
  Pi: function(low, high, ex) {
2622
2622
  var pro = 1;
2623
- for (var i = low; i <= high; i++) {
2623
+ for (var i2 = low; i2 <= high; i2++) {
2624
2624
  pro *= Number(ex.postfixEval({
2625
- n: i
2625
+ n: i2
2626
2626
  }));
2627
2627
  }
2628
2628
  return pro;
@@ -2636,9 +2636,9 @@ Mexp$4.math = {
2636
2636
  },
2637
2637
  sigma: function(low, high, ex) {
2638
2638
  var sum2 = 0;
2639
- for (var i = low; i <= high; i++) {
2639
+ for (var i2 = low; i2 <= high; i2++) {
2640
2640
  sum2 += Number(ex.postfixEval({
2641
- n: i
2641
+ n: i2
2642
2642
  }));
2643
2643
  }
2644
2644
  return sum2;
@@ -2672,8 +2672,8 @@ Mexp$4.Exception = function(message) {
2672
2672
  var math_function = Mexp$4;
2673
2673
  var Mexp$3 = math_function;
2674
2674
  function inc(arr, val) {
2675
- for (var i = 0; i < arr.length; i++) {
2676
- arr[i] += val;
2675
+ for (var i2 = 0; i2 < arr.length; i2++) {
2676
+ arr[i2] += val;
2677
2677
  }
2678
2678
  return arr;
2679
2679
  }
@@ -2970,39 +2970,39 @@ var newAr = [
2970
2970
  ["asin", "acos", "atan", "cosh", "root", "tanh", "sinh"],
2971
2971
  ["acosh", "atanh", "asinh", "Sigma"]
2972
2972
  ];
2973
- function match(str1, str2, i, x) {
2973
+ function match(str1, str2, i2, x) {
2974
2974
  for (var f = 0; f < x; f++) {
2975
- if (str1[i + f] !== str2[f]) {
2975
+ if (str1[i2 + f] !== str2[f]) {
2976
2976
  return false;
2977
2977
  }
2978
2978
  }
2979
2979
  return true;
2980
2980
  }
2981
2981
  Mexp$3.addToken = function(tokens) {
2982
- for (var i = 0; i < tokens.length; i++) {
2983
- var x = tokens[i].token.length;
2982
+ for (var i2 = 0; i2 < tokens.length; i2++) {
2983
+ var x = tokens[i2].token.length;
2984
2984
  var temp = -1;
2985
2985
  newAr[x] = newAr[x] || [];
2986
2986
  for (var y = 0; y < newAr[x].length; y++) {
2987
- if (tokens[i].token === newAr[x][y]) {
2987
+ if (tokens[i2].token === newAr[x][y]) {
2988
2988
  temp = token.indexOf(newAr[x][y]);
2989
2989
  break;
2990
2990
  }
2991
2991
  }
2992
2992
  if (temp === -1) {
2993
- token.push(tokens[i].token);
2994
- type.push(tokens[i].type);
2995
- if (newAr.length <= tokens[i].token.length) {
2996
- newAr[tokens[i].token.length] = [];
2993
+ token.push(tokens[i2].token);
2994
+ type.push(tokens[i2].type);
2995
+ if (newAr.length <= tokens[i2].token.length) {
2996
+ newAr[tokens[i2].token.length] = [];
2997
2997
  }
2998
- newAr[tokens[i].token.length].push(tokens[i].token);
2999
- eva.push(tokens[i].value);
3000
- show.push(tokens[i].show);
2998
+ newAr[tokens[i2].token.length].push(tokens[i2].token);
2999
+ eva.push(tokens[i2].value);
3000
+ show.push(tokens[i2].show);
3001
3001
  } else {
3002
- token[temp] = tokens[i].token;
3003
- type[temp] = tokens[i].type;
3004
- eva[temp] = tokens[i].value;
3005
- show[temp] = tokens[i].show;
3002
+ token[temp] = tokens[i2].token;
3003
+ type[temp] = tokens[i2].type;
3004
+ eva[temp] = tokens[i2].value;
3005
+ show[temp] = tokens[i2].show;
3006
3006
  }
3007
3007
  }
3008
3008
  };
@@ -3010,25 +3010,25 @@ function tokenize(string2) {
3010
3010
  var nodes = [];
3011
3011
  var length = string2.length;
3012
3012
  var key, x, y;
3013
- for (var i = 0; i < length; i++) {
3014
- if (i < length - 1 && string2[i] === " " && string2[i + 1] === " ") {
3013
+ for (var i2 = 0; i2 < length; i2++) {
3014
+ if (i2 < length - 1 && string2[i2] === " " && string2[i2 + 1] === " ") {
3015
3015
  continue;
3016
3016
  }
3017
3017
  key = "";
3018
- for (x = string2.length - i > newAr.length - 2 ? newAr.length - 1 : string2.length - i; x > 0; x--) {
3018
+ for (x = string2.length - i2 > newAr.length - 2 ? newAr.length - 1 : string2.length - i2; x > 0; x--) {
3019
3019
  if (newAr[x] === void 0)
3020
3020
  continue;
3021
3021
  for (y = 0; y < newAr[x].length; y++) {
3022
- if (match(string2, newAr[x][y], i, x)) {
3022
+ if (match(string2, newAr[x][y], i2, x)) {
3023
3023
  key = newAr[x][y];
3024
3024
  y = newAr[x].length;
3025
3025
  x = 0;
3026
3026
  }
3027
3027
  }
3028
3028
  }
3029
- i += key.length - 1;
3029
+ i2 += key.length - 1;
3030
3030
  if (key === "") {
3031
- throw new Mexp$3.Exception("Can't understand after " + string2.slice(i));
3031
+ throw new Mexp$3.Exception("Can't understand after " + string2.slice(i2));
3032
3032
  }
3033
3033
  var index = token.indexOf(key);
3034
3034
  nodes.push({
@@ -3068,16 +3068,16 @@ Mexp$3.lex = function(inp, tokens) {
3068
3068
  var bracToClose = 0;
3069
3069
  var asterick = empty;
3070
3070
  var prevKey = "";
3071
- var i;
3071
+ var i2;
3072
3072
  if (typeof tokens !== "undefined") {
3073
3073
  Mexp$3.addToken(tokens);
3074
3074
  }
3075
3075
  var obj = {};
3076
3076
  var nodes = tokenize(inpStr);
3077
- for (i = 0; i < nodes.length; i++) {
3078
- var node = nodes[i];
3077
+ for (i2 = 0; i2 < nodes.length; i2++) {
3078
+ var node = nodes[i2];
3079
3079
  if (node.type === 14) {
3080
- if (i > 0 && i < nodes.length - 1 && nodes[i + 1].type === 1 && (nodes[i - 1].type === 1 || nodes[i - 1].type === 6)) {
3080
+ if (i2 > 0 && i2 < nodes.length - 1 && nodes[i2 + 1].type === 1 && (nodes[i2 - 1].type === 1 || nodes[i2 - 1].type === 6)) {
3081
3081
  throw new Mexp$3.Exception("Unexpected Space");
3082
3082
  }
3083
3083
  continue;
@@ -3111,7 +3111,7 @@ Mexp$3.lex = function(inp, tokens) {
3111
3111
  cEv = Mexp$3.math.mul;
3112
3112
  cShow = "&times;";
3113
3113
  cPre = 3;
3114
- i = i - 1;
3114
+ i2 = i2 - 1;
3115
3115
  }
3116
3116
  obj = {
3117
3117
  value: cEv,
@@ -3258,24 +3258,24 @@ Mexp$2.prototype.toPostfix = function() {
3258
3258
  var post = [], elem, popped, prep, pre, ele;
3259
3259
  var stack2 = [{ value: "(", type: 4, pre: 0 }];
3260
3260
  var arr = this.value;
3261
- for (var i = 1; i < arr.length; i++) {
3262
- if (arr[i].type === 1 || arr[i].type === 3 || arr[i].type === 13) {
3263
- if (arr[i].type === 1)
3264
- arr[i].value = Number(arr[i].value);
3265
- post.push(arr[i]);
3266
- } else if (arr[i].type === 4) {
3267
- stack2.push(arr[i]);
3268
- } else if (arr[i].type === 5) {
3261
+ for (var i2 = 1; i2 < arr.length; i2++) {
3262
+ if (arr[i2].type === 1 || arr[i2].type === 3 || arr[i2].type === 13) {
3263
+ if (arr[i2].type === 1)
3264
+ arr[i2].value = Number(arr[i2].value);
3265
+ post.push(arr[i2]);
3266
+ } else if (arr[i2].type === 4) {
3267
+ stack2.push(arr[i2]);
3268
+ } else if (arr[i2].type === 5) {
3269
3269
  while ((popped = stack2.pop()).type !== 4) {
3270
3270
  post.push(popped);
3271
3271
  }
3272
- } else if (arr[i].type === 11) {
3272
+ } else if (arr[i2].type === 11) {
3273
3273
  while ((popped = stack2.pop()).type !== 4) {
3274
3274
  post.push(popped);
3275
3275
  }
3276
3276
  stack2.push(popped);
3277
3277
  } else {
3278
- elem = arr[i];
3278
+ elem = arr[i2];
3279
3279
  pre = elem.pre;
3280
3280
  ele = stack2[stack2.length - 1];
3281
3281
  prep = ele.pre;
@@ -3305,66 +3305,66 @@ Mexp$1.prototype.postfixEval = function(UserDefined) {
3305
3305
  var stack2 = [], pop1, pop2, pop3;
3306
3306
  var arr = this.value;
3307
3307
  var bool = typeof UserDefined.n !== "undefined";
3308
- for (var i = 0; i < arr.length; i++) {
3309
- if (arr[i].type === 1) {
3310
- stack2.push({ value: arr[i].value, type: 1 });
3311
- } else if (arr[i].type === 3) {
3312
- stack2.push({ value: UserDefined[arr[i].value], type: 1 });
3313
- } else if (arr[i].type === 0) {
3308
+ for (var i2 = 0; i2 < arr.length; i2++) {
3309
+ if (arr[i2].type === 1) {
3310
+ stack2.push({ value: arr[i2].value, type: 1 });
3311
+ } else if (arr[i2].type === 3) {
3312
+ stack2.push({ value: UserDefined[arr[i2].value], type: 1 });
3313
+ } else if (arr[i2].type === 0) {
3314
3314
  if (typeof stack2[stack2.length - 1].type === "undefined") {
3315
- stack2[stack2.length - 1].value.push(arr[i]);
3315
+ stack2[stack2.length - 1].value.push(arr[i2]);
3316
3316
  } else
3317
- stack2[stack2.length - 1].value = arr[i].value(stack2[stack2.length - 1].value);
3318
- } else if (arr[i].type === 7) {
3317
+ stack2[stack2.length - 1].value = arr[i2].value(stack2[stack2.length - 1].value);
3318
+ } else if (arr[i2].type === 7) {
3319
3319
  if (typeof stack2[stack2.length - 1].type === "undefined") {
3320
- stack2[stack2.length - 1].value.push(arr[i]);
3320
+ stack2[stack2.length - 1].value.push(arr[i2]);
3321
3321
  } else
3322
- stack2[stack2.length - 1].value = arr[i].value(stack2[stack2.length - 1].value);
3323
- } else if (arr[i].type === 8) {
3322
+ stack2[stack2.length - 1].value = arr[i2].value(stack2[stack2.length - 1].value);
3323
+ } else if (arr[i2].type === 8) {
3324
3324
  pop1 = stack2.pop();
3325
3325
  pop2 = stack2.pop();
3326
- stack2.push({ type: 1, value: arr[i].value(pop2.value, pop1.value) });
3327
- } else if (arr[i].type === 10) {
3326
+ stack2.push({ type: 1, value: arr[i2].value(pop2.value, pop1.value) });
3327
+ } else if (arr[i2].type === 10) {
3328
3328
  pop1 = stack2.pop();
3329
3329
  pop2 = stack2.pop();
3330
3330
  if (typeof pop2.type === "undefined") {
3331
3331
  pop2.value = pop2.concat(pop1);
3332
- pop2.value.push(arr[i]);
3332
+ pop2.value.push(arr[i2]);
3333
3333
  stack2.push(pop2);
3334
3334
  } else if (typeof pop1.type === "undefined") {
3335
3335
  pop1.unshift(pop2);
3336
- pop1.push(arr[i]);
3336
+ pop1.push(arr[i2]);
3337
3337
  stack2.push(pop1);
3338
3338
  } else {
3339
- stack2.push({ type: 1, value: arr[i].value(pop2.value, pop1.value) });
3339
+ stack2.push({ type: 1, value: arr[i2].value(pop2.value, pop1.value) });
3340
3340
  }
3341
- } else if (arr[i].type === 2 || arr[i].type === 9) {
3341
+ } else if (arr[i2].type === 2 || arr[i2].type === 9) {
3342
3342
  pop1 = stack2.pop();
3343
3343
  pop2 = stack2.pop();
3344
3344
  if (typeof pop2.type === "undefined") {
3345
3345
  pop2 = pop2.concat(pop1);
3346
- pop2.push(arr[i]);
3346
+ pop2.push(arr[i2]);
3347
3347
  stack2.push(pop2);
3348
3348
  } else if (typeof pop1.type === "undefined") {
3349
3349
  pop1.unshift(pop2);
3350
- pop1.push(arr[i]);
3350
+ pop1.push(arr[i2]);
3351
3351
  stack2.push(pop1);
3352
3352
  } else {
3353
- stack2.push({ type: 1, value: arr[i].value(pop2.value, pop1.value) });
3353
+ stack2.push({ type: 1, value: arr[i2].value(pop2.value, pop1.value) });
3354
3354
  }
3355
- } else if (arr[i].type === 12) {
3355
+ } else if (arr[i2].type === 12) {
3356
3356
  pop1 = stack2.pop();
3357
3357
  if (typeof pop1.type !== "undefined") {
3358
3358
  pop1 = [pop1];
3359
3359
  }
3360
3360
  pop2 = stack2.pop();
3361
3361
  pop3 = stack2.pop();
3362
- stack2.push({ type: 1, value: arr[i].value(pop3.value, pop2.value, new Mexp$1(pop1)) });
3363
- } else if (arr[i].type === 13) {
3362
+ stack2.push({ type: 1, value: arr[i2].value(pop3.value, pop2.value, new Mexp$1(pop1)) });
3363
+ } else if (arr[i2].type === 13) {
3364
3364
  if (bool) {
3365
- stack2.push({ value: UserDefined[arr[i].value], type: 3 });
3365
+ stack2.push({ value: UserDefined[arr[i2].value], type: 3 });
3366
3366
  } else
3367
- stack2.push([arr[i]]);
3367
+ stack2.push([arr[i2]]);
3368
3368
  }
3369
3369
  }
3370
3370
  if (stack2.length > 1) {
@@ -3389,31 +3389,31 @@ Mexp.prototype.formulaEval = function() {
3389
3389
  var pop1, pop2, pop3;
3390
3390
  var disp = [];
3391
3391
  var arr = this.value;
3392
- for (var i = 0; i < arr.length; i++) {
3393
- if (arr[i].type === 1 || arr[i].type === 3) {
3394
- disp.push({ value: arr[i].type === 3 ? arr[i].show : arr[i].value, type: 1 });
3395
- } else if (arr[i].type === 13) {
3396
- disp.push({ value: arr[i].show, type: 1 });
3397
- } else if (arr[i].type === 0) {
3398
- disp[disp.length - 1] = { value: arr[i].show + (arr[i].show != "-" ? "(" : "") + disp[disp.length - 1].value + (arr[i].show != "-" ? ")" : ""), type: 0 };
3399
- } else if (arr[i].type === 7) {
3400
- disp[disp.length - 1] = { value: (disp[disp.length - 1].type != 1 ? "(" : "") + disp[disp.length - 1].value + (disp[disp.length - 1].type != 1 ? ")" : "") + arr[i].show, type: 7 };
3401
- } else if (arr[i].type === 10) {
3392
+ for (var i2 = 0; i2 < arr.length; i2++) {
3393
+ if (arr[i2].type === 1 || arr[i2].type === 3) {
3394
+ disp.push({ value: arr[i2].type === 3 ? arr[i2].show : arr[i2].value, type: 1 });
3395
+ } else if (arr[i2].type === 13) {
3396
+ disp.push({ value: arr[i2].show, type: 1 });
3397
+ } else if (arr[i2].type === 0) {
3398
+ disp[disp.length - 1] = { value: arr[i2].show + (arr[i2].show != "-" ? "(" : "") + disp[disp.length - 1].value + (arr[i2].show != "-" ? ")" : ""), type: 0 };
3399
+ } else if (arr[i2].type === 7) {
3400
+ disp[disp.length - 1] = { value: (disp[disp.length - 1].type != 1 ? "(" : "") + disp[disp.length - 1].value + (disp[disp.length - 1].type != 1 ? ")" : "") + arr[i2].show, type: 7 };
3401
+ } else if (arr[i2].type === 10) {
3402
3402
  pop1 = disp.pop();
3403
3403
  pop2 = disp.pop();
3404
- if (arr[i].show === "P" || arr[i].show === "C")
3405
- disp.push({ value: "<sup>" + pop2.value + "</sup>" + arr[i].show + "<sub>" + pop1.value + "</sub>", type: 10 });
3404
+ if (arr[i2].show === "P" || arr[i2].show === "C")
3405
+ disp.push({ value: "<sup>" + pop2.value + "</sup>" + arr[i2].show + "<sub>" + pop1.value + "</sub>", type: 10 });
3406
3406
  else
3407
3407
  disp.push({ value: (pop2.type != 1 ? "(" : "") + pop2.value + (pop2.type != 1 ? ")" : "") + "<sup>" + pop1.value + "</sup>", type: 1 });
3408
- } else if (arr[i].type === 2 || arr[i].type === 9) {
3408
+ } else if (arr[i2].type === 2 || arr[i2].type === 9) {
3409
3409
  pop1 = disp.pop();
3410
3410
  pop2 = disp.pop();
3411
- disp.push({ value: (pop2.type != 1 ? "(" : "") + pop2.value + (pop2.type != 1 ? ")" : "") + arr[i].show + (pop1.type != 1 ? "(" : "") + pop1.value + (pop1.type != 1 ? ")" : ""), type: arr[i].type });
3412
- } else if (arr[i].type === 12) {
3411
+ disp.push({ value: (pop2.type != 1 ? "(" : "") + pop2.value + (pop2.type != 1 ? ")" : "") + arr[i2].show + (pop1.type != 1 ? "(" : "") + pop1.value + (pop1.type != 1 ? ")" : ""), type: arr[i2].type });
3412
+ } else if (arr[i2].type === 12) {
3413
3413
  pop1 = disp.pop();
3414
3414
  pop2 = disp.pop();
3415
3415
  pop3 = disp.pop();
3416
- disp.push({ value: arr[i].show + "(" + pop3.value + "," + pop2.value + "," + pop1.value + ")", type: 12 });
3416
+ disp.push({ value: arr[i2].show + "(" + pop3.value + "," + pop2.value + "," + pop1.value + ")", type: 12 });
3417
3417
  }
3418
3418
  }
3419
3419
  return disp[0].value;
@@ -3867,15 +3867,15 @@ function getStringWidth(str, style) {
3867
3867
  var getStringWidth$1 = memoize$1(getStringWidth, function(str, style) {
3868
3868
  return str + "_" + JSON.stringify(style);
3869
3869
  });
3870
- var _excluded$9 = ["verticalAnchor", "scaleToFit", "angle", "width", "lineHeight", "capHeight", "children", "style"];
3871
- function _objectWithoutPropertiesLoose$9(source, excluded) {
3870
+ var _excluded$a = ["verticalAnchor", "scaleToFit", "angle", "width", "lineHeight", "capHeight", "children", "style"];
3871
+ function _objectWithoutPropertiesLoose$a(source, excluded) {
3872
3872
  if (source == null)
3873
3873
  return {};
3874
3874
  var target = {};
3875
3875
  var sourceKeys = Object.keys(source);
3876
- var key, i;
3877
- for (i = 0; i < sourceKeys.length; i++) {
3878
- key = sourceKeys[i];
3876
+ var key, i2;
3877
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
3878
+ key = sourceKeys[i2];
3879
3879
  if (excluded.indexOf(key) >= 0)
3880
3880
  continue;
3881
3881
  target[key] = source[key];
@@ -3889,7 +3889,7 @@ function isXOrYInValid(xOrY) {
3889
3889
  return typeof xOrY === "number" && Number.isFinite(xOrY) || typeof xOrY === "string";
3890
3890
  }
3891
3891
  function useText(props) {
3892
- var _props$verticalAnchor = props.verticalAnchor, verticalAnchor = _props$verticalAnchor === void 0 ? "end" : _props$verticalAnchor, _props$scaleToFit = props.scaleToFit, scaleToFit = _props$scaleToFit === void 0 ? false : _props$scaleToFit, angle = props.angle, width = props.width, _props$lineHeight = props.lineHeight, lineHeight = _props$lineHeight === void 0 ? "1em" : _props$lineHeight, _props$capHeight = props.capHeight, capHeight = _props$capHeight === void 0 ? "0.71em" : _props$capHeight, children = props.children, style = props.style, textProps = _objectWithoutPropertiesLoose$9(props, _excluded$9);
3892
+ var _props$verticalAnchor = props.verticalAnchor, verticalAnchor = _props$verticalAnchor === void 0 ? "end" : _props$verticalAnchor, _props$scaleToFit = props.scaleToFit, scaleToFit = _props$scaleToFit === void 0 ? false : _props$scaleToFit, angle = props.angle, width = props.width, _props$lineHeight = props.lineHeight, lineHeight = _props$lineHeight === void 0 ? "1em" : _props$lineHeight, _props$capHeight = props.capHeight, capHeight = _props$capHeight === void 0 ? "0.71em" : _props$capHeight, children = props.children, style = props.style, textProps = _objectWithoutPropertiesLoose$a(props, _excluded$a);
3893
3893
  var _textProps$x = textProps.x, x = _textProps$x === void 0 ? 0 : _textProps$x, _textProps$y = textProps.y, y = _textProps$y === void 0 ? 0 : _textProps$y;
3894
3894
  var isXOrYNotValid = !isXOrYInValid(x) || !isXOrYInValid(y);
3895
3895
  var _useMemo = useMemo(function() {
@@ -3958,11 +3958,11 @@ function useText(props) {
3958
3958
  transform
3959
3959
  };
3960
3960
  }
3961
- var _excluded$8 = ["dx", "dy", "textAnchor", "innerRef", "innerTextRef", "verticalAnchor", "angle", "lineHeight", "scaleToFit", "capHeight", "width"];
3962
- function _extends$d() {
3963
- _extends$d = Object.assign || function(target) {
3964
- for (var i = 1; i < arguments.length; i++) {
3965
- var source = arguments[i];
3961
+ var _excluded$9 = ["dx", "dy", "textAnchor", "innerRef", "innerTextRef", "verticalAnchor", "angle", "lineHeight", "scaleToFit", "capHeight", "width"];
3962
+ function _extends$e() {
3963
+ _extends$e = Object.assign || function(target) {
3964
+ for (var i2 = 1; i2 < arguments.length; i2++) {
3965
+ var source = arguments[i2];
3966
3966
  for (var key in source) {
3967
3967
  if (Object.prototype.hasOwnProperty.call(source, key)) {
3968
3968
  target[key] = source[key];
@@ -3971,16 +3971,16 @@ function _extends$d() {
3971
3971
  }
3972
3972
  return target;
3973
3973
  };
3974
- return _extends$d.apply(this, arguments);
3974
+ return _extends$e.apply(this, arguments);
3975
3975
  }
3976
- function _objectWithoutPropertiesLoose$8(source, excluded) {
3976
+ function _objectWithoutPropertiesLoose$9(source, excluded) {
3977
3977
  if (source == null)
3978
3978
  return {};
3979
3979
  var target = {};
3980
3980
  var sourceKeys = Object.keys(source);
3981
- var key, i;
3982
- for (i = 0; i < sourceKeys.length; i++) {
3983
- key = sourceKeys[i];
3981
+ var key, i2;
3982
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
3983
+ key = sourceKeys[i2];
3984
3984
  if (excluded.indexOf(key) >= 0)
3985
3985
  continue;
3986
3986
  target[key] = source[key];
@@ -3998,7 +3998,7 @@ function Text(props) {
3998
3998
  props.scaleToFit;
3999
3999
  props.capHeight;
4000
4000
  props.width;
4001
- var textProps = _objectWithoutPropertiesLoose$8(props, _excluded$8);
4001
+ var textProps = _objectWithoutPropertiesLoose$9(props, _excluded$9);
4002
4002
  var _textProps$x = textProps.x, x = _textProps$x === void 0 ? 0 : _textProps$x, fontSize = textProps.fontSize;
4003
4003
  var _useText = useText(props), wordsByLines = _useText.wordsByLines, startDy = _useText.startDy, transform = _useText.transform;
4004
4004
  return /* @__PURE__ */ React__default.createElement("svg", {
@@ -4007,7 +4007,7 @@ function Text(props) {
4007
4007
  y: dy,
4008
4008
  fontSize,
4009
4009
  style: SVG_STYLE
4010
- }, wordsByLines.length > 0 ? /* @__PURE__ */ React__default.createElement("text", _extends$d({
4010
+ }, wordsByLines.length > 0 ? /* @__PURE__ */ React__default.createElement("text", _extends$e({
4011
4011
  ref: innerTextRef,
4012
4012
  transform
4013
4013
  }, textProps, {
@@ -4048,10 +4048,10 @@ function getLabelTransform(_ref) {
4048
4048
  transform
4049
4049
  };
4050
4050
  }
4051
- function _extends$c() {
4052
- _extends$c = Object.assign || function(target) {
4053
- for (var i = 1; i < arguments.length; i++) {
4054
- var source = arguments[i];
4051
+ function _extends$d() {
4052
+ _extends$d = Object.assign || function(target) {
4053
+ for (var i2 = 1; i2 < arguments.length; i2++) {
4054
+ var source = arguments[i2];
4055
4055
  for (var key in source) {
4056
4056
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4057
4057
  target[key] = source[key];
@@ -4060,7 +4060,7 @@ function _extends$c() {
4060
4060
  }
4061
4061
  return target;
4062
4062
  };
4063
- return _extends$c.apply(this, arguments);
4063
+ return _extends$d.apply(this, arguments);
4064
4064
  }
4065
4065
  function Ticks(_ref) {
4066
4066
  var hideTicks = _ref.hideTicks, horizontal = _ref.horizontal, orientation = _ref.orientation, tickClassName = _ref.tickClassName, tickComponent = _ref.tickComponent, allTickLabelProps = _ref.tickLabelProps, _ref$tickStroke = _ref.tickStroke, tickStroke = _ref$tickStroke === void 0 ? "#222" : _ref$tickStroke, tickTransform = _ref.tickTransform, ticks2 = _ref.ticks, strokeWidth = _ref.strokeWidth, tickLineProps = _ref.tickLineProps;
@@ -4074,26 +4074,26 @@ function Ticks(_ref) {
4074
4074
  key: "visx-tick-" + value + "-" + index,
4075
4075
  className: cx("visx-axis-tick", tickClassName),
4076
4076
  transform: tickTransform
4077
- }, !hideTicks && /* @__PURE__ */ React__default.createElement(Line$1, _extends$c({
4077
+ }, !hideTicks && /* @__PURE__ */ React__default.createElement(Line$1, _extends$d({
4078
4078
  from,
4079
4079
  to,
4080
4080
  stroke: tickStroke,
4081
4081
  strokeWidth,
4082
4082
  strokeLinecap: "square"
4083
- }, tickLineProps)), tickComponent ? tickComponent(_extends$c({}, tickLabelProps, {
4083
+ }, tickLineProps)), tickComponent ? tickComponent(_extends$d({}, tickLabelProps, {
4084
4084
  x: to.x,
4085
4085
  y: tickYCoord,
4086
4086
  formattedValue
4087
- })) : /* @__PURE__ */ React__default.createElement(Text, _extends$c({
4087
+ })) : /* @__PURE__ */ React__default.createElement(Text, _extends$d({
4088
4088
  x: to.x,
4089
4089
  y: tickYCoord
4090
4090
  }, tickLabelProps), formattedValue));
4091
4091
  });
4092
4092
  }
4093
- function _extends$b() {
4094
- _extends$b = Object.assign || function(target) {
4095
- for (var i = 1; i < arguments.length; i++) {
4096
- var source = arguments[i];
4093
+ function _extends$c() {
4094
+ _extends$c = Object.assign || function(target) {
4095
+ for (var i2 = 1; i2 < arguments.length; i2++) {
4096
+ var source = arguments[i2];
4097
4097
  for (var key in source) {
4098
4098
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4099
4099
  target[key] = source[key];
@@ -4102,7 +4102,7 @@ function _extends$b() {
4102
4102
  }
4103
4103
  return target;
4104
4104
  };
4105
- return _extends$b.apply(this, arguments);
4105
+ return _extends$c.apply(this, arguments);
4106
4106
  }
4107
4107
  var defaultTextProps = {
4108
4108
  textAnchor: "middle",
@@ -4141,7 +4141,7 @@ function AxisRenderer(_ref) {
4141
4141
  stroke,
4142
4142
  strokeWidth,
4143
4143
  strokeDasharray
4144
- }), label && /* @__PURE__ */ React__default.createElement(Text, _extends$b({
4144
+ }), label && /* @__PURE__ */ React__default.createElement(Text, _extends$c({
4145
4145
  className: cx("visx-axis-label", labelClassName)
4146
4146
  }, getLabelTransform({
4147
4147
  labelOffset,
@@ -4215,11 +4215,11 @@ function createPoint(_ref, horizontal) {
4215
4215
  y: x
4216
4216
  });
4217
4217
  }
4218
- var _excluded$7 = ["children", "axisClassName", "hideAxisLine", "hideTicks", "hideZero", "left", "numTicks", "orientation", "rangePadding", "scale", "tickFormat", "tickLength", "tickValues", "top"];
4219
- function _extends$a() {
4220
- _extends$a = Object.assign || function(target) {
4221
- for (var i = 1; i < arguments.length; i++) {
4222
- var source = arguments[i];
4218
+ var _excluded$8 = ["children", "axisClassName", "hideAxisLine", "hideTicks", "hideZero", "left", "numTicks", "orientation", "rangePadding", "scale", "tickFormat", "tickLength", "tickValues", "top"];
4219
+ function _extends$b() {
4220
+ _extends$b = Object.assign || function(target) {
4221
+ for (var i2 = 1; i2 < arguments.length; i2++) {
4222
+ var source = arguments[i2];
4223
4223
  for (var key in source) {
4224
4224
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4225
4225
  target[key] = source[key];
@@ -4228,16 +4228,16 @@ function _extends$a() {
4228
4228
  }
4229
4229
  return target;
4230
4230
  };
4231
- return _extends$a.apply(this, arguments);
4231
+ return _extends$b.apply(this, arguments);
4232
4232
  }
4233
- function _objectWithoutPropertiesLoose$7(source, excluded) {
4233
+ function _objectWithoutPropertiesLoose$8(source, excluded) {
4234
4234
  if (source == null)
4235
4235
  return {};
4236
4236
  var target = {};
4237
4237
  var sourceKeys = Object.keys(source);
4238
- var key, i;
4239
- for (i = 0; i < sourceKeys.length; i++) {
4240
- key = sourceKeys[i];
4238
+ var key, i2;
4239
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
4240
+ key = sourceKeys[i2];
4241
4241
  if (excluded.indexOf(key) >= 0)
4242
4242
  continue;
4243
4243
  target[key] = source[key];
@@ -4245,7 +4245,7 @@ function _objectWithoutPropertiesLoose$7(source, excluded) {
4245
4245
  return target;
4246
4246
  }
4247
4247
  function Axis(_ref) {
4248
- var _ref$children = _ref.children, children = _ref$children === void 0 ? AxisRenderer : _ref$children, axisClassName = _ref.axisClassName, _ref$hideAxisLine = _ref.hideAxisLine, hideAxisLine = _ref$hideAxisLine === void 0 ? false : _ref$hideAxisLine, _ref$hideTicks = _ref.hideTicks, hideTicks = _ref$hideTicks === void 0 ? false : _ref$hideTicks, _ref$hideZero = _ref.hideZero, hideZero = _ref$hideZero === void 0 ? false : _ref$hideZero, _ref$left = _ref.left, left = _ref$left === void 0 ? 0 : _ref$left, _ref$numTicks = _ref.numTicks, numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, _ref$orientation = _ref.orientation, orientation = _ref$orientation === void 0 ? Orientation$1.bottom : _ref$orientation, _ref$rangePadding = _ref.rangePadding, rangePadding = _ref$rangePadding === void 0 ? 0 : _ref$rangePadding, scale = _ref.scale, tickFormat2 = _ref.tickFormat, _ref$tickLength = _ref.tickLength, tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength, tickValues = _ref.tickValues, _ref$top = _ref.top, top = _ref$top === void 0 ? 0 : _ref$top, restProps = _objectWithoutPropertiesLoose$7(_ref, _excluded$7);
4248
+ var _ref$children = _ref.children, children = _ref$children === void 0 ? AxisRenderer : _ref$children, axisClassName = _ref.axisClassName, _ref$hideAxisLine = _ref.hideAxisLine, hideAxisLine = _ref$hideAxisLine === void 0 ? false : _ref$hideAxisLine, _ref$hideTicks = _ref.hideTicks, hideTicks = _ref$hideTicks === void 0 ? false : _ref$hideTicks, _ref$hideZero = _ref.hideZero, hideZero = _ref$hideZero === void 0 ? false : _ref$hideZero, _ref$left = _ref.left, left = _ref$left === void 0 ? 0 : _ref$left, _ref$numTicks = _ref.numTicks, numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, _ref$orientation = _ref.orientation, orientation = _ref$orientation === void 0 ? Orientation$1.bottom : _ref$orientation, _ref$rangePadding = _ref.rangePadding, rangePadding = _ref$rangePadding === void 0 ? 0 : _ref$rangePadding, scale = _ref.scale, tickFormat2 = _ref.tickFormat, _ref$tickLength = _ref.tickLength, tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength, tickValues = _ref.tickValues, _ref$top = _ref.top, top = _ref$top === void 0 ? 0 : _ref$top, restProps = _objectWithoutPropertiesLoose$8(_ref, _excluded$8);
4249
4249
  var format2 = tickFormat2 != null ? tickFormat2 : getTickFormatter(scale);
4250
4250
  var isLeft = orientation === Orientation$1.left;
4251
4251
  var isTop = orientation === Orientation$1.top;
@@ -4290,7 +4290,7 @@ function Axis(_ref) {
4290
4290
  className: cx("visx-axis", axisClassName),
4291
4291
  top,
4292
4292
  left
4293
- }, children(_extends$a({}, restProps, {
4293
+ }, children(_extends$b({}, restProps, {
4294
4294
  axisFromPoint,
4295
4295
  axisToPoint,
4296
4296
  hideAxisLine,
@@ -4308,11 +4308,11 @@ function Axis(_ref) {
4308
4308
  ticks: ticks2
4309
4309
  })));
4310
4310
  }
4311
- var _excluded$6 = ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"];
4312
- function _extends$9() {
4313
- _extends$9 = Object.assign || function(target) {
4314
- for (var i = 1; i < arguments.length; i++) {
4315
- var source = arguments[i];
4311
+ var _excluded$7 = ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"];
4312
+ function _extends$a() {
4313
+ _extends$a = Object.assign || function(target) {
4314
+ for (var i2 = 1; i2 < arguments.length; i2++) {
4315
+ var source = arguments[i2];
4316
4316
  for (var key in source) {
4317
4317
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4318
4318
  target[key] = source[key];
@@ -4321,16 +4321,16 @@ function _extends$9() {
4321
4321
  }
4322
4322
  return target;
4323
4323
  };
4324
- return _extends$9.apply(this, arguments);
4324
+ return _extends$a.apply(this, arguments);
4325
4325
  }
4326
- function _objectWithoutPropertiesLoose$6(source, excluded) {
4326
+ function _objectWithoutPropertiesLoose$7(source, excluded) {
4327
4327
  if (source == null)
4328
4328
  return {};
4329
4329
  var target = {};
4330
4330
  var sourceKeys = Object.keys(source);
4331
- var key, i;
4332
- for (i = 0; i < sourceKeys.length; i++) {
4333
- key = sourceKeys[i];
4331
+ var key, i2;
4332
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
4333
+ key = sourceKeys[i2];
4334
4334
  if (excluded.indexOf(key) >= 0)
4335
4335
  continue;
4336
4336
  target[key] = source[key];
@@ -4348,8 +4348,8 @@ var leftTickLabelProps = function leftTickLabelProps2() {
4348
4348
  };
4349
4349
  };
4350
4350
  function AxisLeft(_ref) {
4351
- var axisClassName = _ref.axisClassName, _ref$labelOffset = _ref.labelOffset, labelOffset = _ref$labelOffset === void 0 ? 36 : _ref$labelOffset, _ref$tickLabelProps = _ref.tickLabelProps, tickLabelProps = _ref$tickLabelProps === void 0 ? leftTickLabelProps : _ref$tickLabelProps, _ref$tickLength = _ref.tickLength, tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength, restProps = _objectWithoutPropertiesLoose$6(_ref, _excluded$6);
4352
- return /* @__PURE__ */ React__default.createElement(Axis, _extends$9({
4351
+ var axisClassName = _ref.axisClassName, _ref$labelOffset = _ref.labelOffset, labelOffset = _ref$labelOffset === void 0 ? 36 : _ref$labelOffset, _ref$tickLabelProps = _ref.tickLabelProps, tickLabelProps = _ref$tickLabelProps === void 0 ? leftTickLabelProps : _ref$tickLabelProps, _ref$tickLength = _ref.tickLength, tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength, restProps = _objectWithoutPropertiesLoose$7(_ref, _excluded$7);
4352
+ return /* @__PURE__ */ React__default.createElement(Axis, _extends$a({
4353
4353
  axisClassName: cx("visx-axis-left", axisClassName),
4354
4354
  labelOffset,
4355
4355
  orientation: Orientation$1.left,
@@ -4357,11 +4357,11 @@ function AxisLeft(_ref) {
4357
4357
  tickLength
4358
4358
  }, restProps));
4359
4359
  }
4360
- var _excluded$5 = ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"];
4361
- function _extends$8() {
4362
- _extends$8 = Object.assign || function(target) {
4363
- for (var i = 1; i < arguments.length; i++) {
4364
- var source = arguments[i];
4360
+ var _excluded$6 = ["axisClassName", "labelOffset", "tickLabelProps", "tickLength"];
4361
+ function _extends$9() {
4362
+ _extends$9 = Object.assign || function(target) {
4363
+ for (var i2 = 1; i2 < arguments.length; i2++) {
4364
+ var source = arguments[i2];
4365
4365
  for (var key in source) {
4366
4366
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4367
4367
  target[key] = source[key];
@@ -4370,16 +4370,16 @@ function _extends$8() {
4370
4370
  }
4371
4371
  return target;
4372
4372
  };
4373
- return _extends$8.apply(this, arguments);
4373
+ return _extends$9.apply(this, arguments);
4374
4374
  }
4375
- function _objectWithoutPropertiesLoose$5(source, excluded) {
4375
+ function _objectWithoutPropertiesLoose$6(source, excluded) {
4376
4376
  if (source == null)
4377
4377
  return {};
4378
4378
  var target = {};
4379
4379
  var sourceKeys = Object.keys(source);
4380
- var key, i;
4381
- for (i = 0; i < sourceKeys.length; i++) {
4382
- key = sourceKeys[i];
4380
+ var key, i2;
4381
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
4382
+ key = sourceKeys[i2];
4383
4383
  if (excluded.indexOf(key) >= 0)
4384
4384
  continue;
4385
4385
  target[key] = source[key];
@@ -4396,8 +4396,8 @@ var bottomTickLabelProps = function bottomTickLabelProps2() {
4396
4396
  };
4397
4397
  };
4398
4398
  function AxisBottom(_ref) {
4399
- var axisClassName = _ref.axisClassName, _ref$labelOffset = _ref.labelOffset, labelOffset = _ref$labelOffset === void 0 ? 8 : _ref$labelOffset, _ref$tickLabelProps = _ref.tickLabelProps, tickLabelProps = _ref$tickLabelProps === void 0 ? bottomTickLabelProps : _ref$tickLabelProps, _ref$tickLength = _ref.tickLength, tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength, restProps = _objectWithoutPropertiesLoose$5(_ref, _excluded$5);
4400
- return /* @__PURE__ */ React__default.createElement(Axis, _extends$8({
4399
+ var axisClassName = _ref.axisClassName, _ref$labelOffset = _ref.labelOffset, labelOffset = _ref$labelOffset === void 0 ? 8 : _ref$labelOffset, _ref$tickLabelProps = _ref.tickLabelProps, tickLabelProps = _ref$tickLabelProps === void 0 ? bottomTickLabelProps : _ref$tickLabelProps, _ref$tickLength = _ref.tickLength, tickLength = _ref$tickLength === void 0 ? 8 : _ref$tickLength, restProps = _objectWithoutPropertiesLoose$6(_ref, _excluded$6);
4400
+ return /* @__PURE__ */ React__default.createElement(Axis, _extends$9({
4401
4401
  axisClassName: cx("visx-axis-bottom", axisClassName),
4402
4402
  labelOffset,
4403
4403
  orientation: Orientation$1.bottom,
@@ -4408,14 +4408,14 @@ function AxisBottom(_ref) {
4408
4408
  var _default = Line;
4409
4409
  var _react = _interopRequireDefault(React__default);
4410
4410
  var _classnames = _interopRequireDefault(classnames.exports);
4411
- var _excluded$4 = ["from", "to", "fill", "className", "innerRef"];
4411
+ var _excluded$5 = ["from", "to", "fill", "className", "innerRef"];
4412
4412
  function _interopRequireDefault(obj) {
4413
4413
  return obj && obj.__esModule ? obj : { default: obj };
4414
4414
  }
4415
- function _extends$7() {
4416
- _extends$7 = Object.assign || function(target) {
4417
- for (var i = 1; i < arguments.length; i++) {
4418
- var source = arguments[i];
4415
+ function _extends$8() {
4416
+ _extends$8 = Object.assign || function(target) {
4417
+ for (var i2 = 1; i2 < arguments.length; i2++) {
4418
+ var source = arguments[i2];
4419
4419
  for (var key in source) {
4420
4420
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4421
4421
  target[key] = source[key];
@@ -4424,16 +4424,16 @@ function _extends$7() {
4424
4424
  }
4425
4425
  return target;
4426
4426
  };
4427
- return _extends$7.apply(this, arguments);
4427
+ return _extends$8.apply(this, arguments);
4428
4428
  }
4429
- function _objectWithoutPropertiesLoose$4(source, excluded) {
4429
+ function _objectWithoutPropertiesLoose$5(source, excluded) {
4430
4430
  if (source == null)
4431
4431
  return {};
4432
4432
  var target = {};
4433
4433
  var sourceKeys = Object.keys(source);
4434
- var key, i;
4435
- for (i = 0; i < sourceKeys.length; i++) {
4436
- key = sourceKeys[i];
4434
+ var key, i2;
4435
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
4436
+ key = sourceKeys[i2];
4437
4437
  if (excluded.indexOf(key) >= 0)
4438
4438
  continue;
4439
4439
  target[key] = source[key];
@@ -4447,9 +4447,9 @@ function Line(_ref) {
4447
4447
  } : _ref$from, _ref$to = _ref.to, to = _ref$to === void 0 ? {
4448
4448
  x: 1,
4449
4449
  y: 1
4450
- } : _ref$to, _ref$fill = _ref.fill, fill = _ref$fill === void 0 ? "transparent" : _ref$fill, className = _ref.className, innerRef = _ref.innerRef, restProps = _objectWithoutPropertiesLoose$4(_ref, _excluded$4);
4450
+ } : _ref$to, _ref$fill = _ref.fill, fill = _ref$fill === void 0 ? "transparent" : _ref$fill, className = _ref.className, innerRef = _ref.innerRef, restProps = _objectWithoutPropertiesLoose$5(_ref, _excluded$5);
4451
4451
  var isRectilinear = from.x === to.x || from.y === to.y;
4452
- return /* @__PURE__ */ _react.default.createElement("line", _extends$7({
4452
+ return /* @__PURE__ */ _react.default.createElement("line", _extends$8({
4453
4453
  ref: innerRef,
4454
4454
  className: (0, _classnames.default)("visx-line", className),
4455
4455
  x1: from.x,
@@ -4463,11 +4463,11 @@ function Line(_ref) {
4463
4463
  function getScaleBandwidth(scale) {
4464
4464
  return "bandwidth" in scale ? scale.bandwidth() : 0;
4465
4465
  }
4466
- var _excluded$3 = ["top", "left", "scale", "width", "stroke", "strokeWidth", "strokeDasharray", "className", "children", "numTicks", "lineStyle", "offset", "tickValues"];
4467
- function _extends$6() {
4468
- _extends$6 = Object.assign || function(target) {
4469
- for (var i = 1; i < arguments.length; i++) {
4470
- var source = arguments[i];
4466
+ var _excluded$4 = ["top", "left", "scale", "width", "stroke", "strokeWidth", "strokeDasharray", "className", "children", "numTicks", "lineStyle", "offset", "tickValues"];
4467
+ function _extends$7() {
4468
+ _extends$7 = Object.assign || function(target) {
4469
+ for (var i2 = 1; i2 < arguments.length; i2++) {
4470
+ var source = arguments[i2];
4471
4471
  for (var key in source) {
4472
4472
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4473
4473
  target[key] = source[key];
@@ -4476,16 +4476,16 @@ function _extends$6() {
4476
4476
  }
4477
4477
  return target;
4478
4478
  };
4479
- return _extends$6.apply(this, arguments);
4479
+ return _extends$7.apply(this, arguments);
4480
4480
  }
4481
- function _objectWithoutPropertiesLoose$3(source, excluded) {
4481
+ function _objectWithoutPropertiesLoose$4(source, excluded) {
4482
4482
  if (source == null)
4483
4483
  return {};
4484
4484
  var target = {};
4485
4485
  var sourceKeys = Object.keys(source);
4486
- var key, i;
4487
- for (i = 0; i < sourceKeys.length; i++) {
4488
- key = sourceKeys[i];
4486
+ var key, i2;
4487
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
4488
+ key = sourceKeys[i2];
4489
4489
  if (excluded.indexOf(key) >= 0)
4490
4490
  continue;
4491
4491
  target[key] = source[key];
@@ -4493,7 +4493,7 @@ function _objectWithoutPropertiesLoose$3(source, excluded) {
4493
4493
  return target;
4494
4494
  }
4495
4495
  function GridRows(_ref) {
4496
- var _ref$top = _ref.top, top = _ref$top === void 0 ? 0 : _ref$top, _ref$left = _ref.left, left = _ref$left === void 0 ? 0 : _ref$left, scale = _ref.scale, width = _ref.width, _ref$stroke = _ref.stroke, stroke = _ref$stroke === void 0 ? "#eaf0f6" : _ref$stroke, _ref$strokeWidth = _ref.strokeWidth, strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, strokeDasharray = _ref.strokeDasharray, className = _ref.className, children = _ref.children, _ref$numTicks = _ref.numTicks, numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, lineStyle = _ref.lineStyle, offset = _ref.offset, tickValues = _ref.tickValues, restProps = _objectWithoutPropertiesLoose$3(_ref, _excluded$3);
4496
+ var _ref$top = _ref.top, top = _ref$top === void 0 ? 0 : _ref$top, _ref$left = _ref.left, left = _ref$left === void 0 ? 0 : _ref$left, scale = _ref.scale, width = _ref.width, _ref$stroke = _ref.stroke, stroke = _ref$stroke === void 0 ? "#eaf0f6" : _ref$stroke, _ref$strokeWidth = _ref.strokeWidth, strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, strokeDasharray = _ref.strokeDasharray, className = _ref.className, children = _ref.children, _ref$numTicks = _ref.numTicks, numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, lineStyle = _ref.lineStyle, offset = _ref.offset, tickValues = _ref.tickValues, restProps = _objectWithoutPropertiesLoose$4(_ref, _excluded$4);
4497
4497
  var ticks2 = tickValues != null ? tickValues : getTicks(scale, numTicks);
4498
4498
  var scaleOffset = (offset != null ? offset : 0) + getScaleBandwidth(scale) / 2;
4499
4499
  var tickLines = ticks2.map(function(d) {
@@ -4516,10 +4516,10 @@ function GridRows(_ref) {
4516
4516
  left
4517
4517
  }, children ? children({
4518
4518
  lines: tickLines
4519
- }) : tickLines.map(function(_ref2, i) {
4519
+ }) : tickLines.map(function(_ref2, i2) {
4520
4520
  var from = _ref2.from, to = _ref2.to;
4521
- return /* @__PURE__ */ React__default.createElement(_default, _extends$6({
4522
- key: "row-line-" + i,
4521
+ return /* @__PURE__ */ React__default.createElement(_default, _extends$7({
4522
+ key: "row-line-" + i2,
4523
4523
  from,
4524
4524
  to,
4525
4525
  stroke,
@@ -4533,17 +4533,110 @@ GridRows.propTypes = {
4533
4533
  tickValues: _pt.array,
4534
4534
  width: _pt.number.isRequired
4535
4535
  };
4536
+ var _excluded$3 = ["top", "left", "scale", "height", "stroke", "strokeWidth", "strokeDasharray", "className", "numTicks", "lineStyle", "offset", "tickValues", "children"];
4537
+ function _extends$6() {
4538
+ _extends$6 = Object.assign || function(target) {
4539
+ for (var i2 = 1; i2 < arguments.length; i2++) {
4540
+ var source = arguments[i2];
4541
+ for (var key in source) {
4542
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
4543
+ target[key] = source[key];
4544
+ }
4545
+ }
4546
+ }
4547
+ return target;
4548
+ };
4549
+ return _extends$6.apply(this, arguments);
4550
+ }
4551
+ function _objectWithoutPropertiesLoose$3(source, excluded) {
4552
+ if (source == null)
4553
+ return {};
4554
+ var target = {};
4555
+ var sourceKeys = Object.keys(source);
4556
+ var key, i2;
4557
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
4558
+ key = sourceKeys[i2];
4559
+ if (excluded.indexOf(key) >= 0)
4560
+ continue;
4561
+ target[key] = source[key];
4562
+ }
4563
+ return target;
4564
+ }
4565
+ function GridColumns(_ref) {
4566
+ var _ref$top = _ref.top, top = _ref$top === void 0 ? 0 : _ref$top, _ref$left = _ref.left, left = _ref$left === void 0 ? 0 : _ref$left, scale = _ref.scale, height = _ref.height, _ref$stroke = _ref.stroke, stroke = _ref$stroke === void 0 ? "#eaf0f6" : _ref$stroke, _ref$strokeWidth = _ref.strokeWidth, strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, strokeDasharray = _ref.strokeDasharray, className = _ref.className, _ref$numTicks = _ref.numTicks, numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, lineStyle = _ref.lineStyle, offset = _ref.offset, tickValues = _ref.tickValues, children = _ref.children, restProps = _objectWithoutPropertiesLoose$3(_ref, _excluded$3);
4567
+ var ticks2 = tickValues != null ? tickValues : getTicks(scale, numTicks);
4568
+ var scaleOffset = (offset != null ? offset : 0) + getScaleBandwidth(scale) / 2;
4569
+ var tickLines = ticks2.map(function(d) {
4570
+ var _coerceNumber;
4571
+ var x = ((_coerceNumber = coerceNumber(scale(d))) != null ? _coerceNumber : 0) + scaleOffset;
4572
+ return {
4573
+ from: new Point({
4574
+ x,
4575
+ y: 0
4576
+ }),
4577
+ to: new Point({
4578
+ x,
4579
+ y: height
4580
+ })
4581
+ };
4582
+ });
4583
+ return /* @__PURE__ */ React__default.createElement(Group, {
4584
+ className: cx("visx-columns", className),
4585
+ top,
4586
+ left
4587
+ }, children ? children({
4588
+ lines: tickLines
4589
+ }) : tickLines.map(function(_ref2, i2) {
4590
+ var from = _ref2.from, to = _ref2.to;
4591
+ return /* @__PURE__ */ React__default.createElement(_default, _extends$6({
4592
+ key: "column-line-" + i2,
4593
+ from,
4594
+ to,
4595
+ stroke,
4596
+ strokeWidth,
4597
+ strokeDasharray,
4598
+ style: lineStyle
4599
+ }, restProps));
4600
+ }));
4601
+ }
4602
+ GridColumns.propTypes = {
4603
+ tickValues: _pt.array,
4604
+ height: _pt.number.isRequired
4605
+ };
4606
+ var crypto = self.crypto || self.msCrypto;
4607
+ var url = "-_";
4608
+ var i = 36;
4609
+ while (i--) {
4610
+ url += i.toString(36);
4611
+ }
4612
+ i = 36;
4613
+ while (i-- - 10) {
4614
+ url += i.toString(36).toUpperCase();
4615
+ }
4616
+ var index_browser = function(size) {
4617
+ var id = "";
4618
+ var bytes = crypto.getRandomValues(new Uint8Array(size || 21));
4619
+ i = size || 21;
4620
+ while (i--) {
4621
+ id += url[bytes[i] & 63];
4622
+ }
4623
+ return id;
4624
+ };
4625
+ var nanoid = index_browser;
4626
+ function fun() {
4627
+ return propTypes$3.exports.func;
4628
+ }
4536
4629
  function impl() {
4537
- return propTypes$2.exports.object;
4630
+ return propTypes$3.exports.object;
4538
4631
  }
4539
- propTypes$2.exports.oneOfType([propTypes$2.exports.node, propTypes$2.exports.func]);
4632
+ propTypes$3.exports.oneOfType([propTypes$3.exports.node, propTypes$3.exports.func]);
4540
4633
  const spsGlobalPropTypes = {
4541
- children: propTypes$2.exports.oneOfType([propTypes$2.exports.arrayOf(propTypes$2.exports.node), propTypes$2.exports.node]),
4542
- className: propTypes$2.exports.string,
4543
- "data-testid": propTypes$2.exports.string,
4544
- unsafelyReplaceClassName: propTypes$2.exports.string
4634
+ children: propTypes$3.exports.oneOfType([propTypes$3.exports.arrayOf(propTypes$3.exports.node), propTypes$3.exports.node]),
4635
+ className: propTypes$3.exports.string,
4636
+ "data-testid": propTypes$3.exports.string,
4637
+ unsafelyReplaceClassName: propTypes$3.exports.string
4545
4638
  };
4546
- const propsDoc$1 = {
4639
+ const propsDoc$2 = {
4547
4640
  barFillColor1: "string",
4548
4641
  barFillColor2: "string",
4549
4642
  barFillColorHover: "string",
@@ -4552,18 +4645,22 @@ const propsDoc$1 = {
4552
4645
  chartWidth: "number",
4553
4646
  barSize: "number",
4554
4647
  yAxis: "ChartAxis",
4555
- xAxis: "ChartAxis"
4648
+ xAxis: "ChartAxis",
4649
+ yMaxValue: "number",
4650
+ yTickFormat: "(i: number) => string"
4556
4651
  };
4557
- const propTypes$1 = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
4558
- barFillColor1: propTypes$2.exports.string,
4559
- barFillColor2: propTypes$2.exports.string,
4560
- barFillColorHover: propTypes$2.exports.string,
4561
- chartData: propTypes$2.exports.arrayOf(impl()),
4562
- chartHeight: propTypes$2.exports.number,
4563
- chartWidth: propTypes$2.exports.number,
4564
- barSize: propTypes$2.exports.number,
4652
+ const propTypes$2 = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
4653
+ barFillColor1: propTypes$3.exports.string,
4654
+ barFillColor2: propTypes$3.exports.string,
4655
+ barFillColorHover: propTypes$3.exports.string,
4656
+ chartData: propTypes$3.exports.arrayOf(impl()),
4657
+ chartHeight: propTypes$3.exports.number,
4658
+ chartWidth: propTypes$3.exports.number,
4659
+ barSize: propTypes$3.exports.number,
4565
4660
  yAxis: impl(),
4566
- xAxis: impl()
4661
+ xAxis: impl(),
4662
+ yMaxValue: propTypes$3.exports.number,
4663
+ yTickFormat: fun()
4567
4664
  });
4568
4665
  function SpsBarChart(props) {
4569
4666
  const {
@@ -4580,12 +4677,14 @@ function SpsBarChart(props) {
4580
4677
  },
4581
4678
  xAxis = {
4582
4679
  tickValues: "label"
4583
- }
4680
+ },
4681
+ yMaxValue,
4682
+ yTickFormat
4584
4683
  } = props;
4585
4684
  const margin = {
4586
4685
  top: 30,
4587
- bottom: 30,
4588
- left: 30,
4686
+ bottom: 70,
4687
+ left: 50,
4589
4688
  right: 30
4590
4689
  };
4591
4690
  const xMax = chartWidth - margin.left - margin.right;
@@ -4601,14 +4700,16 @@ function SpsBarChart(props) {
4601
4700
  const yScale = createLinearScale({
4602
4701
  range: [yMax, 0],
4603
4702
  round: true,
4604
- domain: [0, Math.max(...chartData.map(y))]
4703
+ domain: [0, yMaxValue || Math.max(...chartData.map(y))]
4605
4704
  });
4606
4705
  const compose = (scale, accessor) => (data) => scale(accessor(data));
4607
4706
  const xPoint = compose(xScale, x);
4608
4707
  const yPoint = compose(yScale, y);
4708
+ const colorGradientID = nanoid();
4609
4709
  return /* @__PURE__ */ React.createElement("svg", {
4610
4710
  width: chartWidth,
4611
- height: chartHeight
4711
+ height: chartHeight,
4712
+ className: "sps-chart-wrapper"
4612
4713
  }, /* @__PURE__ */ React.createElement(GridRows, {
4613
4714
  scale: yScale,
4614
4715
  left: margin.left,
@@ -4616,23 +4717,24 @@ function SpsBarChart(props) {
4616
4717
  numTicks: yAxis.tickCount,
4617
4718
  stroke: DSColors.colors.gray400,
4618
4719
  strokeOpacity: 0.2
4720
+ }), /* @__PURE__ */ React.createElement(LinearGradient, {
4721
+ id: colorGradientID,
4722
+ from: barFillColor1,
4723
+ to: barFillColor2
4619
4724
  }), chartData.map((element, idx) => {
4620
4725
  const barHeight = yMax - yPoint(element);
4726
+ const barID = nanoid();
4621
4727
  return /* @__PURE__ */ React.createElement(Group, {
4622
4728
  key: idx
4623
- }, /* @__PURE__ */ React.createElement(LinearGradient, {
4624
- id: "gradient",
4625
- from: barFillColor1,
4626
- to: barFillColor2
4627
- }), /* @__PURE__ */ React.createElement(BarRounded, {
4628
- id: element.label,
4729
+ }, /* @__PURE__ */ React.createElement(BarRounded, {
4730
+ id: barID,
4629
4731
  top: true,
4630
4732
  radius: 4,
4631
- x: xPoint(element),
4733
+ x: xPoint(element) + margin.left + (barSize ? (xScale.bandwidth() - barSize) / 2 : 0),
4632
4734
  y: yMax - barHeight,
4633
4735
  height: barHeight,
4634
4736
  width: barSize || xScale.bandwidth(),
4635
- fill: "url(#gradient)",
4737
+ fill: `url(#${colorGradientID})`,
4636
4738
  onMouseEnter: (e) => {
4637
4739
  const targetElement = e.target;
4638
4740
  targetElement.style.fill = barFillColorHover;
@@ -4646,6 +4748,7 @@ function SpsBarChart(props) {
4646
4748
  left: margin.left,
4647
4749
  hideTicks: true,
4648
4750
  numTicks: yAxis.tickCount,
4751
+ tickFormat: yTickFormat || void 0,
4649
4752
  stroke: DSColors.colors.gray300,
4650
4753
  tickLabelProps: () => ({
4651
4754
  textAnchor: "end",
@@ -4656,6 +4759,7 @@ function SpsBarChart(props) {
4656
4759
  }), /* @__PURE__ */ React.createElement(AxisBottom, {
4657
4760
  top: yMax,
4658
4761
  scale: xScale,
4762
+ left: margin.left,
4659
4763
  hideTicks: true,
4660
4764
  hideAxisLine: true,
4661
4765
  stroke: DSColors.colors.gray300,
@@ -4663,48 +4767,117 @@ function SpsBarChart(props) {
4663
4767
  textAnchor: "middle",
4664
4768
  fontSize: "12px",
4665
4769
  fontWeight: "200",
4666
- fill: DSColors.colors.gray400
4770
+ fill: DSColors.colors.gray400,
4771
+ width: xScale.bandwidth() + xScale.bandwidth() / 2,
4772
+ lineHeight: "15px",
4773
+ verticalAnchor: "start"
4667
4774
  })
4668
4775
  }), /* @__PURE__ */ React.createElement(SpsTooltip, {
4669
- for: element.label
4776
+ for: barID
4670
4777
  }, element.label));
4671
4778
  }));
4672
4779
  }
4673
4780
  Object.assign(SpsBarChart, {
4674
- props: propsDoc$1,
4675
- propTypes: propTypes$1,
4781
+ props: propsDoc$2,
4782
+ propTypes: propTypes$2,
4676
4783
  displayName: "SpsBarChart"
4677
4784
  });
4678
4785
  const SpsBarChartExamples = {
4679
- vertical: {
4680
- label: "Vertical",
4786
+ general: {
4787
+ label: "General Usage",
4788
+ description: ({ NavigateTo, Link }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", null, "Use Bar Charts to visualize the comparison of a dataset across multiple categories or subjects. When using bar charts, the dataset should attempt to provide a clear answer to a clear question (i.e. avoid comparing multiple or unrelated datasets in a single chart)."), /* @__PURE__ */ React.createElement("p", null, "Bar Charts should not be used when the visualization of the data is too complex or the number of categories too numerous to be easily understood at a glance. In these cases consider the use of more general lists of content such as a", " ", /* @__PURE__ */ React.createElement(NavigateTo, {
4789
+ to: "Tables"
4790
+ }, "Table"), "."), /* @__PURE__ */ React.createElement("h5", null, "Color"), /* @__PURE__ */ React.createElement("p", null, "The number of colors used should be directly related to the number of comparisons being made. When comparing categories across a single data set, only one color should be used. When comparing multiple categories across multiple series of data, use the appropriate number of colors to the number of categories. For more details on color usage visit the", " ", /* @__PURE__ */ React.createElement(Link, {
4791
+ to: "/style-and-layout/colors"
4792
+ }, "Colors"), " section."), /* @__PURE__ */ React.createElement("h5", null, "Interaction"), /* @__PURE__ */ React.createElement("p", null, "Charts should include interactivity on hover to give users insight to specifics of the data. Tooltips can be used to display expanded definitions or additional related data points for the selected category."))
4793
+ },
4794
+ horizontal: {
4795
+ label: "Horizontal Bar Chart",
4681
4796
  description: code`
4682
- <p>Vertical bar chart example.</p>
4797
+ <p>In Horizontal Bar Charts categories are listed vertically on the Y-axis and with data points are plotted horizontally on the X-axis.</p>
4683
4798
  `,
4684
4799
  examples: {
4685
4800
  vertical: {
4686
4801
  react: code`
4687
4802
  function DemoComponent() {
4688
4803
  const data = [
4689
- { value: 5, label: "Company 1" },
4690
- { value: 12, label: "Company 2" },
4691
- { value: 21, label: "Company 3" },
4692
- { value: 25, label: "Company 4" },
4693
- { value: 20, label: "Company 5" },
4694
- ];
4804
+ { value: 69, label: "Aktie Sports" },
4805
+ { value: 69, label: "Dicks Sporting Goods" },
4806
+ { value: 64, label: "FGL Sports" },
4807
+ { value: 62, label: "Foot Asylum" },
4808
+ { value: 55, label: "Hervis" },
4809
+ { value: 51, label: "Lovell Rugby" },
4810
+ { value: 48, label: "Modells Sporting Goods" },
4811
+ { value: 44, label: "Perry Sport" },
4812
+ { value: 44, label: "Sportman Warhouse Australia" },
4813
+ { value: 44, label: "Perry Sport 2" },
4814
+ ]
4815
+
4816
+ xTickFormat = (i) => \`\${i}\${i !== 0 ? "%" : ""}\`
4817
+
4818
+ return (
4819
+ <SpsHorizontalBarChart
4820
+ chartData={data}
4821
+ chartHeight={523}
4822
+ chartWidth={838}
4823
+ barFillColor1 = "#32BE6F"
4824
+ barFillColor2 = "#32BE6F80"
4825
+ barFillColorHover = "#289858"
4826
+ yAxis={{
4827
+ tickValues: 'label',
4828
+ }}
4829
+ xAxis={{
4830
+ tickValues: 'value',
4831
+ tickCount: '10'
4832
+ }}
4833
+ marginLeft={135}
4834
+ xMaxValue={100}
4835
+ barSize={20}
4836
+ xTickFormat={xTickFormat}
4837
+ />
4838
+ )
4839
+ }
4840
+ `
4841
+ }
4842
+ }
4843
+ },
4844
+ vertical: {
4845
+ label: "Vertical Bar Chart",
4846
+ description: code`
4847
+ <p>In Vertical Bar Charts data points are plotted vertically on the Y-axis and with categories being listed horizontally on the X-axis.</p>
4848
+ <p>If the categories become too crowded along the X-axis, opt for a Horizontal Bar Chart instead.</p>
4849
+ `,
4850
+ examples: {
4851
+ vertical: {
4852
+ react: code`
4853
+ function DemoComponent() {
4854
+ const data = [
4855
+ { value: 112, label: "Aktie Sports" },
4856
+ { value: 100, label: "Dicks Sporting Goods" },
4857
+ { value: 90, label: "FGL Sports" },
4858
+ { value: 82, label: "Foot Asylum" },
4859
+ { value: 76, label: "Hervis" },
4860
+ { value: 64, label: "Lovell Rugby" },
4861
+ { value: 64, label: "Modells Sporting Goods" },
4862
+ ]
4695
4863
 
4696
4864
  return (
4697
4865
  <SpsBarChart
4698
4866
  chartData={data}
4699
- chartHeight={400}
4700
- chartWidth={800}
4867
+ chartHeight={364}
4868
+ chartWidth={838}
4869
+ barFillColor1 = "#9B4B87"
4870
+ barFillColor2 = "#9B4B8780"
4871
+ barFillColorHover = "#7C3C6C"
4701
4872
  yAxis={{
4702
4873
  tickValues: 'value',
4703
- tickCount: '3',
4874
+ tickCount: '5',
4704
4875
  }}
4705
4876
  xAxis={{
4706
4877
  tickValues: 'label',
4707
4878
  }}
4879
+ yMaxValue={125}
4880
+ barSize={45}
4708
4881
  />
4709
4882
  )
4710
4883
  }
@@ -4713,11 +4886,171 @@ const SpsBarChartExamples = {
4713
4886
  }
4714
4887
  }
4715
4888
  };
4889
+ const propsDoc$1 = {
4890
+ barFillColor1: "string",
4891
+ barFillColor2: "string",
4892
+ barFillColorHover: "string",
4893
+ chartData: "ChartDataObject[]",
4894
+ chartHeight: "number",
4895
+ chartWidth: "number",
4896
+ barSize: "number",
4897
+ yAxis: "ChartAxis",
4898
+ xAxis: "ChartAxis",
4899
+ marginLeft: "number",
4900
+ xMaxValue: "number",
4901
+ xTickFormat: "(i: number) => string"
4902
+ };
4903
+ const propTypes$1 = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
4904
+ barFillColor1: propTypes$3.exports.string,
4905
+ barFillColor2: propTypes$3.exports.string,
4906
+ barFillColorHover: propTypes$3.exports.string,
4907
+ chartData: propTypes$3.exports.arrayOf(impl()),
4908
+ chartHeight: propTypes$3.exports.number,
4909
+ chartWidth: propTypes$3.exports.number,
4910
+ barSize: propTypes$3.exports.number,
4911
+ yAxis: impl(),
4912
+ xAxis: impl(),
4913
+ marginLeft: propTypes$3.exports.number,
4914
+ xMaxValue: propTypes$3.exports.number,
4915
+ xTickFormat: fun()
4916
+ });
4917
+ function SpsHorizontalBarChart(props) {
4918
+ const {
4919
+ barFillColor1 = DSColors.colors.blue200,
4920
+ barFillColor2 = "#007DB880",
4921
+ barFillColorHover = DSColors.colors.blue300,
4922
+ chartData,
4923
+ chartHeight,
4924
+ chartWidth,
4925
+ barSize,
4926
+ yAxis = {
4927
+ tickValues: "label"
4928
+ },
4929
+ xAxis = {
4930
+ tickValues: "value",
4931
+ tickCount: 3
4932
+ },
4933
+ marginLeft = 30,
4934
+ xMaxValue,
4935
+ xTickFormat
4936
+ } = props;
4937
+ const margin = {
4938
+ top: 30,
4939
+ bottom: 30,
4940
+ left: marginLeft,
4941
+ right: 30
4942
+ };
4943
+ const xMax = chartWidth - margin.left - margin.right;
4944
+ const yMax = chartHeight - margin.top - margin.bottom;
4945
+ const x = (d) => d[xAxis.tickValues];
4946
+ const y = (d) => d[yAxis.tickValues];
4947
+ const yScale = createBandScale({
4948
+ range: [0, yMax],
4949
+ round: true,
4950
+ domain: chartData.map(y),
4951
+ padding: 0.4
4952
+ });
4953
+ const xScale = createLinearScale({
4954
+ range: [0, xMax],
4955
+ round: true,
4956
+ domain: [0, xMaxValue || Math.max(...chartData.map(x))]
4957
+ });
4958
+ const compose = (scale, accessor) => (data) => scale(accessor(data));
4959
+ const xPoint = compose(xScale, x);
4960
+ const yPoint = compose(yScale, y);
4961
+ const colorGradientID = nanoid();
4962
+ const bgColorGradientID = nanoid();
4963
+ return /* @__PURE__ */ React.createElement("svg", {
4964
+ width: chartWidth,
4965
+ height: chartHeight,
4966
+ className: "sps-chart-wrapper"
4967
+ }, /* @__PURE__ */ React.createElement(GridColumns, {
4968
+ scale: xScale,
4969
+ left: margin.left,
4970
+ height: yMax,
4971
+ stroke: DSColors.colors.gray400,
4972
+ strokeOpacity: 0.2
4973
+ }), /* @__PURE__ */ React.createElement(LinearGradient, {
4974
+ id: bgColorGradientID,
4975
+ from: "#D2D4D580",
4976
+ to: "#D2D4D5",
4977
+ vertical: false
4978
+ }), /* @__PURE__ */ React.createElement(LinearGradient, {
4979
+ id: colorGradientID,
4980
+ from: barFillColor2,
4981
+ to: barFillColor1,
4982
+ vertical: false
4983
+ }), chartData.map((element, idx) => {
4984
+ const barWidth = xPoint(element);
4985
+ const barID = nanoid();
4986
+ return /* @__PURE__ */ React.createElement(Group, {
4987
+ key: idx
4988
+ }, /* @__PURE__ */ React.createElement("rect", {
4989
+ x: margin.left,
4990
+ y: yPoint(element) + (barSize ? (yScale.bandwidth() - barSize) / 2 : 0),
4991
+ height: barSize || yScale.bandwidth(),
4992
+ width: xMax,
4993
+ fill: `url(#${bgColorGradientID})`
4994
+ }), /* @__PURE__ */ React.createElement(BarRounded, {
4995
+ id: barID,
4996
+ right: true,
4997
+ radius: 4,
4998
+ x: margin.left,
4999
+ y: yPoint(element) + (barSize ? (yScale.bandwidth() - barSize) / 2 : 0),
5000
+ height: barSize || yScale.bandwidth(),
5001
+ width: barWidth,
5002
+ fill: `url(#${colorGradientID})`,
5003
+ onMouseEnter: (e) => {
5004
+ const targetElement = e.target;
5005
+ targetElement.style.fill = barFillColorHover;
5006
+ },
5007
+ onMouseLeave: (e) => {
5008
+ const targetElement = e.target;
5009
+ targetElement.style.fill = null;
5010
+ }
5011
+ }), /* @__PURE__ */ React.createElement(AxisLeft, {
5012
+ scale: yScale,
5013
+ left: margin.left,
5014
+ hideTicks: true,
5015
+ hideAxisLine: true,
5016
+ stroke: DSColors.colors.gray300,
5017
+ tickLabelProps: () => ({
5018
+ textAnchor: "end",
5019
+ fontSize: "12px",
5020
+ fill: DSColors.colors.gray400,
5021
+ fontWeight: "200",
5022
+ width: margin.left,
5023
+ verticalAnchor: "middle"
5024
+ })
5025
+ }), /* @__PURE__ */ React.createElement(AxisBottom, {
5026
+ top: yMax,
5027
+ scale: xScale,
5028
+ left: margin.left,
5029
+ hideTicks: true,
5030
+ numTicks: xAxis.tickCount,
5031
+ tickFormat: xTickFormat || void 0,
5032
+ stroke: DSColors.colors.gray300,
5033
+ tickLabelProps: () => ({
5034
+ textAnchor: "middle",
5035
+ fontSize: "12px",
5036
+ fontWeight: "200",
5037
+ fill: DSColors.colors.gray400
5038
+ })
5039
+ }), /* @__PURE__ */ React.createElement(SpsTooltip, {
5040
+ for: barID
5041
+ }, element.label));
5042
+ }));
5043
+ }
5044
+ Object.assign(SpsHorizontalBarChart, {
5045
+ props: propsDoc$1,
5046
+ propTypes: propTypes$1,
5047
+ displayName: "SpsHorizontalBarChart"
5048
+ });
4716
5049
  var _excluded$2 = ["flexDirection", "alignItems", "margin", "display", "children"];
4717
5050
  function _extends$5() {
4718
5051
  _extends$5 = Object.assign || function(target) {
4719
- for (var i = 1; i < arguments.length; i++) {
4720
- var source = arguments[i];
5052
+ for (var i2 = 1; i2 < arguments.length; i2++) {
5053
+ var source = arguments[i2];
4721
5054
  for (var key in source) {
4722
5055
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4723
5056
  target[key] = source[key];
@@ -4733,9 +5066,9 @@ function _objectWithoutPropertiesLoose$2(source, excluded) {
4733
5066
  return {};
4734
5067
  var target = {};
4735
5068
  var sourceKeys = Object.keys(source);
4736
- var key, i;
4737
- for (i = 0; i < sourceKeys.length; i++) {
4738
- key = sourceKeys[i];
5069
+ var key, i2;
5070
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
5071
+ key = sourceKeys[i2];
4739
5072
  if (excluded.indexOf(key) >= 0)
4740
5073
  continue;
4741
5074
  target[key] = source[key];
@@ -4763,8 +5096,8 @@ LegendItem.propTypes = {
4763
5096
  var _excluded$1 = ["flex", "label", "margin", "align", "children"];
4764
5097
  function _extends$4() {
4765
5098
  _extends$4 = Object.assign || function(target) {
4766
- for (var i = 1; i < arguments.length; i++) {
4767
- var source = arguments[i];
5099
+ for (var i2 = 1; i2 < arguments.length; i2++) {
5100
+ var source = arguments[i2];
4768
5101
  for (var key in source) {
4769
5102
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4770
5103
  target[key] = source[key];
@@ -4780,9 +5113,9 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
4780
5113
  return {};
4781
5114
  var target = {};
4782
5115
  var sourceKeys = Object.keys(source);
4783
- var key, i;
4784
- for (i = 0; i < sourceKeys.length; i++) {
4785
- key = sourceKeys[i];
5116
+ var key, i2;
5117
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
5118
+ key = sourceKeys[i2];
4786
5119
  if (excluded.indexOf(key) >= 0)
4787
5120
  continue;
4788
5121
  target[key] = source[key];
@@ -4810,8 +5143,8 @@ LegendLabel.propTypes = {
4810
5143
  };
4811
5144
  function _extends$3() {
4812
5145
  _extends$3 = Object.assign || function(target) {
4813
- for (var i = 1; i < arguments.length; i++) {
4814
- var source = arguments[i];
5146
+ for (var i2 = 1; i2 < arguments.length; i2++) {
5147
+ var source = arguments[i2];
4815
5148
  for (var key in source) {
4816
5149
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4817
5150
  target[key] = source[key];
@@ -4886,8 +5219,8 @@ ShapeLine.propTypes = {
4886
5219
  };
4887
5220
  function _extends$2() {
4888
5221
  _extends$2 = Object.assign || function(target) {
4889
- for (var i = 1; i < arguments.length; i++) {
4890
- var source = arguments[i];
5222
+ for (var i2 = 1; i2 < arguments.length; i2++) {
5223
+ var source = arguments[i2];
4891
5224
  for (var key in source) {
4892
5225
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4893
5226
  target[key] = source[key];
@@ -4932,8 +5265,8 @@ function renderShape(_ref) {
4932
5265
  }
4933
5266
  function _extends$1() {
4934
5267
  _extends$1 = Object.assign || function(target) {
4935
- for (var i = 1; i < arguments.length; i++) {
4936
- var source = arguments[i];
5268
+ for (var i2 = 1; i2 < arguments.length; i2++) {
5269
+ var source = arguments[i2];
4937
5270
  for (var key in source) {
4938
5271
  if (Object.prototype.hasOwnProperty.call(source, key)) {
4939
5272
  target[key] = source[key];
@@ -4981,11 +5314,11 @@ function valueOrIdentityString(_) {
4981
5314
  }
4982
5315
  function labelTransformFactory(_ref) {
4983
5316
  var scale = _ref.scale, labelFormat = _ref.labelFormat;
4984
- return function(d, i) {
5317
+ return function(d, i2) {
4985
5318
  return {
4986
5319
  datum: d,
4987
- index: i,
4988
- text: "" + labelFormat(d, i),
5320
+ index: i2,
5321
+ text: "" + labelFormat(d, i2),
4989
5322
  value: scale(d)
4990
5323
  };
4991
5324
  };
@@ -4993,8 +5326,8 @@ function labelTransformFactory(_ref) {
4993
5326
  var _excluded = ["className", "style", "scale", "shape", "domain", "fill", "size", "labelFormat", "labelTransform", "shapeWidth", "shapeHeight", "shapeMargin", "shapeStyle", "labelAlign", "labelFlex", "labelMargin", "itemMargin", "direction", "itemDirection", "legendLabelProps", "children"];
4994
5327
  function _extends() {
4995
5328
  _extends = Object.assign || function(target) {
4996
- for (var i = 1; i < arguments.length; i++) {
4997
- var source = arguments[i];
5329
+ for (var i2 = 1; i2 < arguments.length; i2++) {
5330
+ var source = arguments[i2];
4998
5331
  for (var key in source) {
4999
5332
  if (Object.prototype.hasOwnProperty.call(source, key)) {
5000
5333
  target[key] = source[key];
@@ -5010,9 +5343,9 @@ function _objectWithoutPropertiesLoose(source, excluded) {
5010
5343
  return {};
5011
5344
  var target = {};
5012
5345
  var sourceKeys = Object.keys(source);
5013
- var key, i;
5014
- for (i = 0; i < sourceKeys.length; i++) {
5015
- key = sourceKeys[i];
5346
+ var key, i2;
5347
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
5348
+ key = sourceKeys[i2];
5016
5349
  if (excluded.indexOf(key) >= 0)
5017
5350
  continue;
5018
5351
  target[key] = source[key];
@@ -5037,9 +5370,9 @@ function Legend(_ref) {
5037
5370
  style: _extends({}, style, {
5038
5371
  flexDirection: direction
5039
5372
  })
5040
- }, labels.map(function(label, i) {
5373
+ }, labels.map(function(label, i2) {
5041
5374
  return /* @__PURE__ */ React__default.createElement(LegendItem, _extends({
5042
- key: "legend-" + label.text + "-" + i,
5375
+ key: "legend-" + label.text + "-" + i2,
5043
5376
  margin: itemMargin,
5044
5377
  flexDirection: itemDirection
5045
5378
  }, legendItemProps), /* @__PURE__ */ React__default.createElement(LegendShape, {
@@ -5047,8 +5380,8 @@ function Legend(_ref) {
5047
5380
  height: shapeHeight,
5048
5381
  width: shapeWidth,
5049
5382
  margin: shapeMargin,
5050
- item: domain[i],
5051
- itemIndex: i,
5383
+ item: domain[i2],
5384
+ itemIndex: i2,
5052
5385
  label,
5053
5386
  fill,
5054
5387
  size,
@@ -5088,12 +5421,12 @@ const propsDoc = {
5088
5421
  total: "number"
5089
5422
  };
5090
5423
  const propTypes = {
5091
- chartData: propTypes$2.exports.arrayOf(impl()),
5092
- chartHeight: propTypes$2.exports.number,
5093
- chartWidth: propTypes$2.exports.number,
5094
- target: propTypes$2.exports.number,
5095
- goal: propTypes$2.exports.number,
5096
- total: propTypes$2.exports.number
5424
+ chartData: propTypes$3.exports.arrayOf(impl()),
5425
+ chartHeight: propTypes$3.exports.number,
5426
+ chartWidth: propTypes$3.exports.number,
5427
+ target: propTypes$3.exports.number,
5428
+ goal: propTypes$3.exports.number,
5429
+ total: propTypes$3.exports.number
5097
5430
  };
5098
5431
  function SpsStackedHorizontalBarChart(props) {
5099
5432
  const {
@@ -5138,7 +5471,7 @@ function SpsStackedHorizontalBarChart(props) {
5138
5471
  const yMax = chartHeight - margin.top - margin.bottom;
5139
5472
  xScale.rangeRound([0, xMax]);
5140
5473
  yScale.rangeRound([yMax, 0]);
5141
- const tickFormat2 = (i) => `${i}%`;
5474
+ const tickFormat2 = (i2) => `${i2}%`;
5142
5475
  return /* @__PURE__ */ React.createElement("div", {
5143
5476
  style: { width: chartWidth },
5144
5477
  className: "position-relative"
@@ -5309,7 +5642,8 @@ const SpsStackedHorizontalBarChartExamples = {
5309
5642
  };
5310
5643
  const MANIFEST = {
5311
5644
  "Bar Chart": {
5312
- components: [SpsBarChart],
5645
+ description: () => /* @__PURE__ */ React.createElement("p", null, "Bar Charts are a data visualization used to compare sets of data to more easily analyze questions or identify gaps oriented toward user goals. ", /* @__PURE__ */ React.createElement("br", null), "Each chart should focus on answering a single question about the dataset."),
5646
+ components: [SpsBarChart, SpsHorizontalBarChart],
5313
5647
  examples: SpsBarChartExamples
5314
5648
  },
5315
5649
  "Stacked Horizontal Bar Chart": {
@@ -5317,4 +5651,4 @@ const MANIFEST = {
5317
5651
  examples: SpsStackedHorizontalBarChartExamples
5318
5652
  }
5319
5653
  };
5320
- export { MANIFEST, SpsBarChart, SpsBarChartExamples, SpsStackedHorizontalBarChart, SpsStackedHorizontalBarChartExamples };
5654
+ export { MANIFEST, SpsBarChart, SpsBarChartExamples, SpsHorizontalBarChart, SpsStackedHorizontalBarChart, SpsStackedHorizontalBarChartExamples };