@medplum/agent 5.0.12 → 5.0.14
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/cjs/index.cjs +758 -706
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -535,7 +535,7 @@ var require_utf32 = __commonJS({
|
|
|
535
535
|
return this.decoder.end();
|
|
536
536
|
};
|
|
537
537
|
function detectEncoding(bufs, defaultEncoding) {
|
|
538
|
-
var
|
|
538
|
+
var b3 = [];
|
|
539
539
|
var charsProcessed = 0;
|
|
540
540
|
var invalidLE = 0;
|
|
541
541
|
var invalidBE = 0;
|
|
@@ -545,21 +545,21 @@ var require_utf32 = __commonJS({
|
|
|
545
545
|
for (var i = 0; i < bufs.length; i++) {
|
|
546
546
|
var buf = bufs[i];
|
|
547
547
|
for (var j2 = 0; j2 < buf.length; j2++) {
|
|
548
|
-
|
|
549
|
-
if (
|
|
548
|
+
b3.push(buf[j2]);
|
|
549
|
+
if (b3.length === 4) {
|
|
550
550
|
if (charsProcessed === 0) {
|
|
551
|
-
if (
|
|
551
|
+
if (b3[0] === 255 && b3[1] === 254 && b3[2] === 0 && b3[3] === 0) {
|
|
552
552
|
return "utf-32le";
|
|
553
553
|
}
|
|
554
|
-
if (
|
|
554
|
+
if (b3[0] === 0 && b3[1] === 0 && b3[2] === 254 && b3[3] === 255) {
|
|
555
555
|
return "utf-32be";
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
if (
|
|
559
|
-
if (
|
|
560
|
-
if (
|
|
561
|
-
if ((
|
|
562
|
-
|
|
558
|
+
if (b3[0] !== 0 || b3[1] > 16) invalidBE++;
|
|
559
|
+
if (b3[3] !== 0 || b3[2] > 16) invalidLE++;
|
|
560
|
+
if (b3[0] === 0 && b3[1] === 0 && (b3[2] !== 0 || b3[3] !== 0)) bmpCharsBE++;
|
|
561
|
+
if ((b3[0] !== 0 || b3[1] !== 0) && b3[2] === 0 && b3[3] === 0) bmpCharsLE++;
|
|
562
|
+
b3.length = 0;
|
|
563
563
|
charsProcessed++;
|
|
564
564
|
if (charsProcessed >= 100) {
|
|
565
565
|
break outerLoop;
|
|
@@ -686,7 +686,7 @@ var require_utf16 = __commonJS({
|
|
|
686
686
|
return this.decoder.end();
|
|
687
687
|
};
|
|
688
688
|
function detectEncoding(bufs, defaultEncoding) {
|
|
689
|
-
var
|
|
689
|
+
var b3 = [];
|
|
690
690
|
var charsProcessed = 0;
|
|
691
691
|
var asciiCharsLE = 0;
|
|
692
692
|
var asciiCharsBE = 0;
|
|
@@ -694,15 +694,15 @@ var require_utf16 = __commonJS({
|
|
|
694
694
|
for (var i = 0; i < bufs.length; i++) {
|
|
695
695
|
var buf = bufs[i];
|
|
696
696
|
for (var j2 = 0; j2 < buf.length; j2++) {
|
|
697
|
-
|
|
698
|
-
if (
|
|
697
|
+
b3.push(buf[j2]);
|
|
698
|
+
if (b3.length === 2) {
|
|
699
699
|
if (charsProcessed === 0) {
|
|
700
|
-
if (
|
|
701
|
-
if (
|
|
700
|
+
if (b3[0] === 255 && b3[1] === 254) return "utf-16le";
|
|
701
|
+
if (b3[0] === 254 && b3[1] === 255) return "utf-16be";
|
|
702
702
|
}
|
|
703
|
-
if (
|
|
704
|
-
if (
|
|
705
|
-
|
|
703
|
+
if (b3[0] === 0 && b3[1] !== 0) asciiCharsBE++;
|
|
704
|
+
if (b3[0] !== 0 && b3[1] === 0) asciiCharsLE++;
|
|
705
|
+
b3.length = 0;
|
|
706
706
|
charsProcessed++;
|
|
707
707
|
if (charsProcessed >= 100) {
|
|
708
708
|
break outerLoop;
|
|
@@ -3872,7 +3872,7 @@ var require_re = __commonJS({
|
|
|
3872
3872
|
var src = exports2.src = [];
|
|
3873
3873
|
var safeSrc = exports2.safeSrc = [];
|
|
3874
3874
|
var t = exports2.t = {};
|
|
3875
|
-
var
|
|
3875
|
+
var R3 = 0;
|
|
3876
3876
|
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
3877
3877
|
var safeRegexReplacements = [
|
|
3878
3878
|
["\\s", 1],
|
|
@@ -3887,7 +3887,7 @@ var require_re = __commonJS({
|
|
|
3887
3887
|
};
|
|
3888
3888
|
var createToken = (name, value, isGlobal) => {
|
|
3889
3889
|
const safe = makeSafeRegex(value);
|
|
3890
|
-
const index =
|
|
3890
|
+
const index = R3++;
|
|
3891
3891
|
debug(name, index, value);
|
|
3892
3892
|
t[name] = index;
|
|
3893
3893
|
src[index] = value;
|
|
@@ -3968,19 +3968,19 @@ var require_identifiers = __commonJS({
|
|
|
3968
3968
|
"node_modules/semver/internal/identifiers.js"(exports2, module2) {
|
|
3969
3969
|
"use strict";
|
|
3970
3970
|
var numeric = /^[0-9]+$/;
|
|
3971
|
-
var compareIdentifiers = (a,
|
|
3972
|
-
if (typeof a === "number" && typeof
|
|
3973
|
-
return a ===
|
|
3971
|
+
var compareIdentifiers = (a, b3) => {
|
|
3972
|
+
if (typeof a === "number" && typeof b3 === "number") {
|
|
3973
|
+
return a === b3 ? 0 : a < b3 ? -1 : 1;
|
|
3974
3974
|
}
|
|
3975
3975
|
const anum = numeric.test(a);
|
|
3976
|
-
const bnum = numeric.test(
|
|
3976
|
+
const bnum = numeric.test(b3);
|
|
3977
3977
|
if (anum && bnum) {
|
|
3978
3978
|
a = +a;
|
|
3979
|
-
|
|
3979
|
+
b3 = +b3;
|
|
3980
3980
|
}
|
|
3981
|
-
return a ===
|
|
3981
|
+
return a === b3 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b3 ? -1 : 1;
|
|
3982
3982
|
};
|
|
3983
|
-
var rcompareIdentifiers = (a,
|
|
3983
|
+
var rcompareIdentifiers = (a, b3) => compareIdentifiers(b3, a);
|
|
3984
3984
|
module2.exports = {
|
|
3985
3985
|
compareIdentifiers,
|
|
3986
3986
|
rcompareIdentifiers
|
|
@@ -4112,18 +4112,18 @@ var require_semver = __commonJS({
|
|
|
4112
4112
|
let i = 0;
|
|
4113
4113
|
do {
|
|
4114
4114
|
const a = this.prerelease[i];
|
|
4115
|
-
const
|
|
4116
|
-
debug("prerelease compare", i, a,
|
|
4117
|
-
if (a === void 0 &&
|
|
4115
|
+
const b3 = other.prerelease[i];
|
|
4116
|
+
debug("prerelease compare", i, a, b3);
|
|
4117
|
+
if (a === void 0 && b3 === void 0) {
|
|
4118
4118
|
return 0;
|
|
4119
|
-
} else if (
|
|
4119
|
+
} else if (b3 === void 0) {
|
|
4120
4120
|
return 1;
|
|
4121
4121
|
} else if (a === void 0) {
|
|
4122
4122
|
return -1;
|
|
4123
|
-
} else if (a ===
|
|
4123
|
+
} else if (a === b3) {
|
|
4124
4124
|
continue;
|
|
4125
4125
|
} else {
|
|
4126
|
-
return compareIdentifiers(a,
|
|
4126
|
+
return compareIdentifiers(a, b3);
|
|
4127
4127
|
}
|
|
4128
4128
|
} while (++i);
|
|
4129
4129
|
}
|
|
@@ -4134,18 +4134,18 @@ var require_semver = __commonJS({
|
|
|
4134
4134
|
let i = 0;
|
|
4135
4135
|
do {
|
|
4136
4136
|
const a = this.build[i];
|
|
4137
|
-
const
|
|
4138
|
-
debug("build compare", i, a,
|
|
4139
|
-
if (a === void 0 &&
|
|
4137
|
+
const b3 = other.build[i];
|
|
4138
|
+
debug("build compare", i, a, b3);
|
|
4139
|
+
if (a === void 0 && b3 === void 0) {
|
|
4140
4140
|
return 0;
|
|
4141
|
-
} else if (
|
|
4141
|
+
} else if (b3 === void 0) {
|
|
4142
4142
|
return 1;
|
|
4143
4143
|
} else if (a === void 0) {
|
|
4144
4144
|
return -1;
|
|
4145
|
-
} else if (a ===
|
|
4145
|
+
} else if (a === b3) {
|
|
4146
4146
|
continue;
|
|
4147
4147
|
} else {
|
|
4148
|
-
return compareIdentifiers(a,
|
|
4148
|
+
return compareIdentifiers(a, b3);
|
|
4149
4149
|
}
|
|
4150
4150
|
} while (++i);
|
|
4151
4151
|
}
|
|
@@ -4431,7 +4431,7 @@ var require_compare = __commonJS({
|
|
|
4431
4431
|
"node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
4432
4432
|
"use strict";
|
|
4433
4433
|
var SemVer = require_semver();
|
|
4434
|
-
var compare = (a,
|
|
4434
|
+
var compare = (a, b3, loose) => new SemVer(a, loose).compare(new SemVer(b3, loose));
|
|
4435
4435
|
module2.exports = compare;
|
|
4436
4436
|
}
|
|
4437
4437
|
});
|
|
@@ -4441,7 +4441,7 @@ var require_rcompare = __commonJS({
|
|
|
4441
4441
|
"node_modules/semver/functions/rcompare.js"(exports2, module2) {
|
|
4442
4442
|
"use strict";
|
|
4443
4443
|
var compare = require_compare();
|
|
4444
|
-
var rcompare = (a,
|
|
4444
|
+
var rcompare = (a, b3, loose) => compare(b3, a, loose);
|
|
4445
4445
|
module2.exports = rcompare;
|
|
4446
4446
|
}
|
|
4447
4447
|
});
|
|
@@ -4451,7 +4451,7 @@ var require_compare_loose = __commonJS({
|
|
|
4451
4451
|
"node_modules/semver/functions/compare-loose.js"(exports2, module2) {
|
|
4452
4452
|
"use strict";
|
|
4453
4453
|
var compare = require_compare();
|
|
4454
|
-
var compareLoose = (a,
|
|
4454
|
+
var compareLoose = (a, b3) => compare(a, b3, true);
|
|
4455
4455
|
module2.exports = compareLoose;
|
|
4456
4456
|
}
|
|
4457
4457
|
});
|
|
@@ -4461,9 +4461,9 @@ var require_compare_build = __commonJS({
|
|
|
4461
4461
|
"node_modules/semver/functions/compare-build.js"(exports2, module2) {
|
|
4462
4462
|
"use strict";
|
|
4463
4463
|
var SemVer = require_semver();
|
|
4464
|
-
var compareBuild = (a,
|
|
4464
|
+
var compareBuild = (a, b3, loose) => {
|
|
4465
4465
|
const versionA = new SemVer(a, loose);
|
|
4466
|
-
const versionB = new SemVer(
|
|
4466
|
+
const versionB = new SemVer(b3, loose);
|
|
4467
4467
|
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
4468
4468
|
};
|
|
4469
4469
|
module2.exports = compareBuild;
|
|
@@ -4475,7 +4475,7 @@ var require_sort = __commonJS({
|
|
|
4475
4475
|
"node_modules/semver/functions/sort.js"(exports2, module2) {
|
|
4476
4476
|
"use strict";
|
|
4477
4477
|
var compareBuild = require_compare_build();
|
|
4478
|
-
var sort = (list, loose) => list.sort((a,
|
|
4478
|
+
var sort = (list, loose) => list.sort((a, b3) => compareBuild(a, b3, loose));
|
|
4479
4479
|
module2.exports = sort;
|
|
4480
4480
|
}
|
|
4481
4481
|
});
|
|
@@ -4485,7 +4485,7 @@ var require_rsort = __commonJS({
|
|
|
4485
4485
|
"node_modules/semver/functions/rsort.js"(exports2, module2) {
|
|
4486
4486
|
"use strict";
|
|
4487
4487
|
var compareBuild = require_compare_build();
|
|
4488
|
-
var rsort = (list, loose) => list.sort((a,
|
|
4488
|
+
var rsort = (list, loose) => list.sort((a, b3) => compareBuild(b3, a, loose));
|
|
4489
4489
|
module2.exports = rsort;
|
|
4490
4490
|
}
|
|
4491
4491
|
});
|
|
@@ -4495,7 +4495,7 @@ var require_gt = __commonJS({
|
|
|
4495
4495
|
"node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
4496
4496
|
"use strict";
|
|
4497
4497
|
var compare = require_compare();
|
|
4498
|
-
var gt = (a,
|
|
4498
|
+
var gt = (a, b3, loose) => compare(a, b3, loose) > 0;
|
|
4499
4499
|
module2.exports = gt;
|
|
4500
4500
|
}
|
|
4501
4501
|
});
|
|
@@ -4505,7 +4505,7 @@ var require_lt = __commonJS({
|
|
|
4505
4505
|
"node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
4506
4506
|
"use strict";
|
|
4507
4507
|
var compare = require_compare();
|
|
4508
|
-
var lt4 = (a,
|
|
4508
|
+
var lt4 = (a, b3, loose) => compare(a, b3, loose) < 0;
|
|
4509
4509
|
module2.exports = lt4;
|
|
4510
4510
|
}
|
|
4511
4511
|
});
|
|
@@ -4515,7 +4515,7 @@ var require_eq = __commonJS({
|
|
|
4515
4515
|
"node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
4516
4516
|
"use strict";
|
|
4517
4517
|
var compare = require_compare();
|
|
4518
|
-
var eq = (a,
|
|
4518
|
+
var eq = (a, b3, loose) => compare(a, b3, loose) === 0;
|
|
4519
4519
|
module2.exports = eq;
|
|
4520
4520
|
}
|
|
4521
4521
|
});
|
|
@@ -4525,7 +4525,7 @@ var require_neq = __commonJS({
|
|
|
4525
4525
|
"node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
4526
4526
|
"use strict";
|
|
4527
4527
|
var compare = require_compare();
|
|
4528
|
-
var neq = (a,
|
|
4528
|
+
var neq = (a, b3, loose) => compare(a, b3, loose) !== 0;
|
|
4529
4529
|
module2.exports = neq;
|
|
4530
4530
|
}
|
|
4531
4531
|
});
|
|
@@ -4535,7 +4535,7 @@ var require_gte = __commonJS({
|
|
|
4535
4535
|
"node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
4536
4536
|
"use strict";
|
|
4537
4537
|
var compare = require_compare();
|
|
4538
|
-
var gte = (a,
|
|
4538
|
+
var gte = (a, b3, loose) => compare(a, b3, loose) >= 0;
|
|
4539
4539
|
module2.exports = gte;
|
|
4540
4540
|
}
|
|
4541
4541
|
});
|
|
@@ -4545,7 +4545,7 @@ var require_lte = __commonJS({
|
|
|
4545
4545
|
"node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
4546
4546
|
"use strict";
|
|
4547
4547
|
var compare = require_compare();
|
|
4548
|
-
var lte = (a,
|
|
4548
|
+
var lte = (a, b3, loose) => compare(a, b3, loose) <= 0;
|
|
4549
4549
|
module2.exports = lte;
|
|
4550
4550
|
}
|
|
4551
4551
|
});
|
|
@@ -4560,38 +4560,38 @@ var require_cmp = __commonJS({
|
|
|
4560
4560
|
var gte = require_gte();
|
|
4561
4561
|
var lt4 = require_lt();
|
|
4562
4562
|
var lte = require_lte();
|
|
4563
|
-
var cmp = (a, op,
|
|
4563
|
+
var cmp = (a, op, b3, loose) => {
|
|
4564
4564
|
switch (op) {
|
|
4565
4565
|
case "===":
|
|
4566
4566
|
if (typeof a === "object") {
|
|
4567
4567
|
a = a.version;
|
|
4568
4568
|
}
|
|
4569
|
-
if (typeof
|
|
4570
|
-
|
|
4569
|
+
if (typeof b3 === "object") {
|
|
4570
|
+
b3 = b3.version;
|
|
4571
4571
|
}
|
|
4572
|
-
return a ===
|
|
4572
|
+
return a === b3;
|
|
4573
4573
|
case "!==":
|
|
4574
4574
|
if (typeof a === "object") {
|
|
4575
4575
|
a = a.version;
|
|
4576
4576
|
}
|
|
4577
|
-
if (typeof
|
|
4578
|
-
|
|
4577
|
+
if (typeof b3 === "object") {
|
|
4578
|
+
b3 = b3.version;
|
|
4579
4579
|
}
|
|
4580
|
-
return a !==
|
|
4580
|
+
return a !== b3;
|
|
4581
4581
|
case "":
|
|
4582
4582
|
case "=":
|
|
4583
4583
|
case "==":
|
|
4584
|
-
return eq(a,
|
|
4584
|
+
return eq(a, b3, loose);
|
|
4585
4585
|
case "!=":
|
|
4586
|
-
return neq(a,
|
|
4586
|
+
return neq(a, b3, loose);
|
|
4587
4587
|
case ">":
|
|
4588
|
-
return gt(a,
|
|
4588
|
+
return gt(a, b3, loose);
|
|
4589
4589
|
case ">=":
|
|
4590
|
-
return gte(a,
|
|
4590
|
+
return gte(a, b3, loose);
|
|
4591
4591
|
case "<":
|
|
4592
|
-
return lt4(a,
|
|
4592
|
+
return lt4(a, b3, loose);
|
|
4593
4593
|
case "<=":
|
|
4594
|
-
return lte(a,
|
|
4594
|
+
return lte(a, b3, loose);
|
|
4595
4595
|
default:
|
|
4596
4596
|
throw new TypeError(`Invalid operator: ${op}`);
|
|
4597
4597
|
}
|
|
@@ -5447,7 +5447,7 @@ var require_simplify = __commonJS({
|
|
|
5447
5447
|
const set = [];
|
|
5448
5448
|
let first = null;
|
|
5449
5449
|
let prev = null;
|
|
5450
|
-
const v3 = versions.sort((a,
|
|
5450
|
+
const v3 = versions.sort((a, b3) => compare(a, b3, options));
|
|
5451
5451
|
for (const version of v3) {
|
|
5452
5452
|
const included = satisfies(version, range, options);
|
|
5453
5453
|
if (included) {
|
|
@@ -5631,19 +5631,19 @@ var require_subset = __commonJS({
|
|
|
5631
5631
|
}
|
|
5632
5632
|
return true;
|
|
5633
5633
|
};
|
|
5634
|
-
var higherGT = (a,
|
|
5634
|
+
var higherGT = (a, b3, options) => {
|
|
5635
5635
|
if (!a) {
|
|
5636
|
-
return
|
|
5636
|
+
return b3;
|
|
5637
5637
|
}
|
|
5638
|
-
const comp = compare(a.semver,
|
|
5639
|
-
return comp > 0 ? a : comp < 0 ?
|
|
5638
|
+
const comp = compare(a.semver, b3.semver, options);
|
|
5639
|
+
return comp > 0 ? a : comp < 0 ? b3 : b3.operator === ">" && a.operator === ">=" ? b3 : a;
|
|
5640
5640
|
};
|
|
5641
|
-
var lowerLT = (a,
|
|
5641
|
+
var lowerLT = (a, b3, options) => {
|
|
5642
5642
|
if (!a) {
|
|
5643
|
-
return
|
|
5643
|
+
return b3;
|
|
5644
5644
|
}
|
|
5645
|
-
const comp = compare(a.semver,
|
|
5646
|
-
return comp < 0 ? a : comp > 0 ?
|
|
5645
|
+
const comp = compare(a.semver, b3.semver, options);
|
|
5646
|
+
return comp < 0 ? a : comp > 0 ? b3 : b3.operator === "<" && a.operator === "<=" ? b3 : a;
|
|
5647
5647
|
};
|
|
5648
5648
|
module2.exports = subset;
|
|
5649
5649
|
}
|
|
@@ -8845,7 +8845,7 @@ var require_stream = __commonJS({
|
|
|
8845
8845
|
this.emit("error", err);
|
|
8846
8846
|
}
|
|
8847
8847
|
}
|
|
8848
|
-
function createWebSocketStream2(
|
|
8848
|
+
function createWebSocketStream2(ws2, options) {
|
|
8849
8849
|
let terminateOnDestroy = true;
|
|
8850
8850
|
const duplex = new Duplex({
|
|
8851
8851
|
...options,
|
|
@@ -8854,65 +8854,65 @@ var require_stream = __commonJS({
|
|
|
8854
8854
|
objectMode: false,
|
|
8855
8855
|
writableObjectMode: false
|
|
8856
8856
|
});
|
|
8857
|
-
|
|
8857
|
+
ws2.on("message", function message(msg, isBinary) {
|
|
8858
8858
|
const data2 = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
|
|
8859
|
-
if (!duplex.push(data2))
|
|
8859
|
+
if (!duplex.push(data2)) ws2.pause();
|
|
8860
8860
|
});
|
|
8861
|
-
|
|
8861
|
+
ws2.once("error", function error(err) {
|
|
8862
8862
|
if (duplex.destroyed) return;
|
|
8863
8863
|
terminateOnDestroy = false;
|
|
8864
8864
|
duplex.destroy(err);
|
|
8865
8865
|
});
|
|
8866
|
-
|
|
8866
|
+
ws2.once("close", function close() {
|
|
8867
8867
|
if (duplex.destroyed) return;
|
|
8868
8868
|
duplex.push(null);
|
|
8869
8869
|
});
|
|
8870
8870
|
duplex._destroy = function(err, callback) {
|
|
8871
|
-
if (
|
|
8871
|
+
if (ws2.readyState === ws2.CLOSED) {
|
|
8872
8872
|
callback(err);
|
|
8873
8873
|
process.nextTick(emitClose, duplex);
|
|
8874
8874
|
return;
|
|
8875
8875
|
}
|
|
8876
8876
|
let called = false;
|
|
8877
|
-
|
|
8877
|
+
ws2.once("error", function error(err2) {
|
|
8878
8878
|
called = true;
|
|
8879
8879
|
callback(err2);
|
|
8880
8880
|
});
|
|
8881
|
-
|
|
8881
|
+
ws2.once("close", function close() {
|
|
8882
8882
|
if (!called) callback(err);
|
|
8883
8883
|
process.nextTick(emitClose, duplex);
|
|
8884
8884
|
});
|
|
8885
|
-
if (terminateOnDestroy)
|
|
8885
|
+
if (terminateOnDestroy) ws2.terminate();
|
|
8886
8886
|
};
|
|
8887
8887
|
duplex._final = function(callback) {
|
|
8888
|
-
if (
|
|
8889
|
-
|
|
8888
|
+
if (ws2.readyState === ws2.CONNECTING) {
|
|
8889
|
+
ws2.once("open", function open() {
|
|
8890
8890
|
duplex._final(callback);
|
|
8891
8891
|
});
|
|
8892
8892
|
return;
|
|
8893
8893
|
}
|
|
8894
|
-
if (
|
|
8895
|
-
if (
|
|
8894
|
+
if (ws2._socket === null) return;
|
|
8895
|
+
if (ws2._socket._writableState.finished) {
|
|
8896
8896
|
callback();
|
|
8897
8897
|
if (duplex._readableState.endEmitted) duplex.destroy();
|
|
8898
8898
|
} else {
|
|
8899
|
-
|
|
8899
|
+
ws2._socket.once("finish", function finish() {
|
|
8900
8900
|
callback();
|
|
8901
8901
|
});
|
|
8902
|
-
|
|
8902
|
+
ws2.close();
|
|
8903
8903
|
}
|
|
8904
8904
|
};
|
|
8905
8905
|
duplex._read = function() {
|
|
8906
|
-
if (
|
|
8906
|
+
if (ws2.isPaused) ws2.resume();
|
|
8907
8907
|
};
|
|
8908
8908
|
duplex._write = function(chunk, encoding, callback) {
|
|
8909
|
-
if (
|
|
8910
|
-
|
|
8909
|
+
if (ws2.readyState === ws2.CONNECTING) {
|
|
8910
|
+
ws2.once("open", function open() {
|
|
8911
8911
|
duplex._write(chunk, encoding, callback);
|
|
8912
8912
|
});
|
|
8913
8913
|
return;
|
|
8914
8914
|
}
|
|
8915
|
-
|
|
8915
|
+
ws2.send(chunk, callback);
|
|
8916
8916
|
};
|
|
8917
8917
|
duplex.on("end", duplexOnEnd);
|
|
8918
8918
|
duplex.on("error", duplexOnError);
|
|
@@ -9282,12 +9282,12 @@ var require_websocket_server = __commonJS({
|
|
|
9282
9282
|
"Connection: Upgrade",
|
|
9283
9283
|
`Sec-WebSocket-Accept: ${digest}`
|
|
9284
9284
|
];
|
|
9285
|
-
const
|
|
9285
|
+
const ws2 = new this.options.WebSocket(null, void 0, this.options);
|
|
9286
9286
|
if (protocols.size) {
|
|
9287
9287
|
const protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value;
|
|
9288
9288
|
if (protocol) {
|
|
9289
9289
|
headers.push(`Sec-WebSocket-Protocol: ${protocol}`);
|
|
9290
|
-
|
|
9290
|
+
ws2._protocol = protocol;
|
|
9291
9291
|
}
|
|
9292
9292
|
}
|
|
9293
9293
|
if (extensions[PerMessageDeflate.extensionName]) {
|
|
@@ -9296,26 +9296,26 @@ var require_websocket_server = __commonJS({
|
|
|
9296
9296
|
[PerMessageDeflate.extensionName]: [params]
|
|
9297
9297
|
});
|
|
9298
9298
|
headers.push(`Sec-WebSocket-Extensions: ${value}`);
|
|
9299
|
-
|
|
9299
|
+
ws2._extensions = extensions;
|
|
9300
9300
|
}
|
|
9301
9301
|
this.emit("headers", headers, req);
|
|
9302
9302
|
socket.write(headers.concat("\r\n").join("\r\n"));
|
|
9303
9303
|
socket.removeListener("error", socketOnError);
|
|
9304
|
-
|
|
9304
|
+
ws2.setSocket(socket, head, {
|
|
9305
9305
|
allowSynchronousEvents: this.options.allowSynchronousEvents,
|
|
9306
9306
|
maxPayload: this.options.maxPayload,
|
|
9307
9307
|
skipUTF8Validation: this.options.skipUTF8Validation
|
|
9308
9308
|
});
|
|
9309
9309
|
if (this.clients) {
|
|
9310
|
-
this.clients.add(
|
|
9311
|
-
|
|
9312
|
-
this.clients.delete(
|
|
9310
|
+
this.clients.add(ws2);
|
|
9311
|
+
ws2.on("close", () => {
|
|
9312
|
+
this.clients.delete(ws2);
|
|
9313
9313
|
if (this._shouldEmitClose && !this.clients.size) {
|
|
9314
9314
|
process.nextTick(emitClose, this);
|
|
9315
9315
|
}
|
|
9316
9316
|
});
|
|
9317
9317
|
}
|
|
9318
|
-
cb(
|
|
9318
|
+
cb(ws2, req);
|
|
9319
9319
|
}
|
|
9320
9320
|
};
|
|
9321
9321
|
module2.exports = WebSocketServer2;
|
|
@@ -10801,12 +10801,12 @@ var require_dcmjs = __commonJS({
|
|
|
10801
10801
|
s.block_start = s.strstart;
|
|
10802
10802
|
flush_pending(s.strm);
|
|
10803
10803
|
};
|
|
10804
|
-
const put_byte = (s,
|
|
10805
|
-
s.pending_buf[s.pending++] =
|
|
10804
|
+
const put_byte = (s, b3) => {
|
|
10805
|
+
s.pending_buf[s.pending++] = b3;
|
|
10806
10806
|
};
|
|
10807
|
-
const putShortMSB = (s,
|
|
10808
|
-
s.pending_buf[s.pending++] =
|
|
10809
|
-
s.pending_buf[s.pending++] =
|
|
10807
|
+
const putShortMSB = (s, b3) => {
|
|
10808
|
+
s.pending_buf[s.pending++] = b3 >>> 8 & 255;
|
|
10809
|
+
s.pending_buf[s.pending++] = b3 & 255;
|
|
10810
10810
|
};
|
|
10811
10811
|
const read_buf = (strm, buf, start, size) => {
|
|
10812
10812
|
let len2 = strm.avail_in;
|
|
@@ -18115,10 +18115,10 @@ var require_dcmjs = __commonJS({
|
|
|
18115
18115
|
}, {
|
|
18116
18116
|
key: "rgb2XYZ",
|
|
18117
18117
|
value: function rgb2XYZ(rgb) {
|
|
18118
|
-
var
|
|
18118
|
+
var R3 = Colors2.invGammaCorrection(rgb[0]);
|
|
18119
18119
|
var G2 = Colors2.invGammaCorrection(rgb[1]);
|
|
18120
|
-
var
|
|
18121
|
-
return [0.41239558896741424 *
|
|
18120
|
+
var B2 = Colors2.invGammaCorrection(rgb[2]);
|
|
18121
|
+
return [0.41239558896741424 * R3 + 0.3575834307637148 * G2 + 0.18049264738170157 * B2, 0.21258623078559555 * R3 + 0.7151703037034108 * G2 + 0.07220049864333623 * B2, 0.019297215491746945 * R3 + 0.11918386458084854 * G2 + 0.9504971251315798 * B2];
|
|
18122
18122
|
}
|
|
18123
18123
|
}, {
|
|
18124
18124
|
key: "xyz2LAB",
|
|
@@ -18142,9 +18142,9 @@ var require_dcmjs = __commonJS({
|
|
|
18142
18142
|
value: function lab2XYZ(lab) {
|
|
18143
18143
|
var L2 = (lab[0] + 16) / 116;
|
|
18144
18144
|
var a = L2 + lab[1] / 500;
|
|
18145
|
-
var
|
|
18145
|
+
var b3 = L2 - lab[2] / 200;
|
|
18146
18146
|
var whitePoint = Colors2.d65WhitePointXYZ();
|
|
18147
|
-
return [whitePoint[0] * Colors2.labfInv(a), whitePoint[1] * Colors2.labfInv(L2), whitePoint[2] * Colors2.labfInv(
|
|
18147
|
+
return [whitePoint[0] * Colors2.labfInv(a), whitePoint[1] * Colors2.labfInv(L2), whitePoint[2] * Colors2.labfInv(b3)];
|
|
18148
18148
|
}
|
|
18149
18149
|
}, {
|
|
18150
18150
|
key: "xyz2RGB",
|
|
@@ -18470,8 +18470,8 @@ var require_dcmjs = __commonJS({
|
|
|
18470
18470
|
var distance2 = ImageNormalizer2.vec3Dot(positionVector, scanAxis);
|
|
18471
18471
|
distanceDatasetPairs.push([distance2, dataset]);
|
|
18472
18472
|
});
|
|
18473
|
-
distanceDatasetPairs.sort(function(a,
|
|
18474
|
-
return
|
|
18473
|
+
distanceDatasetPairs.sort(function(a, b3) {
|
|
18474
|
+
return b3[0] - a[0];
|
|
18475
18475
|
});
|
|
18476
18476
|
if (ds2.BitsAllocated !== 16) {
|
|
18477
18477
|
log2.error("Only works with 16 bit data, not " + String(this.dataset.BitsAllocated));
|
|
@@ -18659,8 +18659,8 @@ var require_dcmjs = __commonJS({
|
|
|
18659
18659
|
}
|
|
18660
18660
|
}], [{
|
|
18661
18661
|
key: "vec3CrossProduct",
|
|
18662
|
-
value: function vec3CrossProduct(a,
|
|
18663
|
-
var ax = a[0], ay = a[1], az = a[2], bx =
|
|
18662
|
+
value: function vec3CrossProduct(a, b3) {
|
|
18663
|
+
var ax = a[0], ay = a[1], az = a[2], bx = b3[0], by = b3[1], bz = b3[2];
|
|
18664
18664
|
var out = [];
|
|
18665
18665
|
out[0] = ay * bz - az * by;
|
|
18666
18666
|
out[1] = az * bx - ax * bz;
|
|
@@ -18669,17 +18669,17 @@ var require_dcmjs = __commonJS({
|
|
|
18669
18669
|
}
|
|
18670
18670
|
}, {
|
|
18671
18671
|
key: "vec3Subtract",
|
|
18672
|
-
value: function vec3Subtract(a,
|
|
18672
|
+
value: function vec3Subtract(a, b3) {
|
|
18673
18673
|
var out = [];
|
|
18674
|
-
out[0] = a[0] -
|
|
18675
|
-
out[1] = a[1] -
|
|
18676
|
-
out[2] = a[2] -
|
|
18674
|
+
out[0] = a[0] - b3[0];
|
|
18675
|
+
out[1] = a[1] - b3[1];
|
|
18676
|
+
out[2] = a[2] - b3[2];
|
|
18677
18677
|
return out;
|
|
18678
18678
|
}
|
|
18679
18679
|
}, {
|
|
18680
18680
|
key: "vec3Dot",
|
|
18681
|
-
value: function vec3Dot(a,
|
|
18682
|
-
return a[0] *
|
|
18681
|
+
value: function vec3Dot(a, b3) {
|
|
18682
|
+
return a[0] * b3[0] + a[1] * b3[1] + a[2] * b3[2];
|
|
18683
18683
|
}
|
|
18684
18684
|
}]);
|
|
18685
18685
|
return ImageNormalizer2;
|
|
@@ -20768,8 +20768,8 @@ var require_dcmjs = __commonJS({
|
|
|
20768
20768
|
var iota = iota_1;
|
|
20769
20769
|
var isBuffer = isBuffer_1;
|
|
20770
20770
|
var hasTypedArrays = typeof Float64Array !== "undefined";
|
|
20771
|
-
function compare1st(a,
|
|
20772
|
-
return a[0] -
|
|
20771
|
+
function compare1st(a, b3) {
|
|
20772
|
+
return a[0] - b3[0];
|
|
20773
20773
|
}
|
|
20774
20774
|
function order() {
|
|
20775
20775
|
var stride = this.stride;
|
|
@@ -21014,8 +21014,8 @@ var require_dcmjs = __commonJS({
|
|
|
21014
21014
|
}
|
|
21015
21015
|
var ndarray = wrappedNDArrayCtor;
|
|
21016
21016
|
var ndarray$1 = /* @__PURE__ */ getDefaultExportFromCjs(ndarray);
|
|
21017
|
-
function crossProduct3D(a,
|
|
21018
|
-
return [a[1] *
|
|
21017
|
+
function crossProduct3D(a, b3) {
|
|
21018
|
+
return [a[1] * b3[2] - a[2] * b3[1], a[2] * b3[0] - a[0] * b3[2], a[0] * b3[1] - a[1] * b3[0]];
|
|
21019
21019
|
}
|
|
21020
21020
|
var flipImageOrientationPatient = {
|
|
21021
21021
|
/**
|
|
@@ -21099,13 +21099,13 @@ var require_dcmjs = __commonJS({
|
|
|
21099
21099
|
}
|
|
21100
21100
|
return result;
|
|
21101
21101
|
}
|
|
21102
|
-
function nearlyEqual(a,
|
|
21102
|
+
function nearlyEqual(a, b3, epsilon) {
|
|
21103
21103
|
var absA = Math.abs(a);
|
|
21104
|
-
var absB = Math.abs(
|
|
21105
|
-
var diff = Math.abs(a -
|
|
21106
|
-
if (a ===
|
|
21104
|
+
var absB = Math.abs(b3);
|
|
21105
|
+
var diff = Math.abs(a - b3);
|
|
21106
|
+
if (a === b3) {
|
|
21107
21107
|
return true;
|
|
21108
|
-
} else if (a === 0 ||
|
|
21108
|
+
} else if (a === 0 || b3 === 0 || absA + absB < epsilon * epsilon) {
|
|
21109
21109
|
return diff < epsilon;
|
|
21110
21110
|
} else {
|
|
21111
21111
|
return diff / Math.min(absA + absB, Number.MAX_VALUE) < epsilon;
|
|
@@ -23577,28 +23577,28 @@ var require_dcmjs = __commonJS({
|
|
|
23577
23577
|
out[2] = z;
|
|
23578
23578
|
return out;
|
|
23579
23579
|
}
|
|
23580
|
-
function add(out, a,
|
|
23581
|
-
out[0] = a[0] +
|
|
23582
|
-
out[1] = a[1] +
|
|
23583
|
-
out[2] = a[2] +
|
|
23580
|
+
function add(out, a, b3) {
|
|
23581
|
+
out[0] = a[0] + b3[0];
|
|
23582
|
+
out[1] = a[1] + b3[1];
|
|
23583
|
+
out[2] = a[2] + b3[2];
|
|
23584
23584
|
return out;
|
|
23585
23585
|
}
|
|
23586
|
-
function subtract$1(out, a,
|
|
23587
|
-
out[0] = a[0] -
|
|
23588
|
-
out[1] = a[1] -
|
|
23589
|
-
out[2] = a[2] -
|
|
23586
|
+
function subtract$1(out, a, b3) {
|
|
23587
|
+
out[0] = a[0] - b3[0];
|
|
23588
|
+
out[1] = a[1] - b3[1];
|
|
23589
|
+
out[2] = a[2] - b3[2];
|
|
23590
23590
|
return out;
|
|
23591
23591
|
}
|
|
23592
|
-
function multiply(out, a,
|
|
23593
|
-
out[0] = a[0] *
|
|
23594
|
-
out[1] = a[1] *
|
|
23595
|
-
out[2] = a[2] *
|
|
23592
|
+
function multiply(out, a, b3) {
|
|
23593
|
+
out[0] = a[0] * b3[0];
|
|
23594
|
+
out[1] = a[1] * b3[1];
|
|
23595
|
+
out[2] = a[2] * b3[2];
|
|
23596
23596
|
return out;
|
|
23597
23597
|
}
|
|
23598
|
-
function divide(out, a,
|
|
23599
|
-
out[0] = a[0] /
|
|
23600
|
-
out[1] = a[1] /
|
|
23601
|
-
out[2] = a[2] /
|
|
23598
|
+
function divide(out, a, b3) {
|
|
23599
|
+
out[0] = a[0] / b3[0];
|
|
23600
|
+
out[1] = a[1] / b3[1];
|
|
23601
|
+
out[2] = a[2] / b3[2];
|
|
23602
23602
|
return out;
|
|
23603
23603
|
}
|
|
23604
23604
|
function ceil(out, a) {
|
|
@@ -23613,16 +23613,16 @@ var require_dcmjs = __commonJS({
|
|
|
23613
23613
|
out[2] = Math.floor(a[2]);
|
|
23614
23614
|
return out;
|
|
23615
23615
|
}
|
|
23616
|
-
function min(out, a,
|
|
23617
|
-
out[0] = Math.min(a[0],
|
|
23618
|
-
out[1] = Math.min(a[1],
|
|
23619
|
-
out[2] = Math.min(a[2],
|
|
23616
|
+
function min(out, a, b3) {
|
|
23617
|
+
out[0] = Math.min(a[0], b3[0]);
|
|
23618
|
+
out[1] = Math.min(a[1], b3[1]);
|
|
23619
|
+
out[2] = Math.min(a[2], b3[2]);
|
|
23620
23620
|
return out;
|
|
23621
23621
|
}
|
|
23622
|
-
function max(out, a,
|
|
23623
|
-
out[0] = Math.max(a[0],
|
|
23624
|
-
out[1] = Math.max(a[1],
|
|
23625
|
-
out[2] = Math.max(a[2],
|
|
23622
|
+
function max(out, a, b3) {
|
|
23623
|
+
out[0] = Math.max(a[0], b3[0]);
|
|
23624
|
+
out[1] = Math.max(a[1], b3[1]);
|
|
23625
|
+
out[2] = Math.max(a[2], b3[2]);
|
|
23626
23626
|
return out;
|
|
23627
23627
|
}
|
|
23628
23628
|
function round(out, a) {
|
|
@@ -23631,28 +23631,28 @@ var require_dcmjs = __commonJS({
|
|
|
23631
23631
|
out[2] = Math.round(a[2]);
|
|
23632
23632
|
return out;
|
|
23633
23633
|
}
|
|
23634
|
-
function scale(out, a,
|
|
23635
|
-
out[0] = a[0] *
|
|
23636
|
-
out[1] = a[1] *
|
|
23637
|
-
out[2] = a[2] *
|
|
23634
|
+
function scale(out, a, b3) {
|
|
23635
|
+
out[0] = a[0] * b3;
|
|
23636
|
+
out[1] = a[1] * b3;
|
|
23637
|
+
out[2] = a[2] * b3;
|
|
23638
23638
|
return out;
|
|
23639
23639
|
}
|
|
23640
|
-
function scaleAndAdd(out, a,
|
|
23641
|
-
out[0] = a[0] +
|
|
23642
|
-
out[1] = a[1] +
|
|
23643
|
-
out[2] = a[2] +
|
|
23640
|
+
function scaleAndAdd(out, a, b3, scale2) {
|
|
23641
|
+
out[0] = a[0] + b3[0] * scale2;
|
|
23642
|
+
out[1] = a[1] + b3[1] * scale2;
|
|
23643
|
+
out[2] = a[2] + b3[2] * scale2;
|
|
23644
23644
|
return out;
|
|
23645
23645
|
}
|
|
23646
|
-
function distance(a,
|
|
23647
|
-
var x3 =
|
|
23648
|
-
var y2 =
|
|
23649
|
-
var z =
|
|
23646
|
+
function distance(a, b3) {
|
|
23647
|
+
var x3 = b3[0] - a[0];
|
|
23648
|
+
var y2 = b3[1] - a[1];
|
|
23649
|
+
var z = b3[2] - a[2];
|
|
23650
23650
|
return Math.hypot(x3, y2, z);
|
|
23651
23651
|
}
|
|
23652
|
-
function squaredDistance(a,
|
|
23653
|
-
var x3 =
|
|
23654
|
-
var y2 =
|
|
23655
|
-
var z =
|
|
23652
|
+
function squaredDistance(a, b3) {
|
|
23653
|
+
var x3 = b3[0] - a[0];
|
|
23654
|
+
var y2 = b3[1] - a[1];
|
|
23655
|
+
var z = b3[2] - a[2];
|
|
23656
23656
|
return x3 * x3 + y2 * y2 + z * z;
|
|
23657
23657
|
}
|
|
23658
23658
|
function squaredLength(a) {
|
|
@@ -23686,38 +23686,38 @@ var require_dcmjs = __commonJS({
|
|
|
23686
23686
|
out[2] = a[2] * len2;
|
|
23687
23687
|
return out;
|
|
23688
23688
|
}
|
|
23689
|
-
function dot(a,
|
|
23690
|
-
return a[0] *
|
|
23689
|
+
function dot(a, b3) {
|
|
23690
|
+
return a[0] * b3[0] + a[1] * b3[1] + a[2] * b3[2];
|
|
23691
23691
|
}
|
|
23692
|
-
function cross$1(out, a,
|
|
23692
|
+
function cross$1(out, a, b3) {
|
|
23693
23693
|
var ax = a[0], ay = a[1], az = a[2];
|
|
23694
|
-
var bx =
|
|
23694
|
+
var bx = b3[0], by = b3[1], bz = b3[2];
|
|
23695
23695
|
out[0] = ay * bz - az * by;
|
|
23696
23696
|
out[1] = az * bx - ax * bz;
|
|
23697
23697
|
out[2] = ax * by - ay * bx;
|
|
23698
23698
|
return out;
|
|
23699
23699
|
}
|
|
23700
|
-
function lerp(out, a,
|
|
23700
|
+
function lerp(out, a, b3, t) {
|
|
23701
23701
|
var ax = a[0];
|
|
23702
23702
|
var ay = a[1];
|
|
23703
23703
|
var az = a[2];
|
|
23704
|
-
out[0] = ax + t * (
|
|
23705
|
-
out[1] = ay + t * (
|
|
23706
|
-
out[2] = az + t * (
|
|
23704
|
+
out[0] = ax + t * (b3[0] - ax);
|
|
23705
|
+
out[1] = ay + t * (b3[1] - ay);
|
|
23706
|
+
out[2] = az + t * (b3[2] - az);
|
|
23707
23707
|
return out;
|
|
23708
23708
|
}
|
|
23709
|
-
function hermite(out, a,
|
|
23709
|
+
function hermite(out, a, b3, c2, d2, t) {
|
|
23710
23710
|
var factorTimes2 = t * t;
|
|
23711
23711
|
var factor1 = factorTimes2 * (2 * t - 3) + 1;
|
|
23712
23712
|
var factor2 = factorTimes2 * (t - 2) + t;
|
|
23713
23713
|
var factor3 = factorTimes2 * (t - 1);
|
|
23714
23714
|
var factor4 = factorTimes2 * (3 - 2 * t);
|
|
23715
|
-
out[0] = a[0] * factor1 +
|
|
23716
|
-
out[1] = a[1] * factor1 +
|
|
23717
|
-
out[2] = a[2] * factor1 +
|
|
23715
|
+
out[0] = a[0] * factor1 + b3[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
|
|
23716
|
+
out[1] = a[1] * factor1 + b3[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
|
|
23717
|
+
out[2] = a[2] * factor1 + b3[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
|
|
23718
23718
|
return out;
|
|
23719
23719
|
}
|
|
23720
|
-
function bezier(out, a,
|
|
23720
|
+
function bezier(out, a, b3, c2, d2, t) {
|
|
23721
23721
|
var inverseFactor = 1 - t;
|
|
23722
23722
|
var inverseFactorTimesTwo = inverseFactor * inverseFactor;
|
|
23723
23723
|
var factorTimes2 = t * t;
|
|
@@ -23725,9 +23725,9 @@ var require_dcmjs = __commonJS({
|
|
|
23725
23725
|
var factor2 = 3 * t * inverseFactorTimesTwo;
|
|
23726
23726
|
var factor3 = 3 * factorTimes2 * inverseFactor;
|
|
23727
23727
|
var factor4 = factorTimes2 * t;
|
|
23728
|
-
out[0] = a[0] * factor1 +
|
|
23729
|
-
out[1] = a[1] * factor1 +
|
|
23730
|
-
out[2] = a[2] * factor1 +
|
|
23728
|
+
out[0] = a[0] * factor1 + b3[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
|
|
23729
|
+
out[1] = a[1] * factor1 + b3[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
|
|
23730
|
+
out[2] = a[2] * factor1 + b3[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
|
|
23731
23731
|
return out;
|
|
23732
23732
|
}
|
|
23733
23733
|
function random(out, scale2) {
|
|
@@ -23773,47 +23773,47 @@ var require_dcmjs = __commonJS({
|
|
|
23773
23773
|
out[2] = z + uvz + uuvz;
|
|
23774
23774
|
return out;
|
|
23775
23775
|
}
|
|
23776
|
-
function rotateX(out, a,
|
|
23776
|
+
function rotateX(out, a, b3, rad) {
|
|
23777
23777
|
var p = [], r6 = [];
|
|
23778
|
-
p[0] = a[0] -
|
|
23779
|
-
p[1] = a[1] -
|
|
23780
|
-
p[2] = a[2] -
|
|
23778
|
+
p[0] = a[0] - b3[0];
|
|
23779
|
+
p[1] = a[1] - b3[1];
|
|
23780
|
+
p[2] = a[2] - b3[2];
|
|
23781
23781
|
r6[0] = p[0];
|
|
23782
23782
|
r6[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);
|
|
23783
23783
|
r6[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad);
|
|
23784
|
-
out[0] = r6[0] +
|
|
23785
|
-
out[1] = r6[1] +
|
|
23786
|
-
out[2] = r6[2] +
|
|
23784
|
+
out[0] = r6[0] + b3[0];
|
|
23785
|
+
out[1] = r6[1] + b3[1];
|
|
23786
|
+
out[2] = r6[2] + b3[2];
|
|
23787
23787
|
return out;
|
|
23788
23788
|
}
|
|
23789
|
-
function rotateY(out, a,
|
|
23789
|
+
function rotateY(out, a, b3, rad) {
|
|
23790
23790
|
var p = [], r6 = [];
|
|
23791
|
-
p[0] = a[0] -
|
|
23792
|
-
p[1] = a[1] -
|
|
23793
|
-
p[2] = a[2] -
|
|
23791
|
+
p[0] = a[0] - b3[0];
|
|
23792
|
+
p[1] = a[1] - b3[1];
|
|
23793
|
+
p[2] = a[2] - b3[2];
|
|
23794
23794
|
r6[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);
|
|
23795
23795
|
r6[1] = p[1];
|
|
23796
23796
|
r6[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad);
|
|
23797
|
-
out[0] = r6[0] +
|
|
23798
|
-
out[1] = r6[1] +
|
|
23799
|
-
out[2] = r6[2] +
|
|
23797
|
+
out[0] = r6[0] + b3[0];
|
|
23798
|
+
out[1] = r6[1] + b3[1];
|
|
23799
|
+
out[2] = r6[2] + b3[2];
|
|
23800
23800
|
return out;
|
|
23801
23801
|
}
|
|
23802
|
-
function rotateZ(out, a,
|
|
23802
|
+
function rotateZ(out, a, b3, rad) {
|
|
23803
23803
|
var p = [], r6 = [];
|
|
23804
|
-
p[0] = a[0] -
|
|
23805
|
-
p[1] = a[1] -
|
|
23806
|
-
p[2] = a[2] -
|
|
23804
|
+
p[0] = a[0] - b3[0];
|
|
23805
|
+
p[1] = a[1] - b3[1];
|
|
23806
|
+
p[2] = a[2] - b3[2];
|
|
23807
23807
|
r6[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);
|
|
23808
23808
|
r6[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);
|
|
23809
23809
|
r6[2] = p[2];
|
|
23810
|
-
out[0] = r6[0] +
|
|
23811
|
-
out[1] = r6[1] +
|
|
23812
|
-
out[2] = r6[2] +
|
|
23810
|
+
out[0] = r6[0] + b3[0];
|
|
23811
|
+
out[1] = r6[1] + b3[1];
|
|
23812
|
+
out[2] = r6[2] + b3[2];
|
|
23813
23813
|
return out;
|
|
23814
23814
|
}
|
|
23815
|
-
function angle(a,
|
|
23816
|
-
var ax = a[0], ay = a[1], az = a[2], bx =
|
|
23815
|
+
function angle(a, b3) {
|
|
23816
|
+
var ax = a[0], ay = a[1], az = a[2], bx = b3[0], by = b3[1], bz = b3[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot(a, b3) / mag;
|
|
23817
23817
|
return Math.acos(Math.min(Math.max(cosine, -1), 1));
|
|
23818
23818
|
}
|
|
23819
23819
|
function zero(out) {
|
|
@@ -23825,12 +23825,12 @@ var require_dcmjs = __commonJS({
|
|
|
23825
23825
|
function str(a) {
|
|
23826
23826
|
return "vec3(" + a[0] + ", " + a[1] + ", " + a[2] + ")";
|
|
23827
23827
|
}
|
|
23828
|
-
function exactEquals(a,
|
|
23829
|
-
return a[0] ===
|
|
23828
|
+
function exactEquals(a, b3) {
|
|
23829
|
+
return a[0] === b3[0] && a[1] === b3[1] && a[2] === b3[2];
|
|
23830
23830
|
}
|
|
23831
|
-
function equals(a,
|
|
23831
|
+
function equals(a, b3) {
|
|
23832
23832
|
var a0 = a[0], a1 = a[1], a2 = a[2];
|
|
23833
|
-
var b0 =
|
|
23833
|
+
var b0 = b3[0], b1 = b3[1], b22 = b3[2];
|
|
23834
23834
|
return Math.abs(a0 - b0) <= EPSILON$1 * Math.max(1, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON$1 * Math.max(1, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b22) <= EPSILON$1 * Math.max(1, Math.abs(a2), Math.abs(b22));
|
|
23835
23835
|
}
|
|
23836
23836
|
var sub = subtract$1;
|
|
@@ -24367,10 +24367,10 @@ var require_dcmjs = __commonJS({
|
|
|
24367
24367
|
}
|
|
24368
24368
|
return den;
|
|
24369
24369
|
}
|
|
24370
|
-
function subtract(a,
|
|
24371
|
-
out[0] = a[0] -
|
|
24372
|
-
out[1] = a[1] -
|
|
24373
|
-
out[2] = a[2] -
|
|
24370
|
+
function subtract(a, b3, out) {
|
|
24371
|
+
out[0] = a[0] - b3[0];
|
|
24372
|
+
out[1] = a[1] - b3[1];
|
|
24373
|
+
out[2] = a[2] - b3[2];
|
|
24374
24374
|
}
|
|
24375
24375
|
function geometryFromFunctionalGroups(dataset, PerFrameFunctionalGroups) {
|
|
24376
24376
|
var geometry = {};
|
|
@@ -26956,8 +26956,8 @@ var require_dcmjs = __commonJS({
|
|
|
26956
26956
|
}]);
|
|
26957
26957
|
var groupItem = _this20[0];
|
|
26958
26958
|
var wereReferencesProvided = [options.referencedRegions !== void 0, options.referencedVolume !== void 0, options.referencedSegmentation !== void 0];
|
|
26959
|
-
var numReferences = wereReferencesProvided.reduce(function(a,
|
|
26960
|
-
return a +
|
|
26959
|
+
var numReferences = wereReferencesProvided.reduce(function(a, b3) {
|
|
26960
|
+
return a + b3;
|
|
26961
26961
|
});
|
|
26962
26962
|
if (numReferences === 0) {
|
|
26963
26963
|
throw new Error("One of the following options must be provided: 'referencedRegions', 'referencedVolume', or 'referencedSegmentation'.");
|
|
@@ -26998,8 +26998,8 @@ var require_dcmjs = __commonJS({
|
|
|
26998
26998
|
function PlanarROIMeasurementsAndQualitativeEvaluations2(options) {
|
|
26999
26999
|
_classCallCheck(this, PlanarROIMeasurementsAndQualitativeEvaluations2);
|
|
27000
27000
|
var wereReferencesProvided = [options.referencedRegion !== void 0, options.referencedSegmentation !== void 0];
|
|
27001
|
-
var numReferences = wereReferencesProvided.reduce(function(a,
|
|
27002
|
-
return a +
|
|
27001
|
+
var numReferences = wereReferencesProvided.reduce(function(a, b3) {
|
|
27002
|
+
return a + b3;
|
|
27003
27003
|
});
|
|
27004
27004
|
if (numReferences === 0) {
|
|
27005
27005
|
throw new Error("One of the following options must be provided: 'referencedRegion', 'referencedSegmentation'.");
|
|
@@ -27192,8 +27192,8 @@ var require_dcmjs = __commonJS({
|
|
|
27192
27192
|
var imageLibraryItem = new ImageLibrary();
|
|
27193
27193
|
(_item$ContentSequence3 = item.ContentSequence).push.apply(_item$ContentSequence3, _toConsumableArray(imageLibraryItem));
|
|
27194
27194
|
var wereOptionsProvided = [options.imagingMeasurements !== void 0, options.derivedImagingMeasurements !== void 0, options.qualitativeEvaluations !== void 0];
|
|
27195
|
-
var numOptionsProvided = wereOptionsProvided.reduce(function(a,
|
|
27196
|
-
return a +
|
|
27195
|
+
var numOptionsProvided = wereOptionsProvided.reduce(function(a, b3) {
|
|
27196
|
+
return a + b3;
|
|
27197
27197
|
});
|
|
27198
27198
|
if (numOptionsProvided > 1) {
|
|
27199
27199
|
throw new Error("Only one of the following options should be provided: 'imagingMeasurements', 'derivedImagingMeasurement', 'qualitativeEvaluations'.");
|
|
@@ -29040,8 +29040,8 @@ var require_util = __commonJS({
|
|
|
29040
29040
|
};
|
|
29041
29041
|
exports2.nearestCommonProto = nearestCommonProto;
|
|
29042
29042
|
var hardMixProtos = (ingredients, constructor, exclude = []) => {
|
|
29043
|
-
var
|
|
29044
|
-
const base = (
|
|
29043
|
+
var _a2;
|
|
29044
|
+
const base = (_a2 = (0, exports2.nearestCommonProto)(...ingredients)) !== null && _a2 !== void 0 ? _a2 : Object.prototype;
|
|
29045
29045
|
const mixedProto = Object.create(base);
|
|
29046
29046
|
const visitedProtos = (0, exports2.protoChain)(base);
|
|
29047
29047
|
for (let prototype of ingredients) {
|
|
@@ -29171,8 +29171,8 @@ var require_mixin_tracking = __commonJS({
|
|
|
29171
29171
|
frontier.forEach((item) => visited.add(item));
|
|
29172
29172
|
const newFrontier = /* @__PURE__ */ new Set();
|
|
29173
29173
|
frontier.forEach((item) => {
|
|
29174
|
-
var
|
|
29175
|
-
const itemConstituents = (
|
|
29174
|
+
var _a2;
|
|
29175
|
+
const itemConstituents = (_a2 = mixins.get(item)) !== null && _a2 !== void 0 ? _a2 : (0, util_1.protoChain)(item.prototype).map((proto) => proto.constructor).filter((item2) => item2 !== null);
|
|
29176
29176
|
if (itemConstituents)
|
|
29177
29177
|
itemConstituents.forEach((constituent) => {
|
|
29178
29178
|
if (!visited.has(constituent) && !frontier.has(constituent))
|
|
@@ -29196,37 +29196,37 @@ var require_decorator = __commonJS({
|
|
|
29196
29196
|
var util_1 = require_util();
|
|
29197
29197
|
var mixin_tracking_1 = require_mixin_tracking();
|
|
29198
29198
|
var mergeObjectsOfDecorators = (o1, o2) => {
|
|
29199
|
-
var
|
|
29199
|
+
var _a2, _b;
|
|
29200
29200
|
const allKeys = (0, util_1.unique)([...Object.getOwnPropertyNames(o1), ...Object.getOwnPropertyNames(o2)]);
|
|
29201
29201
|
const mergedObject = {};
|
|
29202
29202
|
for (let key of allKeys)
|
|
29203
|
-
mergedObject[key] = (0, util_1.unique)([...(
|
|
29203
|
+
mergedObject[key] = (0, util_1.unique)([...(_a2 = o1 === null || o1 === void 0 ? void 0 : o1[key]) !== null && _a2 !== void 0 ? _a2 : [], ...(_b = o2 === null || o2 === void 0 ? void 0 : o2[key]) !== null && _b !== void 0 ? _b : []]);
|
|
29204
29204
|
return mergedObject;
|
|
29205
29205
|
};
|
|
29206
29206
|
var mergePropertyAndMethodDecorators = (d1, d2) => {
|
|
29207
|
-
var
|
|
29207
|
+
var _a2, _b, _c2, _d;
|
|
29208
29208
|
return {
|
|
29209
|
-
property: mergeObjectsOfDecorators((
|
|
29209
|
+
property: mergeObjectsOfDecorators((_a2 = d1 === null || d1 === void 0 ? void 0 : d1.property) !== null && _a2 !== void 0 ? _a2 : {}, (_b = d2 === null || d2 === void 0 ? void 0 : d2.property) !== null && _b !== void 0 ? _b : {}),
|
|
29210
29210
|
method: mergeObjectsOfDecorators((_c2 = d1 === null || d1 === void 0 ? void 0 : d1.method) !== null && _c2 !== void 0 ? _c2 : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.method) !== null && _d !== void 0 ? _d : {})
|
|
29211
29211
|
};
|
|
29212
29212
|
};
|
|
29213
29213
|
var mergeDecorators = (d1, d2) => {
|
|
29214
|
-
var
|
|
29214
|
+
var _a2, _b, _c2, _d, _e2, _f;
|
|
29215
29215
|
return {
|
|
29216
|
-
class: (0, util_1.unique)([...(
|
|
29216
|
+
class: (0, util_1.unique)([...(_a2 = d1 === null || d1 === void 0 ? void 0 : d1.class) !== null && _a2 !== void 0 ? _a2 : [], ...(_b = d2 === null || d2 === void 0 ? void 0 : d2.class) !== null && _b !== void 0 ? _b : []]),
|
|
29217
29217
|
static: mergePropertyAndMethodDecorators((_c2 = d1 === null || d1 === void 0 ? void 0 : d1.static) !== null && _c2 !== void 0 ? _c2 : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.static) !== null && _d !== void 0 ? _d : {}),
|
|
29218
29218
|
instance: mergePropertyAndMethodDecorators((_e2 = d1 === null || d1 === void 0 ? void 0 : d1.instance) !== null && _e2 !== void 0 ? _e2 : {}, (_f = d2 === null || d2 === void 0 ? void 0 : d2.instance) !== null && _f !== void 0 ? _f : {})
|
|
29219
29219
|
};
|
|
29220
29220
|
};
|
|
29221
29221
|
var decorators = /* @__PURE__ */ new Map();
|
|
29222
29222
|
var findAllConstituentClasses = (...classes) => {
|
|
29223
|
-
var
|
|
29223
|
+
var _a2;
|
|
29224
29224
|
const allClasses = /* @__PURE__ */ new Set();
|
|
29225
29225
|
const frontier = /* @__PURE__ */ new Set([...classes]);
|
|
29226
29226
|
while (frontier.size > 0) {
|
|
29227
29227
|
for (let clazz of frontier) {
|
|
29228
29228
|
const protoChainClasses = (0, util_1.protoChain)(clazz.prototype).map((proto) => proto.constructor);
|
|
29229
|
-
const mixinClasses = (
|
|
29229
|
+
const mixinClasses = (_a2 = (0, mixin_tracking_1.getMixinsForClass)(clazz)) !== null && _a2 !== void 0 ? _a2 : [];
|
|
29230
29230
|
const potentiallyNewClasses = [...protoChainClasses, ...mixinClasses];
|
|
29231
29231
|
const newClasses = potentiallyNewClasses.filter((c2) => !allClasses.has(c2));
|
|
29232
29232
|
for (let newClass of newClasses)
|
|
@@ -29275,12 +29275,12 @@ var require_decorator = __commonJS({
|
|
|
29275
29275
|
return decorator(clazz);
|
|
29276
29276
|
});
|
|
29277
29277
|
var decorateMember = (decorator) => ((object, key, ...otherArgs) => {
|
|
29278
|
-
var
|
|
29278
|
+
var _a2, _b, _c2;
|
|
29279
29279
|
const decoratorTargetType = typeof object === "function" ? "static" : "instance";
|
|
29280
29280
|
const decoratorType = typeof object[key] === "function" ? "method" : "property";
|
|
29281
29281
|
const clazz = decoratorTargetType === "static" ? object : object.constructor;
|
|
29282
29282
|
const decoratorsForClass = (0, exports2.getDecoratorsForClass)(clazz);
|
|
29283
|
-
const decoratorsForTargetType = (
|
|
29283
|
+
const decoratorsForTargetType = (_a2 = decoratorsForClass === null || decoratorsForClass === void 0 ? void 0 : decoratorsForClass[decoratorTargetType]) !== null && _a2 !== void 0 ? _a2 : {};
|
|
29284
29284
|
decoratorsForClass[decoratorTargetType] = decoratorsForTargetType;
|
|
29285
29285
|
let decoratorsForType = (_b = decoratorsForTargetType === null || decoratorsForTargetType === void 0 ? void 0 : decoratorsForTargetType[decoratorType]) !== null && _b !== void 0 ? _b : {};
|
|
29286
29286
|
decoratorsForTargetType[decoratorType] = decoratorsForType;
|
|
@@ -29310,7 +29310,7 @@ var require_mixins = __commonJS({
|
|
|
29310
29310
|
var decorator_1 = require_decorator();
|
|
29311
29311
|
var mixin_tracking_1 = require_mixin_tracking();
|
|
29312
29312
|
function Mixin(...constructors) {
|
|
29313
|
-
var
|
|
29313
|
+
var _a2, _b, _c2;
|
|
29314
29314
|
const prototypes = constructors.map((constructor) => constructor.prototype);
|
|
29315
29315
|
const initFunctionName = settings_1.settings.initFunction;
|
|
29316
29316
|
if (initFunctionName !== null) {
|
|
@@ -29333,7 +29333,7 @@ var require_mixins = __commonJS({
|
|
|
29333
29333
|
let DecoratedMixedClass = MixedClass;
|
|
29334
29334
|
if (settings_1.settings.decoratorInheritance !== "none") {
|
|
29335
29335
|
const classDecorators = settings_1.settings.decoratorInheritance === "deep" ? (0, decorator_1.deepDecoratorSearch)(...constructors) : (0, decorator_1.directDecoratorSearch)(...constructors);
|
|
29336
|
-
for (let decorator of (
|
|
29336
|
+
for (let decorator of (_a2 = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.class) !== null && _a2 !== void 0 ? _a2 : []) {
|
|
29337
29337
|
const result = decorator(DecoratedMixedClass);
|
|
29338
29338
|
if (result) {
|
|
29339
29339
|
DecoratedMixedClass = result;
|
|
@@ -30839,12 +30839,12 @@ var require_dcmjs2 = __commonJS({
|
|
|
30839
30839
|
s.block_start = s.strstart;
|
|
30840
30840
|
flush_pending(s.strm);
|
|
30841
30841
|
};
|
|
30842
|
-
const put_byte = (s,
|
|
30843
|
-
s.pending_buf[s.pending++] =
|
|
30842
|
+
const put_byte = (s, b3) => {
|
|
30843
|
+
s.pending_buf[s.pending++] = b3;
|
|
30844
30844
|
};
|
|
30845
|
-
const putShortMSB = (s,
|
|
30846
|
-
s.pending_buf[s.pending++] =
|
|
30847
|
-
s.pending_buf[s.pending++] =
|
|
30845
|
+
const putShortMSB = (s, b3) => {
|
|
30846
|
+
s.pending_buf[s.pending++] = b3 >>> 8 & 255;
|
|
30847
|
+
s.pending_buf[s.pending++] = b3 & 255;
|
|
30848
30848
|
};
|
|
30849
30849
|
const read_buf = (strm, buf, start, size) => {
|
|
30850
30850
|
let len2 = strm.avail_in;
|
|
@@ -37294,10 +37294,10 @@ var require_dcmjs2 = __commonJS({
|
|
|
37294
37294
|
}, {
|
|
37295
37295
|
key: "rgb2XYZ",
|
|
37296
37296
|
value: function rgb2XYZ(rgb) {
|
|
37297
|
-
var
|
|
37297
|
+
var R3 = Colors2.invGammaCorrection(rgb[0]);
|
|
37298
37298
|
var G2 = Colors2.invGammaCorrection(rgb[1]);
|
|
37299
|
-
var
|
|
37300
|
-
return [0.41239558896741424 *
|
|
37299
|
+
var B2 = Colors2.invGammaCorrection(rgb[2]);
|
|
37300
|
+
return [0.41239558896741424 * R3 + 0.3575834307637148 * G2 + 0.18049264738170157 * B2, 0.21258623078559555 * R3 + 0.7151703037034108 * G2 + 0.07220049864333623 * B2, 0.019297215491746945 * R3 + 0.11918386458084854 * G2 + 0.9504971251315798 * B2];
|
|
37301
37301
|
}
|
|
37302
37302
|
}, {
|
|
37303
37303
|
key: "xyz2LAB",
|
|
@@ -37321,9 +37321,9 @@ var require_dcmjs2 = __commonJS({
|
|
|
37321
37321
|
value: function lab2XYZ(lab) {
|
|
37322
37322
|
var L2 = (lab[0] + 16) / 116;
|
|
37323
37323
|
var a = L2 + lab[1] / 500;
|
|
37324
|
-
var
|
|
37324
|
+
var b3 = L2 - lab[2] / 200;
|
|
37325
37325
|
var whitePoint = Colors2.d65WhitePointXYZ();
|
|
37326
|
-
return [whitePoint[0] * Colors2.labfInv(a), whitePoint[1] * Colors2.labfInv(L2), whitePoint[2] * Colors2.labfInv(
|
|
37326
|
+
return [whitePoint[0] * Colors2.labfInv(a), whitePoint[1] * Colors2.labfInv(L2), whitePoint[2] * Colors2.labfInv(b3)];
|
|
37327
37327
|
}
|
|
37328
37328
|
}, {
|
|
37329
37329
|
key: "xyz2RGB",
|
|
@@ -37634,8 +37634,8 @@ var require_dcmjs2 = __commonJS({
|
|
|
37634
37634
|
var distance2 = ImageNormalizer2.vec3Dot(positionVector, scanAxis);
|
|
37635
37635
|
distanceDatasetPairs.push([distance2, dataset]);
|
|
37636
37636
|
});
|
|
37637
|
-
distanceDatasetPairs.sort(function(a,
|
|
37638
|
-
return
|
|
37637
|
+
distanceDatasetPairs.sort(function(a, b3) {
|
|
37638
|
+
return b3[0] - a[0];
|
|
37639
37639
|
});
|
|
37640
37640
|
if (ds2.BitsAllocated !== 16) {
|
|
37641
37641
|
log2.error("Only works with 16 bit data, not " + String(this.dataset.BitsAllocated));
|
|
@@ -37823,8 +37823,8 @@ var require_dcmjs2 = __commonJS({
|
|
|
37823
37823
|
}
|
|
37824
37824
|
}], [{
|
|
37825
37825
|
key: "vec3CrossProduct",
|
|
37826
|
-
value: function vec3CrossProduct(a,
|
|
37827
|
-
var ax = a[0], ay = a[1], az = a[2], bx =
|
|
37826
|
+
value: function vec3CrossProduct(a, b3) {
|
|
37827
|
+
var ax = a[0], ay = a[1], az = a[2], bx = b3[0], by = b3[1], bz = b3[2];
|
|
37828
37828
|
var out = [];
|
|
37829
37829
|
out[0] = ay * bz - az * by;
|
|
37830
37830
|
out[1] = az * bx - ax * bz;
|
|
@@ -37833,17 +37833,17 @@ var require_dcmjs2 = __commonJS({
|
|
|
37833
37833
|
}
|
|
37834
37834
|
}, {
|
|
37835
37835
|
key: "vec3Subtract",
|
|
37836
|
-
value: function vec3Subtract(a,
|
|
37836
|
+
value: function vec3Subtract(a, b3) {
|
|
37837
37837
|
var out = [];
|
|
37838
|
-
out[0] = a[0] -
|
|
37839
|
-
out[1] = a[1] -
|
|
37840
|
-
out[2] = a[2] -
|
|
37838
|
+
out[0] = a[0] - b3[0];
|
|
37839
|
+
out[1] = a[1] - b3[1];
|
|
37840
|
+
out[2] = a[2] - b3[2];
|
|
37841
37841
|
return out;
|
|
37842
37842
|
}
|
|
37843
37843
|
}, {
|
|
37844
37844
|
key: "vec3Dot",
|
|
37845
|
-
value: function vec3Dot(a,
|
|
37846
|
-
return a[0] *
|
|
37845
|
+
value: function vec3Dot(a, b3) {
|
|
37846
|
+
return a[0] * b3[0] + a[1] * b3[1] + a[2] * b3[2];
|
|
37847
37847
|
}
|
|
37848
37848
|
}]);
|
|
37849
37849
|
return ImageNormalizer2;
|
|
@@ -39932,8 +39932,8 @@ var require_dcmjs2 = __commonJS({
|
|
|
39932
39932
|
var iota = iota_1;
|
|
39933
39933
|
var isBuffer = isBuffer_1;
|
|
39934
39934
|
var hasTypedArrays = typeof Float64Array !== "undefined";
|
|
39935
|
-
function compare1st(a,
|
|
39936
|
-
return a[0] -
|
|
39935
|
+
function compare1st(a, b3) {
|
|
39936
|
+
return a[0] - b3[0];
|
|
39937
39937
|
}
|
|
39938
39938
|
function order() {
|
|
39939
39939
|
var stride = this.stride;
|
|
@@ -40178,8 +40178,8 @@ var require_dcmjs2 = __commonJS({
|
|
|
40178
40178
|
}
|
|
40179
40179
|
var ndarray = wrappedNDArrayCtor;
|
|
40180
40180
|
var ndarray$1 = /* @__PURE__ */ getDefaultExportFromCjs(ndarray);
|
|
40181
|
-
function crossProduct3D(a,
|
|
40182
|
-
return [a[1] *
|
|
40181
|
+
function crossProduct3D(a, b3) {
|
|
40182
|
+
return [a[1] * b3[2] - a[2] * b3[1], a[2] * b3[0] - a[0] * b3[2], a[0] * b3[1] - a[1] * b3[0]];
|
|
40183
40183
|
}
|
|
40184
40184
|
var flipImageOrientationPatient = {
|
|
40185
40185
|
/**
|
|
@@ -40263,13 +40263,13 @@ var require_dcmjs2 = __commonJS({
|
|
|
40263
40263
|
}
|
|
40264
40264
|
return result;
|
|
40265
40265
|
}
|
|
40266
|
-
function nearlyEqual(a,
|
|
40266
|
+
function nearlyEqual(a, b3, epsilon) {
|
|
40267
40267
|
var absA = Math.abs(a);
|
|
40268
|
-
var absB = Math.abs(
|
|
40269
|
-
var diff = Math.abs(a -
|
|
40270
|
-
if (a ===
|
|
40268
|
+
var absB = Math.abs(b3);
|
|
40269
|
+
var diff = Math.abs(a - b3);
|
|
40270
|
+
if (a === b3) {
|
|
40271
40271
|
return true;
|
|
40272
|
-
} else if (a === 0 ||
|
|
40272
|
+
} else if (a === 0 || b3 === 0 || absA + absB < epsilon * epsilon) {
|
|
40273
40273
|
return diff < epsilon;
|
|
40274
40274
|
} else {
|
|
40275
40275
|
return diff / Math.min(absA + absB, Number.MAX_VALUE) < epsilon;
|
|
@@ -42741,28 +42741,28 @@ var require_dcmjs2 = __commonJS({
|
|
|
42741
42741
|
out[2] = z;
|
|
42742
42742
|
return out;
|
|
42743
42743
|
}
|
|
42744
|
-
function add(out, a,
|
|
42745
|
-
out[0] = a[0] +
|
|
42746
|
-
out[1] = a[1] +
|
|
42747
|
-
out[2] = a[2] +
|
|
42744
|
+
function add(out, a, b3) {
|
|
42745
|
+
out[0] = a[0] + b3[0];
|
|
42746
|
+
out[1] = a[1] + b3[1];
|
|
42747
|
+
out[2] = a[2] + b3[2];
|
|
42748
42748
|
return out;
|
|
42749
42749
|
}
|
|
42750
|
-
function subtract$1(out, a,
|
|
42751
|
-
out[0] = a[0] -
|
|
42752
|
-
out[1] = a[1] -
|
|
42753
|
-
out[2] = a[2] -
|
|
42750
|
+
function subtract$1(out, a, b3) {
|
|
42751
|
+
out[0] = a[0] - b3[0];
|
|
42752
|
+
out[1] = a[1] - b3[1];
|
|
42753
|
+
out[2] = a[2] - b3[2];
|
|
42754
42754
|
return out;
|
|
42755
42755
|
}
|
|
42756
|
-
function multiply(out, a,
|
|
42757
|
-
out[0] = a[0] *
|
|
42758
|
-
out[1] = a[1] *
|
|
42759
|
-
out[2] = a[2] *
|
|
42756
|
+
function multiply(out, a, b3) {
|
|
42757
|
+
out[0] = a[0] * b3[0];
|
|
42758
|
+
out[1] = a[1] * b3[1];
|
|
42759
|
+
out[2] = a[2] * b3[2];
|
|
42760
42760
|
return out;
|
|
42761
42761
|
}
|
|
42762
|
-
function divide(out, a,
|
|
42763
|
-
out[0] = a[0] /
|
|
42764
|
-
out[1] = a[1] /
|
|
42765
|
-
out[2] = a[2] /
|
|
42762
|
+
function divide(out, a, b3) {
|
|
42763
|
+
out[0] = a[0] / b3[0];
|
|
42764
|
+
out[1] = a[1] / b3[1];
|
|
42765
|
+
out[2] = a[2] / b3[2];
|
|
42766
42766
|
return out;
|
|
42767
42767
|
}
|
|
42768
42768
|
function ceil(out, a) {
|
|
@@ -42777,16 +42777,16 @@ var require_dcmjs2 = __commonJS({
|
|
|
42777
42777
|
out[2] = Math.floor(a[2]);
|
|
42778
42778
|
return out;
|
|
42779
42779
|
}
|
|
42780
|
-
function min(out, a,
|
|
42781
|
-
out[0] = Math.min(a[0],
|
|
42782
|
-
out[1] = Math.min(a[1],
|
|
42783
|
-
out[2] = Math.min(a[2],
|
|
42780
|
+
function min(out, a, b3) {
|
|
42781
|
+
out[0] = Math.min(a[0], b3[0]);
|
|
42782
|
+
out[1] = Math.min(a[1], b3[1]);
|
|
42783
|
+
out[2] = Math.min(a[2], b3[2]);
|
|
42784
42784
|
return out;
|
|
42785
42785
|
}
|
|
42786
|
-
function max(out, a,
|
|
42787
|
-
out[0] = Math.max(a[0],
|
|
42788
|
-
out[1] = Math.max(a[1],
|
|
42789
|
-
out[2] = Math.max(a[2],
|
|
42786
|
+
function max(out, a, b3) {
|
|
42787
|
+
out[0] = Math.max(a[0], b3[0]);
|
|
42788
|
+
out[1] = Math.max(a[1], b3[1]);
|
|
42789
|
+
out[2] = Math.max(a[2], b3[2]);
|
|
42790
42790
|
return out;
|
|
42791
42791
|
}
|
|
42792
42792
|
function round(out, a) {
|
|
@@ -42795,28 +42795,28 @@ var require_dcmjs2 = __commonJS({
|
|
|
42795
42795
|
out[2] = Math.round(a[2]);
|
|
42796
42796
|
return out;
|
|
42797
42797
|
}
|
|
42798
|
-
function scale(out, a,
|
|
42799
|
-
out[0] = a[0] *
|
|
42800
|
-
out[1] = a[1] *
|
|
42801
|
-
out[2] = a[2] *
|
|
42798
|
+
function scale(out, a, b3) {
|
|
42799
|
+
out[0] = a[0] * b3;
|
|
42800
|
+
out[1] = a[1] * b3;
|
|
42801
|
+
out[2] = a[2] * b3;
|
|
42802
42802
|
return out;
|
|
42803
42803
|
}
|
|
42804
|
-
function scaleAndAdd(out, a,
|
|
42805
|
-
out[0] = a[0] +
|
|
42806
|
-
out[1] = a[1] +
|
|
42807
|
-
out[2] = a[2] +
|
|
42804
|
+
function scaleAndAdd(out, a, b3, scale2) {
|
|
42805
|
+
out[0] = a[0] + b3[0] * scale2;
|
|
42806
|
+
out[1] = a[1] + b3[1] * scale2;
|
|
42807
|
+
out[2] = a[2] + b3[2] * scale2;
|
|
42808
42808
|
return out;
|
|
42809
42809
|
}
|
|
42810
|
-
function distance(a,
|
|
42811
|
-
var x3 =
|
|
42812
|
-
var y2 =
|
|
42813
|
-
var z =
|
|
42810
|
+
function distance(a, b3) {
|
|
42811
|
+
var x3 = b3[0] - a[0];
|
|
42812
|
+
var y2 = b3[1] - a[1];
|
|
42813
|
+
var z = b3[2] - a[2];
|
|
42814
42814
|
return Math.hypot(x3, y2, z);
|
|
42815
42815
|
}
|
|
42816
|
-
function squaredDistance(a,
|
|
42817
|
-
var x3 =
|
|
42818
|
-
var y2 =
|
|
42819
|
-
var z =
|
|
42816
|
+
function squaredDistance(a, b3) {
|
|
42817
|
+
var x3 = b3[0] - a[0];
|
|
42818
|
+
var y2 = b3[1] - a[1];
|
|
42819
|
+
var z = b3[2] - a[2];
|
|
42820
42820
|
return x3 * x3 + y2 * y2 + z * z;
|
|
42821
42821
|
}
|
|
42822
42822
|
function squaredLength(a) {
|
|
@@ -42850,38 +42850,38 @@ var require_dcmjs2 = __commonJS({
|
|
|
42850
42850
|
out[2] = a[2] * len2;
|
|
42851
42851
|
return out;
|
|
42852
42852
|
}
|
|
42853
|
-
function dot(a,
|
|
42854
|
-
return a[0] *
|
|
42853
|
+
function dot(a, b3) {
|
|
42854
|
+
return a[0] * b3[0] + a[1] * b3[1] + a[2] * b3[2];
|
|
42855
42855
|
}
|
|
42856
|
-
function cross$1(out, a,
|
|
42856
|
+
function cross$1(out, a, b3) {
|
|
42857
42857
|
var ax = a[0], ay = a[1], az = a[2];
|
|
42858
|
-
var bx =
|
|
42858
|
+
var bx = b3[0], by = b3[1], bz = b3[2];
|
|
42859
42859
|
out[0] = ay * bz - az * by;
|
|
42860
42860
|
out[1] = az * bx - ax * bz;
|
|
42861
42861
|
out[2] = ax * by - ay * bx;
|
|
42862
42862
|
return out;
|
|
42863
42863
|
}
|
|
42864
|
-
function lerp(out, a,
|
|
42864
|
+
function lerp(out, a, b3, t) {
|
|
42865
42865
|
var ax = a[0];
|
|
42866
42866
|
var ay = a[1];
|
|
42867
42867
|
var az = a[2];
|
|
42868
|
-
out[0] = ax + t * (
|
|
42869
|
-
out[1] = ay + t * (
|
|
42870
|
-
out[2] = az + t * (
|
|
42868
|
+
out[0] = ax + t * (b3[0] - ax);
|
|
42869
|
+
out[1] = ay + t * (b3[1] - ay);
|
|
42870
|
+
out[2] = az + t * (b3[2] - az);
|
|
42871
42871
|
return out;
|
|
42872
42872
|
}
|
|
42873
|
-
function hermite(out, a,
|
|
42873
|
+
function hermite(out, a, b3, c2, d2, t) {
|
|
42874
42874
|
var factorTimes2 = t * t;
|
|
42875
42875
|
var factor1 = factorTimes2 * (2 * t - 3) + 1;
|
|
42876
42876
|
var factor2 = factorTimes2 * (t - 2) + t;
|
|
42877
42877
|
var factor3 = factorTimes2 * (t - 1);
|
|
42878
42878
|
var factor4 = factorTimes2 * (3 - 2 * t);
|
|
42879
|
-
out[0] = a[0] * factor1 +
|
|
42880
|
-
out[1] = a[1] * factor1 +
|
|
42881
|
-
out[2] = a[2] * factor1 +
|
|
42879
|
+
out[0] = a[0] * factor1 + b3[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
|
|
42880
|
+
out[1] = a[1] * factor1 + b3[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
|
|
42881
|
+
out[2] = a[2] * factor1 + b3[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
|
|
42882
42882
|
return out;
|
|
42883
42883
|
}
|
|
42884
|
-
function bezier(out, a,
|
|
42884
|
+
function bezier(out, a, b3, c2, d2, t) {
|
|
42885
42885
|
var inverseFactor = 1 - t;
|
|
42886
42886
|
var inverseFactorTimesTwo = inverseFactor * inverseFactor;
|
|
42887
42887
|
var factorTimes2 = t * t;
|
|
@@ -42889,9 +42889,9 @@ var require_dcmjs2 = __commonJS({
|
|
|
42889
42889
|
var factor2 = 3 * t * inverseFactorTimesTwo;
|
|
42890
42890
|
var factor3 = 3 * factorTimes2 * inverseFactor;
|
|
42891
42891
|
var factor4 = factorTimes2 * t;
|
|
42892
|
-
out[0] = a[0] * factor1 +
|
|
42893
|
-
out[1] = a[1] * factor1 +
|
|
42894
|
-
out[2] = a[2] * factor1 +
|
|
42892
|
+
out[0] = a[0] * factor1 + b3[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
|
|
42893
|
+
out[1] = a[1] * factor1 + b3[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
|
|
42894
|
+
out[2] = a[2] * factor1 + b3[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
|
|
42895
42895
|
return out;
|
|
42896
42896
|
}
|
|
42897
42897
|
function random(out, scale2) {
|
|
@@ -42937,47 +42937,47 @@ var require_dcmjs2 = __commonJS({
|
|
|
42937
42937
|
out[2] = z + uvz + uuvz;
|
|
42938
42938
|
return out;
|
|
42939
42939
|
}
|
|
42940
|
-
function rotateX(out, a,
|
|
42940
|
+
function rotateX(out, a, b3, rad) {
|
|
42941
42941
|
var p = [], r6 = [];
|
|
42942
|
-
p[0] = a[0] -
|
|
42943
|
-
p[1] = a[1] -
|
|
42944
|
-
p[2] = a[2] -
|
|
42942
|
+
p[0] = a[0] - b3[0];
|
|
42943
|
+
p[1] = a[1] - b3[1];
|
|
42944
|
+
p[2] = a[2] - b3[2];
|
|
42945
42945
|
r6[0] = p[0];
|
|
42946
42946
|
r6[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);
|
|
42947
42947
|
r6[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad);
|
|
42948
|
-
out[0] = r6[0] +
|
|
42949
|
-
out[1] = r6[1] +
|
|
42950
|
-
out[2] = r6[2] +
|
|
42948
|
+
out[0] = r6[0] + b3[0];
|
|
42949
|
+
out[1] = r6[1] + b3[1];
|
|
42950
|
+
out[2] = r6[2] + b3[2];
|
|
42951
42951
|
return out;
|
|
42952
42952
|
}
|
|
42953
|
-
function rotateY(out, a,
|
|
42953
|
+
function rotateY(out, a, b3, rad) {
|
|
42954
42954
|
var p = [], r6 = [];
|
|
42955
|
-
p[0] = a[0] -
|
|
42956
|
-
p[1] = a[1] -
|
|
42957
|
-
p[2] = a[2] -
|
|
42955
|
+
p[0] = a[0] - b3[0];
|
|
42956
|
+
p[1] = a[1] - b3[1];
|
|
42957
|
+
p[2] = a[2] - b3[2];
|
|
42958
42958
|
r6[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);
|
|
42959
42959
|
r6[1] = p[1];
|
|
42960
42960
|
r6[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad);
|
|
42961
|
-
out[0] = r6[0] +
|
|
42962
|
-
out[1] = r6[1] +
|
|
42963
|
-
out[2] = r6[2] +
|
|
42961
|
+
out[0] = r6[0] + b3[0];
|
|
42962
|
+
out[1] = r6[1] + b3[1];
|
|
42963
|
+
out[2] = r6[2] + b3[2];
|
|
42964
42964
|
return out;
|
|
42965
42965
|
}
|
|
42966
|
-
function rotateZ(out, a,
|
|
42966
|
+
function rotateZ(out, a, b3, rad) {
|
|
42967
42967
|
var p = [], r6 = [];
|
|
42968
|
-
p[0] = a[0] -
|
|
42969
|
-
p[1] = a[1] -
|
|
42970
|
-
p[2] = a[2] -
|
|
42968
|
+
p[0] = a[0] - b3[0];
|
|
42969
|
+
p[1] = a[1] - b3[1];
|
|
42970
|
+
p[2] = a[2] - b3[2];
|
|
42971
42971
|
r6[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);
|
|
42972
42972
|
r6[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);
|
|
42973
42973
|
r6[2] = p[2];
|
|
42974
|
-
out[0] = r6[0] +
|
|
42975
|
-
out[1] = r6[1] +
|
|
42976
|
-
out[2] = r6[2] +
|
|
42974
|
+
out[0] = r6[0] + b3[0];
|
|
42975
|
+
out[1] = r6[1] + b3[1];
|
|
42976
|
+
out[2] = r6[2] + b3[2];
|
|
42977
42977
|
return out;
|
|
42978
42978
|
}
|
|
42979
|
-
function angle(a,
|
|
42980
|
-
var ax = a[0], ay = a[1], az = a[2], bx =
|
|
42979
|
+
function angle(a, b3) {
|
|
42980
|
+
var ax = a[0], ay = a[1], az = a[2], bx = b3[0], by = b3[1], bz = b3[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot(a, b3) / mag;
|
|
42981
42981
|
return Math.acos(Math.min(Math.max(cosine, -1), 1));
|
|
42982
42982
|
}
|
|
42983
42983
|
function zero(out) {
|
|
@@ -42989,12 +42989,12 @@ var require_dcmjs2 = __commonJS({
|
|
|
42989
42989
|
function str(a) {
|
|
42990
42990
|
return "vec3(" + a[0] + ", " + a[1] + ", " + a[2] + ")";
|
|
42991
42991
|
}
|
|
42992
|
-
function exactEquals(a,
|
|
42993
|
-
return a[0] ===
|
|
42992
|
+
function exactEquals(a, b3) {
|
|
42993
|
+
return a[0] === b3[0] && a[1] === b3[1] && a[2] === b3[2];
|
|
42994
42994
|
}
|
|
42995
|
-
function equals(a,
|
|
42995
|
+
function equals(a, b3) {
|
|
42996
42996
|
var a0 = a[0], a1 = a[1], a2 = a[2];
|
|
42997
|
-
var b0 =
|
|
42997
|
+
var b0 = b3[0], b1 = b3[1], b22 = b3[2];
|
|
42998
42998
|
return Math.abs(a0 - b0) <= EPSILON$1 * Math.max(1, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON$1 * Math.max(1, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b22) <= EPSILON$1 * Math.max(1, Math.abs(a2), Math.abs(b22));
|
|
42999
42999
|
}
|
|
43000
43000
|
var sub = subtract$1;
|
|
@@ -43531,10 +43531,10 @@ var require_dcmjs2 = __commonJS({
|
|
|
43531
43531
|
}
|
|
43532
43532
|
return den;
|
|
43533
43533
|
}
|
|
43534
|
-
function subtract(a,
|
|
43535
|
-
out[0] = a[0] -
|
|
43536
|
-
out[1] = a[1] -
|
|
43537
|
-
out[2] = a[2] -
|
|
43534
|
+
function subtract(a, b3, out) {
|
|
43535
|
+
out[0] = a[0] - b3[0];
|
|
43536
|
+
out[1] = a[1] - b3[1];
|
|
43537
|
+
out[2] = a[2] - b3[2];
|
|
43538
43538
|
}
|
|
43539
43539
|
function geometryFromFunctionalGroups(dataset, PerFrameFunctionalGroups) {
|
|
43540
43540
|
var geometry = {};
|
|
@@ -46120,8 +46120,8 @@ var require_dcmjs2 = __commonJS({
|
|
|
46120
46120
|
}]);
|
|
46121
46121
|
var groupItem = _this22[0];
|
|
46122
46122
|
var wereReferencesProvided = [options.referencedRegions !== void 0, options.referencedVolume !== void 0, options.referencedSegmentation !== void 0];
|
|
46123
|
-
var numReferences = wereReferencesProvided.reduce(function(a,
|
|
46124
|
-
return a +
|
|
46123
|
+
var numReferences = wereReferencesProvided.reduce(function(a, b3) {
|
|
46124
|
+
return a + b3;
|
|
46125
46125
|
});
|
|
46126
46126
|
if (numReferences === 0) {
|
|
46127
46127
|
throw new Error("One of the following options must be provided: 'referencedRegions', 'referencedVolume', or 'referencedSegmentation'.");
|
|
@@ -46162,8 +46162,8 @@ var require_dcmjs2 = __commonJS({
|
|
|
46162
46162
|
function PlanarROIMeasurementsAndQualitativeEvaluations2(options) {
|
|
46163
46163
|
_classCallCheck(this, PlanarROIMeasurementsAndQualitativeEvaluations2);
|
|
46164
46164
|
var wereReferencesProvided = [options.referencedRegion !== void 0, options.referencedSegmentation !== void 0];
|
|
46165
|
-
var numReferences = wereReferencesProvided.reduce(function(a,
|
|
46166
|
-
return a +
|
|
46165
|
+
var numReferences = wereReferencesProvided.reduce(function(a, b3) {
|
|
46166
|
+
return a + b3;
|
|
46167
46167
|
});
|
|
46168
46168
|
if (numReferences === 0) {
|
|
46169
46169
|
throw new Error("One of the following options must be provided: 'referencedRegion', 'referencedSegmentation'.");
|
|
@@ -46356,8 +46356,8 @@ var require_dcmjs2 = __commonJS({
|
|
|
46356
46356
|
var imageLibraryItem = new ImageLibrary();
|
|
46357
46357
|
(_item$ContentSequence3 = item.ContentSequence).push.apply(_item$ContentSequence3, _toConsumableArray(imageLibraryItem));
|
|
46358
46358
|
var wereOptionsProvided = [options.imagingMeasurements !== void 0, options.derivedImagingMeasurements !== void 0, options.qualitativeEvaluations !== void 0];
|
|
46359
|
-
var numOptionsProvided = wereOptionsProvided.reduce(function(a,
|
|
46360
|
-
return a +
|
|
46359
|
+
var numOptionsProvided = wereOptionsProvided.reduce(function(a, b3) {
|
|
46360
|
+
return a + b3;
|
|
46361
46361
|
});
|
|
46362
46362
|
if (numOptionsProvided > 1) {
|
|
46363
46363
|
throw new Error("Only one of the following options should be provided: 'imagingMeasurements', 'derivedImagingMeasurement', 'qualitativeEvaluations'.");
|
|
@@ -47749,8 +47749,8 @@ var require_dcmjs_codecs_min = __commonJS({
|
|
|
47749
47749
|
}
|
|
47750
47750
|
e.exports = o2;
|
|
47751
47751
|
}, 237: (e, t, r6) => {
|
|
47752
|
-
const { Codec: s, ExplicitVRBigEndianCodec: o2, ExplicitVRLittleEndianCodec: i, HtJpeg2000LosslessCodec: n, HtJpeg2000LosslessRpclCodec: a, HtJpeg2000LossyCodec: l2, ImplicitVRLittleEndianCodec: c2, Jpeg2000LosslessCodec: d2, Jpeg2000LossyCodec: p, JpegBaselineProcess1Codec: h2, JpegLosslessProcess14V1Codec: m3, JpegLsLosslessCodec: u2, JpegLsLossyCodec: g3, RleLosslessCodec: f2 } = r6(258), { Jpeg2000ProgressionOrder: w3, JpegSampleFactor: P, PhotometricInterpretation: y2, PixelRepresentation: x3, PlanarConfiguration: C2, TransferSyntax:
|
|
47753
|
-
e.exports =
|
|
47752
|
+
const { Codec: s, ExplicitVRBigEndianCodec: o2, ExplicitVRLittleEndianCodec: i, HtJpeg2000LosslessCodec: n, HtJpeg2000LosslessRpclCodec: a, HtJpeg2000LossyCodec: l2, ImplicitVRLittleEndianCodec: c2, Jpeg2000LosslessCodec: d2, Jpeg2000LossyCodec: p, JpegBaselineProcess1Codec: h2, JpegLosslessProcess14V1Codec: m3, JpegLsLosslessCodec: u2, JpegLsLossyCodec: g3, RleLosslessCodec: f2 } = r6(258), { Jpeg2000ProgressionOrder: w3, JpegSampleFactor: P, PhotometricInterpretation: y2, PixelRepresentation: x3, PlanarConfiguration: C2, TransferSyntax: b3 } = r6(492), _2 = r6(234), I3 = r6(25), A3 = r6(190), S2 = { codecs: { Codec: s, ExplicitVRBigEndianCodec: o2, ExplicitVRLittleEndianCodec: i, HtJpeg2000LosslessCodec: n, HtJpeg2000LosslessRpclCodec: a, HtJpeg2000LossyCodec: l2, ImplicitVRLittleEndianCodec: c2, Jpeg2000LosslessCodec: d2, Jpeg2000LossyCodec: p, JpegBaselineProcess1Codec: h2, JpegLosslessProcess14V1Codec: m3, JpegLsLosslessCodec: u2, JpegLsLossyCodec: g3, RleLosslessCodec: f2 }, constants: { Jpeg2000ProgressionOrder: w3, JpegSampleFactor: P, PhotometricInterpretation: y2, PixelRepresentation: x3, PlanarConfiguration: C2, TransferSyntax: b3 }, Context: _2, log: r6(547), NativeCodecs: I3, Transcoder: A3, version: r6(837) };
|
|
47753
|
+
e.exports = S2;
|
|
47754
47754
|
}, 258: (e, t, r6) => {
|
|
47755
47755
|
const { Jpeg2000ProgressionOrder: s, JpegSampleFactor: o2, PhotometricInterpretation: i, PlanarConfiguration: n, TransferSyntax: a } = r6(492), { FrameConverter: l2, Frames: c2 } = r6(859), d2 = r6(234), p = r6(25), h2 = r6(984);
|
|
47756
47756
|
class m3 {
|
|
@@ -47761,7 +47761,7 @@ var require_dcmjs_codecs_min = __commonJS({
|
|
|
47761
47761
|
throw new Error("decode should be implemented");
|
|
47762
47762
|
}
|
|
47763
47763
|
static getCodec(e2) {
|
|
47764
|
-
const t2 = { [a.ImplicitVRLittleEndian]: u2, [a.ExplicitVRLittleEndian]: g3, [a.ExplicitVRBigEndian]: f2, [a.RleLossless]: w3, [a.JpegBaselineProcess1]: y2, [a.JpegLosslessProcess14V1]: x3, [a.JpegLsLossless]:
|
|
47764
|
+
const t2 = { [a.ImplicitVRLittleEndian]: u2, [a.ExplicitVRLittleEndian]: g3, [a.ExplicitVRBigEndian]: f2, [a.RleLossless]: w3, [a.JpegBaselineProcess1]: y2, [a.JpegLosslessProcess14V1]: x3, [a.JpegLsLossless]: b3, [a.JpegLsLossy]: _2, [a.Jpeg2000Lossless]: A3, [a.Jpeg2000Lossy]: S2, [a.HtJpeg2000Lossless]: E3, [a.HtJpeg2000LosslessRpcl]: v3, [a.HtJpeg2000Lossy]: B2 }[e2];
|
|
47765
47765
|
if (!t2) throw new Error(`Codec for transfer syntax UID ${e2} is not implemented`);
|
|
47766
47766
|
return new t2();
|
|
47767
47767
|
}
|
|
@@ -47897,7 +47897,7 @@ var require_dcmjs_codecs_min = __commonJS({
|
|
|
47897
47897
|
return super._baseDecodeImpl(e2, t2, "decodeJpegLs", s2);
|
|
47898
47898
|
}
|
|
47899
47899
|
}
|
|
47900
|
-
class
|
|
47900
|
+
class b3 extends C2 {
|
|
47901
47901
|
encode(e2, t2, r7 = {}) {
|
|
47902
47902
|
return r7.lossy = false, super.encode(e2, t2, r7);
|
|
47903
47903
|
}
|
|
@@ -47945,7 +47945,7 @@ var require_dcmjs_codecs_min = __commonJS({
|
|
|
47945
47945
|
return super.decode(e2, t2, "decodeJpeg2000", r7);
|
|
47946
47946
|
}
|
|
47947
47947
|
}
|
|
47948
|
-
class
|
|
47948
|
+
class S2 extends I3 {
|
|
47949
47949
|
encode(e2, t2, r7 = {}) {
|
|
47950
47950
|
return r7.lossy = true, super.encode(e2, t2, "encodeJpeg2000", r7);
|
|
47951
47951
|
}
|
|
@@ -47969,7 +47969,7 @@ var require_dcmjs_codecs_min = __commonJS({
|
|
|
47969
47969
|
return super.decode(e2, t2, "decodeHtJpeg2000", r7);
|
|
47970
47970
|
}
|
|
47971
47971
|
}
|
|
47972
|
-
class
|
|
47972
|
+
class B2 extends I3 {
|
|
47973
47973
|
encode(e2, t2, r7 = {}) {
|
|
47974
47974
|
return r7.lossy = true, super.encode(e2, t2, "encodeHtJpeg2000", r7);
|
|
47975
47975
|
}
|
|
@@ -47977,7 +47977,7 @@ var require_dcmjs_codecs_min = __commonJS({
|
|
|
47977
47977
|
return super.decode(e2, t2, "decodeHtJpeg2000", r7);
|
|
47978
47978
|
}
|
|
47979
47979
|
}
|
|
47980
|
-
e.exports = { Codec: m3, ExplicitVRBigEndianCodec: f2, ExplicitVRLittleEndianCodec: g3, HtJpeg2000LosslessCodec: E3, HtJpeg2000LosslessRpclCodec: v3, HtJpeg2000LossyCodec:
|
|
47980
|
+
e.exports = { Codec: m3, ExplicitVRBigEndianCodec: f2, ExplicitVRLittleEndianCodec: g3, HtJpeg2000LosslessCodec: E3, HtJpeg2000LosslessRpclCodec: v3, HtJpeg2000LossyCodec: B2, ImplicitVRLittleEndianCodec: u2, Jpeg2000LosslessCodec: A3, Jpeg2000LossyCodec: S2, JpegBaselineProcess1Codec: y2, JpegLosslessProcess14V1Codec: x3, JpegLsLosslessCodec: b3, JpegLsLossyCodec: _2, RleLosslessCodec: w3 };
|
|
47981
47981
|
}, 492: (e) => {
|
|
47982
47982
|
const t = { ImplicitVRLittleEndian: "1.2.840.10008.1.2", ExplicitVRLittleEndian: "1.2.840.10008.1.2.1", ExplicitVRBigEndian: "1.2.840.10008.1.2.2", RleLossless: "1.2.840.10008.1.2.5", JpegBaselineProcess1: "1.2.840.10008.1.2.4.50", JpegLosslessProcess14V1: "1.2.840.10008.1.2.4.70", JpegLsLossless: "1.2.840.10008.1.2.4.80", JpegLsLossy: "1.2.840.10008.1.2.4.81", Jpeg2000Lossless: "1.2.840.10008.1.2.4.90", Jpeg2000Lossy: "1.2.840.10008.1.2.4.91", JpegXlLossless: "1.2.840.10008.1.2.4.110", JpegXlRecompression: "1.2.840.10008.1.2.4.111", JpegXl: "1.2.840.10008.1.2.4.112", HtJpeg2000Lossless: "1.2.840.10008.1.2.4.201", HtJpeg2000LosslessRpcl: "1.2.840.10008.1.2.4.202", HtJpeg2000Lossy: "1.2.840.10008.1.2.4.203" };
|
|
47983
47983
|
Object.freeze(t);
|
|
@@ -49624,8 +49624,8 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
49624
49624
|
"use strict";
|
|
49625
49625
|
e2.exports = s;
|
|
49626
49626
|
}, 237: (e2, t2, s2) => {
|
|
49627
|
-
const { Association: n2, PresentationContext: i2 } = s2(570), { Scp: r7, Server: o3 } = s2(538), { CCancelRequest: a2, CEchoRequest: c3, CEchoResponse: d3, CFindRequest: u2, CFindResponse: h2, CGetRequest: m3, CGetResponse: g3, CMoveRequest: l2, CMoveResponse: p, CStoreRequest:
|
|
49628
|
-
e2.exports =
|
|
49627
|
+
const { Association: n2, PresentationContext: i2 } = s2(570), { Scp: r7, Server: o3 } = s2(538), { CCancelRequest: a2, CEchoRequest: c3, CEchoResponse: d3, CFindRequest: u2, CFindResponse: h2, CGetRequest: m3, CGetResponse: g3, CMoveRequest: l2, CMoveResponse: p, CStoreRequest: R3, CStoreResponse: S2, NActionRequest: y2, NActionResponse: f2, NCreateRequest: I3, NCreateResponse: C2, NDeleteRequest: P, NDeleteResponse: v3, NEventReportRequest: x3, NEventReportResponse: A3, NGetRequest: U2, NGetResponse: w3, NSetRequest: D3, NSetResponse: q2 } = s2(940), { AbortReason: E3, AbortSource: T, CommandFieldType: b3, PresentationContextResult: O2, Priority: N, RawPduType: B2, RejectReason: M3, RejectResult: L2, RejectSource: F2, SopClass: k2, Status: $, StorageClass: j2, TransferSyntax: V2, Uid: _2, UserIdentityType: G2 } = s2(492), z = s2(422), Q2 = s2(825), W2 = s2(139), J2 = s2(906), X2 = s2(73), H2 = { association: { Association: n2, PresentationContext: i2 }, Client: z, constants: { AbortReason: E3, AbortSource: T, CommandFieldType: b3, PresentationContextResult: O2, Priority: N, RawPduType: B2, RejectReason: M3, RejectResult: L2, RejectSource: F2, SopClass: k2, Status: $, StorageClass: j2, TransferSyntax: V2, Uid: _2, UserIdentityType: G2 }, Dataset: Q2, Implementation: W2, log: s2(547), requests: { CCancelRequest: a2, CEchoRequest: c3, CFindRequest: u2, CGetRequest: m3, CMoveRequest: l2, CStoreRequest: R3, NActionRequest: y2, NCreateRequest: I3, NDeleteRequest: P, NEventReportRequest: x3, NGetRequest: U2, NSetRequest: D3 }, responses: { CEchoResponse: d3, CFindResponse: h2, CGetResponse: g3, CMoveResponse: p, CStoreResponse: S2, NActionResponse: f2, NCreateResponse: C2, NDeleteResponse: v3, NEventReportResponse: A3, NGetResponse: w3, NSetResponse: q2 }, Scp: r7, Server: o3, Statistics: J2, Transcoding: X2, version: s2(837) };
|
|
49628
|
+
e2.exports = H2;
|
|
49629
49629
|
}, 278: (e2) => {
|
|
49630
49630
|
"use strict";
|
|
49631
49631
|
e2.exports = require("net");
|
|
@@ -49633,8 +49633,8 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
49633
49633
|
"use strict";
|
|
49634
49634
|
e2.exports = n;
|
|
49635
49635
|
}, 371: (e2, t2, s2) => {
|
|
49636
|
-
const { Association: n2 } = s2(570), { AAbort: i2, AAssociateAC: r7, AAssociateRJ: o3, AAssociateRQ: a2, AReleaseRP: c3, AReleaseRQ: d3, PDataTF: u2, Pdv: h2, RawPdu: m3 } = s2(942), { CommandFieldType: g3, RawPduType: l2, Status: p } = s2(492), { CCancelRequest:
|
|
49637
|
-
class
|
|
49636
|
+
const { Association: n2 } = s2(570), { AAbort: i2, AAssociateAC: r7, AAssociateRJ: o3, AAssociateRQ: a2, AReleaseRP: c3, AReleaseRQ: d3, PDataTF: u2, Pdv: h2, RawPdu: m3 } = s2(942), { CommandFieldType: g3, RawPduType: l2, Status: p } = s2(492), { CCancelRequest: R3, CEchoRequest: S2, CEchoResponse: y2, CFindRequest: f2, CFindResponse: I3, CGetRequest: C2, CGetResponse: P, CMoveRequest: v3, CMoveResponse: x3, Command: A3, CStoreRequest: U2, CStoreResponse: w3, NActionRequest: D3, NActionResponse: q2, NCreateRequest: E3, NCreateResponse: T, NDeleteRequest: b3, NDeleteResponse: O2, NEventReportRequest: N, NEventReportResponse: B2, NGetRequest: M3, NGetResponse: L2, NSetRequest: F2, NSetResponse: k2, Response: $ } = s2(940), j2 = s2(825), V2 = s2(139), _2 = s2(906), G2 = s2(73), z = s2(547), { SmartBuffer: Q2 } = s2(766), { EOL: W2 } = s2(857), J2 = s2(0), X2 = s2(235);
|
|
49637
|
+
class H2 extends J2 {
|
|
49638
49638
|
constructor() {
|
|
49639
49639
|
super();
|
|
49640
49640
|
}
|
|
@@ -49705,7 +49705,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
49705
49705
|
}
|
|
49706
49706
|
sendCancel(e3) {
|
|
49707
49707
|
if (!this.association) return void z.error(`There is no association in which to cancel request ${e3.toString()}. Skipping...`);
|
|
49708
|
-
const t3 =
|
|
49708
|
+
const t3 = R3.fromRequest(e3), s3 = this.association.getAcceptedPresentationContextFromRequest(t3);
|
|
49709
49709
|
if (!s3) return void z.error(`Could not find an accepted presentation context to cancel request ${e3.toString()}. Skipping...`);
|
|
49710
49710
|
const n3 = { context: s3, command: t3 };
|
|
49711
49711
|
this._sendDimse(n3);
|
|
@@ -49836,7 +49836,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
49836
49836
|
const e5 = new A3(new j2(this.dimseStream.toBuffer()));
|
|
49837
49837
|
switch (e5.getCommandFieldType()) {
|
|
49838
49838
|
case g3.CEchoRequest:
|
|
49839
|
-
this.dimse = Object.assign(new
|
|
49839
|
+
this.dimse = Object.assign(new S2(), e5);
|
|
49840
49840
|
break;
|
|
49841
49841
|
case g3.CEchoResponse:
|
|
49842
49842
|
this.dimse = Object.assign(new y2(), e5);
|
|
@@ -49878,7 +49878,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
49878
49878
|
this.dimse = Object.assign(new q2(), e5);
|
|
49879
49879
|
break;
|
|
49880
49880
|
case g3.NDeleteRequest:
|
|
49881
|
-
this.dimse = Object.assign(new
|
|
49881
|
+
this.dimse = Object.assign(new b3(), e5);
|
|
49882
49882
|
break;
|
|
49883
49883
|
case g3.NDeleteResponse:
|
|
49884
49884
|
this.dimse = Object.assign(new O2(), e5);
|
|
@@ -49887,7 +49887,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
49887
49887
|
this.dimse = Object.assign(new N(), e5);
|
|
49888
49888
|
break;
|
|
49889
49889
|
case g3.NEventReportResponse:
|
|
49890
|
-
this.dimse = Object.assign(new
|
|
49890
|
+
this.dimse = Object.assign(new B2(), e5);
|
|
49891
49891
|
break;
|
|
49892
49892
|
case g3.NGetRequest:
|
|
49893
49893
|
this.dimse = Object.assign(new M3(), e5);
|
|
@@ -49902,7 +49902,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
49902
49902
|
this.dimse = Object.assign(new k2(), e5);
|
|
49903
49903
|
break;
|
|
49904
49904
|
case g3.CCancelRequest:
|
|
49905
|
-
this.dimse = Object.assign(new
|
|
49905
|
+
this.dimse = Object.assign(new R3(), e5);
|
|
49906
49906
|
break;
|
|
49907
49907
|
default:
|
|
49908
49908
|
this.dimse = e5;
|
|
@@ -49961,7 +49961,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
49961
49961
|
this.socket.setTimeout(this.connectTimeout), this.socket.on("connect", () => {
|
|
49962
49962
|
this.connected = true, this.connectedTime = Date.now(), this.emit("connect");
|
|
49963
49963
|
});
|
|
49964
|
-
const e3 = new
|
|
49964
|
+
const e3 = new H2();
|
|
49965
49965
|
e3.on("pdu", async (e4) => {
|
|
49966
49966
|
this.lastPduTime = Date.now(), await this._processPdu(e4);
|
|
49967
49967
|
}), e3.on("error", (e4) => {
|
|
@@ -50087,12 +50087,12 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
50087
50087
|
Object.freeze(l2);
|
|
50088
50088
|
const p = { ImplicitVRLittleEndian: "1.2.840.10008.1.2", ExplicitVRLittleEndian: "1.2.840.10008.1.2.1", DeflatedExplicitVRLittleEndian: "1.2.840.10008.1.2.1.99", ExplicitVRBigEndian: "1.2.840.10008.1.2.2", RleLossless: "1.2.840.10008.1.2.5", JpegBaseline: "1.2.840.10008.1.2.4.50", JpegLossless: "1.2.840.10008.1.2.4.70", JpegLsLossless: "1.2.840.10008.1.2.4.80", JpegLsLossy: "1.2.840.10008.1.2.4.81", Jpeg2000Lossless: "1.2.840.10008.1.2.4.90", Jpeg2000Lossy: "1.2.840.10008.1.2.4.91", JpegXlLossless: "1.2.840.10008.1.2.4.110", JpegXlRecompression: "1.2.840.10008.1.2.4.111", JpegXl: "1.2.840.10008.1.2.4.112", HtJpeg2000Lossless: "1.2.840.10008.1.2.4.201", HtJpeg2000LosslessRpcl: "1.2.840.10008.1.2.4.202", HtJpeg2000Lossy: "1.2.840.10008.1.2.4.203" };
|
|
50089
50089
|
Object.freeze(p);
|
|
50090
|
-
const
|
|
50091
|
-
Object.freeze(
|
|
50092
|
-
const
|
|
50093
|
-
Object.freeze(
|
|
50090
|
+
const R3 = [p.ImplicitVRLittleEndian, p.ExplicitVRLittleEndian, p.ExplicitVRBigEndian, p.RleLossless, p.JpegBaseline, p.JpegLossless, p.JpegLsLossless, p.JpegLsLossy, p.Jpeg2000Lossless, p.Jpeg2000Lossy, p.HtJpeg2000Lossless, p.HtJpeg2000LosslessRpcl, p.HtJpeg2000Lossy];
|
|
50091
|
+
Object.freeze(R3);
|
|
50092
|
+
const S2 = { ImplementationClassUid: "1.2.826.0.1.3680043.10.854", ImplementationVersion: "DCMJS-DIMSE-V0.2", MaxPduLength: 262144 };
|
|
50093
|
+
Object.freeze(S2), e2.exports = { AbortReason: o3, AbortSource: r7, CommandFieldType: s2, DefaultImplementation: S2, PresentationContextResult: n2, Priority: u2, RawPduType: t2, RejectReason: d3, RejectResult: a2, RejectSource: c3, SopClass: l2, Status: h2, StorageClass: g3, TranscodableTransferSyntaxes: R3, TransferSyntax: p, Uid: m3, UserIdentityType: i2 };
|
|
50094
50094
|
}, 538: (e2, t2, s2) => {
|
|
50095
|
-
const { CEchoResponse: n2, CFindResponse: i2, CGetResponse: r7, CMoveResponse: o3, CStoreResponse: a2, NActionResponse: c3, NCreateResponse: d3, NDeleteResponse: u2, NEventReportResponse: h2, NGetResponse: m3, NSetResponse: g3 } = s2(940), l2 = s2(371), p = s2(906),
|
|
50095
|
+
const { CEchoResponse: n2, CFindResponse: i2, CGetResponse: r7, CMoveResponse: o3, CStoreResponse: a2, NActionResponse: c3, NCreateResponse: d3, NDeleteResponse: u2, NEventReportResponse: h2, NGetResponse: m3, NSetResponse: g3 } = s2(940), l2 = s2(371), p = s2(906), R3 = s2(547), S2 = s2(0), y2 = s2(278), f2 = s2(756);
|
|
50096
50096
|
e2.exports = { Scp: class extends l2 {
|
|
50097
50097
|
constructor(e3, t3) {
|
|
50098
50098
|
super(e3, t3), this.on("associationRequested", (e4) => {
|
|
@@ -50134,51 +50134,51 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
50134
50134
|
return super.createDatasetFromStoreWritableStream(e3, t3, s3);
|
|
50135
50135
|
}
|
|
50136
50136
|
associationRequested(e3) {
|
|
50137
|
-
|
|
50137
|
+
R3.error("associationRequested method must be implemented"), this.sendAssociationReject();
|
|
50138
50138
|
}
|
|
50139
50139
|
associationReleaseRequested() {
|
|
50140
|
-
|
|
50140
|
+
R3.error("associationReleaseRequested method must be implemented"), this.sendAssociationReleaseResponse();
|
|
50141
50141
|
}
|
|
50142
50142
|
cEchoRequest(e3, t3) {
|
|
50143
|
-
|
|
50143
|
+
R3.error("cEchoRequest method must be implemented"), t3(n2.fromRequest(e3));
|
|
50144
50144
|
}
|
|
50145
50145
|
cFindRequest(e3, t3) {
|
|
50146
|
-
|
|
50146
|
+
R3.error("cFindRequest method must be implemented"), t3(i2.fromRequest(e3));
|
|
50147
50147
|
}
|
|
50148
50148
|
cStoreRequest(e3, t3) {
|
|
50149
|
-
|
|
50149
|
+
R3.error("cStoreRequest method must be implemented"), t3(a2.fromRequest(e3));
|
|
50150
50150
|
}
|
|
50151
50151
|
cMoveRequest(e3, t3) {
|
|
50152
|
-
|
|
50152
|
+
R3.error("cMoveRequest method must be implemented"), t3(o3.fromRequest(e3));
|
|
50153
50153
|
}
|
|
50154
50154
|
cGetRequest(e3, t3) {
|
|
50155
|
-
|
|
50155
|
+
R3.error("cGetRequest method must be implemented"), t3(r7.fromRequest(e3));
|
|
50156
50156
|
}
|
|
50157
50157
|
nCreateRequest(e3, t3) {
|
|
50158
|
-
|
|
50158
|
+
R3.error("nCreateRequest method must be implemented"), t3(d3.fromRequest(e3));
|
|
50159
50159
|
}
|
|
50160
50160
|
nActionRequest(e3, t3) {
|
|
50161
|
-
|
|
50161
|
+
R3.error("nActionRequest method must be implemented"), t3(c3.fromRequest(e3));
|
|
50162
50162
|
}
|
|
50163
50163
|
nDeleteRequest(e3, t3) {
|
|
50164
|
-
|
|
50164
|
+
R3.error("nDeleteRequest method must be implemented"), t3(u2.fromRequest(e3));
|
|
50165
50165
|
}
|
|
50166
50166
|
nEventReportRequest(e3, t3) {
|
|
50167
|
-
|
|
50167
|
+
R3.error("nEventReportRequest method must be implemented"), t3(h2.fromRequest(e3));
|
|
50168
50168
|
}
|
|
50169
50169
|
nGetRequest(e3, t3) {
|
|
50170
|
-
|
|
50170
|
+
R3.error("nGetRequest method must be implemented"), t3(m3.fromRequest(e3));
|
|
50171
50171
|
}
|
|
50172
50172
|
nSetRequest(e3, t3) {
|
|
50173
|
-
|
|
50173
|
+
R3.error("nSetRequest method must be implemented"), t3(g3.fromRequest(e3));
|
|
50174
50174
|
}
|
|
50175
50175
|
cCancelRequest(e3) {
|
|
50176
|
-
|
|
50176
|
+
R3.error("cCancelRequest method must be implemented");
|
|
50177
50177
|
}
|
|
50178
50178
|
abort(e3, t3) {
|
|
50179
|
-
|
|
50179
|
+
R3.error("abort method must be implemented");
|
|
50180
50180
|
}
|
|
50181
|
-
}, Server: class extends
|
|
50181
|
+
}, Server: class extends S2 {
|
|
50182
50182
|
constructor(e3) {
|
|
50183
50183
|
super(), this.scp = { class: e3 }, this.server = void 0, this.clients = [], this.statistics = new p();
|
|
50184
50184
|
}
|
|
@@ -50187,7 +50187,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
50187
50187
|
(t3 = t3 || {}).securityOptions && (s3 = { key: t3.securityOptions.key, cert: t3.securityOptions.cert, ca: t3.securityOptions.ca, requestCert: t3.securityOptions.requestCert, rejectUnauthorized: t3.securityOptions.rejectUnauthorized, minVersion: t3.securityOptions.minVersion, maxVersion: t3.securityOptions.maxVersion, ciphers: t3.securityOptions.ciphers, SNICallback: t3.securityOptions.SNICallback });
|
|
50188
50188
|
const n3 = t3.securityOptions ? f2 : y2;
|
|
50189
50189
|
this.server = n3.createServer(s3, (e4) => {
|
|
50190
|
-
|
|
50190
|
+
R3.info(`Client connecting from ${e4.remoteAddress}:${e4.remotePort} ${t3.securityOptions ? e4.authorized ? "(Authorized)" : "(Unauthorized)" : ""}`);
|
|
50191
50191
|
const s4 = new this.scp.class(e4, t3);
|
|
50192
50192
|
s4.connected = true, s4.on("close", () => {
|
|
50193
50193
|
this.statistics.addFromOtherStatistics(s4.getStatistics());
|
|
@@ -50195,10 +50195,10 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
50195
50195
|
e4.end(), this.emit("networkError", t4);
|
|
50196
50196
|
}), this.clients.push(s4), this.clients = this.clients.filter((e5) => e5.connected);
|
|
50197
50197
|
}), this.server.on("listening", () => {
|
|
50198
|
-
|
|
50198
|
+
R3.info(`DICOM server listening on port ${e3} ${t3.securityOptions ? "(TLS)" : ""}`), this.emit("listening");
|
|
50199
50199
|
}), this.server.on("error", (e4) => {
|
|
50200
50200
|
const t4 = `Server error: ${e4.message}`;
|
|
50201
|
-
|
|
50201
|
+
R3.error(t4), this.emit("networkError", e4);
|
|
50202
50202
|
}), this.server.listen(e3);
|
|
50203
50203
|
}
|
|
50204
50204
|
getStatistics() {
|
|
@@ -50520,10 +50520,10 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
50520
50520
|
"use strict";
|
|
50521
50521
|
e2.exports = a;
|
|
50522
50522
|
}, 825: (e2, t2, s2) => {
|
|
50523
|
-
const { StorageClass: n2, TransferSyntax: i2 } = s2(492), r7 = s2(139), { readFile: o3, readFileSync: a2, writeFile: c3, writeFileSync: d3 } = s2(896), { EOL: u2 } = s2(857), h2 = s2(111), { DicomDict: m3, DicomMessage: g3, DicomMetaDictionary: l2, ReadBufferStream: p, WriteBufferStream:
|
|
50523
|
+
const { StorageClass: n2, TransferSyntax: i2 } = s2(492), r7 = s2(139), { readFile: o3, readFileSync: a2, writeFile: c3, writeFileSync: d3 } = s2(896), { EOL: u2 } = s2(857), h2 = s2(111), { DicomDict: m3, DicomMessage: g3, DicomMetaDictionary: l2, ReadBufferStream: p, WriteBufferStream: R3 } = h2.data, S2 = h2.log;
|
|
50524
50524
|
class y2 {
|
|
50525
50525
|
constructor(e3, t3, s3) {
|
|
50526
|
-
s3 = s3 || {}, s3 = { ignoreErrors: true, ...s3 },
|
|
50526
|
+
s3 = s3 || {}, s3 = { ignoreErrors: true, ...s3 }, S2.level = "error", this.transferSyntaxUid = t3 || i2.ImplicitVRLittleEndian, Buffer.isBuffer(e3) ? this.elements = this._fromElementsBuffer(e3, this.transferSyntaxUid, s3) : this.elements = e3 || {};
|
|
50527
50527
|
}
|
|
50528
50528
|
getElement(e3) {
|
|
50529
50529
|
return this.elements[e3];
|
|
@@ -50541,11 +50541,11 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
50541
50541
|
this.transferSyntaxUid = e3;
|
|
50542
50542
|
}
|
|
50543
50543
|
getDenaturalizedDataset(e3, t3) {
|
|
50544
|
-
const s3 = t3 ? l2.denaturalizeDataset(this.getElements(), { ...l2.nameMap, ...t3 }) : l2.denaturalizeDataset(this.getElements()), n3 = new
|
|
50544
|
+
const s3 = t3 ? l2.denaturalizeDataset(this.getElements(), { ...l2.nameMap, ...t3 }) : l2.denaturalizeDataset(this.getElements()), n3 = new R3();
|
|
50545
50545
|
return g3.write(s3, n3, this.transferSyntaxUid, e3), Buffer.from(n3.getBuffer());
|
|
50546
50546
|
}
|
|
50547
50547
|
getDenaturalizedCommandDataset(e3) {
|
|
50548
|
-
const t3 = l2.denaturalizeDataset(this.getElements()), s3 = new
|
|
50548
|
+
const t3 = l2.denaturalizeDataset(this.getElements()), s3 = new R3(), n3 = new R3();
|
|
50549
50549
|
return g3.write(t3, n3, i2.ImplicitVRLittleEndian, e3), g3.writeTagObject(s3, "00000000", "UL", n3.size, i2.ImplicitVRLittleEndian, e3), s3.concat(n3), Buffer.from(s3.getBuffer());
|
|
50550
50550
|
}
|
|
50551
50551
|
static fromFile(e3, t3, s3) {
|
|
@@ -50874,18 +50874,18 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
50874
50874
|
}
|
|
50875
50875
|
}
|
|
50876
50876
|
}
|
|
50877
|
-
class
|
|
50877
|
+
class R3 extends l2 {
|
|
50878
50878
|
constructor() {
|
|
50879
50879
|
super(n2.CEchoRequest, r7.Verification, false);
|
|
50880
50880
|
}
|
|
50881
50881
|
}
|
|
50882
|
-
class
|
|
50882
|
+
class S2 extends p {
|
|
50883
50883
|
constructor(e3, t3) {
|
|
50884
50884
|
super(n2.CEchoResponse, r7.Verification, false, e3, t3);
|
|
50885
50885
|
}
|
|
50886
50886
|
static fromRequest(e3) {
|
|
50887
|
-
if (!(e3 instanceof
|
|
50888
|
-
const t3 = new
|
|
50887
|
+
if (!(e3 instanceof R3)) throw new Error("Request should be an instance of CEchoRequest");
|
|
50888
|
+
const t3 = new S2(o3.ProcessingFailure);
|
|
50889
50889
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
50890
50890
|
}
|
|
50891
50891
|
}
|
|
@@ -51152,7 +51152,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
51152
51152
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
51153
51153
|
}
|
|
51154
51154
|
}
|
|
51155
|
-
class
|
|
51155
|
+
class b3 extends l2 {
|
|
51156
51156
|
constructor(e3, t3, s3, i3) {
|
|
51157
51157
|
super(n2.NEventReportRequest, e3, false), this.setAffectedSopInstanceUid(t3), this.setEventTypeId(s3), this.setMetaSopClassUid(i3);
|
|
51158
51158
|
}
|
|
@@ -51174,7 +51174,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
51174
51174
|
this.getCommandDataset().setElement("EventTypeID", e3);
|
|
51175
51175
|
}
|
|
51176
51176
|
static fromRequest(e3) {
|
|
51177
|
-
if (!(e3 instanceof
|
|
51177
|
+
if (!(e3 instanceof b3)) throw new Error("Request should be an instance of NEventReportRequest");
|
|
51178
51178
|
const t3 = new O2(e3.getAffectedSopClassUid(), e3.getAffectedSopInstanceUid(), e3.getEventTypeId(), o3.ProcessingFailure);
|
|
51179
51179
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
51180
51180
|
}
|
|
@@ -51205,13 +51205,13 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
51205
51205
|
return "0".repeat(t3 - s3.length) + s3;
|
|
51206
51206
|
}
|
|
51207
51207
|
}
|
|
51208
|
-
class
|
|
51208
|
+
class B2 extends p {
|
|
51209
51209
|
constructor(e3, t3, s3, i3) {
|
|
51210
51210
|
super(n2.NGetResponse, e3, false, s3, i3), this.setAffectedSopInstanceUid(t3);
|
|
51211
51211
|
}
|
|
51212
51212
|
static fromRequest(e3) {
|
|
51213
51213
|
if (!(e3 instanceof N)) throw new Error("Request should be an instance of NGetRequest");
|
|
51214
|
-
const t3 = new
|
|
51214
|
+
const t3 = new B2(e3.getRequestedSopClassUid(), e3.getRequestedSopInstanceUid(), o3.ProcessingFailure);
|
|
51215
51215
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
51216
51216
|
}
|
|
51217
51217
|
}
|
|
@@ -51245,7 +51245,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
51245
51245
|
return new F2(e3.getAffectedSopClassUid(), e3.getMessageId());
|
|
51246
51246
|
}
|
|
51247
51247
|
}
|
|
51248
|
-
e2.exports = { CCancelRequest: F2, CEchoRequest:
|
|
51248
|
+
e2.exports = { CCancelRequest: F2, CEchoRequest: R3, CEchoResponse: S2, CFindRequest: y2, CFindResponse: f2, CGetRequest: x3, CGetResponse: A3, CMoveRequest: P, CMoveResponse: v3, Command: g3, CStoreRequest: I3, CStoreResponse: C2, NActionRequest: D3, NActionResponse: q2, NCreateRequest: U2, NCreateResponse: w3, NDeleteRequest: E3, NDeleteResponse: T, NEventReportRequest: b3, NEventReportResponse: O2, NGetRequest: N, NGetResponse: B2, NSetRequest: M3, NSetResponse: L2, Request: l2, Response: p };
|
|
51249
51249
|
}, 942: (e2, t2, s2) => {
|
|
51250
51250
|
const { AbortReason: n2, AbortSource: i2, RawPduType: r7, RejectReason: o3, RejectResult: a2, RejectSource: c3, TransferSyntax: d3 } = s2(492), { SmartBuffer: u2 } = s2(766), { EOL: h2 } = s2(857);
|
|
51251
51251
|
class m3 {
|
|
@@ -53814,8 +53814,8 @@ var require_fecha_umd = __commonJS({
|
|
|
53814
53814
|
for (var _i2 = 1; _i2 < arguments.length; _i2++) {
|
|
53815
53815
|
args[_i2 - 1] = arguments[_i2];
|
|
53816
53816
|
}
|
|
53817
|
-
for (var
|
|
53818
|
-
var obj = args_1[
|
|
53817
|
+
for (var _a2 = 0, args_1 = args; _a2 < args_1.length; _a2++) {
|
|
53818
|
+
var obj = args_1[_a2];
|
|
53819
53819
|
for (var key in obj) {
|
|
53820
53820
|
origObj[key] = obj[key];
|
|
53821
53821
|
}
|
|
@@ -54136,7 +54136,7 @@ var require_fecha_umd = __commonJS({
|
|
|
54136
54136
|
}
|
|
54137
54137
|
var combinedI18nSettings = assign(assign({}, globalI18n), i18n);
|
|
54138
54138
|
for (var i = 1; i < matches.length; i++) {
|
|
54139
|
-
var
|
|
54139
|
+
var _a2 = parseInfo[i - 1], field = _a2[0], parser = _a2[2];
|
|
54140
54140
|
var value = parser ? parser(matches[i], combinedI18nSettings) : +matches[i];
|
|
54141
54141
|
if (value == null) {
|
|
54142
54142
|
return null;
|
|
@@ -58371,9 +58371,9 @@ var require_index_cjs = __commonJS({
|
|
|
58371
58371
|
const alpha = Number.parseFloat(match[4]);
|
|
58372
58372
|
const h2 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
|
|
58373
58373
|
const w3 = clamp(Number.parseFloat(match[2]), 0, 100);
|
|
58374
|
-
const
|
|
58374
|
+
const b3 = clamp(Number.parseFloat(match[3]), 0, 100);
|
|
58375
58375
|
const a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
|
|
58376
|
-
return [h2, w3,
|
|
58376
|
+
return [h2, w3, b3, a];
|
|
58377
58377
|
}
|
|
58378
58378
|
return null;
|
|
58379
58379
|
};
|
|
@@ -58386,8 +58386,8 @@ var require_index_cjs = __commonJS({
|
|
|
58386
58386
|
cs.to.rgb.percent = function(...rgba) {
|
|
58387
58387
|
const r6 = Math.round(rgba[0] / 255 * 100);
|
|
58388
58388
|
const g3 = Math.round(rgba[1] / 255 * 100);
|
|
58389
|
-
const
|
|
58390
|
-
return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r6 + "%, " + g3 + "%, " +
|
|
58389
|
+
const b3 = Math.round(rgba[2] / 255 * 100);
|
|
58390
|
+
return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r6 + "%, " + g3 + "%, " + b3 + "%)" : "rgba(" + r6 + "%, " + g3 + "%, " + b3 + "%, " + rgba[3] + ")";
|
|
58391
58391
|
};
|
|
58392
58392
|
cs.to.hsl = function(...hsla) {
|
|
58393
58393
|
return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")";
|
|
@@ -58434,8 +58434,8 @@ var require_index_cjs = __commonJS({
|
|
|
58434
58434
|
};
|
|
58435
58435
|
var LAB_FT = (6 / 29) ** 3;
|
|
58436
58436
|
function srgbNonlinearTransform(c2) {
|
|
58437
|
-
const
|
|
58438
|
-
return Math.min(Math.max(0,
|
|
58437
|
+
const cc = c2 > 31308e-7 ? 1.055 * c2 ** (1 / 2.4) - 0.055 : c2 * 12.92;
|
|
58438
|
+
return Math.min(Math.max(0, cc), 1);
|
|
58439
58439
|
}
|
|
58440
58440
|
function srgbNonlinearTransformInv(c2) {
|
|
58441
58441
|
return c2 > 0.04045 ? ((c2 + 0.055) / 1.055) ** 2.4 : c2 / 12.92;
|
|
@@ -58459,9 +58459,9 @@ var require_index_cjs = __commonJS({
|
|
|
58459
58459
|
convert$1.rgb.hsl = function(rgb) {
|
|
58460
58460
|
const r6 = rgb[0] / 255;
|
|
58461
58461
|
const g3 = rgb[1] / 255;
|
|
58462
|
-
const
|
|
58463
|
-
const min = Math.min(r6, g3,
|
|
58464
|
-
const max = Math.max(r6, g3,
|
|
58462
|
+
const b3 = rgb[2] / 255;
|
|
58463
|
+
const min = Math.min(r6, g3, b3);
|
|
58464
|
+
const max = Math.max(r6, g3, b3);
|
|
58465
58465
|
const delta = max - min;
|
|
58466
58466
|
let h2;
|
|
58467
58467
|
let s;
|
|
@@ -58471,14 +58471,14 @@ var require_index_cjs = __commonJS({
|
|
|
58471
58471
|
break;
|
|
58472
58472
|
}
|
|
58473
58473
|
case r6: {
|
|
58474
|
-
h2 = (g3 -
|
|
58474
|
+
h2 = (g3 - b3) / delta;
|
|
58475
58475
|
break;
|
|
58476
58476
|
}
|
|
58477
58477
|
case g3: {
|
|
58478
|
-
h2 = 2 + (
|
|
58478
|
+
h2 = 2 + (b3 - r6) / delta;
|
|
58479
58479
|
break;
|
|
58480
58480
|
}
|
|
58481
|
-
case
|
|
58481
|
+
case b3: {
|
|
58482
58482
|
h2 = 4 + (r6 - g3) / delta;
|
|
58483
58483
|
break;
|
|
58484
58484
|
}
|
|
@@ -58505,9 +58505,9 @@ var require_index_cjs = __commonJS({
|
|
|
58505
58505
|
let s;
|
|
58506
58506
|
const r6 = rgb[0] / 255;
|
|
58507
58507
|
const g3 = rgb[1] / 255;
|
|
58508
|
-
const
|
|
58509
|
-
const v3 = Math.max(r6, g3,
|
|
58510
|
-
const diff = v3 - Math.min(r6, g3,
|
|
58508
|
+
const b3 = rgb[2] / 255;
|
|
58509
|
+
const v3 = Math.max(r6, g3, b3);
|
|
58510
|
+
const diff = v3 - Math.min(r6, g3, b3);
|
|
58511
58511
|
const diffc = function(c2) {
|
|
58512
58512
|
return (v3 - c2) / 6 / diff + 1 / 2;
|
|
58513
58513
|
};
|
|
@@ -58518,7 +58518,7 @@ var require_index_cjs = __commonJS({
|
|
|
58518
58518
|
s = diff / v3;
|
|
58519
58519
|
rdif = diffc(r6);
|
|
58520
58520
|
gdif = diffc(g3);
|
|
58521
|
-
bdif = diffc(
|
|
58521
|
+
bdif = diffc(b3);
|
|
58522
58522
|
switch (v3) {
|
|
58523
58523
|
case r6: {
|
|
58524
58524
|
h2 = bdif - gdif;
|
|
@@ -58528,7 +58528,7 @@ var require_index_cjs = __commonJS({
|
|
|
58528
58528
|
h2 = 1 / 3 + rdif - bdif;
|
|
58529
58529
|
break;
|
|
58530
58530
|
}
|
|
58531
|
-
case
|
|
58531
|
+
case b3: {
|
|
58532
58532
|
h2 = 2 / 3 + gdif - rdif;
|
|
58533
58533
|
break;
|
|
58534
58534
|
}
|
|
@@ -58548,19 +58548,19 @@ var require_index_cjs = __commonJS({
|
|
|
58548
58548
|
convert$1.rgb.hwb = function(rgb) {
|
|
58549
58549
|
const r6 = rgb[0];
|
|
58550
58550
|
const g3 = rgb[1];
|
|
58551
|
-
let
|
|
58551
|
+
let b3 = rgb[2];
|
|
58552
58552
|
const h2 = convert$1.rgb.hsl(rgb)[0];
|
|
58553
|
-
const w3 = 1 / 255 * Math.min(r6, Math.min(g3,
|
|
58554
|
-
|
|
58555
|
-
return [h2, w3 * 100,
|
|
58553
|
+
const w3 = 1 / 255 * Math.min(r6, Math.min(g3, b3));
|
|
58554
|
+
b3 = 1 - 1 / 255 * Math.max(r6, Math.max(g3, b3));
|
|
58555
|
+
return [h2, w3 * 100, b3 * 100];
|
|
58556
58556
|
};
|
|
58557
58557
|
convert$1.rgb.oklab = function(rgb) {
|
|
58558
58558
|
const r6 = srgbNonlinearTransformInv(rgb[0] / 255);
|
|
58559
58559
|
const g3 = srgbNonlinearTransformInv(rgb[1] / 255);
|
|
58560
|
-
const
|
|
58561
|
-
const lp = Math.cbrt(0.4122214708 * r6 + 0.5363325363 * g3 + 0.0514459929 *
|
|
58562
|
-
const mp = Math.cbrt(0.2119034982 * r6 + 0.6806995451 * g3 + 0.1073969566 *
|
|
58563
|
-
const sp = Math.cbrt(0.0883024619 * r6 + 0.2817188376 * g3 + 0.6299787005 *
|
|
58560
|
+
const b3 = srgbNonlinearTransformInv(rgb[2] / 255);
|
|
58561
|
+
const lp = Math.cbrt(0.4122214708 * r6 + 0.5363325363 * g3 + 0.0514459929 * b3);
|
|
58562
|
+
const mp = Math.cbrt(0.2119034982 * r6 + 0.6806995451 * g3 + 0.1073969566 * b3);
|
|
58563
|
+
const sp = Math.cbrt(0.0883024619 * r6 + 0.2817188376 * g3 + 0.6299787005 * b3);
|
|
58564
58564
|
const l2 = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
|
|
58565
58565
|
const aa = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
|
|
58566
58566
|
const bb = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
|
|
@@ -58569,11 +58569,11 @@ var require_index_cjs = __commonJS({
|
|
|
58569
58569
|
convert$1.rgb.cmyk = function(rgb) {
|
|
58570
58570
|
const r6 = rgb[0] / 255;
|
|
58571
58571
|
const g3 = rgb[1] / 255;
|
|
58572
|
-
const
|
|
58573
|
-
const k2 = Math.min(1 - r6, 1 - g3, 1 -
|
|
58572
|
+
const b3 = rgb[2] / 255;
|
|
58573
|
+
const k2 = Math.min(1 - r6, 1 - g3, 1 - b3);
|
|
58574
58574
|
const c2 = (1 - r6 - k2) / (1 - k2) || 0;
|
|
58575
58575
|
const m3 = (1 - g3 - k2) / (1 - k2) || 0;
|
|
58576
|
-
const y2 = (1 -
|
|
58576
|
+
const y2 = (1 - b3 - k2) / (1 - k2) || 0;
|
|
58577
58577
|
return [c2 * 100, m3 * 100, y2 * 100, k2 * 100];
|
|
58578
58578
|
};
|
|
58579
58579
|
function comparativeDistance(x3, y2) {
|
|
@@ -58602,10 +58602,10 @@ var require_index_cjs = __commonJS({
|
|
|
58602
58602
|
convert$1.rgb.xyz = function(rgb) {
|
|
58603
58603
|
const r6 = srgbNonlinearTransformInv(rgb[0] / 255);
|
|
58604
58604
|
const g3 = srgbNonlinearTransformInv(rgb[1] / 255);
|
|
58605
|
-
const
|
|
58606
|
-
const x3 = r6 * 0.4124564 + g3 * 0.3575761 +
|
|
58607
|
-
const y2 = r6 * 0.2126729 + g3 * 0.7151522 +
|
|
58608
|
-
const z = r6 * 0.0193339 + g3 * 0.119192 +
|
|
58605
|
+
const b3 = srgbNonlinearTransformInv(rgb[2] / 255);
|
|
58606
|
+
const x3 = r6 * 0.4124564 + g3 * 0.3575761 + b3 * 0.1804375;
|
|
58607
|
+
const y2 = r6 * 0.2126729 + g3 * 0.7151522 + b3 * 0.072175;
|
|
58608
|
+
const z = r6 * 0.0193339 + g3 * 0.119192 + b3 * 0.9503041;
|
|
58609
58609
|
return [x3 * 100, y2 * 100, z * 100];
|
|
58610
58610
|
};
|
|
58611
58611
|
convert$1.rgb.lab = function(rgb) {
|
|
@@ -58621,8 +58621,8 @@ var require_index_cjs = __commonJS({
|
|
|
58621
58621
|
z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
58622
58622
|
const l2 = 116 * y2 - 16;
|
|
58623
58623
|
const a = 500 * (x3 - y2);
|
|
58624
|
-
const
|
|
58625
|
-
return [l2, a,
|
|
58624
|
+
const b3 = 200 * (y2 - z);
|
|
58625
|
+
return [l2, a, b3];
|
|
58626
58626
|
};
|
|
58627
58627
|
convert$1.hsl.rgb = function(hsl) {
|
|
58628
58628
|
const h2 = hsl[0] / 360;
|
|
@@ -58736,48 +58736,48 @@ var require_index_cjs = __commonJS({
|
|
|
58736
58736
|
const n = wh + f2 * (v3 - wh);
|
|
58737
58737
|
let r6;
|
|
58738
58738
|
let g3;
|
|
58739
|
-
let
|
|
58739
|
+
let b3;
|
|
58740
58740
|
switch (i) {
|
|
58741
58741
|
default:
|
|
58742
58742
|
case 6:
|
|
58743
58743
|
case 0: {
|
|
58744
58744
|
r6 = v3;
|
|
58745
58745
|
g3 = n;
|
|
58746
|
-
|
|
58746
|
+
b3 = wh;
|
|
58747
58747
|
break;
|
|
58748
58748
|
}
|
|
58749
58749
|
case 1: {
|
|
58750
58750
|
r6 = n;
|
|
58751
58751
|
g3 = v3;
|
|
58752
|
-
|
|
58752
|
+
b3 = wh;
|
|
58753
58753
|
break;
|
|
58754
58754
|
}
|
|
58755
58755
|
case 2: {
|
|
58756
58756
|
r6 = wh;
|
|
58757
58757
|
g3 = v3;
|
|
58758
|
-
|
|
58758
|
+
b3 = n;
|
|
58759
58759
|
break;
|
|
58760
58760
|
}
|
|
58761
58761
|
case 3: {
|
|
58762
58762
|
r6 = wh;
|
|
58763
58763
|
g3 = n;
|
|
58764
|
-
|
|
58764
|
+
b3 = v3;
|
|
58765
58765
|
break;
|
|
58766
58766
|
}
|
|
58767
58767
|
case 4: {
|
|
58768
58768
|
r6 = n;
|
|
58769
58769
|
g3 = wh;
|
|
58770
|
-
|
|
58770
|
+
b3 = v3;
|
|
58771
58771
|
break;
|
|
58772
58772
|
}
|
|
58773
58773
|
case 5: {
|
|
58774
58774
|
r6 = v3;
|
|
58775
58775
|
g3 = wh;
|
|
58776
|
-
|
|
58776
|
+
b3 = n;
|
|
58777
58777
|
break;
|
|
58778
58778
|
}
|
|
58779
58779
|
}
|
|
58780
|
-
return [r6 * 255, g3 * 255,
|
|
58780
|
+
return [r6 * 255, g3 * 255, b3 * 255];
|
|
58781
58781
|
};
|
|
58782
58782
|
convert$1.cmyk.rgb = function(cmyk) {
|
|
58783
58783
|
const c2 = cmyk[0] / 100;
|
|
@@ -58786,8 +58786,8 @@ var require_index_cjs = __commonJS({
|
|
|
58786
58786
|
const k2 = cmyk[3] / 100;
|
|
58787
58787
|
const r6 = 1 - Math.min(1, c2 * (1 - k2) + k2);
|
|
58788
58788
|
const g3 = 1 - Math.min(1, m3 * (1 - k2) + k2);
|
|
58789
|
-
const
|
|
58790
|
-
return [r6 * 255, g3 * 255,
|
|
58789
|
+
const b3 = 1 - Math.min(1, y2 * (1 - k2) + k2);
|
|
58790
|
+
return [r6 * 255, g3 * 255, b3 * 255];
|
|
58791
58791
|
};
|
|
58792
58792
|
convert$1.xyz.rgb = function(xyz) {
|
|
58793
58793
|
const x3 = xyz[0] / 100;
|
|
@@ -58795,14 +58795,14 @@ var require_index_cjs = __commonJS({
|
|
|
58795
58795
|
const z = xyz[2] / 100;
|
|
58796
58796
|
let r6;
|
|
58797
58797
|
let g3;
|
|
58798
|
-
let
|
|
58798
|
+
let b3;
|
|
58799
58799
|
r6 = x3 * 3.2404542 + y2 * -1.5371385 + z * -0.4985314;
|
|
58800
58800
|
g3 = x3 * -0.969266 + y2 * 1.8760108 + z * 0.041556;
|
|
58801
|
-
|
|
58801
|
+
b3 = x3 * 0.0556434 + y2 * -0.2040259 + z * 1.0572252;
|
|
58802
58802
|
r6 = srgbNonlinearTransform(r6);
|
|
58803
58803
|
g3 = srgbNonlinearTransform(g3);
|
|
58804
|
-
|
|
58805
|
-
return [r6 * 255, g3 * 255,
|
|
58804
|
+
b3 = srgbNonlinearTransform(b3);
|
|
58805
|
+
return [r6 * 255, g3 * 255, b3 * 255];
|
|
58806
58806
|
};
|
|
58807
58807
|
convert$1.xyz.lab = function(xyz) {
|
|
58808
58808
|
let x3 = xyz[0];
|
|
@@ -58816,8 +58816,8 @@ var require_index_cjs = __commonJS({
|
|
|
58816
58816
|
z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
58817
58817
|
const l2 = 116 * y2 - 16;
|
|
58818
58818
|
const a = 500 * (x3 - y2);
|
|
58819
|
-
const
|
|
58820
|
-
return [l2, a,
|
|
58819
|
+
const b3 = 200 * (y2 - z);
|
|
58820
|
+
return [l2, a, b3];
|
|
58821
58821
|
};
|
|
58822
58822
|
convert$1.xyz.oklab = function(xyz) {
|
|
58823
58823
|
const x3 = xyz[0] / 100;
|
|
@@ -58828,8 +58828,8 @@ var require_index_cjs = __commonJS({
|
|
|
58828
58828
|
const sp = Math.cbrt(0.0482003018 * x3 + 0.2643662691 * y2 + 0.633851707 * z);
|
|
58829
58829
|
const l2 = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
|
|
58830
58830
|
const a = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
|
|
58831
|
-
const
|
|
58832
|
-
return [l2 * 100, a * 100,
|
|
58831
|
+
const b3 = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
|
|
58832
|
+
return [l2 * 100, a * 100, b3 * 100];
|
|
58833
58833
|
};
|
|
58834
58834
|
convert$1.oklab.oklch = function(oklab) {
|
|
58835
58835
|
return convert$1.lab.lch(oklab);
|
|
@@ -58837,10 +58837,10 @@ var require_index_cjs = __commonJS({
|
|
|
58837
58837
|
convert$1.oklab.xyz = function(oklab) {
|
|
58838
58838
|
const ll = oklab[0] / 100;
|
|
58839
58839
|
const a = oklab[1] / 100;
|
|
58840
|
-
const
|
|
58841
|
-
const l2 = (0.999999998 * ll + 0.396337792 * a + 0.215803758 *
|
|
58842
|
-
const m3 = (1.000000008 * ll - 0.105561342 * a - 0.063854175 *
|
|
58843
|
-
const s = (1.000000055 * ll - 0.089484182 * a - 1.291485538 *
|
|
58840
|
+
const b3 = oklab[2] / 100;
|
|
58841
|
+
const l2 = (0.999999998 * ll + 0.396337792 * a + 0.215803758 * b3) ** 3;
|
|
58842
|
+
const m3 = (1.000000008 * ll - 0.105561342 * a - 0.063854175 * b3) ** 3;
|
|
58843
|
+
const s = (1.000000055 * ll - 0.089484182 * a - 1.291485538 * b3) ** 3;
|
|
58844
58844
|
const x3 = 1.227013851 * l2 - 0.55779998 * m3 + 0.281256149 * s;
|
|
58845
58845
|
const y2 = -0.040580178 * l2 + 1.11225687 * m3 - 0.071676679 * s;
|
|
58846
58846
|
const z = -0.076381285 * l2 - 0.421481978 * m3 + 1.58616322 * s;
|
|
@@ -58855,8 +58855,8 @@ var require_index_cjs = __commonJS({
|
|
|
58855
58855
|
const s = (ll - 0.0894841775 * aa - 1.291485548 * bb) ** 3;
|
|
58856
58856
|
const r6 = srgbNonlinearTransform(4.0767416621 * l2 - 3.3077115913 * m3 + 0.2309699292 * s);
|
|
58857
58857
|
const g3 = srgbNonlinearTransform(-1.2684380046 * l2 + 2.6097574011 * m3 - 0.3413193965 * s);
|
|
58858
|
-
const
|
|
58859
|
-
return [r6 * 255, g3 * 255,
|
|
58858
|
+
const b3 = srgbNonlinearTransform(-0.0041960863 * l2 - 0.7034186147 * m3 + 1.707614701 * s);
|
|
58859
|
+
return [r6 * 255, g3 * 255, b3 * 255];
|
|
58860
58860
|
};
|
|
58861
58861
|
convert$1.oklch.oklab = function(oklch) {
|
|
58862
58862
|
return convert$1.lch.lab(oklch);
|
|
@@ -58864,13 +58864,13 @@ var require_index_cjs = __commonJS({
|
|
|
58864
58864
|
convert$1.lab.xyz = function(lab) {
|
|
58865
58865
|
const l2 = lab[0];
|
|
58866
58866
|
const a = lab[1];
|
|
58867
|
-
const
|
|
58867
|
+
const b3 = lab[2];
|
|
58868
58868
|
let x3;
|
|
58869
58869
|
let y2;
|
|
58870
58870
|
let z;
|
|
58871
58871
|
y2 = (l2 + 16) / 116;
|
|
58872
58872
|
x3 = a / 500 + y2;
|
|
58873
|
-
z = y2 -
|
|
58873
|
+
z = y2 - b3 / 200;
|
|
58874
58874
|
const y22 = y2 ** 3;
|
|
58875
58875
|
const x22 = x3 ** 3;
|
|
58876
58876
|
const z2 = z ** 3;
|
|
@@ -58885,14 +58885,14 @@ var require_index_cjs = __commonJS({
|
|
|
58885
58885
|
convert$1.lab.lch = function(lab) {
|
|
58886
58886
|
const l2 = lab[0];
|
|
58887
58887
|
const a = lab[1];
|
|
58888
|
-
const
|
|
58888
|
+
const b3 = lab[2];
|
|
58889
58889
|
let h2;
|
|
58890
|
-
const hr = Math.atan2(
|
|
58890
|
+
const hr = Math.atan2(b3, a);
|
|
58891
58891
|
h2 = hr * 360 / 2 / Math.PI;
|
|
58892
58892
|
if (h2 < 0) {
|
|
58893
58893
|
h2 += 360;
|
|
58894
58894
|
}
|
|
58895
|
-
const c2 = Math.sqrt(a * a +
|
|
58895
|
+
const c2 = Math.sqrt(a * a + b3 * b3);
|
|
58896
58896
|
return [l2, c2, h2];
|
|
58897
58897
|
};
|
|
58898
58898
|
convert$1.lch.lab = function(lch) {
|
|
@@ -58901,17 +58901,17 @@ var require_index_cjs = __commonJS({
|
|
|
58901
58901
|
const h2 = lch[2];
|
|
58902
58902
|
const hr = h2 / 360 * 2 * Math.PI;
|
|
58903
58903
|
const a = c2 * Math.cos(hr);
|
|
58904
|
-
const
|
|
58905
|
-
return [l2, a,
|
|
58904
|
+
const b3 = c2 * Math.sin(hr);
|
|
58905
|
+
return [l2, a, b3];
|
|
58906
58906
|
};
|
|
58907
58907
|
convert$1.rgb.ansi16 = function(args, saturation = null) {
|
|
58908
|
-
const [r6, g3,
|
|
58908
|
+
const [r6, g3, b3] = args;
|
|
58909
58909
|
let value = saturation === null ? convert$1.rgb.hsv(args)[2] : saturation;
|
|
58910
58910
|
value = Math.round(value / 50);
|
|
58911
58911
|
if (value === 0) {
|
|
58912
58912
|
return 30;
|
|
58913
58913
|
}
|
|
58914
|
-
let ansi = 30 + (Math.round(
|
|
58914
|
+
let ansi = 30 + (Math.round(b3 / 255) << 2 | Math.round(g3 / 255) << 1 | Math.round(r6 / 255));
|
|
58915
58915
|
if (value === 2) {
|
|
58916
58916
|
ansi += 60;
|
|
58917
58917
|
}
|
|
@@ -58923,8 +58923,8 @@ var require_index_cjs = __commonJS({
|
|
|
58923
58923
|
convert$1.rgb.ansi256 = function(args) {
|
|
58924
58924
|
const r6 = args[0];
|
|
58925
58925
|
const g3 = args[1];
|
|
58926
|
-
const
|
|
58927
|
-
if (r6 >> 4 === g3 >> 4 && g3 >> 4 ===
|
|
58926
|
+
const b3 = args[2];
|
|
58927
|
+
if (r6 >> 4 === g3 >> 4 && g3 >> 4 === b3 >> 4) {
|
|
58928
58928
|
if (r6 < 8) {
|
|
58929
58929
|
return 16;
|
|
58930
58930
|
}
|
|
@@ -58933,7 +58933,7 @@ var require_index_cjs = __commonJS({
|
|
|
58933
58933
|
}
|
|
58934
58934
|
return Math.round((r6 - 8) / 247 * 24) + 232;
|
|
58935
58935
|
}
|
|
58936
|
-
const ansi = 16 + 36 * Math.round(r6 / 255 * 5) + 6 * Math.round(g3 / 255 * 5) + Math.round(
|
|
58936
|
+
const ansi = 16 + 36 * Math.round(r6 / 255 * 5) + 6 * Math.round(g3 / 255 * 5) + Math.round(b3 / 255 * 5);
|
|
58937
58937
|
return ansi;
|
|
58938
58938
|
};
|
|
58939
58939
|
convert$1.ansi16.rgb = function(args) {
|
|
@@ -58949,8 +58949,8 @@ var require_index_cjs = __commonJS({
|
|
|
58949
58949
|
const mult = (Math.trunc(args > 50) + 1) * 0.5;
|
|
58950
58950
|
const r6 = (color & 1) * mult * 255;
|
|
58951
58951
|
const g3 = (color >> 1 & 1) * mult * 255;
|
|
58952
|
-
const
|
|
58953
|
-
return [r6, g3,
|
|
58952
|
+
const b3 = (color >> 2 & 1) * mult * 255;
|
|
58953
|
+
return [r6, g3, b3];
|
|
58954
58954
|
};
|
|
58955
58955
|
convert$1.ansi256.rgb = function(args) {
|
|
58956
58956
|
args = args[0];
|
|
@@ -58962,8 +58962,8 @@ var require_index_cjs = __commonJS({
|
|
|
58962
58962
|
let rem;
|
|
58963
58963
|
const r6 = Math.floor(args / 36) / 5 * 255;
|
|
58964
58964
|
const g3 = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
58965
|
-
const
|
|
58966
|
-
return [r6, g3,
|
|
58965
|
+
const b3 = rem % 6 / 5 * 255;
|
|
58966
|
+
return [r6, g3, b3];
|
|
58967
58967
|
};
|
|
58968
58968
|
convert$1.rgb.hex = function(args) {
|
|
58969
58969
|
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
@@ -58982,24 +58982,24 @@ var require_index_cjs = __commonJS({
|
|
|
58982
58982
|
const integer = Number.parseInt(colorString, 16);
|
|
58983
58983
|
const r6 = integer >> 16 & 255;
|
|
58984
58984
|
const g3 = integer >> 8 & 255;
|
|
58985
|
-
const
|
|
58986
|
-
return [r6, g3,
|
|
58985
|
+
const b3 = integer & 255;
|
|
58986
|
+
return [r6, g3, b3];
|
|
58987
58987
|
};
|
|
58988
58988
|
convert$1.rgb.hcg = function(rgb) {
|
|
58989
58989
|
const r6 = rgb[0] / 255;
|
|
58990
58990
|
const g3 = rgb[1] / 255;
|
|
58991
|
-
const
|
|
58992
|
-
const max = Math.max(Math.max(r6, g3),
|
|
58993
|
-
const min = Math.min(Math.min(r6, g3),
|
|
58991
|
+
const b3 = rgb[2] / 255;
|
|
58992
|
+
const max = Math.max(Math.max(r6, g3), b3);
|
|
58993
|
+
const min = Math.min(Math.min(r6, g3), b3);
|
|
58994
58994
|
const chroma = max - min;
|
|
58995
58995
|
let hue;
|
|
58996
58996
|
const grayscale = chroma < 1 ? min / (1 - chroma) : 0;
|
|
58997
58997
|
if (chroma <= 0) {
|
|
58998
58998
|
hue = 0;
|
|
58999
58999
|
} else if (max === r6) {
|
|
59000
|
-
hue = (g3 -
|
|
59000
|
+
hue = (g3 - b3) / chroma % 6;
|
|
59001
59001
|
} else if (max === g3) {
|
|
59002
|
-
hue = 2 + (
|
|
59002
|
+
hue = 2 + (b3 - r6) / chroma;
|
|
59003
59003
|
} else {
|
|
59004
59004
|
hue = 4 + (r6 - g3) / chroma;
|
|
59005
59005
|
}
|
|
@@ -59113,8 +59113,8 @@ var require_index_cjs = __commonJS({
|
|
|
59113
59113
|
};
|
|
59114
59114
|
convert$1.hwb.hcg = function(hwb) {
|
|
59115
59115
|
const w3 = hwb[1] / 100;
|
|
59116
|
-
const
|
|
59117
|
-
const v3 = 1 -
|
|
59116
|
+
const b3 = hwb[2] / 100;
|
|
59117
|
+
const v3 = 1 - b3;
|
|
59118
59118
|
const c2 = v3 - w3;
|
|
59119
59119
|
let g3 = 0;
|
|
59120
59120
|
if (c2 < 1) {
|
|
@@ -59695,15 +59695,15 @@ var require_kuler = __commonJS({
|
|
|
59695
59695
|
color[1] = color[0];
|
|
59696
59696
|
color = color.join("");
|
|
59697
59697
|
}
|
|
59698
|
-
var r6 = color.substring(0, 2), g3 = color.substring(2, 4),
|
|
59699
|
-
return [parseInt(r6, 16), parseInt(g3, 16), parseInt(
|
|
59698
|
+
var r6 = color.substring(0, 2), g3 = color.substring(2, 4), b3 = color.substring(4, 6);
|
|
59699
|
+
return [parseInt(r6, 16), parseInt(g3, 16), parseInt(b3, 16)];
|
|
59700
59700
|
};
|
|
59701
|
-
Kuler.prototype.rgb = function rgb(r6, g3,
|
|
59702
|
-
var red = r6 / 255 * 5, green = g3 / 255 * 5, blue =
|
|
59701
|
+
Kuler.prototype.rgb = function rgb(r6, g3, b3) {
|
|
59702
|
+
var red = r6 / 255 * 5, green = g3 / 255 * 5, blue = b3 / 255 * 5;
|
|
59703
59703
|
return this.ansi(red, green, blue);
|
|
59704
59704
|
};
|
|
59705
|
-
Kuler.prototype.ansi = function ansi(r6, g3,
|
|
59706
|
-
var red = Math.round(r6), green = Math.round(g3), blue = Math.round(
|
|
59705
|
+
Kuler.prototype.ansi = function ansi(r6, g3, b3) {
|
|
59706
|
+
var red = Math.round(r6), green = Math.round(g3), blue = Math.round(b3);
|
|
59707
59707
|
return 16 + red * 36 + green * 6 + blue;
|
|
59708
59708
|
};
|
|
59709
59709
|
Kuler.prototype.reset = function reset() {
|
|
@@ -62801,11 +62801,11 @@ var require_object_hash = __commonJS({
|
|
|
62801
62801
|
function PassThrough() {
|
|
62802
62802
|
return {
|
|
62803
62803
|
buf: "",
|
|
62804
|
-
write: function(
|
|
62805
|
-
this.buf +=
|
|
62804
|
+
write: function(b3) {
|
|
62805
|
+
this.buf += b3;
|
|
62806
62806
|
},
|
|
62807
|
-
end: function(
|
|
62808
|
-
this.buf +=
|
|
62807
|
+
end: function(b3) {
|
|
62808
|
+
this.buf += b3;
|
|
62809
62809
|
},
|
|
62810
62810
|
read: function() {
|
|
62811
62811
|
return this.buf;
|
|
@@ -62836,8 +62836,8 @@ var require_moment = __commonJS({
|
|
|
62836
62836
|
function isObject(input) {
|
|
62837
62837
|
return input != null && Object.prototype.toString.call(input) === "[object Object]";
|
|
62838
62838
|
}
|
|
62839
|
-
function hasOwnProp(a,
|
|
62840
|
-
return Object.prototype.hasOwnProperty.call(a,
|
|
62839
|
+
function hasOwnProp(a, b3) {
|
|
62840
|
+
return Object.prototype.hasOwnProperty.call(a, b3);
|
|
62841
62841
|
}
|
|
62842
62842
|
function isObjectEmpty(obj) {
|
|
62843
62843
|
if (Object.getOwnPropertyNames) {
|
|
@@ -62868,17 +62868,17 @@ var require_moment = __commonJS({
|
|
|
62868
62868
|
}
|
|
62869
62869
|
return res;
|
|
62870
62870
|
}
|
|
62871
|
-
function extend(a,
|
|
62872
|
-
for (var i in
|
|
62873
|
-
if (hasOwnProp(
|
|
62874
|
-
a[i] =
|
|
62871
|
+
function extend(a, b3) {
|
|
62872
|
+
for (var i in b3) {
|
|
62873
|
+
if (hasOwnProp(b3, i)) {
|
|
62874
|
+
a[i] = b3[i];
|
|
62875
62875
|
}
|
|
62876
62876
|
}
|
|
62877
|
-
if (hasOwnProp(
|
|
62878
|
-
a.toString =
|
|
62877
|
+
if (hasOwnProp(b3, "toString")) {
|
|
62878
|
+
a.toString = b3.toString;
|
|
62879
62879
|
}
|
|
62880
|
-
if (hasOwnProp(
|
|
62881
|
-
a.valueOf =
|
|
62880
|
+
if (hasOwnProp(b3, "valueOf")) {
|
|
62881
|
+
a.valueOf = b3.valueOf;
|
|
62882
62882
|
}
|
|
62883
62883
|
return a;
|
|
62884
62884
|
}
|
|
@@ -63354,8 +63354,8 @@ var require_moment = __commonJS({
|
|
|
63354
63354
|
units.push({ unit: u2, priority: priorities[u2] });
|
|
63355
63355
|
}
|
|
63356
63356
|
}
|
|
63357
|
-
units.sort(function(a,
|
|
63358
|
-
return a.priority -
|
|
63357
|
+
units.sort(function(a, b3) {
|
|
63358
|
+
return a.priority - b3.priority;
|
|
63359
63359
|
});
|
|
63360
63360
|
return units;
|
|
63361
63361
|
}
|
|
@@ -63768,8 +63768,8 @@ var require_moment = __commonJS({
|
|
|
63768
63768
|
}
|
|
63769
63769
|
}
|
|
63770
63770
|
function computeMonthsParse() {
|
|
63771
|
-
function cmpLenRev(a,
|
|
63772
|
-
return
|
|
63771
|
+
function cmpLenRev(a, b3) {
|
|
63772
|
+
return b3.length - a.length;
|
|
63773
63773
|
}
|
|
63774
63774
|
var shortPieces = [], longPieces = [], mixedPieces = [], i, mom, shortP, longP;
|
|
63775
63775
|
for (i = 0; i < 12; i++) {
|
|
@@ -63952,8 +63952,8 @@ var require_moment = __commonJS({
|
|
|
63952
63952
|
}
|
|
63953
63953
|
return isNaN(input) ? null : input;
|
|
63954
63954
|
}
|
|
63955
|
-
function shiftWeekdays(
|
|
63956
|
-
return
|
|
63955
|
+
function shiftWeekdays(ws2, n) {
|
|
63956
|
+
return ws2.slice(n, 7).concat(ws2.slice(0, n));
|
|
63957
63957
|
}
|
|
63958
63958
|
var defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord;
|
|
63959
63959
|
function localeWeekdays(m3, format2) {
|
|
@@ -64157,8 +64157,8 @@ var require_moment = __commonJS({
|
|
|
64157
64157
|
}
|
|
64158
64158
|
}
|
|
64159
64159
|
function computeWeekdaysParse() {
|
|
64160
|
-
function cmpLenRev(a,
|
|
64161
|
-
return
|
|
64160
|
+
function cmpLenRev(a, b3) {
|
|
64161
|
+
return b3.length - a.length;
|
|
64162
64162
|
}
|
|
64163
64163
|
var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp;
|
|
64164
64164
|
for (i = 0; i < 7; i++) {
|
|
@@ -64670,12 +64670,12 @@ var require_moment = __commonJS({
|
|
|
64670
64670
|
config._d = /* @__PURE__ */ new Date(config._i + (config._useUTC ? " UTC" : ""));
|
|
64671
64671
|
}
|
|
64672
64672
|
);
|
|
64673
|
-
function defaults(a,
|
|
64673
|
+
function defaults(a, b3, c2) {
|
|
64674
64674
|
if (a != null) {
|
|
64675
64675
|
return a;
|
|
64676
64676
|
}
|
|
64677
|
-
if (
|
|
64678
|
-
return
|
|
64677
|
+
if (b3 != null) {
|
|
64678
|
+
return b3;
|
|
64679
64679
|
}
|
|
64680
64680
|
return c2;
|
|
64681
64681
|
}
|
|
@@ -65575,17 +65575,17 @@ var require_moment = __commonJS({
|
|
|
65575
65575
|
}
|
|
65576
65576
|
return asFloat ? output : absFloor(output);
|
|
65577
65577
|
}
|
|
65578
|
-
function monthDiff(a,
|
|
65579
|
-
if (a.date() <
|
|
65580
|
-
return -monthDiff(
|
|
65578
|
+
function monthDiff(a, b3) {
|
|
65579
|
+
if (a.date() < b3.date()) {
|
|
65580
|
+
return -monthDiff(b3, a);
|
|
65581
65581
|
}
|
|
65582
|
-
var wholeMonthDiff = (
|
|
65583
|
-
if (
|
|
65582
|
+
var wholeMonthDiff = (b3.year() - a.year()) * 12 + (b3.month() - a.month()), anchor = a.clone().add(wholeMonthDiff, "months"), anchor2, adjust;
|
|
65583
|
+
if (b3 - anchor < 0) {
|
|
65584
65584
|
anchor2 = a.clone().add(wholeMonthDiff - 1, "months");
|
|
65585
|
-
adjust = (
|
|
65585
|
+
adjust = (b3 - anchor) / (anchor - anchor2);
|
|
65586
65586
|
} else {
|
|
65587
65587
|
anchor2 = a.clone().add(wholeMonthDiff + 1, "months");
|
|
65588
|
-
adjust = (
|
|
65588
|
+
adjust = (b3 - anchor) / (anchor2 - anchor);
|
|
65589
65589
|
}
|
|
65590
65590
|
return -(wholeMonthDiff + adjust) || 0;
|
|
65591
65591
|
}
|
|
@@ -66474,7 +66474,7 @@ var require_moment = __commonJS({
|
|
|
66474
66474
|
],
|
|
66475
66475
|
dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
|
|
66476
66476
|
ordinal: function(number) {
|
|
66477
|
-
var
|
|
66477
|
+
var b3 = number % 10, output = toInt(number % 100 / 10) === 1 ? "th" : b3 === 1 ? "st" : b3 === 2 ? "nd" : b3 === 3 ? "rd" : "th";
|
|
66478
66478
|
return number + output;
|
|
66479
66479
|
}
|
|
66480
66480
|
});
|
|
@@ -67523,9 +67523,9 @@ var require_daily_rotate_file = __commonJS({
|
|
|
67523
67523
|
if (logFiles.length) {
|
|
67524
67524
|
processLogFile(logFiles.shift());
|
|
67525
67525
|
} else if (callback) {
|
|
67526
|
-
results.sort((a,
|
|
67526
|
+
results.sort((a, b3) => {
|
|
67527
67527
|
const d1 = new Date(a.timestamp).getTime();
|
|
67528
|
-
const d2 = new Date(
|
|
67528
|
+
const d2 = new Date(b3.timestamp).getTime();
|
|
67529
67529
|
return d1 > d2 ? 1 : d1 < d2 ? -1 : 0;
|
|
67530
67530
|
});
|
|
67531
67531
|
if (options.order === "desc") {
|
|
@@ -67764,37 +67764,37 @@ function Co(r6) {
|
|
|
67764
67764
|
let e;
|
|
67765
67765
|
return r6.details?.text ? r6.diagnostics ? e = `${r6.details.text} (${r6.diagnostics})` : e = r6.details.text : r6.diagnostics ? e = r6.diagnostics : e = "Unknown error", r6.expression?.length && (e += ` (${r6.expression.join(", ")})`), e;
|
|
67766
67766
|
}
|
|
67767
|
-
function
|
|
67767
|
+
function Ao(r6, e) {
|
|
67768
67768
|
let t = e.max && e.max === Number.MAX_SAFE_INTEGER ? Number.POSITIVE_INFINITY : e.max;
|
|
67769
67769
|
return { path: r6, description: "", type: e.type ?? [], min: e.min ?? 0, max: t ?? 1, isArray: !!t && t > 1, constraints: [] };
|
|
67770
67770
|
}
|
|
67771
67771
|
function _n(r6) {
|
|
67772
67772
|
let e = /* @__PURE__ */ Object.create(null);
|
|
67773
|
-
for (let [t, n] of Object.entries(r6)) e[t] = { name: t, type: t, path: t, elements: Object.fromEntries(Object.entries(n.elements).map(([i, o2]) => [i,
|
|
67773
|
+
for (let [t, n] of Object.entries(r6)) e[t] = { name: t, type: t, path: t, elements: Object.fromEntries(Object.entries(n.elements).map(([i, o2]) => [i, Ao(i, o2)])), constraints: [], innerTypes: [] };
|
|
67774
67774
|
return e;
|
|
67775
67775
|
}
|
|
67776
67776
|
var Ln = { Element: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] } } }, BackboneElement: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] } } }, Address: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, line: { max: 9007199254740991, type: [{ code: "string" }] }, city: { type: [{ code: "string" }] }, district: { type: [{ code: "string" }] }, state: { type: [{ code: "string" }] }, postalCode: { type: [{ code: "string" }] }, country: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Age: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Annotation: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "author[x]": { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Organization"] }, { code: "string" }] }, time: { type: [{ code: "dateTime" }] }, text: { min: 1, type: [{ code: "markdown" }] } } }, Attachment: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, contentType: { type: [{ code: "code" }] }, language: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] }, url: { type: [{ code: "url" }] }, size: { type: [{ code: "unsignedInt" }] }, hash: { type: [{ code: "base64Binary" }] }, title: { type: [{ code: "string" }] }, creation: { type: [{ code: "dateTime" }] } } }, CodeableConcept: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, coding: { max: 9007199254740991, type: [{ code: "Coding" }] }, text: { type: [{ code: "string" }] } } }, Coding: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, system: { type: [{ code: "uri" }] }, version: { type: [{ code: "string" }] }, code: { type: [{ code: "code" }] }, display: { type: [{ code: "string" }] }, userSelected: { type: [{ code: "boolean" }] } } }, ContactDetail: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, name: { type: [{ code: "string" }] }, telecom: { max: 9007199254740991, type: [{ code: "ContactPoint" }] } } }, ContactPoint: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, system: { type: [{ code: "code" }] }, value: { type: [{ code: "string" }] }, use: { type: [{ code: "code" }] }, rank: { type: [{ code: "positiveInt" }] }, period: { type: [{ code: "Period" }] } } }, Contributor: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { min: 1, type: [{ code: "string" }] }, contact: { max: 9007199254740991, type: [{ code: "ContactDetail" }] } } }, Count: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, DataRequirement: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, "subject[x]": { type: [{ code: "CodeableConcept" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Group"] }] }, mustSupport: { max: 9007199254740991, type: [{ code: "string" }] }, codeFilter: { max: 9007199254740991, type: [{ code: "DataRequirementCodeFilter" }] }, dateFilter: { max: 9007199254740991, type: [{ code: "DataRequirementDateFilter" }] }, limit: { type: [{ code: "positiveInt" }] }, sort: { max: 9007199254740991, type: [{ code: "DataRequirementSort" }] } } }, DataRequirementCodeFilter: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { type: [{ code: "string" }] }, searchParam: { type: [{ code: "string" }] }, valueSet: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/ValueSet"] }] }, code: { max: 9007199254740991, type: [{ code: "Coding" }] } } }, DataRequirementDateFilter: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { type: [{ code: "string" }] }, searchParam: { type: [{ code: "string" }] }, "value[x]": { type: [{ code: "dateTime" }, { code: "Period" }, { code: "Duration" }] } } }, DataRequirementSort: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, direction: { min: 1, type: [{ code: "code" }] } } }, Distance: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Dosage: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, sequence: { type: [{ code: "integer" }] }, text: { type: [{ code: "string" }] }, additionalInstruction: { max: 9007199254740991, type: [{ code: "CodeableConcept" }] }, patientInstruction: { type: [{ code: "string" }] }, timing: { type: [{ code: "Timing" }] }, "asNeeded[x]": { type: [{ code: "boolean" }, { code: "CodeableConcept" }] }, site: { type: [{ code: "CodeableConcept" }] }, route: { type: [{ code: "CodeableConcept" }] }, method: { type: [{ code: "CodeableConcept" }] }, doseAndRate: { max: 9007199254740991, type: [{ code: "DosageDoseAndRate" }] }, maxDosePerPeriod: { type: [{ code: "Ratio" }] }, maxDosePerAdministration: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, maxDosePerLifetime: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, DosageDoseAndRate: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { type: [{ code: "CodeableConcept" }] }, "dose[x]": { type: [{ code: "Range" }, { code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, "rate[x]": { type: [{ code: "Ratio" }, { code: "Range" }, { code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Duration: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, ElementDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, representation: { max: 9007199254740991, type: [{ code: "code" }] }, sliceName: { type: [{ code: "string" }] }, sliceIsConstraining: { type: [{ code: "boolean" }] }, label: { type: [{ code: "string" }] }, code: { max: 9007199254740991, type: [{ code: "Coding" }] }, slicing: { type: [{ code: "ElementDefinitionSlicing" }] }, short: { type: [{ code: "string" }] }, definition: { type: [{ code: "markdown" }] }, comment: { type: [{ code: "markdown" }] }, requirements: { type: [{ code: "markdown" }] }, alias: { max: 9007199254740991, type: [{ code: "string" }] }, min: { type: [{ code: "unsignedInt" }] }, max: { type: [{ code: "string" }] }, base: { type: [{ code: "ElementDefinitionBase" }] }, contentReference: { type: [{ code: "uri" }] }, type: { max: 9007199254740991, type: [{ code: "ElementDefinitionType" }] }, "defaultValue[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, meaningWhenMissing: { type: [{ code: "markdown" }] }, orderMeaning: { type: [{ code: "string" }] }, "fixed[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, "pattern[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, example: { max: 9007199254740991, type: [{ code: "ElementDefinitionExample" }] }, "minValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, "maxValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, maxLength: { type: [{ code: "integer" }] }, condition: { max: 9007199254740991, type: [{ code: "id" }] }, constraint: { max: 9007199254740991, type: [{ code: "ElementDefinitionConstraint" }] }, mustSupport: { type: [{ code: "boolean" }] }, isModifier: { type: [{ code: "boolean" }] }, isModifierReason: { type: [{ code: "string" }] }, isSummary: { type: [{ code: "boolean" }] }, binding: { type: [{ code: "ElementDefinitionBinding" }] }, mapping: { max: 9007199254740991, type: [{ code: "ElementDefinitionMapping" }] } } }, ElementDefinitionSlicingDiscriminator: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, path: { min: 1, type: [{ code: "string" }] } } }, ElementDefinitionSlicing: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, discriminator: { max: 9007199254740991, type: [{ code: "ElementDefinitionSlicingDiscriminator" }] }, description: { type: [{ code: "string" }] }, ordered: { type: [{ code: "boolean" }] }, rules: { min: 1, type: [{ code: "code" }] } } }, ElementDefinitionBase: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, min: { min: 1, type: [{ code: "unsignedInt" }] }, max: { min: 1, type: [{ code: "string" }] } } }, ElementDefinitionType: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, code: { min: 1, type: [{ code: "uri" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition", "http://hl7.org/fhir/StructureDefinition/ImplementationGuide"] }] }, targetProfile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition", "http://hl7.org/fhir/StructureDefinition/ImplementationGuide"] }] }, aggregation: { max: 9007199254740991, type: [{ code: "code" }] }, versioning: { type: [{ code: "code" }] } } }, ElementDefinitionExample: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, label: { min: 1, type: [{ code: "string" }] }, "value[x]": { min: 1, type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] } } }, ElementDefinitionConstraint: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, key: { min: 1, type: [{ code: "id" }] }, requirements: { type: [{ code: "string" }] }, severity: { min: 1, type: [{ code: "code" }] }, human: { min: 1, type: [{ code: "string" }] }, expression: { type: [{ code: "string" }] }, xpath: { type: [{ code: "string" }] }, source: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] } } }, ElementDefinitionBinding: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, strength: { min: 1, type: [{ code: "code" }] }, description: { type: [{ code: "string" }] }, valueSet: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/ValueSet"] }] } } }, ElementDefinitionMapping: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, identity: { min: 1, type: [{ code: "id" }] }, language: { type: [{ code: "code" }] }, map: { min: 1, type: [{ code: "string" }] }, comment: { type: [{ code: "string" }] } } }, Expression: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, description: { type: [{ code: "string" }] }, name: { type: [{ code: "id" }] }, language: { min: 1, type: [{ code: "code" }] }, expression: { type: [{ code: "string" }] }, reference: { type: [{ code: "uri" }] } } }, Extension: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, url: { min: 1, type: [{ code: "uri" }] }, "value[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] } } }, HumanName: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, family: { type: [{ code: "string" }] }, given: { max: 9007199254740991, type: [{ code: "string" }] }, prefix: { max: 9007199254740991, type: [{ code: "string" }] }, suffix: { max: 9007199254740991, type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Identifier: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "CodeableConcept" }] }, system: { type: [{ code: "uri" }] }, value: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] }, assigner: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MarketingStatus: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, country: { min: 1, type: [{ code: "CodeableConcept" }] }, jurisdiction: { type: [{ code: "CodeableConcept" }] }, status: { min: 1, type: [{ code: "CodeableConcept" }] }, dateRange: { min: 1, type: [{ code: "Period" }] }, restoreDate: { type: [{ code: "dateTime" }] } } }, Meta: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, versionId: { type: [{ code: "id" }] }, lastUpdated: { type: [{ code: "instant" }] }, source: { type: [{ code: "uri" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, security: { max: 9007199254740991, type: [{ code: "Coding" }] }, tag: { max: 9007199254740991, type: [{ code: "Coding" }] }, project: { type: [{ code: "uri" }] }, author: { type: [{ code: "Reference" }] }, onBehalfOf: { type: [{ code: "Reference" }] }, account: { type: [{ code: "Reference" }] }, accounts: { max: 9007199254740991, type: [{ code: "Reference" }] }, compartment: { max: 9007199254740991, type: [{ code: "Reference" }] } } }, Money: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, currency: { type: [{ code: "code" }] } } }, Narrative: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, status: { min: 1, type: [{ code: "code" }] }, div: { min: 1, type: [{ code: "xhtml" }] } } }, ParameterDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, name: { type: [{ code: "code" }] }, use: { min: 1, type: [{ code: "code" }] }, min: { type: [{ code: "integer" }] }, max: { type: [{ code: "string" }] }, documentation: { type: [{ code: "string" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] } } }, Period: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, start: { type: [{ code: "dateTime" }] }, end: { type: [{ code: "dateTime" }] } } }, Population: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "age[x]": { type: [{ code: "Range" }, { code: "CodeableConcept" }] }, gender: { type: [{ code: "CodeableConcept" }] }, race: { type: [{ code: "CodeableConcept" }] }, physiologicalCondition: { type: [{ code: "CodeableConcept" }] } } }, ProdCharacteristic: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, height: { type: [{ code: "Quantity" }] }, width: { type: [{ code: "Quantity" }] }, depth: { type: [{ code: "Quantity" }] }, weight: { type: [{ code: "Quantity" }] }, nominalVolume: { type: [{ code: "Quantity" }] }, externalDiameter: { type: [{ code: "Quantity" }] }, shape: { type: [{ code: "string" }] }, color: { max: 9007199254740991, type: [{ code: "string" }] }, imprint: { max: 9007199254740991, type: [{ code: "string" }] }, image: { max: 9007199254740991, type: [{ code: "Attachment" }] }, scoring: { type: [{ code: "CodeableConcept" }] } } }, ProductShelfLife: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, identifier: { type: [{ code: "Identifier" }] }, type: { min: 1, type: [{ code: "CodeableConcept" }] }, period: { min: 1, type: [{ code: "Quantity" }] }, specialPrecautionsForStorage: { max: 9007199254740991, type: [{ code: "CodeableConcept" }] } } }, Quantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Range: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, low: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, high: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Ratio: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, numerator: { type: [{ code: "Quantity" }] }, denominator: { type: [{ code: "Quantity" }] } } }, Reference: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, reference: { type: [{ code: "string" }] }, type: { type: [{ code: "uri" }] }, identifier: { type: [{ code: "Identifier" }] }, display: { type: [{ code: "string" }] } } }, RelatedArtifact: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, label: { type: [{ code: "string" }] }, display: { type: [{ code: "string" }] }, citation: { type: [{ code: "markdown" }] }, url: { type: [{ code: "url" }] }, document: { type: [{ code: "Attachment" }] }, resource: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Resource"] }] } } }, SampledData: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, origin: { min: 1, type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, period: { min: 1, type: [{ code: "decimal" }] }, factor: { type: [{ code: "decimal" }] }, lowerLimit: { type: [{ code: "decimal" }] }, upperLimit: { type: [{ code: "decimal" }] }, dimensions: { min: 1, type: [{ code: "positiveInt" }] }, data: { type: [{ code: "string" }] } } }, Signature: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, max: 9007199254740991, type: [{ code: "Coding" }] }, when: { min: 1, type: [{ code: "instant" }] }, who: { min: 1, type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, onBehalfOf: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, targetFormat: { type: [{ code: "code" }] }, sigFormat: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] } } }, SubstanceAmount: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "amount[x]": { type: [{ code: "Quantity" }, { code: "Range" }, { code: "string" }] }, amountType: { type: [{ code: "CodeableConcept" }] }, amountText: { type: [{ code: "string" }] }, referenceRange: { type: [{ code: "SubstanceAmountReferenceRange" }] } } }, SubstanceAmountReferenceRange: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, lowLimit: { type: [{ code: "Quantity" }] }, highLimit: { type: [{ code: "Quantity" }] } } }, Timing: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, event: { max: 9007199254740991, type: [{ code: "dateTime" }] }, repeat: { type: [{ code: "TimingRepeat" }] }, code: { type: [{ code: "CodeableConcept" }] } } }, TimingRepeat: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "bounds[x]": { type: [{ code: "Duration" }, { code: "Range" }, { code: "Period" }] }, count: { type: [{ code: "positiveInt" }] }, countMax: { type: [{ code: "positiveInt" }] }, duration: { type: [{ code: "decimal" }] }, durationMax: { type: [{ code: "decimal" }] }, durationUnit: { type: [{ code: "code" }] }, frequency: { type: [{ code: "positiveInt" }] }, frequencyMax: { type: [{ code: "positiveInt" }] }, period: { type: [{ code: "decimal" }] }, periodMax: { type: [{ code: "decimal" }] }, periodUnit: { type: [{ code: "code" }] }, dayOfWeek: { max: 9007199254740991, type: [{ code: "code" }] }, timeOfDay: { max: 9007199254740991, type: [{ code: "time" }] }, when: { max: 9007199254740991, type: [{ code: "code" }] }, offset: { type: [{ code: "unsignedInt" }] } } }, TriggerDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { type: [{ code: "string" }] }, "timing[x]": { type: [{ code: "Timing" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Schedule"] }, { code: "date" }, { code: "dateTime" }] }, data: { max: 9007199254740991, type: [{ code: "DataRequirement" }] }, condition: { type: [{ code: "Expression" }] } } }, UsageContext: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, code: { min: 1, type: [{ code: "Coding" }] }, "value[x]": { min: 1, type: [{ code: "CodeableConcept" }, { code: "Quantity" }, { code: "Range" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/PlanDefinition", "http://hl7.org/fhir/StructureDefinition/ResearchStudy", "http://hl7.org/fhir/StructureDefinition/InsurancePlan", "http://hl7.org/fhir/StructureDefinition/HealthcareService", "http://hl7.org/fhir/StructureDefinition/Group", "http://hl7.org/fhir/StructureDefinition/Location", "http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MoneyQuantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, SimpleQuantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { max: 0, type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, IdentityProvider: { elements: { authorizeUrl: { min: 1, type: [{ code: "string" }] }, tokenUrl: { min: 1, type: [{ code: "string" }] }, tokenAuthMethod: { type: [{ code: "code" }] }, userInfoUrl: { min: 1, type: [{ code: "string" }] }, clientId: { min: 1, type: [{ code: "string" }] }, clientSecret: { min: 1, type: [{ code: "string" }] }, usePkce: { type: [{ code: "boolean" }] }, useSubject: { type: [{ code: "boolean" }] } } } };
|
|
67777
67777
|
function Rr(r6) {
|
|
67778
|
-
return new
|
|
67778
|
+
return new Sr(r6).parse();
|
|
67779
67779
|
}
|
|
67780
67780
|
var Te = _n(Ln);
|
|
67781
67781
|
var Cr = /* @__PURE__ */ Object.create(null);
|
|
67782
67782
|
var Fn = /* @__PURE__ */ Object.create(null);
|
|
67783
67783
|
var Oo = { "http://hl7.org/fhir/StructureDefinition/MoneyQuantity": "MoneyQuantity", "http://hl7.org/fhir/StructureDefinition/SimpleQuantity": "SimpleQuantity", "http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition": "ViewDefinition" };
|
|
67784
|
-
function
|
|
67784
|
+
function qn(r6) {
|
|
67785
67785
|
let e;
|
|
67786
67786
|
return e = Fn[r6], e || (e = Fn[r6] = /* @__PURE__ */ Object.create(null)), e;
|
|
67787
67787
|
}
|
|
67788
67788
|
function Pr(r6) {
|
|
67789
67789
|
let t = (Array.isArray(r6) ? r6 : r6.entry?.map((n) => n.resource) ?? []).filter((n) => n?.resourceType === "StructureDefinition");
|
|
67790
67790
|
Gn(t);
|
|
67791
|
-
for (let n of t)
|
|
67791
|
+
for (let n of t) Ar(n);
|
|
67792
67792
|
}
|
|
67793
|
-
function
|
|
67793
|
+
function Ar(r6) {
|
|
67794
67794
|
if (!r6?.name) throw new Error("Failed loading StructureDefinition from bundle");
|
|
67795
67795
|
if (r6.resourceType !== "StructureDefinition") return;
|
|
67796
67796
|
let e = Rr(r6), t = Oo[r6.url], n, i;
|
|
67797
|
-
t ? (n = Te, i = t) : r6.url === `http://hl7.org/fhir/StructureDefinition/${r6.type}` || r6.url === `https://medplum.com/fhir/StructureDefinition/${r6.type}` || r6.type?.startsWith("http://") || r6.type?.startsWith("https://") ? (n = Te, i = r6.type) : (n =
|
|
67797
|
+
t ? (n = Te, i = t) : r6.url === `http://hl7.org/fhir/StructureDefinition/${r6.type}` || r6.url === `https://medplum.com/fhir/StructureDefinition/${r6.type}` || r6.type?.startsWith("http://") || r6.type?.startsWith("https://") ? (n = Te, i = r6.type) : (n = qn(r6.url), i = r6.type), n[i] = e;
|
|
67798
67798
|
for (let o2 of e.innerTypes) o2.parentType = e, n[o2.name] = o2;
|
|
67799
67799
|
Cr[r6.url] = e;
|
|
67800
67800
|
}
|
|
@@ -67803,7 +67803,7 @@ function jn(r6) {
|
|
|
67803
67803
|
}
|
|
67804
67804
|
function Qe(r6, e) {
|
|
67805
67805
|
if (e) {
|
|
67806
|
-
let t =
|
|
67806
|
+
let t = qn(e)[r6];
|
|
67807
67807
|
if (t) return t;
|
|
67808
67808
|
}
|
|
67809
67809
|
return Te[r6];
|
|
@@ -67811,7 +67811,7 @@ function Qe(r6, e) {
|
|
|
67811
67811
|
function $n(r6) {
|
|
67812
67812
|
return !!Cr[r6];
|
|
67813
67813
|
}
|
|
67814
|
-
var
|
|
67814
|
+
var Sr = class {
|
|
67815
67815
|
constructor(e) {
|
|
67816
67816
|
c(this, "root");
|
|
67817
67817
|
c(this, "elements");
|
|
@@ -67830,7 +67830,7 @@ var br = class {
|
|
|
67830
67830
|
if (e.sliceName) this.parseSliceStart(e);
|
|
67831
67831
|
else if (e.id?.includes(":")) {
|
|
67832
67832
|
if (this.slicingContext?.current) {
|
|
67833
|
-
let t =
|
|
67833
|
+
let t = br(e, this.slicingContext.path);
|
|
67834
67834
|
this.slicingContext.current.elements[t] = this.parseElementDefinition(e);
|
|
67835
67835
|
}
|
|
67836
67836
|
} else {
|
|
@@ -67839,13 +67839,13 @@ var br = class {
|
|
|
67839
67839
|
let n = this.backboneContext;
|
|
67840
67840
|
for (; n; ) {
|
|
67841
67841
|
if (e.path?.startsWith(n.path + ".")) {
|
|
67842
|
-
n.type.elements[
|
|
67842
|
+
n.type.elements[br(e, n.path)] = t;
|
|
67843
67843
|
break;
|
|
67844
67844
|
}
|
|
67845
67845
|
n = n.parent;
|
|
67846
67846
|
}
|
|
67847
67847
|
if (!n) {
|
|
67848
|
-
let i =
|
|
67848
|
+
let i = br(e, this.root.path);
|
|
67849
67849
|
e.isSummary && this.resourceSchema.summaryProperties?.add(i.replace("[x]", "")), t.min > 0 && this.resourceSchema.mandatoryProperties?.add(i.replace("[x]", "")), this.resourceSchema.elements[i] = t;
|
|
67850
67850
|
}
|
|
67851
67851
|
this.checkFieldExit(e);
|
|
@@ -67910,7 +67910,7 @@ var br = class {
|
|
|
67910
67910
|
function Un(r6) {
|
|
67911
67911
|
return r6 === "*" ? Number.POSITIVE_INFINITY : Number.parseInt(r6, 10);
|
|
67912
67912
|
}
|
|
67913
|
-
function
|
|
67913
|
+
function br(r6, e = "") {
|
|
67914
67914
|
return ko(r6.path, e);
|
|
67915
67915
|
}
|
|
67916
67916
|
function ko(r6, e) {
|
|
@@ -67943,8 +67943,8 @@ var ze = { base64Binary: /^([A-Za-z\d+/]{4})*([A-Za-z\d+/]{2}==|[A-Za-z\d+/]{3}=
|
|
|
67943
67943
|
function m(r6) {
|
|
67944
67944
|
return [{ type: d.boolean, value: r6 }];
|
|
67945
67945
|
}
|
|
67946
|
-
function
|
|
67947
|
-
return r6 == null ? { type: "undefined", value: void 0 } : Number.isSafeInteger(r6) ? { type: d.integer, value: r6 } : typeof r6 == "number" ? { type: d.decimal, value: r6 } : typeof r6 == "boolean" ? { type: d.boolean, value: r6 } : typeof r6 == "string" ? { type: d.string, value: r6 } : O(r6) ? { type: d.Quantity, value: r6 } : I(r6) ? { type: r6.resourceType, value: r6 } :
|
|
67946
|
+
function b(r6) {
|
|
67947
|
+
return r6 == null ? { type: "undefined", value: void 0 } : Number.isSafeInteger(r6) ? { type: d.integer, value: r6 } : typeof r6 == "number" ? { type: d.decimal, value: r6 } : typeof r6 == "boolean" ? { type: d.boolean, value: r6 } : typeof r6 == "string" ? { type: d.string, value: r6 } : O(r6) ? { type: d.Quantity, value: r6 } : I(r6) ? { type: r6.resourceType, value: r6 } : qr(r6) ? { type: d.CodeableConcept, value: r6 } : Br(r6) ? { type: d.Coding, value: r6 } : { type: d.BackboneElement, value: r6 };
|
|
67948
67948
|
}
|
|
67949
67949
|
function U(r6) {
|
|
67950
67950
|
return r6.length === 0 ? false : !!r6[0].value;
|
|
@@ -67957,7 +67957,7 @@ function J(r6, e) {
|
|
|
67957
67957
|
}
|
|
67958
67958
|
function V(r6, e, t) {
|
|
67959
67959
|
if (!r6.value) return;
|
|
67960
|
-
let n =
|
|
67960
|
+
let n = St(r6.type, e, t?.profileUrl);
|
|
67961
67961
|
return n ? $o(r6, e, n) : Ho(r6, e);
|
|
67962
67962
|
}
|
|
67963
67963
|
function $o(r6, e, t) {
|
|
@@ -67989,7 +67989,7 @@ function Ho(r6, e) {
|
|
|
67989
67989
|
let n;
|
|
67990
67990
|
if (e in t) {
|
|
67991
67991
|
let i = t[e];
|
|
67992
|
-
Array.isArray(i) ? n = i.map(
|
|
67992
|
+
Array.isArray(i) ? n = i.map(b) : n = b(i);
|
|
67993
67993
|
} else {
|
|
67994
67994
|
let i = e.endsWith("[x]") ? e.substring(0, e.length - 3) : e;
|
|
67995
67995
|
for (let o2 of Object.values(d)) {
|
|
@@ -68108,7 +68108,7 @@ function Qo(r6, e) {
|
|
|
68108
68108
|
function Xe(r6, e) {
|
|
68109
68109
|
return I(r6, e) && "id" in r6 && typeof r6.id == "string";
|
|
68110
68110
|
}
|
|
68111
|
-
function
|
|
68111
|
+
function be(r6) {
|
|
68112
68112
|
let e = M(r6) ?? "undefined/undefined", t = Jo(r6);
|
|
68113
68113
|
return t === e ? { reference: e } : { reference: e, display: t };
|
|
68114
68114
|
}
|
|
@@ -68116,7 +68116,7 @@ function M(r6) {
|
|
|
68116
68116
|
if (H(r6)) return r6.reference;
|
|
68117
68117
|
if (Xe(r6)) return `${r6.resourceType}/${r6.id}`;
|
|
68118
68118
|
}
|
|
68119
|
-
function
|
|
68119
|
+
function Se(r6) {
|
|
68120
68120
|
if (r6) return H(r6) ? r6.reference.split("/")[1] : r6.id;
|
|
68121
68121
|
}
|
|
68122
68122
|
function zo(r6) {
|
|
@@ -68137,7 +68137,7 @@ function Jo(r6) {
|
|
|
68137
68137
|
if ("name" in r6 && r6.name && typeof r6.name == "string") return r6.name;
|
|
68138
68138
|
if ("code" in r6 && r6.code) {
|
|
68139
68139
|
let e = r6.code;
|
|
68140
|
-
if (Array.isArray(e) && (e = e[0]),
|
|
68140
|
+
if (Array.isArray(e) && (e = e[0]), qr(e)) return Ye(e);
|
|
68141
68141
|
if (os(e)) return e.text;
|
|
68142
68142
|
}
|
|
68143
68143
|
return M(r6) ?? "";
|
|
@@ -68233,7 +68233,7 @@ function Be(r6) {
|
|
|
68233
68233
|
function Br(r6) {
|
|
68234
68234
|
return E(r6) && "code" in r6 && typeof r6.code == "string";
|
|
68235
68235
|
}
|
|
68236
|
-
function
|
|
68236
|
+
function qr(r6) {
|
|
68237
68237
|
return E(r6) && "coding" in r6 && Array.isArray(r6.coding) && r6.coding.every(Br);
|
|
68238
68238
|
}
|
|
68239
68239
|
function os(r6) {
|
|
@@ -68292,7 +68292,7 @@ function hi(r6) {
|
|
|
68292
68292
|
return typeof r6 == "object" && !Array.isArray(r6) && !(r6 instanceof URLSearchParams) && (r6 = Object.fromEntries(Object.entries(r6).filter((e) => e[1] !== void 0))), new URLSearchParams(r6).toString();
|
|
68293
68293
|
}
|
|
68294
68294
|
var fs2 = /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-_]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-_]*[A-Za-z0-9])$/;
|
|
68295
|
-
function
|
|
68295
|
+
function Gl(r6) {
|
|
68296
68296
|
return fs2.test(r6);
|
|
68297
68297
|
}
|
|
68298
68298
|
var g = Object.freeze([]);
|
|
@@ -68343,11 +68343,11 @@ function Er(r6) {
|
|
|
68343
68343
|
function Rs(r6) {
|
|
68344
68344
|
return r6.length === 1 ? r6[0] : r6.map(D).join("");
|
|
68345
68345
|
}
|
|
68346
|
-
function
|
|
68346
|
+
function St(r6, e, t) {
|
|
68347
68347
|
let n = Qe(r6, t);
|
|
68348
|
-
if (n) return
|
|
68348
|
+
if (n) return ws(n.elements, e);
|
|
68349
68349
|
}
|
|
68350
|
-
function
|
|
68350
|
+
function ws(r6, e) {
|
|
68351
68351
|
let t = r6[e] ?? r6[e + "[x]"];
|
|
68352
68352
|
if (t) return t;
|
|
68353
68353
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -68365,7 +68365,7 @@ function H(r6, e) {
|
|
|
68365
68365
|
return r6 && typeof r6 == "object" && "reference" in r6 && typeof r6.reference == "string" ? e ? r6.reference.match(new RegExp(`^${e}(/|\\?)`)) !== null : true : false;
|
|
68366
68366
|
}
|
|
68367
68367
|
var B = { types: {} };
|
|
68368
|
-
function
|
|
68368
|
+
function qe(r6) {
|
|
68369
68369
|
if (r6.startsWith("T")) return r6 + "T00:00:00.000Z".substring(r6.length);
|
|
68370
68370
|
if (r6.length <= 10) return r6;
|
|
68371
68371
|
try {
|
|
@@ -68427,7 +68427,7 @@ var k = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) =>
|
|
|
68427
68427
|
if (!t) return e;
|
|
68428
68428
|
let n = t.eval(r6, Ce(r6));
|
|
68429
68429
|
return [...e, ...n];
|
|
68430
|
-
}, htmlChecks: (r6, e, t) => [
|
|
68430
|
+
}, htmlChecks: (r6, e, t) => [b(true)], iif: (r6, e, t, n, i) => {
|
|
68431
68431
|
let o2 = t.eval(r6, e);
|
|
68432
68432
|
if (o2.length > 1 || o2.length === 1 && typeof o2[0].value != "boolean") throw new Error("Expected criterion to evaluate to a Boolean");
|
|
68433
68433
|
return U(o2) ? n.eval(r6, e) : i ? i.eval(r6, e) : [];
|
|
@@ -68449,11 +68449,11 @@ var k = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) =>
|
|
|
68449
68449
|
}, convertsToInteger: (r6, e) => e.length === 0 ? [] : m(k.toInteger(r6, e).length === 1), toDate: (r6, e) => {
|
|
68450
68450
|
if (e.length === 0) return [];
|
|
68451
68451
|
let [{ value: t }] = X(e, 1);
|
|
68452
|
-
return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: d.date, value:
|
|
68452
|
+
return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: d.date, value: qe(t) }] : [];
|
|
68453
68453
|
}, convertsToDate: (r6, e) => e.length === 0 ? [] : m(k.toDate(r6, e).length === 1), toDateTime: (r6, e) => {
|
|
68454
68454
|
if (e.length === 0) return [];
|
|
68455
68455
|
let [{ value: t }] = X(e, 1);
|
|
68456
|
-
return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: d.dateTime, value:
|
|
68456
|
+
return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: d.dateTime, value: qe(t) }] : [];
|
|
68457
68457
|
}, convertsToDateTime: (r6, e) => e.length === 0 ? [] : m(k.toDateTime(r6, e).length === 1), toDecimal: (r6, e) => {
|
|
68458
68458
|
if (e.length === 0) return [];
|
|
68459
68459
|
let [{ value: t }] = X(e, 1);
|
|
@@ -68471,13 +68471,13 @@ var k = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) =>
|
|
|
68471
68471
|
let [{ value: t }] = X(e, 1);
|
|
68472
68472
|
if (typeof t == "string") {
|
|
68473
68473
|
let n = /^T?(\d{2}(:\d{2}(:\d{2})?)?)/.exec(t);
|
|
68474
|
-
if (n) return [{ type: d.time, value:
|
|
68474
|
+
if (n) return [{ type: d.time, value: qe("T" + n[1]) }];
|
|
68475
68475
|
}
|
|
68476
68476
|
return [];
|
|
68477
|
-
}, convertsToTime: (r6, e) => e.length === 0 ? [] : m(k.toTime(r6, e).length === 1), indexOf: (r6, e, t) =>
|
|
68477
|
+
}, convertsToTime: (r6, e) => e.length === 0 ? [] : m(k.toTime(r6, e).length === 1), indexOf: (r6, e, t) => q((n, i) => n.indexOf(i), r6, e, t), substring: (r6, e, t, n) => q((i, o2, s) => {
|
|
68478
68478
|
let a = o2, u2 = s ? a + s : i.length;
|
|
68479
68479
|
return a < 0 || a >= i.length ? void 0 : i.substring(a, u2);
|
|
68480
|
-
}, r6, e, t, n), startsWith: (r6, e, t) =>
|
|
68480
|
+
}, r6, e, t, n), startsWith: (r6, e, t) => q((n, i) => n.startsWith(i), r6, e, t), endsWith: (r6, e, t) => q((n, i) => n.endsWith(i), r6, e, t), contains: (r6, e, t) => q((n, i) => n.includes(i), r6, e, t), upper: (r6, e) => q((t) => t.toUpperCase(), r6, e), lower: (r6, e) => q((t) => t.toLowerCase(), r6, e), replace: (r6, e, t, n) => q((i, o2, s) => i.replaceAll(o2, s), r6, e, t, n), matches: (r6, e, t) => q((n, i) => !!new RegExp(i).exec(n), r6, e, t), replaceMatches: (r6, e, t, n) => q((i, o2, s) => i.replaceAll(new RegExp(o2, "g"), s.replaceAll(/\$\{(\w+)\}/g, "$<$1>")), r6, e, t, n), length: (r6, e) => q((t) => t.length, r6, e), toChars: (r6, e) => q((t) => t ? t.split("") : void 0, r6, e), encode: ne, decode: ne, escape: ne, unescape: ne, trim: ne, split: ne, join: (r6, e, t) => {
|
|
68481
68481
|
let n = t?.eval(r6, Ce(r6))[0]?.value ?? "";
|
|
68482
68482
|
if (typeof n != "string") throw new TypeError("Separator must be a string.");
|
|
68483
68483
|
return [{ type: d.string, value: e.map((i) => i.value?.toString() ?? "").join(n) }];
|
|
@@ -68502,7 +68502,7 @@ var k = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) =>
|
|
|
68502
68502
|
if (typeof n == "string") i = n;
|
|
68503
68503
|
else if (typeof n == "object") {
|
|
68504
68504
|
let o2 = n;
|
|
68505
|
-
if (o2.resource) return
|
|
68505
|
+
if (o2.resource) return b(o2.resource);
|
|
68506
68506
|
o2.reference ? i = o2.reference : o2.type && o2.identifier && (i = `${o2.type}?identifier=${o2.identifier.system}|${o2.identifier.value}`);
|
|
68507
68507
|
}
|
|
68508
68508
|
if (i?.includes("?")) {
|
|
@@ -68526,7 +68526,7 @@ var k = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) =>
|
|
|
68526
68526
|
let n = e[0].value;
|
|
68527
68527
|
if (!n?.reference) return [];
|
|
68528
68528
|
let i = "";
|
|
68529
|
-
return t instanceof L && (i = t.name), i && !n.reference.startsWith(i + "/") ? [] : [{ type: d.id, value:
|
|
68529
|
+
return t instanceof L && (i = t.name), i && !n.reference.startsWith(i + "/") ? [] : [{ type: d.id, value: Se(n) }];
|
|
68530
68530
|
}, extension: (r6, e, t) => {
|
|
68531
68531
|
let n = t.eval(r6, e)[0].value, i = e?.[0]?.value;
|
|
68532
68532
|
if (i) {
|
|
@@ -68535,12 +68535,12 @@ var k = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) =>
|
|
|
68535
68535
|
}
|
|
68536
68536
|
return [];
|
|
68537
68537
|
} };
|
|
68538
|
-
function
|
|
68538
|
+
function q(r6, e, t, ...n) {
|
|
68539
68539
|
if (t.length === 0) return [];
|
|
68540
68540
|
let [{ value: i }] = X(t, 1);
|
|
68541
68541
|
if (typeof i != "string") throw new TypeError("String function cannot be called with non-string");
|
|
68542
68542
|
let o2 = n.map((a) => a?.eval(e, t)[0]?.value), s = r6(i, ...o2);
|
|
68543
|
-
return s === void 0 ? [] : Array.isArray(s) ? s.map(
|
|
68543
|
+
return s === void 0 ? [] : Array.isArray(s) ? s.map(b) : [b(s)];
|
|
68544
68544
|
}
|
|
68545
68545
|
function Y(r6, e, t, ...n) {
|
|
68546
68546
|
if (t.length === 0) return [];
|
|
@@ -68559,7 +68559,7 @@ function Ce(r6) {
|
|
|
68559
68559
|
for (; e.parent?.variables.$this; ) e = e.parent;
|
|
68560
68560
|
return [e.variables.$this];
|
|
68561
68561
|
}
|
|
68562
|
-
var
|
|
68562
|
+
var W = class {
|
|
68563
68563
|
constructor(e) {
|
|
68564
68564
|
c(this, "value");
|
|
68565
68565
|
this.value = e;
|
|
@@ -68597,7 +68597,7 @@ var L = class {
|
|
|
68597
68597
|
return this.name;
|
|
68598
68598
|
}
|
|
68599
68599
|
};
|
|
68600
|
-
var
|
|
68600
|
+
var At = class {
|
|
68601
68601
|
eval() {
|
|
68602
68602
|
return [];
|
|
68603
68603
|
}
|
|
@@ -68605,7 +68605,7 @@ var wt = class {
|
|
|
68605
68605
|
return "{}";
|
|
68606
68606
|
}
|
|
68607
68607
|
};
|
|
68608
|
-
var
|
|
68608
|
+
var wt = class extends pt {
|
|
68609
68609
|
constructor(t, n, i) {
|
|
68610
68610
|
super(t, n);
|
|
68611
68611
|
c(this, "impl");
|
|
@@ -68626,9 +68626,9 @@ var me = class extends ce {
|
|
|
68626
68626
|
return k.ofType(e, this.left.eval(e, t), this.right);
|
|
68627
68627
|
}
|
|
68628
68628
|
};
|
|
68629
|
-
var
|
|
68629
|
+
var A = class extends ce {
|
|
68630
68630
|
};
|
|
68631
|
-
var _ = class extends
|
|
68631
|
+
var _ = class extends A {
|
|
68632
68632
|
constructor(t, n, i, o2) {
|
|
68633
68633
|
super(t, n, i);
|
|
68634
68634
|
c(this, "impl");
|
|
@@ -68640,7 +68640,7 @@ var _ = class extends w {
|
|
|
68640
68640
|
let o2 = this.right.eval(t, n);
|
|
68641
68641
|
if (o2.length !== 1) return [];
|
|
68642
68642
|
let s = i[0].value, a = o2[0].value, u2 = O(s) ? s.value : s, l2 = O(a) ? a.value : a, p = this.impl(u2, l2);
|
|
68643
|
-
return typeof p == "boolean" ? m(p) : O(s) ? [{ type: d.Quantity, value: { ...s, value: p } }] : [
|
|
68643
|
+
return typeof p == "boolean" ? m(p) : O(s) ? [{ type: d.Quantity, value: { ...s, value: p } }] : [b(p)];
|
|
68644
68644
|
}
|
|
68645
68645
|
};
|
|
68646
68646
|
var Ot = class extends ce {
|
|
@@ -68652,7 +68652,7 @@ var Ot = class extends ce {
|
|
|
68652
68652
|
return o2.length > 0 && o2.every((s) => typeof s.value == "string") ? [{ type: d.string, value: o2.map((s) => s.value).join("") }] : o2;
|
|
68653
68653
|
}
|
|
68654
68654
|
};
|
|
68655
|
-
var It = class extends
|
|
68655
|
+
var It = class extends A {
|
|
68656
68656
|
constructor(e, t) {
|
|
68657
68657
|
super("contains", e, t);
|
|
68658
68658
|
}
|
|
@@ -68661,7 +68661,7 @@ var It = class extends w {
|
|
|
68661
68661
|
return m(n.some((o2) => o2.value === i[0].value));
|
|
68662
68662
|
}
|
|
68663
68663
|
};
|
|
68664
|
-
var kt = class extends
|
|
68664
|
+
var kt = class extends A {
|
|
68665
68665
|
constructor(e, t) {
|
|
68666
68666
|
super("in", e, t);
|
|
68667
68667
|
}
|
|
@@ -68690,7 +68690,7 @@ var Pe = class extends ce {
|
|
|
68690
68690
|
return vt([...n, ...i]);
|
|
68691
68691
|
}
|
|
68692
68692
|
};
|
|
68693
|
-
var Vt = class extends
|
|
68693
|
+
var Vt = class extends A {
|
|
68694
68694
|
constructor(e, t) {
|
|
68695
68695
|
super("=", e, t);
|
|
68696
68696
|
}
|
|
@@ -68699,7 +68699,7 @@ var Vt = class extends w {
|
|
|
68699
68699
|
return Yn(n, i);
|
|
68700
68700
|
}
|
|
68701
68701
|
};
|
|
68702
|
-
var Dt = class extends
|
|
68702
|
+
var Dt = class extends A {
|
|
68703
68703
|
constructor(e, t) {
|
|
68704
68704
|
super("!=", e, t);
|
|
68705
68705
|
}
|
|
@@ -68708,7 +68708,7 @@ var Dt = class extends w {
|
|
|
68708
68708
|
return Xn(n, i);
|
|
68709
68709
|
}
|
|
68710
68710
|
};
|
|
68711
|
-
var Mt = class extends
|
|
68711
|
+
var Mt = class extends A {
|
|
68712
68712
|
constructor(e, t) {
|
|
68713
68713
|
super("~", e, t);
|
|
68714
68714
|
}
|
|
@@ -68717,7 +68717,7 @@ var Mt = class extends w {
|
|
|
68717
68717
|
return Nr(n, i);
|
|
68718
68718
|
}
|
|
68719
68719
|
};
|
|
68720
|
-
var _t = class extends
|
|
68720
|
+
var _t = class extends A {
|
|
68721
68721
|
constructor(e, t) {
|
|
68722
68722
|
super("!~", e, t);
|
|
68723
68723
|
}
|
|
@@ -68726,7 +68726,7 @@ var _t = class extends w {
|
|
|
68726
68726
|
return Kn(Nr(n, i));
|
|
68727
68727
|
}
|
|
68728
68728
|
};
|
|
68729
|
-
var
|
|
68729
|
+
var Ae = class extends A {
|
|
68730
68730
|
constructor(e, t) {
|
|
68731
68731
|
super("is", e, t);
|
|
68732
68732
|
}
|
|
@@ -68737,7 +68737,7 @@ var we = class extends w {
|
|
|
68737
68737
|
return m(Tt(n[0], i));
|
|
68738
68738
|
}
|
|
68739
68739
|
};
|
|
68740
|
-
var Lt = class extends
|
|
68740
|
+
var Lt = class extends A {
|
|
68741
68741
|
constructor(e, t) {
|
|
68742
68742
|
super("and", e, t);
|
|
68743
68743
|
}
|
|
@@ -68746,7 +68746,7 @@ var Lt = class extends w {
|
|
|
68746
68746
|
return n?.value === true && i?.value === true ? m(true) : n?.value === false || i?.value === false ? m(false) : [];
|
|
68747
68747
|
}
|
|
68748
68748
|
};
|
|
68749
|
-
var Ft = class extends
|
|
68749
|
+
var Ft = class extends A {
|
|
68750
68750
|
constructor(e, t) {
|
|
68751
68751
|
super("or", e, t);
|
|
68752
68752
|
}
|
|
@@ -68755,7 +68755,7 @@ var Ft = class extends w {
|
|
|
68755
68755
|
return n?.value === false && i?.value === false ? m(false) : n?.value || i?.value ? m(true) : [];
|
|
68756
68756
|
}
|
|
68757
68757
|
};
|
|
68758
|
-
var Nt = class extends
|
|
68758
|
+
var Nt = class extends A {
|
|
68759
68759
|
constructor(e, t) {
|
|
68760
68760
|
super("xor", e, t);
|
|
68761
68761
|
}
|
|
@@ -68764,7 +68764,7 @@ var Nt = class extends w {
|
|
|
68764
68764
|
return !n || !i ? [] : m(n.value !== i.value);
|
|
68765
68765
|
}
|
|
68766
68766
|
};
|
|
68767
|
-
var Ut = class extends
|
|
68767
|
+
var Ut = class extends A {
|
|
68768
68768
|
constructor(e, t) {
|
|
68769
68769
|
super("implies", e, t);
|
|
68770
68770
|
}
|
|
@@ -68788,7 +68788,7 @@ var ie = class {
|
|
|
68788
68788
|
return `${this.name}(${this.args.map((e) => e.toString()).join(", ")})`;
|
|
68789
68789
|
}
|
|
68790
68790
|
};
|
|
68791
|
-
var
|
|
68791
|
+
var we = class {
|
|
68792
68792
|
constructor(e, t) {
|
|
68793
68793
|
c(this, "left");
|
|
68794
68794
|
c(this, "expr");
|
|
@@ -68816,7 +68816,7 @@ var Vs = { parse(r6) {
|
|
|
68816
68816
|
var Ds = { parse(r6, e) {
|
|
68817
68817
|
let t = r6.consumeAndParse();
|
|
68818
68818
|
if (!r6.match("]")) throw new Error("Parse error: expected `]`");
|
|
68819
|
-
return new
|
|
68819
|
+
return new we(e, t);
|
|
68820
68820
|
}, precedence: v.Indexer };
|
|
68821
68821
|
var Ms = { parse(r6, e) {
|
|
68822
68822
|
if (!(e instanceof L)) throw new Error("Unexpected parentheses");
|
|
@@ -68829,7 +68829,7 @@ function _s(r6) {
|
|
|
68829
68829
|
return n?.startsWith("'") && n.endsWith("'") ? n = n.substring(1, n.length - 1) : n = "{" + n + "}", { value: t, unit: n };
|
|
68830
68830
|
}
|
|
68831
68831
|
function nt() {
|
|
68832
|
-
return new dt().registerPrefix("String", { parse: (r6, e) => new
|
|
68832
|
+
return new dt().registerPrefix("String", { parse: (r6, e) => new W({ type: d.string, value: e.value }) }).registerPrefix("DateTime", { parse: (r6, e) => new W({ type: d.dateTime, value: qe(e.value) }) }).registerPrefix("Quantity", { parse: (r6, e) => new W({ type: d.Quantity, value: _s(e.value) }) }).registerPrefix("Number", { parse: (r6, e) => new W({ type: e.value.includes(".") ? d.decimal : d.integer, value: Number.parseFloat(e.value) }) }).registerPrefix("true", { parse: () => new W({ type: d.boolean, value: true }) }).registerPrefix("false", { parse: () => new W({ type: d.boolean, value: false }) }).registerPrefix("Symbol", { parse: (r6, e) => new L(e.value) }).registerPrefix("{}", { parse: () => new At() }).registerPrefix("(", Vs).registerInfix("[", Ds).registerInfix("(", Ms).prefix("+", v.UnaryAdd, (r6, e) => new wt("+", e, (t) => t)).prefix("-", v.UnarySubtract, (r6, e) => new _("-", e, e, (t, n) => -n)).infixLeft(".", v.Dot, (r6, e, t) => new Z(r6, t)).infixLeft("/", v.Divide, (r6, e, t) => new _("/", r6, t, (n, i) => n / i)).infixLeft("*", v.Multiply, (r6, e, t) => new _("*", r6, t, (n, i) => n * i)).infixLeft("+", v.Add, (r6, e, t) => new _("+", r6, t, (n, i) => n + i)).infixLeft("-", v.Subtract, (r6, e, t) => new _("-", r6, t, (n, i) => n - i)).infixLeft("|", v.Union, (r6, e, t) => new Pe(r6, t)).infixLeft("=", v.Equals, (r6, e, t) => new Vt(r6, t)).infixLeft("!=", v.NotEquals, (r6, e, t) => new Dt(r6, t)).infixLeft("~", v.Equivalent, (r6, e, t) => new Mt(r6, t)).infixLeft("!~", v.NotEquivalent, (r6, e, t) => new _t(r6, t)).infixLeft("<", v.LessThan, (r6, e, t) => new _("<", r6, t, (n, i) => n < i)).infixLeft("<=", v.LessThanOrEquals, (r6, e, t) => new _("<=", r6, t, (n, i) => n <= i)).infixLeft(">", v.GreaterThan, (r6, e, t) => new _(">", r6, t, (n, i) => n > i)).infixLeft(">=", v.GreaterThanOrEquals, (r6, e, t) => new _(">=", r6, t, (n, i) => n >= i)).infixLeft("&", v.Ampersand, (r6, e, t) => new Ot(r6, t)).infixLeft("and", v.And, (r6, e, t) => new Lt(r6, t)).infixLeft("as", v.As, (r6, e, t) => new me(r6, t)).infixLeft("contains", v.Contains, (r6, e, t) => new It(r6, t)).infixLeft("div", v.Divide, (r6, e, t) => new _("div", r6, t, (n, i) => Math.trunc(n / i))).infixLeft("in", v.In, (r6, e, t) => new kt(r6, t)).infixLeft("is", v.Is, (r6, e, t) => new Ae(r6, t)).infixLeft("mod", v.Modulo, (r6, e, t) => new _("mod", r6, t, (n, i) => n % i)).infixLeft("or", v.Or, (r6, e, t) => new Ft(r6, t)).infixLeft("xor", v.Xor, (r6, e, t) => new Nt(r6, t)).infixLeft("implies", v.Implies, (r6, e, t) => new Ut(r6, t));
|
|
68833
68833
|
}
|
|
68834
68834
|
var Ls = nt();
|
|
68835
68835
|
var h = { EQUALS: "eq", NOT_EQUALS: "ne", GREATER_THAN: "gt", LESS_THAN: "lt", GREATER_THAN_OR_EQUALS: "ge", LESS_THAN_OR_EQUALS: "le", STARTS_AFTER: "sa", ENDS_BEFORE: "eb", APPROXIMATELY: "ap", CONTAINS: "contains", STARTS_WITH: "sw", EXACT: "exact", TEXT: "text", NOT: "not", ABOVE: "above", BELOW: "below", IN: "in", NOT_IN: "not-in", OF_TYPE: "of-type", MISSING: "missing", PRESENT: "present", IDENTIFIER: "identifier", ITERATE: "iterate" };
|
|
@@ -68838,6 +68838,7 @@ var Yr = { eq: h.EQUALS, ne: h.NOT_EQUALS, lt: h.LESS_THAN, le: h.LESS_THAN_OR_E
|
|
|
68838
68838
|
var $s = [h.MISSING, h.PRESENT];
|
|
68839
68839
|
var Ie = { READ: "read", VREAD: "vread", UPDATE: "update", DELETE: "delete", HISTORY: "history", CREATE: "create", SEARCH: "search" };
|
|
68840
68840
|
var pa = [Ie.READ, Ie.VREAD, Ie.HISTORY, Ie.SEARCH];
|
|
68841
|
+
var Rd = { FIRST: "first", APPLICATION: "application" };
|
|
68841
68842
|
function j() {
|
|
68842
68843
|
return typeof window < "u";
|
|
68843
68844
|
}
|
|
@@ -68893,7 +68894,7 @@ function se() {
|
|
|
68893
68894
|
return (r6 === "x" ? e : e & 3 | 8).toString(16);
|
|
68894
68895
|
});
|
|
68895
68896
|
}
|
|
68896
|
-
var
|
|
68897
|
+
var w = { CSS: "text/css", DICOM: "application/dicom", FAVICON: "image/vnd.microsoft.icon", FHIR_JSON: "application/fhir+json", FORM_URL_ENCODED: "application/x-www-form-urlencoded", HL7_V2: "x-application/hl7-v2+er7", HTML: "text/html", JAVASCRIPT: "text/javascript", JSON: "application/json", JSON_PATCH: "application/json-patch+json", JWT: "application/jwt", MULTIPART_FORM_DATA: "multipart/form-data", PNG: "image/png", SCIM_JSON: "application/scim+json", SVG: "image/svg+xml", TEXT: "text/plain", TYPESCRIPT: "text/typescript", PING: "x-application/ping", XML: "text/xml", CDA_XML: "application/cda+xml", OCTET_STREAM: "application/octet-stream" };
|
|
68897
68898
|
var en = class {
|
|
68898
68899
|
constructor() {
|
|
68899
68900
|
c(this, "listeners");
|
|
@@ -68953,7 +68954,7 @@ function Li(r6) {
|
|
|
68953
68954
|
if (rn.includes(r6)) throw new f(x(`'context.version' is required for '${r6}'.`));
|
|
68954
68955
|
}
|
|
68955
68956
|
var Pa = { "Patient-open": { patient: { resourceType: "Patient" }, encounter: { resourceType: "Encounter", optional: true } }, "Patient-close": { patient: { resourceType: "Patient" }, encounter: { resourceType: "Encounter", optional: true } }, "ImagingStudy-open": { study: { resourceType: "ImagingStudy" }, encounter: { resourceType: "Encounter", optional: true }, patient: { resourceType: "Patient", optional: true } }, "ImagingStudy-close": { study: { resourceType: "ImagingStudy" }, encounter: { resourceType: "Encounter", optional: true }, patient: { resourceType: "Patient", optional: true } }, "Encounter-open": { encounter: { resourceType: "Encounter" }, patient: { resourceType: "Patient" } }, "Encounter-close": { encounter: { resourceType: "Encounter" }, patient: { resourceType: "Patient" } }, "DiagnosticReport-open": { report: { resourceType: "DiagnosticReport" }, encounter: { resourceType: "Encounter", optional: true }, study: { resourceType: "ImagingStudy", optional: true, manyAllowed: true }, patient: { resourceType: "Patient" } }, "DiagnosticReport-close": { report: { resourceType: "DiagnosticReport" }, encounter: { resourceType: "Encounter", optional: true }, study: { resourceType: "ImagingStudy", optional: true, manyAllowed: true }, patient: { resourceType: "Patient" } }, "DiagnosticReport-select": { report: { resourceType: "DiagnosticReport", reference: true }, patient: { resourceType: "Patient", optional: true, reference: true }, select: { resourceType: "*", reference: true, manyAllowed: true } }, "DiagnosticReport-update": { report: { resourceType: "DiagnosticReport", reference: true }, patient: { resourceType: "Patient", optional: true, reference: true }, updates: { resourceType: "Bundle" } }, syncerror: { operationoutcome: { resourceType: "OperationOutcome" } } };
|
|
68956
|
-
function
|
|
68957
|
+
function Aa(r6) {
|
|
68957
68958
|
return Ca.includes(r6);
|
|
68958
68959
|
}
|
|
68959
68960
|
function Fi(r6) {
|
|
@@ -68971,20 +68972,20 @@ function Ht(r6) {
|
|
|
68971
68972
|
for (let o2 of i) if (!tn[o2]) return false;
|
|
68972
68973
|
return !(Fi(r6) && !(typeof r6.endpoint == "string" && r6.endpoint.startsWith("ws")));
|
|
68973
68974
|
}
|
|
68974
|
-
function
|
|
68975
|
+
function wa(r6, e, t, n) {
|
|
68975
68976
|
if (typeof e != "object") throw new f(x(`context[${t}] is invalid. Context must contain a single valid FHIR resource! Resource is not an object.`));
|
|
68976
68977
|
if (!(e.id && typeof e.id == "string")) throw new f(x(`context[${t}] is invalid. Resource must contain a valid string ID.`));
|
|
68977
68978
|
if (!e.resourceType) throw new f(x(`context[${t}] is invalid. Resource must contain a resource type. No resource type found.`));
|
|
68978
68979
|
let i = n.resourceType;
|
|
68979
68980
|
if (i !== "*") {
|
|
68980
|
-
if (!
|
|
68981
|
+
if (!Aa(e.resourceType)) throw new f(x(`context[${t}] is invalid. Resource must contain a valid FHIRcast resource type. Resource type is not a known resource type.`));
|
|
68981
68982
|
if (i && e.resourceType !== i) throw new f(x(`context[${t}] is invalid. context[${t}] for the '${r6}' event should contain resource of type ${i}.`));
|
|
68982
68983
|
}
|
|
68983
68984
|
}
|
|
68984
68985
|
function Oa(r6, e, t, n, i) {
|
|
68985
68986
|
if (i.set(e.key, (i.get(e.key) ?? 0) + 1), n.reference) {
|
|
68986
68987
|
if (!H(e.reference)) throw new f(x(`context[${t}] is invalid. Expected key '${e.key}' to be a reference.`));
|
|
68987
|
-
} else
|
|
68988
|
+
} else wa(r6, e.resource, t, n);
|
|
68988
68989
|
}
|
|
68989
68990
|
function Ia(r6, e) {
|
|
68990
68991
|
let t = /* @__PURE__ */ new Map(), n = Pa[r6];
|
|
@@ -69063,17 +69064,17 @@ var Qt = class {
|
|
|
69063
69064
|
return this.medplum.get(`keyvalue/v1/${e}`);
|
|
69064
69065
|
}
|
|
69065
69066
|
async set(e, t) {
|
|
69066
|
-
await this.medplum.put(`keyvalue/v1/${e}`, t,
|
|
69067
|
+
await this.medplum.put(`keyvalue/v1/${e}`, t, w.TEXT);
|
|
69067
69068
|
}
|
|
69068
69069
|
async delete(e) {
|
|
69069
69070
|
await this.medplum.delete(`keyvalue/v1/${e}`);
|
|
69070
69071
|
}
|
|
69071
69072
|
};
|
|
69072
|
-
var
|
|
69073
|
-
|
|
69073
|
+
var qi;
|
|
69074
|
+
qi = Symbol.toStringTag;
|
|
69074
69075
|
var F = class {
|
|
69075
69076
|
constructor(e) {
|
|
69076
|
-
c(this,
|
|
69077
|
+
c(this, qi, "ReadablePromise");
|
|
69077
69078
|
c(this, "suspender");
|
|
69078
69079
|
c(this, "status", "pending");
|
|
69079
69080
|
c(this, "response");
|
|
@@ -69356,6 +69357,7 @@ var Jt = class r extends ee {
|
|
|
69356
69357
|
}
|
|
69357
69358
|
};
|
|
69358
69359
|
var Ma = 5e3;
|
|
69360
|
+
var _a = [WebSocket.CLOSING, WebSocket.CLOSED];
|
|
69359
69361
|
var at = class extends ee {
|
|
69360
69362
|
constructor(...t) {
|
|
69361
69363
|
super();
|
|
@@ -69424,7 +69426,7 @@ var Kt = class {
|
|
|
69424
69426
|
return;
|
|
69425
69427
|
}
|
|
69426
69428
|
if (o2.type === "handshake") {
|
|
69427
|
-
let a =
|
|
69429
|
+
let a = Se(o2.subscription), u2 = { type: "connect", payload: { subscriptionId: a } };
|
|
69428
69430
|
this.masterSubEmitter?.dispatchEvent(u2);
|
|
69429
69431
|
let l2 = this.criteriaEntriesBySubscriptionId.get(a);
|
|
69430
69432
|
if (!l2) {
|
|
@@ -69435,7 +69437,7 @@ var Kt = class {
|
|
|
69435
69437
|
return;
|
|
69436
69438
|
}
|
|
69437
69439
|
this.masterSubEmitter?.dispatchEvent({ type: "message", payload: i });
|
|
69438
|
-
let s = this.criteriaEntriesBySubscriptionId.get(
|
|
69440
|
+
let s = this.criteriaEntriesBySubscriptionId.get(Se(o2.subscription));
|
|
69439
69441
|
if (!s) {
|
|
69440
69442
|
console.warn("Received notification for criteria the SubscriptionManager is not listening for");
|
|
69441
69443
|
return;
|
|
@@ -69520,7 +69522,7 @@ var Kt = class {
|
|
|
69520
69522
|
}) : s.bareCriteria = void 0, !s.bareCriteria && s.criteriaWithProps.length === 0 && (this.criteriaEntries.delete(t), this.masterSubEmitter?._removeCriteria(t)), i && this.criteriaEntriesBySubscriptionId.delete(i), o2 && this.ws.readyState === WebSocket.OPEN && this.ws.send(JSON.stringify({ type: "unbind-from-token", payload: { token: o2 } }));
|
|
69521
69523
|
}
|
|
69522
69524
|
async subscribeToCriteria(e) {
|
|
69523
|
-
if (!(this.ws.readyState !== WebSocket.OPEN || e.connecting)) {
|
|
69525
|
+
if (this.wsClosed && await this.reconnectIfNeeded(), !(this.ws.readyState !== WebSocket.OPEN || e.connecting)) {
|
|
69524
69526
|
e.connecting = true;
|
|
69525
69527
|
try {
|
|
69526
69528
|
let [t, n] = await this.getTokenForCriteria(e);
|
|
@@ -69564,19 +69566,27 @@ var Kt = class {
|
|
|
69564
69566
|
getMasterEmitter() {
|
|
69565
69567
|
return this.masterSubEmitter || (this.masterSubEmitter = new at(...Array.from(this.criteriaEntries.keys()))), this.masterSubEmitter;
|
|
69566
69568
|
}
|
|
69569
|
+
async reconnectIfNeeded() {
|
|
69570
|
+
_a.includes(this.getWebSocket().readyState) && await new Promise((e) => {
|
|
69571
|
+
let t = () => {
|
|
69572
|
+
this.getWebSocket().removeEventListener("open", t), e();
|
|
69573
|
+
};
|
|
69574
|
+
this.getWebSocket().addEventListener("open", t), this.reconnectWebSocket();
|
|
69575
|
+
});
|
|
69576
|
+
}
|
|
69567
69577
|
};
|
|
69568
|
-
var cn = "5.0.
|
|
69569
|
-
var
|
|
69570
|
-
var
|
|
69571
|
-
var
|
|
69572
|
-
var
|
|
69578
|
+
var cn = "5.0.14-7a77ead";
|
|
69579
|
+
var Na = w.FHIR_JSON + ", */*; q=0.1";
|
|
69580
|
+
var Ua = "https://api.medplum.com/";
|
|
69581
|
+
var Ba = 1e3;
|
|
69582
|
+
var qa = 6e4;
|
|
69573
69583
|
var Wa = 0;
|
|
69574
|
-
var
|
|
69575
|
-
var
|
|
69584
|
+
var ja = 3e5;
|
|
69585
|
+
var $a = "Binary/";
|
|
69576
69586
|
var Hi = { resourceType: "Device", id: "system", deviceName: [{ type: "model-name", name: "System" }] };
|
|
69577
69587
|
var $e = { ClientCredentials: "client_credentials", AuthorizationCode: "authorization_code", RefreshToken: "refresh_token", JwtBearer: "urn:ietf:params:oauth:grant-type:jwt-bearer", TokenExchange: "urn:ietf:params:oauth:grant-type:token-exchange" };
|
|
69578
|
-
var
|
|
69579
|
-
var
|
|
69588
|
+
var Ha = { AccessToken: "urn:ietf:params:oauth:token-type:access_token", RefreshToken: "urn:ietf:params:oauth:token-type:refresh_token", IdToken: "urn:ietf:params:oauth:token-type:id_token", Saml1Token: "urn:ietf:params:oauth:token-type:saml1", Saml2Token: "urn:ietf:params:oauth:token-type:saml2" };
|
|
69589
|
+
var Ga = { JwtBearer: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer" };
|
|
69580
69590
|
var Yt = class extends ee {
|
|
69581
69591
|
constructor(t) {
|
|
69582
69592
|
super();
|
|
@@ -69616,7 +69626,7 @@ var Yt = class extends ee {
|
|
|
69616
69626
|
c(this, "keyValueClient");
|
|
69617
69627
|
c(this, "logLevel");
|
|
69618
69628
|
if (t?.baseUrl && !t.baseUrl.startsWith("http")) throw new Error("Base URL must start with http or https");
|
|
69619
|
-
this.options = t ?? {}, this.fetch = t?.fetch ??
|
|
69629
|
+
this.options = t ?? {}, this.fetch = t?.fetch ?? Qa(), this.storage = t?.storage ?? new st(void 0, t?.storagePrefix), this.createPdfImpl = t?.createPdf, this.baseUrl = Qr(t?.baseUrl ?? Ua), this.fhirBaseUrl = G(this.baseUrl, t?.fhirUrlPath ?? "fhir/R4"), this.authorizeUrl = G(this.baseUrl, t?.authorizeUrl ?? "oauth2/authorize"), this.tokenUrl = G(this.baseUrl, t?.tokenUrl ?? "oauth2/token"), this.logoutUrl = G(this.baseUrl, t?.logoutUrl ?? "oauth2/logout"), this.fhircastHubUrl = G(this.baseUrl, t?.fhircastHubUrl ?? "fhircast/STU3"), this.clientId = t?.clientId ?? "", this.clientSecret = t?.clientSecret ?? "", this.credentialsInHeader = t?.authCredentialsMethod === "header", this.defaultHeaders = t?.defaultHeaders ?? {}, this.onUnauthenticated = t?.onUnauthenticated, this.refreshGracePeriod = t?.refreshGracePeriod ?? ja, this.logLevel = this.initializeLogLevel(t), this.cacheTime = t?.cacheTime ?? (j() ? qa : Wa), this.cacheTime > 0 ? this.requestCache = new De(t?.resourceCacheSize ?? Ba) : this.requestCache = void 0, t?.autoBatchTime ? (this.autoBatchTime = t.autoBatchTime, this.autoBatchQueue = []) : (this.autoBatchTime = 0, this.autoBatchQueue = void 0), t?.accessToken && this.setAccessToken(t.accessToken), this.storage.getInitPromise === void 0 ? (t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initPromise = Promise.resolve(), this.dispatchEvent({ type: "storageInitialized" })) : (this.initComplete = false, this.initPromise = this.storage.getInitPromise(), this.initPromise.then(() => {
|
|
69620
69630
|
t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initComplete = true, this.dispatchEvent({ type: "storageInitialized" });
|
|
69621
69631
|
}).catch((n) => {
|
|
69622
69632
|
console.error(n), this.initComplete = true, this.dispatchEvent({ type: "storageInitFailed", payload: { error: n } });
|
|
@@ -69687,7 +69697,7 @@ var Yt = class extends ee {
|
|
|
69687
69697
|
return t = t.toString(), this.setRequestBody(o2, n), i && this.setRequestContentType(o2, i), this.invalidateUrl(t), this.request("PUT", t, o2);
|
|
69688
69698
|
}
|
|
69689
69699
|
patch(t, n, i = {}) {
|
|
69690
|
-
return t = t.toString(), this.setRequestBody(i, n), this.setRequestContentType(i,
|
|
69700
|
+
return t = t.toString(), this.setRequestBody(i, n), this.setRequestContentType(i, w.JSON_PATCH), this.invalidateUrl(t), this.request("PATCH", t, i);
|
|
69691
69701
|
}
|
|
69692
69702
|
delete(t, n) {
|
|
69693
69703
|
return t = t.toString(), this.invalidateUrl(t), this.request("DELETE", t, n);
|
|
@@ -69729,9 +69739,10 @@ var Yt = class extends ee {
|
|
|
69729
69739
|
let a = o2;
|
|
69730
69740
|
s && (a = await this.ensureCodeChallenge(o2)), oe.assign(this.getExternalAuthRedirectUri(t, n, i, a, s));
|
|
69731
69741
|
}
|
|
69732
|
-
async exchangeExternalAccessToken(t, n) {
|
|
69742
|
+
async exchangeExternalAccessToken(t, n, i) {
|
|
69733
69743
|
if (n = n ?? this.clientId, !n) throw new Error("MedplumClient is missing clientId");
|
|
69734
|
-
|
|
69744
|
+
let o2 = { grant_type: $e.TokenExchange, subject_token_type: Ha.AccessToken, client_id: n, subject_token: t };
|
|
69745
|
+
return i && (o2.membership_id = i), this.fetchTokens(o2);
|
|
69735
69746
|
}
|
|
69736
69747
|
getExternalAuthRedirectUri(t, n, i, o2, s = true) {
|
|
69737
69748
|
let a = new URL(t);
|
|
@@ -69876,7 +69887,7 @@ var Yt = class extends ee {
|
|
|
69876
69887
|
console.warn(`No StructureDefinition found for ${t}!`);
|
|
69877
69888
|
return;
|
|
69878
69889
|
}
|
|
69879
|
-
|
|
69890
|
+
Ar(a);
|
|
69880
69891
|
}
|
|
69881
69892
|
})());
|
|
69882
69893
|
return this.setCacheEntry(i, s, n), s;
|
|
@@ -69910,7 +69921,7 @@ var Yt = class extends ee {
|
|
|
69910
69921
|
}
|
|
69911
69922
|
async createAttachment(t, n, i, o2, s) {
|
|
69912
69923
|
let a = zi(t, n, i, o2);
|
|
69913
|
-
if (a.contentType ===
|
|
69924
|
+
if (a.contentType === w.XML) {
|
|
69914
69925
|
let p = a.data, y2;
|
|
69915
69926
|
p instanceof Blob ? y2 = await new Promise((T, $) => {
|
|
69916
69927
|
let Q2 = new FileReader();
|
|
@@ -69921,7 +69932,7 @@ var Yt = class extends ee {
|
|
|
69921
69932
|
}
|
|
69922
69933
|
T(Q2.result);
|
|
69923
69934
|
}, Q2.readAsText(p, "utf-8");
|
|
69924
|
-
}) : ArrayBuffer.isView(p) ? y2 = new TextDecoder().decode(p) : y2 = p, y2.includes("<ClinicalDocument") && y2.includes("urn:hl7-org:v3") && (a = { ...a, contentType:
|
|
69935
|
+
}) : ArrayBuffer.isView(p) ? y2 = new TextDecoder().decode(p) : y2 = p, y2.includes("<ClinicalDocument") && y2.includes("urn:hl7-org:v3") && (a = { ...a, contentType: w.CDA_XML });
|
|
69925
69936
|
}
|
|
69926
69937
|
let u2 = s ?? (typeof n == "object" ? n : {}), l2 = await this.createBinary(a, u2);
|
|
69927
69938
|
return { contentType: a.contentType, url: l2.url, title: a.filename };
|
|
@@ -69948,12 +69959,12 @@ var Yt = class extends ee {
|
|
|
69948
69959
|
}
|
|
69949
69960
|
async createPdf(t, n, i, o2) {
|
|
69950
69961
|
if (!this.createPdfImpl) throw new Error("PDF creation not enabled");
|
|
69951
|
-
let s =
|
|
69962
|
+
let s = Ka(t, n, i, o2), a = typeof n == "object" ? n : {}, { docDefinition: u2, tableLayouts: l2, fonts: p, ...y2 } = s, T = await this.createPdfImpl(u2, l2, p), $ = { ...y2, data: T, contentType: "application/pdf" };
|
|
69952
69963
|
return this.createBinary($, a);
|
|
69953
69964
|
}
|
|
69954
69965
|
createComment(t, n, i) {
|
|
69955
69966
|
let o2 = this.getProfile(), s, a;
|
|
69956
|
-
return t.resourceType === "Encounter" && (s =
|
|
69967
|
+
return t.resourceType === "Encounter" && (s = be(t), a = t.subject), t.resourceType === "ServiceRequest" && (s = t.encounter, a = t.subject), t.resourceType === "Patient" && (a = be(t)), this.createResource({ resourceType: "Communication", status: "completed", basedOn: [be(t)], encounter: s, subject: a, sender: o2 ? be(o2) : void 0, sent: (/* @__PURE__ */ new Date()).toISOString(), payload: [{ contentString: n }] }, i);
|
|
69957
69968
|
}
|
|
69958
69969
|
async updateResource(t, n) {
|
|
69959
69970
|
if (!t.resourceType) throw new Error("Missing resourceType");
|
|
@@ -69986,23 +69997,23 @@ var Yt = class extends ee {
|
|
|
69986
69997
|
return this.post(this.fhirBaseUrl, t, void 0, n);
|
|
69987
69998
|
}
|
|
69988
69999
|
sendEmail(t, n) {
|
|
69989
|
-
return this.post("email/v1/send", t,
|
|
70000
|
+
return this.post("email/v1/send", t, w.JSON, n);
|
|
69990
70001
|
}
|
|
69991
70002
|
graphql(t, n, i, o2) {
|
|
69992
|
-
return this.post(this.fhirUrl("$graphql"), { query: t, operationName: n, variables: i },
|
|
70003
|
+
return this.post(this.fhirUrl("$graphql"), { query: t, operationName: n, variables: i }, w.JSON, o2);
|
|
69993
70004
|
}
|
|
69994
70005
|
readResourceGraph(t, n, i, o2) {
|
|
69995
70006
|
return this.get(`${this.fhirUrl(t, n)}/$graph?graph=${i}`, o2);
|
|
69996
70007
|
}
|
|
69997
70008
|
pushToAgent(t, n, i, o2, s, a) {
|
|
69998
|
-
let { waitTimeout: u2,
|
|
69999
|
-
return this.post(this.fhirUrl("Agent",
|
|
70009
|
+
let { waitTimeout: u2, returnAck: l2, ...p } = a ?? {};
|
|
70010
|
+
return this.post(this.fhirUrl("Agent", Se(t), "$push"), { destination: typeof n == "string" ? n : M(n), body: i, contentType: o2, waitForResponse: s, ...u2 !== void 0 ? { waitTimeout: u2 } : void 0, ...l2 !== void 0 ? { returnAck: l2 } : void 0 }, w.FHIR_JSON, p);
|
|
70000
70011
|
}
|
|
70001
70012
|
getCdsServices(t) {
|
|
70002
70013
|
return this.get("/cds-services", t);
|
|
70003
70014
|
}
|
|
70004
70015
|
callCdsService(t, n, i) {
|
|
70005
|
-
return this.post(`/cds-services/${t}`, n,
|
|
70016
|
+
return this.post(`/cds-services/${t}`, n, w.JSON, i);
|
|
70006
70017
|
}
|
|
70007
70018
|
getActiveLogin() {
|
|
70008
70019
|
return this.storage.getObject("activeLogin");
|
|
@@ -70065,13 +70076,13 @@ var Yt = class extends ee {
|
|
|
70065
70076
|
async download(t, n = {}) {
|
|
70066
70077
|
this.refreshPromise && await this.refreshPromise;
|
|
70067
70078
|
let i = t.toString();
|
|
70068
|
-
i.startsWith(
|
|
70079
|
+
i.startsWith($a) && (t = this.fhirUrl(i));
|
|
70069
70080
|
let o2 = n.headers;
|
|
70070
70081
|
return o2 || (o2 = {}, n.headers = o2), o2.Accept || (o2.Accept = "*/*"), this.addFetchOptionsDefaults(n), (await this.fetchWithRetry(t.toString(), n)).blob();
|
|
70071
70082
|
}
|
|
70072
70083
|
async createMedia(t, n) {
|
|
70073
70084
|
let { additionalFields: i, ...o2 } = t, s = await this.createResource({ resourceType: "Media", status: "preparation", content: { contentType: t.contentType }, ...i });
|
|
70074
|
-
o2.securityContext || (o2.securityContext =
|
|
70085
|
+
o2.securityContext || (o2.securityContext = be(s));
|
|
70075
70086
|
let a = await this.createAttachment(o2, n);
|
|
70076
70087
|
return this.updateResource({ ...s, status: "completed", content: a });
|
|
70077
70088
|
}
|
|
@@ -70080,7 +70091,7 @@ var Yt = class extends ee {
|
|
|
70080
70091
|
}
|
|
70081
70092
|
async createDocumentReference(t, n) {
|
|
70082
70093
|
let { additionalFields: i, ...o2 } = t, s = await this.createResource({ resourceType: "DocumentReference", status: "current", content: [{ attachment: { contentType: t.contentType } }], ...i });
|
|
70083
|
-
o2.securityContext || (o2.securityContext =
|
|
70094
|
+
o2.securityContext || (o2.securityContext = be(s));
|
|
70084
70095
|
let a = await this.createAttachment(o2, n);
|
|
70085
70096
|
return this.updateResource({ ...s, content: [{ attachment: a }] });
|
|
70086
70097
|
}
|
|
@@ -70157,7 +70168,7 @@ var Yt = class extends ee {
|
|
|
70157
70168
|
for (let o2 = 0; o2 <= i; o2++) try {
|
|
70158
70169
|
this.logLevel !== "none" && this.logRequest(t, n);
|
|
70159
70170
|
let s = await this.fetch(t, n);
|
|
70160
|
-
if (this.logLevel !== "none" && this.logResponse(s), this.setCurrentRateLimit(s), o2 >= i || !
|
|
70171
|
+
if (this.logLevel !== "none" && this.logResponse(s), this.setCurrentRateLimit(s), o2 >= i || !Ya(s)) return s;
|
|
70161
70172
|
let a = this.getRetryDelay(o2), u2 = n.maxRetryTime ?? 2e3;
|
|
70162
70173
|
if (a > u2) return s;
|
|
70163
70174
|
await Gr(a, { signal: n.signal });
|
|
@@ -70226,7 +70237,7 @@ var Yt = class extends ee {
|
|
|
70226
70237
|
addFetchOptionsDefaults(t) {
|
|
70227
70238
|
Object.entries(this.defaultHeaders).forEach(([n, i]) => {
|
|
70228
70239
|
this.setRequestHeader(t, n, i);
|
|
70229
|
-
}), this.setRequestHeader(t, "Accept",
|
|
70240
|
+
}), this.setRequestHeader(t, "Accept", Na, true), this.options.extendedMode !== false && this.setRequestHeader(t, "X-Medplum", "extended"), t.body && this.setRequestHeader(t, "Content-Type", w.FHIR_JSON, true), this.accessToken ? this.setRequestHeader(t, "Authorization", "Bearer " + this.accessToken) : this.basicAuth && this.setRequestHeader(t, "Authorization", "Basic " + this.basicAuth), t.cache || (t.cache = "no-cache"), t.credentials || (t.credentials = "include");
|
|
70230
70241
|
}
|
|
70231
70242
|
setRequestContentType(t, n) {
|
|
70232
70243
|
this.setRequestHeader(t, "Content-Type", n);
|
|
@@ -70292,7 +70303,7 @@ var Yt = class extends ee {
|
|
|
70292
70303
|
return this.clientId = t, this.fetchTokens({ grant_type: $e.JwtBearer, client_id: t, assertion: n, scope: i });
|
|
70293
70304
|
}
|
|
70294
70305
|
async startJwtAssertionLogin(t) {
|
|
70295
|
-
return this.fetchTokens({ grant_type: $e.ClientCredentials, client_assertion_type:
|
|
70306
|
+
return this.fetchTokens({ grant_type: $e.ClientCredentials, client_assertion_type: Ga.JwtBearer, client_assertion: t });
|
|
70296
70307
|
}
|
|
70297
70308
|
setBasicAuth(t, n) {
|
|
70298
70309
|
this.clientId = t, this.clientSecret = n, this.basicAuth = jt(t + ":" + n);
|
|
@@ -70309,20 +70320,20 @@ var Yt = class extends ee {
|
|
|
70309
70320
|
async fhircastSubscribe(t, n) {
|
|
70310
70321
|
if (!(typeof t == "string" && t !== "")) throw new f(x("Invalid topic provided. Topic must be a valid string."));
|
|
70311
70322
|
if (!(typeof n == "object" && Array.isArray(n) && n.length > 0)) throw new f(x("Invalid events provided. Events must be an array of event names containing at least one event."));
|
|
70312
|
-
let i = { channelType: "websocket", mode: "subscribe", topic: t, events: n }, s = (await this.post(this.fhircastHubUrl, nn(i),
|
|
70323
|
+
let i = { channelType: "websocket", mode: "subscribe", topic: t, events: n }, s = (await this.post(this.fhircastHubUrl, nn(i), w.FORM_URL_ENCODED))["hub.channel.endpoint"];
|
|
70313
70324
|
if (!s) throw new Error("Invalid response!");
|
|
70314
70325
|
return i.endpoint = s, i;
|
|
70315
70326
|
}
|
|
70316
70327
|
async fhircastUnsubscribe(t) {
|
|
70317
70328
|
if (!Ht(t)) throw new f(x("Invalid topic or subscriptionRequest. SubscriptionRequest must be an object."));
|
|
70318
70329
|
if (!(t.endpoint && typeof t.endpoint == "string" && t.endpoint.startsWith("ws"))) throw new f(x("Provided subscription request must have an endpoint in order to unsubscribe."));
|
|
70319
|
-
t.mode = "unsubscribe", await this.post(this.fhircastHubUrl, nn(t),
|
|
70330
|
+
t.mode = "unsubscribe", await this.post(this.fhircastHubUrl, nn(t), w.FORM_URL_ENCODED);
|
|
70320
70331
|
}
|
|
70321
70332
|
fhircastConnect(t) {
|
|
70322
70333
|
return new $t(t);
|
|
70323
70334
|
}
|
|
70324
70335
|
async fhircastPublish(t, n, i, o2) {
|
|
70325
|
-
return _i(n) ? this.post(this.fhircastHubUrl, on(t, n, i, o2),
|
|
70336
|
+
return _i(n) ? this.post(this.fhircastHubUrl, on(t, n, i, o2), w.JSON) : (Li(n), this.post(this.fhircastHubUrl, on(t, n, i), w.JSON));
|
|
70326
70337
|
}
|
|
70327
70338
|
async fhircastGetContext(t) {
|
|
70328
70339
|
return this.get(`${this.fhircastHubUrl}/${t}`, { cache: "no-cache" });
|
|
@@ -70339,7 +70350,7 @@ var Yt = class extends ee {
|
|
|
70339
70350
|
}
|
|
70340
70351
|
}
|
|
70341
70352
|
async fetchTokens(t) {
|
|
70342
|
-
let n = new URLSearchParams(t), i = { ...this.defaultHeaders, "Content-Type":
|
|
70353
|
+
let n = new URLSearchParams(t), i = { ...this.defaultHeaders, "Content-Type": w.FORM_URL_ENCODED };
|
|
70343
70354
|
this.basicAuth && (i.Authorization = `Basic ${this.basicAuth}`), this.credentialsInHeader && (n.delete("client_id"), n.delete("client_secret"), !this.basicAuth && t.client_id && t.client_secret && (i.Authorization = `Basic ${jt(t.client_id + ":" + t.client_secret)}`));
|
|
70344
70355
|
let o2 = { method: "POST", headers: i, body: n.toString(), credentials: "include" }, s;
|
|
70345
70356
|
try {
|
|
@@ -70390,7 +70401,7 @@ var Yt = class extends ee {
|
|
|
70390
70401
|
return this.getSubscriptionManager().getMasterEmitter();
|
|
70391
70402
|
}
|
|
70392
70403
|
};
|
|
70393
|
-
function
|
|
70404
|
+
function Qa() {
|
|
70394
70405
|
if (!globalThis.fetch) throw new Error("Fetch not available in this environment");
|
|
70395
70406
|
return globalThis.fetch.bind(globalThis);
|
|
70396
70407
|
}
|
|
@@ -70405,28 +70416,28 @@ function Qi(r6) {
|
|
|
70405
70416
|
let e = r6.entry?.map((t) => t.resource) ?? [];
|
|
70406
70417
|
return Object.assign(e, { bundle: r6 });
|
|
70407
70418
|
}
|
|
70408
|
-
function
|
|
70419
|
+
function za(r6) {
|
|
70409
70420
|
return E(r6) && "data" in r6 && "contentType" in r6;
|
|
70410
70421
|
}
|
|
70411
70422
|
function zi(r6, e, t, n) {
|
|
70412
|
-
return
|
|
70423
|
+
return za(r6) ? r6 : { data: r6, filename: e, contentType: t, onProgress: n };
|
|
70413
70424
|
}
|
|
70414
|
-
function
|
|
70425
|
+
function Ja(r6) {
|
|
70415
70426
|
return E(r6) && "docDefinition" in r6;
|
|
70416
70427
|
}
|
|
70417
|
-
function
|
|
70418
|
-
return
|
|
70428
|
+
function Ka(r6, e, t, n) {
|
|
70429
|
+
return Ja(r6) ? r6 : { docDefinition: r6, filename: e, tableLayouts: t, fonts: n };
|
|
70419
70430
|
}
|
|
70420
|
-
function
|
|
70431
|
+
function Ya(r6) {
|
|
70421
70432
|
return r6.status === 429 || r6.status >= 500;
|
|
70422
70433
|
}
|
|
70423
|
-
var
|
|
70424
|
-
var
|
|
70425
|
-
var
|
|
70426
|
-
var
|
|
70427
|
-
var
|
|
70428
|
-
var
|
|
70429
|
-
var
|
|
70434
|
+
var uc = [...rt, "->", "<<", ">>", "=="];
|
|
70435
|
+
var dc = nt().registerInfix("->", { precedence: v.Arrow }).registerInfix(";", { precedence: v.Semicolon });
|
|
70436
|
+
var Ic = " ".repeat(2);
|
|
70437
|
+
var Vc = [...rt, "eq", "ne", "co"];
|
|
70438
|
+
var Dc = { eq: h.EXACT, ne: h.NOT_EQUALS, co: h.CONTAINS, sw: h.STARTS_WITH, ew: void 0, gt: h.GREATER_THAN, lt: h.LESS_THAN, ge: h.GREATER_THAN_OR_EQUALS, le: h.LESS_THAN_OR_EQUALS, ap: h.APPROXIMATELY, sa: h.STARTS_AFTER, eb: h.ENDS_BEFORE, pr: h.PRESENT, po: void 0, ss: void 0, sb: void 0, in: h.IN, ni: h.NOT_IN, re: h.EQUALS, identifier: h.IDENTIFIER };
|
|
70439
|
+
var _c = nt();
|
|
70440
|
+
var Lc = { AA: "OK", AE: "Application Error", AR: "Application Reject", CA: "Commit Accept", CE: "Commit Error", CR: "Commit Reject" };
|
|
70430
70441
|
var xe = class {
|
|
70431
70442
|
constructor(e = "\r", t = "|", n = "^", i = "~", o2 = "\\", s = "&") {
|
|
70432
70443
|
c(this, "segmentSeparator");
|
|
@@ -70470,7 +70481,7 @@ var mo = class r2 {
|
|
|
70470
70481
|
}
|
|
70471
70482
|
buildAck(e) {
|
|
70472
70483
|
let t = /* @__PURE__ */ new Date(), n = this.getSegment("MSH"), i = n?.getField(3)?.toString() ?? "", o2 = n?.getField(4)?.toString() ?? "", s = n?.getField(5)?.toString() ?? "", a = n?.getField(6)?.toString() ?? "", u2 = n?.getField(10)?.toString() ?? "", l2 = n?.getField(12)?.toString() ?? "2.5.1", p = e?.ackCode ?? "AA";
|
|
70473
|
-
return new r2([new lt(["MSH", this.context.getMsh2(), s, a, i, o2,
|
|
70484
|
+
return new r2([new lt(["MSH", this.context.getMsh2(), s, a, i, o2, Nc(t), "", this.buildAckMessageType(n), t.getTime().toString(), "P", l2], this.context), new lt(["MSA", p, u2, Lc[p]], this.context), ...e?.errSegment ? [e.errSegment] : []]);
|
|
70474
70485
|
}
|
|
70475
70486
|
buildAckMessageType(e) {
|
|
70476
70487
|
let t = e?.getField(9), n = t?.getComponent(2), i = t?.getComponent(3), o2 = "ACK";
|
|
@@ -70570,12 +70581,12 @@ var te = class r4 {
|
|
|
70570
70581
|
return true;
|
|
70571
70582
|
}
|
|
70572
70583
|
};
|
|
70573
|
-
function
|
|
70584
|
+
function Nc(r6) {
|
|
70574
70585
|
let e = r6 instanceof Date ? r6 : new Date(r6), n = e.toISOString().replaceAll(/[-:T]/g, "").replace(/(\.\d+)?Z$/, ""), i = e.getUTCMilliseconds();
|
|
70575
70586
|
return i > 0 && (n += "." + i.toString()), n;
|
|
70576
70587
|
}
|
|
70577
70588
|
var He = { NONE: 0, ERROR: 1, WARN: 2, INFO: 3, DEBUG: 4 };
|
|
70578
|
-
var
|
|
70589
|
+
var Uc = ["NONE", "ERROR", "WARN", "INFO", "DEBUG"];
|
|
70579
70590
|
var yo = class r5 {
|
|
70580
70591
|
constructor(e, t = {}, n = He.INFO, i = {}) {
|
|
70581
70592
|
c(this, "write");
|
|
@@ -70613,10 +70624,10 @@ var yo = class r5 {
|
|
|
70613
70624
|
i = { ...n };
|
|
70614
70625
|
for (let [o2, s] of Object.entries(i)) s instanceof Error && (i[o2] = ar(s));
|
|
70615
70626
|
}
|
|
70616
|
-
this.write(JSON.stringify({ level:
|
|
70627
|
+
this.write(JSON.stringify({ level: Uc[e], timestamp: (/* @__PURE__ */ new Date()).toISOString(), msg: this.prefix ? `${this.prefix}${t}` : t, ...i, ...this.metadata }));
|
|
70617
70628
|
}
|
|
70618
70629
|
};
|
|
70619
|
-
function
|
|
70630
|
+
function um(r6) {
|
|
70620
70631
|
let e = He[r6.toUpperCase()];
|
|
70621
70632
|
if (e === void 0) throw new Error(`Invalid log level: ${r6}`);
|
|
70622
70633
|
return e;
|
|
@@ -70634,9 +70645,9 @@ function ar(r6, e = 0, t = 10) {
|
|
|
70634
70645
|
}
|
|
70635
70646
|
return n;
|
|
70636
70647
|
}
|
|
70637
|
-
var
|
|
70648
|
+
var Yc = "https://meta.medplum.com/releases";
|
|
70638
70649
|
var lr = /* @__PURE__ */ new Map();
|
|
70639
|
-
function
|
|
70650
|
+
function Xc(r6) {
|
|
70640
70651
|
let e = r6;
|
|
70641
70652
|
if (!e.tag_name) throw new Error("Manifest missing tag_name");
|
|
70642
70653
|
let t = e.assets;
|
|
@@ -70649,7 +70660,7 @@ function Yc(r6) {
|
|
|
70649
70660
|
async function vn(r6, e, t) {
|
|
70650
70661
|
let n = lr.get(e ?? "latest");
|
|
70651
70662
|
if (!n) {
|
|
70652
|
-
let i = e ? `v${e}` : "latest", o2 = new URL(`${
|
|
70663
|
+
let i = e ? `v${e}` : "latest", o2 = new URL(`${Yc}/${i}.json`);
|
|
70653
70664
|
if (o2.searchParams.set("a", r6), o2.searchParams.set("c", cn), t) for (let [u2, l2] of Object.entries(t)) o2.searchParams.set(u2, l2);
|
|
70654
70665
|
let s = await fetch(o2.toString());
|
|
70655
70666
|
if (s.status !== 200) {
|
|
@@ -70662,15 +70673,15 @@ async function vn(r6, e, t) {
|
|
|
70662
70673
|
throw new Error(`Received status code ${s.status} while fetching manifest for version '${e ?? "latest"}'. Message: ${u2}`);
|
|
70663
70674
|
}
|
|
70664
70675
|
let a = await s.json();
|
|
70665
|
-
|
|
70676
|
+
Xc(a), n = a, lr.set(e ?? "latest", n), e || lr.set(n.tag_name.slice(1), n);
|
|
70666
70677
|
}
|
|
70667
70678
|
return n;
|
|
70668
70679
|
}
|
|
70669
|
-
function
|
|
70680
|
+
function Zc(r6) {
|
|
70670
70681
|
return /^\d+\.\d+\.\d+(-[0-9a-z]{7})?$/.test(r6);
|
|
70671
70682
|
}
|
|
70672
|
-
async function
|
|
70673
|
-
if (!
|
|
70683
|
+
async function Fm(r6, e) {
|
|
70684
|
+
if (!Zc(e)) return false;
|
|
70674
70685
|
try {
|
|
70675
70686
|
await vn(r6, e);
|
|
70676
70687
|
} catch {
|
|
@@ -70678,7 +70689,7 @@ async function Dm(r6, e) {
|
|
|
70678
70689
|
}
|
|
70679
70690
|
return true;
|
|
70680
70691
|
}
|
|
70681
|
-
async function
|
|
70692
|
+
async function Nm(r6) {
|
|
70682
70693
|
let e = await vn(r6);
|
|
70683
70694
|
if (!e.tag_name.startsWith("v")) throw new Error(`Invalid release name found. Release tag '${e.tag_name}' did not start with 'v'`);
|
|
70684
70695
|
return e.tag_name.slice(1);
|
|
@@ -70698,8 +70709,8 @@ var import_node_net = require("node:net");
|
|
|
70698
70709
|
var import_iconv_lite = __toESM(require_lib(), 1);
|
|
70699
70710
|
var import_node_net2 = __toESM(require("node:net"), 1);
|
|
70700
70711
|
var x2 = Object.defineProperty;
|
|
70701
|
-
var
|
|
70702
|
-
var o = (d2, i, e) =>
|
|
70712
|
+
var b2 = (d2, i, e) => i in d2 ? x2(d2, i, { enumerable: true, configurable: true, writable: true, value: e }) : d2[i] = e;
|
|
70713
|
+
var o = (d2, i, e) => b2(d2, typeof i != "symbol" ? i + "" : i, e);
|
|
70703
70714
|
var m2 = class extends EventTarget {
|
|
70704
70715
|
addEventListener(i, e, t) {
|
|
70705
70716
|
super.addEventListener(i, e, t);
|
|
@@ -70736,11 +70747,10 @@ var u = class extends Event {
|
|
|
70736
70747
|
super("close");
|
|
70737
70748
|
}
|
|
70738
70749
|
};
|
|
70739
|
-
var y =
|
|
70740
|
-
var w2 = "utf-8";
|
|
70750
|
+
var y = "utf-8";
|
|
70741
70751
|
var D2 = 60 * 1e3;
|
|
70742
70752
|
var g2 = class extends m2 {
|
|
70743
|
-
constructor(e, t =
|
|
70753
|
+
constructor(e, t = y, s, n = {}) {
|
|
70744
70754
|
super();
|
|
70745
70755
|
o(this, "socket");
|
|
70746
70756
|
o(this, "encoding");
|
|
@@ -70777,7 +70787,7 @@ var g2 = class extends m2 {
|
|
|
70777
70787
|
return;
|
|
70778
70788
|
}
|
|
70779
70789
|
let p = c2.message.getSegment("MSA")?.getField(1)?.toString()?.toUpperCase();
|
|
70780
|
-
p && (h2.returnAck ===
|
|
70790
|
+
p && (h2.returnAck === Rd.APPLICATION && p === "CA" || (h2.resolve(c2.message), this.pendingMessages.delete(a)));
|
|
70781
70791
|
});
|
|
70782
70792
|
}
|
|
70783
70793
|
isClosed() {
|
|
@@ -70830,7 +70840,7 @@ var g2 = class extends m2 {
|
|
|
70830
70840
|
let r6;
|
|
70831
70841
|
t?.timeoutMs && (r6 = setTimeout(() => {
|
|
70832
70842
|
this.pendingMessages.delete(c2), n(new f({ resourceType: "OperationOutcome", issue: [{ severity: "error", code: "timeout", details: { text: "Client timeout" }, diagnostics: `Request timed out after waiting ${t.timeoutMs} milliseconds for response` }] }));
|
|
70833
|
-
}, t.timeoutMs)), this.pendingMessages.set(c2, { message: e, resolve: s, reject: n, returnAck: t?.returnAck ??
|
|
70843
|
+
}, t.timeoutMs)), this.pendingMessages.set(c2, { message: e, resolve: s, reject: n, returnAck: t?.returnAck ?? Rd.APPLICATION, timer: r6 }), this.sendImpl(e);
|
|
70834
70844
|
});
|
|
70835
70845
|
}
|
|
70836
70846
|
async close() {
|
|
@@ -70851,7 +70861,7 @@ var g2 = class extends m2 {
|
|
|
70851
70861
|
this.chunks = [];
|
|
70852
70862
|
}
|
|
70853
70863
|
setEncoding(e) {
|
|
70854
|
-
this.encoding = e ??
|
|
70864
|
+
this.encoding = e ?? y;
|
|
70855
70865
|
}
|
|
70856
70866
|
getEncoding() {
|
|
70857
70867
|
return this.encoding;
|
|
@@ -70872,7 +70882,7 @@ var g2 = class extends m2 {
|
|
|
70872
70882
|
return this.pendingMessages.size;
|
|
70873
70883
|
}
|
|
70874
70884
|
};
|
|
70875
|
-
var
|
|
70885
|
+
var S = class extends m2 {
|
|
70876
70886
|
constructor(e) {
|
|
70877
70887
|
super();
|
|
70878
70888
|
o(this, "options");
|
|
@@ -70960,7 +70970,7 @@ var A2 = class extends m2 {
|
|
|
70960
70970
|
}
|
|
70961
70971
|
};
|
|
70962
70972
|
var Q = 1e4;
|
|
70963
|
-
var
|
|
70973
|
+
var A2 = class {
|
|
70964
70974
|
constructor(i) {
|
|
70965
70975
|
o(this, "handler");
|
|
70966
70976
|
o(this, "server");
|
|
@@ -71235,7 +71245,7 @@ var ByteStreamChannelConnection = class {
|
|
|
71235
71245
|
accessToken: "placeholder",
|
|
71236
71246
|
channel: this.channel.getDefinition().name,
|
|
71237
71247
|
remote: this.remote,
|
|
71238
|
-
contentType:
|
|
71248
|
+
contentType: w.OCTET_STREAM,
|
|
71239
71249
|
body: messageBuffer.toString("hex"),
|
|
71240
71250
|
callback: `Agent/${this.channel.app.agentId}-${(0, import_node_crypto.randomUUID)()}`
|
|
71241
71251
|
});
|
|
@@ -71364,14 +71374,14 @@ var AgentDicomChannel = class extends BaseChannel {
|
|
|
71364
71374
|
calledAeTitle: this.association?.getCalledAeTitle()
|
|
71365
71375
|
},
|
|
71366
71376
|
dataset: dicomJson,
|
|
71367
|
-
binary: binary ?
|
|
71377
|
+
binary: binary ? be(binary) : void 0
|
|
71368
71378
|
};
|
|
71369
71379
|
App.instance.addToWebSocketQueue({
|
|
71370
71380
|
type: "agent:transmit:request",
|
|
71371
71381
|
accessToken: "placeholder",
|
|
71372
71382
|
channel: _DcmjsDimseScp.channel.getDefinition().name,
|
|
71373
71383
|
remote: this.association?.getCallingAeTitle(),
|
|
71374
|
-
contentType:
|
|
71384
|
+
contentType: w.JSON,
|
|
71375
71385
|
body: JSON.stringify(payload),
|
|
71376
71386
|
callback: `Agent/${App.instance.agentId}-${(0, import_node_crypto2.randomUUID)()}`
|
|
71377
71387
|
});
|
|
@@ -71590,7 +71600,7 @@ function calculatePercentile(rttSamples, percentile) {
|
|
|
71590
71600
|
if (rttSamples.length === 0) {
|
|
71591
71601
|
return -1;
|
|
71592
71602
|
}
|
|
71593
|
-
const sorted = [...rttSamples].sort((a,
|
|
71603
|
+
const sorted = [...rttSamples].sort((a, b3) => a - b3);
|
|
71594
71604
|
const index = Math.ceil(percentile / 100 * sorted.length) - 1;
|
|
71595
71605
|
return sorted[Math.max(0, index)];
|
|
71596
71606
|
}
|
|
@@ -71653,7 +71663,7 @@ var AgentHl7Channel = class extends BaseChannel {
|
|
|
71653
71663
|
// Default app level ack mode is AL (Always)
|
|
71654
71664
|
__publicField(this, "assignSeqNo", false);
|
|
71655
71665
|
__publicField(this, "lastSeqNo", -1);
|
|
71656
|
-
this.server = new
|
|
71666
|
+
this.server = new A2((connection) => this.handleNewConnection(connection));
|
|
71657
71667
|
this.prefix = `[HL7:${definition.name}] `;
|
|
71658
71668
|
this.log = app.log.clone({ options: { prefix: this.prefix } });
|
|
71659
71669
|
this.channelLog = app.channelLog.clone({ options: { prefix: this.prefix } });
|
|
@@ -71818,7 +71828,7 @@ var AgentHl7ChannelConnection = class {
|
|
|
71818
71828
|
accessToken: "placeholder",
|
|
71819
71829
|
channel: this.channel.getDefinition().name,
|
|
71820
71830
|
remote: this.remote,
|
|
71821
|
-
contentType:
|
|
71831
|
+
contentType: w.HL7_V2,
|
|
71822
71832
|
body: event.message.toString(),
|
|
71823
71833
|
callback: `Agent/${this.channel.app.agentId}-${(0, import_node_crypto3.randomUUID)()}`
|
|
71824
71834
|
});
|
|
@@ -71903,7 +71913,7 @@ function shouldSendAppLevelAck(options) {
|
|
|
71903
71913
|
}
|
|
71904
71914
|
|
|
71905
71915
|
// src/enhanced-hl7-client.ts
|
|
71906
|
-
var EnhancedHl7Client = class extends
|
|
71916
|
+
var EnhancedHl7Client = class extends S {
|
|
71907
71917
|
constructor(options) {
|
|
71908
71918
|
super(options);
|
|
71909
71919
|
__publicField(this, "stats");
|
|
@@ -71917,12 +71927,12 @@ var EnhancedHl7Client = class extends A2 {
|
|
|
71917
71927
|
}
|
|
71918
71928
|
return super.send(msg);
|
|
71919
71929
|
}
|
|
71920
|
-
async sendAndWait(msg) {
|
|
71930
|
+
async sendAndWait(msg, options) {
|
|
71921
71931
|
const msgControlId = msg.getSegment("MSH")?.getField(10)?.toString();
|
|
71922
71932
|
if (this.stats && msgControlId) {
|
|
71923
71933
|
this.stats.recordMessageSent(msgControlId);
|
|
71924
71934
|
}
|
|
71925
|
-
const response2 = await super.sendAndWait(msg);
|
|
71935
|
+
const response2 = await super.sendAndWait(msg, options);
|
|
71926
71936
|
if (this.stats && msgControlId) {
|
|
71927
71937
|
this.stats.recordAckReceived(msgControlId);
|
|
71928
71938
|
}
|
|
@@ -71981,7 +71991,7 @@ var Hl7ClientPool = class {
|
|
|
71981
71991
|
}
|
|
71982
71992
|
closeAndRemoveClient(client) {
|
|
71983
71993
|
this.log.info(
|
|
71984
|
-
`Closing client for remote 'mllp://${client.host}:${client.port}?encoding=${client.encoding ??
|
|
71994
|
+
`Closing client for remote 'mllp://${client.host}:${client.port}?encoding=${client.encoding ?? y}' and removing it from the pool...`
|
|
71985
71995
|
);
|
|
71986
71996
|
this.removeClient(client);
|
|
71987
71997
|
client.close().catch((err) => {
|
|
@@ -72216,7 +72226,7 @@ function cleanupLoggerConfig(config, configPathRoot = "config") {
|
|
|
72216
72226
|
warnings.push(`${configPathRoot}.filesToKeep must be a valid integer`);
|
|
72217
72227
|
config.filesToKeep = void 0;
|
|
72218
72228
|
}
|
|
72219
|
-
if (typeof config.logLevel !== "undefined" && !(typeof config.logLevel === "number" &&
|
|
72229
|
+
if (typeof config.logLevel !== "undefined" && !(typeof config.logLevel === "number" && Uc[config.logLevel] !== void 0)) {
|
|
72220
72230
|
warnings.push(`${configPathRoot}.logLevel must be a valid log level between LogLevel.NONE and LogLevel.DEBUG`);
|
|
72221
72231
|
config.logLevel = void 0;
|
|
72222
72232
|
}
|
|
@@ -72261,7 +72271,7 @@ function parseLoggerConfigFromArgs(args) {
|
|
|
72261
72271
|
let configValue;
|
|
72262
72272
|
if (settingName === "logLevel") {
|
|
72263
72273
|
try {
|
|
72264
|
-
configValue =
|
|
72274
|
+
configValue = um(propVal);
|
|
72265
72275
|
} catch (err) {
|
|
72266
72276
|
warnings.push(`Error while parsing ${propName}: ${_e(err)}`);
|
|
72267
72277
|
}
|
|
@@ -72828,7 +72838,7 @@ var _App = class _App {
|
|
|
72828
72838
|
case "agent:transmit:request":
|
|
72829
72839
|
if (this.config?.status !== "active") {
|
|
72830
72840
|
this.sendAgentDisabledError(command);
|
|
72831
|
-
} else if (command.contentType ===
|
|
72841
|
+
} else if (command.contentType === w.PING) {
|
|
72832
72842
|
await this.tryPingHost(command);
|
|
72833
72843
|
} else {
|
|
72834
72844
|
this.pushMessage(command);
|
|
@@ -72938,7 +72948,7 @@ var _App = class _App {
|
|
|
72938
72948
|
const pools = Array.from(this.hl7Clients.values());
|
|
72939
72949
|
const clientStats = Object.fromEntries(
|
|
72940
72950
|
pools.map((pool) => [
|
|
72941
|
-
`mllp://${pool.host}:${pool.port}?encoding=${pool.encoding ??
|
|
72951
|
+
`mllp://${pool.host}:${pool.port}?encoding=${pool.encoding ?? y}`,
|
|
72942
72952
|
pool.getPoolStats()
|
|
72943
72953
|
])
|
|
72944
72954
|
);
|
|
@@ -73188,7 +73198,7 @@ IPv6 is currently unsupported.`;
|
|
|
73188
73198
|
this.log.error(errMsg);
|
|
73189
73199
|
throw new Error(errMsg);
|
|
73190
73200
|
}
|
|
73191
|
-
if (!((0, import_node_net4.isIPv4)(message.remote) ||
|
|
73201
|
+
if (!((0, import_node_net4.isIPv4)(message.remote) || Gl(message.remote))) {
|
|
73192
73202
|
const errMsg = `Attempted to ping an invalid host.
|
|
73193
73203
|
|
|
73194
73204
|
"${message.remote}" is not a valid IPv4 address or a resolvable hostname.`;
|
|
@@ -73220,7 +73230,7 @@ ${result}`);
|
|
|
73220
73230
|
this.addToWebSocketQueue({
|
|
73221
73231
|
type: "agent:transmit:response",
|
|
73222
73232
|
channel: message.channel,
|
|
73223
|
-
contentType:
|
|
73233
|
+
contentType: w.PING,
|
|
73224
73234
|
remote: message.remote,
|
|
73225
73235
|
callback: message.callback,
|
|
73226
73236
|
statusCode: 200,
|
|
@@ -73231,7 +73241,7 @@ ${result}`);
|
|
|
73231
73241
|
this.addToWebSocketQueue({
|
|
73232
73242
|
type: "agent:transmit:response",
|
|
73233
73243
|
channel: message.channel,
|
|
73234
|
-
contentType:
|
|
73244
|
+
contentType: w.TEXT,
|
|
73235
73245
|
remote: message.remote,
|
|
73236
73246
|
callback: message.callback,
|
|
73237
73247
|
statusCode: 400,
|
|
@@ -73263,7 +73273,7 @@ ${result}`);
|
|
|
73263
73273
|
return;
|
|
73264
73274
|
}
|
|
73265
73275
|
let child;
|
|
73266
|
-
if (message.version && !await
|
|
73276
|
+
if (message.version && !await Fm("agent-upgrader", message.version)) {
|
|
73267
73277
|
const versionTag = message.version ? `v${message.version}` : "latest";
|
|
73268
73278
|
const errMsg = `Error during upgrading to version '${versionTag}'. '${message.version}' is not a valid version`;
|
|
73269
73279
|
this.log.error(errMsg);
|
|
@@ -73274,7 +73284,7 @@ ${result}`);
|
|
|
73274
73284
|
});
|
|
73275
73285
|
return;
|
|
73276
73286
|
}
|
|
73277
|
-
const targetVersion = message.version ?? await
|
|
73287
|
+
const targetVersion = message.version ?? await Nm("agent-upgrader");
|
|
73278
73288
|
if (cn.startsWith(targetVersion)) {
|
|
73279
73289
|
if (!message?.force) {
|
|
73280
73290
|
this.log.info(`Attempted to upgrade to version ${targetVersion}, but agent is already on that version`);
|
|
@@ -73418,6 +73428,29 @@ ${result}`);
|
|
|
73418
73428
|
}
|
|
73419
73429
|
const address = new URL(message.remote);
|
|
73420
73430
|
const encoding = address.searchParams.get("encoding") ?? void 0;
|
|
73431
|
+
let msgReturnAck;
|
|
73432
|
+
try {
|
|
73433
|
+
msgReturnAck = this.parseReturnAck(message.returnAck);
|
|
73434
|
+
} catch (err) {
|
|
73435
|
+
this.log.error(_e(err));
|
|
73436
|
+
this.addToWebSocketQueue({
|
|
73437
|
+
type: "agent:transmit:response",
|
|
73438
|
+
channel: message.channel,
|
|
73439
|
+
remote: message.remote,
|
|
73440
|
+
callback: message.callback,
|
|
73441
|
+
contentType: w.TEXT,
|
|
73442
|
+
statusCode: 400,
|
|
73443
|
+
body: _e(err)
|
|
73444
|
+
});
|
|
73445
|
+
return;
|
|
73446
|
+
}
|
|
73447
|
+
let defaultReturnAck;
|
|
73448
|
+
try {
|
|
73449
|
+
defaultReturnAck = this.parseReturnAck(address.searchParams.get("defaultReturnAck"));
|
|
73450
|
+
} catch (err) {
|
|
73451
|
+
this.log.warn(`${_e(err)} - falling back to default return ACK behavior of 'first'.`);
|
|
73452
|
+
}
|
|
73453
|
+
const returnAck = msgReturnAck ?? defaultReturnAck ?? Rd.FIRST;
|
|
73421
73454
|
let pool;
|
|
73422
73455
|
if (this.hl7Clients.has(message.remote)) {
|
|
73423
73456
|
pool = this.hl7Clients.get(message.remote);
|
|
@@ -73461,20 +73494,20 @@ ${result}`);
|
|
|
73461
73494
|
channel: message.channel,
|
|
73462
73495
|
remote: message.remote,
|
|
73463
73496
|
callback: message.callback,
|
|
73464
|
-
contentType:
|
|
73497
|
+
contentType: w.TEXT,
|
|
73465
73498
|
statusCode: 400,
|
|
73466
73499
|
body: _e(err)
|
|
73467
73500
|
});
|
|
73468
73501
|
return;
|
|
73469
73502
|
}
|
|
73470
|
-
client.sendAndWait(requestMsg).then((response2) => {
|
|
73503
|
+
client.sendAndWait(requestMsg, { returnAck }).then((response2) => {
|
|
73471
73504
|
this.log.info(`[Response -- ID: ${msh10}]: ${response2.toString().replaceAll("\r", "\n")}`);
|
|
73472
73505
|
this.addToWebSocketQueue({
|
|
73473
73506
|
type: "agent:transmit:response",
|
|
73474
73507
|
channel: message.channel,
|
|
73475
73508
|
remote: message.remote,
|
|
73476
73509
|
callback: message.callback,
|
|
73477
|
-
contentType:
|
|
73510
|
+
contentType: w.HL7_V2,
|
|
73478
73511
|
statusCode: 200,
|
|
73479
73512
|
body: response2.toString()
|
|
73480
73513
|
});
|
|
@@ -73485,7 +73518,7 @@ ${result}`);
|
|
|
73485
73518
|
channel: message.channel,
|
|
73486
73519
|
remote: message.remote,
|
|
73487
73520
|
callback: message.callback,
|
|
73488
|
-
contentType:
|
|
73521
|
+
contentType: w.TEXT,
|
|
73489
73522
|
statusCode: 400,
|
|
73490
73523
|
body: _e(err)
|
|
73491
73524
|
});
|
|
@@ -73503,6 +73536,25 @@ ${result}`);
|
|
|
73503
73536
|
}
|
|
73504
73537
|
return false;
|
|
73505
73538
|
}
|
|
73539
|
+
/**
|
|
73540
|
+
* Parses and normalizes the `returnAck` mode parameter from the Device URL.
|
|
73541
|
+
*
|
|
73542
|
+
* @param rawValue - The raw query parameter value retrieved from the Device URL (e.g., 'application', 'first', or undefined).
|
|
73543
|
+
* @returns The parsed `ReturnAckCategory` enum value.
|
|
73544
|
+
*/
|
|
73545
|
+
parseReturnAck(rawValue) {
|
|
73546
|
+
if (!rawValue) {
|
|
73547
|
+
return void 0;
|
|
73548
|
+
}
|
|
73549
|
+
const normalizedValue = rawValue.toLowerCase();
|
|
73550
|
+
if (normalizedValue === "application") {
|
|
73551
|
+
return Rd.APPLICATION;
|
|
73552
|
+
}
|
|
73553
|
+
if (normalizedValue === "first") {
|
|
73554
|
+
return Rd.FIRST;
|
|
73555
|
+
}
|
|
73556
|
+
throw new Error(`Invalid value for returnAck; expected: 'first' or 'application', received: ${rawValue}`);
|
|
73557
|
+
}
|
|
73506
73558
|
};
|
|
73507
73559
|
__publicField(_App, "instance");
|
|
73508
73560
|
var App = _App;
|
|
@@ -73562,7 +73614,7 @@ async function agentMain(argv) {
|
|
|
73562
73614
|
for (const warning of warnings) {
|
|
73563
73615
|
mainLogger.warn(warning);
|
|
73564
73616
|
}
|
|
73565
|
-
const app = new App(medplum, agentId, args.logLevel ?
|
|
73617
|
+
const app = new App(medplum, agentId, args.logLevel ? um(args.logLevel) : void 0, {
|
|
73566
73618
|
mainLogger,
|
|
73567
73619
|
channelLogger
|
|
73568
73620
|
});
|
|
@@ -73604,10 +73656,10 @@ async function upgraderMain(argv) {
|
|
|
73604
73656
|
rejectOnTimeout = () => reject(new Error("Timed out while waiting for IPC to disconnect"));
|
|
73605
73657
|
import_node_process3.default.once("disconnect", resolve2);
|
|
73606
73658
|
});
|
|
73607
|
-
if (argv[3] && !
|
|
73659
|
+
if (argv[3] && !Zc(argv[3])) {
|
|
73608
73660
|
throw new Error("Invalid version specified");
|
|
73609
73661
|
}
|
|
73610
|
-
const version = argv[3] ?? await
|
|
73662
|
+
const version = argv[3] ?? await Nm("agent-upgrader");
|
|
73611
73663
|
const binPath = getReleaseBinPath(version);
|
|
73612
73664
|
if (!(0, import_node_fs6.existsSync)(binPath)) {
|
|
73613
73665
|
globalLogger.info(`Could not find binary at "${binPath}". Downloading release from GitHub...`);
|