@loaders.gl/scene 5.0.0-beta.7 → 5.0.0-beta.8
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/dist.dev.js +989 -211
- package/dist/dist.min.js +18 -18
- package/dist/draco/lib/draco-parser.cjs +8 -5
- package/dist/draco/lib/draco-parser.cjs.map +2 -2
- package/dist/draco/lib/draco-parser.d.ts +2 -1
- package/dist/draco/lib/draco-parser.d.ts.map +1 -1
- package/dist/draco/lib/draco-parser.js +6 -3
- package/dist/draco/lib/draco-parser.js.map +1 -1
- package/dist/draco/lib/parse-draco.cjs +2 -1
- package/dist/draco/lib/parse-draco.cjs.map +2 -2
- package/dist/draco/lib/parse-draco.d.ts.map +1 -1
- package/dist/draco/lib/parse-draco.js +2 -1
- package/dist/draco/lib/parse-draco.js.map +1 -1
- package/dist/draco/lib/utils/version.cjs +1 -1
- package/dist/draco/lib/utils/version.js +1 -1
- package/dist/draco-worker-node.js +933 -152
- package/dist/draco-worker-node.js.map +4 -4
- package/dist/draco-worker.js +830 -56
- package/dist/draco-worker.js.map +4 -4
- package/dist/draco-writer-worker-node.cjs +773 -186
- package/dist/draco-writer-worker-node.cjs.map +4 -4
- package/dist/draco-writer-worker.js +630 -46
- package/dist/draco-writer-worker.js.map +4 -4
- package/dist/gltf/lib/parsers/parse-gltf.cjs +8 -7
- package/dist/gltf/lib/parsers/parse-gltf.cjs.map +3 -3
- package/dist/gltf/lib/parsers/parse-gltf.d.ts.map +1 -1
- package/dist/gltf/lib/parsers/parse-gltf.js +3 -1
- package/dist/gltf/lib/parsers/parse-gltf.js.map +1 -1
- package/dist/gltf/lib/utils/version.cjs +1 -1
- package/dist/gltf/lib/utils/version.js +1 -1
- package/dist/mtl-loader-types.cjs +1 -1
- package/dist/obj/mtl-loader-types.cjs +1 -1
- package/dist/obj/mtl-loader-types.js +1 -1
- package/dist/obj/obj-loader-types.cjs +1 -1
- package/dist/obj/obj-loader-types.js +1 -1
- package/dist/obj/obj-writer.cjs +1 -1
- package/dist/obj/obj-writer.js +1 -1
- package/dist/obj-loader-types.cjs +1 -1
- package/dist/obj-worker.js +37 -1
- package/dist/obj-writer.cjs +1 -1
- package/dist/stl-loader-types.cjs +1 -1
- package/dist/stl-loader-types.js +1 -1
- package/dist/usd/usd-loader-types.cjs +1 -1
- package/dist/usd/usd-loader-types.js +1 -1
- package/dist/usd-loader-types.cjs +1 -1
- package/package.json +6 -6
- package/src/draco/lib/draco-parser.ts +6 -3
- package/src/draco/lib/parse-draco.ts +2 -1
- package/src/gltf/lib/parsers/parse-gltf.ts +2 -1
|
@@ -421,33 +421,33 @@ var require_detect_libc = __commonJS({
|
|
|
421
421
|
}
|
|
422
422
|
return null;
|
|
423
423
|
};
|
|
424
|
-
var
|
|
425
|
-
let
|
|
424
|
+
var version3 = async () => {
|
|
425
|
+
let version4 = null;
|
|
426
426
|
if (isLinux()) {
|
|
427
|
-
|
|
428
|
-
if (!
|
|
429
|
-
|
|
427
|
+
version4 = await versionFromFilesystem();
|
|
428
|
+
if (!version4) {
|
|
429
|
+
version4 = versionFromReport();
|
|
430
430
|
}
|
|
431
|
-
if (!
|
|
431
|
+
if (!version4) {
|
|
432
432
|
const out = await safeCommand();
|
|
433
|
-
|
|
433
|
+
version4 = versionFromCommand(out);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
return
|
|
436
|
+
return version4;
|
|
437
437
|
};
|
|
438
438
|
var versionSync2 = () => {
|
|
439
|
-
let
|
|
439
|
+
let version4 = null;
|
|
440
440
|
if (isLinux()) {
|
|
441
|
-
|
|
442
|
-
if (!
|
|
443
|
-
|
|
441
|
+
version4 = versionFromFilesystemSync();
|
|
442
|
+
if (!version4) {
|
|
443
|
+
version4 = versionFromReport();
|
|
444
444
|
}
|
|
445
|
-
if (!
|
|
445
|
+
if (!version4) {
|
|
446
446
|
const out = safeCommandSync();
|
|
447
|
-
|
|
447
|
+
version4 = versionFromCommand(out);
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
return
|
|
450
|
+
return version4;
|
|
451
451
|
};
|
|
452
452
|
module2.exports = {
|
|
453
453
|
GLIBC,
|
|
@@ -456,7 +456,7 @@ var require_detect_libc = __commonJS({
|
|
|
456
456
|
familySync: familySync2,
|
|
457
457
|
isNonGlibcLinux,
|
|
458
458
|
isNonGlibcLinuxSync,
|
|
459
|
-
version:
|
|
459
|
+
version: version3,
|
|
460
460
|
versionSync: versionSync2
|
|
461
461
|
};
|
|
462
462
|
}
|
|
@@ -658,31 +658,31 @@ var require_semver = __commonJS({
|
|
|
658
658
|
return true;
|
|
659
659
|
};
|
|
660
660
|
var SemVer = class _SemVer {
|
|
661
|
-
constructor(
|
|
661
|
+
constructor(version3, options) {
|
|
662
662
|
options = parseOptions(options);
|
|
663
|
-
if (
|
|
664
|
-
if (
|
|
665
|
-
return
|
|
663
|
+
if (version3 instanceof _SemVer) {
|
|
664
|
+
if (version3.loose === !!options.loose && version3.includePrerelease === !!options.includePrerelease) {
|
|
665
|
+
return version3;
|
|
666
666
|
} else {
|
|
667
|
-
|
|
667
|
+
version3 = version3.version;
|
|
668
668
|
}
|
|
669
|
-
} else if (typeof
|
|
670
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof
|
|
669
|
+
} else if (typeof version3 !== "string") {
|
|
670
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version3}".`);
|
|
671
671
|
}
|
|
672
|
-
if (
|
|
672
|
+
if (version3.length > MAX_LENGTH) {
|
|
673
673
|
throw new TypeError(
|
|
674
674
|
`version is longer than ${MAX_LENGTH} characters`
|
|
675
675
|
);
|
|
676
676
|
}
|
|
677
|
-
debug("SemVer",
|
|
677
|
+
debug("SemVer", version3, options);
|
|
678
678
|
this.options = options;
|
|
679
679
|
this.loose = !!options.loose;
|
|
680
680
|
this.includePrerelease = !!options.includePrerelease;
|
|
681
|
-
const m =
|
|
681
|
+
const m = version3.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
682
682
|
if (!m) {
|
|
683
|
-
throw new TypeError(`Invalid Version: ${
|
|
683
|
+
throw new TypeError(`Invalid Version: ${version3}`);
|
|
684
684
|
}
|
|
685
|
-
this.raw =
|
|
685
|
+
this.raw = version3;
|
|
686
686
|
this.major = +m[1];
|
|
687
687
|
this.minor = +m[2];
|
|
688
688
|
this.patch = +m[3];
|
|
@@ -933,12 +933,12 @@ var require_parse = __commonJS({
|
|
|
933
933
|
"../../node_modules/semver/functions/parse.js"(exports2, module2) {
|
|
934
934
|
"use strict";
|
|
935
935
|
var SemVer = require_semver();
|
|
936
|
-
var parse = (
|
|
937
|
-
if (
|
|
938
|
-
return
|
|
936
|
+
var parse = (version3, options, throwErrors = false) => {
|
|
937
|
+
if (version3 instanceof SemVer) {
|
|
938
|
+
return version3;
|
|
939
939
|
}
|
|
940
940
|
try {
|
|
941
|
-
return new SemVer(
|
|
941
|
+
return new SemVer(version3, options);
|
|
942
942
|
} catch (er) {
|
|
943
943
|
if (!throwErrors) {
|
|
944
944
|
return null;
|
|
@@ -955,8 +955,8 @@ var require_valid = __commonJS({
|
|
|
955
955
|
"../../node_modules/semver/functions/valid.js"(exports2, module2) {
|
|
956
956
|
"use strict";
|
|
957
957
|
var parse = require_parse();
|
|
958
|
-
var valid = (
|
|
959
|
-
const v = parse(
|
|
958
|
+
var valid = (version3, options) => {
|
|
959
|
+
const v = parse(version3, options);
|
|
960
960
|
return v ? v.version : null;
|
|
961
961
|
};
|
|
962
962
|
module2.exports = valid;
|
|
@@ -968,8 +968,8 @@ var require_clean = __commonJS({
|
|
|
968
968
|
"../../node_modules/semver/functions/clean.js"(exports2, module2) {
|
|
969
969
|
"use strict";
|
|
970
970
|
var parse = require_parse();
|
|
971
|
-
var clean = (
|
|
972
|
-
const s = parse(
|
|
971
|
+
var clean = (version3, options) => {
|
|
972
|
+
const s = parse(version3.trim().replace(/^[=v]+/, ""), options);
|
|
973
973
|
return s ? s.version : null;
|
|
974
974
|
};
|
|
975
975
|
module2.exports = clean;
|
|
@@ -981,7 +981,7 @@ var require_inc = __commonJS({
|
|
|
981
981
|
"../../node_modules/semver/functions/inc.js"(exports2, module2) {
|
|
982
982
|
"use strict";
|
|
983
983
|
var SemVer = require_semver();
|
|
984
|
-
var inc = (
|
|
984
|
+
var inc = (version3, release, options, identifier, identifierBase) => {
|
|
985
985
|
if (typeof options === "string") {
|
|
986
986
|
identifierBase = identifier;
|
|
987
987
|
identifier = options;
|
|
@@ -989,7 +989,7 @@ var require_inc = __commonJS({
|
|
|
989
989
|
}
|
|
990
990
|
try {
|
|
991
991
|
return new SemVer(
|
|
992
|
-
|
|
992
|
+
version3 instanceof SemVer ? version3.version : version3,
|
|
993
993
|
options
|
|
994
994
|
).inc(release, identifier, identifierBase).version;
|
|
995
995
|
} catch (er) {
|
|
@@ -1005,9 +1005,9 @@ var require_diff = __commonJS({
|
|
|
1005
1005
|
"../../node_modules/semver/functions/diff.js"(exports2, module2) {
|
|
1006
1006
|
"use strict";
|
|
1007
1007
|
var parse = require_parse();
|
|
1008
|
-
var diff = (version1,
|
|
1008
|
+
var diff = (version1, version22) => {
|
|
1009
1009
|
const v1 = parse(version1, null, true);
|
|
1010
|
-
const v2 = parse(
|
|
1010
|
+
const v2 = parse(version22, null, true);
|
|
1011
1011
|
const comparison = v1.compare(v2);
|
|
1012
1012
|
if (comparison === 0) {
|
|
1013
1013
|
return null;
|
|
@@ -1079,8 +1079,8 @@ var require_prerelease = __commonJS({
|
|
|
1079
1079
|
"../../node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
|
1080
1080
|
"use strict";
|
|
1081
1081
|
var parse = require_parse();
|
|
1082
|
-
var prerelease = (
|
|
1083
|
-
const parsed = parse(
|
|
1082
|
+
var prerelease = (version3, options) => {
|
|
1083
|
+
const parsed = parse(version3, options);
|
|
1084
1084
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
1085
1085
|
};
|
|
1086
1086
|
module2.exports = prerelease;
|
|
@@ -1268,24 +1268,24 @@ var require_coerce = __commonJS({
|
|
|
1268
1268
|
var SemVer = require_semver();
|
|
1269
1269
|
var parse = require_parse();
|
|
1270
1270
|
var { safeRe: re, t } = require_re();
|
|
1271
|
-
var coerce = (
|
|
1272
|
-
if (
|
|
1273
|
-
return
|
|
1271
|
+
var coerce = (version3, options) => {
|
|
1272
|
+
if (version3 instanceof SemVer) {
|
|
1273
|
+
return version3;
|
|
1274
1274
|
}
|
|
1275
|
-
if (typeof
|
|
1276
|
-
|
|
1275
|
+
if (typeof version3 === "number") {
|
|
1276
|
+
version3 = String(version3);
|
|
1277
1277
|
}
|
|
1278
|
-
if (typeof
|
|
1278
|
+
if (typeof version3 !== "string") {
|
|
1279
1279
|
return null;
|
|
1280
1280
|
}
|
|
1281
1281
|
options = options || {};
|
|
1282
1282
|
let match = null;
|
|
1283
1283
|
if (!options.rtl) {
|
|
1284
|
-
match =
|
|
1284
|
+
match = version3.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
1285
1285
|
} else {
|
|
1286
1286
|
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
1287
1287
|
let next;
|
|
1288
|
-
while ((next = coerceRtlRegex.exec(
|
|
1288
|
+
while ((next = coerceRtlRegex.exec(version3)) && (!match || match.index + match[0].length !== version3.length)) {
|
|
1289
1289
|
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
1290
1290
|
match = next;
|
|
1291
1291
|
}
|
|
@@ -1314,32 +1314,32 @@ var require_truncate = __commonJS({
|
|
|
1314
1314
|
var parse = require_parse();
|
|
1315
1315
|
var constants = require_constants();
|
|
1316
1316
|
var SemVer = require_semver();
|
|
1317
|
-
var truncate = (
|
|
1317
|
+
var truncate = (version3, truncation, options) => {
|
|
1318
1318
|
if (!constants.RELEASE_TYPES.includes(truncation)) {
|
|
1319
1319
|
return null;
|
|
1320
1320
|
}
|
|
1321
|
-
const clonedVersion = cloneInputVersion(
|
|
1321
|
+
const clonedVersion = cloneInputVersion(version3, options);
|
|
1322
1322
|
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
1323
1323
|
};
|
|
1324
|
-
var cloneInputVersion = (
|
|
1325
|
-
const versionStringToParse =
|
|
1324
|
+
var cloneInputVersion = (version3, options) => {
|
|
1325
|
+
const versionStringToParse = version3 instanceof SemVer ? version3.version : version3;
|
|
1326
1326
|
return parse(versionStringToParse, options);
|
|
1327
1327
|
};
|
|
1328
|
-
var doTruncation = (
|
|
1328
|
+
var doTruncation = (version3, truncation) => {
|
|
1329
1329
|
if (isPrerelease(truncation)) {
|
|
1330
|
-
return
|
|
1330
|
+
return version3.version;
|
|
1331
1331
|
}
|
|
1332
|
-
|
|
1332
|
+
version3.prerelease = [];
|
|
1333
1333
|
switch (truncation) {
|
|
1334
1334
|
case "major":
|
|
1335
|
-
|
|
1336
|
-
|
|
1335
|
+
version3.minor = 0;
|
|
1336
|
+
version3.patch = 0;
|
|
1337
1337
|
break;
|
|
1338
1338
|
case "minor":
|
|
1339
|
-
|
|
1339
|
+
version3.patch = 0;
|
|
1340
1340
|
break;
|
|
1341
1341
|
}
|
|
1342
|
-
return
|
|
1342
|
+
return version3.format();
|
|
1343
1343
|
};
|
|
1344
1344
|
var isPrerelease = (type) => {
|
|
1345
1345
|
return type.startsWith("pre");
|
|
@@ -1511,19 +1511,19 @@ var require_range = __commonJS({
|
|
|
1511
1511
|
});
|
|
1512
1512
|
}
|
|
1513
1513
|
// if ANY of the sets match ALL of its comparators, then pass
|
|
1514
|
-
test(
|
|
1515
|
-
if (!
|
|
1514
|
+
test(version3) {
|
|
1515
|
+
if (!version3) {
|
|
1516
1516
|
return false;
|
|
1517
1517
|
}
|
|
1518
|
-
if (typeof
|
|
1518
|
+
if (typeof version3 === "string") {
|
|
1519
1519
|
try {
|
|
1520
|
-
|
|
1520
|
+
version3 = new SemVer(version3, this.options);
|
|
1521
1521
|
} catch (er) {
|
|
1522
1522
|
return false;
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
1525
|
for (let i = 0; i < this.set.length; i++) {
|
|
1526
|
-
if (testSet(this.set[i],
|
|
1526
|
+
if (testSet(this.set[i], version3, this.options)) {
|
|
1527
1527
|
return true;
|
|
1528
1528
|
}
|
|
1529
1529
|
}
|
|
@@ -1745,13 +1745,13 @@ var require_range = __commonJS({
|
|
|
1745
1745
|
}
|
|
1746
1746
|
return `${from} ${to}`.trim();
|
|
1747
1747
|
};
|
|
1748
|
-
var testSet = (set,
|
|
1748
|
+
var testSet = (set, version3, options) => {
|
|
1749
1749
|
for (let i = 0; i < set.length; i++) {
|
|
1750
|
-
if (!set[i].test(
|
|
1750
|
+
if (!set[i].test(version3)) {
|
|
1751
1751
|
return false;
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
|
-
if (
|
|
1754
|
+
if (version3.prerelease.length && !options.includePrerelease) {
|
|
1755
1755
|
for (let i = 0; i < set.length; i++) {
|
|
1756
1756
|
debug(set[i].semver);
|
|
1757
1757
|
if (set[i].semver === Comparator.ANY) {
|
|
@@ -1759,7 +1759,7 @@ var require_range = __commonJS({
|
|
|
1759
1759
|
}
|
|
1760
1760
|
if (set[i].semver.prerelease.length > 0) {
|
|
1761
1761
|
const allowed = set[i].semver;
|
|
1762
|
-
if (allowed.major ===
|
|
1762
|
+
if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) {
|
|
1763
1763
|
return true;
|
|
1764
1764
|
}
|
|
1765
1765
|
}
|
|
@@ -1820,19 +1820,19 @@ var require_comparator = __commonJS({
|
|
|
1820
1820
|
toString() {
|
|
1821
1821
|
return this.value;
|
|
1822
1822
|
}
|
|
1823
|
-
test(
|
|
1824
|
-
debug("Comparator.test",
|
|
1825
|
-
if (this.semver === ANY ||
|
|
1823
|
+
test(version3) {
|
|
1824
|
+
debug("Comparator.test", version3, this.options.loose);
|
|
1825
|
+
if (this.semver === ANY || version3 === ANY) {
|
|
1826
1826
|
return true;
|
|
1827
1827
|
}
|
|
1828
|
-
if (typeof
|
|
1828
|
+
if (typeof version3 === "string") {
|
|
1829
1829
|
try {
|
|
1830
|
-
|
|
1830
|
+
version3 = new SemVer(version3, this.options);
|
|
1831
1831
|
} catch (er) {
|
|
1832
1832
|
return false;
|
|
1833
1833
|
}
|
|
1834
1834
|
}
|
|
1835
|
-
return cmp(
|
|
1835
|
+
return cmp(version3, this.operator, this.semver, this.options);
|
|
1836
1836
|
}
|
|
1837
1837
|
intersects(comp, options) {
|
|
1838
1838
|
if (!(comp instanceof _Comparator)) {
|
|
@@ -1889,13 +1889,13 @@ var require_satisfies = __commonJS({
|
|
|
1889
1889
|
"../../node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
1890
1890
|
"use strict";
|
|
1891
1891
|
var Range = require_range();
|
|
1892
|
-
var satisfies = (
|
|
1892
|
+
var satisfies = (version3, range, options) => {
|
|
1893
1893
|
try {
|
|
1894
1894
|
range = new Range(range, options);
|
|
1895
1895
|
} catch (er) {
|
|
1896
1896
|
return false;
|
|
1897
1897
|
}
|
|
1898
|
-
return range.test(
|
|
1898
|
+
return range.test(version3);
|
|
1899
1899
|
};
|
|
1900
1900
|
module2.exports = satisfies;
|
|
1901
1901
|
}
|
|
@@ -2057,8 +2057,8 @@ var require_outside = __commonJS({
|
|
|
2057
2057
|
var lt = require_lt();
|
|
2058
2058
|
var lte = require_lte();
|
|
2059
2059
|
var gte = require_gte();
|
|
2060
|
-
var outside = (
|
|
2061
|
-
|
|
2060
|
+
var outside = (version3, range, hilo, options) => {
|
|
2061
|
+
version3 = new SemVer(version3, options);
|
|
2062
2062
|
range = new Range(range, options);
|
|
2063
2063
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
2064
2064
|
switch (hilo) {
|
|
@@ -2079,7 +2079,7 @@ var require_outside = __commonJS({
|
|
|
2079
2079
|
default:
|
|
2080
2080
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
2081
2081
|
}
|
|
2082
|
-
if (satisfies(
|
|
2082
|
+
if (satisfies(version3, range, options)) {
|
|
2083
2083
|
return false;
|
|
2084
2084
|
}
|
|
2085
2085
|
for (let i = 0; i < range.set.length; ++i) {
|
|
@@ -2101,9 +2101,9 @@ var require_outside = __commonJS({
|
|
|
2101
2101
|
if (high.operator === comp || high.operator === ecomp) {
|
|
2102
2102
|
return false;
|
|
2103
2103
|
}
|
|
2104
|
-
if ((!low.operator || low.operator === comp) && ltefn(
|
|
2104
|
+
if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) {
|
|
2105
2105
|
return false;
|
|
2106
|
-
} else if (low.operator === ecomp && ltfn(
|
|
2106
|
+
} else if (low.operator === ecomp && ltfn(version3, low.semver)) {
|
|
2107
2107
|
return false;
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
@@ -2118,7 +2118,7 @@ var require_gtr = __commonJS({
|
|
|
2118
2118
|
"../../node_modules/semver/ranges/gtr.js"(exports2, module2) {
|
|
2119
2119
|
"use strict";
|
|
2120
2120
|
var outside = require_outside();
|
|
2121
|
-
var gtr = (
|
|
2121
|
+
var gtr = (version3, range, options) => outside(version3, range, ">", options);
|
|
2122
2122
|
module2.exports = gtr;
|
|
2123
2123
|
}
|
|
2124
2124
|
});
|
|
@@ -2128,7 +2128,7 @@ var require_ltr = __commonJS({
|
|
|
2128
2128
|
"../../node_modules/semver/ranges/ltr.js"(exports2, module2) {
|
|
2129
2129
|
"use strict";
|
|
2130
2130
|
var outside = require_outside();
|
|
2131
|
-
var ltr = (
|
|
2131
|
+
var ltr = (version3, range, options) => outside(version3, range, "<", options);
|
|
2132
2132
|
module2.exports = ltr;
|
|
2133
2133
|
}
|
|
2134
2134
|
});
|
|
@@ -2158,12 +2158,12 @@ var require_simplify = __commonJS({
|
|
|
2158
2158
|
let first = null;
|
|
2159
2159
|
let prev = null;
|
|
2160
2160
|
const v = versions3.sort((a, b) => compare(a, b, options));
|
|
2161
|
-
for (const
|
|
2162
|
-
const included = satisfies(
|
|
2161
|
+
for (const version3 of v) {
|
|
2162
|
+
const included = satisfies(version3, range, options);
|
|
2163
2163
|
if (included) {
|
|
2164
|
-
prev =
|
|
2164
|
+
prev = version3;
|
|
2165
2165
|
if (!first) {
|
|
2166
|
-
first =
|
|
2166
|
+
first = version3;
|
|
2167
2167
|
}
|
|
2168
2168
|
} else {
|
|
2169
2169
|
if (prev) {
|
|
@@ -2691,7 +2691,7 @@ var init_package = __esm({
|
|
|
2691
2691
|
});
|
|
2692
2692
|
|
|
2693
2693
|
// ../../node_modules/sharp/dist/libvips.mjs
|
|
2694
|
-
var import_node_child_process, import_node_crypto, import_semver, import_detect_libc, minimumLibvipsVersionLabelled, minimumLibvipsVersion, prebuiltPlatforms, spawnSyncOptions,
|
|
2694
|
+
var import_node_child_process, import_node_crypto, import_semver, import_detect_libc, minimumLibvipsVersionLabelled, minimumLibvipsVersion, prebuiltPlatforms, spawnSyncOptions, log2, runtimeLibc, runtimePlatformArch, buildPlatformArch, buildSharpLibvipsIncludeDir, buildSharpLibvipsCPlusPlusDir, buildSharpLibvipsLibDir, isUnsupportedNodeRuntime, isEmscripten, isRosetta, sha512, yarnLocator, spawnRebuild, globalLibvipsVersion, getBrewPkgConfigPath, getPkgConfigPath, pkgConfigPath, skipSearch, useGlobalLibvips, libvips_default;
|
|
2695
2695
|
var init_libvips = __esm({
|
|
2696
2696
|
"../../node_modules/sharp/dist/libvips.mjs"() {
|
|
2697
2697
|
import_node_child_process = require("node:child_process");
|
|
@@ -2723,7 +2723,7 @@ var init_libvips = __esm({
|
|
|
2723
2723
|
encoding: "utf8",
|
|
2724
2724
|
shell: true
|
|
2725
2725
|
};
|
|
2726
|
-
|
|
2726
|
+
log2 = (item) => {
|
|
2727
2727
|
if (item instanceof Error) {
|
|
2728
2728
|
console.error(`sharp: Installation error: ${item.message}`);
|
|
2729
2729
|
} else {
|
|
@@ -2877,7 +2877,7 @@ var init_libvips = __esm({
|
|
|
2877
2877
|
buildSharpLibvipsLibDir,
|
|
2878
2878
|
isUnsupportedNodeRuntime,
|
|
2879
2879
|
runtimePlatformArch,
|
|
2880
|
-
log,
|
|
2880
|
+
log: log2,
|
|
2881
2881
|
yarnLocator,
|
|
2882
2882
|
spawnRebuild,
|
|
2883
2883
|
globalLibvipsVersion,
|
|
@@ -8471,8 +8471,556 @@ var require_flatbuffers = __commonJS({
|
|
|
8471
8471
|
}
|
|
8472
8472
|
});
|
|
8473
8473
|
|
|
8474
|
+
// ../../node_modules/probe.gl/dist/env/lib/globals.js
|
|
8475
|
+
var window_ = globalThis;
|
|
8476
|
+
var document_ = globalThis.document || {};
|
|
8477
|
+
var process_ = globalThis.process || {};
|
|
8478
|
+
var console_ = globalThis.console;
|
|
8479
|
+
var navigator_ = globalThis.navigator || {};
|
|
8480
|
+
|
|
8481
|
+
// ../../node_modules/probe.gl/dist/env/lib/is-electron.js
|
|
8482
|
+
function isElectron(mockUserAgent) {
|
|
8483
|
+
var _a5, _b2;
|
|
8484
|
+
if (typeof window !== "undefined" && ((_a5 = window.process) == null ? void 0 : _a5.type) === "renderer") {
|
|
8485
|
+
return true;
|
|
8486
|
+
}
|
|
8487
|
+
if (typeof process !== "undefined" && Boolean((_b2 = process.versions) == null ? void 0 : _b2["electron"])) {
|
|
8488
|
+
return true;
|
|
8489
|
+
}
|
|
8490
|
+
const realUserAgent = typeof navigator !== "undefined" && navigator.userAgent;
|
|
8491
|
+
const userAgent = mockUserAgent || realUserAgent;
|
|
8492
|
+
return Boolean(userAgent && userAgent.indexOf("Electron") >= 0);
|
|
8493
|
+
}
|
|
8494
|
+
|
|
8495
|
+
// ../../node_modules/probe.gl/dist/env/lib/is-browser.js
|
|
8496
|
+
function isBrowser() {
|
|
8497
|
+
const isNode = (
|
|
8498
|
+
// @ts-expect-error
|
|
8499
|
+
typeof process === "object" && String(process) === "[object process]" && !(process == null ? void 0 : process.browser)
|
|
8500
|
+
);
|
|
8501
|
+
return !isNode || isElectron();
|
|
8502
|
+
}
|
|
8503
|
+
|
|
8504
|
+
// ../../node_modules/probe.gl/dist/env/index.js
|
|
8505
|
+
var VERSION = true ? "5.0.0" : "untranspiled source";
|
|
8506
|
+
|
|
8507
|
+
// ../../node_modules/probe.gl/dist/log/utils/assert.js
|
|
8508
|
+
function assert2(condition, message) {
|
|
8509
|
+
if (!condition) {
|
|
8510
|
+
throw new Error(message || "Assertion failed");
|
|
8511
|
+
}
|
|
8512
|
+
}
|
|
8513
|
+
|
|
8514
|
+
// ../../node_modules/probe.gl/dist/log/loggers/log-utils.js
|
|
8515
|
+
function normalizeLogLevel(logLevel) {
|
|
8516
|
+
if (!logLevel) {
|
|
8517
|
+
return 0;
|
|
8518
|
+
}
|
|
8519
|
+
let resolvedLevel;
|
|
8520
|
+
switch (typeof logLevel) {
|
|
8521
|
+
case "number":
|
|
8522
|
+
resolvedLevel = logLevel;
|
|
8523
|
+
break;
|
|
8524
|
+
case "object":
|
|
8525
|
+
resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
|
|
8526
|
+
break;
|
|
8527
|
+
default:
|
|
8528
|
+
return 0;
|
|
8529
|
+
}
|
|
8530
|
+
assert2(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
|
|
8531
|
+
return resolvedLevel;
|
|
8532
|
+
}
|
|
8533
|
+
function normalizeArguments(opts) {
|
|
8534
|
+
const { logLevel, message } = opts;
|
|
8535
|
+
opts.logLevel = normalizeLogLevel(logLevel);
|
|
8536
|
+
const args = opts.args ? Array.from(opts.args) : [];
|
|
8537
|
+
while (args.length && args.shift() !== message) {
|
|
8538
|
+
}
|
|
8539
|
+
switch (typeof logLevel) {
|
|
8540
|
+
case "string":
|
|
8541
|
+
case "function":
|
|
8542
|
+
if (message !== void 0) {
|
|
8543
|
+
args.unshift(message);
|
|
8544
|
+
}
|
|
8545
|
+
opts.message = logLevel;
|
|
8546
|
+
break;
|
|
8547
|
+
case "object":
|
|
8548
|
+
Object.assign(opts, logLevel);
|
|
8549
|
+
break;
|
|
8550
|
+
default:
|
|
8551
|
+
}
|
|
8552
|
+
if (typeof opts.message === "function") {
|
|
8553
|
+
opts.message = opts.message();
|
|
8554
|
+
}
|
|
8555
|
+
const messageType = typeof opts.message;
|
|
8556
|
+
assert2(messageType === "string" || messageType === "object");
|
|
8557
|
+
return Object.assign(opts, { args }, opts.opts);
|
|
8558
|
+
}
|
|
8559
|
+
|
|
8560
|
+
// ../../node_modules/probe.gl/dist/log/loggers/base-log.js
|
|
8561
|
+
var noop = () => {
|
|
8562
|
+
};
|
|
8563
|
+
var BaseLog = class {
|
|
8564
|
+
constructor({ level = 0 } = {}) {
|
|
8565
|
+
this.userData = {};
|
|
8566
|
+
this._onceCache = /* @__PURE__ */ new Set();
|
|
8567
|
+
this._level = level;
|
|
8568
|
+
}
|
|
8569
|
+
set level(newLevel) {
|
|
8570
|
+
this.setLevel(newLevel);
|
|
8571
|
+
}
|
|
8572
|
+
get level() {
|
|
8573
|
+
return this.getLevel();
|
|
8574
|
+
}
|
|
8575
|
+
setLevel(level) {
|
|
8576
|
+
this._level = level;
|
|
8577
|
+
return this;
|
|
8578
|
+
}
|
|
8579
|
+
getLevel() {
|
|
8580
|
+
return this._level;
|
|
8581
|
+
}
|
|
8582
|
+
// Unconditional logging
|
|
8583
|
+
warn(message, ...args) {
|
|
8584
|
+
return this._log("warn", 0, message, args, { once: true });
|
|
8585
|
+
}
|
|
8586
|
+
error(message, ...args) {
|
|
8587
|
+
return this._log("error", 0, message, args);
|
|
8588
|
+
}
|
|
8589
|
+
// Conditional logging
|
|
8590
|
+
log(logLevel, message, ...args) {
|
|
8591
|
+
return this._log("log", logLevel, message, args);
|
|
8592
|
+
}
|
|
8593
|
+
info(logLevel, message, ...args) {
|
|
8594
|
+
return this._log("info", logLevel, message, args);
|
|
8595
|
+
}
|
|
8596
|
+
once(logLevel, message, ...args) {
|
|
8597
|
+
return this._log("once", logLevel, message, args, { once: true });
|
|
8598
|
+
}
|
|
8599
|
+
_log(type, logLevel, message, args, options = {}) {
|
|
8600
|
+
const normalized = normalizeArguments({
|
|
8601
|
+
logLevel,
|
|
8602
|
+
message,
|
|
8603
|
+
args: this._buildArgs(logLevel, message, args),
|
|
8604
|
+
opts: options
|
|
8605
|
+
});
|
|
8606
|
+
return this._createLogFunction(type, normalized, options);
|
|
8607
|
+
}
|
|
8608
|
+
_buildArgs(logLevel, message, args) {
|
|
8609
|
+
return [logLevel, message, ...args];
|
|
8610
|
+
}
|
|
8611
|
+
_createLogFunction(type, normalized, options) {
|
|
8612
|
+
if (!this._shouldLog(normalized.logLevel)) {
|
|
8613
|
+
return noop;
|
|
8614
|
+
}
|
|
8615
|
+
const tag = this._getOnceTag(options.tag ?? normalized.tag ?? normalized.message);
|
|
8616
|
+
if ((options.once || normalized.once) && tag !== void 0) {
|
|
8617
|
+
if (this._onceCache.has(tag)) {
|
|
8618
|
+
return noop;
|
|
8619
|
+
}
|
|
8620
|
+
this._onceCache.add(tag);
|
|
8621
|
+
}
|
|
8622
|
+
return this._emit(type, normalized);
|
|
8623
|
+
}
|
|
8624
|
+
_shouldLog(logLevel) {
|
|
8625
|
+
return this.getLevel() >= normalizeLogLevel(logLevel);
|
|
8626
|
+
}
|
|
8627
|
+
_getOnceTag(tag) {
|
|
8628
|
+
if (tag === void 0) {
|
|
8629
|
+
return void 0;
|
|
8630
|
+
}
|
|
8631
|
+
try {
|
|
8632
|
+
return typeof tag === "string" ? tag : String(tag);
|
|
8633
|
+
} catch {
|
|
8634
|
+
return void 0;
|
|
8635
|
+
}
|
|
8636
|
+
}
|
|
8637
|
+
};
|
|
8638
|
+
|
|
8639
|
+
// ../../node_modules/probe.gl/dist/log/utils/local-storage.js
|
|
8640
|
+
function getStorage(type) {
|
|
8641
|
+
try {
|
|
8642
|
+
const storage = window[type];
|
|
8643
|
+
const x = "__storage_test__";
|
|
8644
|
+
storage.setItem(x, x);
|
|
8645
|
+
storage.removeItem(x);
|
|
8646
|
+
return storage;
|
|
8647
|
+
} catch (e) {
|
|
8648
|
+
return null;
|
|
8649
|
+
}
|
|
8650
|
+
}
|
|
8651
|
+
var LocalStorage = class {
|
|
8652
|
+
constructor(id, defaultConfig, type = "sessionStorage") {
|
|
8653
|
+
this.storage = getStorage(type);
|
|
8654
|
+
this.id = id;
|
|
8655
|
+
this.config = defaultConfig;
|
|
8656
|
+
this._loadConfiguration();
|
|
8657
|
+
}
|
|
8658
|
+
getConfiguration() {
|
|
8659
|
+
return this.config;
|
|
8660
|
+
}
|
|
8661
|
+
setConfiguration(configuration) {
|
|
8662
|
+
Object.assign(this.config, configuration);
|
|
8663
|
+
if (this.storage) {
|
|
8664
|
+
const serialized = JSON.stringify(this.config);
|
|
8665
|
+
this.storage.setItem(this.id, serialized);
|
|
8666
|
+
}
|
|
8667
|
+
}
|
|
8668
|
+
// Get config from persistent store, if available
|
|
8669
|
+
_loadConfiguration() {
|
|
8670
|
+
let configuration = {};
|
|
8671
|
+
if (this.storage) {
|
|
8672
|
+
const serializedConfiguration = this.storage.getItem(this.id);
|
|
8673
|
+
configuration = serializedConfiguration ? JSON.parse(serializedConfiguration) : {};
|
|
8674
|
+
}
|
|
8675
|
+
Object.assign(this.config, configuration);
|
|
8676
|
+
return this;
|
|
8677
|
+
}
|
|
8678
|
+
};
|
|
8679
|
+
|
|
8680
|
+
// ../../node_modules/probe.gl/dist/log/utils/formatters.js
|
|
8681
|
+
function formatTime(ms) {
|
|
8682
|
+
let formatted;
|
|
8683
|
+
if (ms < 10) {
|
|
8684
|
+
formatted = `${ms.toFixed(2)}ms`;
|
|
8685
|
+
} else if (ms < 100) {
|
|
8686
|
+
formatted = `${ms.toFixed(1)}ms`;
|
|
8687
|
+
} else if (ms < 1e3) {
|
|
8688
|
+
formatted = `${ms.toFixed(0)}ms`;
|
|
8689
|
+
} else {
|
|
8690
|
+
formatted = `${(ms / 1e3).toFixed(2)}s`;
|
|
8691
|
+
}
|
|
8692
|
+
return formatted;
|
|
8693
|
+
}
|
|
8694
|
+
function leftPad(string2, length = 8) {
|
|
8695
|
+
const padLength = Math.max(length - string2.length, 0);
|
|
8696
|
+
return `${" ".repeat(padLength)}${string2}`;
|
|
8697
|
+
}
|
|
8698
|
+
|
|
8699
|
+
// ../../node_modules/probe.gl/dist/log/utils/color.js
|
|
8700
|
+
var COLOR;
|
|
8701
|
+
(function(COLOR2) {
|
|
8702
|
+
COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
|
|
8703
|
+
COLOR2[COLOR2["RED"] = 31] = "RED";
|
|
8704
|
+
COLOR2[COLOR2["GREEN"] = 32] = "GREEN";
|
|
8705
|
+
COLOR2[COLOR2["YELLOW"] = 33] = "YELLOW";
|
|
8706
|
+
COLOR2[COLOR2["BLUE"] = 34] = "BLUE";
|
|
8707
|
+
COLOR2[COLOR2["MAGENTA"] = 35] = "MAGENTA";
|
|
8708
|
+
COLOR2[COLOR2["CYAN"] = 36] = "CYAN";
|
|
8709
|
+
COLOR2[COLOR2["WHITE"] = 37] = "WHITE";
|
|
8710
|
+
COLOR2[COLOR2["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
|
|
8711
|
+
COLOR2[COLOR2["BRIGHT_RED"] = 91] = "BRIGHT_RED";
|
|
8712
|
+
COLOR2[COLOR2["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
|
|
8713
|
+
COLOR2[COLOR2["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
|
|
8714
|
+
COLOR2[COLOR2["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
|
|
8715
|
+
COLOR2[COLOR2["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
|
|
8716
|
+
COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
8717
|
+
COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
8718
|
+
})(COLOR || (COLOR = {}));
|
|
8719
|
+
var BACKGROUND_INCREMENT = 10;
|
|
8720
|
+
function getColor(color2) {
|
|
8721
|
+
if (typeof color2 !== "string") {
|
|
8722
|
+
return color2;
|
|
8723
|
+
}
|
|
8724
|
+
color2 = color2.toUpperCase();
|
|
8725
|
+
return COLOR[color2] || COLOR.WHITE;
|
|
8726
|
+
}
|
|
8727
|
+
function addColor(string2, color2, background) {
|
|
8728
|
+
if (!isBrowser && typeof string2 === "string") {
|
|
8729
|
+
if (color2) {
|
|
8730
|
+
const colorCode = getColor(color2);
|
|
8731
|
+
string2 = `\x1B[${colorCode}m${string2}\x1B[39m`;
|
|
8732
|
+
}
|
|
8733
|
+
if (background) {
|
|
8734
|
+
const colorCode = getColor(background);
|
|
8735
|
+
string2 = `\x1B[${colorCode + BACKGROUND_INCREMENT}m${string2}\x1B[49m`;
|
|
8736
|
+
}
|
|
8737
|
+
}
|
|
8738
|
+
return string2;
|
|
8739
|
+
}
|
|
8740
|
+
|
|
8741
|
+
// ../../node_modules/probe.gl/dist/log/utils/autobind.js
|
|
8742
|
+
function autobind(obj, predefined = ["constructor"]) {
|
|
8743
|
+
const proto = Object.getPrototypeOf(obj);
|
|
8744
|
+
const propNames = Object.getOwnPropertyNames(proto);
|
|
8745
|
+
const object2 = obj;
|
|
8746
|
+
for (const key of propNames) {
|
|
8747
|
+
const value = object2[key];
|
|
8748
|
+
if (typeof value === "function") {
|
|
8749
|
+
if (!predefined.find((name) => key === name)) {
|
|
8750
|
+
object2[key] = value.bind(obj);
|
|
8751
|
+
}
|
|
8752
|
+
}
|
|
8753
|
+
}
|
|
8754
|
+
}
|
|
8755
|
+
|
|
8756
|
+
// ../../node_modules/probe.gl/dist/log/probe.js
|
|
8757
|
+
var Probe = class {
|
|
8758
|
+
getHighResolutionTimer() {
|
|
8759
|
+
var _a5, _b2, _c2, _d2, _e2;
|
|
8760
|
+
let timestamp;
|
|
8761
|
+
if (isBrowser() && window_.performance) {
|
|
8762
|
+
timestamp = (_c2 = (_b2 = (_a5 = window_) == null ? void 0 : _a5.performance) == null ? void 0 : _b2.now) == null ? void 0 : _c2.call(_b2);
|
|
8763
|
+
} else if ("hrtime" in process_) {
|
|
8764
|
+
const timeParts = (_e2 = (_d2 = process_) == null ? void 0 : _d2.hrtime) == null ? void 0 : _e2.call(_d2);
|
|
8765
|
+
timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
|
|
8766
|
+
} else {
|
|
8767
|
+
timestamp = Date.now();
|
|
8768
|
+
}
|
|
8769
|
+
return timestamp;
|
|
8770
|
+
}
|
|
8771
|
+
getMemoryUsageMB() {
|
|
8772
|
+
var _a5, _b2;
|
|
8773
|
+
const performance2 = (_a5 = window_) == null ? void 0 : _a5.performance;
|
|
8774
|
+
const usedJSHeapSize = (_b2 = performance2 == null ? void 0 : performance2.memory) == null ? void 0 : _b2.usedJSHeapSize;
|
|
8775
|
+
if (usedJSHeapSize === void 0 || usedJSHeapSize === null) {
|
|
8776
|
+
return null;
|
|
8777
|
+
}
|
|
8778
|
+
return Math.trunc(usedJSHeapSize / 1024 / 1024);
|
|
8779
|
+
}
|
|
8780
|
+
};
|
|
8781
|
+
var probe = new Probe();
|
|
8782
|
+
globalThis.Probe = Probe;
|
|
8783
|
+
globalThis.probe = probe;
|
|
8784
|
+
|
|
8785
|
+
// ../../node_modules/probe.gl/dist/log/loggers/probe-log.js
|
|
8786
|
+
var originalConsole = {
|
|
8787
|
+
debug: isBrowser() ? console.debug || console.log : console.log,
|
|
8788
|
+
log: console.log,
|
|
8789
|
+
info: console.info,
|
|
8790
|
+
warn: console.warn,
|
|
8791
|
+
error: console.error
|
|
8792
|
+
};
|
|
8793
|
+
var DEFAULT_LOG_CONFIGURATION = {
|
|
8794
|
+
enabled: true,
|
|
8795
|
+
level: 0
|
|
8796
|
+
};
|
|
8797
|
+
var ProbeLog = class extends BaseLog {
|
|
8798
|
+
constructor({ id } = { id: "" }) {
|
|
8799
|
+
super({ level: 0 });
|
|
8800
|
+
this.VERSION = VERSION;
|
|
8801
|
+
this._startTs = probe.getHighResolutionTimer();
|
|
8802
|
+
this._deltaTs = probe.getHighResolutionTimer();
|
|
8803
|
+
this.userData = {};
|
|
8804
|
+
this.LOG_THROTTLE_TIMEOUT = 0;
|
|
8805
|
+
this.id = id;
|
|
8806
|
+
this.userData = {};
|
|
8807
|
+
this._storage = new LocalStorage(`__probe-${this.id}__`, { [this.id]: DEFAULT_LOG_CONFIGURATION });
|
|
8808
|
+
this.timeStamp(`${this.id} started`);
|
|
8809
|
+
autobind(this);
|
|
8810
|
+
Object.seal(this);
|
|
8811
|
+
}
|
|
8812
|
+
isEnabled() {
|
|
8813
|
+
return this._getConfiguration().enabled;
|
|
8814
|
+
}
|
|
8815
|
+
getLevel() {
|
|
8816
|
+
return this._getConfiguration().level;
|
|
8817
|
+
}
|
|
8818
|
+
/** @return milliseconds, with fractions */
|
|
8819
|
+
getTotal() {
|
|
8820
|
+
return Number((probe.getHighResolutionTimer() - this._startTs).toPrecision(10));
|
|
8821
|
+
}
|
|
8822
|
+
/** @return milliseconds, with fractions */
|
|
8823
|
+
getDelta() {
|
|
8824
|
+
return Number((probe.getHighResolutionTimer() - this._deltaTs).toPrecision(10));
|
|
8825
|
+
}
|
|
8826
|
+
/** @deprecated use logLevel */
|
|
8827
|
+
set priority(newPriority) {
|
|
8828
|
+
this.level = newPriority;
|
|
8829
|
+
}
|
|
8830
|
+
/** @deprecated use logLevel */
|
|
8831
|
+
get priority() {
|
|
8832
|
+
return this.level;
|
|
8833
|
+
}
|
|
8834
|
+
/** @deprecated use logLevel */
|
|
8835
|
+
getPriority() {
|
|
8836
|
+
return this.level;
|
|
8837
|
+
}
|
|
8838
|
+
// Configure
|
|
8839
|
+
enable(enabled = true) {
|
|
8840
|
+
this._updateConfiguration({ enabled });
|
|
8841
|
+
return this;
|
|
8842
|
+
}
|
|
8843
|
+
setLevel(level) {
|
|
8844
|
+
this._updateConfiguration({ level });
|
|
8845
|
+
return this;
|
|
8846
|
+
}
|
|
8847
|
+
/** return the current status of the setting */
|
|
8848
|
+
get(setting) {
|
|
8849
|
+
return this._getConfiguration()[setting];
|
|
8850
|
+
}
|
|
8851
|
+
// update the status of the setting
|
|
8852
|
+
set(setting, value) {
|
|
8853
|
+
this._updateConfiguration({ [setting]: value });
|
|
8854
|
+
}
|
|
8855
|
+
/** Logs the current settings as a table */
|
|
8856
|
+
settings() {
|
|
8857
|
+
if (console.table) {
|
|
8858
|
+
console.table(this._storage.config);
|
|
8859
|
+
} else {
|
|
8860
|
+
console.log(this._storage.config);
|
|
8861
|
+
}
|
|
8862
|
+
}
|
|
8863
|
+
// Unconditional logging
|
|
8864
|
+
assert(condition, message) {
|
|
8865
|
+
if (!condition) {
|
|
8866
|
+
throw new Error(message || "Assertion failed");
|
|
8867
|
+
}
|
|
8868
|
+
}
|
|
8869
|
+
warn(message, ...args) {
|
|
8870
|
+
return this._log("warn", 0, message, args, {
|
|
8871
|
+
method: originalConsole.warn,
|
|
8872
|
+
once: true
|
|
8873
|
+
});
|
|
8874
|
+
}
|
|
8875
|
+
error(message, ...args) {
|
|
8876
|
+
return this._log("error", 0, message, args, {
|
|
8877
|
+
method: originalConsole.error
|
|
8878
|
+
});
|
|
8879
|
+
}
|
|
8880
|
+
/** Print a deprecation warning */
|
|
8881
|
+
deprecated(oldUsage, newUsage) {
|
|
8882
|
+
return this.warn(`\`${oldUsage}\` is deprecated and will be removed in a later version. Use \`${newUsage}\` instead`);
|
|
8883
|
+
}
|
|
8884
|
+
/** Print a removal warning */
|
|
8885
|
+
removed(oldUsage, newUsage) {
|
|
8886
|
+
return this.error(`\`${oldUsage}\` has been removed. Use \`${newUsage}\` instead`);
|
|
8887
|
+
}
|
|
8888
|
+
probe(logLevel, message, ...args) {
|
|
8889
|
+
const memoryUsageMB = probe.getMemoryUsageMB();
|
|
8890
|
+
if (memoryUsageMB !== null) {
|
|
8891
|
+
const memoryUsagePrefix = `${memoryUsageMB}MB `;
|
|
8892
|
+
if (typeof message === "function") {
|
|
8893
|
+
message = () => `${memoryUsagePrefix}${message()}`;
|
|
8894
|
+
} else if (typeof message === "string") {
|
|
8895
|
+
message = `${memoryUsagePrefix}${message}`;
|
|
8896
|
+
}
|
|
8897
|
+
}
|
|
8898
|
+
return this._log("log", logLevel, message, args, {
|
|
8899
|
+
method: originalConsole.log,
|
|
8900
|
+
time: true,
|
|
8901
|
+
once: true
|
|
8902
|
+
});
|
|
8903
|
+
}
|
|
8904
|
+
log(logLevel, message, ...args) {
|
|
8905
|
+
return this._log("log", logLevel, message, args, {
|
|
8906
|
+
method: originalConsole.debug
|
|
8907
|
+
});
|
|
8908
|
+
}
|
|
8909
|
+
info(logLevel, message, ...args) {
|
|
8910
|
+
return this._log("info", logLevel, message, args, { method: console.info });
|
|
8911
|
+
}
|
|
8912
|
+
once(logLevel, message, ...args) {
|
|
8913
|
+
return this._log("once", logLevel, message, args, {
|
|
8914
|
+
method: originalConsole.debug || originalConsole.info,
|
|
8915
|
+
once: true
|
|
8916
|
+
});
|
|
8917
|
+
}
|
|
8918
|
+
/** Logs an object as a table */
|
|
8919
|
+
table(logLevel, table, columns) {
|
|
8920
|
+
if (table) {
|
|
8921
|
+
return this._log("table", logLevel, table, columns && [columns] || [], {
|
|
8922
|
+
method: console.table || noop,
|
|
8923
|
+
tag: getTableHeader(table)
|
|
8924
|
+
});
|
|
8925
|
+
}
|
|
8926
|
+
return noop;
|
|
8927
|
+
}
|
|
8928
|
+
time(logLevel, message) {
|
|
8929
|
+
return this._log("time", logLevel, message, [], {
|
|
8930
|
+
method: console.time ? console.time : console.info
|
|
8931
|
+
});
|
|
8932
|
+
}
|
|
8933
|
+
timeEnd(logLevel, message) {
|
|
8934
|
+
return this._log("time", logLevel, message, [], {
|
|
8935
|
+
method: console.timeEnd ? console.timeEnd : console.info
|
|
8936
|
+
});
|
|
8937
|
+
}
|
|
8938
|
+
timeStamp(logLevel, message) {
|
|
8939
|
+
return this._log("time", logLevel, message, [], {
|
|
8940
|
+
method: console.timeStamp || noop
|
|
8941
|
+
});
|
|
8942
|
+
}
|
|
8943
|
+
group(logLevel, message, opts = { collapsed: false }) {
|
|
8944
|
+
const method = (opts.collapsed ? console.groupCollapsed : console.group) || console.info;
|
|
8945
|
+
return this._log("group", logLevel, message, [], { method });
|
|
8946
|
+
}
|
|
8947
|
+
groupCollapsed(logLevel, message, opts = {}) {
|
|
8948
|
+
return this.group(logLevel, message, Object.assign({}, opts, { collapsed: true }));
|
|
8949
|
+
}
|
|
8950
|
+
groupEnd(logLevel) {
|
|
8951
|
+
return this._log("groupEnd", logLevel, "", [], {
|
|
8952
|
+
method: console.groupEnd || noop
|
|
8953
|
+
});
|
|
8954
|
+
}
|
|
8955
|
+
// EXPERIMENTAL
|
|
8956
|
+
withGroup(logLevel, message, func) {
|
|
8957
|
+
this.group(logLevel, message)();
|
|
8958
|
+
try {
|
|
8959
|
+
func();
|
|
8960
|
+
} finally {
|
|
8961
|
+
this.groupEnd(logLevel)();
|
|
8962
|
+
}
|
|
8963
|
+
}
|
|
8964
|
+
trace() {
|
|
8965
|
+
if (console.trace) {
|
|
8966
|
+
console.trace();
|
|
8967
|
+
}
|
|
8968
|
+
}
|
|
8969
|
+
_shouldLog(logLevel) {
|
|
8970
|
+
return this.isEnabled() && super._shouldLog(logLevel);
|
|
8971
|
+
}
|
|
8972
|
+
_emit(_type, normalized) {
|
|
8973
|
+
const method = normalized.method;
|
|
8974
|
+
assert2(method);
|
|
8975
|
+
normalized.total = this.getTotal();
|
|
8976
|
+
normalized.delta = this.getDelta();
|
|
8977
|
+
this._deltaTs = probe.getHighResolutionTimer();
|
|
8978
|
+
const message = decorateMessage(this.id, normalized.message, normalized);
|
|
8979
|
+
return method.bind(console, message, ...normalized.args);
|
|
8980
|
+
}
|
|
8981
|
+
_getConfiguration() {
|
|
8982
|
+
if (!this._storage.config[this.id]) {
|
|
8983
|
+
this._updateConfiguration(DEFAULT_LOG_CONFIGURATION);
|
|
8984
|
+
}
|
|
8985
|
+
return this._storage.config[this.id];
|
|
8986
|
+
}
|
|
8987
|
+
_updateConfiguration(configuration) {
|
|
8988
|
+
const currentConfiguration = this._storage.config[this.id] || {
|
|
8989
|
+
...DEFAULT_LOG_CONFIGURATION
|
|
8990
|
+
};
|
|
8991
|
+
this._storage.setConfiguration({
|
|
8992
|
+
[this.id]: { ...currentConfiguration, ...configuration }
|
|
8993
|
+
});
|
|
8994
|
+
}
|
|
8995
|
+
};
|
|
8996
|
+
ProbeLog.VERSION = VERSION;
|
|
8997
|
+
function decorateMessage(id, message, opts) {
|
|
8998
|
+
if (typeof message === "string") {
|
|
8999
|
+
const time = opts.time ? leftPad(formatTime(opts.total)) : "";
|
|
9000
|
+
message = opts.time ? `${id}: ${time} ${message}` : `${id}: ${message}`;
|
|
9001
|
+
message = addColor(message, opts.color, opts.background);
|
|
9002
|
+
}
|
|
9003
|
+
return message;
|
|
9004
|
+
}
|
|
9005
|
+
function getTableHeader(table) {
|
|
9006
|
+
for (const key in table) {
|
|
9007
|
+
for (const title in table[key]) {
|
|
9008
|
+
return title || "untitled";
|
|
9009
|
+
}
|
|
9010
|
+
}
|
|
9011
|
+
return "empty";
|
|
9012
|
+
}
|
|
9013
|
+
|
|
9014
|
+
// ../../node_modules/probe.gl/dist/log/init.js
|
|
9015
|
+
if (!globalThis.probe) {
|
|
9016
|
+
globalThis.probe = probe;
|
|
9017
|
+
}
|
|
9018
|
+
|
|
9019
|
+
// ../../node_modules/probe.gl/dist/log/index.js
|
|
9020
|
+
var log = new ProbeLog({ id: "@probe.gl/log" });
|
|
9021
|
+
|
|
8474
9022
|
// ../core/src/polyfills/utils/is-browser.ts
|
|
8475
|
-
var
|
|
9023
|
+
var isBrowser2 = (
|
|
8476
9024
|
// @ts-ignore process.browser
|
|
8477
9025
|
typeof process !== "object" || String(process) !== "[object process]" || process.browser
|
|
8478
9026
|
);
|
|
@@ -10591,10 +11139,10 @@ var nodeVersion = parseInt(import_node_process.versions.node.split(".")[0]);
|
|
|
10591
11139
|
var Blob2 = globalThis.Blob;
|
|
10592
11140
|
var File = globalThis.File;
|
|
10593
11141
|
installFilePolyfills();
|
|
10594
|
-
if (
|
|
10595
|
-
|
|
11142
|
+
if (isBrowser2) {
|
|
11143
|
+
log.error(
|
|
10596
11144
|
"loaders.gl: The @loaders.gl/core/polyfills should only be used in Node.js environments"
|
|
10597
|
-
);
|
|
11145
|
+
)();
|
|
10598
11146
|
}
|
|
10599
11147
|
globalThis.loaders = globalThis.loaders || {};
|
|
10600
11148
|
globalThis.loaders.makeNodeStream = makeNodeStream;
|
|
@@ -10644,15 +11192,15 @@ var NPM_TAG = "beta";
|
|
|
10644
11192
|
|
|
10645
11193
|
// ../core/src/worker-utils/lib/env-utils/version.ts
|
|
10646
11194
|
function getVersion() {
|
|
10647
|
-
const
|
|
11195
|
+
const version3 = false ? NPM_TAG : "5.0.0-beta.8";
|
|
10648
11196
|
globalThis._loadersgl_ = globalThis._loadersgl_ || {};
|
|
10649
|
-
globalThis._loadersgl_.version ||=
|
|
10650
|
-
return
|
|
11197
|
+
globalThis._loadersgl_.version ||= version3;
|
|
11198
|
+
return version3;
|
|
10651
11199
|
}
|
|
10652
|
-
var
|
|
11200
|
+
var VERSION2 = getVersion();
|
|
10653
11201
|
|
|
10654
11202
|
// ../core/src/worker-utils/lib/env-utils/assert.ts
|
|
10655
|
-
function
|
|
11203
|
+
function assert3(condition, message) {
|
|
10656
11204
|
if (!condition) {
|
|
10657
11205
|
throw new Error(message || "loaders.gl assertion failed.");
|
|
10658
11206
|
}
|
|
@@ -10666,15 +11214,15 @@ var globals = {
|
|
|
10666
11214
|
document: typeof document !== "undefined" && document
|
|
10667
11215
|
};
|
|
10668
11216
|
var self_ = globals.self || globals.window || globals.global || {};
|
|
10669
|
-
var
|
|
10670
|
-
var
|
|
10671
|
-
var
|
|
10672
|
-
var
|
|
11217
|
+
var window_2 = globals.window || globals.self || globals.global || {};
|
|
11218
|
+
var global_2 = globals.global || globals.self || globals.window || {};
|
|
11219
|
+
var document_2 = globals.document || {};
|
|
11220
|
+
var isBrowser3 = (
|
|
10673
11221
|
// @ts-ignore process.browser
|
|
10674
11222
|
typeof process !== "object" || String(process) !== "[object process]" || process.browser
|
|
10675
11223
|
);
|
|
10676
11224
|
var isWorker = typeof importScripts === "function";
|
|
10677
|
-
var
|
|
11225
|
+
var isMobile2 = typeof window !== "undefined" && typeof window.orientation !== "undefined";
|
|
10678
11226
|
var matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
10679
11227
|
var nodeVersion2 = matches && parseFloat(matches[1]) || 0;
|
|
10680
11228
|
|
|
@@ -10683,12 +11231,12 @@ var NPM_TAG2 = "latest";
|
|
|
10683
11231
|
|
|
10684
11232
|
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/env-utils/version.js
|
|
10685
11233
|
function getVersion2() {
|
|
10686
|
-
return false ? NPM_TAG2 : "5.0.0-beta.
|
|
11234
|
+
return false ? NPM_TAG2 : "5.0.0-beta.8";
|
|
10687
11235
|
}
|
|
10688
|
-
var
|
|
11236
|
+
var VERSION3 = getVersion2();
|
|
10689
11237
|
|
|
10690
11238
|
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/env-utils/assert.js
|
|
10691
|
-
function
|
|
11239
|
+
function assert4(condition, message) {
|
|
10692
11240
|
if (!condition) {
|
|
10693
11241
|
throw new Error(message || "loaders.gl assertion failed.");
|
|
10694
11242
|
}
|
|
@@ -10702,14 +11250,14 @@ var globals2 = {
|
|
|
10702
11250
|
document: typeof document !== "undefined" && document
|
|
10703
11251
|
};
|
|
10704
11252
|
var self_2 = globals2.self || globals2.window || globals2.global || {};
|
|
10705
|
-
var
|
|
10706
|
-
var
|
|
10707
|
-
var
|
|
10708
|
-
var
|
|
11253
|
+
var window_3 = globals2.window || globals2.self || globals2.global || {};
|
|
11254
|
+
var global_3 = globals2.global || globals2.self || globals2.window || {};
|
|
11255
|
+
var document_3 = globals2.document || {};
|
|
11256
|
+
var isBrowser4 = (
|
|
10709
11257
|
// @ts-ignore process.browser
|
|
10710
11258
|
typeof process !== "object" || String(process) !== "[object process]" || process.browser
|
|
10711
11259
|
);
|
|
10712
|
-
var
|
|
11260
|
+
var isMobile3 = typeof window !== "undefined" && typeof window.orientation !== "undefined";
|
|
10713
11261
|
var matches2 = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
10714
11262
|
var nodeVersion3 = matches2 && parseFloat(matches2[1]) || 0;
|
|
10715
11263
|
|
|
@@ -10842,7 +11390,7 @@ var NodeWorker = import_worker_threads.Worker;
|
|
|
10842
11390
|
var workerURLCache = /* @__PURE__ */ new Map();
|
|
10843
11391
|
function getLoadableWorkerURL(props) {
|
|
10844
11392
|
var _a5, _b2, _c2;
|
|
10845
|
-
|
|
11393
|
+
assert4(props.source && !props.url || !props.source && props.url);
|
|
10846
11394
|
if (props.url && props.workerType === "module") {
|
|
10847
11395
|
const baseUrl = ((_a5 = globalThis.document) == null ? void 0 : _a5.baseURI) ?? ((_b2 = globalThis.location) == null ? void 0 : _b2.href);
|
|
10848
11396
|
if (!baseUrl)
|
|
@@ -10865,7 +11413,7 @@ function getLoadableWorkerURL(props) {
|
|
|
10865
11413
|
workerURLCache.set(props.source, workerURL);
|
|
10866
11414
|
}
|
|
10867
11415
|
}
|
|
10868
|
-
|
|
11416
|
+
assert4(workerURL);
|
|
10869
11417
|
return workerURL;
|
|
10870
11418
|
}
|
|
10871
11419
|
function getLoadableWorkerURLFromURL(url) {
|
|
@@ -10978,14 +11526,14 @@ var NOOP = () => {
|
|
|
10978
11526
|
var WorkerThread = class {
|
|
10979
11527
|
/** Checks if workers are supported on this platform */
|
|
10980
11528
|
static isSupported() {
|
|
10981
|
-
return typeof Worker !== "undefined" &&
|
|
11529
|
+
return typeof Worker !== "undefined" && isBrowser4 || typeof NodeWorker !== "undefined" && !isBrowser4;
|
|
10982
11530
|
}
|
|
10983
11531
|
constructor(props) {
|
|
10984
11532
|
this.terminated = false;
|
|
10985
11533
|
this.createdAt = performance.now();
|
|
10986
11534
|
this._loadableURL = "";
|
|
10987
11535
|
const { name, source, url, getUrl, loadWorker } = props;
|
|
10988
|
-
|
|
11536
|
+
assert4(source || url || getUrl || loadWorker);
|
|
10989
11537
|
this.name = name;
|
|
10990
11538
|
this.source = source;
|
|
10991
11539
|
this.url = url;
|
|
@@ -10995,7 +11543,7 @@ var WorkerThread = class {
|
|
|
10995
11543
|
this.onMessage = NOOP;
|
|
10996
11544
|
this.onError = (error) => console.log(error);
|
|
10997
11545
|
const startedAt = performance.now();
|
|
10998
|
-
this.worker =
|
|
11546
|
+
this.worker = isBrowser4 ? this._createBrowserWorker() : this._createNodeWorker();
|
|
10999
11547
|
this.creationTimeMs = performance.now() - startedAt;
|
|
11000
11548
|
}
|
|
11001
11549
|
/**
|
|
@@ -11014,13 +11562,13 @@ var WorkerThread = class {
|
|
|
11014
11562
|
}
|
|
11015
11563
|
/** Keeps this worker from preventing Node.js process exit while idle. */
|
|
11016
11564
|
unref() {
|
|
11017
|
-
if (!
|
|
11565
|
+
if (!isBrowser4 && typeof this.worker.unref === "function") {
|
|
11018
11566
|
this.worker.unref();
|
|
11019
11567
|
}
|
|
11020
11568
|
}
|
|
11021
11569
|
/** Keeps this worker alive while it is actively processing a job. */
|
|
11022
11570
|
ref() {
|
|
11023
|
-
if (!
|
|
11571
|
+
if (!isBrowser4 && typeof this.worker.ref === "function") {
|
|
11024
11572
|
this.worker.ref();
|
|
11025
11573
|
}
|
|
11026
11574
|
}
|
|
@@ -11680,7 +12228,7 @@ var WorkerPool = class {
|
|
|
11680
12228
|
return null;
|
|
11681
12229
|
}
|
|
11682
12230
|
_getMaxConcurrency() {
|
|
11683
|
-
return
|
|
12231
|
+
return isMobile3 ? this.maxMobileConcurrency : this.maxConcurrency;
|
|
11684
12232
|
}
|
|
11685
12233
|
};
|
|
11686
12234
|
|
|
@@ -11962,16 +12510,16 @@ var AsyncQueue = class {
|
|
|
11962
12510
|
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-api/get-worker-url.js
|
|
11963
12511
|
var warnedWorkerVersionFallbacks = /* @__PURE__ */ new Set();
|
|
11964
12512
|
function getWorkerName(worker) {
|
|
11965
|
-
const warning = worker.version !==
|
|
12513
|
+
const warning = worker.version !== VERSION3 ? ` (worker-utils@${VERSION3})` : "";
|
|
11966
12514
|
return `${worker.name}@${worker.version}${warning}`;
|
|
11967
12515
|
}
|
|
11968
12516
|
function getCustomWorkerURL(worker, options = {}) {
|
|
11969
12517
|
var _a5, _b2;
|
|
11970
|
-
const workerFile =
|
|
12518
|
+
const workerFile = isBrowser4 ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
11971
12519
|
let url = getConfiguredWorkerURL(worker, options);
|
|
11972
12520
|
const workerType = options._workerType || ((_a5 = options == null ? void 0 : options.core) == null ? void 0 : _a5._workerType);
|
|
11973
12521
|
if (!url && workerType === "test") {
|
|
11974
|
-
if (
|
|
12522
|
+
if (isBrowser4) {
|
|
11975
12523
|
url = `modules/${worker.module}/dist/${workerFile}`;
|
|
11976
12524
|
} else {
|
|
11977
12525
|
const workerSourceDirectory = worker.module === "tasks" && ((_b2 = worker.workerNode) == null ? void 0 : _b2.startsWith("worker-utils/")) ? "worker-utils/workers" : "workers";
|
|
@@ -11989,16 +12537,16 @@ function getWorkerURL(worker, options = {}) {
|
|
|
11989
12537
|
const customWorkerUrl = getCustomWorkerURL(worker, options);
|
|
11990
12538
|
const descriptorWorkerUrl = typeof worker.worker === "string" ? worker.worker : null;
|
|
11991
12539
|
const url = customWorkerUrl || descriptorWorkerUrl || getDefaultWorkerURL(worker, true);
|
|
11992
|
-
|
|
12540
|
+
assert4(url);
|
|
11993
12541
|
return url;
|
|
11994
12542
|
}
|
|
11995
12543
|
function getDefaultWorkerURL(worker, warn = false) {
|
|
11996
|
-
const workerFile =
|
|
11997
|
-
let
|
|
11998
|
-
if (
|
|
11999
|
-
|
|
12544
|
+
const workerFile = isBrowser4 ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
12545
|
+
let version3 = worker.version;
|
|
12546
|
+
if (version3 === "latest") {
|
|
12547
|
+
version3 = NPM_TAG2;
|
|
12000
12548
|
}
|
|
12001
|
-
const versionTag =
|
|
12549
|
+
const versionTag = version3 ? `@${version3}` : "";
|
|
12002
12550
|
const packageName = worker.packageName || `@loaders.gl/${worker.module}`;
|
|
12003
12551
|
const url = `https://unpkg.com/${packageName}${versionTag}/dist/${workerFile}`;
|
|
12004
12552
|
if (warn) {
|
|
@@ -12026,7 +12574,7 @@ function getWorkerCapabilities() {
|
|
|
12026
12574
|
sharedMemory: false,
|
|
12027
12575
|
crossOriginIsolated: isolated
|
|
12028
12576
|
};
|
|
12029
|
-
if (
|
|
12577
|
+
if (isBrowser4 && isolated !== true) {
|
|
12030
12578
|
capabilities.sharedMemoryUnavailableReason = "cross-origin-isolation";
|
|
12031
12579
|
} else if (typeof SharedArrayBuffer === "undefined" || typeof Atomics === "undefined" || typeof structuredClone !== "function") {
|
|
12032
12580
|
capabilities.sharedMemoryUnavailableReason = "unsupported";
|
|
@@ -12366,7 +12914,7 @@ function getWorkerPoolTarget(worker, options, name) {
|
|
|
12366
12914
|
if (customWorkerUrl) {
|
|
12367
12915
|
return { name, url: customWorkerUrl, workerType: options.workerType };
|
|
12368
12916
|
}
|
|
12369
|
-
if (
|
|
12917
|
+
if (isBrowser4 && worker.loadWorker) {
|
|
12370
12918
|
return {
|
|
12371
12919
|
name,
|
|
12372
12920
|
workerType: options.workerType,
|
|
@@ -14018,15 +14566,54 @@ function assertNoTransferAlias(input, options, ownership) {
|
|
|
14018
14566
|
}
|
|
14019
14567
|
}
|
|
14020
14568
|
|
|
14569
|
+
// ../core/src/loader-utils/lib/log-utils/log.ts
|
|
14570
|
+
var VERSION4 = true ? "5.0.0-beta.8" : "latest";
|
|
14571
|
+
var version2 = VERSION4[0] >= "0" && VERSION4[0] <= "9" ? `v${VERSION4}` : "";
|
|
14572
|
+
function createLog() {
|
|
14573
|
+
const log4 = new ProbeLog({ id: "loaders.gl" });
|
|
14574
|
+
globalThis.loaders ||= {};
|
|
14575
|
+
globalThis.loaders.log = log4;
|
|
14576
|
+
globalThis.loaders.version = version2;
|
|
14577
|
+
globalThis.probe ||= {};
|
|
14578
|
+
globalThis.probe.loaders = log4;
|
|
14579
|
+
return log4;
|
|
14580
|
+
}
|
|
14581
|
+
var log3 = createLog();
|
|
14582
|
+
var NullLog = class {
|
|
14583
|
+
/** Discards debug messages. */
|
|
14584
|
+
log() {
|
|
14585
|
+
return ignoreMessage;
|
|
14586
|
+
}
|
|
14587
|
+
/** Discards informational messages. */
|
|
14588
|
+
info() {
|
|
14589
|
+
return ignoreMessage;
|
|
14590
|
+
}
|
|
14591
|
+
/** Discards messages marked to be emitted once. */
|
|
14592
|
+
once() {
|
|
14593
|
+
return ignoreMessage;
|
|
14594
|
+
}
|
|
14595
|
+
/** Discards warnings. */
|
|
14596
|
+
warn() {
|
|
14597
|
+
return ignoreMessage;
|
|
14598
|
+
}
|
|
14599
|
+
/** Discards errors. */
|
|
14600
|
+
error() {
|
|
14601
|
+
return ignoreMessage;
|
|
14602
|
+
}
|
|
14603
|
+
};
|
|
14604
|
+
function ignoreMessage() {
|
|
14605
|
+
}
|
|
14606
|
+
var nullLog = new NullLog();
|
|
14607
|
+
|
|
14021
14608
|
// ../core/src/worker-utils/lib/worker-api/get-worker-url.ts
|
|
14022
14609
|
var warnedWorkerVersionFallbacks2 = /* @__PURE__ */ new Set();
|
|
14023
14610
|
function getCustomWorkerURL2(worker, options = {}) {
|
|
14024
14611
|
var _a5, _b2;
|
|
14025
|
-
const workerFile =
|
|
14612
|
+
const workerFile = isBrowser3 ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
14026
14613
|
let url = getConfiguredWorkerURL2(worker, options);
|
|
14027
14614
|
const workerType = options._workerType || ((_a5 = options == null ? void 0 : options.core) == null ? void 0 : _a5._workerType);
|
|
14028
14615
|
if (!url && workerType === "test") {
|
|
14029
|
-
if (
|
|
14616
|
+
if (isBrowser3) {
|
|
14030
14617
|
url = `modules/${worker.module}/dist/${workerFile}`;
|
|
14031
14618
|
} else {
|
|
14032
14619
|
const workerSourceDirectory = worker.module === "core" && ((_b2 = worker.workerNode) == null ? void 0 : _b2.startsWith("worker-utils/")) ? "worker-utils/workers" : "workers";
|
|
@@ -14044,16 +14631,16 @@ function getWorkerURL2(worker, options = {}) {
|
|
|
14044
14631
|
const customWorkerUrl = getCustomWorkerURL2(worker, options);
|
|
14045
14632
|
const descriptorWorkerUrl = typeof worker.worker === "string" ? worker.worker : null;
|
|
14046
14633
|
const url = customWorkerUrl || descriptorWorkerUrl || getDefaultWorkerURL2(worker, true);
|
|
14047
|
-
|
|
14634
|
+
assert3(url);
|
|
14048
14635
|
return url;
|
|
14049
14636
|
}
|
|
14050
14637
|
function getDefaultWorkerURL2(worker, warn = false) {
|
|
14051
|
-
const workerFile =
|
|
14052
|
-
let
|
|
14053
|
-
if (
|
|
14054
|
-
|
|
14638
|
+
const workerFile = isBrowser3 ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
14639
|
+
let version3 = worker.version;
|
|
14640
|
+
if (version3 === "latest") {
|
|
14641
|
+
version3 = NPM_TAG;
|
|
14055
14642
|
}
|
|
14056
|
-
const versionTag =
|
|
14643
|
+
const versionTag = version3 ? `@${version3}` : "";
|
|
14057
14644
|
const url = `https://unpkg.com/@loaders.gl/${worker.module}${versionTag}/dist/${workerFile}`;
|
|
14058
14645
|
if (warn) {
|
|
14059
14646
|
warnIfUsingNpmTagFallback2(worker, url);
|
|
@@ -14069,9 +14656,9 @@ function warnIfUsingNpmTagFallback2(worker, url) {
|
|
|
14069
14656
|
return;
|
|
14070
14657
|
}
|
|
14071
14658
|
warnedWorkerVersionFallbacks2.add(workerId);
|
|
14072
|
-
|
|
14659
|
+
log3.warn(
|
|
14073
14660
|
`loaders.gl: ${worker.name} loader worker version is "latest" because __VERSION__ was not injected. Fetching ${url} from CDN.`
|
|
14074
|
-
);
|
|
14661
|
+
)();
|
|
14075
14662
|
}
|
|
14076
14663
|
|
|
14077
14664
|
// ../core/src/worker-utils/lib/worker-api/task-runtime.ts
|
|
@@ -14146,7 +14733,7 @@ var runners = /* @__PURE__ */ new WeakMap();
|
|
|
14146
14733
|
var activeRunners = /* @__PURE__ */ new Set();
|
|
14147
14734
|
var moduleWorkerUrls = /* @__PURE__ */ new Map();
|
|
14148
14735
|
function canProcessOnWorker2(worker, options = {}) {
|
|
14149
|
-
const supported =
|
|
14736
|
+
const supported = isBrowser3 ? typeof Worker !== "undefined" : Boolean(options._nodeWorkers);
|
|
14150
14737
|
return Boolean(
|
|
14151
14738
|
supported && options.worker && (worker.worker || worker.loadWorker || getConfiguredWorkerURL2(worker, options))
|
|
14152
14739
|
);
|
|
@@ -14175,7 +14762,7 @@ function getTask(worker, options) {
|
|
|
14175
14762
|
throw new Error(
|
|
14176
14763
|
"Inline legacy worker source is unsupported; use a TaskRunner worker URL or factory"
|
|
14177
14764
|
);
|
|
14178
|
-
const create = !getCustomWorkerURL2(worker, options) &&
|
|
14765
|
+
const create = !getCustomWorkerURL2(worker, options) && isBrowser3 ? worker.loadWorker : void 0;
|
|
14179
14766
|
const url = getWorkerURL2(worker, options);
|
|
14180
14767
|
return {
|
|
14181
14768
|
id: `${worker.module}:${worker.id}`,
|
|
@@ -14210,7 +14797,7 @@ async function openSession(worker, options, context, jobContext) {
|
|
|
14210
14797
|
if (!state) {
|
|
14211
14798
|
state = {
|
|
14212
14799
|
runner: new TaskRunner({
|
|
14213
|
-
maxConcurrency:
|
|
14800
|
+
maxConcurrency: isMobile2 ? options.maxMobileConcurrency ?? 1 : options.maxConcurrency ?? 3
|
|
14214
14801
|
}),
|
|
14215
14802
|
requests: 0
|
|
14216
14803
|
};
|
|
@@ -14473,15 +15060,15 @@ function getLibraryUrl(library, moduleName, options = {}, libraryName = null) {
|
|
|
14473
15060
|
if (!options.useLocalLibraries && library.startsWith("http")) {
|
|
14474
15061
|
return library;
|
|
14475
15062
|
}
|
|
14476
|
-
if (!
|
|
15063
|
+
if (!isBrowser3) {
|
|
14477
15064
|
return `modules/${moduleName}/dist/libs/${libraryName}`;
|
|
14478
15065
|
}
|
|
14479
15066
|
if (options.CDN) {
|
|
14480
15067
|
if (typeof options.CDN !== "string") {
|
|
14481
15068
|
throw new Error("loadLibrary: options.CDN must be a string or null");
|
|
14482
15069
|
}
|
|
14483
|
-
|
|
14484
|
-
return `${options.CDN}/${moduleName}@${
|
|
15070
|
+
assert3(options.CDN.startsWith("http"));
|
|
15071
|
+
return `${options.CDN}/${moduleName}@${VERSION2}/dist/libs/${libraryName}`;
|
|
14485
15072
|
}
|
|
14486
15073
|
if (isWorker) {
|
|
14487
15074
|
return libraryName.endsWith(".mjs") ? `./libs/${libraryName}` : `../src/libs/${libraryName}`;
|
|
@@ -14492,7 +15079,7 @@ async function loadLibraryFromFile(libraryUrl, moduleLibraryUrl) {
|
|
|
14492
15079
|
if (libraryUrl.endsWith("wasm")) {
|
|
14493
15080
|
return await loadAsArrayBuffer(libraryUrl);
|
|
14494
15081
|
}
|
|
14495
|
-
if (!
|
|
15082
|
+
if (!isBrowser3) {
|
|
14496
15083
|
const { requireFromFile: requireFromFile2 } = globalThis.loaders || {};
|
|
14497
15084
|
try {
|
|
14498
15085
|
const result = await (requireFromFile2 == null ? void 0 : requireFromFile2(libraryUrl));
|
|
@@ -14507,7 +15094,7 @@ async function loadLibraryFromFile(libraryUrl, moduleLibraryUrl) {
|
|
|
14507
15094
|
} catch {
|
|
14508
15095
|
}
|
|
14509
15096
|
}
|
|
14510
|
-
|
|
15097
|
+
log3.error(String(error))();
|
|
14511
15098
|
return null;
|
|
14512
15099
|
}
|
|
14513
15100
|
}
|
|
@@ -14544,7 +15131,7 @@ function loadLibraryFromString(scriptSource, id) {
|
|
|
14544
15131
|
}
|
|
14545
15132
|
async function loadAsArrayBuffer(url) {
|
|
14546
15133
|
const { readFileAsArrayBuffer: readFileAsArrayBuffer2 } = globalThis.loaders || {};
|
|
14547
|
-
if (
|
|
15134
|
+
if (isBrowser3 || !readFileAsArrayBuffer2 || url.startsWith("http")) {
|
|
14548
15135
|
const response = await fetch(url);
|
|
14549
15136
|
return await response.arrayBuffer();
|
|
14550
15137
|
}
|
|
@@ -14559,7 +15146,7 @@ async function loadAsArrayBuffer(url) {
|
|
|
14559
15146
|
}
|
|
14560
15147
|
async function loadAsText(url) {
|
|
14561
15148
|
const { readFileAsText: readFileAsText2 } = globalThis.loaders || {};
|
|
14562
|
-
if (
|
|
15149
|
+
if (isBrowser3 || !readFileAsText2 || url.startsWith("http")) {
|
|
14563
15150
|
const response = await fetch(url);
|
|
14564
15151
|
return await response.text();
|
|
14565
15152
|
}
|
|
@@ -14581,10 +15168,10 @@ var globals3 = {
|
|
|
14581
15168
|
document: typeof document !== "undefined" && document
|
|
14582
15169
|
};
|
|
14583
15170
|
var self_3 = globals3.self || globals3.window || globals3.global || {};
|
|
14584
|
-
var
|
|
14585
|
-
var
|
|
14586
|
-
var
|
|
14587
|
-
var
|
|
15171
|
+
var window_4 = globals3.window || globals3.self || globals3.global || {};
|
|
15172
|
+
var global_4 = globals3.global || globals3.self || globals3.window || {};
|
|
15173
|
+
var document_4 = globals3.document || {};
|
|
15174
|
+
var isBrowser5 = (
|
|
14588
15175
|
// @ts-ignore process does not exist on browser
|
|
14589
15176
|
Boolean(typeof process !== "object" || String(process) !== "[object process]" || process.browser)
|
|
14590
15177
|
);
|
|
@@ -14626,7 +15213,7 @@ function canEncodeWithWorker(writer, options) {
|
|
|
14626
15213
|
var _a5, _b2;
|
|
14627
15214
|
const nodeWorkers = (options == null ? void 0 : options._nodeWorkers) ?? ((_a5 = options == null ? void 0 : options.core) == null ? void 0 : _a5._nodeWorkers);
|
|
14628
15215
|
const useWorkers = (options == null ? void 0 : options.worker) ?? ((_b2 = options == null ? void 0 : options.core) == null ? void 0 : _b2.worker);
|
|
14629
|
-
if (!
|
|
15216
|
+
if (!isBrowser5 && !nodeWorkers) {
|
|
14630
15217
|
return false;
|
|
14631
15218
|
}
|
|
14632
15219
|
return canProcessOnWorker2(
|
|
@@ -21413,8 +22000,8 @@ var Footer = class _Footer {
|
|
|
21413
22000
|
static startFooter(builder) {
|
|
21414
22001
|
builder.startObject(5);
|
|
21415
22002
|
}
|
|
21416
|
-
static addVersion(builder,
|
|
21417
|
-
builder.addFieldInt16(0,
|
|
22003
|
+
static addVersion(builder, version3) {
|
|
22004
|
+
builder.addFieldInt16(0, version3, MetadataVersion.V1);
|
|
21418
22005
|
}
|
|
21419
22006
|
static addSchema(builder, schemaOffset) {
|
|
21420
22007
|
builder.addFieldOffset(1, schemaOffset, 0);
|
|
@@ -21644,9 +22231,9 @@ var Footer_ = class {
|
|
|
21644
22231
|
get numDictionaries() {
|
|
21645
22232
|
return this._dictionaryBatches.length;
|
|
21646
22233
|
}
|
|
21647
|
-
constructor(schema,
|
|
22234
|
+
constructor(schema, version3 = MetadataVersion.V5, recordBatches, dictionaryBatches) {
|
|
21648
22235
|
this.schema = schema;
|
|
21649
|
-
this.version =
|
|
22236
|
+
this.version = version3;
|
|
21650
22237
|
recordBatches && (this._recordBatches = recordBatches);
|
|
21651
22238
|
dictionaryBatches && (this._dictionaryBatches = dictionaryBatches);
|
|
21652
22239
|
}
|
|
@@ -21769,8 +22356,8 @@ var Message = class _Message {
|
|
|
21769
22356
|
static startMessage(builder) {
|
|
21770
22357
|
builder.startObject(5);
|
|
21771
22358
|
}
|
|
21772
|
-
static addVersion(builder,
|
|
21773
|
-
builder.addFieldInt16(0,
|
|
22359
|
+
static addVersion(builder, version3) {
|
|
22360
|
+
builder.addFieldInt16(0, version3, MetadataVersion.V1);
|
|
21774
22361
|
}
|
|
21775
22362
|
static addHeaderType(builder, headerType) {
|
|
21776
22363
|
builder.addFieldInt8(1, headerType, MessageHeader.NONE);
|
|
@@ -21804,9 +22391,9 @@ var Message = class _Message {
|
|
|
21804
22391
|
static finishSizePrefixedMessageBuffer(builder, offset) {
|
|
21805
22392
|
builder.finish(offset, void 0, true);
|
|
21806
22393
|
}
|
|
21807
|
-
static createMessage(builder,
|
|
22394
|
+
static createMessage(builder, version3, headerType, headerOffset, bodyLength, customMetadataOffset) {
|
|
21808
22395
|
_Message.startMessage(builder);
|
|
21809
|
-
_Message.addVersion(builder,
|
|
22396
|
+
_Message.addVersion(builder, version3);
|
|
21810
22397
|
_Message.addHeaderType(builder, headerType);
|
|
21811
22398
|
_Message.addHeader(builder, headerOffset);
|
|
21812
22399
|
_Message.addBodyLength(builder, bodyLength);
|
|
@@ -22126,10 +22713,10 @@ var Message2 = class _Message {
|
|
|
22126
22713
|
buf = new ByteBuffer4(toUint8Array2(buf));
|
|
22127
22714
|
const _message = Message.getRootAsMessage(buf);
|
|
22128
22715
|
const bodyLength = _message.bodyLength();
|
|
22129
|
-
const
|
|
22716
|
+
const version3 = _message.version();
|
|
22130
22717
|
const headerType = _message.headerType();
|
|
22131
22718
|
const metadata2 = decodeMessageCustomMetadata(_message);
|
|
22132
|
-
const message = new _Message(bodyLength,
|
|
22719
|
+
const message = new _Message(bodyLength, version3, headerType, void 0, metadata2);
|
|
22133
22720
|
message._createHeader = decodeMessageHeader(_message, headerType);
|
|
22134
22721
|
return message;
|
|
22135
22722
|
}
|
|
@@ -22206,8 +22793,8 @@ var Message2 = class _Message {
|
|
|
22206
22793
|
isDictionaryBatch() {
|
|
22207
22794
|
return this.headerType === MessageHeader.DictionaryBatch;
|
|
22208
22795
|
}
|
|
22209
|
-
constructor(bodyLength,
|
|
22210
|
-
this._version =
|
|
22796
|
+
constructor(bodyLength, version3, headerType, header, metadata2) {
|
|
22797
|
+
this._version = version3;
|
|
22211
22798
|
this._headerType = headerType;
|
|
22212
22799
|
this.body = new Uint8Array(0);
|
|
22213
22800
|
this._compression = header === null || header === void 0 ? void 0 : header.compression;
|
|
@@ -22331,16 +22918,16 @@ BufferRegion["encode"] = encodeBufferRegion;
|
|
|
22331
22918
|
BufferRegion["decode"] = decodeBufferRegion;
|
|
22332
22919
|
BodyCompression2["encode"] = encodeBodyCompression;
|
|
22333
22920
|
BodyCompression2["decode"] = decodeBodyCompression;
|
|
22334
|
-
function decodeSchema(_schema, dictionaries = /* @__PURE__ */ new Map(),
|
|
22921
|
+
function decodeSchema(_schema, dictionaries = /* @__PURE__ */ new Map(), version3 = MetadataVersion.V5) {
|
|
22335
22922
|
const fields = decodeSchemaFields(_schema, dictionaries);
|
|
22336
|
-
return new Schema2(fields, decodeCustomMetadata(_schema), dictionaries,
|
|
22923
|
+
return new Schema2(fields, decodeCustomMetadata(_schema), dictionaries, version3);
|
|
22337
22924
|
}
|
|
22338
|
-
function decodeRecordBatch(batch,
|
|
22339
|
-
const recordBatch = new RecordBatch2(batch.length(), decodeFieldNodes(batch), decodeBuffers(batch,
|
|
22925
|
+
function decodeRecordBatch(batch, version3 = MetadataVersion.V5) {
|
|
22926
|
+
const recordBatch = new RecordBatch2(batch.length(), decodeFieldNodes(batch), decodeBuffers(batch, version3), decodeBodyCompression(batch.compression()), decodeVariadicBufferCounts(batch));
|
|
22340
22927
|
return recordBatch;
|
|
22341
22928
|
}
|
|
22342
|
-
function decodeDictionaryBatch(batch,
|
|
22343
|
-
return new DictionaryBatch2(RecordBatch2.decode(batch.data(),
|
|
22929
|
+
function decodeDictionaryBatch(batch, version3 = MetadataVersion.V5) {
|
|
22930
|
+
return new DictionaryBatch2(RecordBatch2.decode(batch.data(), version3), batch.id(), batch.isDelta());
|
|
22344
22931
|
}
|
|
22345
22932
|
function decodeBufferRegion(b) {
|
|
22346
22933
|
return new BufferRegion(b.offset(), b.length());
|
|
@@ -22357,11 +22944,11 @@ function decodeFieldNodes(batch) {
|
|
|
22357
22944
|
}
|
|
22358
22945
|
return nodes;
|
|
22359
22946
|
}
|
|
22360
|
-
function decodeBuffers(batch,
|
|
22947
|
+
function decodeBuffers(batch, version3) {
|
|
22361
22948
|
const bufferRegions = [];
|
|
22362
22949
|
for (let b, i = -1, j = -1, n = batch.buffersLength(); ++i < n; ) {
|
|
22363
22950
|
if (b = batch.buffers(i)) {
|
|
22364
|
-
if (
|
|
22951
|
+
if (version3 < MetadataVersion.V4) {
|
|
22365
22952
|
b.bb_pos += 8 * (i + 1);
|
|
22366
22953
|
}
|
|
22367
22954
|
bufferRegions[++j] = BufferRegion.decode(b);
|
|
@@ -28475,14 +29062,14 @@ var GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP = {
|
|
|
28475
29062
|
COLOR_0: "COLOR",
|
|
28476
29063
|
TEXCOORD_0: "TEX_COORD"
|
|
28477
29064
|
};
|
|
28478
|
-
var
|
|
29065
|
+
var noop2 = () => {
|
|
28479
29066
|
};
|
|
28480
29067
|
var DracoBuilder = class {
|
|
28481
29068
|
draco;
|
|
28482
29069
|
dracoEncoder;
|
|
28483
29070
|
dracoMeshBuilder;
|
|
28484
29071
|
dracoMetadataBuilder;
|
|
28485
|
-
log =
|
|
29072
|
+
log = noop2;
|
|
28486
29073
|
// draco - the draco decoder, either import `draco3d` or load dynamically
|
|
28487
29074
|
constructor(draco) {
|
|
28488
29075
|
this.draco = draco;
|
|
@@ -28516,7 +29103,7 @@ var DracoBuilder = class {
|
|
|
28516
29103
|
/** Shared implementation for ordinary encoding and report-producing encoding. */
|
|
28517
29104
|
_encodeSync(mesh, options, trackEncodedProperties) {
|
|
28518
29105
|
options = applyDracoEncodingPreset(options);
|
|
28519
|
-
this.log = options.log ||
|
|
29106
|
+
this.log = options.log || noop2;
|
|
28520
29107
|
return options.pointcloud ? this._encodePointCloud(mesh, options, trackEncodedProperties) : this._encodeMesh(mesh, options, trackEncodedProperties);
|
|
28521
29108
|
}
|
|
28522
29109
|
// PRIVATE
|
|
@@ -29108,7 +29695,7 @@ function applyDracoEncodingPreset(options) {
|
|
|
29108
29695
|
// src/draco/lib/draco-library-loader.ts
|
|
29109
29696
|
async function loadLibrary2(libraryUrl, moduleName = null, options = {}, libraryName = null, moduleLibraryName = null) {
|
|
29110
29697
|
var _a5;
|
|
29111
|
-
if (
|
|
29698
|
+
if (isBrowser3 && options.useLocalLibraries && !options.CDN && libraryName && ((_a5 = options.modules) == null ? void 0 : _a5[libraryName]) === void 0) {
|
|
29112
29699
|
const directory = isWorker ? "./libs" : `modules/${moduleName}/dist/libs`;
|
|
29113
29700
|
options = {
|
|
29114
29701
|
...options,
|
|
@@ -29185,7 +29772,7 @@ async function loadDracoEncoder(options) {
|
|
|
29185
29772
|
try {
|
|
29186
29773
|
[encoderLibrary, wasmBinary] = await loadEncoderWasmAssets(options);
|
|
29187
29774
|
} catch (error) {
|
|
29188
|
-
if (
|
|
29775
|
+
if (isBrowser3 || options.useLocalLibraries) {
|
|
29189
29776
|
throw error;
|
|
29190
29777
|
}
|
|
29191
29778
|
[encoderLibrary, wasmBinary] = await loadEncoderWasmAssets({
|
|
@@ -29265,7 +29852,7 @@ function getLibraryCacheKey2(type, options) {
|
|
|
29265
29852
|
}
|
|
29266
29853
|
|
|
29267
29854
|
// src/draco/lib/utils/version.ts
|
|
29268
|
-
var
|
|
29855
|
+
var VERSION5 = true ? "5.0.0-beta.8" : "latest";
|
|
29269
29856
|
|
|
29270
29857
|
// src/draco/draco-format.ts
|
|
29271
29858
|
var DracoFormat = {
|
|
@@ -29297,7 +29884,7 @@ var DracoWriterWorker = {
|
|
|
29297
29884
|
id: "draco-writer",
|
|
29298
29885
|
name: "Draco compressed geometry writer",
|
|
29299
29886
|
module: "scene",
|
|
29300
|
-
version:
|
|
29887
|
+
version: VERSION5,
|
|
29301
29888
|
worker: true,
|
|
29302
29889
|
workerNode: "draco-writer-worker-node.cjs",
|
|
29303
29890
|
/** Node test workers live with the Draco implementation. */
|
|
@@ -29309,7 +29896,7 @@ var DracoWriterWorker = {
|
|
|
29309
29896
|
var DracoWriter = {
|
|
29310
29897
|
...DracoFormat,
|
|
29311
29898
|
name: "DRACO",
|
|
29312
|
-
version:
|
|
29899
|
+
version: VERSION5,
|
|
29313
29900
|
options: {
|
|
29314
29901
|
draco: DEFAULT_DRACO_WRITER_OPTIONS
|
|
29315
29902
|
},
|