@pod-os/core 0.13.1-ebe6b8e.0 → 0.14.1-178554f.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.
- package/dist/{chunk-7VQUARYZ.js → chunk-RI2OJWF3.js} +10219 -12607
- package/dist/{dist-F3EUFQHU.js → dist-SZGBZENE.js} +2 -344
- package/dist/index.js +74 -15
- package/dist/{jsonld-ECVURSS6.js → jsonld-RY2OHZTS.js} +2 -2
- package/lib/index.js +10127 -12902
- package/package.json +2 -1
- package/types/Store.d.ts +2 -0
- package/types/index.d.ts +7 -1
- package/types/namespaces/index.d.ts +1 -0
- package/types/search/LabelIndex.d.ts +1 -0
- package/types/search/addToLabelIndex.d.ts +4 -0
- package/types/search/addToLabelIndex.spec.d.ts +1 -0
|
@@ -3,355 +3,13 @@ import {
|
|
|
3
3
|
isNamedNode,
|
|
4
4
|
lit,
|
|
5
5
|
namedNode,
|
|
6
|
+
require_short_unique_id,
|
|
6
7
|
st
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RI2OJWF3.js";
|
|
8
9
|
import {
|
|
9
|
-
__commonJS,
|
|
10
10
|
__toESM
|
|
11
11
|
} from "./chunk-U67V476Y.js";
|
|
12
12
|
|
|
13
|
-
// ../node_modules/short-unique-id/dist/short-unique-id.js
|
|
14
|
-
var require_short_unique_id = __commonJS({
|
|
15
|
-
"../node_modules/short-unique-id/dist/short-unique-id.js"(exports, module) {
|
|
16
|
-
"use strict";
|
|
17
|
-
var ShortUniqueId2 = (() => {
|
|
18
|
-
var __defProp = Object.defineProperty;
|
|
19
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
20
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
21
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
22
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
23
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
24
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
25
|
-
var __spreadValues = (a, b) => {
|
|
26
|
-
for (var prop in b || (b = {}))
|
|
27
|
-
if (__hasOwnProp.call(b, prop))
|
|
28
|
-
__defNormalProp(a, prop, b[prop]);
|
|
29
|
-
if (__getOwnPropSymbols)
|
|
30
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
31
|
-
if (__propIsEnum.call(b, prop))
|
|
32
|
-
__defNormalProp(a, prop, b[prop]);
|
|
33
|
-
}
|
|
34
|
-
return a;
|
|
35
|
-
};
|
|
36
|
-
var __export = (target, all) => {
|
|
37
|
-
for (var name in all)
|
|
38
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
39
|
-
};
|
|
40
|
-
var __copyProps = (to, from, except, desc) => {
|
|
41
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
42
|
-
for (let key of __getOwnPropNames(from))
|
|
43
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
44
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
45
|
-
}
|
|
46
|
-
return to;
|
|
47
|
-
};
|
|
48
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
49
|
-
var __publicField = (obj, key, value) => {
|
|
50
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
51
|
-
return value;
|
|
52
|
-
};
|
|
53
|
-
var src_exports = {};
|
|
54
|
-
__export(src_exports, {
|
|
55
|
-
DEFAULT_OPTIONS: () => DEFAULT_OPTIONS,
|
|
56
|
-
DEFAULT_UUID_LENGTH: () => DEFAULT_UUID_LENGTH,
|
|
57
|
-
default: () => ShortUniqueId3
|
|
58
|
-
});
|
|
59
|
-
var version = "5.2.0";
|
|
60
|
-
var DEFAULT_UUID_LENGTH = 6;
|
|
61
|
-
var DEFAULT_OPTIONS = {
|
|
62
|
-
dictionary: "alphanum",
|
|
63
|
-
shuffle: true,
|
|
64
|
-
debug: false,
|
|
65
|
-
length: DEFAULT_UUID_LENGTH,
|
|
66
|
-
counter: 0
|
|
67
|
-
};
|
|
68
|
-
var _ShortUniqueId = class _ShortUniqueId {
|
|
69
|
-
constructor(argOptions = {}) {
|
|
70
|
-
__publicField(this, "counter");
|
|
71
|
-
__publicField(this, "debug");
|
|
72
|
-
__publicField(this, "dict");
|
|
73
|
-
__publicField(this, "version");
|
|
74
|
-
__publicField(this, "dictIndex", 0);
|
|
75
|
-
__publicField(this, "dictRange", []);
|
|
76
|
-
__publicField(this, "lowerBound", 0);
|
|
77
|
-
__publicField(this, "upperBound", 0);
|
|
78
|
-
__publicField(this, "dictLength", 0);
|
|
79
|
-
__publicField(this, "uuidLength");
|
|
80
|
-
__publicField(this, "_digit_first_ascii", 48);
|
|
81
|
-
__publicField(this, "_digit_last_ascii", 58);
|
|
82
|
-
__publicField(this, "_alpha_lower_first_ascii", 97);
|
|
83
|
-
__publicField(this, "_alpha_lower_last_ascii", 123);
|
|
84
|
-
__publicField(this, "_hex_last_ascii", 103);
|
|
85
|
-
__publicField(this, "_alpha_upper_first_ascii", 65);
|
|
86
|
-
__publicField(this, "_alpha_upper_last_ascii", 91);
|
|
87
|
-
__publicField(this, "_number_dict_ranges", {
|
|
88
|
-
digits: [this._digit_first_ascii, this._digit_last_ascii]
|
|
89
|
-
});
|
|
90
|
-
__publicField(this, "_alpha_dict_ranges", {
|
|
91
|
-
lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii],
|
|
92
|
-
upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
|
|
93
|
-
});
|
|
94
|
-
__publicField(this, "_alpha_lower_dict_ranges", {
|
|
95
|
-
lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii]
|
|
96
|
-
});
|
|
97
|
-
__publicField(this, "_alpha_upper_dict_ranges", {
|
|
98
|
-
upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
|
|
99
|
-
});
|
|
100
|
-
__publicField(this, "_alphanum_dict_ranges", {
|
|
101
|
-
digits: [this._digit_first_ascii, this._digit_last_ascii],
|
|
102
|
-
lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii],
|
|
103
|
-
upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
|
|
104
|
-
});
|
|
105
|
-
__publicField(this, "_alphanum_lower_dict_ranges", {
|
|
106
|
-
digits: [this._digit_first_ascii, this._digit_last_ascii],
|
|
107
|
-
lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii]
|
|
108
|
-
});
|
|
109
|
-
__publicField(this, "_alphanum_upper_dict_ranges", {
|
|
110
|
-
digits: [this._digit_first_ascii, this._digit_last_ascii],
|
|
111
|
-
upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]
|
|
112
|
-
});
|
|
113
|
-
__publicField(this, "_hex_dict_ranges", {
|
|
114
|
-
decDigits: [this._digit_first_ascii, this._digit_last_ascii],
|
|
115
|
-
alphaDigits: [this._alpha_lower_first_ascii, this._hex_last_ascii]
|
|
116
|
-
});
|
|
117
|
-
__publicField(this, "_dict_ranges", {
|
|
118
|
-
_number_dict_ranges: this._number_dict_ranges,
|
|
119
|
-
_alpha_dict_ranges: this._alpha_dict_ranges,
|
|
120
|
-
_alpha_lower_dict_ranges: this._alpha_lower_dict_ranges,
|
|
121
|
-
_alpha_upper_dict_ranges: this._alpha_upper_dict_ranges,
|
|
122
|
-
_alphanum_dict_ranges: this._alphanum_dict_ranges,
|
|
123
|
-
_alphanum_lower_dict_ranges: this._alphanum_lower_dict_ranges,
|
|
124
|
-
_alphanum_upper_dict_ranges: this._alphanum_upper_dict_ranges,
|
|
125
|
-
_hex_dict_ranges: this._hex_dict_ranges
|
|
126
|
-
});
|
|
127
|
-
__publicField(this, "log", (...args) => {
|
|
128
|
-
const finalArgs = [...args];
|
|
129
|
-
finalArgs[0] = `[short-unique-id] ${args[0]}`;
|
|
130
|
-
if (this.debug === true) {
|
|
131
|
-
if (typeof console !== "undefined" && console !== null) {
|
|
132
|
-
return console.log(...finalArgs);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
__publicField(this, "_normalizeDictionary", (dictionary2, shuffle2) => {
|
|
137
|
-
let finalDict;
|
|
138
|
-
if (dictionary2 && Array.isArray(dictionary2) && dictionary2.length > 1) {
|
|
139
|
-
finalDict = dictionary2;
|
|
140
|
-
} else {
|
|
141
|
-
finalDict = [];
|
|
142
|
-
let i;
|
|
143
|
-
this.dictIndex = i = 0;
|
|
144
|
-
const rangesName = `_${dictionary2}_dict_ranges`;
|
|
145
|
-
const ranges = this._dict_ranges[rangesName];
|
|
146
|
-
Object.keys(ranges).forEach((rangeType) => {
|
|
147
|
-
const rangeTypeKey = rangeType;
|
|
148
|
-
this.dictRange = ranges[rangeTypeKey];
|
|
149
|
-
this.lowerBound = this.dictRange[0];
|
|
150
|
-
this.upperBound = this.dictRange[1];
|
|
151
|
-
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) {
|
|
152
|
-
finalDict.push(String.fromCharCode(this.dictIndex));
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
if (shuffle2) {
|
|
157
|
-
const PROBABILITY = 0.5;
|
|
158
|
-
finalDict = finalDict.sort(() => Math.random() - PROBABILITY);
|
|
159
|
-
}
|
|
160
|
-
return finalDict;
|
|
161
|
-
});
|
|
162
|
-
__publicField(this, "setDictionary", (dictionary2, shuffle2) => {
|
|
163
|
-
this.dict = this._normalizeDictionary(dictionary2, shuffle2);
|
|
164
|
-
this.dictLength = this.dict.length;
|
|
165
|
-
this.setCounter(0);
|
|
166
|
-
});
|
|
167
|
-
__publicField(this, "seq", () => {
|
|
168
|
-
return this.sequentialUUID();
|
|
169
|
-
});
|
|
170
|
-
__publicField(this, "sequentialUUID", () => {
|
|
171
|
-
let counterDiv;
|
|
172
|
-
let counterRem;
|
|
173
|
-
let id = "";
|
|
174
|
-
counterDiv = this.counter;
|
|
175
|
-
do {
|
|
176
|
-
counterRem = counterDiv % this.dictLength;
|
|
177
|
-
counterDiv = Math.trunc(counterDiv / this.dictLength);
|
|
178
|
-
id += this.dict[counterRem];
|
|
179
|
-
} while (counterDiv !== 0);
|
|
180
|
-
this.counter += 1;
|
|
181
|
-
return id;
|
|
182
|
-
});
|
|
183
|
-
__publicField(this, "rnd", (uuidLength = this.uuidLength || DEFAULT_UUID_LENGTH) => {
|
|
184
|
-
return this.randomUUID(uuidLength);
|
|
185
|
-
});
|
|
186
|
-
__publicField(this, "randomUUID", (uuidLength = this.uuidLength || DEFAULT_UUID_LENGTH) => {
|
|
187
|
-
let id;
|
|
188
|
-
let randomPartIdx;
|
|
189
|
-
let j;
|
|
190
|
-
if (uuidLength === null || typeof uuidLength === "undefined" || uuidLength < 1) {
|
|
191
|
-
throw new Error("Invalid UUID Length Provided");
|
|
192
|
-
}
|
|
193
|
-
const isPositive = uuidLength >= 0;
|
|
194
|
-
id = "";
|
|
195
|
-
for (j = 0; j < uuidLength; j += 1) {
|
|
196
|
-
randomPartIdx = parseInt(
|
|
197
|
-
(Math.random() * this.dictLength).toFixed(0),
|
|
198
|
-
10
|
|
199
|
-
) % this.dictLength;
|
|
200
|
-
id += this.dict[randomPartIdx];
|
|
201
|
-
}
|
|
202
|
-
return id;
|
|
203
|
-
});
|
|
204
|
-
__publicField(this, "fmt", (format, date) => {
|
|
205
|
-
return this.formattedUUID(format, date);
|
|
206
|
-
});
|
|
207
|
-
__publicField(this, "formattedUUID", (format, date) => {
|
|
208
|
-
const fnMap = {
|
|
209
|
-
"$r": this.randomUUID,
|
|
210
|
-
"$s": this.sequentialUUID,
|
|
211
|
-
"$t": this.stamp
|
|
212
|
-
};
|
|
213
|
-
const result = format.replace(
|
|
214
|
-
/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,
|
|
215
|
-
(m) => {
|
|
216
|
-
const fn = m.slice(0, 2);
|
|
217
|
-
const len = parseInt(m.slice(2), 10);
|
|
218
|
-
if (fn === "$s") {
|
|
219
|
-
return fnMap[fn]().padStart(len, "0");
|
|
220
|
-
}
|
|
221
|
-
if (fn === "$t" && date) {
|
|
222
|
-
return fnMap[fn](len, date);
|
|
223
|
-
}
|
|
224
|
-
return fnMap[fn](len);
|
|
225
|
-
}
|
|
226
|
-
);
|
|
227
|
-
return result;
|
|
228
|
-
});
|
|
229
|
-
__publicField(this, "availableUUIDs", (uuidLength = this.uuidLength) => {
|
|
230
|
-
return parseFloat(
|
|
231
|
-
Math.pow([...new Set(this.dict)].length, uuidLength).toFixed(0)
|
|
232
|
-
);
|
|
233
|
-
});
|
|
234
|
-
__publicField(this, "approxMaxBeforeCollision", (rounds = this.availableUUIDs(this.uuidLength)) => {
|
|
235
|
-
return parseFloat(
|
|
236
|
-
Math.sqrt(Math.PI / 2 * rounds).toFixed(20)
|
|
237
|
-
);
|
|
238
|
-
});
|
|
239
|
-
__publicField(this, "collisionProbability", (rounds = this.availableUUIDs(this.uuidLength), uuidLength = this.uuidLength) => {
|
|
240
|
-
return parseFloat(
|
|
241
|
-
(this.approxMaxBeforeCollision(rounds) / this.availableUUIDs(uuidLength)).toFixed(20)
|
|
242
|
-
);
|
|
243
|
-
});
|
|
244
|
-
__publicField(this, "uniqueness", (rounds = this.availableUUIDs(this.uuidLength)) => {
|
|
245
|
-
const score = parseFloat(
|
|
246
|
-
(1 - this.approxMaxBeforeCollision(rounds) / rounds).toFixed(20)
|
|
247
|
-
);
|
|
248
|
-
return score > 1 ? 1 : score < 0 ? 0 : score;
|
|
249
|
-
});
|
|
250
|
-
__publicField(this, "getVersion", () => {
|
|
251
|
-
return this.version;
|
|
252
|
-
});
|
|
253
|
-
__publicField(this, "stamp", (finalLength, date) => {
|
|
254
|
-
const hexStamp = Math.floor(+(date || /* @__PURE__ */ new Date()) / 1e3).toString(16);
|
|
255
|
-
if (typeof finalLength === "number" && finalLength === 0) {
|
|
256
|
-
return hexStamp;
|
|
257
|
-
}
|
|
258
|
-
if (typeof finalLength !== "number" || finalLength < 10) {
|
|
259
|
-
throw new Error(
|
|
260
|
-
[
|
|
261
|
-
"Param finalLength must be a number greater than or equal to 10,",
|
|
262
|
-
"or 0 if you want the raw hexadecimal timestamp"
|
|
263
|
-
].join("\n")
|
|
264
|
-
);
|
|
265
|
-
}
|
|
266
|
-
const idLength = finalLength - 9;
|
|
267
|
-
const rndIdx = Math.round(Math.random() * (idLength > 15 ? 15 : idLength));
|
|
268
|
-
const id = this.randomUUID(idLength);
|
|
269
|
-
return `${id.substring(0, rndIdx)}${hexStamp}${id.substring(rndIdx)}${rndIdx.toString(16)}`;
|
|
270
|
-
});
|
|
271
|
-
__publicField(this, "parseStamp", (suid, format) => {
|
|
272
|
-
if (format && !/t0|t[1-9]\d{1,}/.test(format)) {
|
|
273
|
-
throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");
|
|
274
|
-
}
|
|
275
|
-
const stamp = format ? format.replace(
|
|
276
|
-
/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,
|
|
277
|
-
(m) => {
|
|
278
|
-
const fnMap = {
|
|
279
|
-
"$r": (len2) => [...Array(len2)].map(() => "r").join(""),
|
|
280
|
-
"$s": (len2) => [...Array(len2)].map(() => "s").join(""),
|
|
281
|
-
"$t": (len2) => [...Array(len2)].map(() => "t").join("")
|
|
282
|
-
};
|
|
283
|
-
const fn = m.slice(0, 2);
|
|
284
|
-
const len = parseInt(m.slice(2), 10);
|
|
285
|
-
return fnMap[fn](len);
|
|
286
|
-
}
|
|
287
|
-
).replace(
|
|
288
|
-
/^(.*?)(t{8,})(.*)$/g,
|
|
289
|
-
(_m, p1, p2) => {
|
|
290
|
-
return suid.substring(p1.length, p1.length + p2.length);
|
|
291
|
-
}
|
|
292
|
-
) : suid;
|
|
293
|
-
if (stamp.length === 8) {
|
|
294
|
-
return new Date(parseInt(stamp, 16) * 1e3);
|
|
295
|
-
}
|
|
296
|
-
if (stamp.length < 10) {
|
|
297
|
-
throw new Error("Stamp length invalid");
|
|
298
|
-
}
|
|
299
|
-
const rndIdx = parseInt(stamp.substring(stamp.length - 1), 16);
|
|
300
|
-
return new Date(parseInt(stamp.substring(rndIdx, rndIdx + 8), 16) * 1e3);
|
|
301
|
-
});
|
|
302
|
-
__publicField(this, "setCounter", (counter2) => {
|
|
303
|
-
this.counter = counter2;
|
|
304
|
-
});
|
|
305
|
-
__publicField(this, "validate", (uid2, dictionary2) => {
|
|
306
|
-
const finalDictionary = dictionary2 ? this._normalizeDictionary(dictionary2) : this.dict;
|
|
307
|
-
return uid2.split("").every((c) => finalDictionary.includes(c));
|
|
308
|
-
});
|
|
309
|
-
const options = __spreadValues(__spreadValues({}, DEFAULT_OPTIONS), argOptions);
|
|
310
|
-
this.counter = 0;
|
|
311
|
-
this.debug = false;
|
|
312
|
-
this.dict = [];
|
|
313
|
-
this.version = version;
|
|
314
|
-
const {
|
|
315
|
-
dictionary,
|
|
316
|
-
shuffle,
|
|
317
|
-
length,
|
|
318
|
-
counter
|
|
319
|
-
} = options;
|
|
320
|
-
this.uuidLength = length;
|
|
321
|
-
this.setDictionary(dictionary, shuffle);
|
|
322
|
-
this.setCounter(counter);
|
|
323
|
-
this.debug = options.debug;
|
|
324
|
-
this.log(this.dict);
|
|
325
|
-
this.log(
|
|
326
|
-
`Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`
|
|
327
|
-
);
|
|
328
|
-
this.log = this.log.bind(this);
|
|
329
|
-
this.setDictionary = this.setDictionary.bind(this);
|
|
330
|
-
this.setCounter = this.setCounter.bind(this);
|
|
331
|
-
this.seq = this.seq.bind(this);
|
|
332
|
-
this.sequentialUUID = this.sequentialUUID.bind(this);
|
|
333
|
-
this.rnd = this.rnd.bind(this);
|
|
334
|
-
this.randomUUID = this.randomUUID.bind(this);
|
|
335
|
-
this.fmt = this.fmt.bind(this);
|
|
336
|
-
this.formattedUUID = this.formattedUUID.bind(this);
|
|
337
|
-
this.availableUUIDs = this.availableUUIDs.bind(this);
|
|
338
|
-
this.approxMaxBeforeCollision = this.approxMaxBeforeCollision.bind(this);
|
|
339
|
-
this.collisionProbability = this.collisionProbability.bind(this);
|
|
340
|
-
this.uniqueness = this.uniqueness.bind(this);
|
|
341
|
-
this.getVersion = this.getVersion.bind(this);
|
|
342
|
-
this.stamp = this.stamp.bind(this);
|
|
343
|
-
this.parseStamp = this.parseStamp.bind(this);
|
|
344
|
-
return this;
|
|
345
|
-
}
|
|
346
|
-
};
|
|
347
|
-
__publicField(_ShortUniqueId, "default", _ShortUniqueId);
|
|
348
|
-
var ShortUniqueId3 = _ShortUniqueId;
|
|
349
|
-
return __toCommonJS(src_exports);
|
|
350
|
-
})();
|
|
351
|
-
"undefined" != typeof module && (module.exports = ShortUniqueId2.default), "undefined" != typeof window && (ShortUniqueId2 = ShortUniqueId2.default);
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
|
-
|
|
355
13
|
// ../node_modules/@solid-data-modules/contacts-rdflib/dist/rdflib/namespaces.js
|
|
356
14
|
var vcard = Namespace("http://www.w3.org/2006/vcard/ns#");
|
|
357
15
|
var dc = Namespace("http://purl.org/dc/elements/1.1/");
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Namespace,
|
|
2
3
|
UpdateManager,
|
|
3
4
|
fetcher,
|
|
4
5
|
graph,
|
|
@@ -7,8 +8,9 @@ import {
|
|
|
7
8
|
isNamedNode,
|
|
8
9
|
lit,
|
|
9
10
|
namedNode,
|
|
11
|
+
require_short_unique_id,
|
|
10
12
|
st
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-RI2OJWF3.js";
|
|
12
14
|
import {
|
|
13
15
|
__commonJS,
|
|
14
16
|
__export,
|
|
@@ -13587,7 +13589,7 @@ var FileFetcher = class {
|
|
|
13587
13589
|
|
|
13588
13590
|
// src/modules/contacts.ts
|
|
13589
13591
|
async function loadContactsModule(store) {
|
|
13590
|
-
const module2 = await import("./dist-
|
|
13592
|
+
const module2 = await import("./dist-SZGBZENE.js");
|
|
13591
13593
|
return new module2.default({
|
|
13592
13594
|
store: store.graph,
|
|
13593
13595
|
fetcher: store.fetcher,
|
|
@@ -13898,6 +13900,9 @@ var RdfDocument = class extends Thing {
|
|
|
13898
13900
|
}
|
|
13899
13901
|
};
|
|
13900
13902
|
|
|
13903
|
+
// src/namespaces/index.ts
|
|
13904
|
+
var rdfs = Namespace("http://www.w3.org/2000/01/rdf-schema#");
|
|
13905
|
+
|
|
13901
13906
|
// src/search/LabelIndex.ts
|
|
13902
13907
|
var LabelIndex = class extends RdfDocument {
|
|
13903
13908
|
constructor(uri6, store, editable = false) {
|
|
@@ -13912,7 +13917,7 @@ var LabelIndex = class extends RdfDocument {
|
|
|
13912
13917
|
getIndexedItems() {
|
|
13913
13918
|
const matches = this.store.statementsMatching(
|
|
13914
13919
|
null,
|
|
13915
|
-
|
|
13920
|
+
rdfs("label"),
|
|
13916
13921
|
null,
|
|
13917
13922
|
namedNode(this.uri)
|
|
13918
13923
|
);
|
|
@@ -13923,6 +13928,48 @@ var LabelIndex = class extends RdfDocument {
|
|
|
13923
13928
|
};
|
|
13924
13929
|
});
|
|
13925
13930
|
}
|
|
13931
|
+
contains(uri6) {
|
|
13932
|
+
return this.store.holds(namedNode(uri6), rdfs("label"), null, namedNode(this.uri));
|
|
13933
|
+
}
|
|
13934
|
+
};
|
|
13935
|
+
|
|
13936
|
+
// node_modules/@solid-data-modules/rdflib-utils/dist/web-operations/executeUpdate.js
|
|
13937
|
+
async function executeUpdate(fetcher2, updater, operation3) {
|
|
13938
|
+
await updater.updateMany(operation3.deletions, operation3.insertions);
|
|
13939
|
+
operation3.filesToCreate.map((file2) => {
|
|
13940
|
+
createEmptyTurtleFile(fetcher2, file2.url);
|
|
13941
|
+
});
|
|
13942
|
+
}
|
|
13943
|
+
function createEmptyTurtleFile(fetcher2, url7) {
|
|
13944
|
+
return fetcher2.webOperation("PUT", url7, {
|
|
13945
|
+
contentType: "text/turtle"
|
|
13946
|
+
});
|
|
13947
|
+
}
|
|
13948
|
+
|
|
13949
|
+
// node_modules/@solid-data-modules/rdflib-utils/dist/namespaces/index.js
|
|
13950
|
+
var rdf = Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#");
|
|
13951
|
+
var solid = Namespace("http://www.w3.org/ns/solid/terms#");
|
|
13952
|
+
var pim = Namespace("http://www.w3.org/ns/pim/space#");
|
|
13953
|
+
var ldp = Namespace("http://www.w3.org/ns/ldp#");
|
|
13954
|
+
|
|
13955
|
+
// node_modules/@solid-data-modules/rdflib-utils/dist/identifier/generate-id.js
|
|
13956
|
+
var import_short_unique_id = __toESM(require_short_unique_id(), 1);
|
|
13957
|
+
var uid = new import_short_unique_id.default({ length: 10 });
|
|
13958
|
+
|
|
13959
|
+
// src/search/addToLabelIndex.ts
|
|
13960
|
+
var addToLabelIndex = (thing, labelIndex) => {
|
|
13961
|
+
return {
|
|
13962
|
+
deletions: [],
|
|
13963
|
+
filesToCreate: [],
|
|
13964
|
+
insertions: [
|
|
13965
|
+
st(
|
|
13966
|
+
namedNode(thing.uri),
|
|
13967
|
+
rdfs("label"),
|
|
13968
|
+
lit(thing.label()),
|
|
13969
|
+
namedNode(labelIndex.uri)
|
|
13970
|
+
)
|
|
13971
|
+
]
|
|
13972
|
+
};
|
|
13926
13973
|
};
|
|
13927
13974
|
|
|
13928
13975
|
// src/Store.ts
|
|
@@ -14009,6 +14056,10 @@ var Store = class {
|
|
|
14009
14056
|
}
|
|
14010
14057
|
);
|
|
14011
14058
|
}
|
|
14059
|
+
async addToLabelIndex(thing, labelIndex) {
|
|
14060
|
+
const operation3 = addToLabelIndex(thing, labelIndex);
|
|
14061
|
+
await executeUpdate(this.fetcher, this.updater, operation3);
|
|
14062
|
+
}
|
|
14012
14063
|
};
|
|
14013
14064
|
|
|
14014
14065
|
// ../node_modules/rdf-namespaces/dist/index.es.js
|
|
@@ -14025,21 +14076,21 @@ __export(index_es_exports, {
|
|
|
14025
14076
|
foaf: () => foaf,
|
|
14026
14077
|
http: () => http,
|
|
14027
14078
|
hydra: () => hydra,
|
|
14028
|
-
ldp: () =>
|
|
14079
|
+
ldp: () => ldp2,
|
|
14029
14080
|
link: () => link3,
|
|
14030
14081
|
log: () => log,
|
|
14031
14082
|
meeting: () => meeting,
|
|
14032
14083
|
owl: () => owl,
|
|
14033
14084
|
qu: () => qu,
|
|
14034
|
-
rdf: () =>
|
|
14035
|
-
rdfs: () =>
|
|
14085
|
+
rdf: () => rdf2,
|
|
14086
|
+
rdfs: () => rdfs2,
|
|
14036
14087
|
sched: () => sched,
|
|
14037
14088
|
schema: () => schema,
|
|
14038
14089
|
schema_https: () => schema_https,
|
|
14039
14090
|
sec: () => sec,
|
|
14040
14091
|
sioc: () => sioc,
|
|
14041
14092
|
skos: () => skos,
|
|
14042
|
-
solid: () =>
|
|
14093
|
+
solid: () => solid2,
|
|
14043
14094
|
space: () => space,
|
|
14044
14095
|
tab: () => tab,
|
|
14045
14096
|
tabont: () => tabont,
|
|
@@ -14392,7 +14443,7 @@ var recurrenceId = "http://www.w3.org/2002/12/cal/ical#recurrenceId";
|
|
|
14392
14443
|
var DomainOf_rrule = "http://www.w3.org/2002/12/cal/ical#DomainOf_rrule";
|
|
14393
14444
|
var relatedTo = "http://www.w3.org/2002/12/cal/ical#relatedTo";
|
|
14394
14445
|
var url2 = "http://www.w3.org/2002/12/cal/ical#url";
|
|
14395
|
-
var
|
|
14446
|
+
var uid2 = "http://www.w3.org/2002/12/cal/ical#uid";
|
|
14396
14447
|
var exdate = "http://www.w3.org/2002/12/cal/ical#exdate";
|
|
14397
14448
|
var exrule = "http://www.w3.org/2002/12/cal/ical#exrule";
|
|
14398
14449
|
var Value_RECUR = "http://www.w3.org/2002/12/cal/ical#Value_RECUR";
|
|
@@ -14452,7 +14503,7 @@ var calImport = /* @__PURE__ */ Object.freeze({
|
|
|
14452
14503
|
DomainOf_rrule,
|
|
14453
14504
|
relatedTo,
|
|
14454
14505
|
url: url2,
|
|
14455
|
-
uid,
|
|
14506
|
+
uid: uid2,
|
|
14456
14507
|
exdate,
|
|
14457
14508
|
exrule,
|
|
14458
14509
|
Value_RECUR,
|
|
@@ -16880,7 +16931,7 @@ var _containedItemQuantity = "http://hl7.org/fhir/_containedItemQuantity";
|
|
|
16880
16931
|
var _daysSupply = "http://hl7.org/fhir/_daysSupply";
|
|
16881
16932
|
var reportingVendor = "http://hl7.org/fhir/reportingVendor";
|
|
16882
16933
|
var current = "http://hl7.org/fhir/current";
|
|
16883
|
-
var
|
|
16934
|
+
var uid3 = "http://hl7.org/fhir/uid";
|
|
16884
16935
|
var order = "http://hl7.org/fhir/order";
|
|
16885
16936
|
var priorPrescription = "http://hl7.org/fhir/priorPrescription";
|
|
16886
16937
|
var distanceFromLandmark = "http://hl7.org/fhir/distanceFromLandmark";
|
|
@@ -21113,7 +21164,7 @@ var fhirImport = /* @__PURE__ */ Object.freeze({
|
|
|
21113
21164
|
_daysSupply,
|
|
21114
21165
|
reportingVendor,
|
|
21115
21166
|
current,
|
|
21116
|
-
uid:
|
|
21167
|
+
uid: uid3,
|
|
21117
21168
|
order,
|
|
21118
21169
|
priorPrescription,
|
|
21119
21170
|
distanceFromLandmark,
|
|
@@ -34274,22 +34325,22 @@ var fhir = fhirImport;
|
|
|
34274
34325
|
var foaf = foafImport;
|
|
34275
34326
|
var http = httpImport;
|
|
34276
34327
|
var hydra = hydraImport;
|
|
34277
|
-
var
|
|
34328
|
+
var ldp2 = ldpImport;
|
|
34278
34329
|
var link3 = linkImport;
|
|
34279
34330
|
var log = logImport;
|
|
34280
34331
|
var meeting = meetingImport;
|
|
34281
34332
|
var owl = owlImport;
|
|
34282
34333
|
var qu = quImport;
|
|
34283
34334
|
var trip3 = tripImport;
|
|
34284
|
-
var
|
|
34285
|
-
var
|
|
34335
|
+
var rdf2 = rdfImport;
|
|
34336
|
+
var rdfs2 = rdfsImport;
|
|
34286
34337
|
var sched = schedImport;
|
|
34287
34338
|
var schema = schemaImport;
|
|
34288
34339
|
var schema_https = schema_httpsImport;
|
|
34289
34340
|
var sec = secImport;
|
|
34290
34341
|
var sioc = siocImport;
|
|
34291
34342
|
var skos = skosImport;
|
|
34292
|
-
var
|
|
34343
|
+
var solid2 = solidImport;
|
|
34293
34344
|
var space = spaceImport;
|
|
34294
34345
|
var tab = tabImport;
|
|
34295
34346
|
var tabont = tabontImport;
|
|
@@ -34462,6 +34513,14 @@ var PodOS = class {
|
|
|
34462
34513
|
loadContactsModule() {
|
|
34463
34514
|
return loadContactsModule(this.store);
|
|
34464
34515
|
}
|
|
34516
|
+
/**
|
|
34517
|
+
* Adds a label of the given thing to the label index, so that it can be found after the search index has been rebuilt
|
|
34518
|
+
* @param thing - The thing to index
|
|
34519
|
+
* @param labelIndex - The index to update
|
|
34520
|
+
*/
|
|
34521
|
+
async addToLabelIndex(thing, labelIndex) {
|
|
34522
|
+
await this.store.addToLabelIndex(thing, labelIndex);
|
|
34523
|
+
}
|
|
34465
34524
|
};
|
|
34466
34525
|
export {
|
|
34467
34526
|
BinaryFile,
|
|
@@ -3049,14 +3049,14 @@ var require_ContextResolver = __commonJS({
|
|
|
3049
3049
|
}
|
|
3050
3050
|
} catch (e) {
|
|
3051
3051
|
throw new JsonLdError(
|
|
3052
|
-
|
|
3052
|
+
`Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context. URL: "${url}".`,
|
|
3053
3053
|
"jsonld.InvalidUrl",
|
|
3054
3054
|
{ code: "loading remote context failed", url, cause: e }
|
|
3055
3055
|
);
|
|
3056
3056
|
}
|
|
3057
3057
|
if (!_isObject(context)) {
|
|
3058
3058
|
throw new JsonLdError(
|
|
3059
|
-
|
|
3059
|
+
`Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object. URL: "${url}".`,
|
|
3060
3060
|
"jsonld.InvalidUrl",
|
|
3061
3061
|
{ code: "invalid remote context", url }
|
|
3062
3062
|
);
|