@pod-os/elements 0.36.0 → 0.37.0-rc.0b98c3c.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist/cjs/{chunk.URTPIBTY-DdK9pL5v.js → chunk.URTPIBTY-FtbhZr1d.js} +2 -2
  2. package/dist/cjs/{chunk.XQ2OKYYA-DEkhm1i7.js → chunk.XQ2OKYYA-BpcNJ_Ey.js} +3 -3
  3. package/dist/cjs/{chunk.ZGGPD2XJ-uKZZdqOH.js → chunk.ZGGPD2XJ-DZsyTFqB.js} +1 -1
  4. package/dist/cjs/{class-map-DAZXfKKA.js → class-map-CF_MMTnq.js} +1 -1
  5. package/dist/cjs/elements.cjs.js +3 -3
  6. package/dist/cjs/{index-DCpu_nnH.js → index-CtUr8eOE.js} +525 -1988
  7. package/dist/cjs/{index-FUnpyb19.js → index-LDTTta4S.js} +863 -551
  8. package/dist/cjs/{jsonld-V2RB47OZ-BerQ9IRa.js → jsonld-V2RB47OZ-BWMHCZBW.js} +1 -1
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/pos-add-literal-value_3.cjs.entry.js +6 -6
  11. package/dist/cjs/{pos-add-new-thing_31.cjs.entry.js → pos-add-new-thing_32.cjs.entry.js} +109 -61
  12. package/dist/cjs/pos-app-document-viewer.cjs.entry.js +1 -1
  13. package/dist/cjs/pos-app-generic.cjs.entry.js +1 -1
  14. package/dist/cjs/pos-app-image-viewer.cjs.entry.js +1 -1
  15. package/dist/cjs/pos-app-ldp-container.cjs.entry.js +1 -1
  16. package/dist/cjs/pos-app-rdf-document.cjs.entry.js +1 -1
  17. package/dist/cjs/pos-attachments.cjs.entry.js +2 -2
  18. package/dist/cjs/pos-case.cjs.entry.js +24 -0
  19. package/dist/cjs/pos-container-contents.cjs.entry.js +2 -2
  20. package/dist/cjs/pos-container-item_3.cjs.entry.js +4 -4
  21. package/dist/cjs/pos-document.cjs.entry.js +4 -4
  22. package/dist/cjs/pos-list.cjs.entry.js +1 -1
  23. package/dist/cjs/pos-markdown-document.cjs.entry.js +2 -2
  24. package/dist/cjs/pos-relations_2.cjs.entry.js +1 -1
  25. package/dist/cjs/pos-subjects.cjs.entry.js +2 -2
  26. package/dist/cjs/pos-switch.cjs.entry.js +64 -0
  27. package/dist/cjs/pos-tool-attachments.cjs.entry.js +2 -2
  28. package/dist/cjs/pos-value.cjs.entry.js +1 -1
  29. package/dist/collection/collection-manifest.json +4 -1
  30. package/dist/collection/components/pos-app/pos-app.js +2 -1
  31. package/dist/collection/components/pos-attachments/pos-attachments.js +2 -1
  32. package/dist/collection/components/pos-container-contents/pos-create-new-container-item/pos-create-new-container-item.js +4 -2
  33. package/dist/collection/components/pos-markdown-document/pos-markdown-document.js +2 -1
  34. package/dist/collection/components/pos-navigation/bar/pos-navigation-bar.css +42 -22
  35. package/dist/collection/components/pos-navigation/bar/pos-navigation-bar.js +3 -2
  36. package/dist/collection/components/pos-new-thing-form/pos-new-thing-form.js +1 -1
  37. package/dist/collection/components/pos-router/pos-router.js +1 -1
  38. package/dist/collection/components/pos-select-term/pos-select-term.js +1 -1
  39. package/dist/collection/components/pos-share/openNewTab.js +3 -0
  40. package/dist/collection/components/pos-share/pos-share.css +36 -0
  41. package/dist/collection/components/pos-share/pos-share.js +100 -0
  42. package/dist/collection/components/pos-switch/pos-case/pos-case.js +88 -0
  43. package/dist/collection/components/pos-switch/pos-switch.js +89 -0
  44. package/dist/collection/components/pos-tool-select/pos-tool-select.js +6 -3
  45. package/dist/collection/components/pos-upload/pos-upload.js +7 -4
  46. package/dist/collection/components/pos-user-menu/pos-user-menu.js +1 -1
  47. package/dist/collection/tools/pos-tool-attachments/pos-tool-attachments.js +1 -1
  48. package/dist/components/chunk.IVVHNXMC.js +20 -0
  49. package/dist/components/index.js +1 -1
  50. package/dist/components/index2.js +2 -2
  51. package/dist/components/pos-add-literal-value2.js +1 -1
  52. package/dist/components/pos-app-browser.js +1 -1
  53. package/dist/components/pos-attachments2.js +1 -1
  54. package/dist/components/pos-case.d.ts +11 -0
  55. package/dist/components/pos-case.js +1 -0
  56. package/dist/components/pos-make-findable2.js +1 -1
  57. package/dist/components/pos-navigation-bar2.js +1 -1
  58. package/dist/components/pos-navigation2.js +1 -1
  59. package/dist/components/pos-new-thing-form2.js +1 -1
  60. package/dist/components/pos-router2.js +1 -1
  61. package/dist/components/pos-select-term2.js +1 -1
  62. package/dist/components/pos-share.d.ts +11 -0
  63. package/dist/components/pos-share.js +1 -0
  64. package/dist/components/pos-share2.js +1 -0
  65. package/dist/components/pos-switch.d.ts +11 -0
  66. package/dist/components/pos-switch.js +1 -0
  67. package/dist/components/pos-tool-attachments.js +1 -1
  68. package/dist/components/pos-tool-select2.js +1 -1
  69. package/dist/components/pos-type-index-entries2.js +1 -1
  70. package/dist/components/pos-upload2.js +1 -1
  71. package/dist/components/pos-user-menu2.js +6 -25
  72. package/dist/elements/elements.esm.js +1 -1
  73. package/dist/elements/{p-9ad80b52.entry.js → p-07347eaf.entry.js} +1 -1
  74. package/dist/elements/{p-a9a18aa8.entry.js → p-23465966.entry.js} +1 -1
  75. package/dist/elements/{p-c8ee910c.entry.js → p-3ab681fe.entry.js} +1 -1
  76. package/dist/elements/{p-dff14248.entry.js → p-43ec0395.entry.js} +1 -1
  77. package/dist/elements/p-48f3b092.entry.js +1 -0
  78. package/dist/elements/{p-fe628201.entry.js → p-5b3f911d.entry.js} +1 -1
  79. package/dist/elements/{p-6561f1b7.entry.js → p-5d3c9c45.entry.js} +1 -1
  80. package/dist/elements/p-76e4882d.entry.js +1 -0
  81. package/dist/elements/{p-701f2c84.entry.js → p-780b0e14.entry.js} +34 -34
  82. package/dist/elements/p-9827b860.entry.js +1 -0
  83. package/dist/elements/p-98f9f7d6.entry.js +1 -0
  84. package/dist/elements/p-BKjkoLi4.js +2 -0
  85. package/dist/elements/{p-BkAnMOpW.js → p-Bc1EKYmT.js} +4 -4
  86. package/dist/elements/{p-Doy_38_j.js → p-CdRXVHZH.js} +1 -1
  87. package/dist/elements/p-CelEckSK.js +11 -0
  88. package/dist/elements/p-DEDHdpnD.js +67 -0
  89. package/dist/elements/{p-CrxYqX8r.js → p-Db6M_T3c.js} +7 -7
  90. package/dist/elements/{p-a20b72d8.entry.js → p-c0a8227e.entry.js} +1 -1
  91. package/dist/elements/{p-0e7413e6.entry.js → p-d56da833.entry.js} +1 -1
  92. package/dist/elements/{p-3e18b5dd.entry.js → p-db535410.entry.js} +1 -1
  93. package/dist/elements/p-df626ff5.entry.js +1 -0
  94. package/dist/elements/{p-b5d64c6f.entry.js → p-e2b0460d.entry.js} +1 -1
  95. package/dist/elements/{p-9b74c400.entry.js → p-e3e41963.entry.js} +1 -1
  96. package/dist/elements/{p-b363349c.entry.js → p-f5eacaa1.entry.js} +1 -1
  97. package/dist/elements/{p-52a612ed.entry.js → p-f61ab5a9.entry.js} +1 -1
  98. package/dist/elements/{p-8q-RA2Uq.js → p-k0sEkqnd.js} +3 -3
  99. package/dist/esm/{chunk.URTPIBTY-CNA3-SLq.js → chunk.URTPIBTY-IRBXSr44.js} +2 -2
  100. package/dist/esm/{chunk.XQ2OKYYA-CXNlpYUG.js → chunk.XQ2OKYYA-DeSebP8q.js} +3 -3
  101. package/dist/esm/{chunk.ZGGPD2XJ-BjT6fS1o.js → chunk.ZGGPD2XJ-DNRLq49v.js} +1 -1
  102. package/dist/esm/{class-map-CUYFUkXU.js → class-map-CdQEGha6.js} +1 -1
  103. package/dist/esm/elements.js +4 -4
  104. package/dist/esm/{index-DFqG64hG.js → index-BF-69-JC.js} +863 -551
  105. package/dist/esm/{index-VMHzF3uY.js → index-BKjkoLi4.js} +525 -1988
  106. package/dist/esm/{jsonld-V2RB47OZ-CaIJ08AA.js → jsonld-V2RB47OZ-CWZbzWzV.js} +1 -1
  107. package/dist/esm/loader.js +3 -3
  108. package/dist/esm/pos-add-literal-value_3.entry.js +6 -6
  109. package/dist/esm/{pos-add-new-thing_31.entry.js → pos-add-new-thing_32.entry.js} +109 -62
  110. package/dist/esm/pos-app-document-viewer.entry.js +1 -1
  111. package/dist/esm/pos-app-generic.entry.js +1 -1
  112. package/dist/esm/pos-app-image-viewer.entry.js +1 -1
  113. package/dist/esm/pos-app-ldp-container.entry.js +1 -1
  114. package/dist/esm/pos-app-rdf-document.entry.js +1 -1
  115. package/dist/esm/pos-attachments.entry.js +2 -2
  116. package/dist/esm/pos-case.entry.js +22 -0
  117. package/dist/esm/pos-container-contents.entry.js +2 -2
  118. package/dist/esm/pos-container-item_3.entry.js +4 -4
  119. package/dist/esm/pos-document.entry.js +4 -4
  120. package/dist/esm/pos-list.entry.js +1 -1
  121. package/dist/esm/pos-markdown-document.entry.js +2 -2
  122. package/dist/esm/pos-relations_2.entry.js +1 -1
  123. package/dist/esm/pos-subjects.entry.js +2 -2
  124. package/dist/esm/pos-switch.entry.js +62 -0
  125. package/dist/esm/pos-tool-attachments.entry.js +2 -2
  126. package/dist/esm/pos-value.entry.js +1 -1
  127. package/dist/jest-setup.js +4 -0
  128. package/dist/types/components/pos-share/openNewTab.d.ts +1 -0
  129. package/dist/types/components/pos-share/pos-share.d.ts +26 -0
  130. package/dist/types/components/pos-switch/pos-case/pos-case.d.ts +22 -0
  131. package/dist/types/components/pos-switch/pos-switch.d.ts +19 -0
  132. package/dist/types/components.d.ts +300 -74
  133. package/dist/types/stencil-public-runtime.d.ts +50 -2
  134. package/package.json +5 -4
  135. package/dist/elements/p-0a087865.entry.js +0 -1
  136. package/dist/elements/p-637a38d9.entry.js +0 -1
  137. package/dist/elements/p-8ggjG2YF.js +0 -11
  138. package/dist/elements/p-LoCE14bN.js +0 -67
  139. package/dist/elements/p-VMHzF3uY.js +0 -2
  140. package/dist/elements/p-ac17ed6a.entry.js +0 -1
@@ -11599,346 +11599,6 @@ var require_browser_ponyfill = __commonJS({
11599
11599
  }
11600
11600
  });
11601
11601
 
11602
- // ../node_modules/short-unique-id/dist/short-unique-id.js
11603
- var require_short_unique_id = __commonJS({
11604
- "../node_modules/short-unique-id/dist/short-unique-id.js"(exports, module3) {
11605
- var ShortUniqueId2 = (() => {
11606
- var __defProp = Object.defineProperty;
11607
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11608
- var __getOwnPropNames = Object.getOwnPropertyNames;
11609
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
11610
- var __hasOwnProp = Object.prototype.hasOwnProperty;
11611
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11612
- var __defNormalProp = (obj, key3, value7) => key3 in obj ? __defProp(obj, key3, { enumerable: true, configurable: true, writable: true, value: value7 }) : obj[key3] = value7;
11613
- var __spreadValues = (a, b) => {
11614
- for (var prop in b || (b = {}))
11615
- if (__hasOwnProp.call(b, prop))
11616
- __defNormalProp(a, prop, b[prop]);
11617
- if (__getOwnPropSymbols)
11618
- for (var prop of __getOwnPropSymbols(b)) {
11619
- if (__propIsEnum.call(b, prop))
11620
- __defNormalProp(a, prop, b[prop]);
11621
- }
11622
- return a;
11623
- };
11624
- var __export2 = (target6, all) => {
11625
- for (var name9 in all)
11626
- __defProp(target6, name9, { get: all[name9], enumerable: true });
11627
- };
11628
- var __copyProps = (to2, from2, except, desc) => {
11629
- if (from2 && typeof from2 === "object" || typeof from2 === "function") {
11630
- for (let key3 of __getOwnPropNames(from2))
11631
- if (!__hasOwnProp.call(to2, key3) && key3 !== except)
11632
- __defProp(to2, key3, { get: () => from2[key3], enumerable: !(desc = __getOwnPropDesc(from2, key3)) || desc.enumerable });
11633
- }
11634
- return to2;
11635
- };
11636
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
11637
- var __publicField = (obj, key3, value7) => {
11638
- __defNormalProp(obj, typeof key3 !== "symbol" ? key3 + "" : key3, value7);
11639
- return value7;
11640
- };
11641
- var src_exports = {};
11642
- __export2(src_exports, {
11643
- DEFAULT_OPTIONS: () => DEFAULT_OPTIONS,
11644
- DEFAULT_UUID_LENGTH: () => DEFAULT_UUID_LENGTH,
11645
- default: () => ShortUniqueId3
11646
- });
11647
- var version6 = "5.2.0";
11648
- var DEFAULT_UUID_LENGTH = 6;
11649
- var DEFAULT_OPTIONS = {
11650
- dictionary: "alphanum",
11651
- shuffle: true,
11652
- debug: false,
11653
- length: DEFAULT_UUID_LENGTH,
11654
- counter: 0
11655
- };
11656
- var _ShortUniqueId = class _ShortUniqueId {
11657
- constructor(argOptions = {}) {
11658
- __publicField(this, "counter");
11659
- __publicField(this, "debug");
11660
- __publicField(this, "dict");
11661
- __publicField(this, "version");
11662
- __publicField(this, "dictIndex", 0);
11663
- __publicField(this, "dictRange", []);
11664
- __publicField(this, "lowerBound", 0);
11665
- __publicField(this, "upperBound", 0);
11666
- __publicField(this, "dictLength", 0);
11667
- __publicField(this, "uuidLength");
11668
- __publicField(this, "_digit_first_ascii", 48);
11669
- __publicField(this, "_digit_last_ascii", 58);
11670
- __publicField(this, "_alpha_lower_first_ascii", 97);
11671
- __publicField(this, "_alpha_lower_last_ascii", 123);
11672
- __publicField(this, "_hex_last_ascii", 103);
11673
- __publicField(this, "_alpha_upper_first_ascii", 65);
11674
- __publicField(this, "_alpha_upper_last_ascii", 91);
11675
- __publicField(this, "_number_dict_ranges", {
11676
- digits: [this._digit_first_ascii, this._digit_last_ascii]
11677
- });
11678
- __publicField(this, "_alpha_dict_ranges", {
11679
- lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii],
11680
- upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
11681
- });
11682
- __publicField(this, "_alpha_lower_dict_ranges", {
11683
- lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii]
11684
- });
11685
- __publicField(this, "_alpha_upper_dict_ranges", {
11686
- upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
11687
- });
11688
- __publicField(this, "_alphanum_dict_ranges", {
11689
- digits: [this._digit_first_ascii, this._digit_last_ascii],
11690
- lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii],
11691
- upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
11692
- });
11693
- __publicField(this, "_alphanum_lower_dict_ranges", {
11694
- digits: [this._digit_first_ascii, this._digit_last_ascii],
11695
- lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii]
11696
- });
11697
- __publicField(this, "_alphanum_upper_dict_ranges", {
11698
- digits: [this._digit_first_ascii, this._digit_last_ascii],
11699
- upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
11700
- });
11701
- __publicField(this, "_hex_dict_ranges", {
11702
- decDigits: [this._digit_first_ascii, this._digit_last_ascii],
11703
- alphaDigits: [this._alpha_lower_first_ascii, this._hex_last_ascii]
11704
- });
11705
- __publicField(this, "_dict_ranges", {
11706
- _number_dict_ranges: this._number_dict_ranges,
11707
- _alpha_dict_ranges: this._alpha_dict_ranges,
11708
- _alpha_lower_dict_ranges: this._alpha_lower_dict_ranges,
11709
- _alpha_upper_dict_ranges: this._alpha_upper_dict_ranges,
11710
- _alphanum_dict_ranges: this._alphanum_dict_ranges,
11711
- _alphanum_lower_dict_ranges: this._alphanum_lower_dict_ranges,
11712
- _alphanum_upper_dict_ranges: this._alphanum_upper_dict_ranges,
11713
- _hex_dict_ranges: this._hex_dict_ranges
11714
- });
11715
- __publicField(this, "log", (...args) => {
11716
- const finalArgs = [...args];
11717
- finalArgs[0] = `[short-unique-id] ${args[0]}`;
11718
- if (this.debug === true) {
11719
- if (typeof console !== "undefined" && console !== null) {
11720
- return console.log(...finalArgs);
11721
- }
11722
- }
11723
- });
11724
- __publicField(this, "_normalizeDictionary", (dictionary2, shuffle2) => {
11725
- let finalDict;
11726
- if (dictionary2 && Array.isArray(dictionary2) && dictionary2.length > 1) {
11727
- finalDict = dictionary2;
11728
- } else {
11729
- finalDict = [];
11730
- let i;
11731
- this.dictIndex = i = 0;
11732
- const rangesName = `_${dictionary2}_dict_ranges`;
11733
- const ranges = this._dict_ranges[rangesName];
11734
- Object.keys(ranges).forEach((rangeType) => {
11735
- const rangeTypeKey = rangeType;
11736
- this.dictRange = ranges[rangeTypeKey];
11737
- this.lowerBound = this.dictRange[0];
11738
- this.upperBound = this.dictRange[1];
11739
- for (this.dictIndex = i = this.lowerBound; this.lowerBound <= this.upperBound ? i < this.upperBound : i > this.upperBound; this.dictIndex = this.lowerBound <= this.upperBound ? i += 1 : i -= 1) {
11740
- finalDict.push(String.fromCharCode(this.dictIndex));
11741
- }
11742
- });
11743
- }
11744
- if (shuffle2) {
11745
- const PROBABILITY = 0.5;
11746
- finalDict = finalDict.sort(() => Math.random() - PROBABILITY);
11747
- }
11748
- return finalDict;
11749
- });
11750
- __publicField(this, "setDictionary", (dictionary2, shuffle2) => {
11751
- this.dict = this._normalizeDictionary(dictionary2, shuffle2);
11752
- this.dictLength = this.dict.length;
11753
- this.setCounter(0);
11754
- });
11755
- __publicField(this, "seq", () => {
11756
- return this.sequentialUUID();
11757
- });
11758
- __publicField(this, "sequentialUUID", () => {
11759
- let counterDiv;
11760
- let counterRem;
11761
- let id4 = "";
11762
- counterDiv = this.counter;
11763
- do {
11764
- counterRem = counterDiv % this.dictLength;
11765
- counterDiv = Math.trunc(counterDiv / this.dictLength);
11766
- id4 += this.dict[counterRem];
11767
- } while (counterDiv !== 0);
11768
- this.counter += 1;
11769
- return id4;
11770
- });
11771
- __publicField(this, "rnd", (uuidLength = this.uuidLength || DEFAULT_UUID_LENGTH) => {
11772
- return this.randomUUID(uuidLength);
11773
- });
11774
- __publicField(this, "randomUUID", (uuidLength = this.uuidLength || DEFAULT_UUID_LENGTH) => {
11775
- let id4;
11776
- let randomPartIdx;
11777
- let j;
11778
- if (uuidLength === null || typeof uuidLength === "undefined" || uuidLength < 1) {
11779
- throw new Error("Invalid UUID Length Provided");
11780
- }
11781
- id4 = "";
11782
- for (j = 0; j < uuidLength; j += 1) {
11783
- randomPartIdx = parseInt(
11784
- (Math.random() * this.dictLength).toFixed(0),
11785
- 10
11786
- ) % this.dictLength;
11787
- id4 += this.dict[randomPartIdx];
11788
- }
11789
- return id4;
11790
- });
11791
- __publicField(this, "fmt", (format4, date6) => {
11792
- return this.formattedUUID(format4, date6);
11793
- });
11794
- __publicField(this, "formattedUUID", (format4, date6) => {
11795
- const fnMap = {
11796
- "$r": this.randomUUID,
11797
- "$s": this.sequentialUUID,
11798
- "$t": this.stamp
11799
- };
11800
- const result6 = format4.replace(
11801
- /\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,
11802
- (m) => {
11803
- const fn2 = m.slice(0, 2);
11804
- const len = parseInt(m.slice(2), 10);
11805
- if (fn2 === "$s") {
11806
- return fnMap[fn2]().padStart(len, "0");
11807
- }
11808
- if (fn2 === "$t" && date6) {
11809
- return fnMap[fn2](len, date6);
11810
- }
11811
- return fnMap[fn2](len);
11812
- }
11813
- );
11814
- return result6;
11815
- });
11816
- __publicField(this, "availableUUIDs", (uuidLength = this.uuidLength) => {
11817
- return parseFloat(
11818
- Math.pow([...new Set(this.dict)].length, uuidLength).toFixed(0)
11819
- );
11820
- });
11821
- __publicField(this, "approxMaxBeforeCollision", (rounds = this.availableUUIDs(this.uuidLength)) => {
11822
- return parseFloat(
11823
- Math.sqrt(Math.PI / 2 * rounds).toFixed(20)
11824
- );
11825
- });
11826
- __publicField(this, "collisionProbability", (rounds = this.availableUUIDs(this.uuidLength), uuidLength = this.uuidLength) => {
11827
- return parseFloat(
11828
- (this.approxMaxBeforeCollision(rounds) / this.availableUUIDs(uuidLength)).toFixed(20)
11829
- );
11830
- });
11831
- __publicField(this, "uniqueness", (rounds = this.availableUUIDs(this.uuidLength)) => {
11832
- const score2 = parseFloat(
11833
- (1 - this.approxMaxBeforeCollision(rounds) / rounds).toFixed(20)
11834
- );
11835
- return score2 > 1 ? 1 : score2 < 0 ? 0 : score2;
11836
- });
11837
- __publicField(this, "getVersion", () => {
11838
- return this.version;
11839
- });
11840
- __publicField(this, "stamp", (finalLength, date6) => {
11841
- const hexStamp = Math.floor(+(date6 || /* @__PURE__ */ new Date()) / 1e3).toString(16);
11842
- if (typeof finalLength === "number" && finalLength === 0) {
11843
- return hexStamp;
11844
- }
11845
- if (typeof finalLength !== "number" || finalLength < 10) {
11846
- throw new Error(
11847
- [
11848
- "Param finalLength must be a number greater than or equal to 10,",
11849
- "or 0 if you want the raw hexadecimal timestamp"
11850
- ].join("\n")
11851
- );
11852
- }
11853
- const idLength = finalLength - 9;
11854
- const rndIdx = Math.round(Math.random() * (idLength > 15 ? 15 : idLength));
11855
- const id4 = this.randomUUID(idLength);
11856
- return `${id4.substring(0, rndIdx)}${hexStamp}${id4.substring(rndIdx)}${rndIdx.toString(16)}`;
11857
- });
11858
- __publicField(this, "parseStamp", (suid, format4) => {
11859
- if (format4 && !/t0|t[1-9]\d{1,}/.test(format4)) {
11860
- throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");
11861
- }
11862
- const stamp = format4 ? format4.replace(
11863
- /\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,
11864
- (m) => {
11865
- const fnMap = {
11866
- "$r": (len2) => [...Array(len2)].map(() => "r").join(""),
11867
- "$s": (len2) => [...Array(len2)].map(() => "s").join(""),
11868
- "$t": (len2) => [...Array(len2)].map(() => "t").join("")
11869
- };
11870
- const fn2 = m.slice(0, 2);
11871
- const len = parseInt(m.slice(2), 10);
11872
- return fnMap[fn2](len);
11873
- }
11874
- ).replace(
11875
- /^(.*?)(t{8,})(.*)$/g,
11876
- (_m, p1, p2) => {
11877
- return suid.substring(p1.length, p1.length + p2.length);
11878
- }
11879
- ) : suid;
11880
- if (stamp.length === 8) {
11881
- return new Date(parseInt(stamp, 16) * 1e3);
11882
- }
11883
- if (stamp.length < 10) {
11884
- throw new Error("Stamp length invalid");
11885
- }
11886
- const rndIdx = parseInt(stamp.substring(stamp.length - 1), 16);
11887
- return new Date(parseInt(stamp.substring(rndIdx, rndIdx + 8), 16) * 1e3);
11888
- });
11889
- __publicField(this, "setCounter", (counter2) => {
11890
- this.counter = counter2;
11891
- });
11892
- __publicField(this, "validate", (uid4, dictionary2) => {
11893
- const finalDictionary = dictionary2 ? this._normalizeDictionary(dictionary2) : this.dict;
11894
- return uid4.split("").every((c) => finalDictionary.includes(c));
11895
- });
11896
- const options = __spreadValues(__spreadValues({}, DEFAULT_OPTIONS), argOptions);
11897
- this.counter = 0;
11898
- this.debug = false;
11899
- this.dict = [];
11900
- this.version = version6;
11901
- const {
11902
- dictionary,
11903
- shuffle,
11904
- length: length3,
11905
- counter
11906
- } = options;
11907
- this.uuidLength = length3;
11908
- this.setDictionary(dictionary, shuffle);
11909
- this.setCounter(counter);
11910
- this.debug = options.debug;
11911
- this.log(this.dict);
11912
- this.log(
11913
- `Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`
11914
- );
11915
- this.log = this.log.bind(this);
11916
- this.setDictionary = this.setDictionary.bind(this);
11917
- this.setCounter = this.setCounter.bind(this);
11918
- this.seq = this.seq.bind(this);
11919
- this.sequentialUUID = this.sequentialUUID.bind(this);
11920
- this.rnd = this.rnd.bind(this);
11921
- this.randomUUID = this.randomUUID.bind(this);
11922
- this.fmt = this.fmt.bind(this);
11923
- this.formattedUUID = this.formattedUUID.bind(this);
11924
- this.availableUUIDs = this.availableUUIDs.bind(this);
11925
- this.approxMaxBeforeCollision = this.approxMaxBeforeCollision.bind(this);
11926
- this.collisionProbability = this.collisionProbability.bind(this);
11927
- this.uniqueness = this.uniqueness.bind(this);
11928
- this.getVersion = this.getVersion.bind(this);
11929
- this.stamp = this.stamp.bind(this);
11930
- this.parseStamp = this.parseStamp.bind(this);
11931
- return this;
11932
- }
11933
- };
11934
- __publicField(_ShortUniqueId, "default", _ShortUniqueId);
11935
- var ShortUniqueId3 = _ShortUniqueId;
11936
- return __toCommonJS(src_exports);
11937
- })();
11938
- "undefined" != typeof module3 && (module3.exports = ShortUniqueId2.default), "undefined" != typeof window && (ShortUniqueId2 = ShortUniqueId2.default);
11939
- }
11940
- });
11941
-
11942
11602
  // ../node_modules/lunr/lunr.js
11943
11603
  var require_lunr = __commonJS({
11944
11604
  "../node_modules/lunr/lunr.js"(exports, module3) {
@@ -13670,6 +13330,346 @@ var require_lunr = __commonJS({
13670
13330
  }
13671
13331
  });
13672
13332
 
13333
+ // ../node_modules/short-unique-id/dist/short-unique-id.js
13334
+ var require_short_unique_id = __commonJS({
13335
+ "../node_modules/short-unique-id/dist/short-unique-id.js"(exports, module3) {
13336
+ var ShortUniqueId2 = (() => {
13337
+ var __defProp = Object.defineProperty;
13338
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13339
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13340
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
13341
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
13342
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
13343
+ var __defNormalProp = (obj, key3, value7) => key3 in obj ? __defProp(obj, key3, { enumerable: true, configurable: true, writable: true, value: value7 }) : obj[key3] = value7;
13344
+ var __spreadValues = (a, b) => {
13345
+ for (var prop in b || (b = {}))
13346
+ if (__hasOwnProp.call(b, prop))
13347
+ __defNormalProp(a, prop, b[prop]);
13348
+ if (__getOwnPropSymbols)
13349
+ for (var prop of __getOwnPropSymbols(b)) {
13350
+ if (__propIsEnum.call(b, prop))
13351
+ __defNormalProp(a, prop, b[prop]);
13352
+ }
13353
+ return a;
13354
+ };
13355
+ var __export2 = (target6, all) => {
13356
+ for (var name9 in all)
13357
+ __defProp(target6, name9, { get: all[name9], enumerable: true });
13358
+ };
13359
+ var __copyProps = (to2, from2, except, desc) => {
13360
+ if (from2 && typeof from2 === "object" || typeof from2 === "function") {
13361
+ for (let key3 of __getOwnPropNames(from2))
13362
+ if (!__hasOwnProp.call(to2, key3) && key3 !== except)
13363
+ __defProp(to2, key3, { get: () => from2[key3], enumerable: !(desc = __getOwnPropDesc(from2, key3)) || desc.enumerable });
13364
+ }
13365
+ return to2;
13366
+ };
13367
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
13368
+ var __publicField = (obj, key3, value7) => {
13369
+ __defNormalProp(obj, typeof key3 !== "symbol" ? key3 + "" : key3, value7);
13370
+ return value7;
13371
+ };
13372
+ var src_exports = {};
13373
+ __export2(src_exports, {
13374
+ DEFAULT_OPTIONS: () => DEFAULT_OPTIONS,
13375
+ DEFAULT_UUID_LENGTH: () => DEFAULT_UUID_LENGTH,
13376
+ default: () => ShortUniqueId3
13377
+ });
13378
+ var version6 = "5.2.0";
13379
+ var DEFAULT_UUID_LENGTH = 6;
13380
+ var DEFAULT_OPTIONS = {
13381
+ dictionary: "alphanum",
13382
+ shuffle: true,
13383
+ debug: false,
13384
+ length: DEFAULT_UUID_LENGTH,
13385
+ counter: 0
13386
+ };
13387
+ var _ShortUniqueId = class _ShortUniqueId {
13388
+ constructor(argOptions = {}) {
13389
+ __publicField(this, "counter");
13390
+ __publicField(this, "debug");
13391
+ __publicField(this, "dict");
13392
+ __publicField(this, "version");
13393
+ __publicField(this, "dictIndex", 0);
13394
+ __publicField(this, "dictRange", []);
13395
+ __publicField(this, "lowerBound", 0);
13396
+ __publicField(this, "upperBound", 0);
13397
+ __publicField(this, "dictLength", 0);
13398
+ __publicField(this, "uuidLength");
13399
+ __publicField(this, "_digit_first_ascii", 48);
13400
+ __publicField(this, "_digit_last_ascii", 58);
13401
+ __publicField(this, "_alpha_lower_first_ascii", 97);
13402
+ __publicField(this, "_alpha_lower_last_ascii", 123);
13403
+ __publicField(this, "_hex_last_ascii", 103);
13404
+ __publicField(this, "_alpha_upper_first_ascii", 65);
13405
+ __publicField(this, "_alpha_upper_last_ascii", 91);
13406
+ __publicField(this, "_number_dict_ranges", {
13407
+ digits: [this._digit_first_ascii, this._digit_last_ascii]
13408
+ });
13409
+ __publicField(this, "_alpha_dict_ranges", {
13410
+ lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii],
13411
+ upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
13412
+ });
13413
+ __publicField(this, "_alpha_lower_dict_ranges", {
13414
+ lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii]
13415
+ });
13416
+ __publicField(this, "_alpha_upper_dict_ranges", {
13417
+ upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
13418
+ });
13419
+ __publicField(this, "_alphanum_dict_ranges", {
13420
+ digits: [this._digit_first_ascii, this._digit_last_ascii],
13421
+ lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii],
13422
+ upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
13423
+ });
13424
+ __publicField(this, "_alphanum_lower_dict_ranges", {
13425
+ digits: [this._digit_first_ascii, this._digit_last_ascii],
13426
+ lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii]
13427
+ });
13428
+ __publicField(this, "_alphanum_upper_dict_ranges", {
13429
+ digits: [this._digit_first_ascii, this._digit_last_ascii],
13430
+ upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
13431
+ });
13432
+ __publicField(this, "_hex_dict_ranges", {
13433
+ decDigits: [this._digit_first_ascii, this._digit_last_ascii],
13434
+ alphaDigits: [this._alpha_lower_first_ascii, this._hex_last_ascii]
13435
+ });
13436
+ __publicField(this, "_dict_ranges", {
13437
+ _number_dict_ranges: this._number_dict_ranges,
13438
+ _alpha_dict_ranges: this._alpha_dict_ranges,
13439
+ _alpha_lower_dict_ranges: this._alpha_lower_dict_ranges,
13440
+ _alpha_upper_dict_ranges: this._alpha_upper_dict_ranges,
13441
+ _alphanum_dict_ranges: this._alphanum_dict_ranges,
13442
+ _alphanum_lower_dict_ranges: this._alphanum_lower_dict_ranges,
13443
+ _alphanum_upper_dict_ranges: this._alphanum_upper_dict_ranges,
13444
+ _hex_dict_ranges: this._hex_dict_ranges
13445
+ });
13446
+ __publicField(this, "log", (...args) => {
13447
+ const finalArgs = [...args];
13448
+ finalArgs[0] = `[short-unique-id] ${args[0]}`;
13449
+ if (this.debug === true) {
13450
+ if (typeof console !== "undefined" && console !== null) {
13451
+ return console.log(...finalArgs);
13452
+ }
13453
+ }
13454
+ });
13455
+ __publicField(this, "_normalizeDictionary", (dictionary2, shuffle2) => {
13456
+ let finalDict;
13457
+ if (dictionary2 && Array.isArray(dictionary2) && dictionary2.length > 1) {
13458
+ finalDict = dictionary2;
13459
+ } else {
13460
+ finalDict = [];
13461
+ let i;
13462
+ this.dictIndex = i = 0;
13463
+ const rangesName = `_${dictionary2}_dict_ranges`;
13464
+ const ranges = this._dict_ranges[rangesName];
13465
+ Object.keys(ranges).forEach((rangeType) => {
13466
+ const rangeTypeKey = rangeType;
13467
+ this.dictRange = ranges[rangeTypeKey];
13468
+ this.lowerBound = this.dictRange[0];
13469
+ this.upperBound = this.dictRange[1];
13470
+ for (this.dictIndex = i = this.lowerBound; this.lowerBound <= this.upperBound ? i < this.upperBound : i > this.upperBound; this.dictIndex = this.lowerBound <= this.upperBound ? i += 1 : i -= 1) {
13471
+ finalDict.push(String.fromCharCode(this.dictIndex));
13472
+ }
13473
+ });
13474
+ }
13475
+ if (shuffle2) {
13476
+ const PROBABILITY = 0.5;
13477
+ finalDict = finalDict.sort(() => Math.random() - PROBABILITY);
13478
+ }
13479
+ return finalDict;
13480
+ });
13481
+ __publicField(this, "setDictionary", (dictionary2, shuffle2) => {
13482
+ this.dict = this._normalizeDictionary(dictionary2, shuffle2);
13483
+ this.dictLength = this.dict.length;
13484
+ this.setCounter(0);
13485
+ });
13486
+ __publicField(this, "seq", () => {
13487
+ return this.sequentialUUID();
13488
+ });
13489
+ __publicField(this, "sequentialUUID", () => {
13490
+ let counterDiv;
13491
+ let counterRem;
13492
+ let id4 = "";
13493
+ counterDiv = this.counter;
13494
+ do {
13495
+ counterRem = counterDiv % this.dictLength;
13496
+ counterDiv = Math.trunc(counterDiv / this.dictLength);
13497
+ id4 += this.dict[counterRem];
13498
+ } while (counterDiv !== 0);
13499
+ this.counter += 1;
13500
+ return id4;
13501
+ });
13502
+ __publicField(this, "rnd", (uuidLength = this.uuidLength || DEFAULT_UUID_LENGTH) => {
13503
+ return this.randomUUID(uuidLength);
13504
+ });
13505
+ __publicField(this, "randomUUID", (uuidLength = this.uuidLength || DEFAULT_UUID_LENGTH) => {
13506
+ let id4;
13507
+ let randomPartIdx;
13508
+ let j;
13509
+ if (uuidLength === null || typeof uuidLength === "undefined" || uuidLength < 1) {
13510
+ throw new Error("Invalid UUID Length Provided");
13511
+ }
13512
+ id4 = "";
13513
+ for (j = 0; j < uuidLength; j += 1) {
13514
+ randomPartIdx = parseInt(
13515
+ (Math.random() * this.dictLength).toFixed(0),
13516
+ 10
13517
+ ) % this.dictLength;
13518
+ id4 += this.dict[randomPartIdx];
13519
+ }
13520
+ return id4;
13521
+ });
13522
+ __publicField(this, "fmt", (format4, date6) => {
13523
+ return this.formattedUUID(format4, date6);
13524
+ });
13525
+ __publicField(this, "formattedUUID", (format4, date6) => {
13526
+ const fnMap = {
13527
+ "$r": this.randomUUID,
13528
+ "$s": this.sequentialUUID,
13529
+ "$t": this.stamp
13530
+ };
13531
+ const result6 = format4.replace(
13532
+ /\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,
13533
+ (m) => {
13534
+ const fn2 = m.slice(0, 2);
13535
+ const len = parseInt(m.slice(2), 10);
13536
+ if (fn2 === "$s") {
13537
+ return fnMap[fn2]().padStart(len, "0");
13538
+ }
13539
+ if (fn2 === "$t" && date6) {
13540
+ return fnMap[fn2](len, date6);
13541
+ }
13542
+ return fnMap[fn2](len);
13543
+ }
13544
+ );
13545
+ return result6;
13546
+ });
13547
+ __publicField(this, "availableUUIDs", (uuidLength = this.uuidLength) => {
13548
+ return parseFloat(
13549
+ Math.pow([...new Set(this.dict)].length, uuidLength).toFixed(0)
13550
+ );
13551
+ });
13552
+ __publicField(this, "approxMaxBeforeCollision", (rounds = this.availableUUIDs(this.uuidLength)) => {
13553
+ return parseFloat(
13554
+ Math.sqrt(Math.PI / 2 * rounds).toFixed(20)
13555
+ );
13556
+ });
13557
+ __publicField(this, "collisionProbability", (rounds = this.availableUUIDs(this.uuidLength), uuidLength = this.uuidLength) => {
13558
+ return parseFloat(
13559
+ (this.approxMaxBeforeCollision(rounds) / this.availableUUIDs(uuidLength)).toFixed(20)
13560
+ );
13561
+ });
13562
+ __publicField(this, "uniqueness", (rounds = this.availableUUIDs(this.uuidLength)) => {
13563
+ const score2 = parseFloat(
13564
+ (1 - this.approxMaxBeforeCollision(rounds) / rounds).toFixed(20)
13565
+ );
13566
+ return score2 > 1 ? 1 : score2 < 0 ? 0 : score2;
13567
+ });
13568
+ __publicField(this, "getVersion", () => {
13569
+ return this.version;
13570
+ });
13571
+ __publicField(this, "stamp", (finalLength, date6) => {
13572
+ const hexStamp = Math.floor(+(date6 || /* @__PURE__ */ new Date()) / 1e3).toString(16);
13573
+ if (typeof finalLength === "number" && finalLength === 0) {
13574
+ return hexStamp;
13575
+ }
13576
+ if (typeof finalLength !== "number" || finalLength < 10) {
13577
+ throw new Error(
13578
+ [
13579
+ "Param finalLength must be a number greater than or equal to 10,",
13580
+ "or 0 if you want the raw hexadecimal timestamp"
13581
+ ].join("\n")
13582
+ );
13583
+ }
13584
+ const idLength = finalLength - 9;
13585
+ const rndIdx = Math.round(Math.random() * (idLength > 15 ? 15 : idLength));
13586
+ const id4 = this.randomUUID(idLength);
13587
+ return `${id4.substring(0, rndIdx)}${hexStamp}${id4.substring(rndIdx)}${rndIdx.toString(16)}`;
13588
+ });
13589
+ __publicField(this, "parseStamp", (suid, format4) => {
13590
+ if (format4 && !/t0|t[1-9]\d{1,}/.test(format4)) {
13591
+ throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");
13592
+ }
13593
+ const stamp = format4 ? format4.replace(
13594
+ /\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,
13595
+ (m) => {
13596
+ const fnMap = {
13597
+ "$r": (len2) => [...Array(len2)].map(() => "r").join(""),
13598
+ "$s": (len2) => [...Array(len2)].map(() => "s").join(""),
13599
+ "$t": (len2) => [...Array(len2)].map(() => "t").join("")
13600
+ };
13601
+ const fn2 = m.slice(0, 2);
13602
+ const len = parseInt(m.slice(2), 10);
13603
+ return fnMap[fn2](len);
13604
+ }
13605
+ ).replace(
13606
+ /^(.*?)(t{8,})(.*)$/g,
13607
+ (_m, p1, p2) => {
13608
+ return suid.substring(p1.length, p1.length + p2.length);
13609
+ }
13610
+ ) : suid;
13611
+ if (stamp.length === 8) {
13612
+ return new Date(parseInt(stamp, 16) * 1e3);
13613
+ }
13614
+ if (stamp.length < 10) {
13615
+ throw new Error("Stamp length invalid");
13616
+ }
13617
+ const rndIdx = parseInt(stamp.substring(stamp.length - 1), 16);
13618
+ return new Date(parseInt(stamp.substring(rndIdx, rndIdx + 8), 16) * 1e3);
13619
+ });
13620
+ __publicField(this, "setCounter", (counter2) => {
13621
+ this.counter = counter2;
13622
+ });
13623
+ __publicField(this, "validate", (uid4, dictionary2) => {
13624
+ const finalDictionary = dictionary2 ? this._normalizeDictionary(dictionary2) : this.dict;
13625
+ return uid4.split("").every((c) => finalDictionary.includes(c));
13626
+ });
13627
+ const options = __spreadValues(__spreadValues({}, DEFAULT_OPTIONS), argOptions);
13628
+ this.counter = 0;
13629
+ this.debug = false;
13630
+ this.dict = [];
13631
+ this.version = version6;
13632
+ const {
13633
+ dictionary,
13634
+ shuffle,
13635
+ length: length3,
13636
+ counter
13637
+ } = options;
13638
+ this.uuidLength = length3;
13639
+ this.setDictionary(dictionary, shuffle);
13640
+ this.setCounter(counter);
13641
+ this.debug = options.debug;
13642
+ this.log(this.dict);
13643
+ this.log(
13644
+ `Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`
13645
+ );
13646
+ this.log = this.log.bind(this);
13647
+ this.setDictionary = this.setDictionary.bind(this);
13648
+ this.setCounter = this.setCounter.bind(this);
13649
+ this.seq = this.seq.bind(this);
13650
+ this.sequentialUUID = this.sequentialUUID.bind(this);
13651
+ this.rnd = this.rnd.bind(this);
13652
+ this.randomUUID = this.randomUUID.bind(this);
13653
+ this.fmt = this.fmt.bind(this);
13654
+ this.formattedUUID = this.formattedUUID.bind(this);
13655
+ this.availableUUIDs = this.availableUUIDs.bind(this);
13656
+ this.approxMaxBeforeCollision = this.approxMaxBeforeCollision.bind(this);
13657
+ this.collisionProbability = this.collisionProbability.bind(this);
13658
+ this.uniqueness = this.uniqueness.bind(this);
13659
+ this.getVersion = this.getVersion.bind(this);
13660
+ this.stamp = this.stamp.bind(this);
13661
+ this.parseStamp = this.parseStamp.bind(this);
13662
+ return this;
13663
+ }
13664
+ };
13665
+ __publicField(_ShortUniqueId, "default", _ShortUniqueId);
13666
+ var ShortUniqueId3 = _ShortUniqueId;
13667
+ return __toCommonJS(src_exports);
13668
+ })();
13669
+ "undefined" != typeof module3 && (module3.exports = ShortUniqueId2.default), "undefined" != typeof window && (ShortUniqueId2 = ShortUniqueId2.default);
13670
+ }
13671
+ });
13672
+
13673
13673
  // ../node_modules/slugify/slugify.js
13674
13674
  var require_slugify = __commonJS({
13675
13675
  "../node_modules/slugify/slugify.js"(exports, module3) {
@@ -21914,7 +21914,7 @@ function listToCollection(kb, obj) {
21914
21914
  }
21915
21915
  async function jsonldParser(str, kb, base2) {
21916
21916
  const baseString = base2 && Object.prototype.hasOwnProperty.call(base2, "termType") ? base2.value : base2;
21917
- const jsonld = await import('./jsonld-V2RB47OZ-CaIJ08AA.js');
21917
+ const jsonld = await import('./jsonld-V2RB47OZ-CWZbzWzV.js');
21918
21918
  const flattened = await jsonld.default.flatten(JSON.parse(str), null, {
21919
21919
  base: baseString
21920
21920
  });
@@ -27614,8 +27614,8 @@ var Thing = class {
27614
27614
  * Retrieves a list of RDF types for this thing.
27615
27615
  */
27616
27616
  types() {
27617
- const uriMap = this.store.findTypeURIs(namedNode(this.uri));
27618
- return Object.keys(uriMap).map((uri6) => ({
27617
+ const uris = this.store.findTypes(this.uri);
27618
+ return uris.map((uri6) => ({
27619
27619
  uri: uri6,
27620
27620
  label: labelForType(uri6)
27621
27621
  }));
@@ -27772,6 +27772,203 @@ var PictureGateway = class {
27772
27772
  }
27773
27773
  };
27774
27774
 
27775
+ // src/profile/WebIdProfile.ts
27776
+ var WebIdProfile = class extends Thing {
27777
+ constructor(webId, store, editable = false) {
27778
+ super(webId, store, editable);
27779
+ this.webId = webId;
27780
+ this.store = store;
27781
+ this.editable = editable;
27782
+ this.profileQuery = this.store.profileQuery(this.webId);
27783
+ }
27784
+ /**
27785
+ * Returns the URI of the preferences document
27786
+ */
27787
+ getPreferencesFile() {
27788
+ return this.profileQuery.queryPreferencesFile()?.value;
27789
+ }
27790
+ /**
27791
+ * Returns the URI of the public type index document
27792
+ * @since 0.24.0
27793
+ */
27794
+ getPublicTypeIndex() {
27795
+ return this.profileQuery.queryPublicTypeIndex()?.value;
27796
+ }
27797
+ /**
27798
+ * Returns the URI of the private type index document
27799
+ * @since 0.24.0
27800
+ */
27801
+ getPrivateTypeIndex() {
27802
+ const preferences = this.profileQuery.queryPreferencesFile();
27803
+ if (!preferences) return void 0;
27804
+ const query4 = this.store.preferencesQuery(this.webId, preferences);
27805
+ return query4.queryPrivateTypeIndex()?.value;
27806
+ }
27807
+ /**
27808
+ * Returns the URIs of the private label indexes
27809
+ */
27810
+ getPrivateLabelIndexes() {
27811
+ const profileNodes = this.store.each(
27812
+ namedNode(this.webId),
27813
+ namedNode("http://www.w3.org/ns/solid/terms#privateLabelIndex"),
27814
+ void 0,
27815
+ namedNode(this.webId).doc()
27816
+ );
27817
+ const preferences = this.getPreferencesFile();
27818
+ if (preferences) {
27819
+ const preferencesNodes = this.store.each(
27820
+ namedNode(this.webId),
27821
+ namedNode("http://www.w3.org/ns/solid/terms#privateLabelIndex"),
27822
+ void 0,
27823
+ namedNode(preferences)
27824
+ );
27825
+ return [...profileNodes, ...preferencesNodes].map((it) => it.value);
27826
+ } else {
27827
+ return profileNodes.map((it) => it.value);
27828
+ }
27829
+ }
27830
+ };
27831
+
27832
+ // src/profile/ProfileGateway.ts
27833
+ var ProfileGateway = class {
27834
+ constructor(store) {
27835
+ this.store = store;
27836
+ }
27837
+ /**
27838
+ * Fetches the profile for the given WebID and all linked documents
27839
+ * @since 0.24.0
27840
+ * @param webId The WebID to fetch the profile for
27841
+ * @returns {Promise<WebIdProfile>} The fetched profile
27842
+ */
27843
+ async fetchProfile(webId) {
27844
+ await this.store.fetch(webId);
27845
+ const profile2 = this.store.get(webId).assume(WebIdProfile);
27846
+ const preferences = profile2.getPreferencesFile();
27847
+ if (preferences) {
27848
+ try {
27849
+ await this.store.fetch(preferences);
27850
+ } catch (error4) {
27851
+ console.warn(`Failed to fetch preferences file ${preferences}:`, error4);
27852
+ }
27853
+ }
27854
+ const publicTypeIndex2 = profile2.getPublicTypeIndex();
27855
+ const privateTypeIndex2 = profile2.getPrivateTypeIndex();
27856
+ await this.store.fetchAll(
27857
+ [privateTypeIndex2, publicTypeIndex2].filter((it) => it !== void 0)
27858
+ );
27859
+ return profile2;
27860
+ }
27861
+ };
27862
+
27863
+ // src/search/SearchIndex.ts
27864
+ var import_lunr = __toESM(require_lunr(), 1);
27865
+ var SearchIndex = class {
27866
+ constructor(labelIndexes) {
27867
+ this.labelIndexes = labelIndexes;
27868
+ this.index = this.rebuild().index;
27869
+ }
27870
+ /**
27871
+ * Recreates the search index with the current data from all label indexes
27872
+ */
27873
+ rebuild() {
27874
+ const labelIndexes = this.labelIndexes;
27875
+ this.index = (0, import_lunr.default)(function() {
27876
+ this.ref("uri");
27877
+ this.field("uri");
27878
+ this.field("label");
27879
+ this.metadataWhitelist = ["position"];
27880
+ const items2 = labelIndexes.flatMap((it) => it.getIndexedItems());
27881
+ items2.forEach((item4) => {
27882
+ this.add({
27883
+ uri: item4.uri,
27884
+ label: item4.label
27885
+ });
27886
+ });
27887
+ });
27888
+ return this;
27889
+ }
27890
+ /**
27891
+ * Search the index for a given term. It finds partial matches, but will rank exact matches higher.
27892
+ *
27893
+ * The rank order is:
27894
+ *
27895
+ * 1. exact matches
27896
+ * 2. prefix matches
27897
+ * 3. suffix matches
27898
+ * 4. any matches inside a literal
27899
+ *
27900
+ * @param term The (partial) term to search for
27901
+ * @param maxResults The maximum number of results to return (defaults to 10)
27902
+ */
27903
+ search(term3, maxResults = 10) {
27904
+ const escapedTerm = term3.replace(/[~^+:]/g, (x) => `\\${x}`);
27905
+ return this.index.search(
27906
+ `${escapedTerm}^100 ${escapedTerm}*^20 *${escapedTerm}^10 *${escapedTerm}*^5`
27907
+ ).slice(0, maxResults);
27908
+ }
27909
+ /**
27910
+ * Remove all data from the search index.
27911
+ */
27912
+ clear() {
27913
+ this.index = (0, import_lunr.default)(() => {
27914
+ });
27915
+ }
27916
+ };
27917
+
27918
+ // src/rdf-document/RdfDocument.ts
27919
+ var RdfDocument = class extends Thing {
27920
+ constructor(uri6, store, editable = false) {
27921
+ super(uri6, store, editable);
27922
+ this.uri = uri6;
27923
+ this.store = store;
27924
+ this.editable = editable;
27925
+ }
27926
+ subjects() {
27927
+ const matches = this.store.statementsMatching(
27928
+ null,
27929
+ null,
27930
+ null,
27931
+ namedNode(this.uri)
27932
+ );
27933
+ const uris = matches.filter((match) => isNamedNode(match.subject)).map((match) => match.subject.value);
27934
+ const uniqueUris = new Set(uris);
27935
+ uniqueUris.delete(this.uri);
27936
+ return [...uniqueUris].map((uri6) => ({
27937
+ uri: uri6
27938
+ }));
27939
+ }
27940
+ };
27941
+
27942
+ // src/search/LabelIndex.ts
27943
+ var LabelIndex = class extends RdfDocument {
27944
+ constructor(uri6, store, editable = false) {
27945
+ super(uri6, store, editable);
27946
+ this.uri = uri6;
27947
+ this.store = store;
27948
+ this.editable = editable;
27949
+ }
27950
+ /**
27951
+ * Returns the URIs and labels for all the things listed in the document.
27952
+ */
27953
+ getIndexedItems() {
27954
+ const matches = this.store.statementsMatching(
27955
+ null,
27956
+ rdfs("label"),
27957
+ null,
27958
+ namedNode(this.uri)
27959
+ );
27960
+ return matches.map((it) => {
27961
+ return {
27962
+ uri: it.subject.value,
27963
+ label: it.object.value
27964
+ };
27965
+ });
27966
+ }
27967
+ contains(uri6) {
27968
+ return this.store.holds(namedNode(uri6), rdfs("label"), null, namedNode(this.uri));
27969
+ }
27970
+ };
27971
+
27775
27972
  // node_modules/@solid-data-modules/rdflib-utils/dist/web-operations/executeUpdate.js
27776
27973
  async function executeUpdate(fetcher2, updater, operation3) {
27777
27974
  await updater.updateMany(operation3.deletions, operation3.insertions);
@@ -27839,207 +28036,6 @@ var ProfileQuery = class {
27839
28036
  var import_short_unique_id = __toESM(require_short_unique_id(), 1);
27840
28037
  new import_short_unique_id.default({ length: 10 });
27841
28038
 
27842
- // src/profile/WebIdProfile.ts
27843
- var WebIdProfile = class extends Thing {
27844
- constructor(webId, store, editable = false) {
27845
- super(webId, store, editable);
27846
- this.webId = webId;
27847
- this.store = store;
27848
- this.editable = editable;
27849
- this.profileQuery = new ProfileQuery(namedNode(this.webId), this.store);
27850
- }
27851
- /**
27852
- * Returns the URI of the preferences document
27853
- */
27854
- getPreferencesFile() {
27855
- return this.profileQuery.queryPreferencesFile()?.value;
27856
- }
27857
- /**
27858
- * Returns the URI of the public type index document
27859
- * @since 0.24.0
27860
- */
27861
- getPublicTypeIndex() {
27862
- return this.profileQuery.queryPublicTypeIndex()?.value;
27863
- }
27864
- /**
27865
- * Returns the URI of the private type index document
27866
- * @since 0.24.0
27867
- */
27868
- getPrivateTypeIndex() {
27869
- const preferences = this.profileQuery.queryPreferencesFile();
27870
- if (!preferences) return void 0;
27871
- const query4 = new PreferencesQuery(
27872
- this.store,
27873
- namedNode(this.webId),
27874
- preferences
27875
- );
27876
- return query4.queryPrivateTypeIndex()?.value;
27877
- }
27878
- /**
27879
- * Returns the URIs of the private label indexes
27880
- */
27881
- getPrivateLabelIndexes() {
27882
- const profileNodes = this.store.each(
27883
- namedNode(this.webId),
27884
- namedNode("http://www.w3.org/ns/solid/terms#privateLabelIndex"),
27885
- void 0,
27886
- namedNode(this.webId).doc()
27887
- );
27888
- const preferences = this.getPreferencesFile();
27889
- if (preferences) {
27890
- const preferencesNodes = this.store.each(
27891
- namedNode(this.webId),
27892
- namedNode("http://www.w3.org/ns/solid/terms#privateLabelIndex"),
27893
- void 0,
27894
- namedNode(preferences)
27895
- );
27896
- return [...profileNodes, ...preferencesNodes].map((it) => it.value);
27897
- } else {
27898
- return profileNodes.map((it) => it.value);
27899
- }
27900
- }
27901
- };
27902
-
27903
- // src/profile/ProfileGateway.ts
27904
- var ProfileGateway = class {
27905
- constructor(store) {
27906
- this.store = store;
27907
- }
27908
- /**
27909
- * Fetches the profile for the given WebID and all linked documents
27910
- * @since 0.24.0
27911
- * @param webId The WebID to fetch the profile for
27912
- * @returns {Promise<WebIdProfile>} The fetched profile
27913
- */
27914
- async fetchProfile(webId) {
27915
- await this.store.fetch(webId);
27916
- const profile2 = this.store.get(webId).assume(WebIdProfile);
27917
- const preferences = profile2.getPreferencesFile();
27918
- if (preferences) {
27919
- try {
27920
- await this.store.fetch(preferences);
27921
- } catch (error4) {
27922
- console.warn(`Failed to fetch preferences file ${preferences}:`, error4);
27923
- }
27924
- }
27925
- const publicTypeIndex2 = profile2.getPublicTypeIndex();
27926
- const privateTypeIndex2 = profile2.getPrivateTypeIndex();
27927
- await this.store.fetchAll(
27928
- [privateTypeIndex2, publicTypeIndex2].filter((it) => it !== void 0)
27929
- );
27930
- return profile2;
27931
- }
27932
- };
27933
-
27934
- // src/search/SearchIndex.ts
27935
- var import_lunr = __toESM(require_lunr(), 1);
27936
- var SearchIndex = class {
27937
- constructor(labelIndexes) {
27938
- this.labelIndexes = labelIndexes;
27939
- this.index = this.rebuild().index;
27940
- }
27941
- /**
27942
- * Recreates the search index with the current data from all label indexes
27943
- */
27944
- rebuild() {
27945
- const labelIndexes = this.labelIndexes;
27946
- this.index = (0, import_lunr.default)(function() {
27947
- this.ref("uri");
27948
- this.field("uri");
27949
- this.field("label");
27950
- this.metadataWhitelist = ["position"];
27951
- const items2 = labelIndexes.flatMap((it) => it.getIndexedItems());
27952
- items2.forEach((item4) => {
27953
- this.add({
27954
- uri: item4.uri,
27955
- label: item4.label
27956
- });
27957
- });
27958
- });
27959
- return this;
27960
- }
27961
- /**
27962
- * Search the index for a given term. It finds partial matches, but will rank exact matches higher.
27963
- *
27964
- * The rank order is:
27965
- *
27966
- * 1. exact matches
27967
- * 2. prefix matches
27968
- * 3. suffix matches
27969
- * 4. any matches inside a literal
27970
- *
27971
- * @param term The (partial) term to search for
27972
- * @param maxResults The maximum number of results to return (defaults to 10)
27973
- */
27974
- search(term3, maxResults = 10) {
27975
- const escapedTerm = term3.replace(/[~^+:]/g, (x) => `\\${x}`);
27976
- return this.index.search(
27977
- `${escapedTerm}^100 ${escapedTerm}*^20 *${escapedTerm}^10 *${escapedTerm}*^5`
27978
- ).slice(0, maxResults);
27979
- }
27980
- /**
27981
- * Remove all data from the search index.
27982
- */
27983
- clear() {
27984
- this.index = (0, import_lunr.default)(() => {
27985
- });
27986
- }
27987
- };
27988
-
27989
- // src/rdf-document/RdfDocument.ts
27990
- var RdfDocument = class extends Thing {
27991
- constructor(uri6, store, editable = false) {
27992
- super(uri6, store, editable);
27993
- this.uri = uri6;
27994
- this.store = store;
27995
- this.editable = editable;
27996
- }
27997
- subjects() {
27998
- const matches = this.store.statementsMatching(
27999
- null,
28000
- null,
28001
- null,
28002
- namedNode(this.uri)
28003
- );
28004
- const uris = matches.filter((match) => isNamedNode(match.subject)).map((match) => match.subject.value);
28005
- const uniqueUris = new Set(uris);
28006
- uniqueUris.delete(this.uri);
28007
- return [...uniqueUris].map((uri6) => ({
28008
- uri: uri6
28009
- }));
28010
- }
28011
- };
28012
-
28013
- // src/search/LabelIndex.ts
28014
- var LabelIndex = class extends RdfDocument {
28015
- constructor(uri6, store, editable = false) {
28016
- super(uri6, store, editable);
28017
- this.uri = uri6;
28018
- this.store = store;
28019
- this.editable = editable;
28020
- }
28021
- /**
28022
- * Returns the URIs and labels for all the things listed in the document.
28023
- */
28024
- getIndexedItems() {
28025
- const matches = this.store.statementsMatching(
28026
- null,
28027
- rdfs("label"),
28028
- null,
28029
- namedNode(this.uri)
28030
- );
28031
- return matches.map((it) => {
28032
- return {
28033
- uri: it.subject.value,
28034
- label: it.object.value
28035
- };
28036
- });
28037
- }
28038
- contains(uri6) {
28039
- return this.store.holds(namedNode(uri6), rdfs("label"), null, namedNode(this.uri));
28040
- }
28041
- };
28042
-
28043
28039
  // src/search/createDefaultLabelIndex.ts
28044
28040
  function createDefaultLabelIndex(profile2) {
28045
28041
  const webId = namedNode(profile2.webId);
@@ -28240,7 +28236,7 @@ var Store = class {
28240
28236
  */
28241
28237
  get(uri6) {
28242
28238
  const editable = !!this.updater.editable(uri6);
28243
- return new Thing(uri6, this.internalStore, editable);
28239
+ return new Thing(uri6, this, editable);
28244
28240
  }
28245
28241
  /**
28246
28242
  * Adds a new value to the property of the given thing
@@ -28323,6 +28319,139 @@ var Store = class {
28323
28319
  distinctUntilChanged((prev2, curr) => prev2.length == curr.length)
28324
28320
  );
28325
28321
  }
28322
+ /**
28323
+ * Finds types of the given resource
28324
+ *
28325
+ * @param {string|NamedNode|BlankNode} uri String or RDF/JS object
28326
+ * @returns {string[]} An array of URIs of types
28327
+ */
28328
+ findTypes(uri6) {
28329
+ if (typeof uri6 === "string") uri6 = namedNode(uri6);
28330
+ return Object.keys(this.internalStore.findTypeURIs(uri6));
28331
+ }
28332
+ /**
28333
+ * Determines whether the store includes a certain quad pattern, returning true or false as appropriate.
28334
+ *
28335
+ * @param {Quad_Subject|null|undefined} subject
28336
+ * @param {Quad_Predicate|null|undefined} predicate
28337
+ * @param {Quad_Object|null|undefined} object
28338
+ * @param {Quad_Graph|null|undefined} graph
28339
+ * @returns {boolean} Whether the store includes the quad pattern
28340
+ */
28341
+ holds(subject8, predicate4, object8, graph3) {
28342
+ return this.internalStore.holds(subject8, predicate4, object8, graph3);
28343
+ }
28344
+ /**
28345
+ * Statements matching the provided quad pattern
28346
+ *
28347
+ * @param {Quad_Subject|null|undefined} subject
28348
+ * @param {Quad_Predicate|null|undefined} predicate
28349
+ * @param {Quad_Object|null|undefined} object
28350
+ * @param {Quad_Graph|null|undefined} graph
28351
+ * @returns {Quad[]} Array of statements
28352
+ */
28353
+ statementsMatching(subject8, predicate4, object8, graph3) {
28354
+ return this.internalStore.statementsMatching(
28355
+ subject8,
28356
+ predicate4,
28357
+ object8,
28358
+ graph3
28359
+ );
28360
+ }
28361
+ /**
28362
+ * RDF/JS terms matching the first wildcard in the provided quad pattern
28363
+ *
28364
+ * @param {Quad_Subject|null|undefined} subject
28365
+ * @param {Quad_Predicate|null|undefined} predicate
28366
+ * @param {Quad_Object|null|undefined} object
28367
+ * @param {Quad_Graph|null|undefined} graph
28368
+ * @returns {Term[]} Array of terms
28369
+ */
28370
+ each(subject8, predicate4, object8, graph3) {
28371
+ const statements = this.statementsMatching(
28372
+ subject8,
28373
+ predicate4,
28374
+ object8,
28375
+ graph3
28376
+ );
28377
+ if (!subject8) {
28378
+ return statements.map((statement2) => statement2.subject);
28379
+ } else if (!predicate4) {
28380
+ return statements.map((statement2) => statement2.predicate);
28381
+ } else if (!object8) {
28382
+ return statements.map((statement2) => statement2.object);
28383
+ } else if (!graph3) {
28384
+ return statements.map((statement2) => statement2.graph);
28385
+ }
28386
+ throw new Error("No wildcard specified");
28387
+ }
28388
+ /**
28389
+ * Any one RDF/JS term matching the first wildcard in the provided quad pattern
28390
+ *
28391
+ * @param {Quad_Subject|null|undefined} subject
28392
+ * @param {Quad_Predicate|null|undefined} predicate
28393
+ * @param {Quad_Object|null|undefined} object
28394
+ * @param {Quad_Graph|null|undefined} graph
28395
+ * @returns {Term | null} RDF/JS term
28396
+ */
28397
+ any(subject8, predicate4, object8, graph3) {
28398
+ const justOne = true;
28399
+ const statements = this.internalStore.statementsMatching(
28400
+ subject8,
28401
+ predicate4,
28402
+ object8,
28403
+ graph3,
28404
+ justOne
28405
+ );
28406
+ if (statements.length == 0) return null;
28407
+ if (!subject8) {
28408
+ return statements[0].subject;
28409
+ } else if (!predicate4) {
28410
+ return statements[0].predicate;
28411
+ } else if (!object8) {
28412
+ return statements[0].object;
28413
+ } else if (!graph3) {
28414
+ return statements[0].graph;
28415
+ }
28416
+ throw new Error("No wildcard specified");
28417
+ }
28418
+ /**
28419
+ * Value of any one RDF/JS term matching the first wildcard in the provided quad pattern
28420
+ *
28421
+ * @param {Quad_Subject|null|undefined} subject
28422
+ * @param {Quad_Predicate|null|undefined} predicate
28423
+ * @param {Quad_Object|null|undefined} object
28424
+ * @param {Quad_Graph|null|undefined} graph
28425
+ * @returns {string | undefined} value of RDF/JS term
28426
+ */
28427
+ anyValue(subject8, predicate4, object8, graph3) {
28428
+ return this.any(subject8, predicate4, object8, graph3)?.value;
28429
+ }
28430
+ /**
28431
+ * Create a query to fetch information from a user's preferences file
28432
+ *
28433
+ * @param webId
28434
+ * @param preferencesDoc
28435
+ * @returns {PreferencesQuery} PreferencesQuery instance. See [@solid-data-modules/rdflib-utils
28436
+ ](https://solid-contrib.github.io/data-modules/rdflib-utils/classes/index.PreferencesQuery.html)
28437
+ */
28438
+ preferencesQuery(webId, preferencesDoc) {
28439
+ if (typeof webId === "string") webId = namedNode(webId);
28440
+ if (typeof preferencesDoc === "string")
28441
+ preferencesDoc = namedNode(preferencesDoc);
28442
+ return new PreferencesQuery(this.internalStore, webId, preferencesDoc);
28443
+ }
28444
+ /**
28445
+ * Create a query to fetch information from a user's profile document
28446
+ *
28447
+ * @param webId
28448
+ * @returns {ProfileQuery} ProfileQuery instance. See [@solid-data-modules/rdflib-utils
28449
+ ](https://solid-contrib.github.io/data-modules/rdflib-utils/classes/index.ProfileQuery.html)
28450
+ */
28451
+ profileQuery(webId) {
28452
+ if (typeof webId === "string") webId = namedNode(webId);
28453
+ return new ProfileQuery(webId, this.internalStore);
28454
+ }
28326
28455
  };
28327
28456
 
28328
28457
  // ../node_modules/rdf-namespaces/dist/index.es.js
@@ -38262,7 +38391,7 @@ var langString = "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString";
38262
38391
  var PlainLiteral = "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral";
38263
38392
  var type4 = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
38264
38393
  var Property2 = "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property";
38265
- var Statement2 = "http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement";
38394
+ var Statement3 = "http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement";
38266
38395
  var subject5 = "http://www.w3.org/1999/02/22-rdf-syntax-ns#subject";
38267
38396
  var predicate = "http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate";
38268
38397
  var object3 = "http://www.w3.org/1999/02/22-rdf-syntax-ns#object";
@@ -38284,7 +38413,7 @@ var rdfImport = /* @__PURE__ */ Object.freeze({
38284
38413
  PlainLiteral,
38285
38414
  type: type4,
38286
38415
  Property: Property2,
38287
- Statement: Statement2,
38416
+ Statement: Statement3,
38288
38417
  subject: subject5,
38289
38418
  predicate,
38290
38419
  object: object3,
@@ -39161,7 +39290,7 @@ var SportsTeam = "http://schema.org/SportsTeam";
39161
39290
  var SpreadsheetDigitalDocument = "http://schema.org/SpreadsheetDigitalDocument";
39162
39291
  var StadiumOrArena = "http://schema.org/StadiumOrArena";
39163
39292
  var State = "http://schema.org/State";
39164
- var Statement3 = "http://schema.org/Statement";
39293
+ var Statement4 = "http://schema.org/Statement";
39165
39294
  var StatisticalPopulation = "http://schema.org/StatisticalPopulation";
39166
39295
  var StatisticalVariable = "http://schema.org/StatisticalVariable";
39167
39296
  var StatusEnumeration = "http://schema.org/StatusEnumeration";
@@ -41600,7 +41729,7 @@ var schemaImport = /* @__PURE__ */ Object.freeze({
41600
41729
  SpreadsheetDigitalDocument,
41601
41730
  StadiumOrArena,
41602
41731
  State,
41603
- Statement: Statement3,
41732
+ Statement: Statement4,
41604
41733
  StatisticalPopulation,
41605
41734
  StatisticalVariable,
41606
41735
  StatusEnumeration,
@@ -44041,7 +44170,7 @@ var SportsTeam2 = "https://schema.org/SportsTeam";
44041
44170
  var SpreadsheetDigitalDocument2 = "https://schema.org/SpreadsheetDigitalDocument";
44042
44171
  var StadiumOrArena2 = "https://schema.org/StadiumOrArena";
44043
44172
  var State2 = "https://schema.org/State";
44044
- var Statement4 = "https://schema.org/Statement";
44173
+ var Statement5 = "https://schema.org/Statement";
44045
44174
  var StatisticalPopulation2 = "https://schema.org/StatisticalPopulation";
44046
44175
  var StatisticalVariable2 = "https://schema.org/StatisticalVariable";
44047
44176
  var StatusEnumeration2 = "https://schema.org/StatusEnumeration";
@@ -46480,7 +46609,7 @@ var schema_httpsImport = /* @__PURE__ */ Object.freeze({
46480
46609
  SpreadsheetDigitalDocument: SpreadsheetDigitalDocument2,
46481
46610
  StadiumOrArena: StadiumOrArena2,
46482
46611
  State: State2,
46483
- Statement: Statement4,
46612
+ Statement: Statement5,
46484
46613
  StatisticalPopulation: StatisticalPopulation2,
46485
46614
  StatisticalVariable: StatisticalVariable2,
46486
46615
  StatusEnumeration: StatusEnumeration2,
@@ -49659,6 +49788,181 @@ async function loadModule(moduleName, store) {
49659
49788
  return store.loadModule(module3);
49660
49789
  }
49661
49790
 
49791
+ // ../node_modules/url-template/lib/url-template.js
49792
+ function encodeReserved(str) {
49793
+ return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part3) {
49794
+ if (!/%[0-9A-Fa-f]/.test(part3)) {
49795
+ part3 = encodeURI(part3).replace(/%5B/g, "[").replace(/%5D/g, "]");
49796
+ }
49797
+ return part3;
49798
+ }).join("");
49799
+ }
49800
+ function encodeUnreserved(str) {
49801
+ return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
49802
+ return "%" + c.charCodeAt(0).toString(16).toUpperCase();
49803
+ });
49804
+ }
49805
+ function encodeValue(operator2, value7, key3) {
49806
+ value7 = operator2 === "+" || operator2 === "#" ? encodeReserved(value7) : encodeUnreserved(value7);
49807
+ if (key3) {
49808
+ return encodeUnreserved(key3) + "=" + value7;
49809
+ } else {
49810
+ return value7;
49811
+ }
49812
+ }
49813
+ function isDefined(value7) {
49814
+ return value7 !== void 0 && value7 !== null;
49815
+ }
49816
+ function isKeyOperator(operator2) {
49817
+ return operator2 === ";" || operator2 === "&" || operator2 === "?";
49818
+ }
49819
+ function getValues(context4, operator2, key3, modifier2) {
49820
+ var value7 = context4[key3], result6 = [];
49821
+ if (isDefined(value7) && value7 !== "") {
49822
+ if (typeof value7 === "string" || typeof value7 === "number" || typeof value7 === "boolean") {
49823
+ value7 = value7.toString();
49824
+ if (modifier2 && modifier2 !== "*") {
49825
+ value7 = value7.substring(0, parseInt(modifier2, 10));
49826
+ }
49827
+ result6.push(encodeValue(operator2, value7, isKeyOperator(operator2) ? key3 : null));
49828
+ } else {
49829
+ if (modifier2 === "*") {
49830
+ if (Array.isArray(value7)) {
49831
+ value7.filter(isDefined).forEach(function(value8) {
49832
+ result6.push(encodeValue(operator2, value8, isKeyOperator(operator2) ? key3 : null));
49833
+ });
49834
+ } else {
49835
+ Object.keys(value7).forEach(function(k) {
49836
+ if (isDefined(value7[k])) {
49837
+ result6.push(encodeValue(operator2, value7[k], k));
49838
+ }
49839
+ });
49840
+ }
49841
+ } else {
49842
+ var tmp = [];
49843
+ if (Array.isArray(value7)) {
49844
+ value7.filter(isDefined).forEach(function(value8) {
49845
+ tmp.push(encodeValue(operator2, value8));
49846
+ });
49847
+ } else {
49848
+ Object.keys(value7).forEach(function(k) {
49849
+ if (isDefined(value7[k])) {
49850
+ tmp.push(encodeUnreserved(k));
49851
+ tmp.push(encodeValue(operator2, value7[k].toString()));
49852
+ }
49853
+ });
49854
+ }
49855
+ if (isKeyOperator(operator2)) {
49856
+ result6.push(encodeUnreserved(key3) + "=" + tmp.join(","));
49857
+ } else if (tmp.length !== 0) {
49858
+ result6.push(tmp.join(","));
49859
+ }
49860
+ }
49861
+ }
49862
+ } else {
49863
+ if (operator2 === ";") {
49864
+ if (isDefined(value7)) {
49865
+ result6.push(encodeUnreserved(key3));
49866
+ }
49867
+ } else if (value7 === "" && (operator2 === "&" || operator2 === "?")) {
49868
+ result6.push(encodeUnreserved(key3) + "=");
49869
+ } else if (value7 === "") {
49870
+ result6.push("");
49871
+ }
49872
+ }
49873
+ return result6;
49874
+ }
49875
+ function parseTemplate(template3) {
49876
+ var operators = ["+", "#", ".", "/", ";", "?", "&"];
49877
+ return {
49878
+ expand: function(context4) {
49879
+ return template3.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function(_, expression4, literal4) {
49880
+ if (expression4) {
49881
+ var operator2 = null, values2 = [];
49882
+ if (operators.indexOf(expression4.charAt(0)) !== -1) {
49883
+ operator2 = expression4.charAt(0);
49884
+ expression4 = expression4.substr(1);
49885
+ }
49886
+ expression4.split(/,/g).forEach(function(variable5) {
49887
+ var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable5);
49888
+ values2.push.apply(values2, getValues(context4, operator2, tmp[1], tmp[2] || tmp[3]));
49889
+ });
49890
+ if (operator2 && operator2 !== "+") {
49891
+ var separator = ",";
49892
+ if (operator2 === "?") {
49893
+ separator = "&";
49894
+ } else if (operator2 !== "#") {
49895
+ separator = operator2;
49896
+ }
49897
+ return (values2.length !== 0 ? operator2 : "") + values2.join(separator);
49898
+ } else {
49899
+ return values2.join(",");
49900
+ }
49901
+ } else {
49902
+ return encodeReserved(literal4);
49903
+ }
49904
+ });
49905
+ }
49906
+ };
49907
+ }
49908
+
49909
+ // src/open-with/apps.ts
49910
+ var APPS = {
49911
+ DATA_BROWSER: {
49912
+ name: "Data Browser (SolidOS)",
49913
+ urlTemplate: parseTemplate(
49914
+ "https://solidos.github.io/mashlib/dist/browse.html{?uri}"
49915
+ )
49916
+ },
49917
+ PENNY: {
49918
+ name: "Penny",
49919
+ urlTemplate: parseTemplate(
49920
+ "https://penny.vincenttunru.com/explore/?url={uri}"
49921
+ )
49922
+ },
49923
+ SOLID_FILE_MANAGER: {
49924
+ name: "Solid File Manager",
49925
+ urlTemplate: parseTemplate(
49926
+ "https://otto-aa.github.io/solid-filemanager/?url={uri}"
49927
+ )
49928
+ },
49929
+ UMAI: {
49930
+ name: "Umai",
49931
+ urlTemplate: parseTemplate(
49932
+ "https://umai.noeldemartin.com/viewer?url={uri}"
49933
+ )
49934
+ },
49935
+ DOKIELI: {
49936
+ name: "dokieli",
49937
+ urlTemplate: parseTemplate("https://dokie.li/#open={uri}")
49938
+ },
49939
+ DOKIELI_GRAPH: {
49940
+ name: "dokieli Graph",
49941
+ urlTemplate: parseTemplate("https://dokie.li/#graph={uri}")
49942
+ },
49943
+ POD_OS_CONTACTS: {
49944
+ name: "PodOS Contacts",
49945
+ urlTemplate: parseTemplate(
49946
+ "https://contacts.pod-os.org/address-book{?uri}"
49947
+ )
49948
+ }
49949
+ };
49950
+
49951
+ // src/open-with/proposeAppsFor.ts
49952
+ var appRegistrations = {
49953
+ "http://www.w3.org/ns/ldp#Container": [APPS.SOLID_FILE_MANAGER],
49954
+ "http://schema.org/Recipe": [APPS.UMAI],
49955
+ "https://schema.org/Recipe": [APPS.UMAI],
49956
+ "http://www.w3.org/2007/ont/link#RDFDocument": [APPS.DOKIELI_GRAPH],
49957
+ "http://www.w3.org/ns/iana/media-types/text/html#Resource": [APPS.DOKIELI],
49958
+ "http://www.w3.org/2006/vcard/ns#AddressBook": [APPS.POD_OS_CONTACTS]
49959
+ };
49960
+ function proposeAppsFor(thing) {
49961
+ const apps = [APPS.DATA_BROWSER, APPS.PENNY];
49962
+ const appsForType = thing.types().flatMap((it) => appRegistrations[it.uri]).filter((it) => it !== void 0);
49963
+ return [...apps, ...appsForType];
49964
+ }
49965
+
49662
49966
  // src/type-index/TypeIndex.ts
49663
49967
  var TypeIndex2 = class extends Thing {
49664
49968
  constructor(uri6, store, editable = false) {
@@ -49847,6 +50151,14 @@ var PodOS = class {
49847
50151
  attachments() {
49848
50152
  return this.attachmentGateway;
49849
50153
  }
50154
+ /**
50155
+ * Propose matching apps to open a thing
50156
+ * @param thing - The thing to open
50157
+ * @returns An array of apps that can open the thing. The array is empty if no apps are found.
50158
+ */
50159
+ proposeAppsFor(thing) {
50160
+ return proposeAppsFor(thing);
50161
+ }
49850
50162
  };
49851
50163
  /*! Bundled license information:
49852
50164