@medplum/agent 3.2.19 → 3.2.20
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 +595 -582
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -12,13 +12,13 @@ var __export = (target, all) => {
|
|
|
12
12
|
for (var name in all)
|
|
13
13
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
14
|
};
|
|
15
|
-
var __copyProps = (
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
16
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
17
|
for (let key of __getOwnPropNames(from))
|
|
18
|
-
if (!__hasOwnProp.call(
|
|
19
|
-
__defProp(
|
|
18
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
20
20
|
}
|
|
21
|
-
return
|
|
21
|
+
return to;
|
|
22
22
|
};
|
|
23
23
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
24
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
@@ -1564,9 +1564,9 @@ var require_dbcs_codec = __commonJS({
|
|
|
1564
1564
|
throw new Error("gb18030 decode tables conflict at byte 3");
|
|
1565
1565
|
}
|
|
1566
1566
|
var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k2]];
|
|
1567
|
-
for (var
|
|
1568
|
-
if (fourthByteNode[
|
|
1569
|
-
fourthByteNode[
|
|
1567
|
+
for (var l3 = 48; l3 <= 57; l3++) {
|
|
1568
|
+
if (fourthByteNode[l3] === UNASSIGNED)
|
|
1569
|
+
fourthByteNode[l3] = GB18030_CODE;
|
|
1570
1570
|
}
|
|
1571
1571
|
}
|
|
1572
1572
|
}
|
|
@@ -1623,10 +1623,10 @@ var require_dbcs_codec = __commonJS({
|
|
|
1623
1623
|
for (var k2 = 1; k2 < chunk.length; k2++) {
|
|
1624
1624
|
var part = chunk[k2];
|
|
1625
1625
|
if (typeof part === "string") {
|
|
1626
|
-
for (var
|
|
1627
|
-
var code = part.charCodeAt(
|
|
1626
|
+
for (var l3 = 0; l3 < part.length; ) {
|
|
1627
|
+
var code = part.charCodeAt(l3++);
|
|
1628
1628
|
if (55296 <= code && code < 56320) {
|
|
1629
|
-
var codeTrail = part.charCodeAt(
|
|
1629
|
+
var codeTrail = part.charCodeAt(l3++);
|
|
1630
1630
|
if (56320 <= codeTrail && codeTrail < 57344)
|
|
1631
1631
|
writeTable[curAddr++] = 65536 + (code - 55296) * 1024 + (codeTrail - 56320);
|
|
1632
1632
|
else
|
|
@@ -1635,7 +1635,7 @@ var require_dbcs_codec = __commonJS({
|
|
|
1635
1635
|
var len = 4095 - code + 2;
|
|
1636
1636
|
var seq = [];
|
|
1637
1637
|
for (var m2 = 0; m2 < len; m2++)
|
|
1638
|
-
seq.push(part.charCodeAt(
|
|
1638
|
+
seq.push(part.charCodeAt(l3++));
|
|
1639
1639
|
writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;
|
|
1640
1640
|
this.decodeTableSeq.push(seq);
|
|
1641
1641
|
} else
|
|
@@ -1643,7 +1643,7 @@ var require_dbcs_codec = __commonJS({
|
|
|
1643
1643
|
}
|
|
1644
1644
|
} else if (typeof part === "number") {
|
|
1645
1645
|
var charCode = writeTable[curAddr - 1] + 1;
|
|
1646
|
-
for (var
|
|
1646
|
+
for (var l3 = 0; l3 < part; l3++)
|
|
1647
1647
|
writeTable[curAddr++] = charCode++;
|
|
1648
1648
|
} else
|
|
1649
1649
|
throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]);
|
|
@@ -1916,15 +1916,15 @@ var require_dbcs_codec = __commonJS({
|
|
|
1916
1916
|
function findIdx(table, val) {
|
|
1917
1917
|
if (table[0] > val)
|
|
1918
1918
|
return -1;
|
|
1919
|
-
var
|
|
1920
|
-
while (
|
|
1921
|
-
var mid =
|
|
1919
|
+
var l3 = 0, r7 = table.length;
|
|
1920
|
+
while (l3 < r7 - 1) {
|
|
1921
|
+
var mid = l3 + (r7 - l3 + 1 >> 1);
|
|
1922
1922
|
if (table[mid] <= val)
|
|
1923
|
-
|
|
1923
|
+
l3 = mid;
|
|
1924
1924
|
else
|
|
1925
1925
|
r7 = mid;
|
|
1926
1926
|
}
|
|
1927
|
-
return
|
|
1927
|
+
return l3;
|
|
1928
1928
|
}
|
|
1929
1929
|
}
|
|
1930
1930
|
});
|
|
@@ -7633,12 +7633,12 @@ var require_dcmjs = __commonJS({
|
|
|
7633
7633
|
};
|
|
7634
7634
|
return _getPrototypeOf(o);
|
|
7635
7635
|
}
|
|
7636
|
-
function _setPrototypeOf(o,
|
|
7637
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2,
|
|
7638
|
-
o2.__proto__ =
|
|
7636
|
+
function _setPrototypeOf(o, p2) {
|
|
7637
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p3) {
|
|
7638
|
+
o2.__proto__ = p3;
|
|
7639
7639
|
return o2;
|
|
7640
7640
|
};
|
|
7641
|
-
return _setPrototypeOf(o,
|
|
7641
|
+
return _setPrototypeOf(o, p2);
|
|
7642
7642
|
}
|
|
7643
7643
|
function _isNativeReflectConstruct() {
|
|
7644
7644
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -8752,7 +8752,7 @@ var require_dcmjs = __commonJS({
|
|
|
8752
8752
|
};
|
|
8753
8753
|
const fill_window = (s) => {
|
|
8754
8754
|
const _w_size = s.w_size;
|
|
8755
|
-
let
|
|
8755
|
+
let p2, n, m2, more, str2;
|
|
8756
8756
|
do {
|
|
8757
8757
|
more = s.window_size - s.lookahead - s.strstart;
|
|
8758
8758
|
if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {
|
|
@@ -8761,16 +8761,16 @@ var require_dcmjs = __commonJS({
|
|
|
8761
8761
|
s.strstart -= _w_size;
|
|
8762
8762
|
s.block_start -= _w_size;
|
|
8763
8763
|
n = s.hash_size;
|
|
8764
|
-
|
|
8764
|
+
p2 = n;
|
|
8765
8765
|
do {
|
|
8766
|
-
m2 = s.head[--
|
|
8767
|
-
s.head[
|
|
8766
|
+
m2 = s.head[--p2];
|
|
8767
|
+
s.head[p2] = m2 >= _w_size ? m2 - _w_size : 0;
|
|
8768
8768
|
} while (--n);
|
|
8769
8769
|
n = _w_size;
|
|
8770
|
-
|
|
8770
|
+
p2 = n;
|
|
8771
8771
|
do {
|
|
8772
|
-
m2 = s.prev[--
|
|
8773
|
-
s.prev[
|
|
8772
|
+
m2 = s.prev[--p2];
|
|
8773
|
+
s.prev[p2] = m2 >= _w_size ? m2 - _w_size : 0;
|
|
8774
8774
|
} while (--n);
|
|
8775
8775
|
more += _w_size;
|
|
8776
8776
|
}
|
|
@@ -9647,9 +9647,9 @@ var require_dcmjs = __commonJS({
|
|
|
9647
9647
|
if (typeof source !== "object") {
|
|
9648
9648
|
throw new TypeError(source + "must be non-object");
|
|
9649
9649
|
}
|
|
9650
|
-
for (const
|
|
9651
|
-
if (_has(source,
|
|
9652
|
-
obj[
|
|
9650
|
+
for (const p2 in source) {
|
|
9651
|
+
if (_has(source, p2)) {
|
|
9652
|
+
obj[p2] = source[p2];
|
|
9653
9653
|
}
|
|
9654
9654
|
}
|
|
9655
9655
|
}
|
|
@@ -9657,11 +9657,11 @@ var require_dcmjs = __commonJS({
|
|
|
9657
9657
|
};
|
|
9658
9658
|
var flattenChunks = (chunks) => {
|
|
9659
9659
|
let len2 = 0;
|
|
9660
|
-
for (let i = 0,
|
|
9660
|
+
for (let i = 0, l3 = chunks.length; i < l3; i++) {
|
|
9661
9661
|
len2 += chunks[i].length;
|
|
9662
9662
|
}
|
|
9663
9663
|
const result = new Uint8Array(len2);
|
|
9664
|
-
for (let i = 0, pos = 0,
|
|
9664
|
+
for (let i = 0, pos = 0, l3 = chunks.length; i < l3; i++) {
|
|
9665
9665
|
let chunk = chunks[i];
|
|
9666
9666
|
result.set(chunk, pos);
|
|
9667
9667
|
pos += chunk.length;
|
|
@@ -15689,11 +15689,11 @@ var require_dcmjs = __commonJS({
|
|
|
15689
15689
|
var byteOffset = existingFrames * sliceLength;
|
|
15690
15690
|
var pixelDataUInt8View = new Uint8Array(dataset.PixelData, byteOffset, labelmaps.length * sliceLength);
|
|
15691
15691
|
var occupiedValue = this._getOccupiedValue();
|
|
15692
|
-
for (var
|
|
15693
|
-
var labelmap = labelmaps[
|
|
15692
|
+
for (var l3 = 0; l3 < labelmaps.length; l3++) {
|
|
15693
|
+
var labelmap = labelmaps[l3];
|
|
15694
15694
|
for (var i = 0; i < labelmap.length; i++) {
|
|
15695
15695
|
if (labelmap[i] === segmentIndex) {
|
|
15696
|
-
pixelDataUInt8View[
|
|
15696
|
+
pixelDataUInt8View[l3 * sliceLength + i] = occupiedValue;
|
|
15697
15697
|
}
|
|
15698
15698
|
}
|
|
15699
15699
|
}
|
|
@@ -17825,8 +17825,8 @@ var require_dcmjs = __commonJS({
|
|
|
17825
17825
|
var imageId = images[frame].imageId;
|
|
17826
17826
|
var imageIdSpecificToolState = toolState[imageId];
|
|
17827
17827
|
var brushPixelData = imageIdSpecificToolState.brush.data[segmentIndex].pixelData;
|
|
17828
|
-
for (var
|
|
17829
|
-
pixelData[pixelDataIndex] = brushPixelData[
|
|
17828
|
+
for (var p2 = 0; p2 < brushPixelData.length; p2++) {
|
|
17829
|
+
pixelData[pixelDataIndex] = brushPixelData[p2];
|
|
17830
17830
|
pixelDataIndex++;
|
|
17831
17831
|
}
|
|
17832
17832
|
}
|
|
@@ -17969,11 +17969,11 @@ var require_dcmjs = __commonJS({
|
|
|
17969
17969
|
var _pixelData2D$shape = _slicedToArray(pixelData2D.shape, 2);
|
|
17970
17970
|
_pixelData2D$shape[0];
|
|
17971
17971
|
_pixelData2D$shape[1];
|
|
17972
|
-
for (var
|
|
17973
|
-
if (pixelData2D.data[
|
|
17974
|
-
cToolsPixelData[
|
|
17972
|
+
for (var p2 = 0; p2 < cToolsPixelData.length; p2++) {
|
|
17973
|
+
if (pixelData2D.data[p2]) {
|
|
17974
|
+
cToolsPixelData[p2] = 1;
|
|
17975
17975
|
} else {
|
|
17976
|
-
cToolsPixelData[
|
|
17976
|
+
cToolsPixelData[p2] = 0;
|
|
17977
17977
|
}
|
|
17978
17978
|
}
|
|
17979
17979
|
}
|
|
@@ -18303,39 +18303,39 @@ var require_dcmjs = __commonJS({
|
|
|
18303
18303
|
return out;
|
|
18304
18304
|
}
|
|
18305
18305
|
function rotateX(out, a2, b2, rad) {
|
|
18306
|
-
var
|
|
18307
|
-
|
|
18308
|
-
|
|
18309
|
-
|
|
18310
|
-
r7[0] =
|
|
18311
|
-
r7[1] =
|
|
18312
|
-
r7[2] =
|
|
18306
|
+
var p2 = [], r7 = [];
|
|
18307
|
+
p2[0] = a2[0] - b2[0];
|
|
18308
|
+
p2[1] = a2[1] - b2[1];
|
|
18309
|
+
p2[2] = a2[2] - b2[2];
|
|
18310
|
+
r7[0] = p2[0];
|
|
18311
|
+
r7[1] = p2[1] * Math.cos(rad) - p2[2] * Math.sin(rad);
|
|
18312
|
+
r7[2] = p2[1] * Math.sin(rad) + p2[2] * Math.cos(rad);
|
|
18313
18313
|
out[0] = r7[0] + b2[0];
|
|
18314
18314
|
out[1] = r7[1] + b2[1];
|
|
18315
18315
|
out[2] = r7[2] + b2[2];
|
|
18316
18316
|
return out;
|
|
18317
18317
|
}
|
|
18318
18318
|
function rotateY(out, a2, b2, rad) {
|
|
18319
|
-
var
|
|
18320
|
-
|
|
18321
|
-
|
|
18322
|
-
|
|
18323
|
-
r7[0] =
|
|
18324
|
-
r7[1] =
|
|
18325
|
-
r7[2] =
|
|
18319
|
+
var p2 = [], r7 = [];
|
|
18320
|
+
p2[0] = a2[0] - b2[0];
|
|
18321
|
+
p2[1] = a2[1] - b2[1];
|
|
18322
|
+
p2[2] = a2[2] - b2[2];
|
|
18323
|
+
r7[0] = p2[2] * Math.sin(rad) + p2[0] * Math.cos(rad);
|
|
18324
|
+
r7[1] = p2[1];
|
|
18325
|
+
r7[2] = p2[2] * Math.cos(rad) - p2[0] * Math.sin(rad);
|
|
18326
18326
|
out[0] = r7[0] + b2[0];
|
|
18327
18327
|
out[1] = r7[1] + b2[1];
|
|
18328
18328
|
out[2] = r7[2] + b2[2];
|
|
18329
18329
|
return out;
|
|
18330
18330
|
}
|
|
18331
18331
|
function rotateZ(out, a2, b2, rad) {
|
|
18332
|
-
var
|
|
18333
|
-
|
|
18334
|
-
|
|
18335
|
-
|
|
18336
|
-
r7[0] =
|
|
18337
|
-
r7[1] =
|
|
18338
|
-
r7[2] =
|
|
18332
|
+
var p2 = [], r7 = [];
|
|
18333
|
+
p2[0] = a2[0] - b2[0];
|
|
18334
|
+
p2[1] = a2[1] - b2[1];
|
|
18335
|
+
p2[2] = a2[2] - b2[2];
|
|
18336
|
+
r7[0] = p2[0] * Math.cos(rad) - p2[1] * Math.sin(rad);
|
|
18337
|
+
r7[1] = p2[0] * Math.sin(rad) + p2[1] * Math.cos(rad);
|
|
18338
|
+
r7[2] = p2[2];
|
|
18339
18339
|
out[0] = r7[0] + b2[0];
|
|
18340
18340
|
out[1] = r7[1] + b2[1];
|
|
18341
18341
|
out[2] = r7[2] + b2[2];
|
|
@@ -18372,7 +18372,7 @@ var require_dcmjs = __commonJS({
|
|
|
18372
18372
|
var forEach = function() {
|
|
18373
18373
|
var vec = create();
|
|
18374
18374
|
return function(a2, stride, offset, count, fn2, arg) {
|
|
18375
|
-
var i,
|
|
18375
|
+
var i, l3;
|
|
18376
18376
|
if (!stride) {
|
|
18377
18377
|
stride = 3;
|
|
18378
18378
|
}
|
|
@@ -18380,11 +18380,11 @@ var require_dcmjs = __commonJS({
|
|
|
18380
18380
|
offset = 0;
|
|
18381
18381
|
}
|
|
18382
18382
|
if (count) {
|
|
18383
|
-
|
|
18383
|
+
l3 = Math.min(count * stride + offset, a2.length);
|
|
18384
18384
|
} else {
|
|
18385
|
-
|
|
18385
|
+
l3 = a2.length;
|
|
18386
18386
|
}
|
|
18387
|
-
for (i = offset; i <
|
|
18387
|
+
for (i = offset; i < l3; i += stride) {
|
|
18388
18388
|
vec[0] = a2[i];
|
|
18389
18389
|
vec[1] = a2[i + 1];
|
|
18390
18390
|
vec[2] = a2[i + 2];
|
|
@@ -18505,24 +18505,24 @@ var require_dcmjs = __commonJS({
|
|
|
18505
18505
|
return headerUint32;
|
|
18506
18506
|
}
|
|
18507
18507
|
function getLiteralRunLength(uint8Row, i) {
|
|
18508
|
-
for (var
|
|
18509
|
-
if (uint8Row[i +
|
|
18510
|
-
return
|
|
18508
|
+
for (var l3 = 0; l3 < uint8Row.length - i; l3++) {
|
|
18509
|
+
if (uint8Row[i + l3] === uint8Row[i + l3 + 1] && uint8Row[i + l3 + 1] === uint8Row[i + l3 + 2]) {
|
|
18510
|
+
return l3;
|
|
18511
18511
|
}
|
|
18512
|
-
if (
|
|
18513
|
-
return
|
|
18512
|
+
if (l3 === 128) {
|
|
18513
|
+
return l3;
|
|
18514
18514
|
}
|
|
18515
18515
|
}
|
|
18516
18516
|
return uint8Row.length - i;
|
|
18517
18517
|
}
|
|
18518
18518
|
function getReplicateRunLength(uint8Row, i) {
|
|
18519
18519
|
var first = uint8Row[i];
|
|
18520
|
-
for (var
|
|
18521
|
-
if (uint8Row[i +
|
|
18522
|
-
return
|
|
18520
|
+
for (var l3 = 1; l3 < uint8Row.length - i; l3++) {
|
|
18521
|
+
if (uint8Row[i + l3] !== first) {
|
|
18522
|
+
return l3;
|
|
18523
18523
|
}
|
|
18524
|
-
if (
|
|
18525
|
-
return
|
|
18524
|
+
if (l3 === 128) {
|
|
18525
|
+
return l3;
|
|
18526
18526
|
}
|
|
18527
18527
|
}
|
|
18528
18528
|
return uint8Row.length - i;
|
|
@@ -18559,8 +18559,8 @@ var require_dcmjs = __commonJS({
|
|
|
18559
18559
|
if (byteValue <= 127) {
|
|
18560
18560
|
var N2 = byteValue + 1;
|
|
18561
18561
|
var next = i + 1;
|
|
18562
|
-
for (var
|
|
18563
|
-
pixelData[pixelDataIndex] = uInt8Frame[
|
|
18562
|
+
for (var p2 = next; p2 < next + N2; p2++) {
|
|
18563
|
+
pixelData[pixelDataIndex] = uInt8Frame[p2];
|
|
18564
18564
|
pixelDataIndex++;
|
|
18565
18565
|
}
|
|
18566
18566
|
i += N2 + 1;
|
|
@@ -27893,18 +27893,18 @@ var require_zalgo = __commonJS({
|
|
|
27893
27893
|
function heComes(text2, options2) {
|
|
27894
27894
|
var result = "";
|
|
27895
27895
|
var counts;
|
|
27896
|
-
var
|
|
27896
|
+
var l3;
|
|
27897
27897
|
options2 = options2 || {};
|
|
27898
27898
|
options2["up"] = typeof options2["up"] !== "undefined" ? options2["up"] : true;
|
|
27899
27899
|
options2["mid"] = typeof options2["mid"] !== "undefined" ? options2["mid"] : true;
|
|
27900
27900
|
options2["down"] = typeof options2["down"] !== "undefined" ? options2["down"] : true;
|
|
27901
27901
|
options2["size"] = typeof options2["size"] !== "undefined" ? options2["size"] : "maxi";
|
|
27902
27902
|
text2 = text2.split("");
|
|
27903
|
-
for (
|
|
27904
|
-
if (isChar(
|
|
27903
|
+
for (l3 in text2) {
|
|
27904
|
+
if (isChar(l3)) {
|
|
27905
27905
|
continue;
|
|
27906
27906
|
}
|
|
27907
|
-
result = result + text2[
|
|
27907
|
+
result = result + text2[l3];
|
|
27908
27908
|
counts = { "up": 0, "down": 0, "mid": 0 };
|
|
27909
27909
|
switch (options2.size) {
|
|
27910
27910
|
case "mini":
|
|
@@ -32641,20 +32641,20 @@ var require_buffer_list = __commonJS({
|
|
|
32641
32641
|
}
|
|
32642
32642
|
join(s) {
|
|
32643
32643
|
if (this.length === 0) return "";
|
|
32644
|
-
let
|
|
32645
|
-
let ret = "" +
|
|
32646
|
-
while ((
|
|
32644
|
+
let p2 = this.head;
|
|
32645
|
+
let ret = "" + p2.data;
|
|
32646
|
+
while ((p2 = p2.next) !== null) ret += s + p2.data;
|
|
32647
32647
|
return ret;
|
|
32648
32648
|
}
|
|
32649
32649
|
concat(n) {
|
|
32650
32650
|
if (this.length === 0) return Buffer2.alloc(0);
|
|
32651
32651
|
const ret = Buffer2.allocUnsafe(n >>> 0);
|
|
32652
|
-
let
|
|
32652
|
+
let p2 = this.head;
|
|
32653
32653
|
let i = 0;
|
|
32654
|
-
while (
|
|
32655
|
-
TypedArrayPrototypeSet(ret,
|
|
32656
|
-
i +=
|
|
32657
|
-
|
|
32654
|
+
while (p2) {
|
|
32655
|
+
TypedArrayPrototypeSet(ret, p2.data, i);
|
|
32656
|
+
i += p2.data.length;
|
|
32657
|
+
p2 = p2.next;
|
|
32658
32658
|
}
|
|
32659
32659
|
return ret;
|
|
32660
32660
|
}
|
|
@@ -32675,17 +32675,17 @@ var require_buffer_list = __commonJS({
|
|
|
32675
32675
|
return this.head.data;
|
|
32676
32676
|
}
|
|
32677
32677
|
*[SymbolIterator]() {
|
|
32678
|
-
for (let
|
|
32679
|
-
yield
|
|
32678
|
+
for (let p2 = this.head; p2; p2 = p2.next) {
|
|
32679
|
+
yield p2.data;
|
|
32680
32680
|
}
|
|
32681
32681
|
}
|
|
32682
32682
|
// Consumes a specified amount of characters from the buffered data.
|
|
32683
32683
|
_getString(n) {
|
|
32684
32684
|
let ret = "";
|
|
32685
|
-
let
|
|
32685
|
+
let p2 = this.head;
|
|
32686
32686
|
let c = 0;
|
|
32687
32687
|
do {
|
|
32688
|
-
const str =
|
|
32688
|
+
const str = p2.data;
|
|
32689
32689
|
if (n > str.length) {
|
|
32690
32690
|
ret += str;
|
|
32691
32691
|
n -= str.length;
|
|
@@ -32693,17 +32693,17 @@ var require_buffer_list = __commonJS({
|
|
|
32693
32693
|
if (n === str.length) {
|
|
32694
32694
|
ret += str;
|
|
32695
32695
|
++c;
|
|
32696
|
-
if (
|
|
32696
|
+
if (p2.next) this.head = p2.next;
|
|
32697
32697
|
else this.head = this.tail = null;
|
|
32698
32698
|
} else {
|
|
32699
32699
|
ret += StringPrototypeSlice(str, 0, n);
|
|
32700
|
-
this.head =
|
|
32701
|
-
|
|
32700
|
+
this.head = p2;
|
|
32701
|
+
p2.data = StringPrototypeSlice(str, n);
|
|
32702
32702
|
}
|
|
32703
32703
|
break;
|
|
32704
32704
|
}
|
|
32705
32705
|
++c;
|
|
32706
|
-
} while ((
|
|
32706
|
+
} while ((p2 = p2.next) !== null);
|
|
32707
32707
|
this.length -= c;
|
|
32708
32708
|
return ret;
|
|
32709
32709
|
}
|
|
@@ -32711,10 +32711,10 @@ var require_buffer_list = __commonJS({
|
|
|
32711
32711
|
_getBuffer(n) {
|
|
32712
32712
|
const ret = Buffer2.allocUnsafe(n);
|
|
32713
32713
|
const retLen = n;
|
|
32714
|
-
let
|
|
32714
|
+
let p2 = this.head;
|
|
32715
32715
|
let c = 0;
|
|
32716
32716
|
do {
|
|
32717
|
-
const buf =
|
|
32717
|
+
const buf = p2.data;
|
|
32718
32718
|
if (n > buf.length) {
|
|
32719
32719
|
TypedArrayPrototypeSet(ret, buf, retLen - n);
|
|
32720
32720
|
n -= buf.length;
|
|
@@ -32722,17 +32722,17 @@ var require_buffer_list = __commonJS({
|
|
|
32722
32722
|
if (n === buf.length) {
|
|
32723
32723
|
TypedArrayPrototypeSet(ret, buf, retLen - n);
|
|
32724
32724
|
++c;
|
|
32725
|
-
if (
|
|
32725
|
+
if (p2.next) this.head = p2.next;
|
|
32726
32726
|
else this.head = this.tail = null;
|
|
32727
32727
|
} else {
|
|
32728
32728
|
TypedArrayPrototypeSet(ret, new Uint8Array2(buf.buffer, buf.byteOffset, n), retLen - n);
|
|
32729
|
-
this.head =
|
|
32730
|
-
|
|
32729
|
+
this.head = p2;
|
|
32730
|
+
p2.data = buf.slice(n);
|
|
32731
32731
|
}
|
|
32732
32732
|
break;
|
|
32733
32733
|
}
|
|
32734
32734
|
++c;
|
|
32735
|
-
} while ((
|
|
32735
|
+
} while ((p2 = p2.next) !== null);
|
|
32736
32736
|
this.length -= c;
|
|
32737
32737
|
return ret;
|
|
32738
32738
|
}
|
|
@@ -37088,17 +37088,17 @@ var require_series = __commonJS({
|
|
|
37088
37088
|
}
|
|
37089
37089
|
});
|
|
37090
37090
|
|
|
37091
|
-
// ../../node_modules/
|
|
37091
|
+
// ../../node_modules/readable-stream/lib/internal/streams/stream.js
|
|
37092
37092
|
var require_stream3 = __commonJS({
|
|
37093
|
-
"../../node_modules/
|
|
37093
|
+
"../../node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) {
|
|
37094
37094
|
"use strict";
|
|
37095
37095
|
module2.exports = require("stream");
|
|
37096
37096
|
}
|
|
37097
37097
|
});
|
|
37098
37098
|
|
|
37099
|
-
// ../../node_modules/
|
|
37099
|
+
// ../../node_modules/readable-stream/lib/internal/streams/buffer_list.js
|
|
37100
37100
|
var require_buffer_list2 = __commonJS({
|
|
37101
|
-
"../../node_modules/
|
|
37101
|
+
"../../node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) {
|
|
37102
37102
|
"use strict";
|
|
37103
37103
|
function ownKeys(object, enumerableOnly) {
|
|
37104
37104
|
var keys = Object.keys(object);
|
|
@@ -37222,9 +37222,9 @@ var require_buffer_list2 = __commonJS({
|
|
|
37222
37222
|
key: "join",
|
|
37223
37223
|
value: function join2(s) {
|
|
37224
37224
|
if (this.length === 0) return "";
|
|
37225
|
-
var
|
|
37226
|
-
var ret = "" +
|
|
37227
|
-
while (
|
|
37225
|
+
var p2 = this.head;
|
|
37226
|
+
var ret = "" + p2.data;
|
|
37227
|
+
while (p2 = p2.next) ret += s + p2.data;
|
|
37228
37228
|
return ret;
|
|
37229
37229
|
}
|
|
37230
37230
|
}, {
|
|
@@ -37232,12 +37232,12 @@ var require_buffer_list2 = __commonJS({
|
|
|
37232
37232
|
value: function concat(n) {
|
|
37233
37233
|
if (this.length === 0) return Buffer2.alloc(0);
|
|
37234
37234
|
var ret = Buffer2.allocUnsafe(n >>> 0);
|
|
37235
|
-
var
|
|
37235
|
+
var p2 = this.head;
|
|
37236
37236
|
var i = 0;
|
|
37237
|
-
while (
|
|
37238
|
-
copyBuffer(
|
|
37239
|
-
i +=
|
|
37240
|
-
|
|
37237
|
+
while (p2) {
|
|
37238
|
+
copyBuffer(p2.data, ret, i);
|
|
37239
|
+
i += p2.data.length;
|
|
37240
|
+
p2 = p2.next;
|
|
37241
37241
|
}
|
|
37242
37242
|
return ret;
|
|
37243
37243
|
}
|
|
@@ -37265,12 +37265,12 @@ var require_buffer_list2 = __commonJS({
|
|
|
37265
37265
|
}, {
|
|
37266
37266
|
key: "_getString",
|
|
37267
37267
|
value: function _getString(n) {
|
|
37268
|
-
var
|
|
37268
|
+
var p2 = this.head;
|
|
37269
37269
|
var c = 1;
|
|
37270
|
-
var ret =
|
|
37270
|
+
var ret = p2.data;
|
|
37271
37271
|
n -= ret.length;
|
|
37272
|
-
while (
|
|
37273
|
-
var str =
|
|
37272
|
+
while (p2 = p2.next) {
|
|
37273
|
+
var str = p2.data;
|
|
37274
37274
|
var nb = n > str.length ? str.length : n;
|
|
37275
37275
|
if (nb === str.length) ret += str;
|
|
37276
37276
|
else ret += str.slice(0, n);
|
|
@@ -37278,11 +37278,11 @@ var require_buffer_list2 = __commonJS({
|
|
|
37278
37278
|
if (n === 0) {
|
|
37279
37279
|
if (nb === str.length) {
|
|
37280
37280
|
++c;
|
|
37281
|
-
if (
|
|
37281
|
+
if (p2.next) this.head = p2.next;
|
|
37282
37282
|
else this.head = this.tail = null;
|
|
37283
37283
|
} else {
|
|
37284
|
-
this.head =
|
|
37285
|
-
|
|
37284
|
+
this.head = p2;
|
|
37285
|
+
p2.data = str.slice(nb);
|
|
37286
37286
|
}
|
|
37287
37287
|
break;
|
|
37288
37288
|
}
|
|
@@ -37296,23 +37296,23 @@ var require_buffer_list2 = __commonJS({
|
|
|
37296
37296
|
key: "_getBuffer",
|
|
37297
37297
|
value: function _getBuffer(n) {
|
|
37298
37298
|
var ret = Buffer2.allocUnsafe(n);
|
|
37299
|
-
var
|
|
37299
|
+
var p2 = this.head;
|
|
37300
37300
|
var c = 1;
|
|
37301
|
-
|
|
37302
|
-
n -=
|
|
37303
|
-
while (
|
|
37304
|
-
var buf =
|
|
37301
|
+
p2.data.copy(ret);
|
|
37302
|
+
n -= p2.data.length;
|
|
37303
|
+
while (p2 = p2.next) {
|
|
37304
|
+
var buf = p2.data;
|
|
37305
37305
|
var nb = n > buf.length ? buf.length : n;
|
|
37306
37306
|
buf.copy(ret, ret.length - n, 0, nb);
|
|
37307
37307
|
n -= nb;
|
|
37308
37308
|
if (n === 0) {
|
|
37309
37309
|
if (nb === buf.length) {
|
|
37310
37310
|
++c;
|
|
37311
|
-
if (
|
|
37311
|
+
if (p2.next) this.head = p2.next;
|
|
37312
37312
|
else this.head = this.tail = null;
|
|
37313
37313
|
} else {
|
|
37314
|
-
this.head =
|
|
37315
|
-
|
|
37314
|
+
this.head = p2;
|
|
37315
|
+
p2.data = buf.slice(nb);
|
|
37316
37316
|
}
|
|
37317
37317
|
break;
|
|
37318
37318
|
}
|
|
@@ -37338,9 +37338,9 @@ var require_buffer_list2 = __commonJS({
|
|
|
37338
37338
|
}
|
|
37339
37339
|
});
|
|
37340
37340
|
|
|
37341
|
-
// ../../node_modules/
|
|
37341
|
+
// ../../node_modules/readable-stream/lib/internal/streams/destroy.js
|
|
37342
37342
|
var require_destroy2 = __commonJS({
|
|
37343
|
-
"../../node_modules/
|
|
37343
|
+
"../../node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) {
|
|
37344
37344
|
"use strict";
|
|
37345
37345
|
function destroy(err, cb) {
|
|
37346
37346
|
var _this = this;
|
|
@@ -37427,9 +37427,9 @@ var require_destroy2 = __commonJS({
|
|
|
37427
37427
|
}
|
|
37428
37428
|
});
|
|
37429
37429
|
|
|
37430
|
-
// ../../node_modules/
|
|
37430
|
+
// ../../node_modules/readable-stream/errors.js
|
|
37431
37431
|
var require_errors3 = __commonJS({
|
|
37432
|
-
"../../node_modules/
|
|
37432
|
+
"../../node_modules/readable-stream/errors.js"(exports2, module2) {
|
|
37433
37433
|
"use strict";
|
|
37434
37434
|
var codes = {};
|
|
37435
37435
|
function createErrorType(code, message, Base) {
|
|
@@ -37527,9 +37527,9 @@ var require_errors3 = __commonJS({
|
|
|
37527
37527
|
}
|
|
37528
37528
|
});
|
|
37529
37529
|
|
|
37530
|
-
// ../../node_modules/
|
|
37530
|
+
// ../../node_modules/readable-stream/lib/internal/streams/state.js
|
|
37531
37531
|
var require_state2 = __commonJS({
|
|
37532
|
-
"../../node_modules/
|
|
37532
|
+
"../../node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) {
|
|
37533
37533
|
"use strict";
|
|
37534
37534
|
var ERR_INVALID_OPT_VALUE = require_errors3().codes.ERR_INVALID_OPT_VALUE;
|
|
37535
37535
|
function highWaterMarkFrom(options, isDuplex, duplexKey) {
|
|
@@ -37608,9 +37608,9 @@ var require_node = __commonJS({
|
|
|
37608
37608
|
}
|
|
37609
37609
|
});
|
|
37610
37610
|
|
|
37611
|
-
// ../../node_modules/
|
|
37611
|
+
// ../../node_modules/readable-stream/lib/_stream_writable.js
|
|
37612
37612
|
var require_stream_writable2 = __commonJS({
|
|
37613
|
-
"../../node_modules/
|
|
37613
|
+
"../../node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) {
|
|
37614
37614
|
"use strict";
|
|
37615
37615
|
module2.exports = Writable;
|
|
37616
37616
|
function CorkedRequest(state) {
|
|
@@ -37917,8 +37917,8 @@ var require_stream_writable2 = __commonJS({
|
|
|
37917
37917
|
state.bufferProcessing = true;
|
|
37918
37918
|
var entry = state.bufferedRequest;
|
|
37919
37919
|
if (stream._writev && entry && entry.next) {
|
|
37920
|
-
var
|
|
37921
|
-
var buffer = new Array(
|
|
37920
|
+
var l3 = state.bufferedRequestCount;
|
|
37921
|
+
var buffer = new Array(l3);
|
|
37922
37922
|
var holder = state.corkedRequestsFree;
|
|
37923
37923
|
holder.entry = entry;
|
|
37924
37924
|
var count = 0;
|
|
@@ -38079,9 +38079,9 @@ var require_stream_writable2 = __commonJS({
|
|
|
38079
38079
|
}
|
|
38080
38080
|
});
|
|
38081
38081
|
|
|
38082
|
-
// ../../node_modules/
|
|
38082
|
+
// ../../node_modules/readable-stream/lib/_stream_duplex.js
|
|
38083
38083
|
var require_stream_duplex = __commonJS({
|
|
38084
|
-
"../../node_modules/
|
|
38084
|
+
"../../node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) {
|
|
38085
38085
|
"use strict";
|
|
38086
38086
|
var objectKeys = Object.keys || function(obj) {
|
|
38087
38087
|
var keys2 = [];
|
|
@@ -38172,9 +38172,9 @@ var require_stream_duplex = __commonJS({
|
|
|
38172
38172
|
}
|
|
38173
38173
|
});
|
|
38174
38174
|
|
|
38175
|
-
// ../../node_modules/
|
|
38175
|
+
// ../../node_modules/safe-buffer/index.js
|
|
38176
38176
|
var require_safe_buffer = __commonJS({
|
|
38177
|
-
"../../node_modules/
|
|
38177
|
+
"../../node_modules/safe-buffer/index.js"(exports2, module2) {
|
|
38178
38178
|
"use strict";
|
|
38179
38179
|
var buffer = require("buffer");
|
|
38180
38180
|
var Buffer2 = buffer.Buffer;
|
|
@@ -38192,6 +38192,7 @@ var require_safe_buffer = __commonJS({
|
|
|
38192
38192
|
function SafeBuffer(arg, encodingOrOffset, length) {
|
|
38193
38193
|
return Buffer2(arg, encodingOrOffset, length);
|
|
38194
38194
|
}
|
|
38195
|
+
SafeBuffer.prototype = Object.create(Buffer2.prototype);
|
|
38195
38196
|
copyProps(Buffer2, SafeBuffer);
|
|
38196
38197
|
SafeBuffer.from = function(arg, encodingOrOffset, length) {
|
|
38197
38198
|
if (typeof arg === "number") {
|
|
@@ -38371,7 +38372,7 @@ var require_string_decoder = __commonJS({
|
|
|
38371
38372
|
}
|
|
38372
38373
|
return 0;
|
|
38373
38374
|
}
|
|
38374
|
-
function utf8CheckExtraBytes(self2, buf,
|
|
38375
|
+
function utf8CheckExtraBytes(self2, buf, p2) {
|
|
38375
38376
|
if ((buf[0] & 192) !== 128) {
|
|
38376
38377
|
self2.lastNeed = 0;
|
|
38377
38378
|
return "\uFFFD";
|
|
@@ -38390,14 +38391,14 @@ var require_string_decoder = __commonJS({
|
|
|
38390
38391
|
}
|
|
38391
38392
|
}
|
|
38392
38393
|
function utf8FillLast(buf) {
|
|
38393
|
-
var
|
|
38394
|
-
var r7 = utf8CheckExtraBytes(this, buf,
|
|
38394
|
+
var p2 = this.lastTotal - this.lastNeed;
|
|
38395
|
+
var r7 = utf8CheckExtraBytes(this, buf, p2);
|
|
38395
38396
|
if (r7 !== void 0) return r7;
|
|
38396
38397
|
if (this.lastNeed <= buf.length) {
|
|
38397
|
-
buf.copy(this.lastChar,
|
|
38398
|
+
buf.copy(this.lastChar, p2, 0, this.lastNeed);
|
|
38398
38399
|
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
38399
38400
|
}
|
|
38400
|
-
buf.copy(this.lastChar,
|
|
38401
|
+
buf.copy(this.lastChar, p2, 0, buf.length);
|
|
38401
38402
|
this.lastNeed -= buf.length;
|
|
38402
38403
|
}
|
|
38403
38404
|
function utf8Text(buf, i) {
|
|
@@ -38468,9 +38469,9 @@ var require_string_decoder = __commonJS({
|
|
|
38468
38469
|
}
|
|
38469
38470
|
});
|
|
38470
38471
|
|
|
38471
|
-
// ../../node_modules/
|
|
38472
|
+
// ../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js
|
|
38472
38473
|
var require_end_of_stream2 = __commonJS({
|
|
38473
|
-
"../../node_modules/
|
|
38474
|
+
"../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) {
|
|
38474
38475
|
"use strict";
|
|
38475
38476
|
var ERR_STREAM_PREMATURE_CLOSE = require_errors3().codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
38476
38477
|
function once(callback) {
|
|
@@ -38557,9 +38558,9 @@ var require_end_of_stream2 = __commonJS({
|
|
|
38557
38558
|
}
|
|
38558
38559
|
});
|
|
38559
38560
|
|
|
38560
|
-
// ../../node_modules/
|
|
38561
|
+
// ../../node_modules/readable-stream/lib/internal/streams/async_iterator.js
|
|
38561
38562
|
var require_async_iterator = __commonJS({
|
|
38562
|
-
"../../node_modules/
|
|
38563
|
+
"../../node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) {
|
|
38563
38564
|
"use strict";
|
|
38564
38565
|
var _Object$setPrototypeO;
|
|
38565
38566
|
function _defineProperty(obj, key, value) {
|
|
@@ -38740,9 +38741,9 @@ var require_async_iterator = __commonJS({
|
|
|
38740
38741
|
}
|
|
38741
38742
|
});
|
|
38742
38743
|
|
|
38743
|
-
// ../../node_modules/
|
|
38744
|
+
// ../../node_modules/readable-stream/lib/internal/streams/from.js
|
|
38744
38745
|
var require_from2 = __commonJS({
|
|
38745
|
-
"../../node_modules/
|
|
38746
|
+
"../../node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) {
|
|
38746
38747
|
"use strict";
|
|
38747
38748
|
function asyncGeneratorStep(gen, resolve2, reject, _next, _throw, key, arg) {
|
|
38748
38749
|
try {
|
|
@@ -38861,9 +38862,9 @@ var require_from2 = __commonJS({
|
|
|
38861
38862
|
}
|
|
38862
38863
|
});
|
|
38863
38864
|
|
|
38864
|
-
// ../../node_modules/
|
|
38865
|
+
// ../../node_modules/readable-stream/lib/_stream_readable.js
|
|
38865
38866
|
var require_stream_readable = __commonJS({
|
|
38866
|
-
"../../node_modules/
|
|
38867
|
+
"../../node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) {
|
|
38867
38868
|
"use strict";
|
|
38868
38869
|
module2.exports = Readable2;
|
|
38869
38870
|
var Duplex;
|
|
@@ -39067,11 +39068,11 @@ var require_stream_readable = __commonJS({
|
|
|
39067
39068
|
var decoder = new StringDecoder(enc);
|
|
39068
39069
|
this._readableState.decoder = decoder;
|
|
39069
39070
|
this._readableState.encoding = this._readableState.decoder.encoding;
|
|
39070
|
-
var
|
|
39071
|
+
var p2 = this._readableState.buffer.head;
|
|
39071
39072
|
var content = "";
|
|
39072
|
-
while (
|
|
39073
|
-
content += decoder.write(
|
|
39074
|
-
|
|
39073
|
+
while (p2 !== null) {
|
|
39074
|
+
content += decoder.write(p2.data);
|
|
39075
|
+
p2 = p2.next;
|
|
39075
39076
|
}
|
|
39076
39077
|
this._readableState.buffer.clear();
|
|
39077
39078
|
if (content !== "") this._readableState.buffer.push(content);
|
|
@@ -39586,7 +39587,7 @@ var require_stream_readable = __commonJS({
|
|
|
39586
39587
|
};
|
|
39587
39588
|
}
|
|
39588
39589
|
function indexOf(xs, x2) {
|
|
39589
|
-
for (var i = 0,
|
|
39590
|
+
for (var i = 0, l3 = xs.length; i < l3; i++) {
|
|
39590
39591
|
if (xs[i] === x2) return i;
|
|
39591
39592
|
}
|
|
39592
39593
|
return -1;
|
|
@@ -39594,9 +39595,9 @@ var require_stream_readable = __commonJS({
|
|
|
39594
39595
|
}
|
|
39595
39596
|
});
|
|
39596
39597
|
|
|
39597
|
-
// ../../node_modules/
|
|
39598
|
+
// ../../node_modules/readable-stream/lib/_stream_transform.js
|
|
39598
39599
|
var require_stream_transform = __commonJS({
|
|
39599
|
-
"../../node_modules/
|
|
39600
|
+
"../../node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) {
|
|
39600
39601
|
"use strict";
|
|
39601
39602
|
module2.exports = Transform;
|
|
39602
39603
|
var _require$codes = require_errors3().codes;
|
|
@@ -39695,9 +39696,9 @@ var require_stream_transform = __commonJS({
|
|
|
39695
39696
|
}
|
|
39696
39697
|
});
|
|
39697
39698
|
|
|
39698
|
-
// ../../node_modules/
|
|
39699
|
+
// ../../node_modules/readable-stream/lib/_stream_passthrough.js
|
|
39699
39700
|
var require_stream_passthrough = __commonJS({
|
|
39700
|
-
"../../node_modules/
|
|
39701
|
+
"../../node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) {
|
|
39701
39702
|
"use strict";
|
|
39702
39703
|
module2.exports = PassThrough;
|
|
39703
39704
|
var Transform = require_stream_transform();
|
|
@@ -39712,9 +39713,9 @@ var require_stream_passthrough = __commonJS({
|
|
|
39712
39713
|
}
|
|
39713
39714
|
});
|
|
39714
39715
|
|
|
39715
|
-
// ../../node_modules/
|
|
39716
|
+
// ../../node_modules/readable-stream/lib/internal/streams/pipeline.js
|
|
39716
39717
|
var require_pipeline2 = __commonJS({
|
|
39717
|
-
"../../node_modules/
|
|
39718
|
+
"../../node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) {
|
|
39718
39719
|
"use strict";
|
|
39719
39720
|
var eos;
|
|
39720
39721
|
function once(callback) {
|
|
@@ -39762,8 +39763,8 @@ var require_pipeline2 = __commonJS({
|
|
|
39762
39763
|
function call(fn2) {
|
|
39763
39764
|
fn2();
|
|
39764
39765
|
}
|
|
39765
|
-
function pipe(from,
|
|
39766
|
-
return from.pipe(
|
|
39766
|
+
function pipe(from, to) {
|
|
39767
|
+
return from.pipe(to);
|
|
39767
39768
|
}
|
|
39768
39769
|
function popCallback(streams) {
|
|
39769
39770
|
if (!streams.length) return noop;
|
|
@@ -39797,9 +39798,9 @@ var require_pipeline2 = __commonJS({
|
|
|
39797
39798
|
}
|
|
39798
39799
|
});
|
|
39799
39800
|
|
|
39800
|
-
// ../../node_modules/
|
|
39801
|
+
// ../../node_modules/readable-stream/readable.js
|
|
39801
39802
|
var require_readable2 = __commonJS({
|
|
39802
|
-
"../../node_modules/
|
|
39803
|
+
"../../node_modules/readable-stream/readable.js"(exports2, module2) {
|
|
39803
39804
|
"use strict";
|
|
39804
39805
|
var Stream = require("stream");
|
|
39805
39806
|
if (process.env.READABLE_STREAM === "disable" && Stream) {
|
|
@@ -40253,9 +40254,9 @@ var require_color_string = __commonJS({
|
|
|
40253
40254
|
var alpha = parseFloat(match[4]);
|
|
40254
40255
|
var h2 = (parseFloat(match[1]) % 360 + 360) % 360;
|
|
40255
40256
|
var s = clamp(parseFloat(match[2]), 0, 100);
|
|
40256
|
-
var
|
|
40257
|
+
var l3 = clamp(parseFloat(match[3]), 0, 100);
|
|
40257
40258
|
var a2 = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
|
|
40258
|
-
return [h2, s,
|
|
40259
|
+
return [h2, s, l3, a2];
|
|
40259
40260
|
}
|
|
40260
40261
|
return null;
|
|
40261
40262
|
};
|
|
@@ -40532,7 +40533,7 @@ var require_conversions = __commonJS({
|
|
|
40532
40533
|
var delta = max - min;
|
|
40533
40534
|
var h2;
|
|
40534
40535
|
var s;
|
|
40535
|
-
var
|
|
40536
|
+
var l3;
|
|
40536
40537
|
if (max === min) {
|
|
40537
40538
|
h2 = 0;
|
|
40538
40539
|
} else if (r7 === max) {
|
|
@@ -40546,15 +40547,15 @@ var require_conversions = __commonJS({
|
|
|
40546
40547
|
if (h2 < 0) {
|
|
40547
40548
|
h2 += 360;
|
|
40548
40549
|
}
|
|
40549
|
-
|
|
40550
|
+
l3 = (min + max) / 2;
|
|
40550
40551
|
if (max === min) {
|
|
40551
40552
|
s = 0;
|
|
40552
|
-
} else if (
|
|
40553
|
+
} else if (l3 <= 0.5) {
|
|
40553
40554
|
s = delta / (max + min);
|
|
40554
40555
|
} else {
|
|
40555
40556
|
s = delta / (2 - max - min);
|
|
40556
40557
|
}
|
|
40557
|
-
return [h2, s * 100,
|
|
40558
|
+
return [h2, s * 100, l3 * 100];
|
|
40558
40559
|
};
|
|
40559
40560
|
convert.rgb.hsv = function(rgb) {
|
|
40560
40561
|
var rdif;
|
|
@@ -40661,7 +40662,7 @@ var require_conversions = __commonJS({
|
|
|
40661
40662
|
var x2 = xyz[0];
|
|
40662
40663
|
var y2 = xyz[1];
|
|
40663
40664
|
var z2 = xyz[2];
|
|
40664
|
-
var
|
|
40665
|
+
var l3;
|
|
40665
40666
|
var a2;
|
|
40666
40667
|
var b2;
|
|
40667
40668
|
x2 /= 95.047;
|
|
@@ -40670,30 +40671,30 @@ var require_conversions = __commonJS({
|
|
|
40670
40671
|
x2 = x2 > 8856e-6 ? Math.pow(x2, 1 / 3) : 7.787 * x2 + 16 / 116;
|
|
40671
40672
|
y2 = y2 > 8856e-6 ? Math.pow(y2, 1 / 3) : 7.787 * y2 + 16 / 116;
|
|
40672
40673
|
z2 = z2 > 8856e-6 ? Math.pow(z2, 1 / 3) : 7.787 * z2 + 16 / 116;
|
|
40673
|
-
|
|
40674
|
+
l3 = 116 * y2 - 16;
|
|
40674
40675
|
a2 = 500 * (x2 - y2);
|
|
40675
40676
|
b2 = 200 * (y2 - z2);
|
|
40676
|
-
return [
|
|
40677
|
+
return [l3, a2, b2];
|
|
40677
40678
|
};
|
|
40678
40679
|
convert.hsl.rgb = function(hsl) {
|
|
40679
40680
|
var h2 = hsl[0] / 360;
|
|
40680
40681
|
var s = hsl[1] / 100;
|
|
40681
|
-
var
|
|
40682
|
+
var l3 = hsl[2] / 100;
|
|
40682
40683
|
var t1;
|
|
40683
40684
|
var t2;
|
|
40684
40685
|
var t3;
|
|
40685
40686
|
var rgb;
|
|
40686
40687
|
var val;
|
|
40687
40688
|
if (s === 0) {
|
|
40688
|
-
val =
|
|
40689
|
+
val = l3 * 255;
|
|
40689
40690
|
return [val, val, val];
|
|
40690
40691
|
}
|
|
40691
|
-
if (
|
|
40692
|
-
t2 =
|
|
40692
|
+
if (l3 < 0.5) {
|
|
40693
|
+
t2 = l3 * (1 + s);
|
|
40693
40694
|
} else {
|
|
40694
|
-
t2 =
|
|
40695
|
+
t2 = l3 + s - l3 * s;
|
|
40695
40696
|
}
|
|
40696
|
-
t1 = 2 *
|
|
40697
|
+
t1 = 2 * l3 - t2;
|
|
40697
40698
|
rgb = [0, 0, 0];
|
|
40698
40699
|
for (var i = 0; i < 3; i++) {
|
|
40699
40700
|
t3 = h2 + 1 / 3 * -(i - 1);
|
|
@@ -40719,16 +40720,16 @@ var require_conversions = __commonJS({
|
|
|
40719
40720
|
convert.hsl.hsv = function(hsl) {
|
|
40720
40721
|
var h2 = hsl[0];
|
|
40721
40722
|
var s = hsl[1] / 100;
|
|
40722
|
-
var
|
|
40723
|
+
var l3 = hsl[2] / 100;
|
|
40723
40724
|
var smin = s;
|
|
40724
|
-
var lmin = Math.max(
|
|
40725
|
+
var lmin = Math.max(l3, 0.01);
|
|
40725
40726
|
var sv;
|
|
40726
40727
|
var v;
|
|
40727
|
-
|
|
40728
|
-
s *=
|
|
40728
|
+
l3 *= 2;
|
|
40729
|
+
s *= l3 <= 1 ? l3 : 2 - l3;
|
|
40729
40730
|
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
40730
|
-
v = (
|
|
40731
|
-
sv =
|
|
40731
|
+
v = (l3 + s) / 2;
|
|
40732
|
+
sv = l3 === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l3 + s);
|
|
40732
40733
|
return [h2, sv * 100, v * 100];
|
|
40733
40734
|
};
|
|
40734
40735
|
convert.hsv.rgb = function(hsv) {
|
|
@@ -40737,23 +40738,23 @@ var require_conversions = __commonJS({
|
|
|
40737
40738
|
var v = hsv[2] / 100;
|
|
40738
40739
|
var hi2 = Math.floor(h2) % 6;
|
|
40739
40740
|
var f2 = h2 - Math.floor(h2);
|
|
40740
|
-
var
|
|
40741
|
+
var p2 = 255 * v * (1 - s);
|
|
40741
40742
|
var q2 = 255 * v * (1 - s * f2);
|
|
40742
40743
|
var t = 255 * v * (1 - s * (1 - f2));
|
|
40743
40744
|
v *= 255;
|
|
40744
40745
|
switch (hi2) {
|
|
40745
40746
|
case 0:
|
|
40746
|
-
return [v, t,
|
|
40747
|
+
return [v, t, p2];
|
|
40747
40748
|
case 1:
|
|
40748
|
-
return [q2, v,
|
|
40749
|
+
return [q2, v, p2];
|
|
40749
40750
|
case 2:
|
|
40750
|
-
return [
|
|
40751
|
+
return [p2, v, t];
|
|
40751
40752
|
case 3:
|
|
40752
|
-
return [
|
|
40753
|
+
return [p2, q2, v];
|
|
40753
40754
|
case 4:
|
|
40754
|
-
return [t,
|
|
40755
|
+
return [t, p2, v];
|
|
40755
40756
|
case 5:
|
|
40756
|
-
return [v,
|
|
40757
|
+
return [v, p2, q2];
|
|
40757
40758
|
}
|
|
40758
40759
|
};
|
|
40759
40760
|
convert.hsv.hsl = function(hsv) {
|
|
@@ -40763,14 +40764,14 @@ var require_conversions = __commonJS({
|
|
|
40763
40764
|
var vmin = Math.max(v, 0.01);
|
|
40764
40765
|
var lmin;
|
|
40765
40766
|
var sl;
|
|
40766
|
-
var
|
|
40767
|
-
|
|
40767
|
+
var l3;
|
|
40768
|
+
l3 = (2 - s) * v;
|
|
40768
40769
|
lmin = (2 - s) * vmin;
|
|
40769
40770
|
sl = s * vmin;
|
|
40770
40771
|
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
40771
40772
|
sl = sl || 0;
|
|
40772
|
-
|
|
40773
|
-
return [h2, sl * 100,
|
|
40773
|
+
l3 /= 2;
|
|
40774
|
+
return [h2, sl * 100, l3 * 100];
|
|
40774
40775
|
};
|
|
40775
40776
|
convert.hwb.rgb = function(hwb) {
|
|
40776
40777
|
var h2 = hwb[0] / 360;
|
|
@@ -40866,7 +40867,7 @@ var require_conversions = __commonJS({
|
|
|
40866
40867
|
var x2 = xyz[0];
|
|
40867
40868
|
var y2 = xyz[1];
|
|
40868
40869
|
var z2 = xyz[2];
|
|
40869
|
-
var
|
|
40870
|
+
var l3;
|
|
40870
40871
|
var a2;
|
|
40871
40872
|
var b2;
|
|
40872
40873
|
x2 /= 95.047;
|
|
@@ -40875,19 +40876,19 @@ var require_conversions = __commonJS({
|
|
|
40875
40876
|
x2 = x2 > 8856e-6 ? Math.pow(x2, 1 / 3) : 7.787 * x2 + 16 / 116;
|
|
40876
40877
|
y2 = y2 > 8856e-6 ? Math.pow(y2, 1 / 3) : 7.787 * y2 + 16 / 116;
|
|
40877
40878
|
z2 = z2 > 8856e-6 ? Math.pow(z2, 1 / 3) : 7.787 * z2 + 16 / 116;
|
|
40878
|
-
|
|
40879
|
+
l3 = 116 * y2 - 16;
|
|
40879
40880
|
a2 = 500 * (x2 - y2);
|
|
40880
40881
|
b2 = 200 * (y2 - z2);
|
|
40881
|
-
return [
|
|
40882
|
+
return [l3, a2, b2];
|
|
40882
40883
|
};
|
|
40883
40884
|
convert.lab.xyz = function(lab) {
|
|
40884
|
-
var
|
|
40885
|
+
var l3 = lab[0];
|
|
40885
40886
|
var a2 = lab[1];
|
|
40886
40887
|
var b2 = lab[2];
|
|
40887
40888
|
var x2;
|
|
40888
40889
|
var y2;
|
|
40889
40890
|
var z2;
|
|
40890
|
-
y2 = (
|
|
40891
|
+
y2 = (l3 + 16) / 116;
|
|
40891
40892
|
x2 = a2 / 500 + y2;
|
|
40892
40893
|
z2 = y2 - b2 / 200;
|
|
40893
40894
|
var y22 = Math.pow(y2, 3);
|
|
@@ -40902,7 +40903,7 @@ var require_conversions = __commonJS({
|
|
|
40902
40903
|
return [x2, y2, z2];
|
|
40903
40904
|
};
|
|
40904
40905
|
convert.lab.lch = function(lab) {
|
|
40905
|
-
var
|
|
40906
|
+
var l3 = lab[0];
|
|
40906
40907
|
var a2 = lab[1];
|
|
40907
40908
|
var b2 = lab[2];
|
|
40908
40909
|
var hr;
|
|
@@ -40914,10 +40915,10 @@ var require_conversions = __commonJS({
|
|
|
40914
40915
|
h2 += 360;
|
|
40915
40916
|
}
|
|
40916
40917
|
c = Math.sqrt(a2 * a2 + b2 * b2);
|
|
40917
|
-
return [
|
|
40918
|
+
return [l3, c, h2];
|
|
40918
40919
|
};
|
|
40919
40920
|
convert.lch.lab = function(lch) {
|
|
40920
|
-
var
|
|
40921
|
+
var l3 = lch[0];
|
|
40921
40922
|
var c = lch[1];
|
|
40922
40923
|
var h2 = lch[2];
|
|
40923
40924
|
var a2;
|
|
@@ -40926,7 +40927,7 @@ var require_conversions = __commonJS({
|
|
|
40926
40927
|
hr = h2 / 360 * 2 * Math.PI;
|
|
40927
40928
|
a2 = c * Math.cos(hr);
|
|
40928
40929
|
b2 = c * Math.sin(hr);
|
|
40929
|
-
return [
|
|
40930
|
+
return [l3, a2, b2];
|
|
40930
40931
|
};
|
|
40931
40932
|
convert.rgb.ansi16 = function(args) {
|
|
40932
40933
|
var r7 = args[0];
|
|
@@ -41040,16 +41041,16 @@ var require_conversions = __commonJS({
|
|
|
41040
41041
|
};
|
|
41041
41042
|
convert.hsl.hcg = function(hsl) {
|
|
41042
41043
|
var s = hsl[1] / 100;
|
|
41043
|
-
var
|
|
41044
|
+
var l3 = hsl[2] / 100;
|
|
41044
41045
|
var c = 1;
|
|
41045
41046
|
var f2 = 0;
|
|
41046
|
-
if (
|
|
41047
|
-
c = 2 * s *
|
|
41047
|
+
if (l3 < 0.5) {
|
|
41048
|
+
c = 2 * s * l3;
|
|
41048
41049
|
} else {
|
|
41049
|
-
c = 2 * s * (1 -
|
|
41050
|
+
c = 2 * s * (1 - l3);
|
|
41050
41051
|
}
|
|
41051
41052
|
if (c < 1) {
|
|
41052
|
-
f2 = (
|
|
41053
|
+
f2 = (l3 - 0.5 * c) / (1 - c);
|
|
41053
41054
|
}
|
|
41054
41055
|
return [hsl[0], c * 100, f2 * 100];
|
|
41055
41056
|
};
|
|
@@ -41126,14 +41127,14 @@ var require_conversions = __commonJS({
|
|
|
41126
41127
|
convert.hcg.hsl = function(hcg) {
|
|
41127
41128
|
var c = hcg[1] / 100;
|
|
41128
41129
|
var g2 = hcg[2] / 100;
|
|
41129
|
-
var
|
|
41130
|
+
var l3 = g2 * (1 - c) + 0.5 * c;
|
|
41130
41131
|
var s = 0;
|
|
41131
|
-
if (
|
|
41132
|
-
s = c / (2 *
|
|
41133
|
-
} else if (
|
|
41134
|
-
s = c / (2 * (1 -
|
|
41132
|
+
if (l3 > 0 && l3 < 0.5) {
|
|
41133
|
+
s = c / (2 * l3);
|
|
41134
|
+
} else if (l3 >= 0.5 && l3 < 1) {
|
|
41135
|
+
s = c / (2 * (1 - l3));
|
|
41135
41136
|
}
|
|
41136
|
-
return [hcg[0], s * 100,
|
|
41137
|
+
return [hcg[0], s * 100, l3 * 100];
|
|
41137
41138
|
};
|
|
41138
41139
|
convert.hcg.hwb = function(hcg) {
|
|
41139
41140
|
var c = hcg[1] / 100;
|
|
@@ -41223,9 +41224,9 @@ var require_route = __commonJS({
|
|
|
41223
41224
|
}
|
|
41224
41225
|
return graph;
|
|
41225
41226
|
}
|
|
41226
|
-
function link(from,
|
|
41227
|
+
function link(from, to) {
|
|
41227
41228
|
return function(args) {
|
|
41228
|
-
return
|
|
41229
|
+
return to(from(args));
|
|
41229
41230
|
};
|
|
41230
41231
|
}
|
|
41231
41232
|
function wrapConversion(toModel, graph) {
|
|
@@ -41613,8 +41614,8 @@ var require_color = __commonJS({
|
|
|
41613
41614
|
}
|
|
41614
41615
|
var color1 = mixinColor.rgb();
|
|
41615
41616
|
var color2 = this.rgb();
|
|
41616
|
-
var
|
|
41617
|
-
var w3 = 2 *
|
|
41617
|
+
var p2 = weight === void 0 ? 0.5 : weight;
|
|
41618
|
+
var w3 = 2 * p2 - 1;
|
|
41618
41619
|
var a2 = color1.alpha() - color2.alpha();
|
|
41619
41620
|
var w1 = ((w3 * a2 === -1 ? w3 : (w3 + a2) / (1 + w3 * a2)) + 1) / 2;
|
|
41620
41621
|
var w22 = 1 - w1;
|
|
@@ -41622,7 +41623,7 @@ var require_color = __commonJS({
|
|
|
41622
41623
|
w1 * color1.red() + w22 * color2.red(),
|
|
41623
41624
|
w1 * color1.green() + w22 * color2.green(),
|
|
41624
41625
|
w1 * color1.blue() + w22 * color2.blue(),
|
|
41625
|
-
color1.alpha() *
|
|
41626
|
+
color1.alpha() * p2 + color2.alpha() * (1 - p2)
|
|
41626
41627
|
);
|
|
41627
41628
|
}
|
|
41628
41629
|
};
|
|
@@ -41725,7 +41726,7 @@ var require_colorspace = __commonJS({
|
|
|
41725
41726
|
var split = namespace.split(delimiter || ":");
|
|
41726
41727
|
var base = hex(split[0]);
|
|
41727
41728
|
if (!split.length) return base;
|
|
41728
|
-
for (var i = 0,
|
|
41729
|
+
for (var i = 0, l3 = split.length - 1; i < l3; i++) {
|
|
41729
41730
|
base = color(base).mix(color(hex(split[i + 1]))).saturate(1).hex();
|
|
41730
41731
|
}
|
|
41731
41732
|
return base;
|
|
@@ -41961,9 +41962,9 @@ var require_tail_file = __commonJS({
|
|
|
41961
41962
|
stream.emit("data", data2);
|
|
41962
41963
|
}
|
|
41963
41964
|
data2 = (buff + data2).split(/\n+/);
|
|
41964
|
-
const
|
|
41965
|
+
const l3 = data2.length - 1;
|
|
41965
41966
|
let i = 0;
|
|
41966
|
-
for (; i <
|
|
41967
|
+
for (; i < l3; i++) {
|
|
41967
41968
|
if (options.start == null || row > options.start) {
|
|
41968
41969
|
if (!iter) {
|
|
41969
41970
|
stream.emit("line", data2[i]);
|
|
@@ -41973,7 +41974,7 @@ var require_tail_file = __commonJS({
|
|
|
41973
41974
|
}
|
|
41974
41975
|
row++;
|
|
41975
41976
|
}
|
|
41976
|
-
buff = data2[
|
|
41977
|
+
buff = data2[l3];
|
|
41977
41978
|
pos += bytes;
|
|
41978
41979
|
return read();
|
|
41979
41980
|
});
|
|
@@ -42188,15 +42189,15 @@ var require_file = __commonJS({
|
|
|
42188
42189
|
});
|
|
42189
42190
|
stream.on("data", (data2) => {
|
|
42190
42191
|
data2 = (buff + data2).split(/\n+/);
|
|
42191
|
-
const
|
|
42192
|
+
const l3 = data2.length - 1;
|
|
42192
42193
|
let i = 0;
|
|
42193
|
-
for (; i <
|
|
42194
|
+
for (; i < l3; i++) {
|
|
42194
42195
|
if (!options.start || row >= options.start) {
|
|
42195
42196
|
add(data2[i]);
|
|
42196
42197
|
}
|
|
42197
42198
|
row++;
|
|
42198
42199
|
}
|
|
42199
|
-
buff = data2[
|
|
42200
|
+
buff = data2[l3];
|
|
42200
42201
|
});
|
|
42201
42202
|
stream.on("close", () => {
|
|
42202
42203
|
if (buff) {
|
|
@@ -42697,16 +42698,16 @@ var require_http = __commonJS({
|
|
|
42697
42698
|
stream.destroy = () => req.destroy();
|
|
42698
42699
|
req.on("data", (data2) => {
|
|
42699
42700
|
data2 = (buff + data2).split(/\n+/);
|
|
42700
|
-
const
|
|
42701
|
+
const l3 = data2.length - 1;
|
|
42701
42702
|
let i = 0;
|
|
42702
|
-
for (; i <
|
|
42703
|
+
for (; i < l3; i++) {
|
|
42703
42704
|
try {
|
|
42704
42705
|
stream.emit("log", JSON.parse(data2[i]));
|
|
42705
42706
|
} catch (e) {
|
|
42706
42707
|
stream.emit("error", e);
|
|
42707
42708
|
}
|
|
42708
42709
|
}
|
|
42709
|
-
buff = data2[
|
|
42710
|
+
buff = data2[l3];
|
|
42710
42711
|
});
|
|
42711
42712
|
req.on("error", (err) => stream.emit("error", err));
|
|
42712
42713
|
return stream;
|
|
@@ -44466,7 +44467,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
44466
44467
|
}(global, (e, t, s, n, i) => {
|
|
44467
44468
|
return r7 = { 570: (e2, t2, s2) => {
|
|
44468
44469
|
const { CGetRequest: n2, CStoreRequest: i2 } = s2(940), { CommandFieldType: r8, PresentationContextResult: o2, SopClass: a2, StorageClass: c, TransferSyntax: d3, Uid: u2, UserIdentityType: h2 } = s2(492), m2 = s2(139), { EOL: g2 } = s2(857);
|
|
44469
|
-
class
|
|
44470
|
+
class l3 {
|
|
44470
44471
|
constructor(e3, t3, s3, n3) {
|
|
44471
44472
|
this.pcId = e3, this.abstractSyntaxUid = t3, this.transferSyntaxes = [], s3 && this.transferSyntaxes.push(s3), this.result = n3 || o2.Proposed;
|
|
44472
44473
|
}
|
|
@@ -44628,7 +44629,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
44628
44629
|
return this.presentationContexts.forEach((e4) => {
|
|
44629
44630
|
const t4 = e4.id;
|
|
44630
44631
|
t4 >= s3 && (s3 = t4 + 2);
|
|
44631
|
-
}), this.presentationContexts.push({ id: s3, context: new
|
|
44632
|
+
}), this.presentationContexts.push({ id: s3, context: new l3(s3, e3) }), s3;
|
|
44632
44633
|
}
|
|
44633
44634
|
addOrGetPresentationContext(e3) {
|
|
44634
44635
|
const t3 = this.getPresentationContexts();
|
|
@@ -44742,7 +44743,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
44742
44743
|
return `${e3}`;
|
|
44743
44744
|
}
|
|
44744
44745
|
}
|
|
44745
|
-
}, PresentationContext:
|
|
44746
|
+
}, PresentationContext: l3 };
|
|
44746
44747
|
}, 422: (e2, t2, s2) => {
|
|
44747
44748
|
const { Association: n2, PresentationContext: i2 } = s2(570), { TransferSyntax: r8, UserIdentityType: o2 } = s2(492), { Request: a2 } = s2(940), c = s2(371), d3 = s2(906), u2 = s2(547), h2 = s2(733), m2 = s2(278), g2 = s2(756);
|
|
44748
44749
|
e2.exports = class extends h2 {
|
|
@@ -44773,26 +44774,26 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
44773
44774
|
});
|
|
44774
44775
|
let h3 = {};
|
|
44775
44776
|
a3.securityOptions && (h3 = { key: a3.securityOptions.key, cert: a3.securityOptions.cert, ca: a3.securityOptions.ca, requestCert: a3.securityOptions.requestCert, rejectUnauthorized: a3.securityOptions.rejectUnauthorized, minVersion: a3.securityOptions.minVersion, maxVersion: a3.securityOptions.maxVersion, ciphers: a3.securityOptions.ciphers }), u2.info(`Connecting to ${e3}:${t3} ${a3.securityOptions ? "(TLS)" : ""}`);
|
|
44776
|
-
const
|
|
44777
|
-
|
|
44778
|
-
this.emit("connected"),
|
|
44779
|
-
}),
|
|
44780
|
-
this.emit("associationAccepted", e4),
|
|
44781
|
-
}),
|
|
44782
|
-
this.emit("associationReleased"),
|
|
44783
|
-
}),
|
|
44784
|
-
this.emit("associationRejected", e4),
|
|
44785
|
-
}),
|
|
44786
|
-
setTimeout(() =>
|
|
44787
|
-
}),
|
|
44777
|
+
const l3 = (a3.securityOptions ? g2 : m2).connect({ host: e3, port: t3, ...h3 }), p2 = new c(l3, a3);
|
|
44778
|
+
p2.on("connect", () => {
|
|
44779
|
+
this.emit("connected"), p2.sendAssociationRequest(d4);
|
|
44780
|
+
}), p2.on("associationAccepted", (e4) => {
|
|
44781
|
+
this.emit("associationAccepted", e4), p2.sendRequests(this.requests);
|
|
44782
|
+
}), p2.on("associationReleaseResponse", () => {
|
|
44783
|
+
this.emit("associationReleased"), l3.end();
|
|
44784
|
+
}), p2.on("associationRejected", (e4) => {
|
|
44785
|
+
this.emit("associationRejected", e4), l3.end();
|
|
44786
|
+
}), p2.on("done", () => {
|
|
44787
|
+
setTimeout(() => p2.sendAssociationReleaseRequest(), this.associationLingerTimeout);
|
|
44788
|
+
}), p2.on("cStoreRequest", (e4, t4) => {
|
|
44788
44789
|
this.emit("cStoreRequest", e4, t4);
|
|
44789
|
-
}),
|
|
44790
|
+
}), p2.on("nEventReportRequest", (e4, t4) => {
|
|
44790
44791
|
this.emit("nEventReportRequest", e4, t4);
|
|
44791
|
-
}),
|
|
44792
|
-
|
|
44793
|
-
}),
|
|
44794
|
-
this.statistics.addFromOtherStatistics(
|
|
44795
|
-
}), this.network =
|
|
44792
|
+
}), p2.on("networkError", (e4) => {
|
|
44793
|
+
l3.end(), this.emit("networkError", e4);
|
|
44794
|
+
}), p2.on("close", () => {
|
|
44795
|
+
this.statistics.addFromOtherStatistics(p2.getStatistics()), this.network = void 0, this.emit("closed");
|
|
44796
|
+
}), this.network = p2;
|
|
44796
44797
|
}
|
|
44797
44798
|
getStatistics() {
|
|
44798
44799
|
return this.statistics;
|
|
@@ -44887,7 +44888,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
44887
44888
|
}
|
|
44888
44889
|
}
|
|
44889
44890
|
}
|
|
44890
|
-
class
|
|
44891
|
+
class l3 extends c(g2, u2) {
|
|
44891
44892
|
constructor(e3, t3, s3, i3) {
|
|
44892
44893
|
switch (super(new a2({ CommandField: e3, CommandDataSetType: s3 ? 514 : 257 })), e3) {
|
|
44893
44894
|
case n2.NGetRequest:
|
|
@@ -44950,7 +44951,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
44950
44951
|
return `${super.toString(e3)} [id: ${this.getMessageId() || ""}]`;
|
|
44951
44952
|
}
|
|
44952
44953
|
}
|
|
44953
|
-
class
|
|
44954
|
+
class p2 extends g2 {
|
|
44954
44955
|
constructor(e3, t3, s3, i3, r9) {
|
|
44955
44956
|
switch (super(new a2({ CommandField: e3, CommandDataSetType: s3 ? 514 : 257, Status: i3, ErrorComment: r9 })), e3) {
|
|
44956
44957
|
case n2.NGetRequest:
|
|
@@ -45057,12 +45058,12 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45057
45058
|
}
|
|
45058
45059
|
}
|
|
45059
45060
|
}
|
|
45060
|
-
class R2 extends
|
|
45061
|
+
class R2 extends l3 {
|
|
45061
45062
|
constructor() {
|
|
45062
45063
|
super(n2.CEchoRequest, r8.Verification, false);
|
|
45063
45064
|
}
|
|
45064
45065
|
}
|
|
45065
|
-
class S2 extends
|
|
45066
|
+
class S2 extends p2 {
|
|
45066
45067
|
constructor(e3, t3) {
|
|
45067
45068
|
super(n2.CEchoResponse, r8.Verification, false, e3, t3);
|
|
45068
45069
|
}
|
|
@@ -45072,7 +45073,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45072
45073
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
45073
45074
|
}
|
|
45074
45075
|
}
|
|
45075
|
-
class f2 extends
|
|
45076
|
+
class f2 extends l3 {
|
|
45076
45077
|
constructor(e3) {
|
|
45077
45078
|
super(n2.CFindRequest, r8.StudyRootQueryRetrieveInformationModelFind, false), this.setPriority(e3 || i2.Medium);
|
|
45078
45079
|
}
|
|
@@ -45107,7 +45108,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45107
45108
|
return n3.setAffectedSopClassUid(r8.ModalityWorklistInformationModelFind), n3.setDataset(new a2(s3)), n3;
|
|
45108
45109
|
}
|
|
45109
45110
|
}
|
|
45110
|
-
class y2 extends
|
|
45111
|
+
class y2 extends p2 {
|
|
45111
45112
|
constructor(e3, t3) {
|
|
45112
45113
|
super(n2.CFindResponse, r8.StudyRootQueryRetrieveInformationModelFind, false, e3, t3);
|
|
45113
45114
|
}
|
|
@@ -45117,7 +45118,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45117
45118
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
45118
45119
|
}
|
|
45119
45120
|
}
|
|
45120
|
-
class I2 extends
|
|
45121
|
+
class I2 extends l3 {
|
|
45121
45122
|
constructor(e3, t3) {
|
|
45122
45123
|
if (super(n2.CStoreRequest, "", false), this.setPriority(t3 || i2.Medium), e3 instanceof a2) return this.setAffectedSopClassUid(e3.getElement("SOPClassUID")), this.setAffectedSopInstanceUid(e3.getElement("SOPInstanceUID")), void this.setDataset(e3);
|
|
45123
45124
|
if ("string" == typeof e3 || e3 instanceof String) {
|
|
@@ -45135,7 +45136,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45135
45136
|
void 0 !== this.needsFullDatasetLoading && true === this.needsFullDatasetLoading && void 0 !== this.datasetOrFile && "" !== this.datasetOrFile.trim() && this.setDataset(a2.fromFile(this.datasetOrFile));
|
|
45136
45137
|
}
|
|
45137
45138
|
}
|
|
45138
|
-
class C2 extends
|
|
45139
|
+
class C2 extends p2 {
|
|
45139
45140
|
constructor(e3, t3) {
|
|
45140
45141
|
super(n2.CStoreResponse, "", false, e3, t3);
|
|
45141
45142
|
}
|
|
@@ -45145,7 +45146,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45145
45146
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3.setAffectedSopClassUid(e3.getAffectedSopClassUid()), t3.setAffectedSopInstanceUid(e3.getAffectedSopInstanceUid()), t3;
|
|
45146
45147
|
}
|
|
45147
45148
|
}
|
|
45148
|
-
class P2 extends
|
|
45149
|
+
class P2 extends l3 {
|
|
45149
45150
|
constructor(e3) {
|
|
45150
45151
|
super(n2.CMoveRequest, r8.StudyRootQueryRetrieveInformationModelMove, false), this.setPriority(e3 || i2.Medium);
|
|
45151
45152
|
}
|
|
@@ -45168,7 +45169,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45168
45169
|
return o3.setDataset(new a2(r9)), o3.getCommandDataset().setElement("MoveDestination", e3), o3;
|
|
45169
45170
|
}
|
|
45170
45171
|
}
|
|
45171
|
-
class A extends
|
|
45172
|
+
class A extends p2 {
|
|
45172
45173
|
constructor(e3, t3) {
|
|
45173
45174
|
super(n2.CMoveResponse, r8.StudyRootQueryRetrieveInformationModelMove, false, e3, t3);
|
|
45174
45175
|
}
|
|
@@ -45190,7 +45191,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45190
45191
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
45191
45192
|
}
|
|
45192
45193
|
}
|
|
45193
|
-
class v extends
|
|
45194
|
+
class v extends l3 {
|
|
45194
45195
|
constructor(e3) {
|
|
45195
45196
|
super(n2.CGetRequest, r8.StudyRootQueryRetrieveInformationModelGet, false), this.setPriority(e3 || i2.Medium), this.addStorageSopClassesToAssociation = true;
|
|
45196
45197
|
}
|
|
@@ -45219,7 +45220,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45219
45220
|
return r9.setDataset(new a2(i3)), r9;
|
|
45220
45221
|
}
|
|
45221
45222
|
}
|
|
45222
|
-
class w3 extends
|
|
45223
|
+
class w3 extends p2 {
|
|
45223
45224
|
constructor(e3, t3) {
|
|
45224
45225
|
super(n2.CGetResponse, r8.StudyRootQueryRetrieveInformationModelGet, false, e3, t3);
|
|
45225
45226
|
}
|
|
@@ -45241,12 +45242,12 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45241
45242
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
45242
45243
|
}
|
|
45243
45244
|
}
|
|
45244
|
-
class x2 extends
|
|
45245
|
+
class x2 extends l3 {
|
|
45245
45246
|
constructor(e3, t3, s3) {
|
|
45246
45247
|
super(n2.NCreateRequest, e3, false), this.setAffectedSopInstanceUid(t3), this.setMetaSopClassUid(s3);
|
|
45247
45248
|
}
|
|
45248
45249
|
}
|
|
45249
|
-
class U2 extends
|
|
45250
|
+
class U2 extends p2 {
|
|
45250
45251
|
constructor(e3, t3, s3, i3) {
|
|
45251
45252
|
super(n2.NCreateResponse, e3, false, s3, i3), this.setAffectedSopInstanceUid(t3);
|
|
45252
45253
|
}
|
|
@@ -45256,7 +45257,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45256
45257
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
45257
45258
|
}
|
|
45258
45259
|
}
|
|
45259
|
-
class q2 extends
|
|
45260
|
+
class q2 extends l3 {
|
|
45260
45261
|
constructor(e3, t3, s3, i3) {
|
|
45261
45262
|
super(n2.NActionRequest, e3, false), this.setRequestedSopInstanceUid(t3), this.setActionTypeId(s3), this.setMetaSopClassUid(i3);
|
|
45262
45263
|
}
|
|
@@ -45267,7 +45268,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45267
45268
|
this.getCommandDataset().setElement("ActionTypeID", e3);
|
|
45268
45269
|
}
|
|
45269
45270
|
}
|
|
45270
|
-
class D2 extends
|
|
45271
|
+
class D2 extends p2 {
|
|
45271
45272
|
constructor(e3, t3, s3, i3, r9) {
|
|
45272
45273
|
super(n2.NActionResponse, e3, false, i3, r9), this.setAffectedSopInstanceUid(t3), this.setActionTypeId(s3);
|
|
45273
45274
|
}
|
|
@@ -45283,12 +45284,12 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45283
45284
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
45284
45285
|
}
|
|
45285
45286
|
}
|
|
45286
|
-
class E2 extends
|
|
45287
|
+
class E2 extends l3 {
|
|
45287
45288
|
constructor(e3, t3, s3) {
|
|
45288
45289
|
super(n2.NDeleteRequest, e3, false), this.setRequestedSopInstanceUid(t3), this.setMetaSopClassUid(s3);
|
|
45289
45290
|
}
|
|
45290
45291
|
}
|
|
45291
|
-
class T extends
|
|
45292
|
+
class T extends p2 {
|
|
45292
45293
|
constructor(e3, t3, s3, i3) {
|
|
45293
45294
|
super(n2.NDeleteResponse, e3, false, s3, i3), this.setAffectedSopInstanceUid(t3);
|
|
45294
45295
|
}
|
|
@@ -45298,7 +45299,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45298
45299
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
45299
45300
|
}
|
|
45300
45301
|
}
|
|
45301
|
-
class b2 extends
|
|
45302
|
+
class b2 extends l3 {
|
|
45302
45303
|
constructor(e3, t3, s3, i3) {
|
|
45303
45304
|
super(n2.NEventReportRequest, e3, false), this.setAffectedSopInstanceUid(t3), this.setEventTypeId(s3), this.setMetaSopClassUid(i3);
|
|
45304
45305
|
}
|
|
@@ -45309,7 +45310,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45309
45310
|
this.getCommandDataset().setElement("EventTypeID", e3);
|
|
45310
45311
|
}
|
|
45311
45312
|
}
|
|
45312
|
-
class O2 extends
|
|
45313
|
+
class O2 extends p2 {
|
|
45313
45314
|
constructor(e3, t3, s3, i3, r9) {
|
|
45314
45315
|
super(n2.NEventReportResponse, e3, false, i3, r9), this.setAffectedSopInstanceUid(t3), this.setEventTypeId(s3);
|
|
45315
45316
|
}
|
|
@@ -45325,7 +45326,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45325
45326
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
45326
45327
|
}
|
|
45327
45328
|
}
|
|
45328
|
-
class N2 extends
|
|
45329
|
+
class N2 extends l3 {
|
|
45329
45330
|
constructor(e3, t3, s3, i3) {
|
|
45330
45331
|
super(n2.NGetRequest, e3, false), this.setRequestedSopInstanceUid(t3), this.setAttributeIdentifierList(Array.isArray(s3) ? s3 : [s3]), this.setMetaSopClassUid(i3);
|
|
45331
45332
|
}
|
|
@@ -45351,7 +45352,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45351
45352
|
return "0".repeat(t3 - s3.length) + s3;
|
|
45352
45353
|
}
|
|
45353
45354
|
}
|
|
45354
|
-
class B2 extends
|
|
45355
|
+
class B2 extends p2 {
|
|
45355
45356
|
constructor(e3, t3, s3, i3) {
|
|
45356
45357
|
super(n2.NGetResponse, e3, false, s3, i3), this.setAffectedSopInstanceUid(t3);
|
|
45357
45358
|
}
|
|
@@ -45361,12 +45362,12 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45361
45362
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
45362
45363
|
}
|
|
45363
45364
|
}
|
|
45364
|
-
class M3 extends
|
|
45365
|
+
class M3 extends l3 {
|
|
45365
45366
|
constructor(e3, t3, s3) {
|
|
45366
45367
|
super(n2.NSetRequest, e3, false), this.setRequestedSopInstanceUid(t3), this.setMetaSopClassUid(s3);
|
|
45367
45368
|
}
|
|
45368
45369
|
}
|
|
45369
|
-
class L2 extends
|
|
45370
|
+
class L2 extends p2 {
|
|
45370
45371
|
constructor(e3, t3, s3, i3) {
|
|
45371
45372
|
super(n2.NSetResponse, e3, false, s3, i3), this.setAffectedSopInstanceUid(t3);
|
|
45372
45373
|
}
|
|
@@ -45376,7 +45377,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45376
45377
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
45377
45378
|
}
|
|
45378
45379
|
}
|
|
45379
|
-
class F2 extends
|
|
45380
|
+
class F2 extends l3 {
|
|
45380
45381
|
constructor(e3, t3) {
|
|
45381
45382
|
super(n2.CCancelRequest, e3, false), this.setMessageIdBeingRespondedTo(t3);
|
|
45382
45383
|
}
|
|
@@ -45391,7 +45392,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45391
45392
|
return new F2(e3.getAffectedSopClassUid(), e3.getMessageId());
|
|
45392
45393
|
}
|
|
45393
45394
|
}
|
|
45394
|
-
e2.exports = { CCancelRequest: F2, CEchoRequest: R2, CEchoResponse: S2, CFindRequest: f2, CFindResponse: y2, CGetRequest: v, CGetResponse: w3, CMoveRequest: P2, CMoveResponse: A, Command: g2, CStoreRequest: I2, CStoreResponse: C2, NActionRequest: q2, NActionResponse: D2, NCreateRequest: x2, NCreateResponse: U2, NDeleteRequest: E2, NDeleteResponse: T, NEventReportRequest: b2, NEventReportResponse: O2, NGetRequest: N2, NGetResponse: B2, NSetRequest: M3, NSetResponse: L2, Request:
|
|
45395
|
+
e2.exports = { CCancelRequest: F2, CEchoRequest: R2, CEchoResponse: S2, CFindRequest: f2, CFindResponse: y2, CGetRequest: v, CGetResponse: w3, CMoveRequest: P2, CMoveResponse: A, Command: g2, CStoreRequest: I2, CStoreResponse: C2, NActionRequest: q2, NActionResponse: D2, NCreateRequest: x2, NCreateResponse: U2, NDeleteRequest: E2, NDeleteResponse: T, NEventReportRequest: b2, NEventReportResponse: O2, NGetRequest: N2, NGetResponse: B2, NSetRequest: M3, NSetResponse: L2, Request: l3, Response: p2 };
|
|
45395
45396
|
}, 492: (e2) => {
|
|
45396
45397
|
const t2 = { AAbort: 7, AAssociateAC: 2, AAssociateRJ: 3, AAssociateRQ: 1, AReleaseRP: 6, AReleaseRQ: 5, PDataTF: 4 };
|
|
45397
45398
|
Object.freeze(t2);
|
|
@@ -45419,16 +45420,16 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45419
45420
|
Object.freeze(m2);
|
|
45420
45421
|
const g2 = { BasicTextSrStorage: "1.2.840.10008.5.1.4.1.1.88.11", BreastProjectionXRayImageStorageForPresentation: "1.2.840.10008.5.1.4.1.1.13.1.4", BreastProjectionXRayImageStorageForProcessing: "1.2.840.10008.5.1.4.1.1.13.1.5", BreastTomosynthesisImageStorage: "1.2.840.10008.5.1.4.1.1.13.1.3", ChestCadSrStorage: "1.2.840.10008.5.1.4.1.1.88.65", ComprehensiveSrStorage: "1.2.840.10008.5.1.4.1.1.88.33", ComputedRadiographyImageStorage: "1.2.840.10008.5.1.4.1.1.1", CtImageStorage: "1.2.840.10008.5.1.4.1.1.2", DigitalIntraOralXRayImageStorageForPresentation: "1.2.840.10008.5.1.4.1.1.1.3", DigitalIntraOralXRayImageStorageForProcessing: "1.2.840.10008.5.1.4.1.1.1.3.1", DigitalMammographyXRayImageStorageForPresentation: "1.2.840.10008.5.1.4.1.1.1.2", DigitalMammographyXRayImageStorageForProcessing: "1.2.840.10008.5.1.4.1.1.1.2.1", DigitalXRayImageStorageForPresentation: "1.2.840.10008.5.1.4.1.1.1.1", DigitalXRayImageStorageForProcessing: "1.2.840.10008.5.1.4.1.1.1.1.1", EncapsulatedCdaStorage: "1.2.840.10008.5.1.4.1.1.104.2", EncapsulatedPdfStorage: "1.2.840.10008.5.1.4.1.1.104.1", EnhancedCtImageStorage: "1.2.840.10008.5.1.4.1.1.2.1", EnhancedMrColorImageStorage: "1.2.840.10008.5.1.4.1.1.4.3", EnhancedMrImageStorage: "1.2.840.10008.5.1.4.1.1.4.1", EnhancedPetImageStorage: "1.2.840.10008.5.1.4.1.1.130", EnhancedSrStorage: "1.2.840.10008.5.1.4.1.1.88.22", EnhancedXaImageStorage: "1.2.840.10008.5.1.4.1.1.12.1.1", EnhancedXrfImageStorage: "1.2.840.10008.5.1.4.1.1.12.2.1", IntravascularOpticalCoherenceTomographyImageStorageForPresentation: "1.2.840.10008.5.1.4.1.1.14.1", IntravascularOpticalCoherenceTomographyImageStorageForProcessing: "1.2.840.10008.5.1.4.1.1.14.2", LegacyConvertedEnhancedCTImageStorage: "1.2.840.10008.5.1.4.1.1.2.2", LegacyConvertedEnhancedMRImageStorage: "1.2.840.10008.5.1.4.1.1.4.4", LegacyConvertedEnhancedPETImageStorage: "1.2.840.10008.5.1.4.1.1.128.1", MammographyCadSrStorage: "1.2.840.10008.5.1.4.1.1.88.50", MrImageStorage: "1.2.840.10008.5.1.4.1.1.4", MultiframeGrayscaleByteSecondaryCaptureImageStorage: "1.2.840.10008.5.1.4.1.1.7.2", MultiframeGrayscaleWordSecondaryCaptureImageStorage: "1.2.840.10008.5.1.4.1.1.7.3", MultiframeSingleBitSecondaryCaptureImageStorage: "1.2.840.10008.5.1.4.1.1.7.1", MultiframeTrueColorSecondaryCaptureImageStorage: "1.2.840.10008.5.1.4.1.1.7.4", NuclearMedicineImageStorage: "1.2.840.10008.5.1.4.1.1.20", OphthalmicOpticalCoherenceTomographyEnFaceImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.5.7", OphthalmicPhotography16BitImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.5.2", OphthalmicPhotography8BitImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.5.1", OphthalmicTomographyImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.5.4", PositronEmissionTomographyImageStorage: "1.2.840.10008.5.1.4.1.1.128", RtImageStorage: "1.2.840.10008.5.1.4.1.1.481.1", SecondaryCaptureImageStorage: "1.2.840.10008.5.1.4.1.1.7", UltrasoundImageStorage: "1.2.840.10008.5.1.4.1.1.6.1", UltrasoundMultiframeImageStorage: "1.2.840.10008.5.1.4.1.1.3.1", VideoEndoscopicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.1.1", VideoMicroscopicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.2.1", VideoPhotographicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.4.1", VlEndoscopicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.1", VlMicroscopicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.2", VlPhotographicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.4", VlSlideCoordinatesMicroscopicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.3", VlWholeSlideMicroscopyImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.6", WideFieldOphthalmicPhotography3dCoordinatesImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.5.6", WideFieldOphthalmicPhotographyStereographicProjectionImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.5.5", XRay3dAngiographicImageStorage: "1.2.840.10008.5.1.4.1.1.13.1.1", XRay3dCraniofacialImageStorage: "1.2.840.10008.5.1.4.1.1.13.1.2", XRayAngiographicImageStorage: "1.2.840.10008.5.1.4.1.1.12.1", XRayRadiationDoseSRStorage: "1.2.840.10008.5.1.4.1.1.88.67", XRayRadiofluoroscopicImageStorage: "1.2.840.10008.5.1.4.1.1.12.2" };
|
|
45421
45422
|
Object.freeze(g2);
|
|
45422
|
-
const
|
|
45423
|
-
Object.freeze(
|
|
45424
|
-
const
|
|
45425
|
-
Object.freeze(
|
|
45426
|
-
const R2 = [
|
|
45423
|
+
const l3 = { Verification: "1.2.840.10008.1.1", StudyRootQueryRetrieveInformationModelFind: "1.2.840.10008.5.1.4.1.2.2.1", ModalityWorklistInformationModelFind: "1.2.840.10008.5.1.4.31", ModalityPerformedProcedureStep: "1.2.840.10008.3.1.2.3.3", StudyRootQueryRetrieveInformationModelMove: "1.2.840.10008.5.1.4.1.2.2.2", StudyRootQueryRetrieveInformationModelGet: "1.2.840.10008.5.1.4.1.2.2.3", StorageCommitmentPushModel: "1.2.840.10008.1.20.1", BasicFilmSession: "1.2.840.10008.5.1.1.1", PrintJob: "1.2.840.10008.5.1.1.14", BasicAnnotationBox: "1.2.840.10008.5.1.1.15", Printer: "1.2.840.10008.5.1.1.16", PrinterConfigurationRetrieval: "1.2.840.10008.5.1.1.16.376", BasicGrayscalePrintManagementMeta: "1.2.840.10008.5.1.1.9", BasicColorPrintManagementMeta: "1.2.840.10008.5.1.1.18", BasicFilmBox: "1.2.840.10008.5.1.1.2", PresentationLut: "1.2.840.10008.5.1.1.23", BasicGrayscaleImageBox: "1.2.840.10008.5.1.1.4", BasicColorImageBox: "1.2.840.10008.5.1.1.4.1", InstanceAvailabilityNotification: "1.2.840.10008.5.1.4.33" };
|
|
45424
|
+
Object.freeze(l3);
|
|
45425
|
+
const p2 = { 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" };
|
|
45426
|
+
Object.freeze(p2);
|
|
45427
|
+
const R2 = [p2.ImplicitVRLittleEndian, p2.ExplicitVRLittleEndian];
|
|
45427
45428
|
Object.freeze(R2);
|
|
45428
45429
|
const S2 = { ImplementationClassUid: "1.2.826.0.1.3680043.10.854", ImplementationVersion: "DCMJS-DIMSE-V0.1", MaxPduLength: 262144 };
|
|
45429
|
-
Object.freeze(S2), e2.exports = { AbortReason: o2, AbortSource: r8, CommandFieldType: s2, DefaultImplementation: S2, PresentationContextResult: n2, Priority: u2, RawPduType: t2, RejectReason: d3, RejectResult: a2, RejectSource: c, SopClass:
|
|
45430
|
+
Object.freeze(S2), e2.exports = { AbortReason: o2, AbortSource: r8, CommandFieldType: s2, DefaultImplementation: S2, PresentationContextResult: n2, Priority: u2, RawPduType: t2, RejectReason: d3, RejectResult: a2, RejectSource: c, SopClass: l3, Status: h2, StorageClass: g2, TranscodableTransferSyntaxes: R2, TransferSyntax: p2, Uid: m2, UserIdentityType: i2 };
|
|
45430
45431
|
}, 825: (e2, t2, s2) => {
|
|
45431
|
-
const { StorageClass: n2, TransferSyntax: i2 } = s2(492), r8 = s2(139), { readFile: o2, readFileSync: a2, writeFile: c, writeFileSync: d3 } = s2(896), { EOL: u2 } = s2(857), h2 = s2(111), { DicomDict: m2, DicomMessage: g2, DicomMetaDictionary:
|
|
45432
|
+
const { StorageClass: n2, TransferSyntax: i2 } = s2(492), r8 = s2(139), { readFile: o2, readFileSync: a2, writeFile: c, writeFileSync: d3 } = s2(896), { EOL: u2 } = s2(857), h2 = s2(111), { DicomDict: m2, DicomMessage: g2, DicomMetaDictionary: l3, ReadBufferStream: p2, WriteBufferStream: R2 } = h2.data, S2 = h2.log;
|
|
45432
45433
|
class f2 {
|
|
45433
45434
|
constructor(e3, t3, s3) {
|
|
45434
45435
|
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 || {};
|
|
@@ -45449,11 +45450,11 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45449
45450
|
this.transferSyntaxUid = e3;
|
|
45450
45451
|
}
|
|
45451
45452
|
getDenaturalizedDataset(e3, t3) {
|
|
45452
|
-
const s3 = t3 ?
|
|
45453
|
+
const s3 = t3 ? l3.denaturalizeDataset(this.getElements(), { ...l3.nameMap, ...t3 }) : l3.denaturalizeDataset(this.getElements()), n3 = new R2();
|
|
45453
45454
|
return g2.write(s3, n3, this.transferSyntaxUid, e3), Buffer.from(n3.getBuffer());
|
|
45454
45455
|
}
|
|
45455
45456
|
getDenaturalizedCommandDataset() {
|
|
45456
|
-
const e3 =
|
|
45457
|
+
const e3 = l3.denaturalizeDataset(this.getElements()), t3 = new R2(), s3 = new R2();
|
|
45457
45458
|
return g2.write(e3, s3, i2.ImplicitVRLittleEndian, {}), g2.writeTagObject(t3, "00000000", "UL", s3.size, i2.ImplicitVRLittleEndian, {}), t3.concat(s3), Buffer.from(t3.getBuffer());
|
|
45458
45459
|
}
|
|
45459
45460
|
static fromFile(e3, t3, s3) {
|
|
@@ -45468,13 +45469,13 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45468
45469
|
});
|
|
45469
45470
|
}
|
|
45470
45471
|
toFile(e3, t3, s3, i3) {
|
|
45471
|
-
const o3 = { _meta: { FileMetaInformationVersion: new Uint8Array([0, 1]).buffer, MediaStorageSOPClassUID: this.getElement("SOPClassUID") || n2.SecondaryCaptureImageStorage, MediaStorageSOPInstanceUID: this.getElement("SOPInstanceUID") || f2.generateDerivedUid(), TransferSyntaxUID: this.getTransferSyntaxUid(), ImplementationClassUID: r8.getImplementationClassUid(), ImplementationVersionName: r8.getImplementationVersion() }, ...this.getElements() }, a3 =
|
|
45472
|
-
u3.dict = s3 ?
|
|
45472
|
+
const o3 = { _meta: { FileMetaInformationVersion: new Uint8Array([0, 1]).buffer, MediaStorageSOPClassUID: this.getElement("SOPClassUID") || n2.SecondaryCaptureImageStorage, MediaStorageSOPInstanceUID: this.getElement("SOPInstanceUID") || f2.generateDerivedUid(), TransferSyntaxUID: this.getTransferSyntaxUid(), ImplementationClassUID: r8.getImplementationClassUid(), ImplementationVersionName: r8.getImplementationVersion() }, ...this.getElements() }, a3 = l3.denaturalizeDataset(o3._meta), u3 = new m2(a3);
|
|
45473
|
+
u3.dict = s3 ? l3.denaturalizeDataset(o3, { ...l3.nameMap, ...s3 }) : l3.denaturalizeDataset(o3), t3 instanceof Function ? c(e3, Buffer.from(u3.write(i3)), (e4) => {
|
|
45473
45474
|
t3(e4 || void 0);
|
|
45474
45475
|
}) : d3(e3, Buffer.from(u3.write(i3)));
|
|
45475
45476
|
}
|
|
45476
45477
|
static generateDerivedUid() {
|
|
45477
|
-
return
|
|
45478
|
+
return l3.uid();
|
|
45478
45479
|
}
|
|
45479
45480
|
toString() {
|
|
45480
45481
|
const e3 = [];
|
|
@@ -45482,12 +45483,12 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45482
45483
|
}
|
|
45483
45484
|
static _fromP10Buffer(e3, t3) {
|
|
45484
45485
|
t3 = t3 || {}, t3 = { ignoreErrors: true, ...t3 };
|
|
45485
|
-
const s3 = g2.readFile(e3.buffer.slice(e3.byteOffset, e3.byteOffset + e3.byteLength), t3), n3 =
|
|
45486
|
+
const s3 = g2.readFile(e3.buffer.slice(e3.byteOffset, e3.byteOffset + e3.byteLength), t3), n3 = l3.naturalizeDataset(s3.meta).TransferSyntaxUID, i3 = l3.naturalizeDataset(s3.dict);
|
|
45486
45487
|
return new f2(i3, n3);
|
|
45487
45488
|
}
|
|
45488
45489
|
_fromElementsBuffer(e3, t3, s3) {
|
|
45489
|
-
const n3 = new
|
|
45490
|
-
return
|
|
45490
|
+
const n3 = new p2(e3.buffer.slice(e3.byteOffset, e3.byteOffset + e3.byteLength)), r9 = t3 === i2.ImplicitVRLittleEndian ? i2.ImplicitVRLittleEndian : t3 === i2.ExplicitVRBigEndian ? i2.ExplicitVRBigEndian : i2.ExplicitVRLittleEndian, o3 = g2._read(n3, r9, s3);
|
|
45491
|
+
return l3.naturalizeDataset(o3);
|
|
45491
45492
|
}
|
|
45492
45493
|
}
|
|
45493
45494
|
e2.exports = f2;
|
|
@@ -45515,7 +45516,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45515
45516
|
}
|
|
45516
45517
|
};
|
|
45517
45518
|
}, 371: (e2, t2, s2) => {
|
|
45518
|
-
const { Association: n2 } = s2(570), { AAbort: i2, AAssociateAC: r8, AAssociateRJ: o2, AAssociateRQ: a2, AReleaseRP: c, AReleaseRQ: d3, PDataTF: u2, Pdv: h2, RawPdu: m2 } = s2(942), { CommandFieldType: g2, RawPduType:
|
|
45519
|
+
const { Association: n2 } = s2(570), { AAbort: i2, AAssociateAC: r8, AAssociateRJ: o2, AAssociateRQ: a2, AReleaseRP: c, AReleaseRQ: d3, PDataTF: u2, Pdv: h2, RawPdu: m2 } = s2(942), { CommandFieldType: g2, RawPduType: l3, Status: p2, TranscodableTransferSyntaxes: R2 } = s2(492), { CCancelRequest: S2, CEchoRequest: f2, CEchoResponse: y2, CFindRequest: I2, CFindResponse: C2, CGetRequest: P2, CGetResponse: A, CMoveRequest: v, CMoveResponse: w3, Command: x2, CStoreRequest: U2, CStoreResponse: q2, NActionRequest: D2, NActionResponse: E2, NCreateRequest: T, NCreateResponse: b2, NDeleteRequest: O2, NDeleteResponse: N2, NEventReportRequest: B2, NEventReportResponse: M3, NGetRequest: L2, NGetResponse: F2, NSetRequest: k2, NSetResponse: $, Response: j2 } = s2(940), V2 = s2(825), _ = s2(139), G2 = s2(906), z2 = s2(547), { SmartBuffer: Q } = s2(766), { EOL: W2 } = s2(857), J2 = s2(733);
|
|
45519
45520
|
class X2 extends J2 {
|
|
45520
45521
|
constructor() {
|
|
45521
45522
|
super();
|
|
@@ -45529,7 +45530,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45529
45530
|
if (void 0 === this.receiving) {
|
|
45530
45531
|
if (this.minimumReceived && (e3 = Buffer.concat([this.minimumReceived, e3], this.minimumReceived.length + e3.length), this.minimumReceived = void 0), e3.length < 6) return void (this.minimumReceived = e3);
|
|
45531
45532
|
const t3 = Q.fromBuffer(e3, "ascii"), s3 = t3.readUInt8();
|
|
45532
|
-
if (s3 !==
|
|
45533
|
+
if (s3 !== l3.AAssociateRQ && s3 !== l3.AAssociateAC && s3 !== l3.AAssociateRJ && s3 !== l3.PDataTF && s3 !== l3.AReleaseRQ && s3 !== l3.AReleaseRP && s3 !== l3.AAbort) return void this.emit("error", new Error(`Unknown PDU type: ${s3}`));
|
|
45533
45534
|
t3.readUInt8();
|
|
45534
45535
|
const n3 = t3.readUInt32BE();
|
|
45535
45536
|
let i3 = e3.length - 6;
|
|
@@ -45658,29 +45659,29 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45658
45659
|
const t3 = new m2(e3);
|
|
45659
45660
|
try {
|
|
45660
45661
|
switch (t3.readPdu(), t3.getType()) {
|
|
45661
|
-
case
|
|
45662
|
+
case l3.AAssociateRQ:
|
|
45662
45663
|
this.association = new n2(), new a2(this.association).read(t3), this.logId = this.association.getCallingAeTitle(), z2.info(`${this.logId} <- Association request:${W2}${this.association.toString()}`), this.emit("associationRequested", this.association);
|
|
45663
45664
|
break;
|
|
45664
|
-
case
|
|
45665
|
+
case l3.AAssociateAC:
|
|
45665
45666
|
new r8(this.association).read(t3), this.logId = this.association.getCalledAeTitle(), z2.info(`${this.logId} <- Association accept:${W2}${this.association.toString()}`), this.emit("associationAccepted", this.association);
|
|
45666
45667
|
break;
|
|
45667
|
-
case
|
|
45668
|
+
case l3.AAssociateRJ: {
|
|
45668
45669
|
const e4 = new o2();
|
|
45669
45670
|
e4.read(t3), z2.info(`${this.logId} <- Association reject ${e4.toString()}`), this.emit("associationRejected", { result: e4.getResult(), source: e4.getSource(), reason: e4.getReason() });
|
|
45670
45671
|
break;
|
|
45671
45672
|
}
|
|
45672
|
-
case
|
|
45673
|
+
case l3.PDataTF: {
|
|
45673
45674
|
const e4 = new u2();
|
|
45674
45675
|
e4.read(t3), this._processPDataTf(e4);
|
|
45675
45676
|
break;
|
|
45676
45677
|
}
|
|
45677
|
-
case
|
|
45678
|
+
case l3.AReleaseRQ:
|
|
45678
45679
|
new d3().read(t3), z2.info(`${this.logId} <- Association release request`), this.emit("associationReleaseRequested");
|
|
45679
45680
|
break;
|
|
45680
|
-
case
|
|
45681
|
+
case l3.AReleaseRP:
|
|
45681
45682
|
new c().read(t3), z2.info(`${this.logId} <- Association release response`), this.emit("associationReleaseResponse");
|
|
45682
45683
|
break;
|
|
45683
|
-
case
|
|
45684
|
+
case l3.AAbort: {
|
|
45684
45685
|
const e4 = new i2();
|
|
45685
45686
|
e4.read(t3), z2.info(`${this.logId} <- Association abort ${e4.toString()}`), this.emit("abort", { source: e4.getSource(), reason: e4.getReason() });
|
|
45686
45687
|
break;
|
|
@@ -45788,7 +45789,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
45788
45789
|
_performDimse(e3, t3) {
|
|
45789
45790
|
if (t3 instanceof j2) {
|
|
45790
45791
|
const e4 = Object.assign(Object.create(Object.getPrototypeOf(t3)), t3), s3 = this.pending.find((e5) => e5.getMessageId() === t3.getMessageIdBeingRespondedTo());
|
|
45791
|
-
s3 && (s3.raiseResponseEvent(e4), e4.getStatus() !==
|
|
45792
|
+
s3 && (s3.raiseResponseEvent(e4), e4.getStatus() !== p2.Pending && s3.raiseDoneEvent());
|
|
45792
45793
|
} else t3.getCommandFieldType() === g2.CEchoRequest ? this.emit("cEchoRequest", t3, (t4) => {
|
|
45793
45794
|
this._sendDimse({ context: e3, command: t4 });
|
|
45794
45795
|
}) : t3.getCommandFieldType() === g2.CFindRequest ? this.emit("cFindRequest", t3, (t4) => {
|
|
@@ -46282,8 +46283,8 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
46282
46283
|
}
|
|
46283
46284
|
}, Pdv: g2, RawPdu: m2 };
|
|
46284
46285
|
}, 538: (e2, t2, s2) => {
|
|
46285
|
-
const { CEchoResponse: n2, CFindResponse: i2, CGetResponse: r8, CMoveResponse: o2, CStoreResponse: a2, NActionResponse: c, NCreateResponse: d3, NDeleteResponse: u2, NEventReportResponse: h2, NGetResponse: m2, NSetResponse: g2 } = s2(940),
|
|
46286
|
-
e2.exports = { Scp: class extends
|
|
46286
|
+
const { CEchoResponse: n2, CFindResponse: i2, CGetResponse: r8, CMoveResponse: o2, CStoreResponse: a2, NActionResponse: c, NCreateResponse: d3, NDeleteResponse: u2, NEventReportResponse: h2, NGetResponse: m2, NSetResponse: g2 } = s2(940), l3 = s2(371), p2 = s2(906), R2 = s2(547), S2 = s2(733), f2 = s2(278), y2 = s2(756);
|
|
46287
|
+
e2.exports = { Scp: class extends l3 {
|
|
46287
46288
|
constructor(e3, t3) {
|
|
46288
46289
|
super(e3, t3), this.on("associationRequested", (e4) => {
|
|
46289
46290
|
this.associationRequested(e4);
|
|
@@ -46364,7 +46365,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
46364
46365
|
}
|
|
46365
46366
|
}, Server: class extends S2 {
|
|
46366
46367
|
constructor(e3) {
|
|
46367
|
-
super(), this.scp = { class: e3 }, this.server = void 0, this.clients = [], this.statistics = new
|
|
46368
|
+
super(), this.scp = { class: e3 }, this.server = void 0, this.clients = [], this.statistics = new p2();
|
|
46368
46369
|
}
|
|
46369
46370
|
listen(e3, t3) {
|
|
46370
46371
|
let s3 = {};
|
|
@@ -46425,7 +46426,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
46425
46426
|
}
|
|
46426
46427
|
};
|
|
46427
46428
|
}, 237: (e2, t2, s2) => {
|
|
46428
|
-
const { Association: n2, PresentationContext: i2 } = s2(570), { Scp: r8, Server: o2 } = s2(538), { CCancelRequest: a2, CEchoRequest: c, CEchoResponse: d3, CFindRequest: u2, CFindResponse: h2, CGetRequest: m2, CGetResponse: g2, CMoveRequest:
|
|
46429
|
+
const { Association: n2, PresentationContext: i2 } = s2(570), { Scp: r8, Server: o2 } = s2(538), { CCancelRequest: a2, CEchoRequest: c, CEchoResponse: d3, CFindRequest: u2, CFindResponse: h2, CGetRequest: m2, CGetResponse: g2, CMoveRequest: l3, CMoveResponse: p2, CStoreRequest: R2, CStoreResponse: S2, NActionRequest: f2, NActionResponse: y2, NCreateRequest: I2, NCreateResponse: C2, NDeleteRequest: P2, NDeleteResponse: A, NEventReportRequest: v, NEventReportResponse: w3, NGetRequest: x2, NGetResponse: U2, NSetRequest: q2, NSetResponse: D2 } = s2(940), { AbortReason: E2, AbortSource: T, CommandFieldType: b2, PresentationContextResult: O2, Priority: N2, RawPduType: B2, RejectReason: M3, RejectResult: L2, RejectSource: F2, SopClass: k2, Status: $, StorageClass: j2, TransferSyntax: V2, Uid: _, UserIdentityType: G2 } = s2(492), z2 = s2(422), Q = s2(825), W2 = s2(139), J2 = s2(906), X2 = { association: { Association: n2, PresentationContext: i2 }, Client: z2, constants: { AbortReason: E2, AbortSource: T, CommandFieldType: b2, PresentationContextResult: O2, Priority: N2, RawPduType: B2, RejectReason: M3, RejectResult: L2, RejectSource: F2, SopClass: k2, Status: $, StorageClass: j2, TransferSyntax: V2, Uid: _, UserIdentityType: G2 }, Dataset: Q, Implementation: W2, log: s2(547), requests: { CCancelRequest: a2, CEchoRequest: c, CFindRequest: u2, CGetRequest: m2, CMoveRequest: l3, CStoreRequest: R2, NActionRequest: f2, NCreateRequest: I2, NDeleteRequest: P2, NEventReportRequest: v, NGetRequest: x2, NSetRequest: q2 }, responses: { CEchoResponse: d3, CFindResponse: h2, CGetResponse: g2, CMoveResponse: p2, CStoreResponse: S2, NActionResponse: y2, NCreateResponse: C2, NDeleteResponse: A, NEventReportResponse: w3, NGetResponse: U2, NSetResponse: D2 }, Scp: r8, Server: o2, Statistics: J2, version: s2(837) };
|
|
46429
46430
|
e2.exports = X2;
|
|
46430
46431
|
}, 547: (e2, t2, s2) => {
|
|
46431
46432
|
const { createLogger: n2, format: i2, transports: r8 } = s2(688), { combine: o2, printf: a2, timestamp: c } = i2, d3 = n2({ format: o2(c(), a2(({ level: e3, message: t3, timestamp: s3 }) => `${s3} -- ${e3.toUpperCase()} -- ${t3}`)), transports: [new r8.Console()] });
|
|
@@ -46578,17 +46579,17 @@ var Yt = "not-modified";
|
|
|
46578
46579
|
var Zt = "not-found";
|
|
46579
46580
|
var er = "unauthorized";
|
|
46580
46581
|
var Ze = "accepted";
|
|
46581
|
-
var
|
|
46582
|
+
var on = { resourceType: "OperationOutcome", id: Zt, issue: [{ severity: "error", code: "not-found", details: { text: "Not found" } }] };
|
|
46582
46583
|
var Ee = { resourceType: "OperationOutcome", id: er, issue: [{ severity: "error", code: "login", details: { text: "Unauthorized" } }] };
|
|
46583
|
-
var
|
|
46584
|
+
var sn = { ...Ee, issue: [...Ee.issue, { severity: "error", code: "expired", details: { text: "Token expired" } }] };
|
|
46584
46585
|
var tr = { ...Ee, issue: [...Ee.issue, { severity: "error", code: "invalid", details: { text: "Token not issued for this audience" } }] };
|
|
46585
|
-
function
|
|
46586
|
+
function E(r7, e) {
|
|
46586
46587
|
return { resourceType: "OperationOutcome", issue: [{ severity: "error", code: "invalid", details: { text: r7 }, ...e ? { expression: [e] } : void 0 }] };
|
|
46587
46588
|
}
|
|
46588
46589
|
function h(r7) {
|
|
46589
46590
|
return { resourceType: "OperationOutcome", issue: [{ severity: "error", code: "structure", details: { text: r7 } }] };
|
|
46590
46591
|
}
|
|
46591
|
-
function
|
|
46592
|
+
function an(r7) {
|
|
46592
46593
|
return { resourceType: "OperationOutcome", issue: [{ severity: "error", code: "exception", details: { text: "Internal server error" }, diagnostics: r7.toString() }] };
|
|
46593
46594
|
}
|
|
46594
46595
|
function be(r7) {
|
|
@@ -46599,43 +46600,43 @@ function rr(r7) {
|
|
|
46599
46600
|
}
|
|
46600
46601
|
var d = class extends Error {
|
|
46601
46602
|
constructor(e, t) {
|
|
46602
|
-
super(
|
|
46603
|
+
super(cn(e)), this.outcome = e, this.cause = t;
|
|
46603
46604
|
}
|
|
46604
46605
|
};
|
|
46605
46606
|
function Xe(r7) {
|
|
46606
|
-
return r7 instanceof d ? r7.outcome : be(r7) ? r7 :
|
|
46607
|
+
return r7 instanceof d ? r7.outcome : be(r7) ? r7 : E(Ne(r7));
|
|
46607
46608
|
}
|
|
46608
46609
|
function Ne(r7) {
|
|
46609
|
-
return r7 ? typeof r7 == "string" ? r7 : r7 instanceof Error ? r7.message : be(r7) ?
|
|
46610
|
+
return r7 ? typeof r7 == "string" ? r7 : r7 instanceof Error ? r7.message : be(r7) ? cn(r7) : typeof r7 == "object" && "code" in r7 && typeof r7.code == "string" ? r7.code : JSON.stringify(r7) : "Unknown error";
|
|
46610
46611
|
}
|
|
46611
|
-
function
|
|
46612
|
-
let e = r7.issue?.map(
|
|
46612
|
+
function cn(r7) {
|
|
46613
|
+
let e = r7.issue?.map(Ji) ?? [];
|
|
46613
46614
|
return e.length > 0 ? e.join("; ") : "Unknown error";
|
|
46614
46615
|
}
|
|
46615
|
-
function
|
|
46616
|
+
function Ji(r7) {
|
|
46616
46617
|
let e;
|
|
46617
46618
|
return r7.details?.text ? r7.diagnostics ? e = `${r7.details.text} (${r7.diagnostics})` : e = r7.details.text : r7.diagnostics ? e = r7.diagnostics : e = "Unknown error", r7.expression?.length && (e += ` (${r7.expression.join(", ")})`), e;
|
|
46618
46619
|
}
|
|
46619
|
-
function
|
|
46620
|
+
function Zi(r7, e) {
|
|
46620
46621
|
let t = e.max && e.max === Number.MAX_SAFE_INTEGER ? Number.POSITIVE_INFINITY : e.max;
|
|
46621
46622
|
return { path: r7, description: "", type: e.type ?? [], min: e.min ?? 0, max: t ?? 1, isArray: !!t && t > 1, constraints: [] };
|
|
46622
46623
|
}
|
|
46623
|
-
function
|
|
46624
|
+
function pn(r7) {
|
|
46624
46625
|
let e = /* @__PURE__ */ Object.create(null);
|
|
46625
|
-
for (let [t, n] of Object.entries(r7)) e[t] = { name: t, type: t, path: t, elements: Object.fromEntries(Object.entries(n.elements).map(([i, o]) => [i,
|
|
46626
|
+
for (let [t, n] of Object.entries(r7)) e[t] = { name: t, type: t, path: t, elements: Object.fromEntries(Object.entries(n.elements).map(([i, o]) => [i, Zi(i, o)])), constraints: [], innerTypes: [] };
|
|
46626
46627
|
return e;
|
|
46627
46628
|
}
|
|
46628
|
-
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" }] } } }, 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"] }] } } }, 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" }] } } }, 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" }] } } }, 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" }] } } }, 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" }] } } } };
|
|
46629
|
+
var dn = { 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" }] } } }, 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"] }] } } }, 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" }] } } }, 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" }] } } }, 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" }] } } }, 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" }] } } } };
|
|
46629
46630
|
function sr(r7) {
|
|
46630
46631
|
return new ir(r7).parse();
|
|
46631
46632
|
}
|
|
46632
|
-
var ce =
|
|
46633
|
+
var ce = pn(dn);
|
|
46633
46634
|
var ar = /* @__PURE__ */ Object.create(null);
|
|
46634
|
-
var
|
|
46635
|
-
var
|
|
46636
|
-
function
|
|
46635
|
+
var fn = /* @__PURE__ */ Object.create(null);
|
|
46636
|
+
var eo = { "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" };
|
|
46637
|
+
function gn(r7) {
|
|
46637
46638
|
let e;
|
|
46638
|
-
return e =
|
|
46639
|
+
return e = fn[r7], e || (e = fn[r7] = /* @__PURE__ */ Object.create(null)), e;
|
|
46639
46640
|
}
|
|
46640
46641
|
function cr(r7) {
|
|
46641
46642
|
let e = Array.isArray(r7) ? r7 : r7.entry?.map((t) => t.resource) ?? [];
|
|
@@ -46644,28 +46645,28 @@ function cr(r7) {
|
|
|
46644
46645
|
function ur(r7) {
|
|
46645
46646
|
if (!r7?.name) throw new Error("Failed loading StructureDefinition from bundle");
|
|
46646
46647
|
if (r7.resourceType !== "StructureDefinition") return;
|
|
46647
|
-
let e = sr(r7), t =
|
|
46648
|
-
t ? (n = ce, i = t) : r7.url === `http://hl7.org/fhir/StructureDefinition/${r7.type}` || r7.url === `https://medplum.com/fhir/StructureDefinition/${r7.type}` || r7.type?.startsWith("http://") || r7.type?.startsWith("https://") ? (n = ce, i = r7.type) : (n =
|
|
46648
|
+
let e = sr(r7), t = eo[r7.url], n, i;
|
|
46649
|
+
t ? (n = ce, i = t) : r7.url === `http://hl7.org/fhir/StructureDefinition/${r7.type}` || r7.url === `https://medplum.com/fhir/StructureDefinition/${r7.type}` || r7.type?.startsWith("http://") || r7.type?.startsWith("https://") ? (n = ce, i = r7.type) : (n = gn(r7.url), i = r7.type), n[i] = e;
|
|
46649
46650
|
for (let o of e.innerTypes) o.parentType = e, n[o.name] = o;
|
|
46650
46651
|
ar[r7.url] = e;
|
|
46651
46652
|
}
|
|
46652
|
-
function
|
|
46653
|
+
function xn(r7) {
|
|
46653
46654
|
return !!ce[r7];
|
|
46654
46655
|
}
|
|
46655
46656
|
function Le(r7, e) {
|
|
46656
46657
|
if (e) {
|
|
46657
|
-
let t =
|
|
46658
|
+
let t = gn(e)[r7];
|
|
46658
46659
|
if (t) return t;
|
|
46659
46660
|
}
|
|
46660
46661
|
return ce[r7];
|
|
46661
46662
|
}
|
|
46662
|
-
function
|
|
46663
|
+
function Sn(r7) {
|
|
46663
46664
|
return !!ar[r7];
|
|
46664
46665
|
}
|
|
46665
46666
|
var ir = class {
|
|
46666
46667
|
constructor(e) {
|
|
46667
46668
|
if (!e.snapshot?.element || e.snapshot.element.length === 0) throw new Error(`No snapshot defined for StructureDefinition '${e.name}'`);
|
|
46668
|
-
this.root = e.snapshot.element[0], this.elements = e.snapshot.element.slice(1), this.elementIndex = /* @__PURE__ */ Object.create(null), this.index = 0, this.resourceSchema = { name: e.name, path: this.root.path, title: e.title, type: e.type, url: e.url, kind: e.kind, description:
|
|
46669
|
+
this.root = e.snapshot.element[0], this.elements = e.snapshot.element.slice(1), this.elementIndex = /* @__PURE__ */ Object.create(null), this.index = 0, this.resourceSchema = { name: e.name, path: this.root.path, title: e.title, type: e.type, url: e.url, kind: e.kind, description: io(e), elements: {}, constraints: this.parseElementDefinition(this.root).constraints, innerTypes: [], summaryProperties: /* @__PURE__ */ new Set(), mandatoryProperties: /* @__PURE__ */ new Set() }, this.innerTypes = [];
|
|
46669
46670
|
}
|
|
46670
46671
|
parse() {
|
|
46671
46672
|
let e = this.next();
|
|
@@ -46706,7 +46707,7 @@ var ir = class {
|
|
|
46706
46707
|
this.backboneContext = { type: { name: t, type: t, path: e.path, title: e.label, description: e.definition, elements: {}, constraints: this.parseElementDefinition(e).constraints, innerTypes: [] }, path: e.path, parent: Re(this.backboneContext?.path, e.path) ? this.backboneContext : this.backboneContext?.parent };
|
|
46707
46708
|
}
|
|
46708
46709
|
enterSlice(e, t) {
|
|
46709
|
-
|
|
46710
|
+
no(e) && !this.peek()?.sliceName || (t.slicing = { discriminator: (e.slicing?.discriminator ?? []).map((n) => {
|
|
46710
46711
|
if (n.type !== "value" && n.type !== "pattern" && n.type !== "type") throw new Error(`Unsupported slicing discriminator type: ${n.type}`);
|
|
46711
46712
|
return { path: n.path, type: n.type };
|
|
46712
46713
|
}), slices: [], ordered: e.slicing?.ordered ?? false, rule: e.slicing?.rules }, this.slicingContext = { field: t.slicing, path: e.path ?? "" });
|
|
@@ -46746,39 +46747,39 @@ var ir = class {
|
|
|
46746
46747
|
});
|
|
46747
46748
|
}
|
|
46748
46749
|
parseElementDefinition(e) {
|
|
46749
|
-
let t =
|
|
46750
|
-
return { description: e.definition || "", path: e.path || e.base?.path || "", min: e.min ?? 0, max: t, isArray: n > 1, constraints: (e.constraint ?? []).map((o) => ({ key: o.key ?? "", severity: o.severity ?? "error", expression: o.expression ?? "", description: o.human ?? "" })), type: this.parseElementDefinitionType(e), fixed:
|
|
46750
|
+
let t = hn(e.max), n = e.base?.max ? hn(e.base.max) : t, i = { type: "ElementDefinition", value: e };
|
|
46751
|
+
return { description: e.definition || "", path: e.path || e.base?.path || "", min: e.min ?? 0, max: t, isArray: n > 1, constraints: (e.constraint ?? []).map((o) => ({ key: o.key ?? "", severity: o.severity ?? "error", expression: o.expression ?? "", description: o.human ?? "" })), type: this.parseElementDefinitionType(e), fixed: yn(P(i, "fixed[x]")), pattern: yn(P(i, "pattern[x]")), binding: e.binding };
|
|
46751
46752
|
}
|
|
46752
46753
|
};
|
|
46753
|
-
function
|
|
46754
|
+
function hn(r7) {
|
|
46754
46755
|
return r7 === "*" ? Number.POSITIVE_INFINITY : Number.parseInt(r7, 10);
|
|
46755
46756
|
}
|
|
46756
46757
|
function nr(r7, e = "") {
|
|
46757
|
-
return
|
|
46758
|
+
return ro(r7.path, e);
|
|
46758
46759
|
}
|
|
46759
|
-
function
|
|
46760
|
+
function ro(r7, e) {
|
|
46760
46761
|
return r7 ? e && r7.startsWith(e) ? r7.substring(e.length + 1) : r7 : "";
|
|
46761
46762
|
}
|
|
46762
46763
|
function Re(r7, e) {
|
|
46763
46764
|
return !r7 || !e ? false : e.startsWith(r7 + ".") || e === r7;
|
|
46764
46765
|
}
|
|
46765
|
-
function
|
|
46766
|
-
return Array.isArray(r7) && r7.length > 0 ? r7[0] :
|
|
46766
|
+
function yn(r7) {
|
|
46767
|
+
return Array.isArray(r7) && r7.length > 0 ? r7[0] : S(r7) ? void 0 : r7;
|
|
46767
46768
|
}
|
|
46768
|
-
function
|
|
46769
|
+
function no(r7) {
|
|
46769
46770
|
let e = r7.slicing?.discriminator;
|
|
46770
46771
|
return !!(r7.type?.some((t) => t.code === "Extension") && e?.length === 1 && e[0].type === "value" && e[0].path === "url");
|
|
46771
46772
|
}
|
|
46772
|
-
function
|
|
46773
|
+
function io(r7) {
|
|
46773
46774
|
let e = r7.description;
|
|
46774
46775
|
return e?.startsWith(`Base StructureDefinition for ${r7.name} Type: `) && (e = e.substring(`Base StructureDefinition for ${r7.name} Type: `.length)), e;
|
|
46775
46776
|
}
|
|
46776
46777
|
var nt = { base64Binary: /^([A-Za-z\d+/]{4})*([A-Za-z\d+/]{2}==|[A-Za-z\d+/]{3}=)?$/, canonical: /^\S*$/, code: /^[^\s]+( [^\s]+)*$/, date: /^(\d(\d(\d[1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2]\d|3[0-1]))?)?$/, dateTime: /^(\d(\d(\d[1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2]\d|3[0-1])(T([01]\d|2[0-3])(:[0-5]\d:([0-5]\d|60)(\.\d{1,9})?)?)?)?(Z|[+-]((0\d|1[0-3]):[0-5]\d|14:00)?)?)?$/, id: /^[A-Za-z0-9\-.]{1,64}$/, instant: /^(\d(\d(\d[1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T([01]\d|2[0-3]):[0-5]\d:([0-5]\d|60)(\.\d{1,9})?(Z|[+-]((0\d|1[0-3]):[0-5]\d|14:00))$/, markdown: /^[\s\S]+$/, oid: /^urn:oid:[0-2](\.(0|[1-9]\d*))+$/, string: /^[\s\S]+$/, time: /^([01]\d|2[0-3]):[0-5]\d:([0-5]\d|60)(\.\d{1,9})?$/, uri: /^\S*$/, url: /^\S*$/, uuid: /^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/, xhtml: /.*/ };
|
|
46777
46778
|
function f(r7) {
|
|
46778
|
-
return [{ type:
|
|
46779
|
+
return [{ type: l.boolean, value: r7 }];
|
|
46779
46780
|
}
|
|
46780
46781
|
function g(r7) {
|
|
46781
|
-
return r7 == null ? { type: "undefined", value: void 0 } : Number.isSafeInteger(r7) ? { type:
|
|
46782
|
+
return r7 == null ? { type: "undefined", value: void 0 } : Number.isSafeInteger(r7) ? { type: l.integer, value: r7 } : typeof r7 == "number" ? { type: l.decimal, value: r7 } : typeof r7 == "boolean" ? { type: l.boolean, value: r7 } : typeof r7 == "string" ? { type: l.string, value: r7 } : k(r7) ? { type: l.Quantity, value: r7 } : I(r7) ? { type: r7.resourceType, value: r7 } : Tr(r7) ? { type: l.CodeableConcept, value: r7 } : xr(r7) ? { type: l.Coding, value: r7 } : { type: l.BackboneElement, value: r7 };
|
|
46782
46783
|
}
|
|
46783
46784
|
function N(r7) {
|
|
46784
46785
|
return r7.length === 0 ? false : !!r7[0].value;
|
|
@@ -46792,41 +46793,47 @@ function j(r7, e) {
|
|
|
46792
46793
|
function P(r7, e, t) {
|
|
46793
46794
|
if (!r7.value) return;
|
|
46794
46795
|
let n = st(r7.type, e, t?.profileUrl);
|
|
46795
|
-
return n ?
|
|
46796
|
+
return n ? yo(r7, e, n) : go(r7, e);
|
|
46796
46797
|
}
|
|
46797
|
-
function
|
|
46798
|
+
function yo(r7, e, t) {
|
|
46798
46799
|
let n = r7.value, i = t.type;
|
|
46799
46800
|
if (!i || i.length === 0) return;
|
|
46800
46801
|
let o, s = "undefined", a2, c = t.path.lastIndexOf("."), u2 = t.path.substring(c + 1);
|
|
46801
|
-
for (let
|
|
46802
|
-
let m2 = u2.replace("[x]", w(
|
|
46802
|
+
for (let p2 of i) {
|
|
46803
|
+
let m2 = u2.replace("[x]", w(p2.code));
|
|
46803
46804
|
if (o = n[m2], a2 = n["_" + m2], o !== void 0 || a2 !== void 0) {
|
|
46804
|
-
s =
|
|
46805
|
+
s = p2.code;
|
|
46805
46806
|
break;
|
|
46806
46807
|
}
|
|
46807
46808
|
}
|
|
46808
46809
|
if (a2) if (Array.isArray(o)) {
|
|
46809
46810
|
o = o.slice();
|
|
46810
|
-
for (let
|
|
46811
|
-
} else o =
|
|
46812
|
-
if (!
|
|
46811
|
+
for (let p2 = 0; p2 < Math.max(o.length, a2.length); p2++) o[p2] = An(o[p2], a2[p2]);
|
|
46812
|
+
} else o = An(o, a2);
|
|
46813
|
+
if (!S(o)) return (s === "Element" || s === "BackboneElement") && (s = t.type[0].code), Array.isArray(o) ? o.map((p2) => Rn(p2, s)) : Rn(o, s);
|
|
46813
46814
|
}
|
|
46814
|
-
function
|
|
46815
|
+
function Rn(r7, e) {
|
|
46815
46816
|
return e === "Resource" && I(r7) && (e = r7.resourceType), { type: e, value: r7 };
|
|
46816
46817
|
}
|
|
46817
|
-
function
|
|
46818
|
+
function go(r7, e) {
|
|
46818
46819
|
let t = r7.value;
|
|
46819
46820
|
if (!t || typeof t != "object") return;
|
|
46820
46821
|
let n;
|
|
46821
|
-
if (e in t)
|
|
46822
|
-
|
|
46822
|
+
if (e in t) {
|
|
46823
|
+
let i = t[e];
|
|
46824
|
+
Array.isArray(i) ? n = i.map(g) : n = g(i);
|
|
46825
|
+
} else for (let i in l) {
|
|
46823
46826
|
let o = e + w(i);
|
|
46824
46827
|
if (o in t) {
|
|
46825
|
-
|
|
46828
|
+
let s = t[o];
|
|
46829
|
+
Array.isArray(s) ? n = s.map((a2) => ({ type: i, value: a2 })) : n = { type: i, value: s };
|
|
46826
46830
|
break;
|
|
46827
46831
|
}
|
|
46828
46832
|
}
|
|
46829
|
-
if (
|
|
46833
|
+
if (Array.isArray(n)) {
|
|
46834
|
+
if (n.length === 0 || S(n[0])) return;
|
|
46835
|
+
} else if (S(n)) return;
|
|
46836
|
+
return n;
|
|
46830
46837
|
}
|
|
46831
46838
|
function it(r7) {
|
|
46832
46839
|
let e = [];
|
|
@@ -46840,27 +46847,27 @@ function it(r7) {
|
|
|
46840
46847
|
}
|
|
46841
46848
|
return e;
|
|
46842
46849
|
}
|
|
46843
|
-
function
|
|
46850
|
+
function On(r7) {
|
|
46844
46851
|
return f(!N(r7));
|
|
46845
46852
|
}
|
|
46846
|
-
function
|
|
46853
|
+
function In(r7, e) {
|
|
46847
46854
|
return r7.length === 0 || e.length === 0 ? [] : r7.length !== e.length ? f(false) : f(r7.every((t, n) => N(yr(t, e[n]))));
|
|
46848
46855
|
}
|
|
46849
|
-
function
|
|
46856
|
+
function kn(r7, e) {
|
|
46850
46857
|
return r7.length === 0 || e.length === 0 ? [] : r7.length !== e.length ? f(true) : f(r7.some((t, n) => !N(yr(t, e[n]))));
|
|
46851
46858
|
}
|
|
46852
46859
|
function yr(r7, e) {
|
|
46853
46860
|
let t = r7.value?.valueOf(), n = e.value?.valueOf();
|
|
46854
|
-
return typeof t == "number" && typeof n == "number" ? f(Math.abs(t - n) < 1e-8) : k(t) && k(n) ? f(
|
|
46861
|
+
return typeof t == "number" && typeof n == "number" ? f(Math.abs(t - n) < 1e-8) : k(t) && k(n) ? f(Mn(t, n)) : f(typeof t == "object" && typeof n == "object" ? vr(r7, e) : t === n);
|
|
46855
46862
|
}
|
|
46856
46863
|
function gr(r7, e) {
|
|
46857
|
-
return r7.length === 0 && e.length === 0 ? f(true) : r7.length !== e.length ? f(false) : (r7.sort(
|
|
46864
|
+
return r7.length === 0 && e.length === 0 ? f(true) : r7.length !== e.length ? f(false) : (r7.sort(Cn), e.sort(Cn), f(r7.every((t, n) => N(vo(t, e[n])))));
|
|
46858
46865
|
}
|
|
46859
|
-
function
|
|
46866
|
+
function vo(r7, e) {
|
|
46860
46867
|
let { type: t, value: n } = r7, { type: i, value: o } = e, s = n?.valueOf(), a2 = o?.valueOf();
|
|
46861
|
-
return typeof s == "number" && typeof a2 == "number" ? f(Math.abs(s - a2) < 0.01) : k(s) && k(a2) ? f(
|
|
46868
|
+
return typeof s == "number" && typeof a2 == "number" ? f(Math.abs(s - a2) < 0.01) : k(s) && k(a2) ? f(Mn(s, a2)) : f(t === "Coding" && i === "Coding" ? typeof s != "object" || typeof a2 != "object" ? false : s.code === a2.code && s.system === a2.system : typeof s == "object" && typeof a2 == "object" ? vr({ ...s, id: void 0 }, { ...a2, id: void 0 }) : typeof s == "string" && typeof a2 == "string" ? s.toLowerCase() === a2.toLowerCase() : s === a2);
|
|
46862
46869
|
}
|
|
46863
|
-
function
|
|
46870
|
+
function Cn(r7, e) {
|
|
46864
46871
|
let t = r7.value?.valueOf(), n = e.value?.valueOf();
|
|
46865
46872
|
return typeof t == "number" && typeof n == "number" ? t - n : typeof t == "string" && typeof n == "string" ? t.localeCompare(n) : 0;
|
|
46866
46873
|
}
|
|
@@ -46874,32 +46881,32 @@ function ot(r7, e) {
|
|
|
46874
46881
|
case "Integer":
|
|
46875
46882
|
return typeof t == "number";
|
|
46876
46883
|
case "Date":
|
|
46877
|
-
return
|
|
46884
|
+
return Vn(t);
|
|
46878
46885
|
case "DateTime":
|
|
46879
46886
|
return Pe(t);
|
|
46880
46887
|
case "Time":
|
|
46881
46888
|
return typeof t == "string" && !!/^T\d/.exec(t);
|
|
46882
46889
|
case "Period":
|
|
46883
|
-
return
|
|
46890
|
+
return Dn(t);
|
|
46884
46891
|
case "Quantity":
|
|
46885
46892
|
return k(t);
|
|
46886
46893
|
default:
|
|
46887
46894
|
return typeof t == "object" && t?.resourceType === e;
|
|
46888
46895
|
}
|
|
46889
46896
|
}
|
|
46890
|
-
function
|
|
46897
|
+
function Vn(r7) {
|
|
46891
46898
|
return typeof r7 == "string" && !!nt.date.exec(r7);
|
|
46892
46899
|
}
|
|
46893
46900
|
function Pe(r7) {
|
|
46894
46901
|
return typeof r7 == "string" && !!nt.dateTime.exec(r7);
|
|
46895
46902
|
}
|
|
46896
|
-
function
|
|
46903
|
+
function Dn(r7) {
|
|
46897
46904
|
return !!(r7 && typeof r7 == "object" && ("start" in r7 && Pe(r7.start) || "end" in r7 && Pe(r7.end)));
|
|
46898
46905
|
}
|
|
46899
46906
|
function k(r7) {
|
|
46900
46907
|
return !!(r7 && typeof r7 == "object" && "value" in r7 && typeof r7.value == "number");
|
|
46901
46908
|
}
|
|
46902
|
-
function
|
|
46909
|
+
function Mn(r7, e) {
|
|
46903
46910
|
return Math.abs(r7.value - e.value) < 0.01 && (r7.unit === e.unit || r7.code === e.code || r7.unit === e.code || r7.code === e.unit);
|
|
46904
46911
|
}
|
|
46905
46912
|
function vr(r7, e) {
|
|
@@ -46907,27 +46914,27 @@ function vr(r7, e) {
|
|
|
46907
46914
|
if (t.length !== n.length) return false;
|
|
46908
46915
|
for (let i of t) {
|
|
46909
46916
|
let o = r7[i], s = e[i];
|
|
46910
|
-
if (
|
|
46917
|
+
if (wn(o) && wn(s)) {
|
|
46911
46918
|
if (!vr(o, s)) return false;
|
|
46912
46919
|
} else if (o !== s) return false;
|
|
46913
46920
|
}
|
|
46914
46921
|
return true;
|
|
46915
46922
|
}
|
|
46916
|
-
function
|
|
46923
|
+
function wn(r7) {
|
|
46917
46924
|
return r7 !== null && typeof r7 == "object";
|
|
46918
46925
|
}
|
|
46919
|
-
function
|
|
46926
|
+
function An(r7, e) {
|
|
46920
46927
|
if (e) {
|
|
46921
46928
|
if (typeof e != "object") throw new Error("Primitive extension must be an object");
|
|
46922
|
-
return
|
|
46929
|
+
return xo(r7 ?? {}, e);
|
|
46923
46930
|
}
|
|
46924
46931
|
return r7;
|
|
46925
46932
|
}
|
|
46926
|
-
function
|
|
46933
|
+
function xo(r7, e) {
|
|
46927
46934
|
return delete e.__proto__, delete e.constructor, Object.assign(r7, e);
|
|
46928
46935
|
}
|
|
46929
46936
|
function te(r7) {
|
|
46930
|
-
let e = le(r7), t =
|
|
46937
|
+
let e = le(r7), t = So(r7);
|
|
46931
46938
|
return t === e ? { reference: e } : { reference: e, display: t };
|
|
46932
46939
|
}
|
|
46933
46940
|
function le(r7) {
|
|
@@ -46936,16 +46943,16 @@ function le(r7) {
|
|
|
46936
46943
|
function pe(r7) {
|
|
46937
46944
|
if (r7) return ue(r7) ? r7.reference.split("/")[1] : r7.id;
|
|
46938
46945
|
}
|
|
46939
|
-
function
|
|
46946
|
+
function To(r7) {
|
|
46940
46947
|
return r7.resourceType === "Patient" || r7.resourceType === "Practitioner" || r7.resourceType === "RelatedPerson";
|
|
46941
46948
|
}
|
|
46942
|
-
function
|
|
46943
|
-
if (
|
|
46944
|
-
let e =
|
|
46949
|
+
function So(r7) {
|
|
46950
|
+
if (To(r7)) {
|
|
46951
|
+
let e = Eo(r7);
|
|
46945
46952
|
if (e) return e;
|
|
46946
46953
|
}
|
|
46947
46954
|
if (r7.resourceType === "Device") {
|
|
46948
|
-
let e =
|
|
46955
|
+
let e = bo(r7);
|
|
46949
46956
|
if (e) return e;
|
|
46950
46957
|
}
|
|
46951
46958
|
if (r7.resourceType === "MedicationRequest" && r7.medicationCodeableConcept) return at(r7.medicationCodeableConcept);
|
|
@@ -46954,16 +46961,16 @@ function xo(r7) {
|
|
|
46954
46961
|
if ("name" in r7 && r7.name && typeof r7.name == "string") return r7.name;
|
|
46955
46962
|
if ("code" in r7 && r7.code) {
|
|
46956
46963
|
let e = r7.code;
|
|
46957
|
-
if (Array.isArray(e) && (e = e[0]),
|
|
46964
|
+
if (Array.isArray(e) && (e = e[0]), Tr(e)) return at(e);
|
|
46958
46965
|
if (Vo(e)) return e.text;
|
|
46959
46966
|
}
|
|
46960
46967
|
return le(r7);
|
|
46961
46968
|
}
|
|
46962
|
-
function
|
|
46969
|
+
function Eo(r7) {
|
|
46963
46970
|
let e = r7.name;
|
|
46964
46971
|
if (e && e.length > 0) return lt(e[0]);
|
|
46965
46972
|
}
|
|
46966
|
-
function
|
|
46973
|
+
function bo(r7) {
|
|
46967
46974
|
let e = r7.deviceName;
|
|
46968
46975
|
if (e && e.length > 0) return e[0].name;
|
|
46969
46976
|
}
|
|
@@ -46972,28 +46979,28 @@ function ct(r7, e) {
|
|
|
46972
46979
|
t.setUTCHours(0, 0, 0, 0);
|
|
46973
46980
|
let n = e ? new Date(e) : /* @__PURE__ */ new Date();
|
|
46974
46981
|
n.setUTCHours(0, 0, 0, 0);
|
|
46975
|
-
let i = t.getUTCFullYear(), o = t.getUTCMonth(), s = t.getUTCDate(), a2 = n.getUTCFullYear(), c = n.getUTCMonth(), u2 = n.getUTCDate(),
|
|
46976
|
-
(c < o || c === o && u2 < s) &&
|
|
46982
|
+
let i = t.getUTCFullYear(), o = t.getUTCMonth(), s = t.getUTCDate(), a2 = n.getUTCFullYear(), c = n.getUTCMonth(), u2 = n.getUTCDate(), p2 = a2 - i;
|
|
46983
|
+
(c < o || c === o && u2 < s) && p2--;
|
|
46977
46984
|
let m2 = a2 * 12 + c - (i * 12 + o);
|
|
46978
46985
|
u2 < s && m2--;
|
|
46979
46986
|
let v = Math.floor((n.getTime() - t.getTime()) / (1e3 * 60 * 60 * 24));
|
|
46980
|
-
return { years:
|
|
46987
|
+
return { years: p2, months: m2, days: v };
|
|
46981
46988
|
}
|
|
46982
46989
|
function X(r7, ...e) {
|
|
46983
46990
|
let t = r7;
|
|
46984
46991
|
for (let n = 0; n < e.length && t; n++) t = t?.extension?.find((i) => i.url === e[n]);
|
|
46985
46992
|
return t;
|
|
46986
46993
|
}
|
|
46987
|
-
function
|
|
46988
|
-
return JSON.stringify(r7,
|
|
46994
|
+
function Fn(r7, e) {
|
|
46995
|
+
return JSON.stringify(r7, Co, e ? 2 : void 0);
|
|
46989
46996
|
}
|
|
46990
|
-
function
|
|
46991
|
-
return !
|
|
46997
|
+
function Co(r7, e) {
|
|
46998
|
+
return !Po(r7) && S(e) ? void 0 : e;
|
|
46992
46999
|
}
|
|
46993
|
-
function
|
|
47000
|
+
function Po(r7) {
|
|
46994
47001
|
return !!/\d+$/.exec(r7);
|
|
46995
47002
|
}
|
|
46996
|
-
function
|
|
47003
|
+
function S(r7) {
|
|
46997
47004
|
if (r7 == null) return true;
|
|
46998
47005
|
let e = typeof r7;
|
|
46999
47006
|
return e === "string" || e === "object" ? !K(r7) : false;
|
|
@@ -47004,14 +47011,14 @@ function K(r7) {
|
|
|
47004
47011
|
return e === "string" && r7 !== "" || e === "object" && ("length" in r7 && r7.length > 0 || Object.keys(r7).length > 0);
|
|
47005
47012
|
}
|
|
47006
47013
|
function ee(r7, e, t) {
|
|
47007
|
-
return r7 === e ||
|
|
47014
|
+
return r7 === e || S(r7) && S(e) ? true : S(r7) || S(e) ? false : Array.isArray(r7) && Array.isArray(e) ? wo(r7, e) : Array.isArray(r7) || Array.isArray(e) ? false : R(r7) && R(e) ? Ao(r7, e, t) : (R(r7) || R(e), false);
|
|
47008
47015
|
}
|
|
47009
|
-
function
|
|
47016
|
+
function wo(r7, e) {
|
|
47010
47017
|
if (r7.length !== e.length) return false;
|
|
47011
47018
|
for (let t = 0; t < r7.length; t++) if (!ee(r7[t], e[t])) return false;
|
|
47012
47019
|
return true;
|
|
47013
47020
|
}
|
|
47014
|
-
function
|
|
47021
|
+
function Ao(r7, e, t) {
|
|
47015
47022
|
let n = /* @__PURE__ */ new Set();
|
|
47016
47023
|
Object.keys(r7).forEach((i) => n.add(i)), Object.keys(e).forEach((i) => n.add(i)), t === "meta" && (n.delete("versionId"), n.delete("lastUpdated"), n.delete("author"));
|
|
47017
47024
|
for (let i of n) {
|
|
@@ -47023,29 +47030,29 @@ function Po(r7, e, t) {
|
|
|
47023
47030
|
function R(r7) {
|
|
47024
47031
|
return r7 !== null && typeof r7 == "object";
|
|
47025
47032
|
}
|
|
47026
|
-
function
|
|
47027
|
-
return r7.every(
|
|
47033
|
+
function Un(r7) {
|
|
47034
|
+
return r7.every(ko);
|
|
47028
47035
|
}
|
|
47029
|
-
function
|
|
47036
|
+
function ko(r7) {
|
|
47030
47037
|
return typeof r7 == "string";
|
|
47031
47038
|
}
|
|
47032
|
-
function
|
|
47039
|
+
function xr(r7) {
|
|
47033
47040
|
return R(r7) && "code" in r7 && typeof r7.code == "string";
|
|
47034
47041
|
}
|
|
47035
|
-
function
|
|
47036
|
-
return R(r7) && "coding" in r7 && Array.isArray(r7.coding) && r7.coding.every(
|
|
47042
|
+
function Tr(r7) {
|
|
47043
|
+
return R(r7) && "coding" in r7 && Array.isArray(r7.coding) && r7.coding.every(xr);
|
|
47037
47044
|
}
|
|
47038
47045
|
function Vo(r7) {
|
|
47039
47046
|
return R(r7) && "text" in r7 && typeof r7.text == "string";
|
|
47040
47047
|
}
|
|
47041
|
-
var
|
|
47042
|
-
for (let r7 = 0; r7 < 256; r7++)
|
|
47043
|
-
function
|
|
47048
|
+
var Bn = [];
|
|
47049
|
+
for (let r7 = 0; r7 < 256; r7++) Bn.push(r7.toString(16).padStart(2, "0"));
|
|
47050
|
+
function qn(r7) {
|
|
47044
47051
|
let e = new Uint8Array(r7), t = new Array(e.length);
|
|
47045
|
-
for (let n = 0; n < e.length; n++) t[n] =
|
|
47052
|
+
for (let n = 0; n < e.length; n++) t[n] = Bn[e[n]];
|
|
47046
47053
|
return t.join("");
|
|
47047
47054
|
}
|
|
47048
|
-
function
|
|
47055
|
+
function jn(r7) {
|
|
47049
47056
|
let e = new Uint8Array(r7), t = [];
|
|
47050
47057
|
for (let n = 0; n < e.length; n++) t[n] = String.fromCharCode(e[n]);
|
|
47051
47058
|
return window.btoa(t.join(""));
|
|
@@ -47053,25 +47060,25 @@ function Bn(r7) {
|
|
|
47053
47060
|
function w(r7) {
|
|
47054
47061
|
return r7 ? r7.charAt(0).toUpperCase() + r7.substring(1) : "";
|
|
47055
47062
|
}
|
|
47056
|
-
var
|
|
47063
|
+
var br = (r7) => new Promise((e) => {
|
|
47057
47064
|
setTimeout(e, r7);
|
|
47058
47065
|
});
|
|
47059
47066
|
function ut(r7) {
|
|
47060
47067
|
return r7.sort((e, t) => e.localeCompare(t));
|
|
47061
47068
|
}
|
|
47062
|
-
function
|
|
47069
|
+
function Cr(r7) {
|
|
47063
47070
|
return r7.endsWith("/") ? r7 : r7 + "/";
|
|
47064
47071
|
}
|
|
47065
47072
|
function Fo(r7) {
|
|
47066
47073
|
return r7.startsWith("/") ? r7.slice(1) : r7;
|
|
47067
47074
|
}
|
|
47068
47075
|
function B(r7, e) {
|
|
47069
|
-
return new URL(Fo(e),
|
|
47076
|
+
return new URL(Fo(e), Cr(r7.toString())).toString();
|
|
47070
47077
|
}
|
|
47071
|
-
function
|
|
47078
|
+
function Hn(r7, e) {
|
|
47072
47079
|
return B(r7, e).toString().replace("http://", "ws://").replace("https://", "wss://");
|
|
47073
47080
|
}
|
|
47074
|
-
function
|
|
47081
|
+
function Qn(r7) {
|
|
47075
47082
|
return typeof r7 == "object" && !Array.isArray(r7) && !(r7 instanceof URLSearchParams) && (r7 = Object.fromEntries(Object.entries(r7).filter((e) => e[1] !== void 0))), new URLSearchParams(r7).toString();
|
|
47076
47083
|
}
|
|
47077
47084
|
var Uo = /^(([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])$/;
|
|
@@ -47102,14 +47109,14 @@ function Go(r7, e) {
|
|
|
47102
47109
|
function me(r7) {
|
|
47103
47110
|
return typeof r7 == "string" ? r7 : void 0;
|
|
47104
47111
|
}
|
|
47105
|
-
var
|
|
47106
|
-
function
|
|
47112
|
+
var l = { Address: "Address", Age: "Age", Annotation: "Annotation", Attachment: "Attachment", BackboneElement: "BackboneElement", CodeableConcept: "CodeableConcept", Coding: "Coding", ContactDetail: "ContactDetail", ContactPoint: "ContactPoint", Contributor: "Contributor", Count: "Count", DataRequirement: "DataRequirement", Distance: "Distance", Dosage: "Dosage", Duration: "Duration", Expression: "Expression", Extension: "Extension", HumanName: "HumanName", Identifier: "Identifier", MarketingStatus: "MarketingStatus", Meta: "Meta", Money: "Money", Narrative: "Narrative", ParameterDefinition: "ParameterDefinition", Period: "Period", Population: "Population", ProdCharacteristic: "ProdCharacteristic", ProductShelfLife: "ProductShelfLife", Quantity: "Quantity", Range: "Range", Ratio: "Ratio", Reference: "Reference", RelatedArtifact: "RelatedArtifact", SampledData: "SampledData", Signature: "Signature", SubstanceAmount: "SubstanceAmount", SystemString: "http://hl7.org/fhirpath/System.String", Timing: "Timing", TriggerDefinition: "TriggerDefinition", UsageContext: "UsageContext", base64Binary: "base64Binary", boolean: "boolean", canonical: "canonical", code: "code", date: "date", dateTime: "dateTime", decimal: "decimal", id: "id", instant: "instant", integer: "integer", markdown: "markdown", oid: "oid", positiveInt: "positiveInt", string: "string", time: "time", unsignedInt: "unsignedInt", uri: "uri", url: "url", uuid: "uuid" };
|
|
47113
|
+
function Yn(r7) {
|
|
47107
47114
|
let e = L.types[r7];
|
|
47108
47115
|
return e || (e = { searchParamsDetails: {} }, L.types[r7] = e), e.searchParams || (e.searchParams = { _id: { base: [r7], code: "_id", type: "token", expression: r7 + ".id" }, _lastUpdated: { base: [r7], code: "_lastUpdated", type: "date", expression: r7 + ".meta.lastUpdated" }, _compartment: { base: [r7], code: "_compartment", type: "reference", expression: r7 + ".meta.compartment" }, _profile: { base: [r7], code: "_profile", type: "uri", expression: r7 + ".meta.profile" }, _security: { base: [r7], code: "_security", type: "token", expression: r7 + ".meta.security" }, _source: { base: [r7], code: "_source", type: "uri", expression: r7 + ".meta.source" }, _tag: { base: [r7], code: "_tag", type: "token", expression: r7 + ".meta.tag" } }), e;
|
|
47109
47116
|
}
|
|
47110
|
-
function
|
|
47117
|
+
function Ar(r7) {
|
|
47111
47118
|
for (let e of r7.base ?? []) {
|
|
47112
|
-
let t =
|
|
47119
|
+
let t = Yn(e);
|
|
47113
47120
|
t.searchParams || (t.searchParams = {}), t.searchParams[r7.code] = r7;
|
|
47114
47121
|
}
|
|
47115
47122
|
}
|
|
@@ -47152,7 +47159,7 @@ function Oe(r7) {
|
|
|
47152
47159
|
}
|
|
47153
47160
|
}
|
|
47154
47161
|
var z = () => [];
|
|
47155
|
-
var O = { empty: (r7, e) => f(e.length === 0 || e.every((t) =>
|
|
47162
|
+
var O = { empty: (r7, e) => f(e.length === 0 || e.every((t) => S(t.value))), hasValue: (r7, e) => f(e.length !== 0), exists: (r7, e, t) => t ? f(e.filter((n) => N(t.eval(r7, [n]))).length > 0) : f(e.length > 0 && e.every((n) => !S(n.value))), all: (r7, e, t) => f(e.every((n) => N(t.eval(r7, [n])))), allTrue: (r7, e) => {
|
|
47156
47163
|
for (let t of e) if (!t.value) return f(false);
|
|
47157
47164
|
return f(true);
|
|
47158
47165
|
}, anyTrue: (r7, e) => {
|
|
@@ -47171,7 +47178,7 @@ var O = { empty: (r7, e) => f(e.length === 0 || e.every((t) => E(t.value))), has
|
|
|
47171
47178
|
}, supersetOf: (r7, e, t) => {
|
|
47172
47179
|
let n = t.eval(r7, he(r7));
|
|
47173
47180
|
return n.length === 0 ? f(true) : e.length === 0 ? f(false) : f(n.every((i) => e.some((o) => o.value === i.value)));
|
|
47174
|
-
}, count: (r7, e) => [{ type:
|
|
47181
|
+
}, count: (r7, e) => [{ type: l.integer, value: e.length }], distinct: (r7, e) => {
|
|
47175
47182
|
let t = [];
|
|
47176
47183
|
for (let n of e) t.some((i) => i.value === n.value) || t.push(n);
|
|
47177
47184
|
return t;
|
|
@@ -47211,7 +47218,7 @@ var O = { empty: (r7, e) => f(e.length === 0 || e.every((t) => E(t.value))), has
|
|
|
47211
47218
|
}, toBoolean: (r7, e) => {
|
|
47212
47219
|
if (e.length === 0) return [];
|
|
47213
47220
|
let [{ value: t }] = G(e, 1);
|
|
47214
|
-
if (typeof t == "boolean") return [{ type:
|
|
47221
|
+
if (typeof t == "boolean") return [{ type: l.boolean, value: t }];
|
|
47215
47222
|
if (typeof t == "number" && (t === 0 || t === 1)) return f(!!t);
|
|
47216
47223
|
if (typeof t == "string") {
|
|
47217
47224
|
let n = t.toLowerCase();
|
|
@@ -47222,33 +47229,33 @@ var O = { empty: (r7, e) => f(e.length === 0 || e.every((t) => E(t.value))), has
|
|
|
47222
47229
|
}, convertsToBoolean: (r7, e) => e.length === 0 ? [] : f(O.toBoolean(r7, e).length === 1), toInteger: (r7, e) => {
|
|
47223
47230
|
if (e.length === 0) return [];
|
|
47224
47231
|
let [{ value: t }] = G(e, 1);
|
|
47225
|
-
return typeof t == "number" ? [{ type:
|
|
47232
|
+
return typeof t == "number" ? [{ type: l.integer, value: t }] : typeof t == "string" && /^[+-]?\d+$/.exec(t) ? [{ type: l.integer, value: parseInt(t, 10) }] : typeof t == "boolean" ? [{ type: l.integer, value: t ? 1 : 0 }] : [];
|
|
47226
47233
|
}, convertsToInteger: (r7, e) => e.length === 0 ? [] : f(O.toInteger(r7, e).length === 1), toDate: (r7, e) => {
|
|
47227
47234
|
if (e.length === 0) return [];
|
|
47228
47235
|
let [{ value: t }] = G(e, 1);
|
|
47229
|
-
return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type:
|
|
47236
|
+
return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: l.date, value: Oe(t) }] : [];
|
|
47230
47237
|
}, convertsToDate: (r7, e) => e.length === 0 ? [] : f(O.toDate(r7, e).length === 1), toDateTime: (r7, e) => {
|
|
47231
47238
|
if (e.length === 0) return [];
|
|
47232
47239
|
let [{ value: t }] = G(e, 1);
|
|
47233
|
-
return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type:
|
|
47240
|
+
return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: l.dateTime, value: Oe(t) }] : [];
|
|
47234
47241
|
}, convertsToDateTime: (r7, e) => e.length === 0 ? [] : f(O.toDateTime(r7, e).length === 1), toDecimal: (r7, e) => {
|
|
47235
47242
|
if (e.length === 0) return [];
|
|
47236
47243
|
let [{ value: t }] = G(e, 1);
|
|
47237
|
-
return typeof t == "number" ? [{ type:
|
|
47244
|
+
return typeof t == "number" ? [{ type: l.decimal, value: t }] : typeof t == "string" && /^-?\d{1,9}(\.\d{1,9})?$/.exec(t) ? [{ type: l.decimal, value: parseFloat(t) }] : typeof t == "boolean" ? [{ type: l.decimal, value: t ? 1 : 0 }] : [];
|
|
47238
47245
|
}, convertsToDecimal: (r7, e) => e.length === 0 ? [] : f(O.toDecimal(r7, e).length === 1), toQuantity: (r7, e) => {
|
|
47239
47246
|
if (e.length === 0) return [];
|
|
47240
47247
|
let [{ value: t }] = G(e, 1);
|
|
47241
|
-
return k(t) ? [{ type:
|
|
47248
|
+
return k(t) ? [{ type: l.Quantity, value: t }] : typeof t == "number" ? [{ type: l.Quantity, value: { value: t, unit: "1" } }] : typeof t == "string" && /^-?\d{1,9}(\.\d{1,9})?/.exec(t) ? [{ type: l.Quantity, value: { value: parseFloat(t), unit: "1" } }] : typeof t == "boolean" ? [{ type: l.Quantity, value: { value: t ? 1 : 0, unit: "1" } }] : [];
|
|
47242
47249
|
}, convertsToQuantity: (r7, e) => e.length === 0 ? [] : f(O.toQuantity(r7, e).length === 1), toString: (r7, e) => {
|
|
47243
47250
|
if (e.length === 0) return [];
|
|
47244
47251
|
let [{ value: t }] = G(e, 1);
|
|
47245
|
-
return t == null ? [] : k(t) ? [{ type:
|
|
47252
|
+
return t == null ? [] : k(t) ? [{ type: l.string, value: `${t.value} '${t.unit}'` }] : [{ type: l.string, value: t.toString() }];
|
|
47246
47253
|
}, convertsToString: (r7, e) => e.length === 0 ? [] : f(O.toString(r7, e).length === 1), toTime: (r7, e) => {
|
|
47247
47254
|
if (e.length === 0) return [];
|
|
47248
47255
|
let [{ value: t }] = G(e, 1);
|
|
47249
47256
|
if (typeof t == "string") {
|
|
47250
47257
|
let n = /^T?(\d{2}(:\d{2}(:\d{2})?)?)/.exec(t);
|
|
47251
|
-
if (n) return [{ type:
|
|
47258
|
+
if (n) return [{ type: l.time, value: Oe("T" + n[1]) }];
|
|
47252
47259
|
}
|
|
47253
47260
|
return [];
|
|
47254
47261
|
}, convertsToTime: (r7, e) => e.length === 0 ? [] : f(O.toTime(r7, e).length === 1), indexOf: (r7, e, t) => F((n, i) => n.indexOf(i), r7, e, t), substring: (r7, e, t, n) => F((i, o, s) => {
|
|
@@ -47257,8 +47264,8 @@ var O = { empty: (r7, e) => f(e.length === 0 || e.every((t) => E(t.value))), has
|
|
|
47257
47264
|
}, r7, e, t, n), startsWith: (r7, e, t) => F((n, i) => n.startsWith(i), r7, e, t), endsWith: (r7, e, t) => F((n, i) => n.endsWith(i), r7, e, t), contains: (r7, e, t) => F((n, i) => n.includes(i), r7, e, t), upper: (r7, e) => F((t) => t.toUpperCase(), r7, e), lower: (r7, e) => F((t) => t.toLowerCase(), r7, e), replace: (r7, e, t, n) => F((i, o, s) => i.replaceAll(o, s), r7, e, t, n), matches: (r7, e, t) => F((n, i) => !!new RegExp(i).exec(n), r7, e, t), replaceMatches: (r7, e, t, n) => F((i, o, s) => i.replaceAll(o, s), r7, e, t, n), length: (r7, e) => F((t) => t.length, r7, e), toChars: (r7, e) => F((t) => t ? t.split("") : void 0, r7, e), encode: z, decode: z, escape: z, unescape: z, trim: z, split: z, join: (r7, e, t) => {
|
|
47258
47265
|
let n = t?.eval(r7, he(r7))[0]?.value ?? "";
|
|
47259
47266
|
if (typeof n != "string") throw new Error("Separator must be a string.");
|
|
47260
|
-
return [{ type:
|
|
47261
|
-
}, abs: (r7, e) => W(Math.abs, r7, e), ceiling: (r7, e) => W(Math.ceil, r7, e), exp: (r7, e) => W(Math.exp, r7, e), floor: (r7, e) => W(Math.floor, r7, e), ln: (r7, e) => W(Math.log, r7, e), log: (r7, e, t) => W((n, i) => Math.log(n) / Math.log(i), r7, e, t), power: (r7, e, t) => W(Math.pow, r7, e, t), round: (r7, e) => W(Math.round, r7, e), sqrt: (r7, e) => W(Math.sqrt, r7, e), truncate: (r7, e) => W((t) => t | 0, r7, e), children: z, descendants: z, trace: (r7, e, t) => e, now: () => [{ type:
|
|
47267
|
+
return [{ type: l.string, value: e.map((i) => i.value?.toString() ?? "").join(n) }];
|
|
47268
|
+
}, abs: (r7, e) => W(Math.abs, r7, e), ceiling: (r7, e) => W(Math.ceil, r7, e), exp: (r7, e) => W(Math.exp, r7, e), floor: (r7, e) => W(Math.floor, r7, e), ln: (r7, e) => W(Math.log, r7, e), log: (r7, e, t) => W((n, i) => Math.log(n) / Math.log(i), r7, e, t), power: (r7, e, t) => W(Math.pow, r7, e, t), round: (r7, e) => W(Math.round, r7, e), sqrt: (r7, e) => W(Math.sqrt, r7, e), truncate: (r7, e) => W((t) => t | 0, r7, e), children: z, descendants: z, trace: (r7, e, t) => e, now: () => [{ type: l.dateTime, value: (/* @__PURE__ */ new Date()).toISOString() }], timeOfDay: () => [{ type: l.time, value: (/* @__PURE__ */ new Date()).toISOString().substring(11) }], today: () => [{ type: l.date, value: (/* @__PURE__ */ new Date()).toISOString().substring(0, 10) }], between: (r7, e, t, n, i) => {
|
|
47262
47269
|
let o = O.toDateTime(r7, t.eval(r7, e));
|
|
47263
47270
|
if (o.length === 0) throw new Error("Invalid start date");
|
|
47264
47271
|
let s = O.toDateTime(r7, n.eval(r7, e));
|
|
@@ -47266,11 +47273,11 @@ var O = { empty: (r7, e) => f(e.length === 0 || e.every((t) => E(t.value))), has
|
|
|
47266
47273
|
let a2 = i.eval(r7, e)[0]?.value;
|
|
47267
47274
|
if (a2 !== "years" && a2 !== "months" && a2 !== "days") throw new Error("Invalid units");
|
|
47268
47275
|
let c = ct(o[0].value, s[0].value);
|
|
47269
|
-
return [{ type:
|
|
47276
|
+
return [{ type: l.Quantity, value: { value: c[a2], unit: a2 } }];
|
|
47270
47277
|
}, is: (r7, e, t) => {
|
|
47271
47278
|
let n = "";
|
|
47272
|
-
return t instanceof q ? n = t.name : t instanceof re && (n = t.left.name + "." + t.right.name), n ? e.map((i) => ({ type:
|
|
47273
|
-
}, not: (r7, e) => O.toBoolean(r7, e).map((t) => ({ type:
|
|
47279
|
+
return t instanceof q ? n = t.name : t instanceof re && (n = t.left.name + "." + t.right.name), n ? e.map((i) => ({ type: l.boolean, value: ot(i, n) })) : [];
|
|
47280
|
+
}, not: (r7, e) => O.toBoolean(r7, e).map((t) => ({ type: l.boolean, value: !t.value })), resolve: (r7, e) => e.map((t) => {
|
|
47274
47281
|
let n = t.value, i;
|
|
47275
47282
|
if (typeof n == "string") i = n;
|
|
47276
47283
|
else if (typeof n == "object") {
|
|
@@ -47286,25 +47293,25 @@ var O = { empty: (r7, e) => f(e.length === 0 || e.every((t) => E(t.value))), has
|
|
|
47286
47293
|
let [o, s] = i.split("/");
|
|
47287
47294
|
return { type: o, value: { resourceType: o, id: s } };
|
|
47288
47295
|
}
|
|
47289
|
-
return { type:
|
|
47290
|
-
}).filter((t) => !!t.value), as: (r7, e) => e, type: (r7, e) => e.map(({ value: t }) => typeof t == "boolean" ? { type:
|
|
47296
|
+
return { type: l.BackboneElement, value: void 0 };
|
|
47297
|
+
}).filter((t) => !!t.value), as: (r7, e) => e, type: (r7, e) => e.map(({ value: t }) => typeof t == "boolean" ? { type: l.BackboneElement, value: { namespace: "System", name: "Boolean" } } : typeof t == "number" ? { type: l.BackboneElement, value: { namespace: "System", name: "Integer" } } : I(t) ? { type: l.BackboneElement, value: { namespace: "FHIR", name: t.resourceType } } : { type: l.BackboneElement, value: null }), conformsTo: (r7, e, t) => {
|
|
47291
47298
|
let n = t.eval(r7, e)[0].value;
|
|
47292
47299
|
if (!n.startsWith("http://hl7.org/fhir/StructureDefinition/")) throw new Error("Expected a StructureDefinition URL");
|
|
47293
47300
|
let i = n.replace("http://hl7.org/fhir/StructureDefinition/", "");
|
|
47294
|
-
return e.map((o) => ({ type:
|
|
47301
|
+
return e.map((o) => ({ type: l.boolean, value: o.value?.resourceType === i }));
|
|
47295
47302
|
}, getResourceKey: (r7, e) => {
|
|
47296
47303
|
let t = e[0].value;
|
|
47297
|
-
return t?.id ? [{ type:
|
|
47304
|
+
return t?.id ? [{ type: l.id, value: t.id }] : [];
|
|
47298
47305
|
}, getReferenceKey: (r7, e, t) => {
|
|
47299
47306
|
let n = e[0].value;
|
|
47300
47307
|
if (!n?.reference) return [];
|
|
47301
47308
|
let i = "";
|
|
47302
|
-
return t instanceof q && (i = t.name), i && !n.reference.startsWith(i + "/") ? [] : [{ type:
|
|
47309
|
+
return t instanceof q && (i = t.name), i && !n.reference.startsWith(i + "/") ? [] : [{ type: l.id, value: pe(n) }];
|
|
47303
47310
|
}, extension: (r7, e, t) => {
|
|
47304
47311
|
let n = t.eval(r7, e)[0].value, i = e?.[0]?.value;
|
|
47305
47312
|
if (i) {
|
|
47306
47313
|
let o = X(i, n);
|
|
47307
|
-
if (o) return [{ type:
|
|
47314
|
+
if (o) return [{ type: l.Extension, value: o }];
|
|
47308
47315
|
}
|
|
47309
47316
|
return [];
|
|
47310
47317
|
} };
|
|
@@ -47319,7 +47326,7 @@ function W(r7, e, t, ...n) {
|
|
|
47319
47326
|
if (t.length === 0) return [];
|
|
47320
47327
|
let [{ value: i }] = G(t, 1), o = k(i), s = o ? i.value : i;
|
|
47321
47328
|
if (typeof s != "number") throw new Error("Math function cannot be called with non-number");
|
|
47322
|
-
let a2 = r7(s, ...n.map((
|
|
47329
|
+
let a2 = r7(s, ...n.map((p2) => p2.eval(e, t)[0]?.value)), c = o ? l.Quantity : t[0].type, u2 = o ? { ...i, value: a2 } : a2;
|
|
47323
47330
|
return [{ type: c, value: u2 }];
|
|
47324
47331
|
}
|
|
47325
47332
|
function G(r7, e) {
|
|
@@ -47408,8 +47415,8 @@ var V = class extends C {
|
|
|
47408
47415
|
if (i.length !== 1) return [];
|
|
47409
47416
|
let o = this.right.eval(t, n);
|
|
47410
47417
|
if (o.length !== 1) return [];
|
|
47411
|
-
let s = i[0].value, a2 = o[0].value, c = k(s) ? s.value : s, u2 = k(a2) ? a2.value : a2,
|
|
47412
|
-
return typeof
|
|
47418
|
+
let s = i[0].value, a2 = o[0].value, c = k(s) ? s.value : s, u2 = k(a2) ? a2.value : a2, p2 = this.impl(c, u2);
|
|
47419
|
+
return typeof p2 == "boolean" ? f(p2) : k(s) ? [{ type: l.Quantity, value: { ...s, value: p2 } }] : [g(p2)];
|
|
47413
47420
|
}
|
|
47414
47421
|
};
|
|
47415
47422
|
var mt = class extends Y {
|
|
@@ -47418,7 +47425,7 @@ var mt = class extends Y {
|
|
|
47418
47425
|
}
|
|
47419
47426
|
eval(e, t) {
|
|
47420
47427
|
let n = this.left.eval(e, t), i = this.right.eval(e, t), o = [...n, ...i];
|
|
47421
|
-
return o.length > 0 && o.every((s) => typeof s.value == "string") ? [{ type:
|
|
47428
|
+
return o.length > 0 && o.every((s) => typeof s.value == "string") ? [{ type: l.string, value: o.map((s) => s.value).join("") }] : o;
|
|
47422
47429
|
}
|
|
47423
47430
|
};
|
|
47424
47431
|
var ht = class extends C {
|
|
@@ -47465,7 +47472,7 @@ var gt = class extends C {
|
|
|
47465
47472
|
}
|
|
47466
47473
|
eval(e, t) {
|
|
47467
47474
|
let n = this.left.eval(e, t), i = this.right.eval(e, t);
|
|
47468
|
-
return
|
|
47475
|
+
return In(n, i);
|
|
47469
47476
|
}
|
|
47470
47477
|
};
|
|
47471
47478
|
var vt = class extends C {
|
|
@@ -47474,7 +47481,7 @@ var vt = class extends C {
|
|
|
47474
47481
|
}
|
|
47475
47482
|
eval(e, t) {
|
|
47476
47483
|
let n = this.left.eval(e, t), i = this.right.eval(e, t);
|
|
47477
|
-
return
|
|
47484
|
+
return kn(n, i);
|
|
47478
47485
|
}
|
|
47479
47486
|
};
|
|
47480
47487
|
var xt = class extends C {
|
|
@@ -47492,7 +47499,7 @@ var Tt = class extends C {
|
|
|
47492
47499
|
}
|
|
47493
47500
|
eval(e, t) {
|
|
47494
47501
|
let n = this.left.eval(e, t), i = this.right.eval(e, t);
|
|
47495
|
-
return
|
|
47502
|
+
return On(gr(n, i));
|
|
47496
47503
|
}
|
|
47497
47504
|
};
|
|
47498
47505
|
var ge = class extends C {
|
|
@@ -47596,13 +47603,13 @@ function os(r7) {
|
|
|
47596
47603
|
return n?.startsWith("'") && n.endsWith("'") ? n = n.substring(1, n.length - 1) : n = "{" + n + "}", { value: t, unit: n };
|
|
47597
47604
|
}
|
|
47598
47605
|
function je() {
|
|
47599
|
-
return new Je().registerPrefix("String", { parse: (r7, e) => new U({ type:
|
|
47606
|
+
return new Je().registerPrefix("String", { parse: (r7, e) => new U({ type: l.string, value: e.value }) }).registerPrefix("DateTime", { parse: (r7, e) => new U({ type: l.dateTime, value: Oe(e.value) }) }).registerPrefix("Quantity", { parse: (r7, e) => new U({ type: l.Quantity, value: os(e.value) }) }).registerPrefix("Number", { parse: (r7, e) => new U({ type: e.value.includes(".") ? l.decimal : l.integer, value: parseFloat(e.value) }) }).registerPrefix("true", { parse: () => new U({ type: l.boolean, value: true }) }).registerPrefix("false", { parse: () => new U({ type: l.boolean, value: false }) }).registerPrefix("Symbol", { parse: (r7, e) => new q(e.value) }).registerPrefix("{}", { parse: () => new dt() }).registerPrefix("(", rs).registerInfix("[", ns).registerInfix("(", is).prefix("+", y.UnaryAdd, (r7, e) => new ft("+", e, (t) => t)).prefix("-", y.UnarySubtract, (r7, e) => new V("-", e, e, (t, n) => -n)).infixLeft(".", y.Dot, (r7, e, t) => new re(r7, t)).infixLeft("/", y.Divide, (r7, e, t) => new V("/", r7, t, (n, i) => n / i)).infixLeft("*", y.Multiply, (r7, e, t) => new V("*", r7, t, (n, i) => n * i)).infixLeft("+", y.Add, (r7, e, t) => new V("+", r7, t, (n, i) => n + i)).infixLeft("-", y.Subtract, (r7, e, t) => new V("-", r7, t, (n, i) => n - i)).infixLeft("|", y.Union, (r7, e, t) => new Ie(r7, t)).infixLeft("=", y.Equals, (r7, e, t) => new gt(r7, t)).infixLeft("!=", y.NotEquals, (r7, e, t) => new vt(r7, t)).infixLeft("~", y.Equivalent, (r7, e, t) => new xt(r7, t)).infixLeft("!~", y.NotEquivalent, (r7, e, t) => new Tt(r7, t)).infixLeft("<", y.LessThan, (r7, e, t) => new V("<", r7, t, (n, i) => n < i)).infixLeft("<=", y.LessThanOrEquals, (r7, e, t) => new V("<=", r7, t, (n, i) => n <= i)).infixLeft(">", y.GreaterThan, (r7, e, t) => new V(">", r7, t, (n, i) => n > i)).infixLeft(">=", y.GreaterThanOrEquals, (r7, e, t) => new V(">=", r7, t, (n, i) => n >= i)).infixLeft("&", y.Ampersand, (r7, e, t) => new mt(r7, t)).infixLeft("and", y.And, (r7, e, t) => new St(r7, t)).infixLeft("as", y.As, (r7, e, t) => new ye(r7, t)).infixLeft("contains", y.Contains, (r7, e, t) => new ht(r7, t)).infixLeft("div", y.Divide, (r7, e, t) => new V("div", r7, t, (n, i) => n / i | 0)).infixLeft("in", y.In, (r7, e, t) => new yt(r7, t)).infixLeft("is", y.Is, (r7, e, t) => new ge(r7, t)).infixLeft("mod", y.Modulo, (r7, e, t) => new V("mod", r7, t, (n, i) => n % i)).infixLeft("or", y.Or, (r7, e, t) => new Et(r7, t)).infixLeft("xor", y.Xor, (r7, e, t) => new bt(r7, t)).infixLeft("implies", y.Implies, (r7, e, t) => new Rt(r7, t));
|
|
47600
47607
|
}
|
|
47601
47608
|
var ss = je();
|
|
47602
|
-
var
|
|
47603
|
-
var
|
|
47609
|
+
var ei = ((p2) => (p2.BOOLEAN = "BOOLEAN", p2.NUMBER = "NUMBER", p2.QUANTITY = "QUANTITY", p2.TEXT = "TEXT", p2.REFERENCE = "REFERENCE", p2.CANONICAL = "CANONICAL", p2.DATE = "DATE", p2.DATETIME = "DATETIME", p2.PERIOD = "PERIOD", p2.UUID = "UUID", p2))(ei || {});
|
|
47610
|
+
var si = ((T) => (T.EQUALS = "eq", T.NOT_EQUALS = "ne", T.GREATER_THAN = "gt", T.LESS_THAN = "lt", T.GREATER_THAN_OR_EQUALS = "ge", T.LESS_THAN_OR_EQUALS = "le", T.STARTS_AFTER = "sa", T.ENDS_BEFORE = "eb", T.APPROXIMATELY = "ap", T.CONTAINS = "contains", T.EXACT = "exact", T.TEXT = "text", T.NOT = "not", T.ABOVE = "above", T.BELOW = "below", T.IN = "in", T.NOT_IN = "not-in", T.OF_TYPE = "of-type", T.MISSING = "missing", T.PRESENT = "present", T.IDENTIFIER = "identifier", T.ITERATE = "iterate", T))(si || {});
|
|
47604
47611
|
var _s = ((b2) => (b2.READ = "read", b2.VREAD = "vread", b2.UPDATE = "update", b2.PATCH = "patch", b2.DELETE = "delete", b2.HISTORY = "history", b2.HISTORY_INSTANCE = "history-instance", b2.HISTORY_TYPE = "history-type", b2.HISTORY_SYSTEM = "history-system", b2.CREATE = "create", b2.SEARCH = "search", b2.SEARCH_TYPE = "search-type", b2.SEARCH_SYSTEM = "search-system", b2.SEARCH_COMPARTMENT = "search-compartment", b2.CAPABILITIES = "capabilities", b2.TRANSACTION = "transaction", b2.BATCH = "batch", b2.OPERATION = "operation", b2))(_s || {});
|
|
47605
|
-
function
|
|
47612
|
+
function li(r7) {
|
|
47606
47613
|
if (typeof window < "u") {
|
|
47607
47614
|
let e = window.atob(r7), t = Uint8Array.from(e, (n) => n.charCodeAt(0));
|
|
47608
47615
|
return new window.TextDecoder().decode(t);
|
|
@@ -47610,7 +47617,7 @@ function ci(r7) {
|
|
|
47610
47617
|
if (typeof Buffer < "u") return Buffer.from(r7, "base64").toString("utf-8");
|
|
47611
47618
|
throw new Error("Unable to decode base64");
|
|
47612
47619
|
}
|
|
47613
|
-
function
|
|
47620
|
+
function pi(r7) {
|
|
47614
47621
|
if (typeof window < "u") {
|
|
47615
47622
|
let e = new window.TextEncoder().encode(r7), t = String.fromCharCode.apply(null, e);
|
|
47616
47623
|
return window.btoa(t);
|
|
@@ -47618,11 +47625,11 @@ function ui(r7) {
|
|
|
47618
47625
|
if (typeof Buffer < "u") return Buffer.from(r7, "utf8").toString("base64");
|
|
47619
47626
|
throw new Error("Unable to encode base64");
|
|
47620
47627
|
}
|
|
47621
|
-
function
|
|
47628
|
+
function _r() {
|
|
47622
47629
|
let r7 = new Uint32Array(28);
|
|
47623
|
-
return crypto.getRandomValues(r7),
|
|
47630
|
+
return crypto.getRandomValues(r7), qn(r7.buffer);
|
|
47624
47631
|
}
|
|
47625
|
-
async function
|
|
47632
|
+
async function di(r7) {
|
|
47626
47633
|
return crypto.subtle.digest("SHA-256", new TextEncoder().encode(r7));
|
|
47627
47634
|
}
|
|
47628
47635
|
function xe() {
|
|
@@ -47656,7 +47663,7 @@ var At = class {
|
|
|
47656
47663
|
}
|
|
47657
47664
|
};
|
|
47658
47665
|
var D = { 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", PNG: "image/png", SCIM_JSON: "application/scim+json", SVG: "image/svg+xml", TEXT: "text/plain", TYPESCRIPT: "text/typescript", PING: "x-application/ping" };
|
|
47659
|
-
var
|
|
47666
|
+
var Nr = class {
|
|
47660
47667
|
constructor() {
|
|
47661
47668
|
this.listeners = {};
|
|
47662
47669
|
}
|
|
@@ -47683,7 +47690,7 @@ var Mr = class {
|
|
|
47683
47690
|
};
|
|
47684
47691
|
var H = class {
|
|
47685
47692
|
constructor() {
|
|
47686
|
-
this.emitter = new
|
|
47693
|
+
this.emitter = new Nr();
|
|
47687
47694
|
}
|
|
47688
47695
|
dispatchEvent(e) {
|
|
47689
47696
|
this.emitter.dispatchEvent(e);
|
|
@@ -47698,35 +47705,35 @@ var H = class {
|
|
|
47698
47705
|
this.emitter.removeAllListeners();
|
|
47699
47706
|
}
|
|
47700
47707
|
};
|
|
47701
|
-
var
|
|
47708
|
+
var Lr = { "Patient-open": "Patient-open", "Patient-close": "Patient-close", "ImagingStudy-open": "ImagingStudy-open", "ImagingStudy-close": "ImagingStudy-close", "Encounter-open": "Encounter-open", "Encounter-close": "Encounter-close", "DiagnosticReport-open": "DiagnosticReport-open", "DiagnosticReport-close": "DiagnosticReport-close", "DiagnosticReport-select": "DiagnosticReport-select", "DiagnosticReport-update": "DiagnosticReport-update", syncerror: "syncerror" };
|
|
47702
47709
|
var Ws = ["Patient", "Encounter", "ImagingStudy", "DiagnosticReport", "OperationOutcome", "Bundle"];
|
|
47703
|
-
var
|
|
47704
|
-
function
|
|
47705
|
-
return
|
|
47710
|
+
var Fr = ["DiagnosticReport-update"];
|
|
47711
|
+
function hi(r7) {
|
|
47712
|
+
return Fr.includes(r7);
|
|
47706
47713
|
}
|
|
47707
|
-
function
|
|
47708
|
-
if (
|
|
47714
|
+
function yi(r7) {
|
|
47715
|
+
if (Fr.includes(r7)) throw new d(h(`'context.version' is required for '${r7}'.`));
|
|
47709
47716
|
}
|
|
47710
47717
|
var Gs = { "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" }, select: { resourceType: "*", isArray: true } }, "DiagnosticReport-update": { report: { resourceType: "DiagnosticReport" }, patient: { resourceType: "Patient", optional: true }, study: { resourceType: "ImagingStudy", optional: true }, updates: { resourceType: "Bundle" } }, syncerror: { operationoutcome: { resourceType: "OperationOutcome" } } };
|
|
47711
47718
|
function Hs(r7) {
|
|
47712
47719
|
return Ws.includes(r7);
|
|
47713
47720
|
}
|
|
47714
|
-
function
|
|
47721
|
+
function gi(r7) {
|
|
47715
47722
|
return !!r7.endpoint;
|
|
47716
47723
|
}
|
|
47717
|
-
function
|
|
47724
|
+
function Ur(r7) {
|
|
47718
47725
|
if (!It(r7)) throw new d(h("subscriptionRequest must be an object conforming to SubscriptionRequest type."));
|
|
47719
47726
|
let { channelType: e, mode: t, topic: n, events: i } = r7, o = { "hub.channel.type": e, "hub.mode": t, "hub.topic": n, "hub.events": i.join(",") };
|
|
47720
|
-
return
|
|
47727
|
+
return gi(r7) && (o.endpoint = r7.endpoint), new URLSearchParams(o).toString();
|
|
47721
47728
|
}
|
|
47722
47729
|
function It(r7) {
|
|
47723
47730
|
if (typeof r7 != "object") return false;
|
|
47724
47731
|
let { channelType: e, mode: t, topic: n, events: i } = r7;
|
|
47725
47732
|
if (!(e && t && n && i) || typeof n != "string" || typeof i != "object" || !Array.isArray(i) || i.length < 1 || e !== "websocket" || t !== "subscribe" && t !== "unsubscribe") return false;
|
|
47726
|
-
for (let o of i) if (!
|
|
47727
|
-
return !(
|
|
47733
|
+
for (let o of i) if (!Lr[o]) return false;
|
|
47734
|
+
return !(gi(r7) && !(typeof r7.endpoint == "string" && r7.endpoint.startsWith("ws")));
|
|
47728
47735
|
}
|
|
47729
|
-
function
|
|
47736
|
+
function mi(r7, e, t, n) {
|
|
47730
47737
|
if (typeof e != "object") throw new d(h(`context[${t}] is invalid. Context must contain a single valid FHIR resource! Resource is not an object.`));
|
|
47731
47738
|
if (!(e.id && typeof e.id == "string")) throw new d(h(`context[${t}] is invalid. Resource must contain a valid string ID.`));
|
|
47732
47739
|
if (!e.resourceType) throw new d(h(`context[${t}] is invalid. Resource must contain a resource type. No resource type found.`));
|
|
@@ -47737,11 +47744,11 @@ function di(r7, e, t, n) {
|
|
|
47737
47744
|
}
|
|
47738
47745
|
}
|
|
47739
47746
|
function Qs(r7, e, t, n, i) {
|
|
47740
|
-
if (i.set(e.key, (i.get(e.key) ?? 0) + 1), !n.isArray)
|
|
47747
|
+
if (i.set(e.key, (i.get(e.key) ?? 0) + 1), !n.isArray) mi(r7, e.resource, t, n);
|
|
47741
47748
|
else {
|
|
47742
47749
|
let { resources: o } = e;
|
|
47743
47750
|
if (!o) throw new d(h(`context[${t}] is invalid. context[${t}] for the '${r7}' with key '${String(e.key)}' should contain an array of resources on the key 'resources'.`));
|
|
47744
|
-
for (let s of o)
|
|
47751
|
+
for (let s of o) mi(r7, s, t, n);
|
|
47745
47752
|
}
|
|
47746
47753
|
}
|
|
47747
47754
|
function Ks(r7, e) {
|
|
@@ -47756,11 +47763,11 @@ function Ks(r7, e) {
|
|
|
47756
47763
|
if (!o.manyAllowed && (t.get(i) || 0) > 1) throw new d(h(`${t.get(i)} context entries with key '${i}' found for the '${r7}' event when schema only allows for 1.`));
|
|
47757
47764
|
}
|
|
47758
47765
|
}
|
|
47759
|
-
function
|
|
47766
|
+
function Br(r7, e, t, n) {
|
|
47760
47767
|
if (!(r7 && typeof r7 == "string")) throw new d(h("Must provide a topic."));
|
|
47761
|
-
if (!
|
|
47768
|
+
if (!Lr[e]) throw new d(h(`Must provide a valid FHIRcast event name. Supported events: ${Object.keys(Lr).join(", ")}`));
|
|
47762
47769
|
if (typeof t != "object") throw new d(h("context must be a context object or array of context objects."));
|
|
47763
|
-
if (
|
|
47770
|
+
if (Fr.includes(e) && !n) throw new d(h(`The '${e}' event must contain a 'context.versionId'.`));
|
|
47764
47771
|
let i = Array.isArray(t) ? t : [t];
|
|
47765
47772
|
return Ks(e, i), { timestamp: (/* @__PURE__ */ new Date()).toISOString(), id: xe(), event: { "hub.topic": r7, "hub.event": e, context: i, ...n ? { "context.versionId": n } : {} } };
|
|
47766
47773
|
}
|
|
@@ -47785,27 +47792,27 @@ var Ot = class extends H {
|
|
|
47785
47792
|
}
|
|
47786
47793
|
};
|
|
47787
47794
|
function zs(r7) {
|
|
47788
|
-
let e = r7.replace(/-/g, "+").replace(/_/g, "/"), t =
|
|
47795
|
+
let e = r7.replace(/-/g, "+").replace(/_/g, "/"), t = li(e), n = Array.from(t).reduce((o, s) => {
|
|
47789
47796
|
let a2 = ("00" + s.charCodeAt(0).toString(16)).slice(-2);
|
|
47790
47797
|
return `${o}%${a2}`;
|
|
47791
47798
|
}, ""), i = decodeURIComponent(n);
|
|
47792
47799
|
return JSON.parse(i);
|
|
47793
47800
|
}
|
|
47794
|
-
function
|
|
47801
|
+
function vi(r7) {
|
|
47795
47802
|
return r7.split(".").length === 3;
|
|
47796
47803
|
}
|
|
47797
47804
|
function kt(r7) {
|
|
47798
47805
|
let [e, t, n] = r7.split(".");
|
|
47799
47806
|
return zs(t);
|
|
47800
47807
|
}
|
|
47801
|
-
function
|
|
47808
|
+
function xi(r7) {
|
|
47802
47809
|
try {
|
|
47803
47810
|
return typeof kt(r7).login_id == "string";
|
|
47804
47811
|
} catch {
|
|
47805
47812
|
return false;
|
|
47806
47813
|
}
|
|
47807
47814
|
}
|
|
47808
|
-
function
|
|
47815
|
+
function Ti(r7) {
|
|
47809
47816
|
try {
|
|
47810
47817
|
let t = kt(r7).exp;
|
|
47811
47818
|
return typeof t == "number" ? t * 1e3 : void 0;
|
|
@@ -47827,11 +47834,11 @@ var Vt = class {
|
|
|
47827
47834
|
await this.medplum.delete(`keyvalue/v1/${e}`);
|
|
47828
47835
|
}
|
|
47829
47836
|
};
|
|
47830
|
-
var
|
|
47831
|
-
|
|
47837
|
+
var Si;
|
|
47838
|
+
Si = Symbol.toStringTag;
|
|
47832
47839
|
var M = class {
|
|
47833
47840
|
constructor(e) {
|
|
47834
|
-
this[
|
|
47841
|
+
this[Si] = "ReadablePromise";
|
|
47835
47842
|
this.status = "pending";
|
|
47836
47843
|
this.suspender = e.then((t) => (this.status = "success", this.response = t, t), (t) => {
|
|
47837
47844
|
throw this.status = "error", this.error = t, t;
|
|
@@ -47865,7 +47872,7 @@ var M = class {
|
|
|
47865
47872
|
};
|
|
47866
47873
|
var We = class {
|
|
47867
47874
|
constructor(e) {
|
|
47868
|
-
this.storage = e ?? (typeof localStorage < "u" ? localStorage : new
|
|
47875
|
+
this.storage = e ?? (typeof localStorage < "u" ? localStorage : new qr());
|
|
47869
47876
|
}
|
|
47870
47877
|
clear() {
|
|
47871
47878
|
this.storage.clear();
|
|
@@ -47881,10 +47888,10 @@ var We = class {
|
|
|
47881
47888
|
return t ? JSON.parse(t) : void 0;
|
|
47882
47889
|
}
|
|
47883
47890
|
setObject(e, t) {
|
|
47884
|
-
this.setString(e, t ?
|
|
47891
|
+
this.setString(e, t ? Fn(t) : void 0);
|
|
47885
47892
|
}
|
|
47886
47893
|
};
|
|
47887
|
-
var
|
|
47894
|
+
var qr = class {
|
|
47888
47895
|
constructor() {
|
|
47889
47896
|
this.data = /* @__PURE__ */ new Map();
|
|
47890
47897
|
}
|
|
@@ -47908,7 +47915,7 @@ var Ur = class {
|
|
|
47908
47915
|
}
|
|
47909
47916
|
};
|
|
47910
47917
|
var Ve = { Event: typeof globalThis.Event < "u" ? globalThis.Event : void 0, ErrorEvent: void 0, CloseEvent: void 0 };
|
|
47911
|
-
var
|
|
47918
|
+
var bi = false;
|
|
47912
47919
|
function Js() {
|
|
47913
47920
|
if (typeof globalThis.Event > "u") throw new Error("Unable to lazy init events for ReconnectingWebSocket. globalThis.Event is not defined yet");
|
|
47914
47921
|
Ve.Event = globalThis.Event, Ve.ErrorEvent = class extends Event {
|
|
@@ -47930,15 +47937,14 @@ function Dt(r7) {
|
|
|
47930
47937
|
return new r7.constructor(r7.type, r7);
|
|
47931
47938
|
}
|
|
47932
47939
|
var Te = { maxReconnectionDelay: 1e4, minReconnectionDelay: 1e3 + Math.random() * 4e3, minUptime: 5e3, reconnectionDelayGrowFactor: 1.3, connectionTimeout: 4e3, maxRetries: 1 / 0, maxEnqueuedMessages: 1 / 0, startClosed: false, debug: false };
|
|
47933
|
-
var
|
|
47940
|
+
var Ri = false;
|
|
47934
47941
|
var Mt = class r extends H {
|
|
47935
47942
|
constructor(t, n, i = {}) {
|
|
47936
|
-
|
|
47943
|
+
bi || (Js(), bi = true);
|
|
47937
47944
|
super();
|
|
47938
47945
|
this._retryCount = -1;
|
|
47939
47946
|
this._shouldReconnect = true;
|
|
47940
47947
|
this._connectLock = false;
|
|
47941
|
-
this._binaryType = "blob";
|
|
47942
47948
|
this._closeCalled = false;
|
|
47943
47949
|
this._messageQueue = [];
|
|
47944
47950
|
this._debugLogger = console.log.bind(console);
|
|
@@ -47960,7 +47966,7 @@ var Mt = class r extends H {
|
|
|
47960
47966
|
this._handleClose = (t2) => {
|
|
47961
47967
|
this._debug("close event"), this._clearTimeouts(), this._shouldReconnect && this._connect(), this.onclose && this.onclose(t2), this.dispatchEvent(Dt(t2));
|
|
47962
47968
|
};
|
|
47963
|
-
this._url = t, this._protocols = n, this._options = i, this._options.startClosed && (this._shouldReconnect = false), this._options.debugLogger && (this._debugLogger = this._options.debugLogger), this._connect();
|
|
47969
|
+
this._url = t, this._protocols = n, this._options = i, this._options.startClosed && (this._shouldReconnect = false), this._options.binaryType ? this._binaryType = this._options.binaryType : this._binaryType = "blob", this._options.debugLogger && (this._debugLogger = this._options.debugLogger), this._connect();
|
|
47964
47970
|
}
|
|
47965
47971
|
static get CONNECTING() {
|
|
47966
47972
|
return 0;
|
|
@@ -48059,7 +48065,7 @@ var Mt = class r extends H {
|
|
|
48059
48065
|
this._connectLock = false;
|
|
48060
48066
|
return;
|
|
48061
48067
|
}
|
|
48062
|
-
!this._options.WebSocket && typeof WebSocket > "u" && !
|
|
48068
|
+
!this._options.WebSocket && typeof WebSocket > "u" && !Ri && (console.error("\u203C\uFE0F No WebSocket implementation available. You should define options.WebSocket."), Ri = true);
|
|
48063
48069
|
let i = this._options.WebSocket || WebSocket;
|
|
48064
48070
|
this._debug("connect", { url: this._url, protocols: this._protocols }), this._ws = this._protocols ? new i(this._url, this._protocols) : new i(this._url), this._ws.binaryType = this._binaryType, this._connectLock = false, this._addListeners(), this._connectTimeout = setTimeout(() => this._handleTimeout(), n);
|
|
48065
48071
|
}).catch((i) => {
|
|
@@ -48106,7 +48112,7 @@ var Ge = class extends H {
|
|
|
48106
48112
|
this.criteria.delete(e);
|
|
48107
48113
|
}
|
|
48108
48114
|
};
|
|
48109
|
-
var
|
|
48115
|
+
var jr = class {
|
|
48110
48116
|
constructor(e, t) {
|
|
48111
48117
|
this.connecting = false;
|
|
48112
48118
|
this.criteria = e, this.emitter = new Ge(e), this.refCount = 1, this.subscriptionProps = t ? { ...t } : void 0;
|
|
@@ -48168,7 +48174,7 @@ var _t = class {
|
|
|
48168
48174
|
for (let o of this.getAllCriteriaEmitters()) o.dispatchEvent({ ...i });
|
|
48169
48175
|
}
|
|
48170
48176
|
}), e.addEventListener("error", () => {
|
|
48171
|
-
let t = { type: "error", payload: new d(
|
|
48177
|
+
let t = { type: "error", payload: new d(an(new Error("WebSocket error"))) };
|
|
48172
48178
|
this.masterSubEmitter?.dispatchEvent(t);
|
|
48173
48179
|
for (let n of this.getAllCriteriaEmitters()) n.dispatchEvent({ ...t });
|
|
48174
48180
|
}), e.addEventListener("close", () => {
|
|
@@ -48258,7 +48264,7 @@ var _t = class {
|
|
|
48258
48264
|
this.masterSubEmitter && this.masterSubEmitter._addCriteria(e);
|
|
48259
48265
|
let n = this.maybeGetCriteriaEntry(e, t);
|
|
48260
48266
|
if (n) return n.refCount += 1, n.emitter;
|
|
48261
|
-
let i = new
|
|
48267
|
+
let i = new jr(e, t);
|
|
48262
48268
|
return this.addCriteriaEntry(i), this.subscribeToCriteria(i).catch(console.error), i.emitter;
|
|
48263
48269
|
}
|
|
48264
48270
|
removeCriteria(e, t) {
|
|
@@ -48285,7 +48291,7 @@ var _t = class {
|
|
|
48285
48291
|
return this.masterSubEmitter || (this.masterSubEmitter = new Ge(...Array.from(this.criteriaEntries.keys()))), this.masterSubEmitter;
|
|
48286
48292
|
}
|
|
48287
48293
|
};
|
|
48288
|
-
var Xd = "3.2.
|
|
48294
|
+
var Xd = "3.2.20-7bac0b659";
|
|
48289
48295
|
var ta = D.FHIR_JSON + ", */*; q=0.1";
|
|
48290
48296
|
var ra = "https://api.medplum.com/";
|
|
48291
48297
|
var na = 1e3;
|
|
@@ -48293,7 +48299,7 @@ var ia = 6e4;
|
|
|
48293
48299
|
var oa = 0;
|
|
48294
48300
|
var sa = 3e5;
|
|
48295
48301
|
var aa = "Binary/";
|
|
48296
|
-
var
|
|
48302
|
+
var Ci = { resourceType: "Device", id: "system", deviceName: [{ type: "model-name", name: "System" }] };
|
|
48297
48303
|
var ca = ((o) => (o.ClientCredentials = "client_credentials", o.AuthorizationCode = "authorization_code", o.RefreshToken = "refresh_token", o.JwtBearer = "urn:ietf:params:oauth:grant-type:jwt-bearer", o.TokenExchange = "urn:ietf:params:oauth:grant-type:token-exchange", o))(ca || {});
|
|
48298
48304
|
var ua = ((o) => (o.AccessToken = "urn:ietf:params:oauth:token-type:access_token", o.RefreshToken = "urn:ietf:params:oauth:token-type:refresh_token", o.IdToken = "urn:ietf:params:oauth:token-type:id_token", o.Saml1Token = "urn:ietf:params:oauth:token-type:saml1", o.Saml2Token = "urn:ietf:params:oauth:token-type:saml2", o))(ua || {});
|
|
48299
48305
|
var la = ((o) => (o.ClientSecretBasic = "client_secret_basic", o.ClientSecretPost = "client_secret_post", o.ClientSecretJwt = "client_secret_jwt", o.PrivateKeyJwt = "private_key_jwt", o.None = "none", o))(la || {});
|
|
@@ -48303,7 +48309,7 @@ var Nt = class extends H {
|
|
|
48303
48309
|
super();
|
|
48304
48310
|
this.initComplete = true;
|
|
48305
48311
|
if (t?.baseUrl && !t.baseUrl.startsWith("http")) throw new Error("Base URL must start with http or https");
|
|
48306
|
-
this.options = t ?? {}, this.fetch = t?.fetch ?? da(), this.storage = t?.storage ?? new We(), this.createPdfImpl = t?.createPdf, this.baseUrl =
|
|
48312
|
+
this.options = t ?? {}, this.fetch = t?.fetch ?? da(), this.storage = t?.storage ?? new We(), this.createPdfImpl = t?.createPdf, this.baseUrl = Cr(t?.baseUrl ?? ra), this.fhirBaseUrl = B(this.baseUrl, t?.fhirUrlPath ?? "fhir/R4"), this.authorizeUrl = B(this.baseUrl, t?.authorizeUrl ?? "oauth2/authorize"), this.tokenUrl = B(this.baseUrl, t?.tokenUrl ?? "oauth2/token"), this.logoutUrl = B(this.baseUrl, t?.logoutUrl ?? "oauth2/logout"), this.fhircastHubUrl = B(this.baseUrl, t?.fhircastHubUrl ?? "fhircast/STU3"), this.clientId = t?.clientId ?? "", this.clientSecret = t?.clientSecret ?? "", this.onUnauthenticated = t?.onUnauthenticated, this.refreshGracePeriod = t?.refreshGracePeriod ?? sa, this.cacheTime = t?.cacheTime ?? (typeof window > "u" ? oa : ia), this.cacheTime > 0 ? this.requestCache = new At(t?.resourceCacheSize ?? na) : 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(() => {
|
|
48307
48313
|
t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initComplete = true, this.dispatchEvent({ type: "storageInitialized" });
|
|
48308
48314
|
}).catch((n) => {
|
|
48309
48315
|
console.error(n), this.initComplete = true, this.dispatchEvent({ type: "storageInitFailed", payload: { error: n } });
|
|
@@ -48430,14 +48436,14 @@ var Nt = class extends H {
|
|
|
48430
48436
|
}
|
|
48431
48437
|
fhirSearchUrl(t, n) {
|
|
48432
48438
|
let i = this.fhirUrl(t);
|
|
48433
|
-
return n && (i.search =
|
|
48439
|
+
return n && (i.search = Qn(n)), i;
|
|
48434
48440
|
}
|
|
48435
48441
|
search(t, n, i) {
|
|
48436
48442
|
let o = this.fhirSearchUrl(t, n), s = "search-" + o.toString(), a2 = this.getCacheEntry(s, i);
|
|
48437
48443
|
if (a2) return a2.value;
|
|
48438
48444
|
let c = new M((async () => {
|
|
48439
48445
|
let u2 = await this.get(o, i);
|
|
48440
|
-
if (u2.entry) for (let
|
|
48446
|
+
if (u2.entry) for (let p2 of u2.entry) this.cacheResource(p2.resource);
|
|
48441
48447
|
return u2;
|
|
48442
48448
|
})());
|
|
48443
48449
|
return this.setCacheEntry(s, c), c;
|
|
@@ -48453,7 +48459,7 @@ var Nt = class extends H {
|
|
|
48453
48459
|
searchResources(t, n, i) {
|
|
48454
48460
|
let s = "searchResources-" + this.fhirSearchUrl(t, n).toString(), a2 = this.getCacheEntry(s, i);
|
|
48455
48461
|
if (a2) return a2.value;
|
|
48456
|
-
let c = new M(this.search(t, n, i).then(
|
|
48462
|
+
let c = new M(this.search(t, n, i).then(Ai));
|
|
48457
48463
|
return this.setCacheEntry(s, c), c;
|
|
48458
48464
|
}
|
|
48459
48465
|
async *searchResourcePages(t, n, i) {
|
|
@@ -48461,7 +48467,7 @@ var Nt = class extends H {
|
|
|
48461
48467
|
for (; o; ) {
|
|
48462
48468
|
let s = new URL(o).searchParams, a2 = await this.search(t, s, i), c = a2.link?.find((u2) => u2.relation === "next");
|
|
48463
48469
|
if (!a2.entry?.length && !c) break;
|
|
48464
|
-
yield
|
|
48470
|
+
yield Ai(a2), o = c?.url ? new URL(c.url) : void 0;
|
|
48465
48471
|
}
|
|
48466
48472
|
}
|
|
48467
48473
|
searchValueSet(t, n, i) {
|
|
@@ -48478,7 +48484,7 @@ var Nt = class extends H {
|
|
|
48478
48484
|
getCachedReference(t) {
|
|
48479
48485
|
let n = t.reference;
|
|
48480
48486
|
if (!n) return;
|
|
48481
|
-
if (n === "system") return
|
|
48487
|
+
if (n === "system") return Ci;
|
|
48482
48488
|
let [i, o] = n.split("/");
|
|
48483
48489
|
if (!(!i || !o)) return this.getCached(i, o);
|
|
48484
48490
|
}
|
|
@@ -48489,12 +48495,12 @@ var Nt = class extends H {
|
|
|
48489
48495
|
readReference(t, n) {
|
|
48490
48496
|
let i = t.reference;
|
|
48491
48497
|
if (!i) return new M(Promise.reject(new Error("Missing reference")));
|
|
48492
|
-
if (i === "system") return new M(Promise.resolve(
|
|
48498
|
+
if (i === "system") return new M(Promise.resolve(Ci));
|
|
48493
48499
|
let [o, s] = i.split("/");
|
|
48494
48500
|
return !o || !s ? new M(Promise.reject(new Error("Invalid reference"))) : this.readResource(o, s, n);
|
|
48495
48501
|
}
|
|
48496
48502
|
requestSchema(t) {
|
|
48497
|
-
if (
|
|
48503
|
+
if (xn(t)) return Promise.resolve();
|
|
48498
48504
|
let n = t + "-requestSchema", i = this.getCacheEntry(n, void 0);
|
|
48499
48505
|
if (i) return i.value;
|
|
48500
48506
|
let o = new M((async () => {
|
|
@@ -48540,12 +48546,12 @@ var Nt = class extends H {
|
|
|
48540
48546
|
}
|
|
48541
48547
|
}`.replace(/\s+/g, " "), a2 = await this.graphql(s);
|
|
48542
48548
|
cr(a2.data.StructureDefinitionList);
|
|
48543
|
-
for (let c of a2.data.SearchParameterList)
|
|
48549
|
+
for (let c of a2.data.SearchParameterList) Ar(c);
|
|
48544
48550
|
})());
|
|
48545
48551
|
return this.setCacheEntry(n, o), o;
|
|
48546
48552
|
}
|
|
48547
48553
|
requestProfileSchema(t, n) {
|
|
48548
|
-
if (!n?.expandProfile &&
|
|
48554
|
+
if (!n?.expandProfile && Sn(t)) return Promise.resolve();
|
|
48549
48555
|
let i = t + "-requestSchema" + (n?.expandProfile ? "-nested" : ""), o = this.getCacheEntry(i, void 0);
|
|
48550
48556
|
if (o) return o.value;
|
|
48551
48557
|
let s = new M((async () => {
|
|
@@ -48586,19 +48592,19 @@ var Nt = class extends H {
|
|
|
48586
48592
|
return s || (s = t), this.cacheResource(s), this.invalidateUrl(this.fhirUrl(t.resourceType, t.id, "_history")), this.invalidateSearches(t.resourceType), s;
|
|
48587
48593
|
}
|
|
48588
48594
|
async createAttachment(t, n, i, o, s) {
|
|
48589
|
-
let a2 =
|
|
48595
|
+
let a2 = Oi(t, n, i, o), c = s ?? (typeof n == "object" ? n : {}), u2 = await this.createBinary(a2, c);
|
|
48590
48596
|
return { contentType: a2.contentType, url: u2.url, title: a2.filename };
|
|
48591
48597
|
}
|
|
48592
48598
|
createBinary(t, n, i, o, s) {
|
|
48593
|
-
let a2 =
|
|
48594
|
-
return m2 && _e.searchParams.set("_filename", m2), v?.reference && this.setRequestHeader(c, "X-Security-Context", v.reference), Q ? this.uploadwithProgress(_e, u2,
|
|
48599
|
+
let a2 = Oi(t, n, i, o), c = s ?? (typeof n == "object" ? n : {}), { data: u2, contentType: p2, filename: m2, securityContext: v, onProgress: Q } = a2, _e = this.fhirUrl("Binary");
|
|
48600
|
+
return m2 && _e.searchParams.set("_filename", m2), v?.reference && this.setRequestHeader(c, "X-Security-Context", v.reference), Q ? this.uploadwithProgress(_e, u2, p2, Q, c) : this.post(_e, u2, p2, c);
|
|
48595
48601
|
}
|
|
48596
48602
|
uploadwithProgress(t, n, i, o, s) {
|
|
48597
48603
|
return new Promise((a2, c) => {
|
|
48598
|
-
let u2 = new XMLHttpRequest(),
|
|
48599
|
-
s?.signal?.addEventListener("abort",
|
|
48604
|
+
let u2 = new XMLHttpRequest(), p2 = () => u2.abort();
|
|
48605
|
+
s?.signal?.addEventListener("abort", p2);
|
|
48600
48606
|
let m2 = (v) => {
|
|
48601
|
-
s?.signal?.removeEventListener("abort",
|
|
48607
|
+
s?.signal?.removeEventListener("abort", p2), v instanceof Error ? c(v) : a2(v);
|
|
48602
48608
|
};
|
|
48603
48609
|
if (u2.responseType = "json", u2.onabort = () => m2(new DOMException("Request aborted", "AbortError")), u2.onerror = () => m2(new Error("Request error")), o && (u2.upload.onprogress = (v) => o(v), u2.upload.onload = (v) => o(v)), u2.onload = () => {
|
|
48604
48610
|
u2.status >= 200 && u2.status < 300 ? m2(u2.response) : m2(new d(Xe(u2.response || u2.statusText)));
|
|
@@ -48611,7 +48617,7 @@ var Nt = class extends H {
|
|
|
48611
48617
|
}
|
|
48612
48618
|
async createPdf(t, n, i, o) {
|
|
48613
48619
|
if (!this.createPdfImpl) throw new Error("PDF creation not enabled");
|
|
48614
|
-
let s = ha(t, n, i, o), a2 = typeof n == "object" ? n : {}, { docDefinition: c, tableLayouts: u2, fonts:
|
|
48620
|
+
let s = ha(t, n, i, o), a2 = typeof n == "object" ? n : {}, { docDefinition: c, tableLayouts: u2, fonts: p2, ...m2 } = s, v = await this.createPdfImpl(c, u2, p2), Q = { ...m2, data: v, contentType: "application/pdf" };
|
|
48615
48621
|
return this.createBinary(Q, a2);
|
|
48616
48622
|
}
|
|
48617
48623
|
createComment(t, n, i) {
|
|
@@ -48670,7 +48676,7 @@ var Nt = class extends H {
|
|
|
48670
48676
|
return this.accessToken;
|
|
48671
48677
|
}
|
|
48672
48678
|
setAccessToken(t, n) {
|
|
48673
|
-
this.accessToken = t, this.refreshToken = n, this.accessTokenExpires =
|
|
48679
|
+
this.accessToken = t, this.refreshToken = n, this.accessTokenExpires = Ti(t), this.medplumServer = xi(t);
|
|
48674
48680
|
}
|
|
48675
48681
|
getLogins() {
|
|
48676
48682
|
return this.storage.getObject("logins") ?? [];
|
|
@@ -48763,14 +48769,14 @@ var Nt = class extends H {
|
|
|
48763
48769
|
if (s.status === 401) return this.handleUnauthenticated(t, n, i);
|
|
48764
48770
|
if (s.status === 204 || s.status === 304) return;
|
|
48765
48771
|
let c = s.headers.get("content-type")?.includes("json");
|
|
48766
|
-
if (s.status === 404 && !c) throw new d(
|
|
48772
|
+
if (s.status === 404 && !c) throw new d(on);
|
|
48767
48773
|
let u2 = await this.parseBody(s, c);
|
|
48768
48774
|
if (s.status === 200 && i.followRedirectOnOk || s.status === 201 && i.followRedirectOnCreated) {
|
|
48769
|
-
let
|
|
48770
|
-
if (
|
|
48775
|
+
let p2 = await wi(s, u2);
|
|
48776
|
+
if (p2) return this.request("GET", p2, { ...i, body: void 0 });
|
|
48771
48777
|
}
|
|
48772
48778
|
if (s.status === 202 && i.pollStatusOnAccepted) {
|
|
48773
|
-
let m2 = await
|
|
48779
|
+
let m2 = await wi(s, u2) ?? o.statusUrl;
|
|
48774
48780
|
if (m2) return this.pollStatus(m2, i, o);
|
|
48775
48781
|
}
|
|
48776
48782
|
if (s.status >= 400) throw new d(Xe(u2));
|
|
@@ -48797,7 +48803,7 @@ var Nt = class extends H {
|
|
|
48797
48803
|
} catch (a2) {
|
|
48798
48804
|
if (a2.message === "Failed to fetch" && s === 0 && this.dispatchEvent({ type: "offline" }), a2.name === "AbortError" || s === i) throw a2;
|
|
48799
48805
|
}
|
|
48800
|
-
await
|
|
48806
|
+
await br(o);
|
|
48801
48807
|
}
|
|
48802
48808
|
throw new Error("Unreachable");
|
|
48803
48809
|
}
|
|
@@ -48815,7 +48821,7 @@ var Nt = class extends H {
|
|
|
48815
48821
|
if (i.pollCount === void 0) n.headers && typeof n.headers == "object" && "Prefer" in n.headers && (o.headers = { ...n.headers }, delete o.headers.Prefer), i.statusUrl = t, i.pollCount = 1;
|
|
48816
48822
|
else {
|
|
48817
48823
|
let s = n.pollStatusPeriod ?? 1e3;
|
|
48818
|
-
await
|
|
48824
|
+
await br(s), i.pollCount++;
|
|
48819
48825
|
}
|
|
48820
48826
|
return this.request("GET", t, o, i);
|
|
48821
48827
|
}
|
|
@@ -48855,20 +48861,20 @@ var Nt = class extends H {
|
|
|
48855
48861
|
return this.refresh() ? this.request(t, n, i) : (this.clear(), this.onUnauthenticated && this.onUnauthenticated(), Promise.reject(new d(Ee)));
|
|
48856
48862
|
}
|
|
48857
48863
|
async startPkce() {
|
|
48858
|
-
let t =
|
|
48864
|
+
let t = _r();
|
|
48859
48865
|
sessionStorage.setItem("pkceState", t);
|
|
48860
|
-
let n =
|
|
48866
|
+
let n = _r().slice(0, 128);
|
|
48861
48867
|
sessionStorage.setItem("codeVerifier", n);
|
|
48862
|
-
let i = await
|
|
48868
|
+
let i = await di(n), o = jn(i).replaceAll("+", "-").replaceAll("/", "_").replaceAll("=", "");
|
|
48863
48869
|
return sessionStorage.setItem("codeChallenge", o), { codeChallengeMethod: "S256", codeChallenge: o };
|
|
48864
48870
|
}
|
|
48865
48871
|
async requestAuthorization(t) {
|
|
48866
48872
|
let n = await this.ensureCodeChallenge(t ?? {}), i = new URL(this.authorizeUrl);
|
|
48867
|
-
i.searchParams.set("response_type", "code"), i.searchParams.set("state", sessionStorage.getItem("pkceState")), i.searchParams.set("client_id", n.clientId ?? this.clientId), i.searchParams.set("redirect_uri", n.redirectUri ??
|
|
48873
|
+
i.searchParams.set("response_type", "code"), i.searchParams.set("state", sessionStorage.getItem("pkceState")), i.searchParams.set("client_id", n.clientId ?? this.clientId), i.searchParams.set("redirect_uri", n.redirectUri ?? Pi()), i.searchParams.set("code_challenge_method", n.codeChallengeMethod), i.searchParams.set("code_challenge", n.codeChallenge), i.searchParams.set("scope", n.scope ?? "openid profile"), window.location.assign(i.toString());
|
|
48868
48874
|
}
|
|
48869
48875
|
processCode(t, n) {
|
|
48870
48876
|
let i = new URLSearchParams();
|
|
48871
|
-
if (i.set("grant_type", "authorization_code"), i.set("code", t), i.set("client_id", n?.clientId ?? this.clientId), i.set("redirect_uri", n?.redirectUri ??
|
|
48877
|
+
if (i.set("grant_type", "authorization_code"), i.set("code", t), i.set("client_id", n?.clientId ?? this.clientId), i.set("redirect_uri", n?.redirectUri ?? Pi()), typeof sessionStorage < "u") {
|
|
48872
48878
|
let o = sessionStorage.getItem("codeVerifier");
|
|
48873
48879
|
o && i.set("code_verifier", o);
|
|
48874
48880
|
}
|
|
@@ -48900,25 +48906,25 @@ var Nt = class extends H {
|
|
|
48900
48906
|
return n.append("grant_type", "client_credentials"), n.append("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"), n.append("client_assertion", t), this.fetchTokens(n);
|
|
48901
48907
|
}
|
|
48902
48908
|
setBasicAuth(t, n) {
|
|
48903
|
-
this.clientId = t, this.clientSecret = n, this.basicAuth =
|
|
48909
|
+
this.clientId = t, this.clientSecret = n, this.basicAuth = pi(t + ":" + n);
|
|
48904
48910
|
}
|
|
48905
48911
|
async fhircastSubscribe(t, n) {
|
|
48906
48912
|
if (!(typeof t == "string" && t !== "")) throw new d(h("Invalid topic provided. Topic must be a valid string."));
|
|
48907
48913
|
if (!(typeof n == "object" && Array.isArray(n) && n.length > 0)) throw new d(h("Invalid events provided. Events must be an array of event names containing at least one event."));
|
|
48908
|
-
let i = { channelType: "websocket", mode: "subscribe", topic: t, events: n }, s = (await this.post(this.fhircastHubUrl,
|
|
48914
|
+
let i = { channelType: "websocket", mode: "subscribe", topic: t, events: n }, s = (await this.post(this.fhircastHubUrl, Ur(i), D.FORM_URL_ENCODED))["hub.channel.endpoint"];
|
|
48909
48915
|
if (!s) throw new Error("Invalid response!");
|
|
48910
48916
|
return i.endpoint = s, i;
|
|
48911
48917
|
}
|
|
48912
48918
|
async fhircastUnsubscribe(t) {
|
|
48913
48919
|
if (!It(t)) throw new d(h("Invalid topic or subscriptionRequest. SubscriptionRequest must be an object."));
|
|
48914
48920
|
if (!(t.endpoint && typeof t.endpoint == "string" && t.endpoint.startsWith("ws"))) throw new d(h("Provided subscription request must have an endpoint in order to unsubscribe."));
|
|
48915
|
-
t.mode = "unsubscribe", await this.post(this.fhircastHubUrl,
|
|
48921
|
+
t.mode = "unsubscribe", await this.post(this.fhircastHubUrl, Ur(t), D.FORM_URL_ENCODED);
|
|
48916
48922
|
}
|
|
48917
48923
|
fhircastConnect(t) {
|
|
48918
48924
|
return new Ot(t);
|
|
48919
48925
|
}
|
|
48920
48926
|
async fhircastPublish(t, n, i, o) {
|
|
48921
|
-
return
|
|
48927
|
+
return hi(n) ? this.post(this.fhircastHubUrl, Br(t, n, i, o), D.JSON) : (yi(n), this.post(this.fhircastHubUrl, Br(t, n, i), D.JSON));
|
|
48922
48928
|
}
|
|
48923
48929
|
async fhircastGetContext(t) {
|
|
48924
48930
|
return this.get(`${this.fhircastHubUrl}/${t}`);
|
|
@@ -48939,9 +48945,9 @@ var Nt = class extends H {
|
|
|
48939
48945
|
this.clearActiveLogin();
|
|
48940
48946
|
try {
|
|
48941
48947
|
let a2 = await o.json();
|
|
48942
|
-
throw new d(
|
|
48948
|
+
throw new d(E(a2.error_description));
|
|
48943
48949
|
} catch (a2) {
|
|
48944
|
-
throw new d(
|
|
48950
|
+
throw new d(E("Failed to fetch tokens"), a2);
|
|
48945
48951
|
}
|
|
48946
48952
|
}
|
|
48947
48953
|
let s = await o.json();
|
|
@@ -48949,9 +48955,9 @@ var Nt = class extends H {
|
|
|
48949
48955
|
}
|
|
48950
48956
|
async verifyTokens(t) {
|
|
48951
48957
|
let n = t.access_token;
|
|
48952
|
-
if (
|
|
48958
|
+
if (vi(n)) {
|
|
48953
48959
|
let i = kt(n);
|
|
48954
|
-
if (Date.now() >= i.exp * 1e3) throw this.clearActiveLogin(), new d(
|
|
48960
|
+
if (Date.now() >= i.exp * 1e3) throw this.clearActiveLogin(), new d(sn);
|
|
48955
48961
|
if (i.cid) {
|
|
48956
48962
|
if (i.cid !== this.clientId) throw this.clearActiveLogin(), new d(tr);
|
|
48957
48963
|
} else if (this.clientId && i.client_id !== this.clientId) throw this.clearActiveLogin(), new d(tr);
|
|
@@ -48974,7 +48980,7 @@ var Nt = class extends H {
|
|
|
48974
48980
|
}
|
|
48975
48981
|
}
|
|
48976
48982
|
getSubscriptionManager() {
|
|
48977
|
-
return this.subscriptionManager || (this.subscriptionManager = new _t(this,
|
|
48983
|
+
return this.subscriptionManager || (this.subscriptionManager = new _t(this, Hn(this.baseUrl, "/ws/subscriptions-r4"))), this.subscriptionManager;
|
|
48978
48984
|
}
|
|
48979
48985
|
subscribeToCriteria(t, n) {
|
|
48980
48986
|
return this.getSubscriptionManager().addCriteria(t, n);
|
|
@@ -48990,24 +48996,24 @@ function da() {
|
|
|
48990
48996
|
if (!globalThis.fetch) throw new Error("Fetch not available in this environment");
|
|
48991
48997
|
return globalThis.fetch.bind(globalThis);
|
|
48992
48998
|
}
|
|
48993
|
-
function
|
|
48999
|
+
function Pi() {
|
|
48994
49000
|
return typeof window > "u" ? "" : window.location.protocol + "//" + window.location.host + "/";
|
|
48995
49001
|
}
|
|
48996
|
-
async function
|
|
49002
|
+
async function wi(r7, e) {
|
|
48997
49003
|
let t = r7.headers.get("content-location");
|
|
48998
49004
|
if (t) return t;
|
|
48999
49005
|
let n = r7.headers.get("location");
|
|
49000
49006
|
if (n) return n;
|
|
49001
49007
|
if (be(e) && e.issue?.[0]?.diagnostics) return e.issue[0].diagnostics;
|
|
49002
49008
|
}
|
|
49003
|
-
function
|
|
49009
|
+
function Ai(r7) {
|
|
49004
49010
|
let e = r7.entry?.map((t) => t.resource) ?? [];
|
|
49005
49011
|
return Object.assign(e, { bundle: r7 });
|
|
49006
49012
|
}
|
|
49007
49013
|
function fa(r7) {
|
|
49008
49014
|
return R(r7) && "data" in r7 && "contentType" in r7;
|
|
49009
49015
|
}
|
|
49010
|
-
function
|
|
49016
|
+
function Oi(r7, e, t, n) {
|
|
49011
49017
|
return fa(r7) ? r7 : { data: r7, filename: e, contentType: t, onProgress: n };
|
|
49012
49018
|
}
|
|
49013
49019
|
function ma(r7) {
|
|
@@ -49036,7 +49042,7 @@ var se = class {
|
|
|
49036
49042
|
return this.componentSeparator + this.repetitionSeparator + this.escapeCharacter + this.subcomponentSeparator;
|
|
49037
49043
|
}
|
|
49038
49044
|
};
|
|
49039
|
-
var
|
|
49045
|
+
var Hi = class r2 {
|
|
49040
49046
|
constructor(e, t = new se()) {
|
|
49041
49047
|
this.context = t, this.segments = e;
|
|
49042
49048
|
}
|
|
@@ -49077,7 +49083,7 @@ var Wi = class r2 {
|
|
|
49077
49083
|
};
|
|
49078
49084
|
var Ke = class r3 {
|
|
49079
49085
|
constructor(e, t = new se()) {
|
|
49080
|
-
this.context = t,
|
|
49086
|
+
this.context = t, Un(e) ? this.fields = e.map((n) => Me.parse(n, t)) : this.fields = e, this.name = this.fields[0].components[0][0];
|
|
49081
49087
|
}
|
|
49082
49088
|
get(e) {
|
|
49083
49089
|
return this.fields[e];
|
|
@@ -49122,8 +49128,8 @@ function Xa(r7) {
|
|
|
49122
49128
|
let e = r7 instanceof Date ? r7 : new Date(r7), n = e.toISOString().replace(/[-:T]/g, "").replace(/(\.\d+)?Z$/, ""), i = e.getUTCMilliseconds();
|
|
49123
49129
|
return i > 0 && (n += "." + i.toString()), n;
|
|
49124
49130
|
}
|
|
49125
|
-
var
|
|
49126
|
-
var
|
|
49131
|
+
var zr = ((o) => (o[o.NONE = 0] = "NONE", o[o.ERROR = 1] = "ERROR", o[o.WARN = 2] = "WARN", o[o.INFO = 3] = "INFO", o[o.DEBUG = 4] = "DEBUG", o))(zr || {});
|
|
49132
|
+
var Qi = class r5 {
|
|
49127
49133
|
constructor(e, t = {}, n = 3, i) {
|
|
49128
49134
|
this.write = e;
|
|
49129
49135
|
this.metadata = t;
|
|
@@ -49153,11 +49159,11 @@ var Gi = class r5 {
|
|
|
49153
49159
|
}
|
|
49154
49160
|
log(e, t, n) {
|
|
49155
49161
|
e > this.level || (n instanceof Error && (n = { error: n.toString(), stack: n.stack?.split(`
|
|
49156
|
-
`) }), this.write(JSON.stringify({ level:
|
|
49162
|
+
`) }), this.write(JSON.stringify({ level: zr[e], timestamp: (/* @__PURE__ */ new Date()).toISOString(), msg: this.prefix ? `${this.prefix}${t}` : t, ...n, ...this.metadata })));
|
|
49157
49163
|
}
|
|
49158
49164
|
};
|
|
49159
49165
|
function dm(r7) {
|
|
49160
|
-
let e =
|
|
49166
|
+
let e = zr[r7.toUpperCase()];
|
|
49161
49167
|
if (e === void 0) throw new Error(`Invalid log level: ${r7}`);
|
|
49162
49168
|
return e;
|
|
49163
49169
|
}
|
|
@@ -49173,7 +49179,7 @@ function ac(r7) {
|
|
|
49173
49179
|
if (!n.name) throw new Error("Asset missing name");
|
|
49174
49180
|
}
|
|
49175
49181
|
}
|
|
49176
|
-
async function
|
|
49182
|
+
async function zi(r7) {
|
|
49177
49183
|
let e = Qt.get(r7 ?? "latest");
|
|
49178
49184
|
if (!e) {
|
|
49179
49185
|
let t = r7 ? `tags/v${r7}` : "latest", n = await fetch(`${sc}/${t}`);
|
|
@@ -49197,14 +49203,14 @@ function cc(r7) {
|
|
|
49197
49203
|
async function Pm(r7) {
|
|
49198
49204
|
if (!cc(r7)) return false;
|
|
49199
49205
|
try {
|
|
49200
|
-
await
|
|
49206
|
+
await zi(r7);
|
|
49201
49207
|
} catch {
|
|
49202
49208
|
return false;
|
|
49203
49209
|
}
|
|
49204
49210
|
return true;
|
|
49205
49211
|
}
|
|
49206
49212
|
async function wm() {
|
|
49207
|
-
let r7 = await
|
|
49213
|
+
let r7 = await zi();
|
|
49208
49214
|
if (!r7.tag_name.startsWith("v")) throw new Error(`Invalid release name found. Release tag '${r7.tag_name}' did not start with 'v'`);
|
|
49209
49215
|
return r7.tag_name.slice(1);
|
|
49210
49216
|
}
|
|
@@ -49237,12 +49243,12 @@ var r6 = class extends Event {
|
|
|
49237
49243
|
this.error = e;
|
|
49238
49244
|
}
|
|
49239
49245
|
};
|
|
49240
|
-
var
|
|
49246
|
+
var l2 = class extends Event {
|
|
49241
49247
|
constructor() {
|
|
49242
49248
|
super("close");
|
|
49243
49249
|
}
|
|
49244
49250
|
};
|
|
49245
|
-
var
|
|
49251
|
+
var p = class extends a {
|
|
49246
49252
|
constructor(e, n = "utf-8") {
|
|
49247
49253
|
super();
|
|
49248
49254
|
this.socket = e;
|
|
@@ -49252,7 +49258,7 @@ var p2 = class extends a {
|
|
|
49252
49258
|
e.on("data", (s) => {
|
|
49253
49259
|
try {
|
|
49254
49260
|
if (this.appendData(s), s.at(-2) === 28 && s.at(-1) === 13) {
|
|
49255
|
-
let o = Buffer.concat(this.chunks), i = o.subarray(1, o.length - 2), f2 = (0, import_iconv_lite.decode)(i, this.encoding), g2 =
|
|
49261
|
+
let o = Buffer.concat(this.chunks), i = o.subarray(1, o.length - 2), f2 = (0, import_iconv_lite.decode)(i, this.encoding), g2 = Hi.parse(f2);
|
|
49256
49262
|
this.dispatchEvent(new d2(this, g2)), this.resetBuffer();
|
|
49257
49263
|
}
|
|
49258
49264
|
} catch (o) {
|
|
@@ -49286,7 +49292,7 @@ var p2 = class extends a {
|
|
|
49286
49292
|
});
|
|
49287
49293
|
}
|
|
49288
49294
|
close() {
|
|
49289
|
-
this.socket.end(), this.socket.destroy(), this.dispatchEvent(new
|
|
49295
|
+
this.socket.end(), this.socket.destroy(), this.dispatchEvent(new l2());
|
|
49290
49296
|
}
|
|
49291
49297
|
appendData(e) {
|
|
49292
49298
|
this.chunks.push(e);
|
|
@@ -49303,7 +49309,7 @@ var m = class extends a {
|
|
|
49303
49309
|
return this.connection ? Promise.resolve(this.connection) : new Promise((t, e) => {
|
|
49304
49310
|
let n = (0, import_node_net.connect)({ host: this.host, port: this.port, keepAlive: this.keepAlive }, () => {
|
|
49305
49311
|
let s;
|
|
49306
|
-
this.connection = s = new
|
|
49312
|
+
this.connection = s = new p(n, this.encoding), n.off("error", e), s.addEventListener("close", () => this.dispatchEvent(new l2())), s.addEventListener("error", (o) => this.dispatchEvent(new r6(o.error))), t(this.connection);
|
|
49307
49313
|
});
|
|
49308
49314
|
n.on("error", e);
|
|
49309
49315
|
});
|
|
@@ -49324,7 +49330,7 @@ var u = class {
|
|
|
49324
49330
|
}
|
|
49325
49331
|
start(t, e) {
|
|
49326
49332
|
let n = import_node_net2.default.createServer((s) => {
|
|
49327
|
-
let o = new
|
|
49333
|
+
let o = new p(s, e);
|
|
49328
49334
|
this.handler(o);
|
|
49329
49335
|
});
|
|
49330
49336
|
n.listen(t), this.server = n;
|
|
@@ -49581,7 +49587,7 @@ var AgentHl7Channel = class extends BaseChannel {
|
|
|
49581
49587
|
sendToRemote(msg) {
|
|
49582
49588
|
const connection = this.connections.get(msg.remote);
|
|
49583
49589
|
if (connection) {
|
|
49584
|
-
connection.hl7Connection.send(
|
|
49590
|
+
connection.hl7Connection.send(Hi.parse(msg.body));
|
|
49585
49591
|
}
|
|
49586
49592
|
}
|
|
49587
49593
|
handleNewConnection(connection) {
|
|
@@ -49630,7 +49636,7 @@ var UPGRADER_LOG_PATH = (0, import_node_path2.resolve)(
|
|
|
49630
49636
|
);
|
|
49631
49637
|
var RELEASES_PATH = (0, import_node_path2.resolve)(__dirname);
|
|
49632
49638
|
async function downloadRelease(version, path) {
|
|
49633
|
-
const release = await
|
|
49639
|
+
const release = await zi(version);
|
|
49634
49640
|
const downloadUrl = parseDownloadUrl(release, (0, import_node_os2.platform)());
|
|
49635
49641
|
const { body } = await fetch(downloadUrl);
|
|
49636
49642
|
if (!body) {
|
|
@@ -49690,6 +49696,7 @@ async function execAsync(command, options) {
|
|
|
49690
49696
|
});
|
|
49691
49697
|
}
|
|
49692
49698
|
var DEFAULT_PING_TIMEOUT = 3600;
|
|
49699
|
+
var MAX_MISSED_HEARTBEATS = 1;
|
|
49693
49700
|
var App = class _App {
|
|
49694
49701
|
constructor(medplum, agentId, logLevel) {
|
|
49695
49702
|
this.medplum = medplum;
|
|
@@ -49700,11 +49707,12 @@ var App = class _App {
|
|
|
49700
49707
|
this.hl7Queue = [];
|
|
49701
49708
|
this.hl7Clients = /* @__PURE__ */ new Map();
|
|
49702
49709
|
this.heartbeatPeriod = 10 * 1e3;
|
|
49710
|
+
this.outstandingHeartbeats = 0;
|
|
49703
49711
|
this.live = false;
|
|
49704
49712
|
this.shutdown = false;
|
|
49705
49713
|
this.keepAlive = false;
|
|
49706
49714
|
_App.instance = this;
|
|
49707
|
-
this.log = new
|
|
49715
|
+
this.log = new Qi((msg) => console.log(msg), void 0, logLevel);
|
|
49708
49716
|
}
|
|
49709
49717
|
async start() {
|
|
49710
49718
|
this.log.info("Medplum service starting...");
|
|
@@ -49748,29 +49756,34 @@ var App = class _App {
|
|
|
49748
49756
|
this.heartbeatTimer = setInterval(() => this.heartbeat(), this.heartbeatPeriod);
|
|
49749
49757
|
}
|
|
49750
49758
|
async heartbeat() {
|
|
49751
|
-
if (!
|
|
49759
|
+
if (!this.webSocket) {
|
|
49752
49760
|
this.log.warn("WebSocket not connected");
|
|
49753
49761
|
this.connectWebSocket().catch(this.log.error);
|
|
49754
49762
|
return;
|
|
49755
49763
|
}
|
|
49756
|
-
if (this.
|
|
49764
|
+
if (this.live) {
|
|
49765
|
+
if (this.outstandingHeartbeats > MAX_MISSED_HEARTBEATS) {
|
|
49766
|
+
this.outstandingHeartbeats = 0;
|
|
49767
|
+
this.webSocket.reconnect();
|
|
49768
|
+
this.log.info("Disconnected from Medplum server. Attempting to reconnect...");
|
|
49769
|
+
return;
|
|
49770
|
+
}
|
|
49771
|
+
this.outstandingHeartbeats += 1;
|
|
49757
49772
|
await this.sendToWebSocket({ type: "agent:heartbeat:request" });
|
|
49758
49773
|
}
|
|
49759
49774
|
}
|
|
49760
49775
|
async connectWebSocket() {
|
|
49761
|
-
if (this.reconnectTimer) {
|
|
49762
|
-
clearTimeout(this.reconnectTimer);
|
|
49763
|
-
this.reconnectTimer = void 0;
|
|
49764
|
-
}
|
|
49765
49776
|
const webSocketUrl = new URL(this.medplum.getBaseUrl());
|
|
49766
49777
|
webSocketUrl.protocol = webSocketUrl.protocol === "https:" ? "wss:" : "ws:";
|
|
49767
49778
|
webSocketUrl.pathname = "/ws/agent";
|
|
49768
49779
|
this.log.info(`Connecting to WebSocket: ${webSocketUrl.href}`);
|
|
49769
|
-
this.webSocket = new
|
|
49770
|
-
|
|
49771
|
-
|
|
49780
|
+
this.webSocket = new Mt(webSocketUrl.toString(), void 0, {
|
|
49781
|
+
WebSocket: wrapper_default,
|
|
49782
|
+
binaryType: "nodebuffer"
|
|
49783
|
+
});
|
|
49784
|
+
this.webSocket.addEventListener("error", () => {
|
|
49772
49785
|
if (!this.shutdown) {
|
|
49773
|
-
this.log.error(
|
|
49786
|
+
this.log.error("WebSocket closed due to an error");
|
|
49774
49787
|
}
|
|
49775
49788
|
});
|
|
49776
49789
|
this.webSocket.addEventListener("open", async () => {
|
|
@@ -49781,11 +49794,9 @@ var App = class _App {
|
|
|
49781
49794
|
});
|
|
49782
49795
|
});
|
|
49783
49796
|
this.webSocket.addEventListener("close", () => {
|
|
49784
|
-
if (!this.shutdown) {
|
|
49785
|
-
this.webSocket = void 0;
|
|
49797
|
+
if (!this.shutdown && this.live) {
|
|
49786
49798
|
this.live = false;
|
|
49787
49799
|
this.log.info("WebSocket closed");
|
|
49788
|
-
this.reconnectTimer = setTimeout(() => this.connectWebSocket(), 1e3);
|
|
49789
49800
|
}
|
|
49790
49801
|
});
|
|
49791
49802
|
this.webSocket.addEventListener("message", async (e) => {
|
|
@@ -49800,11 +49811,14 @@ var App = class _App {
|
|
|
49800
49811
|
case "agent:connect:response":
|
|
49801
49812
|
this.live = true;
|
|
49802
49813
|
this.startWebSocketWorker();
|
|
49814
|
+
this.log.info("Successfully connected to Medplum server");
|
|
49803
49815
|
break;
|
|
49804
49816
|
case "agent:heartbeat:request":
|
|
49817
|
+
this.outstandingHeartbeats = 0;
|
|
49805
49818
|
await this.sendToWebSocket({ type: "agent:heartbeat:response", version: Xd });
|
|
49806
49819
|
break;
|
|
49807
49820
|
case "agent:heartbeat:response":
|
|
49821
|
+
this.outstandingHeartbeats = 0;
|
|
49808
49822
|
break;
|
|
49809
49823
|
// @ts-expect-error - Deprecated message type
|
|
49810
49824
|
case "transmit":
|
|
@@ -49999,10 +50013,6 @@ var App = class _App {
|
|
|
49999
50013
|
clearInterval(this.heartbeatTimer);
|
|
50000
50014
|
this.heartbeatTimer = void 0;
|
|
50001
50015
|
}
|
|
50002
|
-
if (this.reconnectTimer) {
|
|
50003
|
-
clearTimeout(this.reconnectTimer);
|
|
50004
|
-
this.reconnectTimer = void 0;
|
|
50005
|
-
}
|
|
50006
50016
|
if (this.webSocket) {
|
|
50007
50017
|
this.webSocket.close();
|
|
50008
50018
|
this.webSocket = void 0;
|
|
@@ -50263,7 +50273,7 @@ ${result}`);
|
|
|
50263
50273
|
});
|
|
50264
50274
|
}
|
|
50265
50275
|
}
|
|
50266
|
-
client.sendAndWait(
|
|
50276
|
+
client.sendAndWait(Hi.parse(message.body)).then((response) => {
|
|
50267
50277
|
this.log.info(`Response: ${response.toString().replaceAll("\r", "\n")}`);
|
|
50268
50278
|
this.addToWebSocketQueue({
|
|
50269
50279
|
type: "agent:transmit:response",
|
|
@@ -50360,7 +50370,7 @@ async function upgraderMain(argv) {
|
|
|
50360
50370
|
if ((0, import_node_os4.platform)() !== "win32") {
|
|
50361
50371
|
throw new Error(`Unsupported platform: ${(0, import_node_os4.platform)()}. Agent upgrader currently only supports Windows`);
|
|
50362
50372
|
}
|
|
50363
|
-
const globalLogger = new
|
|
50373
|
+
const globalLogger = new Qi((msg) => console.log(msg));
|
|
50364
50374
|
if (!import_node_process2.default.send) {
|
|
50365
50375
|
globalLogger.error("Upgrader not started as a child process with Node IPC enabled. Aborting...");
|
|
50366
50376
|
import_node_process2.default.exit(1);
|
|
@@ -50447,6 +50457,9 @@ dcmjs/build/dcmjs.js:
|
|
|
50447
50457
|
* @license MIT
|
|
50448
50458
|
*)
|
|
50449
50459
|
|
|
50460
|
+
safe-buffer/index.js:
|
|
50461
|
+
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
50462
|
+
|
|
50450
50463
|
dcmjs-dimse/build/dcmjs-dimse.min.js:
|
|
50451
50464
|
(*! dcmjs-dimse - 0.1.30 - 2024-10-26 | (c) 2021-2024 Pantelis Georgiadis | https://github.com/PantelisGeorgiadis/dcmjs-dimse *)
|
|
50452
50465
|
*/
|