@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
package/dist/index.js
CHANGED
|
@@ -55,9 +55,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
55
55
|
mod
|
|
56
56
|
));
|
|
57
57
|
|
|
58
|
-
// ../../node_modules/react-is/cjs/react-is.production.min.js
|
|
58
|
+
// ../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js
|
|
59
59
|
var require_react_is_production_min = __commonJS({
|
|
60
|
-
"../../node_modules/react-is/cjs/react-is.production.min.js"(exports) {
|
|
60
|
+
"../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
|
|
61
61
|
var b = "function" === typeof Symbol && Symbol.for;
|
|
62
62
|
var c = b ? Symbol.for("react.element") : 60103;
|
|
63
63
|
var d = b ? Symbol.for("react.portal") : 60106;
|
|
@@ -167,9 +167,9 @@ var require_react_is_production_min = __commonJS({
|
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
169
|
|
|
170
|
-
// ../../node_modules/react-is/cjs/react-is.development.js
|
|
170
|
+
// ../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js
|
|
171
171
|
var require_react_is_development = __commonJS({
|
|
172
|
-
"../../node_modules/react-is/cjs/react-is.development.js"(exports) {
|
|
172
|
+
"../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js"(exports) {
|
|
173
173
|
if (process.env.NODE_ENV !== "production") {
|
|
174
174
|
(function() {
|
|
175
175
|
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
@@ -320,9 +320,9 @@ var require_react_is_development = __commonJS({
|
|
|
320
320
|
}
|
|
321
321
|
});
|
|
322
322
|
|
|
323
|
-
// ../../node_modules/react-is/index.js
|
|
323
|
+
// ../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js
|
|
324
324
|
var require_react_is = __commonJS({
|
|
325
|
-
"../../node_modules/react-is/index.js"(exports, module) {
|
|
325
|
+
"../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js"(exports, module) {
|
|
326
326
|
if (process.env.NODE_ENV === "production") {
|
|
327
327
|
module.exports = require_react_is_production_min();
|
|
328
328
|
} else {
|
|
@@ -470,7 +470,7 @@ function __spreadArray(to, from, pack) {
|
|
|
470
470
|
// ../../node_modules/react-intl/lib/src/components/injectIntl.js
|
|
471
471
|
__toESM(require_hoist_non_react_statics_cjs());
|
|
472
472
|
|
|
473
|
-
// ../../node_modules/@formatjs/ecma402-abstract/lib/utils.js
|
|
473
|
+
// ../../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/utils.js
|
|
474
474
|
function invariant(condition, message, Err) {
|
|
475
475
|
if (Err === void 0) {
|
|
476
476
|
Err = Error;
|
|
@@ -480,54 +480,54 @@ function invariant(condition, message, Err) {
|
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/error.js
|
|
483
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/error.js
|
|
484
484
|
var ErrorKind;
|
|
485
|
-
(function(
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
485
|
+
(function(ErrorKind3) {
|
|
486
|
+
ErrorKind3[ErrorKind3["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
|
|
487
|
+
ErrorKind3[ErrorKind3["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
|
|
488
|
+
ErrorKind3[ErrorKind3["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
|
|
489
|
+
ErrorKind3[ErrorKind3["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
|
|
490
|
+
ErrorKind3[ErrorKind3["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
|
|
491
|
+
ErrorKind3[ErrorKind3["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
|
|
492
|
+
ErrorKind3[ErrorKind3["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
|
|
493
|
+
ErrorKind3[ErrorKind3["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
|
|
494
|
+
ErrorKind3[ErrorKind3["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
|
|
495
|
+
ErrorKind3[ErrorKind3["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
|
|
496
|
+
ErrorKind3[ErrorKind3["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
|
|
497
|
+
ErrorKind3[ErrorKind3["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
|
|
498
|
+
ErrorKind3[ErrorKind3["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
499
|
+
ErrorKind3[ErrorKind3["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
500
|
+
ErrorKind3[ErrorKind3["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
|
|
501
|
+
ErrorKind3[ErrorKind3["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
|
|
502
|
+
ErrorKind3[ErrorKind3["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
|
|
503
|
+
ErrorKind3[ErrorKind3["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
|
|
504
|
+
ErrorKind3[ErrorKind3["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
|
|
505
|
+
ErrorKind3[ErrorKind3["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
|
|
506
|
+
ErrorKind3[ErrorKind3["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
|
|
507
|
+
ErrorKind3[ErrorKind3["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
|
|
508
|
+
ErrorKind3[ErrorKind3["INVALID_TAG"] = 23] = "INVALID_TAG";
|
|
509
|
+
ErrorKind3[ErrorKind3["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
|
|
510
|
+
ErrorKind3[ErrorKind3["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
|
|
511
|
+
ErrorKind3[ErrorKind3["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
|
|
512
512
|
})(ErrorKind || (ErrorKind = {}));
|
|
513
513
|
|
|
514
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/types.js
|
|
514
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/types.js
|
|
515
515
|
var TYPE;
|
|
516
|
-
(function(
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
516
|
+
(function(TYPE3) {
|
|
517
|
+
TYPE3[TYPE3["literal"] = 0] = "literal";
|
|
518
|
+
TYPE3[TYPE3["argument"] = 1] = "argument";
|
|
519
|
+
TYPE3[TYPE3["number"] = 2] = "number";
|
|
520
|
+
TYPE3[TYPE3["date"] = 3] = "date";
|
|
521
|
+
TYPE3[TYPE3["time"] = 4] = "time";
|
|
522
|
+
TYPE3[TYPE3["select"] = 5] = "select";
|
|
523
|
+
TYPE3[TYPE3["plural"] = 6] = "plural";
|
|
524
|
+
TYPE3[TYPE3["pound"] = 7] = "pound";
|
|
525
|
+
TYPE3[TYPE3["tag"] = 8] = "tag";
|
|
526
526
|
})(TYPE || (TYPE = {}));
|
|
527
527
|
var SKELETON_TYPE;
|
|
528
|
-
(function(
|
|
529
|
-
|
|
530
|
-
|
|
528
|
+
(function(SKELETON_TYPE3) {
|
|
529
|
+
SKELETON_TYPE3[SKELETON_TYPE3["number"] = 0] = "number";
|
|
530
|
+
SKELETON_TYPE3[SKELETON_TYPE3["dateTime"] = 1] = "dateTime";
|
|
531
531
|
})(SKELETON_TYPE || (SKELETON_TYPE = {}));
|
|
532
532
|
function isLiteralElement(el) {
|
|
533
533
|
return el.type === TYPE.literal;
|
|
@@ -563,10 +563,10 @@ function isDateTimeSkeleton(el) {
|
|
|
563
563
|
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime);
|
|
564
564
|
}
|
|
565
565
|
|
|
566
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js
|
|
566
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js
|
|
567
567
|
var SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
568
568
|
|
|
569
|
-
// ../../node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js
|
|
569
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js
|
|
570
570
|
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;
|
|
571
571
|
function parseDateTimeSkeleton(skeleton) {
|
|
572
572
|
var result = {};
|
|
@@ -667,10 +667,10 @@ function parseDateTimeSkeleton(skeleton) {
|
|
|
667
667
|
return result;
|
|
668
668
|
}
|
|
669
669
|
|
|
670
|
-
// ../../node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js
|
|
670
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js
|
|
671
671
|
var WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
672
672
|
|
|
673
|
-
// ../../node_modules/@formatjs/icu-skeleton-parser/lib/number.js
|
|
673
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-skeleton-parser/lib/number.js
|
|
674
674
|
function parseNumberSkeletonFromString(skeleton) {
|
|
675
675
|
if (skeleton.length === 0) {
|
|
676
676
|
throw new Error("Number skeleton cannot be empty");
|
|
@@ -686,8 +686,8 @@ function parseNumberSkeletonFromString(skeleton) {
|
|
|
686
686
|
throw new Error("Invalid number skeleton");
|
|
687
687
|
}
|
|
688
688
|
var stem = stemAndOptions[0], options = stemAndOptions.slice(1);
|
|
689
|
-
for (var
|
|
690
|
-
var option = options_1[
|
|
689
|
+
for (var _a3 = 0, options_1 = options; _a3 < options_1.length; _a3++) {
|
|
690
|
+
var option = options_1[_a3];
|
|
691
691
|
if (option.length === 0) {
|
|
692
692
|
throw new Error("Invalid number skeleton");
|
|
693
693
|
}
|
|
@@ -936,7 +936,7 @@ function parseNumberSkeleton(tokens) {
|
|
|
936
936
|
return result;
|
|
937
937
|
}
|
|
938
938
|
|
|
939
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js
|
|
939
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js
|
|
940
940
|
var timeData = {
|
|
941
941
|
"001": [
|
|
942
942
|
"H",
|
|
@@ -2275,7 +2275,7 @@ var timeData = {
|
|
|
2275
2275
|
]
|
|
2276
2276
|
};
|
|
2277
2277
|
|
|
2278
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js
|
|
2278
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js
|
|
2279
2279
|
function getBestPattern(skeleton, locale) {
|
|
2280
2280
|
var skeletonCopy = "";
|
|
2281
2281
|
for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
|
|
@@ -2337,7 +2337,7 @@ function getDefaultHourSymbolFromLocale(locale) {
|
|
|
2337
2337
|
return hourCycles[0];
|
|
2338
2338
|
}
|
|
2339
2339
|
|
|
2340
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/parser.js
|
|
2340
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js
|
|
2341
2341
|
var _a;
|
|
2342
2342
|
var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
|
|
2343
2343
|
var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
|
|
@@ -2400,7 +2400,7 @@ var fromEntries = (
|
|
|
2400
2400
|
function fromEntries2(entries) {
|
|
2401
2401
|
var obj = {};
|
|
2402
2402
|
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
|
|
2403
|
-
var
|
|
2403
|
+
var _a3 = entries_1[_i], k = _a3[0], v = _a3[1];
|
|
2404
2404
|
obj[k] = v;
|
|
2405
2405
|
}
|
|
2406
2406
|
return obj;
|
|
@@ -2452,14 +2452,14 @@ function RE(s, flag) {
|
|
|
2452
2452
|
var matchIdentifierAtIndex;
|
|
2453
2453
|
if (REGEX_SUPPORTS_U_AND_Y) {
|
|
2454
2454
|
IDENTIFIER_PREFIX_RE_1 = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
2455
|
-
matchIdentifierAtIndex = function
|
|
2456
|
-
var
|
|
2455
|
+
matchIdentifierAtIndex = function matchIdentifierAtIndex3(s, index) {
|
|
2456
|
+
var _a3;
|
|
2457
2457
|
IDENTIFIER_PREFIX_RE_1.lastIndex = index;
|
|
2458
2458
|
var match = IDENTIFIER_PREFIX_RE_1.exec(s);
|
|
2459
|
-
return (
|
|
2459
|
+
return (_a3 = match[1]) !== null && _a3 !== void 0 ? _a3 : "";
|
|
2460
2460
|
};
|
|
2461
2461
|
} else {
|
|
2462
|
-
matchIdentifierAtIndex = function
|
|
2462
|
+
matchIdentifierAtIndex = function matchIdentifierAtIndex3(s, index) {
|
|
2463
2463
|
var match = [];
|
|
2464
2464
|
while (true) {
|
|
2465
2465
|
var c = codePointAt(s, index);
|
|
@@ -2476,7 +2476,7 @@ var IDENTIFIER_PREFIX_RE_1;
|
|
|
2476
2476
|
var Parser = (
|
|
2477
2477
|
/** @class */
|
|
2478
2478
|
function() {
|
|
2479
|
-
function
|
|
2479
|
+
function Parser3(message, options) {
|
|
2480
2480
|
if (options === void 0) {
|
|
2481
2481
|
options = {};
|
|
2482
2482
|
}
|
|
@@ -2487,13 +2487,13 @@ var Parser = (
|
|
|
2487
2487
|
this.requiresOtherClause = !!options.requiresOtherClause;
|
|
2488
2488
|
this.shouldParseSkeletons = !!options.shouldParseSkeletons;
|
|
2489
2489
|
}
|
|
2490
|
-
|
|
2490
|
+
Parser3.prototype.parse = function() {
|
|
2491
2491
|
if (this.offset() !== 0) {
|
|
2492
2492
|
throw Error("parser can only be used once");
|
|
2493
2493
|
}
|
|
2494
2494
|
return this.parseMessage(0, "", false);
|
|
2495
2495
|
};
|
|
2496
|
-
|
|
2496
|
+
Parser3.prototype.parseMessage = function(nestingLevel, parentArgType, expectingCloseTag) {
|
|
2497
2497
|
var elements = [];
|
|
2498
2498
|
while (!this.isEOF()) {
|
|
2499
2499
|
var char = this.char();
|
|
@@ -2534,7 +2534,7 @@ var Parser = (
|
|
|
2534
2534
|
}
|
|
2535
2535
|
return { val: elements, err: null };
|
|
2536
2536
|
};
|
|
2537
|
-
|
|
2537
|
+
Parser3.prototype.parseTag = function(nestingLevel, parentArgType) {
|
|
2538
2538
|
var startPosition = this.clonePosition();
|
|
2539
2539
|
this.bump();
|
|
2540
2540
|
var tagName = this.parseTagName();
|
|
@@ -2584,7 +2584,7 @@ var Parser = (
|
|
|
2584
2584
|
return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
|
|
2585
2585
|
}
|
|
2586
2586
|
};
|
|
2587
|
-
|
|
2587
|
+
Parser3.prototype.parseTagName = function() {
|
|
2588
2588
|
var startOffset = this.offset();
|
|
2589
2589
|
this.bump();
|
|
2590
2590
|
while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {
|
|
@@ -2592,7 +2592,7 @@ var Parser = (
|
|
|
2592
2592
|
}
|
|
2593
2593
|
return this.message.slice(startOffset, this.offset());
|
|
2594
2594
|
};
|
|
2595
|
-
|
|
2595
|
+
Parser3.prototype.parseLiteral = function(nestingLevel, parentArgType) {
|
|
2596
2596
|
var start = this.clonePosition();
|
|
2597
2597
|
var value = "";
|
|
2598
2598
|
while (true) {
|
|
@@ -2619,7 +2619,7 @@ var Parser = (
|
|
|
2619
2619
|
err: null
|
|
2620
2620
|
};
|
|
2621
2621
|
};
|
|
2622
|
-
|
|
2622
|
+
Parser3.prototype.tryParseLeftAngleBracket = function() {
|
|
2623
2623
|
if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
|
|
2624
2624
|
!_isAlphaOrSlash(this.peek() || 0))) {
|
|
2625
2625
|
this.bump();
|
|
@@ -2627,7 +2627,7 @@ var Parser = (
|
|
|
2627
2627
|
}
|
|
2628
2628
|
return null;
|
|
2629
2629
|
};
|
|
2630
|
-
|
|
2630
|
+
Parser3.prototype.tryParseQuote = function(parentArgType) {
|
|
2631
2631
|
if (this.isEOF() || this.char() !== 39) {
|
|
2632
2632
|
return null;
|
|
2633
2633
|
}
|
|
@@ -2669,7 +2669,7 @@ var Parser = (
|
|
|
2669
2669
|
}
|
|
2670
2670
|
return fromCodePoint.apply(void 0, codePoints);
|
|
2671
2671
|
};
|
|
2672
|
-
|
|
2672
|
+
Parser3.prototype.tryParseUnquoted = function(nestingLevel, parentArgType) {
|
|
2673
2673
|
if (this.isEOF()) {
|
|
2674
2674
|
return null;
|
|
2675
2675
|
}
|
|
@@ -2681,7 +2681,7 @@ var Parser = (
|
|
|
2681
2681
|
return fromCodePoint(ch);
|
|
2682
2682
|
}
|
|
2683
2683
|
};
|
|
2684
|
-
|
|
2684
|
+
Parser3.prototype.parseArgument = function(nestingLevel, expectingCloseTag) {
|
|
2685
2685
|
var openingBracePosition = this.clonePosition();
|
|
2686
2686
|
this.bump();
|
|
2687
2687
|
this.bumpSpace();
|
|
@@ -2725,7 +2725,7 @@ var Parser = (
|
|
|
2725
2725
|
return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
2726
2726
|
}
|
|
2727
2727
|
};
|
|
2728
|
-
|
|
2728
|
+
Parser3.prototype.parseIdentifierIfPossible = function() {
|
|
2729
2729
|
var startingPosition = this.clonePosition();
|
|
2730
2730
|
var startOffset = this.offset();
|
|
2731
2731
|
var value = matchIdentifierAtIndex(this.message, startOffset);
|
|
@@ -2735,8 +2735,8 @@ var Parser = (
|
|
|
2735
2735
|
var location = createLocation(startingPosition, endPosition);
|
|
2736
2736
|
return { value, location };
|
|
2737
2737
|
};
|
|
2738
|
-
|
|
2739
|
-
var
|
|
2738
|
+
Parser3.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
|
|
2739
|
+
var _a3;
|
|
2740
2740
|
var typeStartPosition = this.clonePosition();
|
|
2741
2741
|
var argType = this.parseIdentifierIfPossible().value;
|
|
2742
2742
|
var typeEndPosition = this.clonePosition();
|
|
@@ -2804,7 +2804,7 @@ var Parser = (
|
|
|
2804
2804
|
type: argType === "number" ? TYPE.number : argType === "date" ? TYPE.date : TYPE.time,
|
|
2805
2805
|
value,
|
|
2806
2806
|
location: location_1,
|
|
2807
|
-
style: (
|
|
2807
|
+
style: (_a3 = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a3 !== void 0 ? _a3 : null
|
|
2808
2808
|
},
|
|
2809
2809
|
err: null
|
|
2810
2810
|
};
|
|
@@ -2870,14 +2870,14 @@ var Parser = (
|
|
|
2870
2870
|
return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
|
|
2871
2871
|
}
|
|
2872
2872
|
};
|
|
2873
|
-
|
|
2873
|
+
Parser3.prototype.tryParseArgumentClose = function(openingBracePosition) {
|
|
2874
2874
|
if (this.isEOF() || this.char() !== 125) {
|
|
2875
2875
|
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
2876
2876
|
}
|
|
2877
2877
|
this.bump();
|
|
2878
2878
|
return { val: true, err: null };
|
|
2879
2879
|
};
|
|
2880
|
-
|
|
2880
|
+
Parser3.prototype.parseSimpleArgStyleIfPossible = function() {
|
|
2881
2881
|
var nestedBraces = 0;
|
|
2882
2882
|
var startPosition = this.clonePosition();
|
|
2883
2883
|
while (!this.isEOF()) {
|
|
@@ -2918,7 +2918,7 @@ var Parser = (
|
|
|
2918
2918
|
err: null
|
|
2919
2919
|
};
|
|
2920
2920
|
};
|
|
2921
|
-
|
|
2921
|
+
Parser3.prototype.parseNumberSkeletonFromString = function(skeleton, location) {
|
|
2922
2922
|
var tokens = [];
|
|
2923
2923
|
try {
|
|
2924
2924
|
tokens = parseNumberSkeletonFromString(skeleton);
|
|
@@ -2935,8 +2935,8 @@ var Parser = (
|
|
|
2935
2935
|
err: null
|
|
2936
2936
|
};
|
|
2937
2937
|
};
|
|
2938
|
-
|
|
2939
|
-
var
|
|
2938
|
+
Parser3.prototype.tryParsePluralOrSelectOptions = function(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
|
|
2939
|
+
var _a3;
|
|
2940
2940
|
var hasOtherClause = false;
|
|
2941
2941
|
var options = [];
|
|
2942
2942
|
var parsedSelectors = /* @__PURE__ */ new Set();
|
|
@@ -2983,7 +2983,7 @@ var Parser = (
|
|
|
2983
2983
|
]);
|
|
2984
2984
|
parsedSelectors.add(selector);
|
|
2985
2985
|
this.bumpSpace();
|
|
2986
|
-
|
|
2986
|
+
_a3 = this.parseIdentifierIfPossible(), selector = _a3.value, selectorLocation = _a3.location;
|
|
2987
2987
|
}
|
|
2988
2988
|
if (options.length === 0) {
|
|
2989
2989
|
return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
|
|
@@ -2993,7 +2993,7 @@ var Parser = (
|
|
|
2993
2993
|
}
|
|
2994
2994
|
return { val: options, err: null };
|
|
2995
2995
|
};
|
|
2996
|
-
|
|
2996
|
+
Parser3.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
|
|
2997
2997
|
var sign = 1;
|
|
2998
2998
|
var startingPosition = this.clonePosition();
|
|
2999
2999
|
if (this.bumpIf("+")) ; else if (this.bumpIf("-")) {
|
|
@@ -3021,20 +3021,20 @@ var Parser = (
|
|
|
3021
3021
|
}
|
|
3022
3022
|
return { val: decimal, err: null };
|
|
3023
3023
|
};
|
|
3024
|
-
|
|
3024
|
+
Parser3.prototype.offset = function() {
|
|
3025
3025
|
return this.position.offset;
|
|
3026
3026
|
};
|
|
3027
|
-
|
|
3027
|
+
Parser3.prototype.isEOF = function() {
|
|
3028
3028
|
return this.offset() === this.message.length;
|
|
3029
3029
|
};
|
|
3030
|
-
|
|
3030
|
+
Parser3.prototype.clonePosition = function() {
|
|
3031
3031
|
return {
|
|
3032
3032
|
offset: this.position.offset,
|
|
3033
3033
|
line: this.position.line,
|
|
3034
3034
|
column: this.position.column
|
|
3035
3035
|
};
|
|
3036
3036
|
};
|
|
3037
|
-
|
|
3037
|
+
Parser3.prototype.char = function() {
|
|
3038
3038
|
var offset = this.position.offset;
|
|
3039
3039
|
if (offset >= this.message.length) {
|
|
3040
3040
|
throw Error("out of bound");
|
|
@@ -3045,7 +3045,7 @@ var Parser = (
|
|
|
3045
3045
|
}
|
|
3046
3046
|
return code;
|
|
3047
3047
|
};
|
|
3048
|
-
|
|
3048
|
+
Parser3.prototype.error = function(kind, location) {
|
|
3049
3049
|
return {
|
|
3050
3050
|
val: null,
|
|
3051
3051
|
err: {
|
|
@@ -3055,7 +3055,7 @@ var Parser = (
|
|
|
3055
3055
|
}
|
|
3056
3056
|
};
|
|
3057
3057
|
};
|
|
3058
|
-
|
|
3058
|
+
Parser3.prototype.bump = function() {
|
|
3059
3059
|
if (this.isEOF()) {
|
|
3060
3060
|
return;
|
|
3061
3061
|
}
|
|
@@ -3069,7 +3069,7 @@ var Parser = (
|
|
|
3069
3069
|
this.position.offset += code < 65536 ? 1 : 2;
|
|
3070
3070
|
}
|
|
3071
3071
|
};
|
|
3072
|
-
|
|
3072
|
+
Parser3.prototype.bumpIf = function(prefix) {
|
|
3073
3073
|
if (startsWith(this.message, prefix, this.offset())) {
|
|
3074
3074
|
for (var i = 0; i < prefix.length; i++) {
|
|
3075
3075
|
this.bump();
|
|
@@ -3078,7 +3078,7 @@ var Parser = (
|
|
|
3078
3078
|
}
|
|
3079
3079
|
return false;
|
|
3080
3080
|
};
|
|
3081
|
-
|
|
3081
|
+
Parser3.prototype.bumpUntil = function(pattern) {
|
|
3082
3082
|
var currentOffset = this.offset();
|
|
3083
3083
|
var index = this.message.indexOf(pattern, currentOffset);
|
|
3084
3084
|
if (index >= 0) {
|
|
@@ -3089,7 +3089,7 @@ var Parser = (
|
|
|
3089
3089
|
return false;
|
|
3090
3090
|
}
|
|
3091
3091
|
};
|
|
3092
|
-
|
|
3092
|
+
Parser3.prototype.bumpTo = function(targetOffset) {
|
|
3093
3093
|
if (this.offset() > targetOffset) {
|
|
3094
3094
|
throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
|
|
3095
3095
|
}
|
|
@@ -3108,12 +3108,12 @@ var Parser = (
|
|
|
3108
3108
|
}
|
|
3109
3109
|
}
|
|
3110
3110
|
};
|
|
3111
|
-
|
|
3111
|
+
Parser3.prototype.bumpSpace = function() {
|
|
3112
3112
|
while (!this.isEOF() && _isWhiteSpace(this.char())) {
|
|
3113
3113
|
this.bump();
|
|
3114
3114
|
}
|
|
3115
3115
|
};
|
|
3116
|
-
|
|
3116
|
+
Parser3.prototype.peek = function() {
|
|
3117
3117
|
if (this.isEOF()) {
|
|
3118
3118
|
return null;
|
|
3119
3119
|
}
|
|
@@ -3122,7 +3122,7 @@ var Parser = (
|
|
|
3122
3122
|
var nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1));
|
|
3123
3123
|
return nextCode !== null && nextCode !== void 0 ? nextCode : null;
|
|
3124
3124
|
};
|
|
3125
|
-
return
|
|
3125
|
+
return Parser3;
|
|
3126
3126
|
}()
|
|
3127
3127
|
);
|
|
3128
3128
|
function _isAlpha(codepoint) {
|
|
@@ -3141,7 +3141,7 @@ function _isPatternSyntax(c) {
|
|
|
3141
3141
|
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;
|
|
3142
3142
|
}
|
|
3143
3143
|
|
|
3144
|
-
// ../../node_modules/@formatjs/icu-messageformat-parser/lib/index.js
|
|
3144
|
+
// ../../node_modules/intl-messageformat/node_modules/@formatjs/icu-messageformat-parser/lib/index.js
|
|
3145
3145
|
function pruneLocation(els) {
|
|
3146
3146
|
els.forEach(function(el) {
|
|
3147
3147
|
delete el.location;
|
|
@@ -3481,34 +3481,34 @@ function createDefaultFormatters(cache) {
|
|
|
3481
3481
|
}
|
|
3482
3482
|
return {
|
|
3483
3483
|
getNumberFormat: memoize(function() {
|
|
3484
|
-
var
|
|
3484
|
+
var _a3;
|
|
3485
3485
|
var args = [];
|
|
3486
3486
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3487
3487
|
args[_i] = arguments[_i];
|
|
3488
3488
|
}
|
|
3489
|
-
return new ((
|
|
3489
|
+
return new ((_a3 = Intl.NumberFormat).bind.apply(_a3, __spreadArray([void 0], args, false)))();
|
|
3490
3490
|
}, {
|
|
3491
3491
|
cache: createFastMemoizeCache(cache.number),
|
|
3492
3492
|
strategy: strategies.variadic
|
|
3493
3493
|
}),
|
|
3494
3494
|
getDateTimeFormat: memoize(function() {
|
|
3495
|
-
var
|
|
3495
|
+
var _a3;
|
|
3496
3496
|
var args = [];
|
|
3497
3497
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3498
3498
|
args[_i] = arguments[_i];
|
|
3499
3499
|
}
|
|
3500
|
-
return new ((
|
|
3500
|
+
return new ((_a3 = Intl.DateTimeFormat).bind.apply(_a3, __spreadArray([void 0], args, false)))();
|
|
3501
3501
|
}, {
|
|
3502
3502
|
cache: createFastMemoizeCache(cache.dateTime),
|
|
3503
3503
|
strategy: strategies.variadic
|
|
3504
3504
|
}),
|
|
3505
3505
|
getPluralRules: memoize(function() {
|
|
3506
|
-
var
|
|
3506
|
+
var _a3;
|
|
3507
3507
|
var args = [];
|
|
3508
3508
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3509
3509
|
args[_i] = arguments[_i];
|
|
3510
3510
|
}
|
|
3511
|
-
return new ((
|
|
3511
|
+
return new ((_a3 = Intl.PluralRules).bind.apply(_a3, __spreadArray([void 0], args, false)))();
|
|
3512
3512
|
}, {
|
|
3513
3513
|
cache: createFastMemoizeCache(cache.pluralRules),
|
|
3514
3514
|
strategy: strategies.variadic
|
|
@@ -3550,9 +3550,9 @@ var IntlMessageFormat = (
|
|
|
3550
3550
|
return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, void 0, _this.message);
|
|
3551
3551
|
};
|
|
3552
3552
|
this.resolvedOptions = function() {
|
|
3553
|
-
var
|
|
3553
|
+
var _a4;
|
|
3554
3554
|
return {
|
|
3555
|
-
locale: ((
|
|
3555
|
+
locale: ((_a4 = _this.resolvedLocale) === null || _a4 === void 0 ? void 0 : _a4.toString()) || Intl.NumberFormat.supportedLocalesOf(_this.locales)[0]
|
|
3556
3556
|
};
|
|
3557
3557
|
};
|
|
3558
3558
|
this.getAst = function() {
|
|
@@ -3565,7 +3565,7 @@ var IntlMessageFormat = (
|
|
|
3565
3565
|
if (!IntlMessageFormat2.__parse) {
|
|
3566
3566
|
throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
3567
3567
|
}
|
|
3568
|
-
var
|
|
3568
|
+
var _a3 = opts || {}; _a3.formatters; var parseOpts = __rest(_a3, ["formatters"]);
|
|
3569
3569
|
this.ast = IntlMessageFormat2.__parse(message, __assign(__assign({}, parseOpts), { locale: this.resolvedLocale }));
|
|
3570
3570
|
} else {
|
|
3571
3571
|
this.ast = message;
|
|
@@ -3748,8 +3748,8 @@ var MissingTranslationError = (
|
|
|
3748
3748
|
__extends(MissingTranslationError2, _super);
|
|
3749
3749
|
function MissingTranslationError2(descriptor, locale) {
|
|
3750
3750
|
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) {
|
|
3751
|
-
var
|
|
3752
|
-
return (
|
|
3751
|
+
var _a3;
|
|
3752
|
+
return (_a3 = e.value) !== null && _a3 !== void 0 ? _a3 : JSON.stringify(e);
|
|
3753
3753
|
}).join(), ")") : "id", " as fallback.")) || this;
|
|
3754
3754
|
_this.descriptor = descriptor;
|
|
3755
3755
|
return _this;
|
|
@@ -3825,34 +3825,34 @@ function createFormatters(cache) {
|
|
|
3825
3825
|
var ListFormat = Intl.ListFormat;
|
|
3826
3826
|
var DisplayNames = Intl.DisplayNames;
|
|
3827
3827
|
var getDateTimeFormat = memoize(function() {
|
|
3828
|
-
var
|
|
3828
|
+
var _a3;
|
|
3829
3829
|
var args = [];
|
|
3830
3830
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3831
3831
|
args[_i] = arguments[_i];
|
|
3832
3832
|
}
|
|
3833
|
-
return new ((
|
|
3833
|
+
return new ((_a3 = Intl.DateTimeFormat).bind.apply(_a3, __spreadArray([void 0], args, false)))();
|
|
3834
3834
|
}, {
|
|
3835
3835
|
cache: createFastMemoizeCache2(cache.dateTime),
|
|
3836
3836
|
strategy: strategies.variadic
|
|
3837
3837
|
});
|
|
3838
3838
|
var getNumberFormat = memoize(function() {
|
|
3839
|
-
var
|
|
3839
|
+
var _a3;
|
|
3840
3840
|
var args = [];
|
|
3841
3841
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3842
3842
|
args[_i] = arguments[_i];
|
|
3843
3843
|
}
|
|
3844
|
-
return new ((
|
|
3844
|
+
return new ((_a3 = Intl.NumberFormat).bind.apply(_a3, __spreadArray([void 0], args, false)))();
|
|
3845
3845
|
}, {
|
|
3846
3846
|
cache: createFastMemoizeCache2(cache.number),
|
|
3847
3847
|
strategy: strategies.variadic
|
|
3848
3848
|
});
|
|
3849
3849
|
var getPluralRules = memoize(function() {
|
|
3850
|
-
var
|
|
3850
|
+
var _a3;
|
|
3851
3851
|
var args = [];
|
|
3852
3852
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3853
3853
|
args[_i] = arguments[_i];
|
|
3854
3854
|
}
|
|
3855
|
-
return new ((
|
|
3855
|
+
return new ((_a3 = Intl.PluralRules).bind.apply(_a3, __spreadArray([void 0], args, false)))();
|
|
3856
3856
|
}, {
|
|
3857
3857
|
cache: createFastMemoizeCache2(cache.pluralRules),
|
|
3858
3858
|
strategy: strategies.variadic
|
|
@@ -3915,6 +3915,84 @@ function getNamedFormat(formats, type, name, onError) {
|
|
|
3915
3915
|
onError(new UnsupportedFormatterError("No ".concat(type, " format named: ").concat(name)));
|
|
3916
3916
|
}
|
|
3917
3917
|
|
|
3918
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/ecma402-abstract/lib/utils.js
|
|
3919
|
+
function invariant2(condition, message, Err) {
|
|
3920
|
+
if (Err === void 0) {
|
|
3921
|
+
Err = Error;
|
|
3922
|
+
}
|
|
3923
|
+
if (!condition) {
|
|
3924
|
+
throw new Err(message);
|
|
3925
|
+
}
|
|
3926
|
+
}
|
|
3927
|
+
|
|
3928
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/icu-messageformat-parser/lib/error.js
|
|
3929
|
+
var ErrorKind2;
|
|
3930
|
+
(function(ErrorKind3) {
|
|
3931
|
+
ErrorKind3[ErrorKind3["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
|
|
3932
|
+
ErrorKind3[ErrorKind3["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
|
|
3933
|
+
ErrorKind3[ErrorKind3["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
|
|
3934
|
+
ErrorKind3[ErrorKind3["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
|
|
3935
|
+
ErrorKind3[ErrorKind3["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
|
|
3936
|
+
ErrorKind3[ErrorKind3["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
|
|
3937
|
+
ErrorKind3[ErrorKind3["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
|
|
3938
|
+
ErrorKind3[ErrorKind3["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
|
|
3939
|
+
ErrorKind3[ErrorKind3["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
|
|
3940
|
+
ErrorKind3[ErrorKind3["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
|
|
3941
|
+
ErrorKind3[ErrorKind3["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
|
|
3942
|
+
ErrorKind3[ErrorKind3["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
|
|
3943
|
+
ErrorKind3[ErrorKind3["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
3944
|
+
ErrorKind3[ErrorKind3["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
3945
|
+
ErrorKind3[ErrorKind3["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
|
|
3946
|
+
ErrorKind3[ErrorKind3["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
|
|
3947
|
+
ErrorKind3[ErrorKind3["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
|
|
3948
|
+
ErrorKind3[ErrorKind3["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
|
|
3949
|
+
ErrorKind3[ErrorKind3["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
|
|
3950
|
+
ErrorKind3[ErrorKind3["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
|
|
3951
|
+
ErrorKind3[ErrorKind3["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
|
|
3952
|
+
ErrorKind3[ErrorKind3["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
|
|
3953
|
+
ErrorKind3[ErrorKind3["INVALID_TAG"] = 23] = "INVALID_TAG";
|
|
3954
|
+
ErrorKind3[ErrorKind3["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
|
|
3955
|
+
ErrorKind3[ErrorKind3["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
|
|
3956
|
+
ErrorKind3[ErrorKind3["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
|
|
3957
|
+
})(ErrorKind2 || (ErrorKind2 = {}));
|
|
3958
|
+
|
|
3959
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/icu-messageformat-parser/lib/types.js
|
|
3960
|
+
var TYPE2;
|
|
3961
|
+
(function(TYPE3) {
|
|
3962
|
+
TYPE3[TYPE3["literal"] = 0] = "literal";
|
|
3963
|
+
TYPE3[TYPE3["argument"] = 1] = "argument";
|
|
3964
|
+
TYPE3[TYPE3["number"] = 2] = "number";
|
|
3965
|
+
TYPE3[TYPE3["date"] = 3] = "date";
|
|
3966
|
+
TYPE3[TYPE3["time"] = 4] = "time";
|
|
3967
|
+
TYPE3[TYPE3["select"] = 5] = "select";
|
|
3968
|
+
TYPE3[TYPE3["plural"] = 6] = "plural";
|
|
3969
|
+
TYPE3[TYPE3["pound"] = 7] = "pound";
|
|
3970
|
+
TYPE3[TYPE3["tag"] = 8] = "tag";
|
|
3971
|
+
})(TYPE2 || (TYPE2 = {}));
|
|
3972
|
+
var SKELETON_TYPE2;
|
|
3973
|
+
(function(SKELETON_TYPE3) {
|
|
3974
|
+
SKELETON_TYPE3[SKELETON_TYPE3["number"] = 0] = "number";
|
|
3975
|
+
SKELETON_TYPE3[SKELETON_TYPE3["dateTime"] = 1] = "dateTime";
|
|
3976
|
+
})(SKELETON_TYPE2 || (SKELETON_TYPE2 = {}));
|
|
3977
|
+
|
|
3978
|
+
// ../../node_modules/@formatjs/intl/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js
|
|
3979
|
+
var _a2;
|
|
3980
|
+
var REGEX_SUPPORTS_U_AND_Y2 = true;
|
|
3981
|
+
try {
|
|
3982
|
+
re = RE2("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
3983
|
+
REGEX_SUPPORTS_U_AND_Y2 = ((_a2 = re.exec("a")) === null || _a2 === void 0 ? void 0 : _a2[0]) === "a";
|
|
3984
|
+
} catch (_) {
|
|
3985
|
+
REGEX_SUPPORTS_U_AND_Y2 = false;
|
|
3986
|
+
}
|
|
3987
|
+
var re;
|
|
3988
|
+
function RE2(s, flag) {
|
|
3989
|
+
return new RegExp(s, flag);
|
|
3990
|
+
}
|
|
3991
|
+
if (REGEX_SUPPORTS_U_AND_Y2) {
|
|
3992
|
+
IDENTIFIER_PREFIX_RE_1 = RE2("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
3993
|
+
}
|
|
3994
|
+
var IDENTIFIER_PREFIX_RE_1;
|
|
3995
|
+
|
|
3918
3996
|
// ../../node_modules/@formatjs/intl/lib/src/message.js
|
|
3919
3997
|
function setTimeZoneInOptions(opts, timeZone) {
|
|
3920
3998
|
return Object.keys(opts).reduce(function(all, k) {
|
|
@@ -3936,13 +4014,13 @@ function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
|
|
|
3936
4014
|
var mfFormats = IntlMessageFormat.formats;
|
|
3937
4015
|
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)) });
|
|
3938
4016
|
}
|
|
3939
|
-
var formatMessage = function(
|
|
3940
|
-
var locale =
|
|
4017
|
+
var formatMessage = function(_a3, state, messageDescriptor, values, opts) {
|
|
4018
|
+
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;
|
|
3941
4019
|
if (messageDescriptor === void 0) {
|
|
3942
4020
|
messageDescriptor = { id: "" };
|
|
3943
4021
|
}
|
|
3944
4022
|
var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
|
|
3945
|
-
|
|
4023
|
+
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");
|
|
3946
4024
|
var id = String(msgId);
|
|
3947
4025
|
var message = (
|
|
3948
4026
|
// In case messages is Object.create(null)
|
|
@@ -3950,7 +4028,7 @@ var formatMessage = function(_a2, state, messageDescriptor, values, opts) {
|
|
|
3950
4028
|
// See https://github.com/formatjs/formatjs/issues/1914
|
|
3951
4029
|
messages && Object.prototype.hasOwnProperty.call(messages, id) && messages[id]
|
|
3952
4030
|
);
|
|
3953
|
-
if (Array.isArray(message) && message.length === 1 && message[0].type ===
|
|
4031
|
+
if (Array.isArray(message) && message.length === 1 && message[0].type === TYPE2.literal) {
|
|
3954
4032
|
return message[0].value;
|
|
3955
4033
|
}
|
|
3956
4034
|
if (!values && message && typeof message === "string" && !defaultRichTextElements) {
|
|
@@ -4022,8 +4100,8 @@ var DATE_TIME_FORMAT_OPTIONS = [
|
|
|
4022
4100
|
"numberingSystem",
|
|
4023
4101
|
"fractionalSecondDigits"
|
|
4024
4102
|
];
|
|
4025
|
-
function getFormatter(
|
|
4026
|
-
var locale =
|
|
4103
|
+
function getFormatter(_a3, type, getDateTimeFormat, options) {
|
|
4104
|
+
var locale = _a3.locale, formats = _a3.formats, onError = _a3.onError, timeZone = _a3.timeZone;
|
|
4027
4105
|
if (options === void 0) {
|
|
4028
4106
|
options = {};
|
|
4029
4107
|
}
|
|
@@ -4036,11 +4114,11 @@ function getFormatter(_a2, type, getDateTimeFormat, options) {
|
|
|
4036
4114
|
return getDateTimeFormat(locale, filteredOptions);
|
|
4037
4115
|
}
|
|
4038
4116
|
function formatDate(config, getDateTimeFormat) {
|
|
4039
|
-
var
|
|
4117
|
+
var _a3 = [];
|
|
4040
4118
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
4041
|
-
|
|
4119
|
+
_a3[_i - 2] = arguments[_i];
|
|
4042
4120
|
}
|
|
4043
|
-
var value =
|
|
4121
|
+
var value = _a3[0], _b = _a3[1], options = _b === void 0 ? {} : _b;
|
|
4044
4122
|
var date = typeof value === "string" ? new Date(value || 0) : value;
|
|
4045
4123
|
try {
|
|
4046
4124
|
return getFormatter(config, "date", getDateTimeFormat, options).format(date);
|
|
@@ -4050,11 +4128,11 @@ function formatDate(config, getDateTimeFormat) {
|
|
|
4050
4128
|
return String(date);
|
|
4051
4129
|
}
|
|
4052
4130
|
function formatTime(config, getDateTimeFormat) {
|
|
4053
|
-
var
|
|
4131
|
+
var _a3 = [];
|
|
4054
4132
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
4055
|
-
|
|
4133
|
+
_a3[_i - 2] = arguments[_i];
|
|
4056
4134
|
}
|
|
4057
|
-
var value =
|
|
4135
|
+
var value = _a3[0], _b = _a3[1], options = _b === void 0 ? {} : _b;
|
|
4058
4136
|
var date = typeof value === "string" ? new Date(value || 0) : value;
|
|
4059
4137
|
try {
|
|
4060
4138
|
return getFormatter(config, "time", getDateTimeFormat, options).format(date);
|
|
@@ -4064,11 +4142,11 @@ function formatTime(config, getDateTimeFormat) {
|
|
|
4064
4142
|
return String(date);
|
|
4065
4143
|
}
|
|
4066
4144
|
function formatDateTimeRange(config, getDateTimeFormat) {
|
|
4067
|
-
var
|
|
4145
|
+
var _a3 = [];
|
|
4068
4146
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
4069
|
-
|
|
4147
|
+
_a3[_i - 2] = arguments[_i];
|
|
4070
4148
|
}
|
|
4071
|
-
var from =
|
|
4149
|
+
var from = _a3[0], to = _a3[1], _b = _a3[2], options = _b === void 0 ? {} : _b;
|
|
4072
4150
|
var timeZone = config.timeZone, locale = config.locale, onError = config.onError;
|
|
4073
4151
|
var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, timeZone ? { timeZone } : {});
|
|
4074
4152
|
try {
|
|
@@ -4079,11 +4157,11 @@ function formatDateTimeRange(config, getDateTimeFormat) {
|
|
|
4079
4157
|
return String(from);
|
|
4080
4158
|
}
|
|
4081
4159
|
function formatDateToParts(config, getDateTimeFormat) {
|
|
4082
|
-
var
|
|
4160
|
+
var _a3 = [];
|
|
4083
4161
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
4084
|
-
|
|
4162
|
+
_a3[_i - 2] = arguments[_i];
|
|
4085
4163
|
}
|
|
4086
|
-
var value =
|
|
4164
|
+
var value = _a3[0], _b = _a3[1], options = _b === void 0 ? {} : _b;
|
|
4087
4165
|
var date = typeof value === "string" ? new Date(value || 0) : value;
|
|
4088
4166
|
try {
|
|
4089
4167
|
return getFormatter(config, "date", getDateTimeFormat, options).formatToParts(date);
|
|
@@ -4093,11 +4171,11 @@ function formatDateToParts(config, getDateTimeFormat) {
|
|
|
4093
4171
|
return [];
|
|
4094
4172
|
}
|
|
4095
4173
|
function formatTimeToParts(config, getDateTimeFormat) {
|
|
4096
|
-
var
|
|
4174
|
+
var _a3 = [];
|
|
4097
4175
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
4098
|
-
|
|
4176
|
+
_a3[_i - 2] = arguments[_i];
|
|
4099
4177
|
}
|
|
4100
|
-
var value =
|
|
4178
|
+
var value = _a3[0], _b = _a3[1], options = _b === void 0 ? {} : _b;
|
|
4101
4179
|
var date = typeof value === "string" ? new Date(value || 0) : value;
|
|
4102
4180
|
try {
|
|
4103
4181
|
return getFormatter(config, "time", getDateTimeFormat, options).formatToParts(date);
|
|
@@ -4114,8 +4192,8 @@ var DISPLAY_NAMES_OPTONS = [
|
|
|
4114
4192
|
"fallback",
|
|
4115
4193
|
"languageDisplay"
|
|
4116
4194
|
];
|
|
4117
|
-
function formatDisplayName(
|
|
4118
|
-
var locale =
|
|
4195
|
+
function formatDisplayName(_a3, getDisplayNames, value, options) {
|
|
4196
|
+
var locale = _a3.locale, onError = _a3.onError;
|
|
4119
4197
|
var DisplayNames = Intl.DisplayNames;
|
|
4120
4198
|
if (!DisplayNames) {
|
|
4121
4199
|
onError(new FormatError('Intl.DisplayNames is not available in this environment.\nTry polyfilling it using "@formatjs/intl-displaynames"\n', ErrorCode.MISSING_INTL_API));
|
|
@@ -4154,8 +4232,8 @@ function formatList(opts, getListFormat, values, options) {
|
|
|
4154
4232
|
}, []);
|
|
4155
4233
|
return results.length === 1 ? results[0] : results.length === 0 ? "" : results;
|
|
4156
4234
|
}
|
|
4157
|
-
function formatListToParts(
|
|
4158
|
-
var locale =
|
|
4235
|
+
function formatListToParts(_a3, getListFormat, values, options) {
|
|
4236
|
+
var locale = _a3.locale, onError = _a3.onError;
|
|
4159
4237
|
if (options === void 0) {
|
|
4160
4238
|
options = {};
|
|
4161
4239
|
}
|
|
@@ -4185,8 +4263,8 @@ function formatListToParts(_a2, getListFormat, values, options) {
|
|
|
4185
4263
|
|
|
4186
4264
|
// ../../node_modules/@formatjs/intl/lib/src/plural.js
|
|
4187
4265
|
var PLURAL_FORMAT_OPTIONS = ["type"];
|
|
4188
|
-
function formatPlural(
|
|
4189
|
-
var locale =
|
|
4266
|
+
function formatPlural(_a3, getPluralRules, value, options) {
|
|
4267
|
+
var locale = _a3.locale, onError = _a3.onError;
|
|
4190
4268
|
if (options === void 0) {
|
|
4191
4269
|
options = {};
|
|
4192
4270
|
}
|
|
@@ -4204,8 +4282,8 @@ function formatPlural(_a2, getPluralRules, value, options) {
|
|
|
4204
4282
|
|
|
4205
4283
|
// ../../node_modules/@formatjs/intl/lib/src/relativeTime.js
|
|
4206
4284
|
var RELATIVE_TIME_FORMAT_OPTIONS = ["numeric", "style"];
|
|
4207
|
-
function getFormatter2(
|
|
4208
|
-
var locale =
|
|
4285
|
+
function getFormatter2(_a3, getRelativeTimeFormat, options) {
|
|
4286
|
+
var locale = _a3.locale, formats = _a3.formats, onError = _a3.onError;
|
|
4209
4287
|
if (options === void 0) {
|
|
4210
4288
|
options = {};
|
|
4211
4289
|
}
|
|
@@ -4256,8 +4334,8 @@ var NUMBER_FORMAT_OPTIONS = [
|
|
|
4256
4334
|
"unitDisplay",
|
|
4257
4335
|
"numberingSystem"
|
|
4258
4336
|
];
|
|
4259
|
-
function getFormatter3(
|
|
4260
|
-
var locale =
|
|
4337
|
+
function getFormatter3(_a3, getNumberFormat, options) {
|
|
4338
|
+
var locale = _a3.locale, formats = _a3.formats, onError = _a3.onError;
|
|
4261
4339
|
if (options === void 0) {
|
|
4262
4340
|
options = {};
|
|
4263
4341
|
}
|
|
@@ -4468,8 +4546,8 @@ var formatMessage2 = function(config, formatters, descriptor, rawValues) {
|
|
|
4468
4546
|
}
|
|
4469
4547
|
return chunks;
|
|
4470
4548
|
};
|
|
4471
|
-
var createIntl2 = function(
|
|
4472
|
-
var rawDefaultRichTextElements =
|
|
4549
|
+
var createIntl2 = function(_a3, cache) {
|
|
4550
|
+
var rawDefaultRichTextElements = _a3.defaultRichTextElements, config = __rest(_a3, ["defaultRichTextElements"]);
|
|
4473
4551
|
var defaultRichTextElements = assignUniqueKeysToFormatXMLElementFnArgument(rawDefaultRichTextElements);
|
|
4474
4552
|
var coreIntl = createIntl(__assign(__assign(__assign({}, DEFAULT_INTL_CONFIG2), config), { defaultRichTextElements }), cache);
|
|
4475
4553
|
var resolvedConfig = {
|
|
@@ -4504,8 +4582,8 @@ var IntlProvider2 = (
|
|
|
4504
4582
|
};
|
|
4505
4583
|
return _this;
|
|
4506
4584
|
}
|
|
4507
|
-
IntlProvider4.getDerivedStateFromProps = function(props,
|
|
4508
|
-
var prevConfig =
|
|
4585
|
+
IntlProvider4.getDerivedStateFromProps = function(props, _a3) {
|
|
4586
|
+
var prevConfig = _a3.prevConfig, cache = _a3.cache;
|
|
4509
4587
|
var config = processIntlConfig(props);
|
|
4510
4588
|
if (!shallowEqual(prevConfig, config)) {
|
|
4511
4589
|
return {
|
|
@@ -4564,8 +4642,8 @@ var defaultGroupOrder = [
|
|
|
4564
4642
|
"webauthn"
|
|
4565
4643
|
];
|
|
4566
4644
|
function defaultNodeSorter(a, b) {
|
|
4567
|
-
var
|
|
4568
|
-
const aGroupWeight = (
|
|
4645
|
+
var _a3, _b;
|
|
4646
|
+
const aGroupWeight = (_a3 = defaultGroupOrder.indexOf(a.group)) != null ? _a3 : 999;
|
|
4569
4647
|
const bGroupWeight = (_b = defaultGroupOrder.indexOf(b.group)) != null ? _b : 999;
|
|
4570
4648
|
return aGroupWeight - bGroupWeight;
|
|
4571
4649
|
}
|
|
@@ -4674,8 +4752,8 @@ var NodeInput = ({
|
|
|
4674
4752
|
onloadTrigger,
|
|
4675
4753
|
onclickTrigger,
|
|
4676
4754
|
// These properties do not exist on input fields so we remove them (as we already have handled them).
|
|
4677
|
-
onclick:
|
|
4678
|
-
onload:
|
|
4755
|
+
onclick: _ignoredOnclick,
|
|
4756
|
+
onload: _ignoredOnload,
|
|
4679
4757
|
//
|
|
4680
4758
|
...attrs
|
|
4681
4759
|
} = attributes;
|
|
@@ -4687,10 +4765,11 @@ var NodeInput = ({
|
|
|
4687
4765
|
triggerToWindowCall(onloadTrigger);
|
|
4688
4766
|
}
|
|
4689
4767
|
},
|
|
4690
|
-
//
|
|
4768
|
+
// TODO(jonas): make sure onloadTrigger is stable
|
|
4769
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- ignore onloadTrigger for now, until we make sure this is stable
|
|
4691
4770
|
[]
|
|
4692
4771
|
);
|
|
4693
|
-
const handleClick = (
|
|
4772
|
+
const handleClick = () => {
|
|
4694
4773
|
if (onclickTrigger) {
|
|
4695
4774
|
triggerToWindowCall(onclickTrigger);
|
|
4696
4775
|
}
|
|
@@ -4768,7 +4847,12 @@ var Node = ({ node, onClick }) => {
|
|
|
4768
4847
|
} else if (clientFetch.isUiNodeAnchorAttributes(node.attributes)) {
|
|
4769
4848
|
return /* @__PURE__ */ jsxRuntime.jsx(Components.LinkButton, { attributes: node.attributes, node });
|
|
4770
4849
|
} else if (clientFetch.isUiNodeScriptAttributes(node.attributes)) {
|
|
4771
|
-
const {
|
|
4850
|
+
const {
|
|
4851
|
+
crossorigin,
|
|
4852
|
+
referrerpolicy,
|
|
4853
|
+
node_type: _nodeType,
|
|
4854
|
+
...attributes
|
|
4855
|
+
} = node.attributes;
|
|
4772
4856
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4773
4857
|
"script",
|
|
4774
4858
|
{
|
|
@@ -4890,18 +4974,18 @@ async function onSubmitLogin({ config, flow }, {
|
|
|
4890
4974
|
body,
|
|
4891
4975
|
onRedirect
|
|
4892
4976
|
}) {
|
|
4893
|
-
var
|
|
4977
|
+
var _a3;
|
|
4894
4978
|
if (!config.sdk.url) {
|
|
4895
4979
|
throw new Error(
|
|
4896
4980
|
`Please supply your Ory Network SDK url to the Ory Elements configuration.`
|
|
4897
4981
|
);
|
|
4898
4982
|
}
|
|
4899
|
-
await clientFetch.frontendClient(config.sdk.url, (
|
|
4983
|
+
await clientFetch.frontendClient(config.sdk.url, (_a3 = config.sdk.options) != null ? _a3 : {}).updateLoginFlowRaw({
|
|
4900
4984
|
flow: flow.id,
|
|
4901
4985
|
updateLoginFlowBody: body
|
|
4902
4986
|
}).then(() => {
|
|
4903
|
-
var
|
|
4904
|
-
window.location.href = (
|
|
4987
|
+
var _a4;
|
|
4988
|
+
window.location.href = (_a4 = flow.return_to) != null ? _a4 : config.sdk.url + "/self-service/login/browser";
|
|
4905
4989
|
}).catch(
|
|
4906
4990
|
clientFetch.handleFlowError({
|
|
4907
4991
|
onRestartFlow: () => {
|
|
@@ -4922,13 +5006,13 @@ async function onSubmitSettings({ config, flow }, {
|
|
|
4922
5006
|
body,
|
|
4923
5007
|
onRedirect
|
|
4924
5008
|
}) {
|
|
4925
|
-
var
|
|
5009
|
+
var _a3;
|
|
4926
5010
|
if (!config.sdk.url) {
|
|
4927
5011
|
throw new Error(
|
|
4928
5012
|
`Please supply your Ory Network SDK url to the Ory Elements configuration.`
|
|
4929
5013
|
);
|
|
4930
5014
|
}
|
|
4931
|
-
const client = clientFetch.frontendClient(config.sdk.url, (
|
|
5015
|
+
const client = clientFetch.frontendClient(config.sdk.url, (_a3 = config.sdk.options) != null ? _a3 : {});
|
|
4932
5016
|
await client.updateSettingsFlowRaw({
|
|
4933
5017
|
flow: flow.id,
|
|
4934
5018
|
updateSettingsFlowBody: body
|
|
@@ -4961,13 +5045,13 @@ async function onSubmitRecovery({ config, flow }, {
|
|
|
4961
5045
|
body,
|
|
4962
5046
|
onRedirect
|
|
4963
5047
|
}) {
|
|
4964
|
-
var
|
|
5048
|
+
var _a3;
|
|
4965
5049
|
if (!config.sdk.url) {
|
|
4966
5050
|
throw new Error(
|
|
4967
5051
|
`Please supply your Ory Network SDK url to the Ory Elements configuration.`
|
|
4968
5052
|
);
|
|
4969
5053
|
}
|
|
4970
|
-
await clientFetch.frontendClient(config.sdk.url, (
|
|
5054
|
+
await clientFetch.frontendClient(config.sdk.url, (_a3 = config.sdk.options) != null ? _a3 : {}).updateRecoveryFlowRaw({
|
|
4971
5055
|
flow: flow.id,
|
|
4972
5056
|
updateRecoveryFlowBody: body
|
|
4973
5057
|
}).then(async (res) => {
|
|
@@ -5002,13 +5086,13 @@ async function onSubmitVerification({ config, flow }, {
|
|
|
5002
5086
|
body,
|
|
5003
5087
|
onRedirect
|
|
5004
5088
|
}) {
|
|
5005
|
-
var
|
|
5089
|
+
var _a3;
|
|
5006
5090
|
if (!config.sdk.url) {
|
|
5007
5091
|
throw new Error(
|
|
5008
5092
|
`Please supply your Ory Network SDK URL to the Ory Elements configuration.`
|
|
5009
5093
|
);
|
|
5010
5094
|
}
|
|
5011
|
-
await clientFetch.frontendClient(config.sdk.url, (
|
|
5095
|
+
await clientFetch.frontendClient(config.sdk.url, (_a3 = config.sdk.options) != null ? _a3 : {}).updateVerificationFlowRaw({
|
|
5012
5096
|
flow: flow.id,
|
|
5013
5097
|
updateVerificationFlowBody: body
|
|
5014
5098
|
}).then(
|
|
@@ -5036,13 +5120,13 @@ async function onSubmitRegistration({ config, flow }, {
|
|
|
5036
5120
|
body,
|
|
5037
5121
|
onRedirect
|
|
5038
5122
|
}) {
|
|
5039
|
-
var
|
|
5123
|
+
var _a3;
|
|
5040
5124
|
if (!config.sdk.url) {
|
|
5041
5125
|
throw new Error(
|
|
5042
5126
|
`Please supply your Ory Network SDK url to the Ory Elements configuration.`
|
|
5043
5127
|
);
|
|
5044
5128
|
}
|
|
5045
|
-
const client = clientFetch.frontendClient(config.sdk.url, (
|
|
5129
|
+
const client = clientFetch.frontendClient(config.sdk.url, (_a3 = config.sdk.options) != null ? _a3 : {});
|
|
5046
5130
|
await client.updateRegistrationFlowRaw({
|
|
5047
5131
|
flow: flow.id,
|
|
5048
5132
|
updateRegistrationFlowBody: body
|
|
@@ -5071,7 +5155,7 @@ async function onSubmitRegistration({ config, flow }, {
|
|
|
5071
5155
|
);
|
|
5072
5156
|
}
|
|
5073
5157
|
function OryForm({ children }) {
|
|
5074
|
-
var
|
|
5158
|
+
var _a3;
|
|
5075
5159
|
const { FormContainer } = useComponents();
|
|
5076
5160
|
const flowContainer = useOryFlow();
|
|
5077
5161
|
const methods = reactHookForm.useForm({
|
|
@@ -5162,7 +5246,7 @@ function OryForm({ children }) {
|
|
|
5162
5246
|
}
|
|
5163
5247
|
return false;
|
|
5164
5248
|
}).length > 0;
|
|
5165
|
-
if (!hasMethods && ((
|
|
5249
|
+
if (!hasMethods && ((_a3 = flowContainer.flow.ui.messages) != null ? _a3 : []).length === 0) {
|
|
5166
5250
|
return intl.formatMessage({
|
|
5167
5251
|
id: `identities.messages.${5000002}`,
|
|
5168
5252
|
defaultMessage: "No authentication methods are available for this request. Please contact the site or app owner."
|
|
@@ -5173,7 +5257,7 @@ function OryForm({ children }) {
|
|
|
5173
5257
|
{
|
|
5174
5258
|
action: flowContainer.flow.ui.action,
|
|
5175
5259
|
method: flowContainer.flow.ui.method,
|
|
5176
|
-
onSubmit: methods.handleSubmit(onSubmit),
|
|
5260
|
+
onSubmit: () => void methods.handleSubmit(onSubmit),
|
|
5177
5261
|
children: children != null ? children : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5178
5262
|
/* @__PURE__ */ jsxRuntime.jsx(OryFormSocialButtons, {}),
|
|
5179
5263
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5237,7 +5321,7 @@ function OryCardContent({ children }) {
|
|
|
5237
5321
|
] })
|
|
5238
5322
|
] });
|
|
5239
5323
|
}
|
|
5240
|
-
function OryCardFooter(
|
|
5324
|
+
function OryCardFooter() {
|
|
5241
5325
|
const { CardFooter } = useComponents();
|
|
5242
5326
|
return /* @__PURE__ */ jsxRuntime.jsx(CardFooter, {});
|
|
5243
5327
|
}
|
|
@@ -6848,7 +6932,7 @@ var IntlProvider3 = ({
|
|
|
6848
6932
|
children,
|
|
6849
6933
|
...props
|
|
6850
6934
|
}) => {
|
|
6851
|
-
var
|
|
6935
|
+
var _a3, _b;
|
|
6852
6936
|
const intlCtx = React5.useContext(Context);
|
|
6853
6937
|
if (intlCtx) {
|
|
6854
6938
|
return children;
|
|
@@ -6862,7 +6946,7 @@ var IntlProvider3 = ({
|
|
|
6862
6946
|
defaultLocale: props.defaultLocale,
|
|
6863
6947
|
messages: props.customTranslations[props.locale]
|
|
6864
6948
|
} : {
|
|
6865
|
-
locale: (
|
|
6949
|
+
locale: (_a3 = props.locale) != null ? _a3 : "en",
|
|
6866
6950
|
defaultLocale: (_b = props.defaultLocale) != null ? _b : "en",
|
|
6867
6951
|
messages: translation
|
|
6868
6952
|
};
|