@formatjs/cli 6.9.0 → 6.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/formatjs +691 -896
  2. package/package.json +2 -2
package/bin/formatjs CHANGED
@@ -9368,139 +9368,11 @@ var require_loud_rejection = __commonJS({
9368
9368
  }
9369
9369
  });
9370
9370
 
9371
- // node_modules/.aspect_rules_js/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
9372
- function __spreadArray(to, from, pack) {
9373
- if (pack || arguments.length === 2)
9374
- for (var i = 0, l = from.length, ar; i < l; i++) {
9375
- if (ar || !(i in from)) {
9376
- if (!ar)
9377
- ar = Array.prototype.slice.call(from, 0, i);
9378
- ar[i] = from[i];
9379
- }
9380
- }
9381
- return to.concat(ar || Array.prototype.slice.call(from));
9382
- }
9383
- var __assign;
9384
- var init_tslib_es6 = __esm({
9385
- "node_modules/.aspect_rules_js/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs"() {
9386
- __assign = function() {
9387
- __assign = Object.assign || function __assign2(t) {
9388
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9389
- s = arguments[i];
9390
- for (var p2 in s)
9391
- if (Object.prototype.hasOwnProperty.call(s, p2))
9392
- t[p2] = s[p2];
9393
- }
9394
- return t;
9395
- };
9396
- return __assign.apply(this, arguments);
9397
- };
9398
- }
9399
- });
9400
-
9401
- // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/error.js
9402
- var ErrorKind;
9403
- var init_error = __esm({
9404
- "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/error.js"() {
9405
- (function(ErrorKind2) {
9406
- ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
9407
- ErrorKind2[ErrorKind2["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
9408
- ErrorKind2[ErrorKind2["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
9409
- ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
9410
- ErrorKind2[ErrorKind2["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
9411
- ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
9412
- ErrorKind2[ErrorKind2["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
9413
- ErrorKind2[ErrorKind2["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
9414
- ErrorKind2[ErrorKind2["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
9415
- ErrorKind2[ErrorKind2["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
9416
- ErrorKind2[ErrorKind2["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
9417
- ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
9418
- ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
9419
- ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
9420
- ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
9421
- ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
9422
- ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
9423
- ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
9424
- ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
9425
- ErrorKind2[ErrorKind2["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
9426
- ErrorKind2[ErrorKind2["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
9427
- ErrorKind2[ErrorKind2["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
9428
- ErrorKind2[ErrorKind2["INVALID_TAG"] = 23] = "INVALID_TAG";
9429
- ErrorKind2[ErrorKind2["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
9430
- ErrorKind2[ErrorKind2["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
9431
- ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
9432
- })(ErrorKind || (ErrorKind = {}));
9433
- }
9434
- });
9435
-
9436
- // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/types.js
9437
- function isLiteralElement(el) {
9438
- return el.type === TYPE.literal;
9439
- }
9440
- function isArgumentElement(el) {
9441
- return el.type === TYPE.argument;
9442
- }
9443
- function isNumberElement(el) {
9444
- return el.type === TYPE.number;
9445
- }
9446
- function isDateElement(el) {
9447
- return el.type === TYPE.date;
9448
- }
9449
- function isTimeElement(el) {
9450
- return el.type === TYPE.time;
9451
- }
9452
- function isSelectElement(el) {
9453
- return el.type === TYPE.select;
9454
- }
9455
- function isPluralElement(el) {
9456
- return el.type === TYPE.plural;
9457
- }
9458
- function isPoundElement(el) {
9459
- return el.type === TYPE.pound;
9460
- }
9461
- function isTagElement(el) {
9462
- return el.type === TYPE.tag;
9463
- }
9464
- function isNumberSkeleton(el) {
9465
- return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.number);
9466
- }
9467
- function isDateTimeSkeleton(el) {
9468
- return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime);
9469
- }
9470
- var TYPE, SKELETON_TYPE;
9471
- var init_types = __esm({
9472
- "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/types.js"() {
9473
- (function(TYPE2) {
9474
- TYPE2[TYPE2["literal"] = 0] = "literal";
9475
- TYPE2[TYPE2["argument"] = 1] = "argument";
9476
- TYPE2[TYPE2["number"] = 2] = "number";
9477
- TYPE2[TYPE2["date"] = 3] = "date";
9478
- TYPE2[TYPE2["time"] = 4] = "time";
9479
- TYPE2[TYPE2["select"] = 5] = "select";
9480
- TYPE2[TYPE2["plural"] = 6] = "plural";
9481
- TYPE2[TYPE2["pound"] = 7] = "pound";
9482
- TYPE2[TYPE2["tag"] = 8] = "tag";
9483
- })(TYPE || (TYPE = {}));
9484
- (function(SKELETON_TYPE2) {
9485
- SKELETON_TYPE2[SKELETON_TYPE2["number"] = 0] = "number";
9486
- SKELETON_TYPE2[SKELETON_TYPE2["dateTime"] = 1] = "dateTime";
9487
- })(SKELETON_TYPE || (SKELETON_TYPE = {}));
9488
- }
9489
- });
9490
-
9491
- // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/regex.generated.js
9492
- var SPACE_SEPARATOR_REGEX;
9493
- var init_regex_generated = __esm({
9494
- "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/regex.generated.js"() {
9495
- SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
9496
- }
9497
- });
9498
-
9499
9371
  // node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/date-time.js
9500
9372
  function parseDateTimeSkeleton(skeleton) {
9501
- var result = {};
9502
- skeleton.replace(DATE_TIME_REGEX, function(match) {
9503
- var len = match.length;
9373
+ const result = {};
9374
+ skeleton.replace(DATE_TIME_REGEX, (match) => {
9375
+ const len = match.length;
9504
9376
  switch (match[0]) {
9505
9377
  case "G":
9506
9378
  result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
@@ -9518,7 +9390,13 @@ function parseDateTimeSkeleton(skeleton) {
9518
9390
  throw new RangeError("`q/Q` (quarter) patterns are not supported");
9519
9391
  case "M":
9520
9392
  case "L":
9521
- result.month = ["numeric", "2-digit", "short", "long", "narrow"][len - 1];
9393
+ result.month = [
9394
+ "numeric",
9395
+ "2-digit",
9396
+ "short",
9397
+ "long",
9398
+ "narrow"
9399
+ ][len - 1];
9522
9400
  break;
9523
9401
  case "w":
9524
9402
  case "W":
@@ -9537,13 +9415,23 @@ function parseDateTimeSkeleton(skeleton) {
9537
9415
  if (len < 4) {
9538
9416
  throw new RangeError("`e..eee` (weekday) patterns are not supported");
9539
9417
  }
9540
- result.weekday = ["short", "long", "narrow", "short"][len - 4];
9418
+ result.weekday = [
9419
+ "short",
9420
+ "long",
9421
+ "narrow",
9422
+ "short"
9423
+ ][len - 4];
9541
9424
  break;
9542
9425
  case "c":
9543
9426
  if (len < 4) {
9544
9427
  throw new RangeError("`c..ccc` (weekday) patterns are not supported");
9545
9428
  }
9546
- result.weekday = ["short", "long", "narrow", "short"][len - 4];
9429
+ result.weekday = [
9430
+ "short",
9431
+ "long",
9432
+ "narrow",
9433
+ "short"
9434
+ ][len - 4];
9547
9435
  break;
9548
9436
  case "a":
9549
9437
  result.hour12 = true;
@@ -9604,7 +9492,7 @@ var init_date_time = __esm({
9604
9492
 
9605
9493
  // node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/regex.generated.js
9606
9494
  var WHITE_SPACE_REGEX;
9607
- var init_regex_generated2 = __esm({
9495
+ var init_regex_generated = __esm({
9608
9496
  "node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/regex.generated.js"() {
9609
9497
  WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
9610
9498
  }
@@ -9615,24 +9503,23 @@ function parseNumberSkeletonFromString(skeleton) {
9615
9503
  if (skeleton.length === 0) {
9616
9504
  throw new Error("Number skeleton cannot be empty");
9617
9505
  }
9618
- var stringTokens = skeleton.split(WHITE_SPACE_REGEX).filter(function(x) {
9619
- return x.length > 0;
9620
- });
9621
- var tokens = [];
9622
- for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {
9623
- var stringToken = stringTokens_1[_i];
9624
- var stemAndOptions = stringToken.split("/");
9506
+ const stringTokens = skeleton.split(WHITE_SPACE_REGEX).filter((x) => x.length > 0);
9507
+ const tokens = [];
9508
+ for (const stringToken of stringTokens) {
9509
+ let stemAndOptions = stringToken.split("/");
9625
9510
  if (stemAndOptions.length === 0) {
9626
9511
  throw new Error("Invalid number skeleton");
9627
9512
  }
9628
- var stem = stemAndOptions[0], options = stemAndOptions.slice(1);
9629
- for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {
9630
- var option = options_1[_a];
9513
+ const [stem, ...options] = stemAndOptions;
9514
+ for (const option of options) {
9631
9515
  if (option.length === 0) {
9632
9516
  throw new Error("Invalid number skeleton");
9633
9517
  }
9634
9518
  }
9635
- tokens.push({ stem, options });
9519
+ tokens.push({
9520
+ stem,
9521
+ options
9522
+ });
9636
9523
  }
9637
9524
  return tokens;
9638
9525
  }
@@ -9640,7 +9527,7 @@ function icuUnitToEcma(unit) {
9640
9527
  return unit.replace(/^(.*?)-/, "");
9641
9528
  }
9642
9529
  function parseSignificantPrecision(str) {
9643
- var result = {};
9530
+ const result = {};
9644
9531
  if (str[str.length - 1] === "r") {
9645
9532
  result.roundingPriority = "morePrecision";
9646
9533
  } else if (str[str.length - 1] === "s") {
@@ -9665,19 +9552,13 @@ function parseSignificantPrecision(str) {
9665
9552
  function parseSign(str) {
9666
9553
  switch (str) {
9667
9554
  case "sign-auto":
9668
- return {
9669
- signDisplay: "auto"
9670
- };
9555
+ return { signDisplay: "auto" };
9671
9556
  case "sign-accounting":
9672
9557
  case "()":
9673
- return {
9674
- currencySign: "accounting"
9675
- };
9558
+ return { currencySign: "accounting" };
9676
9559
  case "sign-always":
9677
9560
  case "+!":
9678
- return {
9679
- signDisplay: "always"
9680
- };
9561
+ return { signDisplay: "always" };
9681
9562
  case "sign-accounting-always":
9682
9563
  case "()!":
9683
9564
  return {
@@ -9686,9 +9567,7 @@ function parseSign(str) {
9686
9567
  };
9687
9568
  case "sign-except-zero":
9688
9569
  case "+?":
9689
- return {
9690
- signDisplay: "exceptZero"
9691
- };
9570
+ return { signDisplay: "exceptZero" };
9692
9571
  case "sign-accounting-except-zero":
9693
9572
  case "()?":
9694
9573
  return {
@@ -9697,26 +9576,20 @@ function parseSign(str) {
9697
9576
  };
9698
9577
  case "sign-never":
9699
9578
  case "+_":
9700
- return {
9701
- signDisplay: "never"
9702
- };
9579
+ return { signDisplay: "never" };
9703
9580
  }
9704
9581
  }
9705
9582
  function parseConciseScientificAndEngineeringStem(stem) {
9706
- var result;
9583
+ let result;
9707
9584
  if (stem[0] === "E" && stem[1] === "E") {
9708
- result = {
9709
- notation: "engineering"
9710
- };
9585
+ result = { notation: "engineering" };
9711
9586
  stem = stem.slice(2);
9712
9587
  } else if (stem[0] === "E") {
9713
- result = {
9714
- notation: "scientific"
9715
- };
9588
+ result = { notation: "scientific" };
9716
9589
  stem = stem.slice(1);
9717
9590
  }
9718
9591
  if (result) {
9719
- var signDisplay = stem.slice(0, 2);
9592
+ const signDisplay = stem.slice(0, 2);
9720
9593
  if (signDisplay === "+!") {
9721
9594
  result.signDisplay = "always";
9722
9595
  stem = stem.slice(2);
@@ -9732,17 +9605,16 @@ function parseConciseScientificAndEngineeringStem(stem) {
9732
9605
  return result;
9733
9606
  }
9734
9607
  function parseNotationOptions(opt) {
9735
- var result = {};
9736
- var signOpts = parseSign(opt);
9608
+ const result = {};
9609
+ const signOpts = parseSign(opt);
9737
9610
  if (signOpts) {
9738
9611
  return signOpts;
9739
9612
  }
9740
9613
  return result;
9741
9614
  }
9742
9615
  function parseNumberSkeleton(tokens) {
9743
- var result = {};
9744
- for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
9745
- var token = tokens_1[_i];
9616
+ let result = {};
9617
+ for (const token of tokens) {
9746
9618
  switch (token.stem) {
9747
9619
  case "percent":
9748
9620
  case "%":
@@ -9780,14 +9652,24 @@ function parseNumberSkeleton(tokens) {
9780
9652
  result.compactDisplay = "long";
9781
9653
  continue;
9782
9654
  case "scientific":
9783
- result = __assign(__assign(__assign({}, result), { notation: "scientific" }), token.options.reduce(function(all, opt2) {
9784
- return __assign(__assign({}, all), parseNotationOptions(opt2));
9785
- }, {}));
9655
+ result = {
9656
+ ...result,
9657
+ notation: "scientific",
9658
+ ...token.options.reduce((all, opt) => ({
9659
+ ...all,
9660
+ ...parseNotationOptions(opt)
9661
+ }), {})
9662
+ };
9786
9663
  continue;
9787
9664
  case "engineering":
9788
- result = __assign(__assign(__assign({}, result), { notation: "engineering" }), token.options.reduce(function(all, opt2) {
9789
- return __assign(__assign({}, all), parseNotationOptions(opt2));
9790
- }, {}));
9665
+ result = {
9666
+ ...result,
9667
+ notation: "engineering",
9668
+ ...token.options.reduce((all, opt) => ({
9669
+ ...all,
9670
+ ...parseNotationOptions(opt)
9671
+ }), {})
9672
+ };
9791
9673
  continue;
9792
9674
  case "notation-simple":
9793
9675
  result.notation = "standard";
@@ -9869,25 +9751,40 @@ function parseNumberSkeleton(tokens) {
9869
9751
  }
9870
9752
  return "";
9871
9753
  });
9872
- var opt = token.options[0];
9754
+ const opt = token.options[0];
9873
9755
  if (opt === "w") {
9874
- result = __assign(__assign({}, result), { trailingZeroDisplay: "stripIfInteger" });
9756
+ result = {
9757
+ ...result,
9758
+ trailingZeroDisplay: "stripIfInteger"
9759
+ };
9875
9760
  } else if (opt) {
9876
- result = __assign(__assign({}, result), parseSignificantPrecision(opt));
9761
+ result = {
9762
+ ...result,
9763
+ ...parseSignificantPrecision(opt)
9764
+ };
9877
9765
  }
9878
9766
  continue;
9879
9767
  }
9880
9768
  if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {
9881
- result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));
9769
+ result = {
9770
+ ...result,
9771
+ ...parseSignificantPrecision(token.stem)
9772
+ };
9882
9773
  continue;
9883
9774
  }
9884
- var signOpts = parseSign(token.stem);
9775
+ const signOpts = parseSign(token.stem);
9885
9776
  if (signOpts) {
9886
- result = __assign(__assign({}, result), signOpts);
9777
+ result = {
9778
+ ...result,
9779
+ ...signOpts
9780
+ };
9887
9781
  }
9888
- var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);
9782
+ const conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);
9889
9783
  if (conciseScientificAndEngineeringOpts) {
9890
- result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);
9784
+ result = {
9785
+ ...result,
9786
+ ...conciseScientificAndEngineeringOpts
9787
+ };
9891
9788
  }
9892
9789
  }
9893
9790
  return result;
@@ -9895,8 +9792,7 @@ function parseNumberSkeleton(tokens) {
9895
9792
  var FRACTION_PRECISION_REGEX, SIGNIFICANT_PRECISION_REGEX, INTEGER_WIDTH_REGEX, CONCISE_INTEGER_WIDTH_REGEX;
9896
9793
  var init_number = __esm({
9897
9794
  "node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/number.js"() {
9898
- init_tslib_es6();
9899
- init_regex_generated2();
9795
+ init_regex_generated();
9900
9796
  FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
9901
9797
  SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g;
9902
9798
  INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
@@ -9912,15 +9808,115 @@ var init_icu_skeleton_parser = __esm({
9912
9808
  }
9913
9809
  });
9914
9810
 
9811
+ // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/types.js
9812
+ function isLiteralElement(el) {
9813
+ return el.type === TYPE.literal;
9814
+ }
9815
+ function isArgumentElement(el) {
9816
+ return el.type === TYPE.argument;
9817
+ }
9818
+ function isNumberElement(el) {
9819
+ return el.type === TYPE.number;
9820
+ }
9821
+ function isDateElement(el) {
9822
+ return el.type === TYPE.date;
9823
+ }
9824
+ function isTimeElement(el) {
9825
+ return el.type === TYPE.time;
9826
+ }
9827
+ function isSelectElement(el) {
9828
+ return el.type === TYPE.select;
9829
+ }
9830
+ function isPluralElement(el) {
9831
+ return el.type === TYPE.plural;
9832
+ }
9833
+ function isPoundElement(el) {
9834
+ return el.type === TYPE.pound;
9835
+ }
9836
+ function isTagElement(el) {
9837
+ return el.type === TYPE.tag;
9838
+ }
9839
+ function isNumberSkeleton(el) {
9840
+ return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.number);
9841
+ }
9842
+ function isDateTimeSkeleton(el) {
9843
+ return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime);
9844
+ }
9845
+ var TYPE, SKELETON_TYPE;
9846
+ var init_types = __esm({
9847
+ "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/types.js"() {
9848
+ init_icu_skeleton_parser();
9849
+ TYPE = function(TYPE2) {
9850
+ TYPE2[TYPE2["literal"] = 0] = "literal";
9851
+ TYPE2[TYPE2["argument"] = 1] = "argument";
9852
+ TYPE2[TYPE2["number"] = 2] = "number";
9853
+ TYPE2[TYPE2["date"] = 3] = "date";
9854
+ TYPE2[TYPE2["time"] = 4] = "time";
9855
+ TYPE2[TYPE2["select"] = 5] = "select";
9856
+ TYPE2[TYPE2["plural"] = 6] = "plural";
9857
+ TYPE2[TYPE2["pound"] = 7] = "pound";
9858
+ TYPE2[TYPE2["tag"] = 8] = "tag";
9859
+ return TYPE2;
9860
+ }({});
9861
+ SKELETON_TYPE = function(SKELETON_TYPE2) {
9862
+ SKELETON_TYPE2[SKELETON_TYPE2["number"] = 0] = "number";
9863
+ SKELETON_TYPE2[SKELETON_TYPE2["dateTime"] = 1] = "dateTime";
9864
+ return SKELETON_TYPE2;
9865
+ }({});
9866
+ }
9867
+ });
9868
+
9869
+ // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/error.js
9870
+ var ErrorKind;
9871
+ var init_error = __esm({
9872
+ "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/error.js"() {
9873
+ init_types();
9874
+ ErrorKind = function(ErrorKind2) {
9875
+ ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
9876
+ ErrorKind2[ErrorKind2["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
9877
+ ErrorKind2[ErrorKind2["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
9878
+ ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
9879
+ ErrorKind2[ErrorKind2["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
9880
+ ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
9881
+ ErrorKind2[ErrorKind2["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
9882
+ ErrorKind2[ErrorKind2["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
9883
+ ErrorKind2[ErrorKind2["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
9884
+ ErrorKind2[ErrorKind2["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
9885
+ ErrorKind2[ErrorKind2["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
9886
+ ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
9887
+ ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
9888
+ ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
9889
+ ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
9890
+ ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
9891
+ ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
9892
+ ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
9893
+ ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
9894
+ ErrorKind2[ErrorKind2["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
9895
+ ErrorKind2[ErrorKind2["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
9896
+ ErrorKind2[ErrorKind2["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
9897
+ ErrorKind2[ErrorKind2["INVALID_TAG"] = 23] = "INVALID_TAG";
9898
+ ErrorKind2[ErrorKind2["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
9899
+ ErrorKind2[ErrorKind2["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
9900
+ ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
9901
+ return ErrorKind2;
9902
+ }({});
9903
+ }
9904
+ });
9905
+
9906
+ // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/regex.generated.js
9907
+ var SPACE_SEPARATOR_REGEX;
9908
+ var init_regex_generated2 = __esm({
9909
+ "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/regex.generated.js"() {
9910
+ SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
9911
+ }
9912
+ });
9913
+
9915
9914
  // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/time-data.generated.js
9916
9915
  var timeData;
9917
9916
  var init_time_data_generated = __esm({
9918
9917
  "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/time-data.generated.js"() {
9919
9918
  timeData = {
9920
- "001": [
9921
- "H",
9922
- "h"
9923
- ],
9919
+ "001": ["H", "h"],
9924
9920
  "419": [
9925
9921
  "h",
9926
9922
  "H",
@@ -9933,10 +9929,7 @@ var init_time_data_generated = __esm({
9933
9929
  "hb",
9934
9930
  "hB"
9935
9931
  ],
9936
- "AD": [
9937
- "H",
9938
- "hB"
9939
- ],
9932
+ "AD": ["H", "hB"],
9940
9933
  "AE": [
9941
9934
  "h",
9942
9935
  "hB",
@@ -9966,41 +9959,24 @@ var init_time_data_generated = __esm({
9966
9959
  "H",
9967
9960
  "hB"
9968
9961
  ],
9969
- "AM": [
9970
- "H",
9971
- "hB"
9972
- ],
9973
- "AO": [
9974
- "H",
9975
- "hB"
9976
- ],
9962
+ "AM": ["H", "hB"],
9963
+ "AO": ["H", "hB"],
9977
9964
  "AR": [
9978
9965
  "h",
9979
9966
  "H",
9980
9967
  "hB",
9981
9968
  "hb"
9982
9969
  ],
9983
- "AS": [
9984
- "h",
9985
- "H"
9986
- ],
9987
- "AT": [
9988
- "H",
9989
- "hB"
9990
- ],
9970
+ "AS": ["h", "H"],
9971
+ "AT": ["H", "hB"],
9991
9972
  "AU": [
9992
9973
  "h",
9993
9974
  "hb",
9994
9975
  "H",
9995
9976
  "hB"
9996
9977
  ],
9997
- "AW": [
9998
- "H",
9999
- "hB"
10000
- ],
10001
- "AX": [
10002
- "H"
10003
- ],
9978
+ "AW": ["H", "hB"],
9979
+ "AX": ["H"],
10004
9980
  "AZ": [
10005
9981
  "H",
10006
9982
  "hB",
@@ -10022,14 +9998,8 @@ var init_time_data_generated = __esm({
10022
9998
  "hB",
10023
9999
  "H"
10024
10000
  ],
10025
- "BE": [
10026
- "H",
10027
- "hB"
10028
- ],
10029
- "BF": [
10030
- "H",
10031
- "hB"
10032
- ],
10001
+ "BE": ["H", "hB"],
10002
+ "BF": ["H", "hB"],
10033
10003
  "BG": [
10034
10004
  "H",
10035
10005
  "hB",
@@ -10041,18 +10011,9 @@ var init_time_data_generated = __esm({
10041
10011
  "hb",
10042
10012
  "H"
10043
10013
  ],
10044
- "BI": [
10045
- "H",
10046
- "h"
10047
- ],
10048
- "BJ": [
10049
- "H",
10050
- "hB"
10051
- ],
10052
- "BL": [
10053
- "H",
10054
- "hB"
10055
- ],
10014
+ "BI": ["H", "h"],
10015
+ "BJ": ["H", "hB"],
10016
+ "BL": ["H", "hB"],
10056
10017
  "BM": [
10057
10018
  "h",
10058
10019
  "hb",
@@ -10071,33 +10032,22 @@ var init_time_data_generated = __esm({
10071
10032
  "hB",
10072
10033
  "hb"
10073
10034
  ],
10074
- "BQ": [
10075
- "H"
10076
- ],
10077
- "BR": [
10078
- "H",
10079
- "hB"
10080
- ],
10035
+ "BQ": ["H"],
10036
+ "BR": ["H", "hB"],
10081
10037
  "BS": [
10082
10038
  "h",
10083
10039
  "hb",
10084
10040
  "H",
10085
10041
  "hB"
10086
10042
  ],
10087
- "BT": [
10088
- "h",
10089
- "H"
10090
- ],
10043
+ "BT": ["h", "H"],
10091
10044
  "BW": [
10092
10045
  "H",
10093
10046
  "h",
10094
10047
  "hb",
10095
10048
  "hB"
10096
10049
  ],
10097
- "BY": [
10098
- "H",
10099
- "h"
10100
- ],
10050
+ "BY": ["H", "h"],
10101
10051
  "BZ": [
10102
10052
  "H",
10103
10053
  "h",
@@ -10116,28 +10066,19 @@ var init_time_data_generated = __esm({
10116
10066
  "hb",
10117
10067
  "hB"
10118
10068
  ],
10119
- "CD": [
10120
- "hB",
10121
- "H"
10122
- ],
10069
+ "CD": ["hB", "H"],
10123
10070
  "CF": [
10124
10071
  "H",
10125
10072
  "h",
10126
10073
  "hB"
10127
10074
  ],
10128
- "CG": [
10129
- "H",
10130
- "hB"
10131
- ],
10075
+ "CG": ["H", "hB"],
10132
10076
  "CH": [
10133
10077
  "H",
10134
10078
  "hB",
10135
10079
  "h"
10136
10080
  ],
10137
- "CI": [
10138
- "H",
10139
- "hB"
10140
- ],
10081
+ "CI": ["H", "hB"],
10141
10082
  "CK": [
10142
10083
  "H",
10143
10084
  "h",
@@ -10167,9 +10108,7 @@ var init_time_data_generated = __esm({
10167
10108
  "hB",
10168
10109
  "hb"
10169
10110
  ],
10170
- "CP": [
10171
- "H"
10172
- ],
10111
+ "CP": ["H"],
10173
10112
  "CR": [
10174
10113
  "h",
10175
10114
  "H",
@@ -10182,14 +10121,8 @@ var init_time_data_generated = __esm({
10182
10121
  "hB",
10183
10122
  "hb"
10184
10123
  ],
10185
- "CV": [
10186
- "H",
10187
- "hB"
10188
- ],
10189
- "CW": [
10190
- "H",
10191
- "hB"
10192
- ],
10124
+ "CV": ["H", "hB"],
10125
+ "CW": ["H", "hB"],
10193
10126
  "CX": [
10194
10127
  "H",
10195
10128
  "h",
@@ -10202,26 +10135,16 @@ var init_time_data_generated = __esm({
10202
10135
  "hb",
10203
10136
  "hB"
10204
10137
  ],
10205
- "CZ": [
10206
- "H"
10207
- ],
10208
- "DE": [
10209
- "H",
10210
- "hB"
10211
- ],
10138
+ "CZ": ["H"],
10139
+ "DE": ["H", "hB"],
10212
10140
  "DG": [
10213
10141
  "H",
10214
10142
  "h",
10215
10143
  "hb",
10216
10144
  "hB"
10217
10145
  ],
10218
- "DJ": [
10219
- "h",
10220
- "H"
10221
- ],
10222
- "DK": [
10223
- "H"
10224
- ],
10146
+ "DJ": ["h", "H"],
10147
+ "DK": ["H"],
10225
10148
  "DM": [
10226
10149
  "h",
10227
10150
  "hb",
@@ -10252,10 +10175,7 @@ var init_time_data_generated = __esm({
10252
10175
  "hB",
10253
10176
  "hb"
10254
10177
  ],
10255
- "EE": [
10256
- "H",
10257
- "hB"
10258
- ],
10178
+ "EE": ["H", "hB"],
10259
10179
  "EG": [
10260
10180
  "h",
10261
10181
  "hB",
@@ -10268,10 +10188,7 @@ var init_time_data_generated = __esm({
10268
10188
  "hb",
10269
10189
  "H"
10270
10190
  ],
10271
- "ER": [
10272
- "h",
10273
- "H"
10274
- ],
10191
+ "ER": ["h", "H"],
10275
10192
  "ES": [
10276
10193
  "H",
10277
10194
  "hB",
@@ -10284,9 +10201,7 @@ var init_time_data_generated = __esm({
10284
10201
  "h",
10285
10202
  "H"
10286
10203
  ],
10287
- "FI": [
10288
- "H"
10289
- ],
10204
+ "FI": ["H"],
10290
10205
  "FJ": [
10291
10206
  "h",
10292
10207
  "hb",
@@ -10305,18 +10220,9 @@ var init_time_data_generated = __esm({
10305
10220
  "H",
10306
10221
  "hB"
10307
10222
  ],
10308
- "FO": [
10309
- "H",
10310
- "h"
10311
- ],
10312
- "FR": [
10313
- "H",
10314
- "hB"
10315
- ],
10316
- "GA": [
10317
- "H",
10318
- "hB"
10319
- ],
10223
+ "FO": ["H", "h"],
10224
+ "FR": ["H", "hB"],
10225
+ "GA": ["H", "hB"],
10320
10226
  "GB": [
10321
10227
  "H",
10322
10228
  "h",
@@ -10334,44 +10240,29 @@ var init_time_data_generated = __esm({
10334
10240
  "hB",
10335
10241
  "h"
10336
10242
  ],
10337
- "GF": [
10338
- "H",
10339
- "hB"
10340
- ],
10243
+ "GF": ["H", "hB"],
10341
10244
  "GG": [
10342
10245
  "H",
10343
10246
  "h",
10344
10247
  "hb",
10345
10248
  "hB"
10346
10249
  ],
10347
- "GH": [
10348
- "h",
10349
- "H"
10350
- ],
10250
+ "GH": ["h", "H"],
10351
10251
  "GI": [
10352
10252
  "H",
10353
10253
  "h",
10354
10254
  "hb",
10355
10255
  "hB"
10356
10256
  ],
10357
- "GL": [
10358
- "H",
10359
- "h"
10360
- ],
10257
+ "GL": ["H", "h"],
10361
10258
  "GM": [
10362
10259
  "h",
10363
10260
  "hb",
10364
10261
  "H",
10365
10262
  "hB"
10366
10263
  ],
10367
- "GN": [
10368
- "H",
10369
- "hB"
10370
- ],
10371
- "GP": [
10372
- "H",
10373
- "hB"
10374
- ],
10264
+ "GN": ["H", "hB"],
10265
+ "GP": ["H", "hB"],
10375
10266
  "GQ": [
10376
10267
  "H",
10377
10268
  "hB",
@@ -10402,10 +10293,7 @@ var init_time_data_generated = __esm({
10402
10293
  "H",
10403
10294
  "hB"
10404
10295
  ],
10405
- "GW": [
10406
- "H",
10407
- "hB"
10408
- ],
10296
+ "GW": ["H", "hB"],
10409
10297
  "GY": [
10410
10298
  "h",
10411
10299
  "hb",
@@ -10424,43 +10312,29 @@ var init_time_data_generated = __esm({
10424
10312
  "hB",
10425
10313
  "hb"
10426
10314
  ],
10427
- "HR": [
10428
- "H",
10429
- "hB"
10430
- ],
10431
- "HU": [
10432
- "H",
10433
- "h"
10434
- ],
10315
+ "HR": ["H", "hB"],
10316
+ "HU": ["H", "h"],
10435
10317
  "IC": [
10436
10318
  "H",
10437
10319
  "h",
10438
10320
  "hB",
10439
10321
  "hb"
10440
10322
  ],
10441
- "ID": [
10442
- "H"
10443
- ],
10323
+ "ID": ["H"],
10444
10324
  "IE": [
10445
10325
  "H",
10446
10326
  "h",
10447
10327
  "hb",
10448
10328
  "hB"
10449
10329
  ],
10450
- "IL": [
10451
- "H",
10452
- "hB"
10453
- ],
10330
+ "IL": ["H", "hB"],
10454
10331
  "IM": [
10455
10332
  "H",
10456
10333
  "h",
10457
10334
  "hb",
10458
10335
  "hB"
10459
10336
  ],
10460
- "IN": [
10461
- "h",
10462
- "H"
10463
- ],
10337
+ "IN": ["h", "H"],
10464
10338
  "IO": [
10465
10339
  "H",
10466
10340
  "h",
@@ -10473,17 +10347,9 @@ var init_time_data_generated = __esm({
10473
10347
  "hb",
10474
10348
  "H"
10475
10349
  ],
10476
- "IR": [
10477
- "hB",
10478
- "H"
10479
- ],
10480
- "IS": [
10481
- "H"
10482
- ],
10483
- "IT": [
10484
- "H",
10485
- "hB"
10486
- ],
10350
+ "IR": ["hB", "H"],
10351
+ "IS": ["H"],
10352
+ "IT": ["H", "hB"],
10487
10353
  "JE": [
10488
10354
  "H",
10489
10355
  "h",
@@ -10567,10 +10433,7 @@ var init_time_data_generated = __esm({
10567
10433
  "H",
10568
10434
  "hB"
10569
10435
  ],
10570
- "KZ": [
10571
- "H",
10572
- "hB"
10573
- ],
10436
+ "KZ": ["H", "hB"],
10574
10437
  "LA": [
10575
10438
  "H",
10576
10439
  "hb",
@@ -10606,10 +10469,7 @@ var init_time_data_generated = __esm({
10606
10469
  "H",
10607
10470
  "hB"
10608
10471
  ],
10609
- "LS": [
10610
- "h",
10611
- "H"
10612
- ],
10472
+ "LS": ["h", "H"],
10613
10473
  "LT": [
10614
10474
  "H",
10615
10475
  "h",
@@ -10639,27 +10499,15 @@ var init_time_data_generated = __esm({
10639
10499
  "hB",
10640
10500
  "hb"
10641
10501
  ],
10642
- "MC": [
10643
- "H",
10644
- "hB"
10645
- ],
10646
- "MD": [
10647
- "H",
10648
- "hB"
10649
- ],
10502
+ "MC": ["H", "hB"],
10503
+ "MD": ["H", "hB"],
10650
10504
  "ME": [
10651
10505
  "H",
10652
10506
  "hB",
10653
10507
  "h"
10654
10508
  ],
10655
- "MF": [
10656
- "H",
10657
- "hB"
10658
- ],
10659
- "MG": [
10660
- "H",
10661
- "h"
10662
- ],
10509
+ "MF": ["H", "hB"],
10510
+ "MG": ["H", "h"],
10663
10511
  "MH": [
10664
10512
  "h",
10665
10513
  "hb",
@@ -10672,9 +10520,7 @@ var init_time_data_generated = __esm({
10672
10520
  "hb",
10673
10521
  "hB"
10674
10522
  ],
10675
- "ML": [
10676
- "H"
10677
- ],
10523
+ "ML": ["H"],
10678
10524
  "MM": [
10679
10525
  "hB",
10680
10526
  "hb",
@@ -10699,10 +10545,7 @@ var init_time_data_generated = __esm({
10699
10545
  "H",
10700
10546
  "hB"
10701
10547
  ],
10702
- "MQ": [
10703
- "H",
10704
- "hB"
10705
- ],
10548
+ "MQ": ["H", "hB"],
10706
10549
  "MR": [
10707
10550
  "h",
10708
10551
  "hB",
@@ -10715,18 +10558,9 @@ var init_time_data_generated = __esm({
10715
10558
  "hb",
10716
10559
  "hB"
10717
10560
  ],
10718
- "MT": [
10719
- "H",
10720
- "h"
10721
- ],
10722
- "MU": [
10723
- "H",
10724
- "h"
10725
- ],
10726
- "MV": [
10727
- "H",
10728
- "h"
10729
- ],
10561
+ "MT": ["H", "h"],
10562
+ "MU": ["H", "h"],
10563
+ "MV": ["H", "h"],
10730
10564
  "MW": [
10731
10565
  "h",
10732
10566
  "hb",
@@ -10745,23 +10579,15 @@ var init_time_data_generated = __esm({
10745
10579
  "h",
10746
10580
  "H"
10747
10581
  ],
10748
- "MZ": [
10749
- "H",
10750
- "hB"
10751
- ],
10582
+ "MZ": ["H", "hB"],
10752
10583
  "NA": [
10753
10584
  "h",
10754
10585
  "H",
10755
10586
  "hB",
10756
10587
  "hb"
10757
10588
  ],
10758
- "NC": [
10759
- "H",
10760
- "hB"
10761
- ],
10762
- "NE": [
10763
- "H"
10764
- ],
10589
+ "NC": ["H", "hB"],
10590
+ "NE": ["H"],
10765
10591
  "NF": [
10766
10592
  "H",
10767
10593
  "h",
@@ -10780,14 +10606,8 @@ var init_time_data_generated = __esm({
10780
10606
  "hB",
10781
10607
  "hb"
10782
10608
  ],
10783
- "NL": [
10784
- "H",
10785
- "hB"
10786
- ],
10787
- "NO": [
10788
- "H",
10789
- "h"
10790
- ],
10609
+ "NL": ["H", "hB"],
10610
+ "NO": ["H", "h"],
10791
10611
  "NP": [
10792
10612
  "H",
10793
10613
  "h",
@@ -10834,10 +10654,7 @@ var init_time_data_generated = __esm({
10834
10654
  "h",
10835
10655
  "hB"
10836
10656
  ],
10837
- "PG": [
10838
- "h",
10839
- "H"
10840
- ],
10657
+ "PG": ["h", "H"],
10841
10658
  "PH": [
10842
10659
  "h",
10843
10660
  "hB",
@@ -10849,14 +10666,8 @@ var init_time_data_generated = __esm({
10849
10666
  "hB",
10850
10667
  "H"
10851
10668
  ],
10852
- "PL": [
10853
- "H",
10854
- "h"
10855
- ],
10856
- "PM": [
10857
- "H",
10858
- "hB"
10859
- ],
10669
+ "PL": ["H", "h"],
10670
+ "PM": ["H", "hB"],
10860
10671
  "PN": [
10861
10672
  "H",
10862
10673
  "h",
@@ -10875,14 +10686,8 @@ var init_time_data_generated = __esm({
10875
10686
  "hb",
10876
10687
  "H"
10877
10688
  ],
10878
- "PT": [
10879
- "H",
10880
- "hB"
10881
- ],
10882
- "PW": [
10883
- "h",
10884
- "H"
10885
- ],
10689
+ "PT": ["H", "hB"],
10690
+ "PW": ["h", "H"],
10886
10691
  "PY": [
10887
10692
  "h",
10888
10693
  "H",
@@ -10895,26 +10700,15 @@ var init_time_data_generated = __esm({
10895
10700
  "hb",
10896
10701
  "H"
10897
10702
  ],
10898
- "RE": [
10899
- "H",
10900
- "hB"
10901
- ],
10902
- "RO": [
10903
- "H",
10904
- "hB"
10905
- ],
10703
+ "RE": ["H", "hB"],
10704
+ "RO": ["H", "hB"],
10906
10705
  "RS": [
10907
10706
  "H",
10908
10707
  "hB",
10909
10708
  "h"
10910
10709
  ],
10911
- "RU": [
10912
- "H"
10913
- ],
10914
- "RW": [
10915
- "H",
10916
- "h"
10917
- ],
10710
+ "RU": ["H"],
10711
+ "RW": ["H", "h"],
10918
10712
  "SA": [
10919
10713
  "h",
10920
10714
  "hB",
@@ -10938,9 +10732,7 @@ var init_time_data_generated = __esm({
10938
10732
  "hb",
10939
10733
  "H"
10940
10734
  ],
10941
- "SE": [
10942
- "H"
10943
- ],
10735
+ "SE": ["H"],
10944
10736
  "SG": [
10945
10737
  "h",
10946
10738
  "hb",
@@ -10953,16 +10745,9 @@ var init_time_data_generated = __esm({
10953
10745
  "hb",
10954
10746
  "hB"
10955
10747
  ],
10956
- "SI": [
10957
- "H",
10958
- "hB"
10959
- ],
10960
- "SJ": [
10961
- "H"
10962
- ],
10963
- "SK": [
10964
- "H"
10965
- ],
10748
+ "SI": ["H", "hB"],
10749
+ "SJ": ["H"],
10750
+ "SK": ["H"],
10966
10751
  "SL": [
10967
10752
  "h",
10968
10753
  "hb",
@@ -10979,24 +10764,15 @@ var init_time_data_generated = __esm({
10979
10764
  "h",
10980
10765
  "hB"
10981
10766
  ],
10982
- "SO": [
10983
- "h",
10984
- "H"
10985
- ],
10986
- "SR": [
10987
- "H",
10988
- "hB"
10989
- ],
10767
+ "SO": ["h", "H"],
10768
+ "SR": ["H", "hB"],
10990
10769
  "SS": [
10991
10770
  "h",
10992
10771
  "hb",
10993
10772
  "H",
10994
10773
  "hB"
10995
10774
  ],
10996
- "ST": [
10997
- "H",
10998
- "hB"
10999
- ],
10775
+ "ST": ["H", "hB"],
11000
10776
  "SV": [
11001
10777
  "h",
11002
10778
  "H",
@@ -11043,42 +10819,24 @@ var init_time_data_generated = __esm({
11043
10819
  "h",
11044
10820
  "hB"
11045
10821
  ],
11046
- "TG": [
11047
- "H",
11048
- "hB"
11049
- ],
11050
- "TH": [
11051
- "H",
11052
- "h"
11053
- ],
11054
- "TJ": [
11055
- "H",
11056
- "h"
11057
- ],
10822
+ "TG": ["H", "hB"],
10823
+ "TH": ["H", "h"],
10824
+ "TJ": ["H", "h"],
11058
10825
  "TL": [
11059
10826
  "H",
11060
10827
  "hB",
11061
10828
  "hb",
11062
10829
  "h"
11063
10830
  ],
11064
- "TM": [
11065
- "H",
11066
- "h"
11067
- ],
10831
+ "TM": ["H", "h"],
11068
10832
  "TN": [
11069
10833
  "h",
11070
10834
  "hB",
11071
10835
  "hb",
11072
10836
  "H"
11073
10837
  ],
11074
- "TO": [
11075
- "h",
11076
- "H"
11077
- ],
11078
- "TR": [
11079
- "H",
11080
- "hB"
11081
- ],
10838
+ "TO": ["h", "H"],
10839
+ "TR": ["H", "hB"],
11082
10840
  "TT": [
11083
10841
  "h",
11084
10842
  "hb",
@@ -11160,22 +10918,10 @@ var init_time_data_generated = __esm({
11160
10918
  "H",
11161
10919
  "hB"
11162
10920
  ],
11163
- "VN": [
11164
- "H",
11165
- "h"
11166
- ],
11167
- "VU": [
11168
- "h",
11169
- "H"
11170
- ],
11171
- "WF": [
11172
- "H",
11173
- "hB"
11174
- ],
11175
- "WS": [
11176
- "h",
11177
- "H"
11178
- ],
10921
+ "VN": ["H", "h"],
10922
+ "VU": ["h", "H"],
10923
+ "WF": ["H", "hB"],
10924
+ "WS": ["h", "H"],
11179
10925
  "XK": [
11180
10926
  "H",
11181
10927
  "hB",
@@ -11187,10 +10933,7 @@ var init_time_data_generated = __esm({
11187
10933
  "hb",
11188
10934
  "H"
11189
10935
  ],
11190
- "YT": [
11191
- "H",
11192
- "hB"
11193
- ],
10936
+ "YT": ["H", "hB"],
11194
10937
  "ZA": [
11195
10938
  "H",
11196
10939
  "h",
@@ -11203,10 +10946,7 @@ var init_time_data_generated = __esm({
11203
10946
  "H",
11204
10947
  "hB"
11205
10948
  ],
11206
- "ZW": [
11207
- "H",
11208
- "h"
11209
- ],
10949
+ "ZW": ["H", "h"],
11210
10950
  "af-ZA": [
11211
10951
  "H",
11212
10952
  "h",
@@ -11302,10 +11042,7 @@ var init_time_data_generated = __esm({
11302
11042
  "h",
11303
11043
  "H"
11304
11044
  ],
11305
- "ku-SY": [
11306
- "H",
11307
- "hB"
11308
- ],
11045
+ "ku-SY": ["H", "hB"],
11309
11046
  "ml-IN": [
11310
11047
  "hB",
11311
11048
  "h",
@@ -11346,19 +11083,19 @@ var init_time_data_generated = __esm({
11346
11083
 
11347
11084
  // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/date-time-pattern-generator.js
11348
11085
  function getBestPattern(skeleton, locale) {
11349
- var skeletonCopy = "";
11350
- for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
11351
- var patternChar = skeleton.charAt(patternPos);
11086
+ let skeletonCopy = "";
11087
+ for (let patternPos = 0; patternPos < skeleton.length; patternPos++) {
11088
+ const patternChar = skeleton.charAt(patternPos);
11352
11089
  if (patternChar === "j") {
11353
- var extraLength = 0;
11090
+ let extraLength = 0;
11354
11091
  while (patternPos + 1 < skeleton.length && skeleton.charAt(patternPos + 1) === patternChar) {
11355
11092
  extraLength++;
11356
11093
  patternPos++;
11357
11094
  }
11358
- var hourLen = 1 + (extraLength & 1);
11359
- var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
11360
- var dayPeriodChar = "a";
11361
- var hourChar = getDefaultHourSymbolFromLocale(locale);
11095
+ let hourLen = 1 + (extraLength & 1);
11096
+ let dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
11097
+ let dayPeriodChar = "a";
11098
+ let hourChar = getDefaultHourSymbolFromLocale(locale);
11362
11099
  if (hourChar == "H" || hourChar == "k") {
11363
11100
  dayPeriodLen = 0;
11364
11101
  }
@@ -11377,10 +11114,8 @@ function getBestPattern(skeleton, locale) {
11377
11114
  return skeletonCopy;
11378
11115
  }
11379
11116
  function getDefaultHourSymbolFromLocale(locale) {
11380
- var hourCycle = locale.hourCycle;
11381
- if (hourCycle === void 0 && // @ts-ignore hourCycle(s) is not identified yet
11382
- locale.hourCycles && // @ts-ignore
11383
- locale.hourCycles.length) {
11117
+ let hourCycle = locale.hourCycle;
11118
+ if (hourCycle === void 0 && locale.hourCycles && locale.hourCycles.length) {
11384
11119
  hourCycle = locale.hourCycles[0];
11385
11120
  }
11386
11121
  if (hourCycle) {
@@ -11397,12 +11132,12 @@ function getDefaultHourSymbolFromLocale(locale) {
11397
11132
  throw new Error("Invalid hourCycle");
11398
11133
  }
11399
11134
  }
11400
- var languageTag = locale.language;
11401
- var regionTag;
11135
+ const languageTag = locale.language;
11136
+ let regionTag;
11402
11137
  if (languageTag !== "root") {
11403
11138
  regionTag = locale.maximize().region;
11404
11139
  }
11405
- var hourCycles = timeData[regionTag || ""] || timeData[languageTag || ""] || timeData["".concat(languageTag, "-001")] || timeData["001"];
11140
+ const hourCycles = timeData[regionTag || ""] || timeData[languageTag || ""] || timeData[`${languageTag}-001`] || timeData["001"];
11406
11141
  return hourCycles[0];
11407
11142
  }
11408
11143
  var init_date_time_pattern_generator = __esm({
@@ -11413,13 +11148,15 @@ var init_date_time_pattern_generator = __esm({
11413
11148
 
11414
11149
  // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/parser.js
11415
11150
  function createLocation(start, end) {
11416
- return { start, end };
11151
+ return {
11152
+ start,
11153
+ end
11154
+ };
11417
11155
  }
11418
11156
  function matchIdentifierAtIndex(s, index) {
11419
- var _a;
11420
11157
  IDENTIFIER_PREFIX_RE.lastIndex = index;
11421
- var match = IDENTIFIER_PREFIX_RE.exec(s);
11422
- return (_a = match[1]) !== null && _a !== void 0 ? _a : "";
11158
+ const match = IDENTIFIER_PREFIX_RE.exec(s);
11159
+ return match[1] ?? "";
11423
11160
  }
11424
11161
  function _isAlpha(codepoint) {
11425
11162
  return codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90;
@@ -11436,77 +11173,65 @@ function _isWhiteSpace(c) {
11436
11173
  var SPACE_SEPARATOR_START_REGEX, SPACE_SEPARATOR_END_REGEX, hasNativeFromEntries, hasTrimStart, hasTrimEnd, fromEntries, trimStart, trimEnd, IDENTIFIER_PREFIX_RE, Parser;
11437
11174
  var init_parser = __esm({
11438
11175
  "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/parser.js"() {
11439
- init_tslib_es6();
11440
11176
  init_error();
11441
11177
  init_types();
11442
- init_regex_generated();
11178
+ init_regex_generated2();
11443
11179
  init_icu_skeleton_parser();
11444
11180
  init_date_time_pattern_generator();
11445
- SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
11446
- SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
11181
+ SPACE_SEPARATOR_START_REGEX = new RegExp(`^${SPACE_SEPARATOR_REGEX.source}*`);
11182
+ SPACE_SEPARATOR_END_REGEX = new RegExp(`${SPACE_SEPARATOR_REGEX.source}*$`);
11447
11183
  hasNativeFromEntries = !!Object.fromEntries;
11448
11184
  hasTrimStart = !!String.prototype.trimStart;
11449
11185
  hasTrimEnd = !!String.prototype.trimEnd;
11450
- fromEntries = // native
11451
- hasNativeFromEntries ? Object.fromEntries : (
11452
- // Ponyfill
11453
- function fromEntries2(entries) {
11454
- var obj = {};
11455
- for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
11456
- var _a = entries_1[_i], k = _a[0], v = _a[1];
11457
- obj[k] = v;
11458
- }
11459
- return obj;
11186
+ fromEntries = hasNativeFromEntries ? Object.fromEntries : function fromEntries2(entries) {
11187
+ const obj = {};
11188
+ for (const [k, v] of entries) {
11189
+ obj[k] = v;
11460
11190
  }
11461
- );
11462
- trimStart = hasTrimStart ? (
11463
- // Native
11464
- function trimStart2(s) {
11465
- return s.trimStart();
11466
- }
11467
- ) : (
11468
- // Ponyfill
11469
- function trimStart3(s) {
11470
- return s.replace(SPACE_SEPARATOR_START_REGEX, "");
11471
- }
11472
- );
11473
- trimEnd = hasTrimEnd ? (
11474
- // Native
11475
- function trimEnd2(s) {
11476
- return s.trimEnd();
11477
- }
11478
- ) : (
11479
- // Ponyfill
11480
- function trimEnd3(s) {
11481
- return s.replace(SPACE_SEPARATOR_END_REGEX, "");
11482
- }
11483
- );
11191
+ return obj;
11192
+ };
11193
+ trimStart = hasTrimStart ? function trimStart2(s) {
11194
+ return s.trimStart();
11195
+ } : function trimStart3(s) {
11196
+ return s.replace(SPACE_SEPARATOR_START_REGEX, "");
11197
+ };
11198
+ trimEnd = hasTrimEnd ? function trimEnd2(s) {
11199
+ return s.trimEnd();
11200
+ } : function trimEnd3(s) {
11201
+ return s.replace(SPACE_SEPARATOR_END_REGEX, "");
11202
+ };
11484
11203
  IDENTIFIER_PREFIX_RE = new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
11485
- Parser = /** @class */
11486
- function() {
11487
- function Parser2(message, options) {
11488
- if (options === void 0) {
11489
- options = {};
11490
- }
11204
+ Parser = class {
11205
+ message;
11206
+ position;
11207
+ locale;
11208
+ ignoreTag;
11209
+ requiresOtherClause;
11210
+ shouldParseSkeletons;
11211
+ constructor(message, options = {}) {
11491
11212
  this.message = message;
11492
- this.position = { offset: 0, line: 1, column: 1 };
11213
+ this.position = {
11214
+ offset: 0,
11215
+ line: 1,
11216
+ column: 1
11217
+ };
11493
11218
  this.ignoreTag = !!options.ignoreTag;
11494
11219
  this.locale = options.locale;
11495
11220
  this.requiresOtherClause = !!options.requiresOtherClause;
11496
11221
  this.shouldParseSkeletons = !!options.shouldParseSkeletons;
11497
11222
  }
11498
- Parser2.prototype.parse = function() {
11223
+ parse() {
11499
11224
  if (this.offset() !== 0) {
11500
11225
  throw Error("parser can only be used once");
11501
11226
  }
11502
11227
  return this.parseMessage(0, "", false);
11503
- };
11504
- Parser2.prototype.parseMessage = function(nestingLevel, parentArgType, expectingCloseTag) {
11505
- var elements = [];
11228
+ }
11229
+ parseMessage(nestingLevel, parentArgType, expectingCloseTag) {
11230
+ let elements = [];
11506
11231
  while (!this.isEOF()) {
11507
- var char = this.char();
11232
+ const char = this.char();
11508
11233
  if (char === 123) {
11509
- var result = this.parseArgument(nestingLevel, expectingCloseTag);
11234
+ const result = this.parseArgument(nestingLevel, expectingCloseTag);
11510
11235
  if (result.err) {
11511
11236
  return result;
11512
11237
  }
@@ -11514,7 +11239,7 @@ var init_parser = __esm({
11514
11239
  } else if (char === 125 && nestingLevel > 0) {
11515
11240
  break;
11516
11241
  } else if (char === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) {
11517
- var position = this.clonePosition();
11242
+ const position = this.clonePosition();
11518
11243
  this.bump();
11519
11244
  elements.push({
11520
11245
  type: TYPE.pound,
@@ -11527,48 +11252,69 @@ var init_parser = __esm({
11527
11252
  return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));
11528
11253
  }
11529
11254
  } else if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {
11530
- var result = this.parseTag(nestingLevel, parentArgType);
11255
+ const result = this.parseTag(nestingLevel, parentArgType);
11531
11256
  if (result.err) {
11532
11257
  return result;
11533
11258
  }
11534
11259
  elements.push(result.val);
11535
11260
  } else {
11536
- var result = this.parseLiteral(nestingLevel, parentArgType);
11261
+ const result = this.parseLiteral(nestingLevel, parentArgType);
11537
11262
  if (result.err) {
11538
11263
  return result;
11539
11264
  }
11540
11265
  elements.push(result.val);
11541
11266
  }
11542
11267
  }
11543
- return { val: elements, err: null };
11544
- };
11545
- Parser2.prototype.parseTag = function(nestingLevel, parentArgType) {
11546
- var startPosition = this.clonePosition();
11268
+ return {
11269
+ val: elements,
11270
+ err: null
11271
+ };
11272
+ }
11273
+ /**
11274
+ * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
11275
+ * [custom element name][] except that a dash is NOT always mandatory and uppercase letters
11276
+ * are accepted:
11277
+ *
11278
+ * ```
11279
+ * tag ::= "<" tagName (whitespace)* "/>" | "<" tagName (whitespace)* ">" message "</" tagName (whitespace)* ">"
11280
+ * tagName ::= [a-z] (PENChar)*
11281
+ * PENChar ::=
11282
+ * "-" | "." | [0-9] | "_" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |
11283
+ * [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
11284
+ * [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
11285
+ * ```
11286
+ *
11287
+ * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
11288
+ * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
11289
+ * since other tag-based engines like React allow it
11290
+ */
11291
+ parseTag(nestingLevel, parentArgType) {
11292
+ const startPosition = this.clonePosition();
11547
11293
  this.bump();
11548
- var tagName = this.parseTagName();
11294
+ const tagName = this.parseTagName();
11549
11295
  this.bumpSpace();
11550
11296
  if (this.bumpIf("/>")) {
11551
11297
  return {
11552
11298
  val: {
11553
11299
  type: TYPE.literal,
11554
- value: "<".concat(tagName, "/>"),
11300
+ value: `<${tagName}/>`,
11555
11301
  location: createLocation(startPosition, this.clonePosition())
11556
11302
  },
11557
11303
  err: null
11558
11304
  };
11559
11305
  } else if (this.bumpIf(">")) {
11560
- var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
11306
+ const childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
11561
11307
  if (childrenResult.err) {
11562
11308
  return childrenResult;
11563
11309
  }
11564
- var children = childrenResult.val;
11565
- var endTagStartPosition = this.clonePosition();
11310
+ const children = childrenResult.val;
11311
+ const endTagStartPosition = this.clonePosition();
11566
11312
  if (this.bumpIf("</")) {
11567
11313
  if (this.isEOF() || !_isAlpha(this.char())) {
11568
11314
  return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
11569
11315
  }
11570
- var closingTagNameStartPosition = this.clonePosition();
11571
- var closingTagName = this.parseTagName();
11316
+ const closingTagNameStartPosition = this.clonePosition();
11317
+ const closingTagName = this.parseTagName();
11572
11318
  if (tagName !== closingTagName) {
11573
11319
  return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));
11574
11320
  }
@@ -11591,51 +11337,62 @@ var init_parser = __esm({
11591
11337
  } else {
11592
11338
  return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
11593
11339
  }
11594
- };
11595
- Parser2.prototype.parseTagName = function() {
11596
- var startOffset = this.offset();
11340
+ }
11341
+ /**
11342
+ * This method assumes that the caller has peeked ahead for the first tag character.
11343
+ */
11344
+ parseTagName() {
11345
+ const startOffset = this.offset();
11597
11346
  this.bump();
11598
11347
  while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {
11599
11348
  this.bump();
11600
11349
  }
11601
11350
  return this.message.slice(startOffset, this.offset());
11602
- };
11603
- Parser2.prototype.parseLiteral = function(nestingLevel, parentArgType) {
11604
- var start = this.clonePosition();
11605
- var value = "";
11351
+ }
11352
+ parseLiteral(nestingLevel, parentArgType) {
11353
+ const start = this.clonePosition();
11354
+ let value = "";
11606
11355
  while (true) {
11607
- var parseQuoteResult = this.tryParseQuote(parentArgType);
11356
+ const parseQuoteResult = this.tryParseQuote(parentArgType);
11608
11357
  if (parseQuoteResult) {
11609
11358
  value += parseQuoteResult;
11610
11359
  continue;
11611
11360
  }
11612
- var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
11361
+ const parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
11613
11362
  if (parseUnquotedResult) {
11614
11363
  value += parseUnquotedResult;
11615
11364
  continue;
11616
11365
  }
11617
- var parseLeftAngleResult = this.tryParseLeftAngleBracket();
11366
+ const parseLeftAngleResult = this.tryParseLeftAngleBracket();
11618
11367
  if (parseLeftAngleResult) {
11619
11368
  value += parseLeftAngleResult;
11620
11369
  continue;
11621
11370
  }
11622
11371
  break;
11623
11372
  }
11624
- var location = createLocation(start, this.clonePosition());
11373
+ const location = createLocation(start, this.clonePosition());
11625
11374
  return {
11626
- val: { type: TYPE.literal, value, location },
11375
+ val: {
11376
+ type: TYPE.literal,
11377
+ value,
11378
+ location
11379
+ },
11627
11380
  err: null
11628
11381
  };
11629
- };
11630
- Parser2.prototype.tryParseLeftAngleBracket = function() {
11631
- if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
11632
- !_isAlphaOrSlash(this.peek() || 0))) {
11382
+ }
11383
+ tryParseLeftAngleBracket() {
11384
+ if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || !_isAlphaOrSlash(this.peek() || 0))) {
11633
11385
  this.bump();
11634
11386
  return "<";
11635
11387
  }
11636
11388
  return null;
11637
- };
11638
- Parser2.prototype.tryParseQuote = function(parentArgType) {
11389
+ }
11390
+ /**
11391
+ * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
11392
+ * a character that requires quoting (that is, "only where needed"), and works the same in
11393
+ * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
11394
+ */
11395
+ tryParseQuote(parentArgType) {
11639
11396
  if (this.isEOF() || this.char() !== 39) {
11640
11397
  return null;
11641
11398
  }
@@ -11658,10 +11415,10 @@ var init_parser = __esm({
11658
11415
  return null;
11659
11416
  }
11660
11417
  this.bump();
11661
- var codePoints = [this.char()];
11418
+ const codePoints = [this.char()];
11662
11419
  this.bump();
11663
11420
  while (!this.isEOF()) {
11664
- var ch = this.char();
11421
+ const ch = this.char();
11665
11422
  if (ch === 39) {
11666
11423
  if (this.peek() === 39) {
11667
11424
  codePoints.push(39);
@@ -11675,22 +11432,22 @@ var init_parser = __esm({
11675
11432
  }
11676
11433
  this.bump();
11677
11434
  }
11678
- return String.fromCodePoint.apply(String, codePoints);
11679
- };
11680
- Parser2.prototype.tryParseUnquoted = function(nestingLevel, parentArgType) {
11435
+ return String.fromCodePoint(...codePoints);
11436
+ }
11437
+ tryParseUnquoted(nestingLevel, parentArgType) {
11681
11438
  if (this.isEOF()) {
11682
11439
  return null;
11683
11440
  }
11684
- var ch = this.char();
11441
+ const ch = this.char();
11685
11442
  if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) {
11686
11443
  return null;
11687
11444
  } else {
11688
11445
  this.bump();
11689
11446
  return String.fromCodePoint(ch);
11690
11447
  }
11691
- };
11692
- Parser2.prototype.parseArgument = function(nestingLevel, expectingCloseTag) {
11693
- var openingBracePosition = this.clonePosition();
11448
+ }
11449
+ parseArgument(nestingLevel, expectingCloseTag) {
11450
+ const openingBracePosition = this.clonePosition();
11694
11451
  this.bump();
11695
11452
  this.bumpSpace();
11696
11453
  if (this.isEOF()) {
@@ -11700,7 +11457,7 @@ var init_parser = __esm({
11700
11457
  this.bump();
11701
11458
  return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
11702
11459
  }
11703
- var value = this.parseIdentifierIfPossible().value;
11460
+ let value = this.parseIdentifierIfPossible().value;
11704
11461
  if (!value) {
11705
11462
  return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
11706
11463
  }
@@ -11714,7 +11471,6 @@ var init_parser = __esm({
11714
11471
  return {
11715
11472
  val: {
11716
11473
  type: TYPE.argument,
11717
- // value does not include the opening and closing braces.
11718
11474
  value,
11719
11475
  location: createLocation(openingBracePosition, this.clonePosition())
11720
11476
  },
@@ -11732,22 +11488,28 @@ var init_parser = __esm({
11732
11488
  default:
11733
11489
  return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
11734
11490
  }
11735
- };
11736
- Parser2.prototype.parseIdentifierIfPossible = function() {
11737
- var startingPosition = this.clonePosition();
11738
- var startOffset = this.offset();
11739
- var value = matchIdentifierAtIndex(this.message, startOffset);
11740
- var endOffset = startOffset + value.length;
11491
+ }
11492
+ /**
11493
+ * Advance the parser until the end of the identifier, if it is currently on
11494
+ * an identifier character. Return an empty string otherwise.
11495
+ */
11496
+ parseIdentifierIfPossible() {
11497
+ const startingPosition = this.clonePosition();
11498
+ const startOffset = this.offset();
11499
+ const value = matchIdentifierAtIndex(this.message, startOffset);
11500
+ const endOffset = startOffset + value.length;
11741
11501
  this.bumpTo(endOffset);
11742
- var endPosition = this.clonePosition();
11743
- var location = createLocation(startingPosition, endPosition);
11744
- return { value, location };
11745
- };
11746
- Parser2.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
11747
- var _a;
11748
- var typeStartPosition = this.clonePosition();
11749
- var argType = this.parseIdentifierIfPossible().value;
11750
- var typeEndPosition = this.clonePosition();
11502
+ const endPosition = this.clonePosition();
11503
+ const location = createLocation(startingPosition, endPosition);
11504
+ return {
11505
+ value,
11506
+ location
11507
+ };
11508
+ }
11509
+ parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition) {
11510
+ let typeStartPosition = this.clonePosition();
11511
+ let argType = this.parseIdentifierIfPossible().value;
11512
+ let typeEndPosition = this.clonePosition();
11751
11513
  switch (argType) {
11752
11514
  case "":
11753
11515
  return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
@@ -11755,54 +11517,67 @@ var init_parser = __esm({
11755
11517
  case "date":
11756
11518
  case "time": {
11757
11519
  this.bumpSpace();
11758
- var styleAndLocation = null;
11520
+ let styleAndLocation = null;
11759
11521
  if (this.bumpIf(",")) {
11760
11522
  this.bumpSpace();
11761
- var styleStartPosition = this.clonePosition();
11762
- var result = this.parseSimpleArgStyleIfPossible();
11523
+ const styleStartPosition = this.clonePosition();
11524
+ const result = this.parseSimpleArgStyleIfPossible();
11763
11525
  if (result.err) {
11764
11526
  return result;
11765
11527
  }
11766
- var style = trimEnd(result.val);
11528
+ const style = trimEnd(result.val);
11767
11529
  if (style.length === 0) {
11768
11530
  return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
11769
11531
  }
11770
- var styleLocation = createLocation(styleStartPosition, this.clonePosition());
11771
- styleAndLocation = { style, styleLocation };
11532
+ const styleLocation = createLocation(styleStartPosition, this.clonePosition());
11533
+ styleAndLocation = {
11534
+ style,
11535
+ styleLocation
11536
+ };
11772
11537
  }
11773
- var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
11538
+ const argCloseResult = this.tryParseArgumentClose(openingBracePosition);
11774
11539
  if (argCloseResult.err) {
11775
11540
  return argCloseResult;
11776
11541
  }
11777
- var location_1 = createLocation(openingBracePosition, this.clonePosition());
11542
+ const location = createLocation(openingBracePosition, this.clonePosition());
11778
11543
  if (styleAndLocation && styleAndLocation.style.startsWith("::")) {
11779
- var skeleton = trimStart(styleAndLocation.style.slice(2));
11544
+ let skeleton = trimStart(styleAndLocation.style.slice(2));
11780
11545
  if (argType === "number") {
11781
- var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
11546
+ const result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
11782
11547
  if (result.err) {
11783
11548
  return result;
11784
11549
  }
11785
11550
  return {
11786
- val: { type: TYPE.number, value, location: location_1, style: result.val },
11551
+ val: {
11552
+ type: TYPE.number,
11553
+ value,
11554
+ location,
11555
+ style: result.val
11556
+ },
11787
11557
  err: null
11788
11558
  };
11789
11559
  } else {
11790
11560
  if (skeleton.length === 0) {
11791
- return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
11561
+ return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location);
11792
11562
  }
11793
- var dateTimePattern = skeleton;
11563
+ let dateTimePattern = skeleton;
11794
11564
  if (this.locale) {
11795
11565
  dateTimePattern = getBestPattern(skeleton, this.locale);
11796
11566
  }
11797
- var style = {
11567
+ const style = {
11798
11568
  type: SKELETON_TYPE.dateTime,
11799
11569
  pattern: dateTimePattern,
11800
11570
  location: styleAndLocation.styleLocation,
11801
11571
  parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(dateTimePattern) : {}
11802
11572
  };
11803
- var type = argType === "date" ? TYPE.date : TYPE.time;
11573
+ const type = argType === "date" ? TYPE.date : TYPE.time;
11804
11574
  return {
11805
- val: { type, value, location: location_1, style },
11575
+ val: {
11576
+ type,
11577
+ value,
11578
+ location,
11579
+ style
11580
+ },
11806
11581
  err: null
11807
11582
  };
11808
11583
  }
@@ -11811,8 +11586,8 @@ var init_parser = __esm({
11811
11586
  val: {
11812
11587
  type: argType === "number" ? TYPE.number : argType === "date" ? TYPE.date : TYPE.time,
11813
11588
  value,
11814
- location: location_1,
11815
- style: (_a = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a !== void 0 ? _a : null
11589
+ location,
11590
+ style: (styleAndLocation == null ? void 0 : styleAndLocation.style) ?? null
11816
11591
  },
11817
11592
  err: null
11818
11593
  };
@@ -11820,20 +11595,20 @@ var init_parser = __esm({
11820
11595
  case "plural":
11821
11596
  case "selectordinal":
11822
11597
  case "select": {
11823
- var typeEndPosition_1 = this.clonePosition();
11598
+ const typeEndPosition2 = this.clonePosition();
11824
11599
  this.bumpSpace();
11825
11600
  if (!this.bumpIf(",")) {
11826
- return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));
11601
+ return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition2, { ...typeEndPosition2 }));
11827
11602
  }
11828
11603
  this.bumpSpace();
11829
- var identifierAndLocation = this.parseIdentifierIfPossible();
11830
- var pluralOffset = 0;
11604
+ let identifierAndLocation = this.parseIdentifierIfPossible();
11605
+ let pluralOffset = 0;
11831
11606
  if (argType !== "select" && identifierAndLocation.value === "offset") {
11832
11607
  if (!this.bumpIf(":")) {
11833
11608
  return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));
11834
11609
  }
11835
11610
  this.bumpSpace();
11836
- var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
11611
+ const result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
11837
11612
  if (result.err) {
11838
11613
  return result;
11839
11614
  }
@@ -11841,22 +11616,22 @@ var init_parser = __esm({
11841
11616
  identifierAndLocation = this.parseIdentifierIfPossible();
11842
11617
  pluralOffset = result.val;
11843
11618
  }
11844
- var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
11619
+ const optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
11845
11620
  if (optionsResult.err) {
11846
11621
  return optionsResult;
11847
11622
  }
11848
- var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
11623
+ const argCloseResult = this.tryParseArgumentClose(openingBracePosition);
11849
11624
  if (argCloseResult.err) {
11850
11625
  return argCloseResult;
11851
11626
  }
11852
- var location_2 = createLocation(openingBracePosition, this.clonePosition());
11627
+ const location = createLocation(openingBracePosition, this.clonePosition());
11853
11628
  if (argType === "select") {
11854
11629
  return {
11855
11630
  val: {
11856
11631
  type: TYPE.select,
11857
11632
  value,
11858
11633
  options: fromEntries(optionsResult.val),
11859
- location: location_2
11634
+ location
11860
11635
  },
11861
11636
  err: null
11862
11637
  };
@@ -11868,7 +11643,7 @@ var init_parser = __esm({
11868
11643
  options: fromEntries(optionsResult.val),
11869
11644
  offset: pluralOffset,
11870
11645
  pluralType: argType === "plural" ? "cardinal" : "ordinal",
11871
- location: location_2
11646
+ location
11872
11647
  },
11873
11648
  err: null
11874
11649
  };
@@ -11877,23 +11652,29 @@ var init_parser = __esm({
11877
11652
  default:
11878
11653
  return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
11879
11654
  }
11880
- };
11881
- Parser2.prototype.tryParseArgumentClose = function(openingBracePosition) {
11655
+ }
11656
+ tryParseArgumentClose(openingBracePosition) {
11882
11657
  if (this.isEOF() || this.char() !== 125) {
11883
11658
  return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
11884
11659
  }
11885
11660
  this.bump();
11886
- return { val: true, err: null };
11887
- };
11888
- Parser2.prototype.parseSimpleArgStyleIfPossible = function() {
11889
- var nestedBraces = 0;
11890
- var startPosition = this.clonePosition();
11661
+ return {
11662
+ val: true,
11663
+ err: null
11664
+ };
11665
+ }
11666
+ /**
11667
+ * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
11668
+ */
11669
+ parseSimpleArgStyleIfPossible() {
11670
+ let nestedBraces = 0;
11671
+ const startPosition = this.clonePosition();
11891
11672
  while (!this.isEOF()) {
11892
- var ch = this.char();
11673
+ const ch = this.char();
11893
11674
  switch (ch) {
11894
11675
  case 39: {
11895
11676
  this.bump();
11896
- var apostrophePosition = this.clonePosition();
11677
+ let apostrophePosition = this.clonePosition();
11897
11678
  if (!this.bumpUntil("'")) {
11898
11679
  return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));
11899
11680
  }
@@ -11925,12 +11706,12 @@ var init_parser = __esm({
11925
11706
  val: this.message.slice(startPosition.offset, this.offset()),
11926
11707
  err: null
11927
11708
  };
11928
- };
11929
- Parser2.prototype.parseNumberSkeletonFromString = function(skeleton, location) {
11930
- var tokens = [];
11709
+ }
11710
+ parseNumberSkeletonFromString(skeleton, location) {
11711
+ let tokens = [];
11931
11712
  try {
11932
11713
  tokens = parseNumberSkeletonFromString(skeleton);
11933
- } catch (_a) {
11714
+ } catch {
11934
11715
  return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);
11935
11716
  }
11936
11717
  return {
@@ -11942,18 +11723,27 @@ var init_parser = __esm({
11942
11723
  },
11943
11724
  err: null
11944
11725
  };
11945
- };
11946
- Parser2.prototype.tryParsePluralOrSelectOptions = function(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
11947
- var _a;
11948
- var hasOtherClause = false;
11949
- var options = [];
11950
- var parsedSelectors = /* @__PURE__ */ new Set();
11951
- var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;
11726
+ }
11727
+ /**
11728
+ * @param nesting_level The current nesting level of messages.
11729
+ * This can be positive when parsing message fragment in select or plural argument options.
11730
+ * @param parent_arg_type The parent argument's type.
11731
+ * @param parsed_first_identifier If provided, this is the first identifier-like selector of
11732
+ * the argument. It is a by-product of a previous parsing attempt.
11733
+ * @param expecting_close_tag If true, this message is directly or indirectly nested inside
11734
+ * between a pair of opening and closing tags. The nested message will not parse beyond
11735
+ * the closing tag boundary.
11736
+ */
11737
+ tryParsePluralOrSelectOptions(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
11738
+ let hasOtherClause = false;
11739
+ const options = [];
11740
+ const parsedSelectors = /* @__PURE__ */ new Set();
11741
+ let { value: selector, location: selectorLocation } = parsedFirstIdentifier;
11952
11742
  while (true) {
11953
11743
  if (selector.length === 0) {
11954
- var startPosition = this.clonePosition();
11744
+ const startPosition = this.clonePosition();
11955
11745
  if (parentArgType !== "select" && this.bumpIf("=")) {
11956
- var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
11746
+ const result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
11957
11747
  if (result.err) {
11958
11748
  return result;
11959
11749
  }
@@ -11970,28 +11760,25 @@ var init_parser = __esm({
11970
11760
  hasOtherClause = true;
11971
11761
  }
11972
11762
  this.bumpSpace();
11973
- var openingBracePosition = this.clonePosition();
11763
+ const openingBracePosition = this.clonePosition();
11974
11764
  if (!this.bumpIf("{")) {
11975
11765
  return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));
11976
11766
  }
11977
- var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
11767
+ const fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
11978
11768
  if (fragmentResult.err) {
11979
11769
  return fragmentResult;
11980
11770
  }
11981
- var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
11771
+ const argCloseResult = this.tryParseArgumentClose(openingBracePosition);
11982
11772
  if (argCloseResult.err) {
11983
11773
  return argCloseResult;
11984
11774
  }
11985
- options.push([
11986
- selector,
11987
- {
11988
- value: fragmentResult.val,
11989
- location: createLocation(openingBracePosition, this.clonePosition())
11990
- }
11991
- ]);
11775
+ options.push([selector, {
11776
+ value: fragmentResult.val,
11777
+ location: createLocation(openingBracePosition, this.clonePosition())
11778
+ }]);
11992
11779
  parsedSelectors.add(selector);
11993
11780
  this.bumpSpace();
11994
- _a = this.parseIdentifierIfPossible(), selector = _a.value, selectorLocation = _a.location;
11781
+ ({ value: selector, location: selectorLocation } = this.parseIdentifierIfPossible());
11995
11782
  }
11996
11783
  if (options.length === 0) {
11997
11784
  return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
@@ -11999,19 +11786,22 @@ var init_parser = __esm({
11999
11786
  if (this.requiresOtherClause && !hasOtherClause) {
12000
11787
  return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));
12001
11788
  }
12002
- return { val: options, err: null };
12003
- };
12004
- Parser2.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
12005
- var sign = 1;
12006
- var startingPosition = this.clonePosition();
11789
+ return {
11790
+ val: options,
11791
+ err: null
11792
+ };
11793
+ }
11794
+ tryParseDecimalInteger(expectNumberError, invalidNumberError) {
11795
+ let sign = 1;
11796
+ const startingPosition = this.clonePosition();
12007
11797
  if (this.bumpIf("+")) {
12008
11798
  } else if (this.bumpIf("-")) {
12009
11799
  sign = -1;
12010
11800
  }
12011
- var hasDigits = false;
12012
- var decimal = 0;
11801
+ let hasDigits = false;
11802
+ let decimal = 0;
12013
11803
  while (!this.isEOF()) {
12014
- var ch = this.char();
11804
+ const ch = this.char();
12015
11805
  if (ch >= 48 && ch <= 57) {
12016
11806
  hasDigits = true;
12017
11807
  decimal = decimal * 10 + (ch - 48);
@@ -12020,7 +11810,7 @@ var init_parser = __esm({
12020
11810
  break;
12021
11811
  }
12022
11812
  }
12023
- var location = createLocation(startingPosition, this.clonePosition());
11813
+ const location = createLocation(startingPosition, this.clonePosition());
12024
11814
  if (!hasDigits) {
12025
11815
  return this.error(expectNumberError, location);
12026
11816
  }
@@ -12028,33 +11818,40 @@ var init_parser = __esm({
12028
11818
  if (!Number.isSafeInteger(decimal)) {
12029
11819
  return this.error(invalidNumberError, location);
12030
11820
  }
12031
- return { val: decimal, err: null };
12032
- };
12033
- Parser2.prototype.offset = function() {
11821
+ return {
11822
+ val: decimal,
11823
+ err: null
11824
+ };
11825
+ }
11826
+ offset() {
12034
11827
  return this.position.offset;
12035
- };
12036
- Parser2.prototype.isEOF = function() {
11828
+ }
11829
+ isEOF() {
12037
11830
  return this.offset() === this.message.length;
12038
- };
12039
- Parser2.prototype.clonePosition = function() {
11831
+ }
11832
+ clonePosition() {
12040
11833
  return {
12041
11834
  offset: this.position.offset,
12042
11835
  line: this.position.line,
12043
11836
  column: this.position.column
12044
11837
  };
12045
- };
12046
- Parser2.prototype.char = function() {
12047
- var offset = this.position.offset;
11838
+ }
11839
+ /**
11840
+ * Return the code point at the current position of the parser.
11841
+ * Throws if the index is out of bound.
11842
+ */
11843
+ char() {
11844
+ const offset = this.position.offset;
12048
11845
  if (offset >= this.message.length) {
12049
11846
  throw Error("out of bound");
12050
11847
  }
12051
- var code = this.message.codePointAt(offset);
11848
+ const code = this.message.codePointAt(offset);
12052
11849
  if (code === void 0) {
12053
- throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
11850
+ throw Error(`Offset ${offset} is at invalid UTF-16 code unit boundary`);
12054
11851
  }
12055
11852
  return code;
12056
- };
12057
- Parser2.prototype.error = function(kind, location) {
11853
+ }
11854
+ error(kind, location) {
12058
11855
  return {
12059
11856
  val: null,
12060
11857
  err: {
@@ -12063,12 +11860,13 @@ var init_parser = __esm({
12063
11860
  location
12064
11861
  }
12065
11862
  };
12066
- };
12067
- Parser2.prototype.bump = function() {
11863
+ }
11864
+ /** Bump the parser to the next UTF-16 code unit. */
11865
+ bump() {
12068
11866
  if (this.isEOF()) {
12069
11867
  return;
12070
11868
  }
12071
- var code = this.char();
11869
+ const code = this.char();
12072
11870
  if (code === 10) {
12073
11871
  this.position.line += 1;
12074
11872
  this.position.column = 1;
@@ -12077,19 +11875,29 @@ var init_parser = __esm({
12077
11875
  this.position.column += 1;
12078
11876
  this.position.offset += code < 65536 ? 1 : 2;
12079
11877
  }
12080
- };
12081
- Parser2.prototype.bumpIf = function(prefix) {
11878
+ }
11879
+ /**
11880
+ * If the substring starting at the current position of the parser has
11881
+ * the given prefix, then bump the parser to the character immediately
11882
+ * following the prefix and return true. Otherwise, don't bump the parser
11883
+ * and return false.
11884
+ */
11885
+ bumpIf(prefix) {
12082
11886
  if (this.message.startsWith(prefix, this.offset())) {
12083
- for (var i = 0; i < prefix.length; i++) {
11887
+ for (let i = 0; i < prefix.length; i++) {
12084
11888
  this.bump();
12085
11889
  }
12086
11890
  return true;
12087
11891
  }
12088
11892
  return false;
12089
- };
12090
- Parser2.prototype.bumpUntil = function(pattern) {
12091
- var currentOffset = this.offset();
12092
- var index = this.message.indexOf(pattern, currentOffset);
11893
+ }
11894
+ /**
11895
+ * Bump the parser until the pattern character is found and return `true`.
11896
+ * Otherwise bump to the end of the file and return `false`.
11897
+ */
11898
+ bumpUntil(pattern) {
11899
+ const currentOffset = this.offset();
11900
+ const index = this.message.indexOf(pattern, currentOffset);
12093
11901
  if (index >= 0) {
12094
11902
  this.bumpTo(index);
12095
11903
  return true;
@@ -12097,42 +11905,50 @@ var init_parser = __esm({
12097
11905
  this.bumpTo(this.message.length);
12098
11906
  return false;
12099
11907
  }
12100
- };
12101
- Parser2.prototype.bumpTo = function(targetOffset) {
11908
+ }
11909
+ /**
11910
+ * Bump the parser to the target offset.
11911
+ * If target offset is beyond the end of the input, bump the parser to the end of the input.
11912
+ */
11913
+ bumpTo(targetOffset) {
12102
11914
  if (this.offset() > targetOffset) {
12103
- throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
11915
+ throw Error(`targetOffset ${targetOffset} must be greater than or equal to the current offset ${this.offset()}`);
12104
11916
  }
12105
11917
  targetOffset = Math.min(targetOffset, this.message.length);
12106
11918
  while (true) {
12107
- var offset = this.offset();
11919
+ const offset = this.offset();
12108
11920
  if (offset === targetOffset) {
12109
11921
  break;
12110
11922
  }
12111
11923
  if (offset > targetOffset) {
12112
- throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
11924
+ throw Error(`targetOffset ${targetOffset} is at invalid UTF-16 code unit boundary`);
12113
11925
  }
12114
11926
  this.bump();
12115
11927
  if (this.isEOF()) {
12116
11928
  break;
12117
11929
  }
12118
11930
  }
12119
- };
12120
- Parser2.prototype.bumpSpace = function() {
11931
+ }
11932
+ /** advance the parser through all whitespace to the next non-whitespace code unit. */
11933
+ bumpSpace() {
12121
11934
  while (!this.isEOF() && _isWhiteSpace(this.char())) {
12122
11935
  this.bump();
12123
11936
  }
12124
- };
12125
- Parser2.prototype.peek = function() {
11937
+ }
11938
+ /**
11939
+ * Peek at the *next* Unicode codepoint in the input without advancing the parser.
11940
+ * If the input has been exhausted, then this returns null.
11941
+ */
11942
+ peek() {
12126
11943
  if (this.isEOF()) {
12127
11944
  return null;
12128
11945
  }
12129
- var code = this.char();
12130
- var offset = this.offset();
12131
- var nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1));
12132
- return nextCode !== null && nextCode !== void 0 ? nextCode : null;
12133
- };
12134
- return Parser2;
12135
- }();
11946
+ const code = this.char();
11947
+ const offset = this.offset();
11948
+ const nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1));
11949
+ return nextCode ?? null;
11950
+ }
11951
+ };
12136
11952
  }
12137
11953
  });
12138
11954
 
@@ -12142,7 +11958,7 @@ function cloneDeep(obj) {
12142
11958
  return obj.map(cloneDeep);
12143
11959
  }
12144
11960
  if (obj !== null && typeof obj === "object") {
12145
- return Object.keys(obj).reduce(function(cloned, k) {
11961
+ return Object.keys(obj).reduce((cloned, k) => {
12146
11962
  cloned[k] = cloneDeep(obj[k]);
12147
11963
  return cloned;
12148
11964
  }, {});
@@ -12150,7 +11966,7 @@ function cloneDeep(obj) {
12150
11966
  return obj;
12151
11967
  }
12152
11968
  function replacePoundWithArgument(ast, variableName) {
12153
- return ast.map(function(el) {
11969
+ return ast.map((el) => {
12154
11970
  if (isPoundElement(el)) {
12155
11971
  return {
12156
11972
  type: TYPE.number,
@@ -12160,35 +11976,40 @@ function replacePoundWithArgument(ast, variableName) {
12160
11976
  };
12161
11977
  }
12162
11978
  if (isPluralElement(el) || isSelectElement(el)) {
12163
- var newOptions = {};
12164
- for (var _i = 0, _a = Object.keys(el.options); _i < _a.length; _i++) {
12165
- var key = _a[_i];
12166
- newOptions[key] = {
12167
- value: replacePoundWithArgument(el.options[key].value, variableName)
12168
- };
11979
+ const newOptions = {};
11980
+ for (const key of Object.keys(el.options)) {
11981
+ newOptions[key] = { value: replacePoundWithArgument(el.options[key].value, variableName) };
12169
11982
  }
12170
- return __assign(__assign({}, el), { options: newOptions });
11983
+ return {
11984
+ ...el,
11985
+ options: newOptions
11986
+ };
12171
11987
  }
12172
11988
  if (isTagElement(el)) {
12173
- return __assign(__assign({}, el), { children: replacePoundWithArgument(el.children, variableName) });
11989
+ return {
11990
+ ...el,
11991
+ children: replacePoundWithArgument(el.children, variableName)
11992
+ };
12174
11993
  }
12175
11994
  return el;
12176
11995
  });
12177
11996
  }
12178
11997
  function hoistPluralOrSelectElement(ast, el, positionToInject) {
12179
- var cloned = cloneDeep(el);
12180
- var options = cloned.options;
12181
- var afterElements = ast.slice(positionToInject + 1);
12182
- var hasSubsequentPluralOrSelect = afterElements.some(isPluralOrSelectElement);
12183
- cloned.options = Object.keys(options).reduce(function(all, k) {
12184
- var optionValue = options[k].value;
11998
+ const cloned = cloneDeep(el);
11999
+ const { options } = cloned;
12000
+ const afterElements = ast.slice(positionToInject + 1);
12001
+ const hasSubsequentPluralOrSelect = afterElements.some(isPluralOrSelectElement);
12002
+ cloned.options = Object.keys(options).reduce((all, k) => {
12003
+ let optionValue = options[k].value;
12185
12004
  if (hasSubsequentPluralOrSelect && isPluralElement(el)) {
12186
12005
  optionValue = replacePoundWithArgument(optionValue, el.value);
12187
12006
  }
12188
- var newValue = hoistSelectors(__spreadArray(__spreadArray(__spreadArray([], ast.slice(0, positionToInject), true), optionValue, true), afterElements, true));
12189
- all[k] = {
12190
- value: newValue
12191
- };
12007
+ const newValue = hoistSelectors([
12008
+ ...ast.slice(0, positionToInject),
12009
+ ...optionValue,
12010
+ ...afterElements
12011
+ ]);
12012
+ all[k] = { value: newValue };
12192
12013
  return all;
12193
12014
  }, {});
12194
12015
  return cloned;
@@ -12197,7 +12018,7 @@ function isPluralOrSelectElement(el) {
12197
12018
  return isPluralElement(el) || isSelectElement(el);
12198
12019
  }
12199
12020
  function findPluralOrSelectElement(ast) {
12200
- return !!ast.find(function(el) {
12021
+ return !!ast.find((el) => {
12201
12022
  if (isPluralOrSelectElement(el)) {
12202
12023
  return true;
12203
12024
  }
@@ -12208,8 +12029,8 @@ function findPluralOrSelectElement(ast) {
12208
12029
  });
12209
12030
  }
12210
12031
  function hoistSelectors(ast) {
12211
- for (var i = 0; i < ast.length; i++) {
12212
- var el = ast[i];
12032
+ for (let i = 0; i < ast.length; i++) {
12033
+ const el = ast[i];
12213
12034
  if (isPluralOrSelectElement(el)) {
12214
12035
  return [hoistPluralOrSelectElement(ast, el, i)];
12215
12036
  }
@@ -12219,20 +12040,17 @@ function hoistSelectors(ast) {
12219
12040
  }
12220
12041
  return ast;
12221
12042
  }
12222
- function collectVariables(ast, vars) {
12223
- if (vars === void 0) {
12224
- vars = /* @__PURE__ */ new Map();
12225
- }
12226
- ast.forEach(function(el) {
12043
+ function collectVariables(ast, vars = /* @__PURE__ */ new Map()) {
12044
+ ast.forEach((el) => {
12227
12045
  if (isArgumentElement(el) || isDateElement(el) || isTimeElement(el) || isNumberElement(el)) {
12228
12046
  if (el.value in vars && vars.get(el.value) !== el.type) {
12229
- throw new Error("Variable ".concat(el.value, " has conflicting types"));
12047
+ throw new Error(`Variable ${el.value} has conflicting types`);
12230
12048
  }
12231
12049
  vars.set(el.value, el.type);
12232
12050
  }
12233
12051
  if (isPluralElement(el) || isSelectElement(el)) {
12234
12052
  vars.set(el.value, el.type);
12235
- Object.keys(el.options).forEach(function(k) {
12053
+ Object.keys(el.options).forEach((k) => {
12236
12054
  collectVariables(el.options[k].value, vars);
12237
12055
  });
12238
12056
  }
@@ -12243,32 +12061,31 @@ function collectVariables(ast, vars) {
12243
12061
  });
12244
12062
  }
12245
12063
  function isStructurallySame(a, b) {
12246
- var aVars = /* @__PURE__ */ new Map();
12247
- var bVars = /* @__PURE__ */ new Map();
12064
+ const aVars = /* @__PURE__ */ new Map();
12065
+ const bVars = /* @__PURE__ */ new Map();
12248
12066
  collectVariables(a, aVars);
12249
12067
  collectVariables(b, bVars);
12250
12068
  if (aVars.size !== bVars.size) {
12251
12069
  return {
12252
12070
  success: false,
12253
- error: new Error("Different number of variables: [".concat(Array.from(aVars.keys()).join(", "), "] vs [").concat(Array.from(bVars.keys()).join(", "), "]"))
12071
+ error: new Error(`Different number of variables: [${Array.from(aVars.keys()).join(", ")}] vs [${Array.from(bVars.keys()).join(", ")}]`)
12254
12072
  };
12255
12073
  }
12256
- return Array.from(aVars.entries()).reduce(function(result, _a) {
12257
- var key = _a[0], type = _a[1];
12074
+ return Array.from(aVars.entries()).reduce((result, [key, type]) => {
12258
12075
  if (!result.success) {
12259
12076
  return result;
12260
12077
  }
12261
- var bType = bVars.get(key);
12078
+ const bType = bVars.get(key);
12262
12079
  if (bType == null) {
12263
12080
  return {
12264
12081
  success: false,
12265
- error: new Error("Missing variable ".concat(key, " in message"))
12082
+ error: new Error(`Missing variable ${key} in message`)
12266
12083
  };
12267
12084
  }
12268
12085
  if (bType !== type) {
12269
12086
  return {
12270
12087
  success: false,
12271
- error: new Error("Variable ".concat(key, " has conflicting types: ").concat(TYPE[type], " vs ").concat(TYPE[bType]))
12088
+ error: new Error(`Variable ${key} has conflicting types: ${TYPE[type]} vs ${TYPE[bType]}`)
12272
12089
  };
12273
12090
  }
12274
12091
  return result;
@@ -12276,17 +12093,16 @@ function isStructurallySame(a, b) {
12276
12093
  }
12277
12094
  var init_manipulator = __esm({
12278
12095
  "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/manipulator.js"() {
12279
- init_tslib_es6();
12280
12096
  init_types();
12281
12097
  }
12282
12098
  });
12283
12099
 
12284
12100
  // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/index.js
12285
12101
  function pruneLocation(els) {
12286
- els.forEach(function(el) {
12102
+ els.forEach((el) => {
12287
12103
  delete el.location;
12288
12104
  if (isSelectElement(el) || isPluralElement(el)) {
12289
- for (var k in el.options) {
12105
+ for (const k in el.options) {
12290
12106
  delete el.options[k].location;
12291
12107
  pruneLocation(el.options[k].value);
12292
12108
  }
@@ -12299,26 +12115,26 @@ function pruneLocation(els) {
12299
12115
  }
12300
12116
  });
12301
12117
  }
12302
- function parse(message, opts) {
12303
- if (opts === void 0) {
12304
- opts = {};
12305
- }
12306
- opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);
12307
- var result = new Parser(message, opts).parse();
12118
+ function parse(message, opts = {}) {
12119
+ opts = {
12120
+ shouldParseSkeletons: true,
12121
+ requiresOtherClause: true,
12122
+ ...opts
12123
+ };
12124
+ const result = new Parser(message, opts).parse();
12308
12125
  if (result.err) {
12309
- var error2 = SyntaxError(ErrorKind[result.err.kind]);
12126
+ const error2 = SyntaxError(ErrorKind[result.err.kind]);
12310
12127
  error2.location = result.err.location;
12311
12128
  error2.originalMessage = result.err.message;
12312
12129
  throw error2;
12313
12130
  }
12314
- if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {
12131
+ if (!(opts == null ? void 0 : opts.captureLocation)) {
12315
12132
  pruneLocation(result.val);
12316
12133
  }
12317
12134
  return result.val;
12318
12135
  }
12319
12136
  var init_icu_messageformat_parser = __esm({
12320
12137
  "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/index.js"() {
12321
- init_tslib_es6();
12322
12138
  init_error();
12323
12139
  init_parser();
12324
12140
  init_types();
@@ -17820,7 +17636,7 @@ function printAST(ast) {
17820
17636
  return doPrintAST(ast, false);
17821
17637
  }
17822
17638
  function doPrintAST(ast, isInPlural) {
17823
- var printedNodes = ast.map(function(el, i) {
17639
+ const printedNodes = ast.map((el, i) => {
17824
17640
  if (isLiteralElement(el)) {
17825
17641
  return printLiteralElement(el, isInPlural, i === 0, i === ast.length - 1);
17826
17642
  }
@@ -17846,74 +17662,64 @@ function doPrintAST(ast, isInPlural) {
17846
17662
  return printedNodes.join("");
17847
17663
  }
17848
17664
  function printTagElement(el) {
17849
- return "<".concat(el.value, ">").concat(printAST(el.children), "</").concat(el.value, ">");
17665
+ return `<${el.value}>${printAST(el.children)}</${el.value}>`;
17850
17666
  }
17851
17667
  function printEscapedMessage(message) {
17852
- return message.replace(/([{}](?:[\s\S]*[{}])?)/, "'$1'");
17668
+ return message.replace(/([{}](?:[\s\S]*[{}])?)/, `'$1'`);
17853
17669
  }
17854
- function printLiteralElement(_a, isInPlural, isFirstEl, isLastEl) {
17855
- var value = _a.value;
17856
- var escaped = value;
17857
- if (!isFirstEl && escaped[0] === "'") {
17858
- escaped = "''".concat(escaped.slice(1));
17670
+ function printLiteralElement({ value }, isInPlural, isFirstEl, isLastEl) {
17671
+ let escaped = value;
17672
+ if (!isFirstEl && escaped[0] === `'`) {
17673
+ escaped = `''${escaped.slice(1)}`;
17859
17674
  }
17860
- if (!isLastEl && escaped[escaped.length - 1] === "'") {
17861
- escaped = "".concat(escaped.slice(0, escaped.length - 1), "''");
17675
+ if (!isLastEl && escaped[escaped.length - 1] === `'`) {
17676
+ escaped = `${escaped.slice(0, escaped.length - 1)}''`;
17862
17677
  }
17863
17678
  escaped = printEscapedMessage(escaped);
17864
17679
  return isInPlural ? escaped.replace("#", "'#'") : escaped;
17865
17680
  }
17866
- function printArgumentElement(_a) {
17867
- var value = _a.value;
17868
- return "{".concat(value, "}");
17681
+ function printArgumentElement({ value }) {
17682
+ return `{${value}}`;
17869
17683
  }
17870
17684
  function printSimpleFormatElement(el) {
17871
- return "{".concat(el.value, ", ").concat(TYPE[el.type]).concat(el.style ? ", ".concat(printArgumentStyle(el.style)) : "", "}");
17685
+ return `{${el.value}, ${TYPE[el.type]}${el.style ? `, ${printArgumentStyle(el.style)}` : ""}}`;
17872
17686
  }
17873
17687
  function printNumberSkeletonToken(token) {
17874
- var stem = token.stem, options = token.options;
17875
- return options.length === 0 ? stem : "".concat(stem).concat(options.map(function(o) {
17876
- return "/".concat(o);
17877
- }).join(""));
17688
+ const { stem, options } = token;
17689
+ return options.length === 0 ? stem : `${stem}${options.map((o) => `/${o}`).join("")}`;
17878
17690
  }
17879
17691
  function printArgumentStyle(style) {
17880
17692
  if (typeof style === "string") {
17881
17693
  return printEscapedMessage(style);
17882
17694
  } else if (style.type === SKELETON_TYPE.dateTime) {
17883
- return "::".concat(printDateTimeSkeleton(style));
17695
+ return `::${printDateTimeSkeleton(style)}`;
17884
17696
  } else {
17885
- return "::".concat(style.tokens.map(printNumberSkeletonToken).join(" "));
17697
+ return `::${style.tokens.map(printNumberSkeletonToken).join(" ")}`;
17886
17698
  }
17887
17699
  }
17888
17700
  function printDateTimeSkeleton(style) {
17889
17701
  return style.pattern;
17890
17702
  }
17891
17703
  function printSelectElement(el) {
17892
- var msg = [
17704
+ const msg = [
17893
17705
  el.value,
17894
17706
  "select",
17895
- Object.keys(el.options).map(function(id) {
17896
- return "".concat(id, "{").concat(doPrintAST(el.options[id].value, false), "}");
17897
- }).join(" ")
17707
+ Object.keys(el.options).map((id) => `${id}{${doPrintAST(el.options[id].value, false)}}`).join(" ")
17898
17708
  ].join(",");
17899
- return "{".concat(msg, "}");
17709
+ return `{${msg}}`;
17900
17710
  }
17901
17711
  function printPluralElement(el) {
17902
- var type = el.pluralType === "cardinal" ? "plural" : "selectordinal";
17903
- var msg = [
17712
+ const type = el.pluralType === "cardinal" ? "plural" : "selectordinal";
17713
+ const msg = [
17904
17714
  el.value,
17905
17715
  type,
17906
- __spreadArray([
17907
- el.offset ? "offset:".concat(el.offset) : ""
17908
- ], Object.keys(el.options).map(function(id) {
17909
- return "".concat(id, "{").concat(doPrintAST(el.options[id].value, true), "}");
17910
- }), true).filter(Boolean).join(" ")
17716
+ [el.offset ? `offset:${el.offset}` : "", ...Object.keys(el.options).map((id) => `${id}{${doPrintAST(el.options[id].value, true)}}`)].filter(Boolean).join(" ")
17911
17717
  ].join(",");
17912
- return "{".concat(msg, "}");
17718
+ return `{${msg}}`;
17913
17719
  }
17914
17720
  var init_printer = __esm({
17915
17721
  "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/printer.js"() {
17916
- init_tslib_es6();
17722
+ init_icu_skeleton_parser();
17917
17723
  init_types();
17918
17724
  }
17919
17725
  });
@@ -229399,6 +229205,12 @@ var init_interpolate_name = __esm({
229399
229205
  }
229400
229206
  });
229401
229207
 
229208
+ // node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/src/types.js
229209
+ var init_types2 = __esm({
229210
+ "node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/src/types.js"() {
229211
+ }
229212
+ });
229213
+
229402
229214
  // node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/src/transform.js
229403
229215
  function primitiveToTSNode(factory, v) {
229404
229216
  return typeof v === "string" ? factory.createStringLiteral(v) : typeof v === "number" ? factory.createNumericLiteral(v + "") : typeof v === "boolean" ? v ? factory.createTrue() : factory.createFalse() : void 0;
@@ -229644,16 +229456,14 @@ function extractMessageDescriptor(ts2, node, { overrideIdFn, extractSourceLocati
229644
229456
  if (flatten2 && msg.defaultMessage) {
229645
229457
  try {
229646
229458
  msg.defaultMessage = printAST(hoistSelectors(parse(msg.defaultMessage)));
229647
- } catch (e) {
229459
+ } catch {
229648
229460
  }
229649
229461
  }
229650
229462
  if (msg.defaultMessage && overrideIdFn) {
229651
229463
  switch (typeof overrideIdFn) {
229652
229464
  case "string":
229653
229465
  if (!msg.id) {
229654
- msg.id = interpolateName({ resourcePath: sf.fileName }, overrideIdFn, {
229655
- content: msg.description ? `${msg.defaultMessage}#${typeof msg.description === "string" ? msg.description : stringify2(msg.description)}` : msg.defaultMessage
229656
- });
229466
+ msg.id = interpolateName({ resourcePath: sf.fileName }, overrideIdFn, { content: msg.description ? `${msg.defaultMessage}#${typeof msg.description === "string" ? msg.description : stringify2(msg.description)}` : msg.defaultMessage });
229657
229467
  }
229658
229468
  break;
229659
229469
  case "function":
@@ -229711,12 +229521,7 @@ function extractMessageFromJsxComponent(ts2, factory, node, opts, sf) {
229711
229521
  return factory.updateJsxSelfClosingElement(node, node.tagName, node.typeArguments, factory.createJsxAttributes(newProps));
229712
229522
  }
229713
229523
  function setAttributesInObject(ts2, factory, node, msg, ast) {
229714
- const newProps = [
229715
- factory.createPropertyAssignment("id", factory.createStringLiteral(msg.id)),
229716
- ...msg.defaultMessage ? [
229717
- factory.createPropertyAssignment("defaultMessage", ast ? messageASTToTSNode(factory, parse(msg.defaultMessage)) : factory.createStringLiteral(msg.defaultMessage))
229718
- ] : []
229719
- ];
229524
+ const newProps = [factory.createPropertyAssignment("id", factory.createStringLiteral(msg.id)), ...msg.defaultMessage ? [factory.createPropertyAssignment("defaultMessage", ast ? messageASTToTSNode(factory, parse(msg.defaultMessage)) : factory.createStringLiteral(msg.defaultMessage))] : []];
229720
229525
  for (const prop of node.properties) {
229721
229526
  if (ts2.isPropertyAssignment(prop) && ts2.isIdentifier(prop.name) && MESSAGE_DESC_KEYS.includes(prop.name.text)) {
229722
229527
  continue;
@@ -229728,12 +229533,7 @@ function setAttributesInObject(ts2, factory, node, msg, ast) {
229728
229533
  return factory.createObjectLiteralExpression(factory.createNodeArray(newProps));
229729
229534
  }
229730
229535
  function generateNewProperties(ts2, factory, node, msg, ast) {
229731
- const newProps = [
229732
- factory.createJsxAttribute(factory.createIdentifier("id"), factory.createStringLiteral(msg.id)),
229733
- ...msg.defaultMessage ? [
229734
- factory.createJsxAttribute(factory.createIdentifier("defaultMessage"), ast ? factory.createJsxExpression(void 0, messageASTToTSNode(factory, parse(msg.defaultMessage))) : factory.createStringLiteral(msg.defaultMessage))
229735
- ] : []
229736
- ];
229536
+ const newProps = [factory.createJsxAttribute(factory.createIdentifier("id"), factory.createStringLiteral(msg.id)), ...msg.defaultMessage ? [factory.createJsxAttribute(factory.createIdentifier("defaultMessage"), ast ? factory.createJsxExpression(void 0, messageASTToTSNode(factory, parse(msg.defaultMessage))) : factory.createStringLiteral(msg.defaultMessage))] : []];
229737
229537
  for (const prop of node.properties) {
229738
229538
  if (ts2.isJsxAttribute(prop) && ts2.isIdentifier(prop.name) && MESSAGE_DESC_KEYS.includes(prop.name.text)) {
229739
229539
  continue;
@@ -229787,13 +229587,10 @@ function extractMessagesFromCallExpression(ts2, factory, node, opts, sf) {
229787
229587
  if (typeof onMsgExtracted === "function") {
229788
229588
  onMsgExtracted(sf.fileName, [msg]);
229789
229589
  }
229790
- return factory.updateCallExpression(node, node.expression, node.typeArguments, [
229791
- setAttributesInObject(ts2, factory, descriptorsObj, {
229792
- defaultMessage: opts.removeDefaultMessage ? void 0 : msg.defaultMessage,
229793
- id: msg.id
229794
- }, opts.ast),
229795
- ...restArgs
229796
- ]);
229590
+ return factory.updateCallExpression(node, node.expression, node.typeArguments, [setAttributesInObject(ts2, factory, descriptorsObj, {
229591
+ defaultMessage: opts.removeDefaultMessage ? void 0 : msg.defaultMessage,
229592
+ id: msg.id
229593
+ }, opts.ast), ...restArgs]);
229797
229594
  }
229798
229595
  }
229799
229596
  return node;
@@ -229806,7 +229603,10 @@ function getVisitor(ts2, ctx, sf, opts) {
229806
229603
  return visitor;
229807
229604
  }
229808
229605
  function transformWithTs(ts2, opts) {
229809
- opts = { ...DEFAULT_OPTS, ...opts };
229606
+ opts = {
229607
+ ...DEFAULT_OPTS,
229608
+ ...opts
229609
+ };
229810
229610
  debug2("Transforming options", opts);
229811
229611
  const transformFn = (ctx) => {
229812
229612
  return (sf) => {
@@ -229842,6 +229642,7 @@ var init_transform = __esm({
229842
229642
  typescript = __toESM(require_typescript());
229843
229643
  init_console_utils2();
229844
229644
  init_interpolate_name();
229645
+ init_types2();
229845
229646
  stringify2 = stringifyNs2.default || stringifyNs2;
229846
229647
  MESSAGE_DESC_KEYS = [
229847
229648
  "id",
@@ -229856,12 +229657,6 @@ var init_transform = __esm({
229856
229657
  }
229857
229658
  });
229858
229659
 
229859
- // node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/src/types.js
229860
- var init_types2 = __esm({
229861
- "node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/src/types.js"() {
229862
- }
229863
- });
229864
-
229865
229660
  // node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/index.js
229866
229661
  var init_ts_transformer = __esm({
229867
229662
  "node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/index.js"() {