@automattic/charts 4.13.0 → 4.14.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 +24 -29
- package/TOKENS.md +3 -0
- package/dist/index.cjs +149 -1624
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +2 -1
- package/dist/index.d.cts +19 -8
- package/dist/index.d.ts +19 -8
- package/dist/index.js +150 -1292
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +1 -1
- package/src/charts/leaderboard-chart/leaderboard-chart.tsx +26 -9
- package/src/charts/leaderboard-chart/private/resolve-leaderboard-entries.ts +53 -0
- package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +41 -0
- package/src/charts/leaderboard-chart/test/resolve-leaderboard-entries.test.ts +146 -0
- package/src/charts/leaderboard-chart/types.ts +6 -0
- package/src/components/legend/private/base-legend.tsx +13 -8
- package/src/components/legend/test/legend.test.tsx +125 -0
- package/src/components/legend/types.ts +9 -1
- package/src/styles/chart-scope.scss +1 -0
- package/src/types.ts +5 -7
package/dist/index.cjs
CHANGED
|
@@ -27,7 +27,6 @@ let _wordpress_i18n = require("@wordpress/i18n");
|
|
|
27
27
|
let clsx = require("clsx");
|
|
28
28
|
clsx = __toESM(clsx, 1);
|
|
29
29
|
let react = require("react");
|
|
30
|
-
react = __toESM(react);
|
|
31
30
|
let date_fns = require("date-fns");
|
|
32
31
|
let _date_fns_tz = require("@date-fns/tz");
|
|
33
32
|
let _visx_text = require("@visx/text");
|
|
@@ -51,7 +50,6 @@ let _visx_pattern = require("@visx/pattern");
|
|
|
51
50
|
let react_google_charts = require("react-google-charts");
|
|
52
51
|
let dompurify = require("dompurify");
|
|
53
52
|
dompurify = __toESM(dompurify, 1);
|
|
54
|
-
require("@babel/runtime/helpers/esm/extends");
|
|
55
53
|
let _wordpress_icons = require("@wordpress/icons");
|
|
56
54
|
let _visx_shape = require("@visx/shape");
|
|
57
55
|
// src/charts/private/chart-instance-context/chart-instance-context.ts
|
|
@@ -2127,16 +2125,17 @@ const BaseLegend = (0, react.forwardRef)(({ items: allItems, className, orientat
|
|
|
2127
2125
|
chartId,
|
|
2128
2126
|
context
|
|
2129
2127
|
]);
|
|
2130
|
-
const createClickHandler = (0, react.useCallback)((seriesLabels, itemInteractive) => {
|
|
2128
|
+
const createClickHandler = (0, react.useCallback)((seriesLabels, itemInteractive, onToggle) => {
|
|
2131
2129
|
if (!itemInteractive) return;
|
|
2132
|
-
return () => handleLegendClick(seriesLabels);
|
|
2130
|
+
return onToggle ? () => onToggle() : () => handleLegendClick(seriesLabels);
|
|
2133
2131
|
}, [handleLegendClick]);
|
|
2134
|
-
const createKeyDownHandler = (0, react.useCallback)((seriesLabels, itemInteractive) => {
|
|
2132
|
+
const createKeyDownHandler = (0, react.useCallback)((seriesLabels, itemInteractive, onToggle) => {
|
|
2135
2133
|
if (!itemInteractive) return;
|
|
2134
|
+
const toggle = onToggle ?? (() => handleLegendClick(seriesLabels));
|
|
2136
2135
|
return (event) => {
|
|
2137
2136
|
if (event.key === "Enter" || event.key === " ") {
|
|
2138
2137
|
event.preventDefault();
|
|
2139
|
-
|
|
2138
|
+
if (!event.repeat) toggle();
|
|
2140
2139
|
}
|
|
2141
2140
|
};
|
|
2142
2141
|
}, [handleLegendClick]);
|
|
@@ -2160,10 +2159,11 @@ const BaseLegend = (0, react.forwardRef)(({ items: allItems, className, orientat
|
|
|
2160
2159
|
children: labels.map((label, i) => {
|
|
2161
2160
|
const matchedItem = items[i];
|
|
2162
2161
|
const seriesLabels = matchedItem?.seriesLabels?.length ? matchedItem.seriesLabels : [label.text];
|
|
2163
|
-
const visible = matchedItem?.interactive === false || isSeriesVisible(seriesLabels[0]);
|
|
2164
2162
|
const itemInteractive = interactive && matchedItem?.interactive !== false;
|
|
2165
|
-
const
|
|
2166
|
-
const
|
|
2163
|
+
const onToggle = itemInteractive ? matchedItem?.onToggle : void 0;
|
|
2164
|
+
const visible = matchedItem?.onToggle ? matchedItem.pressed : matchedItem?.interactive === false || isSeriesVisible(seriesLabels[0]);
|
|
2165
|
+
const handleClick = createClickHandler(seriesLabels, itemInteractive, onToggle);
|
|
2166
|
+
const handleKeyDown = createKeyDownHandler(seriesLabels, itemInteractive, onToggle);
|
|
2167
2167
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_visx_legend.LegendItem, {
|
|
2168
2168
|
className: (0, clsx.default)("visx-legend-item", base_legend_module_default["legend-item"], itemInteractive && base_legend_module_default["legend-item--interactive"], !visible && base_legend_module_default["legend-item--inactive"], itemClassName),
|
|
2169
2169
|
margin: itemMargin,
|
|
@@ -9853,336 +9853,9 @@ function isPlainObject(o) {
|
|
|
9853
9853
|
if (prot.hasOwnProperty("isPrototypeOf") === false) return false;
|
|
9854
9854
|
return true;
|
|
9855
9855
|
}
|
|
9856
|
-
// ../../../node_modules/.pnpm
|
|
9857
|
-
var require_dist$14 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9858
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9859
|
-
exports.lowerCase = exports.localeLowerCase = void 0;
|
|
9860
|
-
/**
|
|
9861
|
-
* Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
|
|
9862
|
-
*/
|
|
9863
|
-
var SUPPORTED_LOCALE = {
|
|
9864
|
-
tr: {
|
|
9865
|
-
regexp: /\u0130|\u0049|\u0049\u0307/g,
|
|
9866
|
-
map: {
|
|
9867
|
-
İ: "i",
|
|
9868
|
-
I: "ı",
|
|
9869
|
-
İ: "i"
|
|
9870
|
-
}
|
|
9871
|
-
},
|
|
9872
|
-
az: {
|
|
9873
|
-
regexp: /\u0130/g,
|
|
9874
|
-
map: {
|
|
9875
|
-
İ: "i",
|
|
9876
|
-
I: "ı",
|
|
9877
|
-
İ: "i"
|
|
9878
|
-
}
|
|
9879
|
-
},
|
|
9880
|
-
lt: {
|
|
9881
|
-
regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
|
|
9882
|
-
map: {
|
|
9883
|
-
I: "i̇",
|
|
9884
|
-
J: "j̇",
|
|
9885
|
-
Į: "į̇",
|
|
9886
|
-
Ì: "i̇̀",
|
|
9887
|
-
Í: "i̇́",
|
|
9888
|
-
Ĩ: "i̇̃"
|
|
9889
|
-
}
|
|
9890
|
-
}
|
|
9891
|
-
};
|
|
9892
|
-
/**
|
|
9893
|
-
* Localized lower case.
|
|
9894
|
-
*/
|
|
9895
|
-
function localeLowerCase(str, locale) {
|
|
9896
|
-
var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
|
|
9897
|
-
if (lang) return lowerCase(str.replace(lang.regexp, function(m) {
|
|
9898
|
-
return lang.map[m];
|
|
9899
|
-
}));
|
|
9900
|
-
return lowerCase(str);
|
|
9901
|
-
}
|
|
9902
|
-
exports.localeLowerCase = localeLowerCase;
|
|
9903
|
-
/**
|
|
9904
|
-
* Lower case as a function.
|
|
9905
|
-
*/
|
|
9906
|
-
function lowerCase(str) {
|
|
9907
|
-
return str.toLowerCase();
|
|
9908
|
-
}
|
|
9909
|
-
exports.lowerCase = lowerCase;
|
|
9910
|
-
}));
|
|
9911
|
-
// ../../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist/index.js
|
|
9912
|
-
var require_dist$13 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9913
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9914
|
-
exports.noCase = void 0;
|
|
9915
|
-
var lower_case_1 = require_dist$14();
|
|
9916
|
-
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
|
|
9917
|
-
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
|
|
9918
|
-
/**
|
|
9919
|
-
* Normalize the string into something other libraries can manipulate easier.
|
|
9920
|
-
*/
|
|
9921
|
-
function noCase(input, options) {
|
|
9922
|
-
if (options === void 0) options = {};
|
|
9923
|
-
var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lower_case_1.lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
|
|
9924
|
-
var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
|
|
9925
|
-
var start = 0;
|
|
9926
|
-
var end = result.length;
|
|
9927
|
-
while (result.charAt(start) === "\0") start++;
|
|
9928
|
-
while (result.charAt(end - 1) === "\0") end--;
|
|
9929
|
-
return result.slice(start, end).split("\0").map(transform).join(delimiter);
|
|
9930
|
-
}
|
|
9931
|
-
exports.noCase = noCase;
|
|
9932
|
-
/**
|
|
9933
|
-
* Replace `re` in the input string with the replacement value.
|
|
9934
|
-
*/
|
|
9935
|
-
function replace(input, re, value) {
|
|
9936
|
-
if (re instanceof RegExp) return input.replace(re, value);
|
|
9937
|
-
return re.reduce(function(input, re) {
|
|
9938
|
-
return input.replace(re, value);
|
|
9939
|
-
}, input);
|
|
9940
|
-
}
|
|
9941
|
-
}));
|
|
9942
|
-
// ../../../node_modules/.pnpm/pascal-case@3.1.2/node_modules/pascal-case/dist/index.js
|
|
9943
|
-
var require_dist$12 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9944
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9945
|
-
exports.pascalCase = exports.pascalCaseTransformMerge = exports.pascalCaseTransform = void 0;
|
|
9946
|
-
var tslib_1 = require("tslib");
|
|
9947
|
-
var no_case_1 = require_dist$13();
|
|
9948
|
-
function pascalCaseTransform(input, index) {
|
|
9949
|
-
var firstChar = input.charAt(0);
|
|
9950
|
-
var lowerChars = input.substr(1).toLowerCase();
|
|
9951
|
-
if (index > 0 && firstChar >= "0" && firstChar <= "9") return "_" + firstChar + lowerChars;
|
|
9952
|
-
return "" + firstChar.toUpperCase() + lowerChars;
|
|
9953
|
-
}
|
|
9954
|
-
exports.pascalCaseTransform = pascalCaseTransform;
|
|
9955
|
-
function pascalCaseTransformMerge(input) {
|
|
9956
|
-
return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();
|
|
9957
|
-
}
|
|
9958
|
-
exports.pascalCaseTransformMerge = pascalCaseTransformMerge;
|
|
9959
|
-
function pascalCase(input, options) {
|
|
9960
|
-
if (options === void 0) options = {};
|
|
9961
|
-
return no_case_1.noCase(input, tslib_1.__assign({
|
|
9962
|
-
delimiter: "",
|
|
9963
|
-
transform: pascalCaseTransform
|
|
9964
|
-
}, options));
|
|
9965
|
-
}
|
|
9966
|
-
exports.pascalCase = pascalCase;
|
|
9967
|
-
}));
|
|
9968
|
-
// ../../../node_modules/.pnpm/camel-case@4.1.2/node_modules/camel-case/dist/index.js
|
|
9969
|
-
var require_dist$11 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9970
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9971
|
-
exports.camelCase = exports.camelCaseTransformMerge = exports.camelCaseTransform = void 0;
|
|
9972
|
-
var tslib_1 = require("tslib");
|
|
9973
|
-
var pascal_case_1 = require_dist$12();
|
|
9974
|
-
function camelCaseTransform(input, index) {
|
|
9975
|
-
if (index === 0) return input.toLowerCase();
|
|
9976
|
-
return pascal_case_1.pascalCaseTransform(input, index);
|
|
9977
|
-
}
|
|
9978
|
-
exports.camelCaseTransform = camelCaseTransform;
|
|
9979
|
-
function camelCaseTransformMerge(input, index) {
|
|
9980
|
-
if (index === 0) return input.toLowerCase();
|
|
9981
|
-
return pascal_case_1.pascalCaseTransformMerge(input);
|
|
9982
|
-
}
|
|
9983
|
-
exports.camelCaseTransformMerge = camelCaseTransformMerge;
|
|
9984
|
-
function camelCase(input, options) {
|
|
9985
|
-
if (options === void 0) options = {};
|
|
9986
|
-
return pascal_case_1.pascalCase(input, tslib_1.__assign({ transform: camelCaseTransform }, options));
|
|
9987
|
-
}
|
|
9988
|
-
exports.camelCase = camelCase;
|
|
9989
|
-
}));
|
|
9990
|
-
// ../../../node_modules/.pnpm/upper-case-first@2.0.2/node_modules/upper-case-first/dist/index.js
|
|
9991
|
-
var require_dist$10 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9992
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9993
|
-
exports.upperCaseFirst = void 0;
|
|
9994
|
-
/**
|
|
9995
|
-
* Upper case the first character of an input string.
|
|
9996
|
-
*/
|
|
9997
|
-
function upperCaseFirst(input) {
|
|
9998
|
-
return input.charAt(0).toUpperCase() + input.substr(1);
|
|
9999
|
-
}
|
|
10000
|
-
exports.upperCaseFirst = upperCaseFirst;
|
|
10001
|
-
}));
|
|
10002
|
-
// ../../../node_modules/.pnpm/capital-case@1.0.4/node_modules/capital-case/dist/index.js
|
|
10003
|
-
var require_dist$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10004
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10005
|
-
exports.capitalCase = exports.capitalCaseTransform = void 0;
|
|
10006
|
-
var tslib_1 = require("tslib");
|
|
10007
|
-
var no_case_1 = require_dist$13();
|
|
10008
|
-
var upper_case_first_1 = require_dist$10();
|
|
10009
|
-
function capitalCaseTransform(input) {
|
|
10010
|
-
return upper_case_first_1.upperCaseFirst(input.toLowerCase());
|
|
10011
|
-
}
|
|
10012
|
-
exports.capitalCaseTransform = capitalCaseTransform;
|
|
10013
|
-
function capitalCase(input, options) {
|
|
10014
|
-
if (options === void 0) options = {};
|
|
10015
|
-
return no_case_1.noCase(input, tslib_1.__assign({
|
|
10016
|
-
delimiter: " ",
|
|
10017
|
-
transform: capitalCaseTransform
|
|
10018
|
-
}, options));
|
|
10019
|
-
}
|
|
10020
|
-
exports.capitalCase = capitalCase;
|
|
10021
|
-
}));
|
|
10022
|
-
// ../../../node_modules/.pnpm/upper-case@2.0.2/node_modules/upper-case/dist/index.js
|
|
10023
|
-
var require_dist$8 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10024
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10025
|
-
exports.upperCase = exports.localeUpperCase = void 0;
|
|
10026
|
-
/**
|
|
10027
|
-
* Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
|
|
10028
|
-
*/
|
|
10029
|
-
var SUPPORTED_LOCALE = {
|
|
10030
|
-
tr: {
|
|
10031
|
-
regexp: /[\u0069]/g,
|
|
10032
|
-
map: { i: "İ" }
|
|
10033
|
-
},
|
|
10034
|
-
az: {
|
|
10035
|
-
regexp: /[\u0069]/g,
|
|
10036
|
-
map: { i: "İ" }
|
|
10037
|
-
},
|
|
10038
|
-
lt: {
|
|
10039
|
-
regexp: /[\u0069\u006A\u012F]\u0307|\u0069\u0307[\u0300\u0301\u0303]/g,
|
|
10040
|
-
map: {
|
|
10041
|
-
i̇: "I",
|
|
10042
|
-
j̇: "J",
|
|
10043
|
-
į̇: "Į",
|
|
10044
|
-
i̇̀: "Ì",
|
|
10045
|
-
i̇́: "Í",
|
|
10046
|
-
i̇̃: "Ĩ"
|
|
10047
|
-
}
|
|
10048
|
-
}
|
|
10049
|
-
};
|
|
10050
|
-
/**
|
|
10051
|
-
* Localized upper case.
|
|
10052
|
-
*/
|
|
10053
|
-
function localeUpperCase(str, locale) {
|
|
10054
|
-
var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
|
|
10055
|
-
if (lang) return upperCase(str.replace(lang.regexp, function(m) {
|
|
10056
|
-
return lang.map[m];
|
|
10057
|
-
}));
|
|
10058
|
-
return upperCase(str);
|
|
10059
|
-
}
|
|
10060
|
-
exports.localeUpperCase = localeUpperCase;
|
|
10061
|
-
/**
|
|
10062
|
-
* Upper case as a function.
|
|
10063
|
-
*/
|
|
10064
|
-
function upperCase(str) {
|
|
10065
|
-
return str.toUpperCase();
|
|
10066
|
-
}
|
|
10067
|
-
exports.upperCase = upperCase;
|
|
10068
|
-
}));
|
|
10069
|
-
// ../../../node_modules/.pnpm/constant-case@3.0.4/node_modules/constant-case/dist/index.js
|
|
10070
|
-
var require_dist$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10071
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10072
|
-
exports.constantCase = void 0;
|
|
10073
|
-
var tslib_1 = require("tslib");
|
|
10074
|
-
var no_case_1 = require_dist$13();
|
|
10075
|
-
var upper_case_1 = require_dist$8();
|
|
10076
|
-
function constantCase(input, options) {
|
|
10077
|
-
if (options === void 0) options = {};
|
|
10078
|
-
return no_case_1.noCase(input, tslib_1.__assign({
|
|
10079
|
-
delimiter: "_",
|
|
10080
|
-
transform: upper_case_1.upperCase
|
|
10081
|
-
}, options));
|
|
10082
|
-
}
|
|
10083
|
-
exports.constantCase = constantCase;
|
|
10084
|
-
}));
|
|
10085
|
-
// ../../../node_modules/.pnpm/dot-case@3.0.4/node_modules/dot-case/dist/index.js
|
|
10086
|
-
var require_dist$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10087
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10088
|
-
exports.dotCase = void 0;
|
|
10089
|
-
var tslib_1 = require("tslib");
|
|
10090
|
-
var no_case_1 = require_dist$13();
|
|
10091
|
-
function dotCase(input, options) {
|
|
10092
|
-
if (options === void 0) options = {};
|
|
10093
|
-
return no_case_1.noCase(input, tslib_1.__assign({ delimiter: "." }, options));
|
|
10094
|
-
}
|
|
10095
|
-
exports.dotCase = dotCase;
|
|
10096
|
-
}));
|
|
10097
|
-
// ../../../node_modules/.pnpm/header-case@2.0.4/node_modules/header-case/dist/index.js
|
|
10098
|
-
var require_dist$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10099
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10100
|
-
exports.headerCase = void 0;
|
|
10101
|
-
var tslib_1 = require("tslib");
|
|
10102
|
-
var capital_case_1 = require_dist$9();
|
|
10103
|
-
function headerCase(input, options) {
|
|
10104
|
-
if (options === void 0) options = {};
|
|
10105
|
-
return capital_case_1.capitalCase(input, tslib_1.__assign({ delimiter: "-" }, options));
|
|
10106
|
-
}
|
|
10107
|
-
exports.headerCase = headerCase;
|
|
10108
|
-
}));
|
|
10109
|
-
// ../../../node_modules/.pnpm/param-case@3.0.4/node_modules/param-case/dist/index.js
|
|
10110
|
-
var require_dist$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10111
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10112
|
-
exports.paramCase = void 0;
|
|
10113
|
-
var tslib_1 = require("tslib");
|
|
10114
|
-
var dot_case_1 = require_dist$6();
|
|
10115
|
-
function paramCase(input, options) {
|
|
10116
|
-
if (options === void 0) options = {};
|
|
10117
|
-
return dot_case_1.dotCase(input, tslib_1.__assign({ delimiter: "-" }, options));
|
|
10118
|
-
}
|
|
10119
|
-
exports.paramCase = paramCase;
|
|
10120
|
-
}));
|
|
10121
|
-
// ../../../node_modules/.pnpm/path-case@3.0.4/node_modules/path-case/dist/index.js
|
|
10122
|
-
var require_dist$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10123
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10124
|
-
exports.pathCase = void 0;
|
|
10125
|
-
var tslib_1 = require("tslib");
|
|
10126
|
-
var dot_case_1 = require_dist$6();
|
|
10127
|
-
function pathCase(input, options) {
|
|
10128
|
-
if (options === void 0) options = {};
|
|
10129
|
-
return dot_case_1.dotCase(input, tslib_1.__assign({ delimiter: "/" }, options));
|
|
10130
|
-
}
|
|
10131
|
-
exports.pathCase = pathCase;
|
|
10132
|
-
}));
|
|
10133
|
-
// ../../../node_modules/.pnpm/sentence-case@3.0.4/node_modules/sentence-case/dist/index.js
|
|
10134
|
-
var require_dist$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10135
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10136
|
-
exports.sentenceCase = exports.sentenceCaseTransform = void 0;
|
|
10137
|
-
var tslib_1 = require("tslib");
|
|
10138
|
-
var no_case_1 = require_dist$13();
|
|
10139
|
-
var upper_case_first_1 = require_dist$10();
|
|
10140
|
-
function sentenceCaseTransform(input, index) {
|
|
10141
|
-
var result = input.toLowerCase();
|
|
10142
|
-
if (index === 0) return upper_case_first_1.upperCaseFirst(result);
|
|
10143
|
-
return result;
|
|
10144
|
-
}
|
|
10145
|
-
exports.sentenceCaseTransform = sentenceCaseTransform;
|
|
10146
|
-
function sentenceCase(input, options) {
|
|
10147
|
-
if (options === void 0) options = {};
|
|
10148
|
-
return no_case_1.noCase(input, tslib_1.__assign({
|
|
10149
|
-
delimiter: " ",
|
|
10150
|
-
transform: sentenceCaseTransform
|
|
10151
|
-
}, options));
|
|
10152
|
-
}
|
|
10153
|
-
exports.sentenceCase = sentenceCase;
|
|
10154
|
-
}));
|
|
10155
|
-
// ../../../node_modules/.pnpm/snake-case@3.0.4/node_modules/snake-case/dist/index.js
|
|
10156
|
-
var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10157
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10158
|
-
exports.snakeCase = void 0;
|
|
10159
|
-
var tslib_1 = require("tslib");
|
|
10160
|
-
var dot_case_1 = require_dist$6();
|
|
10161
|
-
function snakeCase(input, options) {
|
|
10162
|
-
if (options === void 0) options = {};
|
|
10163
|
-
return dot_case_1.dotCase(input, tslib_1.__assign({ delimiter: "_" }, options));
|
|
10164
|
-
}
|
|
10165
|
-
exports.snakeCase = snakeCase;
|
|
10166
|
-
}));
|
|
10167
|
-
// ../../../node_modules/.pnpm/change-case@4.1.2/node_modules/change-case/dist/index.js
|
|
10168
|
-
var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10169
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10170
|
-
var tslib_1 = require("tslib");
|
|
10171
|
-
tslib_1.__exportStar(require_dist$11(), exports);
|
|
10172
|
-
tslib_1.__exportStar(require_dist$9(), exports);
|
|
10173
|
-
tslib_1.__exportStar(require_dist$7(), exports);
|
|
10174
|
-
tslib_1.__exportStar(require_dist$6(), exports);
|
|
10175
|
-
tslib_1.__exportStar(require_dist$5(), exports);
|
|
10176
|
-
tslib_1.__exportStar(require_dist$13(), exports);
|
|
10177
|
-
tslib_1.__exportStar(require_dist$4(), exports);
|
|
10178
|
-
tslib_1.__exportStar(require_dist$12(), exports);
|
|
10179
|
-
tslib_1.__exportStar(require_dist$3(), exports);
|
|
10180
|
-
tslib_1.__exportStar(require_dist$2(), exports);
|
|
10181
|
-
tslib_1.__exportStar(require_dist$1(), exports);
|
|
10182
|
-
}));
|
|
10183
|
-
// ../../../node_modules/.pnpm/@wordpress+warning@3.57.0/node_modules/@wordpress/warning/build-module/utils.mjs
|
|
9856
|
+
// ../../../node_modules/.pnpm/@wordpress+warning@4.0.0/node_modules/@wordpress/warning/build-module/utils.mjs
|
|
10184
9857
|
var logged = /* @__PURE__ */ new Set();
|
|
10185
|
-
// ../../../node_modules/.pnpm/@wordpress+warning@
|
|
9858
|
+
// ../../../node_modules/.pnpm/@wordpress+warning@4.0.0/node_modules/@wordpress/warning/build-module/index.mjs
|
|
10186
9859
|
function isDev() {
|
|
10187
9860
|
return globalThis.SCRIPT_DEBUG === true;
|
|
10188
9861
|
}
|
|
@@ -10195,7 +9868,53 @@ function warning(message) {
|
|
|
10195
9868
|
} catch {}
|
|
10196
9869
|
logged.add(message);
|
|
10197
9870
|
}
|
|
10198
|
-
// ../../../node_modules/.pnpm
|
|
9871
|
+
// ../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/es6/index.js
|
|
9872
|
+
var require_es6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9873
|
+
module.exports = function equal(a, b) {
|
|
9874
|
+
if (a === b) return true;
|
|
9875
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
9876
|
+
if (a.constructor !== b.constructor) return false;
|
|
9877
|
+
var length, i, keys;
|
|
9878
|
+
if (Array.isArray(a)) {
|
|
9879
|
+
length = a.length;
|
|
9880
|
+
if (length != b.length) return false;
|
|
9881
|
+
for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;
|
|
9882
|
+
return true;
|
|
9883
|
+
}
|
|
9884
|
+
if (a instanceof Map && b instanceof Map) {
|
|
9885
|
+
if (a.size !== b.size) return false;
|
|
9886
|
+
for (i of a.entries()) if (!b.has(i[0])) return false;
|
|
9887
|
+
for (i of a.entries()) if (!equal(i[1], b.get(i[0]))) return false;
|
|
9888
|
+
return true;
|
|
9889
|
+
}
|
|
9890
|
+
if (a instanceof Set && b instanceof Set) {
|
|
9891
|
+
if (a.size !== b.size) return false;
|
|
9892
|
+
for (i of a.entries()) if (!b.has(i[0])) return false;
|
|
9893
|
+
return true;
|
|
9894
|
+
}
|
|
9895
|
+
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
9896
|
+
length = a.length;
|
|
9897
|
+
if (length != b.length) return false;
|
|
9898
|
+
for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;
|
|
9899
|
+
return true;
|
|
9900
|
+
}
|
|
9901
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
9902
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
9903
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
9904
|
+
keys = Object.keys(a);
|
|
9905
|
+
length = keys.length;
|
|
9906
|
+
if (length !== Object.keys(b).length) return false;
|
|
9907
|
+
for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
9908
|
+
for (i = length; i-- !== 0;) {
|
|
9909
|
+
var key = keys[i];
|
|
9910
|
+
if (!equal(a[key], b[key])) return false;
|
|
9911
|
+
}
|
|
9912
|
+
return true;
|
|
9913
|
+
}
|
|
9914
|
+
return a !== a && b !== b;
|
|
9915
|
+
};
|
|
9916
|
+
}));
|
|
9917
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/utils/hooks/use-update-effect.mjs
|
|
10199
9918
|
function useUpdateEffect(effect, deps) {
|
|
10200
9919
|
const mountedRef = (0, react.useRef)(false);
|
|
10201
9920
|
(0, react.useEffect)(() => {
|
|
@@ -10207,1195 +9926,33 @@ function useUpdateEffect(effect, deps) {
|
|
|
10207
9926
|
}, []);
|
|
10208
9927
|
}
|
|
10209
9928
|
var use_update_effect_default = useUpdateEffect;
|
|
10210
|
-
// ../../../node_modules/.pnpm/@
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
10215
|
-
}
|
|
10216
|
-
|
|
10217
|
-
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
}
|
|
10224
|
-
var StyleSheet = /*#__PURE__*/ function() {
|
|
10225
|
-
function StyleSheet(options) {
|
|
10226
|
-
var _this = this;
|
|
10227
|
-
this._insertTag = function(tag) {
|
|
10228
|
-
var before;
|
|
10229
|
-
if (_this.tags.length === 0) {
|
|
10230
|
-
if (_this.insertionPoint) before = _this.insertionPoint.nextSibling;
|
|
10231
|
-
else if (_this.prepend) before = _this.container.firstChild;
|
|
10232
|
-
else before = _this.before;
|
|
10233
|
-
} else before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
10234
|
-
_this.container.insertBefore(tag, before);
|
|
10235
|
-
_this.tags.push(tag);
|
|
10236
|
-
};
|
|
10237
|
-
this.isSpeedy = options.speedy === void 0 ? true : options.speedy;
|
|
10238
|
-
this.tags = [];
|
|
10239
|
-
this.ctr = 0;
|
|
10240
|
-
this.nonce = options.nonce;
|
|
10241
|
-
this.key = options.key;
|
|
10242
|
-
this.container = options.container;
|
|
10243
|
-
this.prepend = options.prepend;
|
|
10244
|
-
this.insertionPoint = options.insertionPoint;
|
|
10245
|
-
this.before = null;
|
|
10246
|
-
}
|
|
10247
|
-
var _proto = StyleSheet.prototype;
|
|
10248
|
-
_proto.hydrate = function hydrate(nodes) {
|
|
10249
|
-
nodes.forEach(this._insertTag);
|
|
10250
|
-
};
|
|
10251
|
-
_proto.insert = function insert(rule) {
|
|
10252
|
-
if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) this._insertTag(createStyleElement(this));
|
|
10253
|
-
var tag = this.tags[this.tags.length - 1];
|
|
10254
|
-
if (this.isSpeedy) {
|
|
10255
|
-
var sheet = sheetForTag(tag);
|
|
10256
|
-
try {
|
|
10257
|
-
sheet.insertRule(rule, sheet.cssRules.length);
|
|
10258
|
-
} catch (e) {}
|
|
10259
|
-
} else tag.appendChild(document.createTextNode(rule));
|
|
10260
|
-
this.ctr++;
|
|
10261
|
-
};
|
|
10262
|
-
_proto.flush = function flush() {
|
|
10263
|
-
this.tags.forEach(function(tag) {
|
|
10264
|
-
var _tag$parentNode;
|
|
10265
|
-
return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
|
|
10266
|
-
});
|
|
10267
|
-
this.tags = [];
|
|
10268
|
-
this.ctr = 0;
|
|
10269
|
-
};
|
|
10270
|
-
return StyleSheet;
|
|
10271
|
-
}();
|
|
10272
|
-
// ../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js
|
|
10273
|
-
var MS = "-ms-";
|
|
10274
|
-
var MOZ = "-moz-";
|
|
10275
|
-
var WEBKIT = "-webkit-";
|
|
10276
|
-
var COMMENT = "comm";
|
|
10277
|
-
var RULESET = "rule";
|
|
10278
|
-
var DECLARATION = "decl";
|
|
10279
|
-
var IMPORT = "@import";
|
|
10280
|
-
var KEYFRAMES = "@keyframes";
|
|
10281
|
-
var LAYER = "@layer";
|
|
10282
|
-
// ../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js
|
|
10283
|
-
/**
|
|
10284
|
-
* @param {number}
|
|
10285
|
-
* @return {number}
|
|
10286
|
-
*/
|
|
10287
|
-
var abs = Math.abs;
|
|
10288
|
-
/**
|
|
10289
|
-
* @param {number}
|
|
10290
|
-
* @return {string}
|
|
10291
|
-
*/
|
|
10292
|
-
var from = String.fromCharCode;
|
|
10293
|
-
/**
|
|
10294
|
-
* @param {object}
|
|
10295
|
-
* @return {object}
|
|
10296
|
-
*/
|
|
10297
|
-
var assign = Object.assign;
|
|
10298
|
-
/**
|
|
10299
|
-
* @param {string} value
|
|
10300
|
-
* @param {number} length
|
|
10301
|
-
* @return {number}
|
|
10302
|
-
*/
|
|
10303
|
-
function hash(value, length) {
|
|
10304
|
-
return charat(value, 0) ^ 45 ? (((length << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
10305
|
-
}
|
|
10306
|
-
/**
|
|
10307
|
-
* @param {string} value
|
|
10308
|
-
* @return {string}
|
|
10309
|
-
*/
|
|
10310
|
-
function trim(value) {
|
|
10311
|
-
return value.trim();
|
|
10312
|
-
}
|
|
10313
|
-
/**
|
|
10314
|
-
* @param {string} value
|
|
10315
|
-
* @param {RegExp} pattern
|
|
10316
|
-
* @return {string?}
|
|
10317
|
-
*/
|
|
10318
|
-
function match(value, pattern) {
|
|
10319
|
-
return (value = pattern.exec(value)) ? value[0] : value;
|
|
10320
|
-
}
|
|
10321
|
-
/**
|
|
10322
|
-
* @param {string} value
|
|
10323
|
-
* @param {(string|RegExp)} pattern
|
|
10324
|
-
* @param {string} replacement
|
|
10325
|
-
* @return {string}
|
|
10326
|
-
*/
|
|
10327
|
-
function replace(value, pattern, replacement) {
|
|
10328
|
-
return value.replace(pattern, replacement);
|
|
10329
|
-
}
|
|
10330
|
-
/**
|
|
10331
|
-
* @param {string} value
|
|
10332
|
-
* @param {string} search
|
|
10333
|
-
* @return {number}
|
|
10334
|
-
*/
|
|
10335
|
-
function indexof(value, search) {
|
|
10336
|
-
return value.indexOf(search);
|
|
10337
|
-
}
|
|
10338
|
-
/**
|
|
10339
|
-
* @param {string} value
|
|
10340
|
-
* @param {number} index
|
|
10341
|
-
* @return {number}
|
|
10342
|
-
*/
|
|
10343
|
-
function charat(value, index) {
|
|
10344
|
-
return value.charCodeAt(index) | 0;
|
|
10345
|
-
}
|
|
10346
|
-
/**
|
|
10347
|
-
* @param {string} value
|
|
10348
|
-
* @param {number} begin
|
|
10349
|
-
* @param {number} end
|
|
10350
|
-
* @return {string}
|
|
10351
|
-
*/
|
|
10352
|
-
function substr(value, begin, end) {
|
|
10353
|
-
return value.slice(begin, end);
|
|
10354
|
-
}
|
|
10355
|
-
/**
|
|
10356
|
-
* @param {string} value
|
|
10357
|
-
* @return {number}
|
|
10358
|
-
*/
|
|
10359
|
-
function strlen(value) {
|
|
10360
|
-
return value.length;
|
|
10361
|
-
}
|
|
10362
|
-
/**
|
|
10363
|
-
* @param {any[]} value
|
|
10364
|
-
* @return {number}
|
|
10365
|
-
*/
|
|
10366
|
-
function sizeof(value) {
|
|
10367
|
-
return value.length;
|
|
10368
|
-
}
|
|
10369
|
-
/**
|
|
10370
|
-
* @param {any} value
|
|
10371
|
-
* @param {any[]} array
|
|
10372
|
-
* @return {any}
|
|
10373
|
-
*/
|
|
10374
|
-
function append(value, array) {
|
|
10375
|
-
return array.push(value), value;
|
|
10376
|
-
}
|
|
10377
|
-
/**
|
|
10378
|
-
* @param {string[]} array
|
|
10379
|
-
* @param {function} callback
|
|
10380
|
-
* @return {string}
|
|
10381
|
-
*/
|
|
10382
|
-
function combine(array, callback) {
|
|
10383
|
-
return array.map(callback).join("");
|
|
10384
|
-
}
|
|
10385
|
-
// ../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js
|
|
10386
|
-
var line = 1;
|
|
10387
|
-
var column = 1;
|
|
10388
|
-
var length = 0;
|
|
10389
|
-
var position = 0;
|
|
10390
|
-
var character = 0;
|
|
10391
|
-
var characters = "";
|
|
10392
|
-
/**
|
|
10393
|
-
* @param {string} value
|
|
10394
|
-
* @param {object | null} root
|
|
10395
|
-
* @param {object | null} parent
|
|
10396
|
-
* @param {string} type
|
|
10397
|
-
* @param {string[] | string} props
|
|
10398
|
-
* @param {object[] | string} children
|
|
10399
|
-
* @param {number} length
|
|
10400
|
-
*/
|
|
10401
|
-
function node(value, root, parent, type, props, children, length) {
|
|
10402
|
-
return {
|
|
10403
|
-
value,
|
|
10404
|
-
root,
|
|
10405
|
-
parent,
|
|
10406
|
-
type,
|
|
10407
|
-
props,
|
|
10408
|
-
children,
|
|
10409
|
-
line,
|
|
10410
|
-
column,
|
|
10411
|
-
length,
|
|
10412
|
-
return: ""
|
|
10413
|
-
};
|
|
10414
|
-
}
|
|
10415
|
-
/**
|
|
10416
|
-
* @param {object} root
|
|
10417
|
-
* @param {object} props
|
|
10418
|
-
* @return {object}
|
|
10419
|
-
*/
|
|
10420
|
-
function copy(root, props) {
|
|
10421
|
-
return assign(node("", null, null, "", null, null, 0), root, { length: -root.length }, props);
|
|
10422
|
-
}
|
|
10423
|
-
/**
|
|
10424
|
-
* @return {number}
|
|
10425
|
-
*/
|
|
10426
|
-
function char() {
|
|
10427
|
-
return character;
|
|
10428
|
-
}
|
|
10429
|
-
/**
|
|
10430
|
-
* @return {number}
|
|
10431
|
-
*/
|
|
10432
|
-
function prev() {
|
|
10433
|
-
character = position > 0 ? charat(characters, --position) : 0;
|
|
10434
|
-
if (column--, character === 10) column = 1, line--;
|
|
10435
|
-
return character;
|
|
10436
|
-
}
|
|
10437
|
-
/**
|
|
10438
|
-
* @return {number}
|
|
10439
|
-
*/
|
|
10440
|
-
function next() {
|
|
10441
|
-
character = position < length ? charat(characters, position++) : 0;
|
|
10442
|
-
if (column++, character === 10) column = 1, line++;
|
|
10443
|
-
return character;
|
|
10444
|
-
}
|
|
10445
|
-
/**
|
|
10446
|
-
* @return {number}
|
|
10447
|
-
*/
|
|
10448
|
-
function peek() {
|
|
10449
|
-
return charat(characters, position);
|
|
10450
|
-
}
|
|
10451
|
-
/**
|
|
10452
|
-
* @return {number}
|
|
10453
|
-
*/
|
|
10454
|
-
function caret() {
|
|
10455
|
-
return position;
|
|
10456
|
-
}
|
|
10457
|
-
/**
|
|
10458
|
-
* @param {number} begin
|
|
10459
|
-
* @param {number} end
|
|
10460
|
-
* @return {string}
|
|
10461
|
-
*/
|
|
10462
|
-
function slice(begin, end) {
|
|
10463
|
-
return substr(characters, begin, end);
|
|
10464
|
-
}
|
|
10465
|
-
/**
|
|
10466
|
-
* @param {number} type
|
|
10467
|
-
* @return {number}
|
|
10468
|
-
*/
|
|
10469
|
-
function token(type) {
|
|
10470
|
-
switch (type) {
|
|
10471
|
-
case 0:
|
|
10472
|
-
case 9:
|
|
10473
|
-
case 10:
|
|
10474
|
-
case 13:
|
|
10475
|
-
case 32: return 5;
|
|
10476
|
-
case 33:
|
|
10477
|
-
case 43:
|
|
10478
|
-
case 44:
|
|
10479
|
-
case 47:
|
|
10480
|
-
case 62:
|
|
10481
|
-
case 64:
|
|
10482
|
-
case 126:
|
|
10483
|
-
case 59:
|
|
10484
|
-
case 123:
|
|
10485
|
-
case 125: return 4;
|
|
10486
|
-
case 58: return 3;
|
|
10487
|
-
case 34:
|
|
10488
|
-
case 39:
|
|
10489
|
-
case 40:
|
|
10490
|
-
case 91: return 2;
|
|
10491
|
-
case 41:
|
|
10492
|
-
case 93: return 1;
|
|
10493
|
-
}
|
|
10494
|
-
return 0;
|
|
10495
|
-
}
|
|
10496
|
-
/**
|
|
10497
|
-
* @param {string} value
|
|
10498
|
-
* @return {any[]}
|
|
10499
|
-
*/
|
|
10500
|
-
function alloc(value) {
|
|
10501
|
-
return line = column = 1, length = strlen(characters = value), position = 0, [];
|
|
10502
|
-
}
|
|
10503
|
-
/**
|
|
10504
|
-
* @param {any} value
|
|
10505
|
-
* @return {any}
|
|
10506
|
-
*/
|
|
10507
|
-
function dealloc(value) {
|
|
10508
|
-
return characters = "", value;
|
|
10509
|
-
}
|
|
10510
|
-
/**
|
|
10511
|
-
* @param {number} type
|
|
10512
|
-
* @return {string}
|
|
10513
|
-
*/
|
|
10514
|
-
function delimit(type) {
|
|
10515
|
-
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
|
|
10516
|
-
}
|
|
10517
|
-
/**
|
|
10518
|
-
* @param {number} type
|
|
10519
|
-
* @return {string}
|
|
10520
|
-
*/
|
|
10521
|
-
function whitespace(type) {
|
|
10522
|
-
while (character = peek()) if (character < 33) next();
|
|
10523
|
-
else break;
|
|
10524
|
-
return token(type) > 2 || token(character) > 3 ? "" : " ";
|
|
10525
|
-
}
|
|
10526
|
-
/**
|
|
10527
|
-
* @param {number} index
|
|
10528
|
-
* @param {number} count
|
|
10529
|
-
* @return {string}
|
|
10530
|
-
*/
|
|
10531
|
-
function escaping(index, count) {
|
|
10532
|
-
while (--count && next()) if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97) break;
|
|
10533
|
-
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
|
|
10534
|
-
}
|
|
10535
|
-
/**
|
|
10536
|
-
* @param {number} type
|
|
10537
|
-
* @return {number}
|
|
10538
|
-
*/
|
|
10539
|
-
function delimiter(type) {
|
|
10540
|
-
while (next()) switch (character) {
|
|
10541
|
-
case type: return position;
|
|
10542
|
-
case 34:
|
|
10543
|
-
case 39:
|
|
10544
|
-
if (type !== 34 && type !== 39) delimiter(character);
|
|
10545
|
-
break;
|
|
10546
|
-
case 40:
|
|
10547
|
-
if (type === 41) delimiter(type);
|
|
10548
|
-
break;
|
|
10549
|
-
case 92: next();
|
|
10550
|
-
}
|
|
10551
|
-
return position;
|
|
10552
|
-
}
|
|
10553
|
-
/**
|
|
10554
|
-
* @param {number} type
|
|
10555
|
-
* @param {number} index
|
|
10556
|
-
* @return {number}
|
|
10557
|
-
*/
|
|
10558
|
-
function commenter(type, index) {
|
|
10559
|
-
while (next()) if (type + character === 57) break;
|
|
10560
|
-
else if (type + character === 84 && peek() === 47) break;
|
|
10561
|
-
return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
|
|
10562
|
-
}
|
|
10563
|
-
/**
|
|
10564
|
-
* @param {number} index
|
|
10565
|
-
* @return {string}
|
|
10566
|
-
*/
|
|
10567
|
-
function identifier(index) {
|
|
10568
|
-
while (!token(peek())) next();
|
|
10569
|
-
return slice(index, position);
|
|
10570
|
-
}
|
|
10571
|
-
// ../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js
|
|
10572
|
-
/**
|
|
10573
|
-
* @param {string} value
|
|
10574
|
-
* @return {object[]}
|
|
10575
|
-
*/
|
|
10576
|
-
function compile(value) {
|
|
10577
|
-
return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
|
|
10578
|
-
}
|
|
10579
|
-
/**
|
|
10580
|
-
* @param {string} value
|
|
10581
|
-
* @param {object} root
|
|
10582
|
-
* @param {object?} parent
|
|
10583
|
-
* @param {string[]} rule
|
|
10584
|
-
* @param {string[]} rules
|
|
10585
|
-
* @param {string[]} rulesets
|
|
10586
|
-
* @param {number[]} pseudo
|
|
10587
|
-
* @param {number[]} points
|
|
10588
|
-
* @param {string[]} declarations
|
|
10589
|
-
* @return {object}
|
|
10590
|
-
*/
|
|
10591
|
-
function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
10592
|
-
var index = 0;
|
|
10593
|
-
var offset = 0;
|
|
10594
|
-
var length = pseudo;
|
|
10595
|
-
var atrule = 0;
|
|
10596
|
-
var property = 0;
|
|
10597
|
-
var previous = 0;
|
|
10598
|
-
var variable = 1;
|
|
10599
|
-
var scanning = 1;
|
|
10600
|
-
var ampersand = 1;
|
|
10601
|
-
var character = 0;
|
|
10602
|
-
var type = "";
|
|
10603
|
-
var props = rules;
|
|
10604
|
-
var children = rulesets;
|
|
10605
|
-
var reference = rule;
|
|
10606
|
-
var characters = type;
|
|
10607
|
-
while (scanning) switch (previous = character, character = next()) {
|
|
10608
|
-
case 40: if (previous != 108 && charat(characters, length - 1) == 58) {
|
|
10609
|
-
if (indexof(characters += replace(delimit(character), "&", "&\f"), "&\f") != -1) ampersand = -1;
|
|
10610
|
-
break;
|
|
10611
|
-
}
|
|
10612
|
-
case 34:
|
|
10613
|
-
case 39:
|
|
10614
|
-
case 91:
|
|
10615
|
-
characters += delimit(character);
|
|
10616
|
-
break;
|
|
10617
|
-
case 9:
|
|
10618
|
-
case 10:
|
|
10619
|
-
case 13:
|
|
10620
|
-
case 32:
|
|
10621
|
-
characters += whitespace(previous);
|
|
10622
|
-
break;
|
|
10623
|
-
case 92:
|
|
10624
|
-
characters += escaping(caret() - 1, 7);
|
|
10625
|
-
continue;
|
|
10626
|
-
case 47:
|
|
10627
|
-
switch (peek()) {
|
|
10628
|
-
case 42:
|
|
10629
|
-
case 47:
|
|
10630
|
-
append(comment(commenter(next(), caret()), root, parent), declarations);
|
|
10631
|
-
break;
|
|
10632
|
-
default: characters += "/";
|
|
10633
|
-
}
|
|
10634
|
-
break;
|
|
10635
|
-
case 123 * variable: points[index++] = strlen(characters) * ampersand;
|
|
10636
|
-
case 125 * variable:
|
|
10637
|
-
case 59:
|
|
10638
|
-
case 0:
|
|
10639
|
-
switch (character) {
|
|
10640
|
-
case 0:
|
|
10641
|
-
case 125: scanning = 0;
|
|
10642
|
-
case 59 + offset:
|
|
10643
|
-
if (ampersand == -1) characters = replace(characters, /\f/g, "");
|
|
10644
|
-
if (property > 0 && strlen(characters) - length) append(property > 32 ? declaration(characters + ";", rule, parent, length - 1) : declaration(replace(characters, " ", "") + ";", rule, parent, length - 2), declarations);
|
|
10645
|
-
break;
|
|
10646
|
-
case 59: characters += ";";
|
|
10647
|
-
default:
|
|
10648
|
-
append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets);
|
|
10649
|
-
if (character === 123) if (offset === 0) parse(characters, root, reference, reference, props, rulesets, length, points, children);
|
|
10650
|
-
else switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
|
10651
|
-
case 100:
|
|
10652
|
-
case 108:
|
|
10653
|
-
case 109:
|
|
10654
|
-
case 115:
|
|
10655
|
-
parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children);
|
|
10656
|
-
break;
|
|
10657
|
-
default: parse(characters, reference, reference, reference, [""], children, 0, points, children);
|
|
10658
|
-
}
|
|
10659
|
-
}
|
|
10660
|
-
index = offset = property = 0, variable = ampersand = 1, type = characters = "", length = pseudo;
|
|
10661
|
-
break;
|
|
10662
|
-
case 58: length = 1 + strlen(characters), property = previous;
|
|
10663
|
-
default:
|
|
10664
|
-
if (variable < 1) {
|
|
10665
|
-
if (character == 123) --variable;
|
|
10666
|
-
else if (character == 125 && variable++ == 0 && prev() == 125) continue;
|
|
10667
|
-
}
|
|
10668
|
-
switch (characters += from(character), character * variable) {
|
|
10669
|
-
case 38:
|
|
10670
|
-
ampersand = offset > 0 ? 1 : (characters += "\f", -1);
|
|
10671
|
-
break;
|
|
10672
|
-
case 44:
|
|
10673
|
-
points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1;
|
|
10674
|
-
break;
|
|
10675
|
-
case 64:
|
|
10676
|
-
if (peek() === 45) characters += delimit(next());
|
|
10677
|
-
atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++;
|
|
10678
|
-
break;
|
|
10679
|
-
case 45: if (previous === 45 && strlen(characters) == 2) variable = 0;
|
|
10680
|
-
}
|
|
10681
|
-
}
|
|
10682
|
-
return rulesets;
|
|
10683
|
-
}
|
|
10684
|
-
/**
|
|
10685
|
-
* @param {string} value
|
|
10686
|
-
* @param {object} root
|
|
10687
|
-
* @param {object?} parent
|
|
10688
|
-
* @param {number} index
|
|
10689
|
-
* @param {number} offset
|
|
10690
|
-
* @param {string[]} rules
|
|
10691
|
-
* @param {number[]} points
|
|
10692
|
-
* @param {string} type
|
|
10693
|
-
* @param {string[]} props
|
|
10694
|
-
* @param {string[]} children
|
|
10695
|
-
* @param {number} length
|
|
10696
|
-
* @return {object}
|
|
10697
|
-
*/
|
|
10698
|
-
function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length) {
|
|
10699
|
-
var post = offset - 1;
|
|
10700
|
-
var rule = offset === 0 ? rules : [""];
|
|
10701
|
-
var size = sizeof(rule);
|
|
10702
|
-
for (var i = 0, j = 0, k = 0; i < index; ++i) for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x]))) props[k++] = z;
|
|
10703
|
-
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length);
|
|
10704
|
-
}
|
|
10705
|
-
/**
|
|
10706
|
-
* @param {number} value
|
|
10707
|
-
* @param {object} root
|
|
10708
|
-
* @param {object?} parent
|
|
10709
|
-
* @return {object}
|
|
10710
|
-
*/
|
|
10711
|
-
function comment(value, root, parent) {
|
|
10712
|
-
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0);
|
|
10713
|
-
}
|
|
10714
|
-
/**
|
|
10715
|
-
* @param {string} value
|
|
10716
|
-
* @param {object} root
|
|
10717
|
-
* @param {object?} parent
|
|
10718
|
-
* @param {number} length
|
|
10719
|
-
* @return {object}
|
|
10720
|
-
*/
|
|
10721
|
-
function declaration(value, root, parent, length) {
|
|
10722
|
-
return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length);
|
|
10723
|
-
}
|
|
10724
|
-
// ../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js
|
|
10725
|
-
/**
|
|
10726
|
-
* @param {object[]} children
|
|
10727
|
-
* @param {function} callback
|
|
10728
|
-
* @return {string}
|
|
10729
|
-
*/
|
|
10730
|
-
function serialize(children, callback) {
|
|
10731
|
-
var output = "";
|
|
10732
|
-
var length = sizeof(children);
|
|
10733
|
-
for (var i = 0; i < length; i++) output += callback(children[i], i, children, callback) || "";
|
|
10734
|
-
return output;
|
|
10735
|
-
}
|
|
10736
|
-
/**
|
|
10737
|
-
* @param {object} element
|
|
10738
|
-
* @param {number} index
|
|
10739
|
-
* @param {object[]} children
|
|
10740
|
-
* @param {function} callback
|
|
10741
|
-
* @return {string}
|
|
10742
|
-
*/
|
|
10743
|
-
function stringify(element, index, children, callback) {
|
|
10744
|
-
switch (element.type) {
|
|
10745
|
-
case LAYER: if (element.children.length) break;
|
|
10746
|
-
case IMPORT:
|
|
10747
|
-
case DECLARATION: return element.return = element.return || element.value;
|
|
10748
|
-
case COMMENT: return "";
|
|
10749
|
-
case KEYFRAMES: return element.return = element.value + "{" + serialize(element.children, callback) + "}";
|
|
10750
|
-
case RULESET: element.value = element.props.join(",");
|
|
10751
|
-
}
|
|
10752
|
-
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
|
|
10753
|
-
}
|
|
10754
|
-
// ../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js
|
|
10755
|
-
/**
|
|
10756
|
-
* @param {function[]} collection
|
|
10757
|
-
* @return {function}
|
|
10758
|
-
*/
|
|
10759
|
-
function middleware(collection) {
|
|
10760
|
-
var length = sizeof(collection);
|
|
10761
|
-
return function(element, index, children, callback) {
|
|
10762
|
-
var output = "";
|
|
10763
|
-
for (var i = 0; i < length; i++) output += collection[i](element, index, children, callback) || "";
|
|
10764
|
-
return output;
|
|
10765
|
-
};
|
|
10766
|
-
}
|
|
10767
|
-
/**
|
|
10768
|
-
* @param {function} callback
|
|
10769
|
-
* @return {function}
|
|
10770
|
-
*/
|
|
10771
|
-
function rulesheet(callback) {
|
|
10772
|
-
return function(element) {
|
|
10773
|
-
if (!element.root) {
|
|
10774
|
-
if (element = element.return) callback(element);
|
|
10775
|
-
}
|
|
10776
|
-
};
|
|
10777
|
-
}
|
|
10778
|
-
// ../../../node_modules/.pnpm/@emotion+weak-memoize@0.4.0/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
|
|
10779
|
-
var weakMemoize = function weakMemoize(func) {
|
|
10780
|
-
var cache = /* @__PURE__ */ new WeakMap();
|
|
10781
|
-
return function(arg) {
|
|
10782
|
-
if (cache.has(arg)) return cache.get(arg);
|
|
10783
|
-
var ret = func(arg);
|
|
10784
|
-
cache.set(arg, ret);
|
|
10785
|
-
return ret;
|
|
10786
|
-
};
|
|
10787
|
-
};
|
|
10788
|
-
// ../../../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
10789
|
-
function memoize(fn) {
|
|
10790
|
-
var cache = Object.create(null);
|
|
10791
|
-
return function(arg) {
|
|
10792
|
-
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
10793
|
-
return cache[arg];
|
|
10794
|
-
};
|
|
10795
|
-
}
|
|
10796
|
-
// ../../../node_modules/.pnpm/@emotion+cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.esm.js
|
|
10797
|
-
var isBrowser$2 = typeof document !== "undefined";
|
|
10798
|
-
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
10799
|
-
var previous = 0;
|
|
10800
|
-
var character = 0;
|
|
10801
|
-
while (true) {
|
|
10802
|
-
previous = character;
|
|
10803
|
-
character = peek();
|
|
10804
|
-
if (previous === 38 && character === 12) points[index] = 1;
|
|
10805
|
-
if (token(character)) break;
|
|
10806
|
-
next();
|
|
10807
|
-
}
|
|
10808
|
-
return slice(begin, position);
|
|
10809
|
-
};
|
|
10810
|
-
var toRules = function toRules(parsed, points) {
|
|
10811
|
-
var index = -1;
|
|
10812
|
-
var character = 44;
|
|
10813
|
-
do
|
|
10814
|
-
switch (token(character)) {
|
|
10815
|
-
case 0:
|
|
10816
|
-
if (character === 38 && peek() === 12) points[index] = 1;
|
|
10817
|
-
parsed[index] += identifierWithPointTracking(position - 1, points, index);
|
|
10818
|
-
break;
|
|
10819
|
-
case 2:
|
|
10820
|
-
parsed[index] += delimit(character);
|
|
10821
|
-
break;
|
|
10822
|
-
case 4: if (character === 44) {
|
|
10823
|
-
parsed[++index] = peek() === 58 ? "&\f" : "";
|
|
10824
|
-
points[index] = parsed[index].length;
|
|
10825
|
-
break;
|
|
10826
|
-
}
|
|
10827
|
-
default: parsed[index] += from(character);
|
|
10828
|
-
}
|
|
10829
|
-
while (character = next());
|
|
10830
|
-
return parsed;
|
|
10831
|
-
};
|
|
10832
|
-
var getRules = function getRules(value, points) {
|
|
10833
|
-
return dealloc(toRules(alloc(value), points));
|
|
10834
|
-
};
|
|
10835
|
-
var fixedElements = /* #__PURE__ */ new WeakMap();
|
|
10836
|
-
var compat = function compat(element) {
|
|
10837
|
-
if (element.type !== "rule" || !element.parent || element.length < 1) return;
|
|
10838
|
-
var value = element.value;
|
|
10839
|
-
var parent = element.parent;
|
|
10840
|
-
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
10841
|
-
while (parent.type !== "rule") {
|
|
10842
|
-
parent = parent.parent;
|
|
10843
|
-
if (!parent) return;
|
|
10844
|
-
}
|
|
10845
|
-
if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) return;
|
|
10846
|
-
if (isImplicitRule) return;
|
|
10847
|
-
fixedElements.set(element, true);
|
|
10848
|
-
var points = [];
|
|
10849
|
-
var rules = getRules(value, points);
|
|
10850
|
-
var parentRules = parent.props;
|
|
10851
|
-
for (var i = 0, k = 0; i < rules.length; i++) for (var j = 0; j < parentRules.length; j++, k++) element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
|
10852
|
-
};
|
|
10853
|
-
var removeLabel = function removeLabel(element) {
|
|
10854
|
-
if (element.type === "decl") {
|
|
10855
|
-
var value = element.value;
|
|
10856
|
-
if (value.charCodeAt(0) === 108 && value.charCodeAt(2) === 98) {
|
|
10857
|
-
element["return"] = "";
|
|
10858
|
-
element.value = "";
|
|
10859
|
-
}
|
|
10860
|
-
}
|
|
10861
|
-
};
|
|
10862
|
-
function prefix(value, length) {
|
|
10863
|
-
switch (hash(value, length)) {
|
|
10864
|
-
case 5103: return WEBKIT + "print-" + value + value;
|
|
10865
|
-
case 5737:
|
|
10866
|
-
case 4201:
|
|
10867
|
-
case 3177:
|
|
10868
|
-
case 3433:
|
|
10869
|
-
case 1641:
|
|
10870
|
-
case 4457:
|
|
10871
|
-
case 2921:
|
|
10872
|
-
case 5572:
|
|
10873
|
-
case 6356:
|
|
10874
|
-
case 5844:
|
|
10875
|
-
case 3191:
|
|
10876
|
-
case 6645:
|
|
10877
|
-
case 3005:
|
|
10878
|
-
case 6391:
|
|
10879
|
-
case 5879:
|
|
10880
|
-
case 5623:
|
|
10881
|
-
case 6135:
|
|
10882
|
-
case 4599:
|
|
10883
|
-
case 4855:
|
|
10884
|
-
case 4215:
|
|
10885
|
-
case 6389:
|
|
10886
|
-
case 5109:
|
|
10887
|
-
case 5365:
|
|
10888
|
-
case 5621:
|
|
10889
|
-
case 3829: return WEBKIT + value + value;
|
|
10890
|
-
case 5349:
|
|
10891
|
-
case 4246:
|
|
10892
|
-
case 4810:
|
|
10893
|
-
case 6968:
|
|
10894
|
-
case 2756: return WEBKIT + value + MOZ + value + MS + value + value;
|
|
10895
|
-
case 6828:
|
|
10896
|
-
case 4268: return WEBKIT + value + MS + value + value;
|
|
10897
|
-
case 6165: return WEBKIT + value + MS + "flex-" + value + value;
|
|
10898
|
-
case 5187: return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
|
|
10899
|
-
case 5443: return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
|
|
10900
|
-
case 4675: return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
|
|
10901
|
-
case 5548: return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
|
|
10902
|
-
case 5292: return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
|
|
10903
|
-
case 6060: return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
|
|
10904
|
-
case 4554: return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
|
|
10905
|
-
case 6187: return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
|
|
10906
|
-
case 5495:
|
|
10907
|
-
case 3959: return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
|
|
10908
|
-
case 4968: return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
|
|
10909
|
-
case 4095:
|
|
10910
|
-
case 3583:
|
|
10911
|
-
case 4068:
|
|
10912
|
-
case 2532: return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
|
|
10913
|
-
case 8116:
|
|
10914
|
-
case 7059:
|
|
10915
|
-
case 5753:
|
|
10916
|
-
case 5535:
|
|
10917
|
-
case 5445:
|
|
10918
|
-
case 5701:
|
|
10919
|
-
case 4933:
|
|
10920
|
-
case 4677:
|
|
10921
|
-
case 5533:
|
|
10922
|
-
case 5789:
|
|
10923
|
-
case 5021:
|
|
10924
|
-
case 4765:
|
|
10925
|
-
if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
|
|
10926
|
-
case 109: if (charat(value, length + 4) !== 45) break;
|
|
10927
|
-
case 102: return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length + 3) == 108 ? "$3" : "$2-$3")) + value;
|
|
10928
|
-
case 115: return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length) + value : value;
|
|
10929
|
-
}
|
|
10930
|
-
break;
|
|
10931
|
-
case 4949: if (charat(value, length + 1) !== 115) break;
|
|
10932
|
-
case 6444:
|
|
10933
|
-
switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
|
|
10934
|
-
case 107: return replace(value, ":", ":" + WEBKIT) + value;
|
|
10935
|
-
case 101: return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
|
|
10936
|
-
}
|
|
10937
|
-
break;
|
|
10938
|
-
case 5936:
|
|
10939
|
-
switch (charat(value, length + 11)) {
|
|
10940
|
-
case 114: return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
|
|
10941
|
-
case 108: return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
|
|
10942
|
-
case 45: return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
|
|
10943
|
-
}
|
|
10944
|
-
return WEBKIT + value + MS + value + value;
|
|
10945
|
-
}
|
|
10946
|
-
return value;
|
|
9929
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
|
|
9930
|
+
var import_es6 = /* @__PURE__ */ __toESM(require_es6(), 1);
|
|
9931
|
+
var ComponentsContext = (0, react.createContext)({});
|
|
9932
|
+
ComponentsContext.displayName = "ComponentsContext";
|
|
9933
|
+
var useComponentsContext = () => (0, react.useContext)(ComponentsContext);
|
|
9934
|
+
function useContextSystemBridge({ value }) {
|
|
9935
|
+
const parentContext = useComponentsContext();
|
|
9936
|
+
const valueRef = (0, react.useRef)(value);
|
|
9937
|
+
use_update_effect_default(() => {
|
|
9938
|
+
if ((0, import_es6.default)(valueRef.current, value) && valueRef.current !== value) warning(`Please memoize your context: ${JSON.stringify(value)}`);
|
|
9939
|
+
}, [value]);
|
|
9940
|
+
return (0, react.useMemo)(() => {
|
|
9941
|
+
return (0, deepmerge.default)(parentContext ?? {}, value ?? {}, { isMergeableObject: isPlainObject });
|
|
9942
|
+
}, [parentContext, value]);
|
|
10947
9943
|
}
|
|
10948
|
-
var
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
break;
|
|
10954
|
-
case KEYFRAMES: return serialize([copy(element, { value: replace(element.value, "@", "@" + WEBKIT) })], callback);
|
|
10955
|
-
case RULESET: if (element.length) return combine(element.props, function(value) {
|
|
10956
|
-
switch (match(value, /(::plac\w+|:read-\w+)/)) {
|
|
10957
|
-
case ":read-only":
|
|
10958
|
-
case ":read-write": return serialize([copy(element, { props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")] })], callback);
|
|
10959
|
-
case "::placeholder": return serialize([
|
|
10960
|
-
copy(element, { props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")] }),
|
|
10961
|
-
copy(element, { props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")] }),
|
|
10962
|
-
copy(element, { props: [replace(value, /:(plac\w+)/, MS + "input-$1")] })
|
|
10963
|
-
], callback);
|
|
10964
|
-
}
|
|
10965
|
-
return "";
|
|
10966
|
-
});
|
|
10967
|
-
}
|
|
10968
|
-
}
|
|
10969
|
-
};
|
|
10970
|
-
var getServerStylisCache = isBrowser$2 ? void 0 : weakMemoize(function() {
|
|
10971
|
-
return memoize(function() {
|
|
10972
|
-
return {};
|
|
9944
|
+
var BaseContextSystemProvider = ({ children, value }) => {
|
|
9945
|
+
const contextValue = useContextSystemBridge({ value });
|
|
9946
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComponentsContext.Provider, {
|
|
9947
|
+
value: contextValue,
|
|
9948
|
+
children
|
|
10973
9949
|
});
|
|
10974
|
-
});
|
|
10975
|
-
var defaultStylisPlugins = [prefixer];
|
|
10976
|
-
var createCache = function createCache(options) {
|
|
10977
|
-
var key = options.key;
|
|
10978
|
-
if (isBrowser$2 && key === "css") {
|
|
10979
|
-
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
10980
|
-
Array.prototype.forEach.call(ssrStyles, function(node) {
|
|
10981
|
-
if (node.getAttribute("data-emotion").indexOf(" ") === -1) return;
|
|
10982
|
-
document.head.appendChild(node);
|
|
10983
|
-
node.setAttribute("data-s", "");
|
|
10984
|
-
});
|
|
10985
|
-
}
|
|
10986
|
-
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
|
10987
|
-
var inserted = {};
|
|
10988
|
-
var container;
|
|
10989
|
-
var nodesToHydrate = [];
|
|
10990
|
-
if (isBrowser$2) {
|
|
10991
|
-
container = options.container || document.head;
|
|
10992
|
-
Array.prototype.forEach.call(document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function(node) {
|
|
10993
|
-
var attrib = node.getAttribute("data-emotion").split(" ");
|
|
10994
|
-
for (var i = 1; i < attrib.length; i++) inserted[attrib[i]] = true;
|
|
10995
|
-
nodesToHydrate.push(node);
|
|
10996
|
-
});
|
|
10997
|
-
}
|
|
10998
|
-
var _insert;
|
|
10999
|
-
var omnipresentPlugins = [compat, removeLabel];
|
|
11000
|
-
if (!getServerStylisCache) {
|
|
11001
|
-
var currentSheet;
|
|
11002
|
-
var finalizingPlugins = [stringify, rulesheet(function(rule) {
|
|
11003
|
-
currentSheet.insert(rule);
|
|
11004
|
-
})];
|
|
11005
|
-
var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
11006
|
-
var stylis = function stylis(styles) {
|
|
11007
|
-
return serialize(compile(styles), serializer);
|
|
11008
|
-
};
|
|
11009
|
-
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
11010
|
-
currentSheet = sheet;
|
|
11011
|
-
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
11012
|
-
if (shouldCache) cache.inserted[serialized.name] = true;
|
|
11013
|
-
};
|
|
11014
|
-
} else {
|
|
11015
|
-
var _finalizingPlugins = [stringify];
|
|
11016
|
-
var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
|
|
11017
|
-
var _stylis = function _stylis(styles) {
|
|
11018
|
-
return serialize(compile(styles), _serializer);
|
|
11019
|
-
};
|
|
11020
|
-
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
11021
|
-
var getRules = function getRules(selector, serialized) {
|
|
11022
|
-
var name = serialized.name;
|
|
11023
|
-
if (serverStylisCache[name] === void 0) serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
11024
|
-
return serverStylisCache[name];
|
|
11025
|
-
};
|
|
11026
|
-
_insert = function _insert(selector, serialized, sheet, shouldCache) {
|
|
11027
|
-
var name = serialized.name;
|
|
11028
|
-
var rules = getRules(selector, serialized);
|
|
11029
|
-
if (cache.compat === void 0) {
|
|
11030
|
-
if (shouldCache) cache.inserted[name] = true;
|
|
11031
|
-
return rules;
|
|
11032
|
-
} else if (shouldCache) cache.inserted[name] = rules;
|
|
11033
|
-
else return rules;
|
|
11034
|
-
};
|
|
11035
|
-
}
|
|
11036
|
-
var cache = {
|
|
11037
|
-
key,
|
|
11038
|
-
sheet: new StyleSheet({
|
|
11039
|
-
key,
|
|
11040
|
-
container,
|
|
11041
|
-
nonce: options.nonce,
|
|
11042
|
-
speedy: options.speedy,
|
|
11043
|
-
prepend: options.prepend,
|
|
11044
|
-
insertionPoint: options.insertionPoint
|
|
11045
|
-
}),
|
|
11046
|
-
nonce: options.nonce,
|
|
11047
|
-
inserted,
|
|
11048
|
-
registered: {},
|
|
11049
|
-
insert: _insert
|
|
11050
|
-
};
|
|
11051
|
-
cache.sheet.hydrate(nodesToHydrate);
|
|
11052
|
-
return cache;
|
|
11053
|
-
};
|
|
11054
|
-
// ../../../node_modules/.pnpm/@emotion+utils@1.4.2/node_modules/@emotion/utils/dist/emotion-utils.esm.js
|
|
11055
|
-
var isBrowser$1 = typeof document !== "undefined";
|
|
11056
|
-
function getRegisteredStyles$1(registered, registeredStyles, classNames) {
|
|
11057
|
-
var rawClassName = "";
|
|
11058
|
-
classNames.split(" ").forEach(function(className) {
|
|
11059
|
-
if (registered[className] !== void 0) registeredStyles.push(registered[className] + ";");
|
|
11060
|
-
else if (className) rawClassName += className + " ";
|
|
11061
|
-
});
|
|
11062
|
-
return rawClassName;
|
|
11063
|
-
}
|
|
11064
|
-
var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
|
11065
|
-
var className = cache.key + "-" + serialized.name;
|
|
11066
|
-
if ((isStringTag === false || isBrowser$1 === false && cache.compat !== void 0) && cache.registered[className] === void 0) cache.registered[className] = serialized.styles;
|
|
11067
|
-
};
|
|
11068
|
-
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
11069
|
-
registerStyles(cache, serialized, isStringTag);
|
|
11070
|
-
var className = cache.key + "-" + serialized.name;
|
|
11071
|
-
if (cache.inserted[serialized.name] === void 0) {
|
|
11072
|
-
var stylesForSSR = "";
|
|
11073
|
-
var current = serialized;
|
|
11074
|
-
do {
|
|
11075
|
-
var maybeStyles = cache.insert(serialized === current ? "." + className : "", current, cache.sheet, true);
|
|
11076
|
-
if (!isBrowser$1 && maybeStyles !== void 0) stylesForSSR += maybeStyles;
|
|
11077
|
-
current = current.next;
|
|
11078
|
-
} while (current !== void 0);
|
|
11079
|
-
if (!isBrowser$1 && stylesForSSR.length !== 0) return stylesForSSR;
|
|
11080
|
-
}
|
|
11081
|
-
};
|
|
11082
|
-
// ../../../node_modules/.pnpm/@emotion+hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js
|
|
11083
|
-
function murmur2(str) {
|
|
11084
|
-
var h = 0;
|
|
11085
|
-
var k, i = 0, len = str.length;
|
|
11086
|
-
for (; len >= 4; ++i, len -= 4) {
|
|
11087
|
-
k = str.charCodeAt(i) & 255 | (str.charCodeAt(++i) & 255) << 8 | (str.charCodeAt(++i) & 255) << 16 | (str.charCodeAt(++i) & 255) << 24;
|
|
11088
|
-
k = (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16);
|
|
11089
|
-
k ^= k >>> 24;
|
|
11090
|
-
h = (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
11091
|
-
}
|
|
11092
|
-
switch (len) {
|
|
11093
|
-
case 3: h ^= (str.charCodeAt(i + 2) & 255) << 16;
|
|
11094
|
-
case 2: h ^= (str.charCodeAt(i + 1) & 255) << 8;
|
|
11095
|
-
case 1:
|
|
11096
|
-
h ^= str.charCodeAt(i) & 255;
|
|
11097
|
-
h = (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
11098
|
-
}
|
|
11099
|
-
h ^= h >>> 13;
|
|
11100
|
-
h = (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
11101
|
-
return ((h ^ h >>> 15) >>> 0).toString(36);
|
|
11102
|
-
}
|
|
11103
|
-
// ../../../node_modules/.pnpm/@emotion+unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
|
|
11104
|
-
var unitlessKeys = {
|
|
11105
|
-
animationIterationCount: 1,
|
|
11106
|
-
aspectRatio: 1,
|
|
11107
|
-
borderImageOutset: 1,
|
|
11108
|
-
borderImageSlice: 1,
|
|
11109
|
-
borderImageWidth: 1,
|
|
11110
|
-
boxFlex: 1,
|
|
11111
|
-
boxFlexGroup: 1,
|
|
11112
|
-
boxOrdinalGroup: 1,
|
|
11113
|
-
columnCount: 1,
|
|
11114
|
-
columns: 1,
|
|
11115
|
-
flex: 1,
|
|
11116
|
-
flexGrow: 1,
|
|
11117
|
-
flexPositive: 1,
|
|
11118
|
-
flexShrink: 1,
|
|
11119
|
-
flexNegative: 1,
|
|
11120
|
-
flexOrder: 1,
|
|
11121
|
-
gridRow: 1,
|
|
11122
|
-
gridRowEnd: 1,
|
|
11123
|
-
gridRowSpan: 1,
|
|
11124
|
-
gridRowStart: 1,
|
|
11125
|
-
gridColumn: 1,
|
|
11126
|
-
gridColumnEnd: 1,
|
|
11127
|
-
gridColumnSpan: 1,
|
|
11128
|
-
gridColumnStart: 1,
|
|
11129
|
-
msGridRow: 1,
|
|
11130
|
-
msGridRowSpan: 1,
|
|
11131
|
-
msGridColumn: 1,
|
|
11132
|
-
msGridColumnSpan: 1,
|
|
11133
|
-
fontWeight: 1,
|
|
11134
|
-
lineHeight: 1,
|
|
11135
|
-
opacity: 1,
|
|
11136
|
-
order: 1,
|
|
11137
|
-
orphans: 1,
|
|
11138
|
-
scale: 1,
|
|
11139
|
-
tabSize: 1,
|
|
11140
|
-
widows: 1,
|
|
11141
|
-
zIndex: 1,
|
|
11142
|
-
zoom: 1,
|
|
11143
|
-
WebkitLineClamp: 1,
|
|
11144
|
-
fillOpacity: 1,
|
|
11145
|
-
floodOpacity: 1,
|
|
11146
|
-
stopOpacity: 1,
|
|
11147
|
-
strokeDasharray: 1,
|
|
11148
|
-
strokeDashoffset: 1,
|
|
11149
|
-
strokeMiterlimit: 1,
|
|
11150
|
-
strokeOpacity: 1,
|
|
11151
|
-
strokeWidth: 1
|
|
11152
|
-
};
|
|
11153
|
-
// ../../../node_modules/.pnpm/@emotion+serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js
|
|
11154
|
-
var isDevelopment = false;
|
|
11155
|
-
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
11156
|
-
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
11157
|
-
var isCustomProperty = function isCustomProperty(property) {
|
|
11158
|
-
return property.charCodeAt(1) === 45;
|
|
11159
|
-
};
|
|
11160
|
-
var isProcessableValue = function isProcessableValue(value) {
|
|
11161
|
-
return value != null && typeof value !== "boolean";
|
|
11162
|
-
};
|
|
11163
|
-
var processStyleName = /* #__PURE__ */ memoize(function(styleName) {
|
|
11164
|
-
return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, "-$&").toLowerCase();
|
|
11165
|
-
});
|
|
11166
|
-
var processStyleValue = function processStyleValue(key, value) {
|
|
11167
|
-
switch (key) {
|
|
11168
|
-
case "animation":
|
|
11169
|
-
case "animationName": if (typeof value === "string") return value.replace(animationRegex, function(match, p1, p2) {
|
|
11170
|
-
cursor = {
|
|
11171
|
-
name: p1,
|
|
11172
|
-
styles: p2,
|
|
11173
|
-
next: cursor
|
|
11174
|
-
};
|
|
11175
|
-
return p1;
|
|
11176
|
-
});
|
|
11177
|
-
}
|
|
11178
|
-
if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === "number" && value !== 0) return value + "px";
|
|
11179
|
-
return value;
|
|
11180
|
-
};
|
|
11181
|
-
var noComponentSelectorMessage = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
|
|
11182
|
-
function handleInterpolation(mergedProps, registered, interpolation) {
|
|
11183
|
-
if (interpolation == null) return "";
|
|
11184
|
-
var componentSelector = interpolation;
|
|
11185
|
-
if (componentSelector.__emotion_styles !== void 0) return componentSelector;
|
|
11186
|
-
switch (typeof interpolation) {
|
|
11187
|
-
case "boolean": return "";
|
|
11188
|
-
case "object":
|
|
11189
|
-
var keyframes = interpolation;
|
|
11190
|
-
if (keyframes.anim === 1) {
|
|
11191
|
-
cursor = {
|
|
11192
|
-
name: keyframes.name,
|
|
11193
|
-
styles: keyframes.styles,
|
|
11194
|
-
next: cursor
|
|
11195
|
-
};
|
|
11196
|
-
return keyframes.name;
|
|
11197
|
-
}
|
|
11198
|
-
var serializedStyles = interpolation;
|
|
11199
|
-
if (serializedStyles.styles !== void 0) {
|
|
11200
|
-
var next = serializedStyles.next;
|
|
11201
|
-
if (next !== void 0) while (next !== void 0) {
|
|
11202
|
-
cursor = {
|
|
11203
|
-
name: next.name,
|
|
11204
|
-
styles: next.styles,
|
|
11205
|
-
next: cursor
|
|
11206
|
-
};
|
|
11207
|
-
next = next.next;
|
|
11208
|
-
}
|
|
11209
|
-
return serializedStyles.styles + ";";
|
|
11210
|
-
}
|
|
11211
|
-
return createStringFromObject(mergedProps, registered, interpolation);
|
|
11212
|
-
case "function": if (mergedProps !== void 0) {
|
|
11213
|
-
var previousCursor = cursor;
|
|
11214
|
-
var result = interpolation(mergedProps);
|
|
11215
|
-
cursor = previousCursor;
|
|
11216
|
-
return handleInterpolation(mergedProps, registered, result);
|
|
11217
|
-
}
|
|
11218
|
-
}
|
|
11219
|
-
var asString = interpolation;
|
|
11220
|
-
if (registered == null) return asString;
|
|
11221
|
-
var cached = registered[asString];
|
|
11222
|
-
return cached !== void 0 ? cached : asString;
|
|
11223
|
-
}
|
|
11224
|
-
function createStringFromObject(mergedProps, registered, obj) {
|
|
11225
|
-
var string = "";
|
|
11226
|
-
if (Array.isArray(obj)) for (var i = 0; i < obj.length; i++) string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
11227
|
-
else for (var key in obj) {
|
|
11228
|
-
var value = obj[key];
|
|
11229
|
-
if (typeof value !== "object") {
|
|
11230
|
-
var asString = value;
|
|
11231
|
-
if (registered != null && registered[asString] !== void 0) string += key + "{" + registered[asString] + "}";
|
|
11232
|
-
else if (isProcessableValue(asString)) string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
|
|
11233
|
-
} else {
|
|
11234
|
-
if (key === "NO_COMPONENT_SELECTOR" && isDevelopment) throw new Error(noComponentSelectorMessage);
|
|
11235
|
-
if (Array.isArray(value) && typeof value[0] === "string" && (registered == null || registered[value[0]] === void 0)) {
|
|
11236
|
-
for (var _i = 0; _i < value.length; _i++) if (isProcessableValue(value[_i])) string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
|
|
11237
|
-
} else {
|
|
11238
|
-
var interpolated = handleInterpolation(mergedProps, registered, value);
|
|
11239
|
-
switch (key) {
|
|
11240
|
-
case "animation":
|
|
11241
|
-
case "animationName":
|
|
11242
|
-
string += processStyleName(key) + ":" + interpolated + ";";
|
|
11243
|
-
break;
|
|
11244
|
-
default: string += key + "{" + interpolated + "}";
|
|
11245
|
-
}
|
|
11246
|
-
}
|
|
11247
|
-
}
|
|
11248
|
-
}
|
|
11249
|
-
return string;
|
|
11250
|
-
}
|
|
11251
|
-
var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g;
|
|
11252
|
-
var cursor;
|
|
11253
|
-
function serializeStyles(args, registered, mergedProps) {
|
|
11254
|
-
if (args.length === 1 && typeof args[0] === "object" && args[0] !== null && args[0].styles !== void 0) return args[0];
|
|
11255
|
-
var stringMode = true;
|
|
11256
|
-
var styles = "";
|
|
11257
|
-
cursor = void 0;
|
|
11258
|
-
var strings = args[0];
|
|
11259
|
-
if (strings == null || strings.raw === void 0) {
|
|
11260
|
-
stringMode = false;
|
|
11261
|
-
styles += handleInterpolation(mergedProps, registered, strings);
|
|
11262
|
-
} else styles += strings[0];
|
|
11263
|
-
for (var i = 1; i < args.length; i++) {
|
|
11264
|
-
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
11265
|
-
if (stringMode) styles += strings[i];
|
|
11266
|
-
}
|
|
11267
|
-
labelPattern.lastIndex = 0;
|
|
11268
|
-
var identifierName = "";
|
|
11269
|
-
var match;
|
|
11270
|
-
while ((match = labelPattern.exec(styles)) !== null) identifierName += "-" + match[1];
|
|
11271
|
-
return {
|
|
11272
|
-
name: murmur2(styles) + identifierName,
|
|
11273
|
-
styles,
|
|
11274
|
-
next: cursor
|
|
11275
|
-
};
|
|
11276
|
-
}
|
|
11277
|
-
react["useInsertionEffect"] && react["useInsertionEffect"] || react.useLayoutEffect;
|
|
11278
|
-
// ../../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
11279
|
-
var isBrowser = typeof document !== "undefined";
|
|
11280
|
-
var EmotionCacheContext = /* #__PURE__ */ react.createContext(typeof HTMLElement !== "undefined" ? /* #__PURE__ */ createCache({ key: "css" }) : null);
|
|
11281
|
-
EmotionCacheContext.Provider;
|
|
11282
|
-
var __unsafe_useEmotionCache = function useEmotionCache() {
|
|
11283
|
-
return (0, react.useContext)(EmotionCacheContext);
|
|
11284
|
-
};
|
|
11285
|
-
if (!isBrowser);
|
|
11286
|
-
({}).hasOwnProperty;
|
|
11287
|
-
// ../../../node_modules/.pnpm/@emotion+css@11.13.5/node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js
|
|
11288
|
-
function insertWithoutScoping(cache, serialized) {
|
|
11289
|
-
if (cache.inserted[serialized.name] === void 0) return cache.insert("", serialized, cache.sheet, true);
|
|
11290
|
-
}
|
|
11291
|
-
function merge$1(registered, css, className) {
|
|
11292
|
-
var registeredStyles = [];
|
|
11293
|
-
var rawClassName = getRegisteredStyles$1(registered, registeredStyles, className);
|
|
11294
|
-
if (registeredStyles.length < 2) return className;
|
|
11295
|
-
return rawClassName + css(registeredStyles);
|
|
11296
|
-
}
|
|
11297
|
-
var createEmotion = function createEmotion(options) {
|
|
11298
|
-
var cache = createCache(options);
|
|
11299
|
-
cache.sheet.speedy = function(value) {
|
|
11300
|
-
this.isSpeedy = value;
|
|
11301
|
-
};
|
|
11302
|
-
cache.compat = true;
|
|
11303
|
-
var css = function css() {
|
|
11304
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
11305
|
-
var serialized = serializeStyles(args, cache.registered, void 0);
|
|
11306
|
-
insertStyles(cache, serialized, false);
|
|
11307
|
-
return cache.key + "-" + serialized.name;
|
|
11308
|
-
};
|
|
11309
|
-
return {
|
|
11310
|
-
css,
|
|
11311
|
-
cx: function cx() {
|
|
11312
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];
|
|
11313
|
-
return merge$1(cache.registered, css, classnames(args));
|
|
11314
|
-
},
|
|
11315
|
-
injectGlobal: function injectGlobal() {
|
|
11316
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) args[_key3] = arguments[_key3];
|
|
11317
|
-
insertWithoutScoping(cache, serializeStyles(args, cache.registered));
|
|
11318
|
-
},
|
|
11319
|
-
keyframes: function keyframes() {
|
|
11320
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];
|
|
11321
|
-
var serialized = serializeStyles(args, cache.registered);
|
|
11322
|
-
var animation = "animation-" + serialized.name;
|
|
11323
|
-
insertWithoutScoping(cache, {
|
|
11324
|
-
name: serialized.name,
|
|
11325
|
-
styles: "@keyframes " + animation + "{" + serialized.styles + "}"
|
|
11326
|
-
});
|
|
11327
|
-
return animation;
|
|
11328
|
-
},
|
|
11329
|
-
hydrate: function hydrate(ids) {
|
|
11330
|
-
ids.forEach(function(key) {
|
|
11331
|
-
cache.inserted[key] = true;
|
|
11332
|
-
});
|
|
11333
|
-
},
|
|
11334
|
-
flush: function flush() {
|
|
11335
|
-
cache.registered = {};
|
|
11336
|
-
cache.inserted = {};
|
|
11337
|
-
cache.sheet.flush();
|
|
11338
|
-
},
|
|
11339
|
-
sheet: cache.sheet,
|
|
11340
|
-
cache,
|
|
11341
|
-
getRegisteredStyles: getRegisteredStyles$1.bind(null, cache.registered),
|
|
11342
|
-
merge: merge$1.bind(null, cache.registered, css)
|
|
11343
|
-
};
|
|
11344
|
-
};
|
|
11345
|
-
var classnames = function classnames(args) {
|
|
11346
|
-
var cls = "";
|
|
11347
|
-
for (var i = 0; i < args.length; i++) {
|
|
11348
|
-
var arg = args[i];
|
|
11349
|
-
if (arg == null) continue;
|
|
11350
|
-
var toAdd = void 0;
|
|
11351
|
-
switch (typeof arg) {
|
|
11352
|
-
case "boolean": break;
|
|
11353
|
-
case "object":
|
|
11354
|
-
if (Array.isArray(arg)) toAdd = classnames(arg);
|
|
11355
|
-
else {
|
|
11356
|
-
toAdd = "";
|
|
11357
|
-
for (var k in arg) if (arg[k] && k) {
|
|
11358
|
-
toAdd && (toAdd += " ");
|
|
11359
|
-
toAdd += k;
|
|
11360
|
-
}
|
|
11361
|
-
}
|
|
11362
|
-
break;
|
|
11363
|
-
default: toAdd = arg;
|
|
11364
|
-
}
|
|
11365
|
-
if (toAdd) {
|
|
11366
|
-
cls && (cls += " ");
|
|
11367
|
-
cls += toAdd;
|
|
11368
|
-
}
|
|
11369
|
-
}
|
|
11370
|
-
return cls;
|
|
11371
|
-
};
|
|
11372
|
-
// ../../../node_modules/.pnpm/@emotion+css@11.13.5/node_modules/@emotion/css/dist/emotion-css.esm.js
|
|
11373
|
-
var _createEmotion = createEmotion({ key: "css" });
|
|
11374
|
-
_createEmotion.flush;
|
|
11375
|
-
_createEmotion.hydrate;
|
|
11376
|
-
var cx = _createEmotion.cx;
|
|
11377
|
-
_createEmotion.merge;
|
|
11378
|
-
_createEmotion.getRegisteredStyles;
|
|
11379
|
-
_createEmotion.injectGlobal;
|
|
11380
|
-
_createEmotion.keyframes;
|
|
11381
|
-
_createEmotion.css;
|
|
11382
|
-
_createEmotion.sheet;
|
|
11383
|
-
_createEmotion.cache;
|
|
11384
|
-
// ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_6d0393a58a031b78f608040e2ecbe6e0/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.mjs
|
|
11385
|
-
var isSerializedStyles = (o) => typeof o !== "undefined" && o !== null && ["name", "styles"].every((p) => typeof o[p] !== "undefined");
|
|
11386
|
-
var useCx = () => {
|
|
11387
|
-
const cache = __unsafe_useEmotionCache();
|
|
11388
|
-
return (0, react.useCallback)((...classNames) => {
|
|
11389
|
-
if (cache === null) throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");
|
|
11390
|
-
return cx(...classNames.map((arg) => {
|
|
11391
|
-
if (isSerializedStyles(arg)) {
|
|
11392
|
-
insertStyles(cache, arg, false);
|
|
11393
|
-
return `${cache.key}-${arg.name}`;
|
|
11394
|
-
}
|
|
11395
|
-
return arg;
|
|
11396
|
-
}));
|
|
11397
|
-
}, [cache]);
|
|
11398
9950
|
};
|
|
9951
|
+
(0, react.memo)(BaseContextSystemProvider);
|
|
9952
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/context/constants.mjs
|
|
9953
|
+
var COMPONENT_NAMESPACE = "data-wp-component";
|
|
9954
|
+
var CONNECTED_NAMESPACE = "data-wp-c16t";
|
|
9955
|
+
var CONNECT_STATIC_NAMESPACE = "__contextSystemKey__";
|
|
11399
9956
|
// ../../../node_modules/.pnpm/memize@2.1.1/node_modules/memize/dist/index.js
|
|
11400
9957
|
/**
|
|
11401
9958
|
* Memize options object.
|
|
@@ -11486,90 +10043,18 @@ function memize(fn, options) {
|
|
|
11486
10043
|
};
|
|
11487
10044
|
return memoized;
|
|
11488
10045
|
}
|
|
11489
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
11490
|
-
var import_es6 = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11491
|
-
module.exports = function equal(a, b) {
|
|
11492
|
-
if (a === b) return true;
|
|
11493
|
-
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
11494
|
-
if (a.constructor !== b.constructor) return false;
|
|
11495
|
-
var length, i, keys;
|
|
11496
|
-
if (Array.isArray(a)) {
|
|
11497
|
-
length = a.length;
|
|
11498
|
-
if (length != b.length) return false;
|
|
11499
|
-
for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;
|
|
11500
|
-
return true;
|
|
11501
|
-
}
|
|
11502
|
-
if (a instanceof Map && b instanceof Map) {
|
|
11503
|
-
if (a.size !== b.size) return false;
|
|
11504
|
-
for (i of a.entries()) if (!b.has(i[0])) return false;
|
|
11505
|
-
for (i of a.entries()) if (!equal(i[1], b.get(i[0]))) return false;
|
|
11506
|
-
return true;
|
|
11507
|
-
}
|
|
11508
|
-
if (a instanceof Set && b instanceof Set) {
|
|
11509
|
-
if (a.size !== b.size) return false;
|
|
11510
|
-
for (i of a.entries()) if (!b.has(i[0])) return false;
|
|
11511
|
-
return true;
|
|
11512
|
-
}
|
|
11513
|
-
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
11514
|
-
length = a.length;
|
|
11515
|
-
if (length != b.length) return false;
|
|
11516
|
-
for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;
|
|
11517
|
-
return true;
|
|
11518
|
-
}
|
|
11519
|
-
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
11520
|
-
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
11521
|
-
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
11522
|
-
keys = Object.keys(a);
|
|
11523
|
-
length = keys.length;
|
|
11524
|
-
if (length !== Object.keys(b).length) return false;
|
|
11525
|
-
for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
11526
|
-
for (i = length; i-- !== 0;) {
|
|
11527
|
-
var key = keys[i];
|
|
11528
|
-
if (!equal(a[key], b[key])) return false;
|
|
11529
|
-
}
|
|
11530
|
-
return true;
|
|
11531
|
-
}
|
|
11532
|
-
return a !== a && b !== b;
|
|
11533
|
-
};
|
|
11534
|
-
})))(), 1);
|
|
11535
|
-
var ComponentsContext = (0, react.createContext)({});
|
|
11536
|
-
ComponentsContext.displayName = "ComponentsContext";
|
|
11537
|
-
var useComponentsContext = () => (0, react.useContext)(ComponentsContext);
|
|
11538
|
-
function useContextSystemBridge({ value }) {
|
|
11539
|
-
const parentContext = useComponentsContext();
|
|
11540
|
-
const valueRef = (0, react.useRef)(value);
|
|
11541
|
-
use_update_effect_default(() => {
|
|
11542
|
-
if ((0, import_es6.default)(valueRef.current, value) && valueRef.current !== value) globalThis.SCRIPT_DEBUG === true && warning(`Please memoize your context: ${JSON.stringify(value)}`);
|
|
11543
|
-
}, [value]);
|
|
11544
|
-
return (0, react.useMemo)(() => {
|
|
11545
|
-
return (0, deepmerge.default)(parentContext ?? {}, value ?? {}, { isMergeableObject: isPlainObject });
|
|
11546
|
-
}, [parentContext, value]);
|
|
11547
|
-
}
|
|
11548
|
-
var BaseContextSystemProvider = ({ children, value }) => {
|
|
11549
|
-
const contextValue = useContextSystemBridge({ value });
|
|
11550
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComponentsContext.Provider, {
|
|
11551
|
-
value: contextValue,
|
|
11552
|
-
children
|
|
11553
|
-
});
|
|
11554
|
-
};
|
|
11555
|
-
(0, react.memo)(BaseContextSystemProvider);
|
|
11556
|
-
// ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_6d0393a58a031b78f608040e2ecbe6e0/node_modules/@wordpress/components/build-module/context/constants.mjs
|
|
11557
|
-
var COMPONENT_NAMESPACE = "data-wp-component";
|
|
11558
|
-
var CONNECTED_NAMESPACE = "data-wp-c16t";
|
|
11559
|
-
var CONNECT_STATIC_NAMESPACE = "__contextSystemKey__";
|
|
11560
|
-
// ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_6d0393a58a031b78f608040e2ecbe6e0/node_modules/@wordpress/components/build-module/context/get-styled-class-name-from-key.mjs
|
|
11561
|
-
var import_dist = require_dist();
|
|
10046
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/context/get-styled-class-name-from-key.mjs
|
|
11562
10047
|
function getStyledClassName(namespace) {
|
|
11563
|
-
return `components-${(
|
|
10048
|
+
return `components-${namespace.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/[^A-Z0-9]+/gi, "-").replace(/^-|-$/g, "").toLowerCase()}`;
|
|
11564
10049
|
}
|
|
11565
10050
|
var getStyledClassNameFromKey = memize(getStyledClassName);
|
|
11566
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
10051
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/context/context-connect.mjs
|
|
11567
10052
|
function contextConnect(Component, namespace) {
|
|
11568
10053
|
return _contextConnect(Component, namespace, { forwardsRef: true });
|
|
11569
10054
|
}
|
|
11570
10055
|
function _contextConnect(Component, namespace, options) {
|
|
11571
10056
|
const WrappedComponent = options?.forwardsRef ? (0, react.forwardRef)(Component) : Component;
|
|
11572
|
-
if (typeof namespace === "undefined")
|
|
10057
|
+
if (typeof namespace === "undefined") warning("contextConnect: Please provide a namespace");
|
|
11573
10058
|
let mergedNamespace = WrappedComponent["__contextSystemKey__"] || [namespace];
|
|
11574
10059
|
if (Array.isArray(namespace)) mergedNamespace = [...mergedNamespace, ...namespace];
|
|
11575
10060
|
if (typeof namespace === "string") mergedNamespace = [...mergedNamespace, namespace];
|
|
@@ -11579,17 +10064,17 @@ function _contextConnect(Component, namespace, options) {
|
|
|
11579
10064
|
selector: `.${getStyledClassNameFromKey(namespace)}`
|
|
11580
10065
|
});
|
|
11581
10066
|
}
|
|
11582
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
10067
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/context/utils.mjs
|
|
11583
10068
|
function getNamespace(componentName) {
|
|
11584
10069
|
return { [COMPONENT_NAMESPACE]: componentName };
|
|
11585
10070
|
}
|
|
11586
10071
|
function getConnectedNamespace() {
|
|
11587
10072
|
return { [CONNECTED_NAMESPACE]: true };
|
|
11588
10073
|
}
|
|
11589
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
10074
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/context/use-context-system.mjs
|
|
11590
10075
|
function useContextSystem(props, namespace) {
|
|
11591
10076
|
const contextSystemProps = useComponentsContext();
|
|
11592
|
-
if (typeof namespace === "undefined")
|
|
10077
|
+
if (typeof namespace === "undefined") warning("useContextSystem: Please provide a namespace");
|
|
11593
10078
|
const contextProps = contextSystemProps?.[namespace] || {};
|
|
11594
10079
|
const finalComponentProps = {
|
|
11595
10080
|
...getConnectedNamespace(),
|
|
@@ -11599,7 +10084,7 @@ function useContextSystem(props, namespace) {
|
|
|
11599
10084
|
const overrideProps = _overrides;
|
|
11600
10085
|
const initialMergedProps = Object.entries(otherContextProps).length ? Object.assign({}, otherContextProps, props) : props;
|
|
11601
10086
|
const propsWithChildren = initialMergedProps;
|
|
11602
|
-
const classes =
|
|
10087
|
+
const classes = (0, clsx.default)(getStyledClassNameFromKey(namespace), props.className);
|
|
11603
10088
|
const rendered = typeof propsWithChildren.renderChildren === "function" ? propsWithChildren.renderChildren(initialMergedProps) : propsWithChildren.children;
|
|
11604
10089
|
for (const key in initialMergedProps) finalComponentProps[key] = initialMergedProps[key];
|
|
11605
10090
|
for (const key in overrideProps) finalComponentProps[key] = overrideProps[key];
|
|
@@ -11607,7 +10092,7 @@ function useContextSystem(props, namespace) {
|
|
|
11607
10092
|
finalComponentProps.className = classes;
|
|
11608
10093
|
return finalComponentProps;
|
|
11609
10094
|
}
|
|
11610
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
10095
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/visually-hidden/styles.mjs
|
|
11611
10096
|
var visuallyHidden = {
|
|
11612
10097
|
border: 0,
|
|
11613
10098
|
clip: "rect(1px, 1px, 1px, 1px)",
|
|
@@ -11622,7 +10107,7 @@ var visuallyHidden = {
|
|
|
11622
10107
|
wordWrap: "normal",
|
|
11623
10108
|
wordBreak: "normal"
|
|
11624
10109
|
};
|
|
11625
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
10110
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/utils/polymorphic-element.mjs
|
|
11626
10111
|
var customAttributeRegExp = /^(data|aria|x)-/i;
|
|
11627
10112
|
var eventHandlerRegExp = /^on[A-Z]/;
|
|
11628
10113
|
var svgElementNames = new Set(`animate animateMotion animateTransform circle clipPath defs desc ellipse
|
|
@@ -11711,7 +10196,7 @@ function UnforwardedPolymorphicElement({ as, ...props }, ref) {
|
|
|
11711
10196
|
});
|
|
11712
10197
|
}
|
|
11713
10198
|
var PolymorphicElement = (0, react.forwardRef)(UnforwardedPolymorphicElement);
|
|
11714
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
10199
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/view/component.mjs
|
|
11715
10200
|
function UnforwardedView({ css, ...restProps }, ref) {
|
|
11716
10201
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PolymorphicElement, {
|
|
11717
10202
|
ref,
|
|
@@ -11719,7 +10204,7 @@ function UnforwardedView({ css, ...restProps }, ref) {
|
|
|
11719
10204
|
});
|
|
11720
10205
|
}
|
|
11721
10206
|
var component_default$2 = Object.assign((0, react.forwardRef)(UnforwardedView), { selector: ".components-view" });
|
|
11722
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
10207
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/visually-hidden/component.mjs
|
|
11723
10208
|
function UnconnectedVisuallyHidden(props, forwardedRef) {
|
|
11724
10209
|
const { style: styleProp, ...contextProps } = useContextSystem(props, "VisuallyHidden");
|
|
11725
10210
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(component_default$2, {
|
|
@@ -11733,7 +10218,7 @@ function UnconnectedVisuallyHidden(props, forwardedRef) {
|
|
|
11733
10218
|
});
|
|
11734
10219
|
}
|
|
11735
10220
|
var component_default$1 = contextConnect(UnconnectedVisuallyHidden, "VisuallyHidden");
|
|
11736
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
10221
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/utils/use-responsive-value.mjs
|
|
11737
10222
|
var breakpoints = [
|
|
11738
10223
|
"40em",
|
|
11739
10224
|
"52em",
|
|
@@ -11771,15 +10256,15 @@ function useResponsiveValue(values, options = {}) {
|
|
|
11771
10256
|
const array = values || [];
|
|
11772
10257
|
return array[index >= array.length ? array.length - 1 : index];
|
|
11773
10258
|
}
|
|
11774
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
10259
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/grid/utils.mjs
|
|
11775
10260
|
var ALIGNMENTS = {
|
|
11776
10261
|
bottom: {
|
|
11777
10262
|
alignItems: "flex-end",
|
|
11778
10263
|
justifyContent: "center"
|
|
11779
10264
|
},
|
|
11780
10265
|
bottomLeft: {
|
|
11781
|
-
alignItems: "flex-
|
|
11782
|
-
justifyContent: "flex-
|
|
10266
|
+
alignItems: "flex-end",
|
|
10267
|
+
justifyContent: "flex-start"
|
|
11783
10268
|
},
|
|
11784
10269
|
bottomRight: {
|
|
11785
10270
|
alignItems: "flex-end",
|
|
@@ -11818,7 +10303,7 @@ var ALIGNMENTS = {
|
|
|
11818
10303
|
function getAlignmentProps(alignment) {
|
|
11819
10304
|
return alignment ? ALIGNMENTS[alignment] ?? {} : {};
|
|
11820
10305
|
}
|
|
11821
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
10306
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/grid/hook.mjs
|
|
11822
10307
|
var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
|
|
11823
10308
|
function getRuntime() {
|
|
11824
10309
|
const globalScope = globalThis;
|
|
@@ -11962,7 +10447,7 @@ function useGrid(props) {
|
|
|
11962
10447
|
}
|
|
11963
10448
|
};
|
|
11964
10449
|
}
|
|
11965
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
10450
|
+
// ../../../node_modules/.pnpm/@wordpress+components@43.0.0_@date-fns+tz@1.5.0_@types+react-dom@19.3.0_@types+react@19_401cb4bad47bd1f7b56615ff574f0485/node_modules/@wordpress/components/build-module/grid/component.mjs
|
|
11966
10451
|
function UnconnectedGrid(props, forwardedRef) {
|
|
11967
10452
|
const gridProps = useGrid(props);
|
|
11968
10453
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(component_default$2, {
|
|
@@ -12134,6 +10619,41 @@ var leaderboard_chart_module_default = {
|
|
|
12134
10619
|
"stretch": "a8ccharts-GovfoW-stretch",
|
|
12135
10620
|
"valueContainer": "a8ccharts-GovfoW-valueContainer"
|
|
12136
10621
|
};
|
|
10622
|
+
// src/charts/leaderboard-chart/private/resolve-leaderboard-entries.ts
|
|
10623
|
+
const toShare = (value, max) => max === 0 ? 0 : value / max * 100;
|
|
10624
|
+
const toDelta = (currentValue, previousValue) => {
|
|
10625
|
+
if (previousValue == null) return;
|
|
10626
|
+
if (previousValue === 0) return currentValue === 0 ? 0 : void 0;
|
|
10627
|
+
return (currentValue - previousValue) / Math.abs(previousValue) * 100;
|
|
10628
|
+
};
|
|
10629
|
+
/**
|
|
10630
|
+
* Fills in the shares and delta an entry omits, derived from its values.
|
|
10631
|
+
*
|
|
10632
|
+
* @param data - Leaderboard entries; passed shares and delta win over derived ones.
|
|
10633
|
+
* @param options - Resolver options.
|
|
10634
|
+
* @param options.includePrevious - Whether previous values count toward the shared max.
|
|
10635
|
+
* @param options.clampNegative - Whether a negative share draws as an empty bar instead of below zero.
|
|
10636
|
+
* @return Entries with `currentShare` always set.
|
|
10637
|
+
*/
|
|
10638
|
+
function resolveLeaderboardEntries(data, { includePrevious, clampNegative = false }) {
|
|
10639
|
+
const magnitude = clampNegative ? (value) => Math.max(value, 0) : Math.abs;
|
|
10640
|
+
const clamp = (share) => clampNegative ? Math.max(share, 0) : share;
|
|
10641
|
+
const max = data.reduce((largest, { currentValue, previousValue }) => {
|
|
10642
|
+
const previous = includePrevious && previousValue != null ? magnitude(previousValue) : 0;
|
|
10643
|
+
return Math.max(largest, magnitude(currentValue), previous);
|
|
10644
|
+
}, 0);
|
|
10645
|
+
return data.map((entry) => {
|
|
10646
|
+
const passedOrDerivedPrevious = entry.previousShare ?? (entry.previousValue != null ? toShare(entry.previousValue, max) : void 0);
|
|
10647
|
+
const previousShare = passedOrDerivedPrevious !== void 0 ? clamp(passedOrDerivedPrevious) : void 0;
|
|
10648
|
+
const delta = entry.delta ?? toDelta(entry.currentValue, entry.previousValue);
|
|
10649
|
+
return {
|
|
10650
|
+
...entry,
|
|
10651
|
+
currentShare: clamp(entry.currentShare ?? toShare(entry.currentValue, max)),
|
|
10652
|
+
...previousShare !== void 0 && { previousShare },
|
|
10653
|
+
...delta !== void 0 && { delta }
|
|
10654
|
+
};
|
|
10655
|
+
});
|
|
10656
|
+
}
|
|
12137
10657
|
// src/charts/leaderboard-chart/leaderboard-chart.tsx
|
|
12138
10658
|
const ROW_GAP = "var(--a8c-charts-dimension-leaderboard-row-gap, 12px)";
|
|
12139
10659
|
const COLUMN_GAP = "var(--a8c-charts-dimension-leaderboard-column-gap, 4px)";
|
|
@@ -12244,6 +10764,7 @@ const BarWithLabel = ({ entry, withComparison, withOverlayLabel, primaryColor, s
|
|
|
12244
10764
|
* @param props.height - Optional height of the chart container in pixels
|
|
12245
10765
|
* @param props.withComparison - Whether to show comparison data
|
|
12246
10766
|
* @param props.withOverlayLabel - Whether to overlay the label on top of the bar
|
|
10767
|
+
* @param props.negativeBars - How a negative value draws: from a shared zero point, or as an empty bar
|
|
12247
10768
|
* @param props.primaryColor - Primary color for current period bars
|
|
12248
10769
|
* @param props.secondaryColor - Secondary color for comparison period bars
|
|
12249
10770
|
* @param props.valueFormatter - Custom formatter for values
|
|
@@ -12261,7 +10782,7 @@ const BarWithLabel = ({ entry, withComparison, withOverlayLabel, primaryColor, s
|
|
|
12261
10782
|
* @param props.ariaLabel - Accessible name for the list, defaulting to "Leaderboard chart"
|
|
12262
10783
|
* @return JSX element representing the leaderboard chart
|
|
12263
10784
|
*/
|
|
12264
|
-
const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propWidth, height: propHeight, withComparison = false, withOverlayLabel = false, primaryColor, secondaryColor, valueFormatter = defaultValueFormatter, deltaFormatter = defaultDeltaFormatter, animation, loading = false, fitRows = false, showLegend = false, legend = {}, legendLabels, gap = "md", ariaLabel, className, style, children }) => {
|
|
10785
|
+
const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propWidth, height: propHeight, withComparison = false, withOverlayLabel = false, negativeBars = "diverge", primaryColor, secondaryColor, valueFormatter = defaultValueFormatter, deltaFormatter = defaultDeltaFormatter, animation, loading = false, fitRows = false, showLegend = false, legend = {}, legendLabels, gap = "md", ariaLabel, className, style, children }) => {
|
|
12265
10786
|
const legendInteractive = legend.interactive ?? false;
|
|
12266
10787
|
const legendPosition = legend.position ?? "bottom";
|
|
12267
10788
|
const chartId = useChartId(providedChartId);
|
|
@@ -12315,13 +10836,21 @@ const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propW
|
|
|
12315
10836
|
withComparison,
|
|
12316
10837
|
withOverlayLabel
|
|
12317
10838
|
]);
|
|
10839
|
+
const withComparisonBars = withComparison && !withOverlayLabel;
|
|
10840
|
+
const resolvedData = (0, react.useMemo)(() => resolveLeaderboardEntries(data ?? [], {
|
|
10841
|
+
includePrevious: withComparisonBars,
|
|
10842
|
+
clampNegative: negativeBars === "clamp"
|
|
10843
|
+
}), [
|
|
10844
|
+
data,
|
|
10845
|
+
withComparisonBars,
|
|
10846
|
+
negativeBars
|
|
10847
|
+
]);
|
|
12318
10848
|
const divergingScale = (0, react.useMemo)(() => {
|
|
12319
|
-
const withComparisonBars = withComparison && !withOverlayLabel;
|
|
12320
10849
|
const scale = {
|
|
12321
10850
|
negative: 0,
|
|
12322
10851
|
positive: 0
|
|
12323
10852
|
};
|
|
12324
|
-
for (const entry of
|
|
10853
|
+
for (const entry of resolvedData) {
|
|
12325
10854
|
const shares = [entry.currentShare];
|
|
12326
10855
|
if (withComparisonBars && hasPreviousValue(entry)) shares.push(entry.previousShare);
|
|
12327
10856
|
for (const share of shares) {
|
|
@@ -12330,11 +10859,7 @@ const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propW
|
|
|
12330
10859
|
}
|
|
12331
10860
|
}
|
|
12332
10861
|
return scale.negative > 0 ? scale : void 0;
|
|
12333
|
-
}, [
|
|
12334
|
-
data,
|
|
12335
|
-
withComparison,
|
|
12336
|
-
withOverlayLabel
|
|
12337
|
-
]);
|
|
10862
|
+
}, [resolvedData, withComparisonBars]);
|
|
12338
10863
|
const isDataValid = Boolean(data && data.length > 0);
|
|
12339
10864
|
const chartMetadata = (0, react.useMemo)(() => ({
|
|
12340
10865
|
withComparison,
|
|
@@ -12420,7 +10945,7 @@ const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propW
|
|
|
12420
10945
|
rowGap: ROW_GAP,
|
|
12421
10946
|
columnGap: COLUMN_GAP,
|
|
12422
10947
|
"data-leaderboard-grid": true,
|
|
12423
|
-
children:
|
|
10948
|
+
children: resolvedData.map((entry, rowIndex) => {
|
|
12424
10949
|
const rowStyle = shouldFitRows && rowIndex >= fittedCount ? { visibility: "hidden" } : void 0;
|
|
12425
10950
|
const hasPreviousPeriodValue = hasPreviousValue(entry);
|
|
12426
10951
|
const hasDelta = hasDeltaValue(entry);
|