@ory/elements-react 0.0.0 → 1.0.0-next.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.
- package/.eslintrc.js +12 -0
- package/dist/index.d.mts +16 -12
- package/dist/index.d.ts +16 -12
- package/dist/index.js +258 -174
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +258 -174
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +7 -0
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +16 -12
- package/dist/theme/default/index.d.ts +16 -12
- package/dist/theme/default/index.js +3013 -351
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +2989 -327
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +1 -1
- package/test-results/.last-run.json +4 -0
|
@@ -31,9 +31,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
));
|
|
32
32
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
33
|
|
|
34
|
-
// ../../node_modules/react-is/cjs/react-is.production.min.js
|
|
34
|
+
// ../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js
|
|
35
35
|
var require_react_is_production_min = __commonJS({
|
|
36
|
-
"../../node_modules/react-is/cjs/react-is.production.min.js"(exports2) {
|
|
36
|
+
"../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js"(exports2) {
|
|
37
37
|
"use strict";
|
|
38
38
|
var b = "function" === typeof Symbol && Symbol.for;
|
|
39
39
|
var c = b ? Symbol.for("react.element") : 60103;
|
|
@@ -144,9 +144,9 @@ var require_react_is_production_min = __commonJS({
|
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
|
|
147
|
-
// ../../node_modules/react-is/cjs/react-is.development.js
|
|
147
|
+
// ../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js
|
|
148
148
|
var require_react_is_development = __commonJS({
|
|
149
|
-
"../../node_modules/react-is/cjs/react-is.development.js"(exports2) {
|
|
149
|
+
"../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js"(exports2) {
|
|
150
150
|
"use strict";
|
|
151
151
|
if (process.env.NODE_ENV !== "production") {
|
|
152
152
|
(function() {
|
|
@@ -299,9 +299,9 @@ var require_react_is_development = __commonJS({
|
|
|
299
299
|
}
|
|
300
300
|
});
|
|
301
301
|
|
|
302
|
-
// ../../node_modules/react-is/index.js
|
|
302
|
+
// ../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js
|
|
303
303
|
var require_react_is = __commonJS({
|
|
304
|
-
"../../node_modules/react-is/index.js"(exports2, module2) {
|
|
304
|
+
"../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js"(exports2, module2) {
|
|
305
305
|
"use strict";
|
|
306
306
|
if (process.env.NODE_ENV === "production") {
|
|
307
307
|
module2.exports = require_react_is_production_min();
|
|
@@ -455,7 +455,7 @@ function DefaultCardContent({ children }) {
|
|
|
455
455
|
}
|
|
456
456
|
|
|
457
457
|
// src/theme/default/components/card/footer.tsx
|
|
458
|
-
var
|
|
458
|
+
var import_client_fetch = require("@ory/client-fetch");
|
|
459
459
|
|
|
460
460
|
// ../../node_modules/tslib/tslib.es6.mjs
|
|
461
461
|
var extendStatics = function(d, b) {
|
|
@@ -519,7 +519,7 @@ var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs
|
|
|
519
519
|
// ../../node_modules/react-intl/lib/src/utils.js
|
|
520
520
|
var React3 = __toESM(require("react"));
|
|
521
521
|
|
|
522
|
-
// ../../node_modules/@formatjs/ecma402-abstract/lib/utils.js
|
|
522
|
+
// ../../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/utils.js
|
|
523
523
|
function invariant(condition, message, Err) {
|
|
524
524
|
if (Err === void 0) {
|
|
525
525
|
Err = Error;
|
|
@@ -529,54 +529,54 @@ function invariant(condition, message, Err) {
|
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/error.js
|
|
532
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/error.js
|
|
533
533
|
var ErrorKind;
|
|
534
|
-
(function(
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
534
|
+
(function(ErrorKind3) {
|
|
535
|
+
ErrorKind3[ErrorKind3["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
|
|
536
|
+
ErrorKind3[ErrorKind3["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
|
|
537
|
+
ErrorKind3[ErrorKind3["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
|
|
538
|
+
ErrorKind3[ErrorKind3["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
|
|
539
|
+
ErrorKind3[ErrorKind3["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
|
|
540
|
+
ErrorKind3[ErrorKind3["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
|
|
541
|
+
ErrorKind3[ErrorKind3["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
|
|
542
|
+
ErrorKind3[ErrorKind3["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
|
|
543
|
+
ErrorKind3[ErrorKind3["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
|
|
544
|
+
ErrorKind3[ErrorKind3["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
|
|
545
|
+
ErrorKind3[ErrorKind3["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
|
|
546
|
+
ErrorKind3[ErrorKind3["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
|
|
547
|
+
ErrorKind3[ErrorKind3["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
548
|
+
ErrorKind3[ErrorKind3["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
549
|
+
ErrorKind3[ErrorKind3["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
|
|
550
|
+
ErrorKind3[ErrorKind3["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
|
|
551
|
+
ErrorKind3[ErrorKind3["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
|
|
552
|
+
ErrorKind3[ErrorKind3["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
|
|
553
|
+
ErrorKind3[ErrorKind3["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
|
|
554
|
+
ErrorKind3[ErrorKind3["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
|
|
555
|
+
ErrorKind3[ErrorKind3["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
|
|
556
|
+
ErrorKind3[ErrorKind3["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
|
|
557
|
+
ErrorKind3[ErrorKind3["INVALID_TAG"] = 23] = "INVALID_TAG";
|
|
558
|
+
ErrorKind3[ErrorKind3["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
|
|
559
|
+
ErrorKind3[ErrorKind3["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
|
|
560
|
+
ErrorKind3[ErrorKind3["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
|
|
561
561
|
})(ErrorKind || (ErrorKind = {}));
|
|
562
562
|
|
|
563
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/types.js
|
|
563
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/types.js
|
|
564
564
|
var TYPE;
|
|
565
|
-
(function(
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
565
|
+
(function(TYPE3) {
|
|
566
|
+
TYPE3[TYPE3["literal"] = 0] = "literal";
|
|
567
|
+
TYPE3[TYPE3["argument"] = 1] = "argument";
|
|
568
|
+
TYPE3[TYPE3["number"] = 2] = "number";
|
|
569
|
+
TYPE3[TYPE3["date"] = 3] = "date";
|
|
570
|
+
TYPE3[TYPE3["time"] = 4] = "time";
|
|
571
|
+
TYPE3[TYPE3["select"] = 5] = "select";
|
|
572
|
+
TYPE3[TYPE3["plural"] = 6] = "plural";
|
|
573
|
+
TYPE3[TYPE3["pound"] = 7] = "pound";
|
|
574
|
+
TYPE3[TYPE3["tag"] = 8] = "tag";
|
|
575
575
|
})(TYPE || (TYPE = {}));
|
|
576
576
|
var SKELETON_TYPE;
|
|
577
|
-
(function(
|
|
578
|
-
|
|
579
|
-
|
|
577
|
+
(function(SKELETON_TYPE3) {
|
|
578
|
+
SKELETON_TYPE3[SKELETON_TYPE3["number"] = 0] = "number";
|
|
579
|
+
SKELETON_TYPE3[SKELETON_TYPE3["dateTime"] = 1] = "dateTime";
|
|
580
580
|
})(SKELETON_TYPE || (SKELETON_TYPE = {}));
|
|
581
581
|
function isLiteralElement(el) {
|
|
582
582
|
return el.type === TYPE.literal;
|
|
@@ -612,10 +612,10 @@ function isDateTimeSkeleton(el) {
|
|
|
612
612
|
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime);
|
|
613
613
|
}
|
|
614
614
|
|
|
615
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js
|
|
615
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js
|
|
616
616
|
var SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
617
617
|
|
|
618
|
-
// ../../node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js
|
|
618
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js
|
|
619
619
|
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;
|
|
620
620
|
function parseDateTimeSkeleton(skeleton) {
|
|
621
621
|
var result = {};
|
|
@@ -716,10 +716,10 @@ function parseDateTimeSkeleton(skeleton) {
|
|
|
716
716
|
return result;
|
|
717
717
|
}
|
|
718
718
|
|
|
719
|
-
// ../../node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js
|
|
719
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js
|
|
720
720
|
var WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
721
721
|
|
|
722
|
-
// ../../node_modules/@formatjs/icu-skeleton-parser/lib/number.js
|
|
722
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-skeleton-parser/lib/number.js
|
|
723
723
|
function parseNumberSkeletonFromString(skeleton) {
|
|
724
724
|
if (skeleton.length === 0) {
|
|
725
725
|
throw new Error("Number skeleton cannot be empty");
|
|
@@ -735,8 +735,8 @@ function parseNumberSkeletonFromString(skeleton) {
|
|
|
735
735
|
throw new Error("Invalid number skeleton");
|
|
736
736
|
}
|
|
737
737
|
var stem = stemAndOptions[0], options = stemAndOptions.slice(1);
|
|
738
|
-
for (var
|
|
739
|
-
var option = options_1[
|
|
738
|
+
for (var _a3 = 0, options_1 = options; _a3 < options_1.length; _a3++) {
|
|
739
|
+
var option = options_1[_a3];
|
|
740
740
|
if (option.length === 0) {
|
|
741
741
|
throw new Error("Invalid number skeleton");
|
|
742
742
|
}
|
|
@@ -985,7 +985,7 @@ function parseNumberSkeleton(tokens) {
|
|
|
985
985
|
return result;
|
|
986
986
|
}
|
|
987
987
|
|
|
988
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js
|
|
988
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js
|
|
989
989
|
var timeData = {
|
|
990
990
|
"001": [
|
|
991
991
|
"H",
|
|
@@ -2324,7 +2324,7 @@ var timeData = {
|
|
|
2324
2324
|
]
|
|
2325
2325
|
};
|
|
2326
2326
|
|
|
2327
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js
|
|
2327
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js
|
|
2328
2328
|
function getBestPattern(skeleton, locale) {
|
|
2329
2329
|
var skeletonCopy = "";
|
|
2330
2330
|
for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
|
|
@@ -2386,7 +2386,7 @@ function getDefaultHourSymbolFromLocale(locale) {
|
|
|
2386
2386
|
return hourCycles[0];
|
|
2387
2387
|
}
|
|
2388
2388
|
|
|
2389
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/parser.js
|
|
2389
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js
|
|
2390
2390
|
var _a;
|
|
2391
2391
|
var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
|
|
2392
2392
|
var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
|
|
@@ -2449,7 +2449,7 @@ var fromEntries = (
|
|
|
2449
2449
|
function fromEntries2(entries) {
|
|
2450
2450
|
var obj = {};
|
|
2451
2451
|
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
|
|
2452
|
-
var
|
|
2452
|
+
var _a3 = entries_1[_i], k = _a3[0], v = _a3[1];
|
|
2453
2453
|
obj[k] = v;
|
|
2454
2454
|
}
|
|
2455
2455
|
return obj;
|
|
@@ -2501,14 +2501,14 @@ function RE(s, flag) {
|
|
|
2501
2501
|
var matchIdentifierAtIndex;
|
|
2502
2502
|
if (REGEX_SUPPORTS_U_AND_Y) {
|
|
2503
2503
|
IDENTIFIER_PREFIX_RE_1 = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
2504
|
-
matchIdentifierAtIndex = function
|
|
2505
|
-
var
|
|
2504
|
+
matchIdentifierAtIndex = function matchIdentifierAtIndex3(s, index) {
|
|
2505
|
+
var _a3;
|
|
2506
2506
|
IDENTIFIER_PREFIX_RE_1.lastIndex = index;
|
|
2507
2507
|
var match = IDENTIFIER_PREFIX_RE_1.exec(s);
|
|
2508
|
-
return (
|
|
2508
|
+
return (_a3 = match[1]) !== null && _a3 !== void 0 ? _a3 : "";
|
|
2509
2509
|
};
|
|
2510
2510
|
} else {
|
|
2511
|
-
matchIdentifierAtIndex = function
|
|
2511
|
+
matchIdentifierAtIndex = function matchIdentifierAtIndex3(s, index) {
|
|
2512
2512
|
var match = [];
|
|
2513
2513
|
while (true) {
|
|
2514
2514
|
var c = codePointAt(s, index);
|
|
@@ -2525,7 +2525,7 @@ var IDENTIFIER_PREFIX_RE_1;
|
|
|
2525
2525
|
var Parser = (
|
|
2526
2526
|
/** @class */
|
|
2527
2527
|
function() {
|
|
2528
|
-
function
|
|
2528
|
+
function Parser3(message, options) {
|
|
2529
2529
|
if (options === void 0) {
|
|
2530
2530
|
options = {};
|
|
2531
2531
|
}
|
|
@@ -2536,13 +2536,13 @@ var Parser = (
|
|
|
2536
2536
|
this.requiresOtherClause = !!options.requiresOtherClause;
|
|
2537
2537
|
this.shouldParseSkeletons = !!options.shouldParseSkeletons;
|
|
2538
2538
|
}
|
|
2539
|
-
|
|
2539
|
+
Parser3.prototype.parse = function() {
|
|
2540
2540
|
if (this.offset() !== 0) {
|
|
2541
2541
|
throw Error("parser can only be used once");
|
|
2542
2542
|
}
|
|
2543
2543
|
return this.parseMessage(0, "", false);
|
|
2544
2544
|
};
|
|
2545
|
-
|
|
2545
|
+
Parser3.prototype.parseMessage = function(nestingLevel, parentArgType, expectingCloseTag) {
|
|
2546
2546
|
var elements = [];
|
|
2547
2547
|
while (!this.isEOF()) {
|
|
2548
2548
|
var char = this.char();
|
|
@@ -2583,7 +2583,7 @@ var Parser = (
|
|
|
2583
2583
|
}
|
|
2584
2584
|
return { val: elements, err: null };
|
|
2585
2585
|
};
|
|
2586
|
-
|
|
2586
|
+
Parser3.prototype.parseTag = function(nestingLevel, parentArgType) {
|
|
2587
2587
|
var startPosition = this.clonePosition();
|
|
2588
2588
|
this.bump();
|
|
2589
2589
|
var tagName = this.parseTagName();
|
|
@@ -2633,7 +2633,7 @@ var Parser = (
|
|
|
2633
2633
|
return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
|
|
2634
2634
|
}
|
|
2635
2635
|
};
|
|
2636
|
-
|
|
2636
|
+
Parser3.prototype.parseTagName = function() {
|
|
2637
2637
|
var startOffset = this.offset();
|
|
2638
2638
|
this.bump();
|
|
2639
2639
|
while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {
|
|
@@ -2641,7 +2641,7 @@ var Parser = (
|
|
|
2641
2641
|
}
|
|
2642
2642
|
return this.message.slice(startOffset, this.offset());
|
|
2643
2643
|
};
|
|
2644
|
-
|
|
2644
|
+
Parser3.prototype.parseLiteral = function(nestingLevel, parentArgType) {
|
|
2645
2645
|
var start = this.clonePosition();
|
|
2646
2646
|
var value = "";
|
|
2647
2647
|
while (true) {
|
|
@@ -2668,7 +2668,7 @@ var Parser = (
|
|
|
2668
2668
|
err: null
|
|
2669
2669
|
};
|
|
2670
2670
|
};
|
|
2671
|
-
|
|
2671
|
+
Parser3.prototype.tryParseLeftAngleBracket = function() {
|
|
2672
2672
|
if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
|
|
2673
2673
|
!_isAlphaOrSlash(this.peek() || 0))) {
|
|
2674
2674
|
this.bump();
|
|
@@ -2676,7 +2676,7 @@ var Parser = (
|
|
|
2676
2676
|
}
|
|
2677
2677
|
return null;
|
|
2678
2678
|
};
|
|
2679
|
-
|
|
2679
|
+
Parser3.prototype.tryParseQuote = function(parentArgType) {
|
|
2680
2680
|
if (this.isEOF() || this.char() !== 39) {
|
|
2681
2681
|
return null;
|
|
2682
2682
|
}
|
|
@@ -2718,7 +2718,7 @@ var Parser = (
|
|
|
2718
2718
|
}
|
|
2719
2719
|
return fromCodePoint.apply(void 0, codePoints);
|
|
2720
2720
|
};
|
|
2721
|
-
|
|
2721
|
+
Parser3.prototype.tryParseUnquoted = function(nestingLevel, parentArgType) {
|
|
2722
2722
|
if (this.isEOF()) {
|
|
2723
2723
|
return null;
|
|
2724
2724
|
}
|
|
@@ -2730,7 +2730,7 @@ var Parser = (
|
|
|
2730
2730
|
return fromCodePoint(ch);
|
|
2731
2731
|
}
|
|
2732
2732
|
};
|
|
2733
|
-
|
|
2733
|
+
Parser3.prototype.parseArgument = function(nestingLevel, expectingCloseTag) {
|
|
2734
2734
|
var openingBracePosition = this.clonePosition();
|
|
2735
2735
|
this.bump();
|
|
2736
2736
|
this.bumpSpace();
|
|
@@ -2774,7 +2774,7 @@ var Parser = (
|
|
|
2774
2774
|
return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
2775
2775
|
}
|
|
2776
2776
|
};
|
|
2777
|
-
|
|
2777
|
+
Parser3.prototype.parseIdentifierIfPossible = function() {
|
|
2778
2778
|
var startingPosition = this.clonePosition();
|
|
2779
2779
|
var startOffset = this.offset();
|
|
2780
2780
|
var value = matchIdentifierAtIndex(this.message, startOffset);
|
|
@@ -2784,8 +2784,8 @@ var Parser = (
|
|
|
2784
2784
|
var location = createLocation(startingPosition, endPosition);
|
|
2785
2785
|
return { value, location };
|
|
2786
2786
|
};
|
|
2787
|
-
|
|
2788
|
-
var
|
|
2787
|
+
Parser3.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
|
|
2788
|
+
var _a3;
|
|
2789
2789
|
var typeStartPosition = this.clonePosition();
|
|
2790
2790
|
var argType = this.parseIdentifierIfPossible().value;
|
|
2791
2791
|
var typeEndPosition = this.clonePosition();
|
|
@@ -2853,7 +2853,7 @@ var Parser = (
|
|
|
2853
2853
|
type: argType === "number" ? TYPE.number : argType === "date" ? TYPE.date : TYPE.time,
|
|
2854
2854
|
value,
|
|
2855
2855
|
location: location_1,
|
|
2856
|
-
style: (
|
|
2856
|
+
style: (_a3 = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a3 !== void 0 ? _a3 : null
|
|
2857
2857
|
},
|
|
2858
2858
|
err: null
|
|
2859
2859
|
};
|
|
@@ -2919,14 +2919,14 @@ var Parser = (
|
|
|
2919
2919
|
return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
|
|
2920
2920
|
}
|
|
2921
2921
|
};
|
|
2922
|
-
|
|
2922
|
+
Parser3.prototype.tryParseArgumentClose = function(openingBracePosition) {
|
|
2923
2923
|
if (this.isEOF() || this.char() !== 125) {
|
|
2924
2924
|
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
2925
2925
|
}
|
|
2926
2926
|
this.bump();
|
|
2927
2927
|
return { val: true, err: null };
|
|
2928
2928
|
};
|
|
2929
|
-
|
|
2929
|
+
Parser3.prototype.parseSimpleArgStyleIfPossible = function() {
|
|
2930
2930
|
var nestedBraces = 0;
|
|
2931
2931
|
var startPosition = this.clonePosition();
|
|
2932
2932
|
while (!this.isEOF()) {
|
|
@@ -2967,7 +2967,7 @@ var Parser = (
|
|
|
2967
2967
|
err: null
|
|
2968
2968
|
};
|
|
2969
2969
|
};
|
|
2970
|
-
|
|
2970
|
+
Parser3.prototype.parseNumberSkeletonFromString = function(skeleton, location) {
|
|
2971
2971
|
var tokens = [];
|
|
2972
2972
|
try {
|
|
2973
2973
|
tokens = parseNumberSkeletonFromString(skeleton);
|
|
@@ -2984,8 +2984,8 @@ var Parser = (
|
|
|
2984
2984
|
err: null
|
|
2985
2985
|
};
|
|
2986
2986
|
};
|
|
2987
|
-
|
|
2988
|
-
var
|
|
2987
|
+
Parser3.prototype.tryParsePluralOrSelectOptions = function(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
|
|
2988
|
+
var _a3;
|
|
2989
2989
|
var hasOtherClause = false;
|
|
2990
2990
|
var options = [];
|
|
2991
2991
|
var parsedSelectors = /* @__PURE__ */ new Set();
|
|
@@ -3032,7 +3032,7 @@ var Parser = (
|
|
|
3032
3032
|
]);
|
|
3033
3033
|
parsedSelectors.add(selector);
|
|
3034
3034
|
this.bumpSpace();
|
|
3035
|
-
|
|
3035
|
+
_a3 = this.parseIdentifierIfPossible(), selector = _a3.value, selectorLocation = _a3.location;
|
|
3036
3036
|
}
|
|
3037
3037
|
if (options.length === 0) {
|
|
3038
3038
|
return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
|
|
@@ -3042,7 +3042,7 @@ var Parser = (
|
|
|
3042
3042
|
}
|
|
3043
3043
|
return { val: options, err: null };
|
|
3044
3044
|
};
|
|
3045
|
-
|
|
3045
|
+
Parser3.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
|
|
3046
3046
|
var sign = 1;
|
|
3047
3047
|
var startingPosition = this.clonePosition();
|
|
3048
3048
|
if (this.bumpIf("+")) {
|
|
@@ -3071,20 +3071,20 @@ var Parser = (
|
|
|
3071
3071
|
}
|
|
3072
3072
|
return { val: decimal, err: null };
|
|
3073
3073
|
};
|
|
3074
|
-
|
|
3074
|
+
Parser3.prototype.offset = function() {
|
|
3075
3075
|
return this.position.offset;
|
|
3076
3076
|
};
|
|
3077
|
-
|
|
3077
|
+
Parser3.prototype.isEOF = function() {
|
|
3078
3078
|
return this.offset() === this.message.length;
|
|
3079
3079
|
};
|
|
3080
|
-
|
|
3080
|
+
Parser3.prototype.clonePosition = function() {
|
|
3081
3081
|
return {
|
|
3082
3082
|
offset: this.position.offset,
|
|
3083
3083
|
line: this.position.line,
|
|
3084
3084
|
column: this.position.column
|
|
3085
3085
|
};
|
|
3086
3086
|
};
|
|
3087
|
-
|
|
3087
|
+
Parser3.prototype.char = function() {
|
|
3088
3088
|
var offset = this.position.offset;
|
|
3089
3089
|
if (offset >= this.message.length) {
|
|
3090
3090
|
throw Error("out of bound");
|
|
@@ -3095,7 +3095,7 @@ var Parser = (
|
|
|
3095
3095
|
}
|
|
3096
3096
|
return code;
|
|
3097
3097
|
};
|
|
3098
|
-
|
|
3098
|
+
Parser3.prototype.error = function(kind, location) {
|
|
3099
3099
|
return {
|
|
3100
3100
|
val: null,
|
|
3101
3101
|
err: {
|
|
@@ -3105,7 +3105,7 @@ var Parser = (
|
|
|
3105
3105
|
}
|
|
3106
3106
|
};
|
|
3107
3107
|
};
|
|
3108
|
-
|
|
3108
|
+
Parser3.prototype.bump = function() {
|
|
3109
3109
|
if (this.isEOF()) {
|
|
3110
3110
|
return;
|
|
3111
3111
|
}
|
|
@@ -3119,7 +3119,7 @@ var Parser = (
|
|
|
3119
3119
|
this.position.offset += code < 65536 ? 1 : 2;
|
|
3120
3120
|
}
|
|
3121
3121
|
};
|
|
3122
|
-
|
|
3122
|
+
Parser3.prototype.bumpIf = function(prefix) {
|
|
3123
3123
|
if (startsWith(this.message, prefix, this.offset())) {
|
|
3124
3124
|
for (var i = 0; i < prefix.length; i++) {
|
|
3125
3125
|
this.bump();
|
|
@@ -3128,7 +3128,7 @@ var Parser = (
|
|
|
3128
3128
|
}
|
|
3129
3129
|
return false;
|
|
3130
3130
|
};
|
|
3131
|
-
|
|
3131
|
+
Parser3.prototype.bumpUntil = function(pattern) {
|
|
3132
3132
|
var currentOffset = this.offset();
|
|
3133
3133
|
var index = this.message.indexOf(pattern, currentOffset);
|
|
3134
3134
|
if (index >= 0) {
|
|
@@ -3139,7 +3139,7 @@ var Parser = (
|
|
|
3139
3139
|
return false;
|
|
3140
3140
|
}
|
|
3141
3141
|
};
|
|
3142
|
-
|
|
3142
|
+
Parser3.prototype.bumpTo = function(targetOffset) {
|
|
3143
3143
|
if (this.offset() > targetOffset) {
|
|
3144
3144
|
throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
|
|
3145
3145
|
}
|
|
@@ -3158,12 +3158,12 @@ var Parser = (
|
|
|
3158
3158
|
}
|
|
3159
3159
|
}
|
|
3160
3160
|
};
|
|
3161
|
-
|
|
3161
|
+
Parser3.prototype.bumpSpace = function() {
|
|
3162
3162
|
while (!this.isEOF() && _isWhiteSpace(this.char())) {
|
|
3163
3163
|
this.bump();
|
|
3164
3164
|
}
|
|
3165
3165
|
};
|
|
3166
|
-
|
|
3166
|
+
Parser3.prototype.peek = function() {
|
|
3167
3167
|
if (this.isEOF()) {
|
|
3168
3168
|
return null;
|
|
3169
3169
|
}
|
|
@@ -3172,7 +3172,7 @@ var Parser = (
|
|
|
3172
3172
|
var nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1));
|
|
3173
3173
|
return nextCode !== null && nextCode !== void 0 ? nextCode : null;
|
|
3174
3174
|
};
|
|
3175
|
-
return
|
|
3175
|
+
return Parser3;
|
|
3176
3176
|
}()
|
|
3177
3177
|
);
|
|
3178
3178
|
function _isAlpha(codepoint) {
|
|
@@ -3191,7 +3191,7 @@ function _isPatternSyntax(c) {
|
|
|
3191
3191
|
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;
|
|
3192
3192
|
}
|
|
3193
3193
|
|
|
3194
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/index.js
|
|
3194
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/index.js
|
|
3195
3195
|
function pruneLocation(els) {
|
|
3196
3196
|
els.forEach(function(el) {
|
|
3197
3197
|
delete el.location;
|
|
@@ -3531,34 +3531,34 @@ function createDefaultFormatters(cache) {
|
|
|
3531
3531
|
}
|
|
3532
3532
|
return {
|
|
3533
3533
|
getNumberFormat: memoize(function() {
|
|
3534
|
-
var
|
|
3534
|
+
var _a3;
|
|
3535
3535
|
var args = [];
|
|
3536
3536
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3537
3537
|
args[_i] = arguments[_i];
|
|
3538
3538
|
}
|
|
3539
|
-
return new ((
|
|
3539
|
+
return new ((_a3 = Intl.NumberFormat).bind.apply(_a3, __spreadArray([void 0], args, false)))();
|
|
3540
3540
|
}, {
|
|
3541
3541
|
cache: createFastMemoizeCache(cache.number),
|
|
3542
3542
|
strategy: strategies.variadic
|
|
3543
3543
|
}),
|
|
3544
3544
|
getDateTimeFormat: memoize(function() {
|
|
3545
|
-
var
|
|
3545
|
+
var _a3;
|
|
3546
3546
|
var args = [];
|
|
3547
3547
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3548
3548
|
args[_i] = arguments[_i];
|
|
3549
3549
|
}
|
|
3550
|
-
return new ((
|
|
3550
|
+
return new ((_a3 = Intl.DateTimeFormat).bind.apply(_a3, __spreadArray([void 0], args, false)))();
|
|
3551
3551
|
}, {
|
|
3552
3552
|
cache: createFastMemoizeCache(cache.dateTime),
|
|
3553
3553
|
strategy: strategies.variadic
|
|
3554
3554
|
}),
|
|
3555
3555
|
getPluralRules: memoize(function() {
|
|
3556
|
-
var
|
|
3556
|
+
var _a3;
|
|
3557
3557
|
var args = [];
|
|
3558
3558
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3559
3559
|
args[_i] = arguments[_i];
|
|
3560
3560
|
}
|
|
3561
|
-
return new ((
|
|
3561
|
+
return new ((_a3 = Intl.PluralRules).bind.apply(_a3, __spreadArray([void 0], args, false)))();
|
|
3562
3562
|
}, {
|
|
3563
3563
|
cache: createFastMemoizeCache(cache.pluralRules),
|
|
3564
3564
|
strategy: strategies.variadic
|
|
@@ -3600,9 +3600,9 @@ var IntlMessageFormat = (
|
|
|
3600
3600
|
return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, void 0, _this.message);
|
|
3601
3601
|
};
|
|
3602
3602
|
this.resolvedOptions = function() {
|
|
3603
|
-
var
|
|
3603
|
+
var _a4;
|
|
3604
3604
|
return {
|
|
3605
|
-
locale: ((
|
|
3605
|
+
locale: ((_a4 = _this.resolvedLocale) === null || _a4 === void 0 ? void 0 : _a4.toString()) || Intl.NumberFormat.supportedLocalesOf(_this.locales)[0]
|
|
3606
3606
|
};
|
|
3607
3607
|
};
|
|
3608
3608
|
this.getAst = function() {
|
|
@@ -3615,7 +3615,7 @@ var IntlMessageFormat = (
|
|
|
3615
3615
|
if (!IntlMessageFormat2.__parse) {
|
|
3616
3616
|
throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
3617
3617
|
}
|
|
3618
|
-
var
|
|
3618
|
+
var _a3 = opts || {}, formatters = _a3.formatters, parseOpts = __rest(_a3, ["formatters"]);
|
|
3619
3619
|
this.ast = IntlMessageFormat2.__parse(message, __assign(__assign({}, parseOpts), { locale: this.resolvedLocale }));
|
|
3620
3620
|
} else {
|
|
3621
3621
|
this.ast = message;
|
|
@@ -3798,8 +3798,8 @@ var MissingTranslationError = (
|
|
|
3798
3798
|
__extends(MissingTranslationError2, _super);
|
|
3799
3799
|
function MissingTranslationError2(descriptor, locale) {
|
|
3800
3800
|
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) {
|
|
3801
|
-
var
|
|
3802
|
-
return (
|
|
3801
|
+
var _a3;
|
|
3802
|
+
return (_a3 = e.value) !== null && _a3 !== void 0 ? _a3 : JSON.stringify(e);
|
|
3803
3803
|
}).join(), ")") : "id", " as fallback.")) || this;
|
|
3804
3804
|
_this.descriptor = descriptor;
|
|
3805
3805
|
return _this;
|
|
@@ -3875,34 +3875,34 @@ function createFormatters(cache) {
|
|
|
3875
3875
|
var ListFormat = Intl.ListFormat;
|
|
3876
3876
|
var DisplayNames = Intl.DisplayNames;
|
|
3877
3877
|
var getDateTimeFormat = memoize(function() {
|
|
3878
|
-
var
|
|
3878
|
+
var _a3;
|
|
3879
3879
|
var args = [];
|
|
3880
3880
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3881
3881
|
args[_i] = arguments[_i];
|
|
3882
3882
|
}
|
|
3883
|
-
return new ((
|
|
3883
|
+
return new ((_a3 = Intl.DateTimeFormat).bind.apply(_a3, __spreadArray([void 0], args, false)))();
|
|
3884
3884
|
}, {
|
|
3885
3885
|
cache: createFastMemoizeCache2(cache.dateTime),
|
|
3886
3886
|
strategy: strategies.variadic
|
|
3887
3887
|
});
|
|
3888
3888
|
var getNumberFormat = memoize(function() {
|
|
3889
|
-
var
|
|
3889
|
+
var _a3;
|
|
3890
3890
|
var args = [];
|
|
3891
3891
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3892
3892
|
args[_i] = arguments[_i];
|
|
3893
3893
|
}
|
|
3894
|
-
return new ((
|
|
3894
|
+
return new ((_a3 = Intl.NumberFormat).bind.apply(_a3, __spreadArray([void 0], args, false)))();
|
|
3895
3895
|
}, {
|
|
3896
3896
|
cache: createFastMemoizeCache2(cache.number),
|
|
3897
3897
|
strategy: strategies.variadic
|
|
3898
3898
|
});
|
|
3899
3899
|
var getPluralRules = memoize(function() {
|
|
3900
|
-
var
|
|
3900
|
+
var _a3;
|
|
3901
3901
|
var args = [];
|
|
3902
3902
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3903
3903
|
args[_i] = arguments[_i];
|
|
3904
3904
|
}
|
|
3905
|
-
return new ((
|
|
3905
|
+
return new ((_a3 = Intl.PluralRules).bind.apply(_a3, __spreadArray([void 0], args, false)))();
|
|
3906
3906
|
}, {
|
|
3907
3907
|
cache: createFastMemoizeCache2(cache.pluralRules),
|
|
3908
3908
|
strategy: strategies.variadic
|
|
@@ -3965,160 +3965,2799 @@ function getNamedFormat(formats, type, name, onError) {
|
|
|
3965
3965
|
onError(new UnsupportedFormatterError("No ".concat(type, " format named: ").concat(name)));
|
|
3966
3966
|
}
|
|
3967
3967
|
|
|
3968
|
-
// ../../node_modules/@formatjs/intl/lib/
|
|
3969
|
-
function
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
return all;
|
|
3973
|
-
}, {});
|
|
3974
|
-
}
|
|
3975
|
-
function deepMergeOptions(opts1, opts2) {
|
|
3976
|
-
var keys = Object.keys(__assign(__assign({}, opts1), opts2));
|
|
3977
|
-
return keys.reduce(function(all, k) {
|
|
3978
|
-
all[k] = __assign(__assign({}, opts1[k] || {}), opts2[k] || {});
|
|
3979
|
-
return all;
|
|
3980
|
-
}, {});
|
|
3981
|
-
}
|
|
3982
|
-
function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
|
|
3983
|
-
if (!timeZone) {
|
|
3984
|
-
return f1;
|
|
3985
|
-
}
|
|
3986
|
-
var mfFormats = IntlMessageFormat.formats;
|
|
3987
|
-
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)) });
|
|
3988
|
-
}
|
|
3989
|
-
var formatMessage = function(_a2, state, messageDescriptor, values, opts) {
|
|
3990
|
-
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;
|
|
3991
|
-
if (messageDescriptor === void 0) {
|
|
3992
|
-
messageDescriptor = { id: "" };
|
|
3993
|
-
}
|
|
3994
|
-
var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
|
|
3995
|
-
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");
|
|
3996
|
-
var id = String(msgId);
|
|
3997
|
-
var message = (
|
|
3998
|
-
// In case messages is Object.create(null)
|
|
3999
|
-
// e.g import('foo.json') from webpack)
|
|
4000
|
-
// See https://github.com/formatjs/formatjs/issues/1914
|
|
4001
|
-
messages && Object.prototype.hasOwnProperty.call(messages, id) && messages[id]
|
|
4002
|
-
);
|
|
4003
|
-
if (Array.isArray(message) && message.length === 1 && message[0].type === TYPE.literal) {
|
|
4004
|
-
return message[0].value;
|
|
3968
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/ecma402-abstract/lib/utils.js
|
|
3969
|
+
function invariant2(condition, message, Err) {
|
|
3970
|
+
if (Err === void 0) {
|
|
3971
|
+
Err = Error;
|
|
4005
3972
|
}
|
|
4006
|
-
if (!
|
|
4007
|
-
|
|
3973
|
+
if (!condition) {
|
|
3974
|
+
throw new Err(message);
|
|
4008
3975
|
}
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
3976
|
+
}
|
|
3977
|
+
|
|
3978
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/icu-messageformat-parser/lib/error.js
|
|
3979
|
+
var ErrorKind2;
|
|
3980
|
+
(function(ErrorKind3) {
|
|
3981
|
+
ErrorKind3[ErrorKind3["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
|
|
3982
|
+
ErrorKind3[ErrorKind3["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
|
|
3983
|
+
ErrorKind3[ErrorKind3["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
|
|
3984
|
+
ErrorKind3[ErrorKind3["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
|
|
3985
|
+
ErrorKind3[ErrorKind3["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
|
|
3986
|
+
ErrorKind3[ErrorKind3["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
|
|
3987
|
+
ErrorKind3[ErrorKind3["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
|
|
3988
|
+
ErrorKind3[ErrorKind3["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
|
|
3989
|
+
ErrorKind3[ErrorKind3["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
|
|
3990
|
+
ErrorKind3[ErrorKind3["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
|
|
3991
|
+
ErrorKind3[ErrorKind3["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
|
|
3992
|
+
ErrorKind3[ErrorKind3["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
|
|
3993
|
+
ErrorKind3[ErrorKind3["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
3994
|
+
ErrorKind3[ErrorKind3["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
3995
|
+
ErrorKind3[ErrorKind3["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
|
|
3996
|
+
ErrorKind3[ErrorKind3["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
|
|
3997
|
+
ErrorKind3[ErrorKind3["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
|
|
3998
|
+
ErrorKind3[ErrorKind3["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
|
|
3999
|
+
ErrorKind3[ErrorKind3["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
|
|
4000
|
+
ErrorKind3[ErrorKind3["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
|
|
4001
|
+
ErrorKind3[ErrorKind3["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
|
|
4002
|
+
ErrorKind3[ErrorKind3["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
|
|
4003
|
+
ErrorKind3[ErrorKind3["INVALID_TAG"] = 23] = "INVALID_TAG";
|
|
4004
|
+
ErrorKind3[ErrorKind3["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
|
|
4005
|
+
ErrorKind3[ErrorKind3["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
|
|
4006
|
+
ErrorKind3[ErrorKind3["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
|
|
4007
|
+
})(ErrorKind2 || (ErrorKind2 = {}));
|
|
4008
|
+
|
|
4009
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/icu-messageformat-parser/lib/types.js
|
|
4010
|
+
var TYPE2;
|
|
4011
|
+
(function(TYPE3) {
|
|
4012
|
+
TYPE3[TYPE3["literal"] = 0] = "literal";
|
|
4013
|
+
TYPE3[TYPE3["argument"] = 1] = "argument";
|
|
4014
|
+
TYPE3[TYPE3["number"] = 2] = "number";
|
|
4015
|
+
TYPE3[TYPE3["date"] = 3] = "date";
|
|
4016
|
+
TYPE3[TYPE3["time"] = 4] = "time";
|
|
4017
|
+
TYPE3[TYPE3["select"] = 5] = "select";
|
|
4018
|
+
TYPE3[TYPE3["plural"] = 6] = "plural";
|
|
4019
|
+
TYPE3[TYPE3["pound"] = 7] = "pound";
|
|
4020
|
+
TYPE3[TYPE3["tag"] = 8] = "tag";
|
|
4021
|
+
})(TYPE2 || (TYPE2 = {}));
|
|
4022
|
+
var SKELETON_TYPE2;
|
|
4023
|
+
(function(SKELETON_TYPE3) {
|
|
4024
|
+
SKELETON_TYPE3[SKELETON_TYPE3["number"] = 0] = "number";
|
|
4025
|
+
SKELETON_TYPE3[SKELETON_TYPE3["dateTime"] = 1] = "dateTime";
|
|
4026
|
+
})(SKELETON_TYPE2 || (SKELETON_TYPE2 = {}));
|
|
4027
|
+
|
|
4028
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js
|
|
4029
|
+
var SPACE_SEPARATOR_REGEX2 = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
4030
|
+
|
|
4031
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js
|
|
4032
|
+
var DATE_TIME_REGEX2 = /(?:[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;
|
|
4033
|
+
function parseDateTimeSkeleton2(skeleton) {
|
|
4034
|
+
var result = {};
|
|
4035
|
+
skeleton.replace(DATE_TIME_REGEX2, function(match) {
|
|
4036
|
+
var len = match.length;
|
|
4037
|
+
switch (match[0]) {
|
|
4038
|
+
case "G":
|
|
4039
|
+
result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
|
|
4040
|
+
break;
|
|
4041
|
+
case "y":
|
|
4042
|
+
result.year = len === 2 ? "2-digit" : "numeric";
|
|
4043
|
+
break;
|
|
4044
|
+
case "Y":
|
|
4045
|
+
case "u":
|
|
4046
|
+
case "U":
|
|
4047
|
+
case "r":
|
|
4048
|
+
throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
|
|
4049
|
+
case "q":
|
|
4050
|
+
case "Q":
|
|
4051
|
+
throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
|
4052
|
+
case "M":
|
|
4053
|
+
case "L":
|
|
4054
|
+
result.month = ["numeric", "2-digit", "short", "long", "narrow"][len - 1];
|
|
4055
|
+
break;
|
|
4056
|
+
case "w":
|
|
4057
|
+
case "W":
|
|
4058
|
+
throw new RangeError("`w/W` (week) patterns are not supported");
|
|
4059
|
+
case "d":
|
|
4060
|
+
result.day = ["numeric", "2-digit"][len - 1];
|
|
4061
|
+
break;
|
|
4062
|
+
case "D":
|
|
4063
|
+
case "F":
|
|
4064
|
+
case "g":
|
|
4065
|
+
throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
|
4066
|
+
case "E":
|
|
4067
|
+
result.weekday = len === 4 ? "short" : len === 5 ? "narrow" : "short";
|
|
4068
|
+
break;
|
|
4069
|
+
case "e":
|
|
4070
|
+
if (len < 4) {
|
|
4071
|
+
throw new RangeError("`e..eee` (weekday) patterns are not supported");
|
|
4072
|
+
}
|
|
4073
|
+
result.weekday = ["short", "long", "narrow", "short"][len - 4];
|
|
4074
|
+
break;
|
|
4075
|
+
case "c":
|
|
4076
|
+
if (len < 4) {
|
|
4077
|
+
throw new RangeError("`c..ccc` (weekday) patterns are not supported");
|
|
4078
|
+
}
|
|
4079
|
+
result.weekday = ["short", "long", "narrow", "short"][len - 4];
|
|
4080
|
+
break;
|
|
4081
|
+
case "a":
|
|
4082
|
+
result.hour12 = true;
|
|
4083
|
+
break;
|
|
4084
|
+
case "b":
|
|
4085
|
+
case "B":
|
|
4086
|
+
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
|
4087
|
+
case "h":
|
|
4088
|
+
result.hourCycle = "h12";
|
|
4089
|
+
result.hour = ["numeric", "2-digit"][len - 1];
|
|
4090
|
+
break;
|
|
4091
|
+
case "H":
|
|
4092
|
+
result.hourCycle = "h23";
|
|
4093
|
+
result.hour = ["numeric", "2-digit"][len - 1];
|
|
4094
|
+
break;
|
|
4095
|
+
case "K":
|
|
4096
|
+
result.hourCycle = "h11";
|
|
4097
|
+
result.hour = ["numeric", "2-digit"][len - 1];
|
|
4098
|
+
break;
|
|
4099
|
+
case "k":
|
|
4100
|
+
result.hourCycle = "h24";
|
|
4101
|
+
result.hour = ["numeric", "2-digit"][len - 1];
|
|
4102
|
+
break;
|
|
4103
|
+
case "j":
|
|
4104
|
+
case "J":
|
|
4105
|
+
case "C":
|
|
4106
|
+
throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
|
|
4107
|
+
case "m":
|
|
4108
|
+
result.minute = ["numeric", "2-digit"][len - 1];
|
|
4109
|
+
break;
|
|
4110
|
+
case "s":
|
|
4111
|
+
result.second = ["numeric", "2-digit"][len - 1];
|
|
4112
|
+
break;
|
|
4113
|
+
case "S":
|
|
4114
|
+
case "A":
|
|
4115
|
+
throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
|
4116
|
+
case "z":
|
|
4117
|
+
result.timeZoneName = len < 4 ? "short" : "long";
|
|
4118
|
+
break;
|
|
4119
|
+
case "Z":
|
|
4120
|
+
case "O":
|
|
4121
|
+
case "v":
|
|
4122
|
+
case "V":
|
|
4123
|
+
case "X":
|
|
4124
|
+
case "x":
|
|
4125
|
+
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
|
|
4015
4126
|
}
|
|
4016
|
-
|
|
4017
|
-
|
|
4127
|
+
return "";
|
|
4128
|
+
});
|
|
4129
|
+
return result;
|
|
4130
|
+
}
|
|
4131
|
+
|
|
4132
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js
|
|
4133
|
+
var WHITE_SPACE_REGEX2 = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
4134
|
+
|
|
4135
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/icu-skeleton-parser/lib/number.js
|
|
4136
|
+
function parseNumberSkeletonFromString2(skeleton) {
|
|
4137
|
+
if (skeleton.length === 0) {
|
|
4138
|
+
throw new Error("Number skeleton cannot be empty");
|
|
4139
|
+
}
|
|
4140
|
+
var stringTokens = skeleton.split(WHITE_SPACE_REGEX2).filter(function(x) {
|
|
4141
|
+
return x.length > 0;
|
|
4142
|
+
});
|
|
4143
|
+
var tokens = [];
|
|
4144
|
+
for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {
|
|
4145
|
+
var stringToken = stringTokens_1[_i];
|
|
4146
|
+
var stemAndOptions = stringToken.split("/");
|
|
4147
|
+
if (stemAndOptions.length === 0) {
|
|
4148
|
+
throw new Error("Invalid number skeleton");
|
|
4018
4149
|
}
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
onError(new MessageFormatError('Error formatting default message for: "'.concat(id, '", rendering default message verbatim'), locale, messageDescriptor, e));
|
|
4025
|
-
return typeof defaultMessage === "string" ? defaultMessage : id;
|
|
4150
|
+
var stem = stemAndOptions[0], options = stemAndOptions.slice(1);
|
|
4151
|
+
for (var _a3 = 0, options_1 = options; _a3 < options_1.length; _a3++) {
|
|
4152
|
+
var option = options_1[_a3];
|
|
4153
|
+
if (option.length === 0) {
|
|
4154
|
+
throw new Error("Invalid number skeleton");
|
|
4026
4155
|
}
|
|
4027
4156
|
}
|
|
4028
|
-
|
|
4029
|
-
}
|
|
4030
|
-
try {
|
|
4031
|
-
var formatter = state.getMessageFormat(message, locale, formats, __assign({ formatters: state }, opts || {}));
|
|
4032
|
-
return formatter.format(values);
|
|
4033
|
-
} catch (e) {
|
|
4034
|
-
onError(new MessageFormatError('Error formatting message: "'.concat(id, '", using ').concat(defaultMessage ? "default message" : "id", " as fallback."), locale, messageDescriptor, e));
|
|
4035
|
-
}
|
|
4036
|
-
if (defaultMessage) {
|
|
4037
|
-
try {
|
|
4038
|
-
var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);
|
|
4039
|
-
return formatter.format(values);
|
|
4040
|
-
} catch (e) {
|
|
4041
|
-
onError(new MessageFormatError('Error formatting the default message for: "'.concat(id, '", rendering message verbatim'), locale, messageDescriptor, e));
|
|
4042
|
-
}
|
|
4043
|
-
}
|
|
4044
|
-
if (typeof message === "string") {
|
|
4045
|
-
return message;
|
|
4046
|
-
}
|
|
4047
|
-
if (typeof defaultMessage === "string") {
|
|
4048
|
-
return defaultMessage;
|
|
4049
|
-
}
|
|
4050
|
-
return id;
|
|
4051
|
-
};
|
|
4052
|
-
|
|
4053
|
-
// ../../node_modules/@formatjs/intl/lib/src/dateTime.js
|
|
4054
|
-
var DATE_TIME_FORMAT_OPTIONS = [
|
|
4055
|
-
"formatMatcher",
|
|
4056
|
-
"timeZone",
|
|
4057
|
-
"hour12",
|
|
4058
|
-
"weekday",
|
|
4059
|
-
"era",
|
|
4060
|
-
"year",
|
|
4061
|
-
"month",
|
|
4062
|
-
"day",
|
|
4063
|
-
"hour",
|
|
4064
|
-
"minute",
|
|
4065
|
-
"second",
|
|
4066
|
-
"timeZoneName",
|
|
4067
|
-
"hourCycle",
|
|
4068
|
-
"dateStyle",
|
|
4069
|
-
"timeStyle",
|
|
4070
|
-
"calendar",
|
|
4071
|
-
// 'dayPeriod',
|
|
4072
|
-
"numberingSystem",
|
|
4073
|
-
"fractionalSecondDigits"
|
|
4074
|
-
];
|
|
4075
|
-
function getFormatter(_a2, type, getDateTimeFormat, options) {
|
|
4076
|
-
var locale = _a2.locale, formats = _a2.formats, onError = _a2.onError, timeZone = _a2.timeZone;
|
|
4077
|
-
if (options === void 0) {
|
|
4078
|
-
options = {};
|
|
4079
|
-
}
|
|
4080
|
-
var format = options.format;
|
|
4081
|
-
var defaults = __assign(__assign({}, timeZone && { timeZone }), format && getNamedFormat(formats, type, format, onError));
|
|
4082
|
-
var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
|
|
4083
|
-
if (type === "time" && !filteredOptions.hour && !filteredOptions.minute && !filteredOptions.second && !filteredOptions.timeStyle && !filteredOptions.dateStyle) {
|
|
4084
|
-
filteredOptions = __assign(__assign({}, filteredOptions), { hour: "numeric", minute: "numeric" });
|
|
4157
|
+
tokens.push({ stem, options });
|
|
4085
4158
|
}
|
|
4086
|
-
return
|
|
4159
|
+
return tokens;
|
|
4087
4160
|
}
|
|
4088
|
-
function
|
|
4089
|
-
|
|
4090
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
4091
|
-
_a2[_i - 2] = arguments[_i];
|
|
4092
|
-
}
|
|
4093
|
-
var value = _a2[0], _b = _a2[1], options = _b === void 0 ? {} : _b;
|
|
4094
|
-
var date = typeof value === "string" ? new Date(value || 0) : value;
|
|
4095
|
-
try {
|
|
4096
|
-
return getFormatter(config, "date", getDateTimeFormat, options).format(date);
|
|
4097
|
-
} catch (e) {
|
|
4098
|
-
config.onError(new IntlFormatError("Error formatting date.", config.locale, e));
|
|
4099
|
-
}
|
|
4100
|
-
return String(date);
|
|
4161
|
+
function icuUnitToEcma2(unit) {
|
|
4162
|
+
return unit.replace(/^(.*?)-/, "");
|
|
4101
4163
|
}
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
var
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4164
|
+
var FRACTION_PRECISION_REGEX2 = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
4165
|
+
var SIGNIFICANT_PRECISION_REGEX2 = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
4166
|
+
var INTEGER_WIDTH_REGEX2 = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
4167
|
+
var CONCISE_INTEGER_WIDTH_REGEX2 = /^(0+)$/;
|
|
4168
|
+
function parseSignificantPrecision2(str) {
|
|
4169
|
+
var result = {};
|
|
4170
|
+
if (str[str.length - 1] === "r") {
|
|
4171
|
+
result.roundingPriority = "morePrecision";
|
|
4172
|
+
} else if (str[str.length - 1] === "s") {
|
|
4173
|
+
result.roundingPriority = "lessPrecision";
|
|
4174
|
+
}
|
|
4175
|
+
str.replace(SIGNIFICANT_PRECISION_REGEX2, function(_, g1, g2) {
|
|
4176
|
+
if (typeof g2 !== "string") {
|
|
4177
|
+
result.minimumSignificantDigits = g1.length;
|
|
4178
|
+
result.maximumSignificantDigits = g1.length;
|
|
4179
|
+
} else if (g2 === "+") {
|
|
4180
|
+
result.minimumSignificantDigits = g1.length;
|
|
4181
|
+
} else if (g1[0] === "#") {
|
|
4182
|
+
result.maximumSignificantDigits = g1.length;
|
|
4183
|
+
} else {
|
|
4184
|
+
result.minimumSignificantDigits = g1.length;
|
|
4185
|
+
result.maximumSignificantDigits = g1.length + (typeof g2 === "string" ? g2.length : 0);
|
|
4186
|
+
}
|
|
4187
|
+
return "";
|
|
4188
|
+
});
|
|
4189
|
+
return result;
|
|
4190
|
+
}
|
|
4191
|
+
function parseSign2(str) {
|
|
4192
|
+
switch (str) {
|
|
4193
|
+
case "sign-auto":
|
|
4194
|
+
return {
|
|
4195
|
+
signDisplay: "auto"
|
|
4196
|
+
};
|
|
4197
|
+
case "sign-accounting":
|
|
4198
|
+
case "()":
|
|
4199
|
+
return {
|
|
4200
|
+
currencySign: "accounting"
|
|
4201
|
+
};
|
|
4202
|
+
case "sign-always":
|
|
4203
|
+
case "+!":
|
|
4204
|
+
return {
|
|
4205
|
+
signDisplay: "always"
|
|
4206
|
+
};
|
|
4207
|
+
case "sign-accounting-always":
|
|
4208
|
+
case "()!":
|
|
4209
|
+
return {
|
|
4210
|
+
signDisplay: "always",
|
|
4211
|
+
currencySign: "accounting"
|
|
4212
|
+
};
|
|
4213
|
+
case "sign-except-zero":
|
|
4214
|
+
case "+?":
|
|
4215
|
+
return {
|
|
4216
|
+
signDisplay: "exceptZero"
|
|
4217
|
+
};
|
|
4218
|
+
case "sign-accounting-except-zero":
|
|
4219
|
+
case "()?":
|
|
4220
|
+
return {
|
|
4221
|
+
signDisplay: "exceptZero",
|
|
4222
|
+
currencySign: "accounting"
|
|
4223
|
+
};
|
|
4224
|
+
case "sign-never":
|
|
4225
|
+
case "+_":
|
|
4226
|
+
return {
|
|
4227
|
+
signDisplay: "never"
|
|
4228
|
+
};
|
|
4229
|
+
}
|
|
4230
|
+
}
|
|
4231
|
+
function parseConciseScientificAndEngineeringStem2(stem) {
|
|
4232
|
+
var result;
|
|
4233
|
+
if (stem[0] === "E" && stem[1] === "E") {
|
|
4234
|
+
result = {
|
|
4235
|
+
notation: "engineering"
|
|
4236
|
+
};
|
|
4237
|
+
stem = stem.slice(2);
|
|
4238
|
+
} else if (stem[0] === "E") {
|
|
4239
|
+
result = {
|
|
4240
|
+
notation: "scientific"
|
|
4241
|
+
};
|
|
4242
|
+
stem = stem.slice(1);
|
|
4243
|
+
}
|
|
4244
|
+
if (result) {
|
|
4245
|
+
var signDisplay = stem.slice(0, 2);
|
|
4246
|
+
if (signDisplay === "+!") {
|
|
4247
|
+
result.signDisplay = "always";
|
|
4248
|
+
stem = stem.slice(2);
|
|
4249
|
+
} else if (signDisplay === "+?") {
|
|
4250
|
+
result.signDisplay = "exceptZero";
|
|
4251
|
+
stem = stem.slice(2);
|
|
4252
|
+
}
|
|
4253
|
+
if (!CONCISE_INTEGER_WIDTH_REGEX2.test(stem)) {
|
|
4254
|
+
throw new Error("Malformed concise eng/scientific notation");
|
|
4255
|
+
}
|
|
4256
|
+
result.minimumIntegerDigits = stem.length;
|
|
4257
|
+
}
|
|
4258
|
+
return result;
|
|
4259
|
+
}
|
|
4260
|
+
function parseNotationOptions2(opt) {
|
|
4261
|
+
var result = {};
|
|
4262
|
+
var signOpts = parseSign2(opt);
|
|
4263
|
+
if (signOpts) {
|
|
4264
|
+
return signOpts;
|
|
4265
|
+
}
|
|
4266
|
+
return result;
|
|
4267
|
+
}
|
|
4268
|
+
function parseNumberSkeleton2(tokens) {
|
|
4269
|
+
var result = {};
|
|
4270
|
+
for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
|
|
4271
|
+
var token = tokens_1[_i];
|
|
4272
|
+
switch (token.stem) {
|
|
4273
|
+
case "percent":
|
|
4274
|
+
case "%":
|
|
4275
|
+
result.style = "percent";
|
|
4276
|
+
continue;
|
|
4277
|
+
case "%x100":
|
|
4278
|
+
result.style = "percent";
|
|
4279
|
+
result.scale = 100;
|
|
4280
|
+
continue;
|
|
4281
|
+
case "currency":
|
|
4282
|
+
result.style = "currency";
|
|
4283
|
+
result.currency = token.options[0];
|
|
4284
|
+
continue;
|
|
4285
|
+
case "group-off":
|
|
4286
|
+
case ",_":
|
|
4287
|
+
result.useGrouping = false;
|
|
4288
|
+
continue;
|
|
4289
|
+
case "precision-integer":
|
|
4290
|
+
case ".":
|
|
4291
|
+
result.maximumFractionDigits = 0;
|
|
4292
|
+
continue;
|
|
4293
|
+
case "measure-unit":
|
|
4294
|
+
case "unit":
|
|
4295
|
+
result.style = "unit";
|
|
4296
|
+
result.unit = icuUnitToEcma2(token.options[0]);
|
|
4297
|
+
continue;
|
|
4298
|
+
case "compact-short":
|
|
4299
|
+
case "K":
|
|
4300
|
+
result.notation = "compact";
|
|
4301
|
+
result.compactDisplay = "short";
|
|
4302
|
+
continue;
|
|
4303
|
+
case "compact-long":
|
|
4304
|
+
case "KK":
|
|
4305
|
+
result.notation = "compact";
|
|
4306
|
+
result.compactDisplay = "long";
|
|
4307
|
+
continue;
|
|
4308
|
+
case "scientific":
|
|
4309
|
+
result = __assign(__assign(__assign({}, result), { notation: "scientific" }), token.options.reduce(function(all, opt2) {
|
|
4310
|
+
return __assign(__assign({}, all), parseNotationOptions2(opt2));
|
|
4311
|
+
}, {}));
|
|
4312
|
+
continue;
|
|
4313
|
+
case "engineering":
|
|
4314
|
+
result = __assign(__assign(__assign({}, result), { notation: "engineering" }), token.options.reduce(function(all, opt2) {
|
|
4315
|
+
return __assign(__assign({}, all), parseNotationOptions2(opt2));
|
|
4316
|
+
}, {}));
|
|
4317
|
+
continue;
|
|
4318
|
+
case "notation-simple":
|
|
4319
|
+
result.notation = "standard";
|
|
4320
|
+
continue;
|
|
4321
|
+
case "unit-width-narrow":
|
|
4322
|
+
result.currencyDisplay = "narrowSymbol";
|
|
4323
|
+
result.unitDisplay = "narrow";
|
|
4324
|
+
continue;
|
|
4325
|
+
case "unit-width-short":
|
|
4326
|
+
result.currencyDisplay = "code";
|
|
4327
|
+
result.unitDisplay = "short";
|
|
4328
|
+
continue;
|
|
4329
|
+
case "unit-width-full-name":
|
|
4330
|
+
result.currencyDisplay = "name";
|
|
4331
|
+
result.unitDisplay = "long";
|
|
4332
|
+
continue;
|
|
4333
|
+
case "unit-width-iso-code":
|
|
4334
|
+
result.currencyDisplay = "symbol";
|
|
4335
|
+
continue;
|
|
4336
|
+
case "scale":
|
|
4337
|
+
result.scale = parseFloat(token.options[0]);
|
|
4338
|
+
continue;
|
|
4339
|
+
case "integer-width":
|
|
4340
|
+
if (token.options.length > 1) {
|
|
4341
|
+
throw new RangeError("integer-width stems only accept a single optional option");
|
|
4342
|
+
}
|
|
4343
|
+
token.options[0].replace(INTEGER_WIDTH_REGEX2, function(_, g1, g2, g3, g4, g5) {
|
|
4344
|
+
if (g1) {
|
|
4345
|
+
result.minimumIntegerDigits = g2.length;
|
|
4346
|
+
} else if (g3 && g4) {
|
|
4347
|
+
throw new Error("We currently do not support maximum integer digits");
|
|
4348
|
+
} else if (g5) {
|
|
4349
|
+
throw new Error("We currently do not support exact integer digits");
|
|
4350
|
+
}
|
|
4351
|
+
return "";
|
|
4352
|
+
});
|
|
4353
|
+
continue;
|
|
4354
|
+
}
|
|
4355
|
+
if (CONCISE_INTEGER_WIDTH_REGEX2.test(token.stem)) {
|
|
4356
|
+
result.minimumIntegerDigits = token.stem.length;
|
|
4357
|
+
continue;
|
|
4358
|
+
}
|
|
4359
|
+
if (FRACTION_PRECISION_REGEX2.test(token.stem)) {
|
|
4360
|
+
if (token.options.length > 1) {
|
|
4361
|
+
throw new RangeError("Fraction-precision stems only accept a single optional option");
|
|
4362
|
+
}
|
|
4363
|
+
token.stem.replace(FRACTION_PRECISION_REGEX2, function(_, g1, g2, g3, g4, g5) {
|
|
4364
|
+
if (g2 === "*") {
|
|
4365
|
+
result.minimumFractionDigits = g1.length;
|
|
4366
|
+
} else if (g3 && g3[0] === "#") {
|
|
4367
|
+
result.maximumFractionDigits = g3.length;
|
|
4368
|
+
} else if (g4 && g5) {
|
|
4369
|
+
result.minimumFractionDigits = g4.length;
|
|
4370
|
+
result.maximumFractionDigits = g4.length + g5.length;
|
|
4371
|
+
} else {
|
|
4372
|
+
result.minimumFractionDigits = g1.length;
|
|
4373
|
+
result.maximumFractionDigits = g1.length;
|
|
4374
|
+
}
|
|
4375
|
+
return "";
|
|
4376
|
+
});
|
|
4377
|
+
var opt = token.options[0];
|
|
4378
|
+
if (opt === "w") {
|
|
4379
|
+
result = __assign(__assign({}, result), { trailingZeroDisplay: "stripIfInteger" });
|
|
4380
|
+
} else if (opt) {
|
|
4381
|
+
result = __assign(__assign({}, result), parseSignificantPrecision2(opt));
|
|
4382
|
+
}
|
|
4383
|
+
continue;
|
|
4384
|
+
}
|
|
4385
|
+
if (SIGNIFICANT_PRECISION_REGEX2.test(token.stem)) {
|
|
4386
|
+
result = __assign(__assign({}, result), parseSignificantPrecision2(token.stem));
|
|
4387
|
+
continue;
|
|
4388
|
+
}
|
|
4389
|
+
var signOpts = parseSign2(token.stem);
|
|
4390
|
+
if (signOpts) {
|
|
4391
|
+
result = __assign(__assign({}, result), signOpts);
|
|
4392
|
+
}
|
|
4393
|
+
var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem2(token.stem);
|
|
4394
|
+
if (conciseScientificAndEngineeringOpts) {
|
|
4395
|
+
result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);
|
|
4396
|
+
}
|
|
4397
|
+
}
|
|
4398
|
+
return result;
|
|
4399
|
+
}
|
|
4400
|
+
|
|
4401
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js
|
|
4402
|
+
var timeData2 = {
|
|
4403
|
+
"001": [
|
|
4404
|
+
"H",
|
|
4405
|
+
"h"
|
|
4406
|
+
],
|
|
4407
|
+
"AC": [
|
|
4408
|
+
"H",
|
|
4409
|
+
"h",
|
|
4410
|
+
"hb",
|
|
4411
|
+
"hB"
|
|
4412
|
+
],
|
|
4413
|
+
"AD": [
|
|
4414
|
+
"H",
|
|
4415
|
+
"hB"
|
|
4416
|
+
],
|
|
4417
|
+
"AE": [
|
|
4418
|
+
"h",
|
|
4419
|
+
"hB",
|
|
4420
|
+
"hb",
|
|
4421
|
+
"H"
|
|
4422
|
+
],
|
|
4423
|
+
"AF": [
|
|
4424
|
+
"H",
|
|
4425
|
+
"hb",
|
|
4426
|
+
"hB",
|
|
4427
|
+
"h"
|
|
4428
|
+
],
|
|
4429
|
+
"AG": [
|
|
4430
|
+
"h",
|
|
4431
|
+
"hb",
|
|
4432
|
+
"H",
|
|
4433
|
+
"hB"
|
|
4434
|
+
],
|
|
4435
|
+
"AI": [
|
|
4436
|
+
"H",
|
|
4437
|
+
"h",
|
|
4438
|
+
"hb",
|
|
4439
|
+
"hB"
|
|
4440
|
+
],
|
|
4441
|
+
"AL": [
|
|
4442
|
+
"h",
|
|
4443
|
+
"H",
|
|
4444
|
+
"hB"
|
|
4445
|
+
],
|
|
4446
|
+
"AM": [
|
|
4447
|
+
"H",
|
|
4448
|
+
"hB"
|
|
4449
|
+
],
|
|
4450
|
+
"AO": [
|
|
4451
|
+
"H",
|
|
4452
|
+
"hB"
|
|
4453
|
+
],
|
|
4454
|
+
"AR": [
|
|
4455
|
+
"H",
|
|
4456
|
+
"h",
|
|
4457
|
+
"hB",
|
|
4458
|
+
"hb"
|
|
4459
|
+
],
|
|
4460
|
+
"AS": [
|
|
4461
|
+
"h",
|
|
4462
|
+
"H"
|
|
4463
|
+
],
|
|
4464
|
+
"AT": [
|
|
4465
|
+
"H",
|
|
4466
|
+
"hB"
|
|
4467
|
+
],
|
|
4468
|
+
"AU": [
|
|
4469
|
+
"h",
|
|
4470
|
+
"hb",
|
|
4471
|
+
"H",
|
|
4472
|
+
"hB"
|
|
4473
|
+
],
|
|
4474
|
+
"AW": [
|
|
4475
|
+
"H",
|
|
4476
|
+
"hB"
|
|
4477
|
+
],
|
|
4478
|
+
"AX": [
|
|
4479
|
+
"H"
|
|
4480
|
+
],
|
|
4481
|
+
"AZ": [
|
|
4482
|
+
"H",
|
|
4483
|
+
"hB",
|
|
4484
|
+
"h"
|
|
4485
|
+
],
|
|
4486
|
+
"BA": [
|
|
4487
|
+
"H",
|
|
4488
|
+
"hB",
|
|
4489
|
+
"h"
|
|
4490
|
+
],
|
|
4491
|
+
"BB": [
|
|
4492
|
+
"h",
|
|
4493
|
+
"hb",
|
|
4494
|
+
"H",
|
|
4495
|
+
"hB"
|
|
4496
|
+
],
|
|
4497
|
+
"BD": [
|
|
4498
|
+
"h",
|
|
4499
|
+
"hB",
|
|
4500
|
+
"H"
|
|
4501
|
+
],
|
|
4502
|
+
"BE": [
|
|
4503
|
+
"H",
|
|
4504
|
+
"hB"
|
|
4505
|
+
],
|
|
4506
|
+
"BF": [
|
|
4507
|
+
"H",
|
|
4508
|
+
"hB"
|
|
4509
|
+
],
|
|
4510
|
+
"BG": [
|
|
4511
|
+
"H",
|
|
4512
|
+
"hB",
|
|
4513
|
+
"h"
|
|
4514
|
+
],
|
|
4515
|
+
"BH": [
|
|
4516
|
+
"h",
|
|
4517
|
+
"hB",
|
|
4518
|
+
"hb",
|
|
4519
|
+
"H"
|
|
4520
|
+
],
|
|
4521
|
+
"BJ": [
|
|
4522
|
+
"H",
|
|
4523
|
+
"hB"
|
|
4524
|
+
],
|
|
4525
|
+
"BL": [
|
|
4526
|
+
"H",
|
|
4527
|
+
"hB"
|
|
4528
|
+
],
|
|
4529
|
+
"BM": [
|
|
4530
|
+
"h",
|
|
4531
|
+
"hb",
|
|
4532
|
+
"H",
|
|
4533
|
+
"hB"
|
|
4534
|
+
],
|
|
4535
|
+
"BN": [
|
|
4536
|
+
"hb",
|
|
4537
|
+
"hB",
|
|
4538
|
+
"h",
|
|
4539
|
+
"H"
|
|
4540
|
+
],
|
|
4541
|
+
"BO": [
|
|
4542
|
+
"H",
|
|
4543
|
+
"hB",
|
|
4544
|
+
"h",
|
|
4545
|
+
"hb"
|
|
4546
|
+
],
|
|
4547
|
+
"BQ": [
|
|
4548
|
+
"H"
|
|
4549
|
+
],
|
|
4550
|
+
"BR": [
|
|
4551
|
+
"H",
|
|
4552
|
+
"hB"
|
|
4553
|
+
],
|
|
4554
|
+
"BS": [
|
|
4555
|
+
"h",
|
|
4556
|
+
"hb",
|
|
4557
|
+
"H",
|
|
4558
|
+
"hB"
|
|
4559
|
+
],
|
|
4560
|
+
"BT": [
|
|
4561
|
+
"h",
|
|
4562
|
+
"H"
|
|
4563
|
+
],
|
|
4564
|
+
"BW": [
|
|
4565
|
+
"H",
|
|
4566
|
+
"h",
|
|
4567
|
+
"hb",
|
|
4568
|
+
"hB"
|
|
4569
|
+
],
|
|
4570
|
+
"BZ": [
|
|
4571
|
+
"H",
|
|
4572
|
+
"h",
|
|
4573
|
+
"hb",
|
|
4574
|
+
"hB"
|
|
4575
|
+
],
|
|
4576
|
+
"CA": [
|
|
4577
|
+
"h",
|
|
4578
|
+
"hb",
|
|
4579
|
+
"H",
|
|
4580
|
+
"hB"
|
|
4581
|
+
],
|
|
4582
|
+
"CC": [
|
|
4583
|
+
"H",
|
|
4584
|
+
"h",
|
|
4585
|
+
"hb",
|
|
4586
|
+
"hB"
|
|
4587
|
+
],
|
|
4588
|
+
"CD": [
|
|
4589
|
+
"hB",
|
|
4590
|
+
"H"
|
|
4591
|
+
],
|
|
4592
|
+
"CF": [
|
|
4593
|
+
"H",
|
|
4594
|
+
"h",
|
|
4595
|
+
"hB"
|
|
4596
|
+
],
|
|
4597
|
+
"CG": [
|
|
4598
|
+
"H",
|
|
4599
|
+
"hB"
|
|
4600
|
+
],
|
|
4601
|
+
"CH": [
|
|
4602
|
+
"H",
|
|
4603
|
+
"hB",
|
|
4604
|
+
"h"
|
|
4605
|
+
],
|
|
4606
|
+
"CI": [
|
|
4607
|
+
"H",
|
|
4608
|
+
"hB"
|
|
4609
|
+
],
|
|
4610
|
+
"CK": [
|
|
4611
|
+
"H",
|
|
4612
|
+
"h",
|
|
4613
|
+
"hb",
|
|
4614
|
+
"hB"
|
|
4615
|
+
],
|
|
4616
|
+
"CL": [
|
|
4617
|
+
"H",
|
|
4618
|
+
"h",
|
|
4619
|
+
"hB",
|
|
4620
|
+
"hb"
|
|
4621
|
+
],
|
|
4622
|
+
"CM": [
|
|
4623
|
+
"H",
|
|
4624
|
+
"h",
|
|
4625
|
+
"hB"
|
|
4626
|
+
],
|
|
4627
|
+
"CN": [
|
|
4628
|
+
"H",
|
|
4629
|
+
"hB",
|
|
4630
|
+
"hb",
|
|
4631
|
+
"h"
|
|
4632
|
+
],
|
|
4633
|
+
"CO": [
|
|
4634
|
+
"h",
|
|
4635
|
+
"H",
|
|
4636
|
+
"hB",
|
|
4637
|
+
"hb"
|
|
4638
|
+
],
|
|
4639
|
+
"CP": [
|
|
4640
|
+
"H"
|
|
4641
|
+
],
|
|
4642
|
+
"CR": [
|
|
4643
|
+
"H",
|
|
4644
|
+
"h",
|
|
4645
|
+
"hB",
|
|
4646
|
+
"hb"
|
|
4647
|
+
],
|
|
4648
|
+
"CU": [
|
|
4649
|
+
"H",
|
|
4650
|
+
"h",
|
|
4651
|
+
"hB",
|
|
4652
|
+
"hb"
|
|
4653
|
+
],
|
|
4654
|
+
"CV": [
|
|
4655
|
+
"H",
|
|
4656
|
+
"hB"
|
|
4657
|
+
],
|
|
4658
|
+
"CX": [
|
|
4659
|
+
"H",
|
|
4660
|
+
"h",
|
|
4661
|
+
"hb",
|
|
4662
|
+
"hB"
|
|
4663
|
+
],
|
|
4664
|
+
"CY": [
|
|
4665
|
+
"h",
|
|
4666
|
+
"H",
|
|
4667
|
+
"hb",
|
|
4668
|
+
"hB"
|
|
4669
|
+
],
|
|
4670
|
+
"CZ": [
|
|
4671
|
+
"H"
|
|
4672
|
+
],
|
|
4673
|
+
"DE": [
|
|
4674
|
+
"H",
|
|
4675
|
+
"hB"
|
|
4676
|
+
],
|
|
4677
|
+
"DG": [
|
|
4678
|
+
"H",
|
|
4679
|
+
"h",
|
|
4680
|
+
"hb",
|
|
4681
|
+
"hB"
|
|
4682
|
+
],
|
|
4683
|
+
"DJ": [
|
|
4684
|
+
"h",
|
|
4685
|
+
"H"
|
|
4686
|
+
],
|
|
4687
|
+
"DK": [
|
|
4688
|
+
"H"
|
|
4689
|
+
],
|
|
4690
|
+
"DM": [
|
|
4691
|
+
"h",
|
|
4692
|
+
"hb",
|
|
4693
|
+
"H",
|
|
4694
|
+
"hB"
|
|
4695
|
+
],
|
|
4696
|
+
"DO": [
|
|
4697
|
+
"h",
|
|
4698
|
+
"H",
|
|
4699
|
+
"hB",
|
|
4700
|
+
"hb"
|
|
4701
|
+
],
|
|
4702
|
+
"DZ": [
|
|
4703
|
+
"h",
|
|
4704
|
+
"hB",
|
|
4705
|
+
"hb",
|
|
4706
|
+
"H"
|
|
4707
|
+
],
|
|
4708
|
+
"EA": [
|
|
4709
|
+
"H",
|
|
4710
|
+
"h",
|
|
4711
|
+
"hB",
|
|
4712
|
+
"hb"
|
|
4713
|
+
],
|
|
4714
|
+
"EC": [
|
|
4715
|
+
"H",
|
|
4716
|
+
"hB",
|
|
4717
|
+
"h",
|
|
4718
|
+
"hb"
|
|
4719
|
+
],
|
|
4720
|
+
"EE": [
|
|
4721
|
+
"H",
|
|
4722
|
+
"hB"
|
|
4723
|
+
],
|
|
4724
|
+
"EG": [
|
|
4725
|
+
"h",
|
|
4726
|
+
"hB",
|
|
4727
|
+
"hb",
|
|
4728
|
+
"H"
|
|
4729
|
+
],
|
|
4730
|
+
"EH": [
|
|
4731
|
+
"h",
|
|
4732
|
+
"hB",
|
|
4733
|
+
"hb",
|
|
4734
|
+
"H"
|
|
4735
|
+
],
|
|
4736
|
+
"ER": [
|
|
4737
|
+
"h",
|
|
4738
|
+
"H"
|
|
4739
|
+
],
|
|
4740
|
+
"ES": [
|
|
4741
|
+
"H",
|
|
4742
|
+
"hB",
|
|
4743
|
+
"h",
|
|
4744
|
+
"hb"
|
|
4745
|
+
],
|
|
4746
|
+
"ET": [
|
|
4747
|
+
"hB",
|
|
4748
|
+
"hb",
|
|
4749
|
+
"h",
|
|
4750
|
+
"H"
|
|
4751
|
+
],
|
|
4752
|
+
"FI": [
|
|
4753
|
+
"H"
|
|
4754
|
+
],
|
|
4755
|
+
"FJ": [
|
|
4756
|
+
"h",
|
|
4757
|
+
"hb",
|
|
4758
|
+
"H",
|
|
4759
|
+
"hB"
|
|
4760
|
+
],
|
|
4761
|
+
"FK": [
|
|
4762
|
+
"H",
|
|
4763
|
+
"h",
|
|
4764
|
+
"hb",
|
|
4765
|
+
"hB"
|
|
4766
|
+
],
|
|
4767
|
+
"FM": [
|
|
4768
|
+
"h",
|
|
4769
|
+
"hb",
|
|
4770
|
+
"H",
|
|
4771
|
+
"hB"
|
|
4772
|
+
],
|
|
4773
|
+
"FR": [
|
|
4774
|
+
"H",
|
|
4775
|
+
"hB"
|
|
4776
|
+
],
|
|
4777
|
+
"GA": [
|
|
4778
|
+
"H",
|
|
4779
|
+
"hB"
|
|
4780
|
+
],
|
|
4781
|
+
"GB": [
|
|
4782
|
+
"H",
|
|
4783
|
+
"h",
|
|
4784
|
+
"hb",
|
|
4785
|
+
"hB"
|
|
4786
|
+
],
|
|
4787
|
+
"GD": [
|
|
4788
|
+
"h",
|
|
4789
|
+
"hb",
|
|
4790
|
+
"H",
|
|
4791
|
+
"hB"
|
|
4792
|
+
],
|
|
4793
|
+
"GE": [
|
|
4794
|
+
"H",
|
|
4795
|
+
"hB",
|
|
4796
|
+
"h"
|
|
4797
|
+
],
|
|
4798
|
+
"GF": [
|
|
4799
|
+
"H",
|
|
4800
|
+
"hB"
|
|
4801
|
+
],
|
|
4802
|
+
"GG": [
|
|
4803
|
+
"H",
|
|
4804
|
+
"h",
|
|
4805
|
+
"hb",
|
|
4806
|
+
"hB"
|
|
4807
|
+
],
|
|
4808
|
+
"GH": [
|
|
4809
|
+
"h",
|
|
4810
|
+
"H"
|
|
4811
|
+
],
|
|
4812
|
+
"GI": [
|
|
4813
|
+
"H",
|
|
4814
|
+
"h",
|
|
4815
|
+
"hb",
|
|
4816
|
+
"hB"
|
|
4817
|
+
],
|
|
4818
|
+
"GM": [
|
|
4819
|
+
"h",
|
|
4820
|
+
"hb",
|
|
4821
|
+
"H",
|
|
4822
|
+
"hB"
|
|
4823
|
+
],
|
|
4824
|
+
"GN": [
|
|
4825
|
+
"H",
|
|
4826
|
+
"hB"
|
|
4827
|
+
],
|
|
4828
|
+
"GP": [
|
|
4829
|
+
"H",
|
|
4830
|
+
"hB"
|
|
4831
|
+
],
|
|
4832
|
+
"GQ": [
|
|
4833
|
+
"H",
|
|
4834
|
+
"hB",
|
|
4835
|
+
"h",
|
|
4836
|
+
"hb"
|
|
4837
|
+
],
|
|
4838
|
+
"GR": [
|
|
4839
|
+
"h",
|
|
4840
|
+
"H",
|
|
4841
|
+
"hb",
|
|
4842
|
+
"hB"
|
|
4843
|
+
],
|
|
4844
|
+
"GT": [
|
|
4845
|
+
"H",
|
|
4846
|
+
"h",
|
|
4847
|
+
"hB",
|
|
4848
|
+
"hb"
|
|
4849
|
+
],
|
|
4850
|
+
"GU": [
|
|
4851
|
+
"h",
|
|
4852
|
+
"hb",
|
|
4853
|
+
"H",
|
|
4854
|
+
"hB"
|
|
4855
|
+
],
|
|
4856
|
+
"GW": [
|
|
4857
|
+
"H",
|
|
4858
|
+
"hB"
|
|
4859
|
+
],
|
|
4860
|
+
"GY": [
|
|
4861
|
+
"h",
|
|
4862
|
+
"hb",
|
|
4863
|
+
"H",
|
|
4864
|
+
"hB"
|
|
4865
|
+
],
|
|
4866
|
+
"HK": [
|
|
4867
|
+
"h",
|
|
4868
|
+
"hB",
|
|
4869
|
+
"hb",
|
|
4870
|
+
"H"
|
|
4871
|
+
],
|
|
4872
|
+
"HN": [
|
|
4873
|
+
"H",
|
|
4874
|
+
"h",
|
|
4875
|
+
"hB",
|
|
4876
|
+
"hb"
|
|
4877
|
+
],
|
|
4878
|
+
"HR": [
|
|
4879
|
+
"H",
|
|
4880
|
+
"hB"
|
|
4881
|
+
],
|
|
4882
|
+
"IC": [
|
|
4883
|
+
"H",
|
|
4884
|
+
"h",
|
|
4885
|
+
"hB",
|
|
4886
|
+
"hb"
|
|
4887
|
+
],
|
|
4888
|
+
"ID": [
|
|
4889
|
+
"H"
|
|
4890
|
+
],
|
|
4891
|
+
"IE": [
|
|
4892
|
+
"H",
|
|
4893
|
+
"h",
|
|
4894
|
+
"hb",
|
|
4895
|
+
"hB"
|
|
4896
|
+
],
|
|
4897
|
+
"IL": [
|
|
4898
|
+
"H",
|
|
4899
|
+
"hB"
|
|
4900
|
+
],
|
|
4901
|
+
"IM": [
|
|
4902
|
+
"H",
|
|
4903
|
+
"h",
|
|
4904
|
+
"hb",
|
|
4905
|
+
"hB"
|
|
4906
|
+
],
|
|
4907
|
+
"IN": [
|
|
4908
|
+
"h",
|
|
4909
|
+
"H"
|
|
4910
|
+
],
|
|
4911
|
+
"IO": [
|
|
4912
|
+
"H",
|
|
4913
|
+
"h",
|
|
4914
|
+
"hb",
|
|
4915
|
+
"hB"
|
|
4916
|
+
],
|
|
4917
|
+
"IQ": [
|
|
4918
|
+
"h",
|
|
4919
|
+
"hB",
|
|
4920
|
+
"hb",
|
|
4921
|
+
"H"
|
|
4922
|
+
],
|
|
4923
|
+
"IR": [
|
|
4924
|
+
"hB",
|
|
4925
|
+
"H"
|
|
4926
|
+
],
|
|
4927
|
+
"IS": [
|
|
4928
|
+
"H"
|
|
4929
|
+
],
|
|
4930
|
+
"IT": [
|
|
4931
|
+
"H",
|
|
4932
|
+
"hB"
|
|
4933
|
+
],
|
|
4934
|
+
"JE": [
|
|
4935
|
+
"H",
|
|
4936
|
+
"h",
|
|
4937
|
+
"hb",
|
|
4938
|
+
"hB"
|
|
4939
|
+
],
|
|
4940
|
+
"JM": [
|
|
4941
|
+
"h",
|
|
4942
|
+
"hb",
|
|
4943
|
+
"H",
|
|
4944
|
+
"hB"
|
|
4945
|
+
],
|
|
4946
|
+
"JO": [
|
|
4947
|
+
"h",
|
|
4948
|
+
"hB",
|
|
4949
|
+
"hb",
|
|
4950
|
+
"H"
|
|
4951
|
+
],
|
|
4952
|
+
"JP": [
|
|
4953
|
+
"H",
|
|
4954
|
+
"h",
|
|
4955
|
+
"K"
|
|
4956
|
+
],
|
|
4957
|
+
"KE": [
|
|
4958
|
+
"hB",
|
|
4959
|
+
"hb",
|
|
4960
|
+
"H",
|
|
4961
|
+
"h"
|
|
4962
|
+
],
|
|
4963
|
+
"KG": [
|
|
4964
|
+
"H",
|
|
4965
|
+
"h",
|
|
4966
|
+
"hB",
|
|
4967
|
+
"hb"
|
|
4968
|
+
],
|
|
4969
|
+
"KH": [
|
|
4970
|
+
"hB",
|
|
4971
|
+
"h",
|
|
4972
|
+
"H",
|
|
4973
|
+
"hb"
|
|
4974
|
+
],
|
|
4975
|
+
"KI": [
|
|
4976
|
+
"h",
|
|
4977
|
+
"hb",
|
|
4978
|
+
"H",
|
|
4979
|
+
"hB"
|
|
4980
|
+
],
|
|
4981
|
+
"KM": [
|
|
4982
|
+
"H",
|
|
4983
|
+
"h",
|
|
4984
|
+
"hB",
|
|
4985
|
+
"hb"
|
|
4986
|
+
],
|
|
4987
|
+
"KN": [
|
|
4988
|
+
"h",
|
|
4989
|
+
"hb",
|
|
4990
|
+
"H",
|
|
4991
|
+
"hB"
|
|
4992
|
+
],
|
|
4993
|
+
"KP": [
|
|
4994
|
+
"h",
|
|
4995
|
+
"H",
|
|
4996
|
+
"hB",
|
|
4997
|
+
"hb"
|
|
4998
|
+
],
|
|
4999
|
+
"KR": [
|
|
5000
|
+
"h",
|
|
5001
|
+
"H",
|
|
5002
|
+
"hB",
|
|
5003
|
+
"hb"
|
|
5004
|
+
],
|
|
5005
|
+
"KW": [
|
|
5006
|
+
"h",
|
|
5007
|
+
"hB",
|
|
5008
|
+
"hb",
|
|
5009
|
+
"H"
|
|
5010
|
+
],
|
|
5011
|
+
"KY": [
|
|
5012
|
+
"h",
|
|
5013
|
+
"hb",
|
|
5014
|
+
"H",
|
|
5015
|
+
"hB"
|
|
5016
|
+
],
|
|
5017
|
+
"KZ": [
|
|
5018
|
+
"H",
|
|
5019
|
+
"hB"
|
|
5020
|
+
],
|
|
5021
|
+
"LA": [
|
|
5022
|
+
"H",
|
|
5023
|
+
"hb",
|
|
5024
|
+
"hB",
|
|
5025
|
+
"h"
|
|
5026
|
+
],
|
|
5027
|
+
"LB": [
|
|
5028
|
+
"h",
|
|
5029
|
+
"hB",
|
|
5030
|
+
"hb",
|
|
5031
|
+
"H"
|
|
5032
|
+
],
|
|
5033
|
+
"LC": [
|
|
5034
|
+
"h",
|
|
5035
|
+
"hb",
|
|
5036
|
+
"H",
|
|
5037
|
+
"hB"
|
|
5038
|
+
],
|
|
5039
|
+
"LI": [
|
|
5040
|
+
"H",
|
|
5041
|
+
"hB",
|
|
5042
|
+
"h"
|
|
5043
|
+
],
|
|
5044
|
+
"LK": [
|
|
5045
|
+
"H",
|
|
5046
|
+
"h",
|
|
5047
|
+
"hB",
|
|
5048
|
+
"hb"
|
|
5049
|
+
],
|
|
5050
|
+
"LR": [
|
|
5051
|
+
"h",
|
|
5052
|
+
"hb",
|
|
5053
|
+
"H",
|
|
5054
|
+
"hB"
|
|
5055
|
+
],
|
|
5056
|
+
"LS": [
|
|
5057
|
+
"h",
|
|
5058
|
+
"H"
|
|
5059
|
+
],
|
|
5060
|
+
"LT": [
|
|
5061
|
+
"H",
|
|
5062
|
+
"h",
|
|
5063
|
+
"hb",
|
|
5064
|
+
"hB"
|
|
5065
|
+
],
|
|
5066
|
+
"LU": [
|
|
5067
|
+
"H",
|
|
5068
|
+
"h",
|
|
5069
|
+
"hB"
|
|
5070
|
+
],
|
|
5071
|
+
"LV": [
|
|
5072
|
+
"H",
|
|
5073
|
+
"hB",
|
|
5074
|
+
"hb",
|
|
5075
|
+
"h"
|
|
5076
|
+
],
|
|
5077
|
+
"LY": [
|
|
5078
|
+
"h",
|
|
5079
|
+
"hB",
|
|
5080
|
+
"hb",
|
|
5081
|
+
"H"
|
|
5082
|
+
],
|
|
5083
|
+
"MA": [
|
|
5084
|
+
"H",
|
|
5085
|
+
"h",
|
|
5086
|
+
"hB",
|
|
5087
|
+
"hb"
|
|
5088
|
+
],
|
|
5089
|
+
"MC": [
|
|
5090
|
+
"H",
|
|
5091
|
+
"hB"
|
|
5092
|
+
],
|
|
5093
|
+
"MD": [
|
|
5094
|
+
"H",
|
|
5095
|
+
"hB"
|
|
5096
|
+
],
|
|
5097
|
+
"ME": [
|
|
5098
|
+
"H",
|
|
5099
|
+
"hB",
|
|
5100
|
+
"h"
|
|
5101
|
+
],
|
|
5102
|
+
"MF": [
|
|
5103
|
+
"H",
|
|
5104
|
+
"hB"
|
|
5105
|
+
],
|
|
5106
|
+
"MH": [
|
|
5107
|
+
"h",
|
|
5108
|
+
"hb",
|
|
5109
|
+
"H",
|
|
5110
|
+
"hB"
|
|
5111
|
+
],
|
|
5112
|
+
"MK": [
|
|
5113
|
+
"H",
|
|
5114
|
+
"h",
|
|
5115
|
+
"hb",
|
|
5116
|
+
"hB"
|
|
5117
|
+
],
|
|
5118
|
+
"ML": [
|
|
5119
|
+
"H"
|
|
5120
|
+
],
|
|
5121
|
+
"MM": [
|
|
5122
|
+
"hB",
|
|
5123
|
+
"hb",
|
|
5124
|
+
"H",
|
|
5125
|
+
"h"
|
|
5126
|
+
],
|
|
5127
|
+
"MN": [
|
|
5128
|
+
"H",
|
|
5129
|
+
"h",
|
|
5130
|
+
"hb",
|
|
5131
|
+
"hB"
|
|
5132
|
+
],
|
|
5133
|
+
"MO": [
|
|
5134
|
+
"h",
|
|
5135
|
+
"hB",
|
|
5136
|
+
"hb",
|
|
5137
|
+
"H"
|
|
5138
|
+
],
|
|
5139
|
+
"MP": [
|
|
5140
|
+
"h",
|
|
5141
|
+
"hb",
|
|
5142
|
+
"H",
|
|
5143
|
+
"hB"
|
|
5144
|
+
],
|
|
5145
|
+
"MQ": [
|
|
5146
|
+
"H",
|
|
5147
|
+
"hB"
|
|
5148
|
+
],
|
|
5149
|
+
"MR": [
|
|
5150
|
+
"h",
|
|
5151
|
+
"hB",
|
|
5152
|
+
"hb",
|
|
5153
|
+
"H"
|
|
5154
|
+
],
|
|
5155
|
+
"MS": [
|
|
5156
|
+
"H",
|
|
5157
|
+
"h",
|
|
5158
|
+
"hb",
|
|
5159
|
+
"hB"
|
|
5160
|
+
],
|
|
5161
|
+
"MW": [
|
|
5162
|
+
"h",
|
|
5163
|
+
"hb",
|
|
5164
|
+
"H",
|
|
5165
|
+
"hB"
|
|
5166
|
+
],
|
|
5167
|
+
"MX": [
|
|
5168
|
+
"H",
|
|
5169
|
+
"h",
|
|
5170
|
+
"hB",
|
|
5171
|
+
"hb"
|
|
5172
|
+
],
|
|
5173
|
+
"MY": [
|
|
5174
|
+
"hb",
|
|
5175
|
+
"hB",
|
|
5176
|
+
"h",
|
|
5177
|
+
"H"
|
|
5178
|
+
],
|
|
5179
|
+
"MZ": [
|
|
5180
|
+
"H",
|
|
5181
|
+
"hB"
|
|
5182
|
+
],
|
|
5183
|
+
"NA": [
|
|
5184
|
+
"h",
|
|
5185
|
+
"H",
|
|
5186
|
+
"hB",
|
|
5187
|
+
"hb"
|
|
5188
|
+
],
|
|
5189
|
+
"NC": [
|
|
5190
|
+
"H",
|
|
5191
|
+
"hB"
|
|
5192
|
+
],
|
|
5193
|
+
"NE": [
|
|
5194
|
+
"H"
|
|
5195
|
+
],
|
|
5196
|
+
"NF": [
|
|
5197
|
+
"H",
|
|
5198
|
+
"h",
|
|
5199
|
+
"hb",
|
|
5200
|
+
"hB"
|
|
5201
|
+
],
|
|
5202
|
+
"NG": [
|
|
5203
|
+
"H",
|
|
5204
|
+
"h",
|
|
5205
|
+
"hb",
|
|
5206
|
+
"hB"
|
|
5207
|
+
],
|
|
5208
|
+
"NI": [
|
|
5209
|
+
"H",
|
|
5210
|
+
"h",
|
|
5211
|
+
"hB",
|
|
5212
|
+
"hb"
|
|
5213
|
+
],
|
|
5214
|
+
"NL": [
|
|
5215
|
+
"H",
|
|
5216
|
+
"hB"
|
|
5217
|
+
],
|
|
5218
|
+
"NP": [
|
|
5219
|
+
"H",
|
|
5220
|
+
"h",
|
|
5221
|
+
"hB"
|
|
5222
|
+
],
|
|
5223
|
+
"NR": [
|
|
5224
|
+
"H",
|
|
5225
|
+
"h",
|
|
5226
|
+
"hb",
|
|
5227
|
+
"hB"
|
|
5228
|
+
],
|
|
5229
|
+
"NU": [
|
|
5230
|
+
"H",
|
|
5231
|
+
"h",
|
|
5232
|
+
"hb",
|
|
5233
|
+
"hB"
|
|
5234
|
+
],
|
|
5235
|
+
"NZ": [
|
|
5236
|
+
"h",
|
|
5237
|
+
"hb",
|
|
5238
|
+
"H",
|
|
5239
|
+
"hB"
|
|
5240
|
+
],
|
|
5241
|
+
"OM": [
|
|
5242
|
+
"h",
|
|
5243
|
+
"hB",
|
|
5244
|
+
"hb",
|
|
5245
|
+
"H"
|
|
5246
|
+
],
|
|
5247
|
+
"PA": [
|
|
5248
|
+
"h",
|
|
5249
|
+
"H",
|
|
5250
|
+
"hB",
|
|
5251
|
+
"hb"
|
|
5252
|
+
],
|
|
5253
|
+
"PE": [
|
|
5254
|
+
"H",
|
|
5255
|
+
"hB",
|
|
5256
|
+
"h",
|
|
5257
|
+
"hb"
|
|
5258
|
+
],
|
|
5259
|
+
"PF": [
|
|
5260
|
+
"H",
|
|
5261
|
+
"h",
|
|
5262
|
+
"hB"
|
|
5263
|
+
],
|
|
5264
|
+
"PG": [
|
|
5265
|
+
"h",
|
|
5266
|
+
"H"
|
|
5267
|
+
],
|
|
5268
|
+
"PH": [
|
|
5269
|
+
"h",
|
|
5270
|
+
"hB",
|
|
5271
|
+
"hb",
|
|
5272
|
+
"H"
|
|
5273
|
+
],
|
|
5274
|
+
"PK": [
|
|
5275
|
+
"h",
|
|
5276
|
+
"hB",
|
|
5277
|
+
"H"
|
|
5278
|
+
],
|
|
5279
|
+
"PM": [
|
|
5280
|
+
"H",
|
|
5281
|
+
"hB"
|
|
5282
|
+
],
|
|
5283
|
+
"PN": [
|
|
5284
|
+
"H",
|
|
5285
|
+
"h",
|
|
5286
|
+
"hb",
|
|
5287
|
+
"hB"
|
|
5288
|
+
],
|
|
5289
|
+
"PR": [
|
|
5290
|
+
"h",
|
|
5291
|
+
"H",
|
|
5292
|
+
"hB",
|
|
5293
|
+
"hb"
|
|
5294
|
+
],
|
|
5295
|
+
"PS": [
|
|
5296
|
+
"h",
|
|
5297
|
+
"hB",
|
|
5298
|
+
"hb",
|
|
5299
|
+
"H"
|
|
5300
|
+
],
|
|
5301
|
+
"PT": [
|
|
5302
|
+
"H",
|
|
5303
|
+
"hB"
|
|
5304
|
+
],
|
|
5305
|
+
"PW": [
|
|
5306
|
+
"h",
|
|
5307
|
+
"H"
|
|
5308
|
+
],
|
|
5309
|
+
"PY": [
|
|
5310
|
+
"H",
|
|
5311
|
+
"h",
|
|
5312
|
+
"hB",
|
|
5313
|
+
"hb"
|
|
5314
|
+
],
|
|
5315
|
+
"QA": [
|
|
5316
|
+
"h",
|
|
5317
|
+
"hB",
|
|
5318
|
+
"hb",
|
|
5319
|
+
"H"
|
|
5320
|
+
],
|
|
5321
|
+
"RE": [
|
|
5322
|
+
"H",
|
|
5323
|
+
"hB"
|
|
5324
|
+
],
|
|
5325
|
+
"RO": [
|
|
5326
|
+
"H",
|
|
5327
|
+
"hB"
|
|
5328
|
+
],
|
|
5329
|
+
"RS": [
|
|
5330
|
+
"H",
|
|
5331
|
+
"hB",
|
|
5332
|
+
"h"
|
|
5333
|
+
],
|
|
5334
|
+
"RU": [
|
|
5335
|
+
"H"
|
|
5336
|
+
],
|
|
5337
|
+
"SA": [
|
|
5338
|
+
"h",
|
|
5339
|
+
"hB",
|
|
5340
|
+
"hb",
|
|
5341
|
+
"H"
|
|
5342
|
+
],
|
|
5343
|
+
"SB": [
|
|
5344
|
+
"h",
|
|
5345
|
+
"hb",
|
|
5346
|
+
"H",
|
|
5347
|
+
"hB"
|
|
5348
|
+
],
|
|
5349
|
+
"SC": [
|
|
5350
|
+
"H",
|
|
5351
|
+
"h",
|
|
5352
|
+
"hB"
|
|
5353
|
+
],
|
|
5354
|
+
"SD": [
|
|
5355
|
+
"h",
|
|
5356
|
+
"hB",
|
|
5357
|
+
"hb",
|
|
5358
|
+
"H"
|
|
5359
|
+
],
|
|
5360
|
+
"SE": [
|
|
5361
|
+
"H"
|
|
5362
|
+
],
|
|
5363
|
+
"SG": [
|
|
5364
|
+
"h",
|
|
5365
|
+
"hb",
|
|
5366
|
+
"H",
|
|
5367
|
+
"hB"
|
|
5368
|
+
],
|
|
5369
|
+
"SH": [
|
|
5370
|
+
"H",
|
|
5371
|
+
"h",
|
|
5372
|
+
"hb",
|
|
5373
|
+
"hB"
|
|
5374
|
+
],
|
|
5375
|
+
"SI": [
|
|
5376
|
+
"H",
|
|
5377
|
+
"hB"
|
|
5378
|
+
],
|
|
5379
|
+
"SJ": [
|
|
5380
|
+
"H"
|
|
5381
|
+
],
|
|
5382
|
+
"SK": [
|
|
5383
|
+
"H"
|
|
5384
|
+
],
|
|
5385
|
+
"SL": [
|
|
5386
|
+
"h",
|
|
5387
|
+
"hb",
|
|
5388
|
+
"H",
|
|
5389
|
+
"hB"
|
|
5390
|
+
],
|
|
5391
|
+
"SM": [
|
|
5392
|
+
"H",
|
|
5393
|
+
"h",
|
|
5394
|
+
"hB"
|
|
5395
|
+
],
|
|
5396
|
+
"SN": [
|
|
5397
|
+
"H",
|
|
5398
|
+
"h",
|
|
5399
|
+
"hB"
|
|
5400
|
+
],
|
|
5401
|
+
"SO": [
|
|
5402
|
+
"h",
|
|
5403
|
+
"H"
|
|
5404
|
+
],
|
|
5405
|
+
"SR": [
|
|
5406
|
+
"H",
|
|
5407
|
+
"hB"
|
|
5408
|
+
],
|
|
5409
|
+
"SS": [
|
|
5410
|
+
"h",
|
|
5411
|
+
"hb",
|
|
5412
|
+
"H",
|
|
5413
|
+
"hB"
|
|
5414
|
+
],
|
|
5415
|
+
"ST": [
|
|
5416
|
+
"H",
|
|
5417
|
+
"hB"
|
|
5418
|
+
],
|
|
5419
|
+
"SV": [
|
|
5420
|
+
"H",
|
|
5421
|
+
"h",
|
|
5422
|
+
"hB",
|
|
5423
|
+
"hb"
|
|
5424
|
+
],
|
|
5425
|
+
"SX": [
|
|
5426
|
+
"H",
|
|
5427
|
+
"h",
|
|
5428
|
+
"hb",
|
|
5429
|
+
"hB"
|
|
5430
|
+
],
|
|
5431
|
+
"SY": [
|
|
5432
|
+
"h",
|
|
5433
|
+
"hB",
|
|
5434
|
+
"hb",
|
|
5435
|
+
"H"
|
|
5436
|
+
],
|
|
5437
|
+
"SZ": [
|
|
5438
|
+
"h",
|
|
5439
|
+
"hb",
|
|
5440
|
+
"H",
|
|
5441
|
+
"hB"
|
|
5442
|
+
],
|
|
5443
|
+
"TA": [
|
|
5444
|
+
"H",
|
|
5445
|
+
"h",
|
|
5446
|
+
"hb",
|
|
5447
|
+
"hB"
|
|
5448
|
+
],
|
|
5449
|
+
"TC": [
|
|
5450
|
+
"h",
|
|
5451
|
+
"hb",
|
|
5452
|
+
"H",
|
|
5453
|
+
"hB"
|
|
5454
|
+
],
|
|
5455
|
+
"TD": [
|
|
5456
|
+
"h",
|
|
5457
|
+
"H",
|
|
5458
|
+
"hB"
|
|
5459
|
+
],
|
|
5460
|
+
"TF": [
|
|
5461
|
+
"H",
|
|
5462
|
+
"h",
|
|
5463
|
+
"hB"
|
|
5464
|
+
],
|
|
5465
|
+
"TG": [
|
|
5466
|
+
"H",
|
|
5467
|
+
"hB"
|
|
5468
|
+
],
|
|
5469
|
+
"TL": [
|
|
5470
|
+
"H",
|
|
5471
|
+
"hB",
|
|
5472
|
+
"hb",
|
|
5473
|
+
"h"
|
|
5474
|
+
],
|
|
5475
|
+
"TN": [
|
|
5476
|
+
"h",
|
|
5477
|
+
"hB",
|
|
5478
|
+
"hb",
|
|
5479
|
+
"H"
|
|
5480
|
+
],
|
|
5481
|
+
"TO": [
|
|
5482
|
+
"h",
|
|
5483
|
+
"H"
|
|
5484
|
+
],
|
|
5485
|
+
"TR": [
|
|
5486
|
+
"H",
|
|
5487
|
+
"hB"
|
|
5488
|
+
],
|
|
5489
|
+
"TT": [
|
|
5490
|
+
"h",
|
|
5491
|
+
"hb",
|
|
5492
|
+
"H",
|
|
5493
|
+
"hB"
|
|
5494
|
+
],
|
|
5495
|
+
"TW": [
|
|
5496
|
+
"hB",
|
|
5497
|
+
"hb",
|
|
5498
|
+
"h",
|
|
5499
|
+
"H"
|
|
5500
|
+
],
|
|
5501
|
+
"TZ": [
|
|
5502
|
+
"hB",
|
|
5503
|
+
"hb",
|
|
5504
|
+
"H",
|
|
5505
|
+
"h"
|
|
5506
|
+
],
|
|
5507
|
+
"UA": [
|
|
5508
|
+
"H",
|
|
5509
|
+
"hB",
|
|
5510
|
+
"h"
|
|
5511
|
+
],
|
|
5512
|
+
"UG": [
|
|
5513
|
+
"hB",
|
|
5514
|
+
"hb",
|
|
5515
|
+
"H",
|
|
5516
|
+
"h"
|
|
5517
|
+
],
|
|
5518
|
+
"UM": [
|
|
5519
|
+
"h",
|
|
5520
|
+
"hb",
|
|
5521
|
+
"H",
|
|
5522
|
+
"hB"
|
|
5523
|
+
],
|
|
5524
|
+
"US": [
|
|
5525
|
+
"h",
|
|
5526
|
+
"hb",
|
|
5527
|
+
"H",
|
|
5528
|
+
"hB"
|
|
5529
|
+
],
|
|
5530
|
+
"UY": [
|
|
5531
|
+
"H",
|
|
5532
|
+
"h",
|
|
5533
|
+
"hB",
|
|
5534
|
+
"hb"
|
|
5535
|
+
],
|
|
5536
|
+
"UZ": [
|
|
5537
|
+
"H",
|
|
5538
|
+
"hB",
|
|
5539
|
+
"h"
|
|
5540
|
+
],
|
|
5541
|
+
"VA": [
|
|
5542
|
+
"H",
|
|
5543
|
+
"h",
|
|
5544
|
+
"hB"
|
|
5545
|
+
],
|
|
5546
|
+
"VC": [
|
|
5547
|
+
"h",
|
|
5548
|
+
"hb",
|
|
5549
|
+
"H",
|
|
5550
|
+
"hB"
|
|
5551
|
+
],
|
|
5552
|
+
"VE": [
|
|
5553
|
+
"h",
|
|
5554
|
+
"H",
|
|
5555
|
+
"hB",
|
|
5556
|
+
"hb"
|
|
5557
|
+
],
|
|
5558
|
+
"VG": [
|
|
5559
|
+
"h",
|
|
5560
|
+
"hb",
|
|
5561
|
+
"H",
|
|
5562
|
+
"hB"
|
|
5563
|
+
],
|
|
5564
|
+
"VI": [
|
|
5565
|
+
"h",
|
|
5566
|
+
"hb",
|
|
5567
|
+
"H",
|
|
5568
|
+
"hB"
|
|
5569
|
+
],
|
|
5570
|
+
"VU": [
|
|
5571
|
+
"h",
|
|
5572
|
+
"H"
|
|
5573
|
+
],
|
|
5574
|
+
"WF": [
|
|
5575
|
+
"H",
|
|
5576
|
+
"hB"
|
|
5577
|
+
],
|
|
5578
|
+
"WS": [
|
|
5579
|
+
"h",
|
|
5580
|
+
"H"
|
|
5581
|
+
],
|
|
5582
|
+
"XK": [
|
|
5583
|
+
"H",
|
|
5584
|
+
"hB",
|
|
5585
|
+
"h"
|
|
5586
|
+
],
|
|
5587
|
+
"YE": [
|
|
5588
|
+
"h",
|
|
5589
|
+
"hB",
|
|
5590
|
+
"hb",
|
|
5591
|
+
"H"
|
|
5592
|
+
],
|
|
5593
|
+
"YT": [
|
|
5594
|
+
"H",
|
|
5595
|
+
"hB"
|
|
5596
|
+
],
|
|
5597
|
+
"ZA": [
|
|
5598
|
+
"H",
|
|
5599
|
+
"h",
|
|
5600
|
+
"hb",
|
|
5601
|
+
"hB"
|
|
5602
|
+
],
|
|
5603
|
+
"ZM": [
|
|
5604
|
+
"h",
|
|
5605
|
+
"hb",
|
|
5606
|
+
"H",
|
|
5607
|
+
"hB"
|
|
5608
|
+
],
|
|
5609
|
+
"af-ZA": [
|
|
5610
|
+
"H",
|
|
5611
|
+
"h",
|
|
5612
|
+
"hB",
|
|
5613
|
+
"hb"
|
|
5614
|
+
],
|
|
5615
|
+
"ar-001": [
|
|
5616
|
+
"h",
|
|
5617
|
+
"hB",
|
|
5618
|
+
"hb",
|
|
5619
|
+
"H"
|
|
5620
|
+
],
|
|
5621
|
+
"ca-ES": [
|
|
5622
|
+
"H",
|
|
5623
|
+
"h",
|
|
5624
|
+
"hB"
|
|
5625
|
+
],
|
|
5626
|
+
"en-001": [
|
|
5627
|
+
"h",
|
|
5628
|
+
"hb",
|
|
5629
|
+
"H",
|
|
5630
|
+
"hB"
|
|
5631
|
+
],
|
|
5632
|
+
"es-BO": [
|
|
5633
|
+
"H",
|
|
5634
|
+
"h",
|
|
5635
|
+
"hB",
|
|
5636
|
+
"hb"
|
|
5637
|
+
],
|
|
5638
|
+
"es-BR": [
|
|
5639
|
+
"H",
|
|
5640
|
+
"h",
|
|
5641
|
+
"hB",
|
|
5642
|
+
"hb"
|
|
5643
|
+
],
|
|
5644
|
+
"es-EC": [
|
|
5645
|
+
"H",
|
|
5646
|
+
"h",
|
|
5647
|
+
"hB",
|
|
5648
|
+
"hb"
|
|
5649
|
+
],
|
|
5650
|
+
"es-ES": [
|
|
5651
|
+
"H",
|
|
5652
|
+
"h",
|
|
5653
|
+
"hB",
|
|
5654
|
+
"hb"
|
|
5655
|
+
],
|
|
5656
|
+
"es-GQ": [
|
|
5657
|
+
"H",
|
|
5658
|
+
"h",
|
|
5659
|
+
"hB",
|
|
5660
|
+
"hb"
|
|
5661
|
+
],
|
|
5662
|
+
"es-PE": [
|
|
5663
|
+
"H",
|
|
5664
|
+
"h",
|
|
5665
|
+
"hB",
|
|
5666
|
+
"hb"
|
|
5667
|
+
],
|
|
5668
|
+
"fr-CA": [
|
|
5669
|
+
"H",
|
|
5670
|
+
"h",
|
|
5671
|
+
"hB"
|
|
5672
|
+
],
|
|
5673
|
+
"gl-ES": [
|
|
5674
|
+
"H",
|
|
5675
|
+
"h",
|
|
5676
|
+
"hB"
|
|
5677
|
+
],
|
|
5678
|
+
"gu-IN": [
|
|
5679
|
+
"hB",
|
|
5680
|
+
"hb",
|
|
5681
|
+
"h",
|
|
5682
|
+
"H"
|
|
5683
|
+
],
|
|
5684
|
+
"hi-IN": [
|
|
5685
|
+
"hB",
|
|
5686
|
+
"h",
|
|
5687
|
+
"H"
|
|
5688
|
+
],
|
|
5689
|
+
"it-CH": [
|
|
5690
|
+
"H",
|
|
5691
|
+
"h",
|
|
5692
|
+
"hB"
|
|
5693
|
+
],
|
|
5694
|
+
"it-IT": [
|
|
5695
|
+
"H",
|
|
5696
|
+
"h",
|
|
5697
|
+
"hB"
|
|
5698
|
+
],
|
|
5699
|
+
"kn-IN": [
|
|
5700
|
+
"hB",
|
|
5701
|
+
"h",
|
|
5702
|
+
"H"
|
|
5703
|
+
],
|
|
5704
|
+
"ml-IN": [
|
|
5705
|
+
"hB",
|
|
5706
|
+
"h",
|
|
5707
|
+
"H"
|
|
5708
|
+
],
|
|
5709
|
+
"mr-IN": [
|
|
5710
|
+
"hB",
|
|
5711
|
+
"hb",
|
|
5712
|
+
"h",
|
|
5713
|
+
"H"
|
|
5714
|
+
],
|
|
5715
|
+
"pa-IN": [
|
|
5716
|
+
"hB",
|
|
5717
|
+
"hb",
|
|
5718
|
+
"h",
|
|
5719
|
+
"H"
|
|
5720
|
+
],
|
|
5721
|
+
"ta-IN": [
|
|
5722
|
+
"hB",
|
|
5723
|
+
"h",
|
|
5724
|
+
"hb",
|
|
5725
|
+
"H"
|
|
5726
|
+
],
|
|
5727
|
+
"te-IN": [
|
|
5728
|
+
"hB",
|
|
5729
|
+
"h",
|
|
5730
|
+
"H"
|
|
5731
|
+
],
|
|
5732
|
+
"zu-ZA": [
|
|
5733
|
+
"H",
|
|
5734
|
+
"hB",
|
|
5735
|
+
"hb",
|
|
5736
|
+
"h"
|
|
5737
|
+
]
|
|
5738
|
+
};
|
|
5739
|
+
|
|
5740
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js
|
|
5741
|
+
function getBestPattern2(skeleton, locale) {
|
|
5742
|
+
var skeletonCopy = "";
|
|
5743
|
+
for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
|
|
5744
|
+
var patternChar = skeleton.charAt(patternPos);
|
|
5745
|
+
if (patternChar === "j") {
|
|
5746
|
+
var extraLength = 0;
|
|
5747
|
+
while (patternPos + 1 < skeleton.length && skeleton.charAt(patternPos + 1) === patternChar) {
|
|
5748
|
+
extraLength++;
|
|
5749
|
+
patternPos++;
|
|
5750
|
+
}
|
|
5751
|
+
var hourLen = 1 + (extraLength & 1);
|
|
5752
|
+
var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
|
|
5753
|
+
var dayPeriodChar = "a";
|
|
5754
|
+
var hourChar = getDefaultHourSymbolFromLocale2(locale);
|
|
5755
|
+
if (hourChar == "H" || hourChar == "k") {
|
|
5756
|
+
dayPeriodLen = 0;
|
|
5757
|
+
}
|
|
5758
|
+
while (dayPeriodLen-- > 0) {
|
|
5759
|
+
skeletonCopy += dayPeriodChar;
|
|
5760
|
+
}
|
|
5761
|
+
while (hourLen-- > 0) {
|
|
5762
|
+
skeletonCopy = hourChar + skeletonCopy;
|
|
5763
|
+
}
|
|
5764
|
+
} else if (patternChar === "J") {
|
|
5765
|
+
skeletonCopy += "H";
|
|
5766
|
+
} else {
|
|
5767
|
+
skeletonCopy += patternChar;
|
|
5768
|
+
}
|
|
5769
|
+
}
|
|
5770
|
+
return skeletonCopy;
|
|
5771
|
+
}
|
|
5772
|
+
function getDefaultHourSymbolFromLocale2(locale) {
|
|
5773
|
+
var hourCycle = locale.hourCycle;
|
|
5774
|
+
if (hourCycle === void 0 && // @ts-ignore hourCycle(s) is not identified yet
|
|
5775
|
+
locale.hourCycles && // @ts-ignore
|
|
5776
|
+
locale.hourCycles.length) {
|
|
5777
|
+
hourCycle = locale.hourCycles[0];
|
|
5778
|
+
}
|
|
5779
|
+
if (hourCycle) {
|
|
5780
|
+
switch (hourCycle) {
|
|
5781
|
+
case "h24":
|
|
5782
|
+
return "k";
|
|
5783
|
+
case "h23":
|
|
5784
|
+
return "H";
|
|
5785
|
+
case "h12":
|
|
5786
|
+
return "h";
|
|
5787
|
+
case "h11":
|
|
5788
|
+
return "K";
|
|
5789
|
+
default:
|
|
5790
|
+
throw new Error("Invalid hourCycle");
|
|
5791
|
+
}
|
|
5792
|
+
}
|
|
5793
|
+
var languageTag = locale.language;
|
|
5794
|
+
var regionTag;
|
|
5795
|
+
if (languageTag !== "root") {
|
|
5796
|
+
regionTag = locale.maximize().region;
|
|
5797
|
+
}
|
|
5798
|
+
var hourCycles = timeData2[regionTag || ""] || timeData2[languageTag || ""] || timeData2["".concat(languageTag, "-001")] || timeData2["001"];
|
|
5799
|
+
return hourCycles[0];
|
|
5800
|
+
}
|
|
5801
|
+
|
|
5802
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js
|
|
5803
|
+
var _a2;
|
|
5804
|
+
var SPACE_SEPARATOR_START_REGEX2 = new RegExp("^".concat(SPACE_SEPARATOR_REGEX2.source, "*"));
|
|
5805
|
+
var SPACE_SEPARATOR_END_REGEX2 = new RegExp("".concat(SPACE_SEPARATOR_REGEX2.source, "*$"));
|
|
5806
|
+
function createLocation2(start, end) {
|
|
5807
|
+
return { start, end };
|
|
5808
|
+
}
|
|
5809
|
+
var hasNativeStartsWith2 = !!String.prototype.startsWith;
|
|
5810
|
+
var hasNativeFromCodePoint2 = !!String.fromCodePoint;
|
|
5811
|
+
var hasNativeFromEntries2 = !!Object.fromEntries;
|
|
5812
|
+
var hasNativeCodePointAt2 = !!String.prototype.codePointAt;
|
|
5813
|
+
var hasTrimStart2 = !!String.prototype.trimStart;
|
|
5814
|
+
var hasTrimEnd2 = !!String.prototype.trimEnd;
|
|
5815
|
+
var hasNativeIsSafeInteger2 = !!Number.isSafeInteger;
|
|
5816
|
+
var isSafeInteger2 = hasNativeIsSafeInteger2 ? Number.isSafeInteger : function(n) {
|
|
5817
|
+
return typeof n === "number" && isFinite(n) && Math.floor(n) === n && Math.abs(n) <= 9007199254740991;
|
|
5818
|
+
};
|
|
5819
|
+
var REGEX_SUPPORTS_U_AND_Y2 = true;
|
|
5820
|
+
try {
|
|
5821
|
+
re = RE2("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
5822
|
+
REGEX_SUPPORTS_U_AND_Y2 = ((_a2 = re.exec("a")) === null || _a2 === void 0 ? void 0 : _a2[0]) === "a";
|
|
5823
|
+
} catch (_) {
|
|
5824
|
+
REGEX_SUPPORTS_U_AND_Y2 = false;
|
|
5825
|
+
}
|
|
5826
|
+
var re;
|
|
5827
|
+
var startsWith4 = hasNativeStartsWith2 ? (
|
|
5828
|
+
// Native
|
|
5829
|
+
function startsWith5(s, search, position) {
|
|
5830
|
+
return s.startsWith(search, position);
|
|
5831
|
+
}
|
|
5832
|
+
) : (
|
|
5833
|
+
// For IE11
|
|
5834
|
+
function startsWith6(s, search, position) {
|
|
5835
|
+
return s.slice(position, position + search.length) === search;
|
|
5836
|
+
}
|
|
5837
|
+
);
|
|
5838
|
+
var fromCodePoint3 = hasNativeFromCodePoint2 ? String.fromCodePoint : (
|
|
5839
|
+
// IE11
|
|
5840
|
+
function fromCodePoint4() {
|
|
5841
|
+
var codePoints = [];
|
|
5842
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5843
|
+
codePoints[_i] = arguments[_i];
|
|
5844
|
+
}
|
|
5845
|
+
var elements = "";
|
|
5846
|
+
var length = codePoints.length;
|
|
5847
|
+
var i = 0;
|
|
5848
|
+
var code;
|
|
5849
|
+
while (length > i) {
|
|
5850
|
+
code = codePoints[i++];
|
|
5851
|
+
if (code > 1114111)
|
|
5852
|
+
throw RangeError(code + " is not a valid code point");
|
|
5853
|
+
elements += code < 65536 ? String.fromCharCode(code) : String.fromCharCode(((code -= 65536) >> 10) + 55296, code % 1024 + 56320);
|
|
5854
|
+
}
|
|
5855
|
+
return elements;
|
|
5856
|
+
}
|
|
5857
|
+
);
|
|
5858
|
+
var fromEntries3 = (
|
|
5859
|
+
// native
|
|
5860
|
+
hasNativeFromEntries2 ? Object.fromEntries : (
|
|
5861
|
+
// Ponyfill
|
|
5862
|
+
function fromEntries4(entries) {
|
|
5863
|
+
var obj = {};
|
|
5864
|
+
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
|
|
5865
|
+
var _a3 = entries_1[_i], k = _a3[0], v = _a3[1];
|
|
5866
|
+
obj[k] = v;
|
|
5867
|
+
}
|
|
5868
|
+
return obj;
|
|
5869
|
+
}
|
|
5870
|
+
)
|
|
5871
|
+
);
|
|
5872
|
+
var codePointAt4 = hasNativeCodePointAt2 ? (
|
|
5873
|
+
// Native
|
|
5874
|
+
function codePointAt5(s, index) {
|
|
5875
|
+
return s.codePointAt(index);
|
|
5876
|
+
}
|
|
5877
|
+
) : (
|
|
5878
|
+
// IE 11
|
|
5879
|
+
function codePointAt6(s, index) {
|
|
5880
|
+
var size = s.length;
|
|
5881
|
+
if (index < 0 || index >= size) {
|
|
5882
|
+
return void 0;
|
|
5883
|
+
}
|
|
5884
|
+
var first = s.charCodeAt(index);
|
|
5885
|
+
var second;
|
|
5886
|
+
return first < 55296 || first > 56319 || index + 1 === size || (second = s.charCodeAt(index + 1)) < 56320 || second > 57343 ? first : (first - 55296 << 10) + (second - 56320) + 65536;
|
|
5887
|
+
}
|
|
5888
|
+
);
|
|
5889
|
+
var trimStart4 = hasTrimStart2 ? (
|
|
5890
|
+
// Native
|
|
5891
|
+
function trimStart5(s) {
|
|
5892
|
+
return s.trimStart();
|
|
5893
|
+
}
|
|
5894
|
+
) : (
|
|
5895
|
+
// Ponyfill
|
|
5896
|
+
function trimStart6(s) {
|
|
5897
|
+
return s.replace(SPACE_SEPARATOR_START_REGEX2, "");
|
|
5898
|
+
}
|
|
5899
|
+
);
|
|
5900
|
+
var trimEnd4 = hasTrimEnd2 ? (
|
|
5901
|
+
// Native
|
|
5902
|
+
function trimEnd5(s) {
|
|
5903
|
+
return s.trimEnd();
|
|
5904
|
+
}
|
|
5905
|
+
) : (
|
|
5906
|
+
// Ponyfill
|
|
5907
|
+
function trimEnd6(s) {
|
|
5908
|
+
return s.replace(SPACE_SEPARATOR_END_REGEX2, "");
|
|
5909
|
+
}
|
|
5910
|
+
);
|
|
5911
|
+
function RE2(s, flag) {
|
|
5912
|
+
return new RegExp(s, flag);
|
|
5913
|
+
}
|
|
5914
|
+
var matchIdentifierAtIndex2;
|
|
5915
|
+
if (REGEX_SUPPORTS_U_AND_Y2) {
|
|
5916
|
+
IDENTIFIER_PREFIX_RE_1 = RE2("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
5917
|
+
matchIdentifierAtIndex2 = function matchIdentifierAtIndex3(s, index) {
|
|
5918
|
+
var _a3;
|
|
5919
|
+
IDENTIFIER_PREFIX_RE_1.lastIndex = index;
|
|
5920
|
+
var match = IDENTIFIER_PREFIX_RE_1.exec(s);
|
|
5921
|
+
return (_a3 = match[1]) !== null && _a3 !== void 0 ? _a3 : "";
|
|
5922
|
+
};
|
|
5923
|
+
} else {
|
|
5924
|
+
matchIdentifierAtIndex2 = function matchIdentifierAtIndex3(s, index) {
|
|
5925
|
+
var match = [];
|
|
5926
|
+
while (true) {
|
|
5927
|
+
var c = codePointAt4(s, index);
|
|
5928
|
+
if (c === void 0 || _isWhiteSpace2(c) || _isPatternSyntax2(c)) {
|
|
5929
|
+
break;
|
|
5930
|
+
}
|
|
5931
|
+
match.push(c);
|
|
5932
|
+
index += c >= 65536 ? 2 : 1;
|
|
5933
|
+
}
|
|
5934
|
+
return fromCodePoint3.apply(void 0, match);
|
|
5935
|
+
};
|
|
5936
|
+
}
|
|
5937
|
+
var IDENTIFIER_PREFIX_RE_1;
|
|
5938
|
+
var Parser2 = (
|
|
5939
|
+
/** @class */
|
|
5940
|
+
function() {
|
|
5941
|
+
function Parser3(message, options) {
|
|
5942
|
+
if (options === void 0) {
|
|
5943
|
+
options = {};
|
|
5944
|
+
}
|
|
5945
|
+
this.message = message;
|
|
5946
|
+
this.position = { offset: 0, line: 1, column: 1 };
|
|
5947
|
+
this.ignoreTag = !!options.ignoreTag;
|
|
5948
|
+
this.locale = options.locale;
|
|
5949
|
+
this.requiresOtherClause = !!options.requiresOtherClause;
|
|
5950
|
+
this.shouldParseSkeletons = !!options.shouldParseSkeletons;
|
|
5951
|
+
}
|
|
5952
|
+
Parser3.prototype.parse = function() {
|
|
5953
|
+
if (this.offset() !== 0) {
|
|
5954
|
+
throw Error("parser can only be used once");
|
|
5955
|
+
}
|
|
5956
|
+
return this.parseMessage(0, "", false);
|
|
5957
|
+
};
|
|
5958
|
+
Parser3.prototype.parseMessage = function(nestingLevel, parentArgType, expectingCloseTag) {
|
|
5959
|
+
var elements = [];
|
|
5960
|
+
while (!this.isEOF()) {
|
|
5961
|
+
var char = this.char();
|
|
5962
|
+
if (char === 123) {
|
|
5963
|
+
var result = this.parseArgument(nestingLevel, expectingCloseTag);
|
|
5964
|
+
if (result.err) {
|
|
5965
|
+
return result;
|
|
5966
|
+
}
|
|
5967
|
+
elements.push(result.val);
|
|
5968
|
+
} else if (char === 125 && nestingLevel > 0) {
|
|
5969
|
+
break;
|
|
5970
|
+
} else if (char === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) {
|
|
5971
|
+
var position = this.clonePosition();
|
|
5972
|
+
this.bump();
|
|
5973
|
+
elements.push({
|
|
5974
|
+
type: TYPE2.pound,
|
|
5975
|
+
location: createLocation2(position, this.clonePosition())
|
|
5976
|
+
});
|
|
5977
|
+
} else if (char === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
5978
|
+
if (expectingCloseTag) {
|
|
5979
|
+
break;
|
|
5980
|
+
} else {
|
|
5981
|
+
return this.error(ErrorKind2.UNMATCHED_CLOSING_TAG, createLocation2(this.clonePosition(), this.clonePosition()));
|
|
5982
|
+
}
|
|
5983
|
+
} else if (char === 60 && !this.ignoreTag && _isAlpha2(this.peek() || 0)) {
|
|
5984
|
+
var result = this.parseTag(nestingLevel, parentArgType);
|
|
5985
|
+
if (result.err) {
|
|
5986
|
+
return result;
|
|
5987
|
+
}
|
|
5988
|
+
elements.push(result.val);
|
|
5989
|
+
} else {
|
|
5990
|
+
var result = this.parseLiteral(nestingLevel, parentArgType);
|
|
5991
|
+
if (result.err) {
|
|
5992
|
+
return result;
|
|
5993
|
+
}
|
|
5994
|
+
elements.push(result.val);
|
|
5995
|
+
}
|
|
5996
|
+
}
|
|
5997
|
+
return { val: elements, err: null };
|
|
5998
|
+
};
|
|
5999
|
+
Parser3.prototype.parseTag = function(nestingLevel, parentArgType) {
|
|
6000
|
+
var startPosition = this.clonePosition();
|
|
6001
|
+
this.bump();
|
|
6002
|
+
var tagName = this.parseTagName();
|
|
6003
|
+
this.bumpSpace();
|
|
6004
|
+
if (this.bumpIf("/>")) {
|
|
6005
|
+
return {
|
|
6006
|
+
val: {
|
|
6007
|
+
type: TYPE2.literal,
|
|
6008
|
+
value: "<".concat(tagName, "/>"),
|
|
6009
|
+
location: createLocation2(startPosition, this.clonePosition())
|
|
6010
|
+
},
|
|
6011
|
+
err: null
|
|
6012
|
+
};
|
|
6013
|
+
} else if (this.bumpIf(">")) {
|
|
6014
|
+
var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
|
|
6015
|
+
if (childrenResult.err) {
|
|
6016
|
+
return childrenResult;
|
|
6017
|
+
}
|
|
6018
|
+
var children = childrenResult.val;
|
|
6019
|
+
var endTagStartPosition = this.clonePosition();
|
|
6020
|
+
if (this.bumpIf("</")) {
|
|
6021
|
+
if (this.isEOF() || !_isAlpha2(this.char())) {
|
|
6022
|
+
return this.error(ErrorKind2.INVALID_TAG, createLocation2(endTagStartPosition, this.clonePosition()));
|
|
6023
|
+
}
|
|
6024
|
+
var closingTagNameStartPosition = this.clonePosition();
|
|
6025
|
+
var closingTagName = this.parseTagName();
|
|
6026
|
+
if (tagName !== closingTagName) {
|
|
6027
|
+
return this.error(ErrorKind2.UNMATCHED_CLOSING_TAG, createLocation2(closingTagNameStartPosition, this.clonePosition()));
|
|
6028
|
+
}
|
|
6029
|
+
this.bumpSpace();
|
|
6030
|
+
if (!this.bumpIf(">")) {
|
|
6031
|
+
return this.error(ErrorKind2.INVALID_TAG, createLocation2(endTagStartPosition, this.clonePosition()));
|
|
6032
|
+
}
|
|
6033
|
+
return {
|
|
6034
|
+
val: {
|
|
6035
|
+
type: TYPE2.tag,
|
|
6036
|
+
value: tagName,
|
|
6037
|
+
children,
|
|
6038
|
+
location: createLocation2(startPosition, this.clonePosition())
|
|
6039
|
+
},
|
|
6040
|
+
err: null
|
|
6041
|
+
};
|
|
6042
|
+
} else {
|
|
6043
|
+
return this.error(ErrorKind2.UNCLOSED_TAG, createLocation2(startPosition, this.clonePosition()));
|
|
6044
|
+
}
|
|
6045
|
+
} else {
|
|
6046
|
+
return this.error(ErrorKind2.INVALID_TAG, createLocation2(startPosition, this.clonePosition()));
|
|
6047
|
+
}
|
|
6048
|
+
};
|
|
6049
|
+
Parser3.prototype.parseTagName = function() {
|
|
6050
|
+
var startOffset = this.offset();
|
|
6051
|
+
this.bump();
|
|
6052
|
+
while (!this.isEOF() && _isPotentialElementNameChar2(this.char())) {
|
|
6053
|
+
this.bump();
|
|
6054
|
+
}
|
|
6055
|
+
return this.message.slice(startOffset, this.offset());
|
|
6056
|
+
};
|
|
6057
|
+
Parser3.prototype.parseLiteral = function(nestingLevel, parentArgType) {
|
|
6058
|
+
var start = this.clonePosition();
|
|
6059
|
+
var value = "";
|
|
6060
|
+
while (true) {
|
|
6061
|
+
var parseQuoteResult = this.tryParseQuote(parentArgType);
|
|
6062
|
+
if (parseQuoteResult) {
|
|
6063
|
+
value += parseQuoteResult;
|
|
6064
|
+
continue;
|
|
6065
|
+
}
|
|
6066
|
+
var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
|
|
6067
|
+
if (parseUnquotedResult) {
|
|
6068
|
+
value += parseUnquotedResult;
|
|
6069
|
+
continue;
|
|
6070
|
+
}
|
|
6071
|
+
var parseLeftAngleResult = this.tryParseLeftAngleBracket();
|
|
6072
|
+
if (parseLeftAngleResult) {
|
|
6073
|
+
value += parseLeftAngleResult;
|
|
6074
|
+
continue;
|
|
6075
|
+
}
|
|
6076
|
+
break;
|
|
6077
|
+
}
|
|
6078
|
+
var location = createLocation2(start, this.clonePosition());
|
|
6079
|
+
return {
|
|
6080
|
+
val: { type: TYPE2.literal, value, location },
|
|
6081
|
+
err: null
|
|
6082
|
+
};
|
|
6083
|
+
};
|
|
6084
|
+
Parser3.prototype.tryParseLeftAngleBracket = function() {
|
|
6085
|
+
if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
|
|
6086
|
+
!_isAlphaOrSlash2(this.peek() || 0))) {
|
|
6087
|
+
this.bump();
|
|
6088
|
+
return "<";
|
|
6089
|
+
}
|
|
6090
|
+
return null;
|
|
6091
|
+
};
|
|
6092
|
+
Parser3.prototype.tryParseQuote = function(parentArgType) {
|
|
6093
|
+
if (this.isEOF() || this.char() !== 39) {
|
|
6094
|
+
return null;
|
|
6095
|
+
}
|
|
6096
|
+
switch (this.peek()) {
|
|
6097
|
+
case 39:
|
|
6098
|
+
this.bump();
|
|
6099
|
+
this.bump();
|
|
6100
|
+
return "'";
|
|
6101
|
+
case 123:
|
|
6102
|
+
case 60:
|
|
6103
|
+
case 62:
|
|
6104
|
+
case 125:
|
|
6105
|
+
break;
|
|
6106
|
+
case 35:
|
|
6107
|
+
if (parentArgType === "plural" || parentArgType === "selectordinal") {
|
|
6108
|
+
break;
|
|
6109
|
+
}
|
|
6110
|
+
return null;
|
|
6111
|
+
default:
|
|
6112
|
+
return null;
|
|
6113
|
+
}
|
|
6114
|
+
this.bump();
|
|
6115
|
+
var codePoints = [this.char()];
|
|
6116
|
+
this.bump();
|
|
6117
|
+
while (!this.isEOF()) {
|
|
6118
|
+
var ch = this.char();
|
|
6119
|
+
if (ch === 39) {
|
|
6120
|
+
if (this.peek() === 39) {
|
|
6121
|
+
codePoints.push(39);
|
|
6122
|
+
this.bump();
|
|
6123
|
+
} else {
|
|
6124
|
+
this.bump();
|
|
6125
|
+
break;
|
|
6126
|
+
}
|
|
6127
|
+
} else {
|
|
6128
|
+
codePoints.push(ch);
|
|
6129
|
+
}
|
|
6130
|
+
this.bump();
|
|
6131
|
+
}
|
|
6132
|
+
return fromCodePoint3.apply(void 0, codePoints);
|
|
6133
|
+
};
|
|
6134
|
+
Parser3.prototype.tryParseUnquoted = function(nestingLevel, parentArgType) {
|
|
6135
|
+
if (this.isEOF()) {
|
|
6136
|
+
return null;
|
|
6137
|
+
}
|
|
6138
|
+
var ch = this.char();
|
|
6139
|
+
if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) {
|
|
6140
|
+
return null;
|
|
6141
|
+
} else {
|
|
6142
|
+
this.bump();
|
|
6143
|
+
return fromCodePoint3(ch);
|
|
6144
|
+
}
|
|
6145
|
+
};
|
|
6146
|
+
Parser3.prototype.parseArgument = function(nestingLevel, expectingCloseTag) {
|
|
6147
|
+
var openingBracePosition = this.clonePosition();
|
|
6148
|
+
this.bump();
|
|
6149
|
+
this.bumpSpace();
|
|
6150
|
+
if (this.isEOF()) {
|
|
6151
|
+
return this.error(ErrorKind2.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation2(openingBracePosition, this.clonePosition()));
|
|
6152
|
+
}
|
|
6153
|
+
if (this.char() === 125) {
|
|
6154
|
+
this.bump();
|
|
6155
|
+
return this.error(ErrorKind2.EMPTY_ARGUMENT, createLocation2(openingBracePosition, this.clonePosition()));
|
|
6156
|
+
}
|
|
6157
|
+
var value = this.parseIdentifierIfPossible().value;
|
|
6158
|
+
if (!value) {
|
|
6159
|
+
return this.error(ErrorKind2.MALFORMED_ARGUMENT, createLocation2(openingBracePosition, this.clonePosition()));
|
|
6160
|
+
}
|
|
6161
|
+
this.bumpSpace();
|
|
6162
|
+
if (this.isEOF()) {
|
|
6163
|
+
return this.error(ErrorKind2.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation2(openingBracePosition, this.clonePosition()));
|
|
6164
|
+
}
|
|
6165
|
+
switch (this.char()) {
|
|
6166
|
+
case 125: {
|
|
6167
|
+
this.bump();
|
|
6168
|
+
return {
|
|
6169
|
+
val: {
|
|
6170
|
+
type: TYPE2.argument,
|
|
6171
|
+
// value does not include the opening and closing braces.
|
|
6172
|
+
value,
|
|
6173
|
+
location: createLocation2(openingBracePosition, this.clonePosition())
|
|
6174
|
+
},
|
|
6175
|
+
err: null
|
|
6176
|
+
};
|
|
6177
|
+
}
|
|
6178
|
+
case 44: {
|
|
6179
|
+
this.bump();
|
|
6180
|
+
this.bumpSpace();
|
|
6181
|
+
if (this.isEOF()) {
|
|
6182
|
+
return this.error(ErrorKind2.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation2(openingBracePosition, this.clonePosition()));
|
|
6183
|
+
}
|
|
6184
|
+
return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);
|
|
6185
|
+
}
|
|
6186
|
+
default:
|
|
6187
|
+
return this.error(ErrorKind2.MALFORMED_ARGUMENT, createLocation2(openingBracePosition, this.clonePosition()));
|
|
6188
|
+
}
|
|
6189
|
+
};
|
|
6190
|
+
Parser3.prototype.parseIdentifierIfPossible = function() {
|
|
6191
|
+
var startingPosition = this.clonePosition();
|
|
6192
|
+
var startOffset = this.offset();
|
|
6193
|
+
var value = matchIdentifierAtIndex2(this.message, startOffset);
|
|
6194
|
+
var endOffset = startOffset + value.length;
|
|
6195
|
+
this.bumpTo(endOffset);
|
|
6196
|
+
var endPosition = this.clonePosition();
|
|
6197
|
+
var location = createLocation2(startingPosition, endPosition);
|
|
6198
|
+
return { value, location };
|
|
6199
|
+
};
|
|
6200
|
+
Parser3.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
|
|
6201
|
+
var _a3;
|
|
6202
|
+
var typeStartPosition = this.clonePosition();
|
|
6203
|
+
var argType = this.parseIdentifierIfPossible().value;
|
|
6204
|
+
var typeEndPosition = this.clonePosition();
|
|
6205
|
+
switch (argType) {
|
|
6206
|
+
case "":
|
|
6207
|
+
return this.error(ErrorKind2.EXPECT_ARGUMENT_TYPE, createLocation2(typeStartPosition, typeEndPosition));
|
|
6208
|
+
case "number":
|
|
6209
|
+
case "date":
|
|
6210
|
+
case "time": {
|
|
6211
|
+
this.bumpSpace();
|
|
6212
|
+
var styleAndLocation = null;
|
|
6213
|
+
if (this.bumpIf(",")) {
|
|
6214
|
+
this.bumpSpace();
|
|
6215
|
+
var styleStartPosition = this.clonePosition();
|
|
6216
|
+
var result = this.parseSimpleArgStyleIfPossible();
|
|
6217
|
+
if (result.err) {
|
|
6218
|
+
return result;
|
|
6219
|
+
}
|
|
6220
|
+
var style = trimEnd4(result.val);
|
|
6221
|
+
if (style.length === 0) {
|
|
6222
|
+
return this.error(ErrorKind2.EXPECT_ARGUMENT_STYLE, createLocation2(this.clonePosition(), this.clonePosition()));
|
|
6223
|
+
}
|
|
6224
|
+
var styleLocation = createLocation2(styleStartPosition, this.clonePosition());
|
|
6225
|
+
styleAndLocation = { style, styleLocation };
|
|
6226
|
+
}
|
|
6227
|
+
var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
|
|
6228
|
+
if (argCloseResult.err) {
|
|
6229
|
+
return argCloseResult;
|
|
6230
|
+
}
|
|
6231
|
+
var location_1 = createLocation2(openingBracePosition, this.clonePosition());
|
|
6232
|
+
if (styleAndLocation && startsWith4(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, "::", 0)) {
|
|
6233
|
+
var skeleton = trimStart4(styleAndLocation.style.slice(2));
|
|
6234
|
+
if (argType === "number") {
|
|
6235
|
+
var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
|
|
6236
|
+
if (result.err) {
|
|
6237
|
+
return result;
|
|
6238
|
+
}
|
|
6239
|
+
return {
|
|
6240
|
+
val: { type: TYPE2.number, value, location: location_1, style: result.val },
|
|
6241
|
+
err: null
|
|
6242
|
+
};
|
|
6243
|
+
} else {
|
|
6244
|
+
if (skeleton.length === 0) {
|
|
6245
|
+
return this.error(ErrorKind2.EXPECT_DATE_TIME_SKELETON, location_1);
|
|
6246
|
+
}
|
|
6247
|
+
var dateTimePattern = skeleton;
|
|
6248
|
+
if (this.locale) {
|
|
6249
|
+
dateTimePattern = getBestPattern2(skeleton, this.locale);
|
|
6250
|
+
}
|
|
6251
|
+
var style = {
|
|
6252
|
+
type: SKELETON_TYPE2.dateTime,
|
|
6253
|
+
pattern: dateTimePattern,
|
|
6254
|
+
location: styleAndLocation.styleLocation,
|
|
6255
|
+
parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton2(dateTimePattern) : {}
|
|
6256
|
+
};
|
|
6257
|
+
var type = argType === "date" ? TYPE2.date : TYPE2.time;
|
|
6258
|
+
return {
|
|
6259
|
+
val: { type, value, location: location_1, style },
|
|
6260
|
+
err: null
|
|
6261
|
+
};
|
|
6262
|
+
}
|
|
6263
|
+
}
|
|
6264
|
+
return {
|
|
6265
|
+
val: {
|
|
6266
|
+
type: argType === "number" ? TYPE2.number : argType === "date" ? TYPE2.date : TYPE2.time,
|
|
6267
|
+
value,
|
|
6268
|
+
location: location_1,
|
|
6269
|
+
style: (_a3 = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a3 !== void 0 ? _a3 : null
|
|
6270
|
+
},
|
|
6271
|
+
err: null
|
|
6272
|
+
};
|
|
6273
|
+
}
|
|
6274
|
+
case "plural":
|
|
6275
|
+
case "selectordinal":
|
|
6276
|
+
case "select": {
|
|
6277
|
+
var typeEndPosition_1 = this.clonePosition();
|
|
6278
|
+
this.bumpSpace();
|
|
6279
|
+
if (!this.bumpIf(",")) {
|
|
6280
|
+
return this.error(ErrorKind2.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation2(typeEndPosition_1, __assign({}, typeEndPosition_1)));
|
|
6281
|
+
}
|
|
6282
|
+
this.bumpSpace();
|
|
6283
|
+
var identifierAndLocation = this.parseIdentifierIfPossible();
|
|
6284
|
+
var pluralOffset = 0;
|
|
6285
|
+
if (argType !== "select" && identifierAndLocation.value === "offset") {
|
|
6286
|
+
if (!this.bumpIf(":")) {
|
|
6287
|
+
return this.error(ErrorKind2.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation2(this.clonePosition(), this.clonePosition()));
|
|
6288
|
+
}
|
|
6289
|
+
this.bumpSpace();
|
|
6290
|
+
var result = this.tryParseDecimalInteger(ErrorKind2.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind2.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
|
|
6291
|
+
if (result.err) {
|
|
6292
|
+
return result;
|
|
6293
|
+
}
|
|
6294
|
+
this.bumpSpace();
|
|
6295
|
+
identifierAndLocation = this.parseIdentifierIfPossible();
|
|
6296
|
+
pluralOffset = result.val;
|
|
6297
|
+
}
|
|
6298
|
+
var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
|
|
6299
|
+
if (optionsResult.err) {
|
|
6300
|
+
return optionsResult;
|
|
6301
|
+
}
|
|
6302
|
+
var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
|
|
6303
|
+
if (argCloseResult.err) {
|
|
6304
|
+
return argCloseResult;
|
|
6305
|
+
}
|
|
6306
|
+
var location_2 = createLocation2(openingBracePosition, this.clonePosition());
|
|
6307
|
+
if (argType === "select") {
|
|
6308
|
+
return {
|
|
6309
|
+
val: {
|
|
6310
|
+
type: TYPE2.select,
|
|
6311
|
+
value,
|
|
6312
|
+
options: fromEntries3(optionsResult.val),
|
|
6313
|
+
location: location_2
|
|
6314
|
+
},
|
|
6315
|
+
err: null
|
|
6316
|
+
};
|
|
6317
|
+
} else {
|
|
6318
|
+
return {
|
|
6319
|
+
val: {
|
|
6320
|
+
type: TYPE2.plural,
|
|
6321
|
+
value,
|
|
6322
|
+
options: fromEntries3(optionsResult.val),
|
|
6323
|
+
offset: pluralOffset,
|
|
6324
|
+
pluralType: argType === "plural" ? "cardinal" : "ordinal",
|
|
6325
|
+
location: location_2
|
|
6326
|
+
},
|
|
6327
|
+
err: null
|
|
6328
|
+
};
|
|
6329
|
+
}
|
|
6330
|
+
}
|
|
6331
|
+
default:
|
|
6332
|
+
return this.error(ErrorKind2.INVALID_ARGUMENT_TYPE, createLocation2(typeStartPosition, typeEndPosition));
|
|
6333
|
+
}
|
|
6334
|
+
};
|
|
6335
|
+
Parser3.prototype.tryParseArgumentClose = function(openingBracePosition) {
|
|
6336
|
+
if (this.isEOF() || this.char() !== 125) {
|
|
6337
|
+
return this.error(ErrorKind2.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation2(openingBracePosition, this.clonePosition()));
|
|
6338
|
+
}
|
|
6339
|
+
this.bump();
|
|
6340
|
+
return { val: true, err: null };
|
|
6341
|
+
};
|
|
6342
|
+
Parser3.prototype.parseSimpleArgStyleIfPossible = function() {
|
|
6343
|
+
var nestedBraces = 0;
|
|
6344
|
+
var startPosition = this.clonePosition();
|
|
6345
|
+
while (!this.isEOF()) {
|
|
6346
|
+
var ch = this.char();
|
|
6347
|
+
switch (ch) {
|
|
6348
|
+
case 39: {
|
|
6349
|
+
this.bump();
|
|
6350
|
+
var apostrophePosition = this.clonePosition();
|
|
6351
|
+
if (!this.bumpUntil("'")) {
|
|
6352
|
+
return this.error(ErrorKind2.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation2(apostrophePosition, this.clonePosition()));
|
|
6353
|
+
}
|
|
6354
|
+
this.bump();
|
|
6355
|
+
break;
|
|
6356
|
+
}
|
|
6357
|
+
case 123: {
|
|
6358
|
+
nestedBraces += 1;
|
|
6359
|
+
this.bump();
|
|
6360
|
+
break;
|
|
6361
|
+
}
|
|
6362
|
+
case 125: {
|
|
6363
|
+
if (nestedBraces > 0) {
|
|
6364
|
+
nestedBraces -= 1;
|
|
6365
|
+
} else {
|
|
6366
|
+
return {
|
|
6367
|
+
val: this.message.slice(startPosition.offset, this.offset()),
|
|
6368
|
+
err: null
|
|
6369
|
+
};
|
|
6370
|
+
}
|
|
6371
|
+
break;
|
|
6372
|
+
}
|
|
6373
|
+
default:
|
|
6374
|
+
this.bump();
|
|
6375
|
+
break;
|
|
6376
|
+
}
|
|
6377
|
+
}
|
|
6378
|
+
return {
|
|
6379
|
+
val: this.message.slice(startPosition.offset, this.offset()),
|
|
6380
|
+
err: null
|
|
6381
|
+
};
|
|
6382
|
+
};
|
|
6383
|
+
Parser3.prototype.parseNumberSkeletonFromString = function(skeleton, location) {
|
|
6384
|
+
var tokens = [];
|
|
6385
|
+
try {
|
|
6386
|
+
tokens = parseNumberSkeletonFromString2(skeleton);
|
|
6387
|
+
} catch (e) {
|
|
6388
|
+
return this.error(ErrorKind2.INVALID_NUMBER_SKELETON, location);
|
|
6389
|
+
}
|
|
6390
|
+
return {
|
|
6391
|
+
val: {
|
|
6392
|
+
type: SKELETON_TYPE2.number,
|
|
6393
|
+
tokens,
|
|
6394
|
+
location,
|
|
6395
|
+
parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton2(tokens) : {}
|
|
6396
|
+
},
|
|
6397
|
+
err: null
|
|
6398
|
+
};
|
|
6399
|
+
};
|
|
6400
|
+
Parser3.prototype.tryParsePluralOrSelectOptions = function(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
|
|
6401
|
+
var _a3;
|
|
6402
|
+
var hasOtherClause = false;
|
|
6403
|
+
var options = [];
|
|
6404
|
+
var parsedSelectors = /* @__PURE__ */ new Set();
|
|
6405
|
+
var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;
|
|
6406
|
+
while (true) {
|
|
6407
|
+
if (selector.length === 0) {
|
|
6408
|
+
var startPosition = this.clonePosition();
|
|
6409
|
+
if (parentArgType !== "select" && this.bumpIf("=")) {
|
|
6410
|
+
var result = this.tryParseDecimalInteger(ErrorKind2.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind2.INVALID_PLURAL_ARGUMENT_SELECTOR);
|
|
6411
|
+
if (result.err) {
|
|
6412
|
+
return result;
|
|
6413
|
+
}
|
|
6414
|
+
selectorLocation = createLocation2(startPosition, this.clonePosition());
|
|
6415
|
+
selector = this.message.slice(startPosition.offset, this.offset());
|
|
6416
|
+
} else {
|
|
6417
|
+
break;
|
|
6418
|
+
}
|
|
6419
|
+
}
|
|
6420
|
+
if (parsedSelectors.has(selector)) {
|
|
6421
|
+
return this.error(parentArgType === "select" ? ErrorKind2.DUPLICATE_SELECT_ARGUMENT_SELECTOR : ErrorKind2.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);
|
|
6422
|
+
}
|
|
6423
|
+
if (selector === "other") {
|
|
6424
|
+
hasOtherClause = true;
|
|
6425
|
+
}
|
|
6426
|
+
this.bumpSpace();
|
|
6427
|
+
var openingBracePosition = this.clonePosition();
|
|
6428
|
+
if (!this.bumpIf("{")) {
|
|
6429
|
+
return this.error(parentArgType === "select" ? ErrorKind2.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind2.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation2(this.clonePosition(), this.clonePosition()));
|
|
6430
|
+
}
|
|
6431
|
+
var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
|
|
6432
|
+
if (fragmentResult.err) {
|
|
6433
|
+
return fragmentResult;
|
|
6434
|
+
}
|
|
6435
|
+
var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
|
|
6436
|
+
if (argCloseResult.err) {
|
|
6437
|
+
return argCloseResult;
|
|
6438
|
+
}
|
|
6439
|
+
options.push([
|
|
6440
|
+
selector,
|
|
6441
|
+
{
|
|
6442
|
+
value: fragmentResult.val,
|
|
6443
|
+
location: createLocation2(openingBracePosition, this.clonePosition())
|
|
6444
|
+
}
|
|
6445
|
+
]);
|
|
6446
|
+
parsedSelectors.add(selector);
|
|
6447
|
+
this.bumpSpace();
|
|
6448
|
+
_a3 = this.parseIdentifierIfPossible(), selector = _a3.value, selectorLocation = _a3.location;
|
|
6449
|
+
}
|
|
6450
|
+
if (options.length === 0) {
|
|
6451
|
+
return this.error(parentArgType === "select" ? ErrorKind2.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind2.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation2(this.clonePosition(), this.clonePosition()));
|
|
6452
|
+
}
|
|
6453
|
+
if (this.requiresOtherClause && !hasOtherClause) {
|
|
6454
|
+
return this.error(ErrorKind2.MISSING_OTHER_CLAUSE, createLocation2(this.clonePosition(), this.clonePosition()));
|
|
6455
|
+
}
|
|
6456
|
+
return { val: options, err: null };
|
|
6457
|
+
};
|
|
6458
|
+
Parser3.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
|
|
6459
|
+
var sign = 1;
|
|
6460
|
+
var startingPosition = this.clonePosition();
|
|
6461
|
+
if (this.bumpIf("+")) {
|
|
6462
|
+
} else if (this.bumpIf("-")) {
|
|
6463
|
+
sign = -1;
|
|
6464
|
+
}
|
|
6465
|
+
var hasDigits = false;
|
|
6466
|
+
var decimal = 0;
|
|
6467
|
+
while (!this.isEOF()) {
|
|
6468
|
+
var ch = this.char();
|
|
6469
|
+
if (ch >= 48 && ch <= 57) {
|
|
6470
|
+
hasDigits = true;
|
|
6471
|
+
decimal = decimal * 10 + (ch - 48);
|
|
6472
|
+
this.bump();
|
|
6473
|
+
} else {
|
|
6474
|
+
break;
|
|
6475
|
+
}
|
|
6476
|
+
}
|
|
6477
|
+
var location = createLocation2(startingPosition, this.clonePosition());
|
|
6478
|
+
if (!hasDigits) {
|
|
6479
|
+
return this.error(expectNumberError, location);
|
|
6480
|
+
}
|
|
6481
|
+
decimal *= sign;
|
|
6482
|
+
if (!isSafeInteger2(decimal)) {
|
|
6483
|
+
return this.error(invalidNumberError, location);
|
|
6484
|
+
}
|
|
6485
|
+
return { val: decimal, err: null };
|
|
6486
|
+
};
|
|
6487
|
+
Parser3.prototype.offset = function() {
|
|
6488
|
+
return this.position.offset;
|
|
6489
|
+
};
|
|
6490
|
+
Parser3.prototype.isEOF = function() {
|
|
6491
|
+
return this.offset() === this.message.length;
|
|
6492
|
+
};
|
|
6493
|
+
Parser3.prototype.clonePosition = function() {
|
|
6494
|
+
return {
|
|
6495
|
+
offset: this.position.offset,
|
|
6496
|
+
line: this.position.line,
|
|
6497
|
+
column: this.position.column
|
|
6498
|
+
};
|
|
6499
|
+
};
|
|
6500
|
+
Parser3.prototype.char = function() {
|
|
6501
|
+
var offset = this.position.offset;
|
|
6502
|
+
if (offset >= this.message.length) {
|
|
6503
|
+
throw Error("out of bound");
|
|
6504
|
+
}
|
|
6505
|
+
var code = codePointAt4(this.message, offset);
|
|
6506
|
+
if (code === void 0) {
|
|
6507
|
+
throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
|
|
6508
|
+
}
|
|
6509
|
+
return code;
|
|
6510
|
+
};
|
|
6511
|
+
Parser3.prototype.error = function(kind, location) {
|
|
6512
|
+
return {
|
|
6513
|
+
val: null,
|
|
6514
|
+
err: {
|
|
6515
|
+
kind,
|
|
6516
|
+
message: this.message,
|
|
6517
|
+
location
|
|
6518
|
+
}
|
|
6519
|
+
};
|
|
6520
|
+
};
|
|
6521
|
+
Parser3.prototype.bump = function() {
|
|
6522
|
+
if (this.isEOF()) {
|
|
6523
|
+
return;
|
|
6524
|
+
}
|
|
6525
|
+
var code = this.char();
|
|
6526
|
+
if (code === 10) {
|
|
6527
|
+
this.position.line += 1;
|
|
6528
|
+
this.position.column = 1;
|
|
6529
|
+
this.position.offset += 1;
|
|
6530
|
+
} else {
|
|
6531
|
+
this.position.column += 1;
|
|
6532
|
+
this.position.offset += code < 65536 ? 1 : 2;
|
|
6533
|
+
}
|
|
6534
|
+
};
|
|
6535
|
+
Parser3.prototype.bumpIf = function(prefix) {
|
|
6536
|
+
if (startsWith4(this.message, prefix, this.offset())) {
|
|
6537
|
+
for (var i = 0; i < prefix.length; i++) {
|
|
6538
|
+
this.bump();
|
|
6539
|
+
}
|
|
6540
|
+
return true;
|
|
6541
|
+
}
|
|
6542
|
+
return false;
|
|
6543
|
+
};
|
|
6544
|
+
Parser3.prototype.bumpUntil = function(pattern) {
|
|
6545
|
+
var currentOffset = this.offset();
|
|
6546
|
+
var index = this.message.indexOf(pattern, currentOffset);
|
|
6547
|
+
if (index >= 0) {
|
|
6548
|
+
this.bumpTo(index);
|
|
6549
|
+
return true;
|
|
6550
|
+
} else {
|
|
6551
|
+
this.bumpTo(this.message.length);
|
|
6552
|
+
return false;
|
|
6553
|
+
}
|
|
6554
|
+
};
|
|
6555
|
+
Parser3.prototype.bumpTo = function(targetOffset) {
|
|
6556
|
+
if (this.offset() > targetOffset) {
|
|
6557
|
+
throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
|
|
6558
|
+
}
|
|
6559
|
+
targetOffset = Math.min(targetOffset, this.message.length);
|
|
6560
|
+
while (true) {
|
|
6561
|
+
var offset = this.offset();
|
|
6562
|
+
if (offset === targetOffset) {
|
|
6563
|
+
break;
|
|
6564
|
+
}
|
|
6565
|
+
if (offset > targetOffset) {
|
|
6566
|
+
throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
|
|
6567
|
+
}
|
|
6568
|
+
this.bump();
|
|
6569
|
+
if (this.isEOF()) {
|
|
6570
|
+
break;
|
|
6571
|
+
}
|
|
6572
|
+
}
|
|
6573
|
+
};
|
|
6574
|
+
Parser3.prototype.bumpSpace = function() {
|
|
6575
|
+
while (!this.isEOF() && _isWhiteSpace2(this.char())) {
|
|
6576
|
+
this.bump();
|
|
6577
|
+
}
|
|
6578
|
+
};
|
|
6579
|
+
Parser3.prototype.peek = function() {
|
|
6580
|
+
if (this.isEOF()) {
|
|
6581
|
+
return null;
|
|
6582
|
+
}
|
|
6583
|
+
var code = this.char();
|
|
6584
|
+
var offset = this.offset();
|
|
6585
|
+
var nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1));
|
|
6586
|
+
return nextCode !== null && nextCode !== void 0 ? nextCode : null;
|
|
6587
|
+
};
|
|
6588
|
+
return Parser3;
|
|
6589
|
+
}()
|
|
6590
|
+
);
|
|
6591
|
+
function _isAlpha2(codepoint) {
|
|
6592
|
+
return codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90;
|
|
6593
|
+
}
|
|
6594
|
+
function _isAlphaOrSlash2(codepoint) {
|
|
6595
|
+
return _isAlpha2(codepoint) || codepoint === 47;
|
|
6596
|
+
}
|
|
6597
|
+
function _isPotentialElementNameChar2(c) {
|
|
6598
|
+
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;
|
|
6599
|
+
}
|
|
6600
|
+
function _isWhiteSpace2(c) {
|
|
6601
|
+
return c >= 9 && c <= 13 || c === 32 || c === 133 || c >= 8206 && c <= 8207 || c === 8232 || c === 8233;
|
|
6602
|
+
}
|
|
6603
|
+
function _isPatternSyntax2(c) {
|
|
6604
|
+
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;
|
|
6605
|
+
}
|
|
6606
|
+
|
|
6607
|
+
// ../../node_modules/@formatjs/intl/lib/src/message.js
|
|
6608
|
+
function setTimeZoneInOptions(opts, timeZone) {
|
|
6609
|
+
return Object.keys(opts).reduce(function(all, k) {
|
|
6610
|
+
all[k] = __assign({ timeZone }, opts[k]);
|
|
6611
|
+
return all;
|
|
6612
|
+
}, {});
|
|
6613
|
+
}
|
|
6614
|
+
function deepMergeOptions(opts1, opts2) {
|
|
6615
|
+
var keys = Object.keys(__assign(__assign({}, opts1), opts2));
|
|
6616
|
+
return keys.reduce(function(all, k) {
|
|
6617
|
+
all[k] = __assign(__assign({}, opts1[k] || {}), opts2[k] || {});
|
|
6618
|
+
return all;
|
|
6619
|
+
}, {});
|
|
6620
|
+
}
|
|
6621
|
+
function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
|
|
6622
|
+
if (!timeZone) {
|
|
6623
|
+
return f1;
|
|
6624
|
+
}
|
|
6625
|
+
var mfFormats = IntlMessageFormat.formats;
|
|
6626
|
+
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)) });
|
|
6627
|
+
}
|
|
6628
|
+
var formatMessage = function(_a3, state, messageDescriptor, values, opts) {
|
|
6629
|
+
var locale = _a3.locale, formats = _a3.formats, messages = _a3.messages, defaultLocale = _a3.defaultLocale, defaultFormats = _a3.defaultFormats, fallbackOnEmptyString = _a3.fallbackOnEmptyString, onError = _a3.onError, timeZone = _a3.timeZone, defaultRichTextElements = _a3.defaultRichTextElements;
|
|
6630
|
+
if (messageDescriptor === void 0) {
|
|
6631
|
+
messageDescriptor = { id: "" };
|
|
6632
|
+
}
|
|
6633
|
+
var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
|
|
6634
|
+
invariant2(!!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");
|
|
6635
|
+
var id = String(msgId);
|
|
6636
|
+
var message = (
|
|
6637
|
+
// In case messages is Object.create(null)
|
|
6638
|
+
// e.g import('foo.json') from webpack)
|
|
6639
|
+
// See https://github.com/formatjs/formatjs/issues/1914
|
|
6640
|
+
messages && Object.prototype.hasOwnProperty.call(messages, id) && messages[id]
|
|
6641
|
+
);
|
|
6642
|
+
if (Array.isArray(message) && message.length === 1 && message[0].type === TYPE2.literal) {
|
|
6643
|
+
return message[0].value;
|
|
6644
|
+
}
|
|
6645
|
+
if (!values && message && typeof message === "string" && !defaultRichTextElements) {
|
|
6646
|
+
return message.replace(/'\{(.*?)\}'/gi, "{$1}");
|
|
6647
|
+
}
|
|
6648
|
+
values = __assign(__assign({}, defaultRichTextElements), values || {});
|
|
6649
|
+
formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
|
|
6650
|
+
defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
|
|
6651
|
+
if (!message) {
|
|
6652
|
+
if (fallbackOnEmptyString === false && message === "") {
|
|
6653
|
+
return message;
|
|
6654
|
+
}
|
|
6655
|
+
if (!defaultMessage || locale && locale.toLowerCase() !== defaultLocale.toLowerCase()) {
|
|
6656
|
+
onError(new MissingTranslationError(messageDescriptor, locale));
|
|
6657
|
+
}
|
|
6658
|
+
if (defaultMessage) {
|
|
6659
|
+
try {
|
|
6660
|
+
var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);
|
|
6661
|
+
return formatter.format(values);
|
|
6662
|
+
} catch (e) {
|
|
6663
|
+
onError(new MessageFormatError('Error formatting default message for: "'.concat(id, '", rendering default message verbatim'), locale, messageDescriptor, e));
|
|
6664
|
+
return typeof defaultMessage === "string" ? defaultMessage : id;
|
|
6665
|
+
}
|
|
6666
|
+
}
|
|
6667
|
+
return id;
|
|
6668
|
+
}
|
|
6669
|
+
try {
|
|
6670
|
+
var formatter = state.getMessageFormat(message, locale, formats, __assign({ formatters: state }, opts || {}));
|
|
6671
|
+
return formatter.format(values);
|
|
6672
|
+
} catch (e) {
|
|
6673
|
+
onError(new MessageFormatError('Error formatting message: "'.concat(id, '", using ').concat(defaultMessage ? "default message" : "id", " as fallback."), locale, messageDescriptor, e));
|
|
6674
|
+
}
|
|
6675
|
+
if (defaultMessage) {
|
|
6676
|
+
try {
|
|
6677
|
+
var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);
|
|
6678
|
+
return formatter.format(values);
|
|
6679
|
+
} catch (e) {
|
|
6680
|
+
onError(new MessageFormatError('Error formatting the default message for: "'.concat(id, '", rendering message verbatim'), locale, messageDescriptor, e));
|
|
6681
|
+
}
|
|
6682
|
+
}
|
|
6683
|
+
if (typeof message === "string") {
|
|
6684
|
+
return message;
|
|
6685
|
+
}
|
|
6686
|
+
if (typeof defaultMessage === "string") {
|
|
6687
|
+
return defaultMessage;
|
|
6688
|
+
}
|
|
6689
|
+
return id;
|
|
6690
|
+
};
|
|
6691
|
+
|
|
6692
|
+
// ../../node_modules/@formatjs/intl/lib/src/dateTime.js
|
|
6693
|
+
var DATE_TIME_FORMAT_OPTIONS = [
|
|
6694
|
+
"formatMatcher",
|
|
6695
|
+
"timeZone",
|
|
6696
|
+
"hour12",
|
|
6697
|
+
"weekday",
|
|
6698
|
+
"era",
|
|
6699
|
+
"year",
|
|
6700
|
+
"month",
|
|
6701
|
+
"day",
|
|
6702
|
+
"hour",
|
|
6703
|
+
"minute",
|
|
6704
|
+
"second",
|
|
6705
|
+
"timeZoneName",
|
|
6706
|
+
"hourCycle",
|
|
6707
|
+
"dateStyle",
|
|
6708
|
+
"timeStyle",
|
|
6709
|
+
"calendar",
|
|
6710
|
+
// 'dayPeriod',
|
|
6711
|
+
"numberingSystem",
|
|
6712
|
+
"fractionalSecondDigits"
|
|
6713
|
+
];
|
|
6714
|
+
function getFormatter(_a3, type, getDateTimeFormat, options) {
|
|
6715
|
+
var locale = _a3.locale, formats = _a3.formats, onError = _a3.onError, timeZone = _a3.timeZone;
|
|
6716
|
+
if (options === void 0) {
|
|
6717
|
+
options = {};
|
|
6718
|
+
}
|
|
6719
|
+
var format = options.format;
|
|
6720
|
+
var defaults = __assign(__assign({}, timeZone && { timeZone }), format && getNamedFormat(formats, type, format, onError));
|
|
6721
|
+
var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
|
|
6722
|
+
if (type === "time" && !filteredOptions.hour && !filteredOptions.minute && !filteredOptions.second && !filteredOptions.timeStyle && !filteredOptions.dateStyle) {
|
|
6723
|
+
filteredOptions = __assign(__assign({}, filteredOptions), { hour: "numeric", minute: "numeric" });
|
|
6724
|
+
}
|
|
6725
|
+
return getDateTimeFormat(locale, filteredOptions);
|
|
6726
|
+
}
|
|
6727
|
+
function formatDate(config, getDateTimeFormat) {
|
|
6728
|
+
var _a3 = [];
|
|
6729
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
6730
|
+
_a3[_i - 2] = arguments[_i];
|
|
6731
|
+
}
|
|
6732
|
+
var value = _a3[0], _b = _a3[1], options = _b === void 0 ? {} : _b;
|
|
6733
|
+
var date = typeof value === "string" ? new Date(value || 0) : value;
|
|
6734
|
+
try {
|
|
6735
|
+
return getFormatter(config, "date", getDateTimeFormat, options).format(date);
|
|
6736
|
+
} catch (e) {
|
|
6737
|
+
config.onError(new IntlFormatError("Error formatting date.", config.locale, e));
|
|
6738
|
+
}
|
|
6739
|
+
return String(date);
|
|
6740
|
+
}
|
|
6741
|
+
function formatTime(config, getDateTimeFormat) {
|
|
6742
|
+
var _a3 = [];
|
|
6743
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
6744
|
+
_a3[_i - 2] = arguments[_i];
|
|
6745
|
+
}
|
|
6746
|
+
var value = _a3[0], _b = _a3[1], options = _b === void 0 ? {} : _b;
|
|
6747
|
+
var date = typeof value === "string" ? new Date(value || 0) : value;
|
|
6748
|
+
try {
|
|
6749
|
+
return getFormatter(config, "time", getDateTimeFormat, options).format(date);
|
|
6750
|
+
} catch (e) {
|
|
6751
|
+
config.onError(new IntlFormatError("Error formatting time.", config.locale, e));
|
|
4113
6752
|
}
|
|
4114
6753
|
return String(date);
|
|
4115
6754
|
}
|
|
4116
6755
|
function formatDateTimeRange(config, getDateTimeFormat) {
|
|
4117
|
-
var
|
|
6756
|
+
var _a3 = [];
|
|
4118
6757
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
4119
|
-
|
|
6758
|
+
_a3[_i - 2] = arguments[_i];
|
|
4120
6759
|
}
|
|
4121
|
-
var from =
|
|
6760
|
+
var from = _a3[0], to = _a3[1], _b = _a3[2], options = _b === void 0 ? {} : _b;
|
|
4122
6761
|
var timeZone = config.timeZone, locale = config.locale, onError = config.onError;
|
|
4123
6762
|
var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, timeZone ? { timeZone } : {});
|
|
4124
6763
|
try {
|
|
@@ -4129,11 +6768,11 @@ function formatDateTimeRange(config, getDateTimeFormat) {
|
|
|
4129
6768
|
return String(from);
|
|
4130
6769
|
}
|
|
4131
6770
|
function formatDateToParts(config, getDateTimeFormat) {
|
|
4132
|
-
var
|
|
6771
|
+
var _a3 = [];
|
|
4133
6772
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
4134
|
-
|
|
6773
|
+
_a3[_i - 2] = arguments[_i];
|
|
4135
6774
|
}
|
|
4136
|
-
var value =
|
|
6775
|
+
var value = _a3[0], _b = _a3[1], options = _b === void 0 ? {} : _b;
|
|
4137
6776
|
var date = typeof value === "string" ? new Date(value || 0) : value;
|
|
4138
6777
|
try {
|
|
4139
6778
|
return getFormatter(config, "date", getDateTimeFormat, options).formatToParts(date);
|
|
@@ -4143,11 +6782,11 @@ function formatDateToParts(config, getDateTimeFormat) {
|
|
|
4143
6782
|
return [];
|
|
4144
6783
|
}
|
|
4145
6784
|
function formatTimeToParts(config, getDateTimeFormat) {
|
|
4146
|
-
var
|
|
6785
|
+
var _a3 = [];
|
|
4147
6786
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
4148
|
-
|
|
6787
|
+
_a3[_i - 2] = arguments[_i];
|
|
4149
6788
|
}
|
|
4150
|
-
var value =
|
|
6789
|
+
var value = _a3[0], _b = _a3[1], options = _b === void 0 ? {} : _b;
|
|
4151
6790
|
var date = typeof value === "string" ? new Date(value || 0) : value;
|
|
4152
6791
|
try {
|
|
4153
6792
|
return getFormatter(config, "time", getDateTimeFormat, options).formatToParts(date);
|
|
@@ -4164,8 +6803,8 @@ var DISPLAY_NAMES_OPTONS = [
|
|
|
4164
6803
|
"fallback",
|
|
4165
6804
|
"languageDisplay"
|
|
4166
6805
|
];
|
|
4167
|
-
function formatDisplayName(
|
|
4168
|
-
var locale =
|
|
6806
|
+
function formatDisplayName(_a3, getDisplayNames, value, options) {
|
|
6807
|
+
var locale = _a3.locale, onError = _a3.onError;
|
|
4169
6808
|
var DisplayNames = Intl.DisplayNames;
|
|
4170
6809
|
if (!DisplayNames) {
|
|
4171
6810
|
onError(new FormatError('Intl.DisplayNames is not available in this environment.\nTry polyfilling it using "@formatjs/intl-displaynames"\n', ErrorCode.MISSING_INTL_API));
|
|
@@ -4204,8 +6843,8 @@ function formatList(opts, getListFormat, values, options) {
|
|
|
4204
6843
|
}, []);
|
|
4205
6844
|
return results.length === 1 ? results[0] : results.length === 0 ? "" : results;
|
|
4206
6845
|
}
|
|
4207
|
-
function formatListToParts(
|
|
4208
|
-
var locale =
|
|
6846
|
+
function formatListToParts(_a3, getListFormat, values, options) {
|
|
6847
|
+
var locale = _a3.locale, onError = _a3.onError;
|
|
4209
6848
|
if (options === void 0) {
|
|
4210
6849
|
options = {};
|
|
4211
6850
|
}
|
|
@@ -4235,8 +6874,8 @@ function formatListToParts(_a2, getListFormat, values, options) {
|
|
|
4235
6874
|
|
|
4236
6875
|
// ../../node_modules/@formatjs/intl/lib/src/plural.js
|
|
4237
6876
|
var PLURAL_FORMAT_OPTIONS = ["type"];
|
|
4238
|
-
function formatPlural(
|
|
4239
|
-
var locale =
|
|
6877
|
+
function formatPlural(_a3, getPluralRules, value, options) {
|
|
6878
|
+
var locale = _a3.locale, onError = _a3.onError;
|
|
4240
6879
|
if (options === void 0) {
|
|
4241
6880
|
options = {};
|
|
4242
6881
|
}
|
|
@@ -4254,8 +6893,8 @@ function formatPlural(_a2, getPluralRules, value, options) {
|
|
|
4254
6893
|
|
|
4255
6894
|
// ../../node_modules/@formatjs/intl/lib/src/relativeTime.js
|
|
4256
6895
|
var RELATIVE_TIME_FORMAT_OPTIONS = ["numeric", "style"];
|
|
4257
|
-
function getFormatter2(
|
|
4258
|
-
var locale =
|
|
6896
|
+
function getFormatter2(_a3, getRelativeTimeFormat, options) {
|
|
6897
|
+
var locale = _a3.locale, formats = _a3.formats, onError = _a3.onError;
|
|
4259
6898
|
if (options === void 0) {
|
|
4260
6899
|
options = {};
|
|
4261
6900
|
}
|
|
@@ -4306,8 +6945,8 @@ var NUMBER_FORMAT_OPTIONS = [
|
|
|
4306
6945
|
"unitDisplay",
|
|
4307
6946
|
"numberingSystem"
|
|
4308
6947
|
];
|
|
4309
|
-
function getFormatter3(
|
|
4310
|
-
var locale =
|
|
6948
|
+
function getFormatter3(_a3, getNumberFormat, options) {
|
|
6949
|
+
var locale = _a3.locale, formats = _a3.formats, onError = _a3.onError;
|
|
4311
6950
|
if (options === void 0) {
|
|
4312
6951
|
options = {};
|
|
4313
6952
|
}
|
|
@@ -4528,8 +7167,8 @@ var formatMessage2 = function(config, formatters, descriptor, rawValues) {
|
|
|
4528
7167
|
}
|
|
4529
7168
|
return chunks;
|
|
4530
7169
|
};
|
|
4531
|
-
var createIntl2 = function(
|
|
4532
|
-
var rawDefaultRichTextElements =
|
|
7170
|
+
var createIntl2 = function(_a3, cache) {
|
|
7171
|
+
var rawDefaultRichTextElements = _a3.defaultRichTextElements, config = __rest(_a3, ["defaultRichTextElements"]);
|
|
4533
7172
|
var defaultRichTextElements = assignUniqueKeysToFormatXMLElementFnArgument(rawDefaultRichTextElements);
|
|
4534
7173
|
var coreIntl = createIntl(__assign(__assign(__assign({}, DEFAULT_INTL_CONFIG2), config), { defaultRichTextElements }), cache);
|
|
4535
7174
|
var resolvedConfig = {
|
|
@@ -4564,8 +7203,8 @@ var IntlProvider2 = (
|
|
|
4564
7203
|
};
|
|
4565
7204
|
return _this;
|
|
4566
7205
|
}
|
|
4567
|
-
IntlProvider4.getDerivedStateFromProps = function(props,
|
|
4568
|
-
var prevConfig =
|
|
7206
|
+
IntlProvider4.getDerivedStateFromProps = function(props, _a3) {
|
|
7207
|
+
var prevConfig = _a3.prevConfig, cache = _a3.cache;
|
|
4569
7208
|
var config = processIntlConfig(props);
|
|
4570
7209
|
if (!shallowEqual(prevConfig, config)) {
|
|
4571
7210
|
return {
|
|
@@ -4628,8 +7267,8 @@ var defaultGroupOrder = [
|
|
|
4628
7267
|
"webauthn"
|
|
4629
7268
|
];
|
|
4630
7269
|
function defaultNodeSorter(a, b) {
|
|
4631
|
-
var
|
|
4632
|
-
const aGroupWeight = (
|
|
7270
|
+
var _a3, _b;
|
|
7271
|
+
const aGroupWeight = (_a3 = defaultGroupOrder.indexOf(a.group)) != null ? _a3 : 999;
|
|
4633
7272
|
const bGroupWeight = (_b = defaultGroupOrder.indexOf(b.group)) != null ? _b : 999;
|
|
4634
7273
|
return aGroupWeight - bGroupWeight;
|
|
4635
7274
|
}
|
|
@@ -4685,6 +7324,9 @@ function OryFlowProvider({
|
|
|
4685
7324
|
);
|
|
4686
7325
|
}
|
|
4687
7326
|
|
|
7327
|
+
// src/context/intl-context.tsx
|
|
7328
|
+
var import_react3 = require("react");
|
|
7329
|
+
|
|
4688
7330
|
// src/locales/index.ts
|
|
4689
7331
|
var locales_exports = {};
|
|
4690
7332
|
__export(locales_exports, {
|
|
@@ -6123,7 +8765,6 @@ var se_default = {
|
|
|
6123
8765
|
};
|
|
6124
8766
|
|
|
6125
8767
|
// src/context/intl-context.tsx
|
|
6126
|
-
var import_react3 = require("react");
|
|
6127
8768
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
6128
8769
|
var isCustomTranslations = (o) => {
|
|
6129
8770
|
return typeof o === "object" && !!o && "customTranslations" in o && !!o.customTranslations;
|
|
@@ -6132,7 +8773,7 @@ var IntlProvider3 = ({
|
|
|
6132
8773
|
children,
|
|
6133
8774
|
...props
|
|
6134
8775
|
}) => {
|
|
6135
|
-
var
|
|
8776
|
+
var _a3, _b;
|
|
6136
8777
|
const intlCtx = (0, import_react3.useContext)(Context);
|
|
6137
8778
|
if (intlCtx) {
|
|
6138
8779
|
return children;
|
|
@@ -6146,7 +8787,7 @@ var IntlProvider3 = ({
|
|
|
6146
8787
|
defaultLocale: props.defaultLocale,
|
|
6147
8788
|
messages: props.customTranslations[props.locale]
|
|
6148
8789
|
} : {
|
|
6149
|
-
locale: (
|
|
8790
|
+
locale: (_a3 = props.locale) != null ? _a3 : "en",
|
|
6150
8791
|
defaultLocale: (_b = props.defaultLocale) != null ? _b : "en",
|
|
6151
8792
|
messages: translation
|
|
6152
8793
|
};
|
|
@@ -6175,9 +8816,8 @@ function OryProvider({
|
|
|
6175
8816
|
}
|
|
6176
8817
|
|
|
6177
8818
|
// src/theme/default/components/card/footer.tsx
|
|
6178
|
-
var import_client_fetch = require("@ory/client-fetch");
|
|
6179
8819
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
6180
|
-
function DefaultCardFooter(
|
|
8820
|
+
function DefaultCardFooter() {
|
|
6181
8821
|
const { flowType } = useOryFlow();
|
|
6182
8822
|
switch (flowType) {
|
|
6183
8823
|
case import_client_fetch.FlowType.Login:
|
|
@@ -6192,15 +8832,20 @@ function DefaultCardFooter({}) {
|
|
|
6192
8832
|
return null;
|
|
6193
8833
|
}
|
|
6194
8834
|
}
|
|
8835
|
+
function getReturnToQueryParam() {
|
|
8836
|
+
if (typeof window !== "undefined") {
|
|
8837
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
8838
|
+
return searchParams.get("return_to");
|
|
8839
|
+
}
|
|
8840
|
+
}
|
|
6195
8841
|
function LoginCardFooter() {
|
|
6196
8842
|
const { config } = useOryFlow();
|
|
6197
|
-
const searchParams = (0, import_navigation.useSearchParams)();
|
|
6198
8843
|
const intl = useIntl();
|
|
6199
|
-
if (!config.project.
|
|
8844
|
+
if (!config.project.registration_enabled) {
|
|
6200
8845
|
return null;
|
|
6201
8846
|
}
|
|
6202
8847
|
let registrationLink = `/self-service/registration/browser`;
|
|
6203
|
-
const returnTo =
|
|
8848
|
+
const returnTo = getReturnToQueryParam();
|
|
6204
8849
|
if (returnTo) {
|
|
6205
8850
|
registrationLink += `?return_to=${returnTo}`;
|
|
6206
8851
|
}
|
|
@@ -6224,10 +8869,9 @@ function LoginCardFooter() {
|
|
|
6224
8869
|
] });
|
|
6225
8870
|
}
|
|
6226
8871
|
function RegistrationCardFooter() {
|
|
6227
|
-
const searchParams = (0, import_navigation.useSearchParams)();
|
|
6228
8872
|
const intl = useIntl();
|
|
6229
8873
|
let loginLink = `/self-service/login/browser`;
|
|
6230
|
-
const returnTo =
|
|
8874
|
+
const returnTo = getReturnToQueryParam();
|
|
6231
8875
|
if (returnTo) {
|
|
6232
8876
|
loginLink += `?return_to=${returnTo}`;
|
|
6233
8877
|
}
|
|
@@ -6267,7 +8911,7 @@ function joinWithCommaOr(list) {
|
|
|
6267
8911
|
return list[0] + ".";
|
|
6268
8912
|
} else {
|
|
6269
8913
|
const last = list.pop();
|
|
6270
|
-
return `${list.join(", ")}
|
|
8914
|
+
return `${list.join(", ")} or ${last}.`;
|
|
6271
8915
|
}
|
|
6272
8916
|
}
|
|
6273
8917
|
function constructCardHeaderText(container) {
|
|
@@ -6294,6 +8938,17 @@ function constructCardHeaderText(container) {
|
|
|
6294
8938
|
if (ui.nodes.find((node) => node.group === "webauthn")) {
|
|
6295
8939
|
parts.push(`a security key`);
|
|
6296
8940
|
}
|
|
8941
|
+
if (ui.nodes.find((node) => node.group === "default")) {
|
|
8942
|
+
const primaryIdentifier = ui.nodes.filter(
|
|
8943
|
+
(node) => (0, import_client_fetch2.isUiNodeInputAttributes)(node.attributes) && node.attributes.name.startsWith("traits")
|
|
8944
|
+
);
|
|
8945
|
+
if (primaryIdentifier.length == 1) {
|
|
8946
|
+
const label = primaryIdentifier[0].meta.label;
|
|
8947
|
+
if (label) {
|
|
8948
|
+
parts.push(`your ${label.text}`);
|
|
8949
|
+
}
|
|
8950
|
+
}
|
|
8951
|
+
}
|
|
6297
8952
|
switch (container.flowType) {
|
|
6298
8953
|
case import_client_fetch2.FlowType.Login:
|
|
6299
8954
|
if (container.flow.refresh) {
|
|
@@ -6329,7 +8984,7 @@ function constructCardHeaderText(container) {
|
|
|
6329
8984
|
}
|
|
6330
8985
|
function InnerCardHeader({ title, text }) {
|
|
6331
8986
|
const { CardLogo } = useComponents();
|
|
6332
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("
|
|
8987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
6333
8988
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CardLogo, {}),
|
|
6334
8989
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
6335
8990
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: "font-semibold text-lg text-dialog-fg-default leading-normal", children: title }),
|
|
@@ -6399,7 +9054,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
6399
9054
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
6400
9055
|
return null;
|
|
6401
9056
|
}
|
|
6402
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("
|
|
9057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("section", { className: "text-left", children });
|
|
6403
9058
|
}
|
|
6404
9059
|
function DefaultMessage({ message }) {
|
|
6405
9060
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
@@ -6600,18 +9255,18 @@ async function onSubmitLogin({ config, flow }, {
|
|
|
6600
9255
|
body,
|
|
6601
9256
|
onRedirect
|
|
6602
9257
|
}) {
|
|
6603
|
-
var
|
|
9258
|
+
var _a3;
|
|
6604
9259
|
if (!config.sdk.url) {
|
|
6605
9260
|
throw new Error(
|
|
6606
9261
|
`Please supply your Ory Network SDK url to the Ory Elements configuration.`
|
|
6607
9262
|
);
|
|
6608
9263
|
}
|
|
6609
|
-
await (0, import_client_fetch3.frontendClient)(config.sdk.url, (
|
|
9264
|
+
await (0, import_client_fetch3.frontendClient)(config.sdk.url, (_a3 = config.sdk.options) != null ? _a3 : {}).updateLoginFlowRaw({
|
|
6610
9265
|
flow: flow.id,
|
|
6611
9266
|
updateLoginFlowBody: body
|
|
6612
9267
|
}).then(() => {
|
|
6613
|
-
var
|
|
6614
|
-
window.location.href = (
|
|
9268
|
+
var _a4;
|
|
9269
|
+
window.location.href = (_a4 = flow.return_to) != null ? _a4 : config.sdk.url + "/self-service/login/browser";
|
|
6615
9270
|
}).catch(
|
|
6616
9271
|
(0, import_client_fetch3.handleFlowError)({
|
|
6617
9272
|
onRestartFlow: () => {
|
|
@@ -6635,13 +9290,13 @@ async function onSubmitSettings({ config, flow }, {
|
|
|
6635
9290
|
body,
|
|
6636
9291
|
onRedirect
|
|
6637
9292
|
}) {
|
|
6638
|
-
var
|
|
9293
|
+
var _a3;
|
|
6639
9294
|
if (!config.sdk.url) {
|
|
6640
9295
|
throw new Error(
|
|
6641
9296
|
`Please supply your Ory Network SDK url to the Ory Elements configuration.`
|
|
6642
9297
|
);
|
|
6643
9298
|
}
|
|
6644
|
-
const client = (0, import_client_fetch4.frontendClient)(config.sdk.url, (
|
|
9299
|
+
const client = (0, import_client_fetch4.frontendClient)(config.sdk.url, (_a3 = config.sdk.options) != null ? _a3 : {});
|
|
6645
9300
|
await client.updateSettingsFlowRaw({
|
|
6646
9301
|
flow: flow.id,
|
|
6647
9302
|
updateSettingsFlowBody: body
|
|
@@ -6677,13 +9332,13 @@ async function onSubmitRecovery({ config, flow }, {
|
|
|
6677
9332
|
body,
|
|
6678
9333
|
onRedirect
|
|
6679
9334
|
}) {
|
|
6680
|
-
var
|
|
9335
|
+
var _a3;
|
|
6681
9336
|
if (!config.sdk.url) {
|
|
6682
9337
|
throw new Error(
|
|
6683
9338
|
`Please supply your Ory Network SDK url to the Ory Elements configuration.`
|
|
6684
9339
|
);
|
|
6685
9340
|
}
|
|
6686
|
-
await (0, import_client_fetch5.frontendClient)(config.sdk.url, (
|
|
9341
|
+
await (0, import_client_fetch5.frontendClient)(config.sdk.url, (_a3 = config.sdk.options) != null ? _a3 : {}).updateRecoveryFlowRaw({
|
|
6687
9342
|
flow: flow.id,
|
|
6688
9343
|
updateRecoveryFlowBody: body
|
|
6689
9344
|
}).then(async (res) => {
|
|
@@ -6721,13 +9376,13 @@ async function onSubmitVerification({ config, flow }, {
|
|
|
6721
9376
|
body,
|
|
6722
9377
|
onRedirect
|
|
6723
9378
|
}) {
|
|
6724
|
-
var
|
|
9379
|
+
var _a3;
|
|
6725
9380
|
if (!config.sdk.url) {
|
|
6726
9381
|
throw new Error(
|
|
6727
9382
|
`Please supply your Ory Network SDK URL to the Ory Elements configuration.`
|
|
6728
9383
|
);
|
|
6729
9384
|
}
|
|
6730
|
-
await (0, import_client_fetch6.frontendClient)(config.sdk.url, (
|
|
9385
|
+
await (0, import_client_fetch6.frontendClient)(config.sdk.url, (_a3 = config.sdk.options) != null ? _a3 : {}).updateVerificationFlowRaw({
|
|
6731
9386
|
flow: flow.id,
|
|
6732
9387
|
updateVerificationFlowBody: body
|
|
6733
9388
|
}).then(
|
|
@@ -6758,13 +9413,13 @@ async function onSubmitRegistration({ config, flow }, {
|
|
|
6758
9413
|
body,
|
|
6759
9414
|
onRedirect
|
|
6760
9415
|
}) {
|
|
6761
|
-
var
|
|
9416
|
+
var _a3;
|
|
6762
9417
|
if (!config.sdk.url) {
|
|
6763
9418
|
throw new Error(
|
|
6764
9419
|
`Please supply your Ory Network SDK url to the Ory Elements configuration.`
|
|
6765
9420
|
);
|
|
6766
9421
|
}
|
|
6767
|
-
const client = (0, import_client_fetch7.frontendClient)(config.sdk.url, (
|
|
9422
|
+
const client = (0, import_client_fetch7.frontendClient)(config.sdk.url, (_a3 = config.sdk.options) != null ? _a3 : {});
|
|
6768
9423
|
await client.updateRegistrationFlowRaw({
|
|
6769
9424
|
flow: flow.id,
|
|
6770
9425
|
updateRegistrationFlowBody: body
|
|
@@ -6806,8 +9461,9 @@ var DefaultButton = ({
|
|
|
6806
9461
|
name,
|
|
6807
9462
|
value,
|
|
6808
9463
|
// Button does not support these attributes, so we skip them
|
|
6809
|
-
autocomplete,
|
|
6810
|
-
label:
|
|
9464
|
+
autocomplete: _ignoredAutocomplete,
|
|
9465
|
+
label: _ignoredLabel,
|
|
9466
|
+
node_type: _ignoredNodeType,
|
|
6811
9467
|
// End of skipped attributes
|
|
6812
9468
|
...rest
|
|
6813
9469
|
} = attributes;
|
|
@@ -6839,7 +9495,7 @@ var DefaultButton = ({
|
|
|
6839
9495
|
className: cn(
|
|
6840
9496
|
// TODO: Difficult to resolve merge conflict here. Please ensure this is correct:
|
|
6841
9497
|
// "relative antialiased rounded border gap-3 leading-none transition-colors ease-linear duration-100 px-4 py-4.5 text-sm font-medium",
|
|
6842
|
-
"antialiased rounded-border-radius-buttons border border-transparent gap-3
|
|
9498
|
+
"antialiased rounded-border-radius-buttons border border-transparent gap-3 bg-button-primary-bg-default hover:bg-button-primary-bg-hover transition-colors text-button-primary-fg-default hover:text-button-primary-fg-hover px-4 py-4.5 text-sm leading-none font-medium",
|
|
6843
9499
|
{
|
|
6844
9500
|
"cursor-not-allowed": isSubmitting,
|
|
6845
9501
|
"bg-button-primary-bg-hover": isSubmitting,
|
|
@@ -6854,7 +9510,7 @@ var DefaultButton = ({
|
|
|
6854
9510
|
"span",
|
|
6855
9511
|
{
|
|
6856
9512
|
className: cn(
|
|
6857
|
-
"transition-colors ease-linear duration-100
|
|
9513
|
+
"transition-colors ease-linear duration-100 leading-none text-button-primary-fg-default/20",
|
|
6858
9514
|
{
|
|
6859
9515
|
"text-button-primary-fg-default opacity-20 transition-opacity": isSubmitting && isPrimary,
|
|
6860
9516
|
"text-button-secondary-fg-default/20": isSubmitting && !isPrimary
|
|
@@ -6895,8 +9551,8 @@ function CheckboxSVG() {
|
|
|
6895
9551
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
6896
9552
|
"path",
|
|
6897
9553
|
{
|
|
6898
|
-
|
|
6899
|
-
|
|
9554
|
+
fillRule: "evenodd",
|
|
9555
|
+
clipRule: "evenodd",
|
|
6900
9556
|
d: "M11.6464 5.14645C11.8417 4.95118 12.1583 4.95118 12.3536 5.14645C12.5338 5.32669 12.5477 5.6103 12.3951 5.80645L12.3536 5.85355L7.35355 10.8536C7.17331 11.0338 6.8897 11.0477 6.69355 10.8951L6.64645 10.8536L4.14645 8.35355C3.95118 8.15829 3.95118 7.84171 4.14645 7.64645C4.32669 7.4662 4.6103 7.45234 4.80645 7.60485L4.85355 7.64645L7 9.7925L11.6464 5.14645Z",
|
|
6901
9557
|
fill: "white"
|
|
6902
9558
|
}
|
|
@@ -6913,8 +9569,8 @@ var DefaultCheckbox = ({
|
|
|
6913
9569
|
value,
|
|
6914
9570
|
name,
|
|
6915
9571
|
// Button does not support these attributes, so we skip them
|
|
6916
|
-
autocomplete,
|
|
6917
|
-
onclick,
|
|
9572
|
+
autocomplete: _autocomplete,
|
|
9573
|
+
onclick: _onclick,
|
|
6918
9574
|
// End of skipped attributes
|
|
6919
9575
|
...attributes
|
|
6920
9576
|
} = initialAttributes;
|
|
@@ -6982,8 +9638,7 @@ function DefaultHorizontalDivider() {
|
|
|
6982
9638
|
|
|
6983
9639
|
// src/theme/default/components/form/image.tsx
|
|
6984
9640
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
6985
|
-
function DefaultImage({
|
|
6986
|
-
const intl = useIntl();
|
|
9641
|
+
function DefaultImage({ attributes }) {
|
|
6987
9642
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("figure", { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { ...attributes }) });
|
|
6988
9643
|
}
|
|
6989
9644
|
|
|
@@ -7014,7 +9669,6 @@ var DefaultInput = ({
|
|
|
7014
9669
|
|
|
7015
9670
|
// src/theme/default/components/form/label.tsx
|
|
7016
9671
|
var import_client_fetch11 = require("@ory/client-fetch");
|
|
7017
|
-
var import_link = __toESM(require("next/link"));
|
|
7018
9672
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
7019
9673
|
function DefaultLabel({
|
|
7020
9674
|
node,
|
|
@@ -7036,10 +9690,11 @@ function DefaultLabel({
|
|
|
7036
9690
|
children: formatMessage3(label, intl)
|
|
7037
9691
|
}
|
|
7038
9692
|
),
|
|
7039
|
-
isPassword && config.project.
|
|
7040
|
-
|
|
9693
|
+
isPassword && config.project.recovery_enabled && flowType === import_client_fetch11.FlowType.Login && // TODO: make it possible to override with a custom component
|
|
9694
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
9695
|
+
"a",
|
|
7041
9696
|
{
|
|
7042
|
-
href:
|
|
9697
|
+
href: config.project.recovery_ui_url,
|
|
7043
9698
|
className: "text-links-link-default hover:underline hover:text-link-hover transition-colors text-sm font-medium",
|
|
7044
9699
|
children: intl.formatMessage({
|
|
7045
9700
|
id: "forms.label.forgot-password",
|
|
@@ -7164,9 +9819,6 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
7164
9819
|
);
|
|
7165
9820
|
};
|
|
7166
9821
|
|
|
7167
|
-
// src/theme/default/components/form/social.tsx
|
|
7168
|
-
var import_image = __toESM(require("next/image"));
|
|
7169
|
-
|
|
7170
9822
|
// src/theme/default/provider-logos/apple.svg
|
|
7171
9823
|
var React13 = __toESM(require("react"));
|
|
7172
9824
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
@@ -7179,7 +9831,7 @@ var apple_default = SvgApple;
|
|
|
7179
9831
|
// src/theme/default/provider-logos/auth0.svg
|
|
7180
9832
|
var React14 = __toESM(require("react"));
|
|
7181
9833
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
7182
|
-
var SvgAuth0 = (props) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: 64, height: 64, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { d: "M49.012 51.774L42.514 32l17.008-12.22h-21.02L32.005 0h21.032l6.506 19.78c3.767 11.468-.118 24.52-10.53 31.993zm-34.023 0L31.998 64l17.015-12.226-17.008-12.22zm-10.516-32c-3.976 12.1.64 24.917 10.5 32.007v-.007L21.482 32 4.474 19.774l21.025.007L31.998 0H10.972z", fill: "#eb5424" }) });
|
|
9834
|
+
var SvgAuth0 = (props) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: 64, height: 64, viewBox: "0 0 64 64", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { d: "M49.012 51.774L42.514 32l17.008-12.22h-21.02L32.005 0h21.032l6.506 19.78c3.767 11.468-.118 24.52-10.53 31.993zm-34.023 0L31.998 64l17.015-12.226-17.008-12.22zm-10.516-32c-3.976 12.1.64 24.917 10.5 32.007v-.007L21.482 32 4.474 19.774l21.025.007L31.998 0H10.972z", fill: "#eb5424" }) });
|
|
7183
9835
|
var auth0_default = SvgAuth0;
|
|
7184
9836
|
|
|
7185
9837
|
// src/theme/default/provider-logos/discord.svg
|
|
@@ -7216,7 +9868,7 @@ var generic_default = SvgGeneric;
|
|
|
7216
9868
|
// src/theme/default/provider-logos/github.svg
|
|
7217
9869
|
var React18 = __toESM(require("react"));
|
|
7218
9870
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
7219
|
-
var SvgGithub = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z" }) });
|
|
9871
|
+
var SvgGithub = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z" }) });
|
|
7220
9872
|
var github_default = SvgGithub;
|
|
7221
9873
|
|
|
7222
9874
|
// src/theme/default/provider-logos/gitlab.svg
|
|
@@ -7233,7 +9885,7 @@ var gitlab_default = SvgGitlab;
|
|
|
7233
9885
|
// src/theme/default/provider-logos/google.svg
|
|
7234
9886
|
var React20 = __toESM(require("react"));
|
|
7235
9887
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
7236
|
-
var SvgGoogle = (props) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("svg", { width: 24, height: 24, xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
9888
|
+
var SvgGoogle = (props) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("svg", { width: 24, height: 24, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
7237
9889
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { fill: "#4285F4", d: "M23.745 12.27c0-.79-.07-1.54-.19-2.27h-11.3v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82Z" }),
|
|
7238
9890
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { fill: "#34A853", d: "M12.255 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96h-3.98v3.09C3.515 21.3 7.565 24 12.255 24Z" }),
|
|
7239
9891
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { fill: "#FBBC05", d: "M5.525 14.29c-.25-.72-.38-1.49-.38-2.29s.14-1.57.38-2.29V6.62h-3.98a11.86 11.86 0 0 0 0 10.76l3.98-3.09Z" }),
|
|
@@ -7255,7 +9907,7 @@ var linkedin_default = SvgLinkedin;
|
|
|
7255
9907
|
// src/theme/default/provider-logos/microsoft.svg
|
|
7256
9908
|
var React22 = __toESM(require("react"));
|
|
7257
9909
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
7258
|
-
var SvgMicrosoft = (props) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("svg", { width: 23, height: 23, fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
9910
|
+
var SvgMicrosoft = (props) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("svg", { width: 23, height: 23, viewBox: "0 0 23 23", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
7259
9911
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { d: "M1 1h10v10H1V1Z", fill: "#F35325" }),
|
|
7260
9912
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { d: "M12 1h10v10H12V1Z", fill: "#81BC06" }),
|
|
7261
9913
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { d: "M1 12h10v10H1V12Z", fill: "#05A6F0" }),
|
|
@@ -7312,18 +9964,24 @@ var provider_logos_default = logos;
|
|
|
7312
9964
|
|
|
7313
9965
|
// src/theme/default/components/form/social.tsx
|
|
7314
9966
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
9967
|
+
function extractProvider(context) {
|
|
9968
|
+
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
9969
|
+
return context.provider;
|
|
9970
|
+
}
|
|
9971
|
+
return void 0;
|
|
9972
|
+
}
|
|
7315
9973
|
function DefaultButtonSocial({
|
|
7316
9974
|
attributes,
|
|
7317
9975
|
node
|
|
7318
9976
|
}) {
|
|
7319
|
-
var
|
|
9977
|
+
var _a3, _b, _c, _d;
|
|
7320
9978
|
const {
|
|
7321
9979
|
flow: { ui }
|
|
7322
9980
|
} = useOryFlow();
|
|
7323
|
-
const oidcNodeCount = (
|
|
7324
|
-
const
|
|
9981
|
+
const oidcNodeCount = (_a3 = ui.nodes.filter((node2) => node2.group === "oidc").length) != null ? _a3 : 0;
|
|
9982
|
+
const Logo = provider_logos_default[attributes.value];
|
|
7325
9983
|
const showLabel = oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
7326
|
-
const provider = (
|
|
9984
|
+
const provider = (_c = extractProvider((_b = node.meta.label) == null ? void 0 : _b.context)) != null ? _c : "";
|
|
7327
9985
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
7328
9986
|
"button",
|
|
7329
9987
|
{
|
|
@@ -7335,17 +9993,15 @@ function DefaultButtonSocial({
|
|
|
7335
9993
|
type: "submit",
|
|
7336
9994
|
name: "provider",
|
|
7337
9995
|
children: [
|
|
7338
|
-
|
|
7339
|
-
|
|
9996
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "w-5 h-5", children: Logo ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
9997
|
+
Logo,
|
|
7340
9998
|
{
|
|
7341
|
-
width:
|
|
7342
|
-
height:
|
|
7343
|
-
|
|
7344
|
-
className: "w-5 h-5",
|
|
7345
|
-
alt: ((_e = node.meta.label) == null ? void 0 : _e.text) || attributes.value
|
|
9999
|
+
width: 20,
|
|
10000
|
+
height: 20,
|
|
10001
|
+
className: "object-fill w-full h-full"
|
|
7346
10002
|
}
|
|
7347
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("
|
|
7348
|
-
showLabel ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm text-left leading-none font-medium text-forms-fg-default flex-grow", children: (
|
|
10003
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "rounded-full border flex items-center justify-center text-xs", children: provider.slice(0, 2) }) }),
|
|
10004
|
+
showLabel ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm text-left leading-none font-medium text-forms-fg-default flex-grow", children: (_d = node.meta.label) == null ? void 0 : _d.text }) : null
|
|
7349
10005
|
]
|
|
7350
10006
|
}
|
|
7351
10007
|
);
|
|
@@ -7371,11 +10027,11 @@ function DefaultSocialButtonContainer({
|
|
|
7371
10027
|
// src/theme/default/components/form/text.tsx
|
|
7372
10028
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
7373
10029
|
function DefaultText({ node, attributes }) {
|
|
7374
|
-
var
|
|
10030
|
+
var _a3;
|
|
7375
10031
|
const intl = useIntl();
|
|
7376
10032
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
7377
10033
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { "data-testid": `node/text/${attributes.id}/label`, children: formatMessage3(node.meta.label, intl) }),
|
|
7378
|
-
(
|
|
10034
|
+
(_a3 = attributes.text.context.secrets) == null ? void 0 : _a3.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("pre", { "data-testid": `node/text/lookup_secret_codes/text`, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("code", { children: formatMessage3(text, intl) }) }, index))
|
|
7379
10035
|
] });
|
|
7380
10036
|
}
|
|
7381
10037
|
|
|
@@ -7492,8 +10148,8 @@ var NodeInput = ({
|
|
|
7492
10148
|
onloadTrigger,
|
|
7493
10149
|
onclickTrigger,
|
|
7494
10150
|
// These properties do not exist on input fields so we remove them (as we already have handled them).
|
|
7495
|
-
onclick:
|
|
7496
|
-
onload:
|
|
10151
|
+
onclick: _ignoredOnclick,
|
|
10152
|
+
onload: _ignoredOnload,
|
|
7497
10153
|
//
|
|
7498
10154
|
...attrs
|
|
7499
10155
|
} = attributes;
|
|
@@ -7505,10 +10161,11 @@ var NodeInput = ({
|
|
|
7505
10161
|
triggerToWindowCall(onloadTrigger);
|
|
7506
10162
|
}
|
|
7507
10163
|
},
|
|
7508
|
-
//
|
|
10164
|
+
// TODO(jonas): make sure onloadTrigger is stable
|
|
10165
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- ignore onloadTrigger for now, until we make sure this is stable
|
|
7509
10166
|
[]
|
|
7510
10167
|
);
|
|
7511
|
-
const handleClick = (
|
|
10168
|
+
const handleClick = () => {
|
|
7512
10169
|
if (onclickTrigger) {
|
|
7513
10170
|
triggerToWindowCall(onclickTrigger);
|
|
7514
10171
|
}
|
|
@@ -7590,7 +10247,12 @@ var Node = ({ node, onClick }) => {
|
|
|
7590
10247
|
} else if ((0, import_client_fetch14.isUiNodeAnchorAttributes)(node.attributes)) {
|
|
7591
10248
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Components.LinkButton, { attributes: node.attributes, node });
|
|
7592
10249
|
} else if ((0, import_client_fetch14.isUiNodeScriptAttributes)(node.attributes)) {
|
|
7593
|
-
const {
|
|
10250
|
+
const {
|
|
10251
|
+
crossorigin,
|
|
10252
|
+
referrerpolicy,
|
|
10253
|
+
node_type: _nodeType,
|
|
10254
|
+
...attributes
|
|
10255
|
+
} = node.attributes;
|
|
7594
10256
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7595
10257
|
"script",
|
|
7596
10258
|
{
|
|
@@ -7647,7 +10309,7 @@ function OryFormSocialButtons({
|
|
|
7647
10309
|
var import_client_fetch15 = require("@ory/client-fetch");
|
|
7648
10310
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
7649
10311
|
function OryForm({ children }) {
|
|
7650
|
-
var
|
|
10312
|
+
var _a3;
|
|
7651
10313
|
const { FormContainer } = useComponents();
|
|
7652
10314
|
const flowContainer = useOryFlow();
|
|
7653
10315
|
const methods = (0, import_react_hook_form5.useForm)({
|
|
@@ -7738,7 +10400,7 @@ function OryForm({ children }) {
|
|
|
7738
10400
|
}
|
|
7739
10401
|
return false;
|
|
7740
10402
|
}).length > 0;
|
|
7741
|
-
if (!hasMethods && ((
|
|
10403
|
+
if (!hasMethods && ((_a3 = flowContainer.flow.ui.messages) != null ? _a3 : []).length === 0) {
|
|
7742
10404
|
return intl.formatMessage({
|
|
7743
10405
|
id: `identities.messages.${5000002}`,
|
|
7744
10406
|
defaultMessage: "No authentication methods are available for this request. Please contact the site or app owner."
|
|
@@ -7749,7 +10411,7 @@ function OryForm({ children }) {
|
|
|
7749
10411
|
{
|
|
7750
10412
|
action: flowContainer.flow.ui.action,
|
|
7751
10413
|
method: flowContainer.flow.ui.method,
|
|
7752
|
-
onSubmit: methods.handleSubmit(onSubmit),
|
|
10414
|
+
onSubmit: () => void methods.handleSubmit(onSubmit),
|
|
7753
10415
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
7754
10416
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(OryFormSocialButtons, {}),
|
|
7755
10417
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
@@ -7822,7 +10484,7 @@ function OryCardContent({ children }) {
|
|
|
7822
10484
|
] })
|
|
7823
10485
|
] });
|
|
7824
10486
|
}
|
|
7825
|
-
function OryCardFooter(
|
|
10487
|
+
function OryCardFooter() {
|
|
7826
10488
|
const { CardFooter } = useComponents();
|
|
7827
10489
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CardFooter, {});
|
|
7828
10490
|
}
|
|
@@ -7860,7 +10522,7 @@ function Login({
|
|
|
7860
10522
|
flow,
|
|
7861
10523
|
flowType: import_client_fetch16.FlowType.Login,
|
|
7862
10524
|
components,
|
|
7863
|
-
children: children
|
|
10525
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(OryCard, {})
|
|
7864
10526
|
}
|
|
7865
10527
|
);
|
|
7866
10528
|
}
|
|
@@ -7885,7 +10547,7 @@ function Recovery({
|
|
|
7885
10547
|
flow,
|
|
7886
10548
|
flowType: import_client_fetch17.FlowType.Recovery,
|
|
7887
10549
|
components,
|
|
7888
|
-
children: children
|
|
10550
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(OryCard, {})
|
|
7889
10551
|
}
|
|
7890
10552
|
);
|
|
7891
10553
|
}
|
|
@@ -7910,7 +10572,7 @@ function Registration({
|
|
|
7910
10572
|
flow,
|
|
7911
10573
|
flowType: import_client_fetch18.FlowType.Registration,
|
|
7912
10574
|
components,
|
|
7913
|
-
children: children
|
|
10575
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(OryCard, {})
|
|
7914
10576
|
}
|
|
7915
10577
|
);
|
|
7916
10578
|
}
|
|
@@ -7935,7 +10597,7 @@ function Settings({
|
|
|
7935
10597
|
flow,
|
|
7936
10598
|
flowType: import_client_fetch19.FlowType.Settings,
|
|
7937
10599
|
components,
|
|
7938
|
-
children: children
|
|
10600
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(OryCard, {})
|
|
7939
10601
|
}
|
|
7940
10602
|
);
|
|
7941
10603
|
}
|
|
@@ -7960,7 +10622,7 @@ function Verification({
|
|
|
7960
10622
|
flow,
|
|
7961
10623
|
flowType: import_client_fetch20.FlowType.Verification,
|
|
7962
10624
|
components,
|
|
7963
|
-
children: children
|
|
10625
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(OryCard, {})
|
|
7964
10626
|
}
|
|
7965
10627
|
);
|
|
7966
10628
|
}
|