react-intl 6.0.6 → 6.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/index.d.ts +43 -0
  2. package/index.d.ts.map +1 -0
  3. package/index.js +51 -0
  4. package/lib/index.d.ts +43 -0
  5. package/lib/index.d.ts.map +1 -0
  6. package/lib/index.js +26 -0
  7. package/lib/src/components/createFormattedComponent.d.ts +29 -0
  8. package/lib/src/components/createFormattedComponent.d.ts.map +1 -0
  9. package/lib/src/components/createFormattedComponent.js +62 -0
  10. package/lib/src/components/dateTimeRange.d.ts +11 -0
  11. package/lib/src/components/dateTimeRange.d.ts.map +1 -0
  12. package/lib/src/components/dateTimeRange.js +15 -0
  13. package/lib/src/components/injectIntl.d.ts +22 -0
  14. package/lib/src/components/injectIntl.d.ts.map +1 -0
  15. package/lib/src/components/injectIntl.js +29 -0
  16. package/lib/src/components/message.d.ts +12 -0
  17. package/lib/src/components/message.d.ts.map +1 -0
  18. package/lib/src/components/message.js +35 -0
  19. package/lib/src/components/plural.d.ts +15 -0
  20. package/lib/src/components/plural.d.ts.map +1 -0
  21. package/lib/src/components/plural.js +26 -0
  22. package/lib/src/components/provider.d.ts +35 -0
  23. package/lib/src/components/provider.d.ts.map +1 -0
  24. package/lib/src/components/provider.js +112 -0
  25. package/lib/src/components/relative.d.ts +12 -0
  26. package/lib/src/components/relative.d.ts.map +1 -0
  27. package/lib/src/components/relative.js +129 -0
  28. package/lib/src/components/useIntl.d.ts +3 -0
  29. package/lib/src/components/useIntl.d.ts.map +1 -0
  30. package/lib/src/components/useIntl.js +8 -0
  31. package/lib/src/types.d.ts +12 -0
  32. package/lib/src/types.d.ts.map +1 -0
  33. package/lib/src/types.js +1 -0
  34. package/lib/src/utils.d.ts +14 -0
  35. package/lib/src/utils.d.ts.map +1 -0
  36. package/lib/src/utils.js +43 -0
  37. package/package.json +10 -10
  38. package/react-intl.iife.js +4688 -0
  39. package/src/components/createFormattedComponent.d.ts +29 -0
  40. package/src/components/createFormattedComponent.d.ts.map +1 -0
  41. package/src/components/createFormattedComponent.js +69 -0
  42. package/src/components/dateTimeRange.d.ts +11 -0
  43. package/src/components/dateTimeRange.d.ts.map +1 -0
  44. package/src/components/dateTimeRange.js +17 -0
  45. package/src/components/injectIntl.d.ts +22 -0
  46. package/src/components/injectIntl.d.ts.map +1 -0
  47. package/src/components/injectIntl.js +33 -0
  48. package/src/components/message.d.ts +12 -0
  49. package/src/components/message.d.ts.map +1 -0
  50. package/src/components/message.js +37 -0
  51. package/src/components/plural.d.ts +15 -0
  52. package/src/components/plural.d.ts.map +1 -0
  53. package/src/components/plural.js +29 -0
  54. package/src/components/provider.d.ts +35 -0
  55. package/src/components/provider.d.ts.map +1 -0
  56. package/src/components/provider.js +116 -0
  57. package/src/components/relative.d.ts +12 -0
  58. package/src/components/relative.d.ts.map +1 -0
  59. package/src/components/relative.js +131 -0
  60. package/src/components/useIntl.d.ts +3 -0
  61. package/src/components/useIntl.d.ts.map +1 -0
  62. package/src/components/useIntl.js +12 -0
  63. package/src/types.d.ts +12 -0
  64. package/src/types.d.ts.map +1 -0
  65. package/src/types.js +2 -0
  66. package/src/utils.d.ts +14 -0
  67. package/src/utils.d.ts.map +1 -0
  68. package/src/utils.js +49 -0
  69. package/BUILD +0 -130
  70. package/CHANGELOG.md +0 -1384
  71. package/example-sandboxes/rescripts/.rescriptsrc.js +0 -28
  72. package/example-sandboxes/rescripts/package-lock.json +0 -18035
  73. package/example-sandboxes/rescripts/package.json +0 -35
  74. package/example-sandboxes/rescripts/public/index.html +0 -42
  75. package/example-sandboxes/rescripts/src/App.tsx +0 -16
  76. package/example-sandboxes/rescripts/src/index.tsx +0 -5
  77. package/example-sandboxes/rescripts/src/react-app-env.d.ts +0 -1
  78. package/example-sandboxes/rescripts/src/styles.css +0 -4
  79. package/example-sandboxes/rescripts/tsconfig.json +0 -20
  80. package/example-sandboxes/strict-locale-type/.env +0 -1
  81. package/example-sandboxes/strict-locale-type/package-lock.json +0 -14595
  82. package/example-sandboxes/strict-locale-type/package.json +0 -35
  83. package/example-sandboxes/strict-locale-type/src/App.tsx +0 -48
  84. package/example-sandboxes/strict-locale-type/src/index.html +0 -28
  85. package/example-sandboxes/strict-locale-type/src/index.tsx +0 -7
  86. package/example-sandboxes/strict-locale-type/src/styles.css +0 -4
  87. package/example-sandboxes/strict-locale-type/tsconfig.json +0 -7
  88. package/example-sandboxes/strict-message-types/.env +0 -1
  89. package/example-sandboxes/strict-message-types/package-lock.json +0 -14596
  90. package/example-sandboxes/strict-message-types/package.json +0 -35
  91. package/example-sandboxes/strict-message-types/src/App.tsx +0 -31
  92. package/example-sandboxes/strict-message-types/src/index.html +0 -28
  93. package/example-sandboxes/strict-message-types/src/index.tsx +0 -7
  94. package/example-sandboxes/strict-message-types/src/styles.css +0 -4
  95. package/example-sandboxes/strict-message-types/tsconfig.json +0 -7
  96. package/examples/BUILD +0 -70
  97. package/examples/Bug2727.tsx +0 -37
  98. package/examples/HandleChange.tsx +0 -48
  99. package/examples/Hooks.tsx +0 -126
  100. package/examples/Injected.tsx +0 -41
  101. package/examples/Messages.tsx +0 -82
  102. package/examples/StaticTypeSafetyAndCodeSplitting/StaticTypeSafetyAndCodeSplitting.tsx +0 -44
  103. package/examples/StaticTypeSafetyAndCodeSplitting/en.json +0 -3
  104. package/examples/StaticTypeSafetyAndCodeSplitting/intlHelpers.tsx +0 -39
  105. package/examples/StaticTypeSafetyAndCodeSplitting/it.json +0 -3
  106. package/examples/TimeZone.tsx +0 -44
  107. package/examples/advanced/Advanced.tsx +0 -68
  108. package/examples/advanced/compiled-lang/en.json +0 -77
  109. package/examples/advanced/compiled-lang/fr.json +0 -77
  110. package/examples/index.html +0 -20
  111. package/examples/index.tsx +0 -44
  112. package/examples/package.json +0 -20
  113. package/index.ts +0 -127
  114. package/jest.config.js +0 -27
  115. package/src/components/createFormattedComponent.tsx +0 -123
  116. package/src/components/dateTimeRange.tsx +0 -26
  117. package/src/components/injectIntl.tsx +0 -111
  118. package/src/components/message.tsx +0 -73
  119. package/src/components/plural.tsx +0 -45
  120. package/src/components/provider.tsx +0 -196
  121. package/src/components/relative.tsx +0 -192
  122. package/src/components/useIntl.ts +0 -10
  123. package/src/types.ts +0 -29
  124. package/src/utils.ts +0 -77
  125. package/tests/functional/index.ts +0 -18
  126. package/tests/functional/support/build.ts +0 -16
  127. package/tests/functional/support/format.tsx +0 -112
  128. package/tests/perf/index.tsx +0 -196
  129. package/tests/setup.js +0 -10
  130. package/tests/unit/components/__snapshots__/displayName.tsx.snap +0 -19
  131. package/tests/unit/components/__snapshots__/message.tsx.snap +0 -41
  132. package/tests/unit/components/__snapshots__/relative.tsx.snap +0 -11
  133. package/tests/unit/components/__snapshots__/useIntl.tsx.snap +0 -25
  134. package/tests/unit/components/date.tsx +0 -233
  135. package/tests/unit/components/dateTimeRange.tsx +0 -103
  136. package/tests/unit/components/displayName.tsx +0 -57
  137. package/tests/unit/components/message.tsx +0 -509
  138. package/tests/unit/components/number.tsx +0 -198
  139. package/tests/unit/components/plural.tsx +0 -116
  140. package/tests/unit/components/provider.tsx +0 -215
  141. package/tests/unit/components/relative.tsx +0 -263
  142. package/tests/unit/components/time.tsx +0 -242
  143. package/tests/unit/components/useIntl.tsx +0 -64
  144. package/tests/unit/components/withIntl.tsx +0 -66
  145. package/tests/unit/react-intl.ts +0 -88
  146. package/tests/unit/testUtils.tsx +0 -42
  147. package/tsconfig.json +0 -5
@@ -0,0 +1,4688 @@
1
+ var ReactIntl = (() => {
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined")
12
+ return require.apply(this, arguments);
13
+ throw new Error('Dynamic require of "' + x + '" is not supported');
14
+ });
15
+ var __commonJS = (cb, mod) => function __require2() {
16
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
+ };
18
+ var __export = (target, all) => {
19
+ for (var name in all)
20
+ __defProp(target, name, { get: all[name], enumerable: true });
21
+ };
22
+ var __copyProps = (to, from, except, desc) => {
23
+ if (from && typeof from === "object" || typeof from === "function") {
24
+ for (let key of __getOwnPropNames(from))
25
+ if (!__hasOwnProp.call(to, key) && key !== except)
26
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
27
+ }
28
+ return to;
29
+ };
30
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
31
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
32
+ mod
33
+ ));
34
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
+
36
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js
37
+ var require_react_is_development = __commonJS({
38
+ "../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js"(exports) {
39
+ "use strict";
40
+ if (true) {
41
+ (function() {
42
+ "use strict";
43
+ var hasSymbol = typeof Symbol === "function" && Symbol.for;
44
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
45
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
46
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
47
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
48
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
49
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
50
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
51
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
52
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
53
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
54
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
55
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
56
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
57
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
58
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
59
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
60
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
61
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
62
+ function isValidElementType(type) {
63
+ return typeof type === "string" || typeof type === "function" || type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
64
+ }
65
+ function typeOf(object) {
66
+ if (typeof object === "object" && object !== null) {
67
+ var $$typeof = object.$$typeof;
68
+ switch ($$typeof) {
69
+ case REACT_ELEMENT_TYPE:
70
+ var type = object.type;
71
+ switch (type) {
72
+ case REACT_ASYNC_MODE_TYPE:
73
+ case REACT_CONCURRENT_MODE_TYPE:
74
+ case REACT_FRAGMENT_TYPE:
75
+ case REACT_PROFILER_TYPE:
76
+ case REACT_STRICT_MODE_TYPE:
77
+ case REACT_SUSPENSE_TYPE:
78
+ return type;
79
+ default:
80
+ var $$typeofType = type && type.$$typeof;
81
+ switch ($$typeofType) {
82
+ case REACT_CONTEXT_TYPE:
83
+ case REACT_FORWARD_REF_TYPE:
84
+ case REACT_LAZY_TYPE:
85
+ case REACT_MEMO_TYPE:
86
+ case REACT_PROVIDER_TYPE:
87
+ return $$typeofType;
88
+ default:
89
+ return $$typeof;
90
+ }
91
+ }
92
+ case REACT_PORTAL_TYPE:
93
+ return $$typeof;
94
+ }
95
+ }
96
+ return void 0;
97
+ }
98
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
99
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
100
+ var ContextConsumer = REACT_CONTEXT_TYPE;
101
+ var ContextProvider = REACT_PROVIDER_TYPE;
102
+ var Element = REACT_ELEMENT_TYPE;
103
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
104
+ var Fragment6 = REACT_FRAGMENT_TYPE;
105
+ var Lazy = REACT_LAZY_TYPE;
106
+ var Memo = REACT_MEMO_TYPE;
107
+ var Portal = REACT_PORTAL_TYPE;
108
+ var Profiler = REACT_PROFILER_TYPE;
109
+ var StrictMode = REACT_STRICT_MODE_TYPE;
110
+ var Suspense = REACT_SUSPENSE_TYPE;
111
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
112
+ function isAsyncMode(object) {
113
+ {
114
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
115
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
116
+ console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
117
+ }
118
+ }
119
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
120
+ }
121
+ function isConcurrentMode(object) {
122
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
123
+ }
124
+ function isContextConsumer(object) {
125
+ return typeOf(object) === REACT_CONTEXT_TYPE;
126
+ }
127
+ function isContextProvider(object) {
128
+ return typeOf(object) === REACT_PROVIDER_TYPE;
129
+ }
130
+ function isElement(object) {
131
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
132
+ }
133
+ function isForwardRef(object) {
134
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
135
+ }
136
+ function isFragment(object) {
137
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
138
+ }
139
+ function isLazy(object) {
140
+ return typeOf(object) === REACT_LAZY_TYPE;
141
+ }
142
+ function isMemo(object) {
143
+ return typeOf(object) === REACT_MEMO_TYPE;
144
+ }
145
+ function isPortal(object) {
146
+ return typeOf(object) === REACT_PORTAL_TYPE;
147
+ }
148
+ function isProfiler(object) {
149
+ return typeOf(object) === REACT_PROFILER_TYPE;
150
+ }
151
+ function isStrictMode(object) {
152
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
153
+ }
154
+ function isSuspense(object) {
155
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
156
+ }
157
+ exports.AsyncMode = AsyncMode;
158
+ exports.ConcurrentMode = ConcurrentMode;
159
+ exports.ContextConsumer = ContextConsumer;
160
+ exports.ContextProvider = ContextProvider;
161
+ exports.Element = Element;
162
+ exports.ForwardRef = ForwardRef;
163
+ exports.Fragment = Fragment6;
164
+ exports.Lazy = Lazy;
165
+ exports.Memo = Memo;
166
+ exports.Portal = Portal;
167
+ exports.Profiler = Profiler;
168
+ exports.StrictMode = StrictMode;
169
+ exports.Suspense = Suspense;
170
+ exports.isAsyncMode = isAsyncMode;
171
+ exports.isConcurrentMode = isConcurrentMode;
172
+ exports.isContextConsumer = isContextConsumer;
173
+ exports.isContextProvider = isContextProvider;
174
+ exports.isElement = isElement;
175
+ exports.isForwardRef = isForwardRef;
176
+ exports.isFragment = isFragment;
177
+ exports.isLazy = isLazy;
178
+ exports.isMemo = isMemo;
179
+ exports.isPortal = isPortal;
180
+ exports.isProfiler = isProfiler;
181
+ exports.isStrictMode = isStrictMode;
182
+ exports.isSuspense = isSuspense;
183
+ exports.isValidElementType = isValidElementType;
184
+ exports.typeOf = typeOf;
185
+ })();
186
+ }
187
+ }
188
+ });
189
+
190
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/react-is@16.13.1/node_modules/react-is/index.js
191
+ var require_react_is = __commonJS({
192
+ "../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/react-is@16.13.1/node_modules/react-is/index.js"(exports, module) {
193
+ "use strict";
194
+ if (false) {
195
+ module.exports = null;
196
+ } else {
197
+ module.exports = require_react_is_development();
198
+ }
199
+ }
200
+ });
201
+
202
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
203
+ var require_hoist_non_react_statics_cjs = __commonJS({
204
+ "../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(exports, module) {
205
+ "use strict";
206
+ var reactIs = require_react_is();
207
+ var REACT_STATICS = {
208
+ childContextTypes: true,
209
+ contextType: true,
210
+ contextTypes: true,
211
+ defaultProps: true,
212
+ displayName: true,
213
+ getDefaultProps: true,
214
+ getDerivedStateFromError: true,
215
+ getDerivedStateFromProps: true,
216
+ mixins: true,
217
+ propTypes: true,
218
+ type: true
219
+ };
220
+ var KNOWN_STATICS = {
221
+ name: true,
222
+ length: true,
223
+ prototype: true,
224
+ caller: true,
225
+ callee: true,
226
+ arguments: true,
227
+ arity: true
228
+ };
229
+ var FORWARD_REF_STATICS = {
230
+ "$$typeof": true,
231
+ render: true,
232
+ defaultProps: true,
233
+ displayName: true,
234
+ propTypes: true
235
+ };
236
+ var MEMO_STATICS = {
237
+ "$$typeof": true,
238
+ compare: true,
239
+ defaultProps: true,
240
+ displayName: true,
241
+ propTypes: true,
242
+ type: true
243
+ };
244
+ var TYPE_STATICS = {};
245
+ TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
246
+ TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
247
+ function getStatics(component) {
248
+ if (reactIs.isMemo(component)) {
249
+ return MEMO_STATICS;
250
+ }
251
+ return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS;
252
+ }
253
+ var defineProperty2 = Object.defineProperty;
254
+ var getOwnPropertyNames = Object.getOwnPropertyNames;
255
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
256
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
257
+ var getPrototypeOf = Object.getPrototypeOf;
258
+ var objectPrototype = Object.prototype;
259
+ function hoistNonReactStatics2(targetComponent, sourceComponent, blacklist) {
260
+ if (typeof sourceComponent !== "string") {
261
+ if (objectPrototype) {
262
+ var inheritedComponent = getPrototypeOf(sourceComponent);
263
+ if (inheritedComponent && inheritedComponent !== objectPrototype) {
264
+ hoistNonReactStatics2(targetComponent, inheritedComponent, blacklist);
265
+ }
266
+ }
267
+ var keys = getOwnPropertyNames(sourceComponent);
268
+ if (getOwnPropertySymbols) {
269
+ keys = keys.concat(getOwnPropertySymbols(sourceComponent));
270
+ }
271
+ var targetStatics = getStatics(targetComponent);
272
+ var sourceStatics = getStatics(sourceComponent);
273
+ for (var i = 0; i < keys.length; ++i) {
274
+ var key = keys[i];
275
+ if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
276
+ var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
277
+ try {
278
+ defineProperty2(targetComponent, key, descriptor);
279
+ } catch (e) {
280
+ }
281
+ }
282
+ }
283
+ }
284
+ return targetComponent;
285
+ }
286
+ module.exports = hoistNonReactStatics2;
287
+ }
288
+ });
289
+
290
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/index.js
291
+ var lib_exports = {};
292
+ __export(lib_exports, {
293
+ FormattedDate: () => FormattedDate,
294
+ FormattedDateParts: () => FormattedDateParts,
295
+ FormattedDateTimeRange: () => dateTimeRange_default,
296
+ FormattedDisplayName: () => FormattedDisplayName,
297
+ FormattedList: () => FormattedList,
298
+ FormattedListParts: () => FormattedListParts,
299
+ FormattedMessage: () => message_default,
300
+ FormattedNumber: () => FormattedNumber,
301
+ FormattedNumberParts: () => FormattedNumberParts,
302
+ FormattedPlural: () => plural_default,
303
+ FormattedRelativeTime: () => relative_default,
304
+ FormattedTime: () => FormattedTime,
305
+ FormattedTimeParts: () => FormattedTimeParts,
306
+ IntlContext: () => Context,
307
+ IntlProvider: () => provider_default,
308
+ InvalidConfigError: () => InvalidConfigError,
309
+ MessageFormatError: () => MessageFormatError,
310
+ MissingDataError: () => MissingDataError,
311
+ MissingTranslationError: () => MissingTranslationError,
312
+ RawIntlProvider: () => Provider,
313
+ ReactIntlError: () => IntlError,
314
+ ReactIntlErrorCode: () => IntlErrorCode,
315
+ UnsupportedFormatterError: () => UnsupportedFormatterError,
316
+ createIntl: () => createIntl2,
317
+ createIntlCache: () => createIntlCache,
318
+ defineMessage: () => defineMessage,
319
+ defineMessages: () => defineMessages,
320
+ injectIntl: () => injectIntl,
321
+ useIntl: () => useIntl
322
+ });
323
+
324
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/tslib@2.4.0/node_modules/tslib/tslib.es6.js
325
+ var extendStatics = function(d, b) {
326
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
327
+ d2.__proto__ = b2;
328
+ } || function(d2, b2) {
329
+ for (var p in b2)
330
+ if (Object.prototype.hasOwnProperty.call(b2, p))
331
+ d2[p] = b2[p];
332
+ };
333
+ return extendStatics(d, b);
334
+ };
335
+ function __extends(d, b) {
336
+ if (typeof b !== "function" && b !== null)
337
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
338
+ extendStatics(d, b);
339
+ function __() {
340
+ this.constructor = d;
341
+ }
342
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
343
+ }
344
+ var __assign = function() {
345
+ __assign = Object.assign || function __assign2(t) {
346
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
347
+ s = arguments[i];
348
+ for (var p in s)
349
+ if (Object.prototype.hasOwnProperty.call(s, p))
350
+ t[p] = s[p];
351
+ }
352
+ return t;
353
+ };
354
+ return __assign.apply(this, arguments);
355
+ };
356
+ function __rest(s, e) {
357
+ var t = {};
358
+ for (var p in s)
359
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
360
+ t[p] = s[p];
361
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
362
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
363
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
364
+ t[p[i]] = s[p[i]];
365
+ }
366
+ return t;
367
+ }
368
+ function __spreadArray(to, from, pack) {
369
+ if (pack || arguments.length === 2)
370
+ for (var i = 0, l = from.length, ar; i < l; i++) {
371
+ if (ar || !(i in from)) {
372
+ if (!ar)
373
+ ar = Array.prototype.slice.call(from, 0, i);
374
+ ar[i] = from[i];
375
+ }
376
+ }
377
+ return to.concat(ar || Array.prototype.slice.call(from));
378
+ }
379
+
380
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/createFormattedComponent.js
381
+ var React4 = __toESM(window.React);
382
+
383
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/useIntl.js
384
+ var React3 = __toESM(window.React);
385
+
386
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/injectIntl.js
387
+ var React2 = __toESM(window.React);
388
+ var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
389
+
390
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/utils.js
391
+ var React = __toESM(window.React);
392
+
393
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
394
+ var MINUTES_PER_HOUR = 60;
395
+ var SECONDS_PER_MINUTE = 60;
396
+ var MS_PER_SECOND = 1e3;
397
+ var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
398
+ var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
399
+
400
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
401
+ var SANCTIONED_UNITS = [
402
+ "angle-degree",
403
+ "area-acre",
404
+ "area-hectare",
405
+ "concentr-percent",
406
+ "digital-bit",
407
+ "digital-byte",
408
+ "digital-gigabit",
409
+ "digital-gigabyte",
410
+ "digital-kilobit",
411
+ "digital-kilobyte",
412
+ "digital-megabit",
413
+ "digital-megabyte",
414
+ "digital-petabyte",
415
+ "digital-terabit",
416
+ "digital-terabyte",
417
+ "duration-day",
418
+ "duration-hour",
419
+ "duration-millisecond",
420
+ "duration-minute",
421
+ "duration-month",
422
+ "duration-second",
423
+ "duration-week",
424
+ "duration-year",
425
+ "length-centimeter",
426
+ "length-foot",
427
+ "length-inch",
428
+ "length-kilometer",
429
+ "length-meter",
430
+ "length-mile-scandinavian",
431
+ "length-mile",
432
+ "length-millimeter",
433
+ "length-yard",
434
+ "mass-gram",
435
+ "mass-kilogram",
436
+ "mass-ounce",
437
+ "mass-pound",
438
+ "mass-stone",
439
+ "temperature-celsius",
440
+ "temperature-fahrenheit",
441
+ "volume-fluid-ounce",
442
+ "volume-gallon",
443
+ "volume-liter",
444
+ "volume-milliliter"
445
+ ];
446
+ function removeUnitNamespace(unit) {
447
+ return unit.slice(unit.indexOf("-") + 1);
448
+ }
449
+ var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
450
+
451
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/utils.js
452
+ function invariant(condition, message, Err) {
453
+ if (Err === void 0) {
454
+ Err = Error;
455
+ }
456
+ if (!condition) {
457
+ throw new Err(message);
458
+ }
459
+ }
460
+
461
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js
462
+ var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/;
463
+
464
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/format_to_parts.js
465
+ var CARET_S_UNICODE_REGEX = new RegExp("^".concat(S_UNICODE_REGEX.source));
466
+ var S_DOLLAR_UNICODE_REGEX = new RegExp("".concat(S_UNICODE_REGEX.source, "$"));
467
+
468
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/data.js
469
+ var MissingLocaleDataError = function(_super) {
470
+ __extends(MissingLocaleDataError2, _super);
471
+ function MissingLocaleDataError2() {
472
+ var _this = _super !== null && _super.apply(this, arguments) || this;
473
+ _this.type = "MISSING_LOCALE_DATA";
474
+ return _this;
475
+ }
476
+ return MissingLocaleDataError2;
477
+ }(Error);
478
+
479
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/types/date-time.js
480
+ var RangePatternType;
481
+ (function(RangePatternType2) {
482
+ RangePatternType2["startRange"] = "startRange";
483
+ RangePatternType2["shared"] = "shared";
484
+ RangePatternType2["endRange"] = "endRange";
485
+ })(RangePatternType || (RangePatternType = {}));
486
+
487
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/error.js
488
+ var ErrorKind;
489
+ (function(ErrorKind2) {
490
+ ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
491
+ ErrorKind2[ErrorKind2["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
492
+ ErrorKind2[ErrorKind2["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
493
+ ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
494
+ ErrorKind2[ErrorKind2["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
495
+ ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
496
+ ErrorKind2[ErrorKind2["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
497
+ ErrorKind2[ErrorKind2["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
498
+ ErrorKind2[ErrorKind2["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
499
+ ErrorKind2[ErrorKind2["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
500
+ ErrorKind2[ErrorKind2["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
501
+ ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
502
+ ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
503
+ ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
504
+ ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
505
+ ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
506
+ ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
507
+ ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
508
+ ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
509
+ ErrorKind2[ErrorKind2["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
510
+ ErrorKind2[ErrorKind2["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
511
+ ErrorKind2[ErrorKind2["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
512
+ ErrorKind2[ErrorKind2["INVALID_TAG"] = 23] = "INVALID_TAG";
513
+ ErrorKind2[ErrorKind2["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
514
+ ErrorKind2[ErrorKind2["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
515
+ ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
516
+ })(ErrorKind || (ErrorKind = {}));
517
+
518
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/types.js
519
+ var TYPE;
520
+ (function(TYPE2) {
521
+ TYPE2[TYPE2["literal"] = 0] = "literal";
522
+ TYPE2[TYPE2["argument"] = 1] = "argument";
523
+ TYPE2[TYPE2["number"] = 2] = "number";
524
+ TYPE2[TYPE2["date"] = 3] = "date";
525
+ TYPE2[TYPE2["time"] = 4] = "time";
526
+ TYPE2[TYPE2["select"] = 5] = "select";
527
+ TYPE2[TYPE2["plural"] = 6] = "plural";
528
+ TYPE2[TYPE2["pound"] = 7] = "pound";
529
+ TYPE2[TYPE2["tag"] = 8] = "tag";
530
+ })(TYPE || (TYPE = {}));
531
+ var SKELETON_TYPE;
532
+ (function(SKELETON_TYPE2) {
533
+ SKELETON_TYPE2[SKELETON_TYPE2["number"] = 0] = "number";
534
+ SKELETON_TYPE2[SKELETON_TYPE2["dateTime"] = 1] = "dateTime";
535
+ })(SKELETON_TYPE || (SKELETON_TYPE = {}));
536
+ function isLiteralElement(el) {
537
+ return el.type === TYPE.literal;
538
+ }
539
+ function isArgumentElement(el) {
540
+ return el.type === TYPE.argument;
541
+ }
542
+ function isNumberElement(el) {
543
+ return el.type === TYPE.number;
544
+ }
545
+ function isDateElement(el) {
546
+ return el.type === TYPE.date;
547
+ }
548
+ function isTimeElement(el) {
549
+ return el.type === TYPE.time;
550
+ }
551
+ function isSelectElement(el) {
552
+ return el.type === TYPE.select;
553
+ }
554
+ function isPluralElement(el) {
555
+ return el.type === TYPE.plural;
556
+ }
557
+ function isPoundElement(el) {
558
+ return el.type === TYPE.pound;
559
+ }
560
+ function isTagElement(el) {
561
+ return el.type === TYPE.tag;
562
+ }
563
+ function isNumberSkeleton(el) {
564
+ return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.number);
565
+ }
566
+ function isDateTimeSkeleton(el) {
567
+ return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime);
568
+ }
569
+
570
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js
571
+ var SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
572
+
573
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js
574
+ var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
575
+ function parseDateTimeSkeleton(skeleton) {
576
+ var result = {};
577
+ skeleton.replace(DATE_TIME_REGEX, function(match) {
578
+ var len = match.length;
579
+ switch (match[0]) {
580
+ case "G":
581
+ result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
582
+ break;
583
+ case "y":
584
+ result.year = len === 2 ? "2-digit" : "numeric";
585
+ break;
586
+ case "Y":
587
+ case "u":
588
+ case "U":
589
+ case "r":
590
+ throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
591
+ case "q":
592
+ case "Q":
593
+ throw new RangeError("`q/Q` (quarter) patterns are not supported");
594
+ case "M":
595
+ case "L":
596
+ result.month = ["numeric", "2-digit", "short", "long", "narrow"][len - 1];
597
+ break;
598
+ case "w":
599
+ case "W":
600
+ throw new RangeError("`w/W` (week) patterns are not supported");
601
+ case "d":
602
+ result.day = ["numeric", "2-digit"][len - 1];
603
+ break;
604
+ case "D":
605
+ case "F":
606
+ case "g":
607
+ throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
608
+ case "E":
609
+ result.weekday = len === 4 ? "short" : len === 5 ? "narrow" : "short";
610
+ break;
611
+ case "e":
612
+ if (len < 4) {
613
+ throw new RangeError("`e..eee` (weekday) patterns are not supported");
614
+ }
615
+ result.weekday = ["short", "long", "narrow", "short"][len - 4];
616
+ break;
617
+ case "c":
618
+ if (len < 4) {
619
+ throw new RangeError("`c..ccc` (weekday) patterns are not supported");
620
+ }
621
+ result.weekday = ["short", "long", "narrow", "short"][len - 4];
622
+ break;
623
+ case "a":
624
+ result.hour12 = true;
625
+ break;
626
+ case "b":
627
+ case "B":
628
+ throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
629
+ case "h":
630
+ result.hourCycle = "h12";
631
+ result.hour = ["numeric", "2-digit"][len - 1];
632
+ break;
633
+ case "H":
634
+ result.hourCycle = "h23";
635
+ result.hour = ["numeric", "2-digit"][len - 1];
636
+ break;
637
+ case "K":
638
+ result.hourCycle = "h11";
639
+ result.hour = ["numeric", "2-digit"][len - 1];
640
+ break;
641
+ case "k":
642
+ result.hourCycle = "h24";
643
+ result.hour = ["numeric", "2-digit"][len - 1];
644
+ break;
645
+ case "j":
646
+ case "J":
647
+ case "C":
648
+ throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
649
+ case "m":
650
+ result.minute = ["numeric", "2-digit"][len - 1];
651
+ break;
652
+ case "s":
653
+ result.second = ["numeric", "2-digit"][len - 1];
654
+ break;
655
+ case "S":
656
+ case "A":
657
+ throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
658
+ case "z":
659
+ result.timeZoneName = len < 4 ? "short" : "long";
660
+ break;
661
+ case "Z":
662
+ case "O":
663
+ case "v":
664
+ case "V":
665
+ case "X":
666
+ case "x":
667
+ throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
668
+ }
669
+ return "";
670
+ });
671
+ return result;
672
+ }
673
+
674
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js
675
+ var WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
676
+
677
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/lib/number.js
678
+ function parseNumberSkeletonFromString(skeleton) {
679
+ if (skeleton.length === 0) {
680
+ throw new Error("Number skeleton cannot be empty");
681
+ }
682
+ var stringTokens = skeleton.split(WHITE_SPACE_REGEX).filter(function(x) {
683
+ return x.length > 0;
684
+ });
685
+ var tokens = [];
686
+ for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {
687
+ var stringToken = stringTokens_1[_i];
688
+ var stemAndOptions = stringToken.split("/");
689
+ if (stemAndOptions.length === 0) {
690
+ throw new Error("Invalid number skeleton");
691
+ }
692
+ var stem = stemAndOptions[0], options = stemAndOptions.slice(1);
693
+ for (var _a2 = 0, options_1 = options; _a2 < options_1.length; _a2++) {
694
+ var option = options_1[_a2];
695
+ if (option.length === 0) {
696
+ throw new Error("Invalid number skeleton");
697
+ }
698
+ }
699
+ tokens.push({ stem, options });
700
+ }
701
+ return tokens;
702
+ }
703
+ function icuUnitToEcma(unit) {
704
+ return unit.replace(/^(.*?)-/, "");
705
+ }
706
+ var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
707
+ var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g;
708
+ var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
709
+ var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
710
+ function parseSignificantPrecision(str) {
711
+ var result = {};
712
+ if (str[str.length - 1] === "r") {
713
+ result.roundingPriority = "morePrecision";
714
+ } else if (str[str.length - 1] === "s") {
715
+ result.roundingPriority = "lessPrecision";
716
+ }
717
+ str.replace(SIGNIFICANT_PRECISION_REGEX, function(_, g1, g2) {
718
+ if (typeof g2 !== "string") {
719
+ result.minimumSignificantDigits = g1.length;
720
+ result.maximumSignificantDigits = g1.length;
721
+ } else if (g2 === "+") {
722
+ result.minimumSignificantDigits = g1.length;
723
+ } else if (g1[0] === "#") {
724
+ result.maximumSignificantDigits = g1.length;
725
+ } else {
726
+ result.minimumSignificantDigits = g1.length;
727
+ result.maximumSignificantDigits = g1.length + (typeof g2 === "string" ? g2.length : 0);
728
+ }
729
+ return "";
730
+ });
731
+ return result;
732
+ }
733
+ function parseSign(str) {
734
+ switch (str) {
735
+ case "sign-auto":
736
+ return {
737
+ signDisplay: "auto"
738
+ };
739
+ case "sign-accounting":
740
+ case "()":
741
+ return {
742
+ currencySign: "accounting"
743
+ };
744
+ case "sign-always":
745
+ case "+!":
746
+ return {
747
+ signDisplay: "always"
748
+ };
749
+ case "sign-accounting-always":
750
+ case "()!":
751
+ return {
752
+ signDisplay: "always",
753
+ currencySign: "accounting"
754
+ };
755
+ case "sign-except-zero":
756
+ case "+?":
757
+ return {
758
+ signDisplay: "exceptZero"
759
+ };
760
+ case "sign-accounting-except-zero":
761
+ case "()?":
762
+ return {
763
+ signDisplay: "exceptZero",
764
+ currencySign: "accounting"
765
+ };
766
+ case "sign-never":
767
+ case "+_":
768
+ return {
769
+ signDisplay: "never"
770
+ };
771
+ }
772
+ }
773
+ function parseConciseScientificAndEngineeringStem(stem) {
774
+ var result;
775
+ if (stem[0] === "E" && stem[1] === "E") {
776
+ result = {
777
+ notation: "engineering"
778
+ };
779
+ stem = stem.slice(2);
780
+ } else if (stem[0] === "E") {
781
+ result = {
782
+ notation: "scientific"
783
+ };
784
+ stem = stem.slice(1);
785
+ }
786
+ if (result) {
787
+ var signDisplay = stem.slice(0, 2);
788
+ if (signDisplay === "+!") {
789
+ result.signDisplay = "always";
790
+ stem = stem.slice(2);
791
+ } else if (signDisplay === "+?") {
792
+ result.signDisplay = "exceptZero";
793
+ stem = stem.slice(2);
794
+ }
795
+ if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {
796
+ throw new Error("Malformed concise eng/scientific notation");
797
+ }
798
+ result.minimumIntegerDigits = stem.length;
799
+ }
800
+ return result;
801
+ }
802
+ function parseNotationOptions(opt) {
803
+ var result = {};
804
+ var signOpts = parseSign(opt);
805
+ if (signOpts) {
806
+ return signOpts;
807
+ }
808
+ return result;
809
+ }
810
+ function parseNumberSkeleton(tokens) {
811
+ var result = {};
812
+ for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
813
+ var token = tokens_1[_i];
814
+ switch (token.stem) {
815
+ case "percent":
816
+ case "%":
817
+ result.style = "percent";
818
+ continue;
819
+ case "%x100":
820
+ result.style = "percent";
821
+ result.scale = 100;
822
+ continue;
823
+ case "currency":
824
+ result.style = "currency";
825
+ result.currency = token.options[0];
826
+ continue;
827
+ case "group-off":
828
+ case ",_":
829
+ result.useGrouping = false;
830
+ continue;
831
+ case "precision-integer":
832
+ case ".":
833
+ result.maximumFractionDigits = 0;
834
+ continue;
835
+ case "measure-unit":
836
+ case "unit":
837
+ result.style = "unit";
838
+ result.unit = icuUnitToEcma(token.options[0]);
839
+ continue;
840
+ case "compact-short":
841
+ case "K":
842
+ result.notation = "compact";
843
+ result.compactDisplay = "short";
844
+ continue;
845
+ case "compact-long":
846
+ case "KK":
847
+ result.notation = "compact";
848
+ result.compactDisplay = "long";
849
+ continue;
850
+ case "scientific":
851
+ result = __assign(__assign(__assign({}, result), { notation: "scientific" }), token.options.reduce(function(all, opt2) {
852
+ return __assign(__assign({}, all), parseNotationOptions(opt2));
853
+ }, {}));
854
+ continue;
855
+ case "engineering":
856
+ result = __assign(__assign(__assign({}, result), { notation: "engineering" }), token.options.reduce(function(all, opt2) {
857
+ return __assign(__assign({}, all), parseNotationOptions(opt2));
858
+ }, {}));
859
+ continue;
860
+ case "notation-simple":
861
+ result.notation = "standard";
862
+ continue;
863
+ case "unit-width-narrow":
864
+ result.currencyDisplay = "narrowSymbol";
865
+ result.unitDisplay = "narrow";
866
+ continue;
867
+ case "unit-width-short":
868
+ result.currencyDisplay = "code";
869
+ result.unitDisplay = "short";
870
+ continue;
871
+ case "unit-width-full-name":
872
+ result.currencyDisplay = "name";
873
+ result.unitDisplay = "long";
874
+ continue;
875
+ case "unit-width-iso-code":
876
+ result.currencyDisplay = "symbol";
877
+ continue;
878
+ case "scale":
879
+ result.scale = parseFloat(token.options[0]);
880
+ continue;
881
+ case "integer-width":
882
+ if (token.options.length > 1) {
883
+ throw new RangeError("integer-width stems only accept a single optional option");
884
+ }
885
+ token.options[0].replace(INTEGER_WIDTH_REGEX, function(_, g1, g2, g3, g4, g5) {
886
+ if (g1) {
887
+ result.minimumIntegerDigits = g2.length;
888
+ } else if (g3 && g4) {
889
+ throw new Error("We currently do not support maximum integer digits");
890
+ } else if (g5) {
891
+ throw new Error("We currently do not support exact integer digits");
892
+ }
893
+ return "";
894
+ });
895
+ continue;
896
+ }
897
+ if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {
898
+ result.minimumIntegerDigits = token.stem.length;
899
+ continue;
900
+ }
901
+ if (FRACTION_PRECISION_REGEX.test(token.stem)) {
902
+ if (token.options.length > 1) {
903
+ throw new RangeError("Fraction-precision stems only accept a single optional option");
904
+ }
905
+ token.stem.replace(FRACTION_PRECISION_REGEX, function(_, g1, g2, g3, g4, g5) {
906
+ if (g2 === "*") {
907
+ result.minimumFractionDigits = g1.length;
908
+ } else if (g3 && g3[0] === "#") {
909
+ result.maximumFractionDigits = g3.length;
910
+ } else if (g4 && g5) {
911
+ result.minimumFractionDigits = g4.length;
912
+ result.maximumFractionDigits = g4.length + g5.length;
913
+ } else {
914
+ result.minimumFractionDigits = g1.length;
915
+ result.maximumFractionDigits = g1.length;
916
+ }
917
+ return "";
918
+ });
919
+ var opt = token.options[0];
920
+ if (opt === "w") {
921
+ result = __assign(__assign({}, result), { trailingZeroDisplay: "stripIfInteger" });
922
+ } else if (opt) {
923
+ result = __assign(__assign({}, result), parseSignificantPrecision(opt));
924
+ }
925
+ continue;
926
+ }
927
+ if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {
928
+ result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));
929
+ continue;
930
+ }
931
+ var signOpts = parseSign(token.stem);
932
+ if (signOpts) {
933
+ result = __assign(__assign({}, result), signOpts);
934
+ }
935
+ var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);
936
+ if (conciseScientificAndEngineeringOpts) {
937
+ result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);
938
+ }
939
+ }
940
+ return result;
941
+ }
942
+
943
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js
944
+ var timeData = {
945
+ "AX": [
946
+ "H"
947
+ ],
948
+ "BQ": [
949
+ "H"
950
+ ],
951
+ "CP": [
952
+ "H"
953
+ ],
954
+ "CZ": [
955
+ "H"
956
+ ],
957
+ "DK": [
958
+ "H"
959
+ ],
960
+ "FI": [
961
+ "H"
962
+ ],
963
+ "ID": [
964
+ "H"
965
+ ],
966
+ "IS": [
967
+ "H"
968
+ ],
969
+ "ML": [
970
+ "H"
971
+ ],
972
+ "NE": [
973
+ "H"
974
+ ],
975
+ "RU": [
976
+ "H"
977
+ ],
978
+ "SE": [
979
+ "H"
980
+ ],
981
+ "SJ": [
982
+ "H"
983
+ ],
984
+ "SK": [
985
+ "H"
986
+ ],
987
+ "AS": [
988
+ "h",
989
+ "H"
990
+ ],
991
+ "BT": [
992
+ "h",
993
+ "H"
994
+ ],
995
+ "DJ": [
996
+ "h",
997
+ "H"
998
+ ],
999
+ "ER": [
1000
+ "h",
1001
+ "H"
1002
+ ],
1003
+ "GH": [
1004
+ "h",
1005
+ "H"
1006
+ ],
1007
+ "IN": [
1008
+ "h",
1009
+ "H"
1010
+ ],
1011
+ "LS": [
1012
+ "h",
1013
+ "H"
1014
+ ],
1015
+ "PG": [
1016
+ "h",
1017
+ "H"
1018
+ ],
1019
+ "PW": [
1020
+ "h",
1021
+ "H"
1022
+ ],
1023
+ "SO": [
1024
+ "h",
1025
+ "H"
1026
+ ],
1027
+ "TO": [
1028
+ "h",
1029
+ "H"
1030
+ ],
1031
+ "VU": [
1032
+ "h",
1033
+ "H"
1034
+ ],
1035
+ "WS": [
1036
+ "h",
1037
+ "H"
1038
+ ],
1039
+ "001": [
1040
+ "H",
1041
+ "h"
1042
+ ],
1043
+ "AL": [
1044
+ "h",
1045
+ "H",
1046
+ "hB"
1047
+ ],
1048
+ "TD": [
1049
+ "h",
1050
+ "H",
1051
+ "hB"
1052
+ ],
1053
+ "ca-ES": [
1054
+ "H",
1055
+ "h",
1056
+ "hB"
1057
+ ],
1058
+ "CF": [
1059
+ "H",
1060
+ "h",
1061
+ "hB"
1062
+ ],
1063
+ "CM": [
1064
+ "H",
1065
+ "h",
1066
+ "hB"
1067
+ ],
1068
+ "fr-CA": [
1069
+ "H",
1070
+ "h",
1071
+ "hB"
1072
+ ],
1073
+ "gl-ES": [
1074
+ "H",
1075
+ "h",
1076
+ "hB"
1077
+ ],
1078
+ "it-CH": [
1079
+ "H",
1080
+ "h",
1081
+ "hB"
1082
+ ],
1083
+ "it-IT": [
1084
+ "H",
1085
+ "h",
1086
+ "hB"
1087
+ ],
1088
+ "LU": [
1089
+ "H",
1090
+ "h",
1091
+ "hB"
1092
+ ],
1093
+ "NP": [
1094
+ "H",
1095
+ "h",
1096
+ "hB"
1097
+ ],
1098
+ "PF": [
1099
+ "H",
1100
+ "h",
1101
+ "hB"
1102
+ ],
1103
+ "SC": [
1104
+ "H",
1105
+ "h",
1106
+ "hB"
1107
+ ],
1108
+ "SM": [
1109
+ "H",
1110
+ "h",
1111
+ "hB"
1112
+ ],
1113
+ "SN": [
1114
+ "H",
1115
+ "h",
1116
+ "hB"
1117
+ ],
1118
+ "TF": [
1119
+ "H",
1120
+ "h",
1121
+ "hB"
1122
+ ],
1123
+ "VA": [
1124
+ "H",
1125
+ "h",
1126
+ "hB"
1127
+ ],
1128
+ "CY": [
1129
+ "h",
1130
+ "H",
1131
+ "hb",
1132
+ "hB"
1133
+ ],
1134
+ "GR": [
1135
+ "h",
1136
+ "H",
1137
+ "hb",
1138
+ "hB"
1139
+ ],
1140
+ "CO": [
1141
+ "h",
1142
+ "H",
1143
+ "hB",
1144
+ "hb"
1145
+ ],
1146
+ "DO": [
1147
+ "h",
1148
+ "H",
1149
+ "hB",
1150
+ "hb"
1151
+ ],
1152
+ "KP": [
1153
+ "h",
1154
+ "H",
1155
+ "hB",
1156
+ "hb"
1157
+ ],
1158
+ "KR": [
1159
+ "h",
1160
+ "H",
1161
+ "hB",
1162
+ "hb"
1163
+ ],
1164
+ "NA": [
1165
+ "h",
1166
+ "H",
1167
+ "hB",
1168
+ "hb"
1169
+ ],
1170
+ "PA": [
1171
+ "h",
1172
+ "H",
1173
+ "hB",
1174
+ "hb"
1175
+ ],
1176
+ "PR": [
1177
+ "h",
1178
+ "H",
1179
+ "hB",
1180
+ "hb"
1181
+ ],
1182
+ "VE": [
1183
+ "h",
1184
+ "H",
1185
+ "hB",
1186
+ "hb"
1187
+ ],
1188
+ "AC": [
1189
+ "H",
1190
+ "h",
1191
+ "hb",
1192
+ "hB"
1193
+ ],
1194
+ "AI": [
1195
+ "H",
1196
+ "h",
1197
+ "hb",
1198
+ "hB"
1199
+ ],
1200
+ "BW": [
1201
+ "H",
1202
+ "h",
1203
+ "hb",
1204
+ "hB"
1205
+ ],
1206
+ "BZ": [
1207
+ "H",
1208
+ "h",
1209
+ "hb",
1210
+ "hB"
1211
+ ],
1212
+ "CC": [
1213
+ "H",
1214
+ "h",
1215
+ "hb",
1216
+ "hB"
1217
+ ],
1218
+ "CK": [
1219
+ "H",
1220
+ "h",
1221
+ "hb",
1222
+ "hB"
1223
+ ],
1224
+ "CX": [
1225
+ "H",
1226
+ "h",
1227
+ "hb",
1228
+ "hB"
1229
+ ],
1230
+ "DG": [
1231
+ "H",
1232
+ "h",
1233
+ "hb",
1234
+ "hB"
1235
+ ],
1236
+ "FK": [
1237
+ "H",
1238
+ "h",
1239
+ "hb",
1240
+ "hB"
1241
+ ],
1242
+ "GB": [
1243
+ "H",
1244
+ "h",
1245
+ "hb",
1246
+ "hB"
1247
+ ],
1248
+ "GG": [
1249
+ "H",
1250
+ "h",
1251
+ "hb",
1252
+ "hB"
1253
+ ],
1254
+ "GI": [
1255
+ "H",
1256
+ "h",
1257
+ "hb",
1258
+ "hB"
1259
+ ],
1260
+ "IE": [
1261
+ "H",
1262
+ "h",
1263
+ "hb",
1264
+ "hB"
1265
+ ],
1266
+ "IM": [
1267
+ "H",
1268
+ "h",
1269
+ "hb",
1270
+ "hB"
1271
+ ],
1272
+ "IO": [
1273
+ "H",
1274
+ "h",
1275
+ "hb",
1276
+ "hB"
1277
+ ],
1278
+ "JE": [
1279
+ "H",
1280
+ "h",
1281
+ "hb",
1282
+ "hB"
1283
+ ],
1284
+ "LT": [
1285
+ "H",
1286
+ "h",
1287
+ "hb",
1288
+ "hB"
1289
+ ],
1290
+ "MK": [
1291
+ "H",
1292
+ "h",
1293
+ "hb",
1294
+ "hB"
1295
+ ],
1296
+ "MN": [
1297
+ "H",
1298
+ "h",
1299
+ "hb",
1300
+ "hB"
1301
+ ],
1302
+ "MS": [
1303
+ "H",
1304
+ "h",
1305
+ "hb",
1306
+ "hB"
1307
+ ],
1308
+ "NF": [
1309
+ "H",
1310
+ "h",
1311
+ "hb",
1312
+ "hB"
1313
+ ],
1314
+ "NG": [
1315
+ "H",
1316
+ "h",
1317
+ "hb",
1318
+ "hB"
1319
+ ],
1320
+ "NR": [
1321
+ "H",
1322
+ "h",
1323
+ "hb",
1324
+ "hB"
1325
+ ],
1326
+ "NU": [
1327
+ "H",
1328
+ "h",
1329
+ "hb",
1330
+ "hB"
1331
+ ],
1332
+ "PN": [
1333
+ "H",
1334
+ "h",
1335
+ "hb",
1336
+ "hB"
1337
+ ],
1338
+ "SH": [
1339
+ "H",
1340
+ "h",
1341
+ "hb",
1342
+ "hB"
1343
+ ],
1344
+ "SX": [
1345
+ "H",
1346
+ "h",
1347
+ "hb",
1348
+ "hB"
1349
+ ],
1350
+ "TA": [
1351
+ "H",
1352
+ "h",
1353
+ "hb",
1354
+ "hB"
1355
+ ],
1356
+ "ZA": [
1357
+ "H",
1358
+ "h",
1359
+ "hb",
1360
+ "hB"
1361
+ ],
1362
+ "af-ZA": [
1363
+ "H",
1364
+ "h",
1365
+ "hB",
1366
+ "hb"
1367
+ ],
1368
+ "AR": [
1369
+ "H",
1370
+ "h",
1371
+ "hB",
1372
+ "hb"
1373
+ ],
1374
+ "CL": [
1375
+ "H",
1376
+ "h",
1377
+ "hB",
1378
+ "hb"
1379
+ ],
1380
+ "CR": [
1381
+ "H",
1382
+ "h",
1383
+ "hB",
1384
+ "hb"
1385
+ ],
1386
+ "CU": [
1387
+ "H",
1388
+ "h",
1389
+ "hB",
1390
+ "hb"
1391
+ ],
1392
+ "EA": [
1393
+ "H",
1394
+ "h",
1395
+ "hB",
1396
+ "hb"
1397
+ ],
1398
+ "es-BO": [
1399
+ "H",
1400
+ "h",
1401
+ "hB",
1402
+ "hb"
1403
+ ],
1404
+ "es-BR": [
1405
+ "H",
1406
+ "h",
1407
+ "hB",
1408
+ "hb"
1409
+ ],
1410
+ "es-EC": [
1411
+ "H",
1412
+ "h",
1413
+ "hB",
1414
+ "hb"
1415
+ ],
1416
+ "es-ES": [
1417
+ "H",
1418
+ "h",
1419
+ "hB",
1420
+ "hb"
1421
+ ],
1422
+ "es-GQ": [
1423
+ "H",
1424
+ "h",
1425
+ "hB",
1426
+ "hb"
1427
+ ],
1428
+ "es-PE": [
1429
+ "H",
1430
+ "h",
1431
+ "hB",
1432
+ "hb"
1433
+ ],
1434
+ "GT": [
1435
+ "H",
1436
+ "h",
1437
+ "hB",
1438
+ "hb"
1439
+ ],
1440
+ "HN": [
1441
+ "H",
1442
+ "h",
1443
+ "hB",
1444
+ "hb"
1445
+ ],
1446
+ "IC": [
1447
+ "H",
1448
+ "h",
1449
+ "hB",
1450
+ "hb"
1451
+ ],
1452
+ "KG": [
1453
+ "H",
1454
+ "h",
1455
+ "hB",
1456
+ "hb"
1457
+ ],
1458
+ "KM": [
1459
+ "H",
1460
+ "h",
1461
+ "hB",
1462
+ "hb"
1463
+ ],
1464
+ "LK": [
1465
+ "H",
1466
+ "h",
1467
+ "hB",
1468
+ "hb"
1469
+ ],
1470
+ "MA": [
1471
+ "H",
1472
+ "h",
1473
+ "hB",
1474
+ "hb"
1475
+ ],
1476
+ "MX": [
1477
+ "H",
1478
+ "h",
1479
+ "hB",
1480
+ "hb"
1481
+ ],
1482
+ "NI": [
1483
+ "H",
1484
+ "h",
1485
+ "hB",
1486
+ "hb"
1487
+ ],
1488
+ "PY": [
1489
+ "H",
1490
+ "h",
1491
+ "hB",
1492
+ "hb"
1493
+ ],
1494
+ "SV": [
1495
+ "H",
1496
+ "h",
1497
+ "hB",
1498
+ "hb"
1499
+ ],
1500
+ "UY": [
1501
+ "H",
1502
+ "h",
1503
+ "hB",
1504
+ "hb"
1505
+ ],
1506
+ "JP": [
1507
+ "H",
1508
+ "h",
1509
+ "K"
1510
+ ],
1511
+ "AD": [
1512
+ "H",
1513
+ "hB"
1514
+ ],
1515
+ "AM": [
1516
+ "H",
1517
+ "hB"
1518
+ ],
1519
+ "AO": [
1520
+ "H",
1521
+ "hB"
1522
+ ],
1523
+ "AT": [
1524
+ "H",
1525
+ "hB"
1526
+ ],
1527
+ "AW": [
1528
+ "H",
1529
+ "hB"
1530
+ ],
1531
+ "BE": [
1532
+ "H",
1533
+ "hB"
1534
+ ],
1535
+ "BF": [
1536
+ "H",
1537
+ "hB"
1538
+ ],
1539
+ "BJ": [
1540
+ "H",
1541
+ "hB"
1542
+ ],
1543
+ "BL": [
1544
+ "H",
1545
+ "hB"
1546
+ ],
1547
+ "BR": [
1548
+ "H",
1549
+ "hB"
1550
+ ],
1551
+ "CG": [
1552
+ "H",
1553
+ "hB"
1554
+ ],
1555
+ "CI": [
1556
+ "H",
1557
+ "hB"
1558
+ ],
1559
+ "CV": [
1560
+ "H",
1561
+ "hB"
1562
+ ],
1563
+ "DE": [
1564
+ "H",
1565
+ "hB"
1566
+ ],
1567
+ "EE": [
1568
+ "H",
1569
+ "hB"
1570
+ ],
1571
+ "FR": [
1572
+ "H",
1573
+ "hB"
1574
+ ],
1575
+ "GA": [
1576
+ "H",
1577
+ "hB"
1578
+ ],
1579
+ "GF": [
1580
+ "H",
1581
+ "hB"
1582
+ ],
1583
+ "GN": [
1584
+ "H",
1585
+ "hB"
1586
+ ],
1587
+ "GP": [
1588
+ "H",
1589
+ "hB"
1590
+ ],
1591
+ "GW": [
1592
+ "H",
1593
+ "hB"
1594
+ ],
1595
+ "HR": [
1596
+ "H",
1597
+ "hB"
1598
+ ],
1599
+ "IL": [
1600
+ "H",
1601
+ "hB"
1602
+ ],
1603
+ "IT": [
1604
+ "H",
1605
+ "hB"
1606
+ ],
1607
+ "KZ": [
1608
+ "H",
1609
+ "hB"
1610
+ ],
1611
+ "MC": [
1612
+ "H",
1613
+ "hB"
1614
+ ],
1615
+ "MD": [
1616
+ "H",
1617
+ "hB"
1618
+ ],
1619
+ "MF": [
1620
+ "H",
1621
+ "hB"
1622
+ ],
1623
+ "MQ": [
1624
+ "H",
1625
+ "hB"
1626
+ ],
1627
+ "MZ": [
1628
+ "H",
1629
+ "hB"
1630
+ ],
1631
+ "NC": [
1632
+ "H",
1633
+ "hB"
1634
+ ],
1635
+ "NL": [
1636
+ "H",
1637
+ "hB"
1638
+ ],
1639
+ "PM": [
1640
+ "H",
1641
+ "hB"
1642
+ ],
1643
+ "PT": [
1644
+ "H",
1645
+ "hB"
1646
+ ],
1647
+ "RE": [
1648
+ "H",
1649
+ "hB"
1650
+ ],
1651
+ "RO": [
1652
+ "H",
1653
+ "hB"
1654
+ ],
1655
+ "SI": [
1656
+ "H",
1657
+ "hB"
1658
+ ],
1659
+ "SR": [
1660
+ "H",
1661
+ "hB"
1662
+ ],
1663
+ "ST": [
1664
+ "H",
1665
+ "hB"
1666
+ ],
1667
+ "TG": [
1668
+ "H",
1669
+ "hB"
1670
+ ],
1671
+ "TR": [
1672
+ "H",
1673
+ "hB"
1674
+ ],
1675
+ "WF": [
1676
+ "H",
1677
+ "hB"
1678
+ ],
1679
+ "YT": [
1680
+ "H",
1681
+ "hB"
1682
+ ],
1683
+ "BD": [
1684
+ "h",
1685
+ "hB",
1686
+ "H"
1687
+ ],
1688
+ "PK": [
1689
+ "h",
1690
+ "hB",
1691
+ "H"
1692
+ ],
1693
+ "AZ": [
1694
+ "H",
1695
+ "hB",
1696
+ "h"
1697
+ ],
1698
+ "BA": [
1699
+ "H",
1700
+ "hB",
1701
+ "h"
1702
+ ],
1703
+ "BG": [
1704
+ "H",
1705
+ "hB",
1706
+ "h"
1707
+ ],
1708
+ "CH": [
1709
+ "H",
1710
+ "hB",
1711
+ "h"
1712
+ ],
1713
+ "GE": [
1714
+ "H",
1715
+ "hB",
1716
+ "h"
1717
+ ],
1718
+ "LI": [
1719
+ "H",
1720
+ "hB",
1721
+ "h"
1722
+ ],
1723
+ "ME": [
1724
+ "H",
1725
+ "hB",
1726
+ "h"
1727
+ ],
1728
+ "RS": [
1729
+ "H",
1730
+ "hB",
1731
+ "h"
1732
+ ],
1733
+ "UA": [
1734
+ "H",
1735
+ "hB",
1736
+ "h"
1737
+ ],
1738
+ "UZ": [
1739
+ "H",
1740
+ "hB",
1741
+ "h"
1742
+ ],
1743
+ "XK": [
1744
+ "H",
1745
+ "hB",
1746
+ "h"
1747
+ ],
1748
+ "AG": [
1749
+ "h",
1750
+ "hb",
1751
+ "H",
1752
+ "hB"
1753
+ ],
1754
+ "AU": [
1755
+ "h",
1756
+ "hb",
1757
+ "H",
1758
+ "hB"
1759
+ ],
1760
+ "BB": [
1761
+ "h",
1762
+ "hb",
1763
+ "H",
1764
+ "hB"
1765
+ ],
1766
+ "BM": [
1767
+ "h",
1768
+ "hb",
1769
+ "H",
1770
+ "hB"
1771
+ ],
1772
+ "BS": [
1773
+ "h",
1774
+ "hb",
1775
+ "H",
1776
+ "hB"
1777
+ ],
1778
+ "CA": [
1779
+ "h",
1780
+ "hb",
1781
+ "H",
1782
+ "hB"
1783
+ ],
1784
+ "DM": [
1785
+ "h",
1786
+ "hb",
1787
+ "H",
1788
+ "hB"
1789
+ ],
1790
+ "en-001": [
1791
+ "h",
1792
+ "hb",
1793
+ "H",
1794
+ "hB"
1795
+ ],
1796
+ "FJ": [
1797
+ "h",
1798
+ "hb",
1799
+ "H",
1800
+ "hB"
1801
+ ],
1802
+ "FM": [
1803
+ "h",
1804
+ "hb",
1805
+ "H",
1806
+ "hB"
1807
+ ],
1808
+ "GD": [
1809
+ "h",
1810
+ "hb",
1811
+ "H",
1812
+ "hB"
1813
+ ],
1814
+ "GM": [
1815
+ "h",
1816
+ "hb",
1817
+ "H",
1818
+ "hB"
1819
+ ],
1820
+ "GU": [
1821
+ "h",
1822
+ "hb",
1823
+ "H",
1824
+ "hB"
1825
+ ],
1826
+ "GY": [
1827
+ "h",
1828
+ "hb",
1829
+ "H",
1830
+ "hB"
1831
+ ],
1832
+ "JM": [
1833
+ "h",
1834
+ "hb",
1835
+ "H",
1836
+ "hB"
1837
+ ],
1838
+ "KI": [
1839
+ "h",
1840
+ "hb",
1841
+ "H",
1842
+ "hB"
1843
+ ],
1844
+ "KN": [
1845
+ "h",
1846
+ "hb",
1847
+ "H",
1848
+ "hB"
1849
+ ],
1850
+ "KY": [
1851
+ "h",
1852
+ "hb",
1853
+ "H",
1854
+ "hB"
1855
+ ],
1856
+ "LC": [
1857
+ "h",
1858
+ "hb",
1859
+ "H",
1860
+ "hB"
1861
+ ],
1862
+ "LR": [
1863
+ "h",
1864
+ "hb",
1865
+ "H",
1866
+ "hB"
1867
+ ],
1868
+ "MH": [
1869
+ "h",
1870
+ "hb",
1871
+ "H",
1872
+ "hB"
1873
+ ],
1874
+ "MP": [
1875
+ "h",
1876
+ "hb",
1877
+ "H",
1878
+ "hB"
1879
+ ],
1880
+ "MW": [
1881
+ "h",
1882
+ "hb",
1883
+ "H",
1884
+ "hB"
1885
+ ],
1886
+ "NZ": [
1887
+ "h",
1888
+ "hb",
1889
+ "H",
1890
+ "hB"
1891
+ ],
1892
+ "SB": [
1893
+ "h",
1894
+ "hb",
1895
+ "H",
1896
+ "hB"
1897
+ ],
1898
+ "SG": [
1899
+ "h",
1900
+ "hb",
1901
+ "H",
1902
+ "hB"
1903
+ ],
1904
+ "SL": [
1905
+ "h",
1906
+ "hb",
1907
+ "H",
1908
+ "hB"
1909
+ ],
1910
+ "SS": [
1911
+ "h",
1912
+ "hb",
1913
+ "H",
1914
+ "hB"
1915
+ ],
1916
+ "SZ": [
1917
+ "h",
1918
+ "hb",
1919
+ "H",
1920
+ "hB"
1921
+ ],
1922
+ "TC": [
1923
+ "h",
1924
+ "hb",
1925
+ "H",
1926
+ "hB"
1927
+ ],
1928
+ "TT": [
1929
+ "h",
1930
+ "hb",
1931
+ "H",
1932
+ "hB"
1933
+ ],
1934
+ "UM": [
1935
+ "h",
1936
+ "hb",
1937
+ "H",
1938
+ "hB"
1939
+ ],
1940
+ "US": [
1941
+ "h",
1942
+ "hb",
1943
+ "H",
1944
+ "hB"
1945
+ ],
1946
+ "VC": [
1947
+ "h",
1948
+ "hb",
1949
+ "H",
1950
+ "hB"
1951
+ ],
1952
+ "VG": [
1953
+ "h",
1954
+ "hb",
1955
+ "H",
1956
+ "hB"
1957
+ ],
1958
+ "VI": [
1959
+ "h",
1960
+ "hb",
1961
+ "H",
1962
+ "hB"
1963
+ ],
1964
+ "ZM": [
1965
+ "h",
1966
+ "hb",
1967
+ "H",
1968
+ "hB"
1969
+ ],
1970
+ "BO": [
1971
+ "H",
1972
+ "hB",
1973
+ "h",
1974
+ "hb"
1975
+ ],
1976
+ "EC": [
1977
+ "H",
1978
+ "hB",
1979
+ "h",
1980
+ "hb"
1981
+ ],
1982
+ "ES": [
1983
+ "H",
1984
+ "hB",
1985
+ "h",
1986
+ "hb"
1987
+ ],
1988
+ "GQ": [
1989
+ "H",
1990
+ "hB",
1991
+ "h",
1992
+ "hb"
1993
+ ],
1994
+ "PE": [
1995
+ "H",
1996
+ "hB",
1997
+ "h",
1998
+ "hb"
1999
+ ],
2000
+ "AE": [
2001
+ "h",
2002
+ "hB",
2003
+ "hb",
2004
+ "H"
2005
+ ],
2006
+ "ar-001": [
2007
+ "h",
2008
+ "hB",
2009
+ "hb",
2010
+ "H"
2011
+ ],
2012
+ "BH": [
2013
+ "h",
2014
+ "hB",
2015
+ "hb",
2016
+ "H"
2017
+ ],
2018
+ "DZ": [
2019
+ "h",
2020
+ "hB",
2021
+ "hb",
2022
+ "H"
2023
+ ],
2024
+ "EG": [
2025
+ "h",
2026
+ "hB",
2027
+ "hb",
2028
+ "H"
2029
+ ],
2030
+ "EH": [
2031
+ "h",
2032
+ "hB",
2033
+ "hb",
2034
+ "H"
2035
+ ],
2036
+ "HK": [
2037
+ "h",
2038
+ "hB",
2039
+ "hb",
2040
+ "H"
2041
+ ],
2042
+ "IQ": [
2043
+ "h",
2044
+ "hB",
2045
+ "hb",
2046
+ "H"
2047
+ ],
2048
+ "JO": [
2049
+ "h",
2050
+ "hB",
2051
+ "hb",
2052
+ "H"
2053
+ ],
2054
+ "KW": [
2055
+ "h",
2056
+ "hB",
2057
+ "hb",
2058
+ "H"
2059
+ ],
2060
+ "LB": [
2061
+ "h",
2062
+ "hB",
2063
+ "hb",
2064
+ "H"
2065
+ ],
2066
+ "LY": [
2067
+ "h",
2068
+ "hB",
2069
+ "hb",
2070
+ "H"
2071
+ ],
2072
+ "MO": [
2073
+ "h",
2074
+ "hB",
2075
+ "hb",
2076
+ "H"
2077
+ ],
2078
+ "MR": [
2079
+ "h",
2080
+ "hB",
2081
+ "hb",
2082
+ "H"
2083
+ ],
2084
+ "OM": [
2085
+ "h",
2086
+ "hB",
2087
+ "hb",
2088
+ "H"
2089
+ ],
2090
+ "PH": [
2091
+ "h",
2092
+ "hB",
2093
+ "hb",
2094
+ "H"
2095
+ ],
2096
+ "PS": [
2097
+ "h",
2098
+ "hB",
2099
+ "hb",
2100
+ "H"
2101
+ ],
2102
+ "QA": [
2103
+ "h",
2104
+ "hB",
2105
+ "hb",
2106
+ "H"
2107
+ ],
2108
+ "SA": [
2109
+ "h",
2110
+ "hB",
2111
+ "hb",
2112
+ "H"
2113
+ ],
2114
+ "SD": [
2115
+ "h",
2116
+ "hB",
2117
+ "hb",
2118
+ "H"
2119
+ ],
2120
+ "SY": [
2121
+ "h",
2122
+ "hB",
2123
+ "hb",
2124
+ "H"
2125
+ ],
2126
+ "TN": [
2127
+ "h",
2128
+ "hB",
2129
+ "hb",
2130
+ "H"
2131
+ ],
2132
+ "YE": [
2133
+ "h",
2134
+ "hB",
2135
+ "hb",
2136
+ "H"
2137
+ ],
2138
+ "AF": [
2139
+ "H",
2140
+ "hb",
2141
+ "hB",
2142
+ "h"
2143
+ ],
2144
+ "LA": [
2145
+ "H",
2146
+ "hb",
2147
+ "hB",
2148
+ "h"
2149
+ ],
2150
+ "CN": [
2151
+ "H",
2152
+ "hB",
2153
+ "hb",
2154
+ "h"
2155
+ ],
2156
+ "LV": [
2157
+ "H",
2158
+ "hB",
2159
+ "hb",
2160
+ "h"
2161
+ ],
2162
+ "TL": [
2163
+ "H",
2164
+ "hB",
2165
+ "hb",
2166
+ "h"
2167
+ ],
2168
+ "zu-ZA": [
2169
+ "H",
2170
+ "hB",
2171
+ "hb",
2172
+ "h"
2173
+ ],
2174
+ "CD": [
2175
+ "hB",
2176
+ "H"
2177
+ ],
2178
+ "IR": [
2179
+ "hB",
2180
+ "H"
2181
+ ],
2182
+ "hi-IN": [
2183
+ "hB",
2184
+ "h",
2185
+ "H"
2186
+ ],
2187
+ "kn-IN": [
2188
+ "hB",
2189
+ "h",
2190
+ "H"
2191
+ ],
2192
+ "ml-IN": [
2193
+ "hB",
2194
+ "h",
2195
+ "H"
2196
+ ],
2197
+ "te-IN": [
2198
+ "hB",
2199
+ "h",
2200
+ "H"
2201
+ ],
2202
+ "KH": [
2203
+ "hB",
2204
+ "h",
2205
+ "H",
2206
+ "hb"
2207
+ ],
2208
+ "ta-IN": [
2209
+ "hB",
2210
+ "h",
2211
+ "hb",
2212
+ "H"
2213
+ ],
2214
+ "BN": [
2215
+ "hb",
2216
+ "hB",
2217
+ "h",
2218
+ "H"
2219
+ ],
2220
+ "MY": [
2221
+ "hb",
2222
+ "hB",
2223
+ "h",
2224
+ "H"
2225
+ ],
2226
+ "ET": [
2227
+ "hB",
2228
+ "hb",
2229
+ "h",
2230
+ "H"
2231
+ ],
2232
+ "gu-IN": [
2233
+ "hB",
2234
+ "hb",
2235
+ "h",
2236
+ "H"
2237
+ ],
2238
+ "mr-IN": [
2239
+ "hB",
2240
+ "hb",
2241
+ "h",
2242
+ "H"
2243
+ ],
2244
+ "pa-IN": [
2245
+ "hB",
2246
+ "hb",
2247
+ "h",
2248
+ "H"
2249
+ ],
2250
+ "TW": [
2251
+ "hB",
2252
+ "hb",
2253
+ "h",
2254
+ "H"
2255
+ ],
2256
+ "KE": [
2257
+ "hB",
2258
+ "hb",
2259
+ "H",
2260
+ "h"
2261
+ ],
2262
+ "MM": [
2263
+ "hB",
2264
+ "hb",
2265
+ "H",
2266
+ "h"
2267
+ ],
2268
+ "TZ": [
2269
+ "hB",
2270
+ "hb",
2271
+ "H",
2272
+ "h"
2273
+ ],
2274
+ "UG": [
2275
+ "hB",
2276
+ "hb",
2277
+ "H",
2278
+ "h"
2279
+ ]
2280
+ };
2281
+
2282
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js
2283
+ function getBestPattern(skeleton, locale) {
2284
+ var skeletonCopy = "";
2285
+ for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
2286
+ var patternChar = skeleton.charAt(patternPos);
2287
+ if (patternChar === "j") {
2288
+ var extraLength = 0;
2289
+ while (patternPos + 1 < skeleton.length && skeleton.charAt(patternPos + 1) === patternChar) {
2290
+ extraLength++;
2291
+ patternPos++;
2292
+ }
2293
+ var hourLen = 1 + (extraLength & 1);
2294
+ var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
2295
+ var dayPeriodChar = "a";
2296
+ var hourChar = getDefaultHourSymbolFromLocale(locale);
2297
+ if (hourChar == "H" || hourChar == "k") {
2298
+ dayPeriodLen = 0;
2299
+ }
2300
+ while (dayPeriodLen-- > 0) {
2301
+ skeletonCopy += dayPeriodChar;
2302
+ }
2303
+ while (hourLen-- > 0) {
2304
+ skeletonCopy = hourChar + skeletonCopy;
2305
+ }
2306
+ } else if (patternChar === "J") {
2307
+ skeletonCopy += "H";
2308
+ } else {
2309
+ skeletonCopy += patternChar;
2310
+ }
2311
+ }
2312
+ return skeletonCopy;
2313
+ }
2314
+ function getDefaultHourSymbolFromLocale(locale) {
2315
+ var hourCycle = locale.hourCycle;
2316
+ if (hourCycle === void 0 && locale.hourCycles && locale.hourCycles.length) {
2317
+ hourCycle = locale.hourCycles[0];
2318
+ }
2319
+ if (hourCycle) {
2320
+ switch (hourCycle) {
2321
+ case "h24":
2322
+ return "k";
2323
+ case "h23":
2324
+ return "H";
2325
+ case "h12":
2326
+ return "h";
2327
+ case "h11":
2328
+ return "K";
2329
+ default:
2330
+ throw new Error("Invalid hourCycle");
2331
+ }
2332
+ }
2333
+ var languageTag = locale.language;
2334
+ var regionTag;
2335
+ if (languageTag !== "root") {
2336
+ regionTag = locale.maximize().region;
2337
+ }
2338
+ var hourCycles = timeData[regionTag || ""] || timeData[languageTag || ""] || timeData["".concat(languageTag, "-001")] || timeData["001"];
2339
+ return hourCycles[0];
2340
+ }
2341
+
2342
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js
2343
+ var _a;
2344
+ var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
2345
+ var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
2346
+ function createLocation(start, end) {
2347
+ return { start, end };
2348
+ }
2349
+ var hasNativeStartsWith = !!String.prototype.startsWith;
2350
+ var hasNativeFromCodePoint = !!String.fromCodePoint;
2351
+ var hasNativeFromEntries = !!Object.fromEntries;
2352
+ var hasNativeCodePointAt = !!String.prototype.codePointAt;
2353
+ var hasTrimStart = !!String.prototype.trimStart;
2354
+ var hasTrimEnd = !!String.prototype.trimEnd;
2355
+ var hasNativeIsSafeInteger = !!Number.isSafeInteger;
2356
+ var isSafeInteger = hasNativeIsSafeInteger ? Number.isSafeInteger : function(n) {
2357
+ return typeof n === "number" && isFinite(n) && Math.floor(n) === n && Math.abs(n) <= 9007199254740991;
2358
+ };
2359
+ var REGEX_SUPPORTS_U_AND_Y = true;
2360
+ try {
2361
+ re = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
2362
+ REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec("a")) === null || _a === void 0 ? void 0 : _a[0]) === "a";
2363
+ } catch (_) {
2364
+ REGEX_SUPPORTS_U_AND_Y = false;
2365
+ }
2366
+ var re;
2367
+ var startsWith = hasNativeStartsWith ? function startsWith2(s, search, position) {
2368
+ return s.startsWith(search, position);
2369
+ } : function startsWith3(s, search, position) {
2370
+ return s.slice(position, position + search.length) === search;
2371
+ };
2372
+ var fromCodePoint = hasNativeFromCodePoint ? String.fromCodePoint : function fromCodePoint2() {
2373
+ var codePoints = [];
2374
+ for (var _i = 0; _i < arguments.length; _i++) {
2375
+ codePoints[_i] = arguments[_i];
2376
+ }
2377
+ var elements = "";
2378
+ var length = codePoints.length;
2379
+ var i = 0;
2380
+ var code;
2381
+ while (length > i) {
2382
+ code = codePoints[i++];
2383
+ if (code > 1114111)
2384
+ throw RangeError(code + " is not a valid code point");
2385
+ elements += code < 65536 ? String.fromCharCode(code) : String.fromCharCode(((code -= 65536) >> 10) + 55296, code % 1024 + 56320);
2386
+ }
2387
+ return elements;
2388
+ };
2389
+ var fromEntries = hasNativeFromEntries ? Object.fromEntries : function fromEntries2(entries) {
2390
+ var obj = {};
2391
+ for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
2392
+ var _a2 = entries_1[_i], k = _a2[0], v = _a2[1];
2393
+ obj[k] = v;
2394
+ }
2395
+ return obj;
2396
+ };
2397
+ var codePointAt = hasNativeCodePointAt ? function codePointAt2(s, index) {
2398
+ return s.codePointAt(index);
2399
+ } : function codePointAt3(s, index) {
2400
+ var size = s.length;
2401
+ if (index < 0 || index >= size) {
2402
+ return void 0;
2403
+ }
2404
+ var first = s.charCodeAt(index);
2405
+ var second;
2406
+ return first < 55296 || first > 56319 || index + 1 === size || (second = s.charCodeAt(index + 1)) < 56320 || second > 57343 ? first : (first - 55296 << 10) + (second - 56320) + 65536;
2407
+ };
2408
+ var trimStart = hasTrimStart ? function trimStart2(s) {
2409
+ return s.trimStart();
2410
+ } : function trimStart3(s) {
2411
+ return s.replace(SPACE_SEPARATOR_START_REGEX, "");
2412
+ };
2413
+ var trimEnd = hasTrimEnd ? function trimEnd2(s) {
2414
+ return s.trimEnd();
2415
+ } : function trimEnd3(s) {
2416
+ return s.replace(SPACE_SEPARATOR_END_REGEX, "");
2417
+ };
2418
+ function RE(s, flag) {
2419
+ return new RegExp(s, flag);
2420
+ }
2421
+ var matchIdentifierAtIndex;
2422
+ if (REGEX_SUPPORTS_U_AND_Y) {
2423
+ IDENTIFIER_PREFIX_RE_1 = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
2424
+ matchIdentifierAtIndex = function matchIdentifierAtIndex2(s, index) {
2425
+ var _a2;
2426
+ IDENTIFIER_PREFIX_RE_1.lastIndex = index;
2427
+ var match = IDENTIFIER_PREFIX_RE_1.exec(s);
2428
+ return (_a2 = match[1]) !== null && _a2 !== void 0 ? _a2 : "";
2429
+ };
2430
+ } else {
2431
+ matchIdentifierAtIndex = function matchIdentifierAtIndex2(s, index) {
2432
+ var match = [];
2433
+ while (true) {
2434
+ var c = codePointAt(s, index);
2435
+ if (c === void 0 || _isWhiteSpace(c) || _isPatternSyntax(c)) {
2436
+ break;
2437
+ }
2438
+ match.push(c);
2439
+ index += c >= 65536 ? 2 : 1;
2440
+ }
2441
+ return fromCodePoint.apply(void 0, match);
2442
+ };
2443
+ }
2444
+ var IDENTIFIER_PREFIX_RE_1;
2445
+ var Parser = function() {
2446
+ function Parser2(message, options) {
2447
+ if (options === void 0) {
2448
+ options = {};
2449
+ }
2450
+ this.message = message;
2451
+ this.position = { offset: 0, line: 1, column: 1 };
2452
+ this.ignoreTag = !!options.ignoreTag;
2453
+ this.locale = options.locale;
2454
+ this.requiresOtherClause = !!options.requiresOtherClause;
2455
+ this.shouldParseSkeletons = !!options.shouldParseSkeletons;
2456
+ }
2457
+ Parser2.prototype.parse = function() {
2458
+ if (this.offset() !== 0) {
2459
+ throw Error("parser can only be used once");
2460
+ }
2461
+ return this.parseMessage(0, "", false);
2462
+ };
2463
+ Parser2.prototype.parseMessage = function(nestingLevel, parentArgType, expectingCloseTag) {
2464
+ var elements = [];
2465
+ while (!this.isEOF()) {
2466
+ var char = this.char();
2467
+ if (char === 123) {
2468
+ var result = this.parseArgument(nestingLevel, expectingCloseTag);
2469
+ if (result.err) {
2470
+ return result;
2471
+ }
2472
+ elements.push(result.val);
2473
+ } else if (char === 125 && nestingLevel > 0) {
2474
+ break;
2475
+ } else if (char === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) {
2476
+ var position = this.clonePosition();
2477
+ this.bump();
2478
+ elements.push({
2479
+ type: TYPE.pound,
2480
+ location: createLocation(position, this.clonePosition())
2481
+ });
2482
+ } else if (char === 60 && !this.ignoreTag && this.peek() === 47) {
2483
+ if (expectingCloseTag) {
2484
+ break;
2485
+ } else {
2486
+ return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));
2487
+ }
2488
+ } else if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {
2489
+ var result = this.parseTag(nestingLevel, parentArgType);
2490
+ if (result.err) {
2491
+ return result;
2492
+ }
2493
+ elements.push(result.val);
2494
+ } else {
2495
+ var result = this.parseLiteral(nestingLevel, parentArgType);
2496
+ if (result.err) {
2497
+ return result;
2498
+ }
2499
+ elements.push(result.val);
2500
+ }
2501
+ }
2502
+ return { val: elements, err: null };
2503
+ };
2504
+ Parser2.prototype.parseTag = function(nestingLevel, parentArgType) {
2505
+ var startPosition = this.clonePosition();
2506
+ this.bump();
2507
+ var tagName = this.parseTagName();
2508
+ this.bumpSpace();
2509
+ if (this.bumpIf("/>")) {
2510
+ return {
2511
+ val: {
2512
+ type: TYPE.literal,
2513
+ value: "<".concat(tagName, "/>"),
2514
+ location: createLocation(startPosition, this.clonePosition())
2515
+ },
2516
+ err: null
2517
+ };
2518
+ } else if (this.bumpIf(">")) {
2519
+ var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
2520
+ if (childrenResult.err) {
2521
+ return childrenResult;
2522
+ }
2523
+ var children = childrenResult.val;
2524
+ var endTagStartPosition = this.clonePosition();
2525
+ if (this.bumpIf("</")) {
2526
+ if (this.isEOF() || !_isAlpha(this.char())) {
2527
+ return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
2528
+ }
2529
+ var closingTagNameStartPosition = this.clonePosition();
2530
+ var closingTagName = this.parseTagName();
2531
+ if (tagName !== closingTagName) {
2532
+ return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));
2533
+ }
2534
+ this.bumpSpace();
2535
+ if (!this.bumpIf(">")) {
2536
+ return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
2537
+ }
2538
+ return {
2539
+ val: {
2540
+ type: TYPE.tag,
2541
+ value: tagName,
2542
+ children,
2543
+ location: createLocation(startPosition, this.clonePosition())
2544
+ },
2545
+ err: null
2546
+ };
2547
+ } else {
2548
+ return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));
2549
+ }
2550
+ } else {
2551
+ return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
2552
+ }
2553
+ };
2554
+ Parser2.prototype.parseTagName = function() {
2555
+ var startOffset = this.offset();
2556
+ this.bump();
2557
+ while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {
2558
+ this.bump();
2559
+ }
2560
+ return this.message.slice(startOffset, this.offset());
2561
+ };
2562
+ Parser2.prototype.parseLiteral = function(nestingLevel, parentArgType) {
2563
+ var start = this.clonePosition();
2564
+ var value = "";
2565
+ while (true) {
2566
+ var parseQuoteResult = this.tryParseQuote(parentArgType);
2567
+ if (parseQuoteResult) {
2568
+ value += parseQuoteResult;
2569
+ continue;
2570
+ }
2571
+ var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
2572
+ if (parseUnquotedResult) {
2573
+ value += parseUnquotedResult;
2574
+ continue;
2575
+ }
2576
+ var parseLeftAngleResult = this.tryParseLeftAngleBracket();
2577
+ if (parseLeftAngleResult) {
2578
+ value += parseLeftAngleResult;
2579
+ continue;
2580
+ }
2581
+ break;
2582
+ }
2583
+ var location = createLocation(start, this.clonePosition());
2584
+ return {
2585
+ val: { type: TYPE.literal, value, location },
2586
+ err: null
2587
+ };
2588
+ };
2589
+ Parser2.prototype.tryParseLeftAngleBracket = function() {
2590
+ if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || !_isAlphaOrSlash(this.peek() || 0))) {
2591
+ this.bump();
2592
+ return "<";
2593
+ }
2594
+ return null;
2595
+ };
2596
+ Parser2.prototype.tryParseQuote = function(parentArgType) {
2597
+ if (this.isEOF() || this.char() !== 39) {
2598
+ return null;
2599
+ }
2600
+ switch (this.peek()) {
2601
+ case 39:
2602
+ this.bump();
2603
+ this.bump();
2604
+ return "'";
2605
+ case 123:
2606
+ case 60:
2607
+ case 62:
2608
+ case 125:
2609
+ break;
2610
+ case 35:
2611
+ if (parentArgType === "plural" || parentArgType === "selectordinal") {
2612
+ break;
2613
+ }
2614
+ return null;
2615
+ default:
2616
+ return null;
2617
+ }
2618
+ this.bump();
2619
+ var codePoints = [this.char()];
2620
+ this.bump();
2621
+ while (!this.isEOF()) {
2622
+ var ch = this.char();
2623
+ if (ch === 39) {
2624
+ if (this.peek() === 39) {
2625
+ codePoints.push(39);
2626
+ this.bump();
2627
+ } else {
2628
+ this.bump();
2629
+ break;
2630
+ }
2631
+ } else {
2632
+ codePoints.push(ch);
2633
+ }
2634
+ this.bump();
2635
+ }
2636
+ return fromCodePoint.apply(void 0, codePoints);
2637
+ };
2638
+ Parser2.prototype.tryParseUnquoted = function(nestingLevel, parentArgType) {
2639
+ if (this.isEOF()) {
2640
+ return null;
2641
+ }
2642
+ var ch = this.char();
2643
+ if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) {
2644
+ return null;
2645
+ } else {
2646
+ this.bump();
2647
+ return fromCodePoint(ch);
2648
+ }
2649
+ };
2650
+ Parser2.prototype.parseArgument = function(nestingLevel, expectingCloseTag) {
2651
+ var openingBracePosition = this.clonePosition();
2652
+ this.bump();
2653
+ this.bumpSpace();
2654
+ if (this.isEOF()) {
2655
+ return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
2656
+ }
2657
+ if (this.char() === 125) {
2658
+ this.bump();
2659
+ return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
2660
+ }
2661
+ var value = this.parseIdentifierIfPossible().value;
2662
+ if (!value) {
2663
+ return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
2664
+ }
2665
+ this.bumpSpace();
2666
+ if (this.isEOF()) {
2667
+ return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
2668
+ }
2669
+ switch (this.char()) {
2670
+ case 125: {
2671
+ this.bump();
2672
+ return {
2673
+ val: {
2674
+ type: TYPE.argument,
2675
+ value,
2676
+ location: createLocation(openingBracePosition, this.clonePosition())
2677
+ },
2678
+ err: null
2679
+ };
2680
+ }
2681
+ case 44: {
2682
+ this.bump();
2683
+ this.bumpSpace();
2684
+ if (this.isEOF()) {
2685
+ return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
2686
+ }
2687
+ return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);
2688
+ }
2689
+ default:
2690
+ return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
2691
+ }
2692
+ };
2693
+ Parser2.prototype.parseIdentifierIfPossible = function() {
2694
+ var startingPosition = this.clonePosition();
2695
+ var startOffset = this.offset();
2696
+ var value = matchIdentifierAtIndex(this.message, startOffset);
2697
+ var endOffset = startOffset + value.length;
2698
+ this.bumpTo(endOffset);
2699
+ var endPosition = this.clonePosition();
2700
+ var location = createLocation(startingPosition, endPosition);
2701
+ return { value, location };
2702
+ };
2703
+ Parser2.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
2704
+ var _a2;
2705
+ var typeStartPosition = this.clonePosition();
2706
+ var argType = this.parseIdentifierIfPossible().value;
2707
+ var typeEndPosition = this.clonePosition();
2708
+ switch (argType) {
2709
+ case "":
2710
+ return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
2711
+ case "number":
2712
+ case "date":
2713
+ case "time": {
2714
+ this.bumpSpace();
2715
+ var styleAndLocation = null;
2716
+ if (this.bumpIf(",")) {
2717
+ this.bumpSpace();
2718
+ var styleStartPosition = this.clonePosition();
2719
+ var result = this.parseSimpleArgStyleIfPossible();
2720
+ if (result.err) {
2721
+ return result;
2722
+ }
2723
+ var style = trimEnd(result.val);
2724
+ if (style.length === 0) {
2725
+ return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
2726
+ }
2727
+ var styleLocation = createLocation(styleStartPosition, this.clonePosition());
2728
+ styleAndLocation = { style, styleLocation };
2729
+ }
2730
+ var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
2731
+ if (argCloseResult.err) {
2732
+ return argCloseResult;
2733
+ }
2734
+ var location_1 = createLocation(openingBracePosition, this.clonePosition());
2735
+ if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, "::", 0)) {
2736
+ var skeleton = trimStart(styleAndLocation.style.slice(2));
2737
+ if (argType === "number") {
2738
+ var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
2739
+ if (result.err) {
2740
+ return result;
2741
+ }
2742
+ return {
2743
+ val: { type: TYPE.number, value, location: location_1, style: result.val },
2744
+ err: null
2745
+ };
2746
+ } else {
2747
+ if (skeleton.length === 0) {
2748
+ return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
2749
+ }
2750
+ var dateTimePattern = skeleton;
2751
+ if (this.locale) {
2752
+ dateTimePattern = getBestPattern(skeleton, this.locale);
2753
+ }
2754
+ var style = {
2755
+ type: SKELETON_TYPE.dateTime,
2756
+ pattern: dateTimePattern,
2757
+ location: styleAndLocation.styleLocation,
2758
+ parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(dateTimePattern) : {}
2759
+ };
2760
+ var type = argType === "date" ? TYPE.date : TYPE.time;
2761
+ return {
2762
+ val: { type, value, location: location_1, style },
2763
+ err: null
2764
+ };
2765
+ }
2766
+ }
2767
+ return {
2768
+ val: {
2769
+ type: argType === "number" ? TYPE.number : argType === "date" ? TYPE.date : TYPE.time,
2770
+ value,
2771
+ location: location_1,
2772
+ style: (_a2 = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a2 !== void 0 ? _a2 : null
2773
+ },
2774
+ err: null
2775
+ };
2776
+ }
2777
+ case "plural":
2778
+ case "selectordinal":
2779
+ case "select": {
2780
+ var typeEndPosition_1 = this.clonePosition();
2781
+ this.bumpSpace();
2782
+ if (!this.bumpIf(",")) {
2783
+ return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));
2784
+ }
2785
+ this.bumpSpace();
2786
+ var identifierAndLocation = this.parseIdentifierIfPossible();
2787
+ var pluralOffset = 0;
2788
+ if (argType !== "select" && identifierAndLocation.value === "offset") {
2789
+ if (!this.bumpIf(":")) {
2790
+ return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));
2791
+ }
2792
+ this.bumpSpace();
2793
+ var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2794
+ if (result.err) {
2795
+ return result;
2796
+ }
2797
+ this.bumpSpace();
2798
+ identifierAndLocation = this.parseIdentifierIfPossible();
2799
+ pluralOffset = result.val;
2800
+ }
2801
+ var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
2802
+ if (optionsResult.err) {
2803
+ return optionsResult;
2804
+ }
2805
+ var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
2806
+ if (argCloseResult.err) {
2807
+ return argCloseResult;
2808
+ }
2809
+ var location_2 = createLocation(openingBracePosition, this.clonePosition());
2810
+ if (argType === "select") {
2811
+ return {
2812
+ val: {
2813
+ type: TYPE.select,
2814
+ value,
2815
+ options: fromEntries(optionsResult.val),
2816
+ location: location_2
2817
+ },
2818
+ err: null
2819
+ };
2820
+ } else {
2821
+ return {
2822
+ val: {
2823
+ type: TYPE.plural,
2824
+ value,
2825
+ options: fromEntries(optionsResult.val),
2826
+ offset: pluralOffset,
2827
+ pluralType: argType === "plural" ? "cardinal" : "ordinal",
2828
+ location: location_2
2829
+ },
2830
+ err: null
2831
+ };
2832
+ }
2833
+ }
2834
+ default:
2835
+ return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
2836
+ }
2837
+ };
2838
+ Parser2.prototype.tryParseArgumentClose = function(openingBracePosition) {
2839
+ if (this.isEOF() || this.char() !== 125) {
2840
+ return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
2841
+ }
2842
+ this.bump();
2843
+ return { val: true, err: null };
2844
+ };
2845
+ Parser2.prototype.parseSimpleArgStyleIfPossible = function() {
2846
+ var nestedBraces = 0;
2847
+ var startPosition = this.clonePosition();
2848
+ while (!this.isEOF()) {
2849
+ var ch = this.char();
2850
+ switch (ch) {
2851
+ case 39: {
2852
+ this.bump();
2853
+ var apostrophePosition = this.clonePosition();
2854
+ if (!this.bumpUntil("'")) {
2855
+ return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));
2856
+ }
2857
+ this.bump();
2858
+ break;
2859
+ }
2860
+ case 123: {
2861
+ nestedBraces += 1;
2862
+ this.bump();
2863
+ break;
2864
+ }
2865
+ case 125: {
2866
+ if (nestedBraces > 0) {
2867
+ nestedBraces -= 1;
2868
+ } else {
2869
+ return {
2870
+ val: this.message.slice(startPosition.offset, this.offset()),
2871
+ err: null
2872
+ };
2873
+ }
2874
+ break;
2875
+ }
2876
+ default:
2877
+ this.bump();
2878
+ break;
2879
+ }
2880
+ }
2881
+ return {
2882
+ val: this.message.slice(startPosition.offset, this.offset()),
2883
+ err: null
2884
+ };
2885
+ };
2886
+ Parser2.prototype.parseNumberSkeletonFromString = function(skeleton, location) {
2887
+ var tokens = [];
2888
+ try {
2889
+ tokens = parseNumberSkeletonFromString(skeleton);
2890
+ } catch (e) {
2891
+ return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);
2892
+ }
2893
+ return {
2894
+ val: {
2895
+ type: SKELETON_TYPE.number,
2896
+ tokens,
2897
+ location,
2898
+ parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens) : {}
2899
+ },
2900
+ err: null
2901
+ };
2902
+ };
2903
+ Parser2.prototype.tryParsePluralOrSelectOptions = function(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
2904
+ var _a2;
2905
+ var hasOtherClause = false;
2906
+ var options = [];
2907
+ var parsedSelectors = /* @__PURE__ */ new Set();
2908
+ var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;
2909
+ while (true) {
2910
+ if (selector.length === 0) {
2911
+ var startPosition = this.clonePosition();
2912
+ if (parentArgType !== "select" && this.bumpIf("=")) {
2913
+ var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
2914
+ if (result.err) {
2915
+ return result;
2916
+ }
2917
+ selectorLocation = createLocation(startPosition, this.clonePosition());
2918
+ selector = this.message.slice(startPosition.offset, this.offset());
2919
+ } else {
2920
+ break;
2921
+ }
2922
+ }
2923
+ if (parsedSelectors.has(selector)) {
2924
+ return this.error(parentArgType === "select" ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);
2925
+ }
2926
+ if (selector === "other") {
2927
+ hasOtherClause = true;
2928
+ }
2929
+ this.bumpSpace();
2930
+ var openingBracePosition = this.clonePosition();
2931
+ if (!this.bumpIf("{")) {
2932
+ return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));
2933
+ }
2934
+ var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
2935
+ if (fragmentResult.err) {
2936
+ return fragmentResult;
2937
+ }
2938
+ var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
2939
+ if (argCloseResult.err) {
2940
+ return argCloseResult;
2941
+ }
2942
+ options.push([
2943
+ selector,
2944
+ {
2945
+ value: fragmentResult.val,
2946
+ location: createLocation(openingBracePosition, this.clonePosition())
2947
+ }
2948
+ ]);
2949
+ parsedSelectors.add(selector);
2950
+ this.bumpSpace();
2951
+ _a2 = this.parseIdentifierIfPossible(), selector = _a2.value, selectorLocation = _a2.location;
2952
+ }
2953
+ if (options.length === 0) {
2954
+ return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
2955
+ }
2956
+ if (this.requiresOtherClause && !hasOtherClause) {
2957
+ return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));
2958
+ }
2959
+ return { val: options, err: null };
2960
+ };
2961
+ Parser2.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
2962
+ var sign = 1;
2963
+ var startingPosition = this.clonePosition();
2964
+ if (this.bumpIf("+")) {
2965
+ } else if (this.bumpIf("-")) {
2966
+ sign = -1;
2967
+ }
2968
+ var hasDigits = false;
2969
+ var decimal = 0;
2970
+ while (!this.isEOF()) {
2971
+ var ch = this.char();
2972
+ if (ch >= 48 && ch <= 57) {
2973
+ hasDigits = true;
2974
+ decimal = decimal * 10 + (ch - 48);
2975
+ this.bump();
2976
+ } else {
2977
+ break;
2978
+ }
2979
+ }
2980
+ var location = createLocation(startingPosition, this.clonePosition());
2981
+ if (!hasDigits) {
2982
+ return this.error(expectNumberError, location);
2983
+ }
2984
+ decimal *= sign;
2985
+ if (!isSafeInteger(decimal)) {
2986
+ return this.error(invalidNumberError, location);
2987
+ }
2988
+ return { val: decimal, err: null };
2989
+ };
2990
+ Parser2.prototype.offset = function() {
2991
+ return this.position.offset;
2992
+ };
2993
+ Parser2.prototype.isEOF = function() {
2994
+ return this.offset() === this.message.length;
2995
+ };
2996
+ Parser2.prototype.clonePosition = function() {
2997
+ return {
2998
+ offset: this.position.offset,
2999
+ line: this.position.line,
3000
+ column: this.position.column
3001
+ };
3002
+ };
3003
+ Parser2.prototype.char = function() {
3004
+ var offset = this.position.offset;
3005
+ if (offset >= this.message.length) {
3006
+ throw Error("out of bound");
3007
+ }
3008
+ var code = codePointAt(this.message, offset);
3009
+ if (code === void 0) {
3010
+ throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
3011
+ }
3012
+ return code;
3013
+ };
3014
+ Parser2.prototype.error = function(kind, location) {
3015
+ return {
3016
+ val: null,
3017
+ err: {
3018
+ kind,
3019
+ message: this.message,
3020
+ location
3021
+ }
3022
+ };
3023
+ };
3024
+ Parser2.prototype.bump = function() {
3025
+ if (this.isEOF()) {
3026
+ return;
3027
+ }
3028
+ var code = this.char();
3029
+ if (code === 10) {
3030
+ this.position.line += 1;
3031
+ this.position.column = 1;
3032
+ this.position.offset += 1;
3033
+ } else {
3034
+ this.position.column += 1;
3035
+ this.position.offset += code < 65536 ? 1 : 2;
3036
+ }
3037
+ };
3038
+ Parser2.prototype.bumpIf = function(prefix) {
3039
+ if (startsWith(this.message, prefix, this.offset())) {
3040
+ for (var i = 0; i < prefix.length; i++) {
3041
+ this.bump();
3042
+ }
3043
+ return true;
3044
+ }
3045
+ return false;
3046
+ };
3047
+ Parser2.prototype.bumpUntil = function(pattern) {
3048
+ var currentOffset = this.offset();
3049
+ var index = this.message.indexOf(pattern, currentOffset);
3050
+ if (index >= 0) {
3051
+ this.bumpTo(index);
3052
+ return true;
3053
+ } else {
3054
+ this.bumpTo(this.message.length);
3055
+ return false;
3056
+ }
3057
+ };
3058
+ Parser2.prototype.bumpTo = function(targetOffset) {
3059
+ if (this.offset() > targetOffset) {
3060
+ throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
3061
+ }
3062
+ targetOffset = Math.min(targetOffset, this.message.length);
3063
+ while (true) {
3064
+ var offset = this.offset();
3065
+ if (offset === targetOffset) {
3066
+ break;
3067
+ }
3068
+ if (offset > targetOffset) {
3069
+ throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
3070
+ }
3071
+ this.bump();
3072
+ if (this.isEOF()) {
3073
+ break;
3074
+ }
3075
+ }
3076
+ };
3077
+ Parser2.prototype.bumpSpace = function() {
3078
+ while (!this.isEOF() && _isWhiteSpace(this.char())) {
3079
+ this.bump();
3080
+ }
3081
+ };
3082
+ Parser2.prototype.peek = function() {
3083
+ if (this.isEOF()) {
3084
+ return null;
3085
+ }
3086
+ var code = this.char();
3087
+ var offset = this.offset();
3088
+ var nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1));
3089
+ return nextCode !== null && nextCode !== void 0 ? nextCode : null;
3090
+ };
3091
+ return Parser2;
3092
+ }();
3093
+ function _isAlpha(codepoint) {
3094
+ return codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90;
3095
+ }
3096
+ function _isAlphaOrSlash(codepoint) {
3097
+ return _isAlpha(codepoint) || codepoint === 47;
3098
+ }
3099
+ function _isPotentialElementNameChar(c) {
3100
+ return c === 45 || c === 46 || c >= 48 && c <= 57 || c === 95 || c >= 97 && c <= 122 || c >= 65 && c <= 90 || c == 183 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8255 && c <= 8256 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039;
3101
+ }
3102
+ function _isWhiteSpace(c) {
3103
+ return c >= 9 && c <= 13 || c === 32 || c === 133 || c >= 8206 && c <= 8207 || c === 8232 || c === 8233;
3104
+ }
3105
+ function _isPatternSyntax(c) {
3106
+ return c >= 33 && c <= 35 || c === 36 || c >= 37 && c <= 39 || c === 40 || c === 41 || c === 42 || c === 43 || c === 44 || c === 45 || c >= 46 && c <= 47 || c >= 58 && c <= 59 || c >= 60 && c <= 62 || c >= 63 && c <= 64 || c === 91 || c === 92 || c === 93 || c === 94 || c === 96 || c === 123 || c === 124 || c === 125 || c === 126 || c === 161 || c >= 162 && c <= 165 || c === 166 || c === 167 || c === 169 || c === 171 || c === 172 || c === 174 || c === 176 || c === 177 || c === 182 || c === 187 || c === 191 || c === 215 || c === 247 || c >= 8208 && c <= 8213 || c >= 8214 && c <= 8215 || c === 8216 || c === 8217 || c === 8218 || c >= 8219 && c <= 8220 || c === 8221 || c === 8222 || c === 8223 || c >= 8224 && c <= 8231 || c >= 8240 && c <= 8248 || c === 8249 || c === 8250 || c >= 8251 && c <= 8254 || c >= 8257 && c <= 8259 || c === 8260 || c === 8261 || c === 8262 || c >= 8263 && c <= 8273 || c === 8274 || c === 8275 || c >= 8277 && c <= 8286 || c >= 8592 && c <= 8596 || c >= 8597 && c <= 8601 || c >= 8602 && c <= 8603 || c >= 8604 && c <= 8607 || c === 8608 || c >= 8609 && c <= 8610 || c === 8611 || c >= 8612 && c <= 8613 || c === 8614 || c >= 8615 && c <= 8621 || c === 8622 || c >= 8623 && c <= 8653 || c >= 8654 && c <= 8655 || c >= 8656 && c <= 8657 || c === 8658 || c === 8659 || c === 8660 || c >= 8661 && c <= 8691 || c >= 8692 && c <= 8959 || c >= 8960 && c <= 8967 || c === 8968 || c === 8969 || c === 8970 || c === 8971 || c >= 8972 && c <= 8991 || c >= 8992 && c <= 8993 || c >= 8994 && c <= 9e3 || c === 9001 || c === 9002 || c >= 9003 && c <= 9083 || c === 9084 || c >= 9085 && c <= 9114 || c >= 9115 && c <= 9139 || c >= 9140 && c <= 9179 || c >= 9180 && c <= 9185 || c >= 9186 && c <= 9254 || c >= 9255 && c <= 9279 || c >= 9280 && c <= 9290 || c >= 9291 && c <= 9311 || c >= 9472 && c <= 9654 || c === 9655 || c >= 9656 && c <= 9664 || c === 9665 || c >= 9666 && c <= 9719 || c >= 9720 && c <= 9727 || c >= 9728 && c <= 9838 || c === 9839 || c >= 9840 && c <= 10087 || c === 10088 || c === 10089 || c === 10090 || c === 10091 || c === 10092 || c === 10093 || c === 10094 || c === 10095 || c === 10096 || c === 10097 || c === 10098 || c === 10099 || c === 10100 || c === 10101 || c >= 10132 && c <= 10175 || c >= 10176 && c <= 10180 || c === 10181 || c === 10182 || c >= 10183 && c <= 10213 || c === 10214 || c === 10215 || c === 10216 || c === 10217 || c === 10218 || c === 10219 || c === 10220 || c === 10221 || c === 10222 || c === 10223 || c >= 10224 && c <= 10239 || c >= 10240 && c <= 10495 || c >= 10496 && c <= 10626 || c === 10627 || c === 10628 || c === 10629 || c === 10630 || c === 10631 || c === 10632 || c === 10633 || c === 10634 || c === 10635 || c === 10636 || c === 10637 || c === 10638 || c === 10639 || c === 10640 || c === 10641 || c === 10642 || c === 10643 || c === 10644 || c === 10645 || c === 10646 || c === 10647 || c === 10648 || c >= 10649 && c <= 10711 || c === 10712 || c === 10713 || c === 10714 || c === 10715 || c >= 10716 && c <= 10747 || c === 10748 || c === 10749 || c >= 10750 && c <= 11007 || c >= 11008 && c <= 11055 || c >= 11056 && c <= 11076 || c >= 11077 && c <= 11078 || c >= 11079 && c <= 11084 || c >= 11085 && c <= 11123 || c >= 11124 && c <= 11125 || c >= 11126 && c <= 11157 || c === 11158 || c >= 11159 && c <= 11263 || c >= 11776 && c <= 11777 || c === 11778 || c === 11779 || c === 11780 || c === 11781 || c >= 11782 && c <= 11784 || c === 11785 || c === 11786 || c === 11787 || c === 11788 || c === 11789 || c >= 11790 && c <= 11798 || c === 11799 || c >= 11800 && c <= 11801 || c === 11802 || c === 11803 || c === 11804 || c === 11805 || c >= 11806 && c <= 11807 || c === 11808 || c === 11809 || c === 11810 || c === 11811 || c === 11812 || c === 11813 || c === 11814 || c === 11815 || c === 11816 || c === 11817 || c >= 11818 && c <= 11822 || c === 11823 || c >= 11824 && c <= 11833 || c >= 11834 && c <= 11835 || c >= 11836 && c <= 11839 || c === 11840 || c === 11841 || c === 11842 || c >= 11843 && c <= 11855 || c >= 11856 && c <= 11857 || c === 11858 || c >= 11859 && c <= 11903 || c >= 12289 && c <= 12291 || c === 12296 || c === 12297 || c === 12298 || c === 12299 || c === 12300 || c === 12301 || c === 12302 || c === 12303 || c === 12304 || c === 12305 || c >= 12306 && c <= 12307 || c === 12308 || c === 12309 || c === 12310 || c === 12311 || c === 12312 || c === 12313 || c === 12314 || c === 12315 || c === 12316 || c === 12317 || c >= 12318 && c <= 12319 || c === 12320 || c === 12336 || c === 64830 || c === 64831 || c >= 65093 && c <= 65094;
3107
+ }
3108
+
3109
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/lib/index.js
3110
+ function pruneLocation(els) {
3111
+ els.forEach(function(el) {
3112
+ delete el.location;
3113
+ if (isSelectElement(el) || isPluralElement(el)) {
3114
+ for (var k in el.options) {
3115
+ delete el.options[k].location;
3116
+ pruneLocation(el.options[k].value);
3117
+ }
3118
+ } else if (isNumberElement(el) && isNumberSkeleton(el.style)) {
3119
+ delete el.style.location;
3120
+ } else if ((isDateElement(el) || isTimeElement(el)) && isDateTimeSkeleton(el.style)) {
3121
+ delete el.style.location;
3122
+ } else if (isTagElement(el)) {
3123
+ pruneLocation(el.children);
3124
+ }
3125
+ });
3126
+ }
3127
+ function parse(message, opts) {
3128
+ if (opts === void 0) {
3129
+ opts = {};
3130
+ }
3131
+ opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);
3132
+ var result = new Parser(message, opts).parse();
3133
+ if (result.err) {
3134
+ var error = SyntaxError(ErrorKind[result.err.kind]);
3135
+ error.location = result.err.location;
3136
+ error.originalMessage = result.err.message;
3137
+ throw error;
3138
+ }
3139
+ if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {
3140
+ pruneLocation(result.val);
3141
+ }
3142
+ return result.val;
3143
+ }
3144
+
3145
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/lib/index.js
3146
+ function memoize(fn, options) {
3147
+ var cache = options && options.cache ? options.cache : cacheDefault;
3148
+ var serializer = options && options.serializer ? options.serializer : serializerDefault;
3149
+ var strategy = options && options.strategy ? options.strategy : strategyDefault;
3150
+ return strategy(fn, {
3151
+ cache,
3152
+ serializer
3153
+ });
3154
+ }
3155
+ function isPrimitive(value) {
3156
+ return value == null || typeof value === "number" || typeof value === "boolean";
3157
+ }
3158
+ function monadic(fn, cache, serializer, arg) {
3159
+ var cacheKey = isPrimitive(arg) ? arg : serializer(arg);
3160
+ var computedValue = cache.get(cacheKey);
3161
+ if (typeof computedValue === "undefined") {
3162
+ computedValue = fn.call(this, arg);
3163
+ cache.set(cacheKey, computedValue);
3164
+ }
3165
+ return computedValue;
3166
+ }
3167
+ function variadic(fn, cache, serializer) {
3168
+ var args = Array.prototype.slice.call(arguments, 3);
3169
+ var cacheKey = serializer(args);
3170
+ var computedValue = cache.get(cacheKey);
3171
+ if (typeof computedValue === "undefined") {
3172
+ computedValue = fn.apply(this, args);
3173
+ cache.set(cacheKey, computedValue);
3174
+ }
3175
+ return computedValue;
3176
+ }
3177
+ function assemble(fn, context, strategy, cache, serialize) {
3178
+ return strategy.bind(context, fn, cache, serialize);
3179
+ }
3180
+ function strategyDefault(fn, options) {
3181
+ var strategy = fn.length === 1 ? monadic : variadic;
3182
+ return assemble(fn, this, strategy, options.cache.create(), options.serializer);
3183
+ }
3184
+ function strategyVariadic(fn, options) {
3185
+ return assemble(fn, this, variadic, options.cache.create(), options.serializer);
3186
+ }
3187
+ function strategyMonadic(fn, options) {
3188
+ return assemble(fn, this, monadic, options.cache.create(), options.serializer);
3189
+ }
3190
+ var serializerDefault = function() {
3191
+ return JSON.stringify(arguments);
3192
+ };
3193
+ function ObjectWithoutPrototypeCache() {
3194
+ this.cache = /* @__PURE__ */ Object.create(null);
3195
+ }
3196
+ ObjectWithoutPrototypeCache.prototype.get = function(key) {
3197
+ return this.cache[key];
3198
+ };
3199
+ ObjectWithoutPrototypeCache.prototype.set = function(key, value) {
3200
+ this.cache[key] = value;
3201
+ };
3202
+ var cacheDefault = {
3203
+ create: function create() {
3204
+ return new ObjectWithoutPrototypeCache();
3205
+ }
3206
+ };
3207
+ var strategies = {
3208
+ variadic: strategyVariadic,
3209
+ monadic: strategyMonadic
3210
+ };
3211
+
3212
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/intl-messageformat@0.0.0/node_modules/intl-messageformat/lib/src/error.js
3213
+ var ErrorCode;
3214
+ (function(ErrorCode2) {
3215
+ ErrorCode2["MISSING_VALUE"] = "MISSING_VALUE";
3216
+ ErrorCode2["INVALID_VALUE"] = "INVALID_VALUE";
3217
+ ErrorCode2["MISSING_INTL_API"] = "MISSING_INTL_API";
3218
+ })(ErrorCode || (ErrorCode = {}));
3219
+ var FormatError = function(_super) {
3220
+ __extends(FormatError2, _super);
3221
+ function FormatError2(msg, code, originalMessage) {
3222
+ var _this = _super.call(this, msg) || this;
3223
+ _this.code = code;
3224
+ _this.originalMessage = originalMessage;
3225
+ return _this;
3226
+ }
3227
+ FormatError2.prototype.toString = function() {
3228
+ return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
3229
+ };
3230
+ return FormatError2;
3231
+ }(Error);
3232
+ var InvalidValueError = function(_super) {
3233
+ __extends(InvalidValueError2, _super);
3234
+ function InvalidValueError2(variableId, value, options, originalMessage) {
3235
+ return _super.call(this, 'Invalid values for "'.concat(variableId, '": "').concat(value, '". Options are "').concat(Object.keys(options).join('", "'), '"'), ErrorCode.INVALID_VALUE, originalMessage) || this;
3236
+ }
3237
+ return InvalidValueError2;
3238
+ }(FormatError);
3239
+ var InvalidValueTypeError = function(_super) {
3240
+ __extends(InvalidValueTypeError2, _super);
3241
+ function InvalidValueTypeError2(value, type, originalMessage) {
3242
+ return _super.call(this, 'Value for "'.concat(value, '" must be of type ').concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;
3243
+ }
3244
+ return InvalidValueTypeError2;
3245
+ }(FormatError);
3246
+ var MissingValueError = function(_super) {
3247
+ __extends(MissingValueError2, _super);
3248
+ function MissingValueError2(variableId, originalMessage) {
3249
+ return _super.call(this, 'The intl string context variable "'.concat(variableId, '" was not provided to the string "').concat(originalMessage, '"'), ErrorCode.MISSING_VALUE, originalMessage) || this;
3250
+ }
3251
+ return MissingValueError2;
3252
+ }(FormatError);
3253
+
3254
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/intl-messageformat@0.0.0/node_modules/intl-messageformat/lib/src/formatters.js
3255
+ var PART_TYPE;
3256
+ (function(PART_TYPE2) {
3257
+ PART_TYPE2[PART_TYPE2["literal"] = 0] = "literal";
3258
+ PART_TYPE2[PART_TYPE2["object"] = 1] = "object";
3259
+ })(PART_TYPE || (PART_TYPE = {}));
3260
+ function mergeLiteral(parts) {
3261
+ if (parts.length < 2) {
3262
+ return parts;
3263
+ }
3264
+ return parts.reduce(function(all, part) {
3265
+ var lastPart = all[all.length - 1];
3266
+ if (!lastPart || lastPart.type !== PART_TYPE.literal || part.type !== PART_TYPE.literal) {
3267
+ all.push(part);
3268
+ } else {
3269
+ lastPart.value += part.value;
3270
+ }
3271
+ return all;
3272
+ }, []);
3273
+ }
3274
+ function isFormatXMLElementFn(el) {
3275
+ return typeof el === "function";
3276
+ }
3277
+ function formatToParts2(els, locales, formatters, formats, values, currentPluralValue, originalMessage) {
3278
+ if (els.length === 1 && isLiteralElement(els[0])) {
3279
+ return [
3280
+ {
3281
+ type: PART_TYPE.literal,
3282
+ value: els[0].value
3283
+ }
3284
+ ];
3285
+ }
3286
+ var result = [];
3287
+ for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {
3288
+ var el = els_1[_i];
3289
+ if (isLiteralElement(el)) {
3290
+ result.push({
3291
+ type: PART_TYPE.literal,
3292
+ value: el.value
3293
+ });
3294
+ continue;
3295
+ }
3296
+ if (isPoundElement(el)) {
3297
+ if (typeof currentPluralValue === "number") {
3298
+ result.push({
3299
+ type: PART_TYPE.literal,
3300
+ value: formatters.getNumberFormat(locales).format(currentPluralValue)
3301
+ });
3302
+ }
3303
+ continue;
3304
+ }
3305
+ var varName = el.value;
3306
+ if (!(values && varName in values)) {
3307
+ throw new MissingValueError(varName, originalMessage);
3308
+ }
3309
+ var value = values[varName];
3310
+ if (isArgumentElement(el)) {
3311
+ if (!value || typeof value === "string" || typeof value === "number") {
3312
+ value = typeof value === "string" || typeof value === "number" ? String(value) : "";
3313
+ }
3314
+ result.push({
3315
+ type: typeof value === "string" ? PART_TYPE.literal : PART_TYPE.object,
3316
+ value
3317
+ });
3318
+ continue;
3319
+ }
3320
+ if (isDateElement(el)) {
3321
+ var style = typeof el.style === "string" ? formats.date[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : void 0;
3322
+ result.push({
3323
+ type: PART_TYPE.literal,
3324
+ value: formatters.getDateTimeFormat(locales, style).format(value)
3325
+ });
3326
+ continue;
3327
+ }
3328
+ if (isTimeElement(el)) {
3329
+ var style = typeof el.style === "string" ? formats.time[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : formats.time.medium;
3330
+ result.push({
3331
+ type: PART_TYPE.literal,
3332
+ value: formatters.getDateTimeFormat(locales, style).format(value)
3333
+ });
3334
+ continue;
3335
+ }
3336
+ if (isNumberElement(el)) {
3337
+ var style = typeof el.style === "string" ? formats.number[el.style] : isNumberSkeleton(el.style) ? el.style.parsedOptions : void 0;
3338
+ if (style && style.scale) {
3339
+ value = value * (style.scale || 1);
3340
+ }
3341
+ result.push({
3342
+ type: PART_TYPE.literal,
3343
+ value: formatters.getNumberFormat(locales, style).format(value)
3344
+ });
3345
+ continue;
3346
+ }
3347
+ if (isTagElement(el)) {
3348
+ var children = el.children, value_1 = el.value;
3349
+ var formatFn = values[value_1];
3350
+ if (!isFormatXMLElementFn(formatFn)) {
3351
+ throw new InvalidValueTypeError(value_1, "function", originalMessage);
3352
+ }
3353
+ var parts = formatToParts2(children, locales, formatters, formats, values, currentPluralValue);
3354
+ var chunks = formatFn(parts.map(function(p) {
3355
+ return p.value;
3356
+ }));
3357
+ if (!Array.isArray(chunks)) {
3358
+ chunks = [chunks];
3359
+ }
3360
+ result.push.apply(result, chunks.map(function(c) {
3361
+ return {
3362
+ type: typeof c === "string" ? PART_TYPE.literal : PART_TYPE.object,
3363
+ value: c
3364
+ };
3365
+ }));
3366
+ }
3367
+ if (isSelectElement(el)) {
3368
+ var opt = el.options[value] || el.options.other;
3369
+ if (!opt) {
3370
+ throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);
3371
+ }
3372
+ result.push.apply(result, formatToParts2(opt.value, locales, formatters, formats, values));
3373
+ continue;
3374
+ }
3375
+ if (isPluralElement(el)) {
3376
+ var opt = el.options["=".concat(value)];
3377
+ if (!opt) {
3378
+ if (!Intl.PluralRules) {
3379
+ throw new FormatError('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n', ErrorCode.MISSING_INTL_API, originalMessage);
3380
+ }
3381
+ var rule = formatters.getPluralRules(locales, { type: el.pluralType }).select(value - (el.offset || 0));
3382
+ opt = el.options[rule] || el.options.other;
3383
+ }
3384
+ if (!opt) {
3385
+ throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);
3386
+ }
3387
+ result.push.apply(result, formatToParts2(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));
3388
+ continue;
3389
+ }
3390
+ }
3391
+ return mergeLiteral(result);
3392
+ }
3393
+
3394
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/intl-messageformat@0.0.0/node_modules/intl-messageformat/lib/src/core.js
3395
+ function mergeConfig(c1, c2) {
3396
+ if (!c2) {
3397
+ return c1;
3398
+ }
3399
+ return __assign(__assign(__assign({}, c1 || {}), c2 || {}), Object.keys(c1).reduce(function(all, k) {
3400
+ all[k] = __assign(__assign({}, c1[k]), c2[k] || {});
3401
+ return all;
3402
+ }, {}));
3403
+ }
3404
+ function mergeConfigs(defaultConfig, configs) {
3405
+ if (!configs) {
3406
+ return defaultConfig;
3407
+ }
3408
+ return Object.keys(defaultConfig).reduce(function(all, k) {
3409
+ all[k] = mergeConfig(defaultConfig[k], configs[k]);
3410
+ return all;
3411
+ }, __assign({}, defaultConfig));
3412
+ }
3413
+ function createFastMemoizeCache(store) {
3414
+ return {
3415
+ create: function() {
3416
+ return {
3417
+ get: function(key) {
3418
+ return store[key];
3419
+ },
3420
+ set: function(key, value) {
3421
+ store[key] = value;
3422
+ }
3423
+ };
3424
+ }
3425
+ };
3426
+ }
3427
+ function createDefaultFormatters(cache) {
3428
+ if (cache === void 0) {
3429
+ cache = {
3430
+ number: {},
3431
+ dateTime: {},
3432
+ pluralRules: {}
3433
+ };
3434
+ }
3435
+ return {
3436
+ getNumberFormat: memoize(function() {
3437
+ var _a2;
3438
+ var args = [];
3439
+ for (var _i = 0; _i < arguments.length; _i++) {
3440
+ args[_i] = arguments[_i];
3441
+ }
3442
+ return new ((_a2 = Intl.NumberFormat).bind.apply(_a2, __spreadArray([void 0], args, false)))();
3443
+ }, {
3444
+ cache: createFastMemoizeCache(cache.number),
3445
+ strategy: strategies.variadic
3446
+ }),
3447
+ getDateTimeFormat: memoize(function() {
3448
+ var _a2;
3449
+ var args = [];
3450
+ for (var _i = 0; _i < arguments.length; _i++) {
3451
+ args[_i] = arguments[_i];
3452
+ }
3453
+ return new ((_a2 = Intl.DateTimeFormat).bind.apply(_a2, __spreadArray([void 0], args, false)))();
3454
+ }, {
3455
+ cache: createFastMemoizeCache(cache.dateTime),
3456
+ strategy: strategies.variadic
3457
+ }),
3458
+ getPluralRules: memoize(function() {
3459
+ var _a2;
3460
+ var args = [];
3461
+ for (var _i = 0; _i < arguments.length; _i++) {
3462
+ args[_i] = arguments[_i];
3463
+ }
3464
+ return new ((_a2 = Intl.PluralRules).bind.apply(_a2, __spreadArray([void 0], args, false)))();
3465
+ }, {
3466
+ cache: createFastMemoizeCache(cache.pluralRules),
3467
+ strategy: strategies.variadic
3468
+ })
3469
+ };
3470
+ }
3471
+ var IntlMessageFormat = function() {
3472
+ function IntlMessageFormat2(message, locales, overrideFormats, opts) {
3473
+ if (locales === void 0) {
3474
+ locales = IntlMessageFormat2.defaultLocale;
3475
+ }
3476
+ var _this = this;
3477
+ this.formatterCache = {
3478
+ number: {},
3479
+ dateTime: {},
3480
+ pluralRules: {}
3481
+ };
3482
+ this.format = function(values) {
3483
+ var parts = _this.formatToParts(values);
3484
+ if (parts.length === 1) {
3485
+ return parts[0].value;
3486
+ }
3487
+ var result = parts.reduce(function(all, part) {
3488
+ if (!all.length || part.type !== PART_TYPE.literal || typeof all[all.length - 1] !== "string") {
3489
+ all.push(part.value);
3490
+ } else {
3491
+ all[all.length - 1] += part.value;
3492
+ }
3493
+ return all;
3494
+ }, []);
3495
+ if (result.length <= 1) {
3496
+ return result[0] || "";
3497
+ }
3498
+ return result;
3499
+ };
3500
+ this.formatToParts = function(values) {
3501
+ return formatToParts2(_this.ast, _this.locales, _this.formatters, _this.formats, values, void 0, _this.message);
3502
+ };
3503
+ this.resolvedOptions = function() {
3504
+ var _a2;
3505
+ return {
3506
+ locale: ((_a2 = _this.resolvedLocale) === null || _a2 === void 0 ? void 0 : _a2.toString()) || Intl.NumberFormat.supportedLocalesOf(_this.locales)[0]
3507
+ };
3508
+ };
3509
+ this.getAst = function() {
3510
+ return _this.ast;
3511
+ };
3512
+ this.locales = locales;
3513
+ this.resolvedLocale = IntlMessageFormat2.resolveLocale(locales);
3514
+ if (typeof message === "string") {
3515
+ this.message = message;
3516
+ if (!IntlMessageFormat2.__parse) {
3517
+ throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
3518
+ }
3519
+ this.ast = IntlMessageFormat2.__parse(message, {
3520
+ ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag,
3521
+ locale: this.resolvedLocale
3522
+ });
3523
+ } else {
3524
+ this.ast = message;
3525
+ }
3526
+ if (!Array.isArray(this.ast)) {
3527
+ throw new TypeError("A message must be provided as a String or AST.");
3528
+ }
3529
+ this.formats = mergeConfigs(IntlMessageFormat2.formats, overrideFormats);
3530
+ this.formatters = opts && opts.formatters || createDefaultFormatters(this.formatterCache);
3531
+ }
3532
+ Object.defineProperty(IntlMessageFormat2, "defaultLocale", {
3533
+ get: function() {
3534
+ if (!IntlMessageFormat2.memoizedDefaultLocale) {
3535
+ IntlMessageFormat2.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale;
3536
+ }
3537
+ return IntlMessageFormat2.memoizedDefaultLocale;
3538
+ },
3539
+ enumerable: false,
3540
+ configurable: true
3541
+ });
3542
+ IntlMessageFormat2.memoizedDefaultLocale = null;
3543
+ IntlMessageFormat2.resolveLocale = function(locales) {
3544
+ if (typeof Intl.Locale === "undefined") {
3545
+ return;
3546
+ }
3547
+ var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);
3548
+ if (supportedLocales.length > 0) {
3549
+ return new Intl.Locale(supportedLocales[0]);
3550
+ }
3551
+ return new Intl.Locale(typeof locales === "string" ? locales : locales[0]);
3552
+ };
3553
+ IntlMessageFormat2.__parse = parse;
3554
+ IntlMessageFormat2.formats = {
3555
+ number: {
3556
+ integer: {
3557
+ maximumFractionDigits: 0
3558
+ },
3559
+ currency: {
3560
+ style: "currency"
3561
+ },
3562
+ percent: {
3563
+ style: "percent"
3564
+ }
3565
+ },
3566
+ date: {
3567
+ short: {
3568
+ month: "numeric",
3569
+ day: "numeric",
3570
+ year: "2-digit"
3571
+ },
3572
+ medium: {
3573
+ month: "short",
3574
+ day: "numeric",
3575
+ year: "numeric"
3576
+ },
3577
+ long: {
3578
+ month: "long",
3579
+ day: "numeric",
3580
+ year: "numeric"
3581
+ },
3582
+ full: {
3583
+ weekday: "long",
3584
+ month: "long",
3585
+ day: "numeric",
3586
+ year: "numeric"
3587
+ }
3588
+ },
3589
+ time: {
3590
+ short: {
3591
+ hour: "numeric",
3592
+ minute: "numeric"
3593
+ },
3594
+ medium: {
3595
+ hour: "numeric",
3596
+ minute: "numeric",
3597
+ second: "numeric"
3598
+ },
3599
+ long: {
3600
+ hour: "numeric",
3601
+ minute: "numeric",
3602
+ second: "numeric",
3603
+ timeZoneName: "short"
3604
+ },
3605
+ full: {
3606
+ hour: "numeric",
3607
+ minute: "numeric",
3608
+ second: "numeric",
3609
+ timeZoneName: "short"
3610
+ }
3611
+ }
3612
+ };
3613
+ return IntlMessageFormat2;
3614
+ }();
3615
+
3616
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/error.js
3617
+ var IntlErrorCode;
3618
+ (function(IntlErrorCode2) {
3619
+ IntlErrorCode2["FORMAT_ERROR"] = "FORMAT_ERROR";
3620
+ IntlErrorCode2["UNSUPPORTED_FORMATTER"] = "UNSUPPORTED_FORMATTER";
3621
+ IntlErrorCode2["INVALID_CONFIG"] = "INVALID_CONFIG";
3622
+ IntlErrorCode2["MISSING_DATA"] = "MISSING_DATA";
3623
+ IntlErrorCode2["MISSING_TRANSLATION"] = "MISSING_TRANSLATION";
3624
+ })(IntlErrorCode || (IntlErrorCode = {}));
3625
+ var IntlError = function(_super) {
3626
+ __extends(IntlError2, _super);
3627
+ function IntlError2(code, message, exception) {
3628
+ var _this = this;
3629
+ var err = exception ? exception instanceof Error ? exception : new Error(String(exception)) : void 0;
3630
+ _this = _super.call(this, "[@formatjs/intl Error ".concat(code, "] ").concat(message, "\n").concat(err ? "\n".concat(err.message, "\n").concat(err.stack) : "")) || this;
3631
+ _this.code = code;
3632
+ if (typeof Error.captureStackTrace === "function") {
3633
+ Error.captureStackTrace(_this, IntlError2);
3634
+ }
3635
+ return _this;
3636
+ }
3637
+ return IntlError2;
3638
+ }(Error);
3639
+ var UnsupportedFormatterError = function(_super) {
3640
+ __extends(UnsupportedFormatterError2, _super);
3641
+ function UnsupportedFormatterError2(message, exception) {
3642
+ return _super.call(this, IntlErrorCode.UNSUPPORTED_FORMATTER, message, exception) || this;
3643
+ }
3644
+ return UnsupportedFormatterError2;
3645
+ }(IntlError);
3646
+ var InvalidConfigError = function(_super) {
3647
+ __extends(InvalidConfigError2, _super);
3648
+ function InvalidConfigError2(message, exception) {
3649
+ return _super.call(this, IntlErrorCode.INVALID_CONFIG, message, exception) || this;
3650
+ }
3651
+ return InvalidConfigError2;
3652
+ }(IntlError);
3653
+ var MissingDataError = function(_super) {
3654
+ __extends(MissingDataError2, _super);
3655
+ function MissingDataError2(message, exception) {
3656
+ return _super.call(this, IntlErrorCode.MISSING_DATA, message, exception) || this;
3657
+ }
3658
+ return MissingDataError2;
3659
+ }(IntlError);
3660
+ var IntlFormatError = function(_super) {
3661
+ __extends(IntlFormatError2, _super);
3662
+ function IntlFormatError2(message, locale, exception) {
3663
+ return _super.call(this, IntlErrorCode.FORMAT_ERROR, "".concat(message, "\nLocale: ").concat(locale, "\n"), exception) || this;
3664
+ }
3665
+ return IntlFormatError2;
3666
+ }(IntlError);
3667
+ var MessageFormatError = function(_super) {
3668
+ __extends(MessageFormatError2, _super);
3669
+ function MessageFormatError2(message, locale, descriptor, exception) {
3670
+ var _this = _super.call(this, "".concat(message, "\nMessageID: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.id, "\nDefault Message: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.defaultMessage, "\nDescription: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.description, "\n"), locale, exception) || this;
3671
+ _this.descriptor = descriptor;
3672
+ return _this;
3673
+ }
3674
+ return MessageFormatError2;
3675
+ }(IntlFormatError);
3676
+ var MissingTranslationError = function(_super) {
3677
+ __extends(MissingTranslationError2, _super);
3678
+ function MissingTranslationError2(descriptor, locale) {
3679
+ var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, 'Missing message: "'.concat(descriptor.id, '" for locale "').concat(locale, '", using ').concat(descriptor.defaultMessage ? "default message (".concat(typeof descriptor.defaultMessage === "string" ? descriptor.defaultMessage : descriptor.defaultMessage.map(function(e) {
3680
+ var _a2;
3681
+ return (_a2 = e.value) !== null && _a2 !== void 0 ? _a2 : JSON.stringify(e);
3682
+ }).join(), ")") : "id", " as fallback.")) || this;
3683
+ _this.descriptor = descriptor;
3684
+ return _this;
3685
+ }
3686
+ return MissingTranslationError2;
3687
+ }(IntlError);
3688
+
3689
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/utils.js
3690
+ function filterProps(props, allowlist, defaults) {
3691
+ if (defaults === void 0) {
3692
+ defaults = {};
3693
+ }
3694
+ return allowlist.reduce(function(filtered, name) {
3695
+ if (name in props) {
3696
+ filtered[name] = props[name];
3697
+ } else if (name in defaults) {
3698
+ filtered[name] = defaults[name];
3699
+ }
3700
+ return filtered;
3701
+ }, {});
3702
+ }
3703
+ var defaultErrorHandler = function(error) {
3704
+ if (true) {
3705
+ console.error(error);
3706
+ }
3707
+ };
3708
+ var defaultWarnHandler = function(warning) {
3709
+ if (true) {
3710
+ console.warn(warning);
3711
+ }
3712
+ };
3713
+ var DEFAULT_INTL_CONFIG = {
3714
+ formats: {},
3715
+ messages: {},
3716
+ timeZone: void 0,
3717
+ defaultLocale: "en",
3718
+ defaultFormats: {},
3719
+ fallbackOnEmptyString: true,
3720
+ onError: defaultErrorHandler,
3721
+ onWarn: defaultWarnHandler
3722
+ };
3723
+ function createIntlCache() {
3724
+ return {
3725
+ dateTime: {},
3726
+ number: {},
3727
+ message: {},
3728
+ relativeTime: {},
3729
+ pluralRules: {},
3730
+ list: {},
3731
+ displayNames: {}
3732
+ };
3733
+ }
3734
+ function createFastMemoizeCache2(store) {
3735
+ return {
3736
+ create: function() {
3737
+ return {
3738
+ get: function(key) {
3739
+ return store[key];
3740
+ },
3741
+ set: function(key, value) {
3742
+ store[key] = value;
3743
+ }
3744
+ };
3745
+ }
3746
+ };
3747
+ }
3748
+ function createFormatters(cache) {
3749
+ if (cache === void 0) {
3750
+ cache = createIntlCache();
3751
+ }
3752
+ var RelativeTimeFormat = Intl.RelativeTimeFormat;
3753
+ var ListFormat = Intl.ListFormat;
3754
+ var DisplayNames = Intl.DisplayNames;
3755
+ var getDateTimeFormat = memoize(function() {
3756
+ var _a2;
3757
+ var args = [];
3758
+ for (var _i = 0; _i < arguments.length; _i++) {
3759
+ args[_i] = arguments[_i];
3760
+ }
3761
+ return new ((_a2 = Intl.DateTimeFormat).bind.apply(_a2, __spreadArray([void 0], args, false)))();
3762
+ }, {
3763
+ cache: createFastMemoizeCache2(cache.dateTime),
3764
+ strategy: strategies.variadic
3765
+ });
3766
+ var getNumberFormat = memoize(function() {
3767
+ var _a2;
3768
+ var args = [];
3769
+ for (var _i = 0; _i < arguments.length; _i++) {
3770
+ args[_i] = arguments[_i];
3771
+ }
3772
+ return new ((_a2 = Intl.NumberFormat).bind.apply(_a2, __spreadArray([void 0], args, false)))();
3773
+ }, {
3774
+ cache: createFastMemoizeCache2(cache.number),
3775
+ strategy: strategies.variadic
3776
+ });
3777
+ var getPluralRules = memoize(function() {
3778
+ var _a2;
3779
+ var args = [];
3780
+ for (var _i = 0; _i < arguments.length; _i++) {
3781
+ args[_i] = arguments[_i];
3782
+ }
3783
+ return new ((_a2 = Intl.PluralRules).bind.apply(_a2, __spreadArray([void 0], args, false)))();
3784
+ }, {
3785
+ cache: createFastMemoizeCache2(cache.pluralRules),
3786
+ strategy: strategies.variadic
3787
+ });
3788
+ return {
3789
+ getDateTimeFormat,
3790
+ getNumberFormat,
3791
+ getMessageFormat: memoize(function(message, locales, overrideFormats, opts) {
3792
+ return new IntlMessageFormat(message, locales, overrideFormats, __assign({ formatters: {
3793
+ getNumberFormat,
3794
+ getDateTimeFormat,
3795
+ getPluralRules
3796
+ } }, opts || {}));
3797
+ }, {
3798
+ cache: createFastMemoizeCache2(cache.message),
3799
+ strategy: strategies.variadic
3800
+ }),
3801
+ getRelativeTimeFormat: memoize(function() {
3802
+ var args = [];
3803
+ for (var _i = 0; _i < arguments.length; _i++) {
3804
+ args[_i] = arguments[_i];
3805
+ }
3806
+ return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args, false)))();
3807
+ }, {
3808
+ cache: createFastMemoizeCache2(cache.relativeTime),
3809
+ strategy: strategies.variadic
3810
+ }),
3811
+ getPluralRules,
3812
+ getListFormat: memoize(function() {
3813
+ var args = [];
3814
+ for (var _i = 0; _i < arguments.length; _i++) {
3815
+ args[_i] = arguments[_i];
3816
+ }
3817
+ return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args, false)))();
3818
+ }, {
3819
+ cache: createFastMemoizeCache2(cache.list),
3820
+ strategy: strategies.variadic
3821
+ }),
3822
+ getDisplayNames: memoize(function() {
3823
+ var args = [];
3824
+ for (var _i = 0; _i < arguments.length; _i++) {
3825
+ args[_i] = arguments[_i];
3826
+ }
3827
+ return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args, false)))();
3828
+ }, {
3829
+ cache: createFastMemoizeCache2(cache.displayNames),
3830
+ strategy: strategies.variadic
3831
+ })
3832
+ };
3833
+ }
3834
+ function getNamedFormat(formats, type, name, onError) {
3835
+ var formatType = formats && formats[type];
3836
+ var format;
3837
+ if (formatType) {
3838
+ format = formatType[name];
3839
+ }
3840
+ if (format) {
3841
+ return format;
3842
+ }
3843
+ onError(new UnsupportedFormatterError("No ".concat(type, " format named: ").concat(name)));
3844
+ }
3845
+
3846
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/message.js
3847
+ function setTimeZoneInOptions(opts, timeZone) {
3848
+ return Object.keys(opts).reduce(function(all, k) {
3849
+ all[k] = __assign({ timeZone }, opts[k]);
3850
+ return all;
3851
+ }, {});
3852
+ }
3853
+ function deepMergeOptions(opts1, opts2) {
3854
+ var keys = Object.keys(__assign(__assign({}, opts1), opts2));
3855
+ return keys.reduce(function(all, k) {
3856
+ all[k] = __assign(__assign({}, opts1[k] || {}), opts2[k] || {});
3857
+ return all;
3858
+ }, {});
3859
+ }
3860
+ function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
3861
+ if (!timeZone) {
3862
+ return f1;
3863
+ }
3864
+ var mfFormats = IntlMessageFormat.formats;
3865
+ return __assign(__assign(__assign({}, mfFormats), f1), { date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone)) });
3866
+ }
3867
+ var formatMessage = function(_a2, state, messageDescriptor, values, opts) {
3868
+ var locale = _a2.locale, formats = _a2.formats, messages = _a2.messages, defaultLocale = _a2.defaultLocale, defaultFormats = _a2.defaultFormats, fallbackOnEmptyString = _a2.fallbackOnEmptyString, onError = _a2.onError, timeZone = _a2.timeZone, defaultRichTextElements = _a2.defaultRichTextElements;
3869
+ if (messageDescriptor === void 0) {
3870
+ messageDescriptor = { id: "" };
3871
+ }
3872
+ var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
3873
+ invariant(!!msgId, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
3874
+ var id = String(msgId);
3875
+ var message = messages && Object.prototype.hasOwnProperty.call(messages, id) && messages[id];
3876
+ if (Array.isArray(message) && message.length === 1 && message[0].type === TYPE.literal) {
3877
+ return message[0].value;
3878
+ }
3879
+ if (!values && message && typeof message === "string" && !defaultRichTextElements) {
3880
+ return message.replace(/'\{(.*?)\}'/gi, "{$1}");
3881
+ }
3882
+ values = __assign(__assign({}, defaultRichTextElements), values || {});
3883
+ formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
3884
+ defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
3885
+ if (!message) {
3886
+ if (fallbackOnEmptyString === false && message === "") {
3887
+ return message;
3888
+ }
3889
+ if (!defaultMessage || locale && locale.toLowerCase() !== defaultLocale.toLowerCase()) {
3890
+ onError(new MissingTranslationError(messageDescriptor, locale));
3891
+ }
3892
+ if (defaultMessage) {
3893
+ try {
3894
+ var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);
3895
+ return formatter.format(values);
3896
+ } catch (e) {
3897
+ onError(new MessageFormatError('Error formatting default message for: "'.concat(id, '", rendering default message verbatim'), locale, messageDescriptor, e));
3898
+ return typeof defaultMessage === "string" ? defaultMessage : id;
3899
+ }
3900
+ }
3901
+ return id;
3902
+ }
3903
+ try {
3904
+ var formatter = state.getMessageFormat(message, locale, formats, __assign({ formatters: state }, opts || {}));
3905
+ return formatter.format(values);
3906
+ } catch (e) {
3907
+ onError(new MessageFormatError('Error formatting message: "'.concat(id, '", using ').concat(defaultMessage ? "default message" : "id", " as fallback."), locale, messageDescriptor, e));
3908
+ }
3909
+ if (defaultMessage) {
3910
+ try {
3911
+ var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);
3912
+ return formatter.format(values);
3913
+ } catch (e) {
3914
+ onError(new MessageFormatError('Error formatting the default message for: "'.concat(id, '", rendering message verbatim'), locale, messageDescriptor, e));
3915
+ }
3916
+ }
3917
+ if (typeof message === "string") {
3918
+ return message;
3919
+ }
3920
+ if (typeof defaultMessage === "string") {
3921
+ return defaultMessage;
3922
+ }
3923
+ return id;
3924
+ };
3925
+
3926
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/dateTime.js
3927
+ var DATE_TIME_FORMAT_OPTIONS = [
3928
+ "formatMatcher",
3929
+ "timeZone",
3930
+ "hour12",
3931
+ "weekday",
3932
+ "era",
3933
+ "year",
3934
+ "month",
3935
+ "day",
3936
+ "hour",
3937
+ "minute",
3938
+ "second",
3939
+ "timeZoneName",
3940
+ "hourCycle",
3941
+ "dateStyle",
3942
+ "timeStyle",
3943
+ "calendar",
3944
+ "numberingSystem",
3945
+ "fractionalSecondDigits"
3946
+ ];
3947
+ function getFormatter(_a2, type, getDateTimeFormat, options) {
3948
+ var locale = _a2.locale, formats = _a2.formats, onError = _a2.onError, timeZone = _a2.timeZone;
3949
+ if (options === void 0) {
3950
+ options = {};
3951
+ }
3952
+ var format = options.format;
3953
+ var defaults = __assign(__assign({}, timeZone && { timeZone }), format && getNamedFormat(formats, type, format, onError));
3954
+ var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
3955
+ if (type === "time" && !filteredOptions.hour && !filteredOptions.minute && !filteredOptions.second && !filteredOptions.timeStyle && !filteredOptions.dateStyle) {
3956
+ filteredOptions = __assign(__assign({}, filteredOptions), { hour: "numeric", minute: "numeric" });
3957
+ }
3958
+ return getDateTimeFormat(locale, filteredOptions);
3959
+ }
3960
+ function formatDate(config, getDateTimeFormat) {
3961
+ var _a2 = [];
3962
+ for (var _i = 2; _i < arguments.length; _i++) {
3963
+ _a2[_i - 2] = arguments[_i];
3964
+ }
3965
+ var value = _a2[0], _b = _a2[1], options = _b === void 0 ? {} : _b;
3966
+ var date = typeof value === "string" ? new Date(value || 0) : value;
3967
+ try {
3968
+ return getFormatter(config, "date", getDateTimeFormat, options).format(date);
3969
+ } catch (e) {
3970
+ config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting date.", e));
3971
+ }
3972
+ return String(date);
3973
+ }
3974
+ function formatTime(config, getDateTimeFormat) {
3975
+ var _a2 = [];
3976
+ for (var _i = 2; _i < arguments.length; _i++) {
3977
+ _a2[_i - 2] = arguments[_i];
3978
+ }
3979
+ var value = _a2[0], _b = _a2[1], options = _b === void 0 ? {} : _b;
3980
+ var date = typeof value === "string" ? new Date(value || 0) : value;
3981
+ try {
3982
+ return getFormatter(config, "time", getDateTimeFormat, options).format(date);
3983
+ } catch (e) {
3984
+ config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting time.", e));
3985
+ }
3986
+ return String(date);
3987
+ }
3988
+ function formatDateTimeRange(config, getDateTimeFormat) {
3989
+ var _a2 = [];
3990
+ for (var _i = 2; _i < arguments.length; _i++) {
3991
+ _a2[_i - 2] = arguments[_i];
3992
+ }
3993
+ var from = _a2[0], to = _a2[1], _b = _a2[2], options = _b === void 0 ? {} : _b;
3994
+ var timeZone = config.timeZone, locale = config.locale, onError = config.onError;
3995
+ var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, timeZone ? { timeZone } : {});
3996
+ try {
3997
+ return getDateTimeFormat(locale, filteredOptions).formatRange(from, to);
3998
+ } catch (e) {
3999
+ onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting date time range.", e));
4000
+ }
4001
+ return String(from);
4002
+ }
4003
+ function formatDateToParts(config, getDateTimeFormat) {
4004
+ var _a2 = [];
4005
+ for (var _i = 2; _i < arguments.length; _i++) {
4006
+ _a2[_i - 2] = arguments[_i];
4007
+ }
4008
+ var value = _a2[0], _b = _a2[1], options = _b === void 0 ? {} : _b;
4009
+ var date = typeof value === "string" ? new Date(value || 0) : value;
4010
+ try {
4011
+ return getFormatter(config, "date", getDateTimeFormat, options).formatToParts(date);
4012
+ } catch (e) {
4013
+ config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting date.", e));
4014
+ }
4015
+ return [];
4016
+ }
4017
+ function formatTimeToParts(config, getDateTimeFormat) {
4018
+ var _a2 = [];
4019
+ for (var _i = 2; _i < arguments.length; _i++) {
4020
+ _a2[_i - 2] = arguments[_i];
4021
+ }
4022
+ var value = _a2[0], _b = _a2[1], options = _b === void 0 ? {} : _b;
4023
+ var date = typeof value === "string" ? new Date(value || 0) : value;
4024
+ try {
4025
+ return getFormatter(config, "time", getDateTimeFormat, options).formatToParts(date);
4026
+ } catch (e) {
4027
+ config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting time.", e));
4028
+ }
4029
+ return [];
4030
+ }
4031
+
4032
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/displayName.js
4033
+ var DISPLAY_NAMES_OPTONS = [
4034
+ "style",
4035
+ "type",
4036
+ "fallback"
4037
+ ];
4038
+ function formatDisplayName(_a2, getDisplayNames, value, options) {
4039
+ var locale = _a2.locale, onError = _a2.onError;
4040
+ var DisplayNames = Intl.DisplayNames;
4041
+ if (!DisplayNames) {
4042
+ onError(new FormatError('Intl.DisplayNames is not available in this environment.\nTry polyfilling it using "@formatjs/intl-displaynames"\n', ErrorCode.MISSING_INTL_API));
4043
+ }
4044
+ var filteredOptions = filterProps(options, DISPLAY_NAMES_OPTONS);
4045
+ try {
4046
+ return getDisplayNames(locale, filteredOptions).of(value);
4047
+ } catch (e) {
4048
+ onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting display name.", e));
4049
+ }
4050
+ }
4051
+
4052
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/list.js
4053
+ var LIST_FORMAT_OPTIONS = [
4054
+ "type",
4055
+ "style"
4056
+ ];
4057
+ var now = Date.now();
4058
+ function generateToken(i) {
4059
+ return "".concat(now, "_").concat(i, "_").concat(now);
4060
+ }
4061
+ function formatList(opts, getListFormat, values, options) {
4062
+ if (options === void 0) {
4063
+ options = {};
4064
+ }
4065
+ var results = formatListToParts(opts, getListFormat, values, options).reduce(function(all, el) {
4066
+ var val = el.value;
4067
+ if (typeof val !== "string") {
4068
+ all.push(val);
4069
+ } else if (typeof all[all.length - 1] === "string") {
4070
+ all[all.length - 1] += val;
4071
+ } else {
4072
+ all.push(val);
4073
+ }
4074
+ return all;
4075
+ }, []);
4076
+ return results.length === 1 ? results[0] : results.length === 0 ? "" : results;
4077
+ }
4078
+ function formatListToParts(_a2, getListFormat, values, options) {
4079
+ var locale = _a2.locale, onError = _a2.onError;
4080
+ if (options === void 0) {
4081
+ options = {};
4082
+ }
4083
+ var ListFormat = Intl.ListFormat;
4084
+ if (!ListFormat) {
4085
+ onError(new FormatError('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n', ErrorCode.MISSING_INTL_API));
4086
+ }
4087
+ var filteredOptions = filterProps(options, LIST_FORMAT_OPTIONS);
4088
+ try {
4089
+ var richValues_1 = {};
4090
+ var serializedValues = values.map(function(v, i) {
4091
+ if (typeof v === "object") {
4092
+ var id = generateToken(i);
4093
+ richValues_1[id] = v;
4094
+ return id;
4095
+ }
4096
+ return String(v);
4097
+ });
4098
+ return getListFormat(locale, filteredOptions).formatToParts(serializedValues).map(function(part) {
4099
+ return part.type === "literal" ? part : __assign(__assign({}, part), { value: richValues_1[part.value] || part.value });
4100
+ });
4101
+ } catch (e) {
4102
+ onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting list.", e));
4103
+ }
4104
+ return values;
4105
+ }
4106
+
4107
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/plural.js
4108
+ var PLURAL_FORMAT_OPTIONS = ["type"];
4109
+ function formatPlural(_a2, getPluralRules, value, options) {
4110
+ var locale = _a2.locale, onError = _a2.onError;
4111
+ if (options === void 0) {
4112
+ options = {};
4113
+ }
4114
+ if (!Intl.PluralRules) {
4115
+ onError(new FormatError('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n', ErrorCode.MISSING_INTL_API));
4116
+ }
4117
+ var filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS);
4118
+ try {
4119
+ return getPluralRules(locale, filteredOptions).select(value);
4120
+ } catch (e) {
4121
+ onError(new IntlFormatError("Error formatting plural.", locale, e));
4122
+ }
4123
+ return "other";
4124
+ }
4125
+
4126
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/relativeTime.js
4127
+ var RELATIVE_TIME_FORMAT_OPTIONS = ["numeric", "style"];
4128
+ function getFormatter2(_a2, getRelativeTimeFormat, options) {
4129
+ var locale = _a2.locale, formats = _a2.formats, onError = _a2.onError;
4130
+ if (options === void 0) {
4131
+ options = {};
4132
+ }
4133
+ var format = options.format;
4134
+ var defaults = !!format && getNamedFormat(formats, "relative", format, onError) || {};
4135
+ var filteredOptions = filterProps(options, RELATIVE_TIME_FORMAT_OPTIONS, defaults);
4136
+ return getRelativeTimeFormat(locale, filteredOptions);
4137
+ }
4138
+ function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options) {
4139
+ if (options === void 0) {
4140
+ options = {};
4141
+ }
4142
+ if (!unit) {
4143
+ unit = "second";
4144
+ }
4145
+ var RelativeTimeFormat = Intl.RelativeTimeFormat;
4146
+ if (!RelativeTimeFormat) {
4147
+ config.onError(new FormatError('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n', ErrorCode.MISSING_INTL_API));
4148
+ }
4149
+ try {
4150
+ return getFormatter2(config, getRelativeTimeFormat, options).format(value, unit);
4151
+ } catch (e) {
4152
+ config.onError(new IntlFormatError("Error formatting relative time.", config.locale, e));
4153
+ }
4154
+ return String(value);
4155
+ }
4156
+
4157
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/number.js
4158
+ var NUMBER_FORMAT_OPTIONS = [
4159
+ "style",
4160
+ "currency",
4161
+ "currencyDisplay",
4162
+ "unit",
4163
+ "unitDisplay",
4164
+ "useGrouping",
4165
+ "minimumIntegerDigits",
4166
+ "minimumFractionDigits",
4167
+ "maximumFractionDigits",
4168
+ "minimumSignificantDigits",
4169
+ "maximumSignificantDigits",
4170
+ "compactDisplay",
4171
+ "currencyDisplay",
4172
+ "currencySign",
4173
+ "notation",
4174
+ "signDisplay",
4175
+ "unit",
4176
+ "unitDisplay",
4177
+ "numberingSystem"
4178
+ ];
4179
+ function getFormatter3(_a2, getNumberFormat, options) {
4180
+ var locale = _a2.locale, formats = _a2.formats, onError = _a2.onError;
4181
+ if (options === void 0) {
4182
+ options = {};
4183
+ }
4184
+ var format = options.format;
4185
+ var defaults = format && getNamedFormat(formats, "number", format, onError) || {};
4186
+ var filteredOptions = filterProps(options, NUMBER_FORMAT_OPTIONS, defaults);
4187
+ return getNumberFormat(locale, filteredOptions);
4188
+ }
4189
+ function formatNumber(config, getNumberFormat, value, options) {
4190
+ if (options === void 0) {
4191
+ options = {};
4192
+ }
4193
+ try {
4194
+ return getFormatter3(config, getNumberFormat, options).format(value);
4195
+ } catch (e) {
4196
+ config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting number.", e));
4197
+ }
4198
+ return String(value);
4199
+ }
4200
+ function formatNumberToParts(config, getNumberFormat, value, options) {
4201
+ if (options === void 0) {
4202
+ options = {};
4203
+ }
4204
+ try {
4205
+ return getFormatter3(config, getNumberFormat, options).formatToParts(value);
4206
+ } catch (e) {
4207
+ config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting number.", e));
4208
+ }
4209
+ return [];
4210
+ }
4211
+
4212
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/@formatjs+intl@0.0.0/node_modules/@formatjs/intl/lib/src/create-intl.js
4213
+ function messagesContainString(messages) {
4214
+ var firstMessage = messages ? messages[Object.keys(messages)[0]] : void 0;
4215
+ return typeof firstMessage === "string";
4216
+ }
4217
+ function verifyConfigMessages(config) {
4218
+ if (config.onWarn && config.defaultRichTextElements && messagesContainString(config.messages || {})) {
4219
+ config.onWarn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution');
4220
+ }
4221
+ }
4222
+ function createIntl(config, cache) {
4223
+ var formatters = createFormatters(cache);
4224
+ var resolvedConfig = __assign(__assign({}, DEFAULT_INTL_CONFIG), config);
4225
+ var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;
4226
+ if (!locale) {
4227
+ if (onError) {
4228
+ onError(new InvalidConfigError('"locale" was not configured, using "'.concat(defaultLocale, '" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details')));
4229
+ }
4230
+ resolvedConfig.locale = resolvedConfig.defaultLocale || "en";
4231
+ } else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
4232
+ onError(new MissingDataError('Missing locale data for locale: "'.concat(locale, '" in Intl.NumberFormat. Using default locale: "').concat(defaultLocale, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')));
4233
+ } else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length && onError) {
4234
+ onError(new MissingDataError('Missing locale data for locale: "'.concat(locale, '" in Intl.DateTimeFormat. Using default locale: "').concat(defaultLocale, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')));
4235
+ }
4236
+ verifyConfigMessages(resolvedConfig);
4237
+ return __assign(__assign({}, resolvedConfig), {
4238
+ formatters,
4239
+ formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat),
4240
+ formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat),
4241
+ formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat),
4242
+ formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat),
4243
+ formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat),
4244
+ formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat),
4245
+ formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat),
4246
+ formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat),
4247
+ formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules),
4248
+ formatMessage: formatMessage.bind(null, resolvedConfig, formatters),
4249
+ $t: formatMessage.bind(null, resolvedConfig, formatters),
4250
+ formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat),
4251
+ formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat),
4252
+ formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames)
4253
+ });
4254
+ }
4255
+
4256
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/utils.js
4257
+ function invariantIntlContext(intl) {
4258
+ invariant(intl, "[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.");
4259
+ }
4260
+ var DEFAULT_INTL_CONFIG2 = __assign(__assign({}, DEFAULT_INTL_CONFIG), { textComponent: React.Fragment });
4261
+ function assignUniqueKeysToParts(formatXMLElementFn) {
4262
+ return function(parts) {
4263
+ return formatXMLElementFn(React.Children.toArray(parts));
4264
+ };
4265
+ }
4266
+ function shallowEqual(objA, objB) {
4267
+ if (objA === objB) {
4268
+ return true;
4269
+ }
4270
+ if (!objA || !objB) {
4271
+ return false;
4272
+ }
4273
+ var aKeys = Object.keys(objA);
4274
+ var bKeys = Object.keys(objB);
4275
+ var len = aKeys.length;
4276
+ if (bKeys.length !== len) {
4277
+ return false;
4278
+ }
4279
+ for (var i = 0; i < len; i++) {
4280
+ var key = aKeys[i];
4281
+ if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
4282
+ return false;
4283
+ }
4284
+ }
4285
+ return true;
4286
+ }
4287
+
4288
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/injectIntl.js
4289
+ function getDisplayName(Component) {
4290
+ return Component.displayName || Component.name || "Component";
4291
+ }
4292
+ var IntlContext = React2.createContext(null);
4293
+ var IntlConsumer = IntlContext.Consumer;
4294
+ var IntlProvider = IntlContext.Provider;
4295
+ var Provider = IntlProvider;
4296
+ var Context = IntlContext;
4297
+ function injectIntl(WrappedComponent, options) {
4298
+ var _a2 = options || {}, _b = _a2.intlPropName, intlPropName = _b === void 0 ? "intl" : _b, _c = _a2.forwardRef, forwardRef2 = _c === void 0 ? false : _c, _d = _a2.enforceContext, enforceContext = _d === void 0 ? true : _d;
4299
+ var WithIntl = function(props) {
4300
+ return React2.createElement(IntlConsumer, null, function(intl) {
4301
+ var _a3;
4302
+ if (enforceContext) {
4303
+ invariantIntlContext(intl);
4304
+ }
4305
+ var intlProp = (_a3 = {}, _a3[intlPropName] = intl, _a3);
4306
+ return React2.createElement(WrappedComponent, __assign({}, props, intlProp, { ref: forwardRef2 ? props.forwardedRef : null }));
4307
+ });
4308
+ };
4309
+ WithIntl.displayName = "injectIntl(".concat(getDisplayName(WrappedComponent), ")");
4310
+ WithIntl.WrappedComponent = WrappedComponent;
4311
+ if (forwardRef2) {
4312
+ return (0, import_hoist_non_react_statics.default)(React2.forwardRef(function(props, ref) {
4313
+ return React2.createElement(WithIntl, __assign({}, props, { forwardedRef: ref }));
4314
+ }), WrappedComponent);
4315
+ }
4316
+ return (0, import_hoist_non_react_statics.default)(WithIntl, WrappedComponent);
4317
+ }
4318
+
4319
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/useIntl.js
4320
+ function useIntl() {
4321
+ var intl = React3.useContext(Context);
4322
+ invariantIntlContext(intl);
4323
+ return intl;
4324
+ }
4325
+
4326
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/createFormattedComponent.js
4327
+ var DisplayName;
4328
+ (function(DisplayName2) {
4329
+ DisplayName2["formatDate"] = "FormattedDate";
4330
+ DisplayName2["formatTime"] = "FormattedTime";
4331
+ DisplayName2["formatNumber"] = "FormattedNumber";
4332
+ DisplayName2["formatList"] = "FormattedList";
4333
+ DisplayName2["formatDisplayName"] = "FormattedDisplayName";
4334
+ })(DisplayName || (DisplayName = {}));
4335
+ var DisplayNameParts;
4336
+ (function(DisplayNameParts2) {
4337
+ DisplayNameParts2["formatDate"] = "FormattedDateParts";
4338
+ DisplayNameParts2["formatTime"] = "FormattedTimeParts";
4339
+ DisplayNameParts2["formatNumber"] = "FormattedNumberParts";
4340
+ DisplayNameParts2["formatList"] = "FormattedListParts";
4341
+ })(DisplayNameParts || (DisplayNameParts = {}));
4342
+ var FormattedNumberParts = function(props) {
4343
+ var intl = useIntl();
4344
+ var value = props.value, children = props.children, formatProps = __rest(props, ["value", "children"]);
4345
+ return children(intl.formatNumberToParts(value, formatProps));
4346
+ };
4347
+ FormattedNumberParts.displayName = "FormattedNumberParts";
4348
+ var FormattedListParts = function(props) {
4349
+ var intl = useIntl();
4350
+ var value = props.value, children = props.children, formatProps = __rest(props, ["value", "children"]);
4351
+ return children(intl.formatListToParts(value, formatProps));
4352
+ };
4353
+ FormattedNumberParts.displayName = "FormattedNumberParts";
4354
+ function createFormattedDateTimePartsComponent(name) {
4355
+ var ComponentParts = function(props) {
4356
+ var intl = useIntl();
4357
+ var value = props.value, children = props.children, formatProps = __rest(props, ["value", "children"]);
4358
+ var date = typeof value === "string" ? new Date(value || 0) : value;
4359
+ var formattedParts = name === "formatDate" ? intl.formatDateToParts(date, formatProps) : intl.formatTimeToParts(date, formatProps);
4360
+ return children(formattedParts);
4361
+ };
4362
+ ComponentParts.displayName = DisplayNameParts[name];
4363
+ return ComponentParts;
4364
+ }
4365
+ function createFormattedComponent(name) {
4366
+ var Component = function(props) {
4367
+ var intl = useIntl();
4368
+ var value = props.value, children = props.children, formatProps = __rest(
4369
+ props,
4370
+ ["value", "children"]
4371
+ );
4372
+ var formattedValue = intl[name](value, formatProps);
4373
+ if (typeof children === "function") {
4374
+ return children(formattedValue);
4375
+ }
4376
+ var Text = intl.textComponent || React4.Fragment;
4377
+ return React4.createElement(Text, null, formattedValue);
4378
+ };
4379
+ Component.displayName = DisplayName[name];
4380
+ return Component;
4381
+ }
4382
+
4383
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/provider.js
4384
+ var React5 = __toESM(window.React);
4385
+ function processIntlConfig(config) {
4386
+ return {
4387
+ locale: config.locale,
4388
+ timeZone: config.timeZone,
4389
+ fallbackOnEmptyString: config.fallbackOnEmptyString,
4390
+ formats: config.formats,
4391
+ textComponent: config.textComponent,
4392
+ messages: config.messages,
4393
+ defaultLocale: config.defaultLocale,
4394
+ defaultFormats: config.defaultFormats,
4395
+ onError: config.onError,
4396
+ onWarn: config.onWarn,
4397
+ wrapRichTextChunksInFragment: config.wrapRichTextChunksInFragment,
4398
+ defaultRichTextElements: config.defaultRichTextElements
4399
+ };
4400
+ }
4401
+ function assignUniqueKeysToFormatXMLElementFnArgument(values) {
4402
+ if (!values) {
4403
+ return values;
4404
+ }
4405
+ return Object.keys(values).reduce(function(acc, k) {
4406
+ var v = values[k];
4407
+ acc[k] = isFormatXMLElementFn(v) ? assignUniqueKeysToParts(v) : v;
4408
+ return acc;
4409
+ }, {});
4410
+ }
4411
+ var formatMessage2 = function(config, formatters, descriptor, rawValues) {
4412
+ var rest = [];
4413
+ for (var _i = 4; _i < arguments.length; _i++) {
4414
+ rest[_i - 4] = arguments[_i];
4415
+ }
4416
+ var values = assignUniqueKeysToFormatXMLElementFnArgument(rawValues);
4417
+ var chunks = formatMessage.apply(void 0, __spreadArray([
4418
+ config,
4419
+ formatters,
4420
+ descriptor,
4421
+ values
4422
+ ], rest, false));
4423
+ if (Array.isArray(chunks)) {
4424
+ return React5.Children.toArray(chunks);
4425
+ }
4426
+ return chunks;
4427
+ };
4428
+ var createIntl2 = function(_a2, cache) {
4429
+ var rawDefaultRichTextElements = _a2.defaultRichTextElements, config = __rest(_a2, ["defaultRichTextElements"]);
4430
+ var defaultRichTextElements = assignUniqueKeysToFormatXMLElementFnArgument(rawDefaultRichTextElements);
4431
+ var coreIntl = createIntl(__assign(__assign(__assign({}, DEFAULT_INTL_CONFIG2), config), { defaultRichTextElements }), cache);
4432
+ var resolvedConfig = {
4433
+ locale: coreIntl.locale,
4434
+ timeZone: coreIntl.timeZone,
4435
+ fallbackOnEmptyString: coreIntl.fallbackOnEmptyString,
4436
+ formats: coreIntl.formats,
4437
+ defaultLocale: coreIntl.defaultLocale,
4438
+ defaultFormats: coreIntl.defaultFormats,
4439
+ messages: coreIntl.messages,
4440
+ onError: coreIntl.onError,
4441
+ defaultRichTextElements
4442
+ };
4443
+ return __assign(__assign({}, coreIntl), {
4444
+ formatMessage: formatMessage2.bind(null, resolvedConfig, coreIntl.formatters),
4445
+ $t: formatMessage2.bind(null, resolvedConfig, coreIntl.formatters)
4446
+ });
4447
+ };
4448
+ var IntlProvider2 = function(_super) {
4449
+ __extends(IntlProvider3, _super);
4450
+ function IntlProvider3() {
4451
+ var _this = _super !== null && _super.apply(this, arguments) || this;
4452
+ _this.cache = createIntlCache();
4453
+ _this.state = {
4454
+ cache: _this.cache,
4455
+ intl: createIntl2(processIntlConfig(_this.props), _this.cache),
4456
+ prevConfig: processIntlConfig(_this.props)
4457
+ };
4458
+ return _this;
4459
+ }
4460
+ IntlProvider3.getDerivedStateFromProps = function(props, _a2) {
4461
+ var prevConfig = _a2.prevConfig, cache = _a2.cache;
4462
+ var config = processIntlConfig(props);
4463
+ if (!shallowEqual(prevConfig, config)) {
4464
+ return {
4465
+ intl: createIntl2(config, cache),
4466
+ prevConfig: config
4467
+ };
4468
+ }
4469
+ return null;
4470
+ };
4471
+ IntlProvider3.prototype.render = function() {
4472
+ invariantIntlContext(this.state.intl);
4473
+ return React5.createElement(Provider, { value: this.state.intl }, this.props.children);
4474
+ };
4475
+ IntlProvider3.displayName = "IntlProvider";
4476
+ IntlProvider3.defaultProps = DEFAULT_INTL_CONFIG2;
4477
+ return IntlProvider3;
4478
+ }(React5.PureComponent);
4479
+ var provider_default = IntlProvider2;
4480
+
4481
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/relative.js
4482
+ var React6 = __toESM(window.React);
4483
+ var MINUTE = 60;
4484
+ var HOUR = 60 * 60;
4485
+ var DAY = 60 * 60 * 24;
4486
+ function selectUnit(seconds) {
4487
+ var absValue = Math.abs(seconds);
4488
+ if (absValue < MINUTE) {
4489
+ return "second";
4490
+ }
4491
+ if (absValue < HOUR) {
4492
+ return "minute";
4493
+ }
4494
+ if (absValue < DAY) {
4495
+ return "hour";
4496
+ }
4497
+ return "day";
4498
+ }
4499
+ function getDurationInSeconds(unit) {
4500
+ switch (unit) {
4501
+ case "second":
4502
+ return 1;
4503
+ case "minute":
4504
+ return MINUTE;
4505
+ case "hour":
4506
+ return HOUR;
4507
+ default:
4508
+ return DAY;
4509
+ }
4510
+ }
4511
+ function valueToSeconds(value, unit) {
4512
+ if (!value) {
4513
+ return 0;
4514
+ }
4515
+ switch (unit) {
4516
+ case "second":
4517
+ return value;
4518
+ case "minute":
4519
+ return value * MINUTE;
4520
+ default:
4521
+ return value * HOUR;
4522
+ }
4523
+ }
4524
+ var INCREMENTABLE_UNITS = [
4525
+ "second",
4526
+ "minute",
4527
+ "hour"
4528
+ ];
4529
+ function canIncrement(unit) {
4530
+ if (unit === void 0) {
4531
+ unit = "second";
4532
+ }
4533
+ return INCREMENTABLE_UNITS.indexOf(unit) > -1;
4534
+ }
4535
+ var SimpleFormattedRelativeTime = function(props) {
4536
+ var _a2 = useIntl(), formatRelativeTime2 = _a2.formatRelativeTime, Text = _a2.textComponent;
4537
+ var children = props.children, value = props.value, unit = props.unit, otherProps = __rest(props, ["children", "value", "unit"]);
4538
+ var formattedRelativeTime = formatRelativeTime2(value || 0, unit, otherProps);
4539
+ if (typeof children === "function") {
4540
+ return children(formattedRelativeTime);
4541
+ }
4542
+ if (Text) {
4543
+ return React6.createElement(Text, null, formattedRelativeTime);
4544
+ }
4545
+ return React6.createElement(React6.Fragment, null, formattedRelativeTime);
4546
+ };
4547
+ var FormattedRelativeTime = function(_a2) {
4548
+ var value = _a2.value, unit = _a2.unit, updateIntervalInSeconds = _a2.updateIntervalInSeconds, otherProps = __rest(_a2, ["value", "unit", "updateIntervalInSeconds"]);
4549
+ invariant(!updateIntervalInSeconds || !!(updateIntervalInSeconds && canIncrement(unit)), "Cannot schedule update with unit longer than hour");
4550
+ var _b = React6.useState(), prevUnit = _b[0], setPrevUnit = _b[1];
4551
+ var _c = React6.useState(0), prevValue = _c[0], setPrevValue = _c[1];
4552
+ var _d = React6.useState(0), currentValueInSeconds = _d[0], setCurrentValueInSeconds = _d[1];
4553
+ var updateTimer;
4554
+ if (unit !== prevUnit || value !== prevValue) {
4555
+ setPrevValue(value || 0);
4556
+ setPrevUnit(unit);
4557
+ setCurrentValueInSeconds(canIncrement(unit) ? valueToSeconds(value, unit) : 0);
4558
+ }
4559
+ React6.useEffect(function() {
4560
+ function clearUpdateTimer() {
4561
+ clearTimeout(updateTimer);
4562
+ }
4563
+ clearUpdateTimer();
4564
+ if (!updateIntervalInSeconds || !canIncrement(unit)) {
4565
+ return clearUpdateTimer;
4566
+ }
4567
+ var nextValueInSeconds = currentValueInSeconds - updateIntervalInSeconds;
4568
+ var nextUnit = selectUnit(nextValueInSeconds);
4569
+ if (nextUnit === "day") {
4570
+ return clearUpdateTimer;
4571
+ }
4572
+ var unitDuration2 = getDurationInSeconds(nextUnit);
4573
+ var remainder = nextValueInSeconds % unitDuration2;
4574
+ var prevInterestingValueInSeconds = nextValueInSeconds - remainder;
4575
+ var nextInterestingValueInSeconds = prevInterestingValueInSeconds >= currentValueInSeconds ? prevInterestingValueInSeconds - unitDuration2 : prevInterestingValueInSeconds;
4576
+ var delayInSeconds = Math.abs(nextInterestingValueInSeconds - currentValueInSeconds);
4577
+ if (currentValueInSeconds !== nextInterestingValueInSeconds) {
4578
+ updateTimer = setTimeout(function() {
4579
+ return setCurrentValueInSeconds(nextInterestingValueInSeconds);
4580
+ }, delayInSeconds * 1e3);
4581
+ }
4582
+ return clearUpdateTimer;
4583
+ }, [currentValueInSeconds, updateIntervalInSeconds, unit]);
4584
+ var currentValue = value || 0;
4585
+ var currentUnit = unit;
4586
+ if (canIncrement(unit) && typeof currentValueInSeconds === "number" && updateIntervalInSeconds) {
4587
+ currentUnit = selectUnit(currentValueInSeconds);
4588
+ var unitDuration = getDurationInSeconds(currentUnit);
4589
+ currentValue = Math.round(currentValueInSeconds / unitDuration);
4590
+ }
4591
+ return React6.createElement(SimpleFormattedRelativeTime, __assign({ value: currentValue, unit: currentUnit }, otherProps));
4592
+ };
4593
+ FormattedRelativeTime.displayName = "FormattedRelativeTime";
4594
+ FormattedRelativeTime.defaultProps = {
4595
+ value: 0,
4596
+ unit: "second"
4597
+ };
4598
+ var relative_default = FormattedRelativeTime;
4599
+
4600
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/plural.js
4601
+ var React7 = __toESM(window.React);
4602
+ var FormattedPlural = function(props) {
4603
+ var _a2 = useIntl(), formatPlural2 = _a2.formatPlural, Text = _a2.textComponent;
4604
+ var value = props.value, other = props.other, children = props.children;
4605
+ var pluralCategory = formatPlural2(value, props);
4606
+ var formattedPlural = props[pluralCategory] || other;
4607
+ if (typeof children === "function") {
4608
+ return children(formattedPlural);
4609
+ }
4610
+ if (Text) {
4611
+ return React7.createElement(Text, null, formattedPlural);
4612
+ }
4613
+ return formattedPlural;
4614
+ };
4615
+ FormattedPlural.defaultProps = {
4616
+ type: "cardinal"
4617
+ };
4618
+ FormattedPlural.displayName = "FormattedPlural";
4619
+ var plural_default = FormattedPlural;
4620
+
4621
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/message.js
4622
+ var React8 = __toESM(window.React);
4623
+ function areEqual(prevProps, nextProps) {
4624
+ var values = prevProps.values, otherProps = __rest(prevProps, ["values"]);
4625
+ var nextValues = nextProps.values, nextOtherProps = __rest(nextProps, ["values"]);
4626
+ return shallowEqual(nextValues, values) && shallowEqual(otherProps, nextOtherProps);
4627
+ }
4628
+ function FormattedMessage(props) {
4629
+ var intl = useIntl();
4630
+ var formatMessage3 = intl.formatMessage, _a2 = intl.textComponent, Text = _a2 === void 0 ? React8.Fragment : _a2;
4631
+ var id = props.id, description = props.description, defaultMessage = props.defaultMessage, values = props.values, children = props.children, _b = props.tagName, Component = _b === void 0 ? Text : _b, ignoreTag = props.ignoreTag;
4632
+ var descriptor = { id, description, defaultMessage };
4633
+ var nodes = formatMessage3(descriptor, values, {
4634
+ ignoreTag
4635
+ });
4636
+ if (typeof children === "function") {
4637
+ return children(Array.isArray(nodes) ? nodes : [nodes]);
4638
+ }
4639
+ if (Component) {
4640
+ return React8.createElement(Component, null, React8.Children.toArray(nodes));
4641
+ }
4642
+ return React8.createElement(React8.Fragment, null, nodes);
4643
+ }
4644
+ FormattedMessage.displayName = "FormattedMessage";
4645
+ var MemoizedFormattedMessage = React8.memo(FormattedMessage, areEqual);
4646
+ MemoizedFormattedMessage.displayName = "MemoizedFormattedMessage";
4647
+ var message_default = MemoizedFormattedMessage;
4648
+
4649
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/dateTimeRange.js
4650
+ var React9 = __toESM(window.React);
4651
+ var FormattedDateTimeRange = function(props) {
4652
+ var intl = useIntl();
4653
+ var from = props.from, to = props.to, children = props.children, formatProps = __rest(props, ["from", "to", "children"]);
4654
+ var formattedValue = intl.formatDateTimeRange(from, to, formatProps);
4655
+ if (typeof children === "function") {
4656
+ return children(formattedValue);
4657
+ }
4658
+ var Text = intl.textComponent || React9.Fragment;
4659
+ return React9.createElement(Text, null, formattedValue);
4660
+ };
4661
+ FormattedDateTimeRange.displayName = "FormattedDateTimeRange";
4662
+ var dateTimeRange_default = FormattedDateTimeRange;
4663
+
4664
+ // ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/index.js
4665
+ function defineMessages(msgs) {
4666
+ return msgs;
4667
+ }
4668
+ function defineMessage(msg) {
4669
+ return msg;
4670
+ }
4671
+ var FormattedDate = createFormattedComponent("formatDate");
4672
+ var FormattedTime = createFormattedComponent("formatTime");
4673
+ var FormattedNumber = createFormattedComponent("formatNumber");
4674
+ var FormattedList = createFormattedComponent("formatList");
4675
+ var FormattedDisplayName = createFormattedComponent("formatDisplayName");
4676
+ var FormattedDateParts = createFormattedDateTimePartsComponent("formatDate");
4677
+ var FormattedTimeParts = createFormattedDateTimePartsComponent("formatTime");
4678
+ return __toCommonJS(lib_exports);
4679
+ })();
4680
+ /** @license React v16.13.1
4681
+ * react-is.development.js
4682
+ *
4683
+ * Copyright (c) Facebook, Inc. and its affiliates.
4684
+ *
4685
+ * This source code is licensed under the MIT license found in the
4686
+ * LICENSE file in the root directory of this source tree.
4687
+ */
4688
+ //# sourceMappingURL=react-intl.esbuild.iife.js.map