@fedify/testing 2.4.0-dev.1666 → 2.4.0-dev.1727

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/dist/mod.cjs +108 -102
  2. package/package.json +4 -4
package/dist/mod.cjs CHANGED
@@ -1129,7 +1129,7 @@ function parseInt0(s) {
1129
1129
  function padNumber(digits, num) {
1130
1130
  return String(num).padStart(digits, "0");
1131
1131
  }
1132
- const padNumber2 = /* @__PURE__ */ bindArgs(padNumber, 2);
1132
+ const padNumber2 = /*@__PURE__*/ bindArgs(padNumber, 2);
1133
1133
  function compareNumbers(a, b) {
1134
1134
  return Math.sign(a - b);
1135
1135
  }
@@ -1197,7 +1197,7 @@ const unitNameMap = {
1197
1197
  month: 8,
1198
1198
  year: 9
1199
1199
  };
1200
- const unitNamesAsc = /* @__PURE__ */ Object.keys(unitNameMap);
1200
+ const unitNamesAsc = /*@__PURE__*/ Object.keys(unitNameMap);
1201
1201
  const nanoInMicro = nanoInMicro$1;
1202
1202
  const nanoInMilli = nanoInMilli$1;
1203
1203
  const nanoInSec = nanoInSec$1;
@@ -1213,19 +1213,19 @@ const unitNanoMap = [
1213
1213
  nanoInHour,
1214
1214
  nanoInUtcDay
1215
1215
  ];
1216
- const bigNanoInMicro = /* @__PURE__ */ BigInt(nanoInMicro);
1217
- const bigNanoInMilli = /* @__PURE__ */ BigInt(nanoInMilli);
1218
- const bigNanoInSec = /* @__PURE__ */ BigInt(nanoInSec);
1219
- const bigNanoInMinute = /* @__PURE__ */ BigInt(nanoInMinute);
1220
- const bigNanoInHour = /* @__PURE__ */ BigInt(nanoInHour);
1221
- const bigNanoInUtcDay = /* @__PURE__ */ BigInt(nanoInUtcDay);
1216
+ const bigNanoInMicro = /*@__PURE__*/ BigInt(nanoInMicro);
1217
+ const bigNanoInMilli = /*@__PURE__*/ BigInt(nanoInMilli);
1218
+ const bigNanoInSec = /*@__PURE__*/ BigInt(nanoInSec);
1219
+ const bigNanoInMinute = /*@__PURE__*/ BigInt(nanoInMinute);
1220
+ const bigNanoInHour = /*@__PURE__*/ BigInt(nanoInHour);
1221
+ const bigNanoInUtcDay = /*@__PURE__*/ BigInt(nanoInUtcDay);
1222
1222
  function divideBigNanoToExactNumber(bigNano, divisorNano) {
1223
1223
  const days = Number(bigNano / bigNanoInUtcDay);
1224
1224
  const timeNano = Number(bigNano % bigNanoInUtcDay);
1225
1225
  return days * (nanoInUtcDay / divisorNano) + (Math.trunc(timeNano / divisorNano) + timeNano % divisorNano / divisorNano);
1226
1226
  }
1227
- const timeFieldNamesAsc = /* @__PURE__ */ unitNamesAsc.slice(0, 6);
1228
- const timeGetters = /* @__PURE__ */ createPropGetters(timeFieldNamesAsc);
1227
+ const timeFieldNamesAsc = /*@__PURE__*/ unitNamesAsc.slice(0, 6);
1228
+ const timeGetters = /*@__PURE__*/ createPropGetters(timeFieldNamesAsc);
1229
1229
  const yearFieldNamesAsc = ["year"];
1230
1230
  const dayFieldNamesAsc = ["day"];
1231
1231
  const calendarDateFieldNamesAsc = [
@@ -1247,24 +1247,24 @@ const monthDayFieldNames = [
1247
1247
  "month",
1248
1248
  "monthCode"
1249
1249
  ];
1250
- const timeFieldNamesAlpha = /* @__PURE__ */ sortStrings(timeFieldNamesAsc);
1251
- const yearFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(eraYearFieldNames, yearFieldNamesAsc);
1252
- const yearMonthFieldNamesAlpha = /* @__PURE__ */ sortStrings(monthFieldNames, yearFieldNamesAsc);
1253
- const yearMonthFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(eraYearFieldNames, yearMonthFieldNamesAlpha);
1254
- const yearMonthCodeFieldNamesAlpha = /* @__PURE__ */ sortStrings(["monthCode"], yearFieldNamesAsc);
1255
- const yearMonthCodeFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(eraYearFieldNames, yearMonthCodeFieldNamesAlpha);
1256
- const monthCodeDayFieldNamesAlpha = /* @__PURE__ */ sortStrings(dayFieldNamesAsc, ["monthCode"]);
1257
- const dateFieldNamesAlpha = /* @__PURE__ */ sortStrings(dayFieldNamesAsc, yearMonthFieldNamesAlpha);
1258
- const dateFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(dayFieldNamesAsc, eraYearFieldNames, yearMonthFieldNamesAlpha);
1259
- const dateTimeFieldNamesAlpha = /* @__PURE__ */ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc);
1260
- const dateTimeFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc);
1261
- const dateTimeAndOffsetFieldNamesAlpha = /* @__PURE__ */ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc, offsetFieldNames);
1262
- const dateTimeAndOffsetFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc, offsetFieldNames);
1263
- const dateTimeAndZoneFieldNamesAlpha = /* @__PURE__ */ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc, offsetFieldNames, timeZoneFieldNames);
1264
- const dateTimeAndZoneFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc, offsetFieldNames, timeZoneFieldNames);
1265
- const yearMonthCodeDayFieldNamesAlpha = /* @__PURE__ */ sortStrings(dayFieldNamesAsc, yearMonthCodeFieldNamesAlpha);
1266
- const yearMonthCodeDayFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(dayFieldNamesAsc, eraYearFieldNames, yearMonthCodeFieldNamesAlpha);
1267
- const timeFieldDefaults = /* @__PURE__ */ zipPropsConst(timeFieldNamesAsc, 0);
1250
+ const timeFieldNamesAlpha = /*@__PURE__*/ sortStrings(timeFieldNamesAsc);
1251
+ const yearFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(eraYearFieldNames, yearFieldNamesAsc);
1252
+ const yearMonthFieldNamesAlpha = /*@__PURE__*/ sortStrings(monthFieldNames, yearFieldNamesAsc);
1253
+ const yearMonthFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(eraYearFieldNames, yearMonthFieldNamesAlpha);
1254
+ const yearMonthCodeFieldNamesAlpha = /*@__PURE__*/ sortStrings(["monthCode"], yearFieldNamesAsc);
1255
+ const yearMonthCodeFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(eraYearFieldNames, yearMonthCodeFieldNamesAlpha);
1256
+ const monthCodeDayFieldNamesAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, ["monthCode"]);
1257
+ const dateFieldNamesAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, yearMonthFieldNamesAlpha);
1258
+ const dateFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, eraYearFieldNames, yearMonthFieldNamesAlpha);
1259
+ const dateTimeFieldNamesAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc);
1260
+ const dateTimeFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc);
1261
+ const dateTimeAndOffsetFieldNamesAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc, offsetFieldNames);
1262
+ const dateTimeAndOffsetFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc, offsetFieldNames);
1263
+ const dateTimeAndZoneFieldNamesAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc, offsetFieldNames, timeZoneFieldNames);
1264
+ const dateTimeAndZoneFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc, offsetFieldNames, timeZoneFieldNames);
1265
+ const yearMonthCodeDayFieldNamesAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, yearMonthCodeFieldNamesAlpha);
1266
+ const yearMonthCodeDayFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, eraYearFieldNames, yearMonthCodeFieldNamesAlpha);
1267
+ const timeFieldDefaults = /*@__PURE__*/ zipPropsConst(timeFieldNamesAsc, 0);
1268
1268
  function validateTimeFields(timeFields) {
1269
1269
  return constrainTimeFields(timeFields, 1), timeFields;
1270
1270
  }
@@ -1493,20 +1493,20 @@ function computeCalendarWeekOfYear(calendar, isoDate) {
1493
1493
  function computeCalendarYearOfWeek(calendar, isoDate) {
1494
1494
  return calendar === void 0 ? computeIsoWeekFields(isoDate).yearOfWeek : void 0;
1495
1495
  }
1496
- const durationFieldNamesAsc = /* @__PURE__ */ unitNamesAsc.map((unitName) => unitName + "s");
1497
- const durationGetters = /* @__PURE__ */ createPropGetters(durationFieldNamesAsc);
1498
- const durationFieldNamesAlpha = /* @__PURE__ */ sortStrings(durationFieldNamesAsc);
1499
- const durationTimeFieldNamesAsc = /* @__PURE__ */ durationFieldNamesAsc.slice(0, 6);
1500
- const durationDateFieldNamesAsc = /* @__PURE__ */ durationFieldNamesAsc.slice(6);
1501
- const durationCalendarFieldNamesAsc = /* @__PURE__ */ durationDateFieldNamesAsc.slice(1);
1502
- const durationFieldIndexes = /* @__PURE__ */ durationFieldNamesAsc.reduce((indexes, fieldName, i) => (indexes[fieldName] = i, indexes), {});
1503
- const durationFieldDefaults = /* @__PURE__ */ zipPropsConst(durationFieldNamesAsc, 0);
1504
- const durationTimeFieldDefaults = /* @__PURE__ */ zipPropsConst(durationTimeFieldNamesAsc, 0);
1505
- const clearDurationFields = /* @__PURE__ */ bindArgs(zeroOutProps, durationFieldNamesAsc);
1496
+ const durationFieldNamesAsc = /*@__PURE__*/ unitNamesAsc.map((unitName) => unitName + "s");
1497
+ const durationGetters = /*@__PURE__*/ createPropGetters(durationFieldNamesAsc);
1498
+ const durationFieldNamesAlpha = /*@__PURE__*/ sortStrings(durationFieldNamesAsc);
1499
+ const durationTimeFieldNamesAsc = /*@__PURE__*/ durationFieldNamesAsc.slice(0, 6);
1500
+ const durationDateFieldNamesAsc = /*@__PURE__*/ durationFieldNamesAsc.slice(6);
1501
+ const durationCalendarFieldNamesAsc = /*@__PURE__*/ durationDateFieldNamesAsc.slice(1);
1502
+ const durationFieldIndexes = /*@__PURE__*/ durationFieldNamesAsc.reduce((indexes, fieldName, i) => (indexes[fieldName] = i, indexes), {});
1503
+ const durationFieldDefaults = /*@__PURE__*/ zipPropsConst(durationFieldNamesAsc, 0);
1504
+ const durationTimeFieldDefaults = /*@__PURE__*/ zipPropsConst(durationTimeFieldNamesAsc, 0);
1505
+ const clearDurationFields = /*@__PURE__*/ bindArgs(zeroOutProps, durationFieldNamesAsc);
1506
1506
  function requirePropDefined(optionName, optionVal) {
1507
1507
  return optionVal ?? throwRangeError(missingField(optionName)), optionVal;
1508
1508
  }
1509
- const requireString = /* @__PURE__ */ bindArgs(requireType, "string");
1509
+ const requireString = /*@__PURE__*/ bindArgs(requireType, "string");
1510
1510
  function requireType(typeName, arg, entityName = typeName) {
1511
1511
  return typeof arg !== typeName && throwTypeError(invalidEntity(entityName, arg)), arg;
1512
1512
  }
@@ -1618,17 +1618,17 @@ function coerceChoiceOption(optionName, enumNameMap, options, defaultChoice = 0)
1618
1618
  const enumNum = enumNameMap[enumStr];
1619
1619
  return void 0 === enumNum && throwRangeError(invalidChoice(optionName, enumStr, enumNameMap)), enumNum;
1620
1620
  }
1621
- const coerceSmallestUnit = /* @__PURE__ */ bindArgs(coerceUnitOption, smallestUnitStr);
1622
- const coerceLargestUnit = /* @__PURE__ */ bindArgs(coerceUnitOption, "largestUnit");
1623
- const coerceTotalUnit = /* @__PURE__ */ bindArgs(coerceUnitOption, "unit");
1624
- const coerceOverflow = /* @__PURE__ */ bindArgs(coerceChoiceOption, "overflow", overflowMap);
1625
- const coerceEpochDisambig = /* @__PURE__ */ bindArgs(coerceChoiceOption, "disambiguation", epochDisambigMap);
1626
- const coerceOffsetDisambig = /* @__PURE__ */ bindArgs(coerceChoiceOption, "offset", offsetDisambigMap);
1627
- const coerceCalendarDisplay = /* @__PURE__ */ bindArgs(coerceChoiceOption, "calendarName", calendarDisplayMap);
1628
- const coerceTimeZoneDisplay = /* @__PURE__ */ bindArgs(coerceChoiceOption, "timeZoneName", timeZoneDisplayMap);
1629
- const coerceOffsetDisplay = /* @__PURE__ */ bindArgs(coerceChoiceOption, "offset", offsetDisplayMap);
1630
- const coerceRoundingMode = /* @__PURE__ */ bindArgs(coerceChoiceOption, "roundingMode", roundingModeMap);
1631
- const coerceDirection = /* @__PURE__ */ bindArgs(coerceChoiceOption, "direction", directionMap);
1621
+ const coerceSmallestUnit = /*@__PURE__*/ bindArgs(coerceUnitOption, smallestUnitStr);
1622
+ const coerceLargestUnit = /*@__PURE__*/ bindArgs(coerceUnitOption, "largestUnit");
1623
+ const coerceTotalUnit = /*@__PURE__*/ bindArgs(coerceUnitOption, "unit");
1624
+ const coerceOverflow = /*@__PURE__*/ bindArgs(coerceChoiceOption, "overflow", overflowMap);
1625
+ const coerceEpochDisambig = /*@__PURE__*/ bindArgs(coerceChoiceOption, "disambiguation", epochDisambigMap);
1626
+ const coerceOffsetDisambig = /*@__PURE__*/ bindArgs(coerceChoiceOption, "offset", offsetDisambigMap);
1627
+ const coerceCalendarDisplay = /*@__PURE__*/ bindArgs(coerceChoiceOption, "calendarName", calendarDisplayMap);
1628
+ const coerceTimeZoneDisplay = /*@__PURE__*/ bindArgs(coerceChoiceOption, "timeZoneName", timeZoneDisplayMap);
1629
+ const coerceOffsetDisplay = /*@__PURE__*/ bindArgs(coerceChoiceOption, "offset", offsetDisplayMap);
1630
+ const coerceRoundingMode = /*@__PURE__*/ bindArgs(coerceChoiceOption, "roundingMode", roundingModeMap);
1631
+ const coerceDirection = /*@__PURE__*/ bindArgs(coerceChoiceOption, "direction", directionMap);
1632
1632
  function validateRoundingInc(roundingInc, smallestUnit, allowManyLargeUnits, solarMode) {
1633
1633
  const upUnitNano = solarMode ? nanoInUtcDay : unitNanoMap[smallestUnit + 1];
1634
1634
  if (upUnitNano) {
@@ -1682,8 +1682,8 @@ function refineZonedFieldOptions(options, defaultOffsetDisambig = 0) {
1682
1682
  epochDisambig
1683
1683
  ];
1684
1684
  }
1685
- const epochNanoMax = /* @__PURE__ */ BigInt(1e8) * bigNanoInUtcDay;
1686
- const epochNanoMin = /* @__PURE__ */ BigInt(-1e8) * bigNanoInUtcDay;
1685
+ const epochNanoMax = /*@__PURE__*/ BigInt(1e8) * bigNanoInUtcDay;
1686
+ const epochNanoMin = /*@__PURE__*/ BigInt(-1e8) * bigNanoInUtcDay;
1687
1687
  const plainDateEpochNanoMin = epochNanoMin - bigNanoInUtcDay;
1688
1688
  const isoYearMonthIndexMin = -3261848;
1689
1689
  function checkIsoYearMonthInBounds(isoDate) {
@@ -1954,11 +1954,12 @@ function nudgeRelativeDuration(sign, durationFields, endEpochNano, _largestUnit,
1954
1954
  }
1955
1955
  function getTimeZoneTransitionEpochNanoseconds(slots, options) {
1956
1956
  return slots.timeZone.U(slots.epochNanoseconds, ((options) => {
1957
- const res = coerceDirection(normalizeOptionsOrString(options, "direction"), 0);
1957
+ const normalizedOptions = normalizeOptionsOrString(options, "direction");
1958
+ const res = coerceDirection(normalizedOptions, 0);
1958
1959
  return res || throwRangeError(invalidEntity("direction", res)), res;
1959
1960
  })(options));
1960
1961
  }
1961
- const zonedEpochSlotsToIso = /* @__PURE__ */ memoize(_zonedEpochSlotsToIso, WeakMap);
1962
+ const zonedEpochSlotsToIso = /*@__PURE__*/ memoize(_zonedEpochSlotsToIso, WeakMap);
1962
1963
  function _zonedEpochSlotsToIso(slots) {
1963
1964
  const { epochNanoseconds, timeZone } = slots;
1964
1965
  const offsetNanoseconds = timeZone.C(epochNanoseconds);
@@ -2524,7 +2525,7 @@ function resolveTimeFields(fields, overflow) {
2524
2525
  ...fields
2525
2526
  }), overflow);
2526
2527
  }
2527
- const offsetRegExp = /* @__PURE__ */ createRegExp("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");
2528
+ const offsetRegExp = /*@__PURE__*/ createRegExp("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");
2528
2529
  function parseOffsetNano(s) {
2529
2530
  const offsetNano = parseOffsetNanoMaybe(s);
2530
2531
  return void 0 === offsetNano && throwRangeError(failedParse(s)), offsetNano;
@@ -2559,13 +2560,13 @@ const dateFieldRefiners = {
2559
2560
  },
2560
2561
  day: toPositiveIntegerWithTruncation
2561
2562
  };
2562
- const timeFieldRefiners = /* @__PURE__ */ zipPropsConst(timeFieldNamesAsc, toIntegerWithTrunc);
2563
- const durationFieldRefiners = /* @__PURE__ */ zipPropsConst(durationFieldNamesAsc, toStrictInteger);
2563
+ const timeFieldRefiners = /*@__PURE__*/ zipPropsConst(timeFieldNamesAsc, toIntegerWithTrunc);
2564
+ const durationFieldRefiners = /*@__PURE__*/ zipPropsConst(durationFieldNamesAsc, toStrictInteger);
2564
2565
  const offsetFieldRefiners = { offset(offsetString) {
2565
2566
  return parseOffsetNano(toStringViaPrimitive(offsetString));
2566
2567
  } };
2567
- const dateTimeFieldRefiners = /* @__PURE__ */ Object.assign({}, dateFieldRefiners, timeFieldRefiners);
2568
- const zonedDateTimeFieldRefiners = /* @__PURE__ */ Object.assign({}, dateTimeFieldRefiners, offsetFieldRefiners);
2568
+ const dateTimeFieldRefiners = /*@__PURE__*/ Object.assign({}, dateFieldRefiners, timeFieldRefiners);
2569
+ const zonedDateTimeFieldRefiners = /*@__PURE__*/ Object.assign({}, dateTimeFieldRefiners, offsetFieldRefiners);
2569
2570
  function readAndRefineBagFields(bag, validFieldNames, fieldRefiners, requiredFieldNames, disallowEmpty = !requiredFieldNames) {
2570
2571
  const res = {};
2571
2572
  let anyMatching = 0;
@@ -2668,7 +2669,9 @@ const timeZonePeriodDaysByName = {
2668
2669
  const minPossibleTransitionSec = -388152e4;
2669
2670
  function refineTimeDisplayTuple(options, maxSmallestUnit = 4) {
2670
2671
  const subsecDigits = coerceFractionalSecondDigits(options);
2671
- return [coerceRoundingMode(options, 4), ...resolveSmallestUnitAndSubsecDigits(validateUnitRange(smallestUnitStr, coerceSmallestUnit(options), 0, maxSmallestUnit), subsecDigits)];
2672
+ const roundingMode = coerceRoundingMode(options, 4);
2673
+ const smallestUnit = coerceSmallestUnit(options);
2674
+ return [roundingMode, ...resolveSmallestUnitAndSubsecDigits(validateUnitRange(smallestUnitStr, smallestUnit, 0, maxSmallestUnit), subsecDigits)];
2672
2675
  }
2673
2676
  function refineDateDisplayOptions(options) {
2674
2677
  return coerceCalendarDisplay(normalizeOptions(options));
@@ -2843,15 +2846,17 @@ function resolveTimeZoneRecord(rawId) {
2843
2846
  kind: "fixed",
2844
2847
  ...offsetRecord
2845
2848
  };
2846
- return queryNamedTimeZoneRecord("UTC" === upperRawId ? "UTC" : ((rawId) => (badCharactersRegExp.test(rawId) && throwRangeError(invalidTimeZone(rawId)), icuRegExp.test(rawId) && throwRangeError("Forbidden ICU TimeZone"), rawId.toLowerCase().split("/").map((part, partI) => (part.length <= 3 || /\d/.test(part)) && !/etc|yap/.test(part) ? part.toUpperCase() : part.replace(/baja|dumont|[a-z]+/g, (a, i) => a.length <= 2 && !partI || "in" === a || "chat" === a ? a.toUpperCase() : a.length > 2 || !i ? capitalize(a).replace(/island|noronha|murdo|rivadavia|urville/, capitalize) : a)).join("/")))(rawId));
2849
+ const normId = "UTC" === upperRawId ? "UTC" : ((rawId) => (badCharactersRegExp.test(rawId) && throwRangeError(invalidTimeZone(rawId)), icuRegExp.test(rawId) && throwRangeError("Forbidden ICU TimeZone"), rawId.toLowerCase().split("/").map((part, partI) => (part.length <= 3 || /\d/.test(part)) && !/etc|yap/.test(part) ? part.toUpperCase() : part.replace(/baja|dumont|[a-z]+/g, (a, i) => a.length <= 2 && !partI || "in" === a || "chat" === a ? a.toUpperCase() : a.length > 2 || !i ? capitalize(a).replace(/island|noronha|murdo|rivadavia|urville/, capitalize) : a)).join("/")))(rawId);
2850
+ return queryNamedTimeZoneRecord(normId);
2847
2851
  }
2848
- const queryNamedTimeZoneRecord = /* @__PURE__ */ memoize((normId) => {
2852
+ const queryNamedTimeZoneRecord = /*@__PURE__*/ memoize((normId) => {
2849
2853
  if ("UTC" === normId) return {
2850
2854
  kind: "utc",
2851
2855
  id: normId,
2852
2856
  o: normId
2853
2857
  };
2854
- const format = queryTimeZoneIntlFormat(normId.toUpperCase());
2858
+ const upperNormId = normId.toUpperCase();
2859
+ const format = queryTimeZoneIntlFormat(upperNormId);
2855
2860
  return {
2856
2861
  kind: "named",
2857
2862
  id: normId,
@@ -2859,7 +2864,7 @@ const queryNamedTimeZoneRecord = /* @__PURE__ */ memoize((normId) => {
2859
2864
  o: format.resolvedOptions().timeZone
2860
2865
  };
2861
2866
  });
2862
- const queryTimeZoneIntlFormat = /* @__PURE__ */ memoize((upperNormId) => new RawDateTimeFormat("en-u-hc-h23", {
2867
+ const queryTimeZoneIntlFormat = /*@__PURE__*/ memoize((upperNormId) => new RawDateTimeFormat("en-u-hc-h23", {
2863
2868
  calendar: "iso8601",
2864
2869
  timeZone: upperNormId,
2865
2870
  era: "short",
@@ -2874,7 +2879,7 @@ function queryTimeZone(rawTimeZoneId) {
2874
2879
  const record = resolveTimeZoneRecord(rawTimeZoneId);
2875
2880
  return queryTimeZoneRecord(record.id, record);
2876
2881
  }
2877
- const queryTimeZoneRecord = /* @__PURE__ */ memoize((normTimeZoneId, record) => "named" === record.kind ? new IntlTimeZone(normTimeZoneId, record.o, record.format) : new FixedTimeZone(normTimeZoneId, record.o, "fixed" === record.kind ? record._ : 0));
2882
+ const queryTimeZoneRecord = /*@__PURE__*/ memoize((normTimeZoneId, record) => "named" === record.kind ? new IntlTimeZone(normTimeZoneId, record.o, record.format) : new FixedTimeZone(normTimeZoneId, record.o, "fixed" === record.kind ? record._ : 0));
2878
2883
  var FixedTimeZone = class {
2879
2884
  constructor(id, compareKey, offsetNano) {
2880
2885
  this.id = id, this.o = compareKey, this._ = offsetNano;
@@ -2956,7 +2961,8 @@ var IntlTimeZone = class {
2956
2961
  return void 0 !== intlParts.era && "bce" === normalizeEraName(intlParts.era) ? 1 - year : year;
2957
2962
  })(intlParts), parseInt(intlParts.month), parseInt(intlParts.day)) + 3600 * parseInt(intlParts.hour) + 60 * parseInt(intlParts.minute) + parseInt(intlParts.second) - epochSec;
2958
2963
  })(format), ((timeZoneId) => {
2959
- return timeZonePeriodDaysByName[timeZoneId.split("/").pop()] || 60;
2964
+ const timeZoneName = timeZoneId.split("/").pop();
2965
+ return timeZonePeriodDaysByName[timeZoneName] || 60;
2960
2966
  })(id));
2961
2967
  }
2962
2968
  C(epochNano) {
@@ -3180,12 +3186,12 @@ function offsetRegExpStr(separatorIndex) {
3180
3186
  return "([+-])" + timeRegExpStr(separatorIndex);
3181
3187
  }
3182
3188
  const dateTimeRegExpStr = "(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]" + timeRegExpStr(8) + "(Z|" + offsetRegExpStr(15) + ")?)?";
3183
- const yearMonthRegExp = /* @__PURE__ */ createRegExp("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})");
3184
- const monthDayRegExp = /* @__PURE__ */ createRegExp("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})");
3185
- const dateTimeRegExp = /* @__PURE__ */ createRegExp(dateTimeRegExpStr + "((?:\\[(!?)([^\\]]*)\\]){0,9})");
3186
- const timeRegExp = /* @__PURE__ */ createRegExp("T?" + timeRegExpStr(2) + `(${offsetRegExpStr(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`);
3187
- const annotationRegExp = /* @__PURE__ */ new RegExp("\\[(!?)([^\\]]*)\\]", "g");
3188
- const durationRegExp = /* @__PURE__ */ createRegExp("([+-])?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)(?:[.,](\\d{1,9}))?H)?(?:(\\d+)(?:[.,](\\d{1,9}))?M)?(?:(\\d+)(?:[.,](\\d{1,9}))?S)?)?");
3189
+ const yearMonthRegExp = /*@__PURE__*/ createRegExp("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})");
3190
+ const monthDayRegExp = /*@__PURE__*/ createRegExp("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})");
3191
+ const dateTimeRegExp = /*@__PURE__*/ createRegExp(dateTimeRegExpStr + "((?:\\[(!?)([^\\]]*)\\]){0,9})");
3192
+ const timeRegExp = /*@__PURE__*/ createRegExp("T?" + timeRegExpStr(2) + `(${offsetRegExpStr(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`);
3193
+ const annotationRegExp = /*@__PURE__*/ new RegExp("\\[(!?)([^\\]]*)\\]", "g");
3194
+ const durationRegExp = /*@__PURE__*/ createRegExp("([+-])?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)(?:[.,](\\d{1,9}))?H)?(?:(\\d+)(?:[.,](\\d{1,9}))?M)?(?:(\\d+)(?:[.,](\\d{1,9}))?S)?)?");
3189
3195
  function parseDateTimeLike(s) {
3190
3196
  const parts = dateTimeRegExp.exec(s);
3191
3197
  return parts ? ((parts) => {
@@ -3463,8 +3469,8 @@ const timeDefaultShapeFields = {
3463
3469
  minute: "numeric",
3464
3470
  second: "numeric"
3465
3471
  };
3466
- const dateTimeDefaultShapeFields = /* @__PURE__ */ Object.assign({}, dateDefaultShapeFields, timeDefaultShapeFields);
3467
- const zonedDateTimeDefaultShapeFields = /* @__PURE__ */ Object.assign({}, dateTimeDefaultShapeFields, { timeZoneName: "short" });
3472
+ const dateTimeDefaultShapeFields = /*@__PURE__*/ Object.assign({}, dateDefaultShapeFields, timeDefaultShapeFields);
3473
+ const zonedDateTimeDefaultShapeFields = /*@__PURE__*/ Object.assign({}, dateTimeDefaultShapeFields, { timeZoneName: "short" });
3468
3474
  const yearMonthDefaultShapeFields = {
3469
3475
  year: "numeric",
3470
3476
  month: "numeric"
@@ -3488,15 +3494,15 @@ const timeShapeFieldNames = [
3488
3494
  "fractionalSecondDigits",
3489
3495
  "timeStyle"
3490
3496
  ];
3491
- const dateTimeShapeFieldNames = /* @__PURE__ */ dateShapeFieldNames.concat(timeShapeFieldNames);
3492
- const yearMonthIgnoredFieldNames = /* @__PURE__ */ ["weekday", "day"].concat(timeShapeFieldNames);
3493
- const monthDayIgnoredFieldNames = /* @__PURE__ */ ["weekday", "year"].concat(timeShapeFieldNames);
3494
- const transformInstantOptions = /* @__PURE__ */ createOptionsTransformer(dateTimeShapeFieldNames, [], [], dateTimeDefaultShapeFields);
3495
- const transformZonedOptions = /* @__PURE__ */ createOptionsTransformer(dateTimeShapeFieldNames, [], [], zonedDateTimeDefaultShapeFields);
3496
- const transformDateTimeOptions = /* @__PURE__ */ createOptionsTransformer(dateTimeShapeFieldNames, [], ["timeZoneName"], dateTimeDefaultShapeFields);
3497
- const transformDateOptions = /* @__PURE__ */ createOptionsTransformer(dateShapeFieldNames, timeShapeFieldNames, ["timeZoneName"], dateDefaultShapeFields);
3498
- const transformTimeOptions = /* @__PURE__ */ createOptionsTransformer(timeShapeFieldNames, dateShapeFieldNames, ["timeZoneName", "era"], timeDefaultShapeFields);
3499
- const transformYearMonthOptions = /* @__PURE__ */ createOptionsTransformer([
3497
+ const dateTimeShapeFieldNames = /*@__PURE__*/ dateShapeFieldNames.concat(timeShapeFieldNames);
3498
+ const yearMonthIgnoredFieldNames = /*@__PURE__*/ ["weekday", "day"].concat(timeShapeFieldNames);
3499
+ const monthDayIgnoredFieldNames = /*@__PURE__*/ ["weekday", "year"].concat(timeShapeFieldNames);
3500
+ const transformInstantOptions = /*@__PURE__*/ createOptionsTransformer(dateTimeShapeFieldNames, [], [], dateTimeDefaultShapeFields);
3501
+ const transformZonedOptions = /*@__PURE__*/ createOptionsTransformer(dateTimeShapeFieldNames, [], [], zonedDateTimeDefaultShapeFields);
3502
+ const transformDateTimeOptions = /*@__PURE__*/ createOptionsTransformer(dateTimeShapeFieldNames, [], ["timeZoneName"], dateTimeDefaultShapeFields);
3503
+ const transformDateOptions = /*@__PURE__*/ createOptionsTransformer(dateShapeFieldNames, timeShapeFieldNames, ["timeZoneName"], dateDefaultShapeFields);
3504
+ const transformTimeOptions = /*@__PURE__*/ createOptionsTransformer(timeShapeFieldNames, dateShapeFieldNames, ["timeZoneName", "era"], timeDefaultShapeFields);
3505
+ const transformYearMonthOptions = /*@__PURE__*/ createOptionsTransformer([
3500
3506
  "year",
3501
3507
  "month",
3502
3508
  "dateStyle"
@@ -3518,7 +3524,7 @@ const transformYearMonthOptions = /* @__PURE__ */ createOptionsTransformer([
3518
3524
  month: "numeric"
3519
3525
  }
3520
3526
  });
3521
- const transformMonthDayOptions = /* @__PURE__ */ createOptionsTransformer([
3527
+ const transformMonthDayOptions = /*@__PURE__*/ createOptionsTransformer([
3522
3528
  "month",
3523
3529
  "day",
3524
3530
  "dateStyle"
@@ -3692,8 +3698,8 @@ function resolveBasicCalendarId(rawCalendarId) {
3692
3698
  function resolveBasicCalendarArg(rawCalendarId = isoCalendarId) {
3693
3699
  return resolveBasicCalendarId(rawCalendarId);
3694
3700
  }
3695
- const zonedDateTimeSlotsMap = /* @__PURE__ */ new WeakMap();
3696
- const ZonedDateTime = /* @__PURE__ */ defineTemporalClass(ZonedDateTimeBranding, class {
3701
+ const zonedDateTimeSlotsMap = /*@__PURE__*/ new WeakMap();
3702
+ const ZonedDateTime = /*@__PURE__*/ defineTemporalClass(ZonedDateTimeBranding, class {
3697
3703
  constructor(epochNanoseconds, timeZoneId, calendar = void 0) {
3698
3704
  const epochNano = checkEpochNanoInBounds(toBigInt(epochNanoseconds));
3699
3705
  const timeZone = queryTimeZone(refineTimeZoneId(timeZoneId));
@@ -3841,8 +3847,8 @@ function refineTimeZoneArg(arg) {
3841
3847
  }
3842
3848
  return ((arg) => resolveTimeZoneId(parseTimeZoneId(requireString(arg))))(arg);
3843
3849
  }
3844
- const instantSlotsMap = /* @__PURE__ */ new WeakMap();
3845
- const Instant = /* @__PURE__ */ defineTemporalClass(InstantBranding, class {
3850
+ const instantSlotsMap = /*@__PURE__*/ new WeakMap();
3851
+ const Instant = /*@__PURE__*/ defineTemporalClass(InstantBranding, class {
3846
3852
  constructor(epochNanoseconds) {
3847
3853
  const epochNano = checkEpochNanoInBounds(toBigInt(epochNanoseconds));
3848
3854
  initInstant(this, createEpochNanoSlots(epochNano));
@@ -3927,8 +3933,8 @@ const { toTemporalInstant: toTemporalInstant$1 } = { toTemporalInstant() {
3927
3933
  function initInstant(instance, slots) {
3928
3934
  return instantSlotsMap.set(instance, slots), attachDebugString(instance), instance;
3929
3935
  }
3930
- const plainMonthDaySlotsMap = /* @__PURE__ */ new WeakMap();
3931
- const PlainMonthDay = /* @__PURE__ */ defineTemporalClass(PlainMonthDayBranding, class {
3936
+ const plainMonthDaySlotsMap = /*@__PURE__*/ new WeakMap();
3937
+ const PlainMonthDay = /*@__PURE__*/ defineTemporalClass(PlainMonthDayBranding, class {
3932
3938
  constructor(isoMonth, isoDay, calendar = void 0, referenceIsoYear) {
3933
3939
  const isoMonthInt = toIntegerWithTrunc(isoMonth);
3934
3940
  const isoDayInt = toIntegerWithTrunc(isoDay);
@@ -3992,8 +3998,8 @@ function toPlainMonthDaySlots(arg, options) {
3992
3998
  function initPlainMonthDay(instance, slots) {
3993
3999
  return plainMonthDaySlotsMap.set(instance, slots), attachDebugString(instance), instance;
3994
4000
  }
3995
- const plainYearMonthSlotsMap = /* @__PURE__ */ new WeakMap();
3996
- const PlainYearMonth = /* @__PURE__ */ defineTemporalClass(PlainYearMonthBranding, class {
4001
+ const plainYearMonthSlotsMap = /*@__PURE__*/ new WeakMap();
4002
+ const PlainYearMonth = /*@__PURE__*/ defineTemporalClass(PlainYearMonthBranding, class {
3997
4003
  constructor(isoYear, isoMonth, calendar = void 0, referenceIsoDay) {
3998
4004
  const isoYearInt = toIntegerWithTrunc(isoYear);
3999
4005
  const isoMonthInt = toIntegerWithTrunc(isoMonth);
@@ -4085,8 +4091,8 @@ function getTemporalBrandingAndSlots(obj) {
4085
4091
  function validateBag(bag) {
4086
4092
  return (getTemporalBrandingAndSlots(bag) || void 0 !== bag.calendar || void 0 !== bag.timeZone) && throwTypeError("Invalid bag"), bag;
4087
4093
  }
4088
- const plainTimeSlotsMap = /* @__PURE__ */ new WeakMap();
4089
- const PlainTime = /* @__PURE__ */ defineTemporalClass(PlainTimeBranding, class {
4094
+ const plainTimeSlotsMap = /*@__PURE__*/ new WeakMap();
4095
+ const PlainTime = /*@__PURE__*/ defineTemporalClass(PlainTimeBranding, class {
4090
4096
  constructor(hour = 0, minute = 0, second = 0, millisecond = 0, microsecond = 0, nanosecond = 0) {
4091
4097
  const fields = validateTimeFields(mapProps(toIntegerWithTrunc, {
4092
4098
  hour,
@@ -4168,8 +4174,8 @@ function optionalToPlainTimeFields(timeArg) {
4168
4174
  function initPlainTime(instance, slots) {
4169
4175
  return plainTimeSlotsMap.set(instance, slots), attachDebugString(instance), instance;
4170
4176
  }
4171
- const plainDateTimeSlotsMap = /* @__PURE__ */ new WeakMap();
4172
- const PlainDateTime = /* @__PURE__ */ defineTemporalClass(PlainDateTimeBranding, class {
4177
+ const plainDateTimeSlotsMap = /*@__PURE__*/ new WeakMap();
4178
+ const PlainDateTime = /*@__PURE__*/ defineTemporalClass(PlainDateTimeBranding, class {
4173
4179
  constructor(isoYear, isoMonth, isoDay, hour = 0, minute = 0, second = 0, millisecond = 0, microsecond = 0, nanosecond = 0, calendar = void 0) {
4174
4180
  const fields = checkIsoDateTimeInBounds(validateIsoDateTimeFields(mapProps(toIntegerWithTrunc, {
4175
4181
  year: isoYear,
@@ -4280,8 +4286,8 @@ function toPlainDateTimeSlots(arg, options) {
4280
4286
  function initPlainDateTime(instance, slots) {
4281
4287
  return plainDateTimeSlotsMap.set(instance, slots), attachDebugString(instance), instance;
4282
4288
  }
4283
- const plainDateSlotsMap = /* @__PURE__ */ new WeakMap();
4284
- const PlainDate = /* @__PURE__ */ defineTemporalClass(PlainDateBranding, class {
4289
+ const plainDateSlotsMap = /*@__PURE__*/ new WeakMap();
4290
+ const PlainDate = /*@__PURE__*/ defineTemporalClass(PlainDateBranding, class {
4285
4291
  constructor(isoYear, isoMonth, isoDay, calendar = void 0) {
4286
4292
  const fields = checkIsoDateInBounds(validateIsoDateFields(mapProps(toIntegerWithTrunc, {
4287
4293
  year: isoYear,
@@ -4399,8 +4405,8 @@ function refineCalendarArg(arg) {
4399
4405
  }
4400
4406
  return ((arg) => resolveBasicCalendarId(parseCalendarId(requireString(arg))))(arg);
4401
4407
  }
4402
- const durationSlotsMap = /* @__PURE__ */ new WeakMap();
4403
- const Duration = /* @__PURE__ */ defineTemporalClass(DurationBranding, class {
4408
+ const durationSlotsMap = /*@__PURE__*/ new WeakMap();
4409
+ const Duration = /*@__PURE__*/ defineTemporalClass(DurationBranding, class {
4404
4410
  constructor(years = 0, months = 0, weeks = 0, days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0, microseconds = 0, nanoseconds = 0) {
4405
4411
  const fields = validateDurationFields(mapProps(toStrictInteger, {
4406
4412
  years,
@@ -4493,7 +4499,7 @@ function refinePublicRelativeTo(relativeTo) {
4493
4499
  function initDuration(instance, slots) {
4494
4500
  return durationSlotsMap.set(instance, slots), attachDebugString(instance), instance;
4495
4501
  }
4496
- const Now = /* @__PURE__ */ Object.defineProperties({}, {
4502
+ const Now = /*@__PURE__*/ Object.defineProperties({}, {
4497
4503
  ...createStringTagDescriptors("Temporal.Now"),
4498
4504
  ...createPropDescriptors({
4499
4505
  timeZoneId() {
@@ -4517,7 +4523,7 @@ const Now = /* @__PURE__ */ Object.defineProperties({}, {
4517
4523
  }
4518
4524
  })
4519
4525
  });
4520
- const Temporal$2 = /* @__PURE__ */ Object.defineProperties({}, {
4526
+ const Temporal$2 = /*@__PURE__*/ Object.defineProperties({}, {
4521
4527
  ...createStringTagDescriptors("Temporal"),
4522
4528
  ...createPropDescriptors({
4523
4529
  PlainYearMonth,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/testing",
3
- "version": "2.4.0-dev.1666+690d9b28",
3
+ "version": "2.4.0-dev.1727+1eadcb04",
4
4
  "description": "Testing utilities for Fedify applications",
5
5
  "keywords": [
6
6
  "fedify",
@@ -47,13 +47,13 @@
47
47
  "package.json"
48
48
  ],
49
49
  "peerDependencies": {
50
- "@fedify/fedify": "^2.4.0-dev.1666+690d9b28"
50
+ "@fedify/fedify": "^2.4.0-dev.1727+1eadcb04"
51
51
  },
52
52
  "dependencies": {
53
53
  "es-toolkit": "1.46.1",
54
54
  "temporal-polyfill": "^1.0.1",
55
- "@fedify/vocab": "2.4.0-dev.1666+690d9b28",
56
- "@fedify/vocab-runtime": "^2.4.0-dev.1666+690d9b28"
55
+ "@fedify/vocab": "2.4.0-dev.1727+1eadcb04",
56
+ "@fedify/vocab-runtime": "^2.4.0-dev.1727+1eadcb04"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@standard-schema/spec": "^1.1.0",