@weng-lab/genomebrowser 1.8.5-beta.3 → 1.8.5
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/genomebrowser.es.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import Te, { useMemo as ce, createContext as Xs, useContext as Bt, useEffect as Ee, useRef as Ie, useState as be, useCallback as at, createElement as oi, Fragment as Ks, useLayoutEffect as Js } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { useApolloClient as Qs, ApolloProvider as ec, useQuery as tc } from "@apollo/client/react";
|
|
3
|
+
import { gql as lr, ApolloClient as rc } from "@apollo/client/core";
|
|
3
4
|
import Vo, { createPortal as Zo } from "react-dom";
|
|
5
|
+
import { InMemoryCache as nc } from "@apollo/client/cache";
|
|
6
|
+
import { HttpLink as ic } from "@apollo/client/link/http";
|
|
4
7
|
function Xo(e) {
|
|
5
8
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
9
|
}
|
|
@@ -76,9 +79,9 @@ function sc() {
|
|
|
76
79
|
switch (I) {
|
|
77
80
|
case w:
|
|
78
81
|
return "Fragment";
|
|
79
|
-
case E:
|
|
80
|
-
return "Profiler";
|
|
81
82
|
case L:
|
|
83
|
+
return "Profiler";
|
|
84
|
+
case E:
|
|
82
85
|
return "StrictMode";
|
|
83
86
|
case _:
|
|
84
87
|
return "Suspense";
|
|
@@ -91,7 +94,7 @@ function sc() {
|
|
|
91
94
|
switch (typeof I.tag == "number" && console.error(
|
|
92
95
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
93
96
|
), I.$$typeof) {
|
|
94
|
-
case
|
|
97
|
+
case D:
|
|
95
98
|
return "Portal";
|
|
96
99
|
case d:
|
|
97
100
|
return I.displayName || "Context";
|
|
@@ -261,7 +264,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
261
264
|
function b(I) {
|
|
262
265
|
return typeof I == "object" && I !== null && I.$$typeof === k;
|
|
263
266
|
}
|
|
264
|
-
var v = Te, k = Symbol.for("react.transitional.element"),
|
|
267
|
+
var v = Te, k = Symbol.for("react.transitional.element"), D = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), L = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), d = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), j = Symbol.for("react.activity"), M = Symbol.for("react.client.reference"), B = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, q = Array.isArray, N = console.createTask ? console.createTask : function() {
|
|
265
268
|
return null;
|
|
266
269
|
};
|
|
267
270
|
v = {
|
|
@@ -323,7 +326,7 @@ function fc(e, t = uc) {
|
|
|
323
326
|
const Ci = (e) => {
|
|
324
327
|
const t = lc(e), n = (r) => fc(t, r);
|
|
325
328
|
return Object.assign(n, t), n;
|
|
326
|
-
}, It = ((e) => e ? Ci(e) : Ci),
|
|
329
|
+
}, It = ((e) => e ? Ci(e) : Ci), sh = Ko;
|
|
327
330
|
function dc(e) {
|
|
328
331
|
return ce(() => Ko(), e ?? []);
|
|
329
332
|
}
|
|
@@ -441,7 +444,7 @@ function Je(e) {
|
|
|
441
444
|
}
|
|
442
445
|
var me = /* @__PURE__ */ ((e) => (e.BigWig = "bigwig", e.BigBed = "bigbed", e.Transcript = "transcript", e.Motif = "motif", e.Importance = "importance", e.LDTrack = "ldtrack", e.BulkBed = "bulkbed", e.MethylC = "methylc", e.Manhattan = "manhattan", e.Custom = "custom", e))(me || {}), Fe = /* @__PURE__ */ ((e) => (e.Full = "full", e.Dense = "dense", e.Squish = "squish", e.Pack = "pack", e.Combined = "combined", e.Split = "split", e.Scatter = "scatter", e.LDBlock = "ldblock", e.GenericLD = "genericld", e))(Fe || {});
|
|
443
446
|
const gc = /* @__PURE__ */ new Set(["chr", "start", "end", "rest"]);
|
|
444
|
-
function
|
|
447
|
+
function ch(e) {
|
|
445
448
|
return rs(e), e;
|
|
446
449
|
}
|
|
447
450
|
function mc(e) {
|
|
@@ -536,16 +539,16 @@ function Qe() {
|
|
|
536
539
|
function k(_) {
|
|
537
540
|
return n.call(_) === "[object Function]";
|
|
538
541
|
}
|
|
539
|
-
function
|
|
542
|
+
function D(_) {
|
|
540
543
|
return p(_) && k(_.pipe);
|
|
541
544
|
}
|
|
542
545
|
function w(_) {
|
|
543
546
|
return typeof URLSearchParams < "u" && _ instanceof URLSearchParams;
|
|
544
547
|
}
|
|
545
|
-
function
|
|
548
|
+
function E(_) {
|
|
546
549
|
return _.replace(/^\s*/, "").replace(/\s*$/, "");
|
|
547
550
|
}
|
|
548
|
-
function
|
|
551
|
+
function L() {
|
|
549
552
|
return typeof navigator < "u" && navigator.product === "ReactNative" ? !1 : typeof window < "u" && typeof document < "u";
|
|
550
553
|
}
|
|
551
554
|
function y(_, g) {
|
|
@@ -585,13 +588,13 @@ function Qe() {
|
|
|
585
588
|
isFile: b,
|
|
586
589
|
isBlob: v,
|
|
587
590
|
isFunction: k,
|
|
588
|
-
isStream:
|
|
591
|
+
isStream: D,
|
|
589
592
|
isURLSearchParams: w,
|
|
590
|
-
isStandardBrowserEnv:
|
|
593
|
+
isStandardBrowserEnv: L,
|
|
591
594
|
forEach: y,
|
|
592
595
|
merge: d,
|
|
593
596
|
extend: m,
|
|
594
|
-
trim:
|
|
597
|
+
trim: E
|
|
595
598
|
}, Mr;
|
|
596
599
|
}
|
|
597
600
|
var Br, Mi;
|
|
@@ -784,8 +787,8 @@ function zi() {
|
|
|
784
787
|
e.isFormData(h) && delete b["Content-Type"];
|
|
785
788
|
var v = new XMLHttpRequest();
|
|
786
789
|
if (s.auth) {
|
|
787
|
-
var k = s.auth.username || "",
|
|
788
|
-
b.Authorization = "Basic " + btoa(k + ":" +
|
|
790
|
+
var k = s.auth.username || "", D = s.auth.password || "";
|
|
791
|
+
b.Authorization = "Basic " + btoa(k + ":" + D);
|
|
789
792
|
}
|
|
790
793
|
if (v.open(s.method.toUpperCase(), n(s.url, s.params, s.paramsSerializer), !0), v.timeout = s.timeout, v.onreadystatechange = function() {
|
|
791
794
|
if (!(!v || v.readyState !== 4) && !(v.status === 0 && !(v.responseURL && v.responseURL.indexOf("file:") === 0))) {
|
|
@@ -809,17 +812,17 @@ function zi() {
|
|
|
809
812
|
v
|
|
810
813
|
)), v = null;
|
|
811
814
|
}, e.isStandardBrowserEnv()) {
|
|
812
|
-
var w = Ec(),
|
|
813
|
-
|
|
815
|
+
var w = Ec(), E = (s.withCredentials || i(s.url)) && s.xsrfCookieName ? w.read(s.xsrfCookieName) : void 0;
|
|
816
|
+
E && (b[s.xsrfHeaderName] = E);
|
|
814
817
|
}
|
|
815
818
|
if ("setRequestHeader" in v && e.forEach(b, function(y, d) {
|
|
816
819
|
typeof h > "u" && d.toLowerCase() === "content-type" ? delete b[d] : v.setRequestHeader(d, y);
|
|
817
820
|
}), s.withCredentials && (v.withCredentials = !0), s.responseType)
|
|
818
821
|
try {
|
|
819
822
|
v.responseType = s.responseType;
|
|
820
|
-
} catch (
|
|
823
|
+
} catch (L) {
|
|
821
824
|
if (s.responseType !== "json")
|
|
822
|
-
throw
|
|
825
|
+
throw L;
|
|
823
826
|
}
|
|
824
827
|
typeof s.onDownloadProgress == "function" && v.addEventListener("progress", s.onDownloadProgress), typeof s.onUploadProgress == "function" && v.upload && v.upload.addEventListener("progress", s.onUploadProgress), s.cancelToken && s.cancelToken.promise.then(function(y) {
|
|
825
828
|
v && (v.abort(), p(y), v = null);
|
|
@@ -1154,20 +1157,20 @@ var ze = {}, Kt = {}, ra;
|
|
|
1154
1157
|
function ur() {
|
|
1155
1158
|
return ra || (ra = 1, (function(e) {
|
|
1156
1159
|
var t = Kt && Kt.__awaiter || function(p, h, b, v) {
|
|
1157
|
-
function k(
|
|
1158
|
-
return
|
|
1159
|
-
w(
|
|
1160
|
+
function k(D) {
|
|
1161
|
+
return D instanceof b ? D : new b(function(w) {
|
|
1162
|
+
w(D);
|
|
1160
1163
|
});
|
|
1161
1164
|
}
|
|
1162
|
-
return new (b || (b = Promise))(function(
|
|
1163
|
-
function
|
|
1165
|
+
return new (b || (b = Promise))(function(D, w) {
|
|
1166
|
+
function E(d) {
|
|
1164
1167
|
try {
|
|
1165
1168
|
y(v.next(d));
|
|
1166
1169
|
} catch (m) {
|
|
1167
1170
|
w(m);
|
|
1168
1171
|
}
|
|
1169
1172
|
}
|
|
1170
|
-
function
|
|
1173
|
+
function L(d) {
|
|
1171
1174
|
try {
|
|
1172
1175
|
y(v.throw(d));
|
|
1173
1176
|
} catch (m) {
|
|
@@ -1175,7 +1178,7 @@ function ur() {
|
|
|
1175
1178
|
}
|
|
1176
1179
|
}
|
|
1177
1180
|
function y(d) {
|
|
1178
|
-
d.done ?
|
|
1181
|
+
d.done ? D(d.value) : k(d.value).then(E, L);
|
|
1179
1182
|
}
|
|
1180
1183
|
y((v = v.apply(p, h || [])).next());
|
|
1181
1184
|
});
|
|
@@ -1257,8 +1260,8 @@ function ur() {
|
|
|
1257
1260
|
};
|
|
1258
1261
|
this.buffer = v, this.stream.on("data", (k) => {
|
|
1259
1262
|
if (v.data = u(v.data, k), v.remainingBytes !== void 0 && (v.remainingBytes = v.remainingBytes -= k.byteLength), this.streamCaughtUpLock !== void 0) {
|
|
1260
|
-
const
|
|
1261
|
-
this.streamCaughtUpLock.updatePosition(
|
|
1263
|
+
const D = v.start + v.data.byteLength;
|
|
1264
|
+
this.streamCaughtUpLock.updatePosition(D);
|
|
1262
1265
|
}
|
|
1263
1266
|
}), this.stream.on("end", () => {
|
|
1264
1267
|
this.streamCaughtUpLock !== void 0 && this.streamCaughtUpLock.endStream();
|
|
@@ -1284,10 +1287,10 @@ function ur() {
|
|
|
1284
1287
|
throw new a(`Requested ${b} bytes but only got back ${this.buffer.data.byteLength}`);
|
|
1285
1288
|
return this.buffer.data.slice(v, k);
|
|
1286
1289
|
}
|
|
1287
|
-
const
|
|
1288
|
-
this.streamCaughtUpLock = new c(
|
|
1289
|
-
const
|
|
1290
|
-
return this.buffer.data = this.buffer.data.slice(k, this.buffer.data.byteLength), this.buffer.start = this.buffer.start + k,
|
|
1290
|
+
const D = this.buffer.start + this.buffer.data.byteLength, w = h + b;
|
|
1291
|
+
this.streamCaughtUpLock = new c(D, w), yield this.streamCaughtUpLock.waitForStream();
|
|
1292
|
+
const E = this.buffer.data.slice(v, k);
|
|
1293
|
+
return this.buffer.data = this.buffer.data.slice(k, this.buffer.data.byteLength), this.buffer.start = this.buffer.start + k, E;
|
|
1291
1294
|
});
|
|
1292
1295
|
}
|
|
1293
1296
|
}
|
|
@@ -1322,7 +1325,7 @@ var na;
|
|
|
1322
1325
|
function ss() {
|
|
1323
1326
|
if (na) return ze;
|
|
1324
1327
|
na = 1;
|
|
1325
|
-
var e = ze && ze.__awaiter || function(
|
|
1328
|
+
var e = ze && ze.__awaiter || function(E, L, y, d) {
|
|
1326
1329
|
function m(_) {
|
|
1327
1330
|
return _ instanceof y ? _ : new y(function(g) {
|
|
1328
1331
|
g(_);
|
|
@@ -1346,16 +1349,16 @@ function ss() {
|
|
|
1346
1349
|
function j(M) {
|
|
1347
1350
|
M.done ? _(M.value) : m(M.value).then(x, C);
|
|
1348
1351
|
}
|
|
1349
|
-
j((d = d.apply(
|
|
1352
|
+
j((d = d.apply(E, L || [])).next());
|
|
1350
1353
|
});
|
|
1351
1354
|
};
|
|
1352
1355
|
Object.defineProperty(ze, "__esModule", { value: !0 }), ze.loadSequence = ze.loadOneHotEncodingFromSequence = ze.streamSequence = ze.loadSequenceRecord = ze.loadTwoBitHeaderData = void 0;
|
|
1353
1356
|
const t = ur(), n = Yt(), r = ci(), i = Sr, a = 32768, o = 3e6, s = 16;
|
|
1354
1357
|
function c() {
|
|
1355
|
-
const
|
|
1358
|
+
const E = "TCAG", L = [];
|
|
1356
1359
|
for (let y = 0; y <= 256; ++y)
|
|
1357
|
-
|
|
1358
|
-
return (y) =>
|
|
1360
|
+
L.push(E[y >> 6] + E[y >> 4 & 3] + E[y >> 2 & 3] + E[y & 3]);
|
|
1361
|
+
return (y) => L[y];
|
|
1359
1362
|
}
|
|
1360
1363
|
const u = {
|
|
1361
1364
|
A: [1, 0, 0, 0],
|
|
@@ -1369,34 +1372,34 @@ function ss() {
|
|
|
1369
1372
|
t: [0, 0, 0, 1],
|
|
1370
1373
|
n: [0, 0, 0, 0]
|
|
1371
1374
|
}, p = c();
|
|
1372
|
-
function h(
|
|
1375
|
+
function h(E, L) {
|
|
1373
1376
|
return e(this, void 0, void 0, function* () {
|
|
1374
|
-
let y = new t.BufferedDataLoader(
|
|
1377
|
+
let y = new t.BufferedDataLoader(E, a);
|
|
1375
1378
|
const d = yield y.load(0, s);
|
|
1376
|
-
let m = new n.BinaryParser(d,
|
|
1379
|
+
let m = new n.BinaryParser(d, L);
|
|
1377
1380
|
m.getUInt();
|
|
1378
1381
|
let _ = m.getUInt(), g = m.getUInt(), x = m.getUInt();
|
|
1379
1382
|
if (_ !== 0 || x !== 0)
|
|
1380
1383
|
throw new t.FileFormatError("Unable to determine file type: invalid version or reserved header byte.");
|
|
1381
1384
|
let C = {
|
|
1382
1385
|
sequences: {},
|
|
1383
|
-
littleEndian:
|
|
1386
|
+
littleEndian: L,
|
|
1384
1387
|
fileType: r.FileType.TwoBit
|
|
1385
1388
|
}, j = s;
|
|
1386
1389
|
for (let M = 0; M < g; ++M) {
|
|
1387
|
-
let B = yield y.load(j, 4), A = new n.BinaryParser(B,
|
|
1388
|
-
j += 1, B = yield y.load(j, q + 4), A = new n.BinaryParser(B,
|
|
1390
|
+
let B = yield y.load(j, 4), A = new n.BinaryParser(B, L), q = A.getByte();
|
|
1391
|
+
j += 1, B = yield y.load(j, q + 4), A = new n.BinaryParser(B, L), C.sequences[A.getString(q)] = A.getUInt(), j += q + 4;
|
|
1389
1392
|
}
|
|
1390
1393
|
return C;
|
|
1391
1394
|
});
|
|
1392
1395
|
}
|
|
1393
1396
|
ze.loadTwoBitHeaderData = h;
|
|
1394
|
-
function b(
|
|
1397
|
+
function b(E, L, y) {
|
|
1395
1398
|
return e(this, void 0, void 0, function* () {
|
|
1396
|
-
let d = new t.BufferedDataLoader(
|
|
1397
|
-
if (
|
|
1399
|
+
let d = new t.BufferedDataLoader(E, o);
|
|
1400
|
+
if (L.sequences[y] === void 0)
|
|
1398
1401
|
throw new t.DataMissingError(y);
|
|
1399
|
-
let m = yield d.load(
|
|
1402
|
+
let m = yield d.load(L.sequences[y], 8), _ = new n.BinaryParser(m, L.littleEndian), g = L.sequences[y] + 8, x = {
|
|
1400
1403
|
dnaSize: _.getUInt(),
|
|
1401
1404
|
nBlockCount: _.getUInt(),
|
|
1402
1405
|
nBlockStarts: [],
|
|
@@ -1407,12 +1410,12 @@ function ss() {
|
|
|
1407
1410
|
reserved: 0,
|
|
1408
1411
|
offset: 0
|
|
1409
1412
|
};
|
|
1410
|
-
m = yield d.load(g, x.nBlockCount * 8 + 4), g += x.nBlockCount * 8 + 4, _ = new n.BinaryParser(m,
|
|
1413
|
+
m = yield d.load(g, x.nBlockCount * 8 + 4), g += x.nBlockCount * 8 + 4, _ = new n.BinaryParser(m, L.littleEndian);
|
|
1411
1414
|
for (let C = 0; C < x.nBlockCount; ++C)
|
|
1412
1415
|
x.nBlockStarts.push(_.getUInt());
|
|
1413
1416
|
for (let C = 0; C < x.nBlockCount; ++C)
|
|
1414
1417
|
x.nBlockSizes.push(_.getUInt());
|
|
1415
|
-
x.maskBlockCount = _.getUInt(), m = yield d.load(g, x.maskBlockCount * 8 + 4), g += x.maskBlockCount * 8 + 4, _ = new n.BinaryParser(m,
|
|
1418
|
+
x.maskBlockCount = _.getUInt(), m = yield d.load(g, x.maskBlockCount * 8 + 4), g += x.maskBlockCount * 8 + 4, _ = new n.BinaryParser(m, L.littleEndian);
|
|
1416
1419
|
for (let C = 0; C < x.maskBlockCount; ++C)
|
|
1417
1420
|
x.maskBlockStarts.push(_.getUInt());
|
|
1418
1421
|
for (let C = 0; C < x.maskBlockCount; ++C)
|
|
@@ -1421,25 +1424,25 @@ function ss() {
|
|
|
1421
1424
|
});
|
|
1422
1425
|
}
|
|
1423
1426
|
ze.loadSequenceRecord = b;
|
|
1424
|
-
function v(
|
|
1425
|
-
let
|
|
1426
|
-
for (let y = 0; y <
|
|
1427
|
-
|
|
1428
|
-
return
|
|
1427
|
+
function v(E) {
|
|
1428
|
+
let L = "";
|
|
1429
|
+
for (let y = 0; y < E; ++y)
|
|
1430
|
+
L += "N";
|
|
1431
|
+
return L;
|
|
1429
1432
|
}
|
|
1430
|
-
function k(
|
|
1433
|
+
function k(E, L, y, d, m, _ = 1024, g = !1) {
|
|
1431
1434
|
return e(this, void 0, void 0, function* () {
|
|
1432
|
-
const x = Math.ceil((m - d) / 4) + 1, C = new t.BufferedDataLoader(
|
|
1435
|
+
const x = Math.ceil((m - d) / 4) + 1, C = new t.BufferedDataLoader(E, x, !0), j = new i.Readable({ read() {
|
|
1433
1436
|
}, encoding: "utf8" }), M = new i.Readable({ read() {
|
|
1434
1437
|
}, objectMode: !0 });
|
|
1435
1438
|
let B = d;
|
|
1436
1439
|
for (; B < m; ) {
|
|
1437
1440
|
let A = B + _ - 1;
|
|
1438
1441
|
if (A >= m && (A = m), g) {
|
|
1439
|
-
const q = yield
|
|
1442
|
+
const q = yield D(C, L, y, B, A);
|
|
1440
1443
|
M.push(q);
|
|
1441
1444
|
} else {
|
|
1442
|
-
const q = yield w(C,
|
|
1445
|
+
const q = yield w(C, L, y, B, A);
|
|
1443
1446
|
j.push(q);
|
|
1444
1447
|
}
|
|
1445
1448
|
B = A + 1;
|
|
@@ -1448,17 +1451,17 @@ function ss() {
|
|
|
1448
1451
|
});
|
|
1449
1452
|
}
|
|
1450
1453
|
ze.streamSequence = k;
|
|
1451
|
-
function
|
|
1454
|
+
function D(E, L, y, d, m) {
|
|
1452
1455
|
return e(this, void 0, void 0, function* () {
|
|
1453
|
-
const _ = yield w(
|
|
1456
|
+
const _ = yield w(E, L, y, d, m);
|
|
1454
1457
|
let g = [];
|
|
1455
1458
|
for (let x of _)
|
|
1456
1459
|
g.push(u[x]);
|
|
1457
1460
|
return g;
|
|
1458
1461
|
});
|
|
1459
1462
|
}
|
|
1460
|
-
ze.loadOneHotEncodingFromSequence =
|
|
1461
|
-
function w(
|
|
1463
|
+
ze.loadOneHotEncodingFromSequence = D;
|
|
1464
|
+
function w(E, L, y, d, m) {
|
|
1462
1465
|
return e(this, void 0, void 0, function* () {
|
|
1463
1466
|
let _ = [], g = [], x = "";
|
|
1464
1467
|
d = d - 1 < 0 ? 0 : d - 1;
|
|
@@ -1472,7 +1475,7 @@ function ss() {
|
|
|
1472
1475
|
start: y.maskBlockStarts[B],
|
|
1473
1476
|
size: y.maskBlockSizes[B]
|
|
1474
1477
|
});
|
|
1475
|
-
let C = Math.ceil((m - d) / 4 + Math.ceil(d % 4 / 4)), j = yield
|
|
1478
|
+
let C = Math.ceil((m - d) / 4 + Math.ceil(d % 4 / 4)), j = yield E.load(Math.floor(d / 4) + y.offset, C), M = new n.BinaryParser(j, L.littleEndian);
|
|
1476
1479
|
for (let B = 0; B < C; ++B)
|
|
1477
1480
|
x += p(M.getByte());
|
|
1478
1481
|
return x = x.substring(d % 4, d % 4 + m - d), _.forEach((B, A) => {
|
|
@@ -1489,13 +1492,13 @@ function ss() {
|
|
|
1489
1492
|
var ia;
|
|
1490
1493
|
function ci() {
|
|
1491
1494
|
return ia || (ia = 1, (function(e) {
|
|
1492
|
-
var t = Zt && Zt.__awaiter || function(w,
|
|
1495
|
+
var t = Zt && Zt.__awaiter || function(w, E, L, y) {
|
|
1493
1496
|
function d(m) {
|
|
1494
|
-
return m instanceof
|
|
1497
|
+
return m instanceof L ? m : new L(function(_) {
|
|
1495
1498
|
_(m);
|
|
1496
1499
|
});
|
|
1497
1500
|
}
|
|
1498
|
-
return new (
|
|
1501
|
+
return new (L || (L = Promise))(function(m, _) {
|
|
1499
1502
|
function g(j) {
|
|
1500
1503
|
try {
|
|
1501
1504
|
C(y.next(j));
|
|
@@ -1513,7 +1516,7 @@ function ci() {
|
|
|
1513
1516
|
function C(j) {
|
|
1514
1517
|
j.done ? m(j.value) : d(j.value).then(g, x);
|
|
1515
1518
|
}
|
|
1516
|
-
C((y = y.apply(w,
|
|
1519
|
+
C((y = y.apply(w, E || [])).next());
|
|
1517
1520
|
});
|
|
1518
1521
|
};
|
|
1519
1522
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.loadHeaderData = e.FileType = void 0;
|
|
@@ -1524,23 +1527,23 @@ function ci() {
|
|
|
1524
1527
|
})(b = e.FileType || (e.FileType = {}));
|
|
1525
1528
|
function v(w) {
|
|
1526
1529
|
return t(this, void 0, void 0, function* () {
|
|
1527
|
-
const
|
|
1528
|
-
let
|
|
1530
|
+
const E = yield w.load(0, h);
|
|
1531
|
+
let L, y = !0, d = new n.BinaryParser(E, y), m = d.getUInt();
|
|
1529
1532
|
if (o === m)
|
|
1530
|
-
|
|
1533
|
+
L = b.BigWig;
|
|
1531
1534
|
else if (c === m)
|
|
1532
|
-
|
|
1535
|
+
L = b.BigBed;
|
|
1533
1536
|
else {
|
|
1534
1537
|
if (i === m)
|
|
1535
1538
|
return r.loadTwoBitHeaderData(w, y);
|
|
1536
|
-
if (y = !1, d = new n.BinaryParser(
|
|
1537
|
-
|
|
1539
|
+
if (y = !1, d = new n.BinaryParser(E, y), m = d.getUInt(), s === m)
|
|
1540
|
+
L = b.BigWig;
|
|
1538
1541
|
else if (u === m)
|
|
1539
|
-
|
|
1542
|
+
L = b.BigBed;
|
|
1540
1543
|
else if (a === m)
|
|
1541
1544
|
return r.loadTwoBitHeaderData(w, y);
|
|
1542
1545
|
}
|
|
1543
|
-
if (
|
|
1546
|
+
if (L === void 0)
|
|
1544
1547
|
throw new Error("Unable to determine file type.");
|
|
1545
1548
|
const _ = {
|
|
1546
1549
|
bwVersion: d.getUShort(),
|
|
@@ -1585,7 +1588,7 @@ function ci() {
|
|
|
1585
1588
|
M = k(q, _.chromTreeOffset);
|
|
1586
1589
|
}
|
|
1587
1590
|
return {
|
|
1588
|
-
fileType:
|
|
1591
|
+
fileType: L,
|
|
1589
1592
|
littleEndian: y,
|
|
1590
1593
|
common: _,
|
|
1591
1594
|
zoomLevelHeaders: x,
|
|
@@ -1596,12 +1599,12 @@ function ci() {
|
|
|
1596
1599
|
});
|
|
1597
1600
|
}
|
|
1598
1601
|
e.loadHeaderData = v;
|
|
1599
|
-
function k(w,
|
|
1600
|
-
const
|
|
1601
|
-
if (p !==
|
|
1602
|
+
function k(w, E) {
|
|
1603
|
+
const L = w.getUInt();
|
|
1604
|
+
if (p !== L)
|
|
1602
1605
|
throw new Error("Chomosome ID B+ Tree not found.");
|
|
1603
1606
|
const y = {
|
|
1604
|
-
magic:
|
|
1607
|
+
magic: L,
|
|
1605
1608
|
blockSize: w.getInt(),
|
|
1606
1609
|
keySize: w.getInt(),
|
|
1607
1610
|
valSize: w.getInt(),
|
|
@@ -1611,23 +1614,23 @@ function ci() {
|
|
|
1611
1614
|
chromSize: {},
|
|
1612
1615
|
idToChrom: []
|
|
1613
1616
|
};
|
|
1614
|
-
return
|
|
1617
|
+
return D(y, w, E), y;
|
|
1615
1618
|
}
|
|
1616
|
-
function
|
|
1617
|
-
y !== void 0 && (
|
|
1618
|
-
const d =
|
|
1619
|
-
|
|
1620
|
-
const m =
|
|
1619
|
+
function D(w, E, L, y) {
|
|
1620
|
+
y !== void 0 && (E.position = y);
|
|
1621
|
+
const d = E.getByte();
|
|
1622
|
+
E.position++;
|
|
1623
|
+
const m = E.getUShort();
|
|
1621
1624
|
if (d === 1)
|
|
1622
1625
|
for (let _ = 0; _ < m; _++) {
|
|
1623
|
-
const g =
|
|
1626
|
+
const g = E.getFixedLengthTrimmedString(w.keySize), x = E.getInt(), C = E.getInt();
|
|
1624
1627
|
w.chromToId[g] = x, w.idToChrom[x] = g, w.chromSize[g] = C;
|
|
1625
1628
|
}
|
|
1626
1629
|
else
|
|
1627
1630
|
for (let _ = 0; _ < m; _++) {
|
|
1628
|
-
|
|
1629
|
-
const x =
|
|
1630
|
-
|
|
1631
|
+
E.getFixedLengthTrimmedString(w.keySize);
|
|
1632
|
+
const x = E.getLong() - L, C = E.position;
|
|
1633
|
+
D(w, E, L, x), E.position = C;
|
|
1631
1634
|
}
|
|
1632
1635
|
}
|
|
1633
1636
|
})(Zt)), Zt;
|
|
@@ -1735,11 +1738,11 @@ function zc() {
|
|
|
1735
1738
|
if (sa) return Lt;
|
|
1736
1739
|
sa = 1;
|
|
1737
1740
|
var e = kt(), t = 4, n = 0, r = 1, i = 2;
|
|
1738
|
-
function a(
|
|
1739
|
-
for (var Z =
|
|
1740
|
-
|
|
1741
|
+
function a(R) {
|
|
1742
|
+
for (var Z = R.length; --Z >= 0; )
|
|
1743
|
+
R[Z] = 0;
|
|
1741
1744
|
}
|
|
1742
|
-
var o = 0, s = 1, c = 2, u = 3, p = 258, h = 29, b = 256, v = b + 1 + h, k = 30,
|
|
1745
|
+
var o = 0, s = 1, c = 2, u = 3, p = 258, h = 29, b = 256, v = b + 1 + h, k = 30, D = 19, w = 2 * v + 1, E = 15, L = 16, y = 7, d = 256, m = 16, _ = 17, g = 18, x = (
|
|
1743
1746
|
/* extra bits for each length code */
|
|
1744
1747
|
[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0]
|
|
1745
1748
|
), C = (
|
|
@@ -1760,220 +1763,220 @@ function zc() {
|
|
|
1760
1763
|
a(W);
|
|
1761
1764
|
var ae = new Array(k);
|
|
1762
1765
|
a(ae);
|
|
1763
|
-
function ne(
|
|
1764
|
-
this.static_tree =
|
|
1766
|
+
function ne(R, Z, ee, se, P) {
|
|
1767
|
+
this.static_tree = R, this.extra_bits = Z, this.extra_base = ee, this.elems = se, this.max_length = P, this.has_stree = R && R.length;
|
|
1765
1768
|
}
|
|
1766
1769
|
var F, I, G;
|
|
1767
|
-
function K(
|
|
1768
|
-
this.dyn_tree =
|
|
1770
|
+
function K(R, Z) {
|
|
1771
|
+
this.dyn_tree = R, this.max_code = 0, this.stat_desc = Z;
|
|
1769
1772
|
}
|
|
1770
|
-
function te(
|
|
1771
|
-
return
|
|
1773
|
+
function te(R) {
|
|
1774
|
+
return R < 256 ? N[R] : N[256 + (R >>> 7)];
|
|
1772
1775
|
}
|
|
1773
|
-
function le(
|
|
1774
|
-
|
|
1776
|
+
function le(R, Z) {
|
|
1777
|
+
R.pending_buf[R.pending++] = Z & 255, R.pending_buf[R.pending++] = Z >>> 8 & 255;
|
|
1775
1778
|
}
|
|
1776
|
-
function Y(
|
|
1777
|
-
|
|
1779
|
+
function Y(R, Z, ee) {
|
|
1780
|
+
R.bi_valid > L - ee ? (R.bi_buf |= Z << R.bi_valid & 65535, le(R, R.bi_buf), R.bi_buf = Z >> L - R.bi_valid, R.bi_valid += ee - L) : (R.bi_buf |= Z << R.bi_valid & 65535, R.bi_valid += ee);
|
|
1778
1781
|
}
|
|
1779
|
-
function J(
|
|
1782
|
+
function J(R, Z, ee) {
|
|
1780
1783
|
Y(
|
|
1781
|
-
|
|
1784
|
+
R,
|
|
1782
1785
|
ee[Z * 2],
|
|
1783
1786
|
ee[Z * 2 + 1]
|
|
1784
1787
|
/*.Len*/
|
|
1785
1788
|
);
|
|
1786
1789
|
}
|
|
1787
|
-
function re(
|
|
1790
|
+
function re(R, Z) {
|
|
1788
1791
|
var ee = 0;
|
|
1789
1792
|
do
|
|
1790
|
-
ee |=
|
|
1793
|
+
ee |= R & 1, R >>>= 1, ee <<= 1;
|
|
1791
1794
|
while (--Z > 0);
|
|
1792
1795
|
return ee >>> 1;
|
|
1793
1796
|
}
|
|
1794
|
-
function de(
|
|
1795
|
-
|
|
1797
|
+
function de(R) {
|
|
1798
|
+
R.bi_valid === 16 ? (le(R, R.bi_buf), R.bi_buf = 0, R.bi_valid = 0) : R.bi_valid >= 8 && (R.pending_buf[R.pending++] = R.bi_buf & 255, R.bi_buf >>= 8, R.bi_valid -= 8);
|
|
1796
1799
|
}
|
|
1797
|
-
function ue(
|
|
1800
|
+
function ue(R, Z) {
|
|
1798
1801
|
var ee = Z.dyn_tree, se = Z.max_code, P = Z.stat_desc.static_tree, H = Z.stat_desc.has_stree, S = Z.stat_desc.extra_bits, X = Z.stat_desc.extra_base, pe = Z.stat_desc.max_length, l, z, U, T, O, $, he = 0;
|
|
1799
|
-
for (T = 0; T <=
|
|
1800
|
-
|
|
1801
|
-
for (ee[
|
|
1802
|
-
z =
|
|
1802
|
+
for (T = 0; T <= E; T++)
|
|
1803
|
+
R.bl_count[T] = 0;
|
|
1804
|
+
for (ee[R.heap[R.heap_max] * 2 + 1] = 0, l = R.heap_max + 1; l < w; l++)
|
|
1805
|
+
z = R.heap[l], T = ee[ee[z * 2 + 1] * 2 + 1] + 1, T > pe && (T = pe, he++), ee[z * 2 + 1] = T, !(z > se) && (R.bl_count[T]++, O = 0, z >= X && (O = S[z - X]), $ = ee[z * 2], R.opt_len += $ * (T + O), H && (R.static_len += $ * (P[z * 2 + 1] + O)));
|
|
1803
1806
|
if (he !== 0) {
|
|
1804
1807
|
do {
|
|
1805
|
-
for (T = pe - 1;
|
|
1808
|
+
for (T = pe - 1; R.bl_count[T] === 0; )
|
|
1806
1809
|
T--;
|
|
1807
|
-
|
|
1810
|
+
R.bl_count[T]--, R.bl_count[T + 1] += 2, R.bl_count[pe]--, he -= 2;
|
|
1808
1811
|
} while (he > 0);
|
|
1809
1812
|
for (T = pe; T !== 0; T--)
|
|
1810
|
-
for (z =
|
|
1811
|
-
U =
|
|
1813
|
+
for (z = R.bl_count[T]; z !== 0; )
|
|
1814
|
+
U = R.heap[--l], !(U > se) && (ee[U * 2 + 1] !== T && (R.opt_len += (T - ee[U * 2 + 1]) * ee[U * 2], ee[U * 2 + 1] = T), z--);
|
|
1812
1815
|
}
|
|
1813
1816
|
}
|
|
1814
|
-
function ke(
|
|
1815
|
-
var se = new Array(
|
|
1816
|
-
for (H = 1; H <=
|
|
1817
|
+
function ke(R, Z, ee) {
|
|
1818
|
+
var se = new Array(E + 1), P = 0, H, S;
|
|
1819
|
+
for (H = 1; H <= E; H++)
|
|
1817
1820
|
se[H] = P = P + ee[H - 1] << 1;
|
|
1818
1821
|
for (S = 0; S <= Z; S++) {
|
|
1819
|
-
var X =
|
|
1820
|
-
X !== 0 && (
|
|
1822
|
+
var X = R[S * 2 + 1];
|
|
1823
|
+
X !== 0 && (R[S * 2] = re(se[X]++, X));
|
|
1821
1824
|
}
|
|
1822
1825
|
}
|
|
1823
1826
|
function Q() {
|
|
1824
|
-
var
|
|
1827
|
+
var R, Z, ee, se, P, H = new Array(E + 1);
|
|
1825
1828
|
for (ee = 0, se = 0; se < h - 1; se++)
|
|
1826
|
-
for (W[se] = ee,
|
|
1829
|
+
for (W[se] = ee, R = 0; R < 1 << x[se]; R++)
|
|
1827
1830
|
V[ee++] = se;
|
|
1828
1831
|
for (V[ee - 1] = se, P = 0, se = 0; se < 16; se++)
|
|
1829
|
-
for (ae[se] = P,
|
|
1832
|
+
for (ae[se] = P, R = 0; R < 1 << C[se]; R++)
|
|
1830
1833
|
N[P++] = se;
|
|
1831
1834
|
for (P >>= 7; se < k; se++)
|
|
1832
|
-
for (ae[se] = P << 7,
|
|
1835
|
+
for (ae[se] = P << 7, R = 0; R < 1 << C[se] - 7; R++)
|
|
1833
1836
|
N[256 + P++] = se;
|
|
1834
|
-
for (Z = 0; Z <=
|
|
1837
|
+
for (Z = 0; Z <= E; Z++)
|
|
1835
1838
|
H[Z] = 0;
|
|
1836
|
-
for (
|
|
1837
|
-
A[
|
|
1838
|
-
for (;
|
|
1839
|
-
A[
|
|
1840
|
-
for (;
|
|
1841
|
-
A[
|
|
1842
|
-
for (;
|
|
1843
|
-
A[
|
|
1844
|
-
for (ke(A, v + 1, H),
|
|
1845
|
-
q[
|
|
1846
|
-
F = new ne(A, x, b + 1, v,
|
|
1847
|
-
}
|
|
1848
|
-
function Le(
|
|
1839
|
+
for (R = 0; R <= 143; )
|
|
1840
|
+
A[R * 2 + 1] = 8, R++, H[8]++;
|
|
1841
|
+
for (; R <= 255; )
|
|
1842
|
+
A[R * 2 + 1] = 9, R++, H[9]++;
|
|
1843
|
+
for (; R <= 279; )
|
|
1844
|
+
A[R * 2 + 1] = 7, R++, H[7]++;
|
|
1845
|
+
for (; R <= 287; )
|
|
1846
|
+
A[R * 2 + 1] = 8, R++, H[8]++;
|
|
1847
|
+
for (ke(A, v + 1, H), R = 0; R < k; R++)
|
|
1848
|
+
q[R * 2 + 1] = 5, q[R * 2] = re(R, 5);
|
|
1849
|
+
F = new ne(A, x, b + 1, v, E), I = new ne(q, C, 0, k, E), G = new ne(new Array(0), j, 0, D, y);
|
|
1850
|
+
}
|
|
1851
|
+
function Le(R) {
|
|
1849
1852
|
var Z;
|
|
1850
1853
|
for (Z = 0; Z < v; Z++)
|
|
1851
|
-
|
|
1854
|
+
R.dyn_ltree[Z * 2] = 0;
|
|
1852
1855
|
for (Z = 0; Z < k; Z++)
|
|
1853
|
-
|
|
1854
|
-
for (Z = 0; Z <
|
|
1855
|
-
|
|
1856
|
-
|
|
1856
|
+
R.dyn_dtree[Z * 2] = 0;
|
|
1857
|
+
for (Z = 0; Z < D; Z++)
|
|
1858
|
+
R.bl_tree[Z * 2] = 0;
|
|
1859
|
+
R.dyn_ltree[d * 2] = 1, R.opt_len = R.static_len = 0, R.last_lit = R.matches = 0;
|
|
1857
1860
|
}
|
|
1858
|
-
function Ge(
|
|
1859
|
-
|
|
1861
|
+
function Ge(R) {
|
|
1862
|
+
R.bi_valid > 8 ? le(R, R.bi_buf) : R.bi_valid > 0 && (R.pending_buf[R.pending++] = R.bi_buf), R.bi_buf = 0, R.bi_valid = 0;
|
|
1860
1863
|
}
|
|
1861
|
-
function $e(
|
|
1862
|
-
Ge(
|
|
1864
|
+
function $e(R, Z, ee, se) {
|
|
1865
|
+
Ge(R), le(R, ee), le(R, ~ee), e.arraySet(R.pending_buf, R.window, Z, ee, R.pending), R.pending += ee;
|
|
1863
1866
|
}
|
|
1864
|
-
function He(
|
|
1867
|
+
function He(R, Z, ee, se) {
|
|
1865
1868
|
var P = Z * 2, H = ee * 2;
|
|
1866
|
-
return
|
|
1869
|
+
return R[P] < R[H] || R[P] === R[H] && se[Z] <= se[ee];
|
|
1867
1870
|
}
|
|
1868
|
-
function Ce(
|
|
1869
|
-
for (var se =
|
|
1870
|
-
|
|
1871
|
-
|
|
1871
|
+
function Ce(R, Z, ee) {
|
|
1872
|
+
for (var se = R.heap[ee], P = ee << 1; P <= R.heap_len && (P < R.heap_len && He(Z, R.heap[P + 1], R.heap[P], R.depth) && P++, !He(Z, se, R.heap[P], R.depth)); )
|
|
1873
|
+
R.heap[ee] = R.heap[P], ee = P, P <<= 1;
|
|
1874
|
+
R.heap[ee] = se;
|
|
1872
1875
|
}
|
|
1873
|
-
function ve(
|
|
1876
|
+
function ve(R, Z, ee) {
|
|
1874
1877
|
var se, P, H = 0, S, X;
|
|
1875
|
-
if (
|
|
1878
|
+
if (R.last_lit !== 0)
|
|
1876
1879
|
do
|
|
1877
|
-
se =
|
|
1878
|
-
while (H <
|
|
1879
|
-
J(
|
|
1880
|
+
se = R.pending_buf[R.d_buf + H * 2] << 8 | R.pending_buf[R.d_buf + H * 2 + 1], P = R.pending_buf[R.l_buf + H], H++, se === 0 ? J(R, P, Z) : (S = V[P], J(R, S + b + 1, Z), X = x[S], X !== 0 && (P -= W[S], Y(R, P, X)), se--, S = te(se), J(R, S, ee), X = C[S], X !== 0 && (se -= ae[S], Y(R, se, X)));
|
|
1881
|
+
while (H < R.last_lit);
|
|
1882
|
+
J(R, d, Z);
|
|
1880
1883
|
}
|
|
1881
|
-
function Ve(
|
|
1884
|
+
function Ve(R, Z) {
|
|
1882
1885
|
var ee = Z.dyn_tree, se = Z.stat_desc.static_tree, P = Z.stat_desc.has_stree, H = Z.stat_desc.elems, S, X, pe = -1, l;
|
|
1883
|
-
for (
|
|
1884
|
-
ee[S * 2] !== 0 ? (
|
|
1885
|
-
for (;
|
|
1886
|
-
l =
|
|
1887
|
-
for (Z.max_code = pe, S =
|
|
1888
|
-
Ce(
|
|
1886
|
+
for (R.heap_len = 0, R.heap_max = w, S = 0; S < H; S++)
|
|
1887
|
+
ee[S * 2] !== 0 ? (R.heap[++R.heap_len] = pe = S, R.depth[S] = 0) : ee[S * 2 + 1] = 0;
|
|
1888
|
+
for (; R.heap_len < 2; )
|
|
1889
|
+
l = R.heap[++R.heap_len] = pe < 2 ? ++pe : 0, ee[l * 2] = 1, R.depth[l] = 0, R.opt_len--, P && (R.static_len -= se[l * 2 + 1]);
|
|
1890
|
+
for (Z.max_code = pe, S = R.heap_len >> 1; S >= 1; S--)
|
|
1891
|
+
Ce(R, ee, S);
|
|
1889
1892
|
l = H;
|
|
1890
1893
|
do
|
|
1891
|
-
S =
|
|
1894
|
+
S = R.heap[
|
|
1892
1895
|
1
|
|
1893
1896
|
/*SMALLEST*/
|
|
1894
|
-
],
|
|
1897
|
+
], R.heap[
|
|
1895
1898
|
1
|
|
1896
1899
|
/*SMALLEST*/
|
|
1897
|
-
] =
|
|
1898
|
-
|
|
1900
|
+
] = R.heap[R.heap_len--], Ce(
|
|
1901
|
+
R,
|
|
1899
1902
|
ee,
|
|
1900
1903
|
1
|
|
1901
1904
|
/*SMALLEST*/
|
|
1902
|
-
), X =
|
|
1905
|
+
), X = R.heap[
|
|
1903
1906
|
1
|
|
1904
1907
|
/*SMALLEST*/
|
|
1905
|
-
],
|
|
1908
|
+
], R.heap[--R.heap_max] = S, R.heap[--R.heap_max] = X, ee[l * 2] = ee[S * 2] + ee[X * 2], R.depth[l] = (R.depth[S] >= R.depth[X] ? R.depth[S] : R.depth[X]) + 1, ee[S * 2 + 1] = ee[X * 2 + 1] = l, R.heap[
|
|
1906
1909
|
1
|
|
1907
1910
|
/*SMALLEST*/
|
|
1908
1911
|
] = l++, Ce(
|
|
1909
|
-
|
|
1912
|
+
R,
|
|
1910
1913
|
ee,
|
|
1911
1914
|
1
|
|
1912
1915
|
/*SMALLEST*/
|
|
1913
1916
|
);
|
|
1914
|
-
while (
|
|
1915
|
-
|
|
1917
|
+
while (R.heap_len >= 2);
|
|
1918
|
+
R.heap[--R.heap_max] = R.heap[
|
|
1916
1919
|
1
|
|
1917
1920
|
/*SMALLEST*/
|
|
1918
|
-
], ue(
|
|
1921
|
+
], ue(R, Z), ke(ee, pe, R.bl_count);
|
|
1919
1922
|
}
|
|
1920
|
-
function Pt(
|
|
1923
|
+
function Pt(R, Z, ee) {
|
|
1921
1924
|
var se, P = -1, H, S = Z[1], X = 0, pe = 7, l = 4;
|
|
1922
1925
|
for (S === 0 && (pe = 138, l = 3), Z[(ee + 1) * 2 + 1] = 65535, se = 0; se <= ee; se++)
|
|
1923
|
-
H = S, S = Z[(se + 1) * 2 + 1], !(++X < pe && H === S) && (X < l ?
|
|
1926
|
+
H = S, S = Z[(se + 1) * 2 + 1], !(++X < pe && H === S) && (X < l ? R.bl_tree[H * 2] += X : H !== 0 ? (H !== P && R.bl_tree[H * 2]++, R.bl_tree[m * 2]++) : X <= 10 ? R.bl_tree[_ * 2]++ : R.bl_tree[g * 2]++, X = 0, P = H, S === 0 ? (pe = 138, l = 3) : H === S ? (pe = 6, l = 3) : (pe = 7, l = 4));
|
|
1924
1927
|
}
|
|
1925
|
-
function mt(
|
|
1928
|
+
function mt(R, Z, ee) {
|
|
1926
1929
|
var se, P = -1, H, S = Z[1], X = 0, pe = 7, l = 4;
|
|
1927
1930
|
for (S === 0 && (pe = 138, l = 3), se = 0; se <= ee; se++)
|
|
1928
1931
|
if (H = S, S = Z[(se + 1) * 2 + 1], !(++X < pe && H === S)) {
|
|
1929
1932
|
if (X < l)
|
|
1930
1933
|
do
|
|
1931
|
-
J(
|
|
1934
|
+
J(R, H, R.bl_tree);
|
|
1932
1935
|
while (--X !== 0);
|
|
1933
|
-
else H !== 0 ? (H !== P && (J(
|
|
1936
|
+
else H !== 0 ? (H !== P && (J(R, H, R.bl_tree), X--), J(R, m, R.bl_tree), Y(R, X - 3, 2)) : X <= 10 ? (J(R, _, R.bl_tree), Y(R, X - 3, 3)) : (J(R, g, R.bl_tree), Y(R, X - 11, 7));
|
|
1934
1937
|
X = 0, P = H, S === 0 ? (pe = 138, l = 3) : H === S ? (pe = 6, l = 3) : (pe = 7, l = 4);
|
|
1935
1938
|
}
|
|
1936
1939
|
}
|
|
1937
|
-
function Ze(
|
|
1940
|
+
function Ze(R) {
|
|
1938
1941
|
var Z;
|
|
1939
|
-
for (Pt(
|
|
1942
|
+
for (Pt(R, R.dyn_ltree, R.l_desc.max_code), Pt(R, R.dyn_dtree, R.d_desc.max_code), Ve(R, R.bl_desc), Z = D - 1; Z >= 3 && R.bl_tree[M[Z] * 2 + 1] === 0; Z--)
|
|
1940
1943
|
;
|
|
1941
|
-
return
|
|
1944
|
+
return R.opt_len += 3 * (Z + 1) + 5 + 5 + 4, Z;
|
|
1942
1945
|
}
|
|
1943
|
-
function At(
|
|
1946
|
+
function At(R, Z, ee, se) {
|
|
1944
1947
|
var P;
|
|
1945
|
-
for (Y(
|
|
1946
|
-
Y(
|
|
1947
|
-
mt(
|
|
1948
|
+
for (Y(R, Z - 257, 5), Y(R, ee - 1, 5), Y(R, se - 4, 4), P = 0; P < se; P++)
|
|
1949
|
+
Y(R, R.bl_tree[M[P] * 2 + 1], 3);
|
|
1950
|
+
mt(R, R.dyn_ltree, Z - 1), mt(R, R.dyn_dtree, ee - 1);
|
|
1948
1951
|
}
|
|
1949
|
-
function vt(
|
|
1952
|
+
function vt(R) {
|
|
1950
1953
|
var Z = 4093624447, ee;
|
|
1951
1954
|
for (ee = 0; ee <= 31; ee++, Z >>>= 1)
|
|
1952
|
-
if (Z & 1 &&
|
|
1955
|
+
if (Z & 1 && R.dyn_ltree[ee * 2] !== 0)
|
|
1953
1956
|
return n;
|
|
1954
|
-
if (
|
|
1957
|
+
if (R.dyn_ltree[18] !== 0 || R.dyn_ltree[20] !== 0 || R.dyn_ltree[26] !== 0)
|
|
1955
1958
|
return r;
|
|
1956
1959
|
for (ee = 32; ee < b; ee++)
|
|
1957
|
-
if (
|
|
1960
|
+
if (R.dyn_ltree[ee * 2] !== 0)
|
|
1958
1961
|
return r;
|
|
1959
1962
|
return n;
|
|
1960
1963
|
}
|
|
1961
1964
|
var tt = !1;
|
|
1962
|
-
function Nt(
|
|
1963
|
-
tt || (Q(), tt = !0),
|
|
1965
|
+
function Nt(R) {
|
|
1966
|
+
tt || (Q(), tt = !0), R.l_desc = new K(R.dyn_ltree, F), R.d_desc = new K(R.dyn_dtree, I), R.bl_desc = new K(R.bl_tree, G), R.bi_buf = 0, R.bi_valid = 0, Le(R);
|
|
1964
1967
|
}
|
|
1965
|
-
function xt(
|
|
1966
|
-
Y(
|
|
1968
|
+
function xt(R, Z, ee, se) {
|
|
1969
|
+
Y(R, (o << 1) + (se ? 1 : 0), 3), $e(R, Z, ee);
|
|
1967
1970
|
}
|
|
1968
|
-
function Ne(
|
|
1969
|
-
Y(
|
|
1971
|
+
function Ne(R) {
|
|
1972
|
+
Y(R, s << 1, 3), J(R, d, A), de(R);
|
|
1970
1973
|
}
|
|
1971
|
-
function ot(
|
|
1974
|
+
function ot(R, Z, ee, se) {
|
|
1972
1975
|
var P, H, S = 0;
|
|
1973
|
-
|
|
1976
|
+
R.level > 0 ? (R.strm.data_type === i && (R.strm.data_type = vt(R)), Ve(R, R.l_desc), Ve(R, R.d_desc), S = Ze(R), P = R.opt_len + 3 + 7 >>> 3, H = R.static_len + 3 + 7 >>> 3, H <= P && (P = H)) : P = H = ee + 5, ee + 4 <= P && Z !== -1 ? xt(R, Z, ee, se) : R.strategy === t || H === P ? (Y(R, (s << 1) + (se ? 1 : 0), 3), ve(R, A, q)) : (Y(R, (c << 1) + (se ? 1 : 0), 3), At(R, R.l_desc.max_code + 1, R.d_desc.max_code + 1, S + 1), ve(R, R.dyn_ltree, R.dyn_dtree)), Le(R), se && Ge(R);
|
|
1974
1977
|
}
|
|
1975
|
-
function qt(
|
|
1976
|
-
return
|
|
1978
|
+
function qt(R, Z, ee) {
|
|
1979
|
+
return R.pending_buf[R.d_buf + R.last_lit * 2] = Z >>> 8 & 255, R.pending_buf[R.d_buf + R.last_lit * 2 + 1] = Z & 255, R.pending_buf[R.l_buf + R.last_lit] = ee & 255, R.last_lit++, Z === 0 ? R.dyn_ltree[ee * 2]++ : (R.matches++, Z--, R.dyn_ltree[(V[ee] + b + 1) * 2]++, R.dyn_dtree[te(Z) * 2]++), R.last_lit === R.lit_bufsize - 1;
|
|
1977
1980
|
}
|
|
1978
1981
|
return Lt._tr_init = Nt, Lt._tr_stored_block = xt, Lt._tr_flush_block = ot, Lt._tr_tally = qt, Lt._tr_align = Ne, Lt;
|
|
1979
1982
|
}
|
|
@@ -2043,7 +2046,7 @@ var fa;
|
|
|
2043
2046
|
function Fc() {
|
|
2044
2047
|
if (fa) return rt;
|
|
2045
2048
|
fa = 1;
|
|
2046
|
-
var e = kt(), t = zc(), n = cs(), r = ls(), i = li(), a = 0, o = 1, s = 3, c = 4, u = 5, p = 0, h = 1, b = -2, v = -3, k = -5,
|
|
2049
|
+
var e = kt(), t = zc(), n = cs(), r = ls(), i = li(), a = 0, o = 1, s = 3, c = 4, u = 5, p = 0, h = 1, b = -2, v = -3, k = -5, D = -1, w = 1, E = 2, L = 3, y = 4, d = 0, m = 2, _ = 8, g = 9, x = 15, C = 8, j = 29, M = 256, B = M + 1 + j, A = 30, q = 19, N = 2 * B + 1, V = 15, W = 3, ae = 258, ne = ae + W + 1, F = 32, I = 42, G = 69, K = 73, te = 91, le = 103, Y = 113, J = 666, re = 1, de = 2, ue = 3, ke = 4, Q = 3;
|
|
2047
2050
|
function Le(l, z) {
|
|
2048
2051
|
return l.msg = i[z], z;
|
|
2049
2052
|
}
|
|
@@ -2235,7 +2238,7 @@ function Fc() {
|
|
|
2235
2238
|
function qt(l) {
|
|
2236
2239
|
l.window_size = 2 * l.w_size, $e(l.head), l.max_lazy_match = ot[l.level].max_lazy, l.good_match = ot[l.level].good_length, l.nice_match = ot[l.level].nice_length, l.max_chain_length = ot[l.level].max_chain, l.strstart = 0, l.block_start = 0, l.lookahead = 0, l.insert = 0, l.match_length = l.prev_length = W - 1, l.match_available = 0, l.ins_h = 0;
|
|
2237
2240
|
}
|
|
2238
|
-
function
|
|
2241
|
+
function R() {
|
|
2239
2242
|
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = _, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new e.Buf16(N * 2), this.dyn_dtree = new e.Buf16((2 * A + 1) * 2), this.bl_tree = new e.Buf16((2 * q + 1) * 2), $e(this.dyn_ltree), $e(this.dyn_dtree), $e(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new e.Buf16(V + 1), this.heap = new e.Buf16(2 * B + 1), $e(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new e.Buf16(2 * B + 1), $e(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
2240
2243
|
}
|
|
2241
2244
|
function Z(l) {
|
|
@@ -2253,10 +2256,10 @@ function Fc() {
|
|
|
2253
2256
|
if (!l)
|
|
2254
2257
|
return b;
|
|
2255
2258
|
var he = 1;
|
|
2256
|
-
if (z ===
|
|
2259
|
+
if (z === D && (z = 6), T < 0 ? (he = 0, T = -T) : T > 15 && (he = 2, T -= 16), O < 1 || O > g || U !== _ || T < 8 || T > 15 || z < 0 || z > 9 || $ < 0 || $ > y)
|
|
2257
2260
|
return Le(l, b);
|
|
2258
2261
|
T === 8 && (T = 9);
|
|
2259
|
-
var ie = new
|
|
2262
|
+
var ie = new R();
|
|
2260
2263
|
return l.state = ie, ie.strm = l, ie.wrap = he, ie.gzhead = null, ie.w_bits = T, ie.w_size = 1 << ie.w_bits, ie.w_mask = ie.w_size - 1, ie.hash_bits = O + 7, ie.hash_size = 1 << ie.hash_bits, ie.hash_mask = ie.hash_size - 1, ie.hash_shift = ~~((ie.hash_bits + W - 1) / W), ie.window = new e.Buf8(ie.w_size * 2), ie.head = new e.Buf16(ie.hash_size), ie.prev = new e.Buf16(ie.w_size), ie.lit_bufsize = 1 << O + 6, ie.pending_buf_size = ie.lit_bufsize * 4, ie.pending_buf = new e.Buf8(ie.pending_buf_size), ie.d_buf = 1 * ie.lit_bufsize, ie.l_buf = 3 * ie.lit_bufsize, ie.level = z, ie.strategy = $, ie.method = U, ee(l);
|
|
2261
2264
|
}
|
|
2262
2265
|
function H(l, z) {
|
|
@@ -2273,10 +2276,10 @@ function Fc() {
|
|
|
2273
2276
|
l.adler = 0, ve(T, 31), ve(T, 139), ve(T, 8), T.gzhead ? (ve(
|
|
2274
2277
|
T,
|
|
2275
2278
|
(T.gzhead.text ? 1 : 0) + (T.gzhead.hcrc ? 2 : 0) + (T.gzhead.extra ? 4 : 0) + (T.gzhead.name ? 8 : 0) + (T.gzhead.comment ? 16 : 0)
|
|
2276
|
-
), ve(T, T.gzhead.time & 255), ve(T, T.gzhead.time >> 8 & 255), ve(T, T.gzhead.time >> 16 & 255), ve(T, T.gzhead.time >> 24 & 255), ve(T, T.level === 9 ? 2 : T.strategy >=
|
|
2279
|
+
), ve(T, T.gzhead.time & 255), ve(T, T.gzhead.time >> 8 & 255), ve(T, T.gzhead.time >> 16 & 255), ve(T, T.gzhead.time >> 24 & 255), ve(T, T.level === 9 ? 2 : T.strategy >= E || T.level < 2 ? 4 : 0), ve(T, T.gzhead.os & 255), T.gzhead.extra && T.gzhead.extra.length && (ve(T, T.gzhead.extra.length & 255), ve(T, T.gzhead.extra.length >> 8 & 255)), T.gzhead.hcrc && (l.adler = r(l.adler, T.pending_buf, T.pending, 0)), T.gzindex = 0, T.status = G) : (ve(T, 0), ve(T, 0), ve(T, 0), ve(T, 0), ve(T, 0), ve(T, T.level === 9 ? 2 : T.strategy >= E || T.level < 2 ? 4 : 0), ve(T, Q), T.status = Y);
|
|
2277
2280
|
else {
|
|
2278
2281
|
var he = _ + (T.w_bits - 8 << 4) << 8, ie = -1;
|
|
2279
|
-
T.strategy >=
|
|
2282
|
+
T.strategy >= E || T.level < 2 ? ie = 0 : T.level < 6 ? ie = 1 : T.level === 6 ? ie = 2 : ie = 3, he |= ie << 6, T.strstart !== 0 && (he |= F), he += 31 - he % 31, T.status = Y, Ve(T, he), T.strstart !== 0 && (Ve(T, l.adler >>> 16), Ve(T, l.adler & 65535)), l.adler = 1;
|
|
2280
2283
|
}
|
|
2281
2284
|
if (T.status === G)
|
|
2282
2285
|
if (T.gzhead.extra) {
|
|
@@ -2319,7 +2322,7 @@ function Fc() {
|
|
|
2319
2322
|
if (T.status === J && l.avail_in !== 0)
|
|
2320
2323
|
return Le(l, k);
|
|
2321
2324
|
if (l.avail_in !== 0 || T.lookahead !== 0 || z !== a && T.status !== J) {
|
|
2322
|
-
var oe = T.strategy ===
|
|
2325
|
+
var oe = T.strategy === E ? xt(T, z) : T.strategy === L ? Nt(T, z) : ot[T.level].func(T, z);
|
|
2323
2326
|
if ((oe === ue || oe === ke) && (T.status = J), oe === re || oe === ue)
|
|
2324
2327
|
return l.avail_out === 0 && (T.last_flush = -1), p;
|
|
2325
2328
|
if (oe === de && (z === o ? t._tr_align(T) : z !== u && (t._tr_stored_block(T, 0, 0, !1), z === s && ($e(T.head), T.lookahead === 0 && (T.strstart = 0, T.block_start = 0, T.insert = 0))), He(l), l.avail_out === 0))
|
|
@@ -2425,8 +2428,8 @@ function Uc() {
|
|
|
2425
2428
|
if (pa) return $t;
|
|
2426
2429
|
pa = 1;
|
|
2427
2430
|
var e = Fc(), t = kt(), n = us(), r = li(), i = fs(), a = Object.prototype.toString, o = 0, s = 4, c = 0, u = 1, p = 2, h = -1, b = 0, v = 8;
|
|
2428
|
-
function k(
|
|
2429
|
-
if (!(this instanceof k)) return new k(
|
|
2431
|
+
function k(L) {
|
|
2432
|
+
if (!(this instanceof k)) return new k(L);
|
|
2430
2433
|
this.options = t.assign({
|
|
2431
2434
|
level: h,
|
|
2432
2435
|
method: v,
|
|
@@ -2435,7 +2438,7 @@ function Uc() {
|
|
|
2435
2438
|
memLevel: 8,
|
|
2436
2439
|
strategy: b,
|
|
2437
2440
|
to: ""
|
|
2438
|
-
},
|
|
2441
|
+
}, L || {});
|
|
2439
2442
|
var y = this.options;
|
|
2440
2443
|
y.raw && y.windowBits > 0 ? y.windowBits = -y.windowBits : y.gzip && y.windowBits > 0 && y.windowBits < 16 && (y.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new i(), this.strm.avail_out = 0;
|
|
2441
2444
|
var d = e.deflateInit2(
|
|
@@ -2455,35 +2458,35 @@ function Uc() {
|
|
|
2455
2458
|
this._dict_set = !0;
|
|
2456
2459
|
}
|
|
2457
2460
|
}
|
|
2458
|
-
k.prototype.push = function(
|
|
2461
|
+
k.prototype.push = function(L, y) {
|
|
2459
2462
|
var d = this.strm, m = this.options.chunkSize, _, g;
|
|
2460
2463
|
if (this.ended)
|
|
2461
2464
|
return !1;
|
|
2462
|
-
g = y === ~~y ? y : y === !0 ? s : o, typeof
|
|
2465
|
+
g = y === ~~y ? y : y === !0 ? s : o, typeof L == "string" ? d.input = n.string2buf(L) : a.call(L) === "[object ArrayBuffer]" ? d.input = new Uint8Array(L) : d.input = L, d.next_in = 0, d.avail_in = d.input.length;
|
|
2463
2466
|
do {
|
|
2464
2467
|
if (d.avail_out === 0 && (d.output = new t.Buf8(m), d.next_out = 0, d.avail_out = m), _ = e.deflate(d, g), _ !== u && _ !== c)
|
|
2465
2468
|
return this.onEnd(_), this.ended = !0, !1;
|
|
2466
2469
|
(d.avail_out === 0 || d.avail_in === 0 && (g === s || g === p)) && (this.options.to === "string" ? this.onData(n.buf2binstring(t.shrinkBuf(d.output, d.next_out))) : this.onData(t.shrinkBuf(d.output, d.next_out)));
|
|
2467
2470
|
} while ((d.avail_in > 0 || d.avail_out === 0) && _ !== u);
|
|
2468
2471
|
return g === s ? (_ = e.deflateEnd(this.strm), this.onEnd(_), this.ended = !0, _ === c) : (g === p && (this.onEnd(c), d.avail_out = 0), !0);
|
|
2469
|
-
}, k.prototype.onData = function(
|
|
2470
|
-
this.chunks.push(
|
|
2471
|
-
}, k.prototype.onEnd = function(
|
|
2472
|
-
|
|
2472
|
+
}, k.prototype.onData = function(L) {
|
|
2473
|
+
this.chunks.push(L);
|
|
2474
|
+
}, k.prototype.onEnd = function(L) {
|
|
2475
|
+
L === c && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = t.flattenChunks(this.chunks)), this.chunks = [], this.err = L, this.msg = this.strm.msg;
|
|
2473
2476
|
};
|
|
2474
|
-
function
|
|
2477
|
+
function D(L, y) {
|
|
2475
2478
|
var d = new k(y);
|
|
2476
|
-
if (d.push(
|
|
2479
|
+
if (d.push(L, !0), d.err)
|
|
2477
2480
|
throw d.msg || r[d.err];
|
|
2478
2481
|
return d.result;
|
|
2479
2482
|
}
|
|
2480
|
-
function w(
|
|
2481
|
-
return y = y || {}, y.raw = !0,
|
|
2483
|
+
function w(L, y) {
|
|
2484
|
+
return y = y || {}, y.raw = !0, D(L, y);
|
|
2482
2485
|
}
|
|
2483
|
-
function L
|
|
2484
|
-
return y = y || {}, y.gzip = !0,
|
|
2486
|
+
function E(L, y) {
|
|
2487
|
+
return y = y || {}, y.gzip = !0, D(L, y);
|
|
2485
2488
|
}
|
|
2486
|
-
return $t.Deflate = k, $t.deflate =
|
|
2489
|
+
return $t.Deflate = k, $t.deflate = D, $t.deflateRaw = w, $t.gzip = E, $t;
|
|
2487
2490
|
}
|
|
2488
2491
|
var zt = {}, Ke = {}, sn, ga;
|
|
2489
2492
|
function Hc() {
|
|
@@ -2491,34 +2494,34 @@ function Hc() {
|
|
|
2491
2494
|
ga = 1;
|
|
2492
2495
|
var e = 30, t = 12;
|
|
2493
2496
|
return sn = function(r, i) {
|
|
2494
|
-
var a, o, s, c, u, p, h, b, v, k,
|
|
2495
|
-
a = r.state, o = r.next_in, B = r.input, s = o + (r.avail_in - 5), c = r.next_out, A = r.output, u = c - (i - r.avail_out), p = c + (r.avail_out - 257), h = a.dmax, b = a.wsize, v = a.whave, k = a.wnext,
|
|
2497
|
+
var a, o, s, c, u, p, h, b, v, k, D, w, E, L, y, d, m, _, g, x, C, j, M, B, A;
|
|
2498
|
+
a = r.state, o = r.next_in, B = r.input, s = o + (r.avail_in - 5), c = r.next_out, A = r.output, u = c - (i - r.avail_out), p = c + (r.avail_out - 257), h = a.dmax, b = a.wsize, v = a.whave, k = a.wnext, D = a.window, w = a.hold, E = a.bits, L = a.lencode, y = a.distcode, d = (1 << a.lenbits) - 1, m = (1 << a.distbits) - 1;
|
|
2496
2499
|
e:
|
|
2497
2500
|
do {
|
|
2498
|
-
|
|
2501
|
+
E < 15 && (w += B[o++] << E, E += 8, w += B[o++] << E, E += 8), _ = L[w & d];
|
|
2499
2502
|
t:
|
|
2500
2503
|
for (; ; ) {
|
|
2501
|
-
if (g = _ >>> 24, w >>>= g,
|
|
2504
|
+
if (g = _ >>> 24, w >>>= g, E -= g, g = _ >>> 16 & 255, g === 0)
|
|
2502
2505
|
A[c++] = _ & 65535;
|
|
2503
2506
|
else if (g & 16) {
|
|
2504
|
-
x = _ & 65535, g &= 15, g && (
|
|
2507
|
+
x = _ & 65535, g &= 15, g && (E < g && (w += B[o++] << E, E += 8), x += w & (1 << g) - 1, w >>>= g, E -= g), E < 15 && (w += B[o++] << E, E += 8, w += B[o++] << E, E += 8), _ = y[w & m];
|
|
2505
2508
|
r:
|
|
2506
2509
|
for (; ; ) {
|
|
2507
|
-
if (g = _ >>> 24, w >>>= g,
|
|
2508
|
-
if (C = _ & 65535, g &= 15,
|
|
2510
|
+
if (g = _ >>> 24, w >>>= g, E -= g, g = _ >>> 16 & 255, g & 16) {
|
|
2511
|
+
if (C = _ & 65535, g &= 15, E < g && (w += B[o++] << E, E += 8, E < g && (w += B[o++] << E, E += 8)), C += w & (1 << g) - 1, C > h) {
|
|
2509
2512
|
r.msg = "invalid distance too far back", a.mode = e;
|
|
2510
2513
|
break e;
|
|
2511
2514
|
}
|
|
2512
|
-
if (w >>>= g,
|
|
2515
|
+
if (w >>>= g, E -= g, g = c - u, C > g) {
|
|
2513
2516
|
if (g = C - g, g > v && a.sane) {
|
|
2514
2517
|
r.msg = "invalid distance too far back", a.mode = e;
|
|
2515
2518
|
break e;
|
|
2516
2519
|
}
|
|
2517
|
-
if (j = 0, M =
|
|
2520
|
+
if (j = 0, M = D, k === 0) {
|
|
2518
2521
|
if (j += b - g, g < x) {
|
|
2519
2522
|
x -= g;
|
|
2520
2523
|
do
|
|
2521
|
-
A[c++] =
|
|
2524
|
+
A[c++] = D[j++];
|
|
2522
2525
|
while (--g);
|
|
2523
2526
|
j = c - C, M = A;
|
|
2524
2527
|
}
|
|
@@ -2526,12 +2529,12 @@ function Hc() {
|
|
|
2526
2529
|
if (j += b + k - g, g -= k, g < x) {
|
|
2527
2530
|
x -= g;
|
|
2528
2531
|
do
|
|
2529
|
-
A[c++] =
|
|
2532
|
+
A[c++] = D[j++];
|
|
2530
2533
|
while (--g);
|
|
2531
2534
|
if (j = 0, k < x) {
|
|
2532
2535
|
g = k, x -= g;
|
|
2533
2536
|
do
|
|
2534
|
-
A[c++] =
|
|
2537
|
+
A[c++] = D[j++];
|
|
2535
2538
|
while (--g);
|
|
2536
2539
|
j = c - C, M = A;
|
|
2537
2540
|
}
|
|
@@ -2539,7 +2542,7 @@ function Hc() {
|
|
|
2539
2542
|
} else if (j += k - g, g < x) {
|
|
2540
2543
|
x -= g;
|
|
2541
2544
|
do
|
|
2542
|
-
A[c++] =
|
|
2545
|
+
A[c++] = D[j++];
|
|
2543
2546
|
while (--g);
|
|
2544
2547
|
j = c - C, M = A;
|
|
2545
2548
|
}
|
|
@@ -2563,7 +2566,7 @@ function Hc() {
|
|
|
2563
2566
|
break;
|
|
2564
2567
|
}
|
|
2565
2568
|
} else if ((g & 64) === 0) {
|
|
2566
|
-
_ =
|
|
2569
|
+
_ = L[(_ & 65535) + (w & (1 << g) - 1)];
|
|
2567
2570
|
continue t;
|
|
2568
2571
|
} else if (g & 32) {
|
|
2569
2572
|
a.mode = t;
|
|
@@ -2575,7 +2578,7 @@ function Hc() {
|
|
|
2575
2578
|
break;
|
|
2576
2579
|
}
|
|
2577
2580
|
} while (o < s && c < p);
|
|
2578
|
-
x =
|
|
2581
|
+
x = E >> 3, o -= x, E -= x << 3, w &= (1 << E) - 1, r.next_in = o, r.next_out = c, r.avail_in = o < s ? 5 + (s - o) : 5 - (o - s), r.avail_out = c < p ? 257 + (p - c) : 257 - (c - p), a.hold = w, a.bits = E;
|
|
2579
2582
|
}, sn;
|
|
2580
2583
|
}
|
|
2581
2584
|
var cn, ma;
|
|
@@ -2717,16 +2720,16 @@ function Wc() {
|
|
|
2717
2720
|
64,
|
|
2718
2721
|
64
|
|
2719
2722
|
];
|
|
2720
|
-
return cn = function(b, v, k,
|
|
2723
|
+
return cn = function(b, v, k, D, w, E, L, y) {
|
|
2721
2724
|
var d = y.bits, m = 0, _ = 0, g = 0, x = 0, C = 0, j = 0, M = 0, B = 0, A = 0, q = 0, N, V, W, ae, ne, F = null, I = 0, G, K = new e.Buf16(t + 1), te = new e.Buf16(t + 1), le = null, Y = 0, J, re, de;
|
|
2722
2725
|
for (m = 0; m <= t; m++)
|
|
2723
2726
|
K[m] = 0;
|
|
2724
|
-
for (_ = 0; _ <
|
|
2727
|
+
for (_ = 0; _ < D; _++)
|
|
2725
2728
|
K[v[k + _]]++;
|
|
2726
2729
|
for (C = d, x = t; x >= 1 && K[x] === 0; x--)
|
|
2727
2730
|
;
|
|
2728
2731
|
if (C > x && (C = x), x === 0)
|
|
2729
|
-
return w[
|
|
2732
|
+
return w[E++] = 1 << 24 | 64 << 16 | 0, w[E++] = 1 << 24 | 64 << 16 | 0, y.bits = 1, 0;
|
|
2730
2733
|
for (g = 1; g < x && K[g] === 0; g++)
|
|
2731
2734
|
;
|
|
2732
2735
|
for (C < g && (C = g), B = 1, m = 1; m <= t; m++)
|
|
@@ -2736,12 +2739,12 @@ function Wc() {
|
|
|
2736
2739
|
return -1;
|
|
2737
2740
|
for (te[1] = 0, m = 1; m < t; m++)
|
|
2738
2741
|
te[m + 1] = te[m] + K[m];
|
|
2739
|
-
for (_ = 0; _ <
|
|
2740
|
-
v[k + _] !== 0 && (
|
|
2741
|
-
if (b === i ? (F = le =
|
|
2742
|
+
for (_ = 0; _ < D; _++)
|
|
2743
|
+
v[k + _] !== 0 && (L[te[v[k + _]]++] = _);
|
|
2744
|
+
if (b === i ? (F = le = L, G = 19) : b === a ? (F = s, I -= 257, le = c, Y -= 257, G = 256) : (F = u, le = p, G = -1), q = 0, _ = 0, m = g, ne = E, j = C, M = 0, W = -1, A = 1 << C, ae = A - 1, b === a && A > n || b === o && A > r)
|
|
2742
2745
|
return 1;
|
|
2743
2746
|
for (; ; ) {
|
|
2744
|
-
J = m - M,
|
|
2747
|
+
J = m - M, L[_] < G ? (re = 0, de = L[_]) : L[_] > G ? (re = le[Y + L[_]], de = F[I + L[_]]) : (re = 96, de = 0), N = 1 << m - M, V = 1 << j, g = V;
|
|
2745
2748
|
do
|
|
2746
2749
|
V -= N, w[ne + (q >> M) + V] = J << 24 | re << 16 | de | 0;
|
|
2747
2750
|
while (V !== 0);
|
|
@@ -2750,14 +2753,14 @@ function Wc() {
|
|
|
2750
2753
|
if (N !== 0 ? (q &= N - 1, q += N) : q = 0, _++, --K[m] === 0) {
|
|
2751
2754
|
if (m === x)
|
|
2752
2755
|
break;
|
|
2753
|
-
m = v[k +
|
|
2756
|
+
m = v[k + L[_]];
|
|
2754
2757
|
}
|
|
2755
2758
|
if (m > C && (q & ae) !== W) {
|
|
2756
2759
|
for (M === 0 && (M = C), ne += g, j = m - M, B = 1 << j; j + M < x && (B -= K[j + M], !(B <= 0)); )
|
|
2757
2760
|
j++, B <<= 1;
|
|
2758
2761
|
if (A += 1 << j, b === a && A > n || b === o && A > r)
|
|
2759
2762
|
return 1;
|
|
2760
|
-
W = q & ae, w[W] = C << 24 | j << 16 | ne -
|
|
2763
|
+
W = q & ae, w[W] = C << 24 | j << 16 | ne - E | 0;
|
|
2761
2764
|
}
|
|
2762
2765
|
}
|
|
2763
2766
|
return q !== 0 && (w[ne + q] = m - M << 24 | 64 << 16 | 0), y.bits = C, 0;
|
|
@@ -2767,7 +2770,7 @@ var va;
|
|
|
2767
2770
|
function Yc() {
|
|
2768
2771
|
if (va) return Ke;
|
|
2769
2772
|
va = 1;
|
|
2770
|
-
var e = kt(), t = cs(), n = ls(), r = Hc(), i = Wc(), a = 0, o = 1, s = 2, c = 4, u = 5, p = 6, h = 0, b = 1, v = 2, k = -2,
|
|
2773
|
+
var e = kt(), t = cs(), n = ls(), r = Hc(), i = Wc(), a = 0, o = 1, s = 2, c = 4, u = 5, p = 6, h = 0, b = 1, v = 2, k = -2, D = -3, w = -4, E = -5, L = 8, y = 1, d = 2, m = 3, _ = 4, g = 5, x = 6, C = 7, j = 8, M = 9, B = 10, A = 11, q = 12, N = 13, V = 14, W = 15, ae = 16, ne = 17, F = 18, I = 19, G = 20, K = 21, te = 22, le = 23, Y = 24, J = 25, re = 26, de = 27, ue = 28, ke = 29, Q = 30, Le = 31, Ge = 32, $e = 852, He = 592, Ce = 15, ve = Ce;
|
|
2771
2774
|
function Ve(P) {
|
|
2772
2775
|
return (P >>> 24 & 255) + (P >>> 8 & 65280) + ((P & 65280) << 8) + ((P & 255) << 24);
|
|
2773
2776
|
}
|
|
@@ -2815,7 +2818,7 @@ function Yc() {
|
|
|
2815
2818
|
var pe, l = P.state;
|
|
2816
2819
|
return l.window === null && (l.wsize = 1 << l.wbits, l.wnext = 0, l.whave = 0, l.window = new e.Buf8(l.wsize)), X >= l.wsize ? (e.arraySet(l.window, H, S - l.wsize, l.wsize, 0), l.wnext = 0, l.whave = l.wsize) : (pe = l.wsize - l.wnext, pe > X && (pe = X), e.arraySet(l.window, H, S - X, pe, l.wnext), X -= pe, X ? (e.arraySet(l.window, H, S - X, X, 0), l.wnext = X, l.whave = l.wsize) : (l.wnext += pe, l.wnext === l.wsize && (l.wnext = 0), l.whave < l.wsize && (l.whave += pe))), 0;
|
|
2817
2820
|
}
|
|
2818
|
-
function
|
|
2821
|
+
function R(P, H) {
|
|
2819
2822
|
var S, X, pe, l, z, U, T, O, $, he, ie, oe, ye, ut, Re = 0, _e, Be, qe, Ue, fr, dr, Me, Xe, Oe = new e.Buf8(4), ft, st, Si = (
|
|
2820
2823
|
/* permutation of code lengths */
|
|
2821
2824
|
[16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]
|
|
@@ -2845,7 +2848,7 @@ function Yc() {
|
|
|
2845
2848
|
P.msg = "incorrect header check", S.mode = Q;
|
|
2846
2849
|
break;
|
|
2847
2850
|
}
|
|
2848
|
-
if ((O & 15) !==
|
|
2851
|
+
if ((O & 15) !== L) {
|
|
2849
2852
|
P.msg = "unknown compression method", S.mode = Q;
|
|
2850
2853
|
break;
|
|
2851
2854
|
}
|
|
@@ -2863,7 +2866,7 @@ function Yc() {
|
|
|
2863
2866
|
break e;
|
|
2864
2867
|
U--, O += X[l++] << $, $ += 8;
|
|
2865
2868
|
}
|
|
2866
|
-
if (S.flags = O, (S.flags & 255) !==
|
|
2869
|
+
if (S.flags = O, (S.flags & 255) !== L) {
|
|
2867
2870
|
P.msg = "unknown compression method", S.mode = Q;
|
|
2868
2871
|
break;
|
|
2869
2872
|
}
|
|
@@ -3253,7 +3256,7 @@ function Yc() {
|
|
|
3253
3256
|
Xe = b;
|
|
3254
3257
|
break e;
|
|
3255
3258
|
case Q:
|
|
3256
|
-
Xe =
|
|
3259
|
+
Xe = D;
|
|
3257
3260
|
break e;
|
|
3258
3261
|
case Le:
|
|
3259
3262
|
return w;
|
|
@@ -3263,7 +3266,7 @@ function Yc() {
|
|
|
3263
3266
|
return k;
|
|
3264
3267
|
}
|
|
3265
3268
|
return P.next_out = z, P.avail_out = T, P.next_in = l, P.avail_in = U, S.hold = O, S.bits = $, (S.wsize || ie !== P.avail_out && S.mode < Q && (S.mode < de || H !== c)) && qt(P, P.output, P.next_out, ie - P.avail_out), he -= P.avail_in, ie -= P.avail_out, P.total_in += he, P.total_out += ie, S.total += ie, S.wrap && ie && (P.adler = S.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
|
|
3266
|
-
S.flags ? n(S.check, pe, ie, P.next_out - ie) : t(S.check, pe, ie, P.next_out - ie)), P.data_type = S.bits + (S.last ? 64 : 0) + (S.mode === q ? 128 : 0) + (S.mode === G || S.mode === W ? 256 : 0), (he === 0 && ie === 0 || H === c) && Xe === h && (Xe =
|
|
3269
|
+
S.flags ? n(S.check, pe, ie, P.next_out - ie) : t(S.check, pe, ie, P.next_out - ie)), P.data_type = S.bits + (S.last ? 64 : 0) + (S.mode === q ? 128 : 0) + (S.mode === G || S.mode === W ? 256 : 0), (he === 0 && ie === 0 || H === c) && Xe === h && (Xe = E), Xe;
|
|
3267
3270
|
}
|
|
3268
3271
|
function Z(P) {
|
|
3269
3272
|
if (!P || !P.state)
|
|
@@ -3277,9 +3280,9 @@ function Yc() {
|
|
|
3277
3280
|
}
|
|
3278
3281
|
function se(P, H) {
|
|
3279
3282
|
var S = H.length, X, pe, l;
|
|
3280
|
-
return !P || !P.state || (X = P.state, X.wrap !== 0 && X.mode !== A) ? k : X.mode === A && (pe = 1, pe = t(pe, H, S, 0), pe !== X.check) ?
|
|
3283
|
+
return !P || !P.state || (X = P.state, X.wrap !== 0 && X.mode !== A) ? k : X.mode === A && (pe = 1, pe = t(pe, H, S, 0), pe !== X.check) ? D : (l = qt(P, H, S, S), l ? (X.mode = Le, w) : (X.havedict = 1, h));
|
|
3281
3284
|
}
|
|
3282
|
-
return Ke.inflateReset = Ze, Ke.inflateReset2 = At, Ke.inflateResetKeep = mt, Ke.inflateInit = tt, Ke.inflateInit2 = vt, Ke.inflate =
|
|
3285
|
+
return Ke.inflateReset = Ze, Ke.inflateReset2 = At, Ke.inflateResetKeep = mt, Ke.inflateInit = tt, Ke.inflateInit2 = vt, Ke.inflate = R, Ke.inflateEnd = Z, Ke.inflateGetHeader = ee, Ke.inflateSetDictionary = se, Ke.inflateInfo = "pako inflate (from Nodeca project)", Ke;
|
|
3283
3286
|
}
|
|
3284
3287
|
var ln, xa;
|
|
3285
3288
|
function ds() {
|
|
@@ -3357,16 +3360,16 @@ function Vc() {
|
|
|
3357
3360
|
throw new Error(i[v]);
|
|
3358
3361
|
}
|
|
3359
3362
|
c.prototype.push = function(h, b) {
|
|
3360
|
-
var v = this.strm, k = this.options.chunkSize,
|
|
3363
|
+
var v = this.strm, k = this.options.chunkSize, D = this.options.dictionary, w, E, L, y, d, m = !1;
|
|
3361
3364
|
if (this.ended)
|
|
3362
3365
|
return !1;
|
|
3363
|
-
|
|
3366
|
+
E = b === ~~b ? b : b === !0 ? r.Z_FINISH : r.Z_NO_FLUSH, typeof h == "string" ? v.input = n.binstring2buf(h) : s.call(h) === "[object ArrayBuffer]" ? v.input = new Uint8Array(h) : v.input = h, v.next_in = 0, v.avail_in = v.input.length;
|
|
3364
3367
|
do {
|
|
3365
|
-
if (v.avail_out === 0 && (v.output = new t.Buf8(k), v.next_out = 0, v.avail_out = k), w = e.inflate(v, r.Z_NO_FLUSH), w === r.Z_NEED_DICT &&
|
|
3368
|
+
if (v.avail_out === 0 && (v.output = new t.Buf8(k), v.next_out = 0, v.avail_out = k), w = e.inflate(v, r.Z_NO_FLUSH), w === r.Z_NEED_DICT && D && (w = e.inflateSetDictionary(this.strm, D)), w === r.Z_BUF_ERROR && m === !0 && (w = r.Z_OK, m = !1), w !== r.Z_STREAM_END && w !== r.Z_OK)
|
|
3366
3369
|
return this.onEnd(w), this.ended = !0, !1;
|
|
3367
|
-
v.next_out && (v.avail_out === 0 || w === r.Z_STREAM_END || v.avail_in === 0 && (
|
|
3370
|
+
v.next_out && (v.avail_out === 0 || w === r.Z_STREAM_END || v.avail_in === 0 && (E === r.Z_FINISH || E === r.Z_SYNC_FLUSH)) && (this.options.to === "string" ? (L = n.utf8border(v.output, v.next_out), y = v.next_out - L, d = n.buf2string(v.output, L), v.next_out = y, v.avail_out = k - y, y && t.arraySet(v.output, v.output, L, y, 0), this.onData(d)) : this.onData(t.shrinkBuf(v.output, v.next_out))), v.avail_in === 0 && v.avail_out === 0 && (m = !0);
|
|
3368
3371
|
} while ((v.avail_in > 0 || v.avail_out === 0) && w !== r.Z_STREAM_END);
|
|
3369
|
-
return w === r.Z_STREAM_END && (
|
|
3372
|
+
return w === r.Z_STREAM_END && (E = r.Z_FINISH), E === r.Z_FINISH ? (w = e.inflateEnd(this.strm), this.onEnd(w), this.ended = !0, w === r.Z_OK) : (E === r.Z_SYNC_FLUSH && (this.onEnd(r.Z_OK), v.avail_out = 0), !0);
|
|
3370
3373
|
}, c.prototype.onData = function(h) {
|
|
3371
3374
|
this.chunks.push(h);
|
|
3372
3375
|
}, c.prototype.onEnd = function(h) {
|
|
@@ -3394,7 +3397,7 @@ var wa;
|
|
|
3394
3397
|
function Zc() {
|
|
3395
3398
|
if (wa) return dt;
|
|
3396
3399
|
wa = 1;
|
|
3397
|
-
var e = dt && dt.__awaiter || function(
|
|
3400
|
+
var e = dt && dt.__awaiter || function(L, y, d, m) {
|
|
3398
3401
|
function _(g) {
|
|
3399
3402
|
return g instanceof d ? g : new d(function(x) {
|
|
3400
3403
|
x(g);
|
|
@@ -3418,7 +3421,7 @@ function Zc() {
|
|
|
3418
3421
|
function M(B) {
|
|
3419
3422
|
B.done ? g(B.value) : _(B.value).then(C, j);
|
|
3420
3423
|
}
|
|
3421
|
-
M((m = m.apply(
|
|
3424
|
+
M((m = m.apply(L, y || [])).next());
|
|
3422
3425
|
});
|
|
3423
3426
|
};
|
|
3424
3427
|
Object.defineProperty(dt, "__esModule", { value: !0 }), dt.parseBigBed = dt.BigWigReader = void 0;
|
|
@@ -3457,12 +3460,12 @@ function Zc() {
|
|
|
3457
3460
|
}
|
|
3458
3461
|
readBigBedData(y, d, m, _, g) {
|
|
3459
3462
|
return e(this, void 0, void 0, function* () {
|
|
3460
|
-
return this.readData(y, d, m, _, (yield this.getHeader()).common.fullIndexOffset,
|
|
3463
|
+
return this.readData(y, d, m, _, (yield this.getHeader()).common.fullIndexOffset, D(g || k));
|
|
3461
3464
|
});
|
|
3462
3465
|
}
|
|
3463
3466
|
streamBigBedData(y, d, m, _, g) {
|
|
3464
3467
|
return e(this, void 0, void 0, function* () {
|
|
3465
|
-
return this.streamData(y, d, m, _, (yield this.getHeader()).common.fullIndexOffset,
|
|
3468
|
+
return this.streamData(y, d, m, _, (yield this.getHeader()).common.fullIndexOffset, D(g || k));
|
|
3466
3469
|
});
|
|
3467
3470
|
}
|
|
3468
3471
|
readTwoBitData(y, d, m) {
|
|
@@ -3489,7 +3492,7 @@ function Zc() {
|
|
|
3489
3492
|
if (x.zoomLevelHeaders == null || !(g in x.zoomLevelHeaders))
|
|
3490
3493
|
throw new t.FileFormatError("Given zoomLevelIndex not found in zoom level headers.");
|
|
3491
3494
|
const C = x.zoomLevelHeaders[g].indexOffset;
|
|
3492
|
-
return this.readData(y, d, m, _, C,
|
|
3495
|
+
return this.readData(y, d, m, _, C, E);
|
|
3493
3496
|
});
|
|
3494
3497
|
}
|
|
3495
3498
|
streamZoomData(y, d, m, _, g) {
|
|
@@ -3498,7 +3501,7 @@ function Zc() {
|
|
|
3498
3501
|
if (x.zoomLevelHeaders == null || !(g in x.zoomLevelHeaders))
|
|
3499
3502
|
throw new t.FileFormatError("Given zoomLevelIndex not found in zoom level headers.");
|
|
3500
3503
|
const C = x.zoomLevelHeaders[g].indexOffset;
|
|
3501
|
-
return this.streamData(y, d, m, _, C,
|
|
3504
|
+
return this.streamData(y, d, m, _, C, E);
|
|
3502
3505
|
});
|
|
3503
3506
|
}
|
|
3504
3507
|
loadData(y, d, m, _, g, x, C, j) {
|
|
@@ -3540,11 +3543,11 @@ function Zc() {
|
|
|
3540
3543
|
}
|
|
3541
3544
|
};
|
|
3542
3545
|
dt.BigWigReader = b;
|
|
3543
|
-
function v(
|
|
3546
|
+
function v(L, y, d, m, _, g, x) {
|
|
3544
3547
|
return e(this, void 0, void 0, function* () {
|
|
3545
|
-
const C = yield
|
|
3548
|
+
const C = yield L.load(d, 4), j = new n.BinaryParser(C, y), M = j.getByte() === 1;
|
|
3546
3549
|
j.position++;
|
|
3547
|
-
const B = j.getUShort(), A = d + 4, q = B * (M ? u : p), N = yield
|
|
3550
|
+
const B = j.getUShort(), A = d + 4, q = B * (M ? u : p), N = yield L.load(A, q);
|
|
3548
3551
|
let V = [];
|
|
3549
3552
|
const W = new n.BinaryParser(N, y);
|
|
3550
3553
|
for (let ae = 0; ae < B; ae++) {
|
|
@@ -3561,15 +3564,15 @@ function Zc() {
|
|
|
3561
3564
|
K && V.push(te);
|
|
3562
3565
|
} else {
|
|
3563
3566
|
const te = W.getLong();
|
|
3564
|
-
K && V.push(...yield v(
|
|
3567
|
+
K && V.push(...yield v(L, y, te, m, _, g, x));
|
|
3565
3568
|
}
|
|
3566
3569
|
}
|
|
3567
3570
|
return V;
|
|
3568
3571
|
});
|
|
3569
3572
|
}
|
|
3570
|
-
function k(
|
|
3573
|
+
function k(L, y, d, m) {
|
|
3571
3574
|
const _ = {
|
|
3572
|
-
chr:
|
|
3575
|
+
chr: L,
|
|
3573
3576
|
start: y,
|
|
3574
3577
|
end: d
|
|
3575
3578
|
};
|
|
@@ -3589,7 +3592,7 @@ function Zc() {
|
|
|
3589
3592
|
return _;
|
|
3590
3593
|
}
|
|
3591
3594
|
dt.parseBigBed = k;
|
|
3592
|
-
const
|
|
3595
|
+
const D = (L) => (y, d, m, _, g, x) => {
|
|
3593
3596
|
const C = [], j = new n.BinaryParser(y), M = 13;
|
|
3594
3597
|
for (; j.remLength() >= M; ) {
|
|
3595
3598
|
const B = j.getInt(), A = x[B], q = j.getInt(), N = j.getInt(), V = j.getString();
|
|
@@ -3597,13 +3600,13 @@ function Zc() {
|
|
|
3597
3600
|
continue;
|
|
3598
3601
|
if (B > _ || B === _ && q >= g)
|
|
3599
3602
|
break;
|
|
3600
|
-
const W =
|
|
3603
|
+
const W = L(A, q, N, V);
|
|
3601
3604
|
C.push(W);
|
|
3602
3605
|
}
|
|
3603
3606
|
return C;
|
|
3604
3607
|
};
|
|
3605
|
-
function w(
|
|
3606
|
-
const x = [], C = new n.BinaryParser(
|
|
3608
|
+
function w(L, y, d, m, _, g) {
|
|
3609
|
+
const x = [], C = new n.BinaryParser(L), j = C.getInt(), M = g[j];
|
|
3607
3610
|
let B = C.getInt(), A = C.getInt();
|
|
3608
3611
|
const q = C.getInt(), N = C.getInt(), V = C.getByte();
|
|
3609
3612
|
C.getByte();
|
|
@@ -3623,8 +3626,8 @@ function Zc() {
|
|
|
3623
3626
|
}
|
|
3624
3627
|
return x;
|
|
3625
3628
|
}
|
|
3626
|
-
function L
|
|
3627
|
-
const x = [], C = new n.BinaryParser(
|
|
3629
|
+
function E(L, y, d, m, _, g) {
|
|
3630
|
+
const x = [], C = new n.BinaryParser(L), j = 32;
|
|
3628
3631
|
for (; C.remLength() > j; ) {
|
|
3629
3632
|
const M = C.getInt(), B = {
|
|
3630
3633
|
chr: g[M],
|
|
@@ -3782,16 +3785,16 @@ function Ye() {
|
|
|
3782
3785
|
function k(x) {
|
|
3783
3786
|
return t.call(x) === "[object Blob]";
|
|
3784
3787
|
}
|
|
3785
|
-
function
|
|
3788
|
+
function D(x) {
|
|
3786
3789
|
return t.call(x) === "[object Function]";
|
|
3787
3790
|
}
|
|
3788
3791
|
function w(x) {
|
|
3789
|
-
return p(x) &&
|
|
3792
|
+
return p(x) && D(x.pipe);
|
|
3790
3793
|
}
|
|
3791
|
-
function
|
|
3794
|
+
function E(x) {
|
|
3792
3795
|
return typeof URLSearchParams < "u" && x instanceof URLSearchParams;
|
|
3793
3796
|
}
|
|
3794
|
-
function
|
|
3797
|
+
function L(x) {
|
|
3795
3798
|
return x.trim ? x.trim() : x.replace(/^\s+|\s+$/g, "");
|
|
3796
3799
|
}
|
|
3797
3800
|
function y() {
|
|
@@ -3837,14 +3840,14 @@ function Ye() {
|
|
|
3837
3840
|
isDate: b,
|
|
3838
3841
|
isFile: v,
|
|
3839
3842
|
isBlob: k,
|
|
3840
|
-
isFunction:
|
|
3843
|
+
isFunction: D,
|
|
3841
3844
|
isStream: w,
|
|
3842
|
-
isURLSearchParams:
|
|
3845
|
+
isURLSearchParams: E,
|
|
3843
3846
|
isStandardBrowserEnv: y,
|
|
3844
3847
|
forEach: d,
|
|
3845
3848
|
merge: m,
|
|
3846
3849
|
extend: _,
|
|
3847
|
-
trim:
|
|
3850
|
+
trim: L,
|
|
3848
3851
|
stripBOM: g
|
|
3849
3852
|
}, pn;
|
|
3850
3853
|
}
|
|
@@ -4099,18 +4102,18 @@ function $a() {
|
|
|
4099
4102
|
var e = Ye(), t = el(), n = tl(), r = ps(), i = il(), a = al(), o = ol(), s = ms();
|
|
4100
4103
|
return Tn = function(u) {
|
|
4101
4104
|
return new Promise(function(h, b) {
|
|
4102
|
-
var v = u.data, k = u.headers,
|
|
4105
|
+
var v = u.data, k = u.headers, D = u.responseType;
|
|
4103
4106
|
e.isFormData(v) && delete k["Content-Type"];
|
|
4104
4107
|
var w = new XMLHttpRequest();
|
|
4105
4108
|
if (u.auth) {
|
|
4106
|
-
var
|
|
4107
|
-
k.Authorization = "Basic " + btoa(
|
|
4109
|
+
var E = u.auth.username || "", L = u.auth.password ? unescape(encodeURIComponent(u.auth.password)) : "";
|
|
4110
|
+
k.Authorization = "Basic " + btoa(E + ":" + L);
|
|
4108
4111
|
}
|
|
4109
4112
|
var y = i(u.baseURL, u.url);
|
|
4110
4113
|
w.open(u.method.toUpperCase(), r(y, u.params, u.paramsSerializer), !0), w.timeout = u.timeout;
|
|
4111
4114
|
function d() {
|
|
4112
4115
|
if (w) {
|
|
4113
|
-
var _ = "getAllResponseHeaders" in w ? a(w.getAllResponseHeaders()) : null, g = !
|
|
4116
|
+
var _ = "getAllResponseHeaders" in w ? a(w.getAllResponseHeaders()) : null, g = !D || D === "text" || D === "json" ? w.responseText : w.response, x = {
|
|
4114
4117
|
data: g,
|
|
4115
4118
|
status: w.status,
|
|
4116
4119
|
statusText: w.statusText,
|
|
@@ -4141,7 +4144,7 @@ function $a() {
|
|
|
4141
4144
|
}
|
|
4142
4145
|
"setRequestHeader" in w && e.forEach(k, function(g, x) {
|
|
4143
4146
|
typeof v > "u" && x.toLowerCase() === "content-type" ? delete k[x] : w.setRequestHeader(x, g);
|
|
4144
|
-
}), e.isUndefined(u.withCredentials) || (w.withCredentials = !!u.withCredentials),
|
|
4147
|
+
}), e.isUndefined(u.withCredentials) || (w.withCredentials = !!u.withCredentials), D && D !== "json" && (w.responseType = u.responseType), typeof u.onDownloadProgress == "function" && w.addEventListener("progress", u.onDownloadProgress), typeof u.onUploadProgress == "function" && w.upload && w.upload.addEventListener("progress", u.onUploadProgress), u.cancelToken && u.cancelToken.promise.then(function(g) {
|
|
4145
4148
|
w && (w.abort(), b(g), w = null);
|
|
4146
4149
|
}), v || (v = null), w.send(v);
|
|
4147
4150
|
});
|
|
@@ -4415,17 +4418,17 @@ function dl() {
|
|
|
4415
4418
|
});
|
|
4416
4419
|
var k;
|
|
4417
4420
|
if (!b) {
|
|
4418
|
-
var
|
|
4419
|
-
for (Array.prototype.unshift.apply(
|
|
4420
|
-
k = k.then(
|
|
4421
|
+
var D = [r, void 0];
|
|
4422
|
+
for (Array.prototype.unshift.apply(D, h), D = D.concat(v), k = Promise.resolve(u); D.length; )
|
|
4423
|
+
k = k.then(D.shift(), D.shift());
|
|
4421
4424
|
return k;
|
|
4422
4425
|
}
|
|
4423
4426
|
for (var w = u; h.length; ) {
|
|
4424
|
-
var
|
|
4427
|
+
var E = h.shift(), L = h.shift();
|
|
4425
4428
|
try {
|
|
4426
|
-
w =
|
|
4429
|
+
w = E(w);
|
|
4427
4430
|
} catch (y) {
|
|
4428
|
-
|
|
4431
|
+
L(y);
|
|
4429
4432
|
break;
|
|
4430
4433
|
}
|
|
4431
4434
|
}
|
|
@@ -4546,15 +4549,15 @@ function xl() {
|
|
|
4546
4549
|
function h(k) {
|
|
4547
4550
|
try {
|
|
4548
4551
|
v(s.next(k));
|
|
4549
|
-
} catch (
|
|
4550
|
-
p(
|
|
4552
|
+
} catch (D) {
|
|
4553
|
+
p(D);
|
|
4551
4554
|
}
|
|
4552
4555
|
}
|
|
4553
4556
|
function b(k) {
|
|
4554
4557
|
try {
|
|
4555
4558
|
v(s.throw(k));
|
|
4556
|
-
} catch (
|
|
4557
|
-
p(
|
|
4559
|
+
} catch (D) {
|
|
4560
|
+
p(D);
|
|
4558
4561
|
}
|
|
4559
4562
|
}
|
|
4560
4563
|
function v(k) {
|
|
@@ -4633,22 +4636,22 @@ function _s() {
|
|
|
4633
4636
|
});
|
|
4634
4637
|
}
|
|
4635
4638
|
return new (u || (u = Promise))(function(b, v) {
|
|
4636
|
-
function k(
|
|
4639
|
+
function k(E) {
|
|
4637
4640
|
try {
|
|
4638
|
-
w(p.next(
|
|
4639
|
-
} catch (
|
|
4640
|
-
v(
|
|
4641
|
+
w(p.next(E));
|
|
4642
|
+
} catch (L) {
|
|
4643
|
+
v(L);
|
|
4641
4644
|
}
|
|
4642
4645
|
}
|
|
4643
|
-
function
|
|
4646
|
+
function D(E) {
|
|
4644
4647
|
try {
|
|
4645
|
-
w(p.throw(
|
|
4646
|
-
} catch (
|
|
4647
|
-
v(
|
|
4648
|
+
w(p.throw(E));
|
|
4649
|
+
} catch (L) {
|
|
4650
|
+
v(L);
|
|
4648
4651
|
}
|
|
4649
4652
|
}
|
|
4650
|
-
function w(
|
|
4651
|
-
|
|
4653
|
+
function w(E) {
|
|
4654
|
+
E.done ? b(E.value) : h(E.value).then(k, D);
|
|
4652
4655
|
}
|
|
4653
4656
|
w((p = p.apply(s, c || [])).next());
|
|
4654
4657
|
});
|
|
@@ -4665,7 +4668,7 @@ function _s() {
|
|
|
4665
4668
|
throw Error("Invalid Bam File!");
|
|
4666
4669
|
const u = yield this.readInt(), p = yield this.readString(u), h = yield this.readInt(), b = {}, v = [];
|
|
4667
4670
|
for (let k = 0; k < h; k++) {
|
|
4668
|
-
const
|
|
4671
|
+
const D = yield this.readInt(), w = yield this.readString(D);
|
|
4669
4672
|
yield this.readInt(), b[w] = k, v.push(w);
|
|
4670
4673
|
}
|
|
4671
4674
|
return { text: p, chromToId: b, idToChrom: v };
|
|
@@ -4743,13 +4746,13 @@ function bs() {
|
|
|
4743
4746
|
for (let q in x) {
|
|
4744
4747
|
if (!g.includes(Number(q)))
|
|
4745
4748
|
continue;
|
|
4746
|
-
const N = x[q].map((V) =>
|
|
4749
|
+
const N = x[q].map((V) => L(V));
|
|
4747
4750
|
j = j.concat(N);
|
|
4748
4751
|
}
|
|
4749
4752
|
let M;
|
|
4750
4753
|
const B = Math.min(m >> 14, C.length - 1), A = Math.max(_ >> 14, C.length - 1);
|
|
4751
4754
|
for (let q = B; q <= A; q++) {
|
|
4752
|
-
let N =
|
|
4755
|
+
let N = E(C[q]);
|
|
4753
4756
|
N !== void 0 && (M === void 0 || s(N, M)) && (M = N);
|
|
4754
4757
|
}
|
|
4755
4758
|
return c(j, M);
|
|
@@ -4869,27 +4872,27 @@ function bs() {
|
|
|
4869
4872
|
});
|
|
4870
4873
|
}
|
|
4871
4874
|
Pe.streamRawBamIndex = k;
|
|
4872
|
-
function
|
|
4875
|
+
function D(d) {
|
|
4873
4876
|
return b(new n.BinaryParser(d));
|
|
4874
4877
|
}
|
|
4875
|
-
Pe.parseRawIndexRefData =
|
|
4878
|
+
Pe.parseRawIndexRefData = D;
|
|
4876
4879
|
function w(d) {
|
|
4877
4880
|
const m = new Uint8Array(8);
|
|
4878
4881
|
for (let _ = 0; _ < 8; _++)
|
|
4879
4882
|
m[_] = d.getByte();
|
|
4880
4883
|
return m;
|
|
4881
4884
|
}
|
|
4882
|
-
function
|
|
4885
|
+
function E(d) {
|
|
4883
4886
|
const m = d[1] << 8 | d[0];
|
|
4884
4887
|
return { blockPosition: d[7] * 1099511627776 + d[6] * 4294967296 + d[5] * 16777216 + d[4] * 65536 + d[3] * 256 + d[2], dataPosition: m };
|
|
4885
4888
|
}
|
|
4886
|
-
function
|
|
4889
|
+
function L(d) {
|
|
4887
4890
|
return {
|
|
4888
|
-
start:
|
|
4889
|
-
end:
|
|
4891
|
+
start: E(d.start),
|
|
4892
|
+
end: E(d.end)
|
|
4890
4893
|
};
|
|
4891
4894
|
}
|
|
4892
|
-
Pe.inflateChunk =
|
|
4895
|
+
Pe.inflateChunk = L;
|
|
4893
4896
|
function y(d, m) {
|
|
4894
4897
|
const _ = [0];
|
|
4895
4898
|
m >= 1 << 29 && (m = 1 << 29), m--;
|
|
@@ -4942,23 +4945,23 @@ function bl() {
|
|
|
4942
4945
|
var oo;
|
|
4943
4946
|
function wl() {
|
|
4944
4947
|
return oo || (oo = 1, (function(e) {
|
|
4945
|
-
var t = Qt && Qt.__awaiter || function(
|
|
4948
|
+
var t = Qt && Qt.__awaiter || function(D, w, E, L) {
|
|
4946
4949
|
function y(d) {
|
|
4947
|
-
return d instanceof
|
|
4950
|
+
return d instanceof E ? d : new E(function(m) {
|
|
4948
4951
|
m(d);
|
|
4949
4952
|
});
|
|
4950
4953
|
}
|
|
4951
|
-
return new (
|
|
4954
|
+
return new (E || (E = Promise))(function(d, m) {
|
|
4952
4955
|
function _(C) {
|
|
4953
4956
|
try {
|
|
4954
|
-
x(
|
|
4957
|
+
x(L.next(C));
|
|
4955
4958
|
} catch (j) {
|
|
4956
4959
|
m(j);
|
|
4957
4960
|
}
|
|
4958
4961
|
}
|
|
4959
4962
|
function g(C) {
|
|
4960
4963
|
try {
|
|
4961
|
-
x(
|
|
4964
|
+
x(L.throw(C));
|
|
4962
4965
|
} catch (j) {
|
|
4963
4966
|
m(j);
|
|
4964
4967
|
}
|
|
@@ -4966,23 +4969,23 @@ function wl() {
|
|
|
4966
4969
|
function x(C) {
|
|
4967
4970
|
C.done ? d(C.value) : y(C.value).then(_, g);
|
|
4968
4971
|
}
|
|
4969
|
-
x((
|
|
4972
|
+
x((L = L.apply(D, w || [])).next());
|
|
4970
4973
|
});
|
|
4971
4974
|
};
|
|
4972
4975
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.readBam = e.BamReader = e.BamAlignmentFlag = e.isFlagged = void 0;
|
|
4973
4976
|
const n = _s(), r = bs(), i = bl(), a = Yt();
|
|
4974
|
-
function o(
|
|
4975
|
-
return !!(
|
|
4977
|
+
function o(D, w) {
|
|
4978
|
+
return !!(D & w);
|
|
4976
4979
|
}
|
|
4977
4980
|
e.isFlagged = o;
|
|
4978
4981
|
var s;
|
|
4979
|
-
(function(
|
|
4980
|
-
|
|
4982
|
+
(function(D) {
|
|
4983
|
+
D[D.READ_PAIRED = 1] = "READ_PAIRED", D[D.PROPER_PAIR = 2] = "PROPER_PAIR", D[D.READ_UNMAPPED = 4] = "READ_UNMAPPED", D[D.MATE_UNMAPPED = 8] = "MATE_UNMAPPED", D[D.READ_STRAND = 16] = "READ_STRAND", D[D.MATE_STRAND = 32] = "MATE_STRAND", D[D.FIRST_OF_PAIR = 64] = "FIRST_OF_PAIR", D[D.SECOND_OF_PAIR = 128] = "SECOND_OF_PAIR", D[D.SECONDARY_ALIGNMNET = 256] = "SECONDARY_ALIGNMNET", D[D.READ_FAILS_VENDOR_QUALITY_CHECK = 512] = "READ_FAILS_VENDOR_QUALITY_CHECK", D[D.DUPLICATE_READ = 1024] = "DUPLICATE_READ", D[D.SUPPLEMENTARY_ALIGNMENT = 2048] = "SUPPLEMENTARY_ALIGNMENT";
|
|
4981
4984
|
})(s = e.BamAlignmentFlag || (e.BamAlignmentFlag = {}));
|
|
4982
4985
|
const c = "MIDNSHP=X", u = "MIS=X", p = "MDN=X", h = "=ACMGRSVTWYHKDBN";
|
|
4983
4986
|
let b = class {
|
|
4984
|
-
constructor(w,
|
|
4985
|
-
this.bamDataLoader = w, this.bamIndexDataLoader =
|
|
4987
|
+
constructor(w, E) {
|
|
4988
|
+
this.bamDataLoader = w, this.bamIndexDataLoader = E, this.indexData = void 0, this.headerData = void 0;
|
|
4986
4989
|
}
|
|
4987
4990
|
getIndexData() {
|
|
4988
4991
|
return t(this, void 0, void 0, function* () {
|
|
@@ -4994,35 +4997,35 @@ function wl() {
|
|
|
4994
4997
|
return this.headerData === void 0 && (this.headerData = yield n.readBamHeaderData(this.bamDataLoader)), this.headerData;
|
|
4995
4998
|
});
|
|
4996
4999
|
}
|
|
4997
|
-
read(w,
|
|
5000
|
+
read(w, E, L) {
|
|
4998
5001
|
return t(this, void 0, void 0, function* () {
|
|
4999
|
-
const y = yield this.getIndexData(), m = (yield this.getHeaderData()).chromToId[w], _ = r.blocksForRange(y.refData[m],
|
|
5000
|
-
return yield v(this.bamDataLoader, _, m, w,
|
|
5002
|
+
const y = yield this.getIndexData(), m = (yield this.getHeaderData()).chromToId[w], _ = r.blocksForRange(y.refData[m], E, L);
|
|
5003
|
+
return yield v(this.bamDataLoader, _, m, w, E, L);
|
|
5001
5004
|
});
|
|
5002
5005
|
}
|
|
5003
5006
|
};
|
|
5004
5007
|
e.BamReader = b;
|
|
5005
|
-
function v(
|
|
5008
|
+
function v(D, w, E, L, y, d) {
|
|
5006
5009
|
return t(this, void 0, void 0, function* () {
|
|
5007
5010
|
const m = Array();
|
|
5008
5011
|
for (let _ of w) {
|
|
5009
|
-
const g = _.end.blockPosition + 65536 - _.start.blockPosition, x = yield
|
|
5010
|
-
k(C.slice(_.start.dataPosition),
|
|
5012
|
+
const g = _.end.blockPosition + 65536 - _.start.blockPosition, x = yield D.load(_.start.blockPosition, g), C = i.bgzfUnzip(x);
|
|
5013
|
+
k(C.slice(_.start.dataPosition), E, L, y, d).forEach((M) => m.push(M));
|
|
5011
5014
|
}
|
|
5012
5015
|
return m;
|
|
5013
5016
|
});
|
|
5014
5017
|
}
|
|
5015
5018
|
e.readBam = v;
|
|
5016
|
-
function k(
|
|
5017
|
-
const d = new a.BinaryParser(
|
|
5018
|
-
for (; d.position <
|
|
5019
|
+
function k(D, w, E, L, y) {
|
|
5020
|
+
const d = new a.BinaryParser(D), m = new Array();
|
|
5021
|
+
for (; d.position < D.byteLength; ) {
|
|
5019
5022
|
const _ = d.getInt(), g = d.position + _;
|
|
5020
|
-
if (_ + d.position >
|
|
5023
|
+
if (_ + d.position > D.byteLength)
|
|
5021
5024
|
break;
|
|
5022
5025
|
const x = d.getInt(), C = d.getInt(), j = d.getByte(), M = d.getByte();
|
|
5023
5026
|
d.getUShort();
|
|
5024
5027
|
const B = d.getUShort(), A = d.getUShort(), q = !o(A, s.READ_STRAND), N = d.getInt(), V = d.getInt(), W = d.getInt(), ae = d.getInt(), ne = d.getString(j);
|
|
5025
|
-
if (x === -1 || w !== x || C > y || C + N <
|
|
5028
|
+
if (x === -1 || w !== x || C > y || C + N < L) {
|
|
5026
5029
|
d.position = g;
|
|
5027
5030
|
continue;
|
|
5028
5031
|
}
|
|
@@ -5041,7 +5044,7 @@ function wl() {
|
|
|
5041
5044
|
for (let J = 0; J < N; J++)
|
|
5042
5045
|
Y.push(d.getByte());
|
|
5043
5046
|
V >= 0 && o(A, s.MATE_STRAND), m.push({
|
|
5044
|
-
chr:
|
|
5047
|
+
chr: E,
|
|
5045
5048
|
start: C,
|
|
5046
5049
|
flags: A,
|
|
5047
5050
|
strand: q,
|
|
@@ -5260,7 +5263,7 @@ lr`
|
|
|
5260
5263
|
}
|
|
5261
5264
|
}
|
|
5262
5265
|
`;
|
|
5263
|
-
async function
|
|
5266
|
+
async function gh(e, t, n) {
|
|
5264
5267
|
return await Mt(e, t.expandedDomain, t.preRenderedWidth, n);
|
|
5265
5268
|
}
|
|
5266
5269
|
async function jl(e) {
|
|
@@ -5272,7 +5275,7 @@ async function Ml(e) {
|
|
|
5272
5275
|
return await Mt(t.url, n, r, i);
|
|
5273
5276
|
}
|
|
5274
5277
|
async function Bl(e) {
|
|
5275
|
-
var
|
|
5278
|
+
var o;
|
|
5276
5279
|
const { track: t, expandedDomain: n, queries: r } = e, i = await r.client.query({
|
|
5277
5280
|
query: Rl,
|
|
5278
5281
|
fetchPolicy: "network-only",
|
|
@@ -5285,7 +5288,7 @@ async function Bl(e) {
|
|
|
5285
5288
|
}
|
|
5286
5289
|
});
|
|
5287
5290
|
return {
|
|
5288
|
-
data:
|
|
5291
|
+
data: i.data.gene ?? null,
|
|
5289
5292
|
error: ((o = i.error) == null ? void 0 : o.message) ?? null
|
|
5290
5293
|
};
|
|
5291
5294
|
}
|
|
@@ -5409,12 +5412,12 @@ function Fl() {
|
|
|
5409
5412
|
c(!1);
|
|
5410
5413
|
return;
|
|
5411
5414
|
}
|
|
5412
|
-
const v = r(), k = a * o - 1,
|
|
5415
|
+
const v = r(), k = a * o - 1, D = {
|
|
5413
5416
|
client: e,
|
|
5414
5417
|
getTrackData: p
|
|
5415
5418
|
}, w = t.filter((y) => !p(y.id)).map((y) => ({ id: y.id, state: { data: null, error: null } }));
|
|
5416
5419
|
w.length > 0 && u(w);
|
|
5417
|
-
const
|
|
5420
|
+
const L = (await Promise.allSettled(
|
|
5418
5421
|
t.map(async (y) => {
|
|
5419
5422
|
const d = zl[y.trackType];
|
|
5420
5423
|
if (!d)
|
|
@@ -5424,7 +5427,7 @@ function Fl() {
|
|
|
5424
5427
|
domain: n,
|
|
5425
5428
|
expandedDomain: v,
|
|
5426
5429
|
preRenderedWidth: k,
|
|
5427
|
-
queries:
|
|
5430
|
+
queries: D
|
|
5428
5431
|
});
|
|
5429
5432
|
return { id: y.id, ...m };
|
|
5430
5433
|
})
|
|
@@ -5447,7 +5450,7 @@ function Fl() {
|
|
|
5447
5450
|
}
|
|
5448
5451
|
};
|
|
5449
5452
|
});
|
|
5450
|
-
u(
|
|
5453
|
+
u(L), i(0), c(!1);
|
|
5451
5454
|
})();
|
|
5452
5455
|
}, [e, n.chromosome, n.start, n.end, t.length]);
|
|
5453
5456
|
}
|
|
@@ -5504,8 +5507,8 @@ function et({
|
|
|
5504
5507
|
t && t(p);
|
|
5505
5508
|
const v = r ? oi(r, p) : /* @__PURE__ */ f.jsx(Wl, { value: h });
|
|
5506
5509
|
if (o != null && o.current) {
|
|
5507
|
-
const [k,
|
|
5508
|
-
i(v, k,
|
|
5510
|
+
const [k, D] = Ss(o.current, b.clientX, b.clientY);
|
|
5511
|
+
i(v, k, D);
|
|
5509
5512
|
} else
|
|
5510
5513
|
i(v, b.clientX, b.clientY);
|
|
5511
5514
|
},
|
|
@@ -5670,7 +5673,7 @@ function Ts({
|
|
|
5670
5673
|
onLeave: c,
|
|
5671
5674
|
tooltip: u
|
|
5672
5675
|
}) {
|
|
5673
|
-
const { totalWidth: p, sideWidth: h } = i, { x: b, reverseX: v } = lt(p), k = ce(() => Kl(t || [], b), [t, b]), { handleClick:
|
|
5676
|
+
const { totalWidth: p, sideWidth: h } = i, { x: b, reverseX: v } = lt(p), k = ce(() => Kl(t || [], b), [t, b]), { handleClick: D, handleHover: w, handleLeave: E } = et({
|
|
5674
5677
|
onClick: o,
|
|
5675
5678
|
onHover: s,
|
|
5676
5679
|
onLeave: c,
|
|
@@ -5679,27 +5682,27 @@ function Ts({
|
|
|
5679
5682
|
return /* @__PURE__ */ f.jsxs("g", { width: p, height: n, clipPath: `url(#${e})`, transform: `translate(-${h}, 0)`, children: [
|
|
5680
5683
|
/* @__PURE__ */ f.jsx("rect", { width: p, height: n, fill: "transparent" }),
|
|
5681
5684
|
/* @__PURE__ */ f.jsx("defs", { children: /* @__PURE__ */ f.jsx(Ot, { id: e, width: p, height: n }) }),
|
|
5682
|
-
k.map((
|
|
5683
|
-
const d = Ls({ ...
|
|
5685
|
+
k.map((L, y) => {
|
|
5686
|
+
const d = Ls({ ...L.row, start: L.start, end: L.end }, v), m = n * (1 - 2 * a), _ = n * a;
|
|
5684
5687
|
return /* @__PURE__ */ f.jsx(
|
|
5685
5688
|
"rect",
|
|
5686
5689
|
{
|
|
5687
5690
|
style: { cursor: o ? "pointer" : "default" },
|
|
5688
5691
|
height: m,
|
|
5689
|
-
width:
|
|
5690
|
-
x:
|
|
5692
|
+
width: L.end - L.start,
|
|
5693
|
+
x: L.start,
|
|
5691
5694
|
y: _,
|
|
5692
|
-
fill:
|
|
5693
|
-
onClick: () =>
|
|
5694
|
-
onMouseOver: (g) => w(d,
|
|
5695
|
-
onMouseOut: () =>
|
|
5695
|
+
fill: L.color || r,
|
|
5696
|
+
onClick: () => D(d),
|
|
5697
|
+
onMouseOver: (g) => w(d, L.name || "", g),
|
|
5698
|
+
onMouseOut: () => E(d)
|
|
5696
5699
|
},
|
|
5697
5700
|
`${e}_${y}`
|
|
5698
5701
|
);
|
|
5699
5702
|
})
|
|
5700
5703
|
] });
|
|
5701
5704
|
}
|
|
5702
|
-
const Ql = 0, lo = 255,
|
|
5705
|
+
const Ql = 0, lo = 255, mh = [
|
|
5703
5706
|
"#fd7f6f",
|
|
5704
5707
|
"#7eb0d5",
|
|
5705
5708
|
"#b2e061",
|
|
@@ -5709,7 +5712,7 @@ const Ql = 0, lo = 255, hh = [
|
|
|
5709
5712
|
"#beb9db",
|
|
5710
5713
|
"#fdcce5",
|
|
5711
5714
|
"#8bd3c7"
|
|
5712
|
-
],
|
|
5715
|
+
], vh = [
|
|
5713
5716
|
"#e60049",
|
|
5714
5717
|
"#0bb4ff",
|
|
5715
5718
|
"#50e991",
|
|
@@ -5764,25 +5767,25 @@ function tu(e, t, n, r) {
|
|
|
5764
5767
|
}
|
|
5765
5768
|
function ru({ id: e, data: t, color: n, height: r, dimensions: i, tooltip: a }) {
|
|
5766
5769
|
var j;
|
|
5767
|
-
const { sideWidth: o, viewWidth: s, totalWidth: c } = i, u = (c / s - 1) / 2, p = fe((M) => M.multiplier), h = xe((M) => M.editTrack), b = fe((M) => M.delta), v = fe((M) => M.marginWidth), k = fe((M) => M.svgRef),
|
|
5770
|
+
const { sideWidth: o, viewWidth: s, totalWidth: c } = i, u = (c / s - 1) / 2, p = fe((M) => M.multiplier), h = xe((M) => M.editTrack), b = fe((M) => M.delta), v = fe((M) => M.marginWidth), k = fe((M) => M.svgRef), D = ce(() => {
|
|
5768
5771
|
const B = ((t == null ? void 0 : t.length) ?? 0) / p, A = Math.floor(u * B), q = Math.floor((u + 1) * B), N = t == null ? void 0 : t.slice(A, q);
|
|
5769
5772
|
return Es(N ?? []);
|
|
5770
5773
|
}, [t, p, u]);
|
|
5771
5774
|
Ee(() => {
|
|
5772
|
-
h(e, { range:
|
|
5773
|
-
}, [
|
|
5774
|
-
const w = ce(() => t.some((M) => M.min < 0), [t]),
|
|
5775
|
+
h(e, { range: D });
|
|
5776
|
+
}, [D, e, h]);
|
|
5777
|
+
const w = ce(() => t.some((M) => M.min < 0), [t]), E = ce(
|
|
5775
5778
|
() => Xl(t),
|
|
5776
5779
|
// data && data.length && dataType(data) === DataType.ValuedPoint ?
|
|
5777
5780
|
// : renderBigWig(data as BigWigData[] | BigZoomData[], 100),
|
|
5778
5781
|
[t]
|
|
5779
|
-
),
|
|
5780
|
-
const M = Vl(
|
|
5781
|
-
return
|
|
5782
|
+
), L = ce(() => {
|
|
5783
|
+
const M = Vl(D, 1);
|
|
5784
|
+
return E.renderPoints.filter((A) => A.min < 1 / 0 && A.max > -1 / 0).map((A) => {
|
|
5782
5785
|
const q = M(A.max);
|
|
5783
5786
|
return pt(n, q / 1.25);
|
|
5784
5787
|
});
|
|
5785
|
-
}, [n,
|
|
5788
|
+
}, [n, E, D]), y = ht((M) => M.text), { mouseState: d, updateMouseState: m, clearMouseState: _ } = di(k, c, v, o), g = ce(() => {
|
|
5786
5789
|
var M;
|
|
5787
5790
|
return (M = d.pos) != null && M.x ? d.pos.x - v + o : 0;
|
|
5788
5791
|
}, [(j = d.pos) == null ? void 0 : j.x, v, o]), { handleHover: x, handleLeave: C } = et({
|
|
@@ -5792,7 +5795,7 @@ function ru({ id: e, data: t, color: n, height: r, dimensions: i, tooltip: a })
|
|
|
5792
5795
|
tooltip: a
|
|
5793
5796
|
});
|
|
5794
5797
|
return /* @__PURE__ */ f.jsxs("g", { width: c, height: r, transform: `translate(-${o}, 0)`, children: [
|
|
5795
|
-
/* @__PURE__ */ f.jsx("defs", { children: /* @__PURE__ */ f.jsx("linearGradient", { id: e, children:
|
|
5798
|
+
/* @__PURE__ */ f.jsx("defs", { children: /* @__PURE__ */ f.jsx("linearGradient", { id: e, children: L.map((M, B) => /* @__PURE__ */ f.jsx("stop", { offset: `${B}%`, stopColor: M }, `${e}_pt_${B}`)) }) }),
|
|
5796
5799
|
/* @__PURE__ */ f.jsx("rect", { width: c, x: 0, y: r / 3, height: r / 3, fill: `url('#${e}')` }),
|
|
5797
5800
|
!b && g && /* @__PURE__ */ f.jsx("line", { stroke: y, x1: g, x2: g, y1: 0, y2: r }),
|
|
5798
5801
|
/* @__PURE__ */ f.jsx(
|
|
@@ -5833,7 +5836,7 @@ var uo;
|
|
|
5833
5836
|
function nu() {
|
|
5834
5837
|
if (uo) return we;
|
|
5835
5838
|
uo = 1;
|
|
5836
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, o = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, k = e ? Symbol.for("react.lazy") : 60116,
|
|
5839
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, o = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, k = e ? Symbol.for("react.lazy") : 60116, D = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, E = e ? Symbol.for("react.responder") : 60118, L = e ? Symbol.for("react.scope") : 60119;
|
|
5837
5840
|
function y(m) {
|
|
5838
5841
|
if (typeof m == "object" && m !== null) {
|
|
5839
5842
|
var _ = m.$$typeof;
|
|
@@ -5892,7 +5895,7 @@ function nu() {
|
|
|
5892
5895
|
}, we.isSuspense = function(m) {
|
|
5893
5896
|
return y(m) === h;
|
|
5894
5897
|
}, we.isValidElementType = function(m) {
|
|
5895
|
-
return typeof m == "string" || typeof m == "function" || m === r || m === u || m === a || m === i || m === h || m === b || typeof m == "object" && m !== null && (m.$$typeof === k || m.$$typeof === v || m.$$typeof === o || m.$$typeof === s || m.$$typeof === p || m.$$typeof === w || m.$$typeof ===
|
|
5898
|
+
return typeof m == "string" || typeof m == "function" || m === r || m === u || m === a || m === i || m === h || m === b || typeof m == "object" && m !== null && (m.$$typeof === k || m.$$typeof === v || m.$$typeof === o || m.$$typeof === s || m.$$typeof === p || m.$$typeof === w || m.$$typeof === E || m.$$typeof === L || m.$$typeof === D);
|
|
5896
5899
|
}, we.typeOf = y, we;
|
|
5897
5900
|
}
|
|
5898
5901
|
var Se = {};
|
|
@@ -5907,10 +5910,10 @@ var Se = {};
|
|
|
5907
5910
|
var fo;
|
|
5908
5911
|
function iu() {
|
|
5909
5912
|
return fo || (fo = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
5910
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, o = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, k = e ? Symbol.for("react.lazy") : 60116,
|
|
5913
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, o = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, k = e ? Symbol.for("react.lazy") : 60116, D = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, E = e ? Symbol.for("react.responder") : 60118, L = e ? Symbol.for("react.scope") : 60119;
|
|
5911
5914
|
function y(Q) {
|
|
5912
5915
|
return typeof Q == "string" || typeof Q == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
5913
|
-
Q === r || Q === u || Q === a || Q === i || Q === h || Q === b || typeof Q == "object" && Q !== null && (Q.$$typeof === k || Q.$$typeof === v || Q.$$typeof === o || Q.$$typeof === s || Q.$$typeof === p || Q.$$typeof === w || Q.$$typeof ===
|
|
5916
|
+
Q === r || Q === u || Q === a || Q === i || Q === h || Q === b || typeof Q == "object" && Q !== null && (Q.$$typeof === k || Q.$$typeof === v || Q.$$typeof === o || Q.$$typeof === s || Q.$$typeof === p || Q.$$typeof === w || Q.$$typeof === E || Q.$$typeof === L || Q.$$typeof === D);
|
|
5914
5917
|
}
|
|
5915
5918
|
function d(Q) {
|
|
5916
5919
|
if (typeof Q == "object" && Q !== null) {
|
|
@@ -6127,15 +6130,15 @@ function su() {
|
|
|
6127
6130
|
return I;
|
|
6128
6131
|
}
|
|
6129
6132
|
var b = "<<anonymous>>", v = {
|
|
6130
|
-
array:
|
|
6131
|
-
bigint:
|
|
6132
|
-
bool:
|
|
6133
|
-
func:
|
|
6134
|
-
number:
|
|
6135
|
-
object:
|
|
6136
|
-
string:
|
|
6137
|
-
symbol:
|
|
6138
|
-
any:
|
|
6133
|
+
array: E("array"),
|
|
6134
|
+
bigint: E("bigint"),
|
|
6135
|
+
bool: E("boolean"),
|
|
6136
|
+
func: E("function"),
|
|
6137
|
+
number: E("number"),
|
|
6138
|
+
object: E("object"),
|
|
6139
|
+
string: E("string"),
|
|
6140
|
+
symbol: E("symbol"),
|
|
6141
|
+
any: L(),
|
|
6139
6142
|
arrayOf: y,
|
|
6140
6143
|
element: d(),
|
|
6141
6144
|
elementType: m(),
|
|
@@ -6150,10 +6153,10 @@ function su() {
|
|
|
6150
6153
|
function k(F, I) {
|
|
6151
6154
|
return F === I ? F !== 0 || 1 / F === 1 / I : F !== F && I !== I;
|
|
6152
6155
|
}
|
|
6153
|
-
function
|
|
6156
|
+
function D(F, I) {
|
|
6154
6157
|
this.message = F, this.data = I && typeof I == "object" ? I : {}, this.stack = "";
|
|
6155
6158
|
}
|
|
6156
|
-
|
|
6159
|
+
D.prototype = Error.prototype;
|
|
6157
6160
|
function w(F) {
|
|
6158
6161
|
if (process.env.NODE_ENV !== "production")
|
|
6159
6162
|
var I = {}, G = 0;
|
|
@@ -6172,17 +6175,17 @@ function su() {
|
|
|
6172
6175
|
), I[Le] = !0, G++);
|
|
6173
6176
|
}
|
|
6174
6177
|
}
|
|
6175
|
-
return Y[J] == null ? le ? Y[J] === null ? new
|
|
6178
|
+
return Y[J] == null ? le ? Y[J] === null ? new D("The " + de + " `" + ue + "` is marked as required " + ("in `" + re + "`, but its value is `null`.")) : new D("The " + de + " `" + ue + "` is marked as required in " + ("`" + re + "`, but its value is `undefined`.")) : null : F(Y, J, re, de, ue);
|
|
6176
6179
|
}
|
|
6177
6180
|
var te = K.bind(null, !1);
|
|
6178
6181
|
return te.isRequired = K.bind(null, !0), te;
|
|
6179
6182
|
}
|
|
6180
|
-
function
|
|
6183
|
+
function E(F) {
|
|
6181
6184
|
function I(G, K, te, le, Y, J) {
|
|
6182
6185
|
var re = G[K], de = V(re);
|
|
6183
6186
|
if (de !== F) {
|
|
6184
6187
|
var ue = W(re);
|
|
6185
|
-
return new
|
|
6188
|
+
return new D(
|
|
6186
6189
|
"Invalid " + le + " `" + Y + "` of type " + ("`" + ue + "` supplied to `" + te + "`, expected ") + ("`" + F + "`."),
|
|
6187
6190
|
{ expectedType: F }
|
|
6188
6191
|
);
|
|
@@ -6191,17 +6194,17 @@ function su() {
|
|
|
6191
6194
|
}
|
|
6192
6195
|
return w(I);
|
|
6193
6196
|
}
|
|
6194
|
-
function
|
|
6197
|
+
function L() {
|
|
6195
6198
|
return w(o);
|
|
6196
6199
|
}
|
|
6197
6200
|
function y(F) {
|
|
6198
6201
|
function I(G, K, te, le, Y) {
|
|
6199
6202
|
if (typeof F != "function")
|
|
6200
|
-
return new
|
|
6203
|
+
return new D("Property `" + Y + "` of component `" + te + "` has invalid PropType notation inside arrayOf.");
|
|
6201
6204
|
var J = G[K];
|
|
6202
6205
|
if (!Array.isArray(J)) {
|
|
6203
6206
|
var re = V(J);
|
|
6204
|
-
return new
|
|
6207
|
+
return new D("Invalid " + le + " `" + Y + "` of type " + ("`" + re + "` supplied to `" + te + "`, expected an array."));
|
|
6205
6208
|
}
|
|
6206
6209
|
for (var de = 0; de < J.length; de++) {
|
|
6207
6210
|
var ue = F(J, de, te, le, Y + "[" + de + "]", n);
|
|
@@ -6217,7 +6220,7 @@ function su() {
|
|
|
6217
6220
|
var Y = I[G];
|
|
6218
6221
|
if (!s(Y)) {
|
|
6219
6222
|
var J = V(Y);
|
|
6220
|
-
return new
|
|
6223
|
+
return new D("Invalid " + te + " `" + le + "` of type " + ("`" + J + "` supplied to `" + K + "`, expected a single ReactElement."));
|
|
6221
6224
|
}
|
|
6222
6225
|
return null;
|
|
6223
6226
|
}
|
|
@@ -6228,7 +6231,7 @@ function su() {
|
|
|
6228
6231
|
var Y = I[G];
|
|
6229
6232
|
if (!e.isValidElementType(Y)) {
|
|
6230
6233
|
var J = V(Y);
|
|
6231
|
-
return new
|
|
6234
|
+
return new D("Invalid " + te + " `" + le + "` of type " + ("`" + J + "` supplied to `" + K + "`, expected a single ReactElement type."));
|
|
6232
6235
|
}
|
|
6233
6236
|
return null;
|
|
6234
6237
|
}
|
|
@@ -6238,7 +6241,7 @@ function su() {
|
|
|
6238
6241
|
function I(G, K, te, le, Y) {
|
|
6239
6242
|
if (!(G[K] instanceof F)) {
|
|
6240
6243
|
var J = F.name || b, re = ne(G[K]);
|
|
6241
|
-
return new
|
|
6244
|
+
return new D("Invalid " + le + " `" + Y + "` of type " + ("`" + re + "` supplied to `" + te + "`, expected ") + ("instance of `" + J + "`."));
|
|
6242
6245
|
}
|
|
6243
6246
|
return null;
|
|
6244
6247
|
}
|
|
@@ -6257,17 +6260,17 @@ function su() {
|
|
|
6257
6260
|
var Le = W(Q);
|
|
6258
6261
|
return Le === "symbol" ? String(Q) : Q;
|
|
6259
6262
|
});
|
|
6260
|
-
return new
|
|
6263
|
+
return new D("Invalid " + le + " `" + Y + "` of value `" + String(J) + "` " + ("supplied to `" + te + "`, expected one of " + de + "."));
|
|
6261
6264
|
}
|
|
6262
6265
|
return w(I);
|
|
6263
6266
|
}
|
|
6264
6267
|
function x(F) {
|
|
6265
6268
|
function I(G, K, te, le, Y) {
|
|
6266
6269
|
if (typeof F != "function")
|
|
6267
|
-
return new
|
|
6270
|
+
return new D("Property `" + Y + "` of component `" + te + "` has invalid PropType notation inside objectOf.");
|
|
6268
6271
|
var J = G[K], re = V(J);
|
|
6269
6272
|
if (re !== "object")
|
|
6270
|
-
return new
|
|
6273
|
+
return new D("Invalid " + le + " `" + Y + "` of type " + ("`" + re + "` supplied to `" + te + "`, expected an object."));
|
|
6271
6274
|
for (var de in J)
|
|
6272
6275
|
if (r(J, de)) {
|
|
6273
6276
|
var ue = F(J, de, te, le, Y + "." + de, n);
|
|
@@ -6296,18 +6299,18 @@ function su() {
|
|
|
6296
6299
|
Q.data && r(Q.data, "expectedType") && de.push(Q.data.expectedType);
|
|
6297
6300
|
}
|
|
6298
6301
|
var Le = de.length > 0 ? ", expected one of type [" + de.join(", ") + "]" : "";
|
|
6299
|
-
return new
|
|
6302
|
+
return new D("Invalid " + J + " `" + re + "` supplied to " + ("`" + Y + "`" + Le + "."));
|
|
6300
6303
|
}
|
|
6301
6304
|
return w(K);
|
|
6302
6305
|
}
|
|
6303
6306
|
function j() {
|
|
6304
6307
|
function F(I, G, K, te, le) {
|
|
6305
|
-
return q(I[G]) ? null : new
|
|
6308
|
+
return q(I[G]) ? null : new D("Invalid " + te + " `" + le + "` supplied to " + ("`" + K + "`, expected a ReactNode."));
|
|
6306
6309
|
}
|
|
6307
6310
|
return w(F);
|
|
6308
6311
|
}
|
|
6309
6312
|
function M(F, I, G, K, te) {
|
|
6310
|
-
return new
|
|
6313
|
+
return new D(
|
|
6311
6314
|
(F || "React class") + ": " + I + " type `" + G + "." + K + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + te + "`."
|
|
6312
6315
|
);
|
|
6313
6316
|
}
|
|
@@ -6315,7 +6318,7 @@ function su() {
|
|
|
6315
6318
|
function I(G, K, te, le, Y) {
|
|
6316
6319
|
var J = G[K], re = V(J);
|
|
6317
6320
|
if (re !== "object")
|
|
6318
|
-
return new
|
|
6321
|
+
return new D("Invalid " + le + " `" + Y + "` of type `" + re + "` " + ("supplied to `" + te + "`, expected `object`."));
|
|
6319
6322
|
for (var de in F) {
|
|
6320
6323
|
var ue = F[de];
|
|
6321
6324
|
if (typeof ue != "function")
|
|
@@ -6332,14 +6335,14 @@ function su() {
|
|
|
6332
6335
|
function I(G, K, te, le, Y) {
|
|
6333
6336
|
var J = G[K], re = V(J);
|
|
6334
6337
|
if (re !== "object")
|
|
6335
|
-
return new
|
|
6338
|
+
return new D("Invalid " + le + " `" + Y + "` of type `" + re + "` " + ("supplied to `" + te + "`, expected `object`."));
|
|
6336
6339
|
var de = t({}, G[K], F);
|
|
6337
6340
|
for (var ue in de) {
|
|
6338
6341
|
var ke = F[ue];
|
|
6339
6342
|
if (r(F, ue) && typeof ke != "function")
|
|
6340
6343
|
return M(te, le, Y, ue, W(ke));
|
|
6341
6344
|
if (!ke)
|
|
6342
|
-
return new
|
|
6345
|
+
return new D(
|
|
6343
6346
|
"Invalid " + le + " `" + Y + "` key `" + ue + "` supplied to `" + te + "`.\nBad object: " + JSON.stringify(G[K], null, " ") + `
|
|
6344
6347
|
Valid keys: ` + JSON.stringify(Object.keys(F), null, " ")
|
|
6345
6348
|
);
|
|
@@ -6561,7 +6564,7 @@ function pi() {
|
|
|
6561
6564
|
if (ko) return je;
|
|
6562
6565
|
ko = 1, Object.defineProperty(je, "__esModule", {
|
|
6563
6566
|
value: !0
|
|
6564
|
-
}), je.addClassName = m, je.addEvent = o, je.addUserSelectStyles =
|
|
6567
|
+
}), je.addClassName = m, je.addEvent = o, je.addUserSelectStyles = L, je.createCSSTransform = v, je.createSVGTransform = k, je.getTouch = w, je.getTouchIdentifier = E, je.getTranslation = D, je.innerHeight = p, je.innerWidth = h, je.matchesSelector = i, je.matchesSelectorAndParentsTo = a, je.offsetXYFromParent = b, je.outerHeight = c, je.outerWidth = u, je.removeClassName = _, je.removeEvent = s, je.scheduleRemoveUserSelectStyles = y;
|
|
6565
6568
|
var e = Lr(), t = n(uu());
|
|
6566
6569
|
function n(g, x) {
|
|
6567
6570
|
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap();
|
|
@@ -6639,15 +6642,15 @@ function pi() {
|
|
|
6639
6642
|
};
|
|
6640
6643
|
}
|
|
6641
6644
|
function v(g, x) {
|
|
6642
|
-
const C =
|
|
6645
|
+
const C = D(g, x, "px");
|
|
6643
6646
|
return {
|
|
6644
6647
|
[(0, t.browserPrefixToKey)("transform", t.default)]: C
|
|
6645
6648
|
};
|
|
6646
6649
|
}
|
|
6647
6650
|
function k(g, x) {
|
|
6648
|
-
return
|
|
6651
|
+
return D(g, x, "");
|
|
6649
6652
|
}
|
|
6650
|
-
function
|
|
6653
|
+
function D(g, x, C) {
|
|
6651
6654
|
let {
|
|
6652
6655
|
x: j,
|
|
6653
6656
|
y: M
|
|
@@ -6661,11 +6664,11 @@ function pi() {
|
|
|
6661
6664
|
function w(g, x) {
|
|
6662
6665
|
return g.targetTouches && (0, e.findInArray)(g.targetTouches, (C) => x === C.identifier) || g.changedTouches && (0, e.findInArray)(g.changedTouches, (C) => x === C.identifier);
|
|
6663
6666
|
}
|
|
6664
|
-
function
|
|
6667
|
+
function E(g) {
|
|
6665
6668
|
if (g.targetTouches && g.targetTouches[0]) return g.targetTouches[0].identifier;
|
|
6666
6669
|
if (g.changedTouches && g.changedTouches[0]) return g.changedTouches[0].identifier;
|
|
6667
6670
|
}
|
|
6668
|
-
function
|
|
6671
|
+
function L(g) {
|
|
6669
6672
|
if (!g) return;
|
|
6670
6673
|
let x = g.getElementById("react-draggable-style-el");
|
|
6671
6674
|
x || (x = g.createElement("style"), x.type = "text/css", x.id = "react-draggable-style-el", x.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
@@ -6710,27 +6713,27 @@ function js() {
|
|
|
6710
6713
|
bounds: k
|
|
6711
6714
|
} = h.props;
|
|
6712
6715
|
k = typeof k == "string" ? k : u(k);
|
|
6713
|
-
const
|
|
6716
|
+
const D = p(h);
|
|
6714
6717
|
if (typeof k == "string") {
|
|
6715
6718
|
const {
|
|
6716
6719
|
ownerDocument: w
|
|
6717
|
-
} =
|
|
6718
|
-
let
|
|
6719
|
-
if (k === "parent" ?
|
|
6720
|
+
} = D, E = w.defaultView;
|
|
6721
|
+
let L;
|
|
6722
|
+
if (k === "parent" ? L = D.parentNode : L = D.getRootNode().querySelector(k), !(L instanceof E.HTMLElement))
|
|
6720
6723
|
throw new Error('Bounds selector "' + k + '" could not find an element.');
|
|
6721
|
-
const y =
|
|
6724
|
+
const y = L, d = E.getComputedStyle(D), m = E.getComputedStyle(y);
|
|
6722
6725
|
k = {
|
|
6723
|
-
left: -
|
|
6724
|
-
top: -
|
|
6725
|
-
right: (0, t.innerWidth)(y) - (0, t.outerWidth)(
|
|
6726
|
-
bottom: (0, t.innerHeight)(y) - (0, t.outerHeight)(
|
|
6726
|
+
left: -D.offsetLeft + (0, e.int)(m.paddingLeft) + (0, e.int)(d.marginLeft),
|
|
6727
|
+
top: -D.offsetTop + (0, e.int)(m.paddingTop) + (0, e.int)(d.marginTop),
|
|
6728
|
+
right: (0, t.innerWidth)(y) - (0, t.outerWidth)(D) - D.offsetLeft + (0, e.int)(m.paddingRight) - (0, e.int)(d.marginRight),
|
|
6729
|
+
bottom: (0, t.innerHeight)(y) - (0, t.outerHeight)(D) - D.offsetTop + (0, e.int)(m.paddingBottom) - (0, e.int)(d.marginBottom)
|
|
6727
6730
|
};
|
|
6728
6731
|
}
|
|
6729
6732
|
return (0, e.isNum)(k.right) && (b = Math.min(b, k.right)), (0, e.isNum)(k.bottom) && (v = Math.min(v, k.bottom)), (0, e.isNum)(k.left) && (b = Math.max(b, k.left)), (0, e.isNum)(k.top) && (v = Math.max(v, k.top)), [b, v];
|
|
6730
6733
|
}
|
|
6731
6734
|
function r(h, b, v) {
|
|
6732
|
-
const k = Math.round(b / h[0]) * h[0],
|
|
6733
|
-
return [k,
|
|
6735
|
+
const k = Math.round(b / h[0]) * h[0], D = Math.round(v / h[1]) * h[1];
|
|
6736
|
+
return [k, D];
|
|
6734
6737
|
}
|
|
6735
6738
|
function i(h) {
|
|
6736
6739
|
return h.props.axis === "both" || h.props.axis === "x";
|
|
@@ -6741,13 +6744,13 @@ function js() {
|
|
|
6741
6744
|
function o(h, b, v) {
|
|
6742
6745
|
const k = typeof b == "number" ? (0, t.getTouch)(h, b) : null;
|
|
6743
6746
|
if (typeof b == "number" && !k) return null;
|
|
6744
|
-
const
|
|
6747
|
+
const D = p(v), w = v.props.offsetParent || D.offsetParent || D.ownerDocument.body;
|
|
6745
6748
|
return (0, t.offsetXYFromParent)(k || h, w, v.props.scale);
|
|
6746
6749
|
}
|
|
6747
6750
|
function s(h, b, v) {
|
|
6748
|
-
const k = !(0, e.isNum)(h.lastX),
|
|
6751
|
+
const k = !(0, e.isNum)(h.lastX), D = p(h);
|
|
6749
6752
|
return k ? {
|
|
6750
|
-
node:
|
|
6753
|
+
node: D,
|
|
6751
6754
|
deltaX: 0,
|
|
6752
6755
|
deltaY: 0,
|
|
6753
6756
|
lastX: b,
|
|
@@ -6755,7 +6758,7 @@ function js() {
|
|
|
6755
6758
|
x: b,
|
|
6756
6759
|
y: v
|
|
6757
6760
|
} : {
|
|
6758
|
-
node:
|
|
6761
|
+
node: D,
|
|
6759
6762
|
deltaX: b - h.lastX,
|
|
6760
6763
|
deltaY: v - h.lastY,
|
|
6761
6764
|
lastX: h.lastX,
|
|
@@ -6809,39 +6812,39 @@ function fu() {
|
|
|
6809
6812
|
value: !0
|
|
6810
6813
|
}), nr.default = void 0;
|
|
6811
6814
|
var e = c(Te), t = s(/* @__PURE__ */ Ds()), n = s(Vo), r = pi(), i = js(), a = Lr(), o = s(Ms());
|
|
6812
|
-
function s(
|
|
6813
|
-
return
|
|
6815
|
+
function s(D) {
|
|
6816
|
+
return D && D.__esModule ? D : { default: D };
|
|
6814
6817
|
}
|
|
6815
|
-
function c(
|
|
6816
|
-
if (typeof WeakMap == "function") var
|
|
6818
|
+
function c(D, w) {
|
|
6819
|
+
if (typeof WeakMap == "function") var E = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap();
|
|
6817
6820
|
return (c = function(y, d) {
|
|
6818
6821
|
if (!d && y && y.__esModule) return y;
|
|
6819
6822
|
var m, _, g = { __proto__: null, default: y };
|
|
6820
6823
|
if (y === null || typeof y != "object" && typeof y != "function") return g;
|
|
6821
|
-
if (m = d ?
|
|
6824
|
+
if (m = d ? L : E) {
|
|
6822
6825
|
if (m.has(y)) return m.get(y);
|
|
6823
6826
|
m.set(y, g);
|
|
6824
6827
|
}
|
|
6825
6828
|
for (const x in y) x !== "default" && {}.hasOwnProperty.call(y, x) && ((_ = (m = Object.defineProperty) && Object.getOwnPropertyDescriptor(y, x)) && (_.get || _.set) ? m(g, x, _) : g[x] = y[x]);
|
|
6826
6829
|
return g;
|
|
6827
|
-
})(
|
|
6830
|
+
})(D, w);
|
|
6828
6831
|
}
|
|
6829
|
-
function u(
|
|
6830
|
-
return (w = p(w)) in
|
|
6832
|
+
function u(D, w, E) {
|
|
6833
|
+
return (w = p(w)) in D ? Object.defineProperty(D, w, { value: E, enumerable: !0, configurable: !0, writable: !0 }) : D[w] = E, D;
|
|
6831
6834
|
}
|
|
6832
|
-
function p(
|
|
6833
|
-
var w = h(
|
|
6835
|
+
function p(D) {
|
|
6836
|
+
var w = h(D, "string");
|
|
6834
6837
|
return typeof w == "symbol" ? w : w + "";
|
|
6835
6838
|
}
|
|
6836
|
-
function h(
|
|
6837
|
-
if (typeof
|
|
6838
|
-
var
|
|
6839
|
-
if (
|
|
6840
|
-
var
|
|
6841
|
-
if (typeof
|
|
6839
|
+
function h(D, w) {
|
|
6840
|
+
if (typeof D != "object" || !D) return D;
|
|
6841
|
+
var E = D[Symbol.toPrimitive];
|
|
6842
|
+
if (E !== void 0) {
|
|
6843
|
+
var L = E.call(D, w);
|
|
6844
|
+
if (typeof L != "object") return L;
|
|
6842
6845
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
6843
6846
|
}
|
|
6844
|
-
return (w === "string" ? String : Number)(
|
|
6847
|
+
return (w === "string" ? String : Number)(D);
|
|
6845
6848
|
}
|
|
6846
6849
|
const b = {
|
|
6847
6850
|
touch: {
|
|
@@ -6859,13 +6862,13 @@ function fu() {
|
|
|
6859
6862
|
constructor() {
|
|
6860
6863
|
super(...arguments), u(this, "dragging", !1), u(this, "lastX", NaN), u(this, "lastY", NaN), u(this, "touchIdentifier", null), u(this, "mounted", !1), u(this, "handleDragStart", (w) => {
|
|
6861
6864
|
if (this.props.onMouseDown(w), !this.props.allowAnyClick && typeof w.button == "number" && w.button !== 0) return !1;
|
|
6862
|
-
const
|
|
6863
|
-
if (!
|
|
6865
|
+
const E = this.findDOMNode();
|
|
6866
|
+
if (!E || !E.ownerDocument || !E.ownerDocument.body)
|
|
6864
6867
|
throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
6865
6868
|
const {
|
|
6866
|
-
ownerDocument:
|
|
6867
|
-
} =
|
|
6868
|
-
if (this.props.disabled || !(w.target instanceof
|
|
6869
|
+
ownerDocument: L
|
|
6870
|
+
} = E;
|
|
6871
|
+
if (this.props.disabled || !(w.target instanceof L.defaultView.Node) || this.props.handle && !(0, r.matchesSelectorAndParentsTo)(w.target, this.props.handle, E) || this.props.cancel && (0, r.matchesSelectorAndParentsTo)(w.target, this.props.cancel, E))
|
|
6869
6872
|
return;
|
|
6870
6873
|
w.type === "touchstart" && !this.props.allowMobileScroll && w.preventDefault();
|
|
6871
6874
|
const y = (0, r.getTouchIdentifier)(w);
|
|
@@ -6876,20 +6879,20 @@ function fu() {
|
|
|
6876
6879
|
x: m,
|
|
6877
6880
|
y: _
|
|
6878
6881
|
} = d, g = (0, i.createCoreData)(this, m, _);
|
|
6879
|
-
(0, o.default)("DraggableCore: handleDragStart: %j", g), (0, o.default)("calling", this.props.onStart), !(this.props.onStart(w, g) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(
|
|
6882
|
+
(0, o.default)("DraggableCore: handleDragStart: %j", g), (0, o.default)("calling", this.props.onStart), !(this.props.onStart(w, g) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(L), this.dragging = !0, this.lastX = m, this.lastY = _, (0, r.addEvent)(L, v.move, this.handleDrag), (0, r.addEvent)(L, v.stop, this.handleDragStop));
|
|
6880
6883
|
}), u(this, "handleDrag", (w) => {
|
|
6881
|
-
const
|
|
6882
|
-
if (
|
|
6884
|
+
const E = (0, i.getControlPosition)(w, this.touchIdentifier, this);
|
|
6885
|
+
if (E == null) return;
|
|
6883
6886
|
let {
|
|
6884
|
-
x:
|
|
6887
|
+
x: L,
|
|
6885
6888
|
y
|
|
6886
|
-
} =
|
|
6889
|
+
} = E;
|
|
6887
6890
|
if (Array.isArray(this.props.grid)) {
|
|
6888
|
-
let _ =
|
|
6891
|
+
let _ = L - this.lastX, g = y - this.lastY;
|
|
6889
6892
|
if ([_, g] = (0, i.snapToGrid)(this.props.grid, _, g), !_ && !g) return;
|
|
6890
|
-
|
|
6893
|
+
L = this.lastX + _, y = this.lastY + g;
|
|
6891
6894
|
}
|
|
6892
|
-
const d = (0, i.createCoreData)(this,
|
|
6895
|
+
const d = (0, i.createCoreData)(this, L, y);
|
|
6893
6896
|
if ((0, o.default)("DraggableCore: handleDrag: %j", d), this.props.onDrag(w, d) === !1 || this.mounted === !1) {
|
|
6894
6897
|
try {
|
|
6895
6898
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
@@ -6899,20 +6902,20 @@ function fu() {
|
|
|
6899
6902
|
}
|
|
6900
6903
|
return;
|
|
6901
6904
|
}
|
|
6902
|
-
this.lastX =
|
|
6905
|
+
this.lastX = L, this.lastY = y;
|
|
6903
6906
|
}), u(this, "handleDragStop", (w) => {
|
|
6904
6907
|
if (!this.dragging) return;
|
|
6905
|
-
const
|
|
6906
|
-
if (
|
|
6908
|
+
const E = (0, i.getControlPosition)(w, this.touchIdentifier, this);
|
|
6909
|
+
if (E == null) return;
|
|
6907
6910
|
let {
|
|
6908
|
-
x:
|
|
6911
|
+
x: L,
|
|
6909
6912
|
y
|
|
6910
|
-
} =
|
|
6913
|
+
} = E;
|
|
6911
6914
|
if (Array.isArray(this.props.grid)) {
|
|
6912
|
-
let g =
|
|
6913
|
-
[g, x] = (0, i.snapToGrid)(this.props.grid, g, x),
|
|
6915
|
+
let g = L - this.lastX || 0, x = y - this.lastY || 0;
|
|
6916
|
+
[g, x] = (0, i.snapToGrid)(this.props.grid, g, x), L = this.lastX + g, y = this.lastY + x;
|
|
6914
6917
|
}
|
|
6915
|
-
const d = (0, i.createCoreData)(this,
|
|
6918
|
+
const d = (0, i.createCoreData)(this, L, y);
|
|
6916
6919
|
if (this.props.onStop(w, d) === !1 || this.mounted === !1) return !1;
|
|
6917
6920
|
const _ = this.findDOMNode();
|
|
6918
6921
|
_ && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(_.ownerDocument), (0, o.default)("DraggableCore: handleDragStop: %j", d), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, _ && ((0, o.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(_.ownerDocument, v.move, this.handleDrag), (0, r.removeEvent)(_.ownerDocument, v.stop, this.handleDragStop));
|
|
@@ -6930,18 +6933,18 @@ function fu() {
|
|
|
6930
6933
|
const w = this.findDOMNode();
|
|
6931
6934
|
if (w) {
|
|
6932
6935
|
const {
|
|
6933
|
-
ownerDocument:
|
|
6936
|
+
ownerDocument: E
|
|
6934
6937
|
} = w;
|
|
6935
|
-
(0, r.removeEvent)(
|
|
6938
|
+
(0, r.removeEvent)(E, b.mouse.move, this.handleDrag), (0, r.removeEvent)(E, b.touch.move, this.handleDrag), (0, r.removeEvent)(E, b.mouse.stop, this.handleDragStop), (0, r.removeEvent)(E, b.touch.stop, this.handleDragStop), (0, r.removeEvent)(w, b.touch.start, this.onTouchStart, {
|
|
6936
6939
|
passive: !1
|
|
6937
|
-
}), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(
|
|
6940
|
+
}), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(E);
|
|
6938
6941
|
}
|
|
6939
6942
|
}
|
|
6940
6943
|
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
6941
6944
|
// the underlying DOM node ourselves. See the README for more information.
|
|
6942
6945
|
findDOMNode() {
|
|
6943
|
-
var w,
|
|
6944
|
-
return (w = this.props) != null && w.nodeRef ? (
|
|
6946
|
+
var w, E, L;
|
|
6947
|
+
return (w = this.props) != null && w.nodeRef ? (L = (E = this.props) == null ? void 0 : E.nodeRef) == null ? void 0 : L.current : n.default.findDOMNode(this);
|
|
6945
6948
|
}
|
|
6946
6949
|
render() {
|
|
6947
6950
|
return /* @__PURE__ */ e.cloneElement(e.Children.only(this.props.children), {
|
|
@@ -6988,8 +6991,8 @@ function fu() {
|
|
|
6988
6991
|
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
6989
6992
|
* instead of using the parent node.
|
|
6990
6993
|
*/
|
|
6991
|
-
offsetParent: function(
|
|
6992
|
-
if (
|
|
6994
|
+
offsetParent: function(D, w) {
|
|
6995
|
+
if (D[w] && D[w].nodeType !== 1)
|
|
6993
6996
|
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
6994
6997
|
},
|
|
6995
6998
|
/**
|
|
@@ -7115,10 +7118,10 @@ function du() {
|
|
|
7115
7118
|
}
|
|
7116
7119
|
}), e.default = void 0;
|
|
7117
7120
|
var t = h(Te), n = p(/* @__PURE__ */ Ds()), r = p(Vo), i = lu(), a = pi(), o = js(), s = Lr(), c = p(fu()), u = p(Ms());
|
|
7118
|
-
function p(
|
|
7119
|
-
return
|
|
7121
|
+
function p(E) {
|
|
7122
|
+
return E && E.__esModule ? E : { default: E };
|
|
7120
7123
|
}
|
|
7121
|
-
function h(
|
|
7124
|
+
function h(E, L) {
|
|
7122
7125
|
if (typeof WeakMap == "function") var y = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap();
|
|
7123
7126
|
return (h = function(m, _) {
|
|
7124
7127
|
if (!_ && m && m.__esModule) return m;
|
|
@@ -7130,41 +7133,41 @@ function du() {
|
|
|
7130
7133
|
}
|
|
7131
7134
|
for (const j in m) j !== "default" && {}.hasOwnProperty.call(m, j) && ((x = (g = Object.defineProperty) && Object.getOwnPropertyDescriptor(m, j)) && (x.get || x.set) ? g(C, j, x) : C[j] = m[j]);
|
|
7132
7135
|
return C;
|
|
7133
|
-
})(
|
|
7136
|
+
})(E, L);
|
|
7134
7137
|
}
|
|
7135
7138
|
function b() {
|
|
7136
|
-
return b = Object.assign ? Object.assign.bind() : function(
|
|
7137
|
-
for (var
|
|
7138
|
-
var y = arguments[
|
|
7139
|
-
for (var d in y) ({}).hasOwnProperty.call(y, d) && (
|
|
7139
|
+
return b = Object.assign ? Object.assign.bind() : function(E) {
|
|
7140
|
+
for (var L = 1; L < arguments.length; L++) {
|
|
7141
|
+
var y = arguments[L];
|
|
7142
|
+
for (var d in y) ({}).hasOwnProperty.call(y, d) && (E[d] = y[d]);
|
|
7140
7143
|
}
|
|
7141
|
-
return
|
|
7144
|
+
return E;
|
|
7142
7145
|
}, b.apply(null, arguments);
|
|
7143
7146
|
}
|
|
7144
|
-
function v(
|
|
7145
|
-
return (
|
|
7147
|
+
function v(E, L, y) {
|
|
7148
|
+
return (L = k(L)) in E ? Object.defineProperty(E, L, { value: y, enumerable: !0, configurable: !0, writable: !0 }) : E[L] = y, E;
|
|
7146
7149
|
}
|
|
7147
|
-
function k(
|
|
7148
|
-
var
|
|
7149
|
-
return typeof
|
|
7150
|
+
function k(E) {
|
|
7151
|
+
var L = D(E, "string");
|
|
7152
|
+
return typeof L == "symbol" ? L : L + "";
|
|
7150
7153
|
}
|
|
7151
|
-
function
|
|
7152
|
-
if (typeof
|
|
7153
|
-
var y =
|
|
7154
|
+
function D(E, L) {
|
|
7155
|
+
if (typeof E != "object" || !E) return E;
|
|
7156
|
+
var y = E[Symbol.toPrimitive];
|
|
7154
7157
|
if (y !== void 0) {
|
|
7155
|
-
var d = y.call(
|
|
7158
|
+
var d = y.call(E, L);
|
|
7156
7159
|
if (typeof d != "object") return d;
|
|
7157
7160
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
7158
7161
|
}
|
|
7159
|
-
return (
|
|
7162
|
+
return (L === "string" ? String : Number)(E);
|
|
7160
7163
|
}
|
|
7161
7164
|
class w extends t.Component {
|
|
7162
7165
|
// React 16.3+
|
|
7163
7166
|
// Arity (props, state)
|
|
7164
|
-
static getDerivedStateFromProps(
|
|
7167
|
+
static getDerivedStateFromProps(L, y) {
|
|
7165
7168
|
let {
|
|
7166
7169
|
position: d
|
|
7167
|
-
} =
|
|
7170
|
+
} = L, {
|
|
7168
7171
|
prevPropsPosition: m
|
|
7169
7172
|
} = y;
|
|
7170
7173
|
return d && (!m || d.x !== m.x || d.y !== m.y) ? ((0, u.default)("Draggable: getDerivedStateFromProps %j", {
|
|
@@ -7178,8 +7181,8 @@ function du() {
|
|
|
7178
7181
|
}
|
|
7179
7182
|
}) : null;
|
|
7180
7183
|
}
|
|
7181
|
-
constructor(
|
|
7182
|
-
super(
|
|
7184
|
+
constructor(L) {
|
|
7185
|
+
super(L), v(this, "onDragStart", (y, d) => {
|
|
7183
7186
|
if ((0, u.default)("Draggable: onDragStart: %j", d), this.props.onStart(y, (0, o.createDraggableData)(this, d)) === !1) return !1;
|
|
7184
7187
|
this.setState({
|
|
7185
7188
|
dragging: !0,
|
|
@@ -7227,17 +7230,17 @@ function du() {
|
|
|
7227
7230
|
// Whether or not we have been dragged before.
|
|
7228
7231
|
dragged: !1,
|
|
7229
7232
|
// Current transform x and y.
|
|
7230
|
-
x:
|
|
7231
|
-
y:
|
|
7233
|
+
x: L.position ? L.position.x : L.defaultPosition.x,
|
|
7234
|
+
y: L.position ? L.position.y : L.defaultPosition.y,
|
|
7232
7235
|
prevPropsPosition: {
|
|
7233
|
-
...
|
|
7236
|
+
...L.position
|
|
7234
7237
|
},
|
|
7235
7238
|
// Used for compensating for out-of-bounds drags
|
|
7236
7239
|
slackX: 0,
|
|
7237
7240
|
slackY: 0,
|
|
7238
7241
|
// Can only determine if SVG after mounting
|
|
7239
7242
|
isElementSVG: !1
|
|
7240
|
-
},
|
|
7243
|
+
}, L.position && !(L.onDrag || L.onStop) && console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
|
|
7241
7244
|
}
|
|
7242
7245
|
componentDidMount() {
|
|
7243
7246
|
typeof window.SVGElement < "u" && this.findDOMNode() instanceof window.SVGElement && this.setState({
|
|
@@ -7252,12 +7255,12 @@ function du() {
|
|
|
7252
7255
|
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
7253
7256
|
// the underlying DOM node ourselves. See the README for more information.
|
|
7254
7257
|
findDOMNode() {
|
|
7255
|
-
var
|
|
7256
|
-
return ((y = (
|
|
7258
|
+
var L, y;
|
|
7259
|
+
return ((y = (L = this.props) == null ? void 0 : L.nodeRef) == null ? void 0 : y.current) ?? r.default.findDOMNode(this);
|
|
7257
7260
|
}
|
|
7258
7261
|
render() {
|
|
7259
7262
|
const {
|
|
7260
|
-
axis:
|
|
7263
|
+
axis: L,
|
|
7261
7264
|
bounds: y,
|
|
7262
7265
|
children: d,
|
|
7263
7266
|
defaultPosition: m,
|
|
@@ -7438,12 +7441,12 @@ function gi() {
|
|
|
7438
7441
|
}, [n]), e;
|
|
7439
7442
|
}
|
|
7440
7443
|
function Bs({ children: e, id: t }) {
|
|
7441
|
-
const [n, r] = be(!1), [i, a] = be({ x: 0, y: 0 }), o = Ie(null), s = fe((
|
|
7444
|
+
const [n, r] = be(!1), [i, a] = be({ x: 0, y: 0 }), o = Ie(null), s = fe((D) => D.delta), c = fe((D) => D.setDelta), u = fe((D) => D.shiftDomain), p = gi();
|
|
7442
7445
|
Ee(() => {
|
|
7443
7446
|
n || a({ x: s, y: 0 });
|
|
7444
7447
|
}, [s, n]);
|
|
7445
|
-
const h = (
|
|
7446
|
-
|
|
7448
|
+
const h = (D, w) => {
|
|
7449
|
+
D.preventDefault(), r(!0), c(s + w.deltaX);
|
|
7447
7450
|
}, b = () => {
|
|
7448
7451
|
if (r(!1), Math.abs(s) < 10) {
|
|
7449
7452
|
c(0);
|
|
@@ -7460,7 +7463,7 @@ function Bs({ children: e, id: t }) {
|
|
|
7460
7463
|
position: i,
|
|
7461
7464
|
axis: "x",
|
|
7462
7465
|
onStart: k,
|
|
7463
|
-
onDrag: (
|
|
7466
|
+
onDrag: (D, w) => h(D, w),
|
|
7464
7467
|
onStop: b,
|
|
7465
7468
|
children: /* @__PURE__ */ f.jsx("g", { id: `drag-track-${t}`, ref: o, height: "100%", style: { cursor: v }, children: e })
|
|
7466
7469
|
}
|
|
@@ -7577,7 +7580,7 @@ function xu({
|
|
|
7577
7580
|
onLeave: a,
|
|
7578
7581
|
verticalMargin: o
|
|
7579
7582
|
}) {
|
|
7580
|
-
const s = fe((j) => j.marginWidth), u = fe((j) => j.fontSize) * 0.8, p = ir((j) => j.showModal), h = Ie(null), b = xe((j) => j.getTrackIndex), v = xe((j) => j.tracks.length), k = xe((j) => j.shiftTracks),
|
|
7583
|
+
const s = fe((j) => j.marginWidth), u = fe((j) => j.fontSize) * 0.8, p = ir((j) => j.showModal), h = Ie(null), b = xe((j) => j.getTrackIndex), v = xe((j) => j.tracks.length), k = xe((j) => j.shiftTracks), D = b(e), w = D > 0, E = D < v - 1, L = (j) => {
|
|
7581
7584
|
if (j.stopPropagation(), h.current) {
|
|
7582
7585
|
const M = h.current.getBoundingClientRect(), B = {
|
|
7583
7586
|
x: M.left,
|
|
@@ -7619,7 +7622,7 @@ function xu({
|
|
|
7619
7622
|
),
|
|
7620
7623
|
/* @__PURE__ */ f.jsx("rect", { x: 0, y: 0, width: s / 15, height: t, stroke: "#000000", strokeWidth: 0.5, fill: n }),
|
|
7621
7624
|
/* @__PURE__ */ f.jsxs("g", { id: `margin-buttons-${e}`, children: [
|
|
7622
|
-
e !== "ruler" && /* @__PURE__ */ f.jsxs("g", { ref: h, onClick:
|
|
7625
|
+
e !== "ruler" && /* @__PURE__ */ f.jsxs("g", { ref: h, onClick: L, style: { cursor: "pointer" }, children: [
|
|
7623
7626
|
/* @__PURE__ */ f.jsx(gu, { x: s / 10, y: t / 2 + 2, height: 15, width: 15, fill: C }),
|
|
7624
7627
|
/* @__PURE__ */ f.jsx("circle", { cx: s / 10 + 7.5, cy: t / 2 + 10, r: 7.5, strokeWidth: 0, fill: "transparent" })
|
|
7625
7628
|
] }),
|
|
@@ -7636,7 +7639,7 @@ function xu({
|
|
|
7636
7639
|
}
|
|
7637
7640
|
)
|
|
7638
7641
|
] }),
|
|
7639
|
-
e !== "ruler" && /* @__PURE__ */ f.jsxs("g", { onClick:
|
|
7642
|
+
e !== "ruler" && /* @__PURE__ */ f.jsxs("g", { onClick: E ? d : void 0, style: { cursor: "pointer" }, children: [
|
|
7640
7643
|
/* @__PURE__ */ f.jsx("circle", { cx: s / 10 + 37.5, cy: t / 2 + 10, r: 7.5, strokeWidth: 0, fill: "transparent" }),
|
|
7641
7644
|
/* @__PURE__ */ f.jsx(
|
|
7642
7645
|
vu,
|
|
@@ -7645,7 +7648,7 @@ function xu({
|
|
|
7645
7648
|
y: t / 2 + 2,
|
|
7646
7649
|
height: 15,
|
|
7647
7650
|
width: 15,
|
|
7648
|
-
fill:
|
|
7651
|
+
fill: E ? C : "#ccc"
|
|
7649
7652
|
}
|
|
7650
7653
|
)
|
|
7651
7654
|
] })
|
|
@@ -7690,22 +7693,22 @@ function yu() {
|
|
|
7690
7693
|
}, [s, r]);
|
|
7691
7694
|
const u = Je((h) => h.text);
|
|
7692
7695
|
return ce(() => {
|
|
7693
|
-
const h = a.end - a.start, v = Math.pow(10, Math.floor(Math.log10(Math.ceil(h / 20)))) * 6, k = i(),
|
|
7694
|
-
for (let
|
|
7695
|
-
|
|
7696
|
+
const h = a.end - a.start, v = Math.pow(10, Math.floor(Math.log10(Math.ceil(h / 20)))) * 6, k = i(), D = (Math.ceil(k.end / v) - Math.ceil(k.start / v)) * v / 2, w = { start: k.start + D / 2, end: k.end - D / 2 }, E = [];
|
|
7697
|
+
for (let L = Math.ceil(a.start / v); L < Math.ceil(a.end / v); ++L)
|
|
7698
|
+
E.push(
|
|
7696
7699
|
/* @__PURE__ */ f.jsxs("g", { children: [
|
|
7697
7700
|
/* @__PURE__ */ f.jsx(
|
|
7698
7701
|
"line",
|
|
7699
7702
|
{
|
|
7700
|
-
x1: c(
|
|
7701
|
-
x2: c(
|
|
7703
|
+
x1: c(L * v),
|
|
7704
|
+
x2: c(L * v),
|
|
7702
7705
|
y1: De * 0.6,
|
|
7703
7706
|
y2: De * 0.9,
|
|
7704
7707
|
stroke: u,
|
|
7705
7708
|
strokeWidth: 0.5
|
|
7706
7709
|
}
|
|
7707
7710
|
),
|
|
7708
|
-
|
|
7711
|
+
L >= Math.ceil(a.start / v) && /* @__PURE__ */ f.jsx(
|
|
7709
7712
|
"text",
|
|
7710
7713
|
{
|
|
7711
7714
|
style: {
|
|
@@ -7719,12 +7722,12 @@ function yu() {
|
|
|
7719
7722
|
fill: u,
|
|
7720
7723
|
textAnchor: "end",
|
|
7721
7724
|
fontSize: De / 6 + "px",
|
|
7722
|
-
x: c(
|
|
7725
|
+
x: c(L * v) - 5,
|
|
7723
7726
|
y: De * 0.85,
|
|
7724
|
-
children: (
|
|
7727
|
+
children: (L * v).toLocaleString()
|
|
7725
7728
|
}
|
|
7726
7729
|
)
|
|
7727
|
-
] }, "ruler_" +
|
|
7730
|
+
] }, "ruler_" + L)
|
|
7728
7731
|
);
|
|
7729
7732
|
return /* @__PURE__ */ f.jsxs("g", { width: n, height: De, transform: `translate(-${t}, 0)`, children: [
|
|
7730
7733
|
/* @__PURE__ */ f.jsx(
|
|
@@ -7779,7 +7782,7 @@ function yu() {
|
|
|
7779
7782
|
children: _u(w.end - w.start)
|
|
7780
7783
|
}
|
|
7781
7784
|
),
|
|
7782
|
-
|
|
7785
|
+
E
|
|
7783
7786
|
] });
|
|
7784
7787
|
}, [a, i, c, n, t, u]);
|
|
7785
7788
|
}
|
|
@@ -7793,11 +7796,11 @@ function bu({
|
|
|
7793
7796
|
height: r,
|
|
7794
7797
|
width: i
|
|
7795
7798
|
}) {
|
|
7796
|
-
const [a, o] = be({ x: 0, y: 0 }), [s, c] = be(!1), [u, p] = be(0), h = Ie(null), b = gi(), v = fe((m) => m.marginWidth), k = xe((m) => m.shiftTracks),
|
|
7799
|
+
const [a, o] = be({ x: 0, y: 0 }), [s, c] = be(!1), [u, p] = be(0), h = Ie(null), b = gi(), v = fe((m) => m.marginWidth), k = xe((m) => m.shiftTracks), D = xe((m) => m.getTrackIndex), w = ws(e), E = Ul(e), L = (m, _) => {
|
|
7797
7800
|
m.preventDefault(), c(!0), n(!0), o({ x: 0, y: _.y }), p(_.y);
|
|
7798
7801
|
}, y = () => {
|
|
7799
7802
|
if (o({ x: 0, y: 0 }), c(!1), n(!1), Math.abs(u) <= 5) return;
|
|
7800
|
-
const m =
|
|
7803
|
+
const m = E.reduce((g, x, C) => Math.abs(x - u) < Math.abs(E[g] - u) ? C : g, 0), _ = D(e);
|
|
7801
7804
|
m !== _ && (k(e, m), p(0));
|
|
7802
7805
|
}, d = e === "ruler" ? () => !1 : () => {
|
|
7803
7806
|
};
|
|
@@ -7810,7 +7813,7 @@ function bu({
|
|
|
7810
7813
|
handle: ".swap-handle",
|
|
7811
7814
|
nodeRef: h,
|
|
7812
7815
|
onStart: d,
|
|
7813
|
-
onDrag:
|
|
7816
|
+
onDrag: L,
|
|
7814
7817
|
onStop: y,
|
|
7815
7818
|
children: /* @__PURE__ */ f.jsx("g", { id: `swap-track-${e}`, ref: h, children: s ? /* @__PURE__ */ f.jsx(wu, { height: r, width: i, margin: v, position: w + a.y + De, children: t }) : t })
|
|
7816
7819
|
}
|
|
@@ -7887,26 +7890,26 @@ function Is({ children: e, transform: t, id: n, loading: r, error: i }) {
|
|
|
7887
7890
|
}) || "", v = xe((x) => {
|
|
7888
7891
|
var C;
|
|
7889
7892
|
return (C = x.getTrack(n)) == null ? void 0 : C.title;
|
|
7890
|
-
}) || "", { trackMargin: k, titleSize:
|
|
7893
|
+
}) || "", { trackMargin: k, titleSize: D, totalVerticalMargin: w, wrapperHeight: E } = Hl(n), L = E / 3, y = Ut((x) => x.setContextMenu), d = Je((x) => x.text), m = Je((x) => x.background), _ = at(() => {
|
|
7891
7894
|
c(!0);
|
|
7892
7895
|
}, []), g = at(() => {
|
|
7893
7896
|
c(!1);
|
|
7894
7897
|
}, []);
|
|
7895
|
-
return /* @__PURE__ */ f.jsx("g", { id: `wrapper-${n}`, transform: t, children: /* @__PURE__ */ f.jsxs(bu, { id: n, setSwapping: o, height:
|
|
7898
|
+
return /* @__PURE__ */ f.jsx("g", { id: `wrapper-${n}`, transform: t, children: /* @__PURE__ */ f.jsxs(bu, { id: n, setSwapping: o, height: E, width: h, children: [
|
|
7896
7899
|
r && !i && /* @__PURE__ */ f.jsx(
|
|
7897
7900
|
"g",
|
|
7898
7901
|
{
|
|
7899
|
-
transform: `translate(${u + (h -
|
|
7900
|
-
children: /* @__PURE__ */ f.jsx(Eu, { color: d, width:
|
|
7902
|
+
transform: `translate(${u + (h - L) / 2},${(E - L) / 2})`,
|
|
7903
|
+
children: /* @__PURE__ */ f.jsx(Eu, { color: d, width: L, height: L })
|
|
7901
7904
|
}
|
|
7902
7905
|
),
|
|
7903
7906
|
i && /* @__PURE__ */ f.jsxs(
|
|
7904
7907
|
"g",
|
|
7905
7908
|
{
|
|
7906
|
-
transform: `translate(${u + (h -
|
|
7909
|
+
transform: `translate(${u + (h - L) / 2},${(E - L) / 2})`,
|
|
7907
7910
|
children: [
|
|
7908
|
-
/* @__PURE__ */ f.jsx(Cu, { outline: d, inside: m, width:
|
|
7909
|
-
/* @__PURE__ */ f.jsx("g", { transform: `translate(${
|
|
7911
|
+
/* @__PURE__ */ f.jsx(Cu, { outline: d, inside: m, width: L, height: L }),
|
|
7912
|
+
/* @__PURE__ */ f.jsx("g", { transform: `translate(${L / 2},${L + 10})`, children: /* @__PURE__ */ f.jsx("text", { fill: d, textAnchor: "middle", fontSize: `${D}px`, children: i }) })
|
|
7910
7913
|
]
|
|
7911
7914
|
}
|
|
7912
7915
|
),
|
|
@@ -7925,8 +7928,8 @@ function Is({ children: e, transform: t, id: n, loading: r, error: i }) {
|
|
|
7925
7928
|
{
|
|
7926
7929
|
fill: d,
|
|
7927
7930
|
x: u + h / 2,
|
|
7928
|
-
y:
|
|
7929
|
-
fontSize: `${
|
|
7931
|
+
y: D / 2 + 5,
|
|
7932
|
+
fontSize: `${D}px`,
|
|
7930
7933
|
textAnchor: "middle",
|
|
7931
7934
|
transform: `translate(0,${k})`,
|
|
7932
7935
|
alignmentBaseline: "baseline",
|
|
@@ -7937,7 +7940,7 @@ function Is({ children: e, transform: t, id: n, loading: r, error: i }) {
|
|
|
7937
7940
|
xu,
|
|
7938
7941
|
{
|
|
7939
7942
|
id: n,
|
|
7940
|
-
height:
|
|
7943
|
+
height: E,
|
|
7941
7944
|
color: b || m,
|
|
7942
7945
|
swapping: a,
|
|
7943
7946
|
verticalMargin: w,
|
|
@@ -7949,7 +7952,7 @@ function Is({ children: e, transform: t, id: n, loading: r, error: i }) {
|
|
|
7949
7952
|
"rect",
|
|
7950
7953
|
{
|
|
7951
7954
|
width: p,
|
|
7952
|
-
height:
|
|
7955
|
+
height: E,
|
|
7953
7956
|
fill: b || "transparent",
|
|
7954
7957
|
fillOpacity: 0.25,
|
|
7955
7958
|
style: { pointerEvents: "none" }
|
|
@@ -7978,7 +7981,7 @@ function Ru({
|
|
|
7978
7981
|
const { totalWidth: u, sideWidth: p } = r, h = fe((y) => y.domain), { x: b, reverseX: v } = lt(u), k = ce(() => {
|
|
7979
7982
|
const y = (t || []).filter((d) => d.end >= h.start && d.start <= h.end);
|
|
7980
7983
|
return Jl(y, b);
|
|
7981
|
-
}, [t, h.end, h.start, b]),
|
|
7984
|
+
}, [t, h.end, h.start, b]), D = Cr(k.length, e), { handleClick: w, handleHover: E, handleLeave: L } = et({
|
|
7982
7985
|
onClick: a,
|
|
7983
7986
|
onHover: o,
|
|
7984
7987
|
onLeave: s,
|
|
@@ -7987,20 +7990,20 @@ function Ru({
|
|
|
7987
7990
|
return /* @__PURE__ */ f.jsxs("g", { width: u, height: n, clipPath: `url(#${e})`, transform: `translate(-${p}, 0)`, children: [
|
|
7988
7991
|
/* @__PURE__ */ f.jsx("rect", { width: u, height: n, fill: "transparent" }),
|
|
7989
7992
|
/* @__PURE__ */ f.jsx("defs", { children: /* @__PURE__ */ f.jsx(Ot, { id: e, width: u, height: n }) }),
|
|
7990
|
-
k.map((y, d) => /* @__PURE__ */ f.jsx("g", { transform: `translate(0, ${d *
|
|
7993
|
+
k.map((y, d) => /* @__PURE__ */ f.jsx("g", { transform: `translate(0, ${d * D})`, children: y.map((m, _) => {
|
|
7991
7994
|
const g = Ls({ ...m.row, start: m.start, end: m.end }, v);
|
|
7992
7995
|
return /* @__PURE__ */ f.jsx(
|
|
7993
7996
|
"rect",
|
|
7994
7997
|
{
|
|
7995
7998
|
style: { cursor: a ? "pointer" : "default" },
|
|
7996
|
-
height:
|
|
7999
|
+
height: D * 0.6,
|
|
7997
8000
|
width: m.end - m.start < 1 ? 1 : m.end - m.start,
|
|
7998
8001
|
x: m.start,
|
|
7999
|
-
y:
|
|
8002
|
+
y: D * 0.2,
|
|
8000
8003
|
fill: m.color || i,
|
|
8001
8004
|
onClick: () => w(g),
|
|
8002
|
-
onMouseOver: (x) =>
|
|
8003
|
-
onMouseOut: () =>
|
|
8005
|
+
onMouseOver: (x) => E(g, m.rectname || "", x),
|
|
8006
|
+
onMouseOut: () => L(g)
|
|
8004
8007
|
},
|
|
8005
8008
|
`${e}_${_}`
|
|
8006
8009
|
);
|
|
@@ -8133,12 +8136,12 @@ function Au({
|
|
|
8133
8136
|
onLeave: p,
|
|
8134
8137
|
tooltip: h
|
|
8135
8138
|
}) {
|
|
8136
|
-
const { totalWidth: b, sideWidth: v } = i, { x: k, reverseX:
|
|
8137
|
-
() =>
|
|
8139
|
+
const { totalWidth: b, sideWidth: v } = i, { x: k, reverseX: D } = lt(b), w = fe((j) => j.domain), E = 10, L = ce(() => (t || []).map((j) => ju(j)), [t]), y = ce(
|
|
8140
|
+
() => L.filter(
|
|
8138
8141
|
(j) => j.coordinates.end >= w.start && j.coordinates.start <= w.end
|
|
8139
8142
|
),
|
|
8140
|
-
[
|
|
8141
|
-
), d = ce(() => Er(y, k,
|
|
8143
|
+
[L, w.start, w.end]
|
|
8144
|
+
), d = ce(() => Er(y, k, E), [y, k, E]), m = Cr(d.length, e), _ = ce(
|
|
8142
8145
|
() => d.map((j, M) => ({
|
|
8143
8146
|
y: M * m,
|
|
8144
8147
|
transcripts: j.map((B) => Ps(B, k, m, b))
|
|
@@ -8161,7 +8164,7 @@ function Au({
|
|
|
8161
8164
|
height: m,
|
|
8162
8165
|
width: b,
|
|
8163
8166
|
children: j.transcripts.map((B, A) => {
|
|
8164
|
-
const q = As(B.transcript,
|
|
8167
|
+
const q = As(B.transcript, D);
|
|
8165
8168
|
let N;
|
|
8166
8169
|
return Os(B.transcript.tag) ? N = o : n !== "" && B.transcript.name.toLowerCase().includes(n == null ? void 0 : n.toLowerCase()) && (N = s), /* @__PURE__ */ f.jsxs("g", { children: [
|
|
8167
8170
|
/* @__PURE__ */ f.jsx(
|
|
@@ -8181,7 +8184,7 @@ function Au({
|
|
|
8181
8184
|
"text",
|
|
8182
8185
|
{
|
|
8183
8186
|
fill: N || a,
|
|
8184
|
-
fontSize:
|
|
8187
|
+
fontSize: E,
|
|
8185
8188
|
x: B.transcript.coordinates.end + 5,
|
|
8186
8189
|
y: m / 2,
|
|
8187
8190
|
dominantBaseline: "middle",
|
|
@@ -8217,12 +8220,12 @@ function Nu({
|
|
|
8217
8220
|
onLeave: p,
|
|
8218
8221
|
tooltip: h
|
|
8219
8222
|
}) {
|
|
8220
|
-
const { totalWidth: b, sideWidth: v } = i, { x: k, reverseX:
|
|
8221
|
-
() =>
|
|
8223
|
+
const { totalWidth: b, sideWidth: v } = i, { x: k, reverseX: D } = lt(b), w = fe((j) => j.domain), E = 10, L = ce(() => Iu(t || []), [t]), y = ce(
|
|
8224
|
+
() => L.filter(
|
|
8222
8225
|
(j) => j.coordinates.end >= w.start && j.coordinates.start <= w.end
|
|
8223
8226
|
),
|
|
8224
|
-
[
|
|
8225
|
-
), d = ce(() => Er(y, k,
|
|
8227
|
+
[L, w.start, w.end]
|
|
8228
|
+
), d = ce(() => Er(y, k, E), [y, k, E]), m = Cr(d.length, e), _ = ce(
|
|
8226
8229
|
() => d.map((j, M) => ({
|
|
8227
8230
|
y: M * m,
|
|
8228
8231
|
transcripts: j.map((B) => Ps(B, k, m, b))
|
|
@@ -8245,7 +8248,7 @@ function Nu({
|
|
|
8245
8248
|
height: m,
|
|
8246
8249
|
width: b,
|
|
8247
8250
|
children: j.transcripts.map((B, A) => {
|
|
8248
|
-
const q = As(B.transcript,
|
|
8251
|
+
const q = As(B.transcript, D);
|
|
8249
8252
|
let N;
|
|
8250
8253
|
return Os(B.transcript.tag) ? N = o : n !== "" && B.transcript.name.toLowerCase().includes(n == null ? void 0 : n.toLowerCase()) && (N = s), /* @__PURE__ */ f.jsxs("g", { children: [
|
|
8251
8254
|
/* @__PURE__ */ f.jsx(
|
|
@@ -8265,7 +8268,7 @@ function Nu({
|
|
|
8265
8268
|
"text",
|
|
8266
8269
|
{
|
|
8267
8270
|
fill: N || a,
|
|
8268
|
-
fontSize:
|
|
8271
|
+
fontSize: E,
|
|
8269
8272
|
x: B.transcript.coordinates.end + 5,
|
|
8270
8273
|
y: m / 2,
|
|
8271
8274
|
dominantBaseline: "middle",
|
|
@@ -8705,39 +8708,39 @@ const cd = ({
|
|
|
8705
8708
|
if (!r[k] || !r[k].component || i[k] === 0)
|
|
8706
8709
|
return null;
|
|
8707
8710
|
h -= i[k] * 100;
|
|
8708
|
-
const
|
|
8711
|
+
const D = s ? h + i[k] * 100 : h;
|
|
8709
8712
|
let w = b * 0.8 / r[k].component.length;
|
|
8710
|
-
return r[k].component.map((
|
|
8713
|
+
return r[k].component.map((E, L) => /* @__PURE__ */ f.jsx(
|
|
8711
8714
|
"g",
|
|
8712
8715
|
{
|
|
8713
|
-
transform: "translate(" + (
|
|
8716
|
+
transform: "translate(" + (L * t * 0.8 / r[k].component.length + t * 0.1) + "," + D + ")",
|
|
8714
8717
|
onMouseOver: () => {
|
|
8715
8718
|
c && c({
|
|
8716
|
-
component: [r[k].component[
|
|
8717
|
-
regex: [r[k].regex[
|
|
8718
|
-
color: r[k].color && [r[k].color[
|
|
8719
|
+
component: [r[k].component[L]],
|
|
8720
|
+
regex: [r[k].regex[L]],
|
|
8721
|
+
color: r[k].color && [r[k].color[L]]
|
|
8719
8722
|
});
|
|
8720
8723
|
},
|
|
8721
8724
|
onMouseOut: u && (() => u({
|
|
8722
|
-
component: [r[k].component[
|
|
8723
|
-
regex: [r[k].regex[
|
|
8724
|
-
color: r[k].color && [r[k].color[
|
|
8725
|
+
component: [r[k].component[L]],
|
|
8726
|
+
regex: [r[k].regex[L]],
|
|
8727
|
+
color: r[k].color && [r[k].color[L]]
|
|
8725
8728
|
})),
|
|
8726
8729
|
onClick: p && (() => p({
|
|
8727
|
-
component: [r[k].component[
|
|
8728
|
-
regex: [r[k].regex[
|
|
8729
|
-
color: r[k].color && [r[k].color[
|
|
8730
|
+
component: [r[k].component[L]],
|
|
8731
|
+
regex: [r[k].regex[L]],
|
|
8732
|
+
color: r[k].color && [r[k].color[L]]
|
|
8730
8733
|
})),
|
|
8731
8734
|
children: /* @__PURE__ */ f.jsx(sd, { xscale: w, yscale: i[k], inverted: s || !1, children: /* @__PURE__ */ f.jsx(
|
|
8732
|
-
|
|
8735
|
+
E,
|
|
8733
8736
|
{
|
|
8734
|
-
fill: r[k].color && r[k].color[
|
|
8737
|
+
fill: r[k].color && r[k].color[L] || "#000000",
|
|
8735
8738
|
fillOpacity: o,
|
|
8736
8739
|
...r[k]
|
|
8737
8740
|
}
|
|
8738
8741
|
) })
|
|
8739
8742
|
},
|
|
8740
|
-
k + "_" +
|
|
8743
|
+
k + "_" + L
|
|
8741
8744
|
));
|
|
8742
8745
|
});
|
|
8743
8746
|
return /* @__PURE__ */ f.jsx("g", { transform: a, children: v });
|
|
@@ -8754,8 +8757,8 @@ const cd = ({
|
|
|
8754
8757
|
const c = ld([e, t], [n, r]), u = t - e, p = a + i, h = Math.ceil(u) / o, b = Math.ceil(u / h), v = Array.from(Array(b).keys());
|
|
8755
8758
|
return /* @__PURE__ */ f.jsxs("g", { stroke: s || "#000000", children: [
|
|
8756
8759
|
v.map((k) => {
|
|
8757
|
-
const
|
|
8758
|
-
return /* @__PURE__ */ f.jsx("line", { x1: c(
|
|
8760
|
+
const D = e + h * k;
|
|
8761
|
+
return /* @__PURE__ */ f.jsx("line", { x1: c(D), x2: c(D), y1: a, y2: p }, k);
|
|
8759
8762
|
}),
|
|
8760
8763
|
/* @__PURE__ */ f.jsx("line", { x1: c(t), x2: c(t), y1: a, y2: p }),
|
|
8761
8764
|
";"
|
|
@@ -9047,10 +9050,10 @@ const cd = ({
|
|
|
9047
9050
|
backgroundFrequencies: b,
|
|
9048
9051
|
constantPseudocount: v,
|
|
9049
9052
|
smallSampleCorrectionOff: k,
|
|
9050
|
-
yAxisMax:
|
|
9053
|
+
yAxisMax: D,
|
|
9051
9054
|
onSymbolMouseOver: w,
|
|
9052
|
-
onSymbolMouseOut:
|
|
9053
|
-
onSymbolClick:
|
|
9055
|
+
onSymbolMouseOut: E,
|
|
9056
|
+
onSymbolClick: L,
|
|
9054
9057
|
noFastaNames: y,
|
|
9055
9058
|
countUnaligned: d,
|
|
9056
9059
|
svgRef: m
|
|
@@ -9084,7 +9087,7 @@ const cd = ({
|
|
|
9084
9087
|
) : e.map(
|
|
9085
9088
|
(ne) => ne.map((F) => F * Math.log2(j))
|
|
9086
9089
|
));
|
|
9087
|
-
const B = i === Vn ? [Math.log2(j)] : b.map((ne) => Math.log2(1 / (ne || 0.01))), A =
|
|
9090
|
+
const B = i === Vn ? [Math.log2(j)] : b.map((ne) => Math.log2(1 / (ne || 0.01))), A = D || Math.max(...B), q = Math.min(...B), N = q < 0 ? A / (A - q) : 1;
|
|
9088
9091
|
p = p && !isNaN(parseFloat(p.toString())) && isFinite(p) ? p : 1;
|
|
9089
9092
|
let V = 100 * A;
|
|
9090
9093
|
c = V / 6 * (c || 1);
|
|
@@ -9144,8 +9147,8 @@ const cd = ({
|
|
|
9144
9147
|
stackHeight: V,
|
|
9145
9148
|
alphabet: s,
|
|
9146
9149
|
onSymbolMouseOver: w,
|
|
9147
|
-
onSymbolMouseOut:
|
|
9148
|
-
onSymbolClick:
|
|
9150
|
+
onSymbolMouseOut: E,
|
|
9151
|
+
onSymbolClick: L
|
|
9149
9152
|
}
|
|
9150
9153
|
) })
|
|
9151
9154
|
]
|
|
@@ -9196,29 +9199,29 @@ const No = /* @__PURE__ */ new Map([
|
|
|
9196
9199
|
function Rd({ data: e, annotations: t, dimensions: n, height: r, zeroLineProps: i }) {
|
|
9197
9200
|
if (e.length === 0 || e.importance.length === 0)
|
|
9198
9201
|
return null;
|
|
9199
|
-
const { viewWidth: a } = n, [o] = be(null), [s, c, u] = $u(e, r), p = qu(t || [], s, u), h = ce(() => a / s.length / 100, [a, s.length]), b = at(c, [c]), v = ce(() => p.map((
|
|
9200
|
-
const d = 100 * h * Math.abs(
|
|
9202
|
+
const { viewWidth: a } = n, [o] = be(null), [s, c, u] = $u(e, r), p = qu(t || [], s, u), h = ce(() => a / s.length / 100, [a, s.length]), b = at(c, [c]), v = ce(() => p.map((L, y) => {
|
|
9203
|
+
const d = 100 * h * Math.abs(L.coordinates[1] - L.coordinates[0]), m = Math.min(...L.coordinates) * h * 100, _ = L.y + L.height, g = 80;
|
|
9201
9204
|
return /* @__PURE__ */ f.jsxs(Ks, { children: [
|
|
9202
9205
|
/* @__PURE__ */ f.jsx(
|
|
9203
9206
|
"rect",
|
|
9204
9207
|
{
|
|
9205
|
-
fill:
|
|
9208
|
+
fill: L.color,
|
|
9206
9209
|
fillOpacity: 0.4,
|
|
9207
9210
|
x: m,
|
|
9208
9211
|
width: d,
|
|
9209
|
-
height:
|
|
9210
|
-
y:
|
|
9212
|
+
height: L.height,
|
|
9213
|
+
y: L.y
|
|
9211
9214
|
}
|
|
9212
9215
|
),
|
|
9213
9216
|
/* @__PURE__ */ f.jsx(
|
|
9214
9217
|
"path",
|
|
9215
9218
|
{
|
|
9216
|
-
fill:
|
|
9219
|
+
fill: L.color,
|
|
9217
9220
|
fillOpacity: 0.4,
|
|
9218
|
-
d: `M ${m} ${_} L ${m - d} ${_ + g} L ${m - d} ${_ +
|
|
9221
|
+
d: `M ${m} ${_} L ${m - d} ${_ + g} L ${m - d} ${_ + L.height * 3} L ${m + d * 2} ${_ + L.height * 3} L ${m + d * 2} ${_ + g} L ${m + d} ${_} L ${m} ${_}`
|
|
9219
9222
|
}
|
|
9220
9223
|
),
|
|
9221
|
-
/* @__PURE__ */ f.jsx("g", { transform: `translate(${m - d},${_ + g})`, children:
|
|
9224
|
+
/* @__PURE__ */ f.jsx("g", { transform: `translate(${m - d},${_ + g})`, children: L.children })
|
|
9222
9225
|
] }, y);
|
|
9223
9226
|
}), [p, h]), k = ce(
|
|
9224
9227
|
() => ({
|
|
@@ -9228,9 +9231,9 @@ function Rd({ data: e, annotations: t, dimensions: n, height: r, zeroLineProps:
|
|
|
9228
9231
|
transform: b
|
|
9229
9232
|
}),
|
|
9230
9233
|
[h, r, b]
|
|
9231
|
-
),
|
|
9232
|
-
(
|
|
9233
|
-
), [s, h, r, b]), w = ce(() => c(0)[0], [c]),
|
|
9234
|
+
), D = ce(() => s.map(
|
|
9235
|
+
(L, y) => L.importance ? /* @__PURE__ */ oi(Cd, { ...k, key: y, x: y * h * 100, ...L }) : null
|
|
9236
|
+
), [s, h, r, b]), w = ce(() => c(0)[0], [c]), E = ce(() => s.filter((L) => L.importance).length > 0 ? /* @__PURE__ */ f.jsx("line", { stroke: "#ff0000", strokeWidth: 1, ...i, x1: 0, x2: a, y1: w, y2: w }) : /* @__PURE__ */ f.jsx("text", { x: 0, y: r / 2, children: "No importance track data" }), [s, a, w, r, i]);
|
|
9234
9237
|
return /* @__PURE__ */ f.jsxs("g", { width: a, height: r, children: [
|
|
9235
9238
|
o !== null && /* @__PURE__ */ f.jsx(
|
|
9236
9239
|
"rect",
|
|
@@ -9243,8 +9246,8 @@ function Rd({ data: e, annotations: t, dimensions: n, height: r, zeroLineProps:
|
|
|
9243
9246
|
}
|
|
9244
9247
|
),
|
|
9245
9248
|
v,
|
|
9246
|
-
|
|
9247
|
-
|
|
9249
|
+
D,
|
|
9250
|
+
E
|
|
9248
9251
|
] });
|
|
9249
9252
|
}
|
|
9250
9253
|
function qo(e, t) {
|
|
@@ -9300,7 +9303,7 @@ function Dd({
|
|
|
9300
9303
|
onLeave: c,
|
|
9301
9304
|
tooltip: u
|
|
9302
9305
|
}) {
|
|
9303
|
-
const { totalWidth: p, sideWidth: h } = r, { x: b } = lt(p), v = ce(() => $o(t.occurrenceRect, b), [t]), k = ce(() => $o(t.peaks, b), [t]), { handleClick:
|
|
9306
|
+
const { totalWidth: p, sideWidth: h } = r, { x: b } = lt(p), v = ce(() => $o(t.occurrenceRect, b), [t]), k = ce(() => $o(t.peaks, b), [t]), { handleClick: D, handleHover: w, handleLeave: E } = et({
|
|
9304
9307
|
onClick: o,
|
|
9305
9308
|
onHover: s,
|
|
9306
9309
|
onLeave: c,
|
|
@@ -9309,32 +9312,32 @@ function Dd({
|
|
|
9309
9312
|
return /* @__PURE__ */ f.jsxs("g", { id: e, height: n, width: p, clipPath: `url(#${e})`, transform: `translate(-${h}, 0)`, children: [
|
|
9310
9313
|
/* @__PURE__ */ f.jsx("rect", { width: p, height: n, fill: "transparent" }),
|
|
9311
9314
|
/* @__PURE__ */ f.jsx("defs", { children: /* @__PURE__ */ f.jsx(Ot, { id: e, width: p, height: n }) }),
|
|
9312
|
-
k.map((
|
|
9315
|
+
k.map((L, y) => /* @__PURE__ */ f.jsx(
|
|
9313
9316
|
"rect",
|
|
9314
9317
|
{
|
|
9315
9318
|
height: n * 0.6,
|
|
9316
|
-
width:
|
|
9317
|
-
x:
|
|
9319
|
+
width: L.end - L.start,
|
|
9320
|
+
x: L.start,
|
|
9318
9321
|
y: n * 0.2,
|
|
9319
9322
|
fill: i || "#3287a8",
|
|
9320
9323
|
style: { cursor: "pointer" }
|
|
9321
9324
|
},
|
|
9322
9325
|
`${e}_peak_${y}`
|
|
9323
9326
|
)),
|
|
9324
|
-
v.map((
|
|
9327
|
+
v.map((L, y) => /* @__PURE__ */ f.jsx(
|
|
9325
9328
|
"rect",
|
|
9326
9329
|
{
|
|
9327
9330
|
height: n * 0.6,
|
|
9328
|
-
width:
|
|
9329
|
-
x:
|
|
9331
|
+
width: L.end - L.start,
|
|
9332
|
+
x: L.start,
|
|
9330
9333
|
y: n * 0.2,
|
|
9331
9334
|
fill: a || "#000088",
|
|
9332
9335
|
style: { cursor: "pointer" },
|
|
9333
|
-
onClick: () =>
|
|
9336
|
+
onClick: () => D(L),
|
|
9334
9337
|
onMouseOver: (d) => {
|
|
9335
|
-
d.persist(),
|
|
9338
|
+
d.persist(), L.pwm && w(L, "", d);
|
|
9336
9339
|
},
|
|
9337
|
-
onMouseOut: () => L
|
|
9340
|
+
onMouseOut: () => E(L)
|
|
9338
9341
|
},
|
|
9339
9342
|
`${e}_${y}`
|
|
9340
9343
|
))
|
|
@@ -9355,13 +9358,13 @@ function jd({
|
|
|
9355
9358
|
const { totalWidth: p, sideWidth: h } = r, b = fe((_) => _.domain), { x: v } = lt(p), k = ce(
|
|
9356
9359
|
() => (t.occurrenceRect || []).filter((_) => _.end >= b.start && _.start <= b.end),
|
|
9357
9360
|
[t, b.start, b.end]
|
|
9358
|
-
),
|
|
9361
|
+
), D = ce(
|
|
9359
9362
|
() => (t.peaks || []).filter((_) => _.end >= b.start && _.start <= b.end),
|
|
9360
9363
|
[t, b.start, b.end]
|
|
9361
9364
|
), w = ce(
|
|
9362
9365
|
() => qo(k, v),
|
|
9363
9366
|
[k, v]
|
|
9364
|
-
),
|
|
9367
|
+
), E = ce(() => qo(D, v), [D, v]), L = Cr(w.length, e), { handleClick: y, handleHover: d, handleLeave: m } = et({
|
|
9365
9368
|
onClick: o,
|
|
9366
9369
|
onHover: s,
|
|
9367
9370
|
onLeave: c,
|
|
@@ -9370,25 +9373,25 @@ function jd({
|
|
|
9370
9373
|
return /* @__PURE__ */ f.jsxs("g", { width: p, height: n, clipPath: `url(#${e})`, transform: `translate(-${h}, 0)`, children: [
|
|
9371
9374
|
/* @__PURE__ */ f.jsx("rect", { width: p, height: n, fill: "transparent" }),
|
|
9372
9375
|
/* @__PURE__ */ f.jsx("defs", { children: /* @__PURE__ */ f.jsx(Ot, { id: e, width: p, height: n }) }),
|
|
9373
|
-
|
|
9376
|
+
E.map((_, g) => /* @__PURE__ */ f.jsx("g", { transform: `translate(0, ${g * L})`, children: _.map((x, C) => /* @__PURE__ */ f.jsx(
|
|
9374
9377
|
"rect",
|
|
9375
9378
|
{
|
|
9376
|
-
height:
|
|
9379
|
+
height: L * 0.6,
|
|
9377
9380
|
width: x.end - x.start < 1 ? 1 : x.end - x.start,
|
|
9378
9381
|
x: x.start,
|
|
9379
|
-
y:
|
|
9382
|
+
y: L * 0.2,
|
|
9380
9383
|
fill: i || "#3287a8",
|
|
9381
9384
|
style: { cursor: "pointer" }
|
|
9382
9385
|
},
|
|
9383
9386
|
`${e}_peak_${g}_${C}`
|
|
9384
9387
|
)) }, `group_peak_${g}`)),
|
|
9385
|
-
w.map((_, g) => /* @__PURE__ */ f.jsx("g", { transform: `translate(0, ${g *
|
|
9388
|
+
w.map((_, g) => /* @__PURE__ */ f.jsx("g", { transform: `translate(0, ${g * L})`, children: _.map((x, C) => /* @__PURE__ */ f.jsx(
|
|
9386
9389
|
"rect",
|
|
9387
9390
|
{
|
|
9388
|
-
height:
|
|
9391
|
+
height: L * 0.6,
|
|
9389
9392
|
width: x.end - x.start < 1 ? 1 : x.end - x.start,
|
|
9390
9393
|
x: x.start,
|
|
9391
|
-
y:
|
|
9394
|
+
y: L * 0.2,
|
|
9392
9395
|
fill: a || "#000088",
|
|
9393
9396
|
style: { cursor: "pointer" },
|
|
9394
9397
|
onClick: () => y(x),
|
|
@@ -9419,10 +9422,10 @@ function Md({
|
|
|
9419
9422
|
const h = o * (e.length - 1), b = (i - h) / e.length;
|
|
9420
9423
|
return /* @__PURE__ */ f.jsx("g", { id: n, children: e.map((v, k) => {
|
|
9421
9424
|
var m;
|
|
9422
|
-
const
|
|
9425
|
+
const D = k * (b + o), w = ((m = t[k]) == null ? void 0 : m.name) || `Dataset ${k + 1}`, E = (_) => {
|
|
9423
9426
|
const g = { ..._, datasetName: w };
|
|
9424
9427
|
c && c(g);
|
|
9425
|
-
},
|
|
9428
|
+
}, L = (_) => {
|
|
9426
9429
|
const g = { ..._, datasetName: w };
|
|
9427
9430
|
u && u(g);
|
|
9428
9431
|
}, y = (_) => {
|
|
@@ -9432,7 +9435,7 @@ function Md({
|
|
|
9432
9435
|
const g = { ..._, datasetName: w };
|
|
9433
9436
|
return p(g);
|
|
9434
9437
|
} : void 0;
|
|
9435
|
-
return /* @__PURE__ */ f.jsx("g", { transform: `translate(0, ${
|
|
9438
|
+
return /* @__PURE__ */ f.jsx("g", { transform: `translate(0, ${D})`, children: /* @__PURE__ */ f.jsx(
|
|
9436
9439
|
Ts,
|
|
9437
9440
|
{
|
|
9438
9441
|
data: v,
|
|
@@ -9442,8 +9445,8 @@ function Md({
|
|
|
9442
9445
|
dimensions: a,
|
|
9443
9446
|
verticalPadding: 0,
|
|
9444
9447
|
onClick: y,
|
|
9445
|
-
onHover:
|
|
9446
|
-
onLeave:
|
|
9448
|
+
onHover: E,
|
|
9449
|
+
onLeave: L,
|
|
9447
9450
|
tooltip: d
|
|
9448
9451
|
}
|
|
9449
9452
|
) }, `${w}`);
|
|
@@ -9456,8 +9459,8 @@ function Ft(e, t, n, r = !1, i, a, o = !1) {
|
|
|
9456
9459
|
let h = it(0, p), b = it(0, p);
|
|
9457
9460
|
return e.forEach((v, k) => {
|
|
9458
9461
|
if (v.min === null || v.max === null || o && !Bd(a == null ? void 0 : a[k])) return;
|
|
9459
|
-
const
|
|
9460
|
-
b += ge(v.x, p) + ge(
|
|
9462
|
+
const D = zs(v, c, u, t, r);
|
|
9463
|
+
b += ge(v.x, p) + ge(D.x, r ? t : 0) + ge(D.x + 1, r ? t : 0) + ge(v.x + 1, p), h += ge(v.x, p) + ge(D.x, D.y) + ge(D.x + 1, D.y) + ge(v.x + 1, p);
|
|
9461
9464
|
}), {
|
|
9462
9465
|
indicator: /* @__PURE__ */ f.jsx("path", { d: b, fill: n, fillOpacity: 0.2 }),
|
|
9463
9466
|
values: /* @__PURE__ */ f.jsx("path", { d: h, fill: n })
|
|
@@ -9521,9 +9524,9 @@ function Pd({
|
|
|
9521
9524
|
chh: (q = e[6]) == null ? void 0 : q.max
|
|
9522
9525
|
}, o = 20, s = 105, u = s + 50;
|
|
9523
9526
|
let p = 0;
|
|
9524
|
-
const h = t.fwdDepth ? ++p : -1, b = t.fwdCpg ? ++p : -1, v = t.fwdChg ? ++p : -1, k = t.fwdChh ? ++p : -1,
|
|
9527
|
+
const h = t.fwdDepth ? ++p : -1, b = t.fwdCpg ? ++p : -1, v = t.fwdChg ? ++p : -1, k = t.fwdChh ? ++p : -1, D = o * (1 + p) + 20;
|
|
9525
9528
|
let w = 0;
|
|
9526
|
-
const
|
|
9529
|
+
const E = t.revDepth ? ++w : -1, L = t.revCpg ? ++w : -1, y = t.revChg ? ++w : -1, d = t.revChh ? ++w : -1, m = (N) => D + o * (N - 1) + 8, _ = w > 0 ? m(w) + o + 4 : D + 20;
|
|
9527
9530
|
return /* @__PURE__ */ f.jsxs("g", { style: { filter: `drop-shadow(0 0 2px ${n})` }, children: [
|
|
9528
9531
|
/* @__PURE__ */ f.jsx("rect", { rx: 4, y: -4, width: u + 10, height: _, fill: r, strokeWidth: 1 }),
|
|
9529
9532
|
/* @__PURE__ */ f.jsxs("g", { children: [
|
|
@@ -9548,16 +9551,16 @@ function Pd({
|
|
|
9548
9551
|
/* @__PURE__ */ f.jsx("text", { x: 9, y: o * k + 15, fill: "white", fontSize: "12", children: "CHH" }),
|
|
9549
9552
|
/* @__PURE__ */ f.jsx("text", { x: s + 10, y: o * k + 15, fill: n, fontSize: "12", children: i.chh != null ? i.chh.toFixed(2) + "%" : "N/A" })
|
|
9550
9553
|
] }),
|
|
9551
|
-
/* @__PURE__ */ f.jsx("text", { x: 5, y:
|
|
9552
|
-
L >= 0 && /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
|
|
9553
|
-
/* @__PURE__ */ f.jsx("rect", { x: 5, y: m(L), width: s, height: o - 2, fill: bt.depth }),
|
|
9554
|
-
/* @__PURE__ */ f.jsx("text", { x: 9, y: m(L) + 15, fill: "white", fontSize: "12", children: "Coverage for CpG" }),
|
|
9555
|
-
/* @__PURE__ */ f.jsx("text", { x: s + 10, y: m(L) + 15, fill: n, fontSize: "12", children: a.depth != null ? Math.round(a.depth) : "N/A" })
|
|
9556
|
-
] }),
|
|
9554
|
+
/* @__PURE__ */ f.jsx("text", { x: 5, y: D, fill: n, fontSize: "14", fontWeight: "bold", children: "Reverse" }),
|
|
9557
9555
|
E >= 0 && /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
|
|
9558
|
-
/* @__PURE__ */ f.jsx("rect", { x: 5, y: m(E), width: s, height: o - 2, fill: bt.
|
|
9559
|
-
/* @__PURE__ */ f.jsx("text", { x: 9, y: m(E) + 15, fill: "white", fontSize: "12", children: "
|
|
9560
|
-
/* @__PURE__ */ f.jsx("text", { x: s + 10, y: m(E) + 15, fill: n, fontSize: "12", children: a.
|
|
9556
|
+
/* @__PURE__ */ f.jsx("rect", { x: 5, y: m(E), width: s, height: o - 2, fill: bt.depth }),
|
|
9557
|
+
/* @__PURE__ */ f.jsx("text", { x: 9, y: m(E) + 15, fill: "white", fontSize: "12", children: "Coverage for CpG" }),
|
|
9558
|
+
/* @__PURE__ */ f.jsx("text", { x: s + 10, y: m(E) + 15, fill: n, fontSize: "12", children: a.depth != null ? Math.round(a.depth) : "N/A" })
|
|
9559
|
+
] }),
|
|
9560
|
+
L >= 0 && /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
|
|
9561
|
+
/* @__PURE__ */ f.jsx("rect", { x: 5, y: m(L), width: s, height: o - 2, fill: bt.cpg }),
|
|
9562
|
+
/* @__PURE__ */ f.jsx("text", { x: 9, y: m(L) + 15, fill: "white", fontSize: "12", children: "CG" }),
|
|
9563
|
+
/* @__PURE__ */ f.jsx("text", { x: s + 10, y: m(L) + 15, fill: n, fontSize: "12", children: a.cg != null ? a.cg.toFixed(2) + "%" : "N/A" })
|
|
9561
9564
|
] }),
|
|
9562
9565
|
y >= 0 && /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
|
|
9563
9566
|
/* @__PURE__ */ f.jsx("rect", { x: 5, y: m(y), width: s, height: o - 2, fill: bt.chg }),
|
|
@@ -9584,7 +9587,7 @@ function Ad({
|
|
|
9584
9587
|
urls: c
|
|
9585
9588
|
}) {
|
|
9586
9589
|
var B, A, q, N, V, W, ae, ne, F, I, G, K, te, le;
|
|
9587
|
-
const { sideWidth: u, totalWidth: p, viewWidth: h } = a, b = fe((Y) => Y.svgRef), v = fe((Y) => Y.delta), k = fe((Y) => Y.marginWidth),
|
|
9590
|
+
const { sideWidth: u, totalWidth: p, viewWidth: h } = a, b = fe((Y) => Y.svgRef), v = fe((Y) => Y.delta), k = fe((Y) => Y.marginWidth), D = Je((Y) => Y.text), w = ce(() => {
|
|
9588
9591
|
let Y = 1 / 0, J = -1 / 0;
|
|
9589
9592
|
for (const re of [i[0], i[1], i[2], i[4], i[5], i[6]]) {
|
|
9590
9593
|
if (!re || re.length === 0) continue;
|
|
@@ -9593,7 +9596,7 @@ function Ad({
|
|
|
9593
9596
|
ue.min < Y && (Y = ue.min), ue.max > J && (J = ue.max);
|
|
9594
9597
|
}
|
|
9595
9598
|
return Y === 1 / 0 ? { min: 0, max: 1 } : { min: Y, max: J };
|
|
9596
|
-
}, [i, u, h]),
|
|
9599
|
+
}, [i, u, h]), E = o || w, L = ce(() => {
|
|
9597
9600
|
let Y = 1 / 0, J = -1 / 0;
|
|
9598
9601
|
for (const re of [i[3], i[7]]) {
|
|
9599
9602
|
if (!re || re.length === 0) continue;
|
|
@@ -9605,16 +9608,16 @@ function Ad({
|
|
|
9605
9608
|
}, [i, u, h]), y = ce(() => {
|
|
9606
9609
|
const Y = t / 2;
|
|
9607
9610
|
return {
|
|
9608
|
-
cpgPlus: Ft(i[0], Y, r.cpg, !1,
|
|
9609
|
-
chgPlus: Ft(i[1], Y, r.chg, !1,
|
|
9610
|
-
chhPlus: Ft(i[2], Y, r.chh, !1,
|
|
9611
|
-
depthPlus: zo(i[3], Y, r.depth, !1,
|
|
9612
|
-
cpgMinus: Ft(i[4], Y, r.cpg, !0,
|
|
9613
|
-
chgMinus: Ft(i[5], Y, r.chg, !0,
|
|
9614
|
-
chhMinus: Ft(i[6], Y, r.chh, !0,
|
|
9615
|
-
depthMinus: zo(i[7], Y, r.depth, !0,
|
|
9611
|
+
cpgPlus: Ft(i[0], Y, r.cpg, !1, E, i[3], n),
|
|
9612
|
+
chgPlus: Ft(i[1], Y, r.chg, !1, E),
|
|
9613
|
+
chhPlus: Ft(i[2], Y, r.chh, !1, E),
|
|
9614
|
+
depthPlus: zo(i[3], Y, r.depth, !1, L),
|
|
9615
|
+
cpgMinus: Ft(i[4], Y, r.cpg, !0, E, i[7], n),
|
|
9616
|
+
chgMinus: Ft(i[5], Y, r.chg, !0, E),
|
|
9617
|
+
chhMinus: Ft(i[6], Y, r.chh, !0, E),
|
|
9618
|
+
depthMinus: zo(i[7], Y, r.depth, !0, L)
|
|
9616
9619
|
};
|
|
9617
|
-
}, [i, t, r,
|
|
9620
|
+
}, [i, t, r, E, L, n]), { mouseState: d, updateMouseState: m, clearMouseState: _ } = di(b, p, k, u), g = ce(() => {
|
|
9618
9621
|
var Y;
|
|
9619
9622
|
return (Y = d.pos) != null && Y.x ? d.pos.x - k + u : 0;
|
|
9620
9623
|
}, [(B = d.pos) == null ? void 0 : B.x, k, u]), x = ce(() => {
|
|
@@ -9658,7 +9661,7 @@ function Ad({
|
|
|
9658
9661
|
(te = y.chhMinus) == null ? void 0 : te.values,
|
|
9659
9662
|
y.depthMinus
|
|
9660
9663
|
] }),
|
|
9661
|
-
!v && ((le = d.pos) == null ? void 0 : le.x) && /* @__PURE__ */ f.jsx(f.Fragment, { children: /* @__PURE__ */ f.jsx("line", { stroke:
|
|
9664
|
+
!v && ((le = d.pos) == null ? void 0 : le.x) && /* @__PURE__ */ f.jsx(f.Fragment, { children: /* @__PURE__ */ f.jsx("line", { stroke: D, x1: g, x2: g, y1: 0, y2: t }) }),
|
|
9662
9665
|
/* @__PURE__ */ f.jsx(
|
|
9663
9666
|
"rect",
|
|
9664
9667
|
{
|
|
@@ -9687,21 +9690,21 @@ function Nd({
|
|
|
9687
9690
|
fillWithZero: s
|
|
9688
9691
|
}) {
|
|
9689
9692
|
var j;
|
|
9690
|
-
const { sideWidth: c, totalWidth: u, viewWidth: p } = a, h = fe((M) => M.svgRef), b = fe((M) => M.delta), v = fe((M) => M.marginWidth), k = Je((M) => M.background),
|
|
9693
|
+
const { sideWidth: c, totalWidth: u, viewWidth: p } = a, h = fe((M) => M.svgRef), b = fe((M) => M.delta), v = fe((M) => M.marginWidth), k = Je((M) => M.background), D = ce(() => e.some((M) => M.min < 0), [e]), w = xe((M) => M.editTrack), E = ce(() => {
|
|
9691
9694
|
const M = e.slice(c, c + p);
|
|
9692
9695
|
return Es(M);
|
|
9693
9696
|
}, [e, c, p]);
|
|
9694
9697
|
Ee(() => {
|
|
9695
|
-
w(n, { range:
|
|
9696
|
-
}, [n,
|
|
9697
|
-
const
|
|
9698
|
+
w(n, { range: E });
|
|
9699
|
+
}, [n, E, w]);
|
|
9700
|
+
const L = ce(() => qd(
|
|
9698
9701
|
e,
|
|
9699
9702
|
r,
|
|
9700
9703
|
i,
|
|
9701
|
-
t ||
|
|
9704
|
+
t || E,
|
|
9702
9705
|
k,
|
|
9703
9706
|
s
|
|
9704
|
-
), [e, r, i, t,
|
|
9707
|
+
), [e, r, i, t, E, s]), { mouseState: y, updateMouseState: d, clearMouseState: m } = di(h, u, v, c), _ = ce(() => {
|
|
9705
9708
|
var M;
|
|
9706
9709
|
return (M = y.pos) != null && M.x ? y.pos.x - v + c : 0;
|
|
9707
9710
|
}, [(j = y.pos) == null ? void 0 : j.x, v, c]), g = Je((M) => M.text), { handleHover: x, handleLeave: C } = et({
|
|
@@ -9712,7 +9715,7 @@ function Nd({
|
|
|
9712
9715
|
});
|
|
9713
9716
|
return /* @__PURE__ */ f.jsxs("g", { width: u, height: r, clipPath: `url(#${n})`, transform: `translate(-${c}, 0)`, children: [
|
|
9714
9717
|
/* @__PURE__ */ f.jsx("defs", { children: /* @__PURE__ */ f.jsx(Ot, { id: n, width: u, height: r }) }),
|
|
9715
|
-
|
|
9718
|
+
L,
|
|
9716
9719
|
!b && _ && /* @__PURE__ */ f.jsx("line", { stroke: g, x1: _, x2: _, y1: 0, y2: r }),
|
|
9717
9720
|
/* @__PURE__ */ f.jsx(
|
|
9718
9721
|
"rect",
|
|
@@ -9725,7 +9728,7 @@ function Nd({
|
|
|
9725
9728
|
if (d(M), y.index === null) return;
|
|
9726
9729
|
const B = e[y.index], A = B.max, q = B.min;
|
|
9727
9730
|
if (!(A == null || q == null)) {
|
|
9728
|
-
if (A === q || !
|
|
9731
|
+
if (A === q || !D) {
|
|
9729
9732
|
x(B, String(A.toFixed(2)), M);
|
|
9730
9733
|
return;
|
|
9731
9734
|
}
|
|
@@ -9741,21 +9744,21 @@ function Nd({
|
|
|
9741
9744
|
}
|
|
9742
9745
|
function qd(e, t, n, r, i, a) {
|
|
9743
9746
|
const o = {
|
|
9744
|
-
min: e.map((
|
|
9745
|
-
max: e.map((
|
|
9747
|
+
min: e.map((E) => E.min).reduce((E, L) => Math.min(E, L), 1 / 0),
|
|
9748
|
+
max: e.map((E) => E.max).reduce((E, L) => Math.max(E, L), -1 / 0)
|
|
9746
9749
|
}, s = r || o, c = t - Wt(0, s, { min: 0, max: t }), u = sr(n), p = i ? sr(i) : !1;
|
|
9747
9750
|
let h;
|
|
9748
9751
|
u && p ? h = "#ffff00" : !u && !p || u && !p ? h = "#ff0000" : h = "#00ff00";
|
|
9749
|
-
let b = it(0, c), v = it(0, c), k = "",
|
|
9750
|
-
return e.forEach((
|
|
9751
|
-
const
|
|
9752
|
-
b += ge(
|
|
9752
|
+
let b = it(0, c), v = it(0, c), k = "", D = "", w = "";
|
|
9753
|
+
return e.forEach((E) => {
|
|
9754
|
+
const L = Math.max(s.min, Math.min(s.max, E.min)), y = Math.max(s.min, Math.min(s.max, E.max)), d = Wt(L, s, { min: 0, max: t }), m = Wt(y, s, { min: 0, max: t });
|
|
9755
|
+
b += ge(E.x, c) + ge(E.x, t - d) + ge(E.x + 1, t - d) + ge(E.x + 1, c), v += ge(E.x, c) + ge(E.x, t - m) + ge(E.x + 1, t - m) + ge(E.x + 1, c), r && E.min < r.min && (D += `M ${E.x} ${t} l 0 -2 `), r && E.max > r.max && (k += `M ${E.x} 0 l 0 2 `), a && E.min === 0 && E.max === 0 && (w += `M ${E.x} ${c} v -1 h 1 v 1 `);
|
|
9753
9756
|
}), /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
|
|
9754
9757
|
s.min < 0 ? /* @__PURE__ */ f.jsx("path", { d: b, fill: pt(n, 0.2) }) : null,
|
|
9755
9758
|
/* @__PURE__ */ f.jsx("line", { x1: 0, y1: c, x2: 4190, y2: c, stroke: i, strokeWidth: 1 }),
|
|
9756
9759
|
/* @__PURE__ */ f.jsx("path", { d: v, fill: n }),
|
|
9757
9760
|
/* @__PURE__ */ f.jsx("path", { d: k, stroke: h, strokeWidth: "2", fill: "none" }),
|
|
9758
|
-
/* @__PURE__ */ f.jsx("path", { d:
|
|
9761
|
+
/* @__PURE__ */ f.jsx("path", { d: D, stroke: h, strokeWidth: "2", fill: "none" }),
|
|
9759
9762
|
a && w && /* @__PURE__ */ f.jsx("path", { d: w, fill: n })
|
|
9760
9763
|
] });
|
|
9761
9764
|
}
|
|
@@ -9783,17 +9786,17 @@ function Fd({
|
|
|
9783
9786
|
onLeave: u,
|
|
9784
9787
|
tooltip: p
|
|
9785
9788
|
}) {
|
|
9786
|
-
const { totalWidth: h, sideWidth: b } = i, v = ht((N) => N.text), k = 4,
|
|
9787
|
-
const N =
|
|
9789
|
+
const { totalWidth: h, sideWidth: b } = i, v = ht((N) => N.text), k = 4, D = fe((N) => N.getExpandedDomain), w = xe((N) => N.editTrack), { x: E } = lt(h), L = n / 3, y = 2 * n / 3, d = ce(() => {
|
|
9790
|
+
const N = D(), V = t == null ? void 0 : t.filter((W) => {
|
|
9788
9791
|
const ae = W.start >= N.start, ne = W.stop <= N.end, F = W.chromosome === N.chromosome;
|
|
9789
9792
|
return ae && ne && F;
|
|
9790
9793
|
});
|
|
9791
9794
|
return (V == null ? void 0 : V.map((W) => ({
|
|
9792
9795
|
...W,
|
|
9793
|
-
pixelStart:
|
|
9794
|
-
pixelEnd:
|
|
9796
|
+
pixelStart: E(W.start),
|
|
9797
|
+
pixelEnd: E(W.stop)
|
|
9795
9798
|
}))) || [];
|
|
9796
|
-
}, [t,
|
|
9799
|
+
}, [t, E]), { handleClick: m, handleHover: _, handleLeave: g } = et({
|
|
9797
9800
|
onClick: s,
|
|
9798
9801
|
onHover: c,
|
|
9799
9802
|
onLeave: u,
|
|
@@ -9839,7 +9842,7 @@ function Fd({
|
|
|
9839
9842
|
return V ? /* @__PURE__ */ f.jsx(
|
|
9840
9843
|
"path",
|
|
9841
9844
|
{
|
|
9842
|
-
d: Fo(V, N, n, y,
|
|
9845
|
+
d: Fo(V, N, n, y, L),
|
|
9843
9846
|
stroke: sr(r) ? pt(r, 0.5) : Jn(r),
|
|
9844
9847
|
strokeWidth: Qn(N.rsquare),
|
|
9845
9848
|
fill: "none",
|
|
@@ -9853,7 +9856,7 @@ function Fd({
|
|
|
9853
9856
|
return V ? /* @__PURE__ */ f.jsx(
|
|
9854
9857
|
"path",
|
|
9855
9858
|
{
|
|
9856
|
-
d: Fo(N, V, n, y,
|
|
9859
|
+
d: Fo(N, V, n, y, L),
|
|
9857
9860
|
stroke: sr(r) ? pt(r, 0.5) : Jn(r),
|
|
9858
9861
|
strokeWidth: Qn(N.rsquare),
|
|
9859
9862
|
fill: "none",
|
|
@@ -9862,15 +9865,15 @@ function Fd({
|
|
|
9862
9865
|
`referencing-arc-${N.snpid}-${V.snpid}`
|
|
9863
9866
|
) : null;
|
|
9864
9867
|
}),
|
|
9865
|
-
/* @__PURE__ */ f.jsx("g", { transform: `translate(0, ${n -
|
|
9868
|
+
/* @__PURE__ */ f.jsx("g", { transform: `translate(0, ${n - L})`, children: d.map((N, V) => {
|
|
9866
9869
|
const W = (a || []).includes(N.snpid);
|
|
9867
9870
|
return /* @__PURE__ */ f.jsx(
|
|
9868
9871
|
"rect",
|
|
9869
9872
|
{
|
|
9870
|
-
height: wt(N) ? y :
|
|
9873
|
+
height: wt(N) ? y : L,
|
|
9871
9874
|
width: N.pixelEnd - N.pixelStart + k,
|
|
9872
9875
|
x: N.pixelStart - k / 2,
|
|
9873
|
-
y: wt(N) ? -y +
|
|
9876
|
+
y: wt(N) ? -y + L : 0,
|
|
9874
9877
|
fill: zd(N, r),
|
|
9875
9878
|
stroke: W ? v : "none",
|
|
9876
9879
|
strokeWidth: W ? 1 : 0,
|
|
@@ -9890,7 +9893,7 @@ function Fd({
|
|
|
9890
9893
|
);
|
|
9891
9894
|
}) }),
|
|
9892
9895
|
o && j.map((N) => {
|
|
9893
|
-
const V = N.pixelStart + (N.pixelEnd - N.pixelStart) / 2, W = wt(N) ? n - y - 2 : n -
|
|
9896
|
+
const V = N.pixelStart + (N.pixelEnd - N.pixelStart) / 2, W = wt(N) ? n - y - 2 : n - L - 2;
|
|
9894
9897
|
return /* @__PURE__ */ f.jsx(
|
|
9895
9898
|
"text",
|
|
9896
9899
|
{
|
|
@@ -9905,7 +9908,7 @@ function Fd({
|
|
|
9905
9908
|
);
|
|
9906
9909
|
}),
|
|
9907
9910
|
o && B.map((N) => {
|
|
9908
|
-
const V = N.pixelStart + (N.pixelEnd - N.pixelStart) / 2, W = wt(N) ? n - y - 2 : n -
|
|
9911
|
+
const V = N.pixelStart + (N.pixelEnd - N.pixelStart) / 2, W = wt(N) ? n - y - 2 : n - L - 2;
|
|
9909
9912
|
return /* @__PURE__ */ f.jsx(
|
|
9910
9913
|
"text",
|
|
9911
9914
|
{
|
|
@@ -9950,7 +9953,7 @@ function Hd({
|
|
|
9950
9953
|
onLeave: p,
|
|
9951
9954
|
tooltip: h
|
|
9952
9955
|
}) {
|
|
9953
|
-
const { totalWidth: b, sideWidth: v } = s, k = ht((g) => g.text),
|
|
9956
|
+
const { totalWidth: b, sideWidth: v } = s, k = ht((g) => g.text), D = fe((g) => g.getExpandedDomain), w = fe((g) => g.marginWidth), { x: E } = lt(b), L = 4, { handleHover: y } = et({
|
|
9954
9957
|
onClick: c,
|
|
9955
9958
|
onHover: u,
|
|
9956
9959
|
onLeave: p,
|
|
@@ -9962,9 +9965,9 @@ function Hd({
|
|
|
9962
9965
|
max: x
|
|
9963
9966
|
};
|
|
9964
9967
|
}, [t]), m = ce(() => {
|
|
9965
|
-
const g =
|
|
9968
|
+
const g = D();
|
|
9966
9969
|
return t.filter((C) => C.chr === g.chromosome && C.start <= g.end && C.end >= g.start).map((C) => {
|
|
9967
|
-
const j =
|
|
9970
|
+
const j = E(C.start), M = E(C.end), B = (j + M) / 2, A = Wt(C.value, d, { min: a, max: 0 }), q = i == null ? void 0 : i.includes(C.snpId), N = q || C.value >= (n || 7.3) ? 1 : 0.1;
|
|
9968
9971
|
return {
|
|
9969
9972
|
...C,
|
|
9970
9973
|
pixelStart: j,
|
|
@@ -9975,7 +9978,7 @@ function Hd({
|
|
|
9975
9978
|
opacity: N
|
|
9976
9979
|
};
|
|
9977
9980
|
}) || [];
|
|
9978
|
-
}, [t,
|
|
9981
|
+
}, [t, E, D, d, i]), _ = ce(() => Wt(n || 7.3, d, { min: a, max: 0 }), [d]);
|
|
9979
9982
|
return /* @__PURE__ */ f.jsxs("g", { id: e, transform: `translate(-${v}, 0)`, children: [
|
|
9980
9983
|
/* @__PURE__ */ f.jsx("rect", { width: b, height: a, fill: "transparent" }),
|
|
9981
9984
|
m.map(
|
|
@@ -9984,7 +9987,7 @@ function Hd({
|
|
|
9984
9987
|
{
|
|
9985
9988
|
cx: g.xPosition,
|
|
9986
9989
|
cy: g.yPosition,
|
|
9987
|
-
r:
|
|
9990
|
+
r: L,
|
|
9988
9991
|
fill: o,
|
|
9989
9992
|
opacity: g.opacity,
|
|
9990
9993
|
onMouseOver: (C) => {
|
|
@@ -10049,11 +10052,11 @@ function Yd({
|
|
|
10049
10052
|
onLeave: u,
|
|
10050
10053
|
tooltip: p
|
|
10051
10054
|
}) {
|
|
10052
|
-
const { totalWidth: h, sideWidth: b } = o, { x: v } = lt(h), k = i / 3,
|
|
10055
|
+
const { totalWidth: h, sideWidth: b } = o, { x: v } = lt(h), k = i / 3, D = 2, w = ce(() => t.map((d) => ({
|
|
10053
10056
|
...d,
|
|
10054
10057
|
pixelStart: v(d.start),
|
|
10055
10058
|
pixelEnd: v(d.end)
|
|
10056
|
-
})), [t, v]), { handleClick:
|
|
10059
|
+
})), [t, v]), { handleClick: E, handleHover: L, handleLeave: y } = et({
|
|
10057
10060
|
onClick: s,
|
|
10058
10061
|
onHover: c,
|
|
10059
10062
|
onLeave: u,
|
|
@@ -10081,12 +10084,12 @@ function Yd({
|
|
|
10081
10084
|
"rect",
|
|
10082
10085
|
{
|
|
10083
10086
|
height: k,
|
|
10084
|
-
width: d.pixelEnd - d.pixelStart +
|
|
10085
|
-
x: d.pixelStart -
|
|
10087
|
+
width: d.pixelEnd - d.pixelStart + D,
|
|
10088
|
+
x: d.pixelStart - D / 2,
|
|
10086
10089
|
y: 0,
|
|
10087
10090
|
fill: a,
|
|
10088
|
-
onClick: () =>
|
|
10089
|
-
onMouseOver: (_) =>
|
|
10091
|
+
onClick: () => E(d),
|
|
10092
|
+
onMouseOver: (_) => L(d, "", _),
|
|
10090
10093
|
onMouseOut: () => y(d)
|
|
10091
10094
|
},
|
|
10092
10095
|
`${e}_${m}`
|
|
@@ -10237,14 +10240,14 @@ function Fs(e, t, n = !0) {
|
|
|
10237
10240
|
function t0() {
|
|
10238
10241
|
const e = Ut((w) => w.open), t = Ut((w) => w.id), n = Ut((w) => w.x), r = Ut((w) => w.y), i = Ut((w) => w.setContextMenu), a = Ie(null), o = xe((w) => w.getTrack(t || "")), s = nt((w) => w.trackData.get(t || "")), c = xe((w) => w.editTrack), u = xe((w) => w.removeTrack), [p, h] = be(null);
|
|
10239
10242
|
if (Ee(() => {
|
|
10240
|
-
const w = (
|
|
10241
|
-
a.current && !a.current.contains(
|
|
10243
|
+
const w = (E) => {
|
|
10244
|
+
a.current && !a.current.contains(E.target) && i(!1, t || "", n, r);
|
|
10242
10245
|
};
|
|
10243
10246
|
return e && document.addEventListener("mousedown", w), () => {
|
|
10244
10247
|
document.removeEventListener("mousedown", w);
|
|
10245
10248
|
};
|
|
10246
10249
|
}, [e, i, t, n, r]), !o || !s || s.data === null) return null;
|
|
10247
|
-
const b = o.displayMode, v = o.trackType === me.Custom ? o.renderers : _i[o.trackType], k = Object.keys(v),
|
|
10250
|
+
const b = o.displayMode, v = o.trackType === me.Custom ? o.renderers : _i[o.trackType], k = Object.keys(v), D = (w) => {
|
|
10248
10251
|
t && (i(!1, t, n, r), w === "remove" ? u(t) : w === "download" ? Fs(t, o.title, !0) : c(t, { displayMode: w }));
|
|
10249
10252
|
};
|
|
10250
10253
|
return /* @__PURE__ */ f.jsxs(
|
|
@@ -10268,7 +10271,7 @@ function t0() {
|
|
|
10268
10271
|
currentMode: b,
|
|
10269
10272
|
hovered: p,
|
|
10270
10273
|
setHovered: h,
|
|
10271
|
-
handleClick:
|
|
10274
|
+
handleClick: D
|
|
10272
10275
|
},
|
|
10273
10276
|
w
|
|
10274
10277
|
)),
|
|
@@ -10279,7 +10282,7 @@ function t0() {
|
|
|
10279
10282
|
currentMode: b,
|
|
10280
10283
|
hovered: p,
|
|
10281
10284
|
setHovered: h,
|
|
10282
|
-
handleClick:
|
|
10285
|
+
handleClick: D
|
|
10283
10286
|
}
|
|
10284
10287
|
),
|
|
10285
10288
|
/* @__PURE__ */ f.jsx(
|
|
@@ -10289,7 +10292,7 @@ function t0() {
|
|
|
10289
10292
|
currentMode: b,
|
|
10290
10293
|
hovered: p,
|
|
10291
10294
|
setHovered: h,
|
|
10292
|
-
handleClick:
|
|
10295
|
+
handleClick: D
|
|
10293
10296
|
}
|
|
10294
10297
|
)
|
|
10295
10298
|
]
|
|
@@ -10358,30 +10361,30 @@ var cr = function(e, t, n) {
|
|
|
10358
10361
|
}, Hs = Te.memo(function(e) {
|
|
10359
10362
|
var t = e.onMove, n = e.onKey, r = Us(e, ["onMove", "onKey"]), i = Ie(null), a = ei(t), o = ei(n), s = Ie(null), c = Ie(!1), u = ce(function() {
|
|
10360
10363
|
var v = function(w) {
|
|
10361
|
-
Wo(w), (or(w) ? w.touches.length > 0 : w.buttons > 0) && i.current ? a(Ho(i.current, w, s.current)) :
|
|
10364
|
+
Wo(w), (or(w) ? w.touches.length > 0 : w.buttons > 0) && i.current ? a(Ho(i.current, w, s.current)) : D(!1);
|
|
10362
10365
|
}, k = function() {
|
|
10363
|
-
return
|
|
10366
|
+
return D(!1);
|
|
10364
10367
|
};
|
|
10365
|
-
function
|
|
10366
|
-
var
|
|
10367
|
-
y(
|
|
10368
|
+
function D(w) {
|
|
10369
|
+
var E = c.current, L = ti(i.current), y = w ? L.addEventListener : L.removeEventListener;
|
|
10370
|
+
y(E ? "touchmove" : "mousemove", v), y(E ? "touchend" : "mouseup", k);
|
|
10368
10371
|
}
|
|
10369
10372
|
return [function(w) {
|
|
10370
|
-
var
|
|
10371
|
-
if (
|
|
10373
|
+
var E = w.nativeEvent, L = i.current;
|
|
10374
|
+
if (L && (Wo(E), !(function(d, m) {
|
|
10372
10375
|
return m && !or(d);
|
|
10373
|
-
})(
|
|
10374
|
-
if (or(
|
|
10376
|
+
})(E, c.current) && L)) {
|
|
10377
|
+
if (or(E)) {
|
|
10375
10378
|
c.current = !0;
|
|
10376
|
-
var y =
|
|
10379
|
+
var y = E.changedTouches || [];
|
|
10377
10380
|
y.length && (s.current = y[0].identifier);
|
|
10378
10381
|
}
|
|
10379
|
-
|
|
10382
|
+
L.focus(), a(Ho(L, E, s.current)), D(!0);
|
|
10380
10383
|
}
|
|
10381
10384
|
}, function(w) {
|
|
10382
|
-
var
|
|
10383
|
-
|
|
10384
|
-
},
|
|
10385
|
+
var E = w.which || w.keyCode;
|
|
10386
|
+
E < 37 || E > 40 || (w.preventDefault(), o({ left: E === 39 ? 0.05 : E === 37 ? -0.05 : 0, top: E === 40 ? 0.05 : E === 38 ? -0.05 : 0 }));
|
|
10387
|
+
}, D];
|
|
10385
10388
|
}, [o, a]), p = u[0], h = u[1], b = u[2];
|
|
10386
10389
|
return Ee(function() {
|
|
10387
10390
|
return b;
|
|
@@ -10607,7 +10610,7 @@ function S0({ id: e, defaultHeight: t }) {
|
|
|
10607
10610
|
if (!p || !n.current) return;
|
|
10608
10611
|
const y = n.current.value || String(t), d = Number(y) < s ? s : Number(y) > c ? c : Number(y);
|
|
10609
10612
|
i(p, { height: d });
|
|
10610
|
-
},
|
|
10613
|
+
}, D = p ? o.filter((y) => y.trackType === p).length : 0, w = D > 1, E = (y) => {
|
|
10611
10614
|
switch (y) {
|
|
10612
10615
|
case me.BigWig:
|
|
10613
10616
|
return "BigWig";
|
|
@@ -10628,7 +10631,7 @@ function S0({ id: e, defaultHeight: t }) {
|
|
|
10628
10631
|
default:
|
|
10629
10632
|
return y;
|
|
10630
10633
|
}
|
|
10631
|
-
},
|
|
10634
|
+
}, L = () => ({
|
|
10632
10635
|
...wi(h || "#000000", !0),
|
|
10633
10636
|
padding: "10px",
|
|
10634
10637
|
border: "none",
|
|
@@ -10641,12 +10644,12 @@ function S0({ id: e, defaultHeight: t }) {
|
|
|
10641
10644
|
w && p && /* @__PURE__ */ f.jsxs(
|
|
10642
10645
|
"button",
|
|
10643
10646
|
{
|
|
10644
|
-
style:
|
|
10647
|
+
style: L(),
|
|
10645
10648
|
onClick: k,
|
|
10646
|
-
title: `Change height for all ${
|
|
10649
|
+
title: `Change height for all ${D} ${E(p)} tracks`,
|
|
10647
10650
|
children: [
|
|
10648
10651
|
"Change all ",
|
|
10649
|
-
|
|
10652
|
+
E(p),
|
|
10650
10653
|
" tracks"
|
|
10651
10654
|
]
|
|
10652
10655
|
}
|
|
@@ -11048,25 +11051,25 @@ function P0({ handleClose: e, color: t }) {
|
|
|
11048
11051
|
);
|
|
11049
11052
|
}
|
|
11050
11053
|
function A0() {
|
|
11051
|
-
const e = Ht((
|
|
11054
|
+
const e = Ht((E) => E.content), t = Ht((E) => E.x), n = Ht((E) => E.y), r = Ht((E) => E.show), [i, a] = be(0), [o, s] = be(0), [c, u] = be({ width: 0, height: 0 }), p = Ie(null), h = fe((E) => E.delta), b = fe((E) => E.browserWidth), k = kr() + De, D = 5, w = at(() => {
|
|
11052
11055
|
if (!p.current) return;
|
|
11053
|
-
const
|
|
11056
|
+
const E = t, L = n, y = p.current.getBBox(), d = y.width, m = y.height;
|
|
11054
11057
|
(c.width !== d || c.height !== m) && u({ width: d, height: m });
|
|
11055
|
-
let _ =
|
|
11056
|
-
_ + d > b && (_ =
|
|
11057
|
-
}, [t, n, b, k,
|
|
11058
|
+
let _ = E + D, g = L + D;
|
|
11059
|
+
_ + d > b && (_ = E - d - D), _ < 0 && (_ = Math.max(0, b - d)), g + m > k && (g = L - m - D), g < 0 && (g = Math.max(0, k - m)), a(_), s(g);
|
|
11060
|
+
}, [t, n, b, k, D, c]);
|
|
11058
11061
|
return Ee(() => {
|
|
11059
11062
|
if (!p.current || !r) return;
|
|
11060
11063
|
requestAnimationFrame(w);
|
|
11061
|
-
const
|
|
11064
|
+
const E = new MutationObserver(() => {
|
|
11062
11065
|
requestAnimationFrame(w);
|
|
11063
11066
|
});
|
|
11064
|
-
return
|
|
11067
|
+
return E.observe(p.current, {
|
|
11065
11068
|
childList: !0,
|
|
11066
11069
|
subtree: !0,
|
|
11067
11070
|
attributes: !0,
|
|
11068
11071
|
characterData: !0
|
|
11069
|
-
}), () =>
|
|
11072
|
+
}), () => E.disconnect();
|
|
11070
11073
|
}, [r, e, t, n, b, k]), !r || h ? null : /* @__PURE__ */ f.jsx("g", { ref: p, id: "tooltip", transform: `translate(${i}, ${o})`, style: { pointerEvents: "none" }, children: e });
|
|
11071
11074
|
}
|
|
11072
11075
|
function N0({ children: e }) {
|
|
@@ -11103,23 +11106,23 @@ function N0({ children: e }) {
|
|
|
11103
11106
|
function q0() {
|
|
11104
11107
|
const e = fe((k) => k.browserWidth), t = fe((k) => k.marginWidth), n = De, r = kr() + De, [i, a] = be([0, 0]), [o, s] = be(!1), c = fe((k) => k.svgRef), u = fe((k) => k.domain), p = fe((k) => k.setDomain), h = (k) => {
|
|
11105
11108
|
if (!c || !c.current) return null;
|
|
11106
|
-
const
|
|
11107
|
-
|
|
11109
|
+
const D = Go(k, c.current);
|
|
11110
|
+
D && (a([D.x, D.x]), s(!0));
|
|
11108
11111
|
}, b = (k) => {
|
|
11109
11112
|
if (!c || !c.current) return null;
|
|
11110
11113
|
if (!o) return;
|
|
11111
|
-
const
|
|
11112
|
-
if (!
|
|
11113
|
-
const w = Math.max(t, Math.min(e,
|
|
11114
|
-
a((
|
|
11114
|
+
const D = Go(k, c.current);
|
|
11115
|
+
if (!D) return;
|
|
11116
|
+
const w = Math.max(t, Math.min(e, D.x));
|
|
11117
|
+
a((E) => [E[0], w]);
|
|
11115
11118
|
}, v = (k) => {
|
|
11116
11119
|
if (!c || !c.current) return null;
|
|
11117
11120
|
if (!o) return;
|
|
11118
11121
|
s(!1);
|
|
11119
|
-
const
|
|
11120
|
-
if (w -
|
|
11122
|
+
const D = Math.min(i[0], i[1]), w = Math.max(i[0], i[1]);
|
|
11123
|
+
if (w - D < 10) return;
|
|
11121
11124
|
k.preventDefault();
|
|
11122
|
-
const
|
|
11125
|
+
const E = u.end - u.start, L = e - t, y = (D - t) / L, d = (w - t) / L, m = u.start + y * E, _ = u.start + d * E, g = { chromosome: u.chromosome, start: Math.round(m), end: Math.round(_) };
|
|
11123
11126
|
a([0, 0]), p(g);
|
|
11124
11127
|
};
|
|
11125
11128
|
return Ee(() => (document.addEventListener("mousemove", b), document.addEventListener("mouseup", v), () => {
|
|
@@ -11224,7 +11227,7 @@ function U0() {
|
|
|
11224
11227
|
/* @__PURE__ */ f.jsx(I0, {})
|
|
11225
11228
|
] });
|
|
11226
11229
|
}
|
|
11227
|
-
function
|
|
11230
|
+
function yh({ browserStore: e, trackStore: t, externalDataStore: n }) {
|
|
11228
11231
|
const r = n ?? dc([]), i = ce(() => Jo(), []), a = ce(() => Qo(), []), o = ce(() => es(), []), s = ce(() => ts(), []), c = ce(
|
|
11229
11232
|
() => ({
|
|
11230
11233
|
browserStore: e,
|
|
@@ -11239,8 +11242,8 @@ function mh({ browserStore: e, trackStore: t, externalDataStore: n }) {
|
|
|
11239
11242
|
);
|
|
11240
11243
|
return /* @__PURE__ */ f.jsx(pc, { value: c, children: /* @__PURE__ */ f.jsx(U0, {}) });
|
|
11241
11244
|
}
|
|
11242
|
-
const
|
|
11243
|
-
function
|
|
11245
|
+
const _h = Vs;
|
|
11246
|
+
function bh(e, t) {
|
|
11244
11247
|
return ce(() => Vs(e), t ?? []);
|
|
11245
11248
|
}
|
|
11246
11249
|
function Vs(e) {
|
|
@@ -11322,8 +11325,8 @@ function Vs(e) {
|
|
|
11322
11325
|
setTitleSize: (r) => t({ titleSize: r })
|
|
11323
11326
|
}));
|
|
11324
11327
|
}
|
|
11325
|
-
const
|
|
11326
|
-
function
|
|
11328
|
+
const wh = Zs;
|
|
11329
|
+
function Sh(e, t) {
|
|
11327
11330
|
return ce(() => Zs(e), t ?? []);
|
|
11328
11331
|
}
|
|
11329
11332
|
function Zs(e = []) {
|
|
@@ -11434,16 +11437,16 @@ function Zs(e = []) {
|
|
|
11434
11437
|
}
|
|
11435
11438
|
}));
|
|
11436
11439
|
}
|
|
11437
|
-
const H0 = "https://screen.api.wenglab.org/graphql", W0 = new
|
|
11438
|
-
link: new
|
|
11439
|
-
cache: new
|
|
11440
|
+
const H0 = "https://screen.api.wenglab.org/graphql", W0 = new rc({
|
|
11441
|
+
link: new ic({ uri: H0 }),
|
|
11442
|
+
cache: new nc(),
|
|
11440
11443
|
devtools: {
|
|
11441
11444
|
enabled: !0,
|
|
11442
11445
|
name: "Genome Browser"
|
|
11443
11446
|
}
|
|
11444
11447
|
});
|
|
11445
|
-
function
|
|
11446
|
-
return /* @__PURE__ */ f.jsx(
|
|
11448
|
+
function kh({ children: e }) {
|
|
11449
|
+
return /* @__PURE__ */ f.jsx(ec, { client: W0, children: e });
|
|
11447
11450
|
}
|
|
11448
11451
|
function Y0(e, t, n, r) {
|
|
11449
11452
|
return r ? `M ${e} ${n * 0.1} L ${e + t} ${n / 2} L ${e} ${n * 0.9}` : `M ${e + t} ${n * 0.1} L ${e} ${n / 2} L ${e + t} ${n * 0.9}`;
|
|
@@ -11509,11 +11512,11 @@ const J0 = lr`
|
|
|
11509
11512
|
centromere: "#880000",
|
|
11510
11513
|
stalk: "#ff0000"
|
|
11511
11514
|
};
|
|
11512
|
-
function
|
|
11515
|
+
function Eh({
|
|
11513
11516
|
assembly: e,
|
|
11514
11517
|
currentDomain: t
|
|
11515
11518
|
}) {
|
|
11516
|
-
const i = { ...t, color: "rgba(50,50,255,0.75)" }, a = "translate(0,0)", { data: o, loading: s, error: c } =
|
|
11519
|
+
const i = { ...t, color: "rgba(50,50,255,0.75)" }, a = "translate(0,0)", { data: o, loading: s, error: c } = tc(J0, {
|
|
11517
11520
|
variables: {
|
|
11518
11521
|
assembly: e,
|
|
11519
11522
|
chromosome: t.chromosome || ""
|
|
@@ -11526,29 +11529,29 @@ function wh({
|
|
|
11526
11529
|
"Error: ",
|
|
11527
11530
|
c.message
|
|
11528
11531
|
] }) });
|
|
11529
|
-
const p = { start: 0, end: Math.max(...
|
|
11532
|
+
const p = o, h = { start: 0, end: Math.max(...p.cytoband.map((k) => k.coordinates.end)) }, b = eh(
|
|
11530
11533
|
{
|
|
11531
|
-
start:
|
|
11532
|
-
end:
|
|
11534
|
+
start: h.start,
|
|
11535
|
+
end: h.end,
|
|
11533
11536
|
chromosome: t.chromosome
|
|
11534
11537
|
},
|
|
11535
11538
|
700
|
|
11536
11539
|
);
|
|
11537
|
-
let
|
|
11540
|
+
let v = 0;
|
|
11538
11541
|
return /* @__PURE__ */ f.jsxs("g", { id: "cytobands", width: 700, height: 20, transform: a, children: [
|
|
11539
|
-
|
|
11540
|
-
const
|
|
11541
|
-
return
|
|
11542
|
+
p.cytoband.map((k, D) => {
|
|
11543
|
+
const w = b(k.coordinates.start), E = b(k.coordinates.end) - w;
|
|
11544
|
+
return k.stain === "acen" ? /* @__PURE__ */ f.jsx(
|
|
11542
11545
|
G0,
|
|
11543
11546
|
{
|
|
11544
|
-
width:
|
|
11545
|
-
x:
|
|
11547
|
+
width: E,
|
|
11548
|
+
x: w,
|
|
11546
11549
|
height: 20,
|
|
11547
11550
|
color: u.centromere,
|
|
11548
|
-
opening:
|
|
11551
|
+
opening: v++ === 0
|
|
11549
11552
|
},
|
|
11550
|
-
|
|
11551
|
-
) : /* @__PURE__ */ f.jsx(Z0, { type:
|
|
11553
|
+
D
|
|
11554
|
+
) : /* @__PURE__ */ f.jsx(Z0, { type: k.stain, width: E, x: w, height: 20, colors: u, opacity: 1 }, D);
|
|
11552
11555
|
}),
|
|
11553
11556
|
i ? /* @__PURE__ */ f.jsx(
|
|
11554
11557
|
X0,
|
|
@@ -11556,7 +11559,7 @@ function wh({
|
|
|
11556
11559
|
onMouseOut: () => {
|
|
11557
11560
|
},
|
|
11558
11561
|
highlight: i,
|
|
11559
|
-
x:
|
|
11562
|
+
x: b,
|
|
11560
11563
|
height: 20,
|
|
11561
11564
|
width: 700
|
|
11562
11565
|
}
|
|
@@ -11566,34 +11569,34 @@ function wh({
|
|
|
11566
11569
|
function eh(e, t) {
|
|
11567
11570
|
return (n) => (n - e.start) * t / (e.end - e.start);
|
|
11568
11571
|
}
|
|
11569
|
-
function
|
|
11572
|
+
function Lh(e, t, n) {
|
|
11570
11573
|
const r = n((a) => a.setTrackData), i = n((a) => a.isFetching);
|
|
11571
11574
|
Ee(() => {
|
|
11572
11575
|
i || (t.loading ? r(e, { data: null, error: null }) : t.error ? r(e, { data: null, error: t.error.message }) : t.data && r(e, { data: t.data, error: null }));
|
|
11573
11576
|
}, [t.data, t.loading, t.error, i, e, r]);
|
|
11574
11577
|
}
|
|
11575
11578
|
export {
|
|
11576
|
-
|
|
11579
|
+
yh as Browser,
|
|
11577
11580
|
Ot as ClipPath,
|
|
11578
|
-
|
|
11581
|
+
Eh as Cytobands,
|
|
11579
11582
|
Fe as DisplayMode,
|
|
11580
|
-
|
|
11581
|
-
|
|
11583
|
+
kh as GQLWrapper,
|
|
11584
|
+
mh as Pastels,
|
|
11582
11585
|
me as TrackType,
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11586
|
+
vh as Vibrant,
|
|
11587
|
+
_h as createBrowserStore,
|
|
11588
|
+
bh as createBrowserStoreMemo,
|
|
11589
|
+
sh as createDataStore,
|
|
11587
11590
|
dc as createDataStoreMemo,
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11591
|
-
|
|
11591
|
+
wh as createTrackStore,
|
|
11592
|
+
Sh as createTrackStoreMemo,
|
|
11593
|
+
ch as defineBigBedSchema,
|
|
11594
|
+
gh as fetchBigBedUrl,
|
|
11592
11595
|
Kl as renderDenseBigBedData,
|
|
11593
11596
|
Jl as renderSquishBigBedData,
|
|
11594
11597
|
gi as useBrowserScale,
|
|
11595
11598
|
fe as useBrowserStore,
|
|
11596
|
-
|
|
11599
|
+
Lh as useCustomData,
|
|
11597
11600
|
et as useInteraction,
|
|
11598
11601
|
di as useMouseToIndex,
|
|
11599
11602
|
Cr as useRowHeight,
|