@automattic/charts 1.0.2 → 1.1.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/CHANGELOG.md +11 -0
- package/dist/{chunk-G3PMV62Z.js → chunk-5WRI5ZAA.js} +1 -6
- package/dist/{chunk-EMMSS5I5.cjs → chunk-DZUJEN5N.cjs} +2 -7
- package/dist/chunk-DZUJEN5N.cjs.map +1 -0
- package/dist/index.cjs +519 -1350
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +31 -40
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +619 -1450
- package/dist/index.js.map +1 -1
- package/dist/visx/group/index.cjs +1 -1
- package/dist/visx/group/index.js +1 -1
- package/dist/visx/legend/index.cjs +1 -1
- package/dist/visx/legend/index.js +1 -1
- package/dist/visx/text/index.cjs +1 -1
- package/dist/visx/text/index.js +1 -1
- package/package.json +8 -7
- package/src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss +19 -26
- package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +1 -1
- package/src/charts/leaderboard-chart/leaderboard-chart.tsx +2 -2
- package/src/charts/line-chart/line-chart.module.scss +3 -3
- package/src/charts/line-chart/private/line-chart-annotation-label-popover.tsx +2 -2
- package/src/charts/pie-chart/pie-chart.tsx +5 -3
- package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.module.scss +3 -3
- package/src/components/legend/private/base-legend.module.scss +2 -2
- package/src/components/tooltip/base-tooltip.module.scss +1 -1
- package/src/components/trend-indicator/trend-indicator.module.scss +2 -2
- package/src/hooks/use-chart-margin.tsx +1 -14
- package/src/providers/chart-context/themes.ts +7 -1
- package/src/types.ts +2 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/resolve-font-size.ts +37 -0
- package/src/utils/test/resolve-css-var.test.ts +3 -5
- package/src/utils/test/resolve-font-size.test.ts +66 -0
- package/dist/chunk-EMMSS5I5.cjs.map +0 -1
- /package/dist/{chunk-G3PMV62Z.js.map → chunk-5WRI5ZAA.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -3,41 +3,40 @@ import {
|
|
|
3
3
|
} from "./chunk-NFRB2POF.js";
|
|
4
4
|
import {
|
|
5
5
|
__commonJS,
|
|
6
|
-
__export,
|
|
7
6
|
__toESM
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5WRI5ZAA.js";
|
|
9
8
|
|
|
10
9
|
// ../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
11
10
|
var require_fast_deep_equal = __commonJS({
|
|
12
11
|
"../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
13
12
|
"use strict";
|
|
14
|
-
module.exports = function equal(
|
|
15
|
-
if (
|
|
16
|
-
if (
|
|
17
|
-
if (
|
|
18
|
-
var length2,
|
|
19
|
-
if (Array.isArray(
|
|
20
|
-
length2 =
|
|
21
|
-
if (length2 !=
|
|
22
|
-
for (
|
|
23
|
-
if (!equal(
|
|
13
|
+
module.exports = function equal(a, b) {
|
|
14
|
+
if (a === b) return true;
|
|
15
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
16
|
+
if (a.constructor !== b.constructor) return false;
|
|
17
|
+
var length2, i, keys;
|
|
18
|
+
if (Array.isArray(a)) {
|
|
19
|
+
length2 = a.length;
|
|
20
|
+
if (length2 != b.length) return false;
|
|
21
|
+
for (i = length2; i-- !== 0; )
|
|
22
|
+
if (!equal(a[i], b[i])) return false;
|
|
24
23
|
return true;
|
|
25
24
|
}
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
28
|
-
if (
|
|
29
|
-
keys = Object.keys(
|
|
25
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
26
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
27
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
28
|
+
keys = Object.keys(a);
|
|
30
29
|
length2 = keys.length;
|
|
31
|
-
if (length2 !== Object.keys(
|
|
32
|
-
for (
|
|
33
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
34
|
-
for (
|
|
35
|
-
var key = keys[
|
|
36
|
-
if (!equal(
|
|
30
|
+
if (length2 !== Object.keys(b).length) return false;
|
|
31
|
+
for (i = length2; i-- !== 0; )
|
|
32
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
33
|
+
for (i = length2; i-- !== 0; ) {
|
|
34
|
+
var key = keys[i];
|
|
35
|
+
if (!equal(a[key], b[key])) return false;
|
|
37
36
|
}
|
|
38
37
|
return true;
|
|
39
38
|
}
|
|
40
|
-
return
|
|
39
|
+
return a !== a && b !== b;
|
|
41
40
|
};
|
|
42
41
|
}
|
|
43
42
|
});
|
|
@@ -46,110 +45,110 @@ var require_fast_deep_equal = __commonJS({
|
|
|
46
45
|
var require_react_is_production_min = __commonJS({
|
|
47
46
|
"../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
|
|
48
47
|
"use strict";
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var q =
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
function z(
|
|
69
|
-
if ("object" === typeof
|
|
70
|
-
var
|
|
71
|
-
switch (
|
|
72
|
-
case
|
|
73
|
-
switch (
|
|
74
|
-
case
|
|
75
|
-
case
|
|
76
|
-
case
|
|
77
|
-
case
|
|
78
|
-
case
|
|
79
|
-
case
|
|
80
|
-
return
|
|
48
|
+
var b = "function" === typeof Symbol && Symbol.for;
|
|
49
|
+
var c = b ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
|
|
50
|
+
var d = b ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
|
|
51
|
+
var e = b ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
|
|
52
|
+
var f = b ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
|
|
53
|
+
var g = b ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
|
|
54
|
+
var h = b ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
|
|
55
|
+
var k = b ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
|
|
56
|
+
var l = b ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
|
|
57
|
+
var m = b ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
|
|
58
|
+
var n = b ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
|
|
59
|
+
var p = b ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
|
|
60
|
+
var q = b ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
|
|
61
|
+
var r = b ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
|
|
62
|
+
var t = b ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
|
|
63
|
+
var v = b ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
|
|
64
|
+
var w = b ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
|
|
65
|
+
var x = b ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
|
|
66
|
+
var y = b ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
67
|
+
function z(a) {
|
|
68
|
+
if ("object" === typeof a && null !== a) {
|
|
69
|
+
var u = a.$$typeof;
|
|
70
|
+
switch (u) {
|
|
71
|
+
case c:
|
|
72
|
+
switch (a = a.type, a) {
|
|
73
|
+
case l:
|
|
74
|
+
case m:
|
|
75
|
+
case e:
|
|
76
|
+
case g:
|
|
77
|
+
case f:
|
|
78
|
+
case p:
|
|
79
|
+
return a;
|
|
81
80
|
default:
|
|
82
|
-
switch (
|
|
83
|
-
case
|
|
84
|
-
case
|
|
85
|
-
case
|
|
86
|
-
case
|
|
87
|
-
case
|
|
88
|
-
return
|
|
81
|
+
switch (a = a && a.$$typeof, a) {
|
|
82
|
+
case k:
|
|
83
|
+
case n:
|
|
84
|
+
case t:
|
|
85
|
+
case r:
|
|
86
|
+
case h:
|
|
87
|
+
return a;
|
|
89
88
|
default:
|
|
90
|
-
return
|
|
89
|
+
return u;
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
|
-
case
|
|
94
|
-
return
|
|
92
|
+
case d:
|
|
93
|
+
return u;
|
|
95
94
|
}
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
|
-
function A(
|
|
99
|
-
return z(
|
|
100
|
-
}
|
|
101
|
-
exports.AsyncMode =
|
|
102
|
-
exports.ConcurrentMode =
|
|
103
|
-
exports.ContextConsumer =
|
|
104
|
-
exports.ContextProvider =
|
|
105
|
-
exports.Element =
|
|
106
|
-
exports.ForwardRef =
|
|
107
|
-
exports.Fragment =
|
|
108
|
-
exports.Lazy =
|
|
109
|
-
exports.Memo =
|
|
110
|
-
exports.Portal =
|
|
111
|
-
exports.Profiler =
|
|
112
|
-
exports.StrictMode =
|
|
113
|
-
exports.Suspense =
|
|
114
|
-
exports.isAsyncMode = function(
|
|
115
|
-
return A(
|
|
97
|
+
function A(a) {
|
|
98
|
+
return z(a) === m;
|
|
99
|
+
}
|
|
100
|
+
exports.AsyncMode = l;
|
|
101
|
+
exports.ConcurrentMode = m;
|
|
102
|
+
exports.ContextConsumer = k;
|
|
103
|
+
exports.ContextProvider = h;
|
|
104
|
+
exports.Element = c;
|
|
105
|
+
exports.ForwardRef = n;
|
|
106
|
+
exports.Fragment = e;
|
|
107
|
+
exports.Lazy = t;
|
|
108
|
+
exports.Memo = r;
|
|
109
|
+
exports.Portal = d;
|
|
110
|
+
exports.Profiler = g;
|
|
111
|
+
exports.StrictMode = f;
|
|
112
|
+
exports.Suspense = p;
|
|
113
|
+
exports.isAsyncMode = function(a) {
|
|
114
|
+
return A(a) || z(a) === l;
|
|
116
115
|
};
|
|
117
116
|
exports.isConcurrentMode = A;
|
|
118
|
-
exports.isContextConsumer = function(
|
|
119
|
-
return z(
|
|
117
|
+
exports.isContextConsumer = function(a) {
|
|
118
|
+
return z(a) === k;
|
|
120
119
|
};
|
|
121
|
-
exports.isContextProvider = function(
|
|
122
|
-
return z(
|
|
120
|
+
exports.isContextProvider = function(a) {
|
|
121
|
+
return z(a) === h;
|
|
123
122
|
};
|
|
124
|
-
exports.isElement = function(
|
|
125
|
-
return "object" === typeof
|
|
123
|
+
exports.isElement = function(a) {
|
|
124
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
126
125
|
};
|
|
127
|
-
exports.isForwardRef = function(
|
|
128
|
-
return z(
|
|
126
|
+
exports.isForwardRef = function(a) {
|
|
127
|
+
return z(a) === n;
|
|
129
128
|
};
|
|
130
|
-
exports.isFragment = function(
|
|
131
|
-
return z(
|
|
129
|
+
exports.isFragment = function(a) {
|
|
130
|
+
return z(a) === e;
|
|
132
131
|
};
|
|
133
|
-
exports.isLazy = function(
|
|
134
|
-
return z(
|
|
132
|
+
exports.isLazy = function(a) {
|
|
133
|
+
return z(a) === t;
|
|
135
134
|
};
|
|
136
|
-
exports.isMemo = function(
|
|
137
|
-
return z(
|
|
135
|
+
exports.isMemo = function(a) {
|
|
136
|
+
return z(a) === r;
|
|
138
137
|
};
|
|
139
|
-
exports.isPortal = function(
|
|
140
|
-
return z(
|
|
138
|
+
exports.isPortal = function(a) {
|
|
139
|
+
return z(a) === d;
|
|
141
140
|
};
|
|
142
|
-
exports.isProfiler = function(
|
|
143
|
-
return z(
|
|
141
|
+
exports.isProfiler = function(a) {
|
|
142
|
+
return z(a) === g;
|
|
144
143
|
};
|
|
145
|
-
exports.isStrictMode = function(
|
|
146
|
-
return z(
|
|
144
|
+
exports.isStrictMode = function(a) {
|
|
145
|
+
return z(a) === f;
|
|
147
146
|
};
|
|
148
|
-
exports.isSuspense = function(
|
|
149
|
-
return z(
|
|
147
|
+
exports.isSuspense = function(a) {
|
|
148
|
+
return z(a) === p;
|
|
150
149
|
};
|
|
151
|
-
exports.isValidElementType = function(
|
|
152
|
-
return "string" === typeof
|
|
150
|
+
exports.isValidElementType = function(a) {
|
|
151
|
+
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
153
152
|
};
|
|
154
153
|
exports.typeOf = z;
|
|
155
154
|
}
|
|
@@ -393,13 +392,13 @@ var require_hoist_non_react_statics_cjs = __commonJS({
|
|
|
393
392
|
}
|
|
394
393
|
var targetStatics = getStatics(targetComponent);
|
|
395
394
|
var sourceStatics = getStatics(sourceComponent);
|
|
396
|
-
for (var
|
|
397
|
-
var key = keys[
|
|
395
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
396
|
+
var key = keys[i];
|
|
398
397
|
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
|
399
398
|
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
400
399
|
try {
|
|
401
400
|
defineProperty(targetComponent, key, descriptor);
|
|
402
|
-
} catch (
|
|
401
|
+
} catch (e) {
|
|
403
402
|
}
|
|
404
403
|
}
|
|
405
404
|
}
|
|
@@ -414,234 +413,64 @@ var require_hoist_non_react_statics_cjs = __commonJS({
|
|
|
414
413
|
var require_es6 = __commonJS({
|
|
415
414
|
"../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/es6/index.js"(exports, module) {
|
|
416
415
|
"use strict";
|
|
417
|
-
module.exports = function equal(
|
|
418
|
-
if (
|
|
419
|
-
if (
|
|
420
|
-
if (
|
|
421
|
-
var length2,
|
|
422
|
-
if (Array.isArray(
|
|
423
|
-
length2 =
|
|
424
|
-
if (length2 !=
|
|
425
|
-
for (
|
|
426
|
-
if (!equal(
|
|
416
|
+
module.exports = function equal(a, b) {
|
|
417
|
+
if (a === b) return true;
|
|
418
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
419
|
+
if (a.constructor !== b.constructor) return false;
|
|
420
|
+
var length2, i, keys;
|
|
421
|
+
if (Array.isArray(a)) {
|
|
422
|
+
length2 = a.length;
|
|
423
|
+
if (length2 != b.length) return false;
|
|
424
|
+
for (i = length2; i-- !== 0; )
|
|
425
|
+
if (!equal(a[i], b[i])) return false;
|
|
427
426
|
return true;
|
|
428
427
|
}
|
|
429
|
-
if (
|
|
430
|
-
if (
|
|
431
|
-
for (
|
|
432
|
-
if (!
|
|
433
|
-
for (
|
|
434
|
-
if (!equal(
|
|
428
|
+
if (a instanceof Map && b instanceof Map) {
|
|
429
|
+
if (a.size !== b.size) return false;
|
|
430
|
+
for (i of a.entries())
|
|
431
|
+
if (!b.has(i[0])) return false;
|
|
432
|
+
for (i of a.entries())
|
|
433
|
+
if (!equal(i[1], b.get(i[0]))) return false;
|
|
435
434
|
return true;
|
|
436
435
|
}
|
|
437
|
-
if (
|
|
438
|
-
if (
|
|
439
|
-
for (
|
|
440
|
-
if (!
|
|
436
|
+
if (a instanceof Set && b instanceof Set) {
|
|
437
|
+
if (a.size !== b.size) return false;
|
|
438
|
+
for (i of a.entries())
|
|
439
|
+
if (!b.has(i[0])) return false;
|
|
441
440
|
return true;
|
|
442
441
|
}
|
|
443
|
-
if (ArrayBuffer.isView(
|
|
444
|
-
length2 =
|
|
445
|
-
if (length2 !=
|
|
446
|
-
for (
|
|
447
|
-
if (
|
|
442
|
+
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
443
|
+
length2 = a.length;
|
|
444
|
+
if (length2 != b.length) return false;
|
|
445
|
+
for (i = length2; i-- !== 0; )
|
|
446
|
+
if (a[i] !== b[i]) return false;
|
|
448
447
|
return true;
|
|
449
448
|
}
|
|
450
|
-
if (
|
|
451
|
-
if (
|
|
452
|
-
if (
|
|
453
|
-
keys = Object.keys(
|
|
449
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
450
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
451
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
452
|
+
keys = Object.keys(a);
|
|
454
453
|
length2 = keys.length;
|
|
455
|
-
if (length2 !== Object.keys(
|
|
456
|
-
for (
|
|
457
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
458
|
-
for (
|
|
459
|
-
var key = keys[
|
|
460
|
-
if (!equal(
|
|
454
|
+
if (length2 !== Object.keys(b).length) return false;
|
|
455
|
+
for (i = length2; i-- !== 0; )
|
|
456
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
457
|
+
for (i = length2; i-- !== 0; ) {
|
|
458
|
+
var key = keys[i];
|
|
459
|
+
if (!equal(a[key], b[key])) return false;
|
|
461
460
|
}
|
|
462
461
|
return true;
|
|
463
462
|
}
|
|
464
|
-
return
|
|
463
|
+
return a !== a && b !== b;
|
|
465
464
|
};
|
|
466
465
|
}
|
|
467
466
|
});
|
|
468
467
|
|
|
469
|
-
// ../../../node_modules/.pnpm/highlight-words-core@1.2.3/node_modules/highlight-words-core/dist/index.js
|
|
470
|
-
var require_dist = __commonJS({
|
|
471
|
-
"../../../node_modules/.pnpm/highlight-words-core@1.2.3/node_modules/highlight-words-core/dist/index.js"(exports, module) {
|
|
472
|
-
module.exports = /******/
|
|
473
|
-
(function(modules) {
|
|
474
|
-
var installedModules = {};
|
|
475
|
-
function __webpack_require__(moduleId) {
|
|
476
|
-
if (installedModules[moduleId])
|
|
477
|
-
return installedModules[moduleId].exports;
|
|
478
|
-
var module2 = installedModules[moduleId] = {
|
|
479
|
-
/******/
|
|
480
|
-
exports: {},
|
|
481
|
-
/******/
|
|
482
|
-
id: moduleId,
|
|
483
|
-
/******/
|
|
484
|
-
loaded: false
|
|
485
|
-
/******/
|
|
486
|
-
};
|
|
487
|
-
modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__);
|
|
488
|
-
module2.loaded = true;
|
|
489
|
-
return module2.exports;
|
|
490
|
-
}
|
|
491
|
-
__webpack_require__.m = modules;
|
|
492
|
-
__webpack_require__.c = installedModules;
|
|
493
|
-
__webpack_require__.p = "";
|
|
494
|
-
return __webpack_require__(0);
|
|
495
|
-
})([
|
|
496
|
-
/* 0 */
|
|
497
|
-
/***/
|
|
498
|
-
(function(module2, exports2, __webpack_require__) {
|
|
499
|
-
module2.exports = __webpack_require__(1);
|
|
500
|
-
}),
|
|
501
|
-
/* 1 */
|
|
502
|
-
/***/
|
|
503
|
-
(function(module2, exports2, __webpack_require__) {
|
|
504
|
-
"use strict";
|
|
505
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
506
|
-
value: true
|
|
507
|
-
});
|
|
508
|
-
var _utils = __webpack_require__(2);
|
|
509
|
-
Object.defineProperty(exports2, "combineChunks", {
|
|
510
|
-
enumerable: true,
|
|
511
|
-
get: function get() {
|
|
512
|
-
return _utils.combineChunks;
|
|
513
|
-
}
|
|
514
|
-
});
|
|
515
|
-
Object.defineProperty(exports2, "fillInChunks", {
|
|
516
|
-
enumerable: true,
|
|
517
|
-
get: function get() {
|
|
518
|
-
return _utils.fillInChunks;
|
|
519
|
-
}
|
|
520
|
-
});
|
|
521
|
-
Object.defineProperty(exports2, "findAll", {
|
|
522
|
-
enumerable: true,
|
|
523
|
-
get: function get() {
|
|
524
|
-
return _utils.findAll;
|
|
525
|
-
}
|
|
526
|
-
});
|
|
527
|
-
Object.defineProperty(exports2, "findChunks", {
|
|
528
|
-
enumerable: true,
|
|
529
|
-
get: function get() {
|
|
530
|
-
return _utils.findChunks;
|
|
531
|
-
}
|
|
532
|
-
});
|
|
533
|
-
}),
|
|
534
|
-
/* 2 */
|
|
535
|
-
/***/
|
|
536
|
-
(function(module2, exports2) {
|
|
537
|
-
"use strict";
|
|
538
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
539
|
-
value: true
|
|
540
|
-
});
|
|
541
|
-
var findAll2 = exports2.findAll = function findAll3(_ref2) {
|
|
542
|
-
var autoEscape = _ref2.autoEscape, _ref$caseSensitive = _ref2.caseSensitive, caseSensitive = _ref$caseSensitive === void 0 ? false : _ref$caseSensitive, _ref$findChunks = _ref2.findChunks, findChunks = _ref$findChunks === void 0 ? defaultFindChunks : _ref$findChunks, sanitize = _ref2.sanitize, searchWords = _ref2.searchWords, textToHighlight = _ref2.textToHighlight;
|
|
543
|
-
return fillInChunks({
|
|
544
|
-
chunksToHighlight: combineChunks({
|
|
545
|
-
chunks: findChunks({
|
|
546
|
-
autoEscape,
|
|
547
|
-
caseSensitive,
|
|
548
|
-
sanitize,
|
|
549
|
-
searchWords,
|
|
550
|
-
textToHighlight
|
|
551
|
-
})
|
|
552
|
-
}),
|
|
553
|
-
totalLength: textToHighlight ? textToHighlight.length : 0
|
|
554
|
-
});
|
|
555
|
-
};
|
|
556
|
-
var combineChunks = exports2.combineChunks = function combineChunks2(_ref2) {
|
|
557
|
-
var chunks = _ref2.chunks;
|
|
558
|
-
chunks = chunks.sort(function(first, second) {
|
|
559
|
-
return first.start - second.start;
|
|
560
|
-
}).reduce(function(processedChunks, nextChunk) {
|
|
561
|
-
if (processedChunks.length === 0) {
|
|
562
|
-
return [nextChunk];
|
|
563
|
-
} else {
|
|
564
|
-
var prevChunk = processedChunks.pop();
|
|
565
|
-
if (nextChunk.start < prevChunk.end) {
|
|
566
|
-
var endIndex = Math.max(prevChunk.end, nextChunk.end);
|
|
567
|
-
processedChunks.push({ highlight: false, start: prevChunk.start, end: endIndex });
|
|
568
|
-
} else {
|
|
569
|
-
processedChunks.push(prevChunk, nextChunk);
|
|
570
|
-
}
|
|
571
|
-
return processedChunks;
|
|
572
|
-
}
|
|
573
|
-
}, []);
|
|
574
|
-
return chunks;
|
|
575
|
-
};
|
|
576
|
-
var defaultFindChunks = function defaultFindChunks2(_ref3) {
|
|
577
|
-
var autoEscape = _ref3.autoEscape, caseSensitive = _ref3.caseSensitive, _ref3$sanitize = _ref3.sanitize, sanitize = _ref3$sanitize === void 0 ? defaultSanitize : _ref3$sanitize, searchWords = _ref3.searchWords, textToHighlight = _ref3.textToHighlight;
|
|
578
|
-
textToHighlight = sanitize(textToHighlight);
|
|
579
|
-
return searchWords.filter(function(searchWord) {
|
|
580
|
-
return searchWord;
|
|
581
|
-
}).reduce(function(chunks, searchWord) {
|
|
582
|
-
searchWord = sanitize(searchWord);
|
|
583
|
-
if (autoEscape) {
|
|
584
|
-
searchWord = escapeRegExpFn(searchWord);
|
|
585
|
-
}
|
|
586
|
-
var regex = new RegExp(searchWord, caseSensitive ? "g" : "gi");
|
|
587
|
-
var match2 = void 0;
|
|
588
|
-
while (match2 = regex.exec(textToHighlight)) {
|
|
589
|
-
var _start = match2.index;
|
|
590
|
-
var _end = regex.lastIndex;
|
|
591
|
-
if (_end > _start) {
|
|
592
|
-
chunks.push({ highlight: false, start: _start, end: _end });
|
|
593
|
-
}
|
|
594
|
-
if (match2.index === regex.lastIndex) {
|
|
595
|
-
regex.lastIndex++;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
return chunks;
|
|
599
|
-
}, []);
|
|
600
|
-
};
|
|
601
|
-
exports2.findChunks = defaultFindChunks;
|
|
602
|
-
var fillInChunks = exports2.fillInChunks = function fillInChunks2(_ref4) {
|
|
603
|
-
var chunksToHighlight = _ref4.chunksToHighlight, totalLength = _ref4.totalLength;
|
|
604
|
-
var allChunks = [];
|
|
605
|
-
var append2 = function append3(start, end, highlight) {
|
|
606
|
-
if (end - start > 0) {
|
|
607
|
-
allChunks.push({
|
|
608
|
-
start,
|
|
609
|
-
end,
|
|
610
|
-
highlight
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
if (chunksToHighlight.length === 0) {
|
|
615
|
-
append2(0, totalLength, false);
|
|
616
|
-
} else {
|
|
617
|
-
var lastIndex = 0;
|
|
618
|
-
chunksToHighlight.forEach(function(chunk) {
|
|
619
|
-
append2(lastIndex, chunk.start, false);
|
|
620
|
-
append2(chunk.start, chunk.end, true);
|
|
621
|
-
lastIndex = chunk.end;
|
|
622
|
-
});
|
|
623
|
-
append2(lastIndex, totalLength, false);
|
|
624
|
-
}
|
|
625
|
-
return allChunks;
|
|
626
|
-
};
|
|
627
|
-
function defaultSanitize(string) {
|
|
628
|
-
return string;
|
|
629
|
-
}
|
|
630
|
-
function escapeRegExpFn(string) {
|
|
631
|
-
return string.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
632
|
-
}
|
|
633
|
-
})
|
|
634
|
-
/******/
|
|
635
|
-
]);
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
|
|
639
468
|
// src/charts/bar-chart/bar-chart.tsx
|
|
640
469
|
import { formatNumber as formatNumber5 } from "@automattic/number-formatters";
|
|
641
470
|
import { PatternLines, PatternCircles, PatternWaves, PatternHexagons } from "@visx/pattern";
|
|
642
471
|
import { Axis, BarSeries, BarGroup, Grid, XYChart } from "@visx/xychart";
|
|
643
472
|
import { __ } from "@wordpress/i18n";
|
|
644
|
-
import
|
|
473
|
+
import clsx3 from "clsx";
|
|
645
474
|
import { useCallback as useCallback7, useContext as useContext9, useState as useState6, useRef as useRef7, useMemo as useMemo15 } from "react";
|
|
646
475
|
|
|
647
476
|
// src/components/legend/legend.tsx
|
|
@@ -979,8 +808,8 @@ var parseHslString = (hslString) => {
|
|
|
979
808
|
if (isNaN(parsed.h) && isNaN(parsed.s) && isNaN(parsed.l)) {
|
|
980
809
|
return null;
|
|
981
810
|
}
|
|
982
|
-
const
|
|
983
|
-
return [
|
|
811
|
+
const h = isNaN(parsed.h) ? 0 : (parsed.h % 360 + 360) % 360;
|
|
812
|
+
return [h, parsed.s * 100, parsed.l * 100];
|
|
984
813
|
};
|
|
985
814
|
var parseRgbString = (rgbString) => {
|
|
986
815
|
const lower = rgbString.toLowerCase().trim();
|
|
@@ -1002,10 +831,10 @@ var normalizeColorToHex = (color, element, resolveCss, _depth = 0) => {
|
|
|
1002
831
|
}
|
|
1003
832
|
const trimmed = color.trim().toLowerCase();
|
|
1004
833
|
if (/^#[0-9a-f]{3}$/i.test(trimmed)) {
|
|
1005
|
-
const
|
|
1006
|
-
const
|
|
1007
|
-
const
|
|
1008
|
-
return `#${
|
|
834
|
+
const r = trimmed[1];
|
|
835
|
+
const g = trimmed[2];
|
|
836
|
+
const b = trimmed[3];
|
|
837
|
+
return `#${r}${r}${g}${g}${b}${b}`;
|
|
1009
838
|
}
|
|
1010
839
|
if (trimmed.startsWith("--") || trimmed.startsWith("var(")) {
|
|
1011
840
|
if (resolveCss) {
|
|
@@ -1031,12 +860,12 @@ var normalizeColorToHex = (color, element, resolveCss, _depth = 0) => {
|
|
|
1031
860
|
};
|
|
1032
861
|
var lightenHexColor = (hex, blend) => {
|
|
1033
862
|
validateHexColor(hex);
|
|
1034
|
-
const
|
|
1035
|
-
const
|
|
1036
|
-
const
|
|
1037
|
-
const newR = Math.round(
|
|
1038
|
-
const newG = Math.round(
|
|
1039
|
-
const newB = Math.round(
|
|
863
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
864
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
865
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
866
|
+
const newR = Math.round(r + (255 - r) * blend);
|
|
867
|
+
const newG = Math.round(g + (255 - g) * blend);
|
|
868
|
+
const newB = Math.round(b + (255 - b) * blend);
|
|
1040
869
|
return `#${newR.toString(16).padStart(2, "0")}${newG.toString(16).padStart(2, "0")}${newB.toString(16).padStart(2, "0")}`;
|
|
1041
870
|
};
|
|
1042
871
|
|
|
@@ -1091,6 +920,22 @@ function resolveVariableName(varName, element) {
|
|
|
1091
920
|
}
|
|
1092
921
|
}
|
|
1093
922
|
|
|
923
|
+
// src/utils/resolve-font-size.ts
|
|
924
|
+
var resolveFontSize = (val) => {
|
|
925
|
+
if (typeof val === "number") {
|
|
926
|
+
return isNaN(val) ? void 0 : val;
|
|
927
|
+
}
|
|
928
|
+
if (typeof val === "string") {
|
|
929
|
+
const match2 = val.trim().match(/^(-?\d+\.?\d*|-?\.\d+)(px)?$/);
|
|
930
|
+
if (!match2) {
|
|
931
|
+
return void 0;
|
|
932
|
+
}
|
|
933
|
+
const parsed = parseFloat(match2[1]);
|
|
934
|
+
return isNaN(parsed) ? void 0 : parsed;
|
|
935
|
+
}
|
|
936
|
+
return void 0;
|
|
937
|
+
};
|
|
938
|
+
|
|
1094
939
|
// src/providers/chart-context/private/get-chart-color.ts
|
|
1095
940
|
import { hsl as d3Hsl2 } from "@visx/vendor/d3-color";
|
|
1096
941
|
var GOLDEN_RATIO = 0.618033988749;
|
|
@@ -1128,8 +973,8 @@ var getChartColor = (index, colorCache) => {
|
|
|
1128
973
|
if (hues.length === 1) {
|
|
1129
974
|
hueRange = FULL_HUE_ROTATION_DEGREES * SINGLE_COLOR_HUE_RANGE_FACTOR;
|
|
1130
975
|
} else if (hueRange > HUE_WRAP_THRESHOLD_DEGREES) {
|
|
1131
|
-
const altMinHue = Math.min(...hues.filter((
|
|
1132
|
-
const altMaxHue = Math.max(...hues.filter((
|
|
976
|
+
const altMinHue = Math.min(...hues.filter((h) => h > HUE_WRAP_THRESHOLD_DEGREES));
|
|
977
|
+
const altMaxHue = Math.max(...hues.filter((h) => h < HUE_WRAP_THRESHOLD_DEGREES)) + FULL_HUE_ROTATION_DEGREES;
|
|
1133
978
|
const altRange = altMaxHue - altMinHue;
|
|
1134
979
|
if (altRange < hueRange) {
|
|
1135
980
|
minHue = altMinHue;
|
|
@@ -1197,7 +1042,13 @@ var defaultTheme = {
|
|
|
1197
1042
|
},
|
|
1198
1043
|
seriesLineStyles: [],
|
|
1199
1044
|
glyphs: [],
|
|
1200
|
-
|
|
1045
|
+
// `fontFamily: 'inherit'` overrides visx's hardcoded default font stack
|
|
1046
|
+
// (`-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif`)
|
|
1047
|
+
// that `buildChartTheme` injects as an inline style on SVG `<text>`
|
|
1048
|
+
// elements for axis labels and ticks. Setting `inherit` lets SVG text
|
|
1049
|
+
// pick up the host application's font-family via normal CSS inheritance.
|
|
1050
|
+
svgLabelSmall: { fill: "var(--jp-gray-80, #2c3338)", fontFamily: "inherit" },
|
|
1051
|
+
svgLabelBig: { fontFamily: "inherit" },
|
|
1201
1052
|
annotationStyles: {
|
|
1202
1053
|
label: {
|
|
1203
1054
|
anchorLineStroke: "var(--jp-gray-80, #2c3338)",
|
|
@@ -1478,9 +1329,9 @@ var useChartDataTransform = (data) => {
|
|
|
1478
1329
|
...point,
|
|
1479
1330
|
date
|
|
1480
1331
|
};
|
|
1481
|
-
}).sort((
|
|
1482
|
-
if (!
|
|
1483
|
-
return
|
|
1332
|
+
}).sort((a, b) => {
|
|
1333
|
+
if (!a.date || !b.date) return 0;
|
|
1334
|
+
return a.date.getTime() - b.date.getTime();
|
|
1484
1335
|
})
|
|
1485
1336
|
}));
|
|
1486
1337
|
}, [data]);
|
|
@@ -1497,16 +1348,6 @@ var DEFAULT_BOTTOM_FOR_TOP_AXIS = 10;
|
|
|
1497
1348
|
var DEFAULT_FONT_SIZE = 12;
|
|
1498
1349
|
var DEFAULT_TICK_LENGTH = 8;
|
|
1499
1350
|
var DEFAULT_Y_TICK_WIDTH = 40;
|
|
1500
|
-
var resolveFontSize = (val) => {
|
|
1501
|
-
if (typeof val === "number" && !isNaN(val)) {
|
|
1502
|
-
return val;
|
|
1503
|
-
}
|
|
1504
|
-
if (typeof val === "string") {
|
|
1505
|
-
const parsed = parseFloat(val);
|
|
1506
|
-
return isNaN(parsed) ? void 0 : parsed;
|
|
1507
|
-
}
|
|
1508
|
-
return void 0;
|
|
1509
|
-
};
|
|
1510
1351
|
var getXAxisLabelMetrics = (theme, orientation) => {
|
|
1511
1352
|
const xAxisStyles = orientation === "top" ? theme.axisStyles?.x?.top : theme.axisStyles?.x?.bottom;
|
|
1512
1353
|
const fontSize = resolveFontSize(xAxisStyles?.axisLabel?.fontSize) || resolveFontSize(theme.svgLabelSmall?.fontSize) || DEFAULT_FONT_SIZE;
|
|
@@ -1520,10 +1361,10 @@ var useChartMargin = (height, options, data, theme, horizontal = false) => {
|
|
|
1520
1361
|
const yTicks = useMemo4(() => {
|
|
1521
1362
|
const allDataPoints = data.flatMap((series) => series.data);
|
|
1522
1363
|
if (horizontal) {
|
|
1523
|
-
return allDataPoints.map((
|
|
1364
|
+
return allDataPoints.map((d) => d.label || options.axis?.y?.tickFormat(d.date.getTime(), 0, []));
|
|
1524
1365
|
}
|
|
1525
|
-
const minY = Math.min(...allDataPoints.map((
|
|
1526
|
-
const maxY = Math.max(...allDataPoints.map((
|
|
1366
|
+
const minY = Math.min(...allDataPoints.map((d) => d.value));
|
|
1367
|
+
const maxY = Math.max(...allDataPoints.map((d) => d.value));
|
|
1527
1368
|
const yScale = createScale({
|
|
1528
1369
|
...options.yScale,
|
|
1529
1370
|
domain: [minY, maxY],
|
|
@@ -1712,7 +1553,7 @@ var useInteractiveLegendData = ({
|
|
|
1712
1553
|
if (!legendInteractive || !chartId) {
|
|
1713
1554
|
return data;
|
|
1714
1555
|
}
|
|
1715
|
-
const visibleDataMap = new Map(visibleData.map((
|
|
1556
|
+
const visibleDataMap = new Map(visibleData.map((d) => [d.label, d]));
|
|
1716
1557
|
return data.map((segment) => {
|
|
1717
1558
|
const isVisible = isSeriesVisible(chartId, segment.label);
|
|
1718
1559
|
if (!isVisible) {
|
|
@@ -1806,11 +1647,11 @@ function labelTransformFactory({
|
|
|
1806
1647
|
scale,
|
|
1807
1648
|
labelFormat
|
|
1808
1649
|
}) {
|
|
1809
|
-
return (
|
|
1810
|
-
datum:
|
|
1811
|
-
index:
|
|
1812
|
-
text: `${labelFormat(
|
|
1813
|
-
value: scale(
|
|
1650
|
+
return (d, i) => ({
|
|
1651
|
+
datum: d,
|
|
1652
|
+
index: i,
|
|
1653
|
+
text: `${labelFormat(d, i)}`,
|
|
1654
|
+
value: scale(d)
|
|
1814
1655
|
});
|
|
1815
1656
|
}
|
|
1816
1657
|
|
|
@@ -1942,11 +1783,11 @@ var BaseLegend = /* @__PURE__ */ forwardRef(({
|
|
|
1942
1783
|
flexDirection: orientationToFlexDirection[orientation],
|
|
1943
1784
|
...theme.legend?.containerStyles
|
|
1944
1785
|
},
|
|
1945
|
-
children: labels.map((label,
|
|
1786
|
+
children: labels.map((label, i) => {
|
|
1946
1787
|
const visible = isSeriesVisible(label.text);
|
|
1947
1788
|
const handleClick = createClickHandler(label.text);
|
|
1948
1789
|
const handleKeyDown = createKeyDownHandler(label.text);
|
|
1949
|
-
const matchedItem = items[
|
|
1790
|
+
const matchedItem = items[i];
|
|
1950
1791
|
return /* @__PURE__ */ _jsxs(LegendItem, {
|
|
1951
1792
|
className: clsx("visx-legend-item", base_legend_module_default["legend-item"], interactive && base_legend_module_default["legend-item--interactive"], !visible && base_legend_module_default["legend-item--inactive"], itemClassName),
|
|
1952
1793
|
margin: itemMargin,
|
|
@@ -1957,18 +1798,18 @@ var BaseLegend = /* @__PURE__ */ forwardRef(({
|
|
|
1957
1798
|
tabIndex: interactive ? 0 : void 0,
|
|
1958
1799
|
"aria-pressed": interactive ? visible : void 0,
|
|
1959
1800
|
"aria-label": interactive ? `${label.text}: ${visible ? "visible" : "hidden"}. Toggle visibility.` : void 0,
|
|
1960
|
-
children: [items[
|
|
1961
|
-
width: items[
|
|
1962
|
-
height: items[
|
|
1801
|
+
children: [items[i]?.renderGlyph ? /* @__PURE__ */ _jsx2("svg", {
|
|
1802
|
+
width: items[i]?.glyphSize * 2,
|
|
1803
|
+
height: items[i]?.glyphSize * 2,
|
|
1963
1804
|
children: /* @__PURE__ */ _jsx2(Group, {
|
|
1964
|
-
children: items[
|
|
1805
|
+
children: items[i]?.renderGlyph({
|
|
1965
1806
|
key: `legend-glyph-${label.text}`,
|
|
1966
1807
|
datum: {},
|
|
1967
|
-
index:
|
|
1808
|
+
index: i,
|
|
1968
1809
|
color: fill(label),
|
|
1969
|
-
size: items[
|
|
1970
|
-
x: items[
|
|
1971
|
-
y: items[
|
|
1810
|
+
size: items[i]?.glyphSize,
|
|
1811
|
+
x: items[i]?.glyphSize,
|
|
1812
|
+
y: items[i]?.glyphSize
|
|
1972
1813
|
})
|
|
1973
1814
|
})
|
|
1974
1815
|
}) : /* @__PURE__ */ _jsx2(LegendShape, {
|
|
@@ -1976,8 +1817,8 @@ var BaseLegend = /* @__PURE__ */ forwardRef(({
|
|
|
1976
1817
|
height: shapeHeight,
|
|
1977
1818
|
width: shapeWidth,
|
|
1978
1819
|
margin: shapeMargin,
|
|
1979
|
-
item: domain[
|
|
1980
|
-
itemIndex:
|
|
1820
|
+
item: domain[i],
|
|
1821
|
+
itemIndex: i,
|
|
1981
1822
|
label,
|
|
1982
1823
|
fill,
|
|
1983
1824
|
size,
|
|
@@ -1999,7 +1840,7 @@ var BaseLegend = /* @__PURE__ */ forwardRef(({
|
|
|
1999
1840
|
children: ["\xA0", matchedItem.value]
|
|
2000
1841
|
})]
|
|
2001
1842
|
})]
|
|
2002
|
-
}, `legend-${label.text}-${
|
|
1843
|
+
}, `legend-${label.text}-${i}`);
|
|
2003
1844
|
})
|
|
2004
1845
|
})
|
|
2005
1846
|
});
|
|
@@ -2217,7 +2058,7 @@ var AccessibleTooltip = ({
|
|
|
2217
2058
|
const tooltipData = useMemo11(() => {
|
|
2218
2059
|
if (mode !== "individual") return [];
|
|
2219
2060
|
if (series.length === 0) return [];
|
|
2220
|
-
const maxDataPoints = Math.max(...series.map((
|
|
2061
|
+
const maxDataPoints = Math.max(...series.map((s) => s.data.length));
|
|
2221
2062
|
const flattened = [];
|
|
2222
2063
|
for (let dataPointIndex = 0; dataPointIndex < maxDataPoints; dataPointIndex++) {
|
|
2223
2064
|
for (let seriesIndex = 0; seriesIndex < series.length; seriesIndex++) {
|
|
@@ -2240,12 +2081,12 @@ var AccessibleTooltip = ({
|
|
|
2240
2081
|
return;
|
|
2241
2082
|
}
|
|
2242
2083
|
if (mode === "group") {
|
|
2243
|
-
series.forEach((
|
|
2244
|
-
if (selectedIndex <
|
|
2245
|
-
const datum =
|
|
2084
|
+
series.forEach((s, index) => {
|
|
2085
|
+
if (selectedIndex < s.data.length) {
|
|
2086
|
+
const datum = s.data[selectedIndex];
|
|
2246
2087
|
tooltipContext?.showTooltip({
|
|
2247
2088
|
datum,
|
|
2248
|
-
key:
|
|
2089
|
+
key: s.label,
|
|
2249
2090
|
index
|
|
2250
2091
|
});
|
|
2251
2092
|
}
|
|
@@ -2369,8 +2210,8 @@ ChartHTML.displayName = "Chart.HTML";
|
|
|
2369
2210
|
// src/charts/private/chart-composition/render-legend-slot.ts
|
|
2370
2211
|
import { createElement, Fragment } from "react";
|
|
2371
2212
|
function renderLegendSlot(legendChildren, position2) {
|
|
2372
|
-
return legendChildren.filter((
|
|
2373
|
-
(
|
|
2213
|
+
return legendChildren.filter((l) => l.position === position2).map(
|
|
2214
|
+
(l, i) => createElement(Fragment, { key: `legend-${position2}-${i}` }, l.element)
|
|
2374
2215
|
);
|
|
2375
2216
|
}
|
|
2376
2217
|
|
|
@@ -2466,10 +2307,10 @@ var formatErrorMessage_default = formatErrorMessage;
|
|
|
2466
2307
|
import * as React4 from "react";
|
|
2467
2308
|
|
|
2468
2309
|
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.6_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/useMergedRefs.js
|
|
2469
|
-
function useMergedRefs(
|
|
2310
|
+
function useMergedRefs(a, b, c, d) {
|
|
2470
2311
|
const forkRef = useRefWithInit(createForkRef).current;
|
|
2471
|
-
if (didChange(forkRef,
|
|
2472
|
-
update(forkRef, [
|
|
2312
|
+
if (didChange(forkRef, a, b, c, d)) {
|
|
2313
|
+
update(forkRef, [a, b, c, d]);
|
|
2473
2314
|
}
|
|
2474
2315
|
return forkRef.callback;
|
|
2475
2316
|
}
|
|
@@ -2487,8 +2328,8 @@ function createForkRef() {
|
|
|
2487
2328
|
refs: []
|
|
2488
2329
|
};
|
|
2489
2330
|
}
|
|
2490
|
-
function didChange(forkRef,
|
|
2491
|
-
return forkRef.refs[0] !==
|
|
2331
|
+
function didChange(forkRef, a, b, c, d) {
|
|
2332
|
+
return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
|
|
2492
2333
|
}
|
|
2493
2334
|
function didChangeN(forkRef, newRefs) {
|
|
2494
2335
|
return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
|
|
@@ -2506,8 +2347,8 @@ function update(forkRef, refs) {
|
|
|
2506
2347
|
}
|
|
2507
2348
|
if (instance != null) {
|
|
2508
2349
|
const cleanupCallbacks = Array(refs.length).fill(null);
|
|
2509
|
-
for (let
|
|
2510
|
-
const ref = refs[
|
|
2350
|
+
for (let i = 0; i < refs.length; i += 1) {
|
|
2351
|
+
const ref = refs[i];
|
|
2511
2352
|
if (ref == null) {
|
|
2512
2353
|
continue;
|
|
2513
2354
|
}
|
|
@@ -2515,7 +2356,7 @@ function update(forkRef, refs) {
|
|
|
2515
2356
|
case "function": {
|
|
2516
2357
|
const refCleanup = ref(instance);
|
|
2517
2358
|
if (typeof refCleanup === "function") {
|
|
2518
|
-
cleanupCallbacks[
|
|
2359
|
+
cleanupCallbacks[i] = refCleanup;
|
|
2519
2360
|
}
|
|
2520
2361
|
break;
|
|
2521
2362
|
}
|
|
@@ -2527,14 +2368,14 @@ function update(forkRef, refs) {
|
|
|
2527
2368
|
}
|
|
2528
2369
|
}
|
|
2529
2370
|
forkRef.cleanup = () => {
|
|
2530
|
-
for (let
|
|
2531
|
-
const ref = refs[
|
|
2371
|
+
for (let i = 0; i < refs.length; i += 1) {
|
|
2372
|
+
const ref = refs[i];
|
|
2532
2373
|
if (ref == null) {
|
|
2533
2374
|
continue;
|
|
2534
2375
|
}
|
|
2535
2376
|
switch (typeof ref) {
|
|
2536
2377
|
case "function": {
|
|
2537
|
-
const cleanupCallback = cleanupCallbacks[
|
|
2378
|
+
const cleanupCallback = cleanupCallbacks[i];
|
|
2538
2379
|
if (typeof cleanupCallback === "function") {
|
|
2539
2380
|
cleanupCallback();
|
|
2540
2381
|
} else {
|
|
@@ -2575,17 +2416,17 @@ function getReactElementRef(element) {
|
|
|
2575
2416
|
}
|
|
2576
2417
|
|
|
2577
2418
|
// ../../../node_modules/.pnpm/@base-ui+utils@0.2.6_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/mergeObjects.js
|
|
2578
|
-
function mergeObjects(
|
|
2579
|
-
if (
|
|
2580
|
-
return
|
|
2419
|
+
function mergeObjects(a, b) {
|
|
2420
|
+
if (a && !b) {
|
|
2421
|
+
return a;
|
|
2581
2422
|
}
|
|
2582
|
-
if (!
|
|
2583
|
-
return
|
|
2423
|
+
if (!a && b) {
|
|
2424
|
+
return b;
|
|
2584
2425
|
}
|
|
2585
|
-
if (
|
|
2426
|
+
if (a || b) {
|
|
2586
2427
|
return {
|
|
2587
|
-
...
|
|
2588
|
-
...
|
|
2428
|
+
...a,
|
|
2429
|
+
...b
|
|
2589
2430
|
};
|
|
2590
2431
|
}
|
|
2591
2432
|
return void 0;
|
|
@@ -2624,21 +2465,21 @@ function resolveStyle(style, state) {
|
|
|
2624
2465
|
|
|
2625
2466
|
// ../../../node_modules/.pnpm/@base-ui+react@1.3.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/merge-props/mergeProps.js
|
|
2626
2467
|
var EMPTY_PROPS = {};
|
|
2627
|
-
function mergeProps(
|
|
2468
|
+
function mergeProps(a, b, c, d, e) {
|
|
2628
2469
|
let merged = {
|
|
2629
|
-
...resolvePropsGetter(
|
|
2470
|
+
...resolvePropsGetter(a, EMPTY_PROPS)
|
|
2630
2471
|
};
|
|
2631
|
-
if (
|
|
2632
|
-
merged = mergeOne(merged,
|
|
2472
|
+
if (b) {
|
|
2473
|
+
merged = mergeOne(merged, b);
|
|
2633
2474
|
}
|
|
2634
|
-
if (
|
|
2635
|
-
merged = mergeOne(merged,
|
|
2475
|
+
if (c) {
|
|
2476
|
+
merged = mergeOne(merged, c);
|
|
2636
2477
|
}
|
|
2637
|
-
if (
|
|
2638
|
-
merged = mergeOne(merged,
|
|
2478
|
+
if (d) {
|
|
2479
|
+
merged = mergeOne(merged, d);
|
|
2639
2480
|
}
|
|
2640
|
-
if (
|
|
2641
|
-
merged = mergeOne(merged,
|
|
2481
|
+
if (e) {
|
|
2482
|
+
merged = mergeOne(merged, e);
|
|
2642
2483
|
}
|
|
2643
2484
|
return merged;
|
|
2644
2485
|
}
|
|
@@ -2652,8 +2493,8 @@ function mergePropsN(props) {
|
|
|
2652
2493
|
let merged = {
|
|
2653
2494
|
...resolvePropsGetter(props[0], EMPTY_PROPS)
|
|
2654
2495
|
};
|
|
2655
|
-
for (let
|
|
2656
|
-
merged = mergeOne(merged, props[
|
|
2496
|
+
for (let i = 1; i < props.length; i += 1) {
|
|
2497
|
+
merged = mergeOne(merged, props[i]);
|
|
2657
2498
|
}
|
|
2658
2499
|
return merged;
|
|
2659
2500
|
}
|
|
@@ -2867,7 +2708,7 @@ function useRender(params) {
|
|
|
2867
2708
|
return useRenderElement(params.defaultTagName ?? "div", params, params);
|
|
2868
2709
|
}
|
|
2869
2710
|
|
|
2870
|
-
// ../../../node_modules/.pnpm/@wordpress+element@6.
|
|
2711
|
+
// ../../../node_modules/.pnpm/@wordpress+element@6.43.0/node_modules/@wordpress/element/build-module/react.mjs
|
|
2871
2712
|
import {
|
|
2872
2713
|
Children as Children3,
|
|
2873
2714
|
cloneElement as cloneElement2,
|
|
@@ -2902,13 +2743,13 @@ import {
|
|
|
2902
2743
|
} from "react";
|
|
2903
2744
|
|
|
2904
2745
|
// ../../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.mjs
|
|
2905
|
-
function isObject(
|
|
2906
|
-
return Object.prototype.toString.call(
|
|
2746
|
+
function isObject(o) {
|
|
2747
|
+
return Object.prototype.toString.call(o) === "[object Object]";
|
|
2907
2748
|
}
|
|
2908
|
-
function isPlainObject(
|
|
2749
|
+
function isPlainObject(o) {
|
|
2909
2750
|
var ctor, prot;
|
|
2910
|
-
if (isObject(
|
|
2911
|
-
ctor =
|
|
2751
|
+
if (isObject(o) === false) return false;
|
|
2752
|
+
ctor = o.constructor;
|
|
2912
2753
|
if (ctor === void 0) return true;
|
|
2913
2754
|
prot = ctor.prototype;
|
|
2914
2755
|
if (isObject(prot) === false) return false;
|
|
@@ -2999,6 +2840,27 @@ var Stack = forwardRef3(function Stack2({ direction, gap, align, justify, wrap,
|
|
|
2999
2840
|
return element;
|
|
3000
2841
|
});
|
|
3001
2842
|
|
|
2843
|
+
// ../../../node_modules/.pnpm/@wordpress+ui@0.9.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1_stylelint@17.5.0/node_modules/@wordpress/ui/build-module/text/text.mjs
|
|
2844
|
+
import clsx2 from "clsx";
|
|
2845
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='893fb81f3c']")) {
|
|
2846
|
+
const style = document.createElement("style");
|
|
2847
|
+
style.setAttribute("data-wp-hash", "893fb81f3c");
|
|
2848
|
+
style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._14437cfb77831647__heading-2xl{font-size:var(--wpds-font-size-2xl,32px);line-height:var(--wpds-font-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{font-size:var(--wpds-font-size-xl,20px);line-height:var(--wpds-font-line-height-md,24px)}.aa58f227716bcde2__heading-lg{font-size:var(--wpds-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{font-size:var(--wpds-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{font-size:var(--wpds-font-size-xl,20px);line-height:var(--wpds-font-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{font-size:var(--wpds-font-size-lg,15px);line-height:var(--wpds-font-line-height-md,24px)}._131101940be12424__body-md{font-size:var(--wpds-font-size-md,13px);line-height:var(--wpds-font-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px)}}'));
|
|
2849
|
+
document.head.appendChild(style);
|
|
2850
|
+
}
|
|
2851
|
+
var style_default2 = { "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" };
|
|
2852
|
+
var Text = forwardRef3(function Text2({ variant = "body-md", render, className, ...props }, ref) {
|
|
2853
|
+
const element = useRender({
|
|
2854
|
+
render,
|
|
2855
|
+
defaultTagName: "span",
|
|
2856
|
+
ref,
|
|
2857
|
+
props: mergeProps(props, {
|
|
2858
|
+
className: clsx2(style_default2[variant], className)
|
|
2859
|
+
})
|
|
2860
|
+
});
|
|
2861
|
+
return element;
|
|
2862
|
+
});
|
|
2863
|
+
|
|
3002
2864
|
// src/charts/private/chart-layout/chart-layout.tsx
|
|
3003
2865
|
import { useEffect as useEffect7 } from "react";
|
|
3004
2866
|
|
|
@@ -3063,15 +2925,15 @@ var svg_empty_state_module_default = {
|
|
|
3063
2925
|
// src/charts/private/svg-empty-state/svg-empty-state.tsx
|
|
3064
2926
|
import { jsx as _jsx9 } from "react/jsx-runtime";
|
|
3065
2927
|
var SvgEmptyState = ({
|
|
3066
|
-
x
|
|
3067
|
-
y
|
|
2928
|
+
x,
|
|
2929
|
+
y,
|
|
3068
2930
|
width,
|
|
3069
2931
|
height,
|
|
3070
2932
|
children
|
|
3071
2933
|
}) => {
|
|
3072
2934
|
return /* @__PURE__ */ _jsx9("foreignObject", {
|
|
3073
|
-
x:
|
|
3074
|
-
y:
|
|
2935
|
+
x: x - width / 2,
|
|
2936
|
+
y: y - height / 2,
|
|
3075
2937
|
width,
|
|
3076
2938
|
height,
|
|
3077
2939
|
children: /* @__PURE__ */ _jsx9(Stack, {
|
|
@@ -3182,8 +3044,8 @@ var getScaleBandwidth = (scale) => {
|
|
|
3182
3044
|
};
|
|
3183
3045
|
var MIN_TICK_LABEL_WIDTH = 20;
|
|
3184
3046
|
var TruncatedTickComponent = ({
|
|
3185
|
-
x
|
|
3186
|
-
y
|
|
3047
|
+
x,
|
|
3048
|
+
y,
|
|
3187
3049
|
formattedValue,
|
|
3188
3050
|
axis,
|
|
3189
3051
|
textAnchor,
|
|
@@ -3251,8 +3113,8 @@ var TruncatedTickComponent = ({
|
|
|
3251
3113
|
pointerEvents: "auto"
|
|
3252
3114
|
};
|
|
3253
3115
|
return /* @__PURE__ */ _jsx11("foreignObject", {
|
|
3254
|
-
x:
|
|
3255
|
-
y
|
|
3116
|
+
x: x + xOffset,
|
|
3117
|
+
y,
|
|
3256
3118
|
width: maxWidth,
|
|
3257
3119
|
height: 0,
|
|
3258
3120
|
overflow: "visible",
|
|
@@ -3297,10 +3159,10 @@ function useBarChartOptions(data, horizontal, options = {}) {
|
|
|
3297
3159
|
};
|
|
3298
3160
|
const labelFormatter = data?.[0]?.data?.[0]?.label ? (label) => label : formatDateTick;
|
|
3299
3161
|
const valueFormatter = formatNumberCompact2;
|
|
3300
|
-
const labelAccessor = (
|
|
3301
|
-
const valueAccessor = (
|
|
3302
|
-
const enhancedPoint =
|
|
3303
|
-
return enhancedPoint?.visualValue !== void 0 ? enhancedPoint.visualValue :
|
|
3162
|
+
const labelAccessor = (d) => d?.label || d?.date;
|
|
3163
|
+
const valueAccessor = (d) => {
|
|
3164
|
+
const enhancedPoint = d;
|
|
3165
|
+
return enhancedPoint?.visualValue !== void 0 ? enhancedPoint.visualValue : d?.value;
|
|
3304
3166
|
};
|
|
3305
3167
|
return {
|
|
3306
3168
|
vertical: {
|
|
@@ -3542,7 +3404,7 @@ var BarChartInternal = ({
|
|
|
3542
3404
|
}, [chartId]);
|
|
3543
3405
|
const createKeyboardHighlightStyle = useCallback7(() => {
|
|
3544
3406
|
if (selectedIndex === void 0) return "";
|
|
3545
|
-
const maxDataPoints = Math.max(...data.map((
|
|
3407
|
+
const maxDataPoints = Math.max(...data.map((s) => s.data.length));
|
|
3546
3408
|
const dataPointIndex = Math.floor(selectedIndex / data.length);
|
|
3547
3409
|
const seriesIndex = selectedIndex % data.length;
|
|
3548
3410
|
if (dataPointIndex >= maxDataPoints || seriesIndex >= data.length) {
|
|
@@ -3577,7 +3439,7 @@ var BarChartInternal = ({
|
|
|
3577
3439
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
3578
3440
|
if (error) {
|
|
3579
3441
|
return /* @__PURE__ */ _jsx12("div", {
|
|
3580
|
-
className:
|
|
3442
|
+
className: clsx3("bar-chart", bar_chart_module_default["bar-chart"]),
|
|
3581
3443
|
children: error
|
|
3582
3444
|
});
|
|
3583
3445
|
}
|
|
@@ -3608,7 +3470,7 @@ var BarChartInternal = ({
|
|
|
3608
3470
|
legendElement,
|
|
3609
3471
|
legendChildren,
|
|
3610
3472
|
gap,
|
|
3611
|
-
className:
|
|
3473
|
+
className: clsx3("bar-chart", bar_chart_module_default["bar-chart"], {
|
|
3612
3474
|
[bar_chart_module_default[`bar-chart--animated${horizontal ? "-horizontal" : ""}`]]: animation && !prefersReducedMotion
|
|
3613
3475
|
}, className),
|
|
3614
3476
|
style: {
|
|
@@ -3732,40 +3594,40 @@ var BarChartResponsive = attachSubComponents(withResponsive(BarChartWithProvider
|
|
|
3732
3594
|
import { formatNumberCompact as formatNumberCompact3 } from "@automattic/number-formatters";
|
|
3733
3595
|
import { Group as Group3 } from "@visx/group";
|
|
3734
3596
|
import { createScale as createScale2, scaleBand } from "@visx/scale";
|
|
3735
|
-
import { Text } from "@visx/text";
|
|
3597
|
+
import { Text as Text3 } from "@visx/text";
|
|
3736
3598
|
import { useContext as useContext10, useMemo as useMemo16 } from "react";
|
|
3737
3599
|
import { jsx as _jsx13, jsxs as _jsxs5 } from "react/jsx-runtime";
|
|
3738
3600
|
var getScaleBandwidth2 = (scale) => {
|
|
3739
|
-
const
|
|
3740
|
-
return
|
|
3601
|
+
const s = scale;
|
|
3602
|
+
return s && "bandwidth" in s ? s?.bandwidth() ?? 0 : 0;
|
|
3741
3603
|
};
|
|
3742
3604
|
var DefaultLabelComponent = ({
|
|
3743
3605
|
textProps,
|
|
3744
|
-
x
|
|
3745
|
-
y
|
|
3606
|
+
x,
|
|
3607
|
+
y,
|
|
3746
3608
|
label,
|
|
3747
3609
|
formatter
|
|
3748
3610
|
}) => {
|
|
3749
|
-
return /* @__PURE__ */ _jsx13(
|
|
3611
|
+
return /* @__PURE__ */ _jsx13(Text3, {
|
|
3750
3612
|
...textProps,
|
|
3751
3613
|
textAnchor: "start",
|
|
3752
|
-
x
|
|
3753
|
-
y
|
|
3614
|
+
x,
|
|
3615
|
+
y,
|
|
3754
3616
|
children: formatter(label)
|
|
3755
3617
|
});
|
|
3756
3618
|
};
|
|
3757
3619
|
var DefaultValueComponent = ({
|
|
3758
3620
|
textProps,
|
|
3759
|
-
x
|
|
3760
|
-
y
|
|
3621
|
+
x,
|
|
3622
|
+
y,
|
|
3761
3623
|
value,
|
|
3762
3624
|
formatter
|
|
3763
3625
|
}) => {
|
|
3764
|
-
return /* @__PURE__ */ _jsx13(
|
|
3626
|
+
return /* @__PURE__ */ _jsx13(Text3, {
|
|
3765
3627
|
...textProps,
|
|
3766
3628
|
textAnchor: "end",
|
|
3767
|
-
x
|
|
3768
|
-
y
|
|
3629
|
+
x,
|
|
3630
|
+
y,
|
|
3769
3631
|
fontWeight: 500,
|
|
3770
3632
|
children: formatter(value)
|
|
3771
3633
|
});
|
|
@@ -3799,18 +3661,18 @@ var AxisRenderer = ({
|
|
|
3799
3661
|
const sum = data.reduce((acc, {
|
|
3800
3662
|
data: seriesData
|
|
3801
3663
|
}) => acc + (seriesData[index]?.value ?? 0), 0);
|
|
3802
|
-
const
|
|
3664
|
+
const y = from2.y + yOffset;
|
|
3803
3665
|
return /* @__PURE__ */ _jsxs5(Group3, {
|
|
3804
3666
|
children: [/* @__PURE__ */ _jsx13(LabelComponent, {
|
|
3805
3667
|
textProps,
|
|
3806
3668
|
x: labelPosition,
|
|
3807
|
-
y
|
|
3669
|
+
y,
|
|
3808
3670
|
label: formattedValue,
|
|
3809
3671
|
formatter: labelFormatter
|
|
3810
3672
|
}), /* @__PURE__ */ _jsx13(ValueComponent, {
|
|
3811
3673
|
textProps,
|
|
3812
3674
|
x: valuePosition,
|
|
3813
|
-
y
|
|
3675
|
+
y,
|
|
3814
3676
|
value: sum,
|
|
3815
3677
|
formatter: valueFormatter,
|
|
3816
3678
|
data,
|
|
@@ -3933,12 +3795,11 @@ var BarListChartResponsive = withResponsive(BarListChart);
|
|
|
3933
3795
|
|
|
3934
3796
|
// src/charts/conversion-funnel-chart/conversion-funnel-chart.tsx
|
|
3935
3797
|
import { useTooltip, useTooltipInPortal } from "@visx/tooltip";
|
|
3936
|
-
import
|
|
3798
|
+
import clsx4 from "clsx";
|
|
3937
3799
|
import { useRef as useRef8, useMemo as useMemo17, useEffect as useEffect8, useCallback as useCallback9, useContext as useContext11 } from "react";
|
|
3938
3800
|
|
|
3939
3801
|
// src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss
|
|
3940
3802
|
var conversion_funnel_chart_module_default = {
|
|
3941
|
-
"conversion-funnel-chart": "a8ccharts-B0ct23",
|
|
3942
3803
|
"conversion-funnel-chart--loading": "a8ccharts-Qicx1p",
|
|
3943
3804
|
"main-metric": "a8ccharts-61WPYr",
|
|
3944
3805
|
"main-rate": "a8ccharts-RRRI6x",
|
|
@@ -4069,11 +3930,11 @@ var ConversionFunnelChartInternal = ({
|
|
|
4069
3930
|
selectedBarRef.current = null;
|
|
4070
3931
|
hideTooltip();
|
|
4071
3932
|
}, [clearSelection, hideTooltip]);
|
|
4072
|
-
const showTooltipAt = useCallback9((step,
|
|
3933
|
+
const showTooltipAt = useCallback9((step, x, y) => {
|
|
4073
3934
|
showTooltip({
|
|
4074
3935
|
tooltipData: step,
|
|
4075
|
-
tooltipLeft:
|
|
4076
|
-
tooltipTop:
|
|
3936
|
+
tooltipLeft: x,
|
|
3937
|
+
tooltipTop: y - 10
|
|
4077
3938
|
});
|
|
4078
3939
|
}, [showTooltip]);
|
|
4079
3940
|
const getMouseTooltipCoords = useCallback9((event) => {
|
|
@@ -4090,11 +3951,11 @@ var ConversionFunnelChartInternal = ({
|
|
|
4090
3951
|
return null;
|
|
4091
3952
|
}
|
|
4092
3953
|
const rect = event.currentTarget.getBoundingClientRect();
|
|
4093
|
-
const
|
|
4094
|
-
const
|
|
3954
|
+
const x = rect.left + rect.width / 2 - containerBounds.left;
|
|
3955
|
+
const y = rect.top - containerBounds.top;
|
|
4095
3956
|
return {
|
|
4096
|
-
x
|
|
4097
|
-
y
|
|
3957
|
+
x,
|
|
3958
|
+
y
|
|
4098
3959
|
};
|
|
4099
3960
|
}, [containerBounds.width, containerBounds.height, containerBounds.left, containerBounds.top]);
|
|
4100
3961
|
const handleStepInteraction = useCallback9((step, event, interactionType) => {
|
|
@@ -4213,7 +4074,7 @@ var ConversionFunnelChartInternal = ({
|
|
|
4213
4074
|
if (!isDataValid) {
|
|
4214
4075
|
return /* @__PURE__ */ _jsx14(Stack, {
|
|
4215
4076
|
direction: "column",
|
|
4216
|
-
className:
|
|
4077
|
+
className: clsx4(conversion_funnel_chart_module_default["conversion-funnel-chart"], loading && conversion_funnel_chart_module_default["conversion-funnel-chart--loading"], className),
|
|
4217
4078
|
style: {
|
|
4218
4079
|
...style,
|
|
4219
4080
|
height: resolvedHeight
|
|
@@ -4232,7 +4093,7 @@ var ConversionFunnelChartInternal = ({
|
|
|
4232
4093
|
portalContainerRef(node2);
|
|
4233
4094
|
chartRef.current = node2;
|
|
4234
4095
|
},
|
|
4235
|
-
className:
|
|
4096
|
+
className: clsx4(conversion_funnel_chart_module_default["conversion-funnel-chart"], loading && conversion_funnel_chart_module_default["conversion-funnel-chart--loading"], className),
|
|
4236
4097
|
style: {
|
|
4237
4098
|
...style,
|
|
4238
4099
|
height: resolvedHeight
|
|
@@ -4253,7 +4114,7 @@ var ConversionFunnelChartInternal = ({
|
|
|
4253
4114
|
isBlurred
|
|
4254
4115
|
} = getStepState(step.id);
|
|
4255
4116
|
return /* @__PURE__ */ _jsxs6("div", {
|
|
4256
|
-
className:
|
|
4117
|
+
className: clsx4(conversion_funnel_chart_module_default["funnel-step"], isColorPaletteResolved && conversion_funnel_chart_module_default["funnel-step--animated"], isBlurred && conversion_funnel_chart_module_default["funnel-step--blurred"]),
|
|
4257
4118
|
children: [/* @__PURE__ */ _jsxs6("div", {
|
|
4258
4119
|
className: conversion_funnel_chart_module_default["step-header"],
|
|
4259
4120
|
children: [renderStepLabel ? renderStepLabel({
|
|
@@ -4282,7 +4143,7 @@ var ConversionFunnelChartInternal = ({
|
|
|
4282
4143
|
backgroundColor: barBackgroundColor
|
|
4283
4144
|
},
|
|
4284
4145
|
children: /* @__PURE__ */ _jsx14("div", {
|
|
4285
|
-
className:
|
|
4146
|
+
className: clsx4(conversion_funnel_chart_module_default["funnel-bar"], {
|
|
4286
4147
|
[conversion_funnel_chart_module_default["funnel-bar--animated"]]: animation && !loading && !prefersReducedMotion
|
|
4287
4148
|
}),
|
|
4288
4149
|
style: {
|
|
@@ -4297,7 +4158,7 @@ var ConversionFunnelChartInternal = ({
|
|
|
4297
4158
|
}), tooltipOpen && tooltipData && (() => {
|
|
4298
4159
|
const tooltipContent = renderTooltip ? renderTooltip({
|
|
4299
4160
|
step: tooltipData,
|
|
4300
|
-
index: steps.findIndex((
|
|
4161
|
+
index: steps.findIndex((s) => s.id === tooltipData.id),
|
|
4301
4162
|
top: tooltipTop,
|
|
4302
4163
|
left: tooltipLeft,
|
|
4303
4164
|
className: conversion_funnel_chart_module_default["tooltip-wrapper"]
|
|
@@ -4333,7 +4194,7 @@ ConversionFunnelChartWithProvider.displayName = "ConversionFunnelChart";
|
|
|
4333
4194
|
|
|
4334
4195
|
// src/charts/geo-chart/geo-chart.tsx
|
|
4335
4196
|
import { __ as __2 } from "@wordpress/i18n";
|
|
4336
|
-
import
|
|
4197
|
+
import clsx5 from "clsx";
|
|
4337
4198
|
import { useContext as useContext12, useMemo as useMemo18 } from "react";
|
|
4338
4199
|
import { Chart } from "react-google-charts";
|
|
4339
4200
|
|
|
@@ -4402,7 +4263,7 @@ var GeoChartInternal = ({
|
|
|
4402
4263
|
}
|
|
4403
4264
|
} = useGlobalChartsContext();
|
|
4404
4265
|
const loadingPlaceholder = /* @__PURE__ */ _jsx15("div", {
|
|
4405
|
-
className:
|
|
4266
|
+
className: clsx5("geo-chart", geo_chart_module_default.container, className),
|
|
4406
4267
|
style: {
|
|
4407
4268
|
width,
|
|
4408
4269
|
height
|
|
@@ -4423,10 +4284,10 @@ var GeoChartInternal = ({
|
|
|
4423
4284
|
};
|
|
4424
4285
|
}
|
|
4425
4286
|
const htmlTooltipIndices = [];
|
|
4426
|
-
for (let
|
|
4427
|
-
const col = data[0][
|
|
4287
|
+
for (let i = 0; i < data[0].length; i++) {
|
|
4288
|
+
const col = data[0][i];
|
|
4428
4289
|
if (typeof col === "object" && col !== null && "role" in col && col.role === "tooltip" && "p" in col && typeof col.p === "object" && col.p !== null && "html" in col.p && col.p.html === true) {
|
|
4429
|
-
htmlTooltipIndices.push(
|
|
4290
|
+
htmlTooltipIndices.push(i);
|
|
4430
4291
|
}
|
|
4431
4292
|
}
|
|
4432
4293
|
if (htmlTooltipIndices.length === 0) {
|
|
@@ -4470,7 +4331,7 @@ var GeoChartInternal = ({
|
|
|
4470
4331
|
keepAspectRatio: true
|
|
4471
4332
|
}), [region, resolution, lightColorHex, fullColorHex, backgroundColorHex, defaultFillColorHex, sanitizedData.hasHtmlTooltips]);
|
|
4472
4333
|
return /* @__PURE__ */ _jsx15("div", {
|
|
4473
|
-
className:
|
|
4334
|
+
className: clsx5("geo-chart", geo_chart_module_default.container, className),
|
|
4474
4335
|
style: {
|
|
4475
4336
|
width,
|
|
4476
4337
|
height,
|
|
@@ -4502,12 +4363,7 @@ var GeoChartWithProvider = (props) => {
|
|
|
4502
4363
|
GeoChartWithProvider.displayName = "GeoChart";
|
|
4503
4364
|
var GeoChartResponsive = withResponsive(GeoChartWithProvider);
|
|
4504
4365
|
|
|
4505
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
4506
|
-
function isValueDefined(value) {
|
|
4507
|
-
return value !== void 0 && value !== null;
|
|
4508
|
-
}
|
|
4509
|
-
|
|
4510
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/hooks/use-update-effect.mjs
|
|
4366
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/hooks/use-update-effect.mjs
|
|
4511
4367
|
function useUpdateEffect(effect, deps) {
|
|
4512
4368
|
const mountedRef = useRef6(false);
|
|
4513
4369
|
useEffect6(() => {
|
|
@@ -4533,9 +4389,9 @@ function sheetForTag(tag) {
|
|
|
4533
4389
|
if (tag.sheet) {
|
|
4534
4390
|
return tag.sheet;
|
|
4535
4391
|
}
|
|
4536
|
-
for (var
|
|
4537
|
-
if (document.styleSheets[
|
|
4538
|
-
return document.styleSheets[
|
|
4392
|
+
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
4393
|
+
if (document.styleSheets[i].ownerNode === tag) {
|
|
4394
|
+
return document.styleSheets[i];
|
|
4539
4395
|
}
|
|
4540
4396
|
}
|
|
4541
4397
|
return void 0;
|
|
@@ -4592,7 +4448,7 @@ var StyleSheet = /* @__PURE__ */ (function() {
|
|
|
4592
4448
|
var sheet2 = sheetForTag(tag);
|
|
4593
4449
|
try {
|
|
4594
4450
|
sheet2.insertRule(rule, sheet2.cssRules.length);
|
|
4595
|
-
} catch (
|
|
4451
|
+
} catch (e) {
|
|
4596
4452
|
}
|
|
4597
4453
|
} else {
|
|
4598
4454
|
tag.appendChild(document.createTextNode(rule));
|
|
@@ -4931,10 +4787,10 @@ function ruleset(value, root, parent, index, offset, rules, points, type, props,
|
|
|
4931
4787
|
var post = offset - 1;
|
|
4932
4788
|
var rule = offset === 0 ? rules : [""];
|
|
4933
4789
|
var size = sizeof(rule);
|
|
4934
|
-
for (var
|
|
4935
|
-
for (var
|
|
4936
|
-
if (z = trim(
|
|
4937
|
-
props[
|
|
4790
|
+
for (var i = 0, j = 0, k = 0; i < index; ++i)
|
|
4791
|
+
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
|
|
4792
|
+
if (z = trim(j > 0 ? rule[x] + " " + y : replace2(y, /&\f/g, rule[x])))
|
|
4793
|
+
props[k++] = z;
|
|
4938
4794
|
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2);
|
|
4939
4795
|
}
|
|
4940
4796
|
function comment(value, root, parent) {
|
|
@@ -4948,8 +4804,8 @@ function declaration(value, root, parent, length2) {
|
|
|
4948
4804
|
function serialize(children, callback) {
|
|
4949
4805
|
var output = "";
|
|
4950
4806
|
var length2 = sizeof(children);
|
|
4951
|
-
for (var
|
|
4952
|
-
output += callback(children[
|
|
4807
|
+
for (var i = 0; i < length2; i++)
|
|
4808
|
+
output += callback(children[i], i, children, callback) || "";
|
|
4953
4809
|
return output;
|
|
4954
4810
|
}
|
|
4955
4811
|
function stringify(element, index, children, callback) {
|
|
@@ -4974,8 +4830,8 @@ function middleware(collection) {
|
|
|
4974
4830
|
var length2 = sizeof(collection);
|
|
4975
4831
|
return function(element, index, children, callback) {
|
|
4976
4832
|
var output = "";
|
|
4977
|
-
for (var
|
|
4978
|
-
output += collection[
|
|
4833
|
+
for (var i = 0; i < length2; i++)
|
|
4834
|
+
output += collection[i](element, index, children, callback) || "";
|
|
4979
4835
|
return output;
|
|
4980
4836
|
};
|
|
4981
4837
|
}
|
|
@@ -5082,9 +4938,9 @@ var compat = function compat2(element) {
|
|
|
5082
4938
|
var points = [];
|
|
5083
4939
|
var rules = getRules(value, points);
|
|
5084
4940
|
var parentRules = parent.props;
|
|
5085
|
-
for (var
|
|
5086
|
-
for (var
|
|
5087
|
-
element.props[
|
|
4941
|
+
for (var i = 0, k = 0; i < rules.length; i++) {
|
|
4942
|
+
for (var j = 0; j < parentRules.length; j++, k++) {
|
|
4943
|
+
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
|
5088
4944
|
}
|
|
5089
4945
|
}
|
|
5090
4946
|
};
|
|
@@ -5308,8 +5164,8 @@ var createCache = function createCache2(options) {
|
|
|
5308
5164
|
document.querySelectorAll('style[data-emotion^="' + key + ' "]'),
|
|
5309
5165
|
function(node2) {
|
|
5310
5166
|
var attrib = node2.getAttribute("data-emotion").split(" ");
|
|
5311
|
-
for (var
|
|
5312
|
-
inserted[attrib[
|
|
5167
|
+
for (var i = 1; i < attrib.length; i++) {
|
|
5168
|
+
inserted[attrib[i]] = true;
|
|
5313
5169
|
}
|
|
5314
5170
|
nodesToHydrate.push(node2);
|
|
5315
5171
|
}
|
|
@@ -5437,32 +5293,32 @@ var insertStyles = function insertStyles2(cache2, serialized, isStringTag) {
|
|
|
5437
5293
|
|
|
5438
5294
|
// ../../../node_modules/.pnpm/@emotion+hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js
|
|
5439
5295
|
function murmur2(str) {
|
|
5440
|
-
var
|
|
5441
|
-
var
|
|
5442
|
-
for (; len >= 4; ++
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
(
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
(
|
|
5450
|
-
(
|
|
5296
|
+
var h = 0;
|
|
5297
|
+
var k, i = 0, len = str.length;
|
|
5298
|
+
for (; len >= 4; ++i, len -= 4) {
|
|
5299
|
+
k = str.charCodeAt(i) & 255 | (str.charCodeAt(++i) & 255) << 8 | (str.charCodeAt(++i) & 255) << 16 | (str.charCodeAt(++i) & 255) << 24;
|
|
5300
|
+
k = /* Math.imul(k, m): */
|
|
5301
|
+
(k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16);
|
|
5302
|
+
k ^= /* k >>> r: */
|
|
5303
|
+
k >>> 24;
|
|
5304
|
+
h = /* Math.imul(k, m): */
|
|
5305
|
+
(k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
5306
|
+
(h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
5451
5307
|
}
|
|
5452
5308
|
switch (len) {
|
|
5453
5309
|
case 3:
|
|
5454
|
-
|
|
5310
|
+
h ^= (str.charCodeAt(i + 2) & 255) << 16;
|
|
5455
5311
|
case 2:
|
|
5456
|
-
|
|
5312
|
+
h ^= (str.charCodeAt(i + 1) & 255) << 8;
|
|
5457
5313
|
case 1:
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
(
|
|
5314
|
+
h ^= str.charCodeAt(i) & 255;
|
|
5315
|
+
h = /* Math.imul(h, m): */
|
|
5316
|
+
(h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
5461
5317
|
}
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
(
|
|
5465
|
-
return ((
|
|
5318
|
+
h ^= h >>> 13;
|
|
5319
|
+
h = /* Math.imul(h, m): */
|
|
5320
|
+
(h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
5321
|
+
return ((h ^ h >>> 15) >>> 0).toString(36);
|
|
5466
5322
|
}
|
|
5467
5323
|
|
|
5468
5324
|
// ../../../node_modules/.pnpm/@emotion+unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
|
|
@@ -5612,8 +5468,8 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
5612
5468
|
function createStringFromObject(mergedProps, registered, obj) {
|
|
5613
5469
|
var string = "";
|
|
5614
5470
|
if (Array.isArray(obj)) {
|
|
5615
|
-
for (var
|
|
5616
|
-
string += handleInterpolation(mergedProps, registered, obj[
|
|
5471
|
+
for (var i = 0; i < obj.length; i++) {
|
|
5472
|
+
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
5617
5473
|
}
|
|
5618
5474
|
} else {
|
|
5619
5475
|
for (var key in obj) {
|
|
@@ -5670,11 +5526,11 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
5670
5526
|
var asTemplateStringsArr = strings;
|
|
5671
5527
|
styles += asTemplateStringsArr[0];
|
|
5672
5528
|
}
|
|
5673
|
-
for (var
|
|
5674
|
-
styles += handleInterpolation(mergedProps, registered, args[
|
|
5529
|
+
for (var i = 1; i < args.length; i++) {
|
|
5530
|
+
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
5675
5531
|
if (stringMode) {
|
|
5676
5532
|
var templateStringsArr = strings;
|
|
5677
|
-
styles += templateStringsArr[
|
|
5533
|
+
styles += templateStringsArr[i];
|
|
5678
5534
|
}
|
|
5679
5535
|
}
|
|
5680
5536
|
labelPattern.lastIndex = 0;
|
|
@@ -5754,23 +5610,23 @@ var createEmotionProps = function createEmotionProps2(type, props) {
|
|
|
5754
5610
|
newProps[typePropName] = type;
|
|
5755
5611
|
return newProps;
|
|
5756
5612
|
};
|
|
5757
|
-
var Insertion = function Insertion2(
|
|
5758
|
-
var cache2 =
|
|
5613
|
+
var Insertion = function Insertion2(_ref) {
|
|
5614
|
+
var cache2 = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;
|
|
5759
5615
|
registerStyles(cache2, serialized, isStringTag);
|
|
5760
5616
|
var rules = useInsertionEffectAlwaysWithSyncFallback(function() {
|
|
5761
5617
|
return insertStyles(cache2, serialized, isStringTag);
|
|
5762
5618
|
});
|
|
5763
5619
|
if (!isBrowser4 && rules !== void 0) {
|
|
5764
|
-
var
|
|
5620
|
+
var _ref2;
|
|
5765
5621
|
var serializedNames = serialized.name;
|
|
5766
5622
|
var next2 = serialized.next;
|
|
5767
5623
|
while (next2 !== void 0) {
|
|
5768
5624
|
serializedNames += " " + next2.name;
|
|
5769
5625
|
next2 = next2.next;
|
|
5770
5626
|
}
|
|
5771
|
-
return /* @__PURE__ */ React6.createElement("style", (
|
|
5627
|
+
return /* @__PURE__ */ React6.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache2.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
5772
5628
|
__html: rules
|
|
5773
|
-
},
|
|
5629
|
+
}, _ref2.nonce = cache2.sheet.nonce, _ref2));
|
|
5774
5630
|
}
|
|
5775
5631
|
return null;
|
|
5776
5632
|
};
|
|
@@ -5820,15 +5676,15 @@ var jsx = function jsx2(type, props) {
|
|
|
5820
5676
|
var createElementArgArray = new Array(argsLength);
|
|
5821
5677
|
createElementArgArray[0] = Emotion$1;
|
|
5822
5678
|
createElementArgArray[1] = createEmotionProps(type, props);
|
|
5823
|
-
for (var
|
|
5824
|
-
createElementArgArray[
|
|
5679
|
+
for (var i = 2; i < argsLength; i++) {
|
|
5680
|
+
createElementArgArray[i] = args[i];
|
|
5825
5681
|
}
|
|
5826
5682
|
return React7.createElement.apply(null, createElementArgArray);
|
|
5827
5683
|
};
|
|
5828
|
-
(function(
|
|
5684
|
+
(function(_jsx30) {
|
|
5829
5685
|
var JSX;
|
|
5830
5686
|
/* @__PURE__ */ (function(_JSX) {
|
|
5831
|
-
})(JSX || (JSX =
|
|
5687
|
+
})(JSX || (JSX = _jsx30.JSX || (_jsx30.JSX = {})));
|
|
5832
5688
|
})(jsx || (jsx = {}));
|
|
5833
5689
|
function css() {
|
|
5834
5690
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -5913,8 +5769,8 @@ var createEmotion = function createEmotion2(options) {
|
|
|
5913
5769
|
};
|
|
5914
5770
|
var classnames = function classnames2(args) {
|
|
5915
5771
|
var cls = "";
|
|
5916
|
-
for (var
|
|
5917
|
-
var arg = args[
|
|
5772
|
+
for (var i = 0; i < args.length; i++) {
|
|
5773
|
+
var arg = args[i];
|
|
5918
5774
|
if (arg == null) continue;
|
|
5919
5775
|
var toAdd = void 0;
|
|
5920
5776
|
switch (typeof arg) {
|
|
@@ -5925,10 +5781,10 @@ var classnames = function classnames2(args) {
|
|
|
5925
5781
|
toAdd = classnames2(arg);
|
|
5926
5782
|
} else {
|
|
5927
5783
|
toAdd = "";
|
|
5928
|
-
for (var
|
|
5929
|
-
if (arg[
|
|
5784
|
+
for (var k in arg) {
|
|
5785
|
+
if (arg[k] && k) {
|
|
5930
5786
|
toAdd && (toAdd += " ");
|
|
5931
|
-
toAdd +=
|
|
5787
|
+
toAdd += k;
|
|
5932
5788
|
}
|
|
5933
5789
|
}
|
|
5934
5790
|
}
|
|
@@ -5961,8 +5817,8 @@ var css2 = _createEmotion.css;
|
|
|
5961
5817
|
var sheet = _createEmotion.sheet;
|
|
5962
5818
|
var cache = _createEmotion.cache;
|
|
5963
5819
|
|
|
5964
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
5965
|
-
var isSerializedStyles = (
|
|
5820
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.mjs
|
|
5821
|
+
var isSerializedStyles = (o) => typeof o !== "undefined" && o !== null && ["name", "styles"].every((p) => typeof o[p] !== "undefined");
|
|
5966
5822
|
var useCx = () => {
|
|
5967
5823
|
const cache2 = __unsafe_useEmotionCache();
|
|
5968
5824
|
const cx2 = useCallback6((...classNames) => {
|
|
@@ -5987,14 +5843,14 @@ function memize(fn, options) {
|
|
|
5987
5843
|
var tail;
|
|
5988
5844
|
options = options || {};
|
|
5989
5845
|
function memoized() {
|
|
5990
|
-
var node2 = head, len = arguments.length, args,
|
|
5846
|
+
var node2 = head, len = arguments.length, args, i;
|
|
5991
5847
|
searchCache: while (node2) {
|
|
5992
5848
|
if (node2.args.length !== arguments.length) {
|
|
5993
5849
|
node2 = node2.next;
|
|
5994
5850
|
continue;
|
|
5995
5851
|
}
|
|
5996
|
-
for (
|
|
5997
|
-
if (node2.args[
|
|
5852
|
+
for (i = 0; i < len; i++) {
|
|
5853
|
+
if (node2.args[i] !== arguments[i]) {
|
|
5998
5854
|
node2 = node2.next;
|
|
5999
5855
|
continue searchCache;
|
|
6000
5856
|
}
|
|
@@ -6015,8 +5871,8 @@ function memize(fn, options) {
|
|
|
6015
5871
|
return node2.val;
|
|
6016
5872
|
}
|
|
6017
5873
|
args = new Array(len);
|
|
6018
|
-
for (
|
|
6019
|
-
args[
|
|
5874
|
+
for (i = 0; i < len; i++) {
|
|
5875
|
+
args[i] = arguments[i];
|
|
6020
5876
|
}
|
|
6021
5877
|
node2 = {
|
|
6022
5878
|
args,
|
|
@@ -6048,250 +5904,7 @@ function memize(fn, options) {
|
|
|
6048
5904
|
return memoized;
|
|
6049
5905
|
}
|
|
6050
5906
|
|
|
6051
|
-
// ../../../node_modules/.pnpm
|
|
6052
|
-
var r = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
|
|
6053
|
-
var t = function(r2) {
|
|
6054
|
-
return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
|
|
6055
|
-
};
|
|
6056
|
-
var n = function(r2, t2, n2) {
|
|
6057
|
-
return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = Math.pow(10, t2)), Math.round(n2 * r2) / n2 + 0;
|
|
6058
|
-
};
|
|
6059
|
-
var e = function(r2, t2, n2) {
|
|
6060
|
-
return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t2 ? r2 : t2;
|
|
6061
|
-
};
|
|
6062
|
-
var u = function(r2) {
|
|
6063
|
-
return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
|
|
6064
|
-
};
|
|
6065
|
-
var a = function(r2) {
|
|
6066
|
-
return { r: e(r2.r, 0, 255), g: e(r2.g, 0, 255), b: e(r2.b, 0, 255), a: e(r2.a) };
|
|
6067
|
-
};
|
|
6068
|
-
var o = function(r2) {
|
|
6069
|
-
return { r: n(r2.r), g: n(r2.g), b: n(r2.b), a: n(r2.a, 3) };
|
|
6070
|
-
};
|
|
6071
|
-
var i = /^#([0-9a-f]{3,8})$/i;
|
|
6072
|
-
var s = function(r2) {
|
|
6073
|
-
var t2 = r2.toString(16);
|
|
6074
|
-
return t2.length < 2 ? "0" + t2 : t2;
|
|
6075
|
-
};
|
|
6076
|
-
var h = function(r2) {
|
|
6077
|
-
var t2 = r2.r, n2 = r2.g, e2 = r2.b, u2 = r2.a, a2 = Math.max(t2, n2, e2), o2 = a2 - Math.min(t2, n2, e2), i2 = o2 ? a2 === t2 ? (n2 - e2) / o2 : a2 === n2 ? 2 + (e2 - t2) / o2 : 4 + (t2 - n2) / o2 : 0;
|
|
6078
|
-
return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o2 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
|
|
6079
|
-
};
|
|
6080
|
-
var b = function(r2) {
|
|
6081
|
-
var t2 = r2.h, n2 = r2.s, e2 = r2.v, u2 = r2.a;
|
|
6082
|
-
t2 = t2 / 360 * 6, n2 /= 100, e2 /= 100;
|
|
6083
|
-
var a2 = Math.floor(t2), o2 = e2 * (1 - n2), i2 = e2 * (1 - (t2 - a2) * n2), s2 = e2 * (1 - (1 - t2 + a2) * n2), h2 = a2 % 6;
|
|
6084
|
-
return { r: 255 * [e2, i2, o2, o2, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o2, o2][h2], b: 255 * [o2, o2, s2, e2, e2, i2][h2], a: u2 };
|
|
6085
|
-
};
|
|
6086
|
-
var g = function(r2) {
|
|
6087
|
-
return { h: u(r2.h), s: e(r2.s, 0, 100), l: e(r2.l, 0, 100), a: e(r2.a) };
|
|
6088
|
-
};
|
|
6089
|
-
var d = function(r2) {
|
|
6090
|
-
return { h: n(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
|
|
6091
|
-
};
|
|
6092
|
-
var f = function(r2) {
|
|
6093
|
-
return b((n2 = (t2 = r2).s, { h: t2.h, s: (n2 *= ((e2 = t2.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t2.a }));
|
|
6094
|
-
var t2, n2, e2;
|
|
6095
|
-
};
|
|
6096
|
-
var c = function(r2) {
|
|
6097
|
-
return { h: (t2 = h(r2)).h, s: (u2 = (200 - (n2 = t2.s)) * (e2 = t2.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t2.a };
|
|
6098
|
-
var t2, n2, e2, u2;
|
|
6099
|
-
};
|
|
6100
|
-
var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
|
|
6101
|
-
var p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
|
|
6102
|
-
var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
|
|
6103
|
-
var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
|
|
6104
|
-
var y = { string: [[function(r2) {
|
|
6105
|
-
var t2 = i.exec(r2);
|
|
6106
|
-
return t2 ? (r2 = t2[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
|
|
6107
|
-
}, "hex"], [function(r2) {
|
|
6108
|
-
var t2 = v.exec(r2) || m.exec(r2);
|
|
6109
|
-
return t2 ? t2[2] !== t2[4] || t2[4] !== t2[6] ? null : a({ r: Number(t2[1]) / (t2[2] ? 100 / 255 : 1), g: Number(t2[3]) / (t2[4] ? 100 / 255 : 1), b: Number(t2[5]) / (t2[6] ? 100 / 255 : 1), a: void 0 === t2[7] ? 1 : Number(t2[7]) / (t2[8] ? 100 : 1) }) : null;
|
|
6110
|
-
}, "rgb"], [function(t2) {
|
|
6111
|
-
var n2 = l.exec(t2) || p.exec(t2);
|
|
6112
|
-
if (!n2) return null;
|
|
6113
|
-
var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
|
|
6114
|
-
return f(a2);
|
|
6115
|
-
}, "hsl"]], object: [[function(r2) {
|
|
6116
|
-
var n2 = r2.r, e2 = r2.g, u2 = r2.b, o2 = r2.a, i2 = void 0 === o2 ? 1 : o2;
|
|
6117
|
-
return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
|
|
6118
|
-
}, "rgb"], [function(r2) {
|
|
6119
|
-
var n2 = r2.h, e2 = r2.s, u2 = r2.l, a2 = r2.a, o2 = void 0 === a2 ? 1 : a2;
|
|
6120
|
-
if (!t(n2) || !t(e2) || !t(u2)) return null;
|
|
6121
|
-
var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o2) });
|
|
6122
|
-
return f(i2);
|
|
6123
|
-
}, "hsl"], [function(r2) {
|
|
6124
|
-
var n2 = r2.h, a2 = r2.s, o2 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
|
|
6125
|
-
if (!t(n2) || !t(a2) || !t(o2)) return null;
|
|
6126
|
-
var h2 = (function(r3) {
|
|
6127
|
-
return { h: u(r3.h), s: e(r3.s, 0, 100), v: e(r3.v, 0, 100), a: e(r3.a) };
|
|
6128
|
-
})({ h: Number(n2), s: Number(a2), v: Number(o2), a: Number(s2) });
|
|
6129
|
-
return b(h2);
|
|
6130
|
-
}, "hsv"]] };
|
|
6131
|
-
var N = function(r2, t2) {
|
|
6132
|
-
for (var n2 = 0; n2 < t2.length; n2++) {
|
|
6133
|
-
var e2 = t2[n2][0](r2);
|
|
6134
|
-
if (e2) return [e2, t2[n2][1]];
|
|
6135
|
-
}
|
|
6136
|
-
return [null, void 0];
|
|
6137
|
-
};
|
|
6138
|
-
var x = function(r2) {
|
|
6139
|
-
return "string" == typeof r2 ? N(r2.trim(), y.string) : "object" == typeof r2 && null !== r2 ? N(r2, y.object) : [null, void 0];
|
|
6140
|
-
};
|
|
6141
|
-
var M = function(r2, t2) {
|
|
6142
|
-
var n2 = c(r2);
|
|
6143
|
-
return { h: n2.h, s: e(n2.s + 100 * t2, 0, 100), l: n2.l, a: n2.a };
|
|
6144
|
-
};
|
|
6145
|
-
var H = function(r2) {
|
|
6146
|
-
return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
|
|
6147
|
-
};
|
|
6148
|
-
var $ = function(r2, t2) {
|
|
6149
|
-
var n2 = c(r2);
|
|
6150
|
-
return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t2, 0, 100), a: n2.a };
|
|
6151
|
-
};
|
|
6152
|
-
var j = (function() {
|
|
6153
|
-
function r2(r3) {
|
|
6154
|
-
this.parsed = x(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
|
|
6155
|
-
}
|
|
6156
|
-
return r2.prototype.isValid = function() {
|
|
6157
|
-
return null !== this.parsed;
|
|
6158
|
-
}, r2.prototype.brightness = function() {
|
|
6159
|
-
return n(H(this.rgba), 2);
|
|
6160
|
-
}, r2.prototype.isDark = function() {
|
|
6161
|
-
return H(this.rgba) < 0.5;
|
|
6162
|
-
}, r2.prototype.isLight = function() {
|
|
6163
|
-
return H(this.rgba) >= 0.5;
|
|
6164
|
-
}, r2.prototype.toHex = function() {
|
|
6165
|
-
return r3 = o(this.rgba), t2 = r3.r, e2 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t2) + s(e2) + s(u2) + i2;
|
|
6166
|
-
var r3, t2, e2, u2, a2, i2;
|
|
6167
|
-
}, r2.prototype.toRgb = function() {
|
|
6168
|
-
return o(this.rgba);
|
|
6169
|
-
}, r2.prototype.toRgbString = function() {
|
|
6170
|
-
return r3 = o(this.rgba), t2 = r3.r, n2 = r3.g, e2 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t2 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t2 + ", " + n2 + ", " + e2 + ")";
|
|
6171
|
-
var r3, t2, n2, e2, u2;
|
|
6172
|
-
}, r2.prototype.toHsl = function() {
|
|
6173
|
-
return d(c(this.rgba));
|
|
6174
|
-
}, r2.prototype.toHslString = function() {
|
|
6175
|
-
return r3 = d(c(this.rgba)), t2 = r3.h, n2 = r3.s, e2 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t2 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t2 + ", " + n2 + "%, " + e2 + "%)";
|
|
6176
|
-
var r3, t2, n2, e2, u2;
|
|
6177
|
-
}, r2.prototype.toHsv = function() {
|
|
6178
|
-
return r3 = h(this.rgba), { h: n(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
|
|
6179
|
-
var r3;
|
|
6180
|
-
}, r2.prototype.invert = function() {
|
|
6181
|
-
return w({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
|
|
6182
|
-
var r3;
|
|
6183
|
-
}, r2.prototype.saturate = function(r3) {
|
|
6184
|
-
return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, r3));
|
|
6185
|
-
}, r2.prototype.desaturate = function(r3) {
|
|
6186
|
-
return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, -r3));
|
|
6187
|
-
}, r2.prototype.grayscale = function() {
|
|
6188
|
-
return w(M(this.rgba, -1));
|
|
6189
|
-
}, r2.prototype.lighten = function(r3) {
|
|
6190
|
-
return void 0 === r3 && (r3 = 0.1), w($(this.rgba, r3));
|
|
6191
|
-
}, r2.prototype.darken = function(r3) {
|
|
6192
|
-
return void 0 === r3 && (r3 = 0.1), w($(this.rgba, -r3));
|
|
6193
|
-
}, r2.prototype.rotate = function(r3) {
|
|
6194
|
-
return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
|
|
6195
|
-
}, r2.prototype.alpha = function(r3) {
|
|
6196
|
-
return "number" == typeof r3 ? w({ r: (t2 = this.rgba).r, g: t2.g, b: t2.b, a: r3 }) : n(this.rgba.a, 3);
|
|
6197
|
-
var t2;
|
|
6198
|
-
}, r2.prototype.hue = function(r3) {
|
|
6199
|
-
var t2 = c(this.rgba);
|
|
6200
|
-
return "number" == typeof r3 ? w({ h: r3, s: t2.s, l: t2.l, a: t2.a }) : n(t2.h);
|
|
6201
|
-
}, r2.prototype.isEqual = function(r3) {
|
|
6202
|
-
return this.toHex() === w(r3).toHex();
|
|
6203
|
-
}, r2;
|
|
6204
|
-
})();
|
|
6205
|
-
var w = function(r2) {
|
|
6206
|
-
return r2 instanceof j ? r2 : new j(r2);
|
|
6207
|
-
};
|
|
6208
|
-
var S = [];
|
|
6209
|
-
var k = function(r2) {
|
|
6210
|
-
r2.forEach(function(r3) {
|
|
6211
|
-
S.indexOf(r3) < 0 && (r3(j, y), S.push(r3));
|
|
6212
|
-
});
|
|
6213
|
-
};
|
|
6214
|
-
|
|
6215
|
-
// ../../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/names.mjs
|
|
6216
|
-
function names_default(e2, f2) {
|
|
6217
|
-
var a2 = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r2 = {};
|
|
6218
|
-
for (var d2 in a2) r2[a2[d2]] = d2;
|
|
6219
|
-
var l2 = {};
|
|
6220
|
-
e2.prototype.toName = function(f3) {
|
|
6221
|
-
if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return "transparent";
|
|
6222
|
-
var d3, i2, n2 = r2[this.toHex()];
|
|
6223
|
-
if (n2) return n2;
|
|
6224
|
-
if (null == f3 ? void 0 : f3.closest) {
|
|
6225
|
-
var o2 = this.toRgb(), t2 = 1 / 0, b2 = "black";
|
|
6226
|
-
if (!l2.length) for (var c2 in a2) l2[c2] = new e2(a2[c2]).toRgb();
|
|
6227
|
-
for (var g2 in a2) {
|
|
6228
|
-
var u2 = (d3 = o2, i2 = l2[g2], Math.pow(d3.r - i2.r, 2) + Math.pow(d3.g - i2.g, 2) + Math.pow(d3.b - i2.b, 2));
|
|
6229
|
-
u2 < t2 && (t2 = u2, b2 = g2);
|
|
6230
|
-
}
|
|
6231
|
-
return b2;
|
|
6232
|
-
}
|
|
6233
|
-
};
|
|
6234
|
-
f2.string.push([function(f3) {
|
|
6235
|
-
var r3 = f3.toLowerCase(), d3 = "transparent" === r3 ? "#0000" : a2[r3];
|
|
6236
|
-
return d3 ? new e2(d3).toRgb() : null;
|
|
6237
|
-
}, "name"]);
|
|
6238
|
-
}
|
|
6239
|
-
|
|
6240
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/colors.mjs
|
|
6241
|
-
var colorComputationNode;
|
|
6242
|
-
k([names_default]);
|
|
6243
|
-
function getColorComputationNode() {
|
|
6244
|
-
if (typeof document === "undefined") {
|
|
6245
|
-
return;
|
|
6246
|
-
}
|
|
6247
|
-
if (!colorComputationNode) {
|
|
6248
|
-
const el = document.createElement("div");
|
|
6249
|
-
el.setAttribute("data-g2-color-computation-node", "");
|
|
6250
|
-
document.body.appendChild(el);
|
|
6251
|
-
colorComputationNode = el;
|
|
6252
|
-
}
|
|
6253
|
-
return colorComputationNode;
|
|
6254
|
-
}
|
|
6255
|
-
function isColor(value) {
|
|
6256
|
-
if (typeof value !== "string") {
|
|
6257
|
-
return false;
|
|
6258
|
-
}
|
|
6259
|
-
const test = w(value);
|
|
6260
|
-
return test.isValid();
|
|
6261
|
-
}
|
|
6262
|
-
function _getComputedBackgroundColor(backgroundColor) {
|
|
6263
|
-
if (typeof backgroundColor !== "string") {
|
|
6264
|
-
return "";
|
|
6265
|
-
}
|
|
6266
|
-
if (isColor(backgroundColor)) {
|
|
6267
|
-
return backgroundColor;
|
|
6268
|
-
}
|
|
6269
|
-
if (!backgroundColor.includes("var(")) {
|
|
6270
|
-
return "";
|
|
6271
|
-
}
|
|
6272
|
-
if (typeof document === "undefined") {
|
|
6273
|
-
return "";
|
|
6274
|
-
}
|
|
6275
|
-
const el = getColorComputationNode();
|
|
6276
|
-
if (!el) {
|
|
6277
|
-
return "";
|
|
6278
|
-
}
|
|
6279
|
-
el.style.background = backgroundColor;
|
|
6280
|
-
const computedColor = window?.getComputedStyle(el).background;
|
|
6281
|
-
el.style.background = "";
|
|
6282
|
-
return computedColor || "";
|
|
6283
|
-
}
|
|
6284
|
-
var getComputedBackgroundColor = memize(_getComputedBackgroundColor);
|
|
6285
|
-
function getOptimalTextColor(backgroundColor) {
|
|
6286
|
-
const background = getComputedBackgroundColor(backgroundColor);
|
|
6287
|
-
return w(background).isLight() ? "#000000" : "#ffffff";
|
|
6288
|
-
}
|
|
6289
|
-
function getOptimalTextShade(backgroundColor) {
|
|
6290
|
-
const result = getOptimalTextColor(backgroundColor);
|
|
6291
|
-
return result === "#000000" ? "dark" : "light";
|
|
6292
|
-
}
|
|
6293
|
-
|
|
6294
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/colors-values.mjs
|
|
5907
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/colors-values.mjs
|
|
6295
5908
|
var white = "#fff";
|
|
6296
5909
|
var GRAY = {
|
|
6297
5910
|
900: "#1e1e1e",
|
|
@@ -6372,7 +5985,7 @@ var COLORS = Object.freeze({
|
|
|
6372
5985
|
ui: UI
|
|
6373
5986
|
});
|
|
6374
5987
|
|
|
6375
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
5988
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/config-values.mjs
|
|
6376
5989
|
var CONTROL_HEIGHT = "36px";
|
|
6377
5990
|
var CONTROL_PROPS = {
|
|
6378
5991
|
// These values should be shared with TextControl.
|
|
@@ -6440,7 +6053,7 @@ var config_values_default = Object.assign({}, CONTROL_PROPS, {
|
|
|
6440
6053
|
transitionTimingFunctionControl: "cubic-bezier(0.12, 0.8, 0.32, 1)"
|
|
6441
6054
|
});
|
|
6442
6055
|
|
|
6443
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6056
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
|
|
6444
6057
|
var import_es6 = __toESM(require_es6(), 1);
|
|
6445
6058
|
import deepmerge2 from "deepmerge";
|
|
6446
6059
|
|
|
@@ -6461,12 +6074,12 @@ function warning(message) {
|
|
|
6461
6074
|
console.warn(message);
|
|
6462
6075
|
try {
|
|
6463
6076
|
throw Error(message);
|
|
6464
|
-
} catch (
|
|
6077
|
+
} catch (x) {
|
|
6465
6078
|
}
|
|
6466
6079
|
logged.add(message);
|
|
6467
6080
|
}
|
|
6468
6081
|
|
|
6469
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6082
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
|
|
6470
6083
|
import { jsx as _jsx16 } from "react/jsx-runtime";
|
|
6471
6084
|
var ComponentsContext = createContext3(
|
|
6472
6085
|
/** @type {Record<string, any>} */
|
|
@@ -6509,19 +6122,19 @@ var BaseContextSystemProvider = ({
|
|
|
6509
6122
|
};
|
|
6510
6123
|
var ContextSystemProvider = memo(BaseContextSystemProvider);
|
|
6511
6124
|
|
|
6512
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6125
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/constants.mjs
|
|
6513
6126
|
var COMPONENT_NAMESPACE = "data-wp-component";
|
|
6514
6127
|
var CONNECTED_NAMESPACE = "data-wp-c16t";
|
|
6515
6128
|
var CONNECT_STATIC_NAMESPACE = "__contextSystemKey__";
|
|
6516
6129
|
|
|
6517
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6130
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/get-styled-class-name-from-key.mjs
|
|
6518
6131
|
function getStyledClassName(namespace) {
|
|
6519
6132
|
const kebab = paramCase(namespace);
|
|
6520
6133
|
return `components-${kebab}`;
|
|
6521
6134
|
}
|
|
6522
6135
|
var getStyledClassNameFromKey = memize(getStyledClassName);
|
|
6523
6136
|
|
|
6524
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6137
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/context-connect.mjs
|
|
6525
6138
|
function contextConnect(Component2, namespace) {
|
|
6526
6139
|
return _contextConnect(Component2, namespace, {
|
|
6527
6140
|
forwardsRef: true
|
|
@@ -6545,33 +6158,8 @@ function _contextConnect(Component2, namespace, options) {
|
|
|
6545
6158
|
selector: `.${getStyledClassNameFromKey(namespace)}`
|
|
6546
6159
|
});
|
|
6547
6160
|
}
|
|
6548
|
-
function getConnectNamespace(Component2) {
|
|
6549
|
-
if (!Component2) {
|
|
6550
|
-
return [];
|
|
6551
|
-
}
|
|
6552
|
-
let namespaces = [];
|
|
6553
|
-
if (Component2[CONNECT_STATIC_NAMESPACE]) {
|
|
6554
|
-
namespaces = Component2[CONNECT_STATIC_NAMESPACE];
|
|
6555
|
-
}
|
|
6556
|
-
if (Component2.type && Component2.type[CONNECT_STATIC_NAMESPACE]) {
|
|
6557
|
-
namespaces = Component2.type[CONNECT_STATIC_NAMESPACE];
|
|
6558
|
-
}
|
|
6559
|
-
return namespaces;
|
|
6560
|
-
}
|
|
6561
|
-
function hasConnectNamespace(Component2, match2) {
|
|
6562
|
-
if (!Component2) {
|
|
6563
|
-
return false;
|
|
6564
|
-
}
|
|
6565
|
-
if (typeof match2 === "string") {
|
|
6566
|
-
return getConnectNamespace(Component2).includes(match2);
|
|
6567
|
-
}
|
|
6568
|
-
if (Array.isArray(match2)) {
|
|
6569
|
-
return match2.some((result) => getConnectNamespace(Component2).includes(result));
|
|
6570
|
-
}
|
|
6571
|
-
return false;
|
|
6572
|
-
}
|
|
6573
6161
|
|
|
6574
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6162
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/utils.mjs
|
|
6575
6163
|
function getNamespace(componentName) {
|
|
6576
6164
|
return {
|
|
6577
6165
|
[COMPONENT_NAMESPACE]: componentName
|
|
@@ -6583,7 +6171,7 @@ function getConnectedNamespace() {
|
|
|
6583
6171
|
};
|
|
6584
6172
|
}
|
|
6585
6173
|
|
|
6586
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6174
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/use-context-system.mjs
|
|
6587
6175
|
function useContextSystem(props, namespace) {
|
|
6588
6176
|
const contextSystemProps = useComponentsContext();
|
|
6589
6177
|
if (typeof namespace === "undefined") {
|
|
@@ -6654,23 +6242,23 @@ var composeShouldForwardProps = function composeShouldForwardProps2(tag, options
|
|
|
6654
6242
|
}
|
|
6655
6243
|
return shouldForwardProp;
|
|
6656
6244
|
};
|
|
6657
|
-
var Insertion3 = function Insertion4(
|
|
6658
|
-
var cache2 =
|
|
6245
|
+
var Insertion3 = function Insertion4(_ref) {
|
|
6246
|
+
var cache2 = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;
|
|
6659
6247
|
registerStyles(cache2, serialized, isStringTag);
|
|
6660
6248
|
var rules = useInsertionEffectAlwaysWithSyncFallback(function() {
|
|
6661
6249
|
return insertStyles(cache2, serialized, isStringTag);
|
|
6662
6250
|
});
|
|
6663
6251
|
if (!isBrowser5 && rules !== void 0) {
|
|
6664
|
-
var
|
|
6252
|
+
var _ref2;
|
|
6665
6253
|
var serializedNames = serialized.name;
|
|
6666
6254
|
var next2 = serialized.next;
|
|
6667
6255
|
while (next2 !== void 0) {
|
|
6668
6256
|
serializedNames += " " + next2.name;
|
|
6669
6257
|
next2 = next2.next;
|
|
6670
6258
|
}
|
|
6671
|
-
return /* @__PURE__ */ React8.createElement("style", (
|
|
6259
|
+
return /* @__PURE__ */ React8.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache2.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
6672
6260
|
__html: rules
|
|
6673
|
-
},
|
|
6261
|
+
}, _ref2.nonce = cache2.sheet.nonce, _ref2));
|
|
6674
6262
|
}
|
|
6675
6263
|
return null;
|
|
6676
6264
|
};
|
|
@@ -6698,9 +6286,9 @@ var createStyled = function createStyled2(tag, options) {
|
|
|
6698
6286
|
var templateStringsArr = args[0];
|
|
6699
6287
|
styles.push(templateStringsArr[0]);
|
|
6700
6288
|
var len = args.length;
|
|
6701
|
-
var
|
|
6702
|
-
for (;
|
|
6703
|
-
styles.push(args[
|
|
6289
|
+
var i = 1;
|
|
6290
|
+
for (; i < len; i++) {
|
|
6291
|
+
styles.push(args[i], templateStringsArr[i]);
|
|
6704
6292
|
}
|
|
6705
6293
|
}
|
|
6706
6294
|
var Styled = withEmotionCache(function(props, cache2, ref) {
|
|
@@ -6767,7 +6355,7 @@ var createStyled = function createStyled2(tag, options) {
|
|
|
6767
6355
|
};
|
|
6768
6356
|
};
|
|
6769
6357
|
|
|
6770
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6358
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/view/component.mjs
|
|
6771
6359
|
import { jsx as _jsx17 } from "react/jsx-runtime";
|
|
6772
6360
|
var PolymorphicDiv = /* @__PURE__ */ createStyled("div", process.env.NODE_ENV === "production" ? {
|
|
6773
6361
|
target: "e19lxcc00"
|
|
@@ -6790,7 +6378,7 @@ var View = Object.assign(forwardRef3(UnforwardedView), {
|
|
|
6790
6378
|
});
|
|
6791
6379
|
var component_default = View;
|
|
6792
6380
|
|
|
6793
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6381
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/use-responsive-value.mjs
|
|
6794
6382
|
var breakpoints = ["40em", "52em", "64em"];
|
|
6795
6383
|
var useBreakpointIndex = (options = {}) => {
|
|
6796
6384
|
const {
|
|
@@ -6833,429 +6421,7 @@ function useResponsiveValue(values, options = {}) {
|
|
|
6833
6421
|
return array[index >= array.length ? array.length - 1 : index];
|
|
6834
6422
|
}
|
|
6835
6423
|
|
|
6836
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6837
|
-
var GRID_BASE = "4px";
|
|
6838
|
-
function space(value) {
|
|
6839
|
-
if (typeof value === "undefined") {
|
|
6840
|
-
return void 0;
|
|
6841
|
-
}
|
|
6842
|
-
if (!value) {
|
|
6843
|
-
return "0";
|
|
6844
|
-
}
|
|
6845
|
-
const asInt = typeof value === "number" ? value : Number(value);
|
|
6846
|
-
if (typeof window !== "undefined" && window.CSS?.supports?.("margin", value.toString()) || Number.isNaN(asInt)) {
|
|
6847
|
-
return value.toString();
|
|
6848
|
-
}
|
|
6849
|
-
return `calc(${GRID_BASE} * ${value})`;
|
|
6850
|
-
}
|
|
6851
|
-
|
|
6852
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/truncate/styles.mjs
|
|
6853
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() {
|
|
6854
|
-
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
6855
|
-
}
|
|
6856
|
-
var Truncate = process.env.NODE_ENV === "production" ? {
|
|
6857
|
-
name: "hdknak",
|
|
6858
|
-
styles: "display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"
|
|
6859
|
-
} : {
|
|
6860
|
-
name: "abxxyf-Truncate",
|
|
6861
|
-
styles: "display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;label:Truncate;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLMkIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5leHBvcnQgY29uc3QgVHJ1bmNhdGUgPSBjc3NgXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcbmA7XG4iXX0= */",
|
|
6862
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
6863
|
-
};
|
|
6864
|
-
|
|
6865
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/truncate/utils.mjs
|
|
6866
|
-
var TRUNCATE_ELLIPSIS = "\u2026";
|
|
6867
|
-
var TRUNCATE_TYPE = {
|
|
6868
|
-
auto: "auto",
|
|
6869
|
-
head: "head",
|
|
6870
|
-
middle: "middle",
|
|
6871
|
-
tail: "tail",
|
|
6872
|
-
none: "none"
|
|
6873
|
-
};
|
|
6874
|
-
var TRUNCATE_DEFAULT_PROPS = {
|
|
6875
|
-
ellipsis: TRUNCATE_ELLIPSIS,
|
|
6876
|
-
ellipsizeMode: TRUNCATE_TYPE.auto,
|
|
6877
|
-
limit: 0,
|
|
6878
|
-
numberOfLines: 0
|
|
6879
|
-
};
|
|
6880
|
-
function truncateMiddle(word, headLength, tailLength, ellipsis) {
|
|
6881
|
-
if (typeof word !== "string") {
|
|
6882
|
-
return "";
|
|
6883
|
-
}
|
|
6884
|
-
const wordLength = word.length;
|
|
6885
|
-
const frontLength = ~~headLength;
|
|
6886
|
-
const backLength = ~~tailLength;
|
|
6887
|
-
const truncateStr = isValueDefined(ellipsis) ? ellipsis : TRUNCATE_ELLIPSIS;
|
|
6888
|
-
if (frontLength === 0 && backLength === 0 || frontLength >= wordLength || backLength >= wordLength || frontLength + backLength >= wordLength) {
|
|
6889
|
-
return word;
|
|
6890
|
-
} else if (backLength === 0) {
|
|
6891
|
-
return word.slice(0, frontLength) + truncateStr;
|
|
6892
|
-
}
|
|
6893
|
-
return word.slice(0, frontLength) + truncateStr + word.slice(wordLength - backLength);
|
|
6894
|
-
}
|
|
6895
|
-
function truncateContent(words = "", props) {
|
|
6896
|
-
const mergedProps = {
|
|
6897
|
-
...TRUNCATE_DEFAULT_PROPS,
|
|
6898
|
-
...props
|
|
6899
|
-
};
|
|
6900
|
-
const {
|
|
6901
|
-
ellipsis,
|
|
6902
|
-
ellipsizeMode,
|
|
6903
|
-
limit
|
|
6904
|
-
} = mergedProps;
|
|
6905
|
-
if (ellipsizeMode === TRUNCATE_TYPE.none) {
|
|
6906
|
-
return words;
|
|
6907
|
-
}
|
|
6908
|
-
let truncateHead;
|
|
6909
|
-
let truncateTail;
|
|
6910
|
-
switch (ellipsizeMode) {
|
|
6911
|
-
case TRUNCATE_TYPE.head:
|
|
6912
|
-
truncateHead = 0;
|
|
6913
|
-
truncateTail = limit;
|
|
6914
|
-
break;
|
|
6915
|
-
case TRUNCATE_TYPE.middle:
|
|
6916
|
-
truncateHead = Math.floor(limit / 2);
|
|
6917
|
-
truncateTail = Math.floor(limit / 2);
|
|
6918
|
-
break;
|
|
6919
|
-
default:
|
|
6920
|
-
truncateHead = limit;
|
|
6921
|
-
truncateTail = 0;
|
|
6922
|
-
}
|
|
6923
|
-
const truncatedContent = ellipsizeMode !== TRUNCATE_TYPE.auto ? truncateMiddle(words, truncateHead, truncateTail, ellipsis) : words;
|
|
6924
|
-
return truncatedContent;
|
|
6925
|
-
}
|
|
6926
|
-
|
|
6927
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/truncate/hook.mjs
|
|
6928
|
-
function useTruncate(props) {
|
|
6929
|
-
const {
|
|
6930
|
-
className,
|
|
6931
|
-
children,
|
|
6932
|
-
ellipsis = TRUNCATE_ELLIPSIS,
|
|
6933
|
-
ellipsizeMode = TRUNCATE_TYPE.auto,
|
|
6934
|
-
limit = 0,
|
|
6935
|
-
numberOfLines = 0,
|
|
6936
|
-
...otherProps
|
|
6937
|
-
} = useContextSystem(props, "Truncate");
|
|
6938
|
-
const cx2 = useCx();
|
|
6939
|
-
let childrenAsText;
|
|
6940
|
-
if (typeof children === "string") {
|
|
6941
|
-
childrenAsText = children;
|
|
6942
|
-
} else if (typeof children === "number") {
|
|
6943
|
-
childrenAsText = children.toString();
|
|
6944
|
-
}
|
|
6945
|
-
const truncatedContent = childrenAsText ? truncateContent(childrenAsText, {
|
|
6946
|
-
ellipsis,
|
|
6947
|
-
ellipsizeMode,
|
|
6948
|
-
limit,
|
|
6949
|
-
numberOfLines
|
|
6950
|
-
}) : children;
|
|
6951
|
-
const shouldTruncate = !!childrenAsText && ellipsizeMode === TRUNCATE_TYPE.auto;
|
|
6952
|
-
const classes = useMemo13(() => {
|
|
6953
|
-
const truncateLines = /* @__PURE__ */ css(numberOfLines === 1 ? "word-break: break-all;" : "", " -webkit-box-orient:vertical;-webkit-line-clamp:", numberOfLines, ";display:-webkit-box;overflow:hidden;" + (process.env.NODE_ENV === "production" ? "" : ";label:truncateLines;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEQyQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtby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pZW50OiB2ZXJ0aWNhbDtcblx0XHRcdC13ZWJraXQtbGluZS1jbGFtcDogJHsgbnVtYmVyT2ZMaW5lcyB9O1xuXHRcdFx0ZGlzcGxheTogLXdlYmtpdC1ib3g7XG5cdFx0XHRvdmVyZmxvdzogaGlkZGVuO1xuXHRcdGA7XG5cblx0XHRyZXR1cm4gY3goXG5cdFx0XHRzaG91bGRUcnVuY2F0ZSAmJiAhIG51bWJlck9mTGluZXMgJiYgc3R5bGVzLlRydW5jYXRlLFxuXHRcdFx0c2hvdWxkVHJ1bmNhdGUgJiYgISEgbnVtYmVyT2ZMaW5lcyAmJiB0cnVuY2F0ZUxpbmVzLFxuXHRcdFx0Y2xhc3NOYW1lXG5cdFx0KTtcblx0fSwgWyBjbGFzc05hbWUsIGN4LCBudW1iZXJPZkxpbmVzLCBzaG91bGRUcnVuY2F0ZSBdICk7XG5cblx0cmV0dXJuIHsgLi4ub3RoZXJQcm9wcywgY2xhc3NOYW1lOiBjbGFzc2VzLCBjaGlsZHJlbjogdHJ1bmNhdGVkQ29udGVudCB9O1xufVxuIl19 */");
|
|
6954
|
-
return cx2(shouldTruncate && !numberOfLines && Truncate, shouldTruncate && !!numberOfLines && truncateLines, className);
|
|
6955
|
-
}, [className, cx2, numberOfLines, shouldTruncate]);
|
|
6956
|
-
return {
|
|
6957
|
-
...otherProps,
|
|
6958
|
-
className: classes,
|
|
6959
|
-
children: truncatedContent
|
|
6960
|
-
};
|
|
6961
|
-
}
|
|
6962
|
-
|
|
6963
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/text/styles.mjs
|
|
6964
|
-
var styles_exports2 = {};
|
|
6965
|
-
__export(styles_exports2, {
|
|
6966
|
-
Text: () => Text2,
|
|
6967
|
-
block: () => block,
|
|
6968
|
-
destructive: () => destructive,
|
|
6969
|
-
highlighterText: () => highlighterText,
|
|
6970
|
-
muted: () => muted,
|
|
6971
|
-
positive: () => positive,
|
|
6972
|
-
upperCase: () => upperCase
|
|
6973
|
-
});
|
|
6974
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__2() {
|
|
6975
|
-
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
6976
|
-
}
|
|
6977
|
-
var Text2 = /* @__PURE__ */ css("color:", COLORS.theme.foreground, ";line-height:", config_values_default.fontLineHeightBase, ";margin:0;text-wrap:pretty;" + (process.env.NODE_ENV === "production" ? "" : ";label:Text;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVdUIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGNvbnN0IFRleHQgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRtYXJnaW46IDA7XG5cdHRleHQtd3JhcDogcHJldHR5O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJsb2NrID0gY3NzYFxuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBwb3NpdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5ncmVlbiB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGRlc3RydWN0aXZlID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLmFsZXJ0LnJlZCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IG11dGVkID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5gO1xuXG5leHBvcnQgY29uc3QgaGlnaGxpZ2h0ZXJUZXh0ID0gY3NzYFxuXHRtYXJrIHtcblx0XHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuYWxlcnQueWVsbG93IH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdFx0Ym94LXNoYWRvdzpcblx0XHRcdDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjA1ICkgaW5zZXQsXG5cdFx0XHQwIC0xcHggMCByZ2JhKCAwLCAwLCAwLCAwLjEgKSBpbnNldDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IHVwcGVyQ2FzZSA9IGNzc2Bcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcbmA7XG4iXX0= */");
|
|
6978
|
-
var block = process.env.NODE_ENV === "production" ? {
|
|
6979
|
-
name: "4zleql",
|
|
6980
|
-
styles: "display:block"
|
|
6981
|
-
} : {
|
|
6982
|
-
name: "14aceuy-block",
|
|
6983
|
-
styles: "display:block;label:block;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQndCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoq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tOiB1cHBlcmNhc2U7XG5gO1xuIl19 */",
|
|
6984
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__2
|
|
6985
|
-
};
|
|
6986
|
-
var positive = /* @__PURE__ */ css("color:", COLORS.alert.green, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:positive;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQjJCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */");
|
|
6987
|
-
var destructive = /* @__PURE__ */ css("color:", COLORS.alert.red, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:destructive;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5QjhCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */");
|
|
6988
|
-
var muted = /* @__PURE__ */ css("color:", COLORS.gray[700], ";" + (process.env.NODE_ENV === "production" ? "" : ";label:muted;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3Vy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XHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */");
|
|
6989
|
-
var highlighterText = /* @__PURE__ */ css("mark{background:", COLORS.alert.yellow, ";border-radius:", config_values_default.radiusSmall, ";box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}" + (process.env.NODE_ENV === "production" ? "" : ";label:highlighterText;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ2tDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */");
|
|
6990
|
-
var upperCase = process.env.NODE_ENV === "production" ? {
|
|
6991
|
-
name: "50zrmy",
|
|
6992
|
-
styles: "text-transform:uppercase"
|
|
6993
|
-
} : {
|
|
6994
|
-
name: "1mrt3zt-upperCase",
|
|
6995
|
-
styles: "text-transform:uppercase;label:upperCase;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQzRCIiwiZmlsZSI6InN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0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */",
|
|
6996
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__2
|
|
6997
|
-
};
|
|
6998
|
-
|
|
6999
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/text/utils.mjs
|
|
7000
|
-
var import_highlight_words_core = __toESM(require_dist(), 1);
|
|
7001
|
-
var lowercaseProps = (object) => {
|
|
7002
|
-
const mapped = {};
|
|
7003
|
-
for (const key in object) {
|
|
7004
|
-
mapped[key.toLowerCase()] = object[key];
|
|
7005
|
-
}
|
|
7006
|
-
return mapped;
|
|
7007
|
-
};
|
|
7008
|
-
var memoizedLowercaseProps = memize(lowercaseProps);
|
|
7009
|
-
function createHighlighterText({
|
|
7010
|
-
activeClassName = "",
|
|
7011
|
-
activeIndex = -1,
|
|
7012
|
-
activeStyle,
|
|
7013
|
-
autoEscape,
|
|
7014
|
-
caseSensitive = false,
|
|
7015
|
-
children,
|
|
7016
|
-
findChunks,
|
|
7017
|
-
highlightClassName = "",
|
|
7018
|
-
highlightStyle = {},
|
|
7019
|
-
highlightTag = "mark",
|
|
7020
|
-
sanitize,
|
|
7021
|
-
searchWords = [],
|
|
7022
|
-
unhighlightClassName = "",
|
|
7023
|
-
unhighlightStyle
|
|
7024
|
-
}) {
|
|
7025
|
-
if (!children) {
|
|
7026
|
-
return null;
|
|
7027
|
-
}
|
|
7028
|
-
if (typeof children !== "string") {
|
|
7029
|
-
return children;
|
|
7030
|
-
}
|
|
7031
|
-
const textToHighlight = children;
|
|
7032
|
-
const chunks = (0, import_highlight_words_core.findAll)({
|
|
7033
|
-
autoEscape,
|
|
7034
|
-
caseSensitive,
|
|
7035
|
-
findChunks,
|
|
7036
|
-
sanitize,
|
|
7037
|
-
searchWords,
|
|
7038
|
-
textToHighlight
|
|
7039
|
-
});
|
|
7040
|
-
const HighlightTag = highlightTag;
|
|
7041
|
-
let highlightIndex = -1;
|
|
7042
|
-
let highlightClassNames = "";
|
|
7043
|
-
let highlightStyles;
|
|
7044
|
-
const textContent = chunks.map((chunk, index) => {
|
|
7045
|
-
const text = textToHighlight.substr(chunk.start, chunk.end - chunk.start);
|
|
7046
|
-
if (chunk.highlight) {
|
|
7047
|
-
highlightIndex++;
|
|
7048
|
-
let highlightClass;
|
|
7049
|
-
if (typeof highlightClassName === "object") {
|
|
7050
|
-
if (!caseSensitive) {
|
|
7051
|
-
highlightClassName = memoizedLowercaseProps(highlightClassName);
|
|
7052
|
-
highlightClass = highlightClassName[text.toLowerCase()];
|
|
7053
|
-
} else {
|
|
7054
|
-
highlightClass = highlightClassName[text];
|
|
7055
|
-
}
|
|
7056
|
-
} else {
|
|
7057
|
-
highlightClass = highlightClassName;
|
|
7058
|
-
}
|
|
7059
|
-
const isActive = highlightIndex === +activeIndex;
|
|
7060
|
-
highlightClassNames = `${highlightClass} ${isActive ? activeClassName : ""}`;
|
|
7061
|
-
highlightStyles = isActive === true && activeStyle !== null ? Object.assign({}, highlightStyle, activeStyle) : highlightStyle;
|
|
7062
|
-
const props = {
|
|
7063
|
-
children: text,
|
|
7064
|
-
className: highlightClassNames,
|
|
7065
|
-
key: index,
|
|
7066
|
-
style: highlightStyles
|
|
7067
|
-
};
|
|
7068
|
-
if (typeof HighlightTag !== "string") {
|
|
7069
|
-
props.highlightIndex = highlightIndex;
|
|
7070
|
-
}
|
|
7071
|
-
return createElement3(HighlightTag, props);
|
|
7072
|
-
}
|
|
7073
|
-
return createElement3("span", {
|
|
7074
|
-
children: text,
|
|
7075
|
-
className: unhighlightClassName,
|
|
7076
|
-
key: index,
|
|
7077
|
-
style: unhighlightStyle
|
|
7078
|
-
});
|
|
7079
|
-
});
|
|
7080
|
-
return textContent;
|
|
7081
|
-
}
|
|
7082
|
-
|
|
7083
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/font-size.mjs
|
|
7084
|
-
var BASE_FONT_SIZE = 13;
|
|
7085
|
-
var PRESET_FONT_SIZES = {
|
|
7086
|
-
body: BASE_FONT_SIZE,
|
|
7087
|
-
caption: 10,
|
|
7088
|
-
footnote: 11,
|
|
7089
|
-
largeTitle: 28,
|
|
7090
|
-
subheadline: 12,
|
|
7091
|
-
title: 20
|
|
7092
|
-
};
|
|
7093
|
-
var HEADING_FONT_SIZES = [1, 2, 3, 4, 5, 6].flatMap((n2) => [n2, n2.toString()]);
|
|
7094
|
-
function getFontSize(size = BASE_FONT_SIZE) {
|
|
7095
|
-
if (size in PRESET_FONT_SIZES) {
|
|
7096
|
-
return getFontSize(PRESET_FONT_SIZES[size]);
|
|
7097
|
-
}
|
|
7098
|
-
if (typeof size !== "number") {
|
|
7099
|
-
const parsed = parseFloat(size);
|
|
7100
|
-
if (Number.isNaN(parsed)) {
|
|
7101
|
-
return size;
|
|
7102
|
-
}
|
|
7103
|
-
size = parsed;
|
|
7104
|
-
}
|
|
7105
|
-
const ratio = `(${size} / ${BASE_FONT_SIZE})`;
|
|
7106
|
-
return `calc(${ratio} * ${config_values_default.fontSize})`;
|
|
7107
|
-
}
|
|
7108
|
-
|
|
7109
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/text/get-line-height.mjs
|
|
7110
|
-
function getLineHeight(adjustLineHeightForInnerControls, lineHeight) {
|
|
7111
|
-
if (lineHeight) {
|
|
7112
|
-
return lineHeight;
|
|
7113
|
-
}
|
|
7114
|
-
if (!adjustLineHeightForInnerControls) {
|
|
7115
|
-
return;
|
|
7116
|
-
}
|
|
7117
|
-
let value = `calc(${config_values_default.controlHeight} + ${space(2)})`;
|
|
7118
|
-
switch (adjustLineHeightForInnerControls) {
|
|
7119
|
-
case "large":
|
|
7120
|
-
value = `calc(${config_values_default.controlHeightLarge} + ${space(2)})`;
|
|
7121
|
-
break;
|
|
7122
|
-
case "small":
|
|
7123
|
-
value = `calc(${config_values_default.controlHeightSmall} + ${space(2)})`;
|
|
7124
|
-
break;
|
|
7125
|
-
case "xSmall":
|
|
7126
|
-
value = `calc(${config_values_default.controlHeightXSmall} + ${space(2)})`;
|
|
7127
|
-
break;
|
|
7128
|
-
default:
|
|
7129
|
-
break;
|
|
7130
|
-
}
|
|
7131
|
-
return value;
|
|
7132
|
-
}
|
|
7133
|
-
|
|
7134
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/text/hook.mjs
|
|
7135
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__3() {
|
|
7136
|
-
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
7137
|
-
}
|
|
7138
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
7139
|
-
name: "50zrmy",
|
|
7140
|
-
styles: "text-transform:uppercase"
|
|
7141
|
-
} : {
|
|
7142
|
-
name: "18bqwxz-sx-upperCase",
|
|
7143
|
-
styles: "text-transform:uppercase;label:sx-upperCase;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0dpQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3R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
7145
|
-
};
|
|
7146
|
-
function useText(props) {
|
|
7147
|
-
const {
|
|
7148
|
-
adjustLineHeightForInnerControls,
|
|
7149
|
-
align,
|
|
7150
|
-
children,
|
|
7151
|
-
className,
|
|
7152
|
-
color,
|
|
7153
|
-
ellipsizeMode,
|
|
7154
|
-
isDestructive = false,
|
|
7155
|
-
display,
|
|
7156
|
-
highlightEscape = false,
|
|
7157
|
-
highlightCaseSensitive = false,
|
|
7158
|
-
highlightWords,
|
|
7159
|
-
highlightSanitize,
|
|
7160
|
-
isBlock = false,
|
|
7161
|
-
letterSpacing,
|
|
7162
|
-
lineHeight: lineHeightProp,
|
|
7163
|
-
optimizeReadabilityFor,
|
|
7164
|
-
size,
|
|
7165
|
-
truncate = false,
|
|
7166
|
-
upperCase: upperCase2 = false,
|
|
7167
|
-
variant,
|
|
7168
|
-
weight = config_values_default.fontWeight,
|
|
7169
|
-
...otherProps
|
|
7170
|
-
} = useContextSystem(props, "Text");
|
|
7171
|
-
let content = children;
|
|
7172
|
-
const isHighlighter = Array.isArray(highlightWords);
|
|
7173
|
-
const isCaption = size === "caption";
|
|
7174
|
-
if (isHighlighter) {
|
|
7175
|
-
if (typeof children !== "string") {
|
|
7176
|
-
throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");
|
|
7177
|
-
}
|
|
7178
|
-
content = createHighlighterText({
|
|
7179
|
-
autoEscape: highlightEscape,
|
|
7180
|
-
children,
|
|
7181
|
-
caseSensitive: highlightCaseSensitive,
|
|
7182
|
-
searchWords: highlightWords,
|
|
7183
|
-
sanitize: highlightSanitize
|
|
7184
|
-
});
|
|
7185
|
-
}
|
|
7186
|
-
const cx2 = useCx();
|
|
7187
|
-
const classes = useMemo13(() => {
|
|
7188
|
-
const sx = {};
|
|
7189
|
-
const lineHeight = getLineHeight(adjustLineHeightForInnerControls, lineHeightProp);
|
|
7190
|
-
sx.Base = /* @__PURE__ */ css({
|
|
7191
|
-
color,
|
|
7192
|
-
display,
|
|
7193
|
-
fontSize: getFontSize(size),
|
|
7194
|
-
fontWeight: weight,
|
|
7195
|
-
lineHeight,
|
|
7196
|
-
letterSpacing,
|
|
7197
|
-
textAlign: align
|
|
7198
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:sx-Base;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBd0ZZIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyB1c2VNZW1vLCBDaGlsZHJlbiwgY2xvbmVFbGVtZW50IH0gZnJvbSAnQHdvcmRwcmVzcy9lbGVtZW50JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBXb3JkUHJlc3NDb21wb25lbnRQcm9wcyB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgaGFzQ29ubmVjdE5hbWVzcGFjZSwgdXNlQ29udGV4dFN5c3RlbSB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgdXNlVHJ1bmNhdGUgfSBmcm9tICcuLi90cnVuY2F0ZSc7XG5pbXBvcnQgeyBnZXRPcHRpbWFsVGV4dFNoYWRlIH0gZnJvbSAnLi4vdXRpbHMvY29sb3JzJztcbmltcG9ydCAqIGFzIHN0eWxlcyBmcm9tICcuL3N0eWxlcyc7XG5pbXBvcnQg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2xvbmVFbGVtZW50KCBjaGlsZCwge1xuXHRcdFx0XHRcdHNpemU6IGNoaWxkLnByb3BzLnNpemUgfHwgJ2luaGVyaXQnLFxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9XG5cblx0XHRcdHJldHVybiBjaGlsZDtcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4ge1xuXHRcdC4uLnRydW5jYXRlUHJvcHMsXG5cdFx0Y2hpbGRyZW46IHRydW5jYXRlID8gdHJ1bmNhdGVQcm9wcy5jaGlsZHJlbiA6IGNvbnRlbnQsXG5cdH07XG59XG4iXX0= */");
|
|
7199
|
-
sx.upperCase = _ref;
|
|
7200
|
-
sx.optimalTextColor = null;
|
|
7201
|
-
if (optimizeReadabilityFor) {
|
|
7202
|
-
const isOptimalTextColorDark = getOptimalTextShade(optimizeReadabilityFor) === "dark";
|
|
7203
|
-
sx.optimalTextColor = isOptimalTextColorDark ? /* @__PURE__ */ css({
|
|
7204
|
-
color: COLORS.gray[900]
|
|
7205
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:sx-optimalTextColor;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNEdNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyB1c2VNZW1vLCBDaGlsZHJlbiwgY2xvbmVFbGVtZW50IH0gZnJvbSAnQHdv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LmlzQXJyYXkoIGNoaWxkcmVuICkgKSB7XG5cdFx0Y29udGVudCA9IENoaWxkcmVuLm1hcCggY2hpbGRyZW4sICggY2hpbGQgKSA9PiB7XG5cdFx0XHRpZiAoXG5cdFx0XHRcdHR5cGVvZiBjaGlsZCAhPT0gJ29iamVjdCcgfHxcblx0XHRcdFx0Y2hpbGQgPT09IG51bGwgfHxcblx0XHRcdFx0ISAoICdwcm9wcycgaW4gY2hpbGQgKVxuXHRcdFx0KSB7XG5cdFx0XHRcdHJldHVybiBjaGlsZDtcblx0XHRcdH1cblxuXHRcdFx0Y29uc3QgaXNMaW5rID0gaGFzQ29ubmVjdE5hbWVzcGFjZSggY2hpbGQsIFsgJ0xpbmsnIF0gKTtcblx0XHRcdGlmICggaXNMaW5rICkge1xuXHRcdFx0XHRyZXR1cm4gY2xvbmVFbGVtZW50KCBjaGlsZCwge1xuXHRcdFx0XHRcdHNpemU6IGNoaWxkLnByb3BzLnNpemUgfHwgJ2luaGVyaXQnLFxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9XG5cblx0XHRcdHJldHVybiBjaGlsZDtcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4ge1xuXHRcdC4uLnRydW5jYXRlUHJvcHMsXG5cdFx0Y2hpbGRyZW46IHRydW5jYXRlID8gdHJ1bmNhdGVQcm9wcy5jaGlsZHJlbiA6IGNvbnRlbnQsXG5cdH07XG59XG4iXX0= */") : /* @__PURE__ */ css({
|
|
7206
|
-
color: COLORS.white
|
|
7207
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:sx-optimalTextColor;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkdNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlc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2(Text2, sx.Base, sx.optimalTextColor, isDestructive && destructive, !!isHighlighter && highlighterText, isBlock && block, isCaption && muted, variant && styles_exports2[variant], upperCase2 && sx.upperCase, className);
|
|
7210
|
-
}, [adjustLineHeightForInnerControls, align, className, color, cx2, display, isBlock, isCaption, isDestructive, isHighlighter, letterSpacing, lineHeightProp, optimizeReadabilityFor, size, upperCase2, variant, weight]);
|
|
7211
|
-
let finalEllipsizeMode;
|
|
7212
|
-
if (truncate === true) {
|
|
7213
|
-
finalEllipsizeMode = "auto";
|
|
7214
|
-
}
|
|
7215
|
-
if (truncate === false) {
|
|
7216
|
-
finalEllipsizeMode = "none";
|
|
7217
|
-
}
|
|
7218
|
-
const finalComponentProps = {
|
|
7219
|
-
...otherProps,
|
|
7220
|
-
className: classes,
|
|
7221
|
-
children,
|
|
7222
|
-
ellipsizeMode: ellipsizeMode || finalEllipsizeMode
|
|
7223
|
-
};
|
|
7224
|
-
const truncateProps = useTruncate(finalComponentProps);
|
|
7225
|
-
if (!truncate && Array.isArray(children)) {
|
|
7226
|
-
content = Children3.map(children, (child) => {
|
|
7227
|
-
if (typeof child !== "object" || child === null || !("props" in child)) {
|
|
7228
|
-
return child;
|
|
7229
|
-
}
|
|
7230
|
-
const isLink = hasConnectNamespace(child, ["Link"]);
|
|
7231
|
-
if (isLink) {
|
|
7232
|
-
return cloneElement2(child, {
|
|
7233
|
-
size: child.props.size || "inherit"
|
|
7234
|
-
});
|
|
7235
|
-
}
|
|
7236
|
-
return child;
|
|
7237
|
-
});
|
|
7238
|
-
}
|
|
7239
|
-
return {
|
|
7240
|
-
...truncateProps,
|
|
7241
|
-
children: truncate ? truncateProps.children : content
|
|
7242
|
-
};
|
|
7243
|
-
}
|
|
7244
|
-
|
|
7245
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/text/component.mjs
|
|
7246
|
-
import { jsx as _jsx18 } from "react/jsx-runtime";
|
|
7247
|
-
function UnconnectedText(props, forwardedRef) {
|
|
7248
|
-
const textProps = useText(props);
|
|
7249
|
-
return /* @__PURE__ */ _jsx18(component_default, {
|
|
7250
|
-
as: "span",
|
|
7251
|
-
...textProps,
|
|
7252
|
-
ref: forwardedRef
|
|
7253
|
-
});
|
|
7254
|
-
}
|
|
7255
|
-
var Text3 = contextConnect(UnconnectedText, "Text");
|
|
7256
|
-
var component_default2 = Text3;
|
|
7257
|
-
|
|
7258
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/utils.mjs
|
|
6424
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/utils.mjs
|
|
7259
6425
|
var ALIGNMENTS = {
|
|
7260
6426
|
bottom: {
|
|
7261
6427
|
alignItems: "flex-end",
|
|
@@ -7306,7 +6472,7 @@ function getAlignmentProps(alignment) {
|
|
|
7306
6472
|
return alignmentProps;
|
|
7307
6473
|
}
|
|
7308
6474
|
|
|
7309
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
6475
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/hook.mjs
|
|
7310
6476
|
function useGrid(props) {
|
|
7311
6477
|
const {
|
|
7312
6478
|
align,
|
|
@@ -7352,21 +6518,21 @@ function useGrid(props) {
|
|
|
7352
6518
|
};
|
|
7353
6519
|
}
|
|
7354
6520
|
|
|
7355
|
-
// ../../../node_modules/.pnpm/@wordpress+components@32.
|
|
7356
|
-
import { jsx as
|
|
6521
|
+
// ../../../node_modules/.pnpm/@wordpress+components@32.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/component.mjs
|
|
6522
|
+
import { jsx as _jsx18 } from "react/jsx-runtime";
|
|
7357
6523
|
function UnconnectedGrid(props, forwardedRef) {
|
|
7358
6524
|
const gridProps = useGrid(props);
|
|
7359
|
-
return /* @__PURE__ */
|
|
6525
|
+
return /* @__PURE__ */ _jsx18(component_default, {
|
|
7360
6526
|
...gridProps,
|
|
7361
6527
|
ref: forwardedRef
|
|
7362
6528
|
});
|
|
7363
6529
|
}
|
|
7364
6530
|
var Grid2 = contextConnect(UnconnectedGrid, "Grid");
|
|
7365
|
-
var
|
|
6531
|
+
var component_default2 = Grid2;
|
|
7366
6532
|
|
|
7367
6533
|
// src/charts/leaderboard-chart/leaderboard-chart.tsx
|
|
7368
6534
|
import { __ as __4 } from "@wordpress/i18n";
|
|
7369
|
-
import
|
|
6535
|
+
import clsx6 from "clsx";
|
|
7370
6536
|
import { useContext as useContext17, useMemo as useMemo20 } from "react";
|
|
7371
6537
|
|
|
7372
6538
|
// src/charts/leaderboard-chart/hooks/use-leaderboard-legend-items.ts
|
|
@@ -7436,7 +6602,7 @@ var leaderboard_chart_module_default = {
|
|
|
7436
6602
|
};
|
|
7437
6603
|
|
|
7438
6604
|
// src/charts/leaderboard-chart/leaderboard-chart.tsx
|
|
7439
|
-
import { jsx as
|
|
6605
|
+
import { jsx as _jsx19, Fragment as _Fragment6, jsxs as _jsxs7 } from "react/jsx-runtime";
|
|
7440
6606
|
var defaultValueFormatter = (value) => {
|
|
7441
6607
|
return formatMetricValue(value, "number", {
|
|
7442
6608
|
useMultipliers: true,
|
|
@@ -7451,8 +6617,8 @@ var defaultDeltaFormatter = (value) => {
|
|
|
7451
6617
|
};
|
|
7452
6618
|
var BarLabel = ({
|
|
7453
6619
|
label
|
|
7454
|
-
}) => /* @__PURE__ */
|
|
7455
|
-
children: typeof label === "string" ? /* @__PURE__ */
|
|
6620
|
+
}) => /* @__PURE__ */ _jsx19(_Fragment6, {
|
|
6621
|
+
children: typeof label === "string" ? /* @__PURE__ */ _jsx19(Text, {
|
|
7456
6622
|
className: leaderboard_chart_module_default.label,
|
|
7457
6623
|
children: label
|
|
7458
6624
|
}) : label
|
|
@@ -7467,21 +6633,21 @@ var BarWithLabel = ({
|
|
|
7467
6633
|
isPrimaryVisible = true,
|
|
7468
6634
|
isComparisonVisible = true
|
|
7469
6635
|
}) => /* @__PURE__ */ _jsxs7("div", {
|
|
7470
|
-
className:
|
|
6636
|
+
className: clsx6(leaderboard_chart_module_default.barWithLabelContainer, {
|
|
7471
6637
|
[leaderboard_chart_module_default["is-overlay"]]: withOverlayLabel
|
|
7472
6638
|
}),
|
|
7473
|
-
children: [/* @__PURE__ */
|
|
6639
|
+
children: [/* @__PURE__ */ _jsx19(BarLabel, {
|
|
7474
6640
|
label: entry.label
|
|
7475
|
-
}), isPrimaryVisible && /* @__PURE__ */
|
|
7476
|
-
className:
|
|
6641
|
+
}), isPrimaryVisible && /* @__PURE__ */ _jsx19("div", {
|
|
6642
|
+
className: clsx6(leaderboard_chart_module_default.bar, {
|
|
7477
6643
|
[leaderboard_chart_module_default["bar--animated"]]: animation
|
|
7478
6644
|
}),
|
|
7479
6645
|
style: {
|
|
7480
6646
|
width: entry.currentShare + "%",
|
|
7481
6647
|
backgroundColor: primaryColor
|
|
7482
6648
|
}
|
|
7483
|
-
}), withComparison && !withOverlayLabel && isComparisonVisible && /* @__PURE__ */
|
|
7484
|
-
className:
|
|
6649
|
+
}), withComparison && !withOverlayLabel && isComparisonVisible && /* @__PURE__ */ _jsx19("div", {
|
|
6650
|
+
className: clsx6(leaderboard_chart_module_default.bar, {
|
|
7485
6651
|
[leaderboard_chart_module_default["bar--animated"]]: animation
|
|
7486
6652
|
}),
|
|
7487
6653
|
style: {
|
|
@@ -7591,15 +6757,15 @@ var LeaderboardChartInternal = ({
|
|
|
7591
6757
|
});
|
|
7592
6758
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
7593
6759
|
if (!data || data.length === 0) {
|
|
7594
|
-
return /* @__PURE__ */
|
|
6760
|
+
return /* @__PURE__ */ _jsx19(SingleChartContext.Provider, {
|
|
7595
6761
|
value: {
|
|
7596
6762
|
chartId
|
|
7597
6763
|
},
|
|
7598
|
-
children: /* @__PURE__ */
|
|
6764
|
+
children: /* @__PURE__ */ _jsx19(ChartLayout, {
|
|
7599
6765
|
legendPosition,
|
|
7600
6766
|
legendElement: false,
|
|
7601
6767
|
legendChildren,
|
|
7602
|
-
className:
|
|
6768
|
+
className: clsx6(leaderboard_chart_module_default.leaderboardChart, {
|
|
7603
6769
|
[leaderboard_chart_module_default["leaderboardChart--responsive"]]: !propWidth && !propHeight,
|
|
7604
6770
|
[leaderboard_chart_module_default["leaderboardChart--loading"]]: loading
|
|
7605
6771
|
}, className),
|
|
@@ -7610,14 +6776,14 @@ var LeaderboardChartInternal = ({
|
|
|
7610
6776
|
height: propHeight || void 0
|
|
7611
6777
|
},
|
|
7612
6778
|
trailingContent: nonLegendChildren,
|
|
7613
|
-
children: /* @__PURE__ */
|
|
6779
|
+
children: /* @__PURE__ */ _jsx19("div", {
|
|
7614
6780
|
className: leaderboard_chart_module_default.emptyState,
|
|
7615
6781
|
children: loading ? __4("Loading\u2026", "jetpack-charts") : __4("No data available", "jetpack-charts")
|
|
7616
6782
|
})
|
|
7617
6783
|
})
|
|
7618
6784
|
});
|
|
7619
6785
|
}
|
|
7620
|
-
const legendElement = showLegend && /* @__PURE__ */
|
|
6786
|
+
const legendElement = showLegend && /* @__PURE__ */ _jsx19(Legend, {
|
|
7621
6787
|
orientation: legend.orientation ?? "horizontal",
|
|
7622
6788
|
position: legendPosition,
|
|
7623
6789
|
alignment: legend.alignment ?? "center",
|
|
@@ -7629,15 +6795,15 @@ var LeaderboardChartInternal = ({
|
|
|
7629
6795
|
chartId,
|
|
7630
6796
|
interactive: legendInteractive
|
|
7631
6797
|
});
|
|
7632
|
-
return /* @__PURE__ */
|
|
6798
|
+
return /* @__PURE__ */ _jsx19(SingleChartContext.Provider, {
|
|
7633
6799
|
value: {
|
|
7634
6800
|
chartId
|
|
7635
6801
|
},
|
|
7636
|
-
children: /* @__PURE__ */
|
|
6802
|
+
children: /* @__PURE__ */ _jsx19(ChartLayout, {
|
|
7637
6803
|
legendPosition,
|
|
7638
6804
|
legendElement,
|
|
7639
6805
|
legendChildren,
|
|
7640
|
-
className:
|
|
6806
|
+
className: clsx6(leaderboard_chart_module_default.leaderboardChart, {
|
|
7641
6807
|
[leaderboard_chart_module_default["leaderboardChart--responsive"]]: !propWidth && !propHeight,
|
|
7642
6808
|
[leaderboard_chart_module_default["leaderboardChart--loading"]]: loading
|
|
7643
6809
|
}, className),
|
|
@@ -7648,12 +6814,12 @@ var LeaderboardChartInternal = ({
|
|
|
7648
6814
|
height: propHeight || void 0
|
|
7649
6815
|
},
|
|
7650
6816
|
trailingContent: nonLegendChildren,
|
|
7651
|
-
children: /* @__PURE__ */
|
|
6817
|
+
children: /* @__PURE__ */ _jsx19("div", {
|
|
7652
6818
|
className: leaderboard_chart_module_default.leaderboardChart__content,
|
|
7653
|
-
children: allSeriesHidden ? /* @__PURE__ */
|
|
6819
|
+
children: allSeriesHidden ? /* @__PURE__ */ _jsx19("div", {
|
|
7654
6820
|
className: leaderboard_chart_module_default.emptyState,
|
|
7655
6821
|
children: __4("All series are hidden. Click legend items to show data.", "jetpack-charts")
|
|
7656
|
-
}) : /* @__PURE__ */
|
|
6822
|
+
}) : /* @__PURE__ */ _jsx19(component_default2, {
|
|
7657
6823
|
templateColumns: "minmax(0, 1fr) auto",
|
|
7658
6824
|
rowGap,
|
|
7659
6825
|
columnGap,
|
|
@@ -7661,10 +6827,10 @@ var LeaderboardChartInternal = ({
|
|
|
7661
6827
|
const colorIndex = Math.sign(entry.delta) + 1;
|
|
7662
6828
|
const deltaColor = deltaColors[colorIndex];
|
|
7663
6829
|
return /* @__PURE__ */ _jsxs7(Fragment2, {
|
|
7664
|
-
children: [/* @__PURE__ */
|
|
6830
|
+
children: [/* @__PURE__ */ _jsx19(Stack, {
|
|
7665
6831
|
direction: "column",
|
|
7666
6832
|
gap: labelSpacing,
|
|
7667
|
-
children: /* @__PURE__ */
|
|
6833
|
+
children: /* @__PURE__ */ _jsx19(BarWithLabel, {
|
|
7668
6834
|
entry,
|
|
7669
6835
|
withComparison,
|
|
7670
6836
|
withOverlayLabel,
|
|
@@ -7677,12 +6843,12 @@ var LeaderboardChartInternal = ({
|
|
|
7677
6843
|
}), /* @__PURE__ */ _jsxs7(Stack, {
|
|
7678
6844
|
direction: "row",
|
|
7679
6845
|
gap: "xs",
|
|
7680
|
-
className:
|
|
6846
|
+
className: clsx6(leaderboard_chart_module_default.valueContainer, {
|
|
7681
6847
|
[leaderboard_chart_module_default.overlayLabel]: withOverlayLabel
|
|
7682
6848
|
}),
|
|
7683
|
-
children: [isPrimaryVisible && /* @__PURE__ */
|
|
6849
|
+
children: [isPrimaryVisible && /* @__PURE__ */ _jsx19(Text, {
|
|
7684
6850
|
children: valueFormatter(entry.currentValue)
|
|
7685
|
-
}), withComparison && isComparisonVisible && /* @__PURE__ */
|
|
6851
|
+
}), withComparison && isComparisonVisible && /* @__PURE__ */ _jsx19(Text, {
|
|
7686
6852
|
style: {
|
|
7687
6853
|
color: deltaColor
|
|
7688
6854
|
},
|
|
@@ -7699,12 +6865,12 @@ var LeaderboardChartInternal = ({
|
|
|
7699
6865
|
var LeaderboardChartWithProvider = (props) => {
|
|
7700
6866
|
const existingContext = useContext17(GlobalChartsContext);
|
|
7701
6867
|
if (existingContext) {
|
|
7702
|
-
return /* @__PURE__ */
|
|
6868
|
+
return /* @__PURE__ */ _jsx19(LeaderboardChartInternal, {
|
|
7703
6869
|
...props
|
|
7704
6870
|
});
|
|
7705
6871
|
}
|
|
7706
|
-
return /* @__PURE__ */
|
|
7707
|
-
children: /* @__PURE__ */
|
|
6872
|
+
return /* @__PURE__ */ _jsx19(GlobalChartsProvider, {
|
|
6873
|
+
children: /* @__PURE__ */ _jsx19(LeaderboardChartInternal, {
|
|
7708
6874
|
...props
|
|
7709
6875
|
})
|
|
7710
6876
|
});
|
|
@@ -7724,20 +6890,20 @@ import { LinearGradient } from "@visx/gradient";
|
|
|
7724
6890
|
import { scaleTime } from "@visx/scale";
|
|
7725
6891
|
import { XYChart as XYChart2, AreaSeries, Grid as Grid3, Axis as Axis2, DataContext as DataContext6 } from "@visx/xychart";
|
|
7726
6892
|
import { __ as __6 } from "@wordpress/i18n";
|
|
7727
|
-
import
|
|
6893
|
+
import clsx8 from "clsx";
|
|
7728
6894
|
import { differenceInHours, differenceInYears } from "date-fns";
|
|
7729
6895
|
import { useMemo as useMemo22, useContext as useContext21, forwardRef as forwardRef6, useImperativeHandle as useImperativeHandle2, useState as useState11, useRef as useRef12, useCallback as useCallback11, createElement as _createElement2 } from "react";
|
|
7730
6896
|
|
|
7731
6897
|
// src/charts/private/default-glyph/default-glyph.tsx
|
|
7732
6898
|
import { DataContext as DataContext2 } from "@visx/xychart";
|
|
7733
6899
|
import { useContext as useContext18 } from "react";
|
|
7734
|
-
import { jsx as
|
|
6900
|
+
import { jsx as _jsx20 } from "react/jsx-runtime";
|
|
7735
6901
|
var DefaultGlyph = (props) => {
|
|
7736
6902
|
const {
|
|
7737
6903
|
theme
|
|
7738
6904
|
} = useContext18(DataContext2) || {};
|
|
7739
6905
|
const position2 = props.position || "start";
|
|
7740
|
-
return /* @__PURE__ */
|
|
6906
|
+
return /* @__PURE__ */ _jsx20("circle", {
|
|
7741
6907
|
cx: props.x,
|
|
7742
6908
|
cy: props.y,
|
|
7743
6909
|
r: props.size,
|
|
@@ -7771,10 +6937,10 @@ var line_chart_module_default = {
|
|
|
7771
6937
|
|
|
7772
6938
|
// src/charts/line-chart/private/line-chart-annotation-label-popover.tsx
|
|
7773
6939
|
import { __ as __5 } from "@wordpress/i18n";
|
|
7774
|
-
import
|
|
7775
|
-
import
|
|
6940
|
+
import { Icon, close } from "@wordpress/icons";
|
|
6941
|
+
import clsx7 from "clsx";
|
|
7776
6942
|
import { useEffect as useEffect9, useId as useId3, useRef as useRef10, useState as useState8 } from "react";
|
|
7777
|
-
import { jsx as
|
|
6943
|
+
import { jsx as _jsx21, jsxs as _jsxs8 } from "react/jsx-runtime";
|
|
7778
6944
|
var POPOVER_BUTTON_SIZE = 44;
|
|
7779
6945
|
var LineChartAnnotationLabelWithPopover = ({
|
|
7780
6946
|
title,
|
|
@@ -7799,8 +6965,8 @@ var LineChartAnnotationLabelWithPopover = ({
|
|
|
7799
6965
|
}
|
|
7800
6966
|
setIsPositioned(true);
|
|
7801
6967
|
};
|
|
7802
|
-
popover.addEventListener("toggle", (
|
|
7803
|
-
if (
|
|
6968
|
+
popover.addEventListener("toggle", (e) => {
|
|
6969
|
+
if (e.newState === "open") {
|
|
7804
6970
|
positionPopover();
|
|
7805
6971
|
}
|
|
7806
6972
|
});
|
|
@@ -7813,7 +6979,7 @@ var LineChartAnnotationLabelWithPopover = ({
|
|
|
7813
6979
|
}, [isBrowserSafari]);
|
|
7814
6980
|
return /* @__PURE__ */ _jsxs8("div", {
|
|
7815
6981
|
className: line_chart_module_default["line-chart__annotation-label"],
|
|
7816
|
-
children: [/* @__PURE__ */
|
|
6982
|
+
children: [/* @__PURE__ */ _jsx21("button", {
|
|
7817
6983
|
ref: buttonRef,
|
|
7818
6984
|
popovertarget: popoverId,
|
|
7819
6985
|
className: line_chart_module_default["line-chart__annotation-label-trigger-button"],
|
|
@@ -7827,26 +6993,26 @@ var LineChartAnnotationLabelWithPopover = ({
|
|
|
7827
6993
|
title,
|
|
7828
6994
|
subtitle
|
|
7829
6995
|
})
|
|
7830
|
-
}), /* @__PURE__ */
|
|
6996
|
+
}), /* @__PURE__ */ _jsx21("div", {
|
|
7831
6997
|
ref: popoverRef,
|
|
7832
6998
|
id: popoverId,
|
|
7833
6999
|
popover: "auto",
|
|
7834
|
-
className:
|
|
7000
|
+
className: clsx7(line_chart_module_default["line-chart__annotation-label-popover"], isPositioned && line_chart_module_default["line-chart__annotation-label-popover--visible"], isBrowserSafari && line_chart_module_default["line-chart__annotation-label-popover--safari"]),
|
|
7835
7001
|
children: /* @__PURE__ */ _jsxs8("div", {
|
|
7836
7002
|
className: line_chart_module_default["line-chart__annotation-label-popover-header"],
|
|
7837
|
-
children: [/* @__PURE__ */
|
|
7003
|
+
children: [/* @__PURE__ */ _jsx21("div", {
|
|
7838
7004
|
className: line_chart_module_default["line-chart__annotation-label-popover-content"],
|
|
7839
7005
|
children: renderLabelPopover({
|
|
7840
7006
|
title,
|
|
7841
7007
|
subtitle
|
|
7842
7008
|
})
|
|
7843
|
-
}), /* @__PURE__ */
|
|
7009
|
+
}), /* @__PURE__ */ _jsx21("button", {
|
|
7844
7010
|
popovertarget: popoverId,
|
|
7845
7011
|
popovertargetaction: "hide",
|
|
7846
7012
|
className: line_chart_module_default["line-chart__annotation-label-popover-close-button"],
|
|
7847
7013
|
"aria-label": __5("Close", "jetpack-charts"),
|
|
7848
|
-
children: /* @__PURE__ */
|
|
7849
|
-
icon:
|
|
7014
|
+
children: /* @__PURE__ */ _jsx21(Icon, {
|
|
7015
|
+
icon: close,
|
|
7850
7016
|
size: 16
|
|
7851
7017
|
})
|
|
7852
7018
|
})]
|
|
@@ -7859,7 +7025,7 @@ var line_chart_annotation_label_popover_default = LineChartAnnotationLabelWithPo
|
|
|
7859
7025
|
// src/charts/line-chart/private/line-chart-annotations-overlay.tsx
|
|
7860
7026
|
import { DataContext as DataContext3 } from "@visx/xychart";
|
|
7861
7027
|
import { useEffect as useEffect10, useState as useState9, useCallback as useCallback10 } from "react";
|
|
7862
|
-
import { jsx as
|
|
7028
|
+
import { jsx as _jsx22 } from "react/jsx-runtime";
|
|
7863
7029
|
var LineChartAnnotationsOverlay = ({
|
|
7864
7030
|
children
|
|
7865
7031
|
}) => {
|
|
@@ -7941,9 +7107,9 @@ var LineChartAnnotationsOverlay = ({
|
|
|
7941
7107
|
width: chartWidth,
|
|
7942
7108
|
height: chartHeight
|
|
7943
7109
|
};
|
|
7944
|
-
return /* @__PURE__ */
|
|
7110
|
+
return /* @__PURE__ */ _jsx22(DataContext3.Provider, {
|
|
7945
7111
|
value: dataContextValue,
|
|
7946
|
-
children: /* @__PURE__ */
|
|
7112
|
+
children: /* @__PURE__ */ _jsx22("svg", {
|
|
7947
7113
|
width: chartWidth,
|
|
7948
7114
|
height: chartHeight,
|
|
7949
7115
|
className: line_chart_module_default["line-chart__annotations-overlay"],
|
|
@@ -7958,14 +7124,14 @@ import { Annotation, CircleSubject, Connector, HtmlLabel, Label, LineSubject } f
|
|
|
7958
7124
|
import { DataContext as DataContext4 } from "@visx/xychart";
|
|
7959
7125
|
import merge3 from "deepmerge";
|
|
7960
7126
|
import { useContext as useContext19, useRef as useRef11, useEffect as useEffect11, useState as useState10, useMemo as useMemo21 } from "react";
|
|
7961
|
-
import { jsx as
|
|
7127
|
+
import { jsx as _jsx23, jsxs as _jsxs9 } from "react/jsx-runtime";
|
|
7962
7128
|
var ANNOTATION_MAX_WIDTH = 125;
|
|
7963
7129
|
var ANNOTATION_INIT_HEIGHT = 100;
|
|
7964
7130
|
var getLabelPosition = ({
|
|
7965
7131
|
subjectType,
|
|
7966
|
-
x
|
|
7132
|
+
x,
|
|
7967
7133
|
xMax,
|
|
7968
|
-
y
|
|
7134
|
+
y,
|
|
7969
7135
|
yMin,
|
|
7970
7136
|
yMax,
|
|
7971
7137
|
maxWidth,
|
|
@@ -7985,7 +7151,7 @@ var getLabelPosition = ({
|
|
|
7985
7151
|
dx = 20;
|
|
7986
7152
|
dy = 0;
|
|
7987
7153
|
}
|
|
7988
|
-
const effectiveX =
|
|
7154
|
+
const effectiveX = x + dx;
|
|
7989
7155
|
if (effectiveX + annotationMaxWidth > xMax) {
|
|
7990
7156
|
isFlippedHorizontally = true;
|
|
7991
7157
|
if (subjectType === "circle") {
|
|
@@ -7995,18 +7161,18 @@ var getLabelPosition = ({
|
|
|
7995
7161
|
}
|
|
7996
7162
|
}
|
|
7997
7163
|
if (subjectType === "circle") {
|
|
7998
|
-
if (
|
|
7164
|
+
if (y + dy + annotationHeight > yMin) {
|
|
7999
7165
|
isFlippedVertically = true;
|
|
8000
7166
|
dy = -Math.abs(dy);
|
|
8001
7167
|
}
|
|
8002
|
-
} else if (
|
|
7168
|
+
} else if (y - annotationHeight < yMax) {
|
|
8003
7169
|
if (subjectType === "line-horizontal") {
|
|
8004
7170
|
isFlippedVertically = true;
|
|
8005
7171
|
dy = Math.abs(dy);
|
|
8006
7172
|
} else if (subjectType === "line-vertical") {
|
|
8007
7173
|
isFlippedVertically = true;
|
|
8008
7174
|
}
|
|
8009
|
-
} else if (
|
|
7175
|
+
} else if (y + annotationHeight > yMin) {
|
|
8010
7176
|
if (subjectType === "line-horizontal") {
|
|
8011
7177
|
isFlippedVertically = true;
|
|
8012
7178
|
dy = -Math.abs(dy);
|
|
@@ -8027,10 +7193,10 @@ var getHorizontalAnchor = (subjectType, isFlippedHorizontally) => {
|
|
|
8027
7193
|
}
|
|
8028
7194
|
return void 0;
|
|
8029
7195
|
};
|
|
8030
|
-
var getVerticalAnchor = (subjectType, isFlippedVertically,
|
|
7196
|
+
var getVerticalAnchor = (subjectType, isFlippedVertically, y, yMax, height) => {
|
|
8031
7197
|
if (subjectType === "line-vertical") {
|
|
8032
7198
|
if (isFlippedVertically) {
|
|
8033
|
-
return
|
|
7199
|
+
return y - height < yMax ? "start" : "end";
|
|
8034
7200
|
}
|
|
8035
7201
|
return "start";
|
|
8036
7202
|
}
|
|
@@ -8062,16 +7228,16 @@ var LineChartAnnotation = ({
|
|
|
8062
7228
|
}, []);
|
|
8063
7229
|
const positionData = useMemo21(() => {
|
|
8064
7230
|
if (!datum || !datum.date || datum.value == null || !xScale || !yScale) return null;
|
|
8065
|
-
const
|
|
8066
|
-
const
|
|
8067
|
-
if (typeof
|
|
7231
|
+
const x2 = xScale(datum.date);
|
|
7232
|
+
const y2 = yScale(datum.value);
|
|
7233
|
+
if (typeof x2 !== "number" || typeof y2 !== "number") return null;
|
|
8068
7234
|
const [yMin2, yMax2] = yScale.range().map(Number);
|
|
8069
7235
|
const [xMin2, xMax2] = xScale.range().map(Number);
|
|
8070
7236
|
if (renderLabel) {
|
|
8071
7237
|
return {
|
|
8072
|
-
x:
|
|
7238
|
+
x: x2,
|
|
8073
7239
|
dx: 0,
|
|
8074
|
-
y:
|
|
7240
|
+
y: y2,
|
|
8075
7241
|
dy: 0,
|
|
8076
7242
|
yMin: yMin2,
|
|
8077
7243
|
yMax: yMax2,
|
|
@@ -8083,17 +7249,17 @@ var LineChartAnnotation = ({
|
|
|
8083
7249
|
}
|
|
8084
7250
|
const position2 = getLabelPosition({
|
|
8085
7251
|
subjectType,
|
|
8086
|
-
x:
|
|
7252
|
+
x: x2,
|
|
8087
7253
|
xMax: xMax2,
|
|
8088
|
-
y:
|
|
7254
|
+
y: y2,
|
|
8089
7255
|
yMin: yMin2,
|
|
8090
7256
|
yMax: yMax2,
|
|
8091
7257
|
maxWidth: styles?.label?.maxWidth,
|
|
8092
7258
|
height
|
|
8093
7259
|
});
|
|
8094
7260
|
return {
|
|
8095
|
-
x:
|
|
8096
|
-
y:
|
|
7261
|
+
x: x2,
|
|
7262
|
+
y: y2,
|
|
8097
7263
|
yMin: yMin2,
|
|
8098
7264
|
yMax: yMax2,
|
|
8099
7265
|
xMin: xMin2,
|
|
@@ -8103,8 +7269,8 @@ var LineChartAnnotation = ({
|
|
|
8103
7269
|
}, [datum, xScale, yScale, subjectType, styles?.label?.maxWidth, height, renderLabel]);
|
|
8104
7270
|
if (!positionData) return null;
|
|
8105
7271
|
const {
|
|
8106
|
-
x
|
|
8107
|
-
y
|
|
7272
|
+
x,
|
|
7273
|
+
y,
|
|
8108
7274
|
yMin,
|
|
8109
7275
|
yMax,
|
|
8110
7276
|
xMin,
|
|
@@ -8134,37 +7300,37 @@ var LineChartAnnotation = ({
|
|
|
8134
7300
|
const labelWidth = POPOVER_BUTTON_SIZE;
|
|
8135
7301
|
const labelHeight = POPOVER_BUTTON_SIZE;
|
|
8136
7302
|
return isSafari() ? {
|
|
8137
|
-
transform: `translate(${
|
|
7303
|
+
transform: `translate(${x + (dx || 0) + (typeof labelPosition.x === "number" ? labelPosition.x - x : 0) - labelWidth}px, ${y + (dy || 0) + (typeof labelPosition.y === "number" ? labelPosition.y - y : 0) - labelHeight}px)`,
|
|
8138
7304
|
width: labelWidth,
|
|
8139
7305
|
height: labelHeight
|
|
8140
7306
|
} : void 0;
|
|
8141
7307
|
};
|
|
8142
|
-
return /* @__PURE__ */
|
|
7308
|
+
return /* @__PURE__ */ _jsx23("g", {
|
|
8143
7309
|
children: /* @__PURE__ */ _jsxs9(Annotation, {
|
|
8144
|
-
x
|
|
8145
|
-
y
|
|
7310
|
+
x,
|
|
7311
|
+
y,
|
|
8146
7312
|
dx,
|
|
8147
7313
|
dy,
|
|
8148
|
-
children: [/* @__PURE__ */
|
|
7314
|
+
children: [/* @__PURE__ */ _jsx23(Connector, {
|
|
8149
7315
|
...styles?.connector
|
|
8150
|
-
}), subjectType === "circle" && /* @__PURE__ */
|
|
7316
|
+
}), subjectType === "circle" && /* @__PURE__ */ _jsx23(CircleSubject, {
|
|
8151
7317
|
...styles?.circleSubject
|
|
8152
|
-
}), subjectType === "line-vertical" && /* @__PURE__ */
|
|
7318
|
+
}), subjectType === "line-vertical" && /* @__PURE__ */ _jsx23(LineSubject, {
|
|
8153
7319
|
min: yMax,
|
|
8154
7320
|
max: yMin,
|
|
8155
7321
|
...styles?.lineSubject,
|
|
8156
7322
|
orientation: "vertical"
|
|
8157
|
-
}), subjectType === "line-horizontal" && /* @__PURE__ */
|
|
7323
|
+
}), subjectType === "line-horizontal" && /* @__PURE__ */ _jsx23(LineSubject, {
|
|
8158
7324
|
min: xMin,
|
|
8159
7325
|
max: xMax,
|
|
8160
7326
|
...styles?.lineSubject,
|
|
8161
7327
|
orientation: "horizontal"
|
|
8162
|
-
}), renderLabel ? /* @__PURE__ */
|
|
7328
|
+
}), renderLabel ? /* @__PURE__ */ _jsx23(HtmlLabel, {
|
|
8163
7329
|
...styles?.label,
|
|
8164
7330
|
...labelPosition,
|
|
8165
|
-
children: /* @__PURE__ */
|
|
7331
|
+
children: /* @__PURE__ */ _jsx23("div", {
|
|
8166
7332
|
style: getSafariHTMLLabelPosition(),
|
|
8167
|
-
children: renderLabelPopover ? /* @__PURE__ */
|
|
7333
|
+
children: renderLabelPopover ? /* @__PURE__ */ _jsx23(line_chart_annotation_label_popover_default, {
|
|
8168
7334
|
title,
|
|
8169
7335
|
subtitle,
|
|
8170
7336
|
renderLabel,
|
|
@@ -8174,15 +7340,15 @@ var LineChartAnnotation = ({
|
|
|
8174
7340
|
subtitle
|
|
8175
7341
|
})
|
|
8176
7342
|
})
|
|
8177
|
-
}) : /* @__PURE__ */
|
|
7343
|
+
}) : /* @__PURE__ */ _jsx23("g", {
|
|
8178
7344
|
ref: labelRef,
|
|
8179
|
-
children: /* @__PURE__ */
|
|
7345
|
+
children: /* @__PURE__ */ _jsx23(Label, {
|
|
8180
7346
|
title,
|
|
8181
7347
|
subtitle,
|
|
8182
7348
|
...styles?.label,
|
|
8183
7349
|
...labelPosition,
|
|
8184
7350
|
horizontalAnchor: getHorizontalAnchor(subjectType, isFlippedHorizontally),
|
|
8185
|
-
verticalAnchor: getVerticalAnchor(subjectType, isFlippedVertically,
|
|
7351
|
+
verticalAnchor: getVerticalAnchor(subjectType, isFlippedVertically, y, yMax, height ?? ANNOTATION_INIT_HEIGHT)
|
|
8186
7352
|
})
|
|
8187
7353
|
})]
|
|
8188
7354
|
})
|
|
@@ -8213,9 +7379,9 @@ var LineChartGlyph = ({
|
|
|
8213
7379
|
if (!xScale || !yScale) return null;
|
|
8214
7380
|
if (data.data.length === 0) return null;
|
|
8215
7381
|
const point = position2 === "start" ? data.data[0] : data.data[data.data.length - 1];
|
|
8216
|
-
const
|
|
8217
|
-
const
|
|
8218
|
-
if (typeof
|
|
7382
|
+
const x = xScale(accessors.xAccessor(point));
|
|
7383
|
+
const y = yScale(accessors.yAccessor(point));
|
|
7384
|
+
if (typeof x !== "number" || typeof y !== "number") return null;
|
|
8219
7385
|
const size = Math.max(0, toNumber(glyphStyle?.radius) ?? 4);
|
|
8220
7386
|
return renderGlyph({
|
|
8221
7387
|
key: `${position2}-glyph-${data.label}`,
|
|
@@ -8223,8 +7389,8 @@ var LineChartGlyph = ({
|
|
|
8223
7389
|
datum: point,
|
|
8224
7390
|
color,
|
|
8225
7391
|
size,
|
|
8226
|
-
x
|
|
8227
|
-
y
|
|
7392
|
+
x,
|
|
7393
|
+
y,
|
|
8228
7394
|
glyphStyle,
|
|
8229
7395
|
position: position2
|
|
8230
7396
|
});
|
|
@@ -8232,7 +7398,7 @@ var LineChartGlyph = ({
|
|
|
8232
7398
|
var line_chart_glyph_default = LineChartGlyph;
|
|
8233
7399
|
|
|
8234
7400
|
// src/charts/line-chart/line-chart.tsx
|
|
8235
|
-
import { jsx as
|
|
7401
|
+
import { jsx as _jsx24, jsxs as _jsxs10 } from "react/jsx-runtime";
|
|
8236
7402
|
var X_TICK_WIDTH = 60;
|
|
8237
7403
|
var defaultRenderGlyph = (props) => {
|
|
8238
7404
|
return /* @__PURE__ */ _createElement2(DefaultGlyph, {
|
|
@@ -8270,10 +7436,10 @@ var renderDefaultTooltip = (params) => {
|
|
|
8270
7436
|
}]) => ({
|
|
8271
7437
|
key,
|
|
8272
7438
|
value: datum.value
|
|
8273
|
-
})).sort((
|
|
7439
|
+
})).sort((a, b) => b.value - a.value);
|
|
8274
7440
|
return /* @__PURE__ */ _jsxs10("div", {
|
|
8275
7441
|
className: line_chart_module_default["line-chart__tooltip"],
|
|
8276
|
-
children: [/* @__PURE__ */
|
|
7442
|
+
children: [/* @__PURE__ */ _jsx24("div", {
|
|
8277
7443
|
className: line_chart_module_default["line-chart__tooltip-date"],
|
|
8278
7444
|
children: nearestDatum.date?.toLocaleDateString()
|
|
8279
7445
|
}), tooltipPoints.map((point) => /* @__PURE__ */ _jsxs10("div", {
|
|
@@ -8281,7 +7447,7 @@ var renderDefaultTooltip = (params) => {
|
|
|
8281
7447
|
children: [/* @__PURE__ */ _jsxs10("span", {
|
|
8282
7448
|
className: line_chart_module_default["line-chart__tooltip-label"],
|
|
8283
7449
|
children: [point.key, ":"]
|
|
8284
|
-
}), /* @__PURE__ */
|
|
7450
|
+
}), /* @__PURE__ */ _jsx24("span", {
|
|
8285
7451
|
className: line_chart_module_default["line-chart__tooltip-value"],
|
|
8286
7452
|
children: formatNumber6(point.value)
|
|
8287
7453
|
})]
|
|
@@ -8334,7 +7500,7 @@ var guessOptimalNumTicks = (data, chartWidth, tickFormatter) => {
|
|
|
8334
7500
|
);
|
|
8335
7501
|
let secondBestGuess = 1;
|
|
8336
7502
|
for (let numTicks = upperBound; numTicks > 1; --numTicks) {
|
|
8337
|
-
const ticks = xScale.ticks(numTicks).map((
|
|
7503
|
+
const ticks = xScale.ticks(numTicks).map((d) => tickFormatter(d.getTime()));
|
|
8338
7504
|
if (ticks.length > upperBound) {
|
|
8339
7505
|
continue;
|
|
8340
7506
|
}
|
|
@@ -8551,16 +7717,16 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8551
7717
|
});
|
|
8552
7718
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
8553
7719
|
const accessors = {
|
|
8554
|
-
xAccessor: (
|
|
8555
|
-
yAccessor: (
|
|
7720
|
+
xAccessor: (d) => d?.date,
|
|
7721
|
+
yAccessor: (d) => d?.value
|
|
8556
7722
|
};
|
|
8557
7723
|
if (error) {
|
|
8558
|
-
return /* @__PURE__ */
|
|
8559
|
-
className:
|
|
7724
|
+
return /* @__PURE__ */ _jsx24("div", {
|
|
7725
|
+
className: clsx8("line-chart", line_chart_module_default["line-chart"]),
|
|
8560
7726
|
children: error
|
|
8561
7727
|
});
|
|
8562
7728
|
}
|
|
8563
|
-
const legendElement = showLegend && /* @__PURE__ */
|
|
7729
|
+
const legendElement = showLegend && /* @__PURE__ */ _jsx24(Legend, {
|
|
8564
7730
|
orientation: legend.orientation ?? "horizontal",
|
|
8565
7731
|
alignment: legend.alignment ?? "center",
|
|
8566
7732
|
position: legendPosition,
|
|
@@ -8573,19 +7739,19 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8573
7739
|
chartId,
|
|
8574
7740
|
interactive: legendInteractive
|
|
8575
7741
|
});
|
|
8576
|
-
return /* @__PURE__ */
|
|
7742
|
+
return /* @__PURE__ */ _jsx24(SingleChartContext.Provider, {
|
|
8577
7743
|
value: {
|
|
8578
7744
|
chartId,
|
|
8579
7745
|
chartRef: internalChartRef,
|
|
8580
7746
|
chartWidth: width,
|
|
8581
7747
|
chartHeight: measuredChartHeight || 0
|
|
8582
7748
|
},
|
|
8583
|
-
children: /* @__PURE__ */
|
|
7749
|
+
children: /* @__PURE__ */ _jsx24(ChartLayout, {
|
|
8584
7750
|
legendPosition,
|
|
8585
7751
|
legendElement,
|
|
8586
7752
|
legendChildren,
|
|
8587
7753
|
gap,
|
|
8588
|
-
className:
|
|
7754
|
+
className: clsx8("line-chart", line_chart_module_default["line-chart"], {
|
|
8589
7755
|
[line_chart_module_default["line-chart--animated"]]: animation && !prefersReducedMotion
|
|
8590
7756
|
}, className),
|
|
8591
7757
|
style: {
|
|
@@ -8598,14 +7764,14 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8598
7764
|
contentHeight
|
|
8599
7765
|
}) => {
|
|
8600
7766
|
const chartHeight = contentHeight > 0 ? contentHeight : height;
|
|
8601
|
-
return /* @__PURE__ */
|
|
7767
|
+
return /* @__PURE__ */ _jsx24("div", {
|
|
8602
7768
|
role: "grid",
|
|
8603
7769
|
"aria-label": __6("Line chart", "jetpack-charts"),
|
|
8604
7770
|
tabIndex: 0,
|
|
8605
7771
|
onKeyDown: onChartKeyDown,
|
|
8606
7772
|
onFocus: onChartFocus,
|
|
8607
7773
|
onBlur: onChartBlur,
|
|
8608
|
-
children: chartHeight > 0 && /* @__PURE__ */
|
|
7774
|
+
children: chartHeight > 0 && /* @__PURE__ */ _jsx24("div", {
|
|
8609
7775
|
ref: chartRef,
|
|
8610
7776
|
children: /* @__PURE__ */ _jsxs10(XYChart2, {
|
|
8611
7777
|
theme,
|
|
@@ -8622,14 +7788,14 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8622
7788
|
onPointerMove,
|
|
8623
7789
|
onPointerOut,
|
|
8624
7790
|
pointerEventsDataKey: "nearest",
|
|
8625
|
-
children: [gridVisibility !== "none" && /* @__PURE__ */
|
|
7791
|
+
children: [gridVisibility !== "none" && /* @__PURE__ */ _jsx24(Grid3, {
|
|
8626
7792
|
columns: false,
|
|
8627
7793
|
numTicks: 4
|
|
8628
|
-
}), chartOptions.axis.x.display && /* @__PURE__ */
|
|
7794
|
+
}), chartOptions.axis.x.display && /* @__PURE__ */ _jsx24(Axis2, {
|
|
8629
7795
|
...chartOptions.axis.x
|
|
8630
|
-
}), chartOptions.axis.y.display && /* @__PURE__ */
|
|
7796
|
+
}), chartOptions.axis.y.display && /* @__PURE__ */ _jsx24(Axis2, {
|
|
8631
7797
|
...chartOptions.axis.y
|
|
8632
|
-
}), allSeriesHidden ? /* @__PURE__ */
|
|
7798
|
+
}), allSeriesHidden ? /* @__PURE__ */ _jsx24(SvgEmptyState, {
|
|
8633
7799
|
x: width / 2,
|
|
8634
7800
|
y: chartHeight / 2,
|
|
8635
7801
|
width,
|
|
@@ -8656,19 +7822,19 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8656
7822
|
...lineStyles
|
|
8657
7823
|
};
|
|
8658
7824
|
return /* @__PURE__ */ _jsxs10("g", {
|
|
8659
|
-
children: [withGradientFill && /* @__PURE__ */
|
|
7825
|
+
children: [withGradientFill && /* @__PURE__ */ _jsx24(LinearGradient, {
|
|
8660
7826
|
id: `area-gradient-${chartId}-${index + 1}`,
|
|
8661
7827
|
from: color,
|
|
8662
7828
|
fromOpacity: 0.4,
|
|
8663
7829
|
toOpacity: 0.1,
|
|
8664
7830
|
to: providerTheme.backgroundColor,
|
|
8665
7831
|
...seriesData.options?.gradient,
|
|
8666
|
-
children: seriesData.options?.gradient?.stops?.map((stop, stopIndex) => /* @__PURE__ */
|
|
7832
|
+
children: seriesData.options?.gradient?.stops?.map((stop, stopIndex) => /* @__PURE__ */ _jsx24("stop", {
|
|
8667
7833
|
offset: stop.offset,
|
|
8668
7834
|
stopColor: stop.color || color,
|
|
8669
7835
|
stopOpacity: stop.opacity ?? 1
|
|
8670
7836
|
}, `${stop.offset}-${stop.color || color}`))
|
|
8671
|
-
}), /* @__PURE__ */
|
|
7837
|
+
}), /* @__PURE__ */ _jsx24(AreaSeries, {
|
|
8672
7838
|
dataKey: seriesData?.label,
|
|
8673
7839
|
data: seriesData.data,
|
|
8674
7840
|
...accessors,
|
|
@@ -8676,7 +7842,7 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8676
7842
|
renderLine: true,
|
|
8677
7843
|
curve: getCurveType(curveType, smoothing),
|
|
8678
7844
|
lineProps
|
|
8679
|
-
}, seriesData?.label), withStartGlyphs && /* @__PURE__ */
|
|
7845
|
+
}, seriesData?.label), withStartGlyphs && /* @__PURE__ */ _jsx24(line_chart_glyph_default, {
|
|
8680
7846
|
index,
|
|
8681
7847
|
data: seriesData,
|
|
8682
7848
|
color,
|
|
@@ -8684,7 +7850,7 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8684
7850
|
accessors,
|
|
8685
7851
|
glyphStyle,
|
|
8686
7852
|
position: "start"
|
|
8687
|
-
}), withEndGlyphs && /* @__PURE__ */
|
|
7853
|
+
}), withEndGlyphs && /* @__PURE__ */ _jsx24(line_chart_glyph_default, {
|
|
8688
7854
|
index,
|
|
8689
7855
|
data: seriesData,
|
|
8690
7856
|
color,
|
|
@@ -8694,7 +7860,7 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8694
7860
|
position: "end"
|
|
8695
7861
|
})]
|
|
8696
7862
|
}, seriesData?.label || index);
|
|
8697
|
-
}), withTooltips && /* @__PURE__ */
|
|
7863
|
+
}), withTooltips && /* @__PURE__ */ _jsx24(AccessibleTooltip, {
|
|
8698
7864
|
detectBounds: true,
|
|
8699
7865
|
snapTooltipToDatumX: true,
|
|
8700
7866
|
snapTooltipToDatumY: true,
|
|
@@ -8708,7 +7874,7 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8708
7874
|
tooltipRef,
|
|
8709
7875
|
keyboardFocusedClassName: line_chart_module_default["line-chart__tooltip--keyboard-focused"],
|
|
8710
7876
|
series: dataSorted
|
|
8711
|
-
}), /* @__PURE__ */
|
|
7877
|
+
}), /* @__PURE__ */ _jsx24(LineChartScalesRef, {
|
|
8712
7878
|
chartRef: internalChartRef,
|
|
8713
7879
|
width,
|
|
8714
7880
|
height,
|
|
@@ -8724,13 +7890,13 @@ var LineChartInternal = /* @__PURE__ */ forwardRef6(({
|
|
|
8724
7890
|
var LineChartWithProvider = /* @__PURE__ */ forwardRef6((props, ref) => {
|
|
8725
7891
|
const existingContext = useContext21(GlobalChartsContext);
|
|
8726
7892
|
if (existingContext) {
|
|
8727
|
-
return /* @__PURE__ */
|
|
7893
|
+
return /* @__PURE__ */ _jsx24(LineChartInternal, {
|
|
8728
7894
|
...props,
|
|
8729
7895
|
ref
|
|
8730
7896
|
});
|
|
8731
7897
|
}
|
|
8732
|
-
return /* @__PURE__ */
|
|
8733
|
-
children: /* @__PURE__ */
|
|
7898
|
+
return /* @__PURE__ */ _jsx24(GlobalChartsProvider, {
|
|
7899
|
+
children: /* @__PURE__ */ _jsx24(LineChartInternal, {
|
|
8734
7900
|
...props,
|
|
8735
7901
|
ref
|
|
8736
7902
|
})
|
|
@@ -8753,11 +7919,11 @@ import { Group as Group4 } from "@visx/group";
|
|
|
8753
7919
|
import { Pie } from "@visx/shape";
|
|
8754
7920
|
import { useTooltip as useTooltip2, useTooltipInPortal as useTooltipInPortal2 } from "@visx/tooltip";
|
|
8755
7921
|
import { __ as __7 } from "@wordpress/i18n";
|
|
8756
|
-
import
|
|
7922
|
+
import clsx9 from "clsx";
|
|
8757
7923
|
import { useCallback as useCallback12, useContext as useContext22, useMemo as useMemo23 } from "react";
|
|
8758
7924
|
|
|
8759
7925
|
// src/charts/private/radial-wipe-animation/radial-wipe-animation.tsx
|
|
8760
|
-
import { jsx as
|
|
7926
|
+
import { jsx as _jsx25 } from "react/jsx-runtime";
|
|
8761
7927
|
function RadialWipeAnimation({
|
|
8762
7928
|
id,
|
|
8763
7929
|
radius,
|
|
@@ -8773,9 +7939,9 @@ function RadialWipeAnimation({
|
|
|
8773
7939
|
const isValidWipePercentage = 0 < wipePercentage && wipePercentage <= 100;
|
|
8774
7940
|
const animationDuration = `${// If wipePercentage is invalid, set animation duration to 0 to disable animation.
|
|
8775
7941
|
isValidWipePercentage ? durationMs * (100 / wipePercentage) : 0}ms`;
|
|
8776
|
-
return /* @__PURE__ */
|
|
7942
|
+
return /* @__PURE__ */ _jsx25("mask", {
|
|
8777
7943
|
id,
|
|
8778
|
-
children: /* @__PURE__ */
|
|
7944
|
+
children: /* @__PURE__ */ _jsx25("circle", {
|
|
8779
7945
|
cx: 0,
|
|
8780
7946
|
cy: 0,
|
|
8781
7947
|
r: radius,
|
|
@@ -8788,7 +7954,7 @@ function RadialWipeAnimation({
|
|
|
8788
7954
|
style: {
|
|
8789
7955
|
transform: `rotate(${startAngle}) scaleY(${scaleY})`
|
|
8790
7956
|
},
|
|
8791
|
-
children: /* @__PURE__ */
|
|
7957
|
+
children: /* @__PURE__ */ _jsx25("animate", {
|
|
8792
7958
|
attributeName: "stroke-dashoffset",
|
|
8793
7959
|
from: "0",
|
|
8794
7960
|
to: "100.1",
|
|
@@ -8811,11 +7977,11 @@ var pie_chart_module_default = {
|
|
|
8811
7977
|
};
|
|
8812
7978
|
|
|
8813
7979
|
// src/charts/pie-chart/pie-chart.tsx
|
|
8814
|
-
import { jsx as
|
|
7980
|
+
import { jsx as _jsx26, Fragment as _Fragment7, jsxs as _jsxs11 } from "react/jsx-runtime";
|
|
8815
7981
|
var renderDefaultPieTooltip = ({
|
|
8816
7982
|
tooltipData
|
|
8817
7983
|
}) => {
|
|
8818
|
-
return /* @__PURE__ */
|
|
7984
|
+
return /* @__PURE__ */ _jsx26(BaseTooltip, {
|
|
8819
7985
|
data: tooltipData,
|
|
8820
7986
|
top: 0,
|
|
8821
7987
|
left: 0,
|
|
@@ -8942,32 +8108,32 @@ var PieChartInternal = ({
|
|
|
8942
8108
|
});
|
|
8943
8109
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
8944
8110
|
if (!isValid2) {
|
|
8945
|
-
return /* @__PURE__ */
|
|
8946
|
-
className:
|
|
8947
|
-
children: /* @__PURE__ */
|
|
8111
|
+
return /* @__PURE__ */ _jsx26("div", {
|
|
8112
|
+
className: clsx9("pie-chart", pie_chart_module_default["pie-chart"], className),
|
|
8113
|
+
children: /* @__PURE__ */ _jsx26("div", {
|
|
8948
8114
|
className: pie_chart_module_default["error-message"],
|
|
8949
8115
|
children: message
|
|
8950
8116
|
})
|
|
8951
8117
|
});
|
|
8952
8118
|
}
|
|
8953
8119
|
const padAngle = gapScale * (2 * Math.PI / data.length);
|
|
8954
|
-
const dataWithIndex = visibleData.map((
|
|
8955
|
-
const originalIndex = data.findIndex((item) => item.label ===
|
|
8120
|
+
const dataWithIndex = visibleData.map((d) => {
|
|
8121
|
+
const originalIndex = data.findIndex((item) => item.label === d.label);
|
|
8956
8122
|
return {
|
|
8957
|
-
...
|
|
8123
|
+
...d,
|
|
8958
8124
|
index: originalIndex >= 0 ? originalIndex : 0
|
|
8959
8125
|
};
|
|
8960
8126
|
});
|
|
8961
8127
|
const accessors = {
|
|
8962
|
-
value: (
|
|
8963
|
-
fill: (
|
|
8128
|
+
value: (d) => d.value,
|
|
8129
|
+
fill: (d) => {
|
|
8964
8130
|
return getElementStyles({
|
|
8965
|
-
data:
|
|
8966
|
-
index:
|
|
8131
|
+
data: d,
|
|
8132
|
+
index: d.index
|
|
8967
8133
|
}).color;
|
|
8968
8134
|
}
|
|
8969
8135
|
};
|
|
8970
|
-
const legendElement = showLegend && /* @__PURE__ */
|
|
8136
|
+
const legendElement = showLegend && /* @__PURE__ */ _jsx26(Legend, {
|
|
8971
8137
|
orientation: legend.orientation ?? "horizontal",
|
|
8972
8138
|
position: legendPosition,
|
|
8973
8139
|
alignment: legend.alignment ?? "center",
|
|
@@ -8979,16 +8145,16 @@ var PieChartInternal = ({
|
|
|
8979
8145
|
chartId,
|
|
8980
8146
|
interactive: legendInteractive
|
|
8981
8147
|
});
|
|
8982
|
-
return /* @__PURE__ */
|
|
8148
|
+
return /* @__PURE__ */ _jsx26(SingleChartContext.Provider, {
|
|
8983
8149
|
value: {
|
|
8984
8150
|
chartId
|
|
8985
8151
|
},
|
|
8986
|
-
children: /* @__PURE__ */
|
|
8152
|
+
children: /* @__PURE__ */ _jsx26(ChartLayout, {
|
|
8987
8153
|
legendPosition,
|
|
8988
8154
|
legendElement,
|
|
8989
8155
|
legendChildren,
|
|
8990
8156
|
gap,
|
|
8991
|
-
className:
|
|
8157
|
+
className: clsx9(
|
|
8992
8158
|
"pie-chart",
|
|
8993
8159
|
pie_chart_module_default["pie-chart"],
|
|
8994
8160
|
// Fill parent when no explicit dimensions provided
|
|
@@ -9002,10 +8168,10 @@ var PieChartInternal = ({
|
|
|
9002
8168
|
height: propHeight || void 0
|
|
9003
8169
|
},
|
|
9004
8170
|
trailingContent: /* @__PURE__ */ _jsxs11(_Fragment7, {
|
|
9005
|
-
children: [withTooltips && tooltipOpen && tooltipData && /* @__PURE__ */
|
|
8171
|
+
children: [withTooltips && tooltipOpen && tooltipData && /* @__PURE__ */ _jsx26(TooltipInPortal, {
|
|
9006
8172
|
top: tooltipTop || 0,
|
|
9007
8173
|
left: tooltipLeft || 0,
|
|
9008
|
-
children: /* @__PURE__ */
|
|
8174
|
+
children: /* @__PURE__ */ _jsx26("div", {
|
|
9009
8175
|
role: "tooltip",
|
|
9010
8176
|
children: renderTooltip({
|
|
9011
8177
|
tooltipData
|
|
@@ -9030,7 +8196,7 @@ var PieChartInternal = ({
|
|
|
9030
8196
|
const innerRadius = thickness === 0 ? 0 : outerRadius * (1 - thickness);
|
|
9031
8197
|
const maxCornerRadius = (outerRadius - innerRadius) / 2;
|
|
9032
8198
|
const cornerRadius = cornerScale ? Math.min(cornerScale * outerRadius, maxCornerRadius) : 0;
|
|
9033
|
-
return /* @__PURE__ */
|
|
8199
|
+
return /* @__PURE__ */ _jsx26(Stack, {
|
|
9034
8200
|
ref: containerRef,
|
|
9035
8201
|
align: "center",
|
|
9036
8202
|
justify: "center",
|
|
@@ -9040,8 +8206,8 @@ var PieChartInternal = ({
|
|
|
9040
8206
|
preserveAspectRatio: "xMidYMid meet",
|
|
9041
8207
|
width,
|
|
9042
8208
|
height,
|
|
9043
|
-
children: [/* @__PURE__ */
|
|
9044
|
-
children: /* @__PURE__ */
|
|
8209
|
+
children: [/* @__PURE__ */ _jsx26("defs", {
|
|
8210
|
+
children: /* @__PURE__ */ _jsx26(radial_wipe_animation_default, {
|
|
9045
8211
|
id: `radial-wipe-${chartId}`,
|
|
9046
8212
|
radius: outerRadius,
|
|
9047
8213
|
innerRadius
|
|
@@ -9050,13 +8216,13 @@ var PieChartInternal = ({
|
|
|
9050
8216
|
top: centerY,
|
|
9051
8217
|
left: centerX,
|
|
9052
8218
|
mask: animation && !prefersReducedMotion ? `url(#radial-wipe-${chartId})` : null,
|
|
9053
|
-
children: [allSegmentsHidden ? /* @__PURE__ */
|
|
8219
|
+
children: [allSegmentsHidden ? /* @__PURE__ */ _jsx26(SvgEmptyState, {
|
|
9054
8220
|
x: 0,
|
|
9055
8221
|
y: 0,
|
|
9056
8222
|
width,
|
|
9057
8223
|
height,
|
|
9058
8224
|
children: __7("All segments are hidden. Click legend items to show data.", "jetpack-charts")
|
|
9059
|
-
}) : /* @__PURE__ */
|
|
8225
|
+
}) : /* @__PURE__ */ _jsx26(Pie, {
|
|
9060
8226
|
data: dataWithIndex,
|
|
9061
8227
|
pieValue: accessors.value,
|
|
9062
8228
|
outerRadius,
|
|
@@ -9090,19 +8256,22 @@ var PieChartInternal = ({
|
|
|
9090
8256
|
groupProps.onMouseMove = handleMouseMove;
|
|
9091
8257
|
groupProps.onMouseLeave = onMouseLeave;
|
|
9092
8258
|
}
|
|
9093
|
-
const
|
|
8259
|
+
const svgLabelSmall = providerTheme.svgLabelSmall;
|
|
8260
|
+
const fontSize = resolveFontSize(svgLabelSmall?.fontSize) ?? 12;
|
|
9094
8261
|
const estimatedTextWidth = getStringWidth(arc.data.label, {
|
|
9095
|
-
fontSize
|
|
8262
|
+
fontSize,
|
|
8263
|
+
fontFamily: svgLabelSmall?.fontFamily,
|
|
8264
|
+
fontWeight: svgLabelSmall?.fontWeight
|
|
9096
8265
|
});
|
|
9097
8266
|
const labelPadding = 6;
|
|
9098
8267
|
const backgroundWidth = estimatedTextWidth + labelPadding * 2;
|
|
9099
8268
|
const backgroundHeight = fontSize + labelPadding * 2;
|
|
9100
8269
|
return /* @__PURE__ */ _jsxs11("g", {
|
|
9101
8270
|
...groupProps,
|
|
9102
|
-
children: [/* @__PURE__ */
|
|
8271
|
+
children: [/* @__PURE__ */ _jsx26("path", {
|
|
9103
8272
|
...pathProps
|
|
9104
8273
|
}), showLabels && hasSpaceForLabel && /* @__PURE__ */ _jsxs11("g", {
|
|
9105
|
-
children: [providerTheme.labelBackgroundColor && /* @__PURE__ */
|
|
8274
|
+
children: [providerTheme.labelBackgroundColor && /* @__PURE__ */ _jsx26("rect", {
|
|
9106
8275
|
x: centroidX - backgroundWidth / 2,
|
|
9107
8276
|
y: centroidY - backgroundHeight / 2,
|
|
9108
8277
|
width: backgroundWidth,
|
|
@@ -9111,7 +8280,7 @@ var PieChartInternal = ({
|
|
|
9111
8280
|
rx: 4,
|
|
9112
8281
|
ry: 4,
|
|
9113
8282
|
pointerEvents: "none"
|
|
9114
|
-
}), /* @__PURE__ */
|
|
8283
|
+
}), /* @__PURE__ */ _jsx26("text", {
|
|
9115
8284
|
x: centroidX,
|
|
9116
8285
|
y: centroidY,
|
|
9117
8286
|
dy: ".33em",
|
|
@@ -9136,12 +8305,12 @@ var PieChartInternal = ({
|
|
|
9136
8305
|
var PieChartWithProvider = (props) => {
|
|
9137
8306
|
const existingContext = useContext22(GlobalChartsContext);
|
|
9138
8307
|
if (existingContext) {
|
|
9139
|
-
return /* @__PURE__ */
|
|
8308
|
+
return /* @__PURE__ */ _jsx26(PieChartInternal, {
|
|
9140
8309
|
...props
|
|
9141
8310
|
});
|
|
9142
8311
|
}
|
|
9143
|
-
return /* @__PURE__ */
|
|
9144
|
-
children: /* @__PURE__ */
|
|
8312
|
+
return /* @__PURE__ */ _jsx26(GlobalChartsProvider, {
|
|
8313
|
+
children: /* @__PURE__ */ _jsx26(PieChartInternal, {
|
|
9145
8314
|
...props
|
|
9146
8315
|
})
|
|
9147
8316
|
});
|
|
@@ -9164,7 +8333,7 @@ import { Pie as Pie2 } from "@visx/shape";
|
|
|
9164
8333
|
import { Text as Text4 } from "@visx/text";
|
|
9165
8334
|
import { useTooltip as useTooltip3, useTooltipInPortal as useTooltipInPortal3 } from "@visx/tooltip";
|
|
9166
8335
|
import { __ as __8 } from "@wordpress/i18n";
|
|
9167
|
-
import
|
|
8336
|
+
import clsx10 from "clsx";
|
|
9168
8337
|
import { useCallback as useCallback13, useContext as useContext23, useMemo as useMemo24 } from "react";
|
|
9169
8338
|
|
|
9170
8339
|
// src/charts/pie-semi-circle-chart/pie-semi-circle-chart.module.scss
|
|
@@ -9177,11 +8346,11 @@ var pie_semi_circle_chart_module_default = {
|
|
|
9177
8346
|
};
|
|
9178
8347
|
|
|
9179
8348
|
// src/charts/pie-semi-circle-chart/pie-semi-circle-chart.tsx
|
|
9180
|
-
import { jsx as
|
|
8349
|
+
import { jsx as _jsx27, Fragment as _Fragment8, jsxs as _jsxs12 } from "react/jsx-runtime";
|
|
9181
8350
|
var renderDefaultPieSemiCircleTooltip = ({
|
|
9182
8351
|
tooltipData
|
|
9183
8352
|
}) => {
|
|
9184
|
-
return /* @__PURE__ */
|
|
8353
|
+
return /* @__PURE__ */ _jsx27(BaseTooltip, {
|
|
9185
8354
|
data: tooltipData,
|
|
9186
8355
|
top: 0,
|
|
9187
8356
|
left: 0,
|
|
@@ -9293,11 +8462,11 @@ var PieSemiCircleChartInternal = ({
|
|
|
9293
8462
|
isSeriesVisible
|
|
9294
8463
|
});
|
|
9295
8464
|
const accessors = useMemo24(() => ({
|
|
9296
|
-
value: (
|
|
9297
|
-
sort: (
|
|
9298
|
-
fill: (
|
|
9299
|
-
data:
|
|
9300
|
-
index:
|
|
8465
|
+
value: (d) => d.value,
|
|
8466
|
+
sort: (a, b) => b.value - a.value,
|
|
8467
|
+
fill: (d) => getElementStyles({
|
|
8468
|
+
data: d,
|
|
8469
|
+
index: d.index
|
|
9301
8470
|
}).color
|
|
9302
8471
|
}), [getElementStyles]);
|
|
9303
8472
|
const legendOptions = useMemo24(() => ({
|
|
@@ -9327,12 +8496,12 @@ var PieSemiCircleChartInternal = ({
|
|
|
9327
8496
|
if (!isValid2) {
|
|
9328
8497
|
const errorWidth = propHeight ? Math.min(propWidth || propHeight * 2, propHeight * 2) : effectiveWidth;
|
|
9329
8498
|
const errorHeight = errorWidth / 2;
|
|
9330
|
-
return /* @__PURE__ */
|
|
8499
|
+
return /* @__PURE__ */ _jsx27("div", {
|
|
9331
8500
|
className: pie_semi_circle_chart_module_default["pie-semi-circle-chart"],
|
|
9332
|
-
children: /* @__PURE__ */
|
|
8501
|
+
children: /* @__PURE__ */ _jsx27("svg", {
|
|
9333
8502
|
width: errorWidth,
|
|
9334
8503
|
height: errorHeight,
|
|
9335
|
-
children: /* @__PURE__ */
|
|
8504
|
+
children: /* @__PURE__ */ _jsx27("text", {
|
|
9336
8505
|
x: "50%",
|
|
9337
8506
|
y: "50%",
|
|
9338
8507
|
textAnchor: "middle",
|
|
@@ -9342,16 +8511,16 @@ var PieSemiCircleChartInternal = ({
|
|
|
9342
8511
|
})
|
|
9343
8512
|
});
|
|
9344
8513
|
}
|
|
9345
|
-
const dataWithIndex = visibleData.map((
|
|
9346
|
-
const originalIndex = data.findIndex((item) => item.label ===
|
|
8514
|
+
const dataWithIndex = visibleData.map((d) => {
|
|
8515
|
+
const originalIndex = data.findIndex((item) => item.label === d.label);
|
|
9347
8516
|
return {
|
|
9348
|
-
...
|
|
8517
|
+
...d,
|
|
9349
8518
|
index: originalIndex >= 0 ? originalIndex : 0
|
|
9350
8519
|
};
|
|
9351
8520
|
});
|
|
9352
8521
|
const startAngle = clockwise ? -Math.PI / 2 : Math.PI / 2;
|
|
9353
8522
|
const endAngle = clockwise ? Math.PI / 2 : -Math.PI / 2;
|
|
9354
|
-
const legendElement = showLegend && /* @__PURE__ */
|
|
8523
|
+
const legendElement = showLegend && /* @__PURE__ */ _jsx27(Legend, {
|
|
9355
8524
|
orientation: legend.orientation ?? "horizontal",
|
|
9356
8525
|
position: legendPosition,
|
|
9357
8526
|
alignment: legend.alignment ?? "center",
|
|
@@ -9363,16 +8532,16 @@ var PieSemiCircleChartInternal = ({
|
|
|
9363
8532
|
chartId,
|
|
9364
8533
|
interactive: legendInteractive
|
|
9365
8534
|
});
|
|
9366
|
-
return /* @__PURE__ */
|
|
8535
|
+
return /* @__PURE__ */ _jsx27(SingleChartContext.Provider, {
|
|
9367
8536
|
value: {
|
|
9368
8537
|
chartId
|
|
9369
8538
|
},
|
|
9370
|
-
children: /* @__PURE__ */
|
|
8539
|
+
children: /* @__PURE__ */ _jsx27(ChartLayout, {
|
|
9371
8540
|
legendPosition,
|
|
9372
8541
|
legendElement,
|
|
9373
8542
|
legendChildren,
|
|
9374
8543
|
gap,
|
|
9375
|
-
className:
|
|
8544
|
+
className: clsx10("pie-semi-circle-chart", pie_semi_circle_chart_module_default["pie-semi-circle-chart"], {
|
|
9376
8545
|
[pie_semi_circle_chart_module_default["pie-semi-circle-chart--responsive"]]: !propWidth && !propHeight
|
|
9377
8546
|
}, className),
|
|
9378
8547
|
style: {
|
|
@@ -9380,10 +8549,10 @@ var PieSemiCircleChartInternal = ({
|
|
|
9380
8549
|
height: propHeight || void 0
|
|
9381
8550
|
},
|
|
9382
8551
|
trailingContent: /* @__PURE__ */ _jsxs12(_Fragment8, {
|
|
9383
|
-
children: [withTooltips && tooltipOpen && tooltipData && /* @__PURE__ */
|
|
8552
|
+
children: [withTooltips && tooltipOpen && tooltipData && /* @__PURE__ */ _jsx27(TooltipInPortal, {
|
|
9384
8553
|
top: tooltipTop || 0,
|
|
9385
8554
|
left: tooltipLeft || 0,
|
|
9386
|
-
children: /* @__PURE__ */
|
|
8555
|
+
children: /* @__PURE__ */ _jsx27("div", {
|
|
9387
8556
|
role: "tooltip",
|
|
9388
8557
|
children: renderTooltip({
|
|
9389
8558
|
tooltipData
|
|
@@ -9401,7 +8570,7 @@ var PieSemiCircleChartInternal = ({
|
|
|
9401
8570
|
const height = width / 2;
|
|
9402
8571
|
const radius = height;
|
|
9403
8572
|
const innerRadius = radius * (1 - thickness);
|
|
9404
|
-
return /* @__PURE__ */
|
|
8573
|
+
return /* @__PURE__ */ _jsx27(Stack, {
|
|
9405
8574
|
ref: containerRef,
|
|
9406
8575
|
align: "center",
|
|
9407
8576
|
justify: "center",
|
|
@@ -9410,26 +8579,26 @@ var PieSemiCircleChartInternal = ({
|
|
|
9410
8579
|
width,
|
|
9411
8580
|
height,
|
|
9412
8581
|
viewBox: `0 0 ${width} ${height}`,
|
|
9413
|
-
children: [/* @__PURE__ */
|
|
9414
|
-
children: /* @__PURE__ */
|
|
8582
|
+
children: [/* @__PURE__ */ _jsx27("defs", {
|
|
8583
|
+
children: /* @__PURE__ */ _jsx27(radial_wipe_animation_default, {
|
|
9415
8584
|
id: `radial-wipe-${chartId}`,
|
|
9416
8585
|
radius,
|
|
9417
8586
|
innerRadius,
|
|
9418
8587
|
startAngle: "-180deg",
|
|
9419
8588
|
wipePercentage: 50
|
|
9420
8589
|
})
|
|
9421
|
-
}), /* @__PURE__ */
|
|
8590
|
+
}), /* @__PURE__ */ _jsx27(Group5, {
|
|
9422
8591
|
top: height,
|
|
9423
8592
|
left: width / 2,
|
|
9424
8593
|
mask: animation && !prefersReducedMotion ? `url(#radial-wipe-${chartId})` : null,
|
|
9425
|
-
children: allSegmentsHidden ? /* @__PURE__ */
|
|
8594
|
+
children: allSegmentsHidden ? /* @__PURE__ */ _jsx27(SvgEmptyState, {
|
|
9426
8595
|
x: 0,
|
|
9427
8596
|
y: -radius / 2,
|
|
9428
8597
|
width,
|
|
9429
8598
|
height,
|
|
9430
8599
|
children: __8("All segments are hidden. Click legend items to show data.", "jetpack-charts")
|
|
9431
8600
|
}) : /* @__PURE__ */ _jsxs12(_Fragment8, {
|
|
9432
|
-
children: [/* @__PURE__ */
|
|
8601
|
+
children: [/* @__PURE__ */ _jsx27(Pie2, {
|
|
9433
8602
|
data: dataWithIndex,
|
|
9434
8603
|
pieValue: accessors.value,
|
|
9435
8604
|
outerRadius: radius,
|
|
@@ -9440,23 +8609,23 @@ var PieSemiCircleChartInternal = ({
|
|
|
9440
8609
|
endAngle,
|
|
9441
8610
|
pieSort: accessors.sort,
|
|
9442
8611
|
children: (pie) => {
|
|
9443
|
-
return pie.arcs.map((arc) => /* @__PURE__ */
|
|
8612
|
+
return pie.arcs.map((arc) => /* @__PURE__ */ _jsx27("g", {
|
|
9444
8613
|
onMouseMove: withTooltips ? handleArcMouseMove(arc) : void 0,
|
|
9445
8614
|
onMouseLeave: withTooltips ? handleMouseLeave : void 0,
|
|
9446
|
-
children: /* @__PURE__ */
|
|
8615
|
+
children: /* @__PURE__ */ _jsx27("path", {
|
|
9447
8616
|
d: pie.path(arc) || "",
|
|
9448
8617
|
fill: accessors.fill(arc.data)
|
|
9449
8618
|
})
|
|
9450
8619
|
}, arc.data.label));
|
|
9451
8620
|
}
|
|
9452
8621
|
}), /* @__PURE__ */ _jsxs12(Group5, {
|
|
9453
|
-
children: [/* @__PURE__ */
|
|
8622
|
+
children: [/* @__PURE__ */ _jsx27(Text4, {
|
|
9454
8623
|
textAnchor: "middle",
|
|
9455
8624
|
verticalAnchor: "start",
|
|
9456
8625
|
y: -40,
|
|
9457
8626
|
className: pie_semi_circle_chart_module_default.label,
|
|
9458
8627
|
children: label
|
|
9459
|
-
}), /* @__PURE__ */
|
|
8628
|
+
}), /* @__PURE__ */ _jsx27(Text4, {
|
|
9460
8629
|
textAnchor: "middle",
|
|
9461
8630
|
verticalAnchor: "start",
|
|
9462
8631
|
y: -20,
|
|
@@ -9475,12 +8644,12 @@ var PieSemiCircleChartInternal = ({
|
|
|
9475
8644
|
var PieSemiCircleChartWithProvider = (props) => {
|
|
9476
8645
|
const existingContext = useContext23(GlobalChartsContext);
|
|
9477
8646
|
if (existingContext) {
|
|
9478
|
-
return /* @__PURE__ */
|
|
8647
|
+
return /* @__PURE__ */ _jsx27(PieSemiCircleChartInternal, {
|
|
9479
8648
|
...props
|
|
9480
8649
|
});
|
|
9481
8650
|
}
|
|
9482
|
-
return /* @__PURE__ */
|
|
9483
|
-
children: /* @__PURE__ */
|
|
8651
|
+
return /* @__PURE__ */ _jsx27(GlobalChartsProvider, {
|
|
8652
|
+
children: /* @__PURE__ */ _jsx27(PieSemiCircleChartInternal, {
|
|
9484
8653
|
...props
|
|
9485
8654
|
})
|
|
9486
8655
|
});
|
|
@@ -9498,7 +8667,7 @@ var PieSemiCircleChartResponsive = attachSubComponents(withResponsive(PieSemiCir
|
|
|
9498
8667
|
});
|
|
9499
8668
|
|
|
9500
8669
|
// src/charts/sparkline/sparkline.tsx
|
|
9501
|
-
import
|
|
8670
|
+
import clsx11 from "clsx";
|
|
9502
8671
|
import { useMemo as useMemo25, forwardRef as forwardRef7 } from "react";
|
|
9503
8672
|
|
|
9504
8673
|
// src/charts/sparkline/sparkline.module.scss
|
|
@@ -9508,7 +8677,7 @@ var sparkline_module_default = {
|
|
|
9508
8677
|
};
|
|
9509
8678
|
|
|
9510
8679
|
// src/charts/sparkline/sparkline.tsx
|
|
9511
|
-
import { jsx as
|
|
8680
|
+
import { jsx as _jsx28 } from "react/jsx-runtime";
|
|
9512
8681
|
var DEFAULT_WIDTH2 = 100;
|
|
9513
8682
|
var DEFAULT_HEIGHT = 40;
|
|
9514
8683
|
var transformToSeriesData = (data, color, strokeWidth) => {
|
|
@@ -9581,9 +8750,9 @@ var SparklineComponent = /* @__PURE__ */ forwardRef7(({
|
|
|
9581
8750
|
}));
|
|
9582
8751
|
}, [seriesData, gradient, color]);
|
|
9583
8752
|
if (!data || data.length === 0) {
|
|
9584
|
-
return /* @__PURE__ */
|
|
8753
|
+
return /* @__PURE__ */ _jsx28("div", {
|
|
9585
8754
|
ref,
|
|
9586
|
-
className:
|
|
8755
|
+
className: clsx11("sparkline", sparkline_module_default.sparkline, sparkline_module_default["sparkline--empty"], className),
|
|
9587
8756
|
style: {
|
|
9588
8757
|
width,
|
|
9589
8758
|
height
|
|
@@ -9594,18 +8763,18 @@ var SparklineComponent = /* @__PURE__ */ forwardRef7(({
|
|
|
9594
8763
|
const cx2 = width / 2;
|
|
9595
8764
|
const cy = height / 2;
|
|
9596
8765
|
const resolvedColor = color || "#000000";
|
|
9597
|
-
return /* @__PURE__ */
|
|
8766
|
+
return /* @__PURE__ */ _jsx28("div", {
|
|
9598
8767
|
ref,
|
|
9599
|
-
className:
|
|
8768
|
+
className: clsx11("sparkline", sparkline_module_default.sparkline, sparkline_module_default["sparkline--single-point"], className),
|
|
9600
8769
|
style: {
|
|
9601
8770
|
width,
|
|
9602
8771
|
height
|
|
9603
8772
|
},
|
|
9604
|
-
children: /* @__PURE__ */
|
|
8773
|
+
children: /* @__PURE__ */ _jsx28("svg", {
|
|
9605
8774
|
width,
|
|
9606
8775
|
height,
|
|
9607
8776
|
"aria-hidden": "true",
|
|
9608
|
-
children: /* @__PURE__ */
|
|
8777
|
+
children: /* @__PURE__ */ _jsx28("circle", {
|
|
9609
8778
|
cx: cx2,
|
|
9610
8779
|
cy,
|
|
9611
8780
|
r: strokeWidth * 1.5,
|
|
@@ -9614,10 +8783,10 @@ var SparklineComponent = /* @__PURE__ */ forwardRef7(({
|
|
|
9614
8783
|
})
|
|
9615
8784
|
});
|
|
9616
8785
|
}
|
|
9617
|
-
return /* @__PURE__ */
|
|
8786
|
+
return /* @__PURE__ */ _jsx28("div", {
|
|
9618
8787
|
ref,
|
|
9619
|
-
className:
|
|
9620
|
-
children: /* @__PURE__ */
|
|
8788
|
+
className: clsx11("sparkline", sparkline_module_default.sparkline, className),
|
|
8789
|
+
children: /* @__PURE__ */ _jsx28(LineChart, {
|
|
9621
8790
|
data: seriesWithGradient,
|
|
9622
8791
|
width,
|
|
9623
8792
|
height,
|
|
@@ -9648,7 +8817,7 @@ SparklineUnresponsive.displayName = "SparklineUnresponsive";
|
|
|
9648
8817
|
var Sparkline = withResponsive(SparklineUnresponsive);
|
|
9649
8818
|
|
|
9650
8819
|
// src/components/trend-indicator/trend-indicator.tsx
|
|
9651
|
-
import
|
|
8820
|
+
import clsx12 from "clsx";
|
|
9652
8821
|
|
|
9653
8822
|
// src/components/trend-indicator/trend-indicator.module.scss
|
|
9654
8823
|
var trend_indicator_module_default = {
|
|
@@ -9661,25 +8830,25 @@ var trend_indicator_module_default = {
|
|
|
9661
8830
|
};
|
|
9662
8831
|
|
|
9663
8832
|
// src/components/trend-indicator/trend-indicator.tsx
|
|
9664
|
-
import { jsx as
|
|
8833
|
+
import { jsx as _jsx29, jsxs as _jsxs13 } from "react/jsx-runtime";
|
|
9665
8834
|
var DIRECTION_LABELS = {
|
|
9666
8835
|
up: "Increase",
|
|
9667
8836
|
down: "Decrease",
|
|
9668
8837
|
neutral: "No change"
|
|
9669
8838
|
};
|
|
9670
|
-
var
|
|
8839
|
+
var Icon2 = ({
|
|
9671
8840
|
direction
|
|
9672
8841
|
}) => {
|
|
9673
8842
|
if (direction === "neutral") {
|
|
9674
8843
|
return null;
|
|
9675
8844
|
}
|
|
9676
8845
|
const isUp = direction === "up";
|
|
9677
|
-
return /* @__PURE__ */
|
|
8846
|
+
return /* @__PURE__ */ _jsx29("svg", {
|
|
9678
8847
|
className: trend_indicator_module_default["trend-indicator__icon"],
|
|
9679
8848
|
viewBox: "0 0 16 16",
|
|
9680
8849
|
fill: "none",
|
|
9681
8850
|
"aria-hidden": "true",
|
|
9682
|
-
children: /* @__PURE__ */
|
|
8851
|
+
children: /* @__PURE__ */ _jsx29("path", {
|
|
9683
8852
|
d: isUp ? "M8 13V3M4 7l4-4 4 4" : "M8 3v10M4 9l4 4 4-4",
|
|
9684
8853
|
stroke: "currentColor",
|
|
9685
8854
|
strokeWidth: "1.5",
|
|
@@ -9697,12 +8866,12 @@ function TrendIndicator({
|
|
|
9697
8866
|
}) {
|
|
9698
8867
|
const ariaLabel = `${DIRECTION_LABELS[direction]}: ${value}`;
|
|
9699
8868
|
return /* @__PURE__ */ _jsxs13("span", {
|
|
9700
|
-
className:
|
|
8869
|
+
className: clsx12(trend_indicator_module_default["trend-indicator"], trend_indicator_module_default[`trend-indicator--${direction}`], className),
|
|
9701
8870
|
style,
|
|
9702
8871
|
"aria-label": ariaLabel,
|
|
9703
|
-
children: [showIcon && /* @__PURE__ */
|
|
8872
|
+
children: [showIcon && /* @__PURE__ */ _jsx29(Icon2, {
|
|
9704
8873
|
direction
|
|
9705
|
-
}), /* @__PURE__ */
|
|
8874
|
+
}), /* @__PURE__ */ _jsx29("span", {
|
|
9706
8875
|
className: trend_indicator_module_default["trend-indicator__value"],
|
|
9707
8876
|
children: value
|
|
9708
8877
|
})]
|