@fedify/relay 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.
@@ -1,7 +1,7 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as exportSpki, r as getDocumentLoader, t as isRelayFollowerData } from "./types-KBeGMT3L.js";
4
+ import { n as exportSpki, r as getDocumentLoader, t as isRelayFollowerData } from "./types-Dv3wCN49.js";
5
5
  import { MemoryKvStore, signRequest } from "@fedify/fedify";
6
6
  import { createRelay } from "@fedify/relay";
7
7
  import { Accept, Announce, Create, Delete, Follow, Move, Note, Person, Undo, Update } from "@fedify/vocab";
@@ -1,7 +1,7 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as exportSpki, r as getDocumentLoader, t as isRelayFollowerData } from "./types-KBeGMT3L.js";
4
+ import { n as exportSpki, r as getDocumentLoader, t as isRelayFollowerData } from "./types-Dv3wCN49.js";
5
5
  import { MemoryKvStore, signRequest } from "@fedify/fedify";
6
6
  import { createRelay } from "@fedify/relay";
7
7
  import { Create, Delete, Follow, Move, Note, Person, Undo, Update } from "@fedify/vocab";
package/dist/mod.cjs CHANGED
@@ -245,7 +245,7 @@ function parseInt0(s) {
245
245
  function padNumber(digits, num) {
246
246
  return String(num).padStart(digits, "0");
247
247
  }
248
- const padNumber2 = /* @__PURE__ */ bindArgs(padNumber, 2);
248
+ const padNumber2 = /*@__PURE__*/ bindArgs(padNumber, 2);
249
249
  function compareNumbers(a, b) {
250
250
  return Math.sign(a - b);
251
251
  }
@@ -313,7 +313,7 @@ const unitNameMap = {
313
313
  month: 8,
314
314
  year: 9
315
315
  };
316
- const unitNamesAsc = /* @__PURE__ */ Object.keys(unitNameMap);
316
+ const unitNamesAsc = /*@__PURE__*/ Object.keys(unitNameMap);
317
317
  const nanoInMicro = nanoInMicro$1;
318
318
  const nanoInMilli = nanoInMilli$1;
319
319
  const nanoInSec = nanoInSec$1;
@@ -329,19 +329,19 @@ const unitNanoMap = [
329
329
  nanoInHour,
330
330
  nanoInUtcDay
331
331
  ];
332
- const bigNanoInMicro = /* @__PURE__ */ BigInt(nanoInMicro);
333
- const bigNanoInMilli = /* @__PURE__ */ BigInt(nanoInMilli);
334
- const bigNanoInSec = /* @__PURE__ */ BigInt(nanoInSec);
335
- const bigNanoInMinute = /* @__PURE__ */ BigInt(nanoInMinute);
336
- const bigNanoInHour = /* @__PURE__ */ BigInt(nanoInHour);
337
- const bigNanoInUtcDay = /* @__PURE__ */ BigInt(nanoInUtcDay);
332
+ const bigNanoInMicro = /*@__PURE__*/ BigInt(nanoInMicro);
333
+ const bigNanoInMilli = /*@__PURE__*/ BigInt(nanoInMilli);
334
+ const bigNanoInSec = /*@__PURE__*/ BigInt(nanoInSec);
335
+ const bigNanoInMinute = /*@__PURE__*/ BigInt(nanoInMinute);
336
+ const bigNanoInHour = /*@__PURE__*/ BigInt(nanoInHour);
337
+ const bigNanoInUtcDay = /*@__PURE__*/ BigInt(nanoInUtcDay);
338
338
  function divideBigNanoToExactNumber(bigNano, divisorNano) {
339
339
  const days = Number(bigNano / bigNanoInUtcDay);
340
340
  const timeNano = Number(bigNano % bigNanoInUtcDay);
341
341
  return days * (nanoInUtcDay / divisorNano) + (Math.trunc(timeNano / divisorNano) + timeNano % divisorNano / divisorNano);
342
342
  }
343
- const timeFieldNamesAsc = /* @__PURE__ */ unitNamesAsc.slice(0, 6);
344
- const timeGetters = /* @__PURE__ */ createPropGetters(timeFieldNamesAsc);
343
+ const timeFieldNamesAsc = /*@__PURE__*/ unitNamesAsc.slice(0, 6);
344
+ const timeGetters = /*@__PURE__*/ createPropGetters(timeFieldNamesAsc);
345
345
  const yearFieldNamesAsc = ["year"];
346
346
  const dayFieldNamesAsc = ["day"];
347
347
  const calendarDateFieldNamesAsc = [
@@ -363,24 +363,24 @@ const monthDayFieldNames = [
363
363
  "month",
364
364
  "monthCode"
365
365
  ];
366
- const timeFieldNamesAlpha = /* @__PURE__ */ sortStrings(timeFieldNamesAsc);
367
- const yearFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(eraYearFieldNames, yearFieldNamesAsc);
368
- const yearMonthFieldNamesAlpha = /* @__PURE__ */ sortStrings(monthFieldNames, yearFieldNamesAsc);
369
- const yearMonthFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(eraYearFieldNames, yearMonthFieldNamesAlpha);
370
- const yearMonthCodeFieldNamesAlpha = /* @__PURE__ */ sortStrings(["monthCode"], yearFieldNamesAsc);
371
- const yearMonthCodeFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(eraYearFieldNames, yearMonthCodeFieldNamesAlpha);
372
- const monthCodeDayFieldNamesAlpha = /* @__PURE__ */ sortStrings(dayFieldNamesAsc, ["monthCode"]);
373
- const dateFieldNamesAlpha = /* @__PURE__ */ sortStrings(dayFieldNamesAsc, yearMonthFieldNamesAlpha);
374
- const dateFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(dayFieldNamesAsc, eraYearFieldNames, yearMonthFieldNamesAlpha);
375
- const dateTimeFieldNamesAlpha = /* @__PURE__ */ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc);
376
- const dateTimeFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc);
377
- const dateTimeAndOffsetFieldNamesAlpha = /* @__PURE__ */ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc, offsetFieldNames);
378
- const dateTimeAndOffsetFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc, offsetFieldNames);
379
- const dateTimeAndZoneFieldNamesAlpha = /* @__PURE__ */ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc, offsetFieldNames, timeZoneFieldNames);
380
- const dateTimeAndZoneFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc, offsetFieldNames, timeZoneFieldNames);
381
- const yearMonthCodeDayFieldNamesAlpha = /* @__PURE__ */ sortStrings(dayFieldNamesAsc, yearMonthCodeFieldNamesAlpha);
382
- const yearMonthCodeDayFieldNamesWithEraAlpha = /* @__PURE__ */ sortStrings(dayFieldNamesAsc, eraYearFieldNames, yearMonthCodeFieldNamesAlpha);
383
- const timeFieldDefaults = /* @__PURE__ */ zipPropsConst(timeFieldNamesAsc, 0);
366
+ const timeFieldNamesAlpha = /*@__PURE__*/ sortStrings(timeFieldNamesAsc);
367
+ const yearFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(eraYearFieldNames, yearFieldNamesAsc);
368
+ const yearMonthFieldNamesAlpha = /*@__PURE__*/ sortStrings(monthFieldNames, yearFieldNamesAsc);
369
+ const yearMonthFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(eraYearFieldNames, yearMonthFieldNamesAlpha);
370
+ const yearMonthCodeFieldNamesAlpha = /*@__PURE__*/ sortStrings(["monthCode"], yearFieldNamesAsc);
371
+ const yearMonthCodeFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(eraYearFieldNames, yearMonthCodeFieldNamesAlpha);
372
+ const monthCodeDayFieldNamesAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, ["monthCode"]);
373
+ const dateFieldNamesAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, yearMonthFieldNamesAlpha);
374
+ const dateFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, eraYearFieldNames, yearMonthFieldNamesAlpha);
375
+ const dateTimeFieldNamesAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc);
376
+ const dateTimeFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc);
377
+ const dateTimeAndOffsetFieldNamesAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc, offsetFieldNames);
378
+ const dateTimeAndOffsetFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc, offsetFieldNames);
379
+ const dateTimeAndZoneFieldNamesAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc, offsetFieldNames, timeZoneFieldNames);
380
+ const dateTimeAndZoneFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc, offsetFieldNames, timeZoneFieldNames);
381
+ const yearMonthCodeDayFieldNamesAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, yearMonthCodeFieldNamesAlpha);
382
+ const yearMonthCodeDayFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, eraYearFieldNames, yearMonthCodeFieldNamesAlpha);
383
+ const timeFieldDefaults = /*@__PURE__*/ zipPropsConst(timeFieldNamesAsc, 0);
384
384
  function validateTimeFields(timeFields) {
385
385
  return constrainTimeFields(timeFields, 1), timeFields;
386
386
  }
@@ -609,20 +609,20 @@ function computeCalendarWeekOfYear(calendar, isoDate) {
609
609
  function computeCalendarYearOfWeek(calendar, isoDate) {
610
610
  return calendar === void 0 ? computeIsoWeekFields(isoDate).yearOfWeek : void 0;
611
611
  }
612
- const durationFieldNamesAsc = /* @__PURE__ */ unitNamesAsc.map((unitName) => unitName + "s");
613
- const durationGetters = /* @__PURE__ */ createPropGetters(durationFieldNamesAsc);
614
- const durationFieldNamesAlpha = /* @__PURE__ */ sortStrings(durationFieldNamesAsc);
615
- const durationTimeFieldNamesAsc = /* @__PURE__ */ durationFieldNamesAsc.slice(0, 6);
616
- const durationDateFieldNamesAsc = /* @__PURE__ */ durationFieldNamesAsc.slice(6);
617
- const durationCalendarFieldNamesAsc = /* @__PURE__ */ durationDateFieldNamesAsc.slice(1);
618
- const durationFieldIndexes = /* @__PURE__ */ durationFieldNamesAsc.reduce((indexes, fieldName, i) => (indexes[fieldName] = i, indexes), {});
619
- const durationFieldDefaults = /* @__PURE__ */ zipPropsConst(durationFieldNamesAsc, 0);
620
- const durationTimeFieldDefaults = /* @__PURE__ */ zipPropsConst(durationTimeFieldNamesAsc, 0);
621
- const clearDurationFields = /* @__PURE__ */ bindArgs(zeroOutProps, durationFieldNamesAsc);
612
+ const durationFieldNamesAsc = /*@__PURE__*/ unitNamesAsc.map((unitName) => unitName + "s");
613
+ const durationGetters = /*@__PURE__*/ createPropGetters(durationFieldNamesAsc);
614
+ const durationFieldNamesAlpha = /*@__PURE__*/ sortStrings(durationFieldNamesAsc);
615
+ const durationTimeFieldNamesAsc = /*@__PURE__*/ durationFieldNamesAsc.slice(0, 6);
616
+ const durationDateFieldNamesAsc = /*@__PURE__*/ durationFieldNamesAsc.slice(6);
617
+ const durationCalendarFieldNamesAsc = /*@__PURE__*/ durationDateFieldNamesAsc.slice(1);
618
+ const durationFieldIndexes = /*@__PURE__*/ durationFieldNamesAsc.reduce((indexes, fieldName, i) => (indexes[fieldName] = i, indexes), {});
619
+ const durationFieldDefaults = /*@__PURE__*/ zipPropsConst(durationFieldNamesAsc, 0);
620
+ const durationTimeFieldDefaults = /*@__PURE__*/ zipPropsConst(durationTimeFieldNamesAsc, 0);
621
+ const clearDurationFields = /*@__PURE__*/ bindArgs(zeroOutProps, durationFieldNamesAsc);
622
622
  function requirePropDefined(optionName, optionVal) {
623
623
  return optionVal ?? throwRangeError(missingField(optionName)), optionVal;
624
624
  }
625
- const requireString = /* @__PURE__ */ bindArgs(requireType, "string");
625
+ const requireString = /*@__PURE__*/ bindArgs(requireType, "string");
626
626
  function requireType(typeName, arg, entityName = typeName) {
627
627
  return typeof arg !== typeName && throwTypeError(invalidEntity(entityName, arg)), arg;
628
628
  }
@@ -734,17 +734,17 @@ function coerceChoiceOption(optionName, enumNameMap, options, defaultChoice = 0)
734
734
  const enumNum = enumNameMap[enumStr];
735
735
  return void 0 === enumNum && throwRangeError(invalidChoice(optionName, enumStr, enumNameMap)), enumNum;
736
736
  }
737
- const coerceSmallestUnit = /* @__PURE__ */ bindArgs(coerceUnitOption, smallestUnitStr);
738
- const coerceLargestUnit = /* @__PURE__ */ bindArgs(coerceUnitOption, "largestUnit");
739
- const coerceTotalUnit = /* @__PURE__ */ bindArgs(coerceUnitOption, "unit");
740
- const coerceOverflow = /* @__PURE__ */ bindArgs(coerceChoiceOption, "overflow", overflowMap);
741
- const coerceEpochDisambig = /* @__PURE__ */ bindArgs(coerceChoiceOption, "disambiguation", epochDisambigMap);
742
- const coerceOffsetDisambig = /* @__PURE__ */ bindArgs(coerceChoiceOption, "offset", offsetDisambigMap);
743
- const coerceCalendarDisplay = /* @__PURE__ */ bindArgs(coerceChoiceOption, "calendarName", calendarDisplayMap);
744
- const coerceTimeZoneDisplay = /* @__PURE__ */ bindArgs(coerceChoiceOption, "timeZoneName", timeZoneDisplayMap);
745
- const coerceOffsetDisplay = /* @__PURE__ */ bindArgs(coerceChoiceOption, "offset", offsetDisplayMap);
746
- const coerceRoundingMode = /* @__PURE__ */ bindArgs(coerceChoiceOption, "roundingMode", roundingModeMap);
747
- const coerceDirection = /* @__PURE__ */ bindArgs(coerceChoiceOption, "direction", directionMap);
737
+ const coerceSmallestUnit = /*@__PURE__*/ bindArgs(coerceUnitOption, smallestUnitStr);
738
+ const coerceLargestUnit = /*@__PURE__*/ bindArgs(coerceUnitOption, "largestUnit");
739
+ const coerceTotalUnit = /*@__PURE__*/ bindArgs(coerceUnitOption, "unit");
740
+ const coerceOverflow = /*@__PURE__*/ bindArgs(coerceChoiceOption, "overflow", overflowMap);
741
+ const coerceEpochDisambig = /*@__PURE__*/ bindArgs(coerceChoiceOption, "disambiguation", epochDisambigMap);
742
+ const coerceOffsetDisambig = /*@__PURE__*/ bindArgs(coerceChoiceOption, "offset", offsetDisambigMap);
743
+ const coerceCalendarDisplay = /*@__PURE__*/ bindArgs(coerceChoiceOption, "calendarName", calendarDisplayMap);
744
+ const coerceTimeZoneDisplay = /*@__PURE__*/ bindArgs(coerceChoiceOption, "timeZoneName", timeZoneDisplayMap);
745
+ const coerceOffsetDisplay = /*@__PURE__*/ bindArgs(coerceChoiceOption, "offset", offsetDisplayMap);
746
+ const coerceRoundingMode = /*@__PURE__*/ bindArgs(coerceChoiceOption, "roundingMode", roundingModeMap);
747
+ const coerceDirection = /*@__PURE__*/ bindArgs(coerceChoiceOption, "direction", directionMap);
748
748
  function validateRoundingInc(roundingInc, smallestUnit, allowManyLargeUnits, solarMode) {
749
749
  const upUnitNano = solarMode ? nanoInUtcDay : unitNanoMap[smallestUnit + 1];
750
750
  if (upUnitNano) {
@@ -798,8 +798,8 @@ function refineZonedFieldOptions(options, defaultOffsetDisambig = 0) {
798
798
  epochDisambig
799
799
  ];
800
800
  }
801
- const epochNanoMax = /* @__PURE__ */ BigInt(1e8) * bigNanoInUtcDay;
802
- const epochNanoMin = /* @__PURE__ */ BigInt(-1e8) * bigNanoInUtcDay;
801
+ const epochNanoMax = /*@__PURE__*/ BigInt(1e8) * bigNanoInUtcDay;
802
+ const epochNanoMin = /*@__PURE__*/ BigInt(-1e8) * bigNanoInUtcDay;
803
803
  const plainDateEpochNanoMin = epochNanoMin - bigNanoInUtcDay;
804
804
  const isoYearMonthIndexMin = -3261848;
805
805
  function checkIsoYearMonthInBounds(isoDate) {
@@ -1070,11 +1070,12 @@ function nudgeRelativeDuration(sign, durationFields, endEpochNano, _largestUnit,
1070
1070
  }
1071
1071
  function getTimeZoneTransitionEpochNanoseconds(slots, options) {
1072
1072
  return slots.timeZone.U(slots.epochNanoseconds, ((options) => {
1073
- const res = coerceDirection(normalizeOptionsOrString(options, "direction"), 0);
1073
+ const normalizedOptions = normalizeOptionsOrString(options, "direction");
1074
+ const res = coerceDirection(normalizedOptions, 0);
1074
1075
  return res || throwRangeError(invalidEntity("direction", res)), res;
1075
1076
  })(options));
1076
1077
  }
1077
- const zonedEpochSlotsToIso = /* @__PURE__ */ memoize(_zonedEpochSlotsToIso, WeakMap);
1078
+ const zonedEpochSlotsToIso = /*@__PURE__*/ memoize(_zonedEpochSlotsToIso, WeakMap);
1078
1079
  function _zonedEpochSlotsToIso(slots) {
1079
1080
  const { epochNanoseconds, timeZone } = slots;
1080
1081
  const offsetNanoseconds = timeZone.C(epochNanoseconds);
@@ -1640,7 +1641,7 @@ function resolveTimeFields(fields, overflow) {
1640
1641
  ...fields
1641
1642
  }), overflow);
1642
1643
  }
1643
- const offsetRegExp = /* @__PURE__ */ createRegExp("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");
1644
+ const offsetRegExp = /*@__PURE__*/ createRegExp("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");
1644
1645
  function parseOffsetNano(s) {
1645
1646
  const offsetNano = parseOffsetNanoMaybe(s);
1646
1647
  return void 0 === offsetNano && throwRangeError(failedParse(s)), offsetNano;
@@ -1675,13 +1676,13 @@ const dateFieldRefiners = {
1675
1676
  },
1676
1677
  day: toPositiveIntegerWithTruncation
1677
1678
  };
1678
- const timeFieldRefiners = /* @__PURE__ */ zipPropsConst(timeFieldNamesAsc, toIntegerWithTrunc);
1679
- const durationFieldRefiners = /* @__PURE__ */ zipPropsConst(durationFieldNamesAsc, toStrictInteger);
1679
+ const timeFieldRefiners = /*@__PURE__*/ zipPropsConst(timeFieldNamesAsc, toIntegerWithTrunc);
1680
+ const durationFieldRefiners = /*@__PURE__*/ zipPropsConst(durationFieldNamesAsc, toStrictInteger);
1680
1681
  const offsetFieldRefiners = { offset(offsetString) {
1681
1682
  return parseOffsetNano(toStringViaPrimitive(offsetString));
1682
1683
  } };
1683
- const dateTimeFieldRefiners = /* @__PURE__ */ Object.assign({}, dateFieldRefiners, timeFieldRefiners);
1684
- const zonedDateTimeFieldRefiners = /* @__PURE__ */ Object.assign({}, dateTimeFieldRefiners, offsetFieldRefiners);
1684
+ const dateTimeFieldRefiners = /*@__PURE__*/ Object.assign({}, dateFieldRefiners, timeFieldRefiners);
1685
+ const zonedDateTimeFieldRefiners = /*@__PURE__*/ Object.assign({}, dateTimeFieldRefiners, offsetFieldRefiners);
1685
1686
  function readAndRefineBagFields(bag, validFieldNames, fieldRefiners, requiredFieldNames, disallowEmpty = !requiredFieldNames) {
1686
1687
  const res = {};
1687
1688
  let anyMatching = 0;
@@ -1784,7 +1785,9 @@ const timeZonePeriodDaysByName = {
1784
1785
  const minPossibleTransitionSec = -388152e4;
1785
1786
  function refineTimeDisplayTuple(options, maxSmallestUnit = 4) {
1786
1787
  const subsecDigits = coerceFractionalSecondDigits(options);
1787
- return [coerceRoundingMode(options, 4), ...resolveSmallestUnitAndSubsecDigits(validateUnitRange(smallestUnitStr, coerceSmallestUnit(options), 0, maxSmallestUnit), subsecDigits)];
1788
+ const roundingMode = coerceRoundingMode(options, 4);
1789
+ const smallestUnit = coerceSmallestUnit(options);
1790
+ return [roundingMode, ...resolveSmallestUnitAndSubsecDigits(validateUnitRange(smallestUnitStr, smallestUnit, 0, maxSmallestUnit), subsecDigits)];
1788
1791
  }
1789
1792
  function refineDateDisplayOptions(options) {
1790
1793
  return coerceCalendarDisplay(normalizeOptions(options));
@@ -1959,15 +1962,17 @@ function resolveTimeZoneRecord(rawId) {
1959
1962
  kind: "fixed",
1960
1963
  ...offsetRecord
1961
1964
  };
1962
- 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));
1965
+ 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);
1966
+ return queryNamedTimeZoneRecord(normId);
1963
1967
  }
1964
- const queryNamedTimeZoneRecord = /* @__PURE__ */ memoize((normId) => {
1968
+ const queryNamedTimeZoneRecord = /*@__PURE__*/ memoize((normId) => {
1965
1969
  if ("UTC" === normId) return {
1966
1970
  kind: "utc",
1967
1971
  id: normId,
1968
1972
  o: normId
1969
1973
  };
1970
- const format = queryTimeZoneIntlFormat(normId.toUpperCase());
1974
+ const upperNormId = normId.toUpperCase();
1975
+ const format = queryTimeZoneIntlFormat(upperNormId);
1971
1976
  return {
1972
1977
  kind: "named",
1973
1978
  id: normId,
@@ -1975,7 +1980,7 @@ const queryNamedTimeZoneRecord = /* @__PURE__ */ memoize((normId) => {
1975
1980
  o: format.resolvedOptions().timeZone
1976
1981
  };
1977
1982
  });
1978
- const queryTimeZoneIntlFormat = /* @__PURE__ */ memoize((upperNormId) => new RawDateTimeFormat("en-u-hc-h23", {
1983
+ const queryTimeZoneIntlFormat = /*@__PURE__*/ memoize((upperNormId) => new RawDateTimeFormat("en-u-hc-h23", {
1979
1984
  calendar: "iso8601",
1980
1985
  timeZone: upperNormId,
1981
1986
  era: "short",
@@ -1990,7 +1995,7 @@ function queryTimeZone(rawTimeZoneId) {
1990
1995
  const record = resolveTimeZoneRecord(rawTimeZoneId);
1991
1996
  return queryTimeZoneRecord(record.id, record);
1992
1997
  }
1993
- 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));
1998
+ 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));
1994
1999
  var FixedTimeZone = class {
1995
2000
  constructor(id, compareKey, offsetNano) {
1996
2001
  this.id = id, this.o = compareKey, this._ = offsetNano;
@@ -2072,7 +2077,8 @@ var IntlTimeZone = class {
2072
2077
  return void 0 !== intlParts.era && "bce" === normalizeEraName(intlParts.era) ? 1 - year : year;
2073
2078
  })(intlParts), parseInt(intlParts.month), parseInt(intlParts.day)) + 3600 * parseInt(intlParts.hour) + 60 * parseInt(intlParts.minute) + parseInt(intlParts.second) - epochSec;
2074
2079
  })(format), ((timeZoneId) => {
2075
- return timeZonePeriodDaysByName[timeZoneId.split("/").pop()] || 60;
2080
+ const timeZoneName = timeZoneId.split("/").pop();
2081
+ return timeZonePeriodDaysByName[timeZoneName] || 60;
2076
2082
  })(id));
2077
2083
  }
2078
2084
  C(epochNano) {
@@ -2296,12 +2302,12 @@ function offsetRegExpStr(separatorIndex) {
2296
2302
  return "([+-])" + timeRegExpStr(separatorIndex);
2297
2303
  }
2298
2304
  const dateTimeRegExpStr = "(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]" + timeRegExpStr(8) + "(Z|" + offsetRegExpStr(15) + ")?)?";
2299
- const yearMonthRegExp = /* @__PURE__ */ createRegExp("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})");
2300
- const monthDayRegExp = /* @__PURE__ */ createRegExp("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})");
2301
- const dateTimeRegExp = /* @__PURE__ */ createRegExp(dateTimeRegExpStr + "((?:\\[(!?)([^\\]]*)\\]){0,9})");
2302
- const timeRegExp = /* @__PURE__ */ createRegExp("T?" + timeRegExpStr(2) + `(${offsetRegExpStr(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`);
2303
- const annotationRegExp = /* @__PURE__ */ new RegExp("\\[(!?)([^\\]]*)\\]", "g");
2304
- 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)?)?");
2305
+ const yearMonthRegExp = /*@__PURE__*/ createRegExp("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})");
2306
+ const monthDayRegExp = /*@__PURE__*/ createRegExp("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})");
2307
+ const dateTimeRegExp = /*@__PURE__*/ createRegExp(dateTimeRegExpStr + "((?:\\[(!?)([^\\]]*)\\]){0,9})");
2308
+ const timeRegExp = /*@__PURE__*/ createRegExp("T?" + timeRegExpStr(2) + `(${offsetRegExpStr(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`);
2309
+ const annotationRegExp = /*@__PURE__*/ new RegExp("\\[(!?)([^\\]]*)\\]", "g");
2310
+ 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)?)?");
2305
2311
  function parseDateTimeLike(s) {
2306
2312
  const parts = dateTimeRegExp.exec(s);
2307
2313
  return parts ? ((parts) => {
@@ -2579,8 +2585,8 @@ const timeDefaultShapeFields = {
2579
2585
  minute: "numeric",
2580
2586
  second: "numeric"
2581
2587
  };
2582
- const dateTimeDefaultShapeFields = /* @__PURE__ */ Object.assign({}, dateDefaultShapeFields, timeDefaultShapeFields);
2583
- const zonedDateTimeDefaultShapeFields = /* @__PURE__ */ Object.assign({}, dateTimeDefaultShapeFields, { timeZoneName: "short" });
2588
+ const dateTimeDefaultShapeFields = /*@__PURE__*/ Object.assign({}, dateDefaultShapeFields, timeDefaultShapeFields);
2589
+ const zonedDateTimeDefaultShapeFields = /*@__PURE__*/ Object.assign({}, dateTimeDefaultShapeFields, { timeZoneName: "short" });
2584
2590
  const yearMonthDefaultShapeFields = {
2585
2591
  year: "numeric",
2586
2592
  month: "numeric"
@@ -2604,15 +2610,15 @@ const timeShapeFieldNames = [
2604
2610
  "fractionalSecondDigits",
2605
2611
  "timeStyle"
2606
2612
  ];
2607
- const dateTimeShapeFieldNames = /* @__PURE__ */ dateShapeFieldNames.concat(timeShapeFieldNames);
2608
- const yearMonthIgnoredFieldNames = /* @__PURE__ */ ["weekday", "day"].concat(timeShapeFieldNames);
2609
- const monthDayIgnoredFieldNames = /* @__PURE__ */ ["weekday", "year"].concat(timeShapeFieldNames);
2610
- const transformInstantOptions = /* @__PURE__ */ createOptionsTransformer(dateTimeShapeFieldNames, [], [], dateTimeDefaultShapeFields);
2611
- const transformZonedOptions = /* @__PURE__ */ createOptionsTransformer(dateTimeShapeFieldNames, [], [], zonedDateTimeDefaultShapeFields);
2612
- const transformDateTimeOptions = /* @__PURE__ */ createOptionsTransformer(dateTimeShapeFieldNames, [], ["timeZoneName"], dateTimeDefaultShapeFields);
2613
- const transformDateOptions = /* @__PURE__ */ createOptionsTransformer(dateShapeFieldNames, timeShapeFieldNames, ["timeZoneName"], dateDefaultShapeFields);
2614
- const transformTimeOptions = /* @__PURE__ */ createOptionsTransformer(timeShapeFieldNames, dateShapeFieldNames, ["timeZoneName", "era"], timeDefaultShapeFields);
2615
- const transformYearMonthOptions = /* @__PURE__ */ createOptionsTransformer([
2613
+ const dateTimeShapeFieldNames = /*@__PURE__*/ dateShapeFieldNames.concat(timeShapeFieldNames);
2614
+ const yearMonthIgnoredFieldNames = /*@__PURE__*/ ["weekday", "day"].concat(timeShapeFieldNames);
2615
+ const monthDayIgnoredFieldNames = /*@__PURE__*/ ["weekday", "year"].concat(timeShapeFieldNames);
2616
+ const transformInstantOptions = /*@__PURE__*/ createOptionsTransformer(dateTimeShapeFieldNames, [], [], dateTimeDefaultShapeFields);
2617
+ const transformZonedOptions = /*@__PURE__*/ createOptionsTransformer(dateTimeShapeFieldNames, [], [], zonedDateTimeDefaultShapeFields);
2618
+ const transformDateTimeOptions = /*@__PURE__*/ createOptionsTransformer(dateTimeShapeFieldNames, [], ["timeZoneName"], dateTimeDefaultShapeFields);
2619
+ const transformDateOptions = /*@__PURE__*/ createOptionsTransformer(dateShapeFieldNames, timeShapeFieldNames, ["timeZoneName"], dateDefaultShapeFields);
2620
+ const transformTimeOptions = /*@__PURE__*/ createOptionsTransformer(timeShapeFieldNames, dateShapeFieldNames, ["timeZoneName", "era"], timeDefaultShapeFields);
2621
+ const transformYearMonthOptions = /*@__PURE__*/ createOptionsTransformer([
2616
2622
  "year",
2617
2623
  "month",
2618
2624
  "dateStyle"
@@ -2634,7 +2640,7 @@ const transformYearMonthOptions = /* @__PURE__ */ createOptionsTransformer([
2634
2640
  month: "numeric"
2635
2641
  }
2636
2642
  });
2637
- const transformMonthDayOptions = /* @__PURE__ */ createOptionsTransformer([
2643
+ const transformMonthDayOptions = /*@__PURE__*/ createOptionsTransformer([
2638
2644
  "month",
2639
2645
  "day",
2640
2646
  "dateStyle"
@@ -2808,8 +2814,8 @@ function resolveBasicCalendarId(rawCalendarId) {
2808
2814
  function resolveBasicCalendarArg(rawCalendarId = isoCalendarId) {
2809
2815
  return resolveBasicCalendarId(rawCalendarId);
2810
2816
  }
2811
- const zonedDateTimeSlotsMap = /* @__PURE__ */ new WeakMap();
2812
- const ZonedDateTime = /* @__PURE__ */ defineTemporalClass(ZonedDateTimeBranding, class {
2817
+ const zonedDateTimeSlotsMap = /*@__PURE__*/ new WeakMap();
2818
+ const ZonedDateTime = /*@__PURE__*/ defineTemporalClass(ZonedDateTimeBranding, class {
2813
2819
  constructor(epochNanoseconds, timeZoneId, calendar = void 0) {
2814
2820
  const epochNano = checkEpochNanoInBounds(toBigInt(epochNanoseconds));
2815
2821
  const timeZone = queryTimeZone(refineTimeZoneId(timeZoneId));
@@ -2957,8 +2963,8 @@ function refineTimeZoneArg(arg) {
2957
2963
  }
2958
2964
  return ((arg) => resolveTimeZoneId(parseTimeZoneId(requireString(arg))))(arg);
2959
2965
  }
2960
- const instantSlotsMap = /* @__PURE__ */ new WeakMap();
2961
- const Instant = /* @__PURE__ */ defineTemporalClass(InstantBranding, class {
2966
+ const instantSlotsMap = /*@__PURE__*/ new WeakMap();
2967
+ const Instant = /*@__PURE__*/ defineTemporalClass(InstantBranding, class {
2962
2968
  constructor(epochNanoseconds) {
2963
2969
  const epochNano = checkEpochNanoInBounds(toBigInt(epochNanoseconds));
2964
2970
  initInstant(this, createEpochNanoSlots(epochNano));
@@ -3043,8 +3049,8 @@ const { toTemporalInstant: toTemporalInstant$1 } = { toTemporalInstant() {
3043
3049
  function initInstant(instance, slots) {
3044
3050
  return instantSlotsMap.set(instance, slots), attachDebugString(instance), instance;
3045
3051
  }
3046
- const plainMonthDaySlotsMap = /* @__PURE__ */ new WeakMap();
3047
- const PlainMonthDay = /* @__PURE__ */ defineTemporalClass(PlainMonthDayBranding, class {
3052
+ const plainMonthDaySlotsMap = /*@__PURE__*/ new WeakMap();
3053
+ const PlainMonthDay = /*@__PURE__*/ defineTemporalClass(PlainMonthDayBranding, class {
3048
3054
  constructor(isoMonth, isoDay, calendar = void 0, referenceIsoYear) {
3049
3055
  const isoMonthInt = toIntegerWithTrunc(isoMonth);
3050
3056
  const isoDayInt = toIntegerWithTrunc(isoDay);
@@ -3108,8 +3114,8 @@ function toPlainMonthDaySlots(arg, options) {
3108
3114
  function initPlainMonthDay(instance, slots) {
3109
3115
  return plainMonthDaySlotsMap.set(instance, slots), attachDebugString(instance), instance;
3110
3116
  }
3111
- const plainYearMonthSlotsMap = /* @__PURE__ */ new WeakMap();
3112
- const PlainYearMonth = /* @__PURE__ */ defineTemporalClass(PlainYearMonthBranding, class {
3117
+ const plainYearMonthSlotsMap = /*@__PURE__*/ new WeakMap();
3118
+ const PlainYearMonth = /*@__PURE__*/ defineTemporalClass(PlainYearMonthBranding, class {
3113
3119
  constructor(isoYear, isoMonth, calendar = void 0, referenceIsoDay) {
3114
3120
  const isoYearInt = toIntegerWithTrunc(isoYear);
3115
3121
  const isoMonthInt = toIntegerWithTrunc(isoMonth);
@@ -3201,8 +3207,8 @@ function getTemporalBrandingAndSlots(obj) {
3201
3207
  function validateBag(bag) {
3202
3208
  return (getTemporalBrandingAndSlots(bag) || void 0 !== bag.calendar || void 0 !== bag.timeZone) && throwTypeError("Invalid bag"), bag;
3203
3209
  }
3204
- const plainTimeSlotsMap = /* @__PURE__ */ new WeakMap();
3205
- const PlainTime = /* @__PURE__ */ defineTemporalClass(PlainTimeBranding, class {
3210
+ const plainTimeSlotsMap = /*@__PURE__*/ new WeakMap();
3211
+ const PlainTime = /*@__PURE__*/ defineTemporalClass(PlainTimeBranding, class {
3206
3212
  constructor(hour = 0, minute = 0, second = 0, millisecond = 0, microsecond = 0, nanosecond = 0) {
3207
3213
  const fields = validateTimeFields(mapProps(toIntegerWithTrunc, {
3208
3214
  hour,
@@ -3284,8 +3290,8 @@ function optionalToPlainTimeFields(timeArg) {
3284
3290
  function initPlainTime(instance, slots) {
3285
3291
  return plainTimeSlotsMap.set(instance, slots), attachDebugString(instance), instance;
3286
3292
  }
3287
- const plainDateTimeSlotsMap = /* @__PURE__ */ new WeakMap();
3288
- const PlainDateTime = /* @__PURE__ */ defineTemporalClass(PlainDateTimeBranding, class {
3293
+ const plainDateTimeSlotsMap = /*@__PURE__*/ new WeakMap();
3294
+ const PlainDateTime = /*@__PURE__*/ defineTemporalClass(PlainDateTimeBranding, class {
3289
3295
  constructor(isoYear, isoMonth, isoDay, hour = 0, minute = 0, second = 0, millisecond = 0, microsecond = 0, nanosecond = 0, calendar = void 0) {
3290
3296
  const fields = checkIsoDateTimeInBounds(validateIsoDateTimeFields(mapProps(toIntegerWithTrunc, {
3291
3297
  year: isoYear,
@@ -3396,8 +3402,8 @@ function toPlainDateTimeSlots(arg, options) {
3396
3402
  function initPlainDateTime(instance, slots) {
3397
3403
  return plainDateTimeSlotsMap.set(instance, slots), attachDebugString(instance), instance;
3398
3404
  }
3399
- const plainDateSlotsMap = /* @__PURE__ */ new WeakMap();
3400
- const PlainDate = /* @__PURE__ */ defineTemporalClass(PlainDateBranding, class {
3405
+ const plainDateSlotsMap = /*@__PURE__*/ new WeakMap();
3406
+ const PlainDate = /*@__PURE__*/ defineTemporalClass(PlainDateBranding, class {
3401
3407
  constructor(isoYear, isoMonth, isoDay, calendar = void 0) {
3402
3408
  const fields = checkIsoDateInBounds(validateIsoDateFields(mapProps(toIntegerWithTrunc, {
3403
3409
  year: isoYear,
@@ -3515,8 +3521,8 @@ function refineCalendarArg(arg) {
3515
3521
  }
3516
3522
  return ((arg) => resolveBasicCalendarId(parseCalendarId(requireString(arg))))(arg);
3517
3523
  }
3518
- const durationSlotsMap = /* @__PURE__ */ new WeakMap();
3519
- const Duration = /* @__PURE__ */ defineTemporalClass(DurationBranding, class {
3524
+ const durationSlotsMap = /*@__PURE__*/ new WeakMap();
3525
+ const Duration = /*@__PURE__*/ defineTemporalClass(DurationBranding, class {
3520
3526
  constructor(years = 0, months = 0, weeks = 0, days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0, microseconds = 0, nanoseconds = 0) {
3521
3527
  const fields = validateDurationFields(mapProps(toStrictInteger, {
3522
3528
  years,
@@ -3609,7 +3615,7 @@ function refinePublicRelativeTo(relativeTo) {
3609
3615
  function initDuration(instance, slots) {
3610
3616
  return durationSlotsMap.set(instance, slots), attachDebugString(instance), instance;
3611
3617
  }
3612
- const Now = /* @__PURE__ */ Object.defineProperties({}, {
3618
+ const Now = /*@__PURE__*/ Object.defineProperties({}, {
3613
3619
  ...createStringTagDescriptors("Temporal.Now"),
3614
3620
  ...createPropDescriptors({
3615
3621
  timeZoneId() {
@@ -3633,7 +3639,7 @@ const Now = /* @__PURE__ */ Object.defineProperties({}, {
3633
3639
  }
3634
3640
  })
3635
3641
  });
3636
- const Temporal$2 = /* @__PURE__ */ Object.defineProperties({}, {
3642
+ const Temporal$2 = /*@__PURE__*/ Object.defineProperties({}, {
3637
3643
  ...createStringTagDescriptors("Temporal"),
3638
3644
  ...createPropDescriptors({
3639
3645
  PlainYearMonth,
package/dist/mod.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { Context, KvStore, MessageQueue } from "@fedify/fedify";
3
3
  import { Actor } from "@fedify/vocab";
4
- //#region ../vocab-runtime/dist/docloader-C_dir7Xb.d.ts
4
+ //#region ../vocab-runtime/dist/docloader-BK627tQQ.d.ts
5
5
  /**
6
6
  * Options for making `User-Agent` string.
7
7
  * @see {@link getUserAgent}
package/dist/mod.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { Context, KvStore, MessageQueue } from "@fedify/fedify";
3
3
  import { Actor } from "@fedify/vocab";
4
- //#region ../vocab-runtime/dist/docloader-C_dir7Xb.d.ts
4
+ //#region ../vocab-runtime/dist/docloader-BK627tQQ.d.ts
5
5
  /**
6
6
  * Options for making `User-Agent` string.
7
7
  * @see {@link getUserAgent}
@@ -28,12 +28,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  value: mod,
29
29
  enumerable: true
30
30
  }) : target, mod));
31
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
31
+ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
32
32
  //#endregion
33
- //#region ../vocab-runtime/dist/url-DGVbSVVi.js
33
+ //#region ../vocab-runtime/dist/url-BHAShw9J.js
34
34
  var UrlError = class extends Error {
35
- constructor(message) {
36
- super(message);
35
+ constructor(message, options) {
36
+ super(message, options);
37
37
  this.name = "UrlError";
38
38
  }
39
39
  };
@@ -61,10 +61,37 @@ async function validatePublicUrl(url) {
61
61
  let addresses;
62
62
  try {
63
63
  addresses = await lookup(hostname, { all: true });
64
- } catch {
65
- addresses = [];
64
+ } catch (error) {
65
+ throw new UrlError("DNS lookup failed", { cause: error });
66
66
  }
67
- for (const { address, family } of addresses) validatePublicIpAddress(address, family);
67
+ validateLookupAddresses(addresses);
68
+ }
69
+ /**
70
+ * Validates the IP addresses returned by `node:dns.lookup()`.
71
+ *
72
+ * Cloudflare Workers' `node:dns` implementation currently maps every record
73
+ * in a DNS-over-HTTPS `Answer` array—including CNAME records—to a
74
+ * `LookupAddress`, even though Node.js specifies that the `address` field must
75
+ * contain an IPv4 or IPv6 literal. See:
76
+ * https://github.com/cloudflare/workerd/issues/6886
77
+ *
78
+ * Work around that bug by ignoring non-IP entries only when the lookup also
79
+ * returns at least one actual IP address. This remains fail-closed: a result
80
+ * containing no IP addresses is rejected, and every returned IP address is
81
+ * still validated and must be public. This workaround can be revisited once
82
+ * the Workerd issue is fixed in supported Cloudflare Workers runtimes.
83
+ *
84
+ * @internal
85
+ */
86
+ function validateLookupAddresses(addresses) {
87
+ let ipAddressCount = 0;
88
+ for (const { address } of addresses) {
89
+ const family = isIP(address);
90
+ if (family === 0) continue;
91
+ ipAddressCount++;
92
+ validatePublicIpAddress(address, family);
93
+ }
94
+ if (ipAddressCount === 0) throw new UrlError("DNS lookup did not return any IP address");
68
95
  }
69
96
  function validatePublicIpAddress(address, family) {
70
97
  if (family === 4 && isValidPublicIPv4Address(address) || family === 6 && isValidPublicIPv6Address(address)) return;
@@ -225,7 +252,7 @@ const re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
225
252
  * @param ownVersion version which should be checked against
226
253
  */
227
254
  function _makeCompatibilityCheck(ownVersion) {
228
- const acceptedVersions = new Set([ownVersion]);
255
+ const acceptedVersions = /* @__PURE__ */ new Set([ownVersion]);
229
256
  const rejectedVersions = /* @__PURE__ */ new Set();
230
257
  const myVersionMatch = ownVersion.match(re);
231
258
  if (!myVersionMatch) return () => false;
@@ -1676,8 +1703,8 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
1676
1703
  n.default = e;
1677
1704
  return Object.freeze(n);
1678
1705
  }
1679
- var pvtsutils__namespace = /* @__PURE__ */ _interopNamespaceDefault(pvtsutils);
1680
- var pvutils__namespace = /* @__PURE__ */ _interopNamespaceDefault(pvutils);
1706
+ var pvtsutils__namespace = /*#__PURE__*/ _interopNamespaceDefault(pvtsutils);
1707
+ var pvutils__namespace = /*#__PURE__*/ _interopNamespaceDefault(pvutils);
1681
1708
  function assertBigInt() {
1682
1709
  if (typeof BigInt === "undefined") throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.");
1683
1710
  }
@@ -1744,7 +1771,7 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
1744
1771
  const LOCAL = "local";
1745
1772
  const EMPTY_STRING = "";
1746
1773
  const EMPTY_BUFFER = /* @__PURE__ */ new ArrayBuffer(0);
1747
- const EMPTY_VIEW = new Uint8Array(0);
1774
+ const EMPTY_VIEW = /* @__PURE__ */ new Uint8Array(0);
1748
1775
  const END_OF_CONTENT_NAME = "EndOfContent";
1749
1776
  const OCTET_STRING_NAME = "OCTET STRING";
1750
1777
  const BIT_STRING_NAME = "BIT STRING";
@@ -1866,7 +1893,7 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
1866
1893
  }
1867
1894
  if (this.isConstructed) firstOctet |= 32;
1868
1895
  if (this.tagNumber < 31 && !this.isHexOnly) {
1869
- const retView = new Uint8Array(1);
1896
+ const retView = /* @__PURE__ */ new Uint8Array(1);
1870
1897
  if (!sizeOnly) {
1871
1898
  let number = this.tagNumber;
1872
1899
  number &= 31;
@@ -2186,7 +2213,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2186
2213
  }
2187
2214
  };
2188
2215
  _a$w = Primitive;
2189
- typeStore.Primitive = _a$w;
2216
+ (() => {
2217
+ typeStore.Primitive = _a$w;
2218
+ })();
2190
2219
  Primitive.NAME = "PRIMITIVE";
2191
2220
  const DEFAULT_MAX_DEPTH = 100;
2192
2221
  const DEFAULT_MAX_NODES = 1e4;
@@ -2526,7 +2555,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2526
2555
  }
2527
2556
  };
2528
2557
  _a$v = Constructed;
2529
- typeStore.Constructed = _a$v;
2558
+ (() => {
2559
+ typeStore.Constructed = _a$v;
2560
+ })();
2530
2561
  Constructed.NAME = "CONSTRUCTED";
2531
2562
  var LocalEndOfContentValueBlock = class extends ValueBlock {
2532
2563
  fromBER(inputBuffer, inputOffset, _inputLength) {
@@ -2546,7 +2577,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2546
2577
  }
2547
2578
  };
2548
2579
  _a$u = EndOfContent;
2549
- typeStore.EndOfContent = _a$u;
2580
+ (() => {
2581
+ typeStore.EndOfContent = _a$u;
2582
+ })();
2550
2583
  EndOfContent.NAME = END_OF_CONTENT_NAME;
2551
2584
  var _a$t;
2552
2585
  var Null = class extends BaseBlock {
@@ -2581,7 +2614,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2581
2614
  }
2582
2615
  };
2583
2616
  _a$t = Null;
2584
- typeStore.Null = _a$t;
2617
+ (() => {
2618
+ typeStore.Null = _a$t;
2619
+ })();
2585
2620
  Null.NAME = "NULL";
2586
2621
  var LocalBooleanValueBlock = class extends HexBlock(ValueBlock) {
2587
2622
  get value() {
@@ -2594,7 +2629,7 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2594
2629
  constructor({ value, ...parameters } = {}) {
2595
2630
  super(parameters);
2596
2631
  if (parameters.valueHex) this.valueHexView = pvtsutils__namespace.BufferSourceConverter.toUint8Array(parameters.valueHex);
2597
- else this.valueHexView = new Uint8Array(1);
2632
+ else this.valueHexView = /* @__PURE__ */ new Uint8Array(1);
2598
2633
  if (value) this.value = value;
2599
2634
  }
2600
2635
  fromBER(inputBuffer, inputOffset, inputLength) {
@@ -2636,7 +2671,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2636
2671
  }
2637
2672
  };
2638
2673
  _a$s = Boolean;
2639
- typeStore.Boolean = _a$s;
2674
+ (() => {
2675
+ typeStore.Boolean = _a$s;
2676
+ })();
2640
2677
  Boolean.NAME = "BOOLEAN";
2641
2678
  var LocalOctetStringValueBlock = class extends HexBlock(LocalConstructedValueBlock) {
2642
2679
  constructor({ isConstructed = false, ...parameters } = {}) {
@@ -2731,7 +2768,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2731
2768
  }
2732
2769
  };
2733
2770
  _a$r = OctetString;
2734
- typeStore.OctetString = _a$r;
2771
+ (() => {
2772
+ typeStore.OctetString = _a$r;
2773
+ })();
2735
2774
  OctetString.NAME = OCTET_STRING_NAME;
2736
2775
  var LocalBitStringValueBlock = class extends HexBlock(LocalConstructedValueBlock) {
2737
2776
  constructor({ unusedBits = 0, isConstructed = false, ...parameters } = {}) {
@@ -2792,7 +2831,7 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2792
2831
  if (this.isConstructed) return LocalConstructedValueBlock.prototype.toBER.call(this, sizeOnly, writer);
2793
2832
  if (sizeOnly) return new ArrayBuffer(this.valueHexView.byteLength + 1);
2794
2833
  if (!this.valueHexView.byteLength) {
2795
- const empty = new Uint8Array(1);
2834
+ const empty = /* @__PURE__ */ new Uint8Array(1);
2796
2835
  empty[0] = 0;
2797
2836
  return empty.buffer;
2798
2837
  }
@@ -2846,7 +2885,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2846
2885
  }
2847
2886
  };
2848
2887
  _a$q = BitString;
2849
- typeStore.BitString = _a$q;
2888
+ (() => {
2889
+ typeStore.BitString = _a$q;
2890
+ })();
2850
2891
  BitString.NAME = BIT_STRING_NAME;
2851
2892
  var _a$p;
2852
2893
  function viewAdd(first, second) {
@@ -3029,15 +3070,17 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3029
3070
  };
3030
3071
  _a$p = LocalIntegerValueBlock;
3031
3072
  LocalIntegerValueBlock.NAME = "IntegerValueBlock";
3032
- Object.defineProperty(_a$p.prototype, "valueHex", {
3033
- set: function(v) {
3034
- this.valueHexView = new Uint8Array(v);
3035
- this.setValueHex();
3036
- },
3037
- get: function() {
3038
- return this.valueHexView.slice().buffer;
3039
- }
3040
- });
3073
+ (() => {
3074
+ Object.defineProperty(_a$p.prototype, "valueHex", {
3075
+ set: function(v) {
3076
+ this.valueHexView = new Uint8Array(v);
3077
+ this.setValueHex();
3078
+ },
3079
+ get: function() {
3080
+ return this.valueHexView.slice().buffer;
3081
+ }
3082
+ });
3083
+ })();
3041
3084
  var _a$o;
3042
3085
  var Integer = class extends BaseBlock {
3043
3086
  constructor(parameters = {}) {
@@ -3081,7 +3124,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3081
3124
  }
3082
3125
  };
3083
3126
  _a$o = Integer;
3084
- typeStore.Integer = _a$o;
3127
+ (() => {
3128
+ typeStore.Integer = _a$o;
3129
+ })();
3085
3130
  Integer.NAME = "INTEGER";
3086
3131
  var _a$n;
3087
3132
  var Enumerated = class extends Integer {
@@ -3092,7 +3137,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3092
3137
  }
3093
3138
  };
3094
3139
  _a$n = Enumerated;
3095
- typeStore.Enumerated = _a$n;
3140
+ (() => {
3141
+ typeStore.Enumerated = _a$n;
3142
+ })();
3096
3143
  Enumerated.NAME = "ENUMERATED";
3097
3144
  var LocalSidValueBlock = class extends HexBlock(ValueBlock) {
3098
3145
  constructor({ valueDec = -1, isFirstSid = false, ...parameters } = {}) {
@@ -3315,7 +3362,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3315
3362
  }
3316
3363
  };
3317
3364
  _a$m = ObjectIdentifier;
3318
- typeStore.ObjectIdentifier = _a$m;
3365
+ (() => {
3366
+ typeStore.ObjectIdentifier = _a$m;
3367
+ })();
3319
3368
  ObjectIdentifier.NAME = "OBJECT IDENTIFIER";
3320
3369
  var LocalRelativeSidValueBlock = class extends HexBlock(LocalBaseBlock) {
3321
3370
  constructor({ valueDec = 0, ...parameters } = {}) {
@@ -3485,7 +3534,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3485
3534
  }
3486
3535
  };
3487
3536
  _a$l = RelativeObjectIdentifier;
3488
- typeStore.RelativeObjectIdentifier = _a$l;
3537
+ (() => {
3538
+ typeStore.RelativeObjectIdentifier = _a$l;
3539
+ })();
3489
3540
  RelativeObjectIdentifier.NAME = "RelativeObjectIdentifier";
3490
3541
  var _a$k;
3491
3542
  var Sequence = class extends Constructed {
@@ -3496,7 +3547,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3496
3547
  }
3497
3548
  };
3498
3549
  _a$k = Sequence;
3499
- typeStore.Sequence = _a$k;
3550
+ (() => {
3551
+ typeStore.Sequence = _a$k;
3552
+ })();
3500
3553
  Sequence.NAME = "SEQUENCE";
3501
3554
  var _a$j;
3502
3555
  var Set = class extends Constructed {
@@ -3507,7 +3560,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3507
3560
  }
3508
3561
  };
3509
3562
  _a$j = Set;
3510
- typeStore.Set = _a$j;
3563
+ (() => {
3564
+ typeStore.Set = _a$j;
3565
+ })();
3511
3566
  Set.NAME = "SET";
3512
3567
  var LocalStringValueBlock = class extends HexBlock(ValueBlock) {
3513
3568
  constructor({ ...parameters } = {}) {
@@ -3565,7 +3620,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3565
3620
  }
3566
3621
  };
3567
3622
  _a$i = Utf8String;
3568
- typeStore.Utf8String = _a$i;
3623
+ (() => {
3624
+ typeStore.Utf8String = _a$i;
3625
+ })();
3569
3626
  Utf8String.NAME = "UTF8String";
3570
3627
  var LocalBmpStringValueBlock = class extends LocalSimpleStringBlock {
3571
3628
  fromBuffer(inputBuffer) {
@@ -3587,7 +3644,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3587
3644
  }
3588
3645
  };
3589
3646
  _a$h = BmpString;
3590
- typeStore.BmpString = _a$h;
3647
+ (() => {
3648
+ typeStore.BmpString = _a$h;
3649
+ })();
3591
3650
  BmpString.NAME = "BMPString";
3592
3651
  var LocalUniversalStringValueBlock = class extends LocalSimpleStringBlock {
3593
3652
  fromBuffer(inputBuffer) {
@@ -3624,7 +3683,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3624
3683
  }
3625
3684
  };
3626
3685
  _a$g = UniversalString;
3627
- typeStore.UniversalString = _a$g;
3686
+ (() => {
3687
+ typeStore.UniversalString = _a$g;
3688
+ })();
3628
3689
  UniversalString.NAME = "UniversalString";
3629
3690
  var _a$f;
3630
3691
  var NumericString = class extends LocalSimpleStringBlock {
@@ -3635,7 +3696,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3635
3696
  }
3636
3697
  };
3637
3698
  _a$f = NumericString;
3638
- typeStore.NumericString = _a$f;
3699
+ (() => {
3700
+ typeStore.NumericString = _a$f;
3701
+ })();
3639
3702
  NumericString.NAME = "NumericString";
3640
3703
  var _a$e;
3641
3704
  var PrintableString = class extends LocalSimpleStringBlock {
@@ -3646,7 +3709,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3646
3709
  }
3647
3710
  };
3648
3711
  _a$e = PrintableString;
3649
- typeStore.PrintableString = _a$e;
3712
+ (() => {
3713
+ typeStore.PrintableString = _a$e;
3714
+ })();
3650
3715
  PrintableString.NAME = "PrintableString";
3651
3716
  var _a$d;
3652
3717
  var TeletexString = class extends LocalSimpleStringBlock {
@@ -3657,7 +3722,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3657
3722
  }
3658
3723
  };
3659
3724
  _a$d = TeletexString;
3660
- typeStore.TeletexString = _a$d;
3725
+ (() => {
3726
+ typeStore.TeletexString = _a$d;
3727
+ })();
3661
3728
  TeletexString.NAME = "TeletexString";
3662
3729
  var _a$c;
3663
3730
  var VideotexString = class extends LocalSimpleStringBlock {
@@ -3668,7 +3735,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3668
3735
  }
3669
3736
  };
3670
3737
  _a$c = VideotexString;
3671
- typeStore.VideotexString = _a$c;
3738
+ (() => {
3739
+ typeStore.VideotexString = _a$c;
3740
+ })();
3672
3741
  VideotexString.NAME = "VideotexString";
3673
3742
  var _a$b;
3674
3743
  var IA5String = class extends LocalSimpleStringBlock {
@@ -3679,7 +3748,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3679
3748
  }
3680
3749
  };
3681
3750
  _a$b = IA5String;
3682
- typeStore.IA5String = _a$b;
3751
+ (() => {
3752
+ typeStore.IA5String = _a$b;
3753
+ })();
3683
3754
  IA5String.NAME = "IA5String";
3684
3755
  var _a$a;
3685
3756
  var GraphicString = class extends LocalSimpleStringBlock {
@@ -3690,7 +3761,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3690
3761
  }
3691
3762
  };
3692
3763
  _a$a = GraphicString;
3693
- typeStore.GraphicString = _a$a;
3764
+ (() => {
3765
+ typeStore.GraphicString = _a$a;
3766
+ })();
3694
3767
  GraphicString.NAME = "GraphicString";
3695
3768
  var _a$9;
3696
3769
  var VisibleString = class extends LocalSimpleStringBlock {
@@ -3701,7 +3774,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3701
3774
  }
3702
3775
  };
3703
3776
  _a$9 = VisibleString;
3704
- typeStore.VisibleString = _a$9;
3777
+ (() => {
3778
+ typeStore.VisibleString = _a$9;
3779
+ })();
3705
3780
  VisibleString.NAME = "VisibleString";
3706
3781
  var _a$8;
3707
3782
  var GeneralString = class extends LocalSimpleStringBlock {
@@ -3712,7 +3787,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3712
3787
  }
3713
3788
  };
3714
3789
  _a$8 = GeneralString;
3715
- typeStore.GeneralString = _a$8;
3790
+ (() => {
3791
+ typeStore.GeneralString = _a$8;
3792
+ })();
3716
3793
  GeneralString.NAME = "GeneralString";
3717
3794
  var _a$7;
3718
3795
  var CharacterString = class extends LocalSimpleStringBlock {
@@ -3723,7 +3800,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3723
3800
  }
3724
3801
  };
3725
3802
  _a$7 = CharacterString;
3726
- typeStore.CharacterString = _a$7;
3803
+ (() => {
3804
+ typeStore.CharacterString = _a$7;
3805
+ })();
3727
3806
  CharacterString.NAME = "CharacterString";
3728
3807
  var _a$6;
3729
3808
  var UTCTime = class extends VisibleString {
@@ -3813,7 +3892,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3813
3892
  }
3814
3893
  };
3815
3894
  _a$6 = UTCTime;
3816
- typeStore.UTCTime = _a$6;
3895
+ (() => {
3896
+ typeStore.UTCTime = _a$6;
3897
+ })();
3817
3898
  UTCTime.NAME = "UTCTime";
3818
3899
  var _a$5;
3819
3900
  var GeneralizedTime = class extends UTCTime {
@@ -3975,7 +4056,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3975
4056
  }
3976
4057
  };
3977
4058
  _a$5 = GeneralizedTime;
3978
- typeStore.GeneralizedTime = _a$5;
4059
+ (() => {
4060
+ typeStore.GeneralizedTime = _a$5;
4061
+ })();
3979
4062
  GeneralizedTime.NAME = "GeneralizedTime";
3980
4063
  var _a$4;
3981
4064
  var DATE = class extends Utf8String {
@@ -3986,7 +4069,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3986
4069
  }
3987
4070
  };
3988
4071
  _a$4 = DATE;
3989
- typeStore.DATE = _a$4;
4072
+ (() => {
4073
+ typeStore.DATE = _a$4;
4074
+ })();
3990
4075
  DATE.NAME = "DATE";
3991
4076
  var _a$3;
3992
4077
  var TimeOfDay = class extends Utf8String {
@@ -3997,7 +4082,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3997
4082
  }
3998
4083
  };
3999
4084
  _a$3 = TimeOfDay;
4000
- typeStore.TimeOfDay = _a$3;
4085
+ (() => {
4086
+ typeStore.TimeOfDay = _a$3;
4087
+ })();
4001
4088
  TimeOfDay.NAME = "TimeOfDay";
4002
4089
  var _a$2;
4003
4090
  var DateTime = class extends Utf8String {
@@ -4008,7 +4095,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
4008
4095
  }
4009
4096
  };
4010
4097
  _a$2 = DateTime;
4011
- typeStore.DateTime = _a$2;
4098
+ (() => {
4099
+ typeStore.DateTime = _a$2;
4100
+ })();
4012
4101
  DateTime.NAME = "DateTime";
4013
4102
  var _a$1;
4014
4103
  var Duration = class extends Utf8String {
@@ -4019,7 +4108,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
4019
4108
  }
4020
4109
  };
4021
4110
  _a$1 = Duration;
4022
- typeStore.Duration = _a$1;
4111
+ (() => {
4112
+ typeStore.Duration = _a$1;
4113
+ })();
4023
4114
  Duration.NAME = "Duration";
4024
4115
  var _a;
4025
4116
  var TIME = class extends Utf8String {
@@ -4030,7 +4121,9 @@ var require_build$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
4030
4121
  }
4031
4122
  };
4032
4123
  _a = TIME;
4033
- typeStore.TIME = _a;
4124
+ (() => {
4125
+ typeStore.TIME = _a;
4126
+ })();
4034
4127
  TIME.NAME = "TIME";
4035
4128
  var Any = class {
4036
4129
  constructor({ name = EMPTY_STRING, optional = false } = {}) {
@@ -4358,9 +4451,10 @@ require_build$1();
4358
4451
  var x = {
4359
4452
  base64: new TextEncoder().encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),
4360
4453
  base64url: new TextEncoder().encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_")
4361
- }, d = {
4362
- base64: new Uint8Array(128).fill(64),
4363
- base64url: new Uint8Array(128).fill(64)
4454
+ };
4455
+ var d = {
4456
+ base64: (/* @__PURE__ */ new Uint8Array(128)).fill(64),
4457
+ base64url: (/* @__PURE__ */ new Uint8Array(128)).fill(64)
4364
4458
  };
4365
4459
  x.base64.forEach((n, t) => d.base64[n] = t);
4366
4460
  x.base64url.forEach((n, t) => d.base64url[n] = t);
@@ -4398,7 +4492,9 @@ function y$1(t, n) {
4398
4492
  }
4399
4493
  //#endregion
4400
4494
  //#region ../../node_modules/.pnpm/byte-encodings@1.0.11/node_modules/byte-encodings/dist/chunk-NOLIR2QU.js
4401
- var c = 61, s = new TextEncoder().encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), f$1 = new Uint8Array(128).fill(64);
4495
+ var c = 61;
4496
+ var s = new TextEncoder().encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
4497
+ var f$1 = (/* @__PURE__ */ new Uint8Array(128)).fill(64);
4402
4498
  s.forEach((e, r) => f$1[e] = r);
4403
4499
  function a(e) {
4404
4500
  typeof e == "string" ? e = new TextEncoder().encode(e) : e instanceof ArrayBuffer ? e = new Uint8Array(e).slice() : e = e.slice();
@@ -4407,7 +4503,8 @@ function a(e) {
4407
4503
  }
4408
4504
  //#endregion
4409
4505
  //#region ../../node_modules/.pnpm/byte-encodings@1.0.11/node_modules/byte-encodings/dist/chunk-32IDZLMP.js
4410
- var f = new TextEncoder().encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), y = new Uint8Array(128).fill(64);
4506
+ var f = new TextEncoder().encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_");
4507
+ var y = (/* @__PURE__ */ new Uint8Array(128)).fill(64);
4411
4508
  f.forEach((e, r) => y[e] = r);
4412
4509
  //#endregion
4413
4510
  //#region ../../node_modules/.pnpm/bytestreamjs@2.0.1/node_modules/bytestreamjs/build/cjs/byte_stream.js
@@ -5191,7 +5288,7 @@ var require_seq_stream = /* @__PURE__ */ __commonJSMin(((exports) => {
5191
5288
  this.prevLength -= 8;
5192
5289
  }
5193
5290
  getBlock(size, changeLength = true) {
5194
- if (this._length <= 0) return new Uint8Array(0);
5291
+ if (this._length <= 0) return /* @__PURE__ */ new Uint8Array(0);
5195
5292
  if (this._length < size) size = this._length;
5196
5293
  let result;
5197
5294
  if (this.backward) {
@@ -5700,7 +5797,7 @@ var require_bit_stream = /* @__PURE__ */ __commonJSMin(((exports) => {
5700
5797
  const byteLength = this.view.length - 1;
5701
5798
  if (byteLength > 3) return -1;
5702
5799
  if (byteLength == -1) return 0;
5703
- const value = new Uint32Array(1);
5800
+ const value = /* @__PURE__ */ new Uint32Array(1);
5704
5801
  const view = new Uint8Array(value.buffer);
5705
5802
  for (let i = byteLength; i >= 0; i--) view[byteLength - i] = this.view[i];
5706
5803
  return value[0];
@@ -5862,7 +5959,7 @@ var require_seq_bit_stream = /* @__PURE__ */ __commonJSMin(((exports) => {
5862
5959
  let byteIndex;
5863
5960
  const initialOffset = 8 - initialValueLength % 8;
5864
5961
  const reversedValue = new Array(initialValueLength);
5865
- const value = new Uint32Array(1);
5962
+ const value = /* @__PURE__ */ new Uint32Array(1);
5866
5963
  const valueView = new Uint8Array(value.buffer, 0, 4);
5867
5964
  let i;
5868
5965
  if (initialValueLength > 32) return -1;
@@ -6455,7 +6552,8 @@ var require_sha256 = /* @__PURE__ */ __commonJSMin(((exports) => {
6455
6552
  const W15 = SHA256_W[i - 15];
6456
6553
  const W2 = SHA256_W[i - 2];
6457
6554
  const s0 = (0, utils_js_1.rotr)(W15, 7) ^ (0, utils_js_1.rotr)(W15, 18) ^ W15 >>> 3;
6458
- SHA256_W[i] = ((0, utils_js_1.rotr)(W2, 17) ^ (0, utils_js_1.rotr)(W2, 19) ^ W2 >>> 10) + SHA256_W[i - 7] + s0 + SHA256_W[i - 16] | 0;
6555
+ const s1 = (0, utils_js_1.rotr)(W2, 17) ^ (0, utils_js_1.rotr)(W2, 19) ^ W2 >>> 10;
6556
+ SHA256_W[i] = s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16] | 0;
6459
6557
  }
6460
6558
  let { A, B, C, D, E, F, G, H } = this;
6461
6559
  for (let i = 0; i < 64; i++) {
@@ -6617,7 +6715,7 @@ var require_sha512 = /* @__PURE__ */ __commonJSMin(((exports) => {
6617
6715
  const _md_js_1 = require__md();
6618
6716
  const _u64_js_1 = require__u64();
6619
6717
  const utils_js_1 = require_utils();
6620
- const [SHA512_Kh, SHA512_Kl] = _u64_js_1.default.split([
6718
+ const [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => _u64_js_1.default.split([
6621
6719
  "0x428a2f98d728ae22",
6622
6720
  "0x7137449123ef65cd",
6623
6721
  "0xb5c0fbcfec4d3b2f",
@@ -6698,7 +6796,7 @@ var require_sha512 = /* @__PURE__ */ __commonJSMin(((exports) => {
6698
6796
  "0x597f299cfc657e2a",
6699
6797
  "0x5fcb6fab3ad6faec",
6700
6798
  "0x6c44198c4a475817"
6701
- ].map((n) => BigInt(n)));
6799
+ ].map((n) => BigInt(n))))();
6702
6800
  const SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
6703
6801
  const SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
6704
6802
  var SHA512 = class extends _md_js_1.HashMD {
@@ -6775,7 +6873,8 @@ var require_sha512 = /* @__PURE__ */ __commonJSMin(((exports) => {
6775
6873
  const s1h = _u64_js_1.default.rotrSH(W2h, W2l, 19) ^ _u64_js_1.default.rotrBH(W2h, W2l, 61) ^ _u64_js_1.default.shrSH(W2h, W2l, 6);
6776
6874
  const s1l = _u64_js_1.default.rotrSL(W2h, W2l, 19) ^ _u64_js_1.default.rotrBL(W2h, W2l, 61) ^ _u64_js_1.default.shrSL(W2h, W2l, 6);
6777
6875
  const SUMl = _u64_js_1.default.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
6778
- SHA512_W_H[i] = _u64_js_1.default.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]) | 0;
6876
+ const SUMh = _u64_js_1.default.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
6877
+ SHA512_W_H[i] = SUMh | 0;
6779
6878
  SHA512_W_L[i] = SUMl | 0;
6780
6879
  }
6781
6880
  let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
@@ -7001,10 +7100,10 @@ var require_build = /* @__PURE__ */ __commonJSMin(((exports) => {
7001
7100
  n.default = e;
7002
7101
  return Object.freeze(n);
7003
7102
  }
7004
- var asn1js__namespace = /* @__PURE__ */ _interopNamespaceDefault(asn1js);
7005
- var pvtsutils__namespace = /* @__PURE__ */ _interopNamespaceDefault(pvtsutils);
7006
- var pvutils__namespace = /* @__PURE__ */ _interopNamespaceDefault(pvutils);
7007
- var bs__namespace = /* @__PURE__ */ _interopNamespaceDefault(bs);
7103
+ var asn1js__namespace = /*#__PURE__*/ _interopNamespaceDefault(asn1js);
7104
+ var pvtsutils__namespace = /*#__PURE__*/ _interopNamespaceDefault(pvtsutils);
7105
+ var pvutils__namespace = /*#__PURE__*/ _interopNamespaceDefault(pvutils);
7106
+ var bs__namespace = /*#__PURE__*/ _interopNamespaceDefault(bs);
7008
7107
  const EMPTY_BUFFER = /* @__PURE__ */ new ArrayBuffer(0);
7009
7108
  const EMPTY_STRING = "";
7010
7109
  var ArgumentError = class ArgumentError extends TypeError {
@@ -11680,7 +11779,7 @@ var require_build = /* @__PURE__ */ __commonJSMin(((exports) => {
11680
11779
  result = {
11681
11780
  algorithm: {
11682
11781
  name: "AES-CTR",
11683
- counter: new Uint8Array(16),
11782
+ counter: /* @__PURE__ */ new Uint8Array(16),
11684
11783
  length: 10
11685
11784
  },
11686
11785
  usages: [
@@ -11720,7 +11819,7 @@ var require_build = /* @__PURE__ */ __commonJSMin(((exports) => {
11720
11819
  result = {
11721
11820
  algorithm: {
11722
11821
  name: "AES-CBC",
11723
- iv: this.getRandomValues(new Uint8Array(16))
11822
+ iv: this.getRandomValues(/* @__PURE__ */ new Uint8Array(16))
11724
11823
  },
11725
11824
  usages: [
11726
11825
  "encrypt",
@@ -11759,7 +11858,7 @@ var require_build = /* @__PURE__ */ __commonJSMin(((exports) => {
11759
11858
  result = {
11760
11859
  algorithm: {
11761
11860
  name: "AES-GCM",
11762
- iv: this.getRandomValues(new Uint8Array(16))
11861
+ iv: this.getRandomValues(/* @__PURE__ */ new Uint8Array(16))
11763
11862
  },
11764
11863
  usages: [
11765
11864
  "encrypt",
@@ -21404,7 +21503,7 @@ var require_build = /* @__PURE__ */ __commonJSMin(((exports) => {
21404
21503
  var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21405
21504
  function base(ALPHABET) {
21406
21505
  if (ALPHABET.length >= 255) throw new TypeError("Alphabet too long");
21407
- var BASE_MAP = new Uint8Array(256);
21506
+ var BASE_MAP = /* @__PURE__ */ new Uint8Array(256);
21408
21507
  for (var j = 0; j < BASE_MAP.length; j++) BASE_MAP[j] = 255;
21409
21508
  for (var i = 0; i < ALPHABET.length; i++) {
21410
21509
  var x = ALPHABET.charAt(i);
@@ -21451,7 +21550,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21451
21550
  }
21452
21551
  function decodeUnsafe(source) {
21453
21552
  if (typeof source !== "string") throw new TypeError("Expected String");
21454
- if (source.length === 0) return new Uint8Array();
21553
+ if (source.length === 0) return /* @__PURE__ */ new Uint8Array();
21455
21554
  var psz = 0;
21456
21555
  if (source[psz] === " ") return;
21457
21556
  var zeroes = 0;
@@ -25852,7 +25951,7 @@ const preloadedContexts = {
25852
25951
  } }
25853
25952
  };
25854
25953
  var name = "@fedify/vocab-runtime";
25855
- var version = "2.4.0-dev.1666+690d9b28";
25954
+ var version = "2.4.0-dev.1727+1eadcb04";
25856
25955
  const parametersNeedLowerCase = ["rel", "type"];
25857
25956
  const regexpLinkWhitespace = /[\n\r\s\t]/;
25858
25957
  function validateURI(uri) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/relay",
3
- "version": "2.4.0-dev.1666+690d9b28",
3
+ "version": "2.4.0-dev.1727+1eadcb04",
4
4
  "description": "ActivityPub relay support for Fedify",
5
5
  "keywords": [
6
6
  "Fedify",
@@ -47,14 +47,14 @@
47
47
  "dependencies": {
48
48
  "@logtape/logtape": "^2.2.0",
49
49
  "temporal-polyfill": "^1.0.1",
50
- "@fedify/fedify": "^2.4.0-dev.1666+690d9b28",
51
- "@fedify/vocab": "2.4.0-dev.1666+690d9b28"
50
+ "@fedify/fedify": "^2.4.0-dev.1727+1eadcb04",
51
+ "@fedify/vocab": "2.4.0-dev.1727+1eadcb04"
52
52
  },
53
53
  "devDependencies": {
54
54
  "tsdown": "^0.22.0",
55
55
  "typescript": "^6.0.0",
56
56
  "urlpattern-polyfill": "^10.1.0",
57
- "@fedify/vocab-runtime": "^2.4.0-dev.1666+690d9b28"
57
+ "@fedify/vocab-runtime": "^2.4.0-dev.1727+1eadcb04"
58
58
  },
59
59
  "scripts": {
60
60
  "build:self": "tsdown",