@pod-os/core 0.20.1-rc.4df0acf.0 → 0.20.1-rc.b417220.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/index.js +1042 -53
- package/lib/index.js +1214 -225
- package/package.json +8 -6
- package/types/files/FileFetcher.d.ts +16 -0
- package/types/index.d.ts +1 -0
- package/types/problems/index.d.ts +18 -0
package/lib/index.js
CHANGED
|
@@ -11676,15 +11676,15 @@ var PodOS = (() => {
|
|
|
11676
11676
|
default:
|
|
11677
11677
|
throw new Error("Serialize: Content-type " + contentType4 + " not supported for data write.");
|
|
11678
11678
|
}
|
|
11679
|
-
} catch (
|
|
11679
|
+
} catch (err2) {
|
|
11680
11680
|
if (callback) {
|
|
11681
|
-
return callback(
|
|
11681
|
+
return callback(err2, void 0);
|
|
11682
11682
|
}
|
|
11683
|
-
throw
|
|
11683
|
+
throw err2;
|
|
11684
11684
|
}
|
|
11685
|
-
function executeCallback(
|
|
11685
|
+
function executeCallback(err2, result6) {
|
|
11686
11686
|
if (callback) {
|
|
11687
|
-
callback(
|
|
11687
|
+
callback(err2, result6);
|
|
11688
11688
|
return;
|
|
11689
11689
|
} else {
|
|
11690
11690
|
return result6;
|
|
@@ -11915,7 +11915,7 @@ var PodOS = (() => {
|
|
|
11915
11915
|
* know the class DAG.
|
|
11916
11916
|
* @param types A map of the types
|
|
11917
11917
|
*/
|
|
11918
|
-
bottomTypeURIs(
|
|
11918
|
+
bottomTypeURIs(types2) {
|
|
11919
11919
|
let bots;
|
|
11920
11920
|
let bottom;
|
|
11921
11921
|
let elt;
|
|
@@ -11925,16 +11925,16 @@ var PodOS = (() => {
|
|
|
11925
11925
|
let subs;
|
|
11926
11926
|
let v2;
|
|
11927
11927
|
bots = [];
|
|
11928
|
-
for (let k in
|
|
11929
|
-
if (!
|
|
11930
|
-
v2 =
|
|
11928
|
+
for (let k in types2) {
|
|
11929
|
+
if (!types2.hasOwnProperty(k)) continue;
|
|
11930
|
+
v2 = types2[k];
|
|
11931
11931
|
subs = this.each(void 0, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"), this.rdfFactory.namedNode(k));
|
|
11932
11932
|
bottom = true;
|
|
11933
11933
|
i = 0;
|
|
11934
11934
|
for (len = subs.length; i < len; i++) {
|
|
11935
11935
|
elt = subs[i];
|
|
11936
11936
|
ref = elt.uri;
|
|
11937
|
-
if (ref in
|
|
11937
|
+
if (ref in types2) {
|
|
11938
11938
|
bottom = false;
|
|
11939
11939
|
break;
|
|
11940
11940
|
}
|
|
@@ -12069,9 +12069,9 @@ var PodOS = (() => {
|
|
|
12069
12069
|
* We use NT representations in this version because they handle blank nodes.
|
|
12070
12070
|
*/
|
|
12071
12071
|
findSubClassesNT(subject8) {
|
|
12072
|
-
let
|
|
12073
|
-
|
|
12074
|
-
return this.transitiveClosure(
|
|
12072
|
+
let types2 = {};
|
|
12073
|
+
types2[subject8.toNT()] = true;
|
|
12074
|
+
return this.transitiveClosure(types2, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"), true);
|
|
12075
12075
|
}
|
|
12076
12076
|
/**
|
|
12077
12077
|
* Get all the Classes of which we can RDFS-infer the subject is a subclass
|
|
@@ -12082,9 +12082,9 @@ var PodOS = (() => {
|
|
|
12082
12082
|
* We use NT representations in this version because they handle blank nodes.
|
|
12083
12083
|
*/
|
|
12084
12084
|
findSuperClassesNT(subject8) {
|
|
12085
|
-
let
|
|
12086
|
-
|
|
12087
|
-
return this.transitiveClosure(
|
|
12085
|
+
let types2 = {};
|
|
12086
|
+
types2[subject8.toNT()] = true;
|
|
12087
|
+
return this.transitiveClosure(types2, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"), false);
|
|
12088
12088
|
}
|
|
12089
12089
|
/**
|
|
12090
12090
|
* Get all the Classes of which we can RDFS-infer the subject is a member
|
|
@@ -12104,19 +12104,19 @@ var PodOS = (() => {
|
|
|
12104
12104
|
let ref2;
|
|
12105
12105
|
let ref3;
|
|
12106
12106
|
let st2;
|
|
12107
|
-
let
|
|
12107
|
+
let types2;
|
|
12108
12108
|
rdftype = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
|
|
12109
|
-
|
|
12109
|
+
types2 = [];
|
|
12110
12110
|
ref = this.statementsMatching(subject8, void 0, void 0);
|
|
12111
12111
|
for (let i = 0, len = ref.length; i < len; i++) {
|
|
12112
12112
|
st2 = ref[i];
|
|
12113
12113
|
if (st2.predicate.uri === rdftype) {
|
|
12114
|
-
|
|
12114
|
+
types2[st2.object.toNT()] = st2;
|
|
12115
12115
|
} else {
|
|
12116
12116
|
ref1 = this.each(st2.predicate, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#domain"));
|
|
12117
12117
|
for (let l = 0, len1 = ref1.length; l < len1; l++) {
|
|
12118
12118
|
range3 = ref1[l];
|
|
12119
|
-
|
|
12119
|
+
types2[range3.toNT()] = st2;
|
|
12120
12120
|
}
|
|
12121
12121
|
}
|
|
12122
12122
|
}
|
|
@@ -12126,10 +12126,10 @@ var PodOS = (() => {
|
|
|
12126
12126
|
ref3 = this.each(st2.predicate, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#range"));
|
|
12127
12127
|
for (let q = 0, len3 = ref3.length; q < len3; q++) {
|
|
12128
12128
|
domain4 = ref3[q];
|
|
12129
|
-
|
|
12129
|
+
types2[domain4.toNT()] = st2;
|
|
12130
12130
|
}
|
|
12131
12131
|
}
|
|
12132
|
-
return this.transitiveClosure(
|
|
12132
|
+
return this.transitiveClosure(types2, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"), false);
|
|
12133
12133
|
}
|
|
12134
12134
|
/**
|
|
12135
12135
|
* Get all the Classes of which we can RDFS-infer the subject is a member
|
|
@@ -12381,7 +12381,7 @@ var PodOS = (() => {
|
|
|
12381
12381
|
* information-free.
|
|
12382
12382
|
* @param types - The types
|
|
12383
12383
|
*/
|
|
12384
|
-
topTypeURIs(
|
|
12384
|
+
topTypeURIs(types2) {
|
|
12385
12385
|
let i;
|
|
12386
12386
|
let j;
|
|
12387
12387
|
let k;
|
|
@@ -12391,9 +12391,9 @@ var PodOS = (() => {
|
|
|
12391
12391
|
let tops;
|
|
12392
12392
|
let v2;
|
|
12393
12393
|
tops = [];
|
|
12394
|
-
for (k in
|
|
12395
|
-
if (!
|
|
12396
|
-
v2 =
|
|
12394
|
+
for (k in types2) {
|
|
12395
|
+
if (!types2.hasOwnProperty(k)) continue;
|
|
12396
|
+
v2 = types2[k];
|
|
12397
12397
|
n2 = 0;
|
|
12398
12398
|
ref = this.each(this.rdfFactory.namedNode(k), this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"));
|
|
12399
12399
|
for (i = 0, len = ref.length; i < len; i++) {
|
|
@@ -12729,8 +12729,8 @@ var PodOS = (() => {
|
|
|
12729
12729
|
var id4 = "match" + matchIndex++;
|
|
12730
12730
|
var fetchResource = function(requestedTerm, id5) {
|
|
12731
12731
|
var docuri = requestedTerm.uri.split("#")[0];
|
|
12732
|
-
fetcher3.nowOrWhenFetched(docuri, void 0, function(
|
|
12733
|
-
if (!
|
|
12732
|
+
fetcher3.nowOrWhenFetched(docuri, void 0, function(ok2, body, xhr) {
|
|
12733
|
+
if (!ok2) {
|
|
12734
12734
|
console.log("Error following link to <" + requestedTerm.uri + "> in query: " + body);
|
|
12735
12735
|
}
|
|
12736
12736
|
match(
|
|
@@ -16618,7 +16618,7 @@ var PodOS = (() => {
|
|
|
16618
16618
|
'"createMessageDigest" cannot be used with "useNative".'
|
|
16619
16619
|
);
|
|
16620
16620
|
}
|
|
16621
|
-
return new Promise((resolve, reject) => rdfCanonizeNative.canonize(dataset3, options, (
|
|
16621
|
+
return new Promise((resolve, reject) => rdfCanonizeNative.canonize(dataset3, options, (err2, canonical2) => err2 ? reject(err2) : resolve(canonical2)));
|
|
16622
16622
|
}
|
|
16623
16623
|
if (options.algorithm === "URDNA2015") {
|
|
16624
16624
|
return new URDNA2015(options).main(dataset3);
|
|
@@ -16701,11 +16701,11 @@ var PodOS = (() => {
|
|
|
16701
16701
|
var require_graphTypes = __commonJS({
|
|
16702
16702
|
"../node_modules/jsonld/lib/graphTypes.js"(exports, module3) {
|
|
16703
16703
|
"use strict";
|
|
16704
|
-
var
|
|
16704
|
+
var types2 = require_types();
|
|
16705
16705
|
var api = {};
|
|
16706
16706
|
module3.exports = api;
|
|
16707
16707
|
api.isSubject = (v2) => {
|
|
16708
|
-
if (
|
|
16708
|
+
if (types2.isObject(v2) && !("@value" in v2 || "@set" in v2 || "@list" in v2)) {
|
|
16709
16709
|
const keyCount = Object.keys(v2).length;
|
|
16710
16710
|
return keyCount > 1 || !("@id" in v2);
|
|
16711
16711
|
}
|
|
@@ -16715,31 +16715,31 @@ var PodOS = (() => {
|
|
|
16715
16715
|
// Note: A value is a subject reference if all of these hold true:
|
|
16716
16716
|
// 1. It is an Object.
|
|
16717
16717
|
// 2. It has a single key: @id.
|
|
16718
|
-
|
|
16718
|
+
types2.isObject(v2) && Object.keys(v2).length === 1 && "@id" in v2
|
|
16719
16719
|
);
|
|
16720
16720
|
api.isValue = (v2) => (
|
|
16721
16721
|
// Note: A value is a @value if all of these hold true:
|
|
16722
16722
|
// 1. It is an Object.
|
|
16723
16723
|
// 2. It has the @value property.
|
|
16724
|
-
|
|
16724
|
+
types2.isObject(v2) && "@value" in v2
|
|
16725
16725
|
);
|
|
16726
16726
|
api.isList = (v2) => (
|
|
16727
16727
|
// Note: A value is a @list if all of these hold true:
|
|
16728
16728
|
// 1. It is an Object.
|
|
16729
16729
|
// 2. It has the @list property.
|
|
16730
|
-
|
|
16730
|
+
types2.isObject(v2) && "@list" in v2
|
|
16731
16731
|
);
|
|
16732
16732
|
api.isGraph = (v2) => {
|
|
16733
|
-
return
|
|
16733
|
+
return types2.isObject(v2) && "@graph" in v2 && Object.keys(v2).filter((key3) => key3 !== "@id" && key3 !== "@index").length === 1;
|
|
16734
16734
|
};
|
|
16735
16735
|
api.isSimpleGraph = (v2) => {
|
|
16736
16736
|
return api.isGraph(v2) && !("@id" in v2);
|
|
16737
16737
|
};
|
|
16738
16738
|
api.isBlankNode = (v2) => {
|
|
16739
|
-
if (
|
|
16739
|
+
if (types2.isObject(v2)) {
|
|
16740
16740
|
if ("@id" in v2) {
|
|
16741
16741
|
const id4 = v2["@id"];
|
|
16742
|
-
return !
|
|
16742
|
+
return !types2.isString(id4) || id4.indexOf("_:") === 0;
|
|
16743
16743
|
}
|
|
16744
16744
|
return Object.keys(v2).length === 0 || !("@value" in v2 || "@set" in v2 || "@list" in v2);
|
|
16745
16745
|
}
|
|
@@ -16775,7 +16775,7 @@ var PodOS = (() => {
|
|
|
16775
16775
|
"../node_modules/jsonld/lib/util.js"(exports, module3) {
|
|
16776
16776
|
"use strict";
|
|
16777
16777
|
var graphTypes = require_graphTypes();
|
|
16778
|
-
var
|
|
16778
|
+
var types2 = require_types();
|
|
16779
16779
|
var IdentifierIssuer = require_rdf_canonize().IdentifierIssuer;
|
|
16780
16780
|
var JsonLdError = require_JsonLdError();
|
|
16781
16781
|
var REGEX_BCP47 = /^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/;
|
|
@@ -16796,7 +16796,7 @@ var PodOS = (() => {
|
|
|
16796
16796
|
api.clone = function(value7) {
|
|
16797
16797
|
if (value7 && typeof value7 === "object") {
|
|
16798
16798
|
let rval;
|
|
16799
|
-
if (
|
|
16799
|
+
if (types2.isArray(value7)) {
|
|
16800
16800
|
rval = [];
|
|
16801
16801
|
for (let i = 0; i < value7.length; ++i) {
|
|
16802
16802
|
rval[i] = api.clone(value7[i]);
|
|
@@ -16811,7 +16811,7 @@ var PodOS = (() => {
|
|
|
16811
16811
|
for (const v2 of value7) {
|
|
16812
16812
|
rval.add(api.clone(v2));
|
|
16813
16813
|
}
|
|
16814
|
-
} else if (
|
|
16814
|
+
} else if (types2.isObject(value7)) {
|
|
16815
16815
|
rval = {};
|
|
16816
16816
|
for (const key3 in value7) {
|
|
16817
16817
|
rval[key3] = api.clone(value7[key3]);
|
|
@@ -16862,18 +16862,18 @@ var PodOS = (() => {
|
|
|
16862
16862
|
return rval;
|
|
16863
16863
|
};
|
|
16864
16864
|
api.validateTypeValue = (v2, isFrame) => {
|
|
16865
|
-
if (
|
|
16865
|
+
if (types2.isString(v2)) {
|
|
16866
16866
|
return;
|
|
16867
16867
|
}
|
|
16868
|
-
if (
|
|
16868
|
+
if (types2.isArray(v2) && v2.every((vv) => types2.isString(vv))) {
|
|
16869
16869
|
return;
|
|
16870
16870
|
}
|
|
16871
|
-
if (isFrame &&
|
|
16871
|
+
if (isFrame && types2.isObject(v2)) {
|
|
16872
16872
|
switch (Object.keys(v2).length) {
|
|
16873
16873
|
case 0:
|
|
16874
16874
|
return;
|
|
16875
16875
|
case 1:
|
|
16876
|
-
if ("@default" in v2 && api.asArray(v2["@default"]).every((vv) =>
|
|
16876
|
+
if ("@default" in v2 && api.asArray(v2["@default"]).every((vv) => types2.isString(vv))) {
|
|
16877
16877
|
return;
|
|
16878
16878
|
}
|
|
16879
16879
|
}
|
|
@@ -16887,7 +16887,7 @@ var PodOS = (() => {
|
|
|
16887
16887
|
api.hasProperty = (subject8, property4) => {
|
|
16888
16888
|
if (subject8.hasOwnProperty(property4)) {
|
|
16889
16889
|
const value7 = subject8[property4];
|
|
16890
|
-
return !
|
|
16890
|
+
return !types2.isArray(value7) || value7.length > 0;
|
|
16891
16891
|
}
|
|
16892
16892
|
return false;
|
|
16893
16893
|
};
|
|
@@ -16895,7 +16895,7 @@ var PodOS = (() => {
|
|
|
16895
16895
|
if (api.hasProperty(subject8, property4)) {
|
|
16896
16896
|
let val = subject8[property4];
|
|
16897
16897
|
const isList = graphTypes.isList(val);
|
|
16898
|
-
if (
|
|
16898
|
+
if (types2.isArray(val) || isList) {
|
|
16899
16899
|
if (isList) {
|
|
16900
16900
|
val = val["@list"];
|
|
16901
16901
|
}
|
|
@@ -16904,7 +16904,7 @@ var PodOS = (() => {
|
|
|
16904
16904
|
return true;
|
|
16905
16905
|
}
|
|
16906
16906
|
}
|
|
16907
|
-
} else if (!
|
|
16907
|
+
} else if (!types2.isArray(value7)) {
|
|
16908
16908
|
return api.compareValues(value7, val);
|
|
16909
16909
|
}
|
|
16910
16910
|
}
|
|
@@ -16926,7 +16926,7 @@ var PodOS = (() => {
|
|
|
16926
16926
|
}
|
|
16927
16927
|
if (options.valueIsArray) {
|
|
16928
16928
|
subject8[property4] = value7;
|
|
16929
|
-
} else if (
|
|
16929
|
+
} else if (types2.isArray(value7)) {
|
|
16930
16930
|
if (value7.length === 0 && options.propertyIsArray && !subject8.hasOwnProperty(property4)) {
|
|
16931
16931
|
subject8[property4] = [];
|
|
16932
16932
|
}
|
|
@@ -16939,7 +16939,7 @@ var PodOS = (() => {
|
|
|
16939
16939
|
}
|
|
16940
16940
|
} else if (subject8.hasOwnProperty(property4)) {
|
|
16941
16941
|
const hasValue4 = !options.allowDuplicate && api.hasValue(subject8, property4, value7);
|
|
16942
|
-
if (!
|
|
16942
|
+
if (!types2.isArray(subject8[property4]) && (!hasValue4 || options.propertyIsArray)) {
|
|
16943
16943
|
subject8[property4] = [subject8[property4]];
|
|
16944
16944
|
}
|
|
16945
16945
|
if (!hasValue4) {
|
|
@@ -16985,7 +16985,7 @@ var PodOS = (() => {
|
|
|
16985
16985
|
if (graphTypes.isValue(v1) && graphTypes.isValue(v2) && v1["@value"] === v2["@value"] && v1["@type"] === v2["@type"] && v1["@language"] === v2["@language"] && v1["@index"] === v2["@index"]) {
|
|
16986
16986
|
return true;
|
|
16987
16987
|
}
|
|
16988
|
-
if (
|
|
16988
|
+
if (types2.isObject(v1) && "@id" in v1 && types2.isObject(v2) && "@id" in v2) {
|
|
16989
16989
|
return v1["@id"] === v2["@id"];
|
|
16990
16990
|
}
|
|
16991
16991
|
return false;
|
|
@@ -17003,13 +17003,13 @@ var PodOS = (() => {
|
|
|
17003
17003
|
return a < b ? -1 : 1;
|
|
17004
17004
|
};
|
|
17005
17005
|
function _labelBlankNodes(issuer2, element2) {
|
|
17006
|
-
if (
|
|
17006
|
+
if (types2.isArray(element2)) {
|
|
17007
17007
|
for (let i = 0; i < element2.length; ++i) {
|
|
17008
17008
|
element2[i] = _labelBlankNodes(issuer2, element2[i]);
|
|
17009
17009
|
}
|
|
17010
17010
|
} else if (graphTypes.isList(element2)) {
|
|
17011
17011
|
element2["@list"] = _labelBlankNodes(issuer2, element2["@list"]);
|
|
17012
|
-
} else if (
|
|
17012
|
+
} else if (types2.isObject(element2)) {
|
|
17013
17013
|
if (graphTypes.isBlankNode(element2)) {
|
|
17014
17014
|
element2["@id"] = issuer2.getId(element2["@id"]);
|
|
17015
17015
|
}
|
|
@@ -17094,7 +17094,7 @@ var PodOS = (() => {
|
|
|
17094
17094
|
var require_url = __commonJS({
|
|
17095
17095
|
"../node_modules/jsonld/lib/url.js"(exports, module3) {
|
|
17096
17096
|
"use strict";
|
|
17097
|
-
var
|
|
17097
|
+
var types2 = require_types();
|
|
17098
17098
|
var api = {};
|
|
17099
17099
|
module3.exports = api;
|
|
17100
17100
|
api.parsers = {
|
|
@@ -17155,7 +17155,7 @@ var PodOS = (() => {
|
|
|
17155
17155
|
if (api.isAbsolute(iri)) {
|
|
17156
17156
|
return iri;
|
|
17157
17157
|
}
|
|
17158
|
-
if (!base2 ||
|
|
17158
|
+
if (!base2 || types2.isString(base2)) {
|
|
17159
17159
|
base2 = api.parse(base2 || "");
|
|
17160
17160
|
}
|
|
17161
17161
|
const rel2 = api.parse(iri);
|
|
@@ -17213,7 +17213,7 @@ var PodOS = (() => {
|
|
|
17213
17213
|
if (base2 === null) {
|
|
17214
17214
|
return iri;
|
|
17215
17215
|
}
|
|
17216
|
-
if (!base2 ||
|
|
17216
|
+
if (!base2 || types2.isString(base2)) {
|
|
17217
17217
|
base2 = api.parse(base2 || "");
|
|
17218
17218
|
}
|
|
17219
17219
|
let root = "";
|
|
@@ -17288,8 +17288,8 @@ var PodOS = (() => {
|
|
|
17288
17288
|
return output2.join("/");
|
|
17289
17289
|
};
|
|
17290
17290
|
var isAbsoluteRegex = /^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;
|
|
17291
|
-
api.isAbsolute = (v2) =>
|
|
17292
|
-
api.isRelative = (v2) =>
|
|
17291
|
+
api.isAbsolute = (v2) => types2.isString(v2) && isAbsoluteRegex.test(v2);
|
|
17292
|
+
api.isRelative = (v2) => types2.isString(v2);
|
|
17293
17293
|
}
|
|
17294
17294
|
});
|
|
17295
17295
|
|
|
@@ -17380,7 +17380,7 @@ var PodOS = (() => {
|
|
|
17380
17380
|
const req = new xhr();
|
|
17381
17381
|
return new Promise((resolve, reject) => {
|
|
17382
17382
|
req.onload = () => resolve(req);
|
|
17383
|
-
req.onerror = (
|
|
17383
|
+
req.onerror = (err2) => reject(err2);
|
|
17384
17384
|
req.open("GET", url7, true);
|
|
17385
17385
|
for (const k in headers) {
|
|
17386
17386
|
req.setRequestHeader(k, headers[k]);
|
|
@@ -19805,8 +19805,8 @@ var PodOS = (() => {
|
|
|
19805
19805
|
if (expandedProperty === "@type") {
|
|
19806
19806
|
typeKey = typeKey || key3;
|
|
19807
19807
|
const value7 = element2[key3];
|
|
19808
|
-
const
|
|
19809
|
-
for (const type5 of
|
|
19808
|
+
const types2 = Array.isArray(value7) ? value7.length > 1 ? value7.slice().sort() : value7 : [value7];
|
|
19809
|
+
for (const type5 of types2) {
|
|
19810
19810
|
const ctx = _getContextValue(typeScopedContext, type5, "@context");
|
|
19811
19811
|
if (!_isUndefined(ctx)) {
|
|
19812
19812
|
activeCtx = await _processContext({
|
|
@@ -19862,8 +19862,8 @@ var PodOS = (() => {
|
|
|
19862
19862
|
);
|
|
19863
19863
|
}
|
|
19864
19864
|
const values2 = rval["@value"] === null ? [] : _asArray(rval["@value"]);
|
|
19865
|
-
const
|
|
19866
|
-
if (_processingMode2(activeCtx, 1.1) &&
|
|
19865
|
+
const types2 = _getValues(rval, "@type");
|
|
19866
|
+
if (_processingMode2(activeCtx, 1.1) && types2.includes("@json") && types2.length === 1) {
|
|
19867
19867
|
} else if (values2.length === 0) {
|
|
19868
19868
|
if (options.eventHandler) {
|
|
19869
19869
|
_handleEvent({
|
|
@@ -19886,7 +19886,7 @@ var PodOS = (() => {
|
|
|
19886
19886
|
"jsonld.SyntaxError",
|
|
19887
19887
|
{ code: "invalid language-tagged value", element: rval }
|
|
19888
19888
|
);
|
|
19889
|
-
} else if (!
|
|
19889
|
+
} else if (!types2.every((t) => _isAbsoluteIri(t) && !(_isString(t) && t.indexOf("_:") === 0) || _isEmptyObject(t))) {
|
|
19890
19890
|
throw new JsonLdError(
|
|
19891
19891
|
'Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',
|
|
19892
19892
|
"jsonld.SyntaxError",
|
|
@@ -20705,7 +20705,7 @@ var PodOS = (() => {
|
|
|
20705
20705
|
"use strict";
|
|
20706
20706
|
var { isKeyword } = require_context();
|
|
20707
20707
|
var graphTypes = require_graphTypes();
|
|
20708
|
-
var
|
|
20708
|
+
var types2 = require_types();
|
|
20709
20709
|
var util = require_util();
|
|
20710
20710
|
var JsonLdError = require_JsonLdError();
|
|
20711
20711
|
var api = {};
|
|
@@ -20718,13 +20718,13 @@ var PodOS = (() => {
|
|
|
20718
20718
|
return api.mergeNodeMaps(graphs);
|
|
20719
20719
|
};
|
|
20720
20720
|
api.createNodeMap = (input2, graphs, graph3, issuer2, name9, list) => {
|
|
20721
|
-
if (
|
|
20721
|
+
if (types2.isArray(input2)) {
|
|
20722
20722
|
for (const node3 of input2) {
|
|
20723
20723
|
api.createNodeMap(node3, graphs, graph3, issuer2, void 0, list);
|
|
20724
20724
|
}
|
|
20725
20725
|
return;
|
|
20726
20726
|
}
|
|
20727
|
-
if (!
|
|
20727
|
+
if (!types2.isObject(input2)) {
|
|
20728
20728
|
if (list) {
|
|
20729
20729
|
list.push(input2);
|
|
20730
20730
|
}
|
|
@@ -20748,14 +20748,14 @@ var PodOS = (() => {
|
|
|
20748
20748
|
return;
|
|
20749
20749
|
}
|
|
20750
20750
|
if ("@type" in input2) {
|
|
20751
|
-
const
|
|
20752
|
-
for (const type5 of
|
|
20751
|
+
const types3 = input2["@type"];
|
|
20752
|
+
for (const type5 of types3) {
|
|
20753
20753
|
if (type5.indexOf("_:") === 0) {
|
|
20754
20754
|
issuer2.getId(type5);
|
|
20755
20755
|
}
|
|
20756
20756
|
}
|
|
20757
20757
|
}
|
|
20758
|
-
if (
|
|
20758
|
+
if (types2.isUndefined(name9)) {
|
|
20759
20759
|
name9 = graphTypes.isBlankNode(input2) ? issuer2.getId(input2["@id"]) : input2["@id"];
|
|
20760
20760
|
}
|
|
20761
20761
|
if (list) {
|
|
@@ -20955,7 +20955,7 @@ var PodOS = (() => {
|
|
|
20955
20955
|
"use strict";
|
|
20956
20956
|
var JsonLdError = require_JsonLdError();
|
|
20957
20957
|
var graphTypes = require_graphTypes();
|
|
20958
|
-
var
|
|
20958
|
+
var types2 = require_types();
|
|
20959
20959
|
var {
|
|
20960
20960
|
REGEX_BCP47,
|
|
20961
20961
|
addValue: _addValue
|
|
@@ -21071,7 +21071,7 @@ var PodOS = (() => {
|
|
|
21071
21071
|
const list = [];
|
|
21072
21072
|
const listNodes = [];
|
|
21073
21073
|
let nodeKeyCount = Object.keys(node3).length;
|
|
21074
|
-
while (property4 === RDF_REST &&
|
|
21074
|
+
while (property4 === RDF_REST && types2.isObject(referencedOnce[node3["@id"]]) && types2.isArray(node3[RDF_FIRST]) && node3[RDF_FIRST].length === 1 && types2.isArray(node3[RDF_REST]) && node3[RDF_REST].length === 1 && (nodeKeyCount === 3 || nodeKeyCount === 4 && types2.isArray(node3["@type"]) && node3["@type"].length === 1 && node3["@type"][0] === RDF_LIST)) {
|
|
21075
21075
|
list.push(node3[RDF_FIRST][0]);
|
|
21076
21076
|
listNodes.push(node3["@id"]);
|
|
21077
21077
|
usage2 = referencedOnce[node3["@id"]];
|
|
@@ -21159,7 +21159,7 @@ var PodOS = (() => {
|
|
|
21159
21159
|
} else if (rval["@value"] === "false") {
|
|
21160
21160
|
rval["@value"] = false;
|
|
21161
21161
|
}
|
|
21162
|
-
} else if (
|
|
21162
|
+
} else if (types2.isNumeric(rval["@value"])) {
|
|
21163
21163
|
if (type5 === XSD_INTEGER) {
|
|
21164
21164
|
const i = parseInt(rval["@value"], 10);
|
|
21165
21165
|
if (i.toFixed(0) === rval["@value"]) {
|
|
@@ -21238,7 +21238,7 @@ var PodOS = (() => {
|
|
|
21238
21238
|
var graphTypes = require_graphTypes();
|
|
21239
21239
|
var jsonCanonicalize = require_canonicalize();
|
|
21240
21240
|
var JsonLdError = require_JsonLdError();
|
|
21241
|
-
var
|
|
21241
|
+
var types2 = require_types();
|
|
21242
21242
|
var util = require_util();
|
|
21243
21243
|
var {
|
|
21244
21244
|
handleEvent: _handleEvent
|
|
@@ -21465,16 +21465,16 @@ var PodOS = (() => {
|
|
|
21465
21465
|
if (datatype3 === "@json") {
|
|
21466
21466
|
object8.value = jsonCanonicalize(value7);
|
|
21467
21467
|
object8.datatype.value = RDF_JSON_LITERAL;
|
|
21468
|
-
} else if (
|
|
21468
|
+
} else if (types2.isBoolean(value7)) {
|
|
21469
21469
|
object8.value = value7.toString();
|
|
21470
21470
|
object8.datatype.value = datatype3 || XSD_BOOLEAN;
|
|
21471
|
-
} else if (
|
|
21472
|
-
if (!
|
|
21471
|
+
} else if (types2.isDouble(value7) || datatype3 === XSD_DOUBLE) {
|
|
21472
|
+
if (!types2.isDouble(value7)) {
|
|
21473
21473
|
value7 = parseFloat(value7);
|
|
21474
21474
|
}
|
|
21475
21475
|
object8.value = value7.toExponential(15).replace(/(\d)0*e\+?/, "$1E");
|
|
21476
21476
|
object8.datatype.value = datatype3 || XSD_DOUBLE;
|
|
21477
|
-
} else if (
|
|
21477
|
+
} else if (types2.isNumber(value7)) {
|
|
21478
21478
|
object8.value = value7.toFixed(0);
|
|
21479
21479
|
object8.datatype.value = datatype3 || XSD_INTEGER;
|
|
21480
21480
|
} else if ("@direction" in item4 && rdfDirection === "i18n-datatype") {
|
|
@@ -21547,7 +21547,7 @@ var PodOS = (() => {
|
|
|
21547
21547
|
object8.termType = _list.termType;
|
|
21548
21548
|
object8.value = _list.value;
|
|
21549
21549
|
} else {
|
|
21550
|
-
const id4 =
|
|
21550
|
+
const id4 = types2.isObject(item4) ? item4["@id"] : item4;
|
|
21551
21551
|
object8.termType = id4.startsWith("_:") ? "BlankNode" : "NamedNode";
|
|
21552
21552
|
object8.value = id4;
|
|
21553
21553
|
}
|
|
@@ -21579,7 +21579,7 @@ var PodOS = (() => {
|
|
|
21579
21579
|
"use strict";
|
|
21580
21580
|
var { isKeyword } = require_context();
|
|
21581
21581
|
var graphTypes = require_graphTypes();
|
|
21582
|
-
var
|
|
21582
|
+
var types2 = require_types();
|
|
21583
21583
|
var util = require_util();
|
|
21584
21584
|
var url7 = require_url();
|
|
21585
21585
|
var JsonLdError = require_JsonLdError();
|
|
@@ -21679,7 +21679,7 @@ var PodOS = (() => {
|
|
|
21679
21679
|
} else {
|
|
21680
21680
|
subframe = frame["@graph"][0];
|
|
21681
21681
|
recurse = !(id4 === "@merged" || id4 === "@default");
|
|
21682
|
-
if (!
|
|
21682
|
+
if (!types2.isObject(subframe)) {
|
|
21683
21683
|
subframe = {};
|
|
21684
21684
|
}
|
|
21685
21685
|
}
|
|
@@ -21757,7 +21757,7 @@ var PodOS = (() => {
|
|
|
21757
21757
|
}
|
|
21758
21758
|
for (const prop of Object.keys(frame).sort()) {
|
|
21759
21759
|
if (prop === "@type") {
|
|
21760
|
-
if (!
|
|
21760
|
+
if (!types2.isObject(frame[prop][0]) || !("@default" in frame[prop][0])) {
|
|
21761
21761
|
continue;
|
|
21762
21762
|
}
|
|
21763
21763
|
} else if (isKeyword(prop)) {
|
|
@@ -21770,7 +21770,7 @@ var PodOS = (() => {
|
|
|
21770
21770
|
if ("@default" in next4) {
|
|
21771
21771
|
preserve = util.clone(next4["@default"]);
|
|
21772
21772
|
}
|
|
21773
|
-
if (!
|
|
21773
|
+
if (!types2.isArray(preserve)) {
|
|
21774
21774
|
preserve = [preserve];
|
|
21775
21775
|
}
|
|
21776
21776
|
output2[prop] = [{ "@preserve": preserve }];
|
|
@@ -21803,14 +21803,14 @@ var PodOS = (() => {
|
|
|
21803
21803
|
}
|
|
21804
21804
|
};
|
|
21805
21805
|
api.cleanupNull = (input2, options) => {
|
|
21806
|
-
if (
|
|
21806
|
+
if (types2.isArray(input2)) {
|
|
21807
21807
|
const noNulls = input2.map((v2) => api.cleanupNull(v2, options));
|
|
21808
21808
|
return noNulls.filter((v2) => v2);
|
|
21809
21809
|
}
|
|
21810
21810
|
if (input2 === "@null") {
|
|
21811
21811
|
return null;
|
|
21812
21812
|
}
|
|
21813
|
-
if (
|
|
21813
|
+
if (types2.isObject(input2)) {
|
|
21814
21814
|
if ("@id" in input2) {
|
|
21815
21815
|
const id4 = input2["@id"];
|
|
21816
21816
|
if (options.link.hasOwnProperty(id4)) {
|
|
@@ -21866,7 +21866,7 @@ var PodOS = (() => {
|
|
|
21866
21866
|
return rval;
|
|
21867
21867
|
}
|
|
21868
21868
|
function _validateFrame(frame) {
|
|
21869
|
-
if (!
|
|
21869
|
+
if (!types2.isArray(frame) || frame.length !== 1 || !types2.isObject(frame[0])) {
|
|
21870
21870
|
throw new JsonLdError(
|
|
21871
21871
|
"Invalid JSON-LD syntax; a JSON-LD frame must be a single object.",
|
|
21872
21872
|
"jsonld.SyntaxError",
|
|
@@ -21875,7 +21875,7 @@ var PodOS = (() => {
|
|
|
21875
21875
|
}
|
|
21876
21876
|
if ("@id" in frame[0]) {
|
|
21877
21877
|
for (const id4 of util.asArray(frame[0]["@id"])) {
|
|
21878
|
-
if (!(
|
|
21878
|
+
if (!(types2.isObject(id4) || url7.isAbsolute(id4)) || types2.isString(id4) && id4.indexOf("_:") === 0) {
|
|
21879
21879
|
throw new JsonLdError(
|
|
21880
21880
|
"Invalid JSON-LD syntax; invalid @id in frame.",
|
|
21881
21881
|
"jsonld.SyntaxError",
|
|
@@ -21886,7 +21886,7 @@ var PodOS = (() => {
|
|
|
21886
21886
|
}
|
|
21887
21887
|
if ("@type" in frame[0]) {
|
|
21888
21888
|
for (const type5 of util.asArray(frame[0]["@type"])) {
|
|
21889
|
-
if (!(
|
|
21889
|
+
if (!(types2.isObject(type5) || url7.isAbsolute(type5) || type5 === "@json") || types2.isString(type5) && type5.indexOf("_:") === 0) {
|
|
21890
21890
|
throw new JsonLdError(
|
|
21891
21891
|
"Invalid JSON-LD syntax; invalid @type in frame.",
|
|
21892
21892
|
"jsonld.SyntaxError",
|
|
@@ -21914,7 +21914,7 @@ var PodOS = (() => {
|
|
|
21914
21914
|
const nodeValues = util.getValues(subject8, key3);
|
|
21915
21915
|
const isEmpty = util.getValues(frame, key3).length === 0;
|
|
21916
21916
|
if (key3 === "@id") {
|
|
21917
|
-
if (
|
|
21917
|
+
if (types2.isEmptyObject(frame["@id"][0] || {})) {
|
|
21918
21918
|
matchThis = true;
|
|
21919
21919
|
} else if (frame["@id"].length >= 0) {
|
|
21920
21920
|
matchThis = frame["@id"].includes(nodeValues[0]);
|
|
@@ -21929,11 +21929,11 @@ var PodOS = (() => {
|
|
|
21929
21929
|
return false;
|
|
21930
21930
|
}
|
|
21931
21931
|
matchThis = true;
|
|
21932
|
-
} else if (frame["@type"].length === 1 &&
|
|
21932
|
+
} else if (frame["@type"].length === 1 && types2.isEmptyObject(frame["@type"][0])) {
|
|
21933
21933
|
matchThis = nodeValues.length > 0;
|
|
21934
21934
|
} else {
|
|
21935
21935
|
for (const type5 of frame["@type"]) {
|
|
21936
|
-
if (
|
|
21936
|
+
if (types2.isObject(type5) && "@default" in type5) {
|
|
21937
21937
|
matchThis = true;
|
|
21938
21938
|
} else {
|
|
21939
21939
|
matchThis = matchThis || nodeValues.some((tt) => tt === type5);
|
|
@@ -21984,7 +21984,7 @@ var PodOS = (() => {
|
|
|
21984
21984
|
matchThis = nodeValues.some((nv) => _valueMatch(thisFrame, nv));
|
|
21985
21985
|
} else if (graphTypes.isSubjectReference(thisFrame)) {
|
|
21986
21986
|
matchThis = nodeValues.some((nv) => _nodeMatch(state2, thisFrame, nv, flags3));
|
|
21987
|
-
} else if (
|
|
21987
|
+
} else if (types2.isObject(thisFrame)) {
|
|
21988
21988
|
matchThis = nodeValues.length > 0;
|
|
21989
21989
|
} else {
|
|
21990
21990
|
matchThis = false;
|
|
@@ -22004,7 +22004,7 @@ var PodOS = (() => {
|
|
|
22004
22004
|
const parent4 = embed.parent;
|
|
22005
22005
|
const property4 = embed.property;
|
|
22006
22006
|
const subject8 = { "@id": id4 };
|
|
22007
|
-
if (
|
|
22007
|
+
if (types2.isArray(parent4)) {
|
|
22008
22008
|
for (let i = 0; i < parent4.length; ++i) {
|
|
22009
22009
|
if (util.compareValues(parent4[i], subject8)) {
|
|
22010
22010
|
parent4[i] = subject8;
|
|
@@ -22012,14 +22012,14 @@ var PodOS = (() => {
|
|
|
22012
22012
|
}
|
|
22013
22013
|
}
|
|
22014
22014
|
} else {
|
|
22015
|
-
const useArray =
|
|
22015
|
+
const useArray = types2.isArray(parent4[property4]);
|
|
22016
22016
|
util.removeValue(parent4, property4, subject8, { propertyIsArray: useArray });
|
|
22017
22017
|
util.addValue(parent4, property4, subject8, { propertyIsArray: useArray });
|
|
22018
22018
|
}
|
|
22019
22019
|
const removeDependents = (id5) => {
|
|
22020
22020
|
const ids = Object.keys(embeds);
|
|
22021
22021
|
for (const next4 of ids) {
|
|
22022
|
-
if (next4 in embeds &&
|
|
22022
|
+
if (next4 in embeds && types2.isObject(embeds[next4].parent) && embeds[next4].parent["@id"] === id5) {
|
|
22023
22023
|
delete embeds[next4];
|
|
22024
22024
|
removeDependents(next4);
|
|
22025
22025
|
}
|
|
@@ -22028,10 +22028,10 @@ var PodOS = (() => {
|
|
|
22028
22028
|
removeDependents(id4);
|
|
22029
22029
|
}
|
|
22030
22030
|
function _cleanupPreserve(input2, options) {
|
|
22031
|
-
if (
|
|
22031
|
+
if (types2.isArray(input2)) {
|
|
22032
22032
|
return input2.map((value7) => _cleanupPreserve(value7, options));
|
|
22033
22033
|
}
|
|
22034
|
-
if (
|
|
22034
|
+
if (types2.isObject(input2)) {
|
|
22035
22035
|
if ("@preserve" in input2) {
|
|
22036
22036
|
return input2["@preserve"][0];
|
|
22037
22037
|
}
|
|
@@ -22065,7 +22065,7 @@ var PodOS = (() => {
|
|
|
22065
22065
|
return input2;
|
|
22066
22066
|
}
|
|
22067
22067
|
function _addFrameOutput(parent4, property4, output2) {
|
|
22068
|
-
if (
|
|
22068
|
+
if (types2.isObject(parent4)) {
|
|
22069
22069
|
util.addValue(parent4, property4, output2, { propertyIsArray: true });
|
|
22070
22070
|
} else {
|
|
22071
22071
|
parent4.push(output2);
|
|
@@ -22082,19 +22082,19 @@ var PodOS = (() => {
|
|
|
22082
22082
|
const v1 = value7["@value"];
|
|
22083
22083
|
const t1 = value7["@type"];
|
|
22084
22084
|
const l1 = value7["@language"];
|
|
22085
|
-
const v2 = pattern7["@value"] ?
|
|
22086
|
-
const t2 = pattern7["@type"] ?
|
|
22087
|
-
const l2 = pattern7["@language"] ?
|
|
22085
|
+
const v2 = pattern7["@value"] ? types2.isArray(pattern7["@value"]) ? pattern7["@value"] : [pattern7["@value"]] : [];
|
|
22086
|
+
const t2 = pattern7["@type"] ? types2.isArray(pattern7["@type"]) ? pattern7["@type"] : [pattern7["@type"]] : [];
|
|
22087
|
+
const l2 = pattern7["@language"] ? types2.isArray(pattern7["@language"]) ? pattern7["@language"] : [pattern7["@language"]] : [];
|
|
22088
22088
|
if (v2.length === 0 && t2.length === 0 && l2.length === 0) {
|
|
22089
22089
|
return true;
|
|
22090
22090
|
}
|
|
22091
|
-
if (!(v2.includes(v1) ||
|
|
22091
|
+
if (!(v2.includes(v1) || types2.isEmptyObject(v2[0]))) {
|
|
22092
22092
|
return false;
|
|
22093
22093
|
}
|
|
22094
|
-
if (!(!t1 && t2.length === 0 || t2.includes(t1) || t1 &&
|
|
22094
|
+
if (!(!t1 && t2.length === 0 || t2.includes(t1) || t1 && types2.isEmptyObject(t2[0]))) {
|
|
22095
22095
|
return false;
|
|
22096
22096
|
}
|
|
22097
|
-
if (!(!l1 && l2.length === 0 || l2.includes(l1) || l1 &&
|
|
22097
|
+
if (!(!l1 && l2.length === 0 || l2.includes(l1) || l1 && types2.isEmptyObject(l2[0]))) {
|
|
22098
22098
|
return false;
|
|
22099
22099
|
}
|
|
22100
22100
|
return true;
|
|
@@ -22237,12 +22237,12 @@ var PodOS = (() => {
|
|
|
22237
22237
|
}
|
|
22238
22238
|
options.link[element2["@id"]].push({ expanded: element2, compacted: rval });
|
|
22239
22239
|
}
|
|
22240
|
-
let
|
|
22241
|
-
if (
|
|
22242
|
-
|
|
22240
|
+
let types2 = element2["@type"] || [];
|
|
22241
|
+
if (types2.length > 1) {
|
|
22242
|
+
types2 = Array.from(types2).sort();
|
|
22243
22243
|
}
|
|
22244
22244
|
const typeContext = activeCtx;
|
|
22245
|
-
for (const type5 of
|
|
22245
|
+
for (const type5 of types2) {
|
|
22246
22246
|
const compactedType = api.compactIri(
|
|
22247
22247
|
{ activeCtx: typeContext, iri: type5, relativeTo: { vocab: true } }
|
|
22248
22248
|
);
|
|
@@ -22594,17 +22594,17 @@ var PodOS = (() => {
|
|
|
22594
22594
|
iri: "@type",
|
|
22595
22595
|
relativeTo: { vocab: true }
|
|
22596
22596
|
});
|
|
22597
|
-
let
|
|
22598
|
-
[key3, ...
|
|
22599
|
-
switch (
|
|
22597
|
+
let types3;
|
|
22598
|
+
[key3, ...types3] = _asArray(compactedItem[typeKey] || []);
|
|
22599
|
+
switch (types3.length) {
|
|
22600
22600
|
case 0:
|
|
22601
22601
|
delete compactedItem[typeKey];
|
|
22602
22602
|
break;
|
|
22603
22603
|
case 1:
|
|
22604
|
-
compactedItem[typeKey] =
|
|
22604
|
+
compactedItem[typeKey] = types3[0];
|
|
22605
22605
|
break;
|
|
22606
22606
|
default:
|
|
22607
|
-
compactedItem[typeKey] =
|
|
22607
|
+
compactedItem[typeKey] = types3;
|
|
22608
22608
|
break;
|
|
22609
22609
|
}
|
|
22610
22610
|
if (Object.keys(compactedItem).length === 1 && "@id" in expandedItem) {
|
|
@@ -25516,8 +25516,8 @@ var PodOS = (() => {
|
|
|
25516
25516
|
var require_queue_microtask = __commonJS({
|
|
25517
25517
|
"../node_modules/queue-microtask/index.js"(exports, module3) {
|
|
25518
25518
|
var promise;
|
|
25519
|
-
module3.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((
|
|
25520
|
-
throw
|
|
25519
|
+
module3.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err2) => setTimeout(() => {
|
|
25520
|
+
throw err2;
|
|
25521
25521
|
}, 0));
|
|
25522
25522
|
}
|
|
25523
25523
|
});
|
|
@@ -25925,13 +25925,13 @@ var PodOS = (() => {
|
|
|
25925
25925
|
// ### `_syntaxError` creates a syntax error for the given issue
|
|
25926
25926
|
_syntaxError(issue3) {
|
|
25927
25927
|
this._input = null;
|
|
25928
|
-
const
|
|
25929
|
-
|
|
25928
|
+
const err2 = new Error(`Unexpected "${issue3}" on line ${this._line}.`);
|
|
25929
|
+
err2.context = {
|
|
25930
25930
|
token: void 0,
|
|
25931
25931
|
line: this._line,
|
|
25932
25932
|
previousToken: this.previousToken
|
|
25933
25933
|
};
|
|
25934
|
-
return
|
|
25934
|
+
return err2;
|
|
25935
25935
|
}
|
|
25936
25936
|
// ### Strips off any starting UTF BOM mark.
|
|
25937
25937
|
_readStartingBom(input2) {
|
|
@@ -27021,13 +27021,13 @@ var PodOS = (() => {
|
|
|
27021
27021
|
}
|
|
27022
27022
|
// ### `_error` emits an error message through the callback
|
|
27023
27023
|
_error(message4, token2) {
|
|
27024
|
-
const
|
|
27025
|
-
|
|
27024
|
+
const err2 = new Error(`${message4} on line ${token2.line}.`);
|
|
27025
|
+
err2.context = {
|
|
27026
27026
|
token: token2,
|
|
27027
27027
|
line: token2.line,
|
|
27028
27028
|
previousToken: this._lexer.previousToken
|
|
27029
27029
|
};
|
|
27030
|
-
this._callback(
|
|
27030
|
+
this._callback(err2);
|
|
27031
27031
|
this._callback = noop2;
|
|
27032
27032
|
}
|
|
27033
27033
|
// ### `_resolveIRI` resolves an IRI against the base path
|
|
@@ -28628,21 +28628,21 @@ var PodOS = (() => {
|
|
|
28628
28628
|
}
|
|
28629
28629
|
}
|
|
28630
28630
|
}
|
|
28631
|
-
function nquadCallback(
|
|
28632
|
-
if (
|
|
28633
|
-
callback(
|
|
28631
|
+
function nquadCallback(err2, nquads) {
|
|
28632
|
+
if (err2) {
|
|
28633
|
+
callback(err2, kb);
|
|
28634
28634
|
}
|
|
28635
28635
|
try {
|
|
28636
28636
|
n3Parser.parse(nquads, tripleCallback);
|
|
28637
|
-
} catch (
|
|
28638
|
-
callback(
|
|
28637
|
+
} catch (err3) {
|
|
28638
|
+
callback(err3, kb);
|
|
28639
28639
|
}
|
|
28640
28640
|
}
|
|
28641
|
-
function tripleCallback(
|
|
28641
|
+
function tripleCallback(err2, triple2) {
|
|
28642
28642
|
if (triple2) {
|
|
28643
28643
|
kb.add(triple2.subject, triple2.predicate, triple2.object, triple2.graph);
|
|
28644
28644
|
} else {
|
|
28645
|
-
callback(
|
|
28645
|
+
callback(err2, kb);
|
|
28646
28646
|
}
|
|
28647
28647
|
}
|
|
28648
28648
|
}
|
|
@@ -29090,7 +29090,7 @@ var PodOS = (() => {
|
|
|
29090
29090
|
exports2.DOMException = g.DOMException;
|
|
29091
29091
|
try {
|
|
29092
29092
|
new exports2.DOMException();
|
|
29093
|
-
} catch (
|
|
29093
|
+
} catch (err2) {
|
|
29094
29094
|
exports2.DOMException = function(message4, name9) {
|
|
29095
29095
|
this.message = message4;
|
|
29096
29096
|
this.name = name9;
|
|
@@ -29314,8 +29314,8 @@ var PodOS = (() => {
|
|
|
29314
29314
|
let parser = new RDFParser(kb);
|
|
29315
29315
|
try {
|
|
29316
29316
|
parser.parse(this.dom, options.original.value, options.original);
|
|
29317
|
-
} catch (
|
|
29318
|
-
return fetcher2.failFetch(options, "Syntax error parsing RDF/XML! " +
|
|
29317
|
+
} catch (err2) {
|
|
29318
|
+
return fetcher2.failFetch(options, "Syntax error parsing RDF/XML! " + err2, "parse_error");
|
|
29319
29319
|
}
|
|
29320
29320
|
if (!options.noMeta) {
|
|
29321
29321
|
kb.add(options.original, ns2.rdf("type"), ns2.link("RDFDocument"), fetcher2.appNode);
|
|
@@ -29369,8 +29369,8 @@ var PodOS = (() => {
|
|
|
29369
29369
|
if (!options.noRDFa && parseRDFaDOM) {
|
|
29370
29370
|
try {
|
|
29371
29371
|
parseRDFaDOM(this.dom, kb, options.original.value);
|
|
29372
|
-
} catch (
|
|
29373
|
-
let msg = "Error trying to parse " + options.resource + " as RDFa:\n" +
|
|
29372
|
+
} catch (err2) {
|
|
29373
|
+
let msg = "Error trying to parse " + options.resource + " as RDFa:\n" + err2 + ":\n" + err2.stack;
|
|
29374
29374
|
return fetcher2.failFetch(options, msg, "parse_error");
|
|
29375
29375
|
}
|
|
29376
29376
|
}
|
|
@@ -29478,8 +29478,8 @@ var PodOS = (() => {
|
|
|
29478
29478
|
await jsonldParser(responseText, kb, options.original.value);
|
|
29479
29479
|
fetcher2.store.add(options.original, ns2.rdf("type"), ns2.link("RDFDocument"), fetcher2.appNode);
|
|
29480
29480
|
return fetcher2.doneFetch(options, response6);
|
|
29481
|
-
} catch (
|
|
29482
|
-
const msg = "Error trying to parse " + options.resource + " as JSON-LD:\n" +
|
|
29481
|
+
} catch (err2) {
|
|
29482
|
+
const msg = "Error trying to parse " + options.resource + " as JSON-LD:\n" + err2;
|
|
29483
29483
|
return fetcher2.failFetch(options, msg, "parse_error", response6);
|
|
29484
29484
|
}
|
|
29485
29485
|
}
|
|
@@ -29523,8 +29523,8 @@ var PodOS = (() => {
|
|
|
29523
29523
|
let p = n3parser_default(kb, kb, options.original.value, options.original.value, null, null, "", null);
|
|
29524
29524
|
try {
|
|
29525
29525
|
p.loadBuf(responseText);
|
|
29526
|
-
} catch (
|
|
29527
|
-
let msg = "Error trying to parse " + options.resource + " as Notation3:\n" +
|
|
29526
|
+
} catch (err2) {
|
|
29527
|
+
let msg = "Error trying to parse " + options.resource + " as Notation3:\n" + err2;
|
|
29528
29528
|
return fetcher2.failFetch(options, msg, "parse_error", response6);
|
|
29529
29529
|
}
|
|
29530
29530
|
fetcher2.addStatus(options.req, "N3 parsed: " + p.statementCount + " triples in " + p.lines + " lines.");
|
|
@@ -29922,13 +29922,13 @@ var PodOS = (() => {
|
|
|
29922
29922
|
userCallback(false, oops);
|
|
29923
29923
|
}
|
|
29924
29924
|
}
|
|
29925
|
-
}, function(
|
|
29926
|
-
var message4 =
|
|
29925
|
+
}, function(err2) {
|
|
29926
|
+
var message4 = err2.message || err2.statusText;
|
|
29927
29927
|
message4 = "Failed to load <" + uri6 + "> " + message4;
|
|
29928
|
-
if (
|
|
29929
|
-
message4 += " status: " +
|
|
29928
|
+
if (err2.response && err2.response.status) {
|
|
29929
|
+
message4 += " status: " + err2.response.status;
|
|
29930
29930
|
}
|
|
29931
|
-
userCallback(false, message4,
|
|
29931
|
+
userCallback(false, message4, err2.response);
|
|
29932
29932
|
});
|
|
29933
29933
|
}
|
|
29934
29934
|
/**
|
|
@@ -29969,11 +29969,11 @@ var PodOS = (() => {
|
|
|
29969
29969
|
this.requested[docpart(options.original.value)] = statusCode2;
|
|
29970
29970
|
this.fireCallbacks("fail", [options.original.value, errorMessage]);
|
|
29971
29971
|
}
|
|
29972
|
-
var
|
|
29973
|
-
|
|
29974
|
-
|
|
29975
|
-
|
|
29976
|
-
return Promise.reject(
|
|
29972
|
+
var err2 = new Error("Fetcher: " + errorMessage);
|
|
29973
|
+
err2.status = statusCode2;
|
|
29974
|
+
err2.statusText = errorMessage;
|
|
29975
|
+
err2.response = response6;
|
|
29976
|
+
return Promise.reject(err2);
|
|
29977
29977
|
}
|
|
29978
29978
|
// in the why part of the quad distinguish between HTML and HTTP header
|
|
29979
29979
|
// Reverse is set iif the link was rev= as opposed to rel=
|
|
@@ -30053,9 +30053,9 @@ var PodOS = (() => {
|
|
|
30053
30053
|
options.contentType = options["content-type"] || options["Content-Type"] || options.contentType || TurtleContentType;
|
|
30054
30054
|
if (options.contentType === "application/ld+json") {
|
|
30055
30055
|
return new Promise((resolve, reject) => {
|
|
30056
|
-
serialize(doc, this.store, doc.uri, options.contentType, (
|
|
30057
|
-
if (
|
|
30058
|
-
reject(
|
|
30056
|
+
serialize(doc, this.store, doc.uri, options.contentType, (err2, jsonString) => {
|
|
30057
|
+
if (err2) {
|
|
30058
|
+
reject(err2);
|
|
30059
30059
|
} else {
|
|
30060
30060
|
options.data = jsonString;
|
|
30061
30061
|
this.webOperation("PUT", uri6, options).then((res) => resolve(res)).catch((error4) => reject(error4));
|
|
@@ -30098,20 +30098,20 @@ var PodOS = (() => {
|
|
|
30098
30098
|
const fetcher2 = this;
|
|
30099
30099
|
try {
|
|
30100
30100
|
var response6 = await fetcher2.load(doc);
|
|
30101
|
-
} catch (
|
|
30102
|
-
if (
|
|
30101
|
+
} catch (err2) {
|
|
30102
|
+
if (err2.response.status === 404) {
|
|
30103
30103
|
try {
|
|
30104
30104
|
response6 = await fetcher2.webOperation("PUT", doc.value, {
|
|
30105
30105
|
data: data2,
|
|
30106
30106
|
contentType: contentType4
|
|
30107
30107
|
});
|
|
30108
|
-
} catch (
|
|
30109
|
-
throw
|
|
30108
|
+
} catch (err3) {
|
|
30109
|
+
throw err3;
|
|
30110
30110
|
}
|
|
30111
30111
|
delete fetcher2.requested[doc.value];
|
|
30112
30112
|
return response6;
|
|
30113
30113
|
} else {
|
|
30114
|
-
throw
|
|
30114
|
+
throw err2;
|
|
30115
30115
|
}
|
|
30116
30116
|
}
|
|
30117
30117
|
return response6;
|
|
@@ -30202,8 +30202,8 @@ var PodOS = (() => {
|
|
|
30202
30202
|
e2.response = response6;
|
|
30203
30203
|
reject(e2);
|
|
30204
30204
|
}
|
|
30205
|
-
}, (
|
|
30206
|
-
let msg = "Fetch error for " + method5 + " of <" + uri6 + ">:" +
|
|
30205
|
+
}, (err2) => {
|
|
30206
|
+
let msg = "Fetch error for " + method5 + " of <" + uri6 + ">:" + err2;
|
|
30207
30207
|
reject(new Error(msg));
|
|
30208
30208
|
});
|
|
30209
30209
|
});
|
|
@@ -30953,8 +30953,8 @@ var PodOS = (() => {
|
|
|
30953
30953
|
throw new Error(message4);
|
|
30954
30954
|
}
|
|
30955
30955
|
callbackFunction(uri6, response6.ok, response6.responseText, response6);
|
|
30956
|
-
}).catch((
|
|
30957
|
-
callbackFunction(uri6, false,
|
|
30956
|
+
}).catch((err2) => {
|
|
30957
|
+
callbackFunction(uri6, false, err2.message, err2);
|
|
30958
30958
|
});
|
|
30959
30959
|
}
|
|
30960
30960
|
// ARE THESE THREE FUNCTIONS USED? DEPRECATE?
|
|
@@ -31066,8 +31066,8 @@ var PodOS = (() => {
|
|
|
31066
31066
|
control2.reloading = true;
|
|
31067
31067
|
var retryTimeout = 1e3;
|
|
31068
31068
|
var tryReload = function() {
|
|
31069
|
-
updater.reload(updater.store, doc, function(
|
|
31070
|
-
if (
|
|
31069
|
+
updater.reload(updater.store, doc, function(ok2, message4, response6) {
|
|
31070
|
+
if (ok2) {
|
|
31071
31071
|
if (control2.downstreamChangeListeners) {
|
|
31072
31072
|
for (let i = 0; i < control2.downstreamChangeListeners.length; i++) {
|
|
31073
31073
|
control2.downstreamChangeListeners[i]();
|
|
@@ -31138,7 +31138,7 @@ var PodOS = (() => {
|
|
|
31138
31138
|
};
|
|
31139
31139
|
var control2 = self2.patchControlFor(doc);
|
|
31140
31140
|
control2.upstreamCount = 0;
|
|
31141
|
-
socket.onerror = function onerror(
|
|
31141
|
+
socket.onerror = function onerror(err2) {
|
|
31142
31142
|
};
|
|
31143
31143
|
socket.onclose = function(event4) {
|
|
31144
31144
|
retryTimeout *= 2;
|
|
@@ -31284,8 +31284,8 @@ _:patch
|
|
|
31284
31284
|
if (!callback) {
|
|
31285
31285
|
var thisUpdater = this;
|
|
31286
31286
|
return new Promise(function(resolve, reject) {
|
|
31287
|
-
thisUpdater.update(deletions, insertions, function(uri6,
|
|
31288
|
-
if (!
|
|
31287
|
+
thisUpdater.update(deletions, insertions, function(uri6, ok2, errorBody) {
|
|
31288
|
+
if (!ok2) {
|
|
31289
31289
|
reject(new Error(errorBody));
|
|
31290
31290
|
} else {
|
|
31291
31291
|
resolve();
|
|
@@ -31345,11 +31345,11 @@ _:patch
|
|
|
31345
31345
|
}
|
|
31346
31346
|
this.store.fetcher.load(doc).then((response6) => {
|
|
31347
31347
|
this.update(deletions, insertions, callback, true, options);
|
|
31348
|
-
}, (
|
|
31349
|
-
if (
|
|
31348
|
+
}, (err2) => {
|
|
31349
|
+
if (err2.response.status === 404) {
|
|
31350
31350
|
this.update(deletions, insertions, callback, true, options);
|
|
31351
31351
|
} else {
|
|
31352
|
-
throw new Error(`Update: Can't get updatability status ${doc} before patching: ${
|
|
31352
|
+
throw new Error(`Update: Can't get updatability status ${doc} before patching: ${err2}`);
|
|
31353
31353
|
}
|
|
31354
31354
|
});
|
|
31355
31355
|
return;
|
|
@@ -31447,8 +31447,8 @@ _:patch
|
|
|
31447
31447
|
kb.add(is[i].subject, is[i].predicate, is[i].object, doc);
|
|
31448
31448
|
}
|
|
31449
31449
|
callbackFunction(doc.value, response7.ok, response7.responseText, response7);
|
|
31450
|
-
}).catch((
|
|
31451
|
-
callbackFunction(doc.value, false,
|
|
31450
|
+
}).catch((err2) => {
|
|
31451
|
+
callbackFunction(doc.value, false, err2.message, err2);
|
|
31452
31452
|
});
|
|
31453
31453
|
}
|
|
31454
31454
|
/**
|
|
@@ -31547,8 +31547,8 @@ _:patch
|
|
|
31547
31547
|
});
|
|
31548
31548
|
}
|
|
31549
31549
|
callback(doc.value, response6.ok, "", response6);
|
|
31550
|
-
}).catch((
|
|
31551
|
-
callback(doc.value, false,
|
|
31550
|
+
}).catch((err2) => {
|
|
31551
|
+
callback(doc.value, false, err2.message);
|
|
31552
31552
|
});
|
|
31553
31553
|
}
|
|
31554
31554
|
/**
|
|
@@ -31570,8 +31570,8 @@ _:patch
|
|
|
31570
31570
|
noMeta: true,
|
|
31571
31571
|
clearPreviousData: true
|
|
31572
31572
|
};
|
|
31573
|
-
kb.fetcher.nowOrWhenFetched(doc.value, options, function(
|
|
31574
|
-
if (!
|
|
31573
|
+
kb.fetcher.nowOrWhenFetched(doc.value, options, function(ok2, body, response6) {
|
|
31574
|
+
if (!ok2) {
|
|
31575
31575
|
callbackFunction(false, "Error reloading data: " + body, response6);
|
|
31576
31576
|
} else if (response6.onErrorWasCalled || response6.status !== 200) {
|
|
31577
31577
|
callbackFunction(false, "Non-HTTP error reloading data: " + body, response6);
|
|
@@ -34759,8 +34759,10 @@ _:patch
|
|
|
34759
34759
|
Thing: () => Thing,
|
|
34760
34760
|
UriService: () => UriService,
|
|
34761
34761
|
WebIdProfile: () => WebIdProfile,
|
|
34762
|
+
httpProblem: () => httpProblem,
|
|
34762
34763
|
labelFromUri: () => labelFromUri,
|
|
34763
|
-
listKnownTerms: () => listKnownTerms
|
|
34764
|
+
listKnownTerms: () => listKnownTerms,
|
|
34765
|
+
networkProblem: () => networkProblem
|
|
34764
34766
|
});
|
|
34765
34767
|
|
|
34766
34768
|
// ../node_modules/tslib/tslib.es6.mjs
|
|
@@ -34840,8 +34842,8 @@ _:patch
|
|
|
34840
34842
|
var UnsubscriptionError = createErrorClass(function(_super) {
|
|
34841
34843
|
return function UnsubscriptionErrorImpl(errors) {
|
|
34842
34844
|
_super(this);
|
|
34843
|
-
this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function(
|
|
34844
|
-
return i + 1 + ") " +
|
|
34845
|
+
this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function(err2, i) {
|
|
34846
|
+
return i + 1 + ") " + err2.toString();
|
|
34845
34847
|
}).join("\n ") : "";
|
|
34846
34848
|
this.name = "UnsubscriptionError";
|
|
34847
34849
|
this.errors = errors;
|
|
@@ -34907,12 +34909,12 @@ _:patch
|
|
|
34907
34909
|
var finalizer = _finalizers_1_1.value;
|
|
34908
34910
|
try {
|
|
34909
34911
|
execFinalizer(finalizer);
|
|
34910
|
-
} catch (
|
|
34912
|
+
} catch (err2) {
|
|
34911
34913
|
errors = errors !== null && errors !== void 0 ? errors : [];
|
|
34912
|
-
if (
|
|
34913
|
-
errors = __spreadArray(__spreadArray([], __read(errors)), __read(
|
|
34914
|
+
if (err2 instanceof UnsubscriptionError) {
|
|
34915
|
+
errors = __spreadArray(__spreadArray([], __read(errors)), __read(err2.errors));
|
|
34914
34916
|
} else {
|
|
34915
|
-
errors.push(
|
|
34917
|
+
errors.push(err2);
|
|
34916
34918
|
}
|
|
34917
34919
|
}
|
|
34918
34920
|
}
|
|
@@ -35019,13 +35021,13 @@ _:patch
|
|
|
35019
35021
|
};
|
|
35020
35022
|
|
|
35021
35023
|
// ../node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js
|
|
35022
|
-
function reportUnhandledError(
|
|
35024
|
+
function reportUnhandledError(err2) {
|
|
35023
35025
|
timeoutProvider.setTimeout(function() {
|
|
35024
35026
|
var onUnhandledError = config.onUnhandledError;
|
|
35025
35027
|
if (onUnhandledError) {
|
|
35026
|
-
onUnhandledError(
|
|
35028
|
+
onUnhandledError(err2);
|
|
35027
35029
|
} else {
|
|
35028
|
-
throw
|
|
35030
|
+
throw err2;
|
|
35029
35031
|
}
|
|
35030
35032
|
});
|
|
35031
35033
|
}
|
|
@@ -35072,10 +35074,10 @@ _:patch
|
|
|
35072
35074
|
cb();
|
|
35073
35075
|
}
|
|
35074
35076
|
}
|
|
35075
|
-
function captureError(
|
|
35077
|
+
function captureError(err2) {
|
|
35076
35078
|
if (config.useDeprecatedSynchronousErrorHandling && context) {
|
|
35077
35079
|
context.errorThrown = true;
|
|
35078
|
-
context.error =
|
|
35080
|
+
context.error = err2;
|
|
35079
35081
|
}
|
|
35080
35082
|
}
|
|
35081
35083
|
|
|
@@ -35105,12 +35107,12 @@ _:patch
|
|
|
35105
35107
|
this._next(value7);
|
|
35106
35108
|
}
|
|
35107
35109
|
};
|
|
35108
|
-
Subscriber2.prototype.error = function(
|
|
35110
|
+
Subscriber2.prototype.error = function(err2) {
|
|
35109
35111
|
if (this.isStopped) {
|
|
35110
|
-
handleStoppedNotification(errorNotification(
|
|
35112
|
+
handleStoppedNotification(errorNotification(err2), this);
|
|
35111
35113
|
} else {
|
|
35112
35114
|
this.isStopped = true;
|
|
35113
|
-
this._error(
|
|
35115
|
+
this._error(err2);
|
|
35114
35116
|
}
|
|
35115
35117
|
};
|
|
35116
35118
|
Subscriber2.prototype.complete = function() {
|
|
@@ -35131,9 +35133,9 @@ _:patch
|
|
|
35131
35133
|
Subscriber2.prototype._next = function(value7) {
|
|
35132
35134
|
this.destination.next(value7);
|
|
35133
35135
|
};
|
|
35134
|
-
Subscriber2.prototype._error = function(
|
|
35136
|
+
Subscriber2.prototype._error = function(err2) {
|
|
35135
35137
|
try {
|
|
35136
|
-
this.destination.error(
|
|
35138
|
+
this.destination.error(err2);
|
|
35137
35139
|
} finally {
|
|
35138
35140
|
this.unsubscribe();
|
|
35139
35141
|
}
|
|
@@ -35165,16 +35167,16 @@ _:patch
|
|
|
35165
35167
|
}
|
|
35166
35168
|
}
|
|
35167
35169
|
};
|
|
35168
|
-
ConsumerObserver2.prototype.error = function(
|
|
35170
|
+
ConsumerObserver2.prototype.error = function(err2) {
|
|
35169
35171
|
var partialObserver = this.partialObserver;
|
|
35170
35172
|
if (partialObserver.error) {
|
|
35171
35173
|
try {
|
|
35172
|
-
partialObserver.error(
|
|
35174
|
+
partialObserver.error(err2);
|
|
35173
35175
|
} catch (error4) {
|
|
35174
35176
|
handleUnhandledError(error4);
|
|
35175
35177
|
}
|
|
35176
35178
|
} else {
|
|
35177
|
-
handleUnhandledError(
|
|
35179
|
+
handleUnhandledError(err2);
|
|
35178
35180
|
}
|
|
35179
35181
|
};
|
|
35180
35182
|
ConsumerObserver2.prototype.complete = function() {
|
|
@@ -35228,8 +35230,8 @@ _:patch
|
|
|
35228
35230
|
reportUnhandledError(error4);
|
|
35229
35231
|
}
|
|
35230
35232
|
}
|
|
35231
|
-
function defaultErrorHandler(
|
|
35232
|
-
throw
|
|
35233
|
+
function defaultErrorHandler(err2) {
|
|
35234
|
+
throw err2;
|
|
35233
35235
|
}
|
|
35234
35236
|
function handleStoppedNotification(notification2, subscriber3) {
|
|
35235
35237
|
var onStoppedNotification = config.onStoppedNotification;
|
|
@@ -35294,8 +35296,8 @@ _:patch
|
|
|
35294
35296
|
Observable2.prototype._trySubscribe = function(sink) {
|
|
35295
35297
|
try {
|
|
35296
35298
|
return this._subscribe(sink);
|
|
35297
|
-
} catch (
|
|
35298
|
-
sink.error(
|
|
35299
|
+
} catch (err2) {
|
|
35300
|
+
sink.error(err2);
|
|
35299
35301
|
}
|
|
35300
35302
|
};
|
|
35301
35303
|
Observable2.prototype.forEach = function(next4, promiseCtor) {
|
|
@@ -35306,8 +35308,8 @@ _:patch
|
|
|
35306
35308
|
next: function(value7) {
|
|
35307
35309
|
try {
|
|
35308
35310
|
next4(value7);
|
|
35309
|
-
} catch (
|
|
35310
|
-
reject(
|
|
35311
|
+
} catch (err2) {
|
|
35312
|
+
reject(err2);
|
|
35311
35313
|
subscriber3.unsubscribe();
|
|
35312
35314
|
}
|
|
35313
35315
|
},
|
|
@@ -35338,8 +35340,8 @@ _:patch
|
|
|
35338
35340
|
var value7;
|
|
35339
35341
|
_this.subscribe(function(x) {
|
|
35340
35342
|
return value7 = x;
|
|
35341
|
-
}, function(
|
|
35342
|
-
return reject(
|
|
35343
|
+
}, function(err2) {
|
|
35344
|
+
return reject(err2);
|
|
35343
35345
|
}, function() {
|
|
35344
35346
|
return resolve(value7);
|
|
35345
35347
|
});
|
|
@@ -35371,8 +35373,8 @@ _:patch
|
|
|
35371
35373
|
return source8.lift(function(liftedSource) {
|
|
35372
35374
|
try {
|
|
35373
35375
|
return init(liftedSource, this);
|
|
35374
|
-
} catch (
|
|
35375
|
-
this.error(
|
|
35376
|
+
} catch (err2) {
|
|
35377
|
+
this.error(err2);
|
|
35376
35378
|
}
|
|
35377
35379
|
});
|
|
35378
35380
|
}
|
|
@@ -35393,15 +35395,15 @@ _:patch
|
|
|
35393
35395
|
_this._next = onNext ? function(value7) {
|
|
35394
35396
|
try {
|
|
35395
35397
|
onNext(value7);
|
|
35396
|
-
} catch (
|
|
35397
|
-
destination2.error(
|
|
35398
|
+
} catch (err2) {
|
|
35399
|
+
destination2.error(err2);
|
|
35398
35400
|
}
|
|
35399
35401
|
} : _super.prototype._next;
|
|
35400
|
-
_this._error = onError ? function(
|
|
35402
|
+
_this._error = onError ? function(err2) {
|
|
35401
35403
|
try {
|
|
35402
|
-
onError(
|
|
35403
|
-
} catch (
|
|
35404
|
-
destination2.error(
|
|
35404
|
+
onError(err2);
|
|
35405
|
+
} catch (err3) {
|
|
35406
|
+
destination2.error(err3);
|
|
35405
35407
|
} finally {
|
|
35406
35408
|
this.unsubscribe();
|
|
35407
35409
|
}
|
|
@@ -35409,8 +35411,8 @@ _:patch
|
|
|
35409
35411
|
_this._complete = onComplete ? function() {
|
|
35410
35412
|
try {
|
|
35411
35413
|
onComplete();
|
|
35412
|
-
} catch (
|
|
35413
|
-
destination2.error(
|
|
35414
|
+
} catch (err2) {
|
|
35415
|
+
destination2.error(err2);
|
|
35414
35416
|
} finally {
|
|
35415
35417
|
this.unsubscribe();
|
|
35416
35418
|
}
|
|
@@ -35486,16 +35488,16 @@ _:patch
|
|
|
35486
35488
|
}
|
|
35487
35489
|
});
|
|
35488
35490
|
};
|
|
35489
|
-
Subject2.prototype.error = function(
|
|
35491
|
+
Subject2.prototype.error = function(err2) {
|
|
35490
35492
|
var _this = this;
|
|
35491
35493
|
errorContext(function() {
|
|
35492
35494
|
_this._throwIfClosed();
|
|
35493
35495
|
if (!_this.isStopped) {
|
|
35494
35496
|
_this.hasError = _this.isStopped = true;
|
|
35495
|
-
_this.thrownError =
|
|
35497
|
+
_this.thrownError = err2;
|
|
35496
35498
|
var observers = _this.observers;
|
|
35497
35499
|
while (observers.length) {
|
|
35498
|
-
observers.shift().error(
|
|
35500
|
+
observers.shift().error(err2);
|
|
35499
35501
|
}
|
|
35500
35502
|
}
|
|
35501
35503
|
});
|
|
@@ -35577,9 +35579,9 @@ _:patch
|
|
|
35577
35579
|
var _a, _b;
|
|
35578
35580
|
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value7);
|
|
35579
35581
|
};
|
|
35580
|
-
AnonymousSubject2.prototype.error = function(
|
|
35582
|
+
AnonymousSubject2.prototype.error = function(err2) {
|
|
35581
35583
|
var _a, _b;
|
|
35582
|
-
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a,
|
|
35584
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err2);
|
|
35583
35585
|
};
|
|
35584
35586
|
AnonymousSubject2.prototype.complete = function() {
|
|
35585
35587
|
var _a, _b;
|
|
@@ -35642,11 +35644,11 @@ _:patch
|
|
|
35642
35644
|
isUnsub = false;
|
|
35643
35645
|
(_a2 = tapObserver.complete) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver);
|
|
35644
35646
|
subscriber3.complete();
|
|
35645
|
-
}, function(
|
|
35647
|
+
}, function(err2) {
|
|
35646
35648
|
var _a2;
|
|
35647
35649
|
isUnsub = false;
|
|
35648
|
-
(_a2 = tapObserver.error) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver,
|
|
35649
|
-
subscriber3.error(
|
|
35650
|
+
(_a2 = tapObserver.error) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, err2);
|
|
35651
|
+
subscriber3.error(err2);
|
|
35650
35652
|
}, function() {
|
|
35651
35653
|
var _a2, _b;
|
|
35652
35654
|
if (isUnsub) {
|
|
@@ -35693,6 +35695,958 @@ _:patch
|
|
|
35693
35695
|
}
|
|
35694
35696
|
};
|
|
35695
35697
|
|
|
35698
|
+
// src/problems/index.ts
|
|
35699
|
+
function httpProblem(title10, response6) {
|
|
35700
|
+
return {
|
|
35701
|
+
type: "http",
|
|
35702
|
+
title: title10,
|
|
35703
|
+
status: response6.status,
|
|
35704
|
+
detail: `The server responded with ${response6.status} ${response6.statusText}`
|
|
35705
|
+
};
|
|
35706
|
+
}
|
|
35707
|
+
function networkProblem(title10, cause) {
|
|
35708
|
+
return {
|
|
35709
|
+
type: "network",
|
|
35710
|
+
title: title10,
|
|
35711
|
+
detail: `The server could not be reached: ${cause.message}`
|
|
35712
|
+
};
|
|
35713
|
+
}
|
|
35714
|
+
|
|
35715
|
+
// ../node_modules/neverthrow/dist/index.es.js
|
|
35716
|
+
var defaultErrorConfig = {
|
|
35717
|
+
withStackTrace: false
|
|
35718
|
+
};
|
|
35719
|
+
var createNeverThrowError = (message4, result6, config2 = defaultErrorConfig) => {
|
|
35720
|
+
const data2 = result6.isOk() ? { type: "Ok", value: result6.value } : { type: "Err", value: result6.error };
|
|
35721
|
+
const maybeStack = config2.withStackTrace ? new Error().stack : void 0;
|
|
35722
|
+
return {
|
|
35723
|
+
data: data2,
|
|
35724
|
+
message: message4,
|
|
35725
|
+
stack: maybeStack
|
|
35726
|
+
};
|
|
35727
|
+
};
|
|
35728
|
+
function __awaiter(thisArg, _arguments, P, generator3) {
|
|
35729
|
+
function adopt(value7) {
|
|
35730
|
+
return value7 instanceof P ? value7 : new P(function(resolve) {
|
|
35731
|
+
resolve(value7);
|
|
35732
|
+
});
|
|
35733
|
+
}
|
|
35734
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
35735
|
+
function fulfilled(value7) {
|
|
35736
|
+
try {
|
|
35737
|
+
step4(generator3.next(value7));
|
|
35738
|
+
} catch (e) {
|
|
35739
|
+
reject(e);
|
|
35740
|
+
}
|
|
35741
|
+
}
|
|
35742
|
+
function rejected(value7) {
|
|
35743
|
+
try {
|
|
35744
|
+
step4(generator3["throw"](value7));
|
|
35745
|
+
} catch (e) {
|
|
35746
|
+
reject(e);
|
|
35747
|
+
}
|
|
35748
|
+
}
|
|
35749
|
+
function step4(result6) {
|
|
35750
|
+
result6.done ? resolve(result6.value) : adopt(result6.value).then(fulfilled, rejected);
|
|
35751
|
+
}
|
|
35752
|
+
step4((generator3 = generator3.apply(thisArg, _arguments || [])).next());
|
|
35753
|
+
});
|
|
35754
|
+
}
|
|
35755
|
+
function __values2(o) {
|
|
35756
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
35757
|
+
if (m) return m.call(o);
|
|
35758
|
+
if (o && typeof o.length === "number") return {
|
|
35759
|
+
next: function() {
|
|
35760
|
+
if (o && i >= o.length) o = void 0;
|
|
35761
|
+
return { value: o && o[i++], done: !o };
|
|
35762
|
+
}
|
|
35763
|
+
};
|
|
35764
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
35765
|
+
}
|
|
35766
|
+
function __await(v2) {
|
|
35767
|
+
return this instanceof __await ? (this.v = v2, this) : new __await(v2);
|
|
35768
|
+
}
|
|
35769
|
+
function __asyncGenerator(thisArg, _arguments, generator3) {
|
|
35770
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
35771
|
+
var g = generator3.apply(thisArg, _arguments || []), i, q = [];
|
|
35772
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb2("next"), verb2("throw"), verb2("return", awaitReturn), i[Symbol.asyncIterator] = function() {
|
|
35773
|
+
return this;
|
|
35774
|
+
}, i;
|
|
35775
|
+
function awaitReturn(f) {
|
|
35776
|
+
return function(v2) {
|
|
35777
|
+
return Promise.resolve(v2).then(f, reject);
|
|
35778
|
+
};
|
|
35779
|
+
}
|
|
35780
|
+
function verb2(n2, f) {
|
|
35781
|
+
if (g[n2]) {
|
|
35782
|
+
i[n2] = function(v2) {
|
|
35783
|
+
return new Promise(function(a, b) {
|
|
35784
|
+
q.push([n2, v2, a, b]) > 1 || resume(n2, v2);
|
|
35785
|
+
});
|
|
35786
|
+
};
|
|
35787
|
+
if (f) i[n2] = f(i[n2]);
|
|
35788
|
+
}
|
|
35789
|
+
}
|
|
35790
|
+
function resume(n2, v2) {
|
|
35791
|
+
try {
|
|
35792
|
+
step4(g[n2](v2));
|
|
35793
|
+
} catch (e) {
|
|
35794
|
+
settle(q[0][3], e);
|
|
35795
|
+
}
|
|
35796
|
+
}
|
|
35797
|
+
function step4(r) {
|
|
35798
|
+
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
|
|
35799
|
+
}
|
|
35800
|
+
function fulfill(value7) {
|
|
35801
|
+
resume("next", value7);
|
|
35802
|
+
}
|
|
35803
|
+
function reject(value7) {
|
|
35804
|
+
resume("throw", value7);
|
|
35805
|
+
}
|
|
35806
|
+
function settle(f, v2) {
|
|
35807
|
+
if (f(v2), q.shift(), q.length) resume(q[0][0], q[0][1]);
|
|
35808
|
+
}
|
|
35809
|
+
}
|
|
35810
|
+
function __asyncDelegator(o) {
|
|
35811
|
+
var i, p;
|
|
35812
|
+
return i = {}, verb2("next"), verb2("throw", function(e) {
|
|
35813
|
+
throw e;
|
|
35814
|
+
}), verb2("return"), i[Symbol.iterator] = function() {
|
|
35815
|
+
return this;
|
|
35816
|
+
}, i;
|
|
35817
|
+
function verb2(n2, f) {
|
|
35818
|
+
i[n2] = o[n2] ? function(v2) {
|
|
35819
|
+
return (p = !p) ? { value: __await(o[n2](v2)), done: false } : f ? f(v2) : v2;
|
|
35820
|
+
} : f;
|
|
35821
|
+
}
|
|
35822
|
+
}
|
|
35823
|
+
function __asyncValues(o) {
|
|
35824
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
35825
|
+
var m = o[Symbol.asyncIterator], i;
|
|
35826
|
+
return m ? m.call(o) : (o = typeof __values2 === "function" ? __values2(o) : o[Symbol.iterator](), i = {}, verb2("next"), verb2("throw"), verb2("return"), i[Symbol.asyncIterator] = function() {
|
|
35827
|
+
return this;
|
|
35828
|
+
}, i);
|
|
35829
|
+
function verb2(n2) {
|
|
35830
|
+
i[n2] = o[n2] && function(v2) {
|
|
35831
|
+
return new Promise(function(resolve, reject) {
|
|
35832
|
+
v2 = o[n2](v2), settle(resolve, reject, v2.done, v2.value);
|
|
35833
|
+
});
|
|
35834
|
+
};
|
|
35835
|
+
}
|
|
35836
|
+
function settle(resolve, reject, d, v2) {
|
|
35837
|
+
Promise.resolve(v2).then(function(v3) {
|
|
35838
|
+
resolve({ value: v3, done: d });
|
|
35839
|
+
}, reject);
|
|
35840
|
+
}
|
|
35841
|
+
}
|
|
35842
|
+
var ResultAsync = class _ResultAsync {
|
|
35843
|
+
constructor(res) {
|
|
35844
|
+
this._promise = res;
|
|
35845
|
+
}
|
|
35846
|
+
static fromSafePromise(promise) {
|
|
35847
|
+
const newPromise = promise.then((value7) => new Ok(value7));
|
|
35848
|
+
return new _ResultAsync(newPromise);
|
|
35849
|
+
}
|
|
35850
|
+
static fromPromise(promise, errorFn) {
|
|
35851
|
+
const newPromise = promise.then((value7) => new Ok(value7)).catch((e) => new Err(errorFn(e)));
|
|
35852
|
+
return new _ResultAsync(newPromise);
|
|
35853
|
+
}
|
|
35854
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35855
|
+
static fromThrowable(fn2, errorFn) {
|
|
35856
|
+
return (...args) => {
|
|
35857
|
+
return new _ResultAsync((() => __awaiter(this, void 0, void 0, function* () {
|
|
35858
|
+
try {
|
|
35859
|
+
return new Ok(yield fn2(...args));
|
|
35860
|
+
} catch (error4) {
|
|
35861
|
+
return new Err(errorFn ? errorFn(error4) : error4);
|
|
35862
|
+
}
|
|
35863
|
+
}))());
|
|
35864
|
+
};
|
|
35865
|
+
}
|
|
35866
|
+
static combine(asyncResultList) {
|
|
35867
|
+
return combineResultAsyncList(asyncResultList);
|
|
35868
|
+
}
|
|
35869
|
+
static combineWithAllErrors(asyncResultList) {
|
|
35870
|
+
return combineResultAsyncListWithAllErrors(asyncResultList);
|
|
35871
|
+
}
|
|
35872
|
+
map(f) {
|
|
35873
|
+
return new _ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
|
|
35874
|
+
if (res.isErr()) {
|
|
35875
|
+
return new Err(res.error);
|
|
35876
|
+
}
|
|
35877
|
+
return new Ok(yield f(res.value));
|
|
35878
|
+
})));
|
|
35879
|
+
}
|
|
35880
|
+
andThrough(f) {
|
|
35881
|
+
return new _ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
|
|
35882
|
+
if (res.isErr()) {
|
|
35883
|
+
return new Err(res.error);
|
|
35884
|
+
}
|
|
35885
|
+
const newRes = yield f(res.value);
|
|
35886
|
+
if (newRes.isErr()) {
|
|
35887
|
+
return new Err(newRes.error);
|
|
35888
|
+
}
|
|
35889
|
+
return new Ok(res.value);
|
|
35890
|
+
})));
|
|
35891
|
+
}
|
|
35892
|
+
andTee(f) {
|
|
35893
|
+
return new _ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
|
|
35894
|
+
if (res.isErr()) {
|
|
35895
|
+
return new Err(res.error);
|
|
35896
|
+
}
|
|
35897
|
+
try {
|
|
35898
|
+
yield f(res.value);
|
|
35899
|
+
} catch (e) {
|
|
35900
|
+
}
|
|
35901
|
+
return new Ok(res.value);
|
|
35902
|
+
})));
|
|
35903
|
+
}
|
|
35904
|
+
orTee(f) {
|
|
35905
|
+
return new _ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
|
|
35906
|
+
if (res.isOk()) {
|
|
35907
|
+
return new Ok(res.value);
|
|
35908
|
+
}
|
|
35909
|
+
try {
|
|
35910
|
+
yield f(res.error);
|
|
35911
|
+
} catch (e) {
|
|
35912
|
+
}
|
|
35913
|
+
return new Err(res.error);
|
|
35914
|
+
})));
|
|
35915
|
+
}
|
|
35916
|
+
mapErr(f) {
|
|
35917
|
+
return new _ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
|
|
35918
|
+
if (res.isOk()) {
|
|
35919
|
+
return new Ok(res.value);
|
|
35920
|
+
}
|
|
35921
|
+
return new Err(yield f(res.error));
|
|
35922
|
+
})));
|
|
35923
|
+
}
|
|
35924
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
35925
|
+
andThen(f) {
|
|
35926
|
+
return new _ResultAsync(this._promise.then((res) => {
|
|
35927
|
+
if (res.isErr()) {
|
|
35928
|
+
return new Err(res.error);
|
|
35929
|
+
}
|
|
35930
|
+
const newValue = f(res.value);
|
|
35931
|
+
return newValue instanceof _ResultAsync ? newValue._promise : newValue;
|
|
35932
|
+
}));
|
|
35933
|
+
}
|
|
35934
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
35935
|
+
orElse(f) {
|
|
35936
|
+
return new _ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
|
|
35937
|
+
if (res.isErr()) {
|
|
35938
|
+
return f(res.error);
|
|
35939
|
+
}
|
|
35940
|
+
return new Ok(res.value);
|
|
35941
|
+
})));
|
|
35942
|
+
}
|
|
35943
|
+
match(ok2, _err) {
|
|
35944
|
+
return this._promise.then((res) => res.match(ok2, _err));
|
|
35945
|
+
}
|
|
35946
|
+
unwrapOr(t) {
|
|
35947
|
+
return this._promise.then((res) => res.unwrapOr(t));
|
|
35948
|
+
}
|
|
35949
|
+
/**
|
|
35950
|
+
* @deprecated will be removed in 9.0.0.
|
|
35951
|
+
*
|
|
35952
|
+
* You can use `safeTry` without this method.
|
|
35953
|
+
* @example
|
|
35954
|
+
* ```typescript
|
|
35955
|
+
* safeTry(async function* () {
|
|
35956
|
+
* const okValue = yield* yourResult
|
|
35957
|
+
* })
|
|
35958
|
+
* ```
|
|
35959
|
+
* Emulates Rust's `?` operator in `safeTry`'s body. See also `safeTry`.
|
|
35960
|
+
*/
|
|
35961
|
+
safeUnwrap() {
|
|
35962
|
+
return __asyncGenerator(this, arguments, function* safeUnwrap_1() {
|
|
35963
|
+
return yield __await(yield __await(yield* __asyncDelegator(__asyncValues(yield __await(this._promise.then((res) => res.safeUnwrap()))))));
|
|
35964
|
+
});
|
|
35965
|
+
}
|
|
35966
|
+
// Makes ResultAsync implement PromiseLike<Result>
|
|
35967
|
+
then(successCallback, failureCallback) {
|
|
35968
|
+
return this._promise.then(successCallback, failureCallback);
|
|
35969
|
+
}
|
|
35970
|
+
[Symbol.asyncIterator]() {
|
|
35971
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
35972
|
+
const result6 = yield __await(this._promise);
|
|
35973
|
+
if (result6.isErr()) {
|
|
35974
|
+
yield yield __await(errAsync(result6.error));
|
|
35975
|
+
}
|
|
35976
|
+
return yield __await(result6.value);
|
|
35977
|
+
});
|
|
35978
|
+
}
|
|
35979
|
+
};
|
|
35980
|
+
function errAsync(err2) {
|
|
35981
|
+
return new ResultAsync(Promise.resolve(new Err(err2)));
|
|
35982
|
+
}
|
|
35983
|
+
var fromPromise = ResultAsync.fromPromise;
|
|
35984
|
+
var fromSafePromise = ResultAsync.fromSafePromise;
|
|
35985
|
+
var fromAsyncThrowable = ResultAsync.fromThrowable;
|
|
35986
|
+
var combineResultList = (resultList) => {
|
|
35987
|
+
let acc = ok([]);
|
|
35988
|
+
for (const result6 of resultList) {
|
|
35989
|
+
if (result6.isErr()) {
|
|
35990
|
+
acc = err(result6.error);
|
|
35991
|
+
break;
|
|
35992
|
+
} else {
|
|
35993
|
+
acc.map((list) => list.push(result6.value));
|
|
35994
|
+
}
|
|
35995
|
+
}
|
|
35996
|
+
return acc;
|
|
35997
|
+
};
|
|
35998
|
+
var combineResultAsyncList = (asyncResultList) => ResultAsync.fromSafePromise(Promise.all(asyncResultList)).andThen(combineResultList);
|
|
35999
|
+
var combineResultListWithAllErrors = (resultList) => {
|
|
36000
|
+
let acc = ok([]);
|
|
36001
|
+
for (const result6 of resultList) {
|
|
36002
|
+
if (result6.isErr() && acc.isErr()) {
|
|
36003
|
+
acc.error.push(result6.error);
|
|
36004
|
+
} else if (result6.isErr() && acc.isOk()) {
|
|
36005
|
+
acc = err([result6.error]);
|
|
36006
|
+
} else if (result6.isOk() && acc.isOk()) {
|
|
36007
|
+
acc.value.push(result6.value);
|
|
36008
|
+
}
|
|
36009
|
+
}
|
|
36010
|
+
return acc;
|
|
36011
|
+
};
|
|
36012
|
+
var combineResultAsyncListWithAllErrors = (asyncResultList) => ResultAsync.fromSafePromise(Promise.all(asyncResultList)).andThen(combineResultListWithAllErrors);
|
|
36013
|
+
var Result;
|
|
36014
|
+
(function(Result2) {
|
|
36015
|
+
function fromThrowable2(fn2, errorFn) {
|
|
36016
|
+
return (...args) => {
|
|
36017
|
+
try {
|
|
36018
|
+
const result6 = fn2(...args);
|
|
36019
|
+
return ok(result6);
|
|
36020
|
+
} catch (e) {
|
|
36021
|
+
return err(errorFn ? errorFn(e) : e);
|
|
36022
|
+
}
|
|
36023
|
+
};
|
|
36024
|
+
}
|
|
36025
|
+
Result2.fromThrowable = fromThrowable2;
|
|
36026
|
+
function combine(resultList) {
|
|
36027
|
+
return combineResultList(resultList);
|
|
36028
|
+
}
|
|
36029
|
+
Result2.combine = combine;
|
|
36030
|
+
function combineWithAllErrors(resultList) {
|
|
36031
|
+
return combineResultListWithAllErrors(resultList);
|
|
36032
|
+
}
|
|
36033
|
+
Result2.combineWithAllErrors = combineWithAllErrors;
|
|
36034
|
+
})(Result || (Result = {}));
|
|
36035
|
+
function ok(value7) {
|
|
36036
|
+
return new Ok(value7);
|
|
36037
|
+
}
|
|
36038
|
+
function err(err2) {
|
|
36039
|
+
return new Err(err2);
|
|
36040
|
+
}
|
|
36041
|
+
var Ok = class {
|
|
36042
|
+
constructor(value7) {
|
|
36043
|
+
this.value = value7;
|
|
36044
|
+
}
|
|
36045
|
+
isOk() {
|
|
36046
|
+
return true;
|
|
36047
|
+
}
|
|
36048
|
+
isErr() {
|
|
36049
|
+
return !this.isOk();
|
|
36050
|
+
}
|
|
36051
|
+
map(f) {
|
|
36052
|
+
return ok(f(this.value));
|
|
36053
|
+
}
|
|
36054
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36055
|
+
mapErr(_f) {
|
|
36056
|
+
return ok(this.value);
|
|
36057
|
+
}
|
|
36058
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
36059
|
+
andThen(f) {
|
|
36060
|
+
return f(this.value);
|
|
36061
|
+
}
|
|
36062
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
36063
|
+
andThrough(f) {
|
|
36064
|
+
return f(this.value).map((_value2) => this.value);
|
|
36065
|
+
}
|
|
36066
|
+
andTee(f) {
|
|
36067
|
+
try {
|
|
36068
|
+
f(this.value);
|
|
36069
|
+
} catch (e) {
|
|
36070
|
+
}
|
|
36071
|
+
return ok(this.value);
|
|
36072
|
+
}
|
|
36073
|
+
orTee(_f) {
|
|
36074
|
+
return ok(this.value);
|
|
36075
|
+
}
|
|
36076
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
36077
|
+
orElse(_f) {
|
|
36078
|
+
return ok(this.value);
|
|
36079
|
+
}
|
|
36080
|
+
asyncAndThen(f) {
|
|
36081
|
+
return f(this.value);
|
|
36082
|
+
}
|
|
36083
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
36084
|
+
asyncAndThrough(f) {
|
|
36085
|
+
return f(this.value).map(() => this.value);
|
|
36086
|
+
}
|
|
36087
|
+
asyncMap(f) {
|
|
36088
|
+
return ResultAsync.fromSafePromise(f(this.value));
|
|
36089
|
+
}
|
|
36090
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36091
|
+
unwrapOr(_v) {
|
|
36092
|
+
return this.value;
|
|
36093
|
+
}
|
|
36094
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36095
|
+
match(ok2, _err) {
|
|
36096
|
+
return ok2(this.value);
|
|
36097
|
+
}
|
|
36098
|
+
safeUnwrap() {
|
|
36099
|
+
const value7 = this.value;
|
|
36100
|
+
return (function* () {
|
|
36101
|
+
return value7;
|
|
36102
|
+
})();
|
|
36103
|
+
}
|
|
36104
|
+
_unsafeUnwrap(_) {
|
|
36105
|
+
return this.value;
|
|
36106
|
+
}
|
|
36107
|
+
_unsafeUnwrapErr(config2) {
|
|
36108
|
+
throw createNeverThrowError("Called `_unsafeUnwrapErr` on an Ok", this, config2);
|
|
36109
|
+
}
|
|
36110
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias, require-yield
|
|
36111
|
+
*[Symbol.iterator]() {
|
|
36112
|
+
return this.value;
|
|
36113
|
+
}
|
|
36114
|
+
};
|
|
36115
|
+
var Err = class {
|
|
36116
|
+
constructor(error4) {
|
|
36117
|
+
this.error = error4;
|
|
36118
|
+
}
|
|
36119
|
+
isOk() {
|
|
36120
|
+
return false;
|
|
36121
|
+
}
|
|
36122
|
+
isErr() {
|
|
36123
|
+
return !this.isOk();
|
|
36124
|
+
}
|
|
36125
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36126
|
+
map(_f) {
|
|
36127
|
+
return err(this.error);
|
|
36128
|
+
}
|
|
36129
|
+
mapErr(f) {
|
|
36130
|
+
return err(f(this.error));
|
|
36131
|
+
}
|
|
36132
|
+
andThrough(_f) {
|
|
36133
|
+
return err(this.error);
|
|
36134
|
+
}
|
|
36135
|
+
andTee(_f) {
|
|
36136
|
+
return err(this.error);
|
|
36137
|
+
}
|
|
36138
|
+
orTee(f) {
|
|
36139
|
+
try {
|
|
36140
|
+
f(this.error);
|
|
36141
|
+
} catch (e) {
|
|
36142
|
+
}
|
|
36143
|
+
return err(this.error);
|
|
36144
|
+
}
|
|
36145
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
36146
|
+
andThen(_f) {
|
|
36147
|
+
return err(this.error);
|
|
36148
|
+
}
|
|
36149
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
36150
|
+
orElse(f) {
|
|
36151
|
+
return f(this.error);
|
|
36152
|
+
}
|
|
36153
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36154
|
+
asyncAndThen(_f) {
|
|
36155
|
+
return errAsync(this.error);
|
|
36156
|
+
}
|
|
36157
|
+
asyncAndThrough(_f) {
|
|
36158
|
+
return errAsync(this.error);
|
|
36159
|
+
}
|
|
36160
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36161
|
+
asyncMap(_f) {
|
|
36162
|
+
return errAsync(this.error);
|
|
36163
|
+
}
|
|
36164
|
+
unwrapOr(v2) {
|
|
36165
|
+
return v2;
|
|
36166
|
+
}
|
|
36167
|
+
match(_ok, err2) {
|
|
36168
|
+
return err2(this.error);
|
|
36169
|
+
}
|
|
36170
|
+
safeUnwrap() {
|
|
36171
|
+
const error4 = this.error;
|
|
36172
|
+
return (function* () {
|
|
36173
|
+
yield err(error4);
|
|
36174
|
+
throw new Error("Do not use this generator out of `safeTry`");
|
|
36175
|
+
})();
|
|
36176
|
+
}
|
|
36177
|
+
_unsafeUnwrap(config2) {
|
|
36178
|
+
throw createNeverThrowError("Called `_unsafeUnwrap` on an Err", this, config2);
|
|
36179
|
+
}
|
|
36180
|
+
_unsafeUnwrapErr(_) {
|
|
36181
|
+
return this.error;
|
|
36182
|
+
}
|
|
36183
|
+
*[Symbol.iterator]() {
|
|
36184
|
+
const self2 = this;
|
|
36185
|
+
yield self2;
|
|
36186
|
+
return self2;
|
|
36187
|
+
}
|
|
36188
|
+
};
|
|
36189
|
+
var fromThrowable = Result.fromThrowable;
|
|
36190
|
+
|
|
36191
|
+
// ../node_modules/mime/dist/types/standard.js
|
|
36192
|
+
var types = {
|
|
36193
|
+
"application/andrew-inset": ["ez"],
|
|
36194
|
+
"application/appinstaller": ["appinstaller"],
|
|
36195
|
+
"application/applixware": ["aw"],
|
|
36196
|
+
"application/appx": ["appx"],
|
|
36197
|
+
"application/appxbundle": ["appxbundle"],
|
|
36198
|
+
"application/atom+xml": ["atom"],
|
|
36199
|
+
"application/atomcat+xml": ["atomcat"],
|
|
36200
|
+
"application/atomdeleted+xml": ["atomdeleted"],
|
|
36201
|
+
"application/atomsvc+xml": ["atomsvc"],
|
|
36202
|
+
"application/atsc-dwd+xml": ["dwd"],
|
|
36203
|
+
"application/atsc-held+xml": ["held"],
|
|
36204
|
+
"application/atsc-rsat+xml": ["rsat"],
|
|
36205
|
+
"application/automationml-aml+xml": ["aml"],
|
|
36206
|
+
"application/automationml-amlx+zip": ["amlx"],
|
|
36207
|
+
"application/bdoc": ["bdoc"],
|
|
36208
|
+
"application/calendar+xml": ["xcs"],
|
|
36209
|
+
"application/ccxml+xml": ["ccxml"],
|
|
36210
|
+
"application/cdfx+xml": ["cdfx"],
|
|
36211
|
+
"application/cdmi-capability": ["cdmia"],
|
|
36212
|
+
"application/cdmi-container": ["cdmic"],
|
|
36213
|
+
"application/cdmi-domain": ["cdmid"],
|
|
36214
|
+
"application/cdmi-object": ["cdmio"],
|
|
36215
|
+
"application/cdmi-queue": ["cdmiq"],
|
|
36216
|
+
"application/cpl+xml": ["cpl"],
|
|
36217
|
+
"application/cu-seeme": ["cu"],
|
|
36218
|
+
"application/cwl": ["cwl"],
|
|
36219
|
+
"application/dash+xml": ["mpd"],
|
|
36220
|
+
"application/dash-patch+xml": ["mpp"],
|
|
36221
|
+
"application/davmount+xml": ["davmount"],
|
|
36222
|
+
"application/dicom": ["dcm"],
|
|
36223
|
+
"application/docbook+xml": ["dbk"],
|
|
36224
|
+
"application/dssc+der": ["dssc"],
|
|
36225
|
+
"application/dssc+xml": ["xdssc"],
|
|
36226
|
+
"application/ecmascript": ["ecma"],
|
|
36227
|
+
"application/emma+xml": ["emma"],
|
|
36228
|
+
"application/emotionml+xml": ["emotionml"],
|
|
36229
|
+
"application/epub+zip": ["epub"],
|
|
36230
|
+
"application/exi": ["exi"],
|
|
36231
|
+
"application/express": ["exp"],
|
|
36232
|
+
"application/fdf": ["fdf"],
|
|
36233
|
+
"application/fdt+xml": ["fdt"],
|
|
36234
|
+
"application/font-tdpfr": ["pfr"],
|
|
36235
|
+
"application/geo+json": ["geojson"],
|
|
36236
|
+
"application/gml+xml": ["gml"],
|
|
36237
|
+
"application/gpx+xml": ["gpx"],
|
|
36238
|
+
"application/gxf": ["gxf"],
|
|
36239
|
+
"application/gzip": ["gz"],
|
|
36240
|
+
"application/hjson": ["hjson"],
|
|
36241
|
+
"application/hyperstudio": ["stk"],
|
|
36242
|
+
"application/inkml+xml": ["ink", "inkml"],
|
|
36243
|
+
"application/ipfix": ["ipfix"],
|
|
36244
|
+
"application/its+xml": ["its"],
|
|
36245
|
+
"application/java-archive": ["jar", "war", "ear"],
|
|
36246
|
+
"application/java-serialized-object": ["ser"],
|
|
36247
|
+
"application/java-vm": ["class"],
|
|
36248
|
+
"application/javascript": ["*js"],
|
|
36249
|
+
"application/json": ["json", "map"],
|
|
36250
|
+
"application/json5": ["json5"],
|
|
36251
|
+
"application/jsonml+json": ["jsonml"],
|
|
36252
|
+
"application/ld+json": ["jsonld"],
|
|
36253
|
+
"application/lgr+xml": ["lgr"],
|
|
36254
|
+
"application/lost+xml": ["lostxml"],
|
|
36255
|
+
"application/mac-binhex40": ["hqx"],
|
|
36256
|
+
"application/mac-compactpro": ["cpt"],
|
|
36257
|
+
"application/mads+xml": ["mads"],
|
|
36258
|
+
"application/manifest+json": ["webmanifest"],
|
|
36259
|
+
"application/marc": ["mrc"],
|
|
36260
|
+
"application/marcxml+xml": ["mrcx"],
|
|
36261
|
+
"application/mathematica": ["ma", "nb", "mb"],
|
|
36262
|
+
"application/mathml+xml": ["mathml"],
|
|
36263
|
+
"application/mbox": ["mbox"],
|
|
36264
|
+
"application/media-policy-dataset+xml": ["mpf"],
|
|
36265
|
+
"application/mediaservercontrol+xml": ["mscml"],
|
|
36266
|
+
"application/metalink+xml": ["metalink"],
|
|
36267
|
+
"application/metalink4+xml": ["meta4"],
|
|
36268
|
+
"application/mets+xml": ["mets"],
|
|
36269
|
+
"application/mmt-aei+xml": ["maei"],
|
|
36270
|
+
"application/mmt-usd+xml": ["musd"],
|
|
36271
|
+
"application/mods+xml": ["mods"],
|
|
36272
|
+
"application/mp21": ["m21", "mp21"],
|
|
36273
|
+
"application/mp4": ["*mp4", "*mpg4", "mp4s", "m4p"],
|
|
36274
|
+
"application/msix": ["msix"],
|
|
36275
|
+
"application/msixbundle": ["msixbundle"],
|
|
36276
|
+
"application/msword": ["doc", "dot"],
|
|
36277
|
+
"application/mxf": ["mxf"],
|
|
36278
|
+
"application/n-quads": ["nq"],
|
|
36279
|
+
"application/n-triples": ["nt"],
|
|
36280
|
+
"application/node": ["cjs"],
|
|
36281
|
+
"application/octet-stream": [
|
|
36282
|
+
"bin",
|
|
36283
|
+
"dms",
|
|
36284
|
+
"lrf",
|
|
36285
|
+
"mar",
|
|
36286
|
+
"so",
|
|
36287
|
+
"dist",
|
|
36288
|
+
"distz",
|
|
36289
|
+
"pkg",
|
|
36290
|
+
"bpk",
|
|
36291
|
+
"dump",
|
|
36292
|
+
"elc",
|
|
36293
|
+
"deploy",
|
|
36294
|
+
"exe",
|
|
36295
|
+
"dll",
|
|
36296
|
+
"deb",
|
|
36297
|
+
"dmg",
|
|
36298
|
+
"iso",
|
|
36299
|
+
"img",
|
|
36300
|
+
"msi",
|
|
36301
|
+
"msp",
|
|
36302
|
+
"msm",
|
|
36303
|
+
"buffer"
|
|
36304
|
+
],
|
|
36305
|
+
"application/oda": ["oda"],
|
|
36306
|
+
"application/oebps-package+xml": ["opf"],
|
|
36307
|
+
"application/ogg": ["ogx"],
|
|
36308
|
+
"application/omdoc+xml": ["omdoc"],
|
|
36309
|
+
"application/onenote": [
|
|
36310
|
+
"onetoc",
|
|
36311
|
+
"onetoc2",
|
|
36312
|
+
"onetmp",
|
|
36313
|
+
"onepkg",
|
|
36314
|
+
"one",
|
|
36315
|
+
"onea"
|
|
36316
|
+
],
|
|
36317
|
+
"application/oxps": ["oxps"],
|
|
36318
|
+
"application/p2p-overlay+xml": ["relo"],
|
|
36319
|
+
"application/patch-ops-error+xml": ["xer"],
|
|
36320
|
+
"application/pdf": ["pdf"],
|
|
36321
|
+
"application/pgp-encrypted": ["pgp"],
|
|
36322
|
+
"application/pgp-keys": ["asc"],
|
|
36323
|
+
"application/pgp-signature": ["sig", "*asc"],
|
|
36324
|
+
"application/pics-rules": ["prf"],
|
|
36325
|
+
"application/pkcs10": ["p10"],
|
|
36326
|
+
"application/pkcs7-mime": ["p7m", "p7c"],
|
|
36327
|
+
"application/pkcs7-signature": ["p7s"],
|
|
36328
|
+
"application/pkcs8": ["p8"],
|
|
36329
|
+
"application/pkix-attr-cert": ["ac"],
|
|
36330
|
+
"application/pkix-cert": ["cer"],
|
|
36331
|
+
"application/pkix-crl": ["crl"],
|
|
36332
|
+
"application/pkix-pkipath": ["pkipath"],
|
|
36333
|
+
"application/pkixcmp": ["pki"],
|
|
36334
|
+
"application/pls+xml": ["pls"],
|
|
36335
|
+
"application/postscript": ["ai", "eps", "ps"],
|
|
36336
|
+
"application/provenance+xml": ["provx"],
|
|
36337
|
+
"application/pskc+xml": ["pskcxml"],
|
|
36338
|
+
"application/raml+yaml": ["raml"],
|
|
36339
|
+
"application/rdf+xml": ["rdf", "owl"],
|
|
36340
|
+
"application/reginfo+xml": ["rif"],
|
|
36341
|
+
"application/relax-ng-compact-syntax": ["rnc"],
|
|
36342
|
+
"application/resource-lists+xml": ["rl"],
|
|
36343
|
+
"application/resource-lists-diff+xml": ["rld"],
|
|
36344
|
+
"application/rls-services+xml": ["rs"],
|
|
36345
|
+
"application/route-apd+xml": ["rapd"],
|
|
36346
|
+
"application/route-s-tsid+xml": ["sls"],
|
|
36347
|
+
"application/route-usd+xml": ["rusd"],
|
|
36348
|
+
"application/rpki-ghostbusters": ["gbr"],
|
|
36349
|
+
"application/rpki-manifest": ["mft"],
|
|
36350
|
+
"application/rpki-roa": ["roa"],
|
|
36351
|
+
"application/rsd+xml": ["rsd"],
|
|
36352
|
+
"application/rss+xml": ["rss"],
|
|
36353
|
+
"application/rtf": ["rtf"],
|
|
36354
|
+
"application/sbml+xml": ["sbml"],
|
|
36355
|
+
"application/scvp-cv-request": ["scq"],
|
|
36356
|
+
"application/scvp-cv-response": ["scs"],
|
|
36357
|
+
"application/scvp-vp-request": ["spq"],
|
|
36358
|
+
"application/scvp-vp-response": ["spp"],
|
|
36359
|
+
"application/sdp": ["sdp"],
|
|
36360
|
+
"application/senml+xml": ["senmlx"],
|
|
36361
|
+
"application/sensml+xml": ["sensmlx"],
|
|
36362
|
+
"application/set-payment-initiation": ["setpay"],
|
|
36363
|
+
"application/set-registration-initiation": ["setreg"],
|
|
36364
|
+
"application/shf+xml": ["shf"],
|
|
36365
|
+
"application/sieve": ["siv", "sieve"],
|
|
36366
|
+
"application/smil+xml": ["smi", "smil"],
|
|
36367
|
+
"application/sparql-query": ["rq"],
|
|
36368
|
+
"application/sparql-results+xml": ["srx"],
|
|
36369
|
+
"application/sql": ["sql"],
|
|
36370
|
+
"application/srgs": ["gram"],
|
|
36371
|
+
"application/srgs+xml": ["grxml"],
|
|
36372
|
+
"application/sru+xml": ["sru"],
|
|
36373
|
+
"application/ssdl+xml": ["ssdl"],
|
|
36374
|
+
"application/ssml+xml": ["ssml"],
|
|
36375
|
+
"application/swid+xml": ["swidtag"],
|
|
36376
|
+
"application/tei+xml": ["tei", "teicorpus"],
|
|
36377
|
+
"application/thraud+xml": ["tfi"],
|
|
36378
|
+
"application/timestamped-data": ["tsd"],
|
|
36379
|
+
"application/toml": ["toml"],
|
|
36380
|
+
"application/trig": ["trig"],
|
|
36381
|
+
"application/ttml+xml": ["ttml"],
|
|
36382
|
+
"application/ubjson": ["ubj"],
|
|
36383
|
+
"application/urc-ressheet+xml": ["rsheet"],
|
|
36384
|
+
"application/urc-targetdesc+xml": ["td"],
|
|
36385
|
+
"application/voicexml+xml": ["vxml"],
|
|
36386
|
+
"application/wasm": ["wasm"],
|
|
36387
|
+
"application/watcherinfo+xml": ["wif"],
|
|
36388
|
+
"application/widget": ["wgt"],
|
|
36389
|
+
"application/winhlp": ["hlp"],
|
|
36390
|
+
"application/wsdl+xml": ["wsdl"],
|
|
36391
|
+
"application/wspolicy+xml": ["wspolicy"],
|
|
36392
|
+
"application/xaml+xml": ["xaml"],
|
|
36393
|
+
"application/xcap-att+xml": ["xav"],
|
|
36394
|
+
"application/xcap-caps+xml": ["xca"],
|
|
36395
|
+
"application/xcap-diff+xml": ["xdf"],
|
|
36396
|
+
"application/xcap-el+xml": ["xel"],
|
|
36397
|
+
"application/xcap-ns+xml": ["xns"],
|
|
36398
|
+
"application/xenc+xml": ["xenc"],
|
|
36399
|
+
"application/xfdf": ["xfdf"],
|
|
36400
|
+
"application/xhtml+xml": ["xhtml", "xht"],
|
|
36401
|
+
"application/xliff+xml": ["xlf"],
|
|
36402
|
+
"application/xml": ["xml", "xsl", "xsd", "rng"],
|
|
36403
|
+
"application/xml-dtd": ["dtd"],
|
|
36404
|
+
"application/xop+xml": ["xop"],
|
|
36405
|
+
"application/xproc+xml": ["xpl"],
|
|
36406
|
+
"application/xslt+xml": ["*xsl", "xslt"],
|
|
36407
|
+
"application/xspf+xml": ["xspf"],
|
|
36408
|
+
"application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"],
|
|
36409
|
+
"application/yang": ["yang"],
|
|
36410
|
+
"application/yin+xml": ["yin"],
|
|
36411
|
+
"application/zip": ["zip"],
|
|
36412
|
+
"application/zip+dotlottie": ["lottie"],
|
|
36413
|
+
"audio/3gpp": ["*3gpp"],
|
|
36414
|
+
"audio/aac": ["adts", "aac"],
|
|
36415
|
+
"audio/adpcm": ["adp"],
|
|
36416
|
+
"audio/amr": ["amr"],
|
|
36417
|
+
"audio/basic": ["au", "snd"],
|
|
36418
|
+
"audio/midi": ["mid", "midi", "kar", "rmi"],
|
|
36419
|
+
"audio/mobile-xmf": ["mxmf"],
|
|
36420
|
+
"audio/mp3": ["*mp3"],
|
|
36421
|
+
"audio/mp4": ["m4a", "mp4a", "m4b"],
|
|
36422
|
+
"audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"],
|
|
36423
|
+
"audio/ogg": ["oga", "ogg", "spx", "opus"],
|
|
36424
|
+
"audio/s3m": ["s3m"],
|
|
36425
|
+
"audio/silk": ["sil"],
|
|
36426
|
+
"audio/wav": ["wav"],
|
|
36427
|
+
"audio/wave": ["*wav"],
|
|
36428
|
+
"audio/webm": ["weba"],
|
|
36429
|
+
"audio/xm": ["xm"],
|
|
36430
|
+
"font/collection": ["ttc"],
|
|
36431
|
+
"font/otf": ["otf"],
|
|
36432
|
+
"font/ttf": ["ttf"],
|
|
36433
|
+
"font/woff": ["woff"],
|
|
36434
|
+
"font/woff2": ["woff2"],
|
|
36435
|
+
"image/aces": ["exr"],
|
|
36436
|
+
"image/apng": ["apng"],
|
|
36437
|
+
"image/avci": ["avci"],
|
|
36438
|
+
"image/avcs": ["avcs"],
|
|
36439
|
+
"image/avif": ["avif"],
|
|
36440
|
+
"image/bmp": ["bmp", "dib"],
|
|
36441
|
+
"image/cgm": ["cgm"],
|
|
36442
|
+
"image/dicom-rle": ["drle"],
|
|
36443
|
+
"image/dpx": ["dpx"],
|
|
36444
|
+
"image/emf": ["emf"],
|
|
36445
|
+
"image/fits": ["fits"],
|
|
36446
|
+
"image/g3fax": ["g3"],
|
|
36447
|
+
"image/gif": ["gif"],
|
|
36448
|
+
"image/heic": ["heic"],
|
|
36449
|
+
"image/heic-sequence": ["heics"],
|
|
36450
|
+
"image/heif": ["heif"],
|
|
36451
|
+
"image/heif-sequence": ["heifs"],
|
|
36452
|
+
"image/hej2k": ["hej2"],
|
|
36453
|
+
"image/ief": ["ief"],
|
|
36454
|
+
"image/jaii": ["jaii"],
|
|
36455
|
+
"image/jais": ["jais"],
|
|
36456
|
+
"image/jls": ["jls"],
|
|
36457
|
+
"image/jp2": ["jp2", "jpg2"],
|
|
36458
|
+
"image/jpeg": ["jpg", "jpeg", "jpe"],
|
|
36459
|
+
"image/jph": ["jph"],
|
|
36460
|
+
"image/jphc": ["jhc"],
|
|
36461
|
+
"image/jpm": ["jpm", "jpgm"],
|
|
36462
|
+
"image/jpx": ["jpx", "jpf"],
|
|
36463
|
+
"image/jxl": ["jxl"],
|
|
36464
|
+
"image/jxr": ["jxr"],
|
|
36465
|
+
"image/jxra": ["jxra"],
|
|
36466
|
+
"image/jxrs": ["jxrs"],
|
|
36467
|
+
"image/jxs": ["jxs"],
|
|
36468
|
+
"image/jxsc": ["jxsc"],
|
|
36469
|
+
"image/jxsi": ["jxsi"],
|
|
36470
|
+
"image/jxss": ["jxss"],
|
|
36471
|
+
"image/ktx": ["ktx"],
|
|
36472
|
+
"image/ktx2": ["ktx2"],
|
|
36473
|
+
"image/pjpeg": ["jfif"],
|
|
36474
|
+
"image/png": ["png"],
|
|
36475
|
+
"image/sgi": ["sgi"],
|
|
36476
|
+
"image/svg+xml": ["svg", "svgz"],
|
|
36477
|
+
"image/t38": ["t38"],
|
|
36478
|
+
"image/tiff": ["tif", "tiff"],
|
|
36479
|
+
"image/tiff-fx": ["tfx"],
|
|
36480
|
+
"image/webp": ["webp"],
|
|
36481
|
+
"image/wmf": ["wmf"],
|
|
36482
|
+
"message/disposition-notification": ["disposition-notification"],
|
|
36483
|
+
"message/global": ["u8msg"],
|
|
36484
|
+
"message/global-delivery-status": ["u8dsn"],
|
|
36485
|
+
"message/global-disposition-notification": ["u8mdn"],
|
|
36486
|
+
"message/global-headers": ["u8hdr"],
|
|
36487
|
+
"message/rfc822": ["eml", "mime", "mht", "mhtml"],
|
|
36488
|
+
"model/3mf": ["3mf"],
|
|
36489
|
+
"model/gltf+json": ["gltf"],
|
|
36490
|
+
"model/gltf-binary": ["glb"],
|
|
36491
|
+
"model/iges": ["igs", "iges"],
|
|
36492
|
+
"model/jt": ["jt"],
|
|
36493
|
+
"model/mesh": ["msh", "mesh", "silo"],
|
|
36494
|
+
"model/mtl": ["mtl"],
|
|
36495
|
+
"model/obj": ["obj"],
|
|
36496
|
+
"model/prc": ["prc"],
|
|
36497
|
+
"model/step": ["step", "stp", "stpnc", "p21", "210"],
|
|
36498
|
+
"model/step+xml": ["stpx"],
|
|
36499
|
+
"model/step+zip": ["stpz"],
|
|
36500
|
+
"model/step-xml+zip": ["stpxz"],
|
|
36501
|
+
"model/stl": ["stl"],
|
|
36502
|
+
"model/u3d": ["u3d"],
|
|
36503
|
+
"model/vrml": ["wrl", "vrml"],
|
|
36504
|
+
"model/x3d+binary": ["*x3db", "x3dbz"],
|
|
36505
|
+
"model/x3d+fastinfoset": ["x3db"],
|
|
36506
|
+
"model/x3d+vrml": ["*x3dv", "x3dvz"],
|
|
36507
|
+
"model/x3d+xml": ["x3d", "x3dz"],
|
|
36508
|
+
"model/x3d-vrml": ["x3dv"],
|
|
36509
|
+
"text/cache-manifest": ["appcache", "manifest"],
|
|
36510
|
+
"text/calendar": ["ics", "ifb"],
|
|
36511
|
+
"text/coffeescript": ["coffee", "litcoffee"],
|
|
36512
|
+
"text/css": ["css"],
|
|
36513
|
+
"text/csv": ["csv"],
|
|
36514
|
+
"text/html": ["html", "htm", "shtml"],
|
|
36515
|
+
"text/jade": ["jade"],
|
|
36516
|
+
"text/javascript": ["js", "mjs"],
|
|
36517
|
+
"text/jsx": ["jsx"],
|
|
36518
|
+
"text/less": ["less"],
|
|
36519
|
+
"text/markdown": ["md", "markdown"],
|
|
36520
|
+
"text/mathml": ["mml"],
|
|
36521
|
+
"text/mdx": ["mdx"],
|
|
36522
|
+
"text/n3": ["n3"],
|
|
36523
|
+
"text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"],
|
|
36524
|
+
"text/richtext": ["rtx"],
|
|
36525
|
+
"text/rtf": ["*rtf"],
|
|
36526
|
+
"text/sgml": ["sgml", "sgm"],
|
|
36527
|
+
"text/shex": ["shex"],
|
|
36528
|
+
"text/slim": ["slim", "slm"],
|
|
36529
|
+
"text/spdx": ["spdx"],
|
|
36530
|
+
"text/stylus": ["stylus", "styl"],
|
|
36531
|
+
"text/tab-separated-values": ["tsv"],
|
|
36532
|
+
"text/troff": ["t", "tr", "roff", "man", "me", "ms"],
|
|
36533
|
+
"text/turtle": ["ttl"],
|
|
36534
|
+
"text/uri-list": ["uri", "uris", "urls"],
|
|
36535
|
+
"text/vcard": ["vcard"],
|
|
36536
|
+
"text/vtt": ["vtt"],
|
|
36537
|
+
"text/wgsl": ["wgsl"],
|
|
36538
|
+
"text/xml": ["*xml"],
|
|
36539
|
+
"text/yaml": ["yaml", "yml"],
|
|
36540
|
+
"video/3gpp": ["3gp", "3gpp"],
|
|
36541
|
+
"video/3gpp2": ["3g2"],
|
|
36542
|
+
"video/h261": ["h261"],
|
|
36543
|
+
"video/h263": ["h263"],
|
|
36544
|
+
"video/h264": ["h264"],
|
|
36545
|
+
"video/iso.segment": ["m4s"],
|
|
36546
|
+
"video/jpeg": ["jpgv"],
|
|
36547
|
+
"video/jpm": ["*jpm", "*jpgm"],
|
|
36548
|
+
"video/mj2": ["mj2", "mjp2"],
|
|
36549
|
+
"video/mp2t": ["ts", "m2t", "m2ts", "mts"],
|
|
36550
|
+
"video/mp4": ["mp4", "mp4v", "mpg4"],
|
|
36551
|
+
"video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"],
|
|
36552
|
+
"video/ogg": ["ogv"],
|
|
36553
|
+
"video/quicktime": ["qt", "mov"],
|
|
36554
|
+
"video/webm": ["webm"]
|
|
36555
|
+
};
|
|
36556
|
+
Object.freeze(types);
|
|
36557
|
+
var standard_default = types;
|
|
36558
|
+
|
|
36559
|
+
// ../node_modules/mime/dist/src/Mime.js
|
|
36560
|
+
var __classPrivateFieldGet = function(receiver2, state2, kind2, f) {
|
|
36561
|
+
if (kind2 === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
36562
|
+
if (typeof state2 === "function" ? receiver2 !== state2 || !f : !state2.has(receiver2)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
36563
|
+
return kind2 === "m" ? f : kind2 === "a" ? f.call(receiver2) : f ? f.value : state2.get(receiver2);
|
|
36564
|
+
};
|
|
36565
|
+
var _Mime_extensionToType;
|
|
36566
|
+
var _Mime_typeToExtension;
|
|
36567
|
+
var _Mime_typeToExtensions;
|
|
36568
|
+
var Mime = class {
|
|
36569
|
+
constructor(...args) {
|
|
36570
|
+
_Mime_extensionToType.set(this, /* @__PURE__ */ new Map());
|
|
36571
|
+
_Mime_typeToExtension.set(this, /* @__PURE__ */ new Map());
|
|
36572
|
+
_Mime_typeToExtensions.set(this, /* @__PURE__ */ new Map());
|
|
36573
|
+
for (const arg2 of args) {
|
|
36574
|
+
this.define(arg2);
|
|
36575
|
+
}
|
|
36576
|
+
}
|
|
36577
|
+
define(typeMap, force = false) {
|
|
36578
|
+
for (let [type5, extensions] of Object.entries(typeMap)) {
|
|
36579
|
+
type5 = type5.toLowerCase();
|
|
36580
|
+
extensions = extensions.map((ext) => ext.toLowerCase());
|
|
36581
|
+
if (!__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").has(type5)) {
|
|
36582
|
+
__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").set(type5, /* @__PURE__ */ new Set());
|
|
36583
|
+
}
|
|
36584
|
+
const allExtensions = __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type5);
|
|
36585
|
+
let first4 = true;
|
|
36586
|
+
for (let extension3 of extensions) {
|
|
36587
|
+
const starred = extension3.startsWith("*");
|
|
36588
|
+
extension3 = starred ? extension3.slice(1) : extension3;
|
|
36589
|
+
allExtensions?.add(extension3);
|
|
36590
|
+
if (first4) {
|
|
36591
|
+
__classPrivateFieldGet(this, _Mime_typeToExtension, "f").set(type5, extension3);
|
|
36592
|
+
}
|
|
36593
|
+
first4 = false;
|
|
36594
|
+
if (starred)
|
|
36595
|
+
continue;
|
|
36596
|
+
const currentType = __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(extension3);
|
|
36597
|
+
if (currentType && currentType != type5 && !force) {
|
|
36598
|
+
throw new Error(`"${type5} -> ${extension3}" conflicts with "${currentType} -> ${extension3}". Pass \`force=true\` to override this definition.`);
|
|
36599
|
+
}
|
|
36600
|
+
__classPrivateFieldGet(this, _Mime_extensionToType, "f").set(extension3, type5);
|
|
36601
|
+
}
|
|
36602
|
+
}
|
|
36603
|
+
return this;
|
|
36604
|
+
}
|
|
36605
|
+
getType(path3) {
|
|
36606
|
+
if (typeof path3 !== "string")
|
|
36607
|
+
return null;
|
|
36608
|
+
const last3 = path3.replace(/^.*[/\\]/s, "").toLowerCase();
|
|
36609
|
+
const ext = last3.replace(/^.*\./s, "").toLowerCase();
|
|
36610
|
+
const hasPath = last3.length < path3.length;
|
|
36611
|
+
const hasDot = ext.length < last3.length - 1;
|
|
36612
|
+
if (!hasDot && hasPath)
|
|
36613
|
+
return null;
|
|
36614
|
+
return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
|
|
36615
|
+
}
|
|
36616
|
+
getExtension(type5) {
|
|
36617
|
+
if (typeof type5 !== "string")
|
|
36618
|
+
return null;
|
|
36619
|
+
type5 = type5?.split?.(";")[0];
|
|
36620
|
+
return (type5 && __classPrivateFieldGet(this, _Mime_typeToExtension, "f").get(type5.trim().toLowerCase())) ?? null;
|
|
36621
|
+
}
|
|
36622
|
+
getAllExtensions(type5) {
|
|
36623
|
+
if (typeof type5 !== "string")
|
|
36624
|
+
return null;
|
|
36625
|
+
return __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type5.toLowerCase()) ?? null;
|
|
36626
|
+
}
|
|
36627
|
+
_freeze() {
|
|
36628
|
+
this.define = () => {
|
|
36629
|
+
throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances");
|
|
36630
|
+
};
|
|
36631
|
+
Object.freeze(this);
|
|
36632
|
+
for (const extensions of __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").values()) {
|
|
36633
|
+
Object.freeze(extensions);
|
|
36634
|
+
}
|
|
36635
|
+
return this;
|
|
36636
|
+
}
|
|
36637
|
+
_getTestState() {
|
|
36638
|
+
return {
|
|
36639
|
+
types: __classPrivateFieldGet(this, _Mime_extensionToType, "f"),
|
|
36640
|
+
extensions: __classPrivateFieldGet(this, _Mime_typeToExtension, "f")
|
|
36641
|
+
};
|
|
36642
|
+
}
|
|
36643
|
+
};
|
|
36644
|
+
_Mime_extensionToType = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtension = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtensions = /* @__PURE__ */ new WeakMap();
|
|
36645
|
+
var Mime_default = Mime;
|
|
36646
|
+
|
|
36647
|
+
// ../node_modules/mime/dist/src/index_lite.js
|
|
36648
|
+
var index_lite_default = new Mime_default(standard_default)._freeze();
|
|
36649
|
+
|
|
35696
36650
|
// src/files/FileFetcher.ts
|
|
35697
36651
|
var FileFetcher = class {
|
|
35698
36652
|
constructor(session4) {
|
|
@@ -35730,6 +36684,42 @@ _:patch
|
|
|
35730
36684
|
body: newContent
|
|
35731
36685
|
});
|
|
35732
36686
|
}
|
|
36687
|
+
createNewFile(container2, name9) {
|
|
36688
|
+
const encodedName = encodeURIComponent(name9);
|
|
36689
|
+
const url7 = container2.uri + encodedName;
|
|
36690
|
+
const contentTypeHeader = index_lite_default.getType(encodedName) ?? "text/turtle";
|
|
36691
|
+
return ResultAsync.fromPromise(
|
|
36692
|
+
this.session.authenticatedFetch(url7, {
|
|
36693
|
+
method: "PUT",
|
|
36694
|
+
headers: {
|
|
36695
|
+
"Content-Type": contentTypeHeader,
|
|
36696
|
+
"If-None-Match": "*"
|
|
36697
|
+
}
|
|
36698
|
+
}),
|
|
36699
|
+
(e) => networkProblem("The file could not be created", e)
|
|
36700
|
+
).andThen(
|
|
36701
|
+
(response6) => response6.ok ? ok({
|
|
36702
|
+
url: url7,
|
|
36703
|
+
name: name9,
|
|
36704
|
+
contentType: contentTypeHeader
|
|
36705
|
+
}) : err(httpProblem("The file could not be created", response6))
|
|
36706
|
+
);
|
|
36707
|
+
}
|
|
36708
|
+
createNewFolder(container2, name9) {
|
|
36709
|
+
const encodedName = encodeURIComponent(name9);
|
|
36710
|
+
const url7 = container2.uri + encodedName + "/";
|
|
36711
|
+
return ResultAsync.fromPromise(
|
|
36712
|
+
this.session.authenticatedFetch(url7, {
|
|
36713
|
+
method: "PUT"
|
|
36714
|
+
}),
|
|
36715
|
+
(e) => networkProblem("The folder could not be created", e)
|
|
36716
|
+
).andThen(
|
|
36717
|
+
(response6) => response6.ok ? ok({
|
|
36718
|
+
url: url7,
|
|
36719
|
+
name: name9
|
|
36720
|
+
}) : err(httpProblem("The folder could not be created", response6))
|
|
36721
|
+
);
|
|
36722
|
+
}
|
|
35733
36723
|
};
|
|
35734
36724
|
|
|
35735
36725
|
// src/modules/contacts.ts
|
|
@@ -35785,7 +36775,8 @@ _:patch
|
|
|
35785
36775
|
if (isTooGeneric(url7.hash)) {
|
|
35786
36776
|
return (getFilename(url7) || url7.host + url7.pathname) + url7.hash;
|
|
35787
36777
|
}
|
|
35788
|
-
|
|
36778
|
+
const name9 = labelFromFragment(url7.hash) || getFilename(url7) || url7.host;
|
|
36779
|
+
return name9.endsWith("/") ? name9.slice(0, -1) : name9;
|
|
35789
36780
|
}
|
|
35790
36781
|
function labelFromFragment(fragment) {
|
|
35791
36782
|
return fragment ? fragment.split("#")[1] : null;
|
|
@@ -35797,9 +36788,10 @@ _:patch
|
|
|
35797
36788
|
function getFilename(url7) {
|
|
35798
36789
|
if (url7.pathname.endsWith("/")) {
|
|
35799
36790
|
const containerName = url7.pathname.split("/").at(-2);
|
|
35800
|
-
return containerName ? containerName + "/" : null;
|
|
36791
|
+
return containerName ? decodeURIComponent(containerName) + "/" : null;
|
|
35801
36792
|
} else {
|
|
35802
|
-
|
|
36793
|
+
const name9 = url7.pathname.split("/").pop();
|
|
36794
|
+
return name9 ? decodeURIComponent(name9) : null;
|
|
35803
36795
|
}
|
|
35804
36796
|
}
|
|
35805
36797
|
|
|
@@ -57793,10 +58785,7 @@ _:patch
|
|
|
57793
58785
|
);
|
|
57794
58786
|
return contains3.map((content5) => ({
|
|
57795
58787
|
uri: content5.object.value,
|
|
57796
|
-
name: content5.object.value
|
|
57797
|
-
new RegExp(`${this.uri}([^/]*)/?`),
|
|
57798
|
-
"$1"
|
|
57799
|
-
)
|
|
58788
|
+
name: labelFromUri(content5.object.value)
|
|
57800
58789
|
}));
|
|
57801
58790
|
}
|
|
57802
58791
|
};
|