@fedify/vocab-runtime 2.5.0-dev.2314 → 2.5.0-dev.2327

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 (74) hide show
  1. package/deno.json +1 -1
  2. package/dist/{contexts-BK1CqBR5.cjs → contexts-B09jb9Pi.cjs} +11 -1
  3. package/dist/{contexts-DPuJ4UYL.js → contexts-DWrj4AGR.js} +11 -1
  4. package/dist/{docloader-CYwqh5Df.d.cts → docloader-BMHljyYb.d.cts} +2 -0
  5. package/dist/{docloader-CYwqh5Df.d.ts → docloader-BMHljyYb.d.ts} +2 -0
  6. package/dist/internal/jsonld-cache.d.cts +1 -1
  7. package/dist/internal/jsonld-cache.d.ts +1 -1
  8. package/dist/internal/portable-dereference.cjs +1 -1
  9. package/dist/internal/portable-dereference.d.cts +2 -2
  10. package/dist/internal/portable-dereference.d.ts +2 -2
  11. package/dist/internal/portable-dereference.js +1 -1
  12. package/dist/internal/signed-representation.cjs +1 -1
  13. package/dist/internal/signed-representation.js +1 -1
  14. package/dist/mod.cjs +48 -4
  15. package/dist/mod.d.cts +25 -4
  16. package/dist/mod.d.ts +25 -4
  17. package/dist/mod.js +48 -5
  18. package/dist/{portable-DqtfLy_1.d.cts → portable-6Aj-7dZJ.d.cts} +1 -1
  19. package/dist/{portable-DtWsu2yU.d.ts → portable-nkTiqH0w.d.ts} +1 -1
  20. package/dist/tests/{body-B-JHnPWW.mjs → body-B1gvksvz.mjs} +1 -1
  21. package/dist/tests/{body-Cdabr1gF.cjs → body-DPcflIg_.cjs} +1 -1
  22. package/dist/tests/body.test.cjs +1 -1
  23. package/dist/tests/body.test.mjs +1 -1
  24. package/dist/tests/{contexts-DizzBjz4.cjs → contexts-C9Lj11SC.cjs} +11 -1
  25. package/dist/tests/{contexts-CIKsin4e.mjs → contexts-duRA_dDC.mjs} +11 -1
  26. package/dist/tests/decimal.test.cjs +4 -3
  27. package/dist/tests/decimal.test.mjs +4 -3
  28. package/dist/tests/{docloader-CdSUfd2D.cjs → docloader-DL0C7__x.cjs} +5 -3
  29. package/dist/tests/{docloader-CdEifqZh.mjs → docloader-Fe5rKpYM.mjs} +5 -3
  30. package/dist/tests/docloader.test.cjs +127 -3
  31. package/dist/tests/docloader.test.mjs +127 -3
  32. package/dist/tests/internal/portable-dereference.test.cjs +2 -2
  33. package/dist/tests/internal/portable-dereference.test.mjs +2 -2
  34. package/dist/tests/jsonld-CmDhHNTx.cjs +12 -0
  35. package/dist/tests/jsonld-DweIJ07b.mjs +5 -0
  36. package/dist/tests/{jsonld-cache-C07AyNOY.cjs → jsonld-cache-BEXiiM-V.cjs} +6 -17
  37. package/dist/tests/{jsonld-cache-BPQmOZWD.mjs → jsonld-cache-DFnWsLuZ.mjs} +2 -5
  38. package/dist/tests/jsonld-cache.test.cjs +13 -12
  39. package/dist/tests/jsonld-cache.test.mjs +2 -1
  40. package/dist/tests/{langstr-CQ26J_L7.mjs → langstr-Dw8IBDZl.mjs} +5 -2
  41. package/dist/tests/{langstr-C4Fl80ae.cjs → langstr-h89Kjekh.cjs} +5 -2
  42. package/dist/tests/langstr.test.cjs +8 -1
  43. package/dist/tests/langstr.test.mjs +9 -2
  44. package/dist/tests/langtag-CD3zHKPN.mjs +40 -0
  45. package/dist/tests/langtag-DASCPgl3.cjs +45 -0
  46. package/dist/tests/langtag.test.cjs +45 -0
  47. package/dist/tests/langtag.test.d.cts +1 -0
  48. package/dist/tests/langtag.test.d.mts +1 -0
  49. package/dist/tests/langtag.test.mjs +46 -0
  50. package/dist/tests/{portable-dereference-DRE5bz-l.mjs → portable-dereference-DmTYDy2p.mjs} +3 -2
  51. package/dist/tests/{portable-dereference-BNXtgg5U.cjs → portable-dereference-qTLMqe2_.cjs} +3 -2
  52. package/dist/tests/{portable-media-dMmjIktg.mjs → portable-media-ChlisGkT.mjs} +2 -2
  53. package/dist/tests/{portable-media-DmLu1roX.cjs → portable-media-FwLJfqLl.cjs} +2 -2
  54. package/dist/tests/portable-media.test.cjs +1 -1
  55. package/dist/tests/portable-media.test.mjs +1 -1
  56. package/dist/tests/portable-workers.test.cjs +1 -1
  57. package/dist/tests/portable-workers.test.mjs +1 -1
  58. package/dist/tests/{request-BWfNh5cM.cjs → request-CZzX339k.cjs} +1 -1
  59. package/dist/tests/{request-DAbeUUyu.mjs → request-DG4GhpaX.mjs} +1 -1
  60. package/dist/tests/request.test.cjs +1 -1
  61. package/dist/tests/request.test.mjs +1 -1
  62. package/dist/tests/signed-representation.test.cjs +1 -1
  63. package/dist/tests/signed-representation.test.mjs +1 -1
  64. package/package.json +1 -1
  65. package/src/contexts/fep-6757.json +12 -0
  66. package/src/contexts/joinmastodon.json +1 -1
  67. package/src/contexts.ts +8 -0
  68. package/src/docloader.test.ts +148 -0
  69. package/src/docloader.ts +2 -0
  70. package/src/langstr.test.ts +18 -1
  71. package/src/langstr.ts +6 -2
  72. package/src/langtag.test.ts +53 -0
  73. package/src/langtag.ts +71 -0
  74. package/src/mod.ts +1 -0
package/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab-runtime",
3
- "version": "2.5.0-dev.2314+d73be480",
3
+ "version": "2.5.0-dev.2327+3a7ba490",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./src/mod.ts",
@@ -4438,6 +4438,16 @@ const preloadedContexts = {
4438
4438
  "@type": "@id"
4439
4439
  }
4440
4440
  } },
4441
+ "https://w3id.org/fep/6757": { "@context": {
4442
+ "license": {
4443
+ "@id": "http://purl.org/dc/terms/license",
4444
+ "@type": "@id"
4445
+ },
4446
+ "preferredLicense": {
4447
+ "@id": "https://w3id.org/fep/6757#preferredLicense",
4448
+ "@type": "@id"
4449
+ }
4450
+ } },
4441
4451
  "https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
4442
4452
  "as": "https://www.w3.org/ns/activitystreams#",
4443
4453
  "lemmy": "https://join-lemmy.org/ns#",
@@ -4489,7 +4499,7 @@ const preloadedContexts = {
4489
4499
  "suspended": "toot:suspended",
4490
4500
  "attributionDomains": {
4491
4501
  "@id": "toot:attributionDomains",
4492
- "@type": "@id"
4502
+ "@container": "@set"
4493
4503
  }
4494
4504
  } },
4495
4505
  "https://purl.archive.org/miscellany": { "@context": {
@@ -4438,6 +4438,16 @@ const preloadedContexts = {
4438
4438
  "@type": "@id"
4439
4439
  }
4440
4440
  } },
4441
+ "https://w3id.org/fep/6757": { "@context": {
4442
+ "license": {
4443
+ "@id": "http://purl.org/dc/terms/license",
4444
+ "@type": "@id"
4445
+ },
4446
+ "preferredLicense": {
4447
+ "@id": "https://w3id.org/fep/6757#preferredLicense",
4448
+ "@type": "@id"
4449
+ }
4450
+ } },
4441
4451
  "https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
4442
4452
  "as": "https://www.w3.org/ns/activitystreams#",
4443
4453
  "lemmy": "https://join-lemmy.org/ns#",
@@ -4489,7 +4499,7 @@ const preloadedContexts = {
4489
4499
  "suspended": "toot:suspended",
4490
4500
  "attributionDomains": {
4491
4501
  "@id": "toot:attributionDomains",
4492
- "@type": "@id"
4502
+ "@container": "@set"
4493
4503
  }
4494
4504
  } },
4495
4505
  "https://purl.archive.org/miscellany": { "@context": {
@@ -251,6 +251,8 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
251
251
  * - <https://w3id.org/security/multikey/v1>
252
252
  * - <https://w3id.org/fep/ef61>
253
253
  * - <https://w3id.org/fep/7aa9>
254
+ * - <https://w3id.org/fep/6757>
255
+ * - <https://w3id.org/fep/22cd>
254
256
  * - <https://purl.archive.org/socialweb/webfinger>
255
257
  * - <http://schema.org/>
256
258
  * @param options Options for the document loader.
@@ -251,6 +251,8 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
251
251
  * - <https://w3id.org/security/multikey/v1>
252
252
  * - <https://w3id.org/fep/ef61>
253
253
  * - <https://w3id.org/fep/7aa9>
254
+ * - <https://w3id.org/fep/6757>
255
+ * - <https://w3id.org/fep/22cd>
254
256
  * - <https://purl.archive.org/socialweb/webfinger>
255
257
  * - <http://schema.org/>
256
258
  * @param options Options for the document loader.
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as DocumentLoader } from "../docloader-CYwqh5Df.cjs";
2
+ import { n as DocumentLoader } from "../docloader-BMHljyYb.cjs";
3
3
 
4
4
  //#region src/internal/jsonld-cache.d.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as DocumentLoader } from "../docloader-CYwqh5Df.js";
2
+ import { n as DocumentLoader } from "../docloader-BMHljyYb.js";
3
3
 
4
4
  //#region src/internal/jsonld-cache.d.ts
5
5
  /**
@@ -1,6 +1,6 @@
1
1
 
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_contexts = require("../contexts-BK1CqBR5.cjs");
3
+ const require_contexts = require("../contexts-B09jb9Pi.cjs");
4
4
  const require_url = require("../url-DrGTR8yv.cjs");
5
5
  const require_jsonld = require("../jsonld.cjs");
6
6
  const require_internal_jsonld_cache = require("./jsonld-cache.cjs");
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as DocumentLoader, s as RemoteDocument } from "../docloader-CYwqh5Df.cjs";
3
- import { r as PortableObjectVerifier } from "../portable-DqtfLy_1.cjs";
2
+ import { n as DocumentLoader, s as RemoteDocument } from "../docloader-BMHljyYb.cjs";
3
+ import { r as PortableObjectVerifier } from "../portable-6Aj-7dZJ.cjs";
4
4
  import { Span, TracerProvider } from "@opentelemetry/api";
5
5
 
6
6
  //#region src/internal/portable-dereference.d.ts
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as DocumentLoader, s as RemoteDocument } from "../docloader-CYwqh5Df.js";
3
- import { r as PortableObjectVerifier } from "../portable-DtWsu2yU.js";
2
+ import { n as DocumentLoader, s as RemoteDocument } from "../docloader-BMHljyYb.js";
3
+ import { r as PortableObjectVerifier } from "../portable-nkTiqH0w.js";
4
4
  import { Span, TracerProvider } from "@opentelemetry/api";
5
5
 
6
6
  //#region src/internal/portable-dereference.d.ts
@@ -1,5 +1,5 @@
1
1
 
2
- import { t as preloadedContexts } from "../contexts-DPuJ4UYL.js";
2
+ import { t as preloadedContexts } from "../contexts-DWrj4AGR.js";
3
3
  import { _ as parseIri, h as parseGatewayOrigin, i as canonicalizePortableUri, o as formatIri, s as fromCompatibleEf61Id, t as GATEWAY_HINT_PARAMETER, u as haveSameFe34Origin, y as toCompatibleEf61Id } from "../url-Dzyp-NsC.js";
4
4
  import jsonld_default from "../jsonld.js";
5
5
  import { createScopedContextLoader, registerDocumentLoaderWrapper, unwrapReleasedDocumentLoader } from "./jsonld-cache.js";
@@ -1,6 +1,6 @@
1
1
 
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_contexts = require("../contexts-BK1CqBR5.cjs");
3
+ const require_contexts = require("../contexts-B09jb9Pi.cjs");
4
4
  //#region src/internal/signed-representation.ts
5
5
  const RETAINED_SIGNED_REPRESENTATION = Symbol.for("@fedify/vocab-runtime.signedRepresentation.v1");
6
6
  const SIGNED_VALUE_SCOPE = Symbol.for("@fedify/vocab-runtime.signedValueScope.v1");
@@ -1,5 +1,5 @@
1
1
 
2
- import { t as preloadedContexts } from "../contexts-DPuJ4UYL.js";
2
+ import { t as preloadedContexts } from "../contexts-DWrj4AGR.js";
3
3
  //#region src/internal/signed-representation.ts
4
4
  const RETAINED_SIGNED_REPRESENTATION = Symbol.for("@fedify/vocab-runtime.signedRepresentation.v1");
5
5
  const SIGNED_VALUE_SCOPE = Symbol.for("@fedify/vocab-runtime.signedValueScope.v1");
package/dist/mod.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const require_rolldown_runtime = require("./rolldown-runtime-B7lfambq.cjs");
4
- const require_contexts = require("./contexts-BK1CqBR5.cjs");
4
+ const require_contexts = require("./contexts-B09jb9Pi.cjs");
5
5
  const require_url = require("./url-DrGTR8yv.cjs");
6
6
  let _logtape_logtape = require("@logtape/logtape");
7
7
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -16,7 +16,7 @@ let _multiformats_base_x = require("@multiformats/base-x");
16
16
  _multiformats_base_x = require_rolldown_runtime.__toESM(_multiformats_base_x, 1);
17
17
  //#region deno.json
18
18
  var name = "@fedify/vocab-runtime";
19
- var version = "2.5.0-dev.2314+d73be480";
19
+ var version = "2.5.0-dev.2327+3a7ba490";
20
20
  //#endregion
21
21
  //#region src/request.ts
22
22
  /**
@@ -674,6 +674,8 @@ function withDocumentLoaderTimeout(loader, timeout) {
674
674
  * - <https://w3id.org/security/multikey/v1>
675
675
  * - <https://w3id.org/fep/ef61>
676
676
  * - <https://w3id.org/fep/7aa9>
677
+ * - <https://w3id.org/fep/6757>
678
+ * - <https://w3id.org/fep/22cd>
677
679
  * - <https://purl.archive.org/socialweb/webfinger>
678
680
  * - <http://schema.org/>
679
681
  * @param options Options for the document loader.
@@ -1553,6 +1555,45 @@ async function verifyHashlink(bytes, hashlink) {
1553
1555
  return await verifyDigestMultibase(bytes, extractDigestMultibase(hashlink));
1554
1556
  }
1555
1557
  //#endregion
1558
+ //#region src/langtag.ts
1559
+ const EXTLANG_PAIRS = new Set(Object.entries({
1560
+ ar: "aao abh abv acm acq acw acx acy adf aeb aec afb ajp apc apd arb arq ars ary arz auz avl ayh ayl ayn ayp bbz pga shu ssh",
1561
+ kok: "gom knn",
1562
+ lv: "ltg lvs",
1563
+ ms: "bjn btj bve bvu coa dup hji jak jax kvb kvr kxd lce lcf liw max meo mfa mfb min mqg msi mui orn ors pel pse tmw urk vkk vkt xmm zlm zmi zsm",
1564
+ sgn: "ads aed aen afg ajs ase asf asp asq asw bfi bfk bog bqn bqy bvl bzs cds csc csd cse csf csg csl csn csq csr csx doq dse dsl dsz dyl ecs ehs esl esn eso eth fcs fse fsl fss gds gse gsg gsm gss gus hab haf hds hks hos hps hsh hsl icl iks ils inl ins ise isg isr jcs jhs jks jls jos jsl jus kgi kvk lbs lgs lls lsb lsc lsg lsl lsn lso lsp lst lsv lsw lsy lws mdl mfs mre msd msr mzc mzg mzy nbs ncs nsi nsl nsp nsr nzs okl pgz pks prl prz psc psd psg psl pso psp psr pys rib rms rnb rsi rsl rsm rsn sdl sfb sfs sgg sgx slf sls sqk sqs sqx ssp ssr svk swl syy szs tse tsm tsq tss tsy tza ugn ugy ukl uks vgt vsi vsl vsv wbs xki xml xms yds ygs yhs ysl ysm zhk zib zsl",
1565
+ sw: "swc swh",
1566
+ uz: "uzn uzs",
1567
+ zh: "cdo cjy cmn cnp cpx csp czh czo gan hak hnm hsn luh lzh mnp nan sjc wuu yue"
1568
+ }).flatMap(([prefix, extlangs]) => extlangs.split(" ").map((extlang) => `${prefix}-${extlang}`)));
1569
+ const PREFIX_PATTERN = /^[A-Za-z]{2,3}$/;
1570
+ const EXTLANG_PATTERN = /^[A-Za-z]{3}$/;
1571
+ /**
1572
+ * Normalizes a BCP 47 language tag that has an extended language subtag
1573
+ * (extlang), such as `zh-yue`, into its canonical form, such as `yue`, as
1574
+ * described in [RFC 5646, Section 4.5][1]. `Intl.Locale` rejects extlang
1575
+ * tags, so tags should be normalized before being passed to it.
1576
+ *
1577
+ * Only registered extlangs that follow their registered prefix are removed;
1578
+ * any other tag is returned unchanged, so the result still needs to be
1579
+ * validated, e.g., by `Intl.Locale`.
1580
+ *
1581
+ * [1]: https://www.rfc-editor.org/rfc/rfc5646.html#section-4.5
1582
+ *
1583
+ * @param tag The BCP 47 language tag to normalize.
1584
+ * @returns The normalized language tag.
1585
+ * @since 2.5.0
1586
+ */
1587
+ function normalizeLanguageTag(tag) {
1588
+ const subtags = tag.split("-");
1589
+ if (subtags.length < 2) return tag;
1590
+ const [prefix, extlang, ...rest] = subtags;
1591
+ if (!PREFIX_PATTERN.test(prefix) || !EXTLANG_PATTERN.test(extlang)) return tag;
1592
+ const language = extlang.toLowerCase();
1593
+ if (!EXTLANG_PAIRS.has(`${prefix.toLowerCase()}-${language}`)) return tag;
1594
+ return [language, ...rest].join("-");
1595
+ }
1596
+ //#endregion
1556
1597
  //#region src/langstr.ts
1557
1598
  /**
1558
1599
  * A language-tagged string which corresponds to the `rdf:langString` type.
@@ -1567,11 +1608,13 @@ var LanguageString = class extends String {
1567
1608
  * Constructs a new `LanguageString`.
1568
1609
  * @param value A string value written in the given language.
1569
1610
  * @param language The language of the string. If a string is given, it will
1570
- * be parsed as a `Intl.Locale` object.
1611
+ * be parsed as a `Intl.Locale` object. Extended language
1612
+ * subtags are normalized first, e.g., `zh-yue` is parsed as
1613
+ * `yue`.
1571
1614
  */
1572
1615
  constructor(value, language) {
1573
1616
  super(value);
1574
- this.locale = typeof language === "string" ? new Intl.Locale(language) : language;
1617
+ this.locale = typeof language === "string" ? new Intl.Locale(normalizeLanguageTag(language)) : language;
1575
1618
  }
1576
1619
  };
1577
1620
  LanguageString.prototype[Symbol.for("Deno.customInspect")] = function(inspect, options) {
@@ -1760,6 +1803,7 @@ exports.isGatewayUrl = require_url.isGatewayUrl;
1760
1803
  exports.isValidPublicIPv4Address = require_url.isValidPublicIPv4Address;
1761
1804
  exports.isValidPublicIPv6Address = require_url.isValidPublicIPv6Address;
1762
1805
  exports.logRequest = logRequest;
1806
+ exports.normalizeLanguageTag = normalizeLanguageTag;
1763
1807
  exports.parseDecimal = parseDecimal;
1764
1808
  exports.parseDidKeyVerificationMethod = parseDidKeyVerificationMethod;
1765
1809
  exports.parseDigestMultibase = parseDigestMultibase;
package/dist/mod.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { _ as logRequest, a as DocumentLoaderOptions, c as getDocumentLoader, d as withDocumentLoaderTimeout, f as CreateRequestOptions, g as getUserAgent, h as createActivityPubRequest, i as DocumentLoaderFactoryOptions, l as getRemoteDocument, m as GetUserAgentOptions, n as DocumentLoader, o as GetDocumentLoaderOptions, p as FetchError, r as DocumentLoaderFactory, s as RemoteDocument, t as AuthenticatedDocumentLoaderFactory, u as resolveDocumentLoaderTimeout } from "./docloader-CYwqh5Df.cjs";
3
- import { i as PortableObjectVerifierOptions, n as PortableObjectVerification, r as PortableObjectVerifier, t as PortableObjectReferrer } from "./portable-DqtfLy_1.cjs";
2
+ import { _ as logRequest, a as DocumentLoaderOptions, c as getDocumentLoader, d as withDocumentLoaderTimeout, f as CreateRequestOptions, g as getUserAgent, h as createActivityPubRequest, i as DocumentLoaderFactoryOptions, l as getRemoteDocument, m as GetUserAgentOptions, n as DocumentLoader, o as GetDocumentLoaderOptions, p as FetchError, r as DocumentLoaderFactory, s as RemoteDocument, t as AuthenticatedDocumentLoaderFactory, u as resolveDocumentLoaderTimeout } from "./docloader-BMHljyYb.cjs";
3
+ import { i as PortableObjectVerifierOptions, n as PortableObjectVerification, r as PortableObjectVerifier, t as PortableObjectReferrer } from "./portable-6Aj-7dZJ.cjs";
4
4
  import { TracerProvider } from "@opentelemetry/api";
5
5
 
6
6
  //#region src/contexts.d.ts
@@ -307,11 +307,32 @@ declare class LanguageString extends String {
307
307
  * Constructs a new `LanguageString`.
308
308
  * @param value A string value written in the given language.
309
309
  * @param language The language of the string. If a string is given, it will
310
- * be parsed as a `Intl.Locale` object.
310
+ * be parsed as a `Intl.Locale` object. Extended language
311
+ * subtags are normalized first, e.g., `zh-yue` is parsed as
312
+ * `yue`.
311
313
  */
312
314
  constructor(value: string, language: Intl.Locale | string);
313
315
  }
314
316
  //#endregion
317
+ //#region src/langtag.d.ts
318
+ /**
319
+ * Normalizes a BCP 47 language tag that has an extended language subtag
320
+ * (extlang), such as `zh-yue`, into its canonical form, such as `yue`, as
321
+ * described in [RFC 5646, Section 4.5][1]. `Intl.Locale` rejects extlang
322
+ * tags, so tags should be normalized before being passed to it.
323
+ *
324
+ * Only registered extlangs that follow their registered prefix are removed;
325
+ * any other tag is returned unchanged, so the result still needs to be
326
+ * validated, e.g., by `Intl.Locale`.
327
+ *
328
+ * [1]: https://www.rfc-editor.org/rfc/rfc5646.html#section-4.5
329
+ *
330
+ * @param tag The BCP 47 language tag to normalize.
331
+ * @returns The normalized language tag.
332
+ * @since 2.5.0
333
+ */
334
+ declare function normalizeLanguageTag(tag: string): string;
335
+ //#endregion
315
336
  //#region src/portable-media.d.ts
316
337
  /** A link or document with an external resource and its integrity digest. */
317
338
  interface PortableMedia {
@@ -782,4 +803,4 @@ declare function isValidPublicIPv4Address(address: string): boolean;
782
803
  declare function isValidPublicIPv6Address(address: string): boolean;
783
804
  declare function expandIPv6Address(address: string): string;
784
805
  //#endregion
785
- export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DidKeyVerificationMethod, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type FetchPortableMediaOptions, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type ParsedDigestMultibase, type ParsedHashlink, type PortableMedia, type PortableObjectReferrer, type PortableObjectVerification, type PortableObjectVerifier, type PortableObjectVerifierOptions, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, computeDigestMultibase, createActivityPubRequest, createHashlink, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, fetchPortableMedia, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, getGatewayHints, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, parseDidKeyVerificationMethod, parseDigestMultibase, parseGatewayUrl, parseHashlink, parseIri, parseJsonLdId, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl, verifyDigestMultibase, verifyHashlink, withDocumentLoaderTimeout, withGatewayHints, withoutGatewayHints };
806
+ export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DidKeyVerificationMethod, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type FetchPortableMediaOptions, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type ParsedDigestMultibase, type ParsedHashlink, type PortableMedia, type PortableObjectReferrer, type PortableObjectVerification, type PortableObjectVerifier, type PortableObjectVerifierOptions, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, computeDigestMultibase, createActivityPubRequest, createHashlink, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, fetchPortableMedia, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, getGatewayHints, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, normalizeLanguageTag, parseDecimal, parseDidKeyVerificationMethod, parseDigestMultibase, parseGatewayUrl, parseHashlink, parseIri, parseJsonLdId, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl, verifyDigestMultibase, verifyHashlink, withDocumentLoaderTimeout, withGatewayHints, withoutGatewayHints };
package/dist/mod.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { _ as logRequest, a as DocumentLoaderOptions, c as getDocumentLoader, d as withDocumentLoaderTimeout, f as CreateRequestOptions, g as getUserAgent, h as createActivityPubRequest, i as DocumentLoaderFactoryOptions, l as getRemoteDocument, m as GetUserAgentOptions, n as DocumentLoader, o as GetDocumentLoaderOptions, p as FetchError, r as DocumentLoaderFactory, s as RemoteDocument, t as AuthenticatedDocumentLoaderFactory, u as resolveDocumentLoaderTimeout } from "./docloader-CYwqh5Df.js";
3
- import { i as PortableObjectVerifierOptions, n as PortableObjectVerification, r as PortableObjectVerifier, t as PortableObjectReferrer } from "./portable-DtWsu2yU.js";
2
+ import { _ as logRequest, a as DocumentLoaderOptions, c as getDocumentLoader, d as withDocumentLoaderTimeout, f as CreateRequestOptions, g as getUserAgent, h as createActivityPubRequest, i as DocumentLoaderFactoryOptions, l as getRemoteDocument, m as GetUserAgentOptions, n as DocumentLoader, o as GetDocumentLoaderOptions, p as FetchError, r as DocumentLoaderFactory, s as RemoteDocument, t as AuthenticatedDocumentLoaderFactory, u as resolveDocumentLoaderTimeout } from "./docloader-BMHljyYb.js";
3
+ import { i as PortableObjectVerifierOptions, n as PortableObjectVerification, r as PortableObjectVerifier, t as PortableObjectReferrer } from "./portable-nkTiqH0w.js";
4
4
  import { TracerProvider } from "@opentelemetry/api";
5
5
  //#region src/contexts.d.ts
6
6
  declare const preloadedContexts: Record<string, unknown>;
@@ -306,11 +306,32 @@ declare class LanguageString extends String {
306
306
  * Constructs a new `LanguageString`.
307
307
  * @param value A string value written in the given language.
308
308
  * @param language The language of the string. If a string is given, it will
309
- * be parsed as a `Intl.Locale` object.
309
+ * be parsed as a `Intl.Locale` object. Extended language
310
+ * subtags are normalized first, e.g., `zh-yue` is parsed as
311
+ * `yue`.
310
312
  */
311
313
  constructor(value: string, language: Intl.Locale | string);
312
314
  }
313
315
  //#endregion
316
+ //#region src/langtag.d.ts
317
+ /**
318
+ * Normalizes a BCP 47 language tag that has an extended language subtag
319
+ * (extlang), such as `zh-yue`, into its canonical form, such as `yue`, as
320
+ * described in [RFC 5646, Section 4.5][1]. `Intl.Locale` rejects extlang
321
+ * tags, so tags should be normalized before being passed to it.
322
+ *
323
+ * Only registered extlangs that follow their registered prefix are removed;
324
+ * any other tag is returned unchanged, so the result still needs to be
325
+ * validated, e.g., by `Intl.Locale`.
326
+ *
327
+ * [1]: https://www.rfc-editor.org/rfc/rfc5646.html#section-4.5
328
+ *
329
+ * @param tag The BCP 47 language tag to normalize.
330
+ * @returns The normalized language tag.
331
+ * @since 2.5.0
332
+ */
333
+ declare function normalizeLanguageTag(tag: string): string;
334
+ //#endregion
314
335
  //#region src/portable-media.d.ts
315
336
  /** A link or document with an external resource and its integrity digest. */
316
337
  interface PortableMedia {
@@ -781,4 +802,4 @@ declare function isValidPublicIPv4Address(address: string): boolean;
781
802
  declare function isValidPublicIPv6Address(address: string): boolean;
782
803
  declare function expandIPv6Address(address: string): string;
783
804
  //#endregion
784
- export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DidKeyVerificationMethod, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type FetchPortableMediaOptions, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type ParsedDigestMultibase, type ParsedHashlink, type PortableMedia, type PortableObjectReferrer, type PortableObjectVerification, type PortableObjectVerifier, type PortableObjectVerifierOptions, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, computeDigestMultibase, createActivityPubRequest, createHashlink, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, fetchPortableMedia, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, getGatewayHints, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, parseDidKeyVerificationMethod, parseDigestMultibase, parseGatewayUrl, parseHashlink, parseIri, parseJsonLdId, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl, verifyDigestMultibase, verifyHashlink, withDocumentLoaderTimeout, withGatewayHints, withoutGatewayHints };
805
+ export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DidKeyVerificationMethod, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type FetchPortableMediaOptions, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type ParsedDigestMultibase, type ParsedHashlink, type PortableMedia, type PortableObjectReferrer, type PortableObjectVerification, type PortableObjectVerifier, type PortableObjectVerifierOptions, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, computeDigestMultibase, createActivityPubRequest, createHashlink, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, fetchPortableMedia, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, getGatewayHints, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, normalizeLanguageTag, parseDecimal, parseDidKeyVerificationMethod, parseDigestMultibase, parseGatewayUrl, parseHashlink, parseIri, parseJsonLdId, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl, verifyDigestMultibase, verifyHashlink, withDocumentLoaderTimeout, withGatewayHints, withoutGatewayHints };
package/dist/mod.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import { t as preloadedContexts } from "./contexts-DPuJ4UYL.js";
2
+ import { t as preloadedContexts } from "./contexts-DWrj4AGR.js";
3
3
  import { S as withoutGatewayHints, _ as parseIri, a as expandIPv6Address, b as validatePublicUrl, c as getFe34Origin, d as haveSameIriOrigin, f as isGatewayUrl, g as parseGatewayUrl, i as canonicalizePortableUri, l as getGatewayHints, m as isValidPublicIPv6Address, n as UrlError, o as formatIri, p as isValidPublicIPv4Address, r as arePortableUrisEqual, s as fromCompatibleEf61Id, u as haveSameFe34Origin, v as parseJsonLdId, x as withGatewayHints, y as toCompatibleEf61Id } from "./url-Dzyp-NsC.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -12,7 +12,7 @@ import { PublicKeyInfo } from "pkijs";
12
12
  import baseX from "@multiformats/base-x";
13
13
  //#region deno.json
14
14
  var name = "@fedify/vocab-runtime";
15
- var version = "2.5.0-dev.2314+d73be480";
15
+ var version = "2.5.0-dev.2327+3a7ba490";
16
16
  //#endregion
17
17
  //#region src/request.ts
18
18
  /**
@@ -670,6 +670,8 @@ function withDocumentLoaderTimeout(loader, timeout) {
670
670
  * - <https://w3id.org/security/multikey/v1>
671
671
  * - <https://w3id.org/fep/ef61>
672
672
  * - <https://w3id.org/fep/7aa9>
673
+ * - <https://w3id.org/fep/6757>
674
+ * - <https://w3id.org/fep/22cd>
673
675
  * - <https://purl.archive.org/socialweb/webfinger>
674
676
  * - <http://schema.org/>
675
677
  * @param options Options for the document loader.
@@ -1549,6 +1551,45 @@ async function verifyHashlink(bytes, hashlink) {
1549
1551
  return await verifyDigestMultibase(bytes, extractDigestMultibase(hashlink));
1550
1552
  }
1551
1553
  //#endregion
1554
+ //#region src/langtag.ts
1555
+ const EXTLANG_PAIRS = new Set(Object.entries({
1556
+ ar: "aao abh abv acm acq acw acx acy adf aeb aec afb ajp apc apd arb arq ars ary arz auz avl ayh ayl ayn ayp bbz pga shu ssh",
1557
+ kok: "gom knn",
1558
+ lv: "ltg lvs",
1559
+ ms: "bjn btj bve bvu coa dup hji jak jax kvb kvr kxd lce lcf liw max meo mfa mfb min mqg msi mui orn ors pel pse tmw urk vkk vkt xmm zlm zmi zsm",
1560
+ sgn: "ads aed aen afg ajs ase asf asp asq asw bfi bfk bog bqn bqy bvl bzs cds csc csd cse csf csg csl csn csq csr csx doq dse dsl dsz dyl ecs ehs esl esn eso eth fcs fse fsl fss gds gse gsg gsm gss gus hab haf hds hks hos hps hsh hsl icl iks ils inl ins ise isg isr jcs jhs jks jls jos jsl jus kgi kvk lbs lgs lls lsb lsc lsg lsl lsn lso lsp lst lsv lsw lsy lws mdl mfs mre msd msr mzc mzg mzy nbs ncs nsi nsl nsp nsr nzs okl pgz pks prl prz psc psd psg psl pso psp psr pys rib rms rnb rsi rsl rsm rsn sdl sfb sfs sgg sgx slf sls sqk sqs sqx ssp ssr svk swl syy szs tse tsm tsq tss tsy tza ugn ugy ukl uks vgt vsi vsl vsv wbs xki xml xms yds ygs yhs ysl ysm zhk zib zsl",
1561
+ sw: "swc swh",
1562
+ uz: "uzn uzs",
1563
+ zh: "cdo cjy cmn cnp cpx csp czh czo gan hak hnm hsn luh lzh mnp nan sjc wuu yue"
1564
+ }).flatMap(([prefix, extlangs]) => extlangs.split(" ").map((extlang) => `${prefix}-${extlang}`)));
1565
+ const PREFIX_PATTERN = /^[A-Za-z]{2,3}$/;
1566
+ const EXTLANG_PATTERN = /^[A-Za-z]{3}$/;
1567
+ /**
1568
+ * Normalizes a BCP 47 language tag that has an extended language subtag
1569
+ * (extlang), such as `zh-yue`, into its canonical form, such as `yue`, as
1570
+ * described in [RFC 5646, Section 4.5][1]. `Intl.Locale` rejects extlang
1571
+ * tags, so tags should be normalized before being passed to it.
1572
+ *
1573
+ * Only registered extlangs that follow their registered prefix are removed;
1574
+ * any other tag is returned unchanged, so the result still needs to be
1575
+ * validated, e.g., by `Intl.Locale`.
1576
+ *
1577
+ * [1]: https://www.rfc-editor.org/rfc/rfc5646.html#section-4.5
1578
+ *
1579
+ * @param tag The BCP 47 language tag to normalize.
1580
+ * @returns The normalized language tag.
1581
+ * @since 2.5.0
1582
+ */
1583
+ function normalizeLanguageTag(tag) {
1584
+ const subtags = tag.split("-");
1585
+ if (subtags.length < 2) return tag;
1586
+ const [prefix, extlang, ...rest] = subtags;
1587
+ if (!PREFIX_PATTERN.test(prefix) || !EXTLANG_PATTERN.test(extlang)) return tag;
1588
+ const language = extlang.toLowerCase();
1589
+ if (!EXTLANG_PAIRS.has(`${prefix.toLowerCase()}-${language}`)) return tag;
1590
+ return [language, ...rest].join("-");
1591
+ }
1592
+ //#endregion
1552
1593
  //#region src/langstr.ts
1553
1594
  /**
1554
1595
  * A language-tagged string which corresponds to the `rdf:langString` type.
@@ -1563,11 +1604,13 @@ var LanguageString = class extends String {
1563
1604
  * Constructs a new `LanguageString`.
1564
1605
  * @param value A string value written in the given language.
1565
1606
  * @param language The language of the string. If a string is given, it will
1566
- * be parsed as a `Intl.Locale` object.
1607
+ * be parsed as a `Intl.Locale` object. Extended language
1608
+ * subtags are normalized first, e.g., `zh-yue` is parsed as
1609
+ * `yue`.
1567
1610
  */
1568
1611
  constructor(value, language) {
1569
1612
  super(value);
1570
- this.locale = typeof language === "string" ? new Intl.Locale(language) : language;
1613
+ this.locale = typeof language === "string" ? new Intl.Locale(normalizeLanguageTag(language)) : language;
1571
1614
  }
1572
1615
  };
1573
1616
  LanguageString.prototype[Symbol.for("Deno.customInspect")] = function(inspect, options) {
@@ -1720,4 +1763,4 @@ async function fetchPortableMedia(media, options = {}) {
1720
1763
  }, options.signal, timeout);
1721
1764
  }
1722
1765
  //#endregion
1723
- export { FetchError, LanguageString, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, computeDigestMultibase, createActivityPubRequest, createHashlink, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, fetchPortableMedia, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, getGatewayHints, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, parseDidKeyVerificationMethod, parseDigestMultibase, parseGatewayUrl, parseHashlink, parseIri, parseJsonLdId, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl, verifyDigestMultibase, verifyHashlink, withDocumentLoaderTimeout, withGatewayHints, withoutGatewayHints };
1766
+ export { FetchError, LanguageString, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, computeDigestMultibase, createActivityPubRequest, createHashlink, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, fetchPortableMedia, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, getGatewayHints, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, normalizeLanguageTag, parseDecimal, parseDidKeyVerificationMethod, parseDigestMultibase, parseGatewayUrl, parseHashlink, parseIri, parseJsonLdId, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl, verifyDigestMultibase, verifyHashlink, withDocumentLoaderTimeout, withGatewayHints, withoutGatewayHints };
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as DocumentLoader } from "./docloader-CYwqh5Df.cjs";
2
+ import { n as DocumentLoader } from "./docloader-BMHljyYb.cjs";
3
3
  import { TracerProvider } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/portable.d.ts
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as DocumentLoader } from "./docloader-CYwqh5Df.js";
2
+ import { n as DocumentLoader } from "./docloader-BMHljyYb.js";
3
3
  import { TracerProvider } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/portable.d.ts
@@ -1,4 +1,4 @@
1
- import { t as FetchError } from "./request-DAbeUUyu.mjs";
1
+ import { t as FetchError } from "./request-DG4GhpaX.mjs";
2
2
  import { getLogger } from "@logtape/logtape";
3
3
  //#region src/body.ts
4
4
  /** Decoded JSON body limit: 16 MiB. @internal */
@@ -1,4 +1,4 @@
1
- const require_request = require("./request-BWfNh5cM.cjs");
1
+ const require_request = require("./request-CZzX339k.cjs");
2
2
  let _logtape_logtape = require("@logtape/logtape");
3
3
  //#region src/body.ts
4
4
  /** Decoded JSON body limit: 16 MiB. @internal */
@@ -1,4 +1,4 @@
1
- const require_body = require("./body-Cdabr1gF.cjs");
1
+ const require_body = require("./body-DPcflIg_.cjs");
2
2
  let node_assert_strict = require("node:assert/strict");
3
3
  let node_test = require("node:test");
4
4
  let node_zlib = require("node:zlib");
@@ -1,4 +1,4 @@
1
- import { i as readBoundedText, t as BodyTooLargeError } from "./body-B-JHnPWW.mjs";
1
+ import { i as readBoundedText, t as BodyTooLargeError } from "./body-B1gvksvz.mjs";
2
2
  import { deepStrictEqual, ok, rejects } from "node:assert/strict";
3
3
  import { test } from "node:test";
4
4
  import { gunzipSync, gzipSync } from "node:zlib";
@@ -4442,6 +4442,16 @@ const preloadedContexts = {
4442
4442
  "@type": "@id"
4443
4443
  }
4444
4444
  } },
4445
+ "https://w3id.org/fep/6757": { "@context": {
4446
+ "license": {
4447
+ "@id": "http://purl.org/dc/terms/license",
4448
+ "@type": "@id"
4449
+ },
4450
+ "preferredLicense": {
4451
+ "@id": "https://w3id.org/fep/6757#preferredLicense",
4452
+ "@type": "@id"
4453
+ }
4454
+ } },
4445
4455
  "https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
4446
4456
  "as": "https://www.w3.org/ns/activitystreams#",
4447
4457
  "lemmy": "https://join-lemmy.org/ns#",
@@ -4493,7 +4503,7 @@ const preloadedContexts = {
4493
4503
  "suspended": "toot:suspended",
4494
4504
  "attributionDomains": {
4495
4505
  "@id": "toot:attributionDomains",
4496
- "@type": "@id"
4506
+ "@container": "@set"
4497
4507
  }
4498
4508
  } },
4499
4509
  "https://purl.archive.org/miscellany": { "@context": {
@@ -4442,6 +4442,16 @@ const preloadedContexts = {
4442
4442
  "@type": "@id"
4443
4443
  }
4444
4444
  } },
4445
+ "https://w3id.org/fep/6757": { "@context": {
4446
+ "license": {
4447
+ "@id": "http://purl.org/dc/terms/license",
4448
+ "@type": "@id"
4449
+ },
4450
+ "preferredLicense": {
4451
+ "@id": "https://w3id.org/fep/6757#preferredLicense",
4452
+ "@type": "@id"
4453
+ }
4454
+ } },
4445
4455
  "https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
4446
4456
  "as": "https://www.w3.org/ns/activitystreams#",
4447
4457
  "lemmy": "https://join-lemmy.org/ns#",
@@ -4493,7 +4503,7 @@ const preloadedContexts = {
4493
4503
  "suspended": "toot:suspended",
4494
4504
  "attributionDomains": {
4495
4505
  "@id": "toot:attributionDomains",
4496
- "@type": "@id"
4506
+ "@container": "@set"
4497
4507
  }
4498
4508
  } },
4499
4509
  "https://purl.archive.org/miscellany": { "@context": {
@@ -1,10 +1,11 @@
1
1
  require("./url-BNakuZ8k.cjs");
2
- require("./docloader-CdSUfd2D.cjs");
2
+ require("./docloader-DL0C7__x.cjs");
3
3
  require("./key-C-AYkdJJ.cjs");
4
4
  require("./multibase-B5Mea7Ip.cjs");
5
5
  require("./digest-3FeH2Y-Q.cjs");
6
- require("./langstr-C4Fl80ae.cjs");
7
- require("./portable-media-DmLu1roX.cjs");
6
+ require("./langtag-DASCPgl3.cjs");
7
+ require("./langstr-h89Kjekh.cjs");
8
+ require("./portable-media-FwLJfqLl.cjs");
8
9
  let node_test = require("node:test");
9
10
  let node_assert = require("node:assert");
10
11
  //#region src/decimal.ts
@@ -1,10 +1,11 @@
1
1
  import "./url-DMxmp7ZG.mjs";
2
- import "./docloader-CdEifqZh.mjs";
2
+ import "./docloader-Fe5rKpYM.mjs";
3
3
  import "./key-C2Db_TAJ.mjs";
4
4
  import "./multibase-BPnF_L4e.mjs";
5
5
  import "./digest-COC7xDiQ.mjs";
6
- import "./langstr-CQ26J_L7.mjs";
7
- import "./portable-media-dMmjIktg.mjs";
6
+ import "./langtag-CD3zHKPN.mjs";
7
+ import "./langstr-Dw8IBDZl.mjs";
8
+ import "./portable-media-ChlisGkT.mjs";
8
9
  import { test } from "node:test";
9
10
  import { deepStrictEqual, throws } from "node:assert";
10
11
  //#region src/decimal.ts
@@ -1,6 +1,6 @@
1
- const require_request = require("./request-BWfNh5cM.cjs");
2
- const require_body = require("./body-Cdabr1gF.cjs");
3
- const require_contexts = require("./contexts-DizzBjz4.cjs");
1
+ const require_request = require("./request-CZzX339k.cjs");
2
+ const require_body = require("./body-DPcflIg_.cjs");
3
+ const require_contexts = require("./contexts-C9Lj11SC.cjs");
4
4
  const require_link = require("./link-DlKm8bEr.cjs");
5
5
  const require_url = require("./url-BNakuZ8k.cjs");
6
6
  let _logtape_logtape = require("@logtape/logtape");
@@ -277,6 +277,8 @@ function withDocumentLoaderTimeout(loader, timeout) {
277
277
  * - <https://w3id.org/security/multikey/v1>
278
278
  * - <https://w3id.org/fep/ef61>
279
279
  * - <https://w3id.org/fep/7aa9>
280
+ * - <https://w3id.org/fep/6757>
281
+ * - <https://w3id.org/fep/22cd>
280
282
  * - <https://purl.archive.org/socialweb/webfinger>
281
283
  * - <http://schema.org/>
282
284
  * @param options Options for the document loader.
@@ -1,6 +1,6 @@
1
- import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-DAbeUUyu.mjs";
2
- import { i as readBoundedText, n as MAX_BODY_SIZE, r as readBoundedBytes, t as BodyTooLargeError } from "./body-B-JHnPWW.mjs";
3
- import { t as preloadedContexts } from "./contexts-CIKsin4e.mjs";
1
+ import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-DG4GhpaX.mjs";
2
+ import { i as readBoundedText, n as MAX_BODY_SIZE, r as readBoundedBytes, t as BodyTooLargeError } from "./body-B1gvksvz.mjs";
3
+ import { t as preloadedContexts } from "./contexts-duRA_dDC.mjs";
4
4
  import { t as HttpHeaderLink } from "./link-Cevmc87v.mjs";
5
5
  import { n as UrlError, x as validatePublicUrl } from "./url-DMxmp7ZG.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
@@ -277,6 +277,8 @@ function withDocumentLoaderTimeout(loader, timeout) {
277
277
  * - <https://w3id.org/security/multikey/v1>
278
278
  * - <https://w3id.org/fep/ef61>
279
279
  * - <https://w3id.org/fep/7aa9>
280
+ * - <https://w3id.org/fep/6757>
281
+ * - <https://w3id.org/fep/22cd>
280
282
  * - <https://purl.archive.org/socialweb/webfinger>
281
283
  * - <http://schema.org/>
282
284
  * @param options Options for the document loader.