@automattic/charts 0.37.0 → 0.38.1
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/CHANGELOG.md +13 -0
- package/dist/{chunk-JSVPH6B5.js → chunk-3WXEHYPV.js} +49 -36
- package/dist/chunk-3WXEHYPV.js.map +1 -0
- package/dist/{chunk-I5JJ5WYZ.js → chunk-43QGEIRW.js} +3 -3
- package/dist/{chunk-P4SWLQIT.js → chunk-52PWNTC3.js} +65 -69
- package/dist/chunk-52PWNTC3.js.map +1 -0
- package/dist/{chunk-5QLJH7EK.js → chunk-64WB3TV2.js} +51 -69
- package/dist/chunk-64WB3TV2.js.map +1 -0
- package/dist/{chunk-TIB2BLLV.cjs → chunk-ALWJBUKO.cjs} +80 -84
- package/dist/chunk-ALWJBUKO.cjs.map +1 -0
- package/dist/{chunk-PYWE4JML.cjs → chunk-CCSDLJ4R.cjs} +21 -20
- package/dist/chunk-CCSDLJ4R.cjs.map +1 -0
- package/dist/{chunk-WW7TFPBJ.js → chunk-CDC6J372.js} +2 -2
- package/dist/{chunk-4A6NHL5K.cjs → chunk-EOYI6JHT.cjs} +18 -18
- package/dist/chunk-EOYI6JHT.cjs.map +1 -0
- package/dist/{chunk-EK6ALS6C.js → chunk-GXTFSTZS.js} +11 -16
- package/dist/chunk-GXTFSTZS.js.map +1 -0
- package/dist/{chunk-VNPRPX44.cjs → chunk-JGNNQIBW.cjs} +7 -7
- package/dist/{chunk-VNPRPX44.cjs.map → chunk-JGNNQIBW.cjs.map} +1 -1
- package/dist/{chunk-DN2DN6FH.cjs → chunk-M4IPOSJU.cjs} +31 -36
- package/dist/chunk-M4IPOSJU.cjs.map +1 -0
- package/dist/{chunk-YMPBXVE6.cjs → chunk-M4OSG2ES.cjs} +54 -41
- package/dist/chunk-M4OSG2ES.cjs.map +1 -0
- package/dist/{chunk-LI6CKYQ3.cjs → chunk-S2IAM3XA.cjs} +6 -6
- package/dist/{chunk-LI6CKYQ3.cjs.map → chunk-S2IAM3XA.cjs.map} +1 -1
- package/dist/{chunk-ADMNTUXL.cjs → chunk-SEPMBOVD.cjs} +58 -76
- package/dist/chunk-SEPMBOVD.cjs.map +1 -0
- package/dist/{chunk-7YHYTZ27.js → chunk-TOFS2PL4.js} +17 -22
- package/dist/chunk-TOFS2PL4.js.map +1 -0
- package/dist/{chunk-M6ZQP3RJ.js → chunk-UNF3E7UO.js} +6 -6
- package/dist/chunk-UNF3E7UO.js.map +1 -0
- package/dist/{chunk-AACSXIXO.cjs → chunk-VIFSKMHB.cjs} +47 -52
- package/dist/chunk-VIFSKMHB.cjs.map +1 -0
- package/dist/{chunk-TSONQB34.js → chunk-XLKUVSWX.js} +7 -6
- package/dist/chunk-XLKUVSWX.js.map +1 -0
- package/dist/components/bar-chart/index.cjs +4 -4
- package/dist/components/bar-chart/index.d.cts +3 -3
- package/dist/components/bar-chart/index.d.ts +3 -3
- package/dist/components/bar-chart/index.js +3 -3
- package/dist/components/bar-list-chart/index.cjs +5 -5
- package/dist/components/bar-list-chart/index.d.cts +3 -3
- package/dist/components/bar-list-chart/index.d.ts +3 -3
- package/dist/components/bar-list-chart/index.js +4 -4
- package/dist/components/conversion-funnel-chart/index.cjs +3 -3
- package/dist/components/conversion-funnel-chart/index.js +2 -2
- package/dist/components/leaderboard-chart/index.cjs +4 -4
- package/dist/components/leaderboard-chart/index.d.cts +3 -3
- package/dist/components/leaderboard-chart/index.d.ts +3 -3
- package/dist/components/leaderboard-chart/index.js +3 -3
- package/dist/components/legend/index.cjs +3 -3
- package/dist/components/legend/index.d.cts +5 -4
- package/dist/components/legend/index.d.ts +5 -4
- package/dist/components/legend/index.js +2 -2
- package/dist/components/line-chart/index.cjs +4 -4
- package/dist/components/line-chart/index.d.cts +3 -3
- package/dist/components/line-chart/index.d.ts +3 -3
- package/dist/components/line-chart/index.js +3 -3
- package/dist/components/pie-chart/index.cjs +4 -4
- package/dist/components/pie-chart/index.d.cts +4 -4
- package/dist/components/pie-chart/index.d.ts +4 -4
- package/dist/components/pie-chart/index.js +3 -3
- package/dist/components/pie-semi-circle-chart/index.cjs +4 -4
- package/dist/components/pie-semi-circle-chart/index.d.cts +4 -4
- package/dist/components/pie-semi-circle-chart/index.d.ts +4 -4
- package/dist/components/pie-semi-circle-chart/index.js +3 -3
- package/dist/components/tooltip/index.d.cts +1 -1
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +9 -9
- package/dist/{leaderboard-chart-MVf0mu5E.d.ts → leaderboard-chart-C9liwX4T.d.ts} +2 -2
- package/dist/{leaderboard-chart-BaDEGN6O.d.cts → leaderboard-chart-DLN3L7-R.d.cts} +2 -2
- package/dist/{legend-BBCxtUFq.d.cts → legend-CP4jfCL3.d.cts} +1 -1
- package/dist/{legend-CeJ6TMSr.d.ts → legend-D_hcatNS.d.ts} +1 -1
- package/dist/providers/index.cjs +2 -2
- package/dist/providers/index.d.cts +3 -3
- package/dist/providers/index.d.ts +3 -3
- package/dist/providers/index.js +1 -1
- package/dist/{themes-D_yBeL7J.d.ts → themes-BQl0lAdj.d.cts} +19 -17
- package/dist/{themes-B_kWPFye.d.cts → themes-Cs55crdB.d.ts} +19 -17
- package/dist/{types-CNWWOWuV.d.ts → types-C0J1pP_c.d.ts} +1 -1
- package/dist/{types-xTFOajzt.d.cts → types-athdF3-8.d.cts} +0 -3
- package/dist/{types-xTFOajzt.d.ts → types-athdF3-8.d.ts} +0 -3
- package/dist/{types-Bz4cK2h9.d.ts → types-oNXkzU5p.d.cts} +1 -1
- package/dist/{types-Bz4cK2h9.d.cts → types-oNXkzU5p.d.ts} +1 -1
- package/dist/{types-DBf8lwXn.d.cts → types-tkjBLYdd.d.cts} +1 -1
- package/package.json +5 -5
- package/src/components/bar-chart/bar-chart.tsx +8 -15
- package/src/components/leaderboard-chart/hooks/use-leaderboard-legend-items.ts +4 -8
- package/src/components/leaderboard-chart/leaderboard-chart.tsx +3 -3
- package/src/components/leaderboard-chart/test/use-leaderboard-legend-items.test.tsx +9 -16
- package/src/components/legend/hooks/use-chart-legend-items.ts +75 -49
- package/src/components/legend/private/base-legend.tsx +6 -34
- package/src/components/legend/types.ts +0 -4
- package/src/components/line-chart/line-chart.tsx +17 -22
- package/src/components/pie-chart/pie-chart.tsx +4 -4
- package/src/components/pie-semi-circle-chart/pie-semi-circle-chart.tsx +4 -4
- package/src/providers/chart-context/global-charts-provider.tsx +56 -27
- package/src/providers/chart-context/index.ts +6 -1
- package/src/providers/chart-context/test/chart-context.test.tsx +729 -53
- package/src/providers/chart-context/types.ts +19 -13
- package/src/types.ts +1 -1
- package/src/utils/get-styles.ts +4 -5
- package/src/utils/test/get-styles.test.ts +14 -14
- package/dist/chunk-4A6NHL5K.cjs.map +0 -1
- package/dist/chunk-5QLJH7EK.js.map +0 -1
- package/dist/chunk-7YHYTZ27.js.map +0 -1
- package/dist/chunk-AACSXIXO.cjs.map +0 -1
- package/dist/chunk-ADMNTUXL.cjs.map +0 -1
- package/dist/chunk-DN2DN6FH.cjs.map +0 -1
- package/dist/chunk-EK6ALS6C.js.map +0 -1
- package/dist/chunk-JSVPH6B5.js.map +0 -1
- package/dist/chunk-M6ZQP3RJ.js.map +0 -1
- package/dist/chunk-P4SWLQIT.js.map +0 -1
- package/dist/chunk-PYWE4JML.cjs.map +0 -1
- package/dist/chunk-TIB2BLLV.cjs.map +0 -1
- package/dist/chunk-TSONQB34.js.map +0 -1
- package/dist/chunk-YMPBXVE6.cjs.map +0 -1
- /package/dist/{chunk-I5JJ5WYZ.js.map → chunk-43QGEIRW.js.map} +0 -0
- /package/dist/{chunk-WW7TFPBJ.js.map → chunk-CDC6J372.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.38.1] - 2025-09-19
|
|
9
|
+
### Changed
|
|
10
|
+
- Update package dependencies. [#45241]
|
|
11
|
+
|
|
12
|
+
## [0.38.0] - 2025-09-19
|
|
13
|
+
### Added
|
|
14
|
+
- Charts: Add get element styles utility to global context [#45207]
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Update package dependencies. [#45229]
|
|
18
|
+
|
|
8
19
|
## [0.37.0] - 2025-09-15
|
|
9
20
|
### Changed
|
|
10
21
|
- Charts: Handle legend overflow when not enough space. [#45144]
|
|
@@ -460,6 +471,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
460
471
|
- Fixed lints following ESLint rule changes for TS [#40584]
|
|
461
472
|
- Fixing a bug in Chart storybook data. [#40640]
|
|
462
473
|
|
|
474
|
+
[0.38.1]: https://github.com/Automattic/charts/compare/v0.38.0...v0.38.1
|
|
475
|
+
[0.38.0]: https://github.com/Automattic/charts/compare/v0.37.0...v0.38.0
|
|
463
476
|
[0.37.0]: https://github.com/Automattic/charts/compare/v0.36.0...v0.37.0
|
|
464
477
|
[0.36.0]: https://github.com/Automattic/charts/compare/v0.35.0...v0.36.0
|
|
465
478
|
[0.35.0]: https://github.com/Automattic/charts/compare/v0.34.1...v0.35.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/providers/chart-context/global-charts-provider.tsx
|
|
2
|
-
import { createContext, useCallback, useMemo, useState, useEffect
|
|
2
|
+
import { createContext, useCallback, useMemo, useState, useEffect } from "react";
|
|
3
3
|
|
|
4
4
|
// src/utils/create-composition.ts
|
|
5
5
|
function attachSubComponents(Chart, subComponents) {
|
|
@@ -128,9 +128,6 @@ function getSeriesLineStyles(seriesData, index, providerTheme) {
|
|
|
128
128
|
const themeSeriesLineStyle = providerTheme?.seriesLineStyles?.[index % providerTheme.seriesLineStyles.length];
|
|
129
129
|
return seriesData.options?.seriesLineStyle ?? themeSemanticLineStyle ?? themeSeriesLineStyle ?? {};
|
|
130
130
|
}
|
|
131
|
-
function getSeriesStroke(seriesData, index, themeColors) {
|
|
132
|
-
return seriesData.options?.stroke ?? themeColors[index % themeColors.length];
|
|
133
|
-
}
|
|
134
131
|
function getItemShapeStyles(series, index, theme, legendShape) {
|
|
135
132
|
const seriesShapeStyles = series.options?.legendShapeStyle ?? {};
|
|
136
133
|
const lineStyles = legendShape === "line" ? getSeriesLineStyles(series, index, theme) : {};
|
|
@@ -142,9 +139,9 @@ function getItemShapeStyles(series, index, theme, legendShape) {
|
|
|
142
139
|
if (Object.values(itemShapeStyles).some(
|
|
143
140
|
(value) => value !== void 0 && value !== null && value !== ""
|
|
144
141
|
)) {
|
|
145
|
-
return
|
|
142
|
+
return itemShapeStyles;
|
|
146
143
|
}
|
|
147
|
-
return
|
|
144
|
+
return themeShapeStyles ?? {};
|
|
148
145
|
}
|
|
149
146
|
|
|
150
147
|
// src/utils/is-safari.ts
|
|
@@ -388,18 +385,16 @@ var wooTheme = {
|
|
|
388
385
|
// src/providers/chart-context/global-charts-provider.tsx
|
|
389
386
|
import { jsx } from "react/jsx-runtime";
|
|
390
387
|
var GlobalChartsContext = createContext(null);
|
|
391
|
-
var GlobalChartsProvider = ({
|
|
392
|
-
children,
|
|
393
|
-
theme = {}
|
|
394
|
-
}) => {
|
|
388
|
+
var GlobalChartsProvider = ({ children, theme }) => {
|
|
395
389
|
const [charts, setCharts] = useState(() => /* @__PURE__ */ new Map());
|
|
396
|
-
const providerTheme = useMemo(
|
|
397
|
-
|
|
398
|
-
|
|
390
|
+
const providerTheme = useMemo(() => {
|
|
391
|
+
return theme ? mergeThemes(defaultTheme, theme) : defaultTheme;
|
|
392
|
+
}, [theme]);
|
|
393
|
+
const [groupToColorMap, setGroupToColorMap] = useState(
|
|
394
|
+
() => /* @__PURE__ */ new Map()
|
|
399
395
|
);
|
|
400
|
-
const groupToColorMapRef = useRef(/* @__PURE__ */ new Map());
|
|
401
396
|
useEffect(() => {
|
|
402
|
-
|
|
397
|
+
setGroupToColorMap(/* @__PURE__ */ new Map());
|
|
403
398
|
}, [providerTheme.colors]);
|
|
404
399
|
const registerChart = useCallback((id, data) => {
|
|
405
400
|
setCharts((prev) => new Map(prev).set(id, data));
|
|
@@ -417,25 +412,46 @@ var GlobalChartsProvider = ({
|
|
|
417
412
|
},
|
|
418
413
|
[charts]
|
|
419
414
|
);
|
|
420
|
-
const
|
|
421
|
-
({
|
|
415
|
+
const resolveColor = useCallback(
|
|
416
|
+
({
|
|
417
|
+
group,
|
|
418
|
+
index,
|
|
419
|
+
overrideColor
|
|
420
|
+
}) => {
|
|
422
421
|
if (overrideColor) {
|
|
423
422
|
return overrideColor;
|
|
424
423
|
}
|
|
425
|
-
const
|
|
424
|
+
const { colors } = providerTheme;
|
|
426
425
|
if (group) {
|
|
427
|
-
const existing =
|
|
426
|
+
const existing = groupToColorMap.get(group);
|
|
428
427
|
if (existing) {
|
|
429
428
|
return existing;
|
|
430
429
|
}
|
|
431
|
-
const assignedCount =
|
|
432
|
-
const color =
|
|
433
|
-
|
|
430
|
+
const assignedCount = groupToColorMap.size;
|
|
431
|
+
const color = colors.length > 0 ? colors[assignedCount % colors.length] : "#000000";
|
|
432
|
+
groupToColorMap.set(group, color);
|
|
434
433
|
return color;
|
|
435
434
|
}
|
|
436
|
-
return
|
|
435
|
+
return colors.length > 0 ? colors[(index || 0) % colors.length] : "#000000";
|
|
437
436
|
},
|
|
438
|
-
[providerTheme
|
|
437
|
+
[providerTheme, groupToColorMap]
|
|
438
|
+
);
|
|
439
|
+
const getElementStyles = useCallback(
|
|
440
|
+
({ data, index, overrideColor, legendShape }) => {
|
|
441
|
+
const isSeriesData = data && typeof data === "object" && "data" in data && "options" in data;
|
|
442
|
+
const isPointPercentageData = data && typeof data === "object" && "percentage" in data;
|
|
443
|
+
return {
|
|
444
|
+
color: resolveColor({
|
|
445
|
+
group: data?.group,
|
|
446
|
+
index,
|
|
447
|
+
overrideColor: overrideColor || isSeriesData && data?.options?.stroke || isPointPercentageData && data?.color
|
|
448
|
+
}),
|
|
449
|
+
lineStyles: isSeriesData ? getSeriesLineStyles(data, index, providerTheme) : {},
|
|
450
|
+
glyph: providerTheme.glyphs?.[index],
|
|
451
|
+
shapeStyles: isSeriesData ? getItemShapeStyles(data, index, providerTheme, legendShape) : {}
|
|
452
|
+
};
|
|
453
|
+
},
|
|
454
|
+
[providerTheme, resolveColor]
|
|
439
455
|
);
|
|
440
456
|
const value = useMemo(
|
|
441
457
|
() => ({
|
|
@@ -444,9 +460,9 @@ var GlobalChartsProvider = ({
|
|
|
444
460
|
unregisterChart,
|
|
445
461
|
getChartData,
|
|
446
462
|
theme: providerTheme,
|
|
447
|
-
|
|
463
|
+
getElementStyles
|
|
448
464
|
}),
|
|
449
|
-
[charts, registerChart, unregisterChart, getChartData, providerTheme,
|
|
465
|
+
[charts, registerChart, unregisterChart, getChartData, providerTheme, getElementStyles]
|
|
450
466
|
);
|
|
451
467
|
return /* @__PURE__ */ jsx(GlobalChartsContext.Provider, { value, children });
|
|
452
468
|
};
|
|
@@ -473,9 +489,9 @@ import { useEffect as useEffect2, useMemo as useMemo6 } from "react";
|
|
|
473
489
|
|
|
474
490
|
// src/hooks/use-deep-memo.ts
|
|
475
491
|
import isEqual from "fast-deep-equal";
|
|
476
|
-
import { useRef
|
|
492
|
+
import { useRef } from "react";
|
|
477
493
|
var useDeepMemo = (value) => {
|
|
478
|
-
const ref =
|
|
494
|
+
const ref = useRef(value);
|
|
479
495
|
if (!isEqual(ref.current, value)) {
|
|
480
496
|
ref.current = value;
|
|
481
497
|
}
|
|
@@ -612,12 +628,12 @@ var useChartMargin = (height, options, data, theme, horizontal = false) => {
|
|
|
612
628
|
};
|
|
613
629
|
|
|
614
630
|
// src/hooks/use-element-height.ts
|
|
615
|
-
import { useState as useState2, useCallback as useCallback3, useRef as
|
|
631
|
+
import { useState as useState2, useCallback as useCallback3, useRef as useRef2 } from "react";
|
|
616
632
|
function useElementHeight({
|
|
617
633
|
initialHeight = 0
|
|
618
634
|
} = {}) {
|
|
619
635
|
const [height, setHeight] = useState2(initialHeight);
|
|
620
|
-
const observerRef =
|
|
636
|
+
const observerRef = useRef2(null);
|
|
621
637
|
const refCallback = useCallback3((node) => {
|
|
622
638
|
if (observerRef.current) {
|
|
623
639
|
observerRef.current.disconnect();
|
|
@@ -637,10 +653,10 @@ function useElementHeight({
|
|
|
637
653
|
}
|
|
638
654
|
|
|
639
655
|
// src/hooks/use-text-truncation.ts
|
|
640
|
-
import { useCallback as useCallback4, useRef as
|
|
656
|
+
import { useCallback as useCallback4, useRef as useRef3, useState as useState3 } from "react";
|
|
641
657
|
function useTextTruncation(enabled = true) {
|
|
642
658
|
const [isTruncated, setIsTruncated] = useState3(false);
|
|
643
|
-
const observerRef =
|
|
659
|
+
const observerRef = useRef3(null);
|
|
644
660
|
const refCallback = useCallback4(
|
|
645
661
|
(node) => {
|
|
646
662
|
if (observerRef.current) {
|
|
@@ -749,9 +765,6 @@ export {
|
|
|
749
765
|
attachSubComponents,
|
|
750
766
|
formatMetricValue,
|
|
751
767
|
formatPercentage,
|
|
752
|
-
getSeriesLineStyles,
|
|
753
|
-
getSeriesStroke,
|
|
754
|
-
getItemShapeStyles,
|
|
755
768
|
isSafari,
|
|
756
769
|
hexToRgba,
|
|
757
770
|
defaultTheme,
|
|
@@ -770,4 +783,4 @@ export {
|
|
|
770
783
|
useTextTruncation,
|
|
771
784
|
useZeroValueDisplay
|
|
772
785
|
};
|
|
773
|
-
//# sourceMappingURL=chunk-
|
|
786
|
+
//# sourceMappingURL=chunk-3WXEHYPV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/providers/chart-context/global-charts-provider.tsx","../src/utils/create-composition.ts","../src/utils/date-parsing.ts","../src/utils/format-metric-value.ts","../src/utils/format-percentage.ts","../src/utils/get-longest-tick-width.ts","../src/utils/get-styles.ts","../src/utils/is-safari.ts","../src/utils/merge-themes.ts","../src/utils/color-utils.ts","../src/providers/chart-context/themes.ts","../src/providers/chart-context/hooks/use-global-charts-context.ts","../src/providers/chart-context/hooks/use-chart-id.ts","../src/providers/chart-context/hooks/use-chart-registration.ts","../src/hooks/use-deep-memo.ts","../src/hooks/use-chart-mouse-handler.ts","../src/hooks/use-xychart-theme.ts","../src/hooks/use-chart-data-transform.ts","../src/hooks/use-chart-margin.tsx","../src/hooks/use-element-height.ts","../src/hooks/use-text-truncation.ts","../src/hooks/use-zero-value-display.ts","../src/providers/chart-context/hooks/use-global-charts-theme.ts"],"sourcesContent":["import { createContext, useCallback, useMemo, useState, useEffect } from 'react';\nimport { getItemShapeStyles, getSeriesLineStyles, mergeThemes } from '../../utils';\nimport { defaultTheme } from './themes';\nimport type { GlobalChartsContextValue, ChartRegistration } from './types';\nimport type { ChartTheme, CompleteChartTheme } from '../../types';\nimport type { FC, ReactNode } from 'react';\n\nexport const GlobalChartsContext = createContext< GlobalChartsContextValue | null >( null );\n\nexport interface GlobalChartsProviderProps {\n\tchildren: ReactNode;\n\ttheme?: Partial< ChartTheme >;\n}\n\nexport const GlobalChartsProvider: FC< GlobalChartsProviderProps > = ( { children, theme } ) => {\n\tconst [ charts, setCharts ] = useState< Map< string, ChartRegistration > >( () => new Map() );\n\n\tconst providerTheme: CompleteChartTheme = useMemo( () => {\n\t\treturn theme ? mergeThemes( defaultTheme, theme ) : defaultTheme;\n\t}, [ theme ] );\n\n\tconst [ groupToColorMap, setGroupToColorMap ] = useState< Map< string, string > >(\n\t\t() => new Map()\n\t);\n\n\t// Reset group color mappings when theme colors change\n\tuseEffect( () => {\n\t\t// Create a completely new Map instance to trigger dependencies, e.g. useChartLegendItems\n\t\tsetGroupToColorMap( new Map() );\n\t}, [ providerTheme.colors ] );\n\n\tconst registerChart = useCallback( ( id: string, data: ChartRegistration ) => {\n\t\tsetCharts( prev => new Map( prev ).set( id, data ) );\n\t}, [] );\n\n\tconst unregisterChart = useCallback( ( id: string ) => {\n\t\tsetCharts( prev => {\n\t\t\tconst newMap = new Map( prev );\n\t\t\tnewMap.delete( id );\n\t\t\treturn newMap;\n\t\t} );\n\t}, [] );\n\n\tconst getChartData = useCallback(\n\t\t( id: string ) => {\n\t\t\treturn charts.get( id );\n\t\t},\n\t\t[ charts ]\n\t);\n\n\tconst resolveColor = useCallback(\n\t\t( {\n\t\t\tgroup,\n\t\t\tindex,\n\t\t\toverrideColor,\n\t\t}: {\n\t\t\tgroup?: string;\n\t\t\tindex: number;\n\t\t\toverrideColor?: string;\n\t\t} ): string => {\n\t\t\t// Highest precedence: eg. explicit series stroke or chart color prop\n\t\t\tif ( overrideColor ) {\n\t\t\t\treturn overrideColor;\n\t\t\t}\n\n\t\t\tconst { colors } = providerTheme;\n\n\t\t\t// If group provided, maintain a stable assignment\n\t\t\tif ( group ) {\n\t\t\t\tconst existing = groupToColorMap.get( group );\n\t\t\t\tif ( existing ) {\n\t\t\t\t\treturn existing;\n\t\t\t\t}\n\t\t\t\t// Assign next color from palette in a deterministic cycling manner\n\n\t\t\t\tconst assignedCount = groupToColorMap.size;\n\t\t\t\tconst color = colors.length > 0 ? colors[ assignedCount % colors.length ] : '#000000';\n\t\t\t\tgroupToColorMap.set( group, color );\n\t\t\t\treturn color;\n\t\t\t}\n\n\t\t\t// Fallback: index-based color cycling\n\t\t\treturn colors.length > 0 ? colors[ ( index || 0 ) % colors.length ] : '#000000';\n\t\t},\n\t\t[ providerTheme, groupToColorMap ]\n\t);\n\n\tconst getElementStyles = useCallback< GlobalChartsContextValue[ 'getElementStyles' ] >(\n\t\t( { data, index, overrideColor, legendShape } ) => {\n\t\t\tconst isSeriesData = data && typeof data === 'object' && 'data' in data && 'options' in data;\n\t\t\tconst isPointPercentageData = data && typeof data === 'object' && 'percentage' in data;\n\n\t\t\treturn {\n\t\t\t\tcolor: resolveColor( {\n\t\t\t\t\tgroup: data?.group,\n\t\t\t\t\tindex,\n\t\t\t\t\toverrideColor:\n\t\t\t\t\t\toverrideColor ||\n\t\t\t\t\t\t( isSeriesData && data?.options?.stroke ) ||\n\t\t\t\t\t\t( isPointPercentageData && data?.color ),\n\t\t\t\t} ),\n\t\t\t\tlineStyles: isSeriesData ? getSeriesLineStyles( data, index, providerTheme ) : {},\n\t\t\t\tglyph: providerTheme.glyphs?.[ index ],\n\t\t\t\tshapeStyles: isSeriesData\n\t\t\t\t\t? getItemShapeStyles( data, index, providerTheme, legendShape )\n\t\t\t\t\t: {},\n\t\t\t};\n\t\t},\n\t\t[ providerTheme, resolveColor ]\n\t);\n\n\tconst value: GlobalChartsContextValue = useMemo(\n\t\t() => ( {\n\t\t\tcharts,\n\t\t\tregisterChart,\n\t\t\tunregisterChart,\n\t\t\tgetChartData,\n\t\t\ttheme: providerTheme,\n\t\t\tgetElementStyles,\n\t\t} ),\n\t\t[ charts, registerChart, unregisterChart, getChartData, providerTheme, getElementStyles ]\n\t);\n\n\treturn <GlobalChartsContext.Provider value={ value }>{ children }</GlobalChartsContext.Provider>;\n};\n","/**\n * Utility function to create chart components with composition API.\n *\n * This function attaches subcomponents to a chart component to enable\n * dot notation access like <Chart.Legend />, <Chart.Tooltip />, etc.\n *\n * @param Chart - The main chart component\n * @param subComponents - Object containing subcomponents to attach\n * @return Chart component with attached subcomponents\n */\nexport function attachSubComponents< TChart, TSubComponents extends Record< string, unknown > >(\n\tChart: TChart,\n\tsubComponents: TSubComponents\n): TChart & TSubComponents {\n\treturn Object.assign( Chart, subComponents );\n}\n","/**\n * @file Date parsing utilities using date-fns for local timezone handling\n *\n * This module provides utilities for parsing various date string formats and converting\n * them to local timezone dates using the battle-tested date-fns library. For formats\n * without timezone info, they're treated as local. For formats with timezone info,\n * they're converted to the equivalent local time.\n *\n * Note: And specifically it prevents format `YYYY-MM-DD` being parsed as UTC date.\n *\n * Key Features:\n * - All parsed dates are in local timezone\n * - Converts timezone-aware strings to local equivalent\n * - Robust input validation and error handling using date-fns\n * - TypeScript type safety\n * - Much smaller codebase than custom parsing\n *\n * Supported Formats:\n * - YYYY-MM-DD (treated as local)\n * - YYYY-MM-DD HH:mm:ss (treated as local)\n * - YYYY-MM-DD HH:mm (treated as local)\n * - YYYY-MM-DDTHH:mm:ss (treated as local)\n * - YYYY-MM-DDTHH:mm:ss.SSS (treated as local)\n * - YYYY-MM-DDTHH:mm (treated as local)\n * - YYYY-MM-DDTHH:mm:ssZ (converted to local)\n * - YYYY-MM-DDTHH:mm:ss±HH:mm (converted to local)\n *\n * @example\n * ```typescript\n * parseAsLocalDate(\"2025-01-01\"); // Local timezone\n * parseAsLocalDate(\"2025-01-01 14:30:00\"); // Local timezone\n * parseAsLocalDate(\"2025-01-01 14:30\"); // Local timezone\n * parseAsLocalDate(\"2025-01-01T14:30:45.123\"); // Local timezone\n * parseAsLocalDate(\"2025-01-01T14:30:00Z\"); // UTC 14:30 → Local equivalent\n * parseAsLocalDate(\"2025-01-01T14:30:00+05:00\"); // +05:00 14:30 → Local equivalent\n * ```\n */\n\nimport { parse, parseISO, isValid } from 'date-fns';\n\n/**\n * Checks if a date string contains timezone information\n * @param {string} dateString - The date string to check for timezone information\n * @return {boolean} True if the date string contains timezone information, false otherwise\n */\nconst hasTimezone = ( dateString: string ): boolean => {\n\treturn /T.*[Z]$|T.*[+-]\\d{2}:?\\d{2}$/.test( dateString );\n};\n\n/**\n * Parses any supported date string format and returns a local timezone date\n *\n * Uses date-fns for robust parsing and validation. For strings without timezone\n * info, treats as local timezone. For strings with timezone info, converts to\n * local timezone equivalent.\n *\n * Supports:\n * - YYYY-MM-DD (local)\n * - YYYY-MM-DD HH:mm:ss (local)\n * - YYYY-MM-DD HH:mm (local)\n * - YYYY-MM-DDTHH:mm:ss (local)\n * - YYYY-MM-DDTHH:mm:ss.SSS (local)\n * - YYYY-MM-DDTHH:mm (local)\n * - YYYY-MM-DDTHH:mm:ssZ (UTC → local)\n * - YYYY-MM-DDTHH:mm:ss±HH:mm (offset → local)\n * @param {string} dateString - The date string to parse into a local timezone date\n * @return {Date} A Date object representing the parsed date in local timezone, or an invalid Date if parsing fails\n */\nexport const parseAsLocalDate = ( dateString: string ): Date => {\n\tconst trimmedString = dateString.trim();\n\n\t// If it has timezone information, parse as ISO and convert to local\n\tif ( hasTimezone( trimmedString ) ) {\n\t\tconst isoDate = parseISO( trimmedString );\n\n\t\tif ( ! isValid( isoDate ) ) {\n\t\t\treturn new Date( NaN );\n\t\t}\n\n\t\t// parseISO automatically converts to local timezone\n\t\treturn isoDate;\n\t}\n\n\t// For naive strings, try different local formats\n\tconst formats = [\n\t\t'yyyy-MM-dd', // 2025-01-01\n\t\t'yyyy-MM-dd HH:mm:ss', // 2025-01-01 14:30:45\n\t\t'yyyy-MM-dd HH:mm', // 2025-01-01 14:30\n\t\t\"yyyy-MM-dd'T'HH:mm:ss\", // 2025-01-01T14:30:45\n\t\t\"yyyy-MM-dd'T'HH:mm:ss.SSS\", // 2025-01-01T14:30:45.123\n\t\t\"yyyy-MM-dd'T'HH:mm\", // 2025-01-01T14:30\n\t];\n\n\tfor ( const format of formats ) {\n\t\tconst result = parse( trimmedString, format, new Date() );\n\t\tif ( isValid( result ) ) {\n\t\t\treturn result;\n\t\t}\n\t}\n\n\t// If no format matched, return invalid date\n\treturn new Date( NaN );\n};\n","import { formatNumberCompact, formatNumber } from '@automattic/number-formatters';\n\n/**\n * Types for formatMetricValue\n */\nexport type MetricValueType = 'number' | 'average' | 'currency';\n\ntype FormatMetricValueOptions = {\n\tdecimals?: number;\n\tuseMultipliers?: boolean;\n\tsignDisplay?: Intl.NumberFormatOptions[ 'signDisplay' ];\n};\n\n/**\n * Format a numeric metric value based on type, precision and scale.\n * Supports currency, number and percentage, using @automattic/number-formatters.\n *\n * @param value - The value to format\n * @param type - The type of formatting to apply\n * @param options - Formatting options\n * @param options.decimals - Number of decimal places to show\n * @param options.useMultipliers - Whether to use K, M, B suffixes for large numbers\n * @param options.signDisplay - Controls when to display the sign (auto, always, never, exceptZero)\n * @return Formatted string\n */\nexport const formatMetricValue = (\n\tvalue: string | number,\n\ttype: MetricValueType = 'number',\n\t{ decimals, useMultipliers = false, signDisplay }: FormatMetricValueOptions = {}\n): string => {\n\tif ( value === null || value === undefined ) {\n\t\treturn '';\n\t}\n\n\tconst numericValue = Number( value );\n\tif ( isNaN( numericValue ) ) {\n\t\treturn '';\n\t}\n\n\tswitch ( type ) {\n\t\tcase 'currency': {\n\t\t\t// Basic currency formatting - can be enhanced with full currency support\n\t\t\tconst formatted = useMultipliers\n\t\t\t\t? formatNumberCompact( numericValue, {\n\t\t\t\t\t\tdecimals: decimals ?? 2,\n\t\t\t\t\t\tnumberFormatOptions: {\n\t\t\t\t\t\t\tmaximumFractionDigits: decimals ?? 2,\n\t\t\t\t\t\t\tsignDisplay,\n\t\t\t\t\t\t},\n\t\t\t\t } )\n\t\t\t\t: formatNumber( numericValue, {\n\t\t\t\t\t\tdecimals: decimals ?? 2,\n\t\t\t\t\t\tnumberFormatOptions: {\n\t\t\t\t\t\t\tsignDisplay,\n\t\t\t\t\t\t},\n\t\t\t\t } );\n\t\t\treturn `$${ formatted }`;\n\t\t}\n\n\t\tcase 'average': {\n\t\t\tif ( ! Number.isFinite( numericValue ) ) {\n\t\t\t\treturn '—';\n\t\t\t}\n\n\t\t\treturn formatNumber( numericValue, {\n\t\t\t\tdecimals: decimals ?? 0,\n\t\t\t\tnumberFormatOptions: {\n\t\t\t\t\tstyle: 'percent',\n\t\t\t\t\tsignDisplay: signDisplay ?? 'exceptZero',\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tcase 'number':\n\t\tdefault: {\n\t\t\treturn useMultipliers\n\t\t\t\t? formatNumberCompact( numericValue, {\n\t\t\t\t\t\tdecimals: decimals ?? 0,\n\t\t\t\t\t\tnumberFormatOptions: {\n\t\t\t\t\t\t\tmaximumFractionDigits: decimals ?? 0,\n\t\t\t\t\t\t\tsignDisplay,\n\t\t\t\t\t\t},\n\t\t\t\t } )\n\t\t\t\t: formatNumber( numericValue, {\n\t\t\t\t\t\tdecimals: decimals ?? 0,\n\t\t\t\t\t\tnumberFormatOptions: {\n\t\t\t\t\t\t\tsignDisplay,\n\t\t\t\t\t\t},\n\t\t\t\t } );\n\t\t}\n\t}\n};\n","import { formatNumber } from '@automattic/number-formatters';\n\n/**\n * Format a percentage value with smart decimal handling.\n * Uses @automattic/number-formatters for consistent formatting.\n * Removes unnecessary trailing zeros and caps at 2 decimal places.\n *\n * @param value - The percentage value (0-100 range)\n * @return Formatted percentage string (e.g., \"30%\", \"30.1%\", \"30.25%\")\n */\nexport const formatPercentage = ( value: number ): string => {\n\t// Use formatNumber with percentage style, but convert from 0-100 range to 0-1 range\n\treturn formatNumber( value / 100, {\n\t\tnumberFormatOptions: {\n\t\t\tstyle: 'percent',\n\t\t\tminimumFractionDigits: 0,\n\t\t\tmaximumFractionDigits: 2,\n\t\t},\n\t} );\n};\n","import { getStringWidth } from '@visx/text';\nimport type { TickFormatter } from '@visx/axis';\nimport type { AnyD3Scale, ScaleInput } from '@visx/scale';\n\n/**\n * Returns the width of the longest tick.\n *\n * @param ticks - Ticks to get the width of.\n * @param formatTick - Function to format the tick.\n * @param {object} labelStyle - Style object for the label.\n * @return {number} - Width of the longest tick.\n */\nexport const getLongestTickWidth = < T extends AnyD3Scale >(\n\tticks: ScaleInput< T >[],\n\tformatTick: TickFormatter< ScaleInput< T > >,\n\tlabelStyle?: object\n) => {\n\tconst formattedTicks = ticks.map( tick => formatTick( tick, 0, [] ) );\n\tconst longestTick = formattedTicks.reduce(\n\t\t( longest, current ) => ( longest.length >= current.length ? longest : current ),\n\t\tformattedTicks[ 0 ]\n\t);\n\n\treturn getStringWidth( longestTick, labelStyle );\n};\n","import type { ChartTheme, SeriesData } from '../types';\nimport type { LegendShape } from '@visx/legend/lib/types';\nimport type { LineStyles } from '@visx/xychart';\n\n/**\n * Utility function to get consolidated line styles for a series\n * This consolidates the logic used by both LineChart and Legend components\n *\n * @param {SeriesData} seriesData - The series data containing styling options\n * @param {number} index - The index of the series in the data array\n * @param {ChartTheme} providerTheme - The chart theme configuration\n * @return {LineStyles} The consolidated line styles for the series\n */\nexport function getSeriesLineStyles(\n\tseriesData: SeriesData,\n\tindex: number,\n\tproviderTheme: ChartTheme\n): LineStyles {\n\t// Get theme-based line styles for line type\n\tconst themeSemanticLineStyle = providerTheme?.lineChart?.lineStyles?.[ seriesData.options?.type ];\n\n\t// Get theme-based line styles for index of series data\n\tconst themeSeriesLineStyle =\n\t\tproviderTheme?.seriesLineStyles?.[ index % providerTheme.seriesLineStyles.length ];\n\n\t// Priority order: custom series style > theme line type style > default theme series style\n\treturn (\n\t\tseriesData.options?.seriesLineStyle ?? themeSemanticLineStyle ?? themeSeriesLineStyle ?? {}\n\t);\n}\n\n/**\n * Utility function to get stroke color for a series\n *\n * @param {SeriesData} seriesData - The series data containing styling options\n * @param {number} index - The index of the series in the data array\n * @param {string[]} themeColors - Array of theme colors\n * @return {string} The stroke color for the series\n */\nexport function getSeriesStroke(\n\tseriesData: SeriesData,\n\tindex: number,\n\tthemeColors: string[]\n): string {\n\treturn seriesData.options?.stroke ?? themeColors[ index % themeColors.length ];\n}\n\n/**\n * Utility function to get shape styles for a legend item\n *\n * @param {SeriesData} series - The series data containing styling options\n * @param {number} index - The index of the series in the data array\n * @param {ChartTheme} theme - The chart theme configuration\n * @param {LegendShape} legendShape - The shape to use for the item (optional)\n * @return {Record< string, unknown >} The shape styles for the item\n */\nexport function getItemShapeStyles(\n\tseries: SeriesData,\n\tindex: number,\n\ttheme: ChartTheme,\n\tlegendShape?: LegendShape< SeriesData[], number >\n): Record< string, unknown > {\n\tconst seriesShapeStyles = series.options?.legendShapeStyle ?? {};\n\tconst lineStyles = legendShape === 'line' ? getSeriesLineStyles( series, index, theme ) : {};\n\tconst themeShapeStyles = theme.legendShapeStyles?.[ index ];\n\n\tconst itemShapeStyles = {\n\t\t...seriesShapeStyles,\n\t\t...lineStyles,\n\t};\n\n\t// Return item shape styles if they are not empty\n\tif (\n\t\tObject.values( itemShapeStyles ).some(\n\t\t\tvalue => value !== undefined && value !== null && value !== ''\n\t\t)\n\t) {\n\t\treturn itemShapeStyles;\n\t}\n\n\t// Fallback to theme shape styles if defined\n\treturn themeShapeStyles ?? {};\n}\n","export const isSafari = () => {\n\tif ( typeof navigator !== 'undefined' && navigator.userAgent ) {\n\t\treturn /^((?!chrome|android).)*safari/i.test( navigator.userAgent );\n\t}\n\treturn false;\n};\n","import deepmerge from 'deepmerge';\nimport type { ChartTheme, CompleteChartTheme } from '../types';\n\n/**\n * Merges chart themes with proper precedence.\n * The second theme (override) takes precedence over the first theme (base).\n *\n * @param baseTheme - Base theme object\n * @param overrideTheme - Theme to override base with (takes precedence)\n * @return Merged theme with overrideTheme values taking precedence\n */\nexport function mergeThemes(\n\tbaseTheme: CompleteChartTheme,\n\toverrideTheme: Partial< ChartTheme >\n): CompleteChartTheme;\nexport function mergeThemes(\n\tbaseTheme: ChartTheme,\n\toverrideTheme: Partial< ChartTheme >\n): ChartTheme;\nexport function mergeThemes(\n\tbaseTheme: ChartTheme,\n\toverrideTheme: Partial< ChartTheme >\n): ChartTheme {\n\t// Use deepmerge to properly merge nested objects, with overrideTheme taking precedence\n\treturn deepmerge( baseTheme, overrideTheme, {\n\t\t// Ensure arrays are replaced rather than concatenated\n\t\tarrayMerge: ( _destinationArray, sourceArray ) => sourceArray,\n\t} ) as ChartTheme;\n}\n","/**\n * Convert hex color to rgba with specified opacity\n * This is genuinely reusable across chart components\n * @param hex - The hex color string (e.g., '#ff0000')\n * @param alpha - The opacity value between 0 and 1\n * @return The rgba color string (e.g., 'rgba(255, 0, 0, 0.5)')\n * @throws Error if hex string is malformed\n */\nexport const hexToRgba = ( hex: string, alpha: number ): string => {\n\t// Validate hex format\n\tif ( typeof hex !== 'string' ) {\n\t\tthrow new Error( 'Hex color must be a string' );\n\t}\n\n\t// Check if hex starts with #\n\tif ( ! hex.startsWith( '#' ) ) {\n\t\tthrow new Error( 'Hex color must start with #' );\n\t}\n\n\t// Check length (should be 7 characters: # + 6 hex digits)\n\tif ( hex.length !== 7 ) {\n\t\tthrow new Error( 'Hex color must be 7 characters long (e.g., #ff0000)' );\n\t}\n\n\t// Check if all characters after # are valid hex digits\n\tconst hexDigits = hex.slice( 1 );\n\tif ( ! /^[0-9a-fA-F]{6}$/.test( hexDigits ) ) {\n\t\tthrow new Error( 'Hex color contains invalid characters. Only 0-9, a-f, A-F are allowed' );\n\t}\n\n\t// Validate alpha\n\tif ( typeof alpha !== 'number' || isNaN( alpha ) ) {\n\t\tthrow new Error( 'Alpha must be a number' );\n\t}\n\n\tconst r = parseInt( hex.slice( 1, 3 ), 16 );\n\tconst g = parseInt( hex.slice( 3, 5 ), 16 );\n\tconst b = parseInt( hex.slice( 5, 7 ), 16 );\n\treturn `rgba(${ r }, ${ g }, ${ b }, ${ alpha })`;\n};\n","import type { ChartTheme, CompleteChartTheme } from '../../types';\n\n/**\n * Default theme configuration\n */\nconst defaultTheme: CompleteChartTheme = {\n\tbackgroundColor: '#FFFFFF', // chart background color\n\tlabelBackgroundColor: 'transparent', // label background color (transparent by default)\n\tlabelTextColor: '#FFFFFF', // label text color (white to match original behavior)\n\tcolors: [ '#98C8DF', '#006DAB', '#A6DC80', '#1F9828', '#FF8C8F' ],\n\tgridStyles: {\n\t\tstroke: '#DCDCDE',\n\t\tstrokeWidth: 1,\n\t},\n\ttickLength: 4,\n\tgridColor: '',\n\tgridColorDark: '',\n\txTickLineStyles: { stroke: 'black' },\n\txAxisLineStyles: { stroke: '#DCDCDE', strokeWidth: 1 },\n\tlegendLabelStyles: {\n\t\tcolor: 'var(--jp-gray-80, #2c3338)',\n\t},\n\tlegendContainerStyles: {},\n\tseriesLineStyles: [],\n\tlegendShapeStyles: [],\n\tglyphs: [],\n\tannotationStyles: {\n\t\tlabel: {\n\t\t\tanchorLineStroke: 'var(--jp-gray-80, #2c3338)',\n\t\t\tbackgroundFill: '#fff',\n\t\t},\n\t\tconnector: {\n\t\t\tstroke: 'var(--jp-gray-80, #2c3338)',\n\t\t},\n\t\tcircleSubject: {\n\t\t\tstroke: 'transparent',\n\t\t\tfill: 'var(--jp-gray-80, #2c3338)',\n\t\t\tradius: 5,\n\t\t},\n\t},\n\tleaderboardChart: {\n\t\trowGap: 12,\n\t\tcolumnGap: 4,\n\t\tlabelSpacing: 1.5,\n\t\tprimaryColor: '#006DAB',\n\t\tsecondaryColor: '#98C8DF',\n\t\tdeltaColors: [ '#FF8C8F', '#757575', '#1F9828' ], // [negative, neutral, positive]\n\t},\n\tconversionFunnelChart: {\n\t\tprimaryColor: '#3858E9',\n\t\tbackgroundColor: '#F3F4F6',\n\t\tpositiveChangeColor: '#008A20',\n\t\tnegativeChangeColor: '#D63638',\n\t},\n\tlineChart: {\n\t\tlineStyles: {\n\t\t\tcomparison: {\n\t\t\t\tstrokeDasharray: '4 4',\n\t\t\t\tstrokeLinecap: 'square',\n\t\t\t},\n\t\t},\n\t},\n};\n\n/**\n * Jetpack theme configuration\n */\nconst jetpackTheme: ChartTheme = {\n\tbackgroundColor: '#FFFFFF', // chart background color\n\tlabelBackgroundColor: 'transparent', // label background color (transparent by default)\n\tlabelTextColor: '#FFFFFF', // label text color (white to match original behavior)\n\tcolors: [ '#98C8DF', '#006DAB', '#A6DC80', '#1F9828', '#FF8C8F' ],\n\tgridStyles: {\n\t\tstroke: '#DCDCDE',\n\t\tstrokeWidth: 1,\n\t},\n\ttickLength: 4,\n\tgridColor: '',\n\tgridColorDark: '',\n\txTickLineStyles: { stroke: 'black' },\n\txAxisLineStyles: { stroke: '#DCDCDE', strokeWidth: 1 },\n\tlegendLabelStyles: {\n\t\tcolor: 'var(--jp-gray-80, #2c3338)',\n\t},\n\tannotationStyles: {\n\t\tlabel: {\n\t\t\tanchorLineStroke: 'var(--jp-gray-80, #2c3338)',\n\t\t\tbackgroundFill: '#fff',\n\t\t},\n\t\tconnector: {\n\t\t\tstroke: 'var(--jp-gray-80, #2c3338)',\n\t\t},\n\t\tcircleSubject: {\n\t\t\tstroke: 'transparent',\n\t\t\tfill: 'var(--jp-gray-80, #2c3338)',\n\t\t\tradius: 5,\n\t\t},\n\t},\n\tleaderboardChart: {\n\t\trowGap: 12,\n\t\tcolumnGap: 4,\n\t\tlabelSpacing: 1.5,\n\t\tprimaryColor: '#006DAB',\n\t\tsecondaryColor: '#98C8DF',\n\t\tdeltaColors: [ '#FF8C8F', '#757575', '#1F9828' ], // [negative, neutral, positive]\n\t},\n\tconversionFunnelChart: {\n\t\tprimaryColor: '#006DAB',\n\t\tbackgroundColor: '#F3F4F6',\n\t\tpositiveChangeColor: '#1F9828',\n\t\tnegativeChangeColor: '#FF8C8F',\n\t},\n\tlineChart: {\n\t\tlineStyles: {\n\t\t\tcomparison: {\n\t\t\t\tstrokeDasharray: '4 4',\n\t\t\t\tstrokeLinecap: 'square',\n\t\t\t},\n\t\t},\n\t},\n};\n\n/**\n * Woo theme configuration\n */\nconst wooTheme: ChartTheme = {\n\tbackgroundColor: '#FFFFFF', // chart background color\n\tlabelBackgroundColor: 'transparent', // label background color (transparent by default)\n\tlabelTextColor: '#FFFFFF', // label text color (white to match original behavior)\n\tcolors: [\n\t\t'#3858E9', // WooCommerce brand blue\n\t\t'#873EFF', // Purple\n\t\t'#66BDFF', // Light blue\n\t\t'#7B90FF', // Periwinkle blue\n\t\t'#EB6594', // Pink/rose\n\t],\n\tgridStyles: {\n\t\tstroke: '#787C82',\n\t\tstrokeWidth: 1,\n\t},\n\ttickLength: 4,\n\tgridColor: '',\n\tgridColorDark: '',\n\txTickLineStyles: { stroke: 'black' },\n\txAxisLineStyles: { stroke: '#DCDCDE', strokeWidth: 1 },\n\tlegendLabelStyles: {\n\t\tfontSize: '12px',\n\t\tfontWeight: 400,\n\t\tcolor: '#757575',\n\t},\n\tlegendContainerStyles: {\n\t\tgap: '8px',\n\t},\n\tannotationStyles: {\n\t\tlabel: {\n\t\t\tanchorLineStroke: 'black',\n\t\t\tbackgroundFill: '#fff',\n\t\t},\n\t\tconnector: {\n\t\t\tstroke: 'black',\n\t\t},\n\t\tcircleSubject: {\n\t\t\tstroke: 'transparent',\n\t\t\tfill: 'black',\n\t\t\tradius: 5,\n\t\t},\n\t},\n\tleaderboardChart: {\n\t\trowGap: 12,\n\t\tcolumnGap: 4,\n\t\tlabelSpacing: 1.5,\n\t\tprimaryColor: '#3858E9',\n\t\tsecondaryColor: '#66BDFF',\n\t\tdeltaColors: [ '#D63638', '#757575', '#008A20' ], // [negative, neutral, positive]\n\t},\n\tconversionFunnelChart: {\n\t\tprimaryColor: '#3858E9',\n\t\tbackgroundColor: '#F3F4F6',\n\t\tpositiveChangeColor: '#008A20',\n\t\tnegativeChangeColor: '#D63638',\n\t},\n\tlineChart: {\n\t\tlineStyles: {\n\t\t\tcomparison: {\n\t\t\t\tstrokeDasharray: '4 4',\n\t\t\t\tstrokeWidth: 1.5,\n\t\t\t\tstrokeLinecap: 'square',\n\t\t\t},\n\t\t},\n\t},\n};\n\nexport { defaultTheme, jetpackTheme, wooTheme };\n","import { useContext } from 'react';\nimport { GlobalChartsContext } from '../global-charts-provider';\nimport type { GlobalChartsContextValue } from '../types';\n\nexport const useGlobalChartsContext = (): GlobalChartsContextValue => {\n\tconst context = useContext( GlobalChartsContext );\n\tif ( ! context ) {\n\t\tthrow new Error( 'useGlobalChartsContext must be used within a GlobalChartsProvider' );\n\t}\n\treturn context;\n};\n","import { useId } from 'react';\n\nexport const useChartId = ( providedId?: string ): string => {\n\tconst generatedId = useId();\n\treturn providedId || generatedId;\n};\n","import { useEffect, useMemo } from 'react';\nimport { useDeepMemo } from '../../../hooks';\nimport { useGlobalChartsContext } from './use-global-charts-context';\nimport type { BaseLegendItem } from '../../../components/legend';\n\nexport const useChartRegistration = ( {\n\tchartId,\n\tlegendItems,\n\tchartType,\n\tisDataValid,\n\tmetadata,\n}: {\n\tchartId: string;\n\tlegendItems: BaseLegendItem[];\n\tchartType: string;\n\tisDataValid: boolean;\n\tmetadata?: Record< string, unknown >;\n} ): void => {\n\tconst { registerChart, unregisterChart } = useGlobalChartsContext();\n\n\t// Memoize legendItems with deep comparison to prevent infinite loops\n\tconst stableLegendItems = useDeepMemo( legendItems );\n\n\t// Memoize metadata to prevent unnecessary re-renders\n\tconst memoizedMetadata = useMemo( () => metadata, [ metadata ] );\n\n\tuseEffect( () => {\n\t\t// Only register if data is valid\n\t\tif ( isDataValid ) {\n\t\t\tregisterChart( chartId, {\n\t\t\t\tlegendItems: stableLegendItems,\n\t\t\t\tchartType,\n\t\t\t\tmetadata: memoizedMetadata,\n\t\t\t} );\n\t\t}\n\n\t\treturn () => {\n\t\t\tunregisterChart( chartId );\n\t\t};\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [\n\t\tchartId,\n\t\tstableLegendItems,\n\t\tchartType,\n\t\tmemoizedMetadata,\n\t\tisDataValid,\n\t\t// Removed registerChart and unregisterChart from dependencies\n\t\t// They are stable functions created with useCallback and empty deps\n\t] );\n};\n","import isEqual from 'fast-deep-equal';\nimport { useRef } from 'react';\n\n/**\n * Custom hook to memoize a value using deep equality comparison.\n * Prevents unnecessary re-renders when objects have the same content but different references.\n *\n * @param value - The value to memoize with deep equality comparison\n * @return The memoized value that only changes when deeply different\n */\nexport const useDeepMemo = < T >( value: T ): T => {\n\tconst ref = useRef< T >( value );\n\n\tif ( ! isEqual( ref.current, value ) ) {\n\t\tref.current = value;\n\t}\n\n\treturn ref.current;\n};\n","import { localPoint } from '@visx/event';\nimport { useTooltip } from '@visx/tooltip';\nimport { useCallback, type MouseEvent } from 'react';\nimport type { DataPoint } from '../types';\n\ntype UseChartMouseHandlerProps = {\n\t/**\n\t * Whether tooltips are enabled\n\t */\n\twithTooltips: boolean;\n};\n\ntype UseChartMouseHandlerReturn = {\n\t/**\n\t * Handler for mouse move events\n\t */\n\tonMouseMove: ( event: MouseEvent< SVGElement >, data: DataPoint ) => void;\n\t/**\n\t * Handler for mouse leave events\n\t */\n\tonMouseLeave: () => void;\n\t/**\n\t * Whether the tooltip is currently open\n\t */\n\ttooltipOpen: boolean;\n\t/**\n\t * The current tooltip data\n\t */\n\ttooltipData: DataPoint | null;\n\t/**\n\t * The current tooltip left position\n\t */\n\ttooltipLeft: number | undefined;\n\t/**\n\t * The current tooltip top position\n\t */\n\ttooltipTop: number | undefined;\n};\n\n/**\n * Hook to handle mouse interactions for chart components\n *\n * @param {UseChartMouseHandlerProps} props - Hook configuration\n * @return {UseChartMouseHandlerReturn} Object containing handlers and tooltip state\n */\nexport const useChartMouseHandler = ( {\n\twithTooltips,\n}: UseChartMouseHandlerProps ): UseChartMouseHandlerReturn => {\n\tconst { tooltipOpen, tooltipLeft, tooltipTop, tooltipData, hideTooltip, showTooltip } =\n\t\tuseTooltip< DataPoint >();\n\n\t// TODO: either debounce/throttle or use useTooltipInPortal with built-in debounce\n\tconst onMouseMove = useCallback(\n\t\t( event: MouseEvent< SVGElement >, data: DataPoint ) => {\n\t\t\tif ( ! withTooltips ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst coords = localPoint( event );\n\t\t\tif ( ! coords ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tshowTooltip( {\n\t\t\t\ttooltipData: data,\n\t\t\t\ttooltipLeft: coords.x,\n\t\t\t\ttooltipTop: coords.y - 10,\n\t\t\t} );\n\t\t},\n\t\t[ withTooltips, showTooltip ]\n\t);\n\n\tconst onMouseLeave = useCallback( () => {\n\t\tif ( ! withTooltips ) {\n\t\t\treturn;\n\t\t}\n\t\thideTooltip();\n\t}, [ withTooltips, hideTooltip ] );\n\n\treturn {\n\t\tonMouseMove,\n\t\tonMouseLeave,\n\t\ttooltipOpen,\n\t\ttooltipData: tooltipData || null,\n\t\ttooltipLeft,\n\t\ttooltipTop,\n\t};\n};\n","import { buildChartTheme } from '@visx/xychart';\nimport { useMemo } from 'react';\nimport { useGlobalChartsTheme } from '../providers';\nimport type { SeriesData } from '../types';\n\nexport const useXYChartTheme = ( data: SeriesData[] ) => {\n\tconst theme = useGlobalChartsTheme();\n\n\treturn useMemo( () => {\n\t\tconst seriesColors = ( data ?? [] )\n\t\t\t.map( series => series.options?.stroke )\n\t\t\t.filter( ( color ): color is string => Boolean( color ) );\n\n\t\treturn buildChartTheme( {\n\t\t\t...theme,\n\t\t\tcolors: [ ...seriesColors, ...( theme.colors ?? [] ) ],\n\t\t} );\n\t}, [ theme, data ] );\n};\n","import { useMemo } from 'react';\nimport { parseAsLocalDate } from '../utils';\nimport type { SeriesData } from '../types';\n\n/**\n * Hook that transforms and sorts chart data, handling date parsing and sorting\n *\n * This hook extracts the common data transformation logic used in both line-chart\n * and bar-chart components. It:\n * 1. Parses date strings into Date objects using parseAsLocalDate\n * 2. Sorts data points by date when date properties are present\n * 3. Returns the original data unchanged when no date properties are found\n *\n * @param {SeriesData[]} data - The raw chart data to transform\n * @return {SeriesData[]} The transformed and sorted data\n */\nexport const useChartDataTransform = ( data: SeriesData[] ) => {\n\treturn useMemo( () => {\n\t\t// Check if the first data point has date or dateString properties\n\t\tconst firstPoint = data?.[ 0 ]?.data?.[ 0 ];\n\t\tconst hasDateProperties = firstPoint && ( 'date' in firstPoint || 'dateString' in firstPoint );\n\n\t\t// If no date properties found, return data unchanged\n\t\tif ( ! hasDateProperties ) {\n\t\t\treturn data;\n\t\t}\n\n\t\t// Transform and sort data with date properties\n\t\treturn data.map( series => ( {\n\t\t\t...series,\n\t\t\tdata: series.data\n\t\t\t\t.map( point => {\n\t\t\t\t\tlet date: Date | undefined;\n\n\t\t\t\t\tif ( 'date' in point && point.date ) {\n\t\t\t\t\t\tdate = point.date;\n\t\t\t\t\t} else if ( 'dateString' in point && point.dateString ) {\n\t\t\t\t\t\tdate = parseAsLocalDate( point.dateString );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...point,\n\t\t\t\t\t\tdate,\n\t\t\t\t\t};\n\t\t\t\t} )\n\t\t\t\t.sort( ( a, b ) => {\n\t\t\t\t\tif ( ! a.date || ! b.date ) return 0;\n\t\t\t\t\treturn a.date.getTime() - b.date.getTime();\n\t\t\t\t} ),\n\t\t} ) );\n\t}, [ data ] );\n};\n","import { createScale, getTicks } from '@visx/scale';\nimport { useMemo } from 'react';\nimport { getLongestTickWidth } from '../utils';\nimport type { BaseChartProps, DataPointDate, SeriesData } from '../types';\nimport type { XYChartTheme } from '@visx/xychart';\n\nexport const useChartMargin = (\n\theight: number,\n\toptions: BaseChartProps[ 'options' ],\n\tdata: SeriesData[],\n\ttheme: XYChartTheme,\n\thorizontal: boolean = false\n) => {\n\tconst yTicks = useMemo( () => {\n\t\tconst allDataPoints = data.flatMap( series => series.data as DataPointDate[] );\n\n\t\tif ( horizontal ) {\n\t\t\t// When horizontal, y ticks renders fixed tick labels.\n\t\t\treturn allDataPoints.map(\n\t\t\t\td => d.label || options.axis?.y?.tickFormat( d.date.getTime(), 0, [] )\n\t\t\t);\n\t\t}\n\n\t\tconst minY = Math.min( ...allDataPoints.map( d => d.value ) );\n\t\tconst maxY = Math.max( ...allDataPoints.map( d => d.value ) );\n\t\tconst yScale = createScale( {\n\t\t\t...options.yScale,\n\t\t\tdomain: [ minY, maxY ],\n\t\t\trange: [ height, 0 ],\n\t\t} );\n\n\t\treturn getTicks( yScale, options.axis?.y?.numTicks );\n\t}, [ options, data, height, horizontal ] );\n\n\treturn useMemo( () => {\n\t\t// Default margin is for bottom axis labels.\n\t\tconst defaultMargin = { top: 10, right: 20, bottom: 20, left: 20 };\n\t\tconst defaultTickWidth = 40;\n\n\t\t// Auto-calculate margin for y axis labels based on orientation and tick width.\n\t\tconst yAxisOrientation = options.axis?.y?.orientation;\n\t\tconst yAxisStyles =\n\t\t\tyAxisOrientation === 'right' ? theme.axisStyles.y.right : theme.axisStyles.y.left;\n\t\tconst yTickWidth = getLongestTickWidth(\n\t\t\tyTicks,\n\t\t\toptions.axis?.y?.tickFormat,\n\t\t\tyAxisStyles.axisLabel\n\t\t);\n\t\tconst yMarginValue = ( yTickWidth ?? defaultTickWidth ) + ( yAxisStyles?.tickLength ?? 0 );\n\n\t\tif ( yAxisOrientation === 'right' ) {\n\t\t\tdefaultMargin.right = yMarginValue;\n\t\t} else {\n\t\t\tdefaultMargin.left = yMarginValue;\n\t\t}\n\n\t\tif ( options.axis?.x?.orientation === 'top' ) {\n\t\t\tdefaultMargin.top = 20;\n\t\t\tdefaultMargin.bottom = 10;\n\t\t}\n\n\t\treturn defaultMargin;\n\t}, [ options, theme, yTicks ] );\n};\n","import { useState, useCallback, useRef } from 'react';\n\n/**\n * Hook to measure the height of a DOM element.\n * Returns a ref to attach to the element and the current height in pixels.\n *\n * @param {object} props - Optional props.\n * @param {number} props.initialHeight - The initial height to use.\n *\n * @return {[Function, number]} A tuple containing a ref to attach to the element and the current height in pixels\n */\nexport function useElementHeight< T extends HTMLElement = HTMLDivElement >( {\n\tinitialHeight = 0,\n}: {\n\tinitialHeight?: number;\n} = {} ): [ ( node: T | null ) => void, number ] {\n\tconst [ height, setHeight ] = useState( initialHeight );\n\tconst observerRef = useRef< ResizeObserver | null >( null );\n\n\tconst refCallback = useCallback( ( node: T | null ) => {\n\t\tif ( observerRef.current ) {\n\t\t\tobserverRef.current.disconnect();\n\t\t\tobserverRef.current = null;\n\t\t}\n\t\tif ( node ) {\n\t\t\tconst handleResize = () => {\n\t\t\t\tsetHeight( node.getBoundingClientRect().height || 0 );\n\t\t\t};\n\t\t\thandleResize();\n\t\t\tconst resizeObserver = new window.ResizeObserver( handleResize );\n\t\t\tresizeObserver.observe( node );\n\t\t\tobserverRef.current = resizeObserver;\n\t\t}\n\t}, [] );\n\n\treturn [ refCallback, height ];\n}\n","import { useCallback, useRef, useState } from 'react';\n\n/**\n * Hook to detect if text content is truncated within its container.\n * Uses ResizeObserver to dynamically track changes in element size.\n *\n * @param enabled - Whether truncation detection should be active. Defaults to true.\n * @return A tuple containing:\n * - [0] refCallback: Function to attach to the text element as a ref\n * - [1] isTruncated: Boolean indicating if the text is currently truncated\n *\n * @example\n * ```tsx\n * const [textRef, isTruncated] = useTextTruncation(true);\n *\n * return (\n * <span ref={textRef} title={isTruncated ? fullText : undefined}>\n * {text}\n * </span>\n * );\n * ```\n */\nexport function useTextTruncation(\n\tenabled: boolean = true\n): [ ( node: HTMLElement | null ) => void, boolean ] {\n\tconst [ isTruncated, setIsTruncated ] = useState( false );\n\tconst observerRef = useRef< ResizeObserver | null >( null );\n\n\tconst refCallback = useCallback(\n\t\t( node: HTMLElement | null ) => {\n\t\t\t// Cleanup existing observer\n\t\t\tif ( observerRef.current ) {\n\t\t\t\tobserverRef.current.disconnect();\n\t\t\t\tobserverRef.current = null;\n\t\t\t}\n\n\t\t\tif ( node && enabled ) {\n\t\t\t\tconst checkTruncation = () => {\n\t\t\t\t\t// Check if content width exceeds container width (indicates truncation)\n\t\t\t\t\tconst truncated = node.scrollWidth > node.clientWidth;\n\t\t\t\t\tsetIsTruncated( truncated );\n\t\t\t\t};\n\n\t\t\t\t// Initial check\n\t\t\t\tcheckTruncation();\n\n\t\t\t\t// Watch for size changes\n\t\t\t\tconst resizeObserver = new ResizeObserver( checkTruncation );\n\t\t\t\tresizeObserver.observe( node );\n\t\t\t\tobserverRef.current = resizeObserver;\n\t\t\t} else {\n\t\t\t\tsetIsTruncated( false );\n\t\t\t}\n\t\t},\n\t\t[ enabled ]\n\t);\n\n\treturn [ refCallback, isTruncated ];\n}\n","import { useMemo } from 'react';\nimport type { SeriesData, DataPointDate } from '../types';\n\nexport type EnhancedDataPoint = DataPointDate & {\n\tvisualValue?: number;\n};\n\nexport interface EnhancedSeriesData extends Omit< SeriesData, 'data' > {\n\tdata: EnhancedDataPoint[];\n}\n\nexport interface UseZeroValueDisplayOptions {\n\tenabled: boolean;\n\tminValueRatio?: number;\n\tmaxValueRatio?: number;\n}\n\nexport const useZeroValueDisplay = (\n\tdata: SeriesData[],\n\toptions: UseZeroValueDisplayOptions = { enabled: false }\n): SeriesData[] | EnhancedSeriesData[] => {\n\tconst { enabled, minValueRatio = 0.6, maxValueRatio = 0.008 } = options;\n\n\treturn useMemo( () => {\n\t\tif ( ! enabled ) return data;\n\n\t\t// Collect all non-zero, non-null values (both positive and negative)\n\t\tconst nonZeroValues: number[] = [];\n\n\t\tfor ( const series of data ) {\n\t\t\tfor ( const point of series.data ) {\n\t\t\t\tif ( point.value !== null && point.value !== 0 ) {\n\t\t\t\t\tnonZeroValues.push( point.value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( nonZeroValues.length === 0 ) return data;\n\n\t\t// Convert to absolute values to find the range\n\t\tconst absoluteValues = nonZeroValues.map( Math.abs );\n\n\t\t// Calculate min and max based on absolute values\n\t\tconst minAbsoluteValue = Math.min( ...absoluteValues );\n\t\tconst maxAbsoluteValue = Math.max( ...absoluteValues );\n\n\t\t// Calculate minimum visible value using absolute range\n\t\tconst minVisibleValue = Math.min(\n\t\t\tminAbsoluteValue * minValueRatio,\n\t\t\tmaxAbsoluteValue * maxValueRatio\n\t\t);\n\n\t\treturn data.map( series => ( {\n\t\t\t...series,\n\t\t\tdata: series.data.map( ( point ): EnhancedDataPoint => {\n\t\t\t\tif ( point.value === 0 ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...point,\n\t\t\t\t\t\tvisualValue: minVisibleValue,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn point;\n\t\t\t} ),\n\t\t} ) );\n\t}, [ data, enabled, minValueRatio, maxValueRatio ] );\n};\n","import { useContext } from 'react';\nimport { GlobalChartsContext } from '../global-charts-provider';\nimport { defaultTheme } from '../themes';\nimport type { CompleteChartTheme } from '../../../types';\n\n/**\n * Hook to get the global chart theme from GlobalChartsProvider\n *\n * @return The global chart theme\n */\nexport const useGlobalChartsTheme = (): CompleteChartTheme => {\n\t// Get context but don't throw if it doesn't exist (for testing or standalone usage)\n\tconst context = useContext( GlobalChartsContext );\n\tconst globalTheme = context?.theme;\n\n\treturn globalTheme ?? defaultTheme;\n};\n"],"mappings":";A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uBAAuB;AAGlE,QAAM,oBAAoB,YAAa,WAAY;AAGnD,QAAM,mBAAmBC,SAAS,MAAM,UAAU,CAAE,QAAS,CAAE;AAE/D,EAAAC,WAAW,MAAM;AAEhB,QAAK,aAAc;AAClB,oBAAe,SAAS;AAAA,QACvB,aAAa;AAAA,QACb;AAAA,QACA,UAAU;AAAA,MACX,CAAE;AAAA,IACH;AAEA,WAAO,MAAM;AACZ,sBAAiB,OAAQ;AAAA,IAC1B;AAAA,EAED,GAAG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAAA,EAGD,CAAE;AACH;;;ASjDA,SAAS,cAAAC,mBAAkB;AAUpB,IAAM,uBAAuB,MAA0B;AAE7D,QAAM,UAAUC,YAAY,mBAAoB;AAChD,QAAM,cAAc,SAAS;AAE7B,SAAO,eAAe;AACvB;","names":["formatNumber","useEffect","useMemo","useCallback","useMemo","useMemo","useMemo","useMemo","useMemo","useMemo","useState","useCallback","useRef","useCallback","useRef","useState","useMemo","useMemo","useEffect","useContext","useContext"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BarChartResponsive
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GXTFSTZS.js";
|
|
4
4
|
import {
|
|
5
5
|
withResponsive
|
|
6
6
|
} from "./chunk-TYYW4BG3.js";
|
|
7
7
|
import {
|
|
8
8
|
GlobalChartsContext,
|
|
9
9
|
GlobalChartsProvider
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3WXEHYPV.js";
|
|
11
11
|
|
|
12
12
|
// src/components/bar-list-chart/bar-list-chart.tsx
|
|
13
13
|
import { formatNumberCompact } from "@automattic/number-formatters";
|
|
@@ -193,4 +193,4 @@ export {
|
|
|
193
193
|
BarListChart,
|
|
194
194
|
BarListChartResponsive
|
|
195
195
|
};
|
|
196
|
-
//# sourceMappingURL=chunk-
|
|
196
|
+
//# sourceMappingURL=chunk-43QGEIRW.js.map
|