@carto/meridian-ds 1.4.4-alpha-others.1 → 1.4.4-alpha-icons-shapes.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.
Files changed (91) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/dist/Alert-D8jI1sG4.js +134 -0
  3. package/dist/Alert-zqtoWsBL.cjs +133 -0
  4. package/dist/ArrowDown-8fLj23Ge.cjs +31 -0
  5. package/dist/ArrowDown-CY_wMVJT.js +32 -0
  6. package/dist/MenuItem-Br2jY2lt.cjs +164 -0
  7. package/dist/MenuItem-CXnnE5lK.js +165 -0
  8. package/dist/OpenDiagonallyRight-5HZXh46V.js +59 -0
  9. package/dist/OpenDiagonallyRight-BrRyCV4Q.cjs +58 -0
  10. package/dist/SwatchSquare-DDi0beUM.js +51 -0
  11. package/dist/SwatchSquare-w-U8-O-P.cjs +50 -0
  12. package/dist/TablePaginationActions-CFGXm44W.cjs +5661 -0
  13. package/dist/{TablePaginationActions-WZ3P4O35.js → TablePaginationActions-KpTvhN4Y.js} +1086 -656
  14. package/dist/components/index.cjs +4403 -1
  15. package/dist/components/index.js +3235 -1857
  16. package/dist/custom-icons/index.cjs +5857 -1
  17. package/dist/custom-icons/index.js +2658 -2326
  18. package/dist/paletteUtils-B9ybmwiI.cjs +304 -0
  19. package/dist/paletteUtils-BHqJlHm9.js +288 -0
  20. package/dist/theme/index.cjs +3140 -1
  21. package/dist/theme/index.js +1056 -1012
  22. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialog.d.ts +16 -0
  23. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialog.d.ts.map +1 -0
  24. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogConfirmation.d.ts +16 -0
  25. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogConfirmation.d.ts.map +1 -0
  26. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogContent.d.ts +10 -0
  27. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogContent.d.ts.map +1 -0
  28. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogError.d.ts +8 -0
  29. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogError.d.ts.map +1 -0
  30. package/dist/types/components/organisms/CodeArea/CodeAreaField.d.ts +4 -0
  31. package/dist/types/components/organisms/CodeArea/CodeAreaField.d.ts.map +1 -0
  32. package/dist/types/components/organisms/CodeArea/CodeAreaFooter.d.ts +12 -0
  33. package/dist/types/components/organisms/CodeArea/CodeAreaFooter.d.ts.map +1 -0
  34. package/dist/types/components/organisms/CodeArea/CodeAreaHeader.d.ts +9 -0
  35. package/dist/types/components/organisms/CodeArea/CodeAreaHeader.d.ts.map +1 -0
  36. package/dist/types/components/organisms/CodeArea/CodeAreaInput.d.ts +28 -0
  37. package/dist/types/components/organisms/CodeArea/CodeAreaInput.d.ts.map +1 -0
  38. package/dist/types/components/organisms/CodeArea/CodeAreaTheme.d.ts +7 -0
  39. package/dist/types/components/organisms/CodeArea/CodeAreaTheme.d.ts.map +1 -0
  40. package/dist/types/components/organisms/CodeArea/index.d.ts +9 -0
  41. package/dist/types/components/organisms/CodeArea/index.d.ts.map +1 -0
  42. package/dist/types/components/organisms/CodeArea/types.d.ts +38 -0
  43. package/dist/types/components/organisms/CodeArea/types.d.ts.map +1 -0
  44. package/dist/types/components/organisms/CodeArea/utils.d.ts +5 -0
  45. package/dist/types/components/organisms/CodeArea/utils.d.ts.map +1 -0
  46. package/dist/types/components/organisms/index.d.ts +2 -0
  47. package/dist/types/components/organisms/index.d.ts.map +1 -1
  48. package/dist/types/localization/en.d.ts +6 -0
  49. package/dist/types/localization/en.d.ts.map +1 -1
  50. package/dist/types/localization/es.d.ts +6 -0
  51. package/dist/types/localization/es.d.ts.map +1 -1
  52. package/dist/types/localization/id.d.ts +6 -0
  53. package/dist/types/localization/id.d.ts.map +1 -1
  54. package/dist/types/localization/index.d.ts +18 -0
  55. package/dist/types/localization/index.d.ts.map +1 -1
  56. package/dist/types/theme/sections/components/data-display.d.ts.map +1 -1
  57. package/dist/types/utils/chartConstants.d.ts +3 -3
  58. package/dist/types/utils/chartConstants.d.ts.map +1 -1
  59. package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts +2 -2
  60. package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts.map +1 -1
  61. package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts +2 -2
  62. package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts.map +1 -1
  63. package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts +2 -2
  64. package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts.map +1 -1
  65. package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.d.ts.map +1 -1
  66. package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesChart.d.ts +2 -5
  67. package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesChart.d.ts.map +1 -1
  68. package/dist/types/widgets/TimeSeriesWidgetUI/timeSeriesUtils.d.ts +7 -0
  69. package/dist/types/widgets/TimeSeriesWidgetUI/timeSeriesUtils.d.ts.map +1 -1
  70. package/dist/types/widgets/TimeSeriesWidgetUI/types.d.ts +6 -0
  71. package/dist/types/widgets/TimeSeriesWidgetUI/types.d.ts.map +1 -0
  72. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts +2 -2
  73. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts.map +1 -1
  74. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/transposeCategoryData.d.ts +2 -2
  75. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/transposeCategoryData.d.ts.map +1 -1
  76. package/dist/types/widgets/index.d.ts +1 -0
  77. package/dist/types/widgets/index.d.ts.map +1 -1
  78. package/dist/widgets/index.cjs +7211 -21
  79. package/dist/widgets/index.js +5201 -3806
  80. package/package.json +6 -1
  81. package/dist/Alert-BAvr1f31.js +0 -130
  82. package/dist/Alert-DPGMxifE.cjs +0 -4
  83. package/dist/ArrowDown-BD0WmQR3.cjs +0 -1
  84. package/dist/ArrowDown-CMhYkZ2p.js +0 -31
  85. package/dist/MenuItem-Cd34y6F3.js +0 -165
  86. package/dist/MenuItem-Dbss-WG1.cjs +0 -1
  87. package/dist/SwatchSquare-C34ayL4L.cjs +0 -1
  88. package/dist/SwatchSquare-CVpwEFFV.js +0 -48
  89. package/dist/TablePaginationActions-Bp1DCaIE.cjs +0 -9
  90. package/dist/paletteUtils-BEwZhrLg.js +0 -262
  91. package/dist/paletteUtils-DLQVT9qo.cjs +0 -1
@@ -1,572 +1,819 @@
1
- import me from "react-is";
2
- import { jsx as O, jsxs as Re } from "react/jsx-runtime";
3
- import { Typography as Ge, Tooltip as se, IconButton as de, styled as he, Box as Ne } from "@mui/material";
4
- import { forwardRef as De } from "react";
5
- import { KeyboardArrowLeftOutlined as qe, KeyboardArrowRightOutlined as xe } from "@mui/icons-material";
6
- import { createIntlCache as He, createIntl as Ke, useIntl as Ue } from "react-intl";
7
- function je(e) {
8
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
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 ae = { exports: {} };
10
+ var propTypes = { exports: {} };
11
11
  /*
12
12
  object-assign
13
13
  (c) Sindre Sorhus
14
14
  @license MIT
15
15
  */
16
- var W, oe;
17
- function Ve() {
18
- if (oe) return W;
19
- oe = 1;
20
- var e = Object.getOwnPropertySymbols, i = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
21
- function a(n) {
22
- if (n == null)
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
- return Object(n);
27
+ }
28
+ return Object(val);
25
29
  }
26
- function d() {
30
+ function shouldUseNative() {
27
31
  try {
28
- if (!Object.assign)
29
- return !1;
30
- var n = new String("abc");
31
- if (n[5] = "de", Object.getOwnPropertyNames(n)[0] === "5")
32
- return !1;
33
- for (var s = {}, o = 0; o < 10; o++)
34
- s["_" + String.fromCharCode(o)] = o;
35
- var u = Object.getOwnPropertyNames(s).map(function(l) {
36
- return s[l];
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 (u.join("") !== "0123456789")
39
- return !1;
40
- var y = {};
41
- return "abcdefghijklmnopqrst".split("").forEach(function(l) {
42
- y[l] = l;
43
- }), Object.keys(Object.assign({}, y)).join("") === "abcdefghijklmnopqrst";
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
- return W = d() ? Object.assign : function(n, s) {
49
- for (var o, u = a(n), y, l = 1; l < arguments.length; l++) {
50
- o = Object(arguments[l]);
51
- for (var T in o)
52
- i.call(o, T) && (u[T] = o[T]);
53
- if (e) {
54
- y = e(o);
55
- for (var M = 0; M < y.length; M++)
56
- r.call(o, y[M]) && (u[y[M]] = o[y[M]]);
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 u;
60
- }, W;
82
+ return to;
83
+ };
84
+ return objectAssign;
61
85
  }
62
- var F, ce;
63
- function re() {
64
- if (ce) return F;
65
- ce = 1;
66
- var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
67
- return F = e, F;
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 Z, ue;
70
- function ve() {
71
- return ue || (ue = 1, Z = Function.call.bind(Object.prototype.hasOwnProperty)), Z;
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 Y, _e;
74
- function ze() {
75
- if (_e) return Y;
76
- _e = 1;
77
- var e = function() {
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 i = re(), r = {}, a = ve();
81
- e = function(n) {
82
- var s = "Warning: " + n;
83
- typeof console < "u" && console.error(s);
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(s);
86
- } catch {
120
+ throw new Error(message);
121
+ } catch (x) {
87
122
  }
88
123
  };
89
124
  }
90
- function d(n, s, o, u, y) {
125
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
91
126
  if (process.env.NODE_ENV !== "production") {
92
- for (var l in n)
93
- if (a(n, l)) {
94
- var T;
127
+ for (var typeSpecName in typeSpecs) {
128
+ if (has2(typeSpecs, typeSpecName)) {
129
+ var error;
95
130
  try {
96
- if (typeof n[l] != "function") {
97
- var M = Error(
98
- (u || "React class") + ": " + o + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
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
- throw M.name = "Invariant Violation", M;
135
+ err.name = "Invariant Violation";
136
+ throw err;
101
137
  }
102
- T = n[l](s, l, u, o, null, i);
103
- } catch (I) {
104
- T = I;
105
- }
106
- if (T && !(T instanceof Error) && e(
107
- (u || "React class") + ": type specification of " + o + " `" + l + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof T + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
108
- ), T instanceof Error && !(T.message in r)) {
109
- r[T.message] = !0;
110
- var E = y ? y() : "";
111
- e(
112
- "Failed " + o + " type: " + T.message + (E ?? "")
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
- return d.resetWarningCache = function() {
119
- process.env.NODE_ENV !== "production" && (r = {});
120
- }, Y = d, Y;
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 J, le;
123
- function We() {
124
- if (le) return J;
125
- le = 1;
126
- var e = me, i = Ve(), r = re(), a = ve(), d = ze(), n = function() {
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" && (n = function(o) {
129
- var u = "Warning: " + o;
130
- typeof console < "u" && console.error(u);
131
- try {
132
- throw new Error(u);
133
- } catch {
134
- }
135
- });
136
- function s() {
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
- return J = function(o, u) {
140
- var y = typeof Symbol == "function" && Symbol.iterator, l = "@@iterator";
141
- function T(t) {
142
- var c = t && (y && t[y] || t[l]);
143
- if (typeof c == "function")
144
- return c;
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 M = "<<anonymous>>", E = {
147
- array: A("array"),
148
- bigint: A("bigint"),
149
- bool: A("boolean"),
150
- func: A("function"),
151
- number: A("number"),
152
- object: A("object"),
153
- string: A("string"),
154
- symbol: A("symbol"),
155
- any: R(),
156
- arrayOf: k,
157
- element: D(),
158
- elementType: V(),
159
- instanceOf: z,
160
- node: Ae(),
161
- objectOf: Le,
162
- oneOf: Ee,
163
- oneOfType: be,
164
- shape: Pe,
165
- exact: Ie
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 I(t, c) {
168
- return t === c ? t !== 0 || 1 / t === 1 / c : t !== t && c !== c;
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 C(t, c) {
171
- this.message = t, this.data = c && typeof c == "object" ? c : {}, this.stack = "";
231
+ function PropTypeError(message, data2) {
232
+ this.message = message;
233
+ this.data = data2 && typeof data2 === "object" ? data2 : {};
234
+ this.stack = "";
172
235
  }
173
- C.prototype = Error.prototype;
174
- function L(t) {
175
- if (process.env.NODE_ENV !== "production")
176
- var c = {}, g = 0;
177
- function f(m, p, w, h, S, v, P) {
178
- if (h = h || M, v = v || w, P !== r) {
179
- if (u) {
180
- var b = new Error(
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
- throw b.name = "Invariant Violation", b;
184
- } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
185
- var G = h + ":" + w;
186
- !c[G] && // Avoid spamming the console because they are often not actionable except for lib authors
187
- g < 3 && (n(
188
- "You are manually calling a React.PropTypes validation function for the `" + v + "` prop on `" + h + "`. 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."
189
- ), c[G] = !0, g++);
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
- return p[w] == null ? m ? p[w] === null ? new C("The " + S + " `" + v + "` is marked as required " + ("in `" + h + "`, but its value is `null`.")) : new C("The " + S + " `" + v + "` is marked as required in " + ("`" + h + "`, but its value is `undefined`.")) : null : t(p, w, h, S, v);
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 _ = f.bind(null, !1);
195
- return _.isRequired = f.bind(null, !0), _;
276
+ var chainedCheckType = checkType.bind(null, false);
277
+ chainedCheckType.isRequired = checkType.bind(null, true);
278
+ return chainedCheckType;
196
279
  }
197
- function A(t) {
198
- function c(g, f, _, m, p, w) {
199
- var h = g[f], S = B(h);
200
- if (S !== t) {
201
- var v = q(h);
202
- return new C(
203
- "Invalid " + m + " `" + p + "` of type " + ("`" + v + "` supplied to `" + _ + "`, expected ") + ("`" + t + "`."),
204
- { expectedType: t }
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 L(c);
293
+ return createChainableTypeChecker(validate);
210
294
  }
211
- function R() {
212
- return L(s);
295
+ function createAnyTypeChecker() {
296
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
213
297
  }
214
- function k(t) {
215
- function c(g, f, _, m, p) {
216
- if (typeof t != "function")
217
- return new C("Property `" + p + "` of component `" + _ + "` has invalid PropType notation inside arrayOf.");
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
- for (var S = 0; S < w.length; S++) {
224
- var v = t(w, S, _, m, p + "[" + S + "]", r);
225
- if (v instanceof Error)
226
- return v;
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 L(c);
316
+ return createChainableTypeChecker(validate);
231
317
  }
232
- function D() {
233
- function t(c, g, f, _, m) {
234
- var p = c[g];
235
- if (!o(p)) {
236
- var w = B(p);
237
- return new C("Invalid " + _ + " `" + m + "` of type " + ("`" + w + "` supplied to `" + f + "`, expected a single ReactElement."));
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 L(t);
327
+ return createChainableTypeChecker(validate);
242
328
  }
243
- function V() {
244
- function t(c, g, f, _, m) {
245
- var p = c[g];
246
- if (!e.isValidElementType(p)) {
247
- var w = B(p);
248
- return new C("Invalid " + _ + " `" + m + "` of type " + ("`" + w + "` supplied to `" + f + "`, expected a single ReactElement type."));
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 L(t);
338
+ return createChainableTypeChecker(validate);
253
339
  }
254
- function z(t) {
255
- function c(g, f, _, m, p) {
256
- if (!(g[f] instanceof t)) {
257
- var w = t.name || M, h = Be(g[f]);
258
- return new C("Invalid " + m + " `" + p + "` of type " + ("`" + h + "` supplied to `" + _ + "`, expected ") + ("instance of `" + w + "`."));
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 L(c);
349
+ return createChainableTypeChecker(validate);
263
350
  }
264
- function Ee(t) {
265
- if (!Array.isArray(t))
266
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? n(
267
- "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])."
268
- ) : n("Invalid argument supplied to oneOf, expected an array.")), s;
269
- function c(g, f, _, m, p) {
270
- for (var w = g[f], h = 0; h < t.length; h++)
271
- if (I(w, t[h]))
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
- var S = JSON.stringify(t, function(P, b) {
274
- var G = q(b);
275
- return G === "symbol" ? String(b) : b;
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 C("Invalid " + m + " `" + p + "` of value `" + String(w) + "` " + ("supplied to `" + _ + "`, expected one of " + S + "."));
378
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
278
379
  }
279
- return L(c);
380
+ return createChainableTypeChecker(validate);
280
381
  }
281
- function Le(t) {
282
- function c(g, f, _, m, p) {
283
- if (typeof t != "function")
284
- return new C("Property `" + p + "` of component `" + _ + "` has invalid PropType notation inside objectOf.");
285
- var w = g[f], h = B(w);
286
- if (h !== "object")
287
- return new C("Invalid " + m + " `" + p + "` of type " + ("`" + h + "` supplied to `" + _ + "`, expected an object."));
288
- for (var S in w)
289
- if (a(w, S)) {
290
- var v = t(w, S, _, m, p + "." + S, r);
291
- if (v instanceof Error)
292
- return v;
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 L(c);
402
+ return createChainableTypeChecker(validate);
297
403
  }
298
- function be(t) {
299
- if (!Array.isArray(t))
300
- return process.env.NODE_ENV !== "production" && n("Invalid argument supplied to oneOfType, expected an instance of array."), s;
301
- for (var c = 0; c < t.length; c++) {
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
- function f(_, m, p, w, h) {
309
- for (var S = [], v = 0; v < t.length; v++) {
310
- var P = t[v], b = P(_, m, p, w, h, r);
311
- if (b == null)
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
- b.data && a(b.data, "expectedType") && S.push(b.data.expectedType);
425
+ }
426
+ if (checkerResult.data && has2(checkerResult.data, "expectedType")) {
427
+ expectedTypes.push(checkerResult.data.expectedType);
428
+ }
314
429
  }
315
- var G = S.length > 0 ? ", expected one of type [" + S.join(", ") + "]" : "";
316
- return new C("Invalid " + w + " `" + h + "` supplied to " + ("`" + p + "`" + G + "."));
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 L(f);
433
+ return createChainableTypeChecker(validate);
319
434
  }
320
- function Ae() {
321
- function t(c, g, f, _, m) {
322
- return H(c[g]) ? null : new C("Invalid " + _ + " `" + m + "` supplied to " + ("`" + f + "`, expected a ReactNode."));
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 L(t);
442
+ return createChainableTypeChecker(validate);
325
443
  }
326
- function ie(t, c, g, f, _) {
327
- return new C(
328
- (t || "React class") + ": " + c + " type `" + g + "." + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + _ + "`."
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 Pe(t) {
332
- function c(g, f, _, m, p) {
333
- var w = g[f], h = B(w);
334
- if (h !== "object")
335
- return new C("Invalid " + m + " `" + p + "` of type `" + h + "` " + ("supplied to `" + _ + "`, expected `object`."));
336
- for (var S in t) {
337
- var v = t[S];
338
- if (typeof v != "function")
339
- return ie(_, m, p, S, q(v));
340
- var P = v(w, S, _, m, p + "." + S, r);
341
- if (P)
342
- return P;
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 L(c);
468
+ return createChainableTypeChecker(validate);
347
469
  }
348
- function Ie(t) {
349
- function c(g, f, _, m, p) {
350
- var w = g[f], h = B(w);
351
- if (h !== "object")
352
- return new C("Invalid " + m + " `" + p + "` of type `" + h + "` " + ("supplied to `" + _ + "`, expected `object`."));
353
- var S = i({}, g[f], t);
354
- for (var v in S) {
355
- var P = t[v];
356
- if (a(t, v) && typeof P != "function")
357
- return ie(_, m, p, v, q(P));
358
- if (!P)
359
- return new C(
360
- "Invalid " + m + " `" + p + "` key `" + v + "` supplied to `" + _ + "`.\nBad object: " + JSON.stringify(g[f], null, " ") + `
361
- Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
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
- var b = P(w, v, _, m, p + "." + v, r);
364
- if (b)
365
- return b;
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 L(c);
495
+ return createChainableTypeChecker(validate);
370
496
  }
371
- function H(t) {
372
- switch (typeof t) {
497
+ function isNode(propValue) {
498
+ switch (typeof propValue) {
373
499
  case "number":
374
500
  case "string":
375
501
  case "undefined":
376
- return !0;
502
+ return true;
377
503
  case "boolean":
378
- return !t;
504
+ return !propValue;
379
505
  case "object":
380
- if (Array.isArray(t))
381
- return t.every(H);
382
- if (t === null || o(t))
383
- return !0;
384
- var c = T(t);
385
- if (c) {
386
- var g = c.call(t), f;
387
- if (c !== t.entries) {
388
- for (; !(f = g.next()).done; )
389
- if (!H(f.value))
390
- return !1;
391
- } else
392
- for (; !(f = g.next()).done; ) {
393
- var _ = f.value;
394
- if (_ && !H(_[1]))
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
- } else
398
- return !1;
399
- return !0;
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 !1;
537
+ return false;
402
538
  }
403
539
  }
404
- function Oe(t, c) {
405
- return t === "symbol" ? !0 : c ? c["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && c instanceof Symbol : !1;
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 B(t) {
408
- var c = typeof t;
409
- return Array.isArray(t) ? "array" : t instanceof RegExp ? "object" : Oe(c, t) ? "symbol" : c;
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 q(t) {
412
- if (typeof t > "u" || t === null)
413
- return "" + t;
414
- var c = B(t);
415
- if (c === "object") {
416
- if (t instanceof Date)
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 (t instanceof RegExp)
576
+ } else if (propValue instanceof RegExp) {
419
577
  return "regexp";
578
+ }
420
579
  }
421
- return c;
580
+ return propType;
422
581
  }
423
- function ke(t) {
424
- var c = q(t);
425
- switch (c) {
582
+ function getPostfixForTypeWarning(value) {
583
+ var type = getPreciseType(value);
584
+ switch (type) {
426
585
  case "array":
427
586
  case "object":
428
- return "an " + c;
587
+ return "an " + type;
429
588
  case "boolean":
430
589
  case "date":
431
590
  case "regexp":
432
- return "a " + c;
591
+ return "a " + type;
433
592
  default:
434
- return c;
593
+ return type;
435
594
  }
436
595
  }
437
- function Be(t) {
438
- return !t.constructor || !t.constructor.name ? M : t.constructor.name;
596
+ function getClassName(propValue) {
597
+ if (!propValue.constructor || !propValue.constructor.name) {
598
+ return ANONYMOUS;
599
+ }
600
+ return propValue.constructor.name;
439
601
  }
440
- return E.checkPropTypes = d, E.resetWarningCache = d.resetWarningCache, E.PropTypes = E, E;
441
- }, J;
602
+ ReactPropTypes.checkPropTypes = checkPropTypes;
603
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
604
+ ReactPropTypes.PropTypes = ReactPropTypes;
605
+ return ReactPropTypes;
606
+ };
607
+ return factoryWithTypeCheckers;
442
608
  }
443
- var $, ye;
444
- function Fe() {
445
- if (ye) return $;
446
- ye = 1;
447
- var e = re();
448
- function i() {
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 r() {
617
+ function emptyFunctionWithReset() {
451
618
  }
452
- return r.resetWarningCache = i, $ = function() {
453
- function a(s, o, u, y, l, T) {
454
- if (T !== e) {
455
- var M = new Error(
456
- "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"
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
- a.isRequired = a;
462
- function d() {
463
- return a;
631
+ shim.isRequired = shim;
632
+ function getShim() {
633
+ return shim;
464
634
  }
465
- var n = {
466
- array: a,
467
- bigint: a,
468
- bool: a,
469
- func: a,
470
- number: a,
471
- object: a,
472
- string: a,
473
- symbol: a,
474
- any: a,
475
- arrayOf: d,
476
- element: a,
477
- elementType: a,
478
- instanceOf: d,
479
- node: a,
480
- objectOf: d,
481
- oneOf: d,
482
- oneOfType: d,
483
- shape: d,
484
- exact: d,
485
- checkPropTypes: r,
486
- resetWarningCache: i
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
- return n.PropTypes = n, n;
489
- }, $;
658
+ ReactPropTypes.PropTypes = ReactPropTypes;
659
+ return ReactPropTypes;
660
+ };
661
+ return factoryWithThrowingShims;
490
662
  }
491
663
  if (process.env.NODE_ENV !== "production") {
492
- var Ze = me, Ye = !0;
493
- ae.exports = We()(Ze.isElement, Ye);
494
- } else
495
- ae.exports = Fe()();
496
- var Je = ae.exports;
497
- const x = /* @__PURE__ */ je(Je), te = process.env.NODE_ENV !== "production" ? x.oneOfType([x.number, x.string, x.object, x.array]) : {};
498
- function $e(e, i, r = !0) {
499
- if (e && e.vars && r) {
500
- const a = `vars.${i}`.split(".").reduce((d, n) => d && d[n] ? d[n] : null, e);
501
- if (a != null)
502
- return a;
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 i.split(".").reduce((a, d) => a && a[d] != null ? a[d] : null, e);
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 Te = ["m", "mt", "mr", "mb", "ml", "mx", "my", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "marginInline", "marginInlineStart", "marginInlineEnd", "marginBlock", "marginBlockStart", "marginBlockEnd"], Se = ["p", "pt", "pr", "pb", "pl", "px", "py", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd"], Qe = [...Te, ...Se];
507
- function Xe(e, i, r, a) {
508
- var d;
509
- const n = (d = $e(e, i, !1)) != null ? d : r;
510
- return typeof n == "number" ? (s) => typeof s == "string" ? s : (process.env.NODE_ENV !== "production" && typeof s != "number" && console.error(`MUI: Expected ${a} argument to be a number or a string, got ${s}.`), n * s) : Array.isArray(n) ? (s) => typeof s == "string" ? s : (process.env.NODE_ENV !== "production" && (Number.isInteger(s) ? s > n.length - 1 && console.error([`MUI: The value provided (${s}) overflows.`, `The supported values are: ${JSON.stringify(n)}.`, `${s} > ${n.length - 1}, you need to add the missing values.`].join(`
511
- `)) : console.error([`MUI: The \`theme.${i}\` 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.${i}\` as a number.`].join(`
512
- `))), n[s]) : typeof n == "function" ? n : (process.env.NODE_ENV !== "production" && console.error([`MUI: The \`theme.${i}\` value (${n}) is invalid.`, "It should be a number, an array or a function."].join(`
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 ea(e) {
517
- return Xe(e, "spacing", 8, "spacing");
729
+ function createUnarySpacing(theme) {
730
+ return createUnaryUnit(theme, "spacing", 8, "spacing");
518
731
  }
519
- process.env.NODE_ENV !== "production" && Te.reduce((e, i) => (e[i] = te, e), {});
520
- process.env.NODE_ENV !== "production" && Se.reduce((e, i) => (e[i] = te, e), {});
521
- process.env.NODE_ENV !== "production" && Qe.reduce((e, i) => (e[i] = te, e), {});
522
- function aa(e = 8) {
523
- if (e.mui)
524
- return e;
525
- const i = ea({
526
- spacing: e
527
- }), r = (...a) => (process.env.NODE_ENV !== "production" && (a.length <= 4 || console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${a.length}`)), (a.length === 0 ? [1] : a).map((n) => {
528
- const s = i(n);
529
- return typeof s == "number" ? `${s}px` : s;
530
- }).join(" "));
531
- return r.mui = !0, r;
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 na = 8, ka = {
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
- }, j = aa(na), Ba = j(1.5), Ra = j(2.25), Ga = j(3), Na = j(6), Da = 6e3, ra = {
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 ta({ italic: e, weight: i, style: r, children: a, ...d }, n) {
545
- const s = {
546
- fontWeight: ra[i],
547
- fontStyle: e ? "italic" : void 0
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__ */ O(
550
- Ge,
790
+ return /* @__PURE__ */ jsx(
791
+ Typography$1,
551
792
  {
552
- ...d,
553
- ref: n,
793
+ ...otherProps,
794
+ ref,
554
795
  style: {
555
- ...s,
556
- ...r
796
+ ...fontConfiguration,
797
+ ...style
557
798
  },
558
799
  "data-name": "typography",
559
- children: a
800
+ children
560
801
  }
561
802
  );
562
803
  }
563
- const qa = De(ta), ia = {
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
- copy: "Copy"
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
- }, sa = {
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
- copy: "Copiar"
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
- }, da = {
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
- copy: "Salin"
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
- }, pe = { en: ia, es: sa, id: da };
985
- function oa(e) {
986
- return Intl.getCanonicalLocales(e);
1246
+ };
1247
+ const messages = { en, es, id };
1248
+ function CanonicalizeLocaleList(locales) {
1249
+ return Intl.getCanonicalLocales(locales);
987
1250
  }
988
- function U(e, i, r) {
989
- if (r || arguments.length === 2) for (var a = 0, d = i.length, n; a < d; a++)
990
- (n || !(a in i)) && (n || (n = Array.prototype.slice.call(i, 0, a)), n[a] = i[a]);
991
- return e.concat(n || Array.prototype.slice.call(i));
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
- var Q = {
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
- }, ca = {
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
- }, Me = /-u(?:-[0-9a-z]{2,8})+/gi;
4945
- function N(e, i, r) {
4946
- if (r === void 0 && (r = Error), !e)
4947
- throw new r(i);
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 ua = 838, X;
4950
- function _a() {
4951
- var e, i;
4952
- if (!X) {
4953
- var r = (i = (e = Q.supplemental.languageMatching["written-new"][0]) === null || e === void 0 ? void 0 : e.paradigmLocales) === null || i === void 0 ? void 0 : i._locales.split(" "), a = Q.supplemental.languageMatching["written-new"].slice(1, 5), d = Q.supplemental.languageMatching["written-new"].slice(5), n = d.map(function(s) {
4954
- var o = Object.keys(s)[0], u = s[o];
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: o,
4957
- desired: u._desired,
4958
- distance: +u._distance,
4959
- oneway: u.oneway === "true"
5238
+ supported: key,
5239
+ desired: value._desired,
5240
+ distance: +value._distance,
5241
+ oneway: value.oneway === "true" ? true : false
4960
5242
  };
4961
5243
  }, {});
4962
- X = {
4963
- matches: n,
4964
- matchVariables: a.reduce(function(s, o) {
4965
- var u = Object.keys(o)[0], y = o[u];
4966
- return s[u.slice(1)] = y._value.split("+"), s;
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: U(U([], r, !0), r.map(function(s) {
4969
- return new Intl.Locale(s.replace(/_/g, "-")).maximize().toString();
4970
- }), !0)
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 X;
5257
+ return PROCESSED_DATA;
4974
5258
  }
4975
- function K(e, i, r) {
4976
- var a = i.split("-"), d = a[0], n = a[1], s = a[2], o = !0;
4977
- if (s && s[0] === "$") {
4978
- var u = s[1] !== "!", y = u ? r[s.slice(1)] : r[s.slice(2)], l = y.map(function(T) {
4979
- return ca[T] || [T];
4980
- }).reduce(function(T, M) {
4981
- return U(U([], T, !0), M, !0);
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
- o && (o = l.indexOf(e.region || "") > 1 == u);
4984
- } else
4985
- o && (o = e.region ? s === "*" || s === e.region : !0);
4986
- return o && (o = e.script ? n === "*" || n === e.script : !0), o && (o = e.language ? d === "*" || d === e.language : !0), o;
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 fe(e) {
4989
- return [e.language, e.script, e.region].filter(Boolean).join("-");
5278
+ function serializeLSR(lsr) {
5279
+ return [lsr.language, lsr.script, lsr.region].filter(Boolean).join("-");
4990
5280
  }
4991
- function ee(e, i, r) {
4992
- for (var a = 0, d = r.matches; a < d.length; a++) {
4993
- var n = d[a], s = K(e, n.desired, r.matchVariables) && K(i, n.supported, r.matchVariables);
4994
- if (!n.oneway && !s && (s = K(e, n.supported, r.matchVariables) && K(i, n.desired, r.matchVariables)), s) {
4995
- var o = n.distance * 10;
4996
- return r.paradigmLocales.indexOf(fe(e)) > -1 != r.paradigmLocales.indexOf(fe(i)) > -1 ? o - 1 : o;
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 la(e, i) {
5002
- var r = new Intl.Locale(e).maximize(), a = new Intl.Locale(i).maximize(), d = {
5003
- language: r.language,
5004
- script: r.script || "",
5005
- region: r.region || ""
5006
- }, n = {
5007
- language: a.language,
5008
- script: a.script || "",
5009
- region: a.region || ""
5010
- }, s = 0, o = _a();
5011
- return d.language !== n.language && (s += ee({
5012
- language: r.language,
5013
- script: "",
5014
- region: ""
5015
- }, {
5016
- language: a.language,
5017
- script: "",
5018
- region: ""
5019
- }, o)), d.script !== n.script && (s += ee({
5020
- language: r.language,
5021
- script: d.script,
5022
- region: ""
5023
- }, {
5024
- language: a.language,
5025
- script: d.script,
5026
- region: ""
5027
- }, o)), d.region !== n.region && (s += ee(d, n, o)), s;
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 ya(e, i, r) {
5030
- r === void 0 && (r = ua);
5031
- var a = 1 / 0, d = {
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
- return e.forEach(function(n, s) {
5036
- d.distances[n] || (d.distances[n] = {}), i.forEach(function(o) {
5037
- var u = la(n, o) + 0 + s * 40;
5038
- d.distances[n][o] = u, u < a && (a = u, d.matchedDesiredLocale = n, d.matchedSupportedLocale = o);
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
- }), a >= r && (d.matchedDesiredLocale = void 0, d.matchedSupportedLocale = void 0), d;
5362
+ });
5363
+ if (lowestDistance >= threshold) {
5364
+ result.matchedDesiredLocale = void 0;
5365
+ result.matchedSupportedLocale = void 0;
5366
+ }
5367
+ return result;
5041
5368
  }
5042
- function pa(e, i, r) {
5043
- var a, d, n = [], s = i.reduce(function(u, y) {
5044
- var l = y.replace(Me, "");
5045
- return n.push(l), u[l] = y, u;
5046
- }, {}), o = ya(n, e);
5047
- return o.matchedSupportedLocale && o.matchedDesiredLocale && (a = o.matchedSupportedLocale, d = s[o.matchedDesiredLocale].slice(o.matchedDesiredLocale.length) || void 0), a ? {
5048
- locale: a,
5049
- extension: d
5050
- } : { locale: r() };
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 fa(e, i) {
5053
- for (var r = i; ; ) {
5054
- if (e.indexOf(r) > -1)
5055
- return r;
5056
- var a = r.lastIndexOf("-");
5057
- if (!~a)
5058
- return;
5059
- a >= 2 && r[a - 2] === "-" && (a -= 2), r = r.slice(0, a);
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 wa(e, i, r) {
5063
- for (var a = { locale: "" }, d = 0, n = i; d < n.length; d++) {
5064
- var s = n[d], o = s.replace(Me, ""), u = fa(e, o);
5065
- if (u)
5066
- return a.locale = u, s !== o && (a.extension = s.slice(o.length, s.length)), a;
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
- return a.locale = r(), a;
5422
+ result.locale = getDefaultLocale();
5423
+ return result;
5069
5424
  }
5070
- function ga(e, i) {
5071
- N(i.length === 2, "key must have 2 elements");
5072
- var r = e.length, a = "-".concat(i, "-"), d = e.indexOf(a);
5073
- if (d !== -1) {
5074
- for (var n = d + 4, s = n, o = n, u = !1; !u; ) {
5075
- var y = e.indexOf("-", o), l = void 0;
5076
- y === -1 ? l = r - o : l = y - o, l === 2 ? u = !0 : y === -1 ? (s = r, u = !0) : (s = y, o = y + 1);
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 e.slice(n, s);
5453
+ return extension.slice(start, end);
5079
5454
  }
5080
- if (a = "-".concat(i), d = e.indexOf(a), d !== -1 && d + 3 === r)
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 ma(e, i, r, a, d, n) {
5084
- var s = r.localeMatcher, o;
5085
- s === "lookup" ? o = wa(Array.from(e), i, n) : o = pa(Array.from(e), i, n);
5086
- for (var u = o.locale, y = { locale: "", dataLocale: u }, l = "-u", T = 0, M = a; T < M.length; T++) {
5087
- var E = M[T];
5088
- N(u in d, "Missing locale data for ".concat(u));
5089
- var I = d[u];
5090
- N(typeof I == "object" && I !== null, "locale data ".concat(E, " must be an object"));
5091
- var C = I[E];
5092
- N(Array.isArray(C), "keyLocaleData for ".concat(E, " must be an array"));
5093
- var L = C[0];
5094
- N(typeof L == "string" || L === null, "value must be string or null but got ".concat(typeof L, " in key ").concat(E));
5095
- var A = "";
5096
- if (o.extension) {
5097
- var R = ga(o.extension, E);
5098
- R !== void 0 && (R !== "" ? ~C.indexOf(R) && (L = R, A = "-".concat(E, "-").concat(L)) : ~R.indexOf("true") && (L = "true", A = "-".concat(E)));
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 (E in r) {
5101
- var k = r[E];
5102
- N(typeof k == "string" || typeof k > "u" || k === null, "optionsValue must be String, Undefined or Null"), ~C.indexOf(k) && k !== L && (L = k, A = "");
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
- y[E] = L, l += A;
5507
+ result[key] = value;
5508
+ supportedExtension += supportedExtensionAddition;
5105
5509
  }
5106
- if (l.length > 2) {
5107
- var D = u.indexOf("-x-");
5108
- if (D === -1)
5109
- u = u + l;
5110
- else {
5111
- var V = u.slice(0, D), z = u.slice(D, u.length);
5112
- u = V + l + z;
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
- u = Intl.getCanonicalLocales(u)[0];
5519
+ foundLocale = Intl.getCanonicalLocales(foundLocale)[0];
5115
5520
  }
5116
- return y.locale = u, y;
5521
+ result.locale = foundLocale;
5522
+ return result;
5117
5523
  }
5118
- function ha(e, i, r, a) {
5119
- return ma(i, oa(e), {
5524
+ function match(requestedLocales, availableLocales, defaultLocale, opts) {
5525
+ return ResolveLocale(availableLocales, CanonicalizeLocaleList(requestedLocales), {
5120
5526
  localeMatcher: "best fit"
5121
5527
  }, [], {}, function() {
5122
- return r;
5528
+ return defaultLocale;
5123
5529
  }).locale;
5124
5530
  }
5125
- const ne = "en";
5126
- function Ce(e, i = "") {
5127
- return Object.keys(e).reduce(
5128
- (r, a) => {
5129
- const d = e[a], n = i ? `${i}.${a}` : a;
5130
- return typeof d == "string" ? r[n] = d : Object.assign(r, Ce(d, n)), r;
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 va(e, i) {
5136
- const r = Object.keys(i), a = ha(
5137
- [e],
5138
- r,
5139
- ne
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 a || ne;
5554
+ return matchedLocale ? matchedLocale : DEFAULT_LOCALE;
5142
5555
  }
5143
- const Ta = He(), we = /* @__PURE__ */ new WeakMap(), Sa = (e) => {
5144
- const i = (e == null ? void 0 : e.locale) || ne, r = va(i, pe), a = {
5145
- ...pe[r] || {},
5146
- ...(e == null ? void 0 : e.messages) ?? {}
5147
- }, d = Ce(a);
5148
- return Ke(
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: i,
5151
- messages: d
5568
+ locale,
5569
+ messages: combinedMessages
5152
5570
  },
5153
- Ta
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
- function Ca(e) {
5163
- return Ma(e);
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 Ea = he(Ne)(({ theme: e }) => ({
5586
+ const Root = styled(Box)(({ theme }) => ({
5166
5587
  display: "flex",
5167
- gap: e.spacing(0.5),
5168
- marginLeft: e.spacing(1)
5169
- })), ge = he("div")(({ theme: e }) => ({
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: e.palette.text.secondary
5593
+ color: theme.palette.text.secondary
5172
5594
  }
5173
5595
  }));
5174
- function xa({
5175
- count: e,
5176
- page: i,
5177
- rowsPerPage: r = 10,
5178
- onPageChange: a,
5179
- lastPageTooltip: d
5596
+ function TablePaginationActions({
5597
+ count,
5598
+ page,
5599
+ rowsPerPage = 10,
5600
+ onPageChange,
5601
+ lastPageTooltip
5180
5602
  }) {
5181
- const n = Ue(), s = Ca(n), o = (I) => {
5182
- a(I, i - 1);
5183
- }, u = (I) => {
5184
- a(I, i + 1);
5185
- }, y = i === Math.ceil(e / r) - 1, l = i === 0, T = s.formatMessage({
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
- }), M = s.formatMessage({
5615
+ });
5616
+ const nextLabel = intlConfig.formatMessage({
5188
5617
  id: "c4r.form.pagination.nextPage"
5189
- }), E = s.formatMessage({
5618
+ });
5619
+ const noMorePagesText = intlConfig.formatMessage({
5190
5620
  id: "c4r.form.pagination.noMorePages"
5191
5621
  });
5192
- return /* @__PURE__ */ Re(Ea, { children: [
5193
- /* @__PURE__ */ O(se, { title: l ? E : T, children: /* @__PURE__ */ O(ge, { children: /* @__PURE__ */ O(
5194
- de,
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: o,
5197
- disabled: i === 0,
5198
- "aria-label": T,
5199
- children: /* @__PURE__ */ O(qe, {})
5626
+ onClick: handleBackButtonClick,
5627
+ disabled: page === 0,
5628
+ "aria-label": prevLabel,
5629
+ children: /* @__PURE__ */ jsx(KeyboardArrowLeftOutlined, {})
5200
5630
  }
5201
5631
  ) }) }),
5202
- /* @__PURE__ */ O(
5203
- se,
5632
+ /* @__PURE__ */ jsx(
5633
+ Tooltip,
5204
5634
  {
5205
- title: y ? d ?? E : M,
5206
- children: /* @__PURE__ */ O(ge, { children: /* @__PURE__ */ O(
5207
- de,
5635
+ title: isLastPage ? lastPageTooltip ?? noMorePagesText : nextLabel,
5636
+ children: /* @__PURE__ */ jsx(Button, { children: /* @__PURE__ */ jsx(
5637
+ IconButton,
5208
5638
  {
5209
- onClick: u,
5210
- disabled: i >= Math.ceil(e / r) - 1,
5211
- "aria-label": M.toLocaleLowerCase(),
5212
- children: /* @__PURE__ */ O(xe, {})
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
- Na as A,
5221
- ka as B,
5222
- Ga as I,
5223
- Da as N,
5224
- na as S,
5225
- qa as T,
5226
- xa as a,
5227
- Ra as b,
5228
- Ba as c,
5229
- je as d,
5230
- j as g,
5231
- Ca as u
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
  };