@carto/meridian-ds 1.4.4-alpha-others.1 → 1.4.4-alpha-others.2
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 +6 -0
- package/dist/Alert-D8jI1sG4.js +134 -0
- package/dist/Alert-zqtoWsBL.cjs +133 -0
- package/dist/ArrowDown-8fLj23Ge.cjs +31 -0
- package/dist/ArrowDown-CY_wMVJT.js +32 -0
- package/dist/MenuItem-Br2jY2lt.cjs +164 -0
- package/dist/MenuItem-CXnnE5lK.js +165 -0
- package/dist/OpenDiagonallyRight-5HZXh46V.js +59 -0
- package/dist/OpenDiagonallyRight-BrRyCV4Q.cjs +58 -0
- package/dist/SwatchSquare-DDi0beUM.js +51 -0
- package/dist/SwatchSquare-w-U8-O-P.cjs +50 -0
- package/dist/TablePaginationActions-CFGXm44W.cjs +5661 -0
- package/dist/{TablePaginationActions-WZ3P4O35.js → TablePaginationActions-KpTvhN4Y.js} +1086 -656
- package/dist/components/index.cjs +4403 -1
- package/dist/components/index.js +3235 -1857
- package/dist/custom-icons/index.cjs +5857 -1
- package/dist/custom-icons/index.js +2658 -2326
- package/dist/paletteUtils-B9ybmwiI.cjs +304 -0
- package/dist/paletteUtils-BHqJlHm9.js +288 -0
- package/dist/theme/index.cjs +3135 -1
- package/dist/theme/index.js +1050 -1011
- package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialog.d.ts +16 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialog.d.ts.map +1 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogConfirmation.d.ts +16 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogConfirmation.d.ts.map +1 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogContent.d.ts +10 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogContent.d.ts.map +1 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogError.d.ts +8 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogError.d.ts.map +1 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaField.d.ts +4 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaField.d.ts.map +1 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaFooter.d.ts +12 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaFooter.d.ts.map +1 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaHeader.d.ts +9 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaHeader.d.ts.map +1 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaInput.d.ts +28 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaInput.d.ts.map +1 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaTheme.d.ts +7 -0
- package/dist/types/components/organisms/CodeArea/CodeAreaTheme.d.ts.map +1 -0
- package/dist/types/components/organisms/CodeArea/index.d.ts +9 -0
- package/dist/types/components/organisms/CodeArea/index.d.ts.map +1 -0
- package/dist/types/components/organisms/CodeArea/types.d.ts +38 -0
- package/dist/types/components/organisms/CodeArea/types.d.ts.map +1 -0
- package/dist/types/components/organisms/CodeArea/utils.d.ts +5 -0
- package/dist/types/components/organisms/CodeArea/utils.d.ts.map +1 -0
- package/dist/types/components/organisms/index.d.ts +2 -0
- package/dist/types/components/organisms/index.d.ts.map +1 -1
- package/dist/types/localization/en.d.ts +6 -0
- package/dist/types/localization/en.d.ts.map +1 -1
- package/dist/types/localization/es.d.ts +6 -0
- package/dist/types/localization/es.d.ts.map +1 -1
- package/dist/types/localization/id.d.ts +6 -0
- package/dist/types/localization/id.d.ts.map +1 -1
- package/dist/types/localization/index.d.ts +18 -0
- package/dist/types/localization/index.d.ts.map +1 -1
- package/dist/types/utils/chartConstants.d.ts +3 -3
- package/dist/types/utils/chartConstants.d.ts.map +1 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts +2 -2
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts +2 -2
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts +2 -2
- package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts.map +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesChart.d.ts +2 -5
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesChart.d.ts.map +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/timeSeriesUtils.d.ts +7 -0
- package/dist/types/widgets/TimeSeriesWidgetUI/timeSeriesUtils.d.ts.map +1 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/types.d.ts +6 -0
- package/dist/types/widgets/TimeSeriesWidgetUI/types.d.ts.map +1 -0
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts +2 -2
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/transposeCategoryData.d.ts +2 -2
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/transposeCategoryData.d.ts.map +1 -1
- package/dist/types/widgets/index.d.ts +1 -0
- package/dist/types/widgets/index.d.ts.map +1 -1
- package/dist/widgets/index.cjs +7192 -21
- package/dist/widgets/index.js +5182 -3806
- package/package.json +6 -1
- package/dist/Alert-BAvr1f31.js +0 -130
- package/dist/Alert-DPGMxifE.cjs +0 -4
- package/dist/ArrowDown-BD0WmQR3.cjs +0 -1
- package/dist/ArrowDown-CMhYkZ2p.js +0 -31
- package/dist/MenuItem-Cd34y6F3.js +0 -165
- package/dist/MenuItem-Dbss-WG1.cjs +0 -1
- package/dist/SwatchSquare-C34ayL4L.cjs +0 -1
- package/dist/SwatchSquare-CVpwEFFV.js +0 -48
- package/dist/TablePaginationActions-Bp1DCaIE.cjs +0 -9
- package/dist/paletteUtils-BEwZhrLg.js +0 -262
- package/dist/paletteUtils-DLQVT9qo.cjs +0 -1
|
@@ -1,572 +1,819 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsx
|
|
3
|
-
import { Typography as
|
|
4
|
-
import { forwardRef
|
|
5
|
-
import { KeyboardArrowLeftOutlined
|
|
6
|
-
import { createIntlCache
|
|
7
|
-
function
|
|
8
|
-
return
|
|
1
|
+
import require$$0 from "react-is";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Typography as Typography$1, Tooltip, IconButton, styled, Box } from "@mui/material";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { KeyboardArrowLeftOutlined, KeyboardArrowRightOutlined } from "@mui/icons-material";
|
|
6
|
+
import { createIntlCache, createIntl, useIntl } from "react-intl";
|
|
7
|
+
function getDefaultExportFromCjs(x) {
|
|
8
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
9
9
|
}
|
|
10
|
-
var
|
|
10
|
+
var propTypes = { exports: {} };
|
|
11
11
|
/*
|
|
12
12
|
object-assign
|
|
13
13
|
(c) Sindre Sorhus
|
|
14
14
|
@license MIT
|
|
15
15
|
*/
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
var objectAssign;
|
|
17
|
+
var hasRequiredObjectAssign;
|
|
18
|
+
function requireObjectAssign() {
|
|
19
|
+
if (hasRequiredObjectAssign) return objectAssign;
|
|
20
|
+
hasRequiredObjectAssign = 1;
|
|
21
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
22
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
23
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
24
|
+
function toObject(val) {
|
|
25
|
+
if (val === null || val === void 0) {
|
|
23
26
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
24
|
-
|
|
27
|
+
}
|
|
28
|
+
return Object(val);
|
|
25
29
|
}
|
|
26
|
-
function
|
|
30
|
+
function shouldUseNative() {
|
|
27
31
|
try {
|
|
28
|
-
if (!Object.assign)
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
if (!Object.assign) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
var test1 = new String("abc");
|
|
36
|
+
test1[5] = "de";
|
|
37
|
+
if (Object.getOwnPropertyNames(test1)[0] === "5") {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
var test2 = {};
|
|
41
|
+
for (var i = 0; i < 10; i++) {
|
|
42
|
+
test2["_" + String.fromCharCode(i)] = i;
|
|
43
|
+
}
|
|
44
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
|
|
45
|
+
return test2[n];
|
|
46
|
+
});
|
|
47
|
+
if (order2.join("") !== "0123456789") {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
var test3 = {};
|
|
51
|
+
"abcdefghijklmnopqrst".split("").forEach(function(letter) {
|
|
52
|
+
test3[letter] = letter;
|
|
37
53
|
});
|
|
38
|
-
if (
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
} catch {
|
|
45
|
-
return !1;
|
|
54
|
+
if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
return true;
|
|
58
|
+
} catch (err) {
|
|
59
|
+
return false;
|
|
46
60
|
}
|
|
47
61
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
objectAssign = shouldUseNative() ? Object.assign : function(target, source) {
|
|
63
|
+
var from;
|
|
64
|
+
var to = toObject(target);
|
|
65
|
+
var symbols;
|
|
66
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
67
|
+
from = Object(arguments[s]);
|
|
68
|
+
for (var key in from) {
|
|
69
|
+
if (hasOwnProperty.call(from, key)) {
|
|
70
|
+
to[key] = from[key];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (getOwnPropertySymbols) {
|
|
74
|
+
symbols = getOwnPropertySymbols(from);
|
|
75
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
76
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
77
|
+
to[symbols[i]] = from[symbols[i]];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
57
80
|
}
|
|
58
81
|
}
|
|
59
|
-
return
|
|
60
|
-
}
|
|
82
|
+
return to;
|
|
83
|
+
};
|
|
84
|
+
return objectAssign;
|
|
61
85
|
}
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
86
|
+
var ReactPropTypesSecret_1;
|
|
87
|
+
var hasRequiredReactPropTypesSecret;
|
|
88
|
+
function requireReactPropTypesSecret() {
|
|
89
|
+
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
90
|
+
hasRequiredReactPropTypesSecret = 1;
|
|
91
|
+
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
92
|
+
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
93
|
+
return ReactPropTypesSecret_1;
|
|
68
94
|
}
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
95
|
+
var has;
|
|
96
|
+
var hasRequiredHas;
|
|
97
|
+
function requireHas() {
|
|
98
|
+
if (hasRequiredHas) return has;
|
|
99
|
+
hasRequiredHas = 1;
|
|
100
|
+
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
101
|
+
return has;
|
|
72
102
|
}
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
103
|
+
var checkPropTypes_1;
|
|
104
|
+
var hasRequiredCheckPropTypes;
|
|
105
|
+
function requireCheckPropTypes() {
|
|
106
|
+
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
107
|
+
hasRequiredCheckPropTypes = 1;
|
|
108
|
+
var printWarning = function() {
|
|
78
109
|
};
|
|
79
110
|
if (process.env.NODE_ENV !== "production") {
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
111
|
+
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
112
|
+
var loggedTypeFailures = {};
|
|
113
|
+
var has2 = requireHas();
|
|
114
|
+
printWarning = function(text) {
|
|
115
|
+
var message = "Warning: " + text;
|
|
116
|
+
if (typeof console !== "undefined") {
|
|
117
|
+
console.error(message);
|
|
118
|
+
}
|
|
84
119
|
try {
|
|
85
|
-
throw new Error(
|
|
86
|
-
} catch {
|
|
120
|
+
throw new Error(message);
|
|
121
|
+
} catch (x) {
|
|
87
122
|
}
|
|
88
123
|
};
|
|
89
124
|
}
|
|
90
|
-
function
|
|
125
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
91
126
|
if (process.env.NODE_ENV !== "production") {
|
|
92
|
-
for (var
|
|
93
|
-
if (
|
|
94
|
-
var
|
|
127
|
+
for (var typeSpecName in typeSpecs) {
|
|
128
|
+
if (has2(typeSpecs, typeSpecName)) {
|
|
129
|
+
var error;
|
|
95
130
|
try {
|
|
96
|
-
if (typeof
|
|
97
|
-
var
|
|
98
|
-
(
|
|
131
|
+
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
132
|
+
var err = Error(
|
|
133
|
+
(componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
99
134
|
);
|
|
100
|
-
|
|
135
|
+
err.name = "Invariant Violation";
|
|
136
|
+
throw err;
|
|
101
137
|
}
|
|
102
|
-
|
|
103
|
-
} catch (
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
if (
|
|
107
|
-
(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
138
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
139
|
+
} catch (ex) {
|
|
140
|
+
error = ex;
|
|
141
|
+
}
|
|
142
|
+
if (error && !(error instanceof Error)) {
|
|
143
|
+
printWarning(
|
|
144
|
+
(componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
148
|
+
loggedTypeFailures[error.message] = true;
|
|
149
|
+
var stack = getStack ? getStack() : "";
|
|
150
|
+
printWarning(
|
|
151
|
+
"Failed " + location + " type: " + error.message + (stack != null ? stack : "")
|
|
113
152
|
);
|
|
114
153
|
}
|
|
115
154
|
}
|
|
155
|
+
}
|
|
116
156
|
}
|
|
117
157
|
}
|
|
118
|
-
|
|
119
|
-
process.env.NODE_ENV !== "production"
|
|
120
|
-
|
|
158
|
+
checkPropTypes.resetWarningCache = function() {
|
|
159
|
+
if (process.env.NODE_ENV !== "production") {
|
|
160
|
+
loggedTypeFailures = {};
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
checkPropTypes_1 = checkPropTypes;
|
|
164
|
+
return checkPropTypes_1;
|
|
121
165
|
}
|
|
122
|
-
var
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
166
|
+
var factoryWithTypeCheckers;
|
|
167
|
+
var hasRequiredFactoryWithTypeCheckers;
|
|
168
|
+
function requireFactoryWithTypeCheckers() {
|
|
169
|
+
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
170
|
+
hasRequiredFactoryWithTypeCheckers = 1;
|
|
171
|
+
var ReactIs = require$$0;
|
|
172
|
+
var assign = requireObjectAssign();
|
|
173
|
+
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
174
|
+
var has2 = requireHas();
|
|
175
|
+
var checkPropTypes = requireCheckPropTypes();
|
|
176
|
+
var printWarning = function() {
|
|
127
177
|
};
|
|
128
|
-
process.env.NODE_ENV !== "production"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
178
|
+
if (process.env.NODE_ENV !== "production") {
|
|
179
|
+
printWarning = function(text) {
|
|
180
|
+
var message = "Warning: " + text;
|
|
181
|
+
if (typeof console !== "undefined") {
|
|
182
|
+
console.error(message);
|
|
183
|
+
}
|
|
184
|
+
try {
|
|
185
|
+
throw new Error(message);
|
|
186
|
+
} catch (x) {
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
function emptyFunctionThatReturnsNull() {
|
|
137
191
|
return null;
|
|
138
192
|
}
|
|
139
|
-
|
|
140
|
-
var
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
193
|
+
factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
194
|
+
var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
|
|
195
|
+
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
196
|
+
function getIteratorFn(maybeIterable) {
|
|
197
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
198
|
+
if (typeof iteratorFn === "function") {
|
|
199
|
+
return iteratorFn;
|
|
200
|
+
}
|
|
145
201
|
}
|
|
146
|
-
var
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
202
|
+
var ANONYMOUS = "<<anonymous>>";
|
|
203
|
+
var ReactPropTypes = {
|
|
204
|
+
array: createPrimitiveTypeChecker("array"),
|
|
205
|
+
bigint: createPrimitiveTypeChecker("bigint"),
|
|
206
|
+
bool: createPrimitiveTypeChecker("boolean"),
|
|
207
|
+
func: createPrimitiveTypeChecker("function"),
|
|
208
|
+
number: createPrimitiveTypeChecker("number"),
|
|
209
|
+
object: createPrimitiveTypeChecker("object"),
|
|
210
|
+
string: createPrimitiveTypeChecker("string"),
|
|
211
|
+
symbol: createPrimitiveTypeChecker("symbol"),
|
|
212
|
+
any: createAnyTypeChecker(),
|
|
213
|
+
arrayOf: createArrayOfTypeChecker,
|
|
214
|
+
element: createElementTypeChecker(),
|
|
215
|
+
elementType: createElementTypeTypeChecker(),
|
|
216
|
+
instanceOf: createInstanceTypeChecker,
|
|
217
|
+
node: createNodeChecker(),
|
|
218
|
+
objectOf: createObjectOfTypeChecker,
|
|
219
|
+
oneOf: createEnumTypeChecker,
|
|
220
|
+
oneOfType: createUnionTypeChecker,
|
|
221
|
+
shape: createShapeTypeChecker,
|
|
222
|
+
exact: createStrictShapeTypeChecker
|
|
166
223
|
};
|
|
167
|
-
function
|
|
168
|
-
|
|
224
|
+
function is(x, y) {
|
|
225
|
+
if (x === y) {
|
|
226
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
227
|
+
} else {
|
|
228
|
+
return x !== x && y !== y;
|
|
229
|
+
}
|
|
169
230
|
}
|
|
170
|
-
function
|
|
171
|
-
this.message =
|
|
231
|
+
function PropTypeError(message, data2) {
|
|
232
|
+
this.message = message;
|
|
233
|
+
this.data = data2 && typeof data2 === "object" ? data2 : {};
|
|
234
|
+
this.stack = "";
|
|
172
235
|
}
|
|
173
|
-
|
|
174
|
-
function
|
|
175
|
-
if (process.env.NODE_ENV !== "production")
|
|
176
|
-
var
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
236
|
+
PropTypeError.prototype = Error.prototype;
|
|
237
|
+
function createChainableTypeChecker(validate) {
|
|
238
|
+
if (process.env.NODE_ENV !== "production") {
|
|
239
|
+
var manualPropTypeCallCache = {};
|
|
240
|
+
var manualPropTypeWarningCount = 0;
|
|
241
|
+
}
|
|
242
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
243
|
+
componentName = componentName || ANONYMOUS;
|
|
244
|
+
propFullName = propFullName || propName;
|
|
245
|
+
if (secret !== ReactPropTypesSecret) {
|
|
246
|
+
if (throwOnDirectAccess) {
|
|
247
|
+
var err = new Error(
|
|
181
248
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
182
249
|
);
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
250
|
+
err.name = "Invariant Violation";
|
|
251
|
+
throw err;
|
|
252
|
+
} else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
|
|
253
|
+
var cacheKey = componentName + ":" + propName;
|
|
254
|
+
if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
255
|
+
manualPropTypeWarningCount < 3) {
|
|
256
|
+
printWarning(
|
|
257
|
+
"You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
258
|
+
);
|
|
259
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
260
|
+
manualPropTypeWarningCount++;
|
|
261
|
+
}
|
|
190
262
|
}
|
|
191
263
|
}
|
|
192
|
-
|
|
264
|
+
if (props[propName] == null) {
|
|
265
|
+
if (isRequired) {
|
|
266
|
+
if (props[propName] === null) {
|
|
267
|
+
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
|
|
268
|
+
}
|
|
269
|
+
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
|
|
270
|
+
}
|
|
271
|
+
return null;
|
|
272
|
+
} else {
|
|
273
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
274
|
+
}
|
|
193
275
|
}
|
|
194
|
-
var
|
|
195
|
-
|
|
276
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
277
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
278
|
+
return chainedCheckType;
|
|
196
279
|
}
|
|
197
|
-
function
|
|
198
|
-
function
|
|
199
|
-
var
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
280
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
281
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
282
|
+
var propValue = props[propName];
|
|
283
|
+
var propType = getPropType(propValue);
|
|
284
|
+
if (propType !== expectedType) {
|
|
285
|
+
var preciseType = getPreciseType(propValue);
|
|
286
|
+
return new PropTypeError(
|
|
287
|
+
"Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
|
|
288
|
+
{ expectedType }
|
|
205
289
|
);
|
|
206
290
|
}
|
|
207
291
|
return null;
|
|
208
292
|
}
|
|
209
|
-
return
|
|
293
|
+
return createChainableTypeChecker(validate);
|
|
210
294
|
}
|
|
211
|
-
function
|
|
212
|
-
return
|
|
295
|
+
function createAnyTypeChecker() {
|
|
296
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
213
297
|
}
|
|
214
|
-
function
|
|
215
|
-
function
|
|
216
|
-
if (typeof
|
|
217
|
-
return new
|
|
218
|
-
var w = g[f];
|
|
219
|
-
if (!Array.isArray(w)) {
|
|
220
|
-
var h = B(w);
|
|
221
|
-
return new C("Invalid " + m + " `" + p + "` of type " + ("`" + h + "` supplied to `" + _ + "`, expected an array."));
|
|
298
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
299
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
300
|
+
if (typeof typeChecker !== "function") {
|
|
301
|
+
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
|
|
222
302
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
303
|
+
var propValue = props[propName];
|
|
304
|
+
if (!Array.isArray(propValue)) {
|
|
305
|
+
var propType = getPropType(propValue);
|
|
306
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
|
|
307
|
+
}
|
|
308
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
309
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
|
|
310
|
+
if (error instanceof Error) {
|
|
311
|
+
return error;
|
|
312
|
+
}
|
|
227
313
|
}
|
|
228
314
|
return null;
|
|
229
315
|
}
|
|
230
|
-
return
|
|
316
|
+
return createChainableTypeChecker(validate);
|
|
231
317
|
}
|
|
232
|
-
function
|
|
233
|
-
function
|
|
234
|
-
var
|
|
235
|
-
if (!
|
|
236
|
-
var
|
|
237
|
-
return new
|
|
318
|
+
function createElementTypeChecker() {
|
|
319
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
320
|
+
var propValue = props[propName];
|
|
321
|
+
if (!isValidElement(propValue)) {
|
|
322
|
+
var propType = getPropType(propValue);
|
|
323
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
|
|
238
324
|
}
|
|
239
325
|
return null;
|
|
240
326
|
}
|
|
241
|
-
return
|
|
327
|
+
return createChainableTypeChecker(validate);
|
|
242
328
|
}
|
|
243
|
-
function
|
|
244
|
-
function
|
|
245
|
-
var
|
|
246
|
-
if (!
|
|
247
|
-
var
|
|
248
|
-
return new
|
|
329
|
+
function createElementTypeTypeChecker() {
|
|
330
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
331
|
+
var propValue = props[propName];
|
|
332
|
+
if (!ReactIs.isValidElementType(propValue)) {
|
|
333
|
+
var propType = getPropType(propValue);
|
|
334
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
|
|
249
335
|
}
|
|
250
336
|
return null;
|
|
251
337
|
}
|
|
252
|
-
return
|
|
338
|
+
return createChainableTypeChecker(validate);
|
|
253
339
|
}
|
|
254
|
-
function
|
|
255
|
-
function
|
|
256
|
-
if (!(
|
|
257
|
-
var
|
|
258
|
-
|
|
340
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
341
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
342
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
343
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
344
|
+
var actualClassName = getClassName(props[propName]);
|
|
345
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
|
|
259
346
|
}
|
|
260
347
|
return null;
|
|
261
348
|
}
|
|
262
|
-
return
|
|
349
|
+
return createChainableTypeChecker(validate);
|
|
263
350
|
}
|
|
264
|
-
function
|
|
265
|
-
if (!Array.isArray(
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
351
|
+
function createEnumTypeChecker(expectedValues) {
|
|
352
|
+
if (!Array.isArray(expectedValues)) {
|
|
353
|
+
if (process.env.NODE_ENV !== "production") {
|
|
354
|
+
if (arguments.length > 1) {
|
|
355
|
+
printWarning(
|
|
356
|
+
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
357
|
+
);
|
|
358
|
+
} else {
|
|
359
|
+
printWarning("Invalid argument supplied to oneOf, expected an array.");
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
return emptyFunctionThatReturnsNull;
|
|
363
|
+
}
|
|
364
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
365
|
+
var propValue = props[propName];
|
|
366
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
367
|
+
if (is(propValue, expectedValues[i])) {
|
|
272
368
|
return null;
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
372
|
+
var type = getPreciseType(value);
|
|
373
|
+
if (type === "symbol") {
|
|
374
|
+
return String(value);
|
|
375
|
+
}
|
|
376
|
+
return value;
|
|
276
377
|
});
|
|
277
|
-
return new
|
|
378
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
|
|
278
379
|
}
|
|
279
|
-
return
|
|
380
|
+
return createChainableTypeChecker(validate);
|
|
280
381
|
}
|
|
281
|
-
function
|
|
282
|
-
function
|
|
283
|
-
if (typeof
|
|
284
|
-
return new
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
382
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
383
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
384
|
+
if (typeof typeChecker !== "function") {
|
|
385
|
+
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
|
|
386
|
+
}
|
|
387
|
+
var propValue = props[propName];
|
|
388
|
+
var propType = getPropType(propValue);
|
|
389
|
+
if (propType !== "object") {
|
|
390
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
|
|
391
|
+
}
|
|
392
|
+
for (var key in propValue) {
|
|
393
|
+
if (has2(propValue, key)) {
|
|
394
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
395
|
+
if (error instanceof Error) {
|
|
396
|
+
return error;
|
|
397
|
+
}
|
|
293
398
|
}
|
|
399
|
+
}
|
|
294
400
|
return null;
|
|
295
401
|
}
|
|
296
|
-
return
|
|
402
|
+
return createChainableTypeChecker(validate);
|
|
297
403
|
}
|
|
298
|
-
function
|
|
299
|
-
if (!Array.isArray(
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
var g = t[c];
|
|
303
|
-
if (typeof g != "function")
|
|
304
|
-
return n(
|
|
305
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ke(g) + " at index " + c + "."
|
|
306
|
-
), s;
|
|
404
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
405
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
406
|
+
process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
|
|
407
|
+
return emptyFunctionThatReturnsNull;
|
|
307
408
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
409
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
410
|
+
var checker = arrayOfTypeCheckers[i];
|
|
411
|
+
if (typeof checker !== "function") {
|
|
412
|
+
printWarning(
|
|
413
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
|
|
414
|
+
);
|
|
415
|
+
return emptyFunctionThatReturnsNull;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
419
|
+
var expectedTypes = [];
|
|
420
|
+
for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
|
|
421
|
+
var checker2 = arrayOfTypeCheckers[i2];
|
|
422
|
+
var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
423
|
+
if (checkerResult == null) {
|
|
312
424
|
return null;
|
|
313
|
-
|
|
425
|
+
}
|
|
426
|
+
if (checkerResult.data && has2(checkerResult.data, "expectedType")) {
|
|
427
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
428
|
+
}
|
|
314
429
|
}
|
|
315
|
-
var
|
|
316
|
-
return new
|
|
430
|
+
var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
|
|
431
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
|
|
317
432
|
}
|
|
318
|
-
return
|
|
433
|
+
return createChainableTypeChecker(validate);
|
|
319
434
|
}
|
|
320
|
-
function
|
|
321
|
-
function
|
|
322
|
-
|
|
435
|
+
function createNodeChecker() {
|
|
436
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
437
|
+
if (!isNode(props[propName])) {
|
|
438
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
|
|
439
|
+
}
|
|
440
|
+
return null;
|
|
323
441
|
}
|
|
324
|
-
return
|
|
442
|
+
return createChainableTypeChecker(validate);
|
|
325
443
|
}
|
|
326
|
-
function
|
|
327
|
-
return new
|
|
328
|
-
(
|
|
444
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
445
|
+
return new PropTypeError(
|
|
446
|
+
(componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
|
|
329
447
|
);
|
|
330
448
|
}
|
|
331
|
-
function
|
|
332
|
-
function
|
|
333
|
-
var
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
449
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
450
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
451
|
+
var propValue = props[propName];
|
|
452
|
+
var propType = getPropType(propValue);
|
|
453
|
+
if (propType !== "object") {
|
|
454
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
455
|
+
}
|
|
456
|
+
for (var key in shapeTypes) {
|
|
457
|
+
var checker = shapeTypes[key];
|
|
458
|
+
if (typeof checker !== "function") {
|
|
459
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
460
|
+
}
|
|
461
|
+
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
462
|
+
if (error) {
|
|
463
|
+
return error;
|
|
464
|
+
}
|
|
343
465
|
}
|
|
344
466
|
return null;
|
|
345
467
|
}
|
|
346
|
-
return
|
|
468
|
+
return createChainableTypeChecker(validate);
|
|
347
469
|
}
|
|
348
|
-
function
|
|
349
|
-
function
|
|
350
|
-
var
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
if (
|
|
359
|
-
return
|
|
360
|
-
|
|
361
|
-
|
|
470
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
471
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
472
|
+
var propValue = props[propName];
|
|
473
|
+
var propType = getPropType(propValue);
|
|
474
|
+
if (propType !== "object") {
|
|
475
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
476
|
+
}
|
|
477
|
+
var allKeys = assign({}, props[propName], shapeTypes);
|
|
478
|
+
for (var key in allKeys) {
|
|
479
|
+
var checker = shapeTypes[key];
|
|
480
|
+
if (has2(shapeTypes, key) && typeof checker !== "function") {
|
|
481
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
482
|
+
}
|
|
483
|
+
if (!checker) {
|
|
484
|
+
return new PropTypeError(
|
|
485
|
+
"Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
|
|
362
486
|
);
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
487
|
+
}
|
|
488
|
+
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
489
|
+
if (error) {
|
|
490
|
+
return error;
|
|
491
|
+
}
|
|
366
492
|
}
|
|
367
493
|
return null;
|
|
368
494
|
}
|
|
369
|
-
return
|
|
495
|
+
return createChainableTypeChecker(validate);
|
|
370
496
|
}
|
|
371
|
-
function
|
|
372
|
-
switch (typeof
|
|
497
|
+
function isNode(propValue) {
|
|
498
|
+
switch (typeof propValue) {
|
|
373
499
|
case "number":
|
|
374
500
|
case "string":
|
|
375
501
|
case "undefined":
|
|
376
|
-
return
|
|
502
|
+
return true;
|
|
377
503
|
case "boolean":
|
|
378
|
-
return !
|
|
504
|
+
return !propValue;
|
|
379
505
|
case "object":
|
|
380
|
-
if (Array.isArray(
|
|
381
|
-
return
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
return !1;
|
|
506
|
+
if (Array.isArray(propValue)) {
|
|
507
|
+
return propValue.every(isNode);
|
|
508
|
+
}
|
|
509
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
510
|
+
return true;
|
|
511
|
+
}
|
|
512
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
513
|
+
if (iteratorFn) {
|
|
514
|
+
var iterator = iteratorFn.call(propValue);
|
|
515
|
+
var step;
|
|
516
|
+
if (iteratorFn !== propValue.entries) {
|
|
517
|
+
while (!(step = iterator.next()).done) {
|
|
518
|
+
if (!isNode(step.value)) {
|
|
519
|
+
return false;
|
|
520
|
+
}
|
|
396
521
|
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
522
|
+
} else {
|
|
523
|
+
while (!(step = iterator.next()).done) {
|
|
524
|
+
var entry = step.value;
|
|
525
|
+
if (entry) {
|
|
526
|
+
if (!isNode(entry[1])) {
|
|
527
|
+
return false;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
} else {
|
|
533
|
+
return false;
|
|
534
|
+
}
|
|
535
|
+
return true;
|
|
400
536
|
default:
|
|
401
|
-
return
|
|
537
|
+
return false;
|
|
402
538
|
}
|
|
403
539
|
}
|
|
404
|
-
function
|
|
405
|
-
|
|
540
|
+
function isSymbol(propType, propValue) {
|
|
541
|
+
if (propType === "symbol") {
|
|
542
|
+
return true;
|
|
543
|
+
}
|
|
544
|
+
if (!propValue) {
|
|
545
|
+
return false;
|
|
546
|
+
}
|
|
547
|
+
if (propValue["@@toStringTag"] === "Symbol") {
|
|
548
|
+
return true;
|
|
549
|
+
}
|
|
550
|
+
if (typeof Symbol === "function" && propValue instanceof Symbol) {
|
|
551
|
+
return true;
|
|
552
|
+
}
|
|
553
|
+
return false;
|
|
406
554
|
}
|
|
407
|
-
function
|
|
408
|
-
var
|
|
409
|
-
|
|
555
|
+
function getPropType(propValue) {
|
|
556
|
+
var propType = typeof propValue;
|
|
557
|
+
if (Array.isArray(propValue)) {
|
|
558
|
+
return "array";
|
|
559
|
+
}
|
|
560
|
+
if (propValue instanceof RegExp) {
|
|
561
|
+
return "object";
|
|
562
|
+
}
|
|
563
|
+
if (isSymbol(propType, propValue)) {
|
|
564
|
+
return "symbol";
|
|
565
|
+
}
|
|
566
|
+
return propType;
|
|
410
567
|
}
|
|
411
|
-
function
|
|
412
|
-
if (typeof
|
|
413
|
-
return "" +
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
568
|
+
function getPreciseType(propValue) {
|
|
569
|
+
if (typeof propValue === "undefined" || propValue === null) {
|
|
570
|
+
return "" + propValue;
|
|
571
|
+
}
|
|
572
|
+
var propType = getPropType(propValue);
|
|
573
|
+
if (propType === "object") {
|
|
574
|
+
if (propValue instanceof Date) {
|
|
417
575
|
return "date";
|
|
418
|
-
if (
|
|
576
|
+
} else if (propValue instanceof RegExp) {
|
|
419
577
|
return "regexp";
|
|
578
|
+
}
|
|
420
579
|
}
|
|
421
|
-
return
|
|
580
|
+
return propType;
|
|
422
581
|
}
|
|
423
|
-
function
|
|
424
|
-
var
|
|
425
|
-
switch (
|
|
582
|
+
function getPostfixForTypeWarning(value) {
|
|
583
|
+
var type = getPreciseType(value);
|
|
584
|
+
switch (type) {
|
|
426
585
|
case "array":
|
|
427
586
|
case "object":
|
|
428
|
-
return "an " +
|
|
587
|
+
return "an " + type;
|
|
429
588
|
case "boolean":
|
|
430
589
|
case "date":
|
|
431
590
|
case "regexp":
|
|
432
|
-
return "a " +
|
|
591
|
+
return "a " + type;
|
|
433
592
|
default:
|
|
434
|
-
return
|
|
593
|
+
return type;
|
|
435
594
|
}
|
|
436
595
|
}
|
|
437
|
-
function
|
|
438
|
-
|
|
596
|
+
function getClassName(propValue) {
|
|
597
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
598
|
+
return ANONYMOUS;
|
|
599
|
+
}
|
|
600
|
+
return propValue.constructor.name;
|
|
439
601
|
}
|
|
440
|
-
|
|
441
|
-
|
|
602
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
603
|
+
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
604
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
605
|
+
return ReactPropTypes;
|
|
606
|
+
};
|
|
607
|
+
return factoryWithTypeCheckers;
|
|
442
608
|
}
|
|
443
|
-
var
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
609
|
+
var factoryWithThrowingShims;
|
|
610
|
+
var hasRequiredFactoryWithThrowingShims;
|
|
611
|
+
function requireFactoryWithThrowingShims() {
|
|
612
|
+
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
613
|
+
hasRequiredFactoryWithThrowingShims = 1;
|
|
614
|
+
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
615
|
+
function emptyFunction() {
|
|
449
616
|
}
|
|
450
|
-
function
|
|
617
|
+
function emptyFunctionWithReset() {
|
|
451
618
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
);
|
|
458
|
-
throw M.name = "Invariant Violation", M;
|
|
619
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
620
|
+
factoryWithThrowingShims = function() {
|
|
621
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
622
|
+
if (secret === ReactPropTypesSecret) {
|
|
623
|
+
return;
|
|
459
624
|
}
|
|
625
|
+
var err = new Error(
|
|
626
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
627
|
+
);
|
|
628
|
+
err.name = "Invariant Violation";
|
|
629
|
+
throw err;
|
|
460
630
|
}
|
|
461
|
-
|
|
462
|
-
function
|
|
463
|
-
return
|
|
631
|
+
shim.isRequired = shim;
|
|
632
|
+
function getShim() {
|
|
633
|
+
return shim;
|
|
464
634
|
}
|
|
465
|
-
var
|
|
466
|
-
array:
|
|
467
|
-
bigint:
|
|
468
|
-
bool:
|
|
469
|
-
func:
|
|
470
|
-
number:
|
|
471
|
-
object:
|
|
472
|
-
string:
|
|
473
|
-
symbol:
|
|
474
|
-
any:
|
|
475
|
-
arrayOf:
|
|
476
|
-
element:
|
|
477
|
-
elementType:
|
|
478
|
-
instanceOf:
|
|
479
|
-
node:
|
|
480
|
-
objectOf:
|
|
481
|
-
oneOf:
|
|
482
|
-
oneOfType:
|
|
483
|
-
shape:
|
|
484
|
-
exact:
|
|
485
|
-
checkPropTypes:
|
|
486
|
-
resetWarningCache:
|
|
635
|
+
var ReactPropTypes = {
|
|
636
|
+
array: shim,
|
|
637
|
+
bigint: shim,
|
|
638
|
+
bool: shim,
|
|
639
|
+
func: shim,
|
|
640
|
+
number: shim,
|
|
641
|
+
object: shim,
|
|
642
|
+
string: shim,
|
|
643
|
+
symbol: shim,
|
|
644
|
+
any: shim,
|
|
645
|
+
arrayOf: getShim,
|
|
646
|
+
element: shim,
|
|
647
|
+
elementType: shim,
|
|
648
|
+
instanceOf: getShim,
|
|
649
|
+
node: shim,
|
|
650
|
+
objectOf: getShim,
|
|
651
|
+
oneOf: getShim,
|
|
652
|
+
oneOfType: getShim,
|
|
653
|
+
shape: getShim,
|
|
654
|
+
exact: getShim,
|
|
655
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
656
|
+
resetWarningCache: emptyFunction
|
|
487
657
|
};
|
|
488
|
-
|
|
489
|
-
|
|
658
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
659
|
+
return ReactPropTypes;
|
|
660
|
+
};
|
|
661
|
+
return factoryWithThrowingShims;
|
|
490
662
|
}
|
|
491
663
|
if (process.env.NODE_ENV !== "production") {
|
|
492
|
-
var
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
664
|
+
var ReactIs = require$$0;
|
|
665
|
+
var throwOnDirectAccess = true;
|
|
666
|
+
propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
667
|
+
} else {
|
|
668
|
+
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
669
|
+
}
|
|
670
|
+
var propTypesExports = propTypes.exports;
|
|
671
|
+
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
|
|
672
|
+
const responsivePropType = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};
|
|
673
|
+
function getPath(obj, path, checkVars = true) {
|
|
674
|
+
if (obj && obj.vars && checkVars) {
|
|
675
|
+
const val = `vars.${path}`.split(".").reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);
|
|
676
|
+
if (val != null) {
|
|
677
|
+
return val;
|
|
678
|
+
}
|
|
503
679
|
}
|
|
504
|
-
return
|
|
680
|
+
return path.split(".").reduce((acc, item) => {
|
|
681
|
+
if (acc && acc[item] != null) {
|
|
682
|
+
return acc[item];
|
|
683
|
+
}
|
|
684
|
+
return null;
|
|
685
|
+
}, obj);
|
|
505
686
|
}
|
|
506
|
-
const
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
687
|
+
const marginKeys = ["m", "mt", "mr", "mb", "ml", "mx", "my", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "marginInline", "marginInlineStart", "marginInlineEnd", "marginBlock", "marginBlockStart", "marginBlockEnd"];
|
|
688
|
+
const paddingKeys = ["p", "pt", "pr", "pb", "pl", "px", "py", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd"];
|
|
689
|
+
const spacingKeys = [...marginKeys, ...paddingKeys];
|
|
690
|
+
function createUnaryUnit(theme, themeKey, defaultValue, propName) {
|
|
691
|
+
var _getPath;
|
|
692
|
+
const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;
|
|
693
|
+
if (typeof themeSpacing === "number") {
|
|
694
|
+
return (abs) => {
|
|
695
|
+
if (typeof abs === "string") {
|
|
696
|
+
return abs;
|
|
697
|
+
}
|
|
698
|
+
if (process.env.NODE_ENV !== "production") {
|
|
699
|
+
if (typeof abs !== "number") {
|
|
700
|
+
console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
return themeSpacing * abs;
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
if (Array.isArray(themeSpacing)) {
|
|
707
|
+
return (abs) => {
|
|
708
|
+
if (typeof abs === "string") {
|
|
709
|
+
return abs;
|
|
710
|
+
}
|
|
711
|
+
if (process.env.NODE_ENV !== "production") {
|
|
712
|
+
if (!Number.isInteger(abs)) {
|
|
713
|
+
console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join("\n"));
|
|
714
|
+
} else if (abs > themeSpacing.length - 1) {
|
|
715
|
+
console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join("\n"));
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
return themeSpacing[abs];
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
if (typeof themeSpacing === "function") {
|
|
722
|
+
return themeSpacing;
|
|
723
|
+
}
|
|
724
|
+
if (process.env.NODE_ENV !== "production") {
|
|
725
|
+
console.error([`MUI: The \`theme.${themeKey}\` value (${themeSpacing}) is invalid.`, "It should be a number, an array or a function."].join("\n"));
|
|
726
|
+
}
|
|
727
|
+
return () => void 0;
|
|
515
728
|
}
|
|
516
|
-
function
|
|
517
|
-
return
|
|
729
|
+
function createUnarySpacing(theme) {
|
|
730
|
+
return createUnaryUnit(theme, "spacing", 8, "spacing");
|
|
518
731
|
}
|
|
519
|
-
process.env.NODE_ENV !== "production"
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
732
|
+
process.env.NODE_ENV !== "production" ? marginKeys.reduce((obj, key) => {
|
|
733
|
+
obj[key] = responsivePropType;
|
|
734
|
+
return obj;
|
|
735
|
+
}, {}) : {};
|
|
736
|
+
process.env.NODE_ENV !== "production" ? paddingKeys.reduce((obj, key) => {
|
|
737
|
+
obj[key] = responsivePropType;
|
|
738
|
+
return obj;
|
|
739
|
+
}, {}) : {};
|
|
740
|
+
process.env.NODE_ENV !== "production" ? spacingKeys.reduce((obj, key) => {
|
|
741
|
+
obj[key] = responsivePropType;
|
|
742
|
+
return obj;
|
|
743
|
+
}, {}) : {};
|
|
744
|
+
function createSpacing(spacingInput = 8) {
|
|
745
|
+
if (spacingInput.mui) {
|
|
746
|
+
return spacingInput;
|
|
747
|
+
}
|
|
748
|
+
const transform = createUnarySpacing({
|
|
749
|
+
spacing: spacingInput
|
|
750
|
+
});
|
|
751
|
+
const spacing = (...argsInput) => {
|
|
752
|
+
if (process.env.NODE_ENV !== "production") {
|
|
753
|
+
if (!(argsInput.length <= 4)) {
|
|
754
|
+
console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
const args = argsInput.length === 0 ? [1] : argsInput;
|
|
758
|
+
return args.map((argument) => {
|
|
759
|
+
const output = transform(argument);
|
|
760
|
+
return typeof output === "number" ? `${output}px` : output;
|
|
761
|
+
}).join(" ");
|
|
762
|
+
};
|
|
763
|
+
spacing.mui = true;
|
|
764
|
+
return spacing;
|
|
532
765
|
}
|
|
533
|
-
const
|
|
766
|
+
const SPACING = 8;
|
|
767
|
+
const BREAKPOINTS = {
|
|
534
768
|
XS: 320,
|
|
535
769
|
SM: 600,
|
|
536
770
|
MD: 960,
|
|
537
771
|
LG: 1280,
|
|
538
772
|
XL: 1600
|
|
539
|
-
}
|
|
773
|
+
};
|
|
774
|
+
const getSpacing = createSpacing(SPACING);
|
|
775
|
+
const ICON_SIZE_SMALL = getSpacing(1.5);
|
|
776
|
+
const ICON_SIZE_MEDIUM = getSpacing(2.25);
|
|
777
|
+
const ICON_SIZE_LARGE = getSpacing(3);
|
|
778
|
+
const APPBAR_SIZE = getSpacing(6);
|
|
779
|
+
const NOTIFICATION_DURATION_IN_MS = 6e3;
|
|
780
|
+
const FontWeight = {
|
|
540
781
|
regular: 400,
|
|
541
782
|
medium: 500,
|
|
542
783
|
strong: 600
|
|
543
784
|
};
|
|
544
|
-
function
|
|
545
|
-
const
|
|
546
|
-
fontWeight:
|
|
547
|
-
fontStyle:
|
|
785
|
+
function _Typography({ italic, weight, style, children, ...otherProps }, ref) {
|
|
786
|
+
const fontConfiguration = {
|
|
787
|
+
fontWeight: FontWeight[weight],
|
|
788
|
+
fontStyle: italic ? "italic" : void 0
|
|
548
789
|
};
|
|
549
|
-
return /* @__PURE__ */
|
|
550
|
-
|
|
790
|
+
return /* @__PURE__ */ jsx(
|
|
791
|
+
Typography$1,
|
|
551
792
|
{
|
|
552
|
-
...
|
|
553
|
-
ref
|
|
793
|
+
...otherProps,
|
|
794
|
+
ref,
|
|
554
795
|
style: {
|
|
555
|
-
...
|
|
556
|
-
...
|
|
796
|
+
...fontConfiguration,
|
|
797
|
+
...style
|
|
557
798
|
},
|
|
558
799
|
"data-name": "typography",
|
|
559
|
-
children
|
|
800
|
+
children
|
|
560
801
|
}
|
|
561
802
|
);
|
|
562
803
|
}
|
|
563
|
-
const
|
|
804
|
+
const Typography = forwardRef(_Typography);
|
|
805
|
+
const en = {
|
|
564
806
|
c4r: {
|
|
565
807
|
button: {
|
|
566
808
|
cancel: "Cancel",
|
|
567
809
|
leave: "Leave",
|
|
810
|
+
keepEditing: "Keep editing",
|
|
568
811
|
close: "Close",
|
|
569
|
-
|
|
812
|
+
expand: "Expand",
|
|
813
|
+
copy: "Copy",
|
|
814
|
+
save: "Save",
|
|
815
|
+
add: "Add",
|
|
816
|
+
showOptions: "Show options"
|
|
570
817
|
},
|
|
571
818
|
form: {
|
|
572
819
|
selectAll: "Select all",
|
|
@@ -600,6 +847,7 @@ const qa = De(ta), ia = {
|
|
|
600
847
|
}
|
|
601
848
|
},
|
|
602
849
|
notifications: {
|
|
850
|
+
changesSaved: "Changes saved successfully",
|
|
603
851
|
copiedToClipboard: "Copied to clipboard"
|
|
604
852
|
},
|
|
605
853
|
widgets: {
|
|
@@ -701,13 +949,19 @@ const qa = De(ta), ia = {
|
|
|
701
949
|
}
|
|
702
950
|
}
|
|
703
951
|
}
|
|
704
|
-
}
|
|
952
|
+
};
|
|
953
|
+
const es = {
|
|
705
954
|
c4r: {
|
|
706
955
|
button: {
|
|
707
956
|
cancel: "Cancelar",
|
|
708
957
|
leave: "Salir",
|
|
958
|
+
keepEditing: "Seguir editando",
|
|
709
959
|
close: "Cerrar",
|
|
710
|
-
|
|
960
|
+
expand: "Expandir",
|
|
961
|
+
copy: "Copiar",
|
|
962
|
+
save: "Guardar",
|
|
963
|
+
add: "Añadir",
|
|
964
|
+
showOptions: "Mostrar opciones"
|
|
711
965
|
},
|
|
712
966
|
form: {
|
|
713
967
|
selectAll: "Seleccionar todos",
|
|
@@ -741,6 +995,7 @@ const qa = De(ta), ia = {
|
|
|
741
995
|
}
|
|
742
996
|
},
|
|
743
997
|
notifications: {
|
|
998
|
+
changesSaved: "Cambios guardados correctamente",
|
|
744
999
|
copiedToClipboard: "Copiado al portapapeles"
|
|
745
1000
|
},
|
|
746
1001
|
widgets: {
|
|
@@ -840,13 +1095,19 @@ const qa = De(ta), ia = {
|
|
|
840
1095
|
}
|
|
841
1096
|
}
|
|
842
1097
|
}
|
|
843
|
-
}
|
|
1098
|
+
};
|
|
1099
|
+
const id = {
|
|
844
1100
|
c4r: {
|
|
845
1101
|
button: {
|
|
846
1102
|
cancel: "Batal",
|
|
847
1103
|
leave: "Keluar",
|
|
1104
|
+
keepEditing: "Terus mengedit",
|
|
848
1105
|
close: "Tutup",
|
|
849
|
-
|
|
1106
|
+
expand: "Perluas",
|
|
1107
|
+
copy: "Salin",
|
|
1108
|
+
save: "Simpan",
|
|
1109
|
+
add: "Tambah",
|
|
1110
|
+
showOptions: "Tampilkan opsi"
|
|
850
1111
|
},
|
|
851
1112
|
form: {
|
|
852
1113
|
selectAll: "Select all",
|
|
@@ -880,6 +1141,7 @@ const qa = De(ta), ia = {
|
|
|
880
1141
|
}
|
|
881
1142
|
},
|
|
882
1143
|
notifications: {
|
|
1144
|
+
changesSaved: "Changes saved successfully",
|
|
883
1145
|
copiedToClipboard: "Tersalin ke clipboard"
|
|
884
1146
|
},
|
|
885
1147
|
widgets: {
|
|
@@ -981,16 +1243,25 @@ const qa = De(ta), ia = {
|
|
|
981
1243
|
}
|
|
982
1244
|
}
|
|
983
1245
|
}
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
|
|
1246
|
+
};
|
|
1247
|
+
const messages = { en, es, id };
|
|
1248
|
+
function CanonicalizeLocaleList(locales) {
|
|
1249
|
+
return Intl.getCanonicalLocales(locales);
|
|
987
1250
|
}
|
|
988
|
-
function
|
|
989
|
-
if (
|
|
990
|
-
(
|
|
991
|
-
|
|
1251
|
+
function __spreadArray(to, from, pack) {
|
|
1252
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
1253
|
+
if (ar || !(i in from)) {
|
|
1254
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
1255
|
+
ar[i] = from[i];
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
992
1259
|
}
|
|
993
|
-
|
|
1260
|
+
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
1261
|
+
var e = new Error(message);
|
|
1262
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1263
|
+
};
|
|
1264
|
+
var data = {
|
|
994
1265
|
supplemental: {
|
|
995
1266
|
languageMatching: {
|
|
996
1267
|
"written-new": [
|
|
@@ -3609,7 +3880,8 @@ var Q = {
|
|
|
3609
3880
|
]
|
|
3610
3881
|
}
|
|
3611
3882
|
}
|
|
3612
|
-
}
|
|
3883
|
+
};
|
|
3884
|
+
var regions = {
|
|
3613
3885
|
"001": [
|
|
3614
3886
|
"001",
|
|
3615
3887
|
"001-status-grouping",
|
|
@@ -4374,7 +4646,7 @@ var Q = {
|
|
|
4374
4646
|
"WF",
|
|
4375
4647
|
"WS"
|
|
4376
4648
|
],
|
|
4377
|
-
142: [
|
|
4649
|
+
"142": [
|
|
4378
4650
|
"030",
|
|
4379
4651
|
"034",
|
|
4380
4652
|
"035",
|
|
@@ -4433,7 +4705,7 @@ var Q = {
|
|
|
4433
4705
|
"VN",
|
|
4434
4706
|
"YE"
|
|
4435
4707
|
],
|
|
4436
|
-
143: [
|
|
4708
|
+
"143": [
|
|
4437
4709
|
"143",
|
|
4438
4710
|
"KG",
|
|
4439
4711
|
"KZ",
|
|
@@ -4441,7 +4713,7 @@ var Q = {
|
|
|
4441
4713
|
"TM",
|
|
4442
4714
|
"UZ"
|
|
4443
4715
|
],
|
|
4444
|
-
145: [
|
|
4716
|
+
"145": [
|
|
4445
4717
|
"145",
|
|
4446
4718
|
"AE",
|
|
4447
4719
|
"AM",
|
|
@@ -4462,7 +4734,7 @@ var Q = {
|
|
|
4462
4734
|
"TR",
|
|
4463
4735
|
"YE"
|
|
4464
4736
|
],
|
|
4465
|
-
150: [
|
|
4737
|
+
"150": [
|
|
4466
4738
|
"039",
|
|
4467
4739
|
"150",
|
|
4468
4740
|
"151",
|
|
@@ -4522,7 +4794,7 @@ var Q = {
|
|
|
4522
4794
|
"VA",
|
|
4523
4795
|
"XK"
|
|
4524
4796
|
],
|
|
4525
|
-
151: [
|
|
4797
|
+
"151": [
|
|
4526
4798
|
"151",
|
|
4527
4799
|
"BG",
|
|
4528
4800
|
"BY",
|
|
@@ -4535,7 +4807,7 @@ var Q = {
|
|
|
4535
4807
|
"SK",
|
|
4536
4808
|
"UA"
|
|
4537
4809
|
],
|
|
4538
|
-
154: [
|
|
4810
|
+
"154": [
|
|
4539
4811
|
"154",
|
|
4540
4812
|
"AX",
|
|
4541
4813
|
"CQ",
|
|
@@ -4555,7 +4827,7 @@ var Q = {
|
|
|
4555
4827
|
"SE",
|
|
4556
4828
|
"SJ"
|
|
4557
4829
|
],
|
|
4558
|
-
155: [
|
|
4830
|
+
"155": [
|
|
4559
4831
|
"155",
|
|
4560
4832
|
"AT",
|
|
4561
4833
|
"BE",
|
|
@@ -4567,7 +4839,7 @@ var Q = {
|
|
|
4567
4839
|
"MC",
|
|
4568
4840
|
"NL"
|
|
4569
4841
|
],
|
|
4570
|
-
202: [
|
|
4842
|
+
"202": [
|
|
4571
4843
|
"011",
|
|
4572
4844
|
"014",
|
|
4573
4845
|
"017",
|
|
@@ -4627,7 +4899,7 @@ var Q = {
|
|
|
4627
4899
|
"ZM",
|
|
4628
4900
|
"ZW"
|
|
4629
4901
|
],
|
|
4630
|
-
419: [
|
|
4902
|
+
"419": [
|
|
4631
4903
|
"005",
|
|
4632
4904
|
"013",
|
|
4633
4905
|
"029",
|
|
@@ -4685,7 +4957,7 @@ var Q = {
|
|
|
4685
4957
|
"VG",
|
|
4686
4958
|
"VI"
|
|
4687
4959
|
],
|
|
4688
|
-
EU: [
|
|
4960
|
+
"EU": [
|
|
4689
4961
|
"AT",
|
|
4690
4962
|
"BE",
|
|
4691
4963
|
"BG",
|
|
@@ -4715,7 +4987,7 @@ var Q = {
|
|
|
4715
4987
|
"SI",
|
|
4716
4988
|
"SK"
|
|
4717
4989
|
],
|
|
4718
|
-
EZ: [
|
|
4990
|
+
"EZ": [
|
|
4719
4991
|
"AT",
|
|
4720
4992
|
"BE",
|
|
4721
4993
|
"CY",
|
|
@@ -4737,7 +5009,7 @@ var Q = {
|
|
|
4737
5009
|
"SI",
|
|
4738
5010
|
"SK"
|
|
4739
5011
|
],
|
|
4740
|
-
QO: [
|
|
5012
|
+
"QO": [
|
|
4741
5013
|
"AC",
|
|
4742
5014
|
"AQ",
|
|
4743
5015
|
"CP",
|
|
@@ -4745,7 +5017,7 @@ var Q = {
|
|
|
4745
5017
|
"QO",
|
|
4746
5018
|
"TA"
|
|
4747
5019
|
],
|
|
4748
|
-
UN: [
|
|
5020
|
+
"UN": [
|
|
4749
5021
|
"AD",
|
|
4750
5022
|
"AE",
|
|
4751
5023
|
"AF",
|
|
@@ -4941,275 +5213,433 @@ var Q = {
|
|
|
4941
5213
|
"ZM",
|
|
4942
5214
|
"ZW"
|
|
4943
5215
|
]
|
|
4944
|
-
}
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
5216
|
+
};
|
|
5217
|
+
var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
|
|
5218
|
+
function invariant(condition, message, Err) {
|
|
5219
|
+
if (Err === void 0) {
|
|
5220
|
+
Err = Error;
|
|
5221
|
+
}
|
|
5222
|
+
if (!condition) {
|
|
5223
|
+
throw new Err(message);
|
|
5224
|
+
}
|
|
4948
5225
|
}
|
|
4949
|
-
var
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
5226
|
+
var DEFAULT_MATCHING_THRESHOLD = 838;
|
|
5227
|
+
var PROCESSED_DATA;
|
|
5228
|
+
function processData() {
|
|
5229
|
+
var _a, _b;
|
|
5230
|
+
if (!PROCESSED_DATA) {
|
|
5231
|
+
var paradigmLocales = (_b = (_a = data.supplemental.languageMatching["written-new"][0]) === null || _a === void 0 ? void 0 : _a.paradigmLocales) === null || _b === void 0 ? void 0 : _b._locales.split(" ");
|
|
5232
|
+
var matchVariables = data.supplemental.languageMatching["written-new"].slice(1, 5);
|
|
5233
|
+
var data$1 = data.supplemental.languageMatching["written-new"].slice(5);
|
|
5234
|
+
var matches = data$1.map(function(d) {
|
|
5235
|
+
var key = Object.keys(d)[0];
|
|
5236
|
+
var value = d[key];
|
|
4955
5237
|
return {
|
|
4956
|
-
supported:
|
|
4957
|
-
desired:
|
|
4958
|
-
distance: +
|
|
4959
|
-
oneway:
|
|
5238
|
+
supported: key,
|
|
5239
|
+
desired: value._desired,
|
|
5240
|
+
distance: +value._distance,
|
|
5241
|
+
oneway: value.oneway === "true" ? true : false
|
|
4960
5242
|
};
|
|
4961
5243
|
}, {});
|
|
4962
|
-
|
|
4963
|
-
matches
|
|
4964
|
-
matchVariables:
|
|
4965
|
-
var
|
|
4966
|
-
|
|
5244
|
+
PROCESSED_DATA = {
|
|
5245
|
+
matches,
|
|
5246
|
+
matchVariables: matchVariables.reduce(function(all, d) {
|
|
5247
|
+
var key = Object.keys(d)[0];
|
|
5248
|
+
var value = d[key];
|
|
5249
|
+
all[key.slice(1)] = value._value.split("+");
|
|
5250
|
+
return all;
|
|
4967
5251
|
}, {}),
|
|
4968
|
-
paradigmLocales:
|
|
4969
|
-
return new Intl.Locale(
|
|
4970
|
-
}),
|
|
5252
|
+
paradigmLocales: __spreadArray(__spreadArray([], paradigmLocales, true), paradigmLocales.map(function(l) {
|
|
5253
|
+
return new Intl.Locale(l.replace(/_/g, "-")).maximize().toString();
|
|
5254
|
+
}), true)
|
|
4971
5255
|
};
|
|
4972
5256
|
}
|
|
4973
|
-
return
|
|
5257
|
+
return PROCESSED_DATA;
|
|
4974
5258
|
}
|
|
4975
|
-
function
|
|
4976
|
-
var
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
5259
|
+
function isMatched(locale, languageMatchInfoLocale, matchVariables) {
|
|
5260
|
+
var _a = languageMatchInfoLocale.split("-"), language = _a[0], script = _a[1], region = _a[2];
|
|
5261
|
+
var matches = true;
|
|
5262
|
+
if (region && region[0] === "$") {
|
|
5263
|
+
var shouldInclude = region[1] !== "!";
|
|
5264
|
+
var matchRegions = shouldInclude ? matchVariables[region.slice(1)] : matchVariables[region.slice(2)];
|
|
5265
|
+
var expandedMatchedRegions = matchRegions.map(function(r) {
|
|
5266
|
+
return regions[r] || [r];
|
|
5267
|
+
}).reduce(function(all, list) {
|
|
5268
|
+
return __spreadArray(__spreadArray([], all, true), list, true);
|
|
4982
5269
|
}, []);
|
|
4983
|
-
|
|
4984
|
-
} else
|
|
4985
|
-
|
|
4986
|
-
|
|
5270
|
+
matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > 1 != shouldInclude));
|
|
5271
|
+
} else {
|
|
5272
|
+
matches && (matches = locale.region ? region === "*" || region === locale.region : true);
|
|
5273
|
+
}
|
|
5274
|
+
matches && (matches = locale.script ? script === "*" || script === locale.script : true);
|
|
5275
|
+
matches && (matches = locale.language ? language === "*" || language === locale.language : true);
|
|
5276
|
+
return matches;
|
|
4987
5277
|
}
|
|
4988
|
-
function
|
|
4989
|
-
return [
|
|
5278
|
+
function serializeLSR(lsr) {
|
|
5279
|
+
return [lsr.language, lsr.script, lsr.region].filter(Boolean).join("-");
|
|
4990
5280
|
}
|
|
4991
|
-
function
|
|
4992
|
-
for (var
|
|
4993
|
-
var
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
5281
|
+
function findMatchingDistanceForLSR(desired, supported, data2) {
|
|
5282
|
+
for (var _i = 0, _a = data2.matches; _i < _a.length; _i++) {
|
|
5283
|
+
var d = _a[_i];
|
|
5284
|
+
var matches = isMatched(desired, d.desired, data2.matchVariables) && isMatched(supported, d.supported, data2.matchVariables);
|
|
5285
|
+
if (!d.oneway && !matches) {
|
|
5286
|
+
matches = isMatched(desired, d.supported, data2.matchVariables) && isMatched(supported, d.desired, data2.matchVariables);
|
|
5287
|
+
}
|
|
5288
|
+
if (matches) {
|
|
5289
|
+
var distance = d.distance * 10;
|
|
5290
|
+
if (data2.paradigmLocales.indexOf(serializeLSR(desired)) > -1 != data2.paradigmLocales.indexOf(serializeLSR(supported)) > -1) {
|
|
5291
|
+
return distance - 1;
|
|
5292
|
+
}
|
|
5293
|
+
return distance;
|
|
4997
5294
|
}
|
|
4998
5295
|
}
|
|
4999
5296
|
throw new Error("No matching distance found");
|
|
5000
5297
|
}
|
|
5001
|
-
function
|
|
5002
|
-
var
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5298
|
+
function findMatchingDistance(desired, supported) {
|
|
5299
|
+
var desiredLocale = new Intl.Locale(desired).maximize();
|
|
5300
|
+
var supportedLocale = new Intl.Locale(supported).maximize();
|
|
5301
|
+
var desiredLSR = {
|
|
5302
|
+
language: desiredLocale.language,
|
|
5303
|
+
script: desiredLocale.script || "",
|
|
5304
|
+
region: desiredLocale.region || ""
|
|
5305
|
+
};
|
|
5306
|
+
var supportedLSR = {
|
|
5307
|
+
language: supportedLocale.language,
|
|
5308
|
+
script: supportedLocale.script || "",
|
|
5309
|
+
region: supportedLocale.region || ""
|
|
5310
|
+
};
|
|
5311
|
+
var matchingDistance = 0;
|
|
5312
|
+
var data2 = processData();
|
|
5313
|
+
if (desiredLSR.language !== supportedLSR.language) {
|
|
5314
|
+
matchingDistance += findMatchingDistanceForLSR({
|
|
5315
|
+
language: desiredLocale.language,
|
|
5316
|
+
script: "",
|
|
5317
|
+
region: ""
|
|
5318
|
+
}, {
|
|
5319
|
+
language: supportedLocale.language,
|
|
5320
|
+
script: "",
|
|
5321
|
+
region: ""
|
|
5322
|
+
}, data2);
|
|
5323
|
+
}
|
|
5324
|
+
if (desiredLSR.script !== supportedLSR.script) {
|
|
5325
|
+
matchingDistance += findMatchingDistanceForLSR({
|
|
5326
|
+
language: desiredLocale.language,
|
|
5327
|
+
script: desiredLSR.script,
|
|
5328
|
+
region: ""
|
|
5329
|
+
}, {
|
|
5330
|
+
language: supportedLocale.language,
|
|
5331
|
+
script: desiredLSR.script,
|
|
5332
|
+
region: ""
|
|
5333
|
+
}, data2);
|
|
5334
|
+
}
|
|
5335
|
+
if (desiredLSR.region !== supportedLSR.region) {
|
|
5336
|
+
matchingDistance += findMatchingDistanceForLSR(desiredLSR, supportedLSR, data2);
|
|
5337
|
+
}
|
|
5338
|
+
return matchingDistance;
|
|
5028
5339
|
}
|
|
5029
|
-
function
|
|
5030
|
-
|
|
5031
|
-
|
|
5340
|
+
function findBestMatch(requestedLocales, supportedLocales, threshold) {
|
|
5341
|
+
if (threshold === void 0) {
|
|
5342
|
+
threshold = DEFAULT_MATCHING_THRESHOLD;
|
|
5343
|
+
}
|
|
5344
|
+
var lowestDistance = Infinity;
|
|
5345
|
+
var result = {
|
|
5032
5346
|
matchedDesiredLocale: "",
|
|
5033
5347
|
distances: {}
|
|
5034
5348
|
};
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5349
|
+
requestedLocales.forEach(function(desired, i) {
|
|
5350
|
+
if (!result.distances[desired]) {
|
|
5351
|
+
result.distances[desired] = {};
|
|
5352
|
+
}
|
|
5353
|
+
supportedLocales.forEach(function(supported) {
|
|
5354
|
+
var distance = findMatchingDistance(desired, supported) + 0 + i * 40;
|
|
5355
|
+
result.distances[desired][supported] = distance;
|
|
5356
|
+
if (distance < lowestDistance) {
|
|
5357
|
+
lowestDistance = distance;
|
|
5358
|
+
result.matchedDesiredLocale = desired;
|
|
5359
|
+
result.matchedSupportedLocale = supported;
|
|
5360
|
+
}
|
|
5039
5361
|
});
|
|
5040
|
-
})
|
|
5362
|
+
});
|
|
5363
|
+
if (lowestDistance >= threshold) {
|
|
5364
|
+
result.matchedDesiredLocale = void 0;
|
|
5365
|
+
result.matchedSupportedLocale = void 0;
|
|
5366
|
+
}
|
|
5367
|
+
return result;
|
|
5041
5368
|
}
|
|
5042
|
-
function
|
|
5043
|
-
var
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5369
|
+
function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
5370
|
+
var foundLocale;
|
|
5371
|
+
var extension;
|
|
5372
|
+
var noExtensionLocales = [];
|
|
5373
|
+
var noExtensionLocaleMap = requestedLocales.reduce(function(all, l) {
|
|
5374
|
+
var noExtensionLocale = l.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, "");
|
|
5375
|
+
noExtensionLocales.push(noExtensionLocale);
|
|
5376
|
+
all[noExtensionLocale] = l;
|
|
5377
|
+
return all;
|
|
5378
|
+
}, {});
|
|
5379
|
+
var result = findBestMatch(noExtensionLocales, availableLocales);
|
|
5380
|
+
if (result.matchedSupportedLocale && result.matchedDesiredLocale) {
|
|
5381
|
+
foundLocale = result.matchedSupportedLocale;
|
|
5382
|
+
extension = noExtensionLocaleMap[result.matchedDesiredLocale].slice(result.matchedDesiredLocale.length) || void 0;
|
|
5383
|
+
}
|
|
5384
|
+
if (!foundLocale) {
|
|
5385
|
+
return { locale: getDefaultLocale() };
|
|
5386
|
+
}
|
|
5387
|
+
return {
|
|
5388
|
+
locale: foundLocale,
|
|
5389
|
+
extension
|
|
5390
|
+
};
|
|
5051
5391
|
}
|
|
5052
|
-
function
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5392
|
+
function BestAvailableLocale(availableLocales, locale) {
|
|
5393
|
+
var candidate = locale;
|
|
5394
|
+
while (true) {
|
|
5395
|
+
if (availableLocales.indexOf(candidate) > -1) {
|
|
5396
|
+
return candidate;
|
|
5397
|
+
}
|
|
5398
|
+
var pos = candidate.lastIndexOf("-");
|
|
5399
|
+
if (!~pos) {
|
|
5400
|
+
return void 0;
|
|
5401
|
+
}
|
|
5402
|
+
if (pos >= 2 && candidate[pos - 2] === "-") {
|
|
5403
|
+
pos -= 2;
|
|
5404
|
+
}
|
|
5405
|
+
candidate = candidate.slice(0, pos);
|
|
5060
5406
|
}
|
|
5061
5407
|
}
|
|
5062
|
-
function
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5408
|
+
function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
5409
|
+
var result = { locale: "" };
|
|
5410
|
+
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
5411
|
+
var locale = requestedLocales_1[_i];
|
|
5412
|
+
var noExtensionLocale = locale.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, "");
|
|
5413
|
+
var availableLocale = BestAvailableLocale(availableLocales, noExtensionLocale);
|
|
5414
|
+
if (availableLocale) {
|
|
5415
|
+
result.locale = availableLocale;
|
|
5416
|
+
if (locale !== noExtensionLocale) {
|
|
5417
|
+
result.extension = locale.slice(noExtensionLocale.length, locale.length);
|
|
5418
|
+
}
|
|
5419
|
+
return result;
|
|
5420
|
+
}
|
|
5067
5421
|
}
|
|
5068
|
-
|
|
5422
|
+
result.locale = getDefaultLocale();
|
|
5423
|
+
return result;
|
|
5069
5424
|
}
|
|
5070
|
-
function
|
|
5071
|
-
|
|
5072
|
-
var
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5425
|
+
function UnicodeExtensionValue(extension, key) {
|
|
5426
|
+
invariant(key.length === 2, "key must have 2 elements");
|
|
5427
|
+
var size = extension.length;
|
|
5428
|
+
var searchValue = "-".concat(key, "-");
|
|
5429
|
+
var pos = extension.indexOf(searchValue);
|
|
5430
|
+
if (pos !== -1) {
|
|
5431
|
+
var start = pos + 4;
|
|
5432
|
+
var end = start;
|
|
5433
|
+
var k = start;
|
|
5434
|
+
var done = false;
|
|
5435
|
+
while (!done) {
|
|
5436
|
+
var e = extension.indexOf("-", k);
|
|
5437
|
+
var len = void 0;
|
|
5438
|
+
if (e === -1) {
|
|
5439
|
+
len = size - k;
|
|
5440
|
+
} else {
|
|
5441
|
+
len = e - k;
|
|
5442
|
+
}
|
|
5443
|
+
if (len === 2) {
|
|
5444
|
+
done = true;
|
|
5445
|
+
} else if (e === -1) {
|
|
5446
|
+
end = size;
|
|
5447
|
+
done = true;
|
|
5448
|
+
} else {
|
|
5449
|
+
end = e;
|
|
5450
|
+
k = e + 1;
|
|
5451
|
+
}
|
|
5077
5452
|
}
|
|
5078
|
-
return
|
|
5453
|
+
return extension.slice(start, end);
|
|
5079
5454
|
}
|
|
5080
|
-
|
|
5455
|
+
searchValue = "-".concat(key);
|
|
5456
|
+
pos = extension.indexOf(searchValue);
|
|
5457
|
+
if (pos !== -1 && pos + 3 === size) {
|
|
5081
5458
|
return "";
|
|
5459
|
+
}
|
|
5460
|
+
return void 0;
|
|
5082
5461
|
}
|
|
5083
|
-
function
|
|
5084
|
-
var
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
var
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5462
|
+
function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {
|
|
5463
|
+
var matcher = options.localeMatcher;
|
|
5464
|
+
var r;
|
|
5465
|
+
if (matcher === "lookup") {
|
|
5466
|
+
r = LookupMatcher(Array.from(availableLocales), requestedLocales, getDefaultLocale);
|
|
5467
|
+
} else {
|
|
5468
|
+
r = BestFitMatcher(Array.from(availableLocales), requestedLocales, getDefaultLocale);
|
|
5469
|
+
}
|
|
5470
|
+
var foundLocale = r.locale;
|
|
5471
|
+
var result = { locale: "", dataLocale: foundLocale };
|
|
5472
|
+
var supportedExtension = "-u";
|
|
5473
|
+
for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {
|
|
5474
|
+
var key = relevantExtensionKeys_1[_i];
|
|
5475
|
+
invariant(foundLocale in localeData, "Missing locale data for ".concat(foundLocale));
|
|
5476
|
+
var foundLocaleData = localeData[foundLocale];
|
|
5477
|
+
invariant(typeof foundLocaleData === "object" && foundLocaleData !== null, "locale data ".concat(key, " must be an object"));
|
|
5478
|
+
var keyLocaleData = foundLocaleData[key];
|
|
5479
|
+
invariant(Array.isArray(keyLocaleData), "keyLocaleData for ".concat(key, " must be an array"));
|
|
5480
|
+
var value = keyLocaleData[0];
|
|
5481
|
+
invariant(typeof value === "string" || value === null, "value must be string or null but got ".concat(typeof value, " in key ").concat(key));
|
|
5482
|
+
var supportedExtensionAddition = "";
|
|
5483
|
+
if (r.extension) {
|
|
5484
|
+
var requestedValue = UnicodeExtensionValue(r.extension, key);
|
|
5485
|
+
if (requestedValue !== void 0) {
|
|
5486
|
+
if (requestedValue !== "") {
|
|
5487
|
+
if (~keyLocaleData.indexOf(requestedValue)) {
|
|
5488
|
+
value = requestedValue;
|
|
5489
|
+
supportedExtensionAddition = "-".concat(key, "-").concat(value);
|
|
5490
|
+
}
|
|
5491
|
+
} else if (~requestedValue.indexOf("true")) {
|
|
5492
|
+
value = "true";
|
|
5493
|
+
supportedExtensionAddition = "-".concat(key);
|
|
5494
|
+
}
|
|
5495
|
+
}
|
|
5099
5496
|
}
|
|
5100
|
-
if (
|
|
5101
|
-
var
|
|
5102
|
-
|
|
5497
|
+
if (key in options) {
|
|
5498
|
+
var optionsValue = options[key];
|
|
5499
|
+
invariant(typeof optionsValue === "string" || typeof optionsValue === "undefined" || optionsValue === null, "optionsValue must be String, Undefined or Null");
|
|
5500
|
+
if (~keyLocaleData.indexOf(optionsValue)) {
|
|
5501
|
+
if (optionsValue !== value) {
|
|
5502
|
+
value = optionsValue;
|
|
5503
|
+
supportedExtensionAddition = "";
|
|
5504
|
+
}
|
|
5505
|
+
}
|
|
5103
5506
|
}
|
|
5104
|
-
|
|
5507
|
+
result[key] = value;
|
|
5508
|
+
supportedExtension += supportedExtensionAddition;
|
|
5105
5509
|
}
|
|
5106
|
-
if (
|
|
5107
|
-
var
|
|
5108
|
-
if (
|
|
5109
|
-
|
|
5110
|
-
else {
|
|
5111
|
-
var
|
|
5112
|
-
|
|
5510
|
+
if (supportedExtension.length > 2) {
|
|
5511
|
+
var privateIndex = foundLocale.indexOf("-x-");
|
|
5512
|
+
if (privateIndex === -1) {
|
|
5513
|
+
foundLocale = foundLocale + supportedExtension;
|
|
5514
|
+
} else {
|
|
5515
|
+
var preExtension = foundLocale.slice(0, privateIndex);
|
|
5516
|
+
var postExtension = foundLocale.slice(privateIndex, foundLocale.length);
|
|
5517
|
+
foundLocale = preExtension + supportedExtension + postExtension;
|
|
5113
5518
|
}
|
|
5114
|
-
|
|
5519
|
+
foundLocale = Intl.getCanonicalLocales(foundLocale)[0];
|
|
5115
5520
|
}
|
|
5116
|
-
|
|
5521
|
+
result.locale = foundLocale;
|
|
5522
|
+
return result;
|
|
5117
5523
|
}
|
|
5118
|
-
function
|
|
5119
|
-
return
|
|
5524
|
+
function match(requestedLocales, availableLocales, defaultLocale, opts) {
|
|
5525
|
+
return ResolveLocale(availableLocales, CanonicalizeLocaleList(requestedLocales), {
|
|
5120
5526
|
localeMatcher: "best fit"
|
|
5121
5527
|
}, [], {}, function() {
|
|
5122
|
-
return
|
|
5528
|
+
return defaultLocale;
|
|
5123
5529
|
}).locale;
|
|
5124
5530
|
}
|
|
5125
|
-
const
|
|
5126
|
-
function
|
|
5127
|
-
return Object.keys(
|
|
5128
|
-
(
|
|
5129
|
-
const
|
|
5130
|
-
|
|
5531
|
+
const DEFAULT_LOCALE = "en";
|
|
5532
|
+
function flattenMessages(nestedMessages, prefix = "") {
|
|
5533
|
+
return Object.keys(nestedMessages).reduce(
|
|
5534
|
+
(messages2, key) => {
|
|
5535
|
+
const value = nestedMessages[key];
|
|
5536
|
+
const prefixedKey = prefix ? `${prefix}.${key}` : key;
|
|
5537
|
+
if (typeof value === "string") {
|
|
5538
|
+
messages2[prefixedKey] = value;
|
|
5539
|
+
} else {
|
|
5540
|
+
Object.assign(messages2, flattenMessages(value, prefixedKey));
|
|
5541
|
+
}
|
|
5542
|
+
return messages2;
|
|
5131
5543
|
},
|
|
5132
5544
|
{}
|
|
5133
5545
|
);
|
|
5134
5546
|
}
|
|
5135
|
-
function
|
|
5136
|
-
const
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5547
|
+
function findMatchingMessagesLocale(locale, messages2) {
|
|
5548
|
+
const availableLocales = Object.keys(messages2);
|
|
5549
|
+
const matchedLocale = match(
|
|
5550
|
+
[locale],
|
|
5551
|
+
availableLocales,
|
|
5552
|
+
DEFAULT_LOCALE
|
|
5140
5553
|
);
|
|
5141
|
-
return
|
|
5554
|
+
return matchedLocale ? matchedLocale : DEFAULT_LOCALE;
|
|
5142
5555
|
}
|
|
5143
|
-
const
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5556
|
+
const cache = createIntlCache();
|
|
5557
|
+
const intlInstanceCache = /* @__PURE__ */ new WeakMap();
|
|
5558
|
+
const createIntlInstance = (intlConfig) => {
|
|
5559
|
+
const locale = (intlConfig == null ? void 0 : intlConfig.locale) || DEFAULT_LOCALE;
|
|
5560
|
+
const messagesLocale = findMatchingMessagesLocale(locale, messages);
|
|
5561
|
+
const intMessages = {
|
|
5562
|
+
...messages[messagesLocale] || {},
|
|
5563
|
+
...(intlConfig == null ? void 0 : intlConfig.messages) ?? {}
|
|
5564
|
+
};
|
|
5565
|
+
const combinedMessages = flattenMessages(intMessages);
|
|
5566
|
+
return createIntl(
|
|
5149
5567
|
{
|
|
5150
|
-
locale
|
|
5151
|
-
messages:
|
|
5568
|
+
locale,
|
|
5569
|
+
messages: combinedMessages
|
|
5152
5570
|
},
|
|
5153
|
-
|
|
5571
|
+
cache
|
|
5154
5572
|
);
|
|
5155
|
-
}, Ma = (e) => {
|
|
5156
|
-
const i = we.get(e);
|
|
5157
|
-
if (i)
|
|
5158
|
-
return i;
|
|
5159
|
-
const r = Sa(e);
|
|
5160
|
-
return we.set(e, r), r;
|
|
5161
5573
|
};
|
|
5162
|
-
|
|
5163
|
-
|
|
5574
|
+
const getGloballyCachedIntl = (intlConfig) => {
|
|
5575
|
+
const cachedInstance = intlInstanceCache.get(intlConfig);
|
|
5576
|
+
if (cachedInstance) {
|
|
5577
|
+
return cachedInstance;
|
|
5578
|
+
}
|
|
5579
|
+
const newInstance = createIntlInstance(intlConfig);
|
|
5580
|
+
intlInstanceCache.set(intlConfig, newInstance);
|
|
5581
|
+
return newInstance;
|
|
5582
|
+
};
|
|
5583
|
+
function useImperativeIntl(intlConfig) {
|
|
5584
|
+
return getGloballyCachedIntl(intlConfig);
|
|
5164
5585
|
}
|
|
5165
|
-
const
|
|
5586
|
+
const Root = styled(Box)(({ theme }) => ({
|
|
5166
5587
|
display: "flex",
|
|
5167
|
-
gap:
|
|
5168
|
-
marginLeft:
|
|
5169
|
-
}))
|
|
5588
|
+
gap: theme.spacing(0.5),
|
|
5589
|
+
marginLeft: theme.spacing(1)
|
|
5590
|
+
}));
|
|
5591
|
+
const Button = styled("div")(({ theme }) => ({
|
|
5170
5592
|
"& .MuiIconButton-root:not(.Mui-disabled)": {
|
|
5171
|
-
color:
|
|
5593
|
+
color: theme.palette.text.secondary
|
|
5172
5594
|
}
|
|
5173
5595
|
}));
|
|
5174
|
-
function
|
|
5175
|
-
count
|
|
5176
|
-
page
|
|
5177
|
-
rowsPerPage
|
|
5178
|
-
onPageChange
|
|
5179
|
-
lastPageTooltip
|
|
5596
|
+
function TablePaginationActions({
|
|
5597
|
+
count,
|
|
5598
|
+
page,
|
|
5599
|
+
rowsPerPage = 10,
|
|
5600
|
+
onPageChange,
|
|
5601
|
+
lastPageTooltip
|
|
5180
5602
|
}) {
|
|
5181
|
-
const
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
}
|
|
5603
|
+
const intl = useIntl();
|
|
5604
|
+
const intlConfig = useImperativeIntl(intl);
|
|
5605
|
+
const handleBackButtonClick = (event) => {
|
|
5606
|
+
onPageChange(event, page - 1);
|
|
5607
|
+
};
|
|
5608
|
+
const handleNextButtonClick = (event) => {
|
|
5609
|
+
onPageChange(event, page + 1);
|
|
5610
|
+
};
|
|
5611
|
+
const isLastPage = page === Math.ceil(count / rowsPerPage) - 1;
|
|
5612
|
+
const isFirstPage = page === 0;
|
|
5613
|
+
const prevLabel = intlConfig.formatMessage({
|
|
5186
5614
|
id: "c4r.form.pagination.prevPage"
|
|
5187
|
-
})
|
|
5615
|
+
});
|
|
5616
|
+
const nextLabel = intlConfig.formatMessage({
|
|
5188
5617
|
id: "c4r.form.pagination.nextPage"
|
|
5189
|
-
})
|
|
5618
|
+
});
|
|
5619
|
+
const noMorePagesText = intlConfig.formatMessage({
|
|
5190
5620
|
id: "c4r.form.pagination.noMorePages"
|
|
5191
5621
|
});
|
|
5192
|
-
return /* @__PURE__ */
|
|
5193
|
-
/* @__PURE__ */
|
|
5194
|
-
|
|
5622
|
+
return /* @__PURE__ */ jsxs(Root, { children: [
|
|
5623
|
+
/* @__PURE__ */ jsx(Tooltip, { title: isFirstPage ? noMorePagesText : prevLabel, children: /* @__PURE__ */ jsx(Button, { children: /* @__PURE__ */ jsx(
|
|
5624
|
+
IconButton,
|
|
5195
5625
|
{
|
|
5196
|
-
onClick:
|
|
5197
|
-
disabled:
|
|
5198
|
-
"aria-label":
|
|
5199
|
-
children: /* @__PURE__ */
|
|
5626
|
+
onClick: handleBackButtonClick,
|
|
5627
|
+
disabled: page === 0,
|
|
5628
|
+
"aria-label": prevLabel,
|
|
5629
|
+
children: /* @__PURE__ */ jsx(KeyboardArrowLeftOutlined, {})
|
|
5200
5630
|
}
|
|
5201
5631
|
) }) }),
|
|
5202
|
-
/* @__PURE__ */
|
|
5203
|
-
|
|
5632
|
+
/* @__PURE__ */ jsx(
|
|
5633
|
+
Tooltip,
|
|
5204
5634
|
{
|
|
5205
|
-
title:
|
|
5206
|
-
children: /* @__PURE__ */
|
|
5207
|
-
|
|
5635
|
+
title: isLastPage ? lastPageTooltip ?? noMorePagesText : nextLabel,
|
|
5636
|
+
children: /* @__PURE__ */ jsx(Button, { children: /* @__PURE__ */ jsx(
|
|
5637
|
+
IconButton,
|
|
5208
5638
|
{
|
|
5209
|
-
onClick:
|
|
5210
|
-
disabled:
|
|
5211
|
-
"aria-label":
|
|
5212
|
-
children: /* @__PURE__ */
|
|
5639
|
+
onClick: handleNextButtonClick,
|
|
5640
|
+
disabled: page >= Math.ceil(count / rowsPerPage) - 1,
|
|
5641
|
+
"aria-label": nextLabel.toLocaleLowerCase(),
|
|
5642
|
+
children: /* @__PURE__ */ jsx(KeyboardArrowRightOutlined, {})
|
|
5213
5643
|
}
|
|
5214
5644
|
) })
|
|
5215
5645
|
}
|
|
@@ -5217,16 +5647,16 @@ function xa({
|
|
|
5217
5647
|
] });
|
|
5218
5648
|
}
|
|
5219
5649
|
export {
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5650
|
+
APPBAR_SIZE as A,
|
|
5651
|
+
BREAKPOINTS as B,
|
|
5652
|
+
ICON_SIZE_LARGE as I,
|
|
5653
|
+
NOTIFICATION_DURATION_IN_MS as N,
|
|
5654
|
+
SPACING as S,
|
|
5655
|
+
Typography as T,
|
|
5656
|
+
TablePaginationActions as a,
|
|
5657
|
+
ICON_SIZE_MEDIUM as b,
|
|
5658
|
+
ICON_SIZE_SMALL as c,
|
|
5659
|
+
getDefaultExportFromCjs as d,
|
|
5660
|
+
getSpacing as g,
|
|
5661
|
+
useImperativeIntl as u
|
|
5232
5662
|
};
|