waffle-chart
Version:
824 lines (820 loc) • 26.4 kB
JavaScript
import ze from "react";
var me = { exports: {} }, H = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var $e;
function hr() {
if ($e)
return H;
$e = 1;
var n = ze, i = Symbol.for("react.element"), o = Symbol.for("react.fragment"), d = Object.prototype.hasOwnProperty, g = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
function _(h, l, m) {
var y, s = {}, v = null, C = null;
m !== void 0 && (v = "" + m), l.key !== void 0 && (v = "" + l.key), l.ref !== void 0 && (C = l.ref);
for (y in l)
d.call(l, y) && !b.hasOwnProperty(y) && (s[y] = l[y]);
if (h && h.defaultProps)
for (y in l = h.defaultProps, l)
s[y] === void 0 && (s[y] = l[y]);
return { $$typeof: i, type: h, key: v, ref: C, props: s, _owner: g.current };
}
return H.Fragment = o, H.jsx = _, H.jsxs = _, H;
}
var I = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var We;
function yr() {
return We || (We = 1, process.env.NODE_ENV !== "production" && function() {
var n = ze, i = Symbol.for("react.element"), o = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), h = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), s = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), j = Symbol.iterator, M = "@@iterator";
function L(e) {
if (e === null || typeof e != "object")
return null;
var r = j && e[j] || e[M];
return typeof r == "function" ? r : null;
}
var x = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function T(e) {
{
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
t[a - 1] = arguments[a];
Y("error", e, t);
}
}
function Y(e, r, t) {
{
var a = x.ReactDebugCurrentFrame, f = a.getStackAddendum();
f !== "" && (r += "%s", t = t.concat([f]));
var p = t.map(function(u) {
return String(u);
});
p.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, p);
}
}
var ce = !1, ue = !1, le = !1, fe = !1, J = !1, q;
q = Symbol.for("react.module.reference");
function K(e) {
return !!(typeof e == "string" || typeof e == "function" || e === d || e === b || J || e === g || e === m || e === y || fe || e === C || ce || ue || le || typeof e == "object" && e !== null && (e.$$typeof === v || e.$$typeof === s || e.$$typeof === _ || e.$$typeof === h || e.$$typeof === l || e.$$typeof === q || e.getModuleId !== void 0));
}
function X(e, r, t) {
var a = e.displayName;
if (a)
return a;
var f = r.displayName || r.name || "";
return f !== "" ? t + "(" + f + ")" : t;
}
function Z(e) {
return e.displayName || "Context";
}
function w(e) {
if (e == null)
return null;
if (typeof e.tag == "number" && T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
return e.displayName || e.name || null;
if (typeof e == "string")
return e;
switch (e) {
case d:
return "Fragment";
case o:
return "Portal";
case b:
return "Profiler";
case g:
return "StrictMode";
case m:
return "Suspense";
case y:
return "SuspenseList";
}
if (typeof e == "object")
switch (e.$$typeof) {
case h:
var r = e;
return Z(r) + ".Consumer";
case _:
var t = e;
return Z(t._context) + ".Provider";
case l:
return X(e, e.render, "ForwardRef");
case s:
var a = e.displayName || null;
return a !== null ? a : w(e.type) || "Memo";
case v: {
var f = e, p = f._payload, u = f._init;
try {
return w(u(p));
} catch {
return null;
}
}
}
return null;
}
var k = Object.assign, D = 0, V, U, B, de, N, z, Q;
function ee() {
}
ee.__reactDisabledLog = !0;
function ve() {
{
if (D === 0) {
V = console.log, U = console.info, B = console.warn, de = console.error, N = console.group, z = console.groupCollapsed, Q = console.groupEnd;
var e = {
configurable: !0,
enumerable: !0,
value: ee,
writable: !0
};
Object.defineProperties(console, {
info: e,
log: e,
warn: e,
error: e,
group: e,
groupCollapsed: e,
groupEnd: e
});
}
D++;
}
}
function pe() {
{
if (D--, D === 0) {
var e = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: k({}, e, {
value: V
}),
info: k({}, e, {
value: U
}),
warn: k({}, e, {
value: B
}),
error: k({}, e, {
value: de
}),
group: k({}, e, {
value: N
}),
groupCollapsed: k({}, e, {
value: z
}),
groupEnd: k({}, e, {
value: Q
})
});
}
D < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var P = x.ReactCurrentDispatcher, he;
function re(e, r, t) {
{
if (he === void 0)
try {
throw Error();
} catch (f) {
var a = f.stack.trim().match(/\n( *(at )?)/);
he = a && a[1] || "";
}
return `
` + he + e;
}
}
var ye = !1, te;
{
var Ge = typeof WeakMap == "function" ? WeakMap : Map;
te = new Ge();
}
function Te(e, r) {
if (!e || ye)
return "";
{
var t = te.get(e);
if (t !== void 0)
return t;
}
var a;
ye = !0;
var f = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var p;
p = P.current, P.current = null, ve();
try {
if (r) {
var u = function() {
throw Error();
};
if (Object.defineProperty(u.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(u, []);
} catch (A) {
a = A;
}
Reflect.construct(e, [], u);
} else {
try {
u.call();
} catch (A) {
a = A;
}
e.call(u.prototype);
}
} else {
try {
throw Error();
} catch (A) {
a = A;
}
e();
}
} catch (A) {
if (A && a && typeof A.stack == "string") {
for (var c = A.stack.split(`
`), O = a.stack.split(`
`), E = c.length - 1, R = O.length - 1; E >= 1 && R >= 0 && c[E] !== O[R]; )
R--;
for (; E >= 1 && R >= 0; E--, R--)
if (c[E] !== O[R]) {
if (E !== 1 || R !== 1)
do
if (E--, R--, R < 0 || c[E] !== O[R]) {
var S = `
` + c[E].replace(" at new ", " at ");
return e.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", e.displayName)), typeof e == "function" && te.set(e, S), S;
}
while (E >= 1 && R >= 0);
break;
}
}
} finally {
ye = !1, P.current = p, pe(), Error.prepareStackTrace = f;
}
var W = e ? e.displayName || e.name : "", Me = W ? re(W) : "";
return typeof e == "function" && te.set(e, Me), Me;
}
function He(e, r, t) {
return Te(e, !1);
}
function Ie(e) {
var r = e.prototype;
return !!(r && r.isReactComponent);
}
function ne(e, r, t) {
if (e == null)
return "";
if (typeof e == "function")
return Te(e, Ie(e));
if (typeof e == "string")
return re(e);
switch (e) {
case m:
return re("Suspense");
case y:
return re("SuspenseList");
}
if (typeof e == "object")
switch (e.$$typeof) {
case l:
return He(e.render);
case s:
return ne(e.type, r, t);
case v: {
var a = e, f = a._payload, p = a._init;
try {
return ne(p(f), r, t);
} catch {
}
}
}
return "";
}
var ae = Object.prototype.hasOwnProperty, Ce = {}, Oe = x.ReactDebugCurrentFrame;
function oe(e) {
if (e) {
var r = e._owner, t = ne(e.type, e._source, r ? r.type : null);
Oe.setExtraStackFrame(t);
} else
Oe.setExtraStackFrame(null);
}
function Je(e, r, t, a, f) {
{
var p = Function.call.bind(ae);
for (var u in e)
if (p(e, u)) {
var c = void 0;
try {
if (typeof e[u] != "function") {
var O = Error((a || "React class") + ": " + t + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw O.name = "Invariant Violation", O;
}
c = e[u](r, u, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (E) {
c = E;
}
c && !(c instanceof Error) && (oe(f), T("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, u, typeof c), oe(null)), c instanceof Error && !(c.message in Ce) && (Ce[c.message] = !0, oe(f), T("Failed %s type: %s", t, c.message), oe(null));
}
}
}
var Ke = Array.isArray;
function ge(e) {
return Ke(e);
}
function Xe(e) {
{
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
return t;
}
}
function Ze(e) {
try {
return Se(e), !1;
} catch {
return !0;
}
}
function Se(e) {
return "" + e;
}
function we(e) {
if (Ze(e))
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xe(e)), Se(e);
}
var G = x.ReactCurrentOwner, Qe = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, xe, je, be;
be = {};
function er(e) {
if (ae.call(e, "ref")) {
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
if (r && r.isReactWarning)
return !1;
}
return e.ref !== void 0;
}
function rr(e) {
if (ae.call(e, "key")) {
var r = Object.getOwnPropertyDescriptor(e, "key").get;
if (r && r.isReactWarning)
return !1;
}
return e.key !== void 0;
}
function tr(e, r) {
if (typeof e.ref == "string" && G.current && r && G.current.stateNode !== r) {
var t = w(G.current.type);
be[t] || (T('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', w(G.current.type), e.ref), be[t] = !0);
}
}
function nr(e, r) {
{
var t = function() {
xe || (xe = !0, T("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
};
t.isReactWarning = !0, Object.defineProperty(e, "key", {
get: t,
configurable: !0
});
}
}
function ar(e, r) {
{
var t = function() {
je || (je = !0, T("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
};
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
get: t,
configurable: !0
});
}
}
var or = function(e, r, t, a, f, p, u) {
var c = {
$$typeof: i,
type: e,
key: r,
ref: t,
props: u,
_owner: p
};
return c._store = {}, Object.defineProperty(c._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(c, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: a
}), Object.defineProperty(c, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: f
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
};
function ir(e, r, t, a, f) {
{
var p, u = {}, c = null, O = null;
t !== void 0 && (we(t), c = "" + t), rr(r) && (we(r.key), c = "" + r.key), er(r) && (O = r.ref, tr(r, f));
for (p in r)
ae.call(r, p) && !Qe.hasOwnProperty(p) && (u[p] = r[p]);
if (e && e.defaultProps) {
var E = e.defaultProps;
for (p in E)
u[p] === void 0 && (u[p] = E[p]);
}
if (c || O) {
var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
c && nr(u, R), O && ar(u, R);
}
return or(e, c, O, f, a, G.current, u);
}
}
var Ee = x.ReactCurrentOwner, ke = x.ReactDebugCurrentFrame;
function $(e) {
if (e) {
var r = e._owner, t = ne(e.type, e._source, r ? r.type : null);
ke.setExtraStackFrame(t);
} else
ke.setExtraStackFrame(null);
}
var _e;
_e = !1;
function Re(e) {
return typeof e == "object" && e !== null && e.$$typeof === i;
}
function Pe() {
{
if (Ee.current) {
var e = w(Ee.current.type);
if (e)
return `
Check the render method of \`` + e + "`.";
}
return "";
}
}
function sr(e) {
{
if (e !== void 0) {
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
return `
Check your code at ` + r + ":" + t + ".";
}
return "";
}
}
var Ae = {};
function cr(e) {
{
var r = Pe();
if (!r) {
var t = typeof e == "string" ? e : e.displayName || e.name;
t && (r = `
Check the top-level render call using <` + t + ">.");
}
return r;
}
}
function Fe(e, r) {
{
if (!e._store || e._store.validated || e.key != null)
return;
e._store.validated = !0;
var t = cr(r);
if (Ae[t])
return;
Ae[t] = !0;
var a = "";
e && e._owner && e._owner !== Ee.current && (a = " It was passed a child from " + w(e._owner.type) + "."), $(e), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), $(null);
}
}
function De(e, r) {
{
if (typeof e != "object")
return;
if (ge(e))
for (var t = 0; t < e.length; t++) {
var a = e[t];
Re(a) && Fe(a, r);
}
else if (Re(e))
e._store && (e._store.validated = !0);
else if (e) {
var f = L(e);
if (typeof f == "function" && f !== e.entries)
for (var p = f.call(e), u; !(u = p.next()).done; )
Re(u.value) && Fe(u.value, r);
}
}
}
function ur(e) {
{
var r = e.type;
if (r == null || typeof r == "string")
return;
var t;
if (typeof r == "function")
t = r.propTypes;
else if (typeof r == "object" && (r.$$typeof === l || r.$$typeof === s))
t = r.propTypes;
else
return;
if (t) {
var a = w(r);
Je(t, e.props, "prop", a, e);
} else if (r.PropTypes !== void 0 && !_e) {
_e = !0;
var f = w(r);
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
}
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function lr(e) {
{
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
var a = r[t];
if (a !== "children" && a !== "key") {
$(e), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), $(null);
break;
}
}
e.ref !== null && ($(e), T("Invalid attribute `ref` supplied to `React.Fragment`."), $(null));
}
}
function Ne(e, r, t, a, f, p) {
{
var u = K(e);
if (!u) {
var c = "";
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (c += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var O = sr(f);
O ? c += O : c += Pe();
var E;
e === null ? E = "null" : ge(e) ? E = "array" : e !== void 0 && e.$$typeof === i ? (E = "<" + (w(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, c);
}
var R = ir(e, r, t, f, p);
if (R == null)
return R;
if (u) {
var S = r.children;
if (S !== void 0)
if (a)
if (ge(S)) {
for (var W = 0; W < S.length; W++)
De(S[W], e);
Object.freeze && Object.freeze(S);
} else
T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
De(S, e);
}
return e === d ? lr(R) : ur(R), R;
}
}
function fr(e, r, t) {
return Ne(e, r, t, !0);
}
function dr(e, r, t) {
return Ne(e, r, t, !1);
}
var vr = dr, pr = fr;
I.Fragment = d, I.jsx = vr, I.jsxs = pr;
}()), I;
}
(function(n) {
process.env.NODE_ENV === "production" ? n.exports = hr() : n.exports = yr();
})(me);
const F = me.exports.jsx, se = me.exports.jsxs, Le = "waffle-chart-square", gr = ({
gridItemProps: n,
isAnimatedFill: i,
isZeros: o,
clickHandler: d
}) => {
const g = [Le];
g.push(n == null ? void 0 : n.identifier), i && g.push("animate-fill"), o && g.push("zeroed");
const b = {
background: `var(--bg-fallback-${n == null ? void 0 : n.identifier})`
};
return /* @__PURE__ */ F("div", {
"data-testid": Le,
className: g.join(" "),
style: (n == null ? void 0 : n.style) || b,
title: `square${n == null ? void 0 : n.index}`,
onClick: () => d(n)
}, n == null ? void 0 : n.index);
}, Ye = "chart-container", br = ({
itemProps: n = [],
verticalFill: i = "bottom",
horizontalFill: o = "right",
isAnimatedFill: d = !0,
isZeros: g = !1,
clickHandler: b
}) => {
const _ = n == null ? void 0 : n.map((h, l) => /* @__PURE__ */ F(gr, {
gridItemProps: h,
isAnimatedFill: d,
isZeros: g,
clickHandler: b
}, `${h.identifier}${l}`));
return /* @__PURE__ */ F("div", {
className: `waffle-chart ${Ye} ${i} ${o}`,
"data-testid": Ye,
children: _
});
}, qe = "display-item", Er = ({
data1: n,
data2: i,
data3: o,
verticalFill: d,
precision: g
}) => {
const b = ["waffle-chart-display-container", d], _ = ({
id: l,
value: m,
percentage: y,
label: s,
style: v
}) => /* @__PURE__ */ se("div", {
className: [qe, l].join(" "),
style: {
color: v == null ? void 0 : v.color
},
"data-testid": qe,
children: [/* @__PURE__ */ se("h3", {
className: "display-item-title",
"data-testid": "display-percentage",
children: [y.toFixed(g), "%"]
}), /* @__PURE__ */ se("p", {
className: "display-item-description",
"data-testid": "display-count",
children: [m, "\xA0", s]
})]
}, `${s}${m}`), h = [n, i, o].map((l) => _(l));
return /* @__PURE__ */ F("div", {
className: b.join(" "),
"data-testid": "display-container",
children: h
});
}, Ve = "total", _r = ({
style: n = void 0,
children: i
}) => /* @__PURE__ */ F("h3", {
className: Ve,
style: n,
"data-testid": Ve,
children: i
}), Ue = "waffle-chart-container", Rr = (n, i, o) => n + i + o, mr = (n, i, o) => [n, i, o].map((d) => d <= 0 ? 0 : d), Tr = (n, i) => n / i * 100 || 0, Cr = (n) => n.sort((i, o) => o.value - i.value), ie = (n) => n ? {
color: n,
background: n
} : void 0, Or = (n, i) => {
const o = {
...n
};
switch (n.percentage > 100 && (o.value = 100), i) {
case "nearest":
o.percentage = Math.round(n.percentage);
break;
case "up":
o.percentage = Math.ceil(n.percentage);
break;
case "down":
o.percentage = Math.floor(n.percentage);
break;
default:
o.percentage = Math.round(n.percentage);
}
return o;
}, Sr = ([n, i, o]) => {
const d = o.percentage, g = i.percentage, b = d + g, _ = [];
for (let h = 100; h > 0; h--) {
const l = h <= d, m = h > d && h <= b, y = !m && !l, s = l ? o.id : m ? i.id : n.id, v = l ? o.style : m ? i.style : y ? n.style : void 0, C = {
index: h,
identifier: s,
isSmall: l,
isMedium: m,
isLarge: y,
style: v
};
_.push(C);
}
return n.percentage === 50 ? _.reverse() : _;
}, Be = (n) => {
const i = Math.sqrt(n), o = Math.ceil(i), d = Math.floor(n / o) || 0, g = n - o * d || 0;
return {
c: o,
r: d,
e: g
};
}, wr = ([n, i, o]) => {
const d = [], g = o.percentage ? o.percentage + i.percentage : i.percentage, b = Be(o.percentage), _ = Be(g), h = (s) => Math.ceil(s / 10) * 10 / 10, l = (s, v) => s * 10 - 10 + v, m = (s, v, C) => v < s.r && C <= l(v, s.c) || v === s.r && C <= l(v, s.c), y = (s, v, C) => v === s.r + 1 && C <= l(v, s.e);
for (let s = 100; s > 0; s--) {
const v = h(s), C = b.r ? m(b, v, s) || y(b, v, s) : !1, j = m(_, v, s) || y(_, v, s), M = !C && !j, L = C ? o.id : j ? i.id : n.id, x = C ? o.style : j ? i.style : M ? n.style : void 0, T = {
index: s,
identifier: L,
isSmall: C,
isMedium: j,
isLarge: M,
style: x
};
d.push(T);
}
return d;
}, xr = ([n, i, o], d) => {
const b = o.percentage > 2, _ = b || i.percentage > 2;
return !(n.percentage === 50 && !o.percentage) && d && (b || _) ? wr([n, i, o]) : Sr([n, i, o]);
}, kr = ({
partA: n = 0,
partB: i = 0,
partC: o = 0,
displayPrecision: d = 0,
partAlabel: g = "A",
partBlabel: b = "B",
partClabel: _ = "C",
rounding: h = "nearest",
isFilledFromTop: l = !1,
isFilledFromLeft: m = !1,
isSquareFill: y = !0,
isAnimatedFill: s = !0,
showDataDisplay: v = !0,
showTotal: C = !0,
partAcolor: j = void 0,
partBcolor: M = void 0,
partCcolor: L = void 0,
totalColor: x = void 0,
clickHandler: T = (Y) => Y
}) => {
const Y = (P) => T(P), ce = ie(j), ue = ie(M), le = ie(L), fe = ie(x), [J, q, K] = mr(n, i, o), X = Rr(J, q, K), Z = X.toFixed(d), [w, k, D] = [J, q, K].map((P) => Tr(P, X)), V = {
id: "a",
value: n,
percentage: w,
label: g,
style: ce
}, U = {
id: "b",
value: i,
percentage: k,
label: b,
style: ue
}, B = {
id: "c",
value: o,
percentage: D,
label: _,
style: le
}, N = Cr([V, U, B]).map((P) => Or(P, h)), z = l ? "top" : "bottom", Q = m ? "left" : "right", ee = C ? /* @__PURE__ */ F(_r, {
style: fe,
children: Z
}) : null, ve = v && V && U && B ? /* @__PURE__ */ F(Er, {
data1: N[2],
data2: N[1],
data3: N[0],
verticalFill: z,
precision: d
}) : null, pe = xr(N, y);
return /* @__PURE__ */ se("div", {
className: Ue,
"data-testid": Ue,
children: [ee, /* @__PURE__ */ F(br, {
itemProps: pe,
verticalFill: z,
horizontalFill: Q,
isAnimatedFill: s,
isZeros: !n && !i,
clickHandler: Y
}), ve]
});
};
export {
kr as WaffleChart
};