@uwrl/qc-utils 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +627 -565
- package/dist/index.umd.cjs +13 -13
- package/dist/types/index.d.ts +95 -37
- package/dist/utils/plotting/script.d.ts +8 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var N = /* @__PURE__ */ ((r) => (r.SECOND = "s", r.MINUTE = "m", r.HOUR = "h", r.DAY = "D", r.WEEK = "W", r.MONTH = "M", r.YEAR = "Y", r))(N || {}),
|
|
2
|
-
class
|
|
1
|
+
var N = /* @__PURE__ */ ((r) => (r.SECOND = "s", r.MINUTE = "m", r.HOUR = "h", r.DAY = "D", r.WEEK = "W", r.MONTH = "M", r.YEAR = "Y", r))(N || {}), E = /* @__PURE__ */ ((r) => (r.ADD_POINTS = "ADD_POINTS", r.CHANGE_VALUES = "CHANGE_VALUES", r.ASSIGN_VALUES_BULK = "ASSIGN_VALUES_BULK", r.DELETE_POINTS = "DELETE_POINTS", r.DRIFT_CORRECTION = "DRIFT_CORRECTION", r.INTERPOLATE = "INTERPOLATE", r.SHIFT_DATETIMES = "SHIFT_DATETIMES", r.ASSIGN_DATETIMES_BULK = "ASSIGN_DATETIMES_BULK", r.FILL_GAPS = "FILL_GAPS", r))(E || {}), A = /* @__PURE__ */ ((r) => (r.FIND_GAPS = "FIND_GAPS", r.PERSISTENCE = "PERSISTENCE", r.CHANGE = "CHANGE", r.RATE_OF_CHANGE = "RATE_OF_CHANGE", r.VALUE_THRESHOLD = "VALUE_THRESHOLD", r.DATETIME_RANGE = "DATETIME_RANGE", r.SELECTION = "SELECTION", r))(A || {}), B = /* @__PURE__ */ ((r) => (r.LT = "Less than", r.LTE = "Less than or equal to", r.GT = "Greater than", r.GTE = "Greater than or equal to", r.E = "Equal", r))(B || {}), mt = /* @__PURE__ */ ((r) => (r.ADD = "ADD", r.SUB = "SUB", r.MULT = "MULT", r.DIV = "DIV", r.ASSIGN = "ASSIGN", r))(mt || {}), gt = /* @__PURE__ */ ((r) => (r.LT = "Less than", r.LTE = "Less than or equal to", r.GT = "Greater than", r.GTE = "Greater than or equal to", r.E = "Equal", r))(gt || {});
|
|
2
|
+
class yt {
|
|
3
3
|
id;
|
|
4
4
|
thingId;
|
|
5
5
|
link;
|
|
@@ -11,7 +11,7 @@ class gt {
|
|
|
11
11
|
this.id = "", this.thingId = "", this.link = "", this.frequency = null, this.path = "HydroShare", this.datastreamIds = [], this.publicResource = !1;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
class
|
|
14
|
+
class gr extends yt {
|
|
15
15
|
resourceTitle;
|
|
16
16
|
resourceAbstract;
|
|
17
17
|
resourceKeywords;
|
|
@@ -19,7 +19,7 @@ class mr extends gt {
|
|
|
19
19
|
super(), this.resourceTitle = void 0, this.resourceAbstract = void 0, this.resourceKeywords = void 0;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
class
|
|
22
|
+
class bt {
|
|
23
23
|
latitude;
|
|
24
24
|
longitude;
|
|
25
25
|
elevation_m;
|
|
@@ -31,11 +31,11 @@ class yt {
|
|
|
31
31
|
this.elevationDatum = "WGS84", this.state = "", this.county = "", this.country = "";
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
class
|
|
34
|
+
class yr {
|
|
35
35
|
id;
|
|
36
36
|
workspaceId;
|
|
37
37
|
name;
|
|
38
|
-
location = new
|
|
38
|
+
location = new bt();
|
|
39
39
|
tags;
|
|
40
40
|
hydroShareArchive;
|
|
41
41
|
siteType;
|
|
@@ -48,7 +48,7 @@ class wr {
|
|
|
48
48
|
this.id = "", this.workspaceId = "", this.name = "", this.tags = [], this.siteType = "", this.samplingFeatureCode = "", this.isPrivate = !1, this.description = "", this.samplingFeatureType = "Site", this.dataDisclaimer = "";
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
class
|
|
51
|
+
class br {
|
|
52
52
|
id;
|
|
53
53
|
workspaceId;
|
|
54
54
|
name;
|
|
@@ -78,7 +78,7 @@ class gr {
|
|
|
78
78
|
this.id = "", this.workspaceId = "", this.name = "", this.description = "", this.thingId = e || "", this.observationType = "OM_Measurement", this.resultType = "Time Series Coverage", this.sampledMedium = "", this.noDataValue = -9999, this.aggregationStatistic = "", this.unitId = "", this.observedPropertyId = "", this.sensorId = "", this.processingLevelId = "", this.timeAggregationInterval = null, this.timeAggregationIntervalUnit = "seconds", this.isPrivate = !0, this.isVisible = !0, this.valueCount = 0;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
class
|
|
81
|
+
class Sr {
|
|
82
82
|
id;
|
|
83
83
|
workspaceId;
|
|
84
84
|
name;
|
|
@@ -89,7 +89,7 @@ class yr {
|
|
|
89
89
|
this.id = "", this.workspaceId = "", this.name = "", this.symbol = "", this.definition = "", this.type = "";
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
class
|
|
92
|
+
class Er {
|
|
93
93
|
id;
|
|
94
94
|
workspaceId;
|
|
95
95
|
name;
|
|
@@ -105,7 +105,7 @@ class br {
|
|
|
105
105
|
this.id = "", this.workspaceId = "", this.name = "", this.description = "", this.manufacturer = "", this.model = "", this.methodType = "Instrument Deployment", this.methodCode = "", this.methodLink = "", this.encodingType = "application/json", this.modelLink = "";
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
class
|
|
108
|
+
class vr {
|
|
109
109
|
id;
|
|
110
110
|
workspaceId;
|
|
111
111
|
name;
|
|
@@ -117,7 +117,7 @@ class Er {
|
|
|
117
117
|
this.id = "", this.workspaceId = "", this.name = "", this.definition = "", this.description = "", this.type = "Hydrology", this.code = "";
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
class
|
|
120
|
+
class kr {
|
|
121
121
|
id;
|
|
122
122
|
workspaceId;
|
|
123
123
|
code;
|
|
@@ -127,7 +127,7 @@ class Sr {
|
|
|
127
127
|
this.id = "", this.workspaceId = "", this.code = "", this.definition = "", this.explanation = "";
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
class
|
|
130
|
+
class Ar {
|
|
131
131
|
id;
|
|
132
132
|
workspaceId;
|
|
133
133
|
code;
|
|
@@ -136,7 +136,7 @@ class vr {
|
|
|
136
136
|
this.id = "", this.workspaceId = "", this.code = "", this.description = "";
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
class
|
|
139
|
+
class Lr {
|
|
140
140
|
name;
|
|
141
141
|
code;
|
|
142
142
|
type;
|
|
@@ -145,7 +145,7 @@ class kr {
|
|
|
145
145
|
constructor() {
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
class
|
|
148
|
+
class _r {
|
|
149
149
|
id;
|
|
150
150
|
email;
|
|
151
151
|
password;
|
|
@@ -163,7 +163,7 @@ class Lr {
|
|
|
163
163
|
this.id = "", this.email = "", this.password = "", this.firstName = "", this.middleName = "", this.lastName = "", this.phone = "", this.address = "", this.type = "", this.link = "", this.accountType = "standard", this.hydroShareConnected = !1;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
class
|
|
166
|
+
class Tr {
|
|
167
167
|
id;
|
|
168
168
|
name;
|
|
169
169
|
iconLink;
|
|
@@ -173,8 +173,8 @@ class Ar {
|
|
|
173
173
|
this.id = "", this.name = "", this.iconLink = "", this.signupEnabled = !0, this.connectEnabled = !0;
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
var
|
|
177
|
-
class
|
|
176
|
+
var St = /* @__PURE__ */ ((r) => (r.Global = "*", r.View = "view", r.Create = "create", r.Edit = "edit", r.Delete = "delete", r))(St || {}), Et = /* @__PURE__ */ ((r) => (r.Global = "*", r.Workspace = "Workspace", r.Collaborator = "Collaborator", r.Thing = "Thing", r.Datastream = "Datastream", r.Sensor = "Sensor", r.Unit = "Unit", r.ObservedProperty = "ObservedProperty", r.ProcessingLevel = "ProcessingLevel", r.Observation = "Observation", r))(Et || {});
|
|
177
|
+
class Rr {
|
|
178
178
|
id = "";
|
|
179
179
|
key = "";
|
|
180
180
|
name = "";
|
|
@@ -189,7 +189,7 @@ class _r {
|
|
|
189
189
|
Object.assign(this, e);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
class
|
|
192
|
+
class Mr {
|
|
193
193
|
id;
|
|
194
194
|
name;
|
|
195
195
|
isPrivate;
|
|
@@ -200,7 +200,7 @@ class Tr {
|
|
|
200
200
|
this.id = "", this.name = "", this.isPrivate = !1, this.owner = null, this.collaboratorRole = null, this.pendingTransferTo = null;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
class
|
|
203
|
+
class Ir {
|
|
204
204
|
user;
|
|
205
205
|
role;
|
|
206
206
|
constructor() {
|
|
@@ -257,18 +257,18 @@ const ve = {
|
|
|
257
257
|
identifierType: "name"
|
|
258
258
|
/* Name */
|
|
259
259
|
}
|
|
260
|
-
},
|
|
260
|
+
}, Ae = {
|
|
261
261
|
HydroServer: {
|
|
262
262
|
type: "HydroServer"
|
|
263
263
|
}
|
|
264
264
|
};
|
|
265
|
-
class
|
|
265
|
+
class Ur {
|
|
266
266
|
name = "";
|
|
267
267
|
settings = {
|
|
268
268
|
type: "SDL",
|
|
269
269
|
extractor: JSON.parse(JSON.stringify(ve.local)),
|
|
270
270
|
transformer: JSON.parse(JSON.stringify(ke.CSV)),
|
|
271
|
-
loader: JSON.parse(JSON.stringify(
|
|
271
|
+
loader: JSON.parse(JSON.stringify(Ae.HydroServer)),
|
|
272
272
|
payloads: []
|
|
273
273
|
};
|
|
274
274
|
id = "";
|
|
@@ -299,10 +299,10 @@ class Ir {
|
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
switchLoader(e) {
|
|
302
|
-
this.settings.loader = JSON.parse(JSON.stringify(
|
|
302
|
+
this.settings.loader = JSON.parse(JSON.stringify(Ae[e]));
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
class
|
|
305
|
+
class Or {
|
|
306
306
|
name = "";
|
|
307
307
|
mappings = [];
|
|
308
308
|
extractorVariables = {};
|
|
@@ -310,15 +310,15 @@ class Mr {
|
|
|
310
310
|
Object.assign(this, e);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
const Xe = 1, q = Xe * 60,
|
|
313
|
+
const Xe = 1, q = Xe * 60, we = q * 60, me = we * 24, vt = me * 7, kt = we * 30, At = me * 365, G = {
|
|
314
314
|
[N.SECOND]: Xe,
|
|
315
315
|
[N.MINUTE]: q,
|
|
316
|
-
[N.HOUR]:
|
|
317
|
-
[N.DAY]:
|
|
318
|
-
[N.WEEK]:
|
|
319
|
-
[N.MONTH]:
|
|
320
|
-
[N.YEAR]:
|
|
321
|
-
},
|
|
316
|
+
[N.HOUR]: we,
|
|
317
|
+
[N.DAY]: me,
|
|
318
|
+
[N.WEEK]: vt,
|
|
319
|
+
[N.MONTH]: kt,
|
|
320
|
+
[N.YEAR]: At
|
|
321
|
+
}, xr = (r) => r.toLocaleString(void 0, {
|
|
322
322
|
year: "numeric",
|
|
323
323
|
month: "short",
|
|
324
324
|
day: "2-digit",
|
|
@@ -326,7 +326,7 @@ const Xe = 1, q = Xe * 60, me = q * 60, we = me * 24, St = we * 7, vt = me * 30,
|
|
|
326
326
|
hour12: !1,
|
|
327
327
|
minute: "2-digit",
|
|
328
328
|
second: "2-digit"
|
|
329
|
-
}),
|
|
329
|
+
}), Dr = (r) => {
|
|
330
330
|
let e, t;
|
|
331
331
|
r >= q * 1e3 ? (e = r / (q * 1e3), t = "m") : r >= 1e3 ? (e = r / 1e3, t = "s") : (e = r, t = "ms");
|
|
332
332
|
let n;
|
|
@@ -421,8 +421,8 @@ var Q = (function() {
|
|
|
421
421
|
if (this._parentage = null, Array.isArray(s))
|
|
422
422
|
try {
|
|
423
423
|
for (var a = ae(s), c = a.next(); !c.done; c = a.next()) {
|
|
424
|
-
var
|
|
425
|
-
|
|
424
|
+
var d = c.value;
|
|
425
|
+
d.remove(this);
|
|
426
426
|
}
|
|
427
427
|
} catch (l) {
|
|
428
428
|
e = { error: l };
|
|
@@ -442,14 +442,14 @@ var Q = (function() {
|
|
|
442
442
|
} catch (l) {
|
|
443
443
|
i = l instanceof ne ? l.errors : [l];
|
|
444
444
|
}
|
|
445
|
-
var
|
|
446
|
-
if (
|
|
445
|
+
var m = this._finalizers;
|
|
446
|
+
if (m) {
|
|
447
447
|
this._finalizers = null;
|
|
448
448
|
try {
|
|
449
|
-
for (var
|
|
450
|
-
var y =
|
|
449
|
+
for (var w = ae(m), p = w.next(); !p.done; p = w.next()) {
|
|
450
|
+
var y = p.value;
|
|
451
451
|
try {
|
|
452
|
-
|
|
452
|
+
Le(y);
|
|
453
453
|
} catch (l) {
|
|
454
454
|
i = i ?? [], l instanceof ne ? i = le(le([], ce(i)), ce(l.errors)) : i.push(l);
|
|
455
455
|
}
|
|
@@ -458,7 +458,7 @@ var Q = (function() {
|
|
|
458
458
|
n = { error: l };
|
|
459
459
|
} finally {
|
|
460
460
|
try {
|
|
461
|
-
|
|
461
|
+
p && !p.done && (o = w.return) && o.call(w);
|
|
462
462
|
} finally {
|
|
463
463
|
if (n) throw n.error;
|
|
464
464
|
}
|
|
@@ -471,7 +471,7 @@ var Q = (function() {
|
|
|
471
471
|
var t;
|
|
472
472
|
if (e && e !== this)
|
|
473
473
|
if (this.closed)
|
|
474
|
-
|
|
474
|
+
Le(e);
|
|
475
475
|
else {
|
|
476
476
|
if (e instanceof r) {
|
|
477
477
|
if (e.closed || e._hasParent(this))
|
|
@@ -496,16 +496,16 @@ var Q = (function() {
|
|
|
496
496
|
var e = new r();
|
|
497
497
|
return e.closed = !0, e;
|
|
498
498
|
})(), r;
|
|
499
|
-
})(),
|
|
500
|
-
function
|
|
499
|
+
})(), $e = Q.EMPTY;
|
|
500
|
+
function Ve(r) {
|
|
501
501
|
return r instanceof Q || r && "closed" in r && F(r.remove) && F(r.add) && F(r.unsubscribe);
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Le(r) {
|
|
504
504
|
F(r) ? r() : r.unsubscribe();
|
|
505
505
|
}
|
|
506
506
|
var Lt = {
|
|
507
507
|
Promise: void 0
|
|
508
|
-
},
|
|
508
|
+
}, _t = {
|
|
509
509
|
setTimeout: function(r, e) {
|
|
510
510
|
for (var t = [], n = 2; n < arguments.length; n++)
|
|
511
511
|
t[n - 2] = arguments[n];
|
|
@@ -516,8 +516,8 @@ var Lt = {
|
|
|
516
516
|
},
|
|
517
517
|
delegate: void 0
|
|
518
518
|
};
|
|
519
|
-
function
|
|
520
|
-
|
|
519
|
+
function Tt(r) {
|
|
520
|
+
_t.setTimeout(function() {
|
|
521
521
|
throw r;
|
|
522
522
|
});
|
|
523
523
|
}
|
|
@@ -526,11 +526,11 @@ function _e() {
|
|
|
526
526
|
function $(r) {
|
|
527
527
|
r();
|
|
528
528
|
}
|
|
529
|
-
var
|
|
529
|
+
var qe = (function(r) {
|
|
530
530
|
K(e, r);
|
|
531
531
|
function e(t) {
|
|
532
532
|
var n = r.call(this) || this;
|
|
533
|
-
return n.isStopped = !1, t ? (n.destination = t,
|
|
533
|
+
return n.isStopped = !1, t ? (n.destination = t, Ve(t) && t.add(n)) : n.destination = It, n;
|
|
534
534
|
}
|
|
535
535
|
return e.create = function(t, n, o) {
|
|
536
536
|
return new fe(t, n, o);
|
|
@@ -557,7 +557,7 @@ var Ve = (function(r) {
|
|
|
557
557
|
this.unsubscribe();
|
|
558
558
|
}
|
|
559
559
|
}, e;
|
|
560
|
-
})(Q),
|
|
560
|
+
})(Q), Rt = (function() {
|
|
561
561
|
function r(e) {
|
|
562
562
|
this.partialObserver = e;
|
|
563
563
|
}
|
|
@@ -567,7 +567,7 @@ var Ve = (function(r) {
|
|
|
567
567
|
try {
|
|
568
568
|
t.next(e);
|
|
569
569
|
} catch (n) {
|
|
570
|
-
|
|
570
|
+
z(n);
|
|
571
571
|
}
|
|
572
572
|
}, r.prototype.error = function(e) {
|
|
573
573
|
var t = this.partialObserver;
|
|
@@ -575,17 +575,17 @@ var Ve = (function(r) {
|
|
|
575
575
|
try {
|
|
576
576
|
t.error(e);
|
|
577
577
|
} catch (n) {
|
|
578
|
-
|
|
578
|
+
z(n);
|
|
579
579
|
}
|
|
580
580
|
else
|
|
581
|
-
|
|
581
|
+
z(e);
|
|
582
582
|
}, r.prototype.complete = function() {
|
|
583
583
|
var e = this.partialObserver;
|
|
584
584
|
if (e.complete)
|
|
585
585
|
try {
|
|
586
586
|
e.complete();
|
|
587
587
|
} catch (t) {
|
|
588
|
-
|
|
588
|
+
z(t);
|
|
589
589
|
}
|
|
590
590
|
}, r;
|
|
591
591
|
})(), fe = (function(r) {
|
|
@@ -596,29 +596,29 @@ var Ve = (function(r) {
|
|
|
596
596
|
next: t ?? void 0,
|
|
597
597
|
error: n ?? void 0,
|
|
598
598
|
complete: o ?? void 0
|
|
599
|
-
} : s = t, i.destination = new
|
|
599
|
+
} : s = t, i.destination = new Rt(s), i;
|
|
600
600
|
}
|
|
601
601
|
return e;
|
|
602
|
-
})(
|
|
603
|
-
function
|
|
604
|
-
|
|
602
|
+
})(qe);
|
|
603
|
+
function z(r) {
|
|
604
|
+
Tt(r);
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function Mt(r) {
|
|
607
607
|
throw r;
|
|
608
608
|
}
|
|
609
609
|
var It = {
|
|
610
610
|
closed: !0,
|
|
611
611
|
next: _e,
|
|
612
|
-
error:
|
|
612
|
+
error: Mt,
|
|
613
613
|
complete: _e
|
|
614
|
-
},
|
|
614
|
+
}, Ut = (function() {
|
|
615
615
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
616
616
|
})();
|
|
617
|
-
function
|
|
617
|
+
function Ot(r) {
|
|
618
618
|
return r;
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return r.length === 0 ?
|
|
620
|
+
function xt(r) {
|
|
621
|
+
return r.length === 0 ? Ot : r.length === 1 ? r[0] : function(t) {
|
|
622
622
|
return r.reduce(function(n, o) {
|
|
623
623
|
return o(n);
|
|
624
624
|
}, t);
|
|
@@ -632,7 +632,7 @@ var Te = (function() {
|
|
|
632
632
|
var t = new r();
|
|
633
633
|
return t.source = this, t.operator = e, t;
|
|
634
634
|
}, r.prototype.subscribe = function(e, t, n) {
|
|
635
|
-
var o = this, i =
|
|
635
|
+
var o = this, i = Ct(e) ? e : new fe(e, t, n);
|
|
636
636
|
return $(function() {
|
|
637
637
|
var s = o, a = s.operator, c = s.source;
|
|
638
638
|
i.add(a ? a.call(i, c) : c ? o._subscribe(i) : o._trySubscribe(i));
|
|
@@ -662,12 +662,12 @@ var Te = (function() {
|
|
|
662
662
|
}, r.prototype._subscribe = function(e) {
|
|
663
663
|
var t;
|
|
664
664
|
return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(e);
|
|
665
|
-
}, r.prototype[
|
|
665
|
+
}, r.prototype[Ut] = function() {
|
|
666
666
|
return this;
|
|
667
667
|
}, r.prototype.pipe = function() {
|
|
668
668
|
for (var e = [], t = 0; t < arguments.length; t++)
|
|
669
669
|
e[t] = arguments[t];
|
|
670
|
-
return
|
|
670
|
+
return xt(e)(this);
|
|
671
671
|
}, r.prototype.toPromise = function(e) {
|
|
672
672
|
var t = this;
|
|
673
673
|
return e = Re(e), new e(function(n, o) {
|
|
@@ -691,25 +691,25 @@ function Re(r) {
|
|
|
691
691
|
function Dt(r) {
|
|
692
692
|
return r && F(r.next) && F(r.error) && F(r.complete);
|
|
693
693
|
}
|
|
694
|
-
function
|
|
695
|
-
return r && r instanceof
|
|
694
|
+
function Ct(r) {
|
|
695
|
+
return r && r instanceof qe || Dt(r) && Ve(r);
|
|
696
696
|
}
|
|
697
|
-
var
|
|
697
|
+
var Nt = He(function(r) {
|
|
698
698
|
return function() {
|
|
699
699
|
r(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
700
700
|
};
|
|
701
|
-
}),
|
|
701
|
+
}), Je = (function(r) {
|
|
702
702
|
K(e, r);
|
|
703
703
|
function e() {
|
|
704
704
|
var t = r.call(this) || this;
|
|
705
705
|
return t.closed = !1, t.currentObservers = null, t.observers = [], t.isStopped = !1, t.hasError = !1, t.thrownError = null, t;
|
|
706
706
|
}
|
|
707
707
|
return e.prototype.lift = function(t) {
|
|
708
|
-
var n = new
|
|
708
|
+
var n = new Me(this, this);
|
|
709
709
|
return n.operator = t, n;
|
|
710
710
|
}, e.prototype._throwIfClosed = function() {
|
|
711
711
|
if (this.closed)
|
|
712
|
-
throw new
|
|
712
|
+
throw new Nt();
|
|
713
713
|
}, e.prototype.next = function(t) {
|
|
714
714
|
var n = this;
|
|
715
715
|
$(function() {
|
|
@@ -721,8 +721,8 @@ var Ct = He(function(r) {
|
|
|
721
721
|
var c = a.value;
|
|
722
722
|
c.next(t);
|
|
723
723
|
}
|
|
724
|
-
} catch (
|
|
725
|
-
o = { error:
|
|
724
|
+
} catch (d) {
|
|
725
|
+
o = { error: d };
|
|
726
726
|
} finally {
|
|
727
727
|
try {
|
|
728
728
|
a && !a.done && (i = s.return) && i.call(s);
|
|
@@ -765,7 +765,7 @@ var Ct = He(function(r) {
|
|
|
765
765
|
return this._throwIfClosed(), this._checkFinalizedStatuses(t), this._innerSubscribe(t);
|
|
766
766
|
}, e.prototype._innerSubscribe = function(t) {
|
|
767
767
|
var n = this, o = this, i = o.hasError, s = o.isStopped, a = o.observers;
|
|
768
|
-
return i || s ?
|
|
768
|
+
return i || s ? $e : (this.currentObservers = null, a.push(t), new Q(function() {
|
|
769
769
|
n.currentObservers = null, ue(a, t);
|
|
770
770
|
}));
|
|
771
771
|
}, e.prototype._checkFinalizedStatuses = function(t) {
|
|
@@ -775,9 +775,9 @@ var Ct = He(function(r) {
|
|
|
775
775
|
var t = new Te();
|
|
776
776
|
return t.source = this, t;
|
|
777
777
|
}, e.create = function(t, n) {
|
|
778
|
-
return new
|
|
778
|
+
return new Me(t, n);
|
|
779
779
|
}, e;
|
|
780
|
-
})(Te),
|
|
780
|
+
})(Te), Me = (function(r) {
|
|
781
781
|
K(e, r);
|
|
782
782
|
function e(t, n) {
|
|
783
783
|
var o = r.call(this) || this;
|
|
@@ -794,29 +794,29 @@ var Ct = He(function(r) {
|
|
|
794
794
|
(n = (t = this.destination) === null || t === void 0 ? void 0 : t.complete) === null || n === void 0 || n.call(t);
|
|
795
795
|
}, e.prototype._subscribe = function(t) {
|
|
796
796
|
var n, o;
|
|
797
|
-
return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t)) !== null && o !== void 0 ? o :
|
|
797
|
+
return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t)) !== null && o !== void 0 ? o : $e;
|
|
798
798
|
}, e;
|
|
799
|
-
})(
|
|
800
|
-
const
|
|
801
|
-
var
|
|
802
|
-
class
|
|
803
|
-
constructor(e = "", t = "info", n = "none", o = "Info", i =
|
|
799
|
+
})(Je);
|
|
800
|
+
const Ke = 3e3;
|
|
801
|
+
var Qe = /* @__PURE__ */ ((r) => (r.Warning = "warning", r.Success = "success", r.Error = "error", r.Info = "info", r))(Qe || {}), Ze = /* @__PURE__ */ ((r) => (r.Success = "mdi-checkbox-marked-circle", r.Warning = "mdi-alert", r.Error = "mdi-alert-circle", r.Info = "mdi-information", r.None = "none", r))(Ze || {}), et = /* @__PURE__ */ ((r) => (r.Warning = "Warning", r.Success = "Success", r.Error = "Error", r.Info = "Info", r))(et || {}), Ft = /* @__PURE__ */ ((r) => (r.Center = "center", r.Left = "left", r.Right = "right", r.Bottom = "bottom", r.Top = "top", r))(Ft || {});
|
|
802
|
+
class Bt {
|
|
803
|
+
constructor(e = "", t = "info", n = "none", o = "Info", i = Ke, s = "center", a = !1) {
|
|
804
804
|
this.message = e, this.color = t, this.icon = n, this.title = o, this.timeout = i, this.position = s, this.visible = a;
|
|
805
805
|
}
|
|
806
806
|
}
|
|
807
|
-
class
|
|
808
|
-
static subject = new
|
|
807
|
+
class Cr {
|
|
808
|
+
static subject = new Je();
|
|
809
809
|
static get snack$() {
|
|
810
810
|
return this.subject.asObservable();
|
|
811
811
|
}
|
|
812
812
|
static createSnackbar(e, t) {
|
|
813
813
|
this.subject.next(
|
|
814
|
-
new
|
|
814
|
+
new Bt(
|
|
815
815
|
e,
|
|
816
|
-
Ke[t],
|
|
817
816
|
Qe[t],
|
|
818
817
|
Ze[t],
|
|
819
|
-
|
|
818
|
+
et[t],
|
|
819
|
+
Ke,
|
|
820
820
|
"bottom",
|
|
821
821
|
!0
|
|
822
822
|
)
|
|
@@ -851,11 +851,11 @@ class Dr {
|
|
|
851
851
|
);
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function Nr(r, e) {
|
|
855
855
|
const t = new Date(r);
|
|
856
856
|
return t.setHours(t.getHours() - e), t.toISOString();
|
|
857
857
|
}
|
|
858
|
-
const
|
|
858
|
+
const D = (r, e) => {
|
|
859
859
|
let t = 0, n = r.length;
|
|
860
860
|
for (; t < n; ) {
|
|
861
861
|
const o = t + n >> 1;
|
|
@@ -869,12 +869,12 @@ const x = (r, e) => {
|
|
|
869
869
|
r[o] > e ? n = o : t = o + 1;
|
|
870
870
|
}
|
|
871
871
|
return t - 1;
|
|
872
|
-
},
|
|
873
|
-
`,
|
|
874
|
-
function
|
|
872
|
+
}, tt = `(function(){"use strict";function c(n,s,a,u,f,l,y,o){let r=0,e=o;for(let t=l;t<=y;t++)r<a.length&&t===a[r]?r++:(u[e]=n[t],f[e]=s[t],e++);return e-o}self.onmessage=n=>{const{bufferX:s,bufferY:a,outputBufferX:u,outputBufferY:f,start:l,end:y,deleteSegment:o,startTarget:r}=n.data,e=new Float64Array(s),t=new Float32Array(a),A=new Float64Array(u),g=new Float32Array(f);c(e,t,o,A,g,l,y,r),self.postMessage("Done")}})();
|
|
873
|
+
`, Ie = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", tt], { type: "text/javascript;charset=utf-8" });
|
|
874
|
+
function Pt(r) {
|
|
875
875
|
let e;
|
|
876
876
|
try {
|
|
877
|
-
if (e =
|
|
877
|
+
if (e = Ie && (self.URL || self.webkitURL).createObjectURL(Ie), !e) throw "";
|
|
878
878
|
const t = new Worker(e, {
|
|
879
879
|
name: r?.name
|
|
880
880
|
});
|
|
@@ -883,16 +883,16 @@ function Bt(r) {
|
|
|
883
883
|
}), t;
|
|
884
884
|
} catch {
|
|
885
885
|
return new Worker(
|
|
886
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
886
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(tt),
|
|
887
887
|
{
|
|
888
888
|
name: r?.name
|
|
889
889
|
}
|
|
890
890
|
);
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
|
-
const
|
|
894
|
-
`, Ue = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",
|
|
895
|
-
function
|
|
893
|
+
const rt = `(function(){"use strict";function F(n,l,a,o,s,y,g,f,i,w,A){let e=0,t=f;for(let r=y;r<=g;r++)if(o[t]=n[r],s[t]=l[r],t++,e<a.length&&r===a[e][0]){const u=a[e][0],c=a[e][1],d=n[u],h=n[c],m=l[u],D=l[c],x=h-d,P=D-m;let p=d+i;for(;p<h;)o[t]=p,s[t]=w?m+(p-d)*P/x:A,t++,p+=i;e++}return t-f}self.onmessage=n=>{const{bufferX:l,bufferY:a,outputBufferX:o,outputBufferY:s,start:y,end:g,gapsSegment:f,startTarget:i,fillDelta:w,interpolate:A,fillValue:e}=n.data,t=new Float64Array(l),r=new Float32Array(a),u=new Float64Array(o),c=new Float32Array(s);F(t,r,f,u,c,y,g,i,w,A,e),self.postMessage("Done")}})();
|
|
894
|
+
`, Ue = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", rt], { type: "text/javascript;charset=utf-8" });
|
|
895
|
+
function jt(r) {
|
|
896
896
|
let e;
|
|
897
897
|
try {
|
|
898
898
|
if (e = Ue && (self.URL || self.webkitURL).createObjectURL(Ue), !e) throw "";
|
|
@@ -904,16 +904,16 @@ function Pt(r) {
|
|
|
904
904
|
}), t;
|
|
905
905
|
} catch {
|
|
906
906
|
return new Worker(
|
|
907
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
907
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(rt),
|
|
908
908
|
{
|
|
909
909
|
name: r?.name
|
|
910
910
|
}
|
|
911
911
|
);
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
|
-
const
|
|
915
|
-
`, Oe = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",
|
|
916
|
-
function
|
|
914
|
+
const nt = `(function(){"use strict";function g(o,n,c){for(let s=0;s<c.length;s++){const{indexes:t,lowerIdx:l,upperIdx:r}=c[s],i=o[l],f=n[l],a=o[r],d=n[r],p=a-i,w=d-f;if(p===0){for(let e=0;e<t.length;e++)n[t[e]]=f;continue}for(let e=0;e<t.length;e++){const u=t[e];n[u]=f+(o[u]-i)*w/p}}}self.onmessage=o=>{const{bufferX:n,bufferY:c,groups:s}=o.data,t=new Float64Array(n),l=new Float32Array(c);g(t,l,s),self.postMessage("Done")}})();
|
|
915
|
+
`, Oe = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", nt], { type: "text/javascript;charset=utf-8" });
|
|
916
|
+
function Wt(r) {
|
|
917
917
|
let e;
|
|
918
918
|
try {
|
|
919
919
|
if (e = Oe && (self.URL || self.webkitURL).createObjectURL(Oe), !e) throw "";
|
|
@@ -925,19 +925,19 @@ function jt(r) {
|
|
|
925
925
|
}), t;
|
|
926
926
|
} catch {
|
|
927
927
|
return new Worker(
|
|
928
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
928
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(nt),
|
|
929
929
|
{
|
|
930
930
|
name: r?.name
|
|
931
931
|
}
|
|
932
932
|
);
|
|
933
933
|
}
|
|
934
934
|
}
|
|
935
|
-
const
|
|
936
|
-
`,
|
|
937
|
-
function
|
|
935
|
+
const st = `(function(){"use strict";self.onmessage=r=>{const{bufferX:s,bufferY:o,jobs:a}=r.data,f=new Float64Array(s),n=new Float32Array(o);for(let e=0;e<a.length;e++){const{chunkStart:c,chunkEnd:l,startDatetime:u,value:i,extent:y}=a[e];for(let t=c;t<l;t++)n[t]=n[t]+i*((f[t]-u)/y)}self.postMessage("Done")}})();
|
|
936
|
+
`, xe = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", st], { type: "text/javascript;charset=utf-8" });
|
|
937
|
+
function Yt(r) {
|
|
938
938
|
let e;
|
|
939
939
|
try {
|
|
940
|
-
if (e =
|
|
940
|
+
if (e = xe && (self.URL || self.webkitURL).createObjectURL(xe), !e) throw "";
|
|
941
941
|
const t = new Worker(e, {
|
|
942
942
|
name: r?.name
|
|
943
943
|
});
|
|
@@ -946,19 +946,19 @@ function Wt(r) {
|
|
|
946
946
|
}), t;
|
|
947
947
|
} catch {
|
|
948
948
|
return new Worker(
|
|
949
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
949
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(st),
|
|
950
950
|
{
|
|
951
951
|
name: r?.name
|
|
952
952
|
}
|
|
953
953
|
);
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
|
-
const
|
|
957
|
-
`,
|
|
958
|
-
function
|
|
956
|
+
const ot = `(function(){"use strict";function u(f,o,a,n,l,c,s,i){let r=c,e=0,t=i;const w=a.length;for(;r<s&&e<w;){const y=a[e][0];f[r]<=y?(n[t]=f[r],l[t]=o[r],r++):(n[t]=y,l[t]=a[e][1],e++),t++}for(;r<s;)n[t]=f[r],l[t]=o[r],r++,t++;for(;e<w;)n[t]=a[e][0],l[t]=a[e][1],e++,t++;return t-i}self.onmessage=f=>{const{bufferX:o,bufferY:a,outputBufferX:n,outputBufferY:l,origStart:c,origEnd:s,insertions:i,outStart:r}=f.data,e=new Float64Array(o),t=new Float32Array(a),w=new Float64Array(n),y=new Float32Array(l);u(e,t,i,w,y,c,s,r),self.postMessage("Done")}})();
|
|
957
|
+
`, De = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", ot], { type: "text/javascript;charset=utf-8" });
|
|
958
|
+
function Gt(r) {
|
|
959
959
|
let e;
|
|
960
960
|
try {
|
|
961
|
-
if (e =
|
|
961
|
+
if (e = De && (self.URL || self.webkitURL).createObjectURL(De), !e) throw "";
|
|
962
962
|
const t = new Worker(e, {
|
|
963
963
|
name: r?.name
|
|
964
964
|
});
|
|
@@ -967,16 +967,16 @@ function Yt(r) {
|
|
|
967
967
|
}), t;
|
|
968
968
|
} catch {
|
|
969
969
|
return new Worker(
|
|
970
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
970
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(ot),
|
|
971
971
|
{
|
|
972
972
|
name: r?.name
|
|
973
973
|
}
|
|
974
974
|
);
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
|
-
const
|
|
978
|
-
`, Ce = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",
|
|
979
|
-
function
|
|
977
|
+
const it = `(function(){"use strict";self.onmessage=i=>{const{bufferX:c,bufferY:g,outputBufferX:d,outputBufferY:y,indexes:n,outStart:r,amount:f,isMonth:Y,isYear:h,deltaMs:w}=i.data,s=new Float64Array(c),a=new Float32Array(g),l=new Float64Array(d),u=new Float32Array(y);if(Y)for(let t=0;t<n.length;t++){const e=n[t],o=new Date(s[e]);o.setMonth(o.getMonth()+f),l[r+t]=o.getTime(),u[r+t]=a[e]}else if(h)for(let t=0;t<n.length;t++){const e=n[t],o=new Date(s[e]);o.setFullYear(o.getFullYear()+f),l[r+t]=o.getTime(),u[r+t]=a[e]}else for(let t=0;t<n.length;t++){const e=n[t];l[r+t]=s[e]+w,u[r+t]=a[e]}self.postMessage("Done")}})();
|
|
978
|
+
`, Ce = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", it], { type: "text/javascript;charset=utf-8" });
|
|
979
|
+
function zt(r) {
|
|
980
980
|
let e;
|
|
981
981
|
try {
|
|
982
982
|
if (e = Ce && (self.URL || self.webkitURL).createObjectURL(Ce), !e) throw "";
|
|
@@ -988,15 +988,15 @@ function Gt(r) {
|
|
|
988
988
|
}), t;
|
|
989
989
|
} catch {
|
|
990
990
|
return new Worker(
|
|
991
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
991
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(it),
|
|
992
992
|
{
|
|
993
993
|
name: r?.name
|
|
994
994
|
}
|
|
995
995
|
);
|
|
996
996
|
}
|
|
997
997
|
}
|
|
998
|
-
const
|
|
999
|
-
`, Ne = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",
|
|
998
|
+
const at = `(function(){"use strict";function a(e,t,o,c){const n=[];let r=e[t];for(let s=t+1;s<=o;s++){const f=e[s];f-r>c&&n.push(s-1,s),r=f}return n}self.onmessage=e=>{const{bufferX:t,start:o,endInclusive:c,threshold:n}=e.data,r=new Float64Array(t);self.postMessage(a(r,o,c,n))}})();
|
|
999
|
+
`, Ne = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", at], { type: "text/javascript;charset=utf-8" });
|
|
1000
1000
|
function Xt(r) {
|
|
1001
1001
|
let e;
|
|
1002
1002
|
try {
|
|
@@ -1009,15 +1009,15 @@ function Xt(r) {
|
|
|
1009
1009
|
}), t;
|
|
1010
1010
|
} catch {
|
|
1011
1011
|
return new Worker(
|
|
1012
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
1012
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(at),
|
|
1013
1013
|
{
|
|
1014
1014
|
name: r?.name
|
|
1015
1015
|
}
|
|
1016
1016
|
);
|
|
1017
1017
|
}
|
|
1018
1018
|
}
|
|
1019
|
-
const
|
|
1020
|
-
`, Fe = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",
|
|
1019
|
+
const ct = `(function(){"use strict";function c(u,s,t){const n=[];if(s>=t)return n;let e=s,o=u[s];for(let r=s+1;r<t;r++){const f=u[r];f!==o&&(n.push(e,r-e,o),e=r,o=f)}return n.push(e,t-e,o),n}self.onmessage=u=>{const{bufferY:s,start:t,end:n}=u.data,e=new Float32Array(s);self.postMessage(c(e,t,n))}})();
|
|
1020
|
+
`, Fe = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", ct], { type: "text/javascript;charset=utf-8" });
|
|
1021
1021
|
function Ht(r) {
|
|
1022
1022
|
let e;
|
|
1023
1023
|
try {
|
|
@@ -1030,16 +1030,16 @@ function Ht(r) {
|
|
|
1030
1030
|
}), t;
|
|
1031
1031
|
} catch {
|
|
1032
1032
|
return new Worker(
|
|
1033
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
1033
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(ct),
|
|
1034
1034
|
{
|
|
1035
1035
|
name: r?.name
|
|
1036
1036
|
}
|
|
1037
1037
|
);
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
|
-
const
|
|
1041
|
-
`, Be = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",
|
|
1042
|
-
function
|
|
1040
|
+
const lt = `(function(){"use strict";function o(s,i,t,n,l){const f=[];if(n==="Less than")for(let e=i;e<t;e++)s[e]-s[e-1]<l&&f.push(e);else if(n==="Less than or equal to")for(let e=i;e<t;e++)s[e]-s[e-1]<=l&&f.push(e);else if(n==="Greater than")for(let e=i;e<t;e++)s[e]-s[e-1]>l&&f.push(e);else if(n==="Greater than or equal to")for(let e=i;e<t;e++)s[e]-s[e-1]>=l&&f.push(e);else if(n==="Equal")for(let e=i;e<t;e++)s[e]-s[e-1]==l&&f.push(e);return f}self.onmessage=s=>{const{bufferY:i,start:t,end:n,comparator:l,value:f}=s.data,e=new Float32Array(i);self.postMessage(o(e,t,n,l,f))}})();
|
|
1041
|
+
`, Be = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", lt], { type: "text/javascript;charset=utf-8" });
|
|
1042
|
+
function $t(r) {
|
|
1043
1043
|
let e;
|
|
1044
1044
|
try {
|
|
1045
1045
|
if (e = Be && (self.URL || self.webkitURL).createObjectURL(Be), !e) throw "";
|
|
@@ -1051,16 +1051,16 @@ function zt(r) {
|
|
|
1051
1051
|
}), t;
|
|
1052
1052
|
} catch {
|
|
1053
1053
|
return new Worker(
|
|
1054
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
1054
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(lt),
|
|
1055
1055
|
{
|
|
1056
1056
|
name: r?.name
|
|
1057
1057
|
}
|
|
1058
1058
|
);
|
|
1059
1059
|
}
|
|
1060
1060
|
}
|
|
1061
|
-
const
|
|
1062
|
-
`, Pe = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",
|
|
1063
|
-
function
|
|
1061
|
+
const ut = `(function(){"use strict";function l(t,i,n,o,h){const f=[];if(o==="Less than")for(let e=i;e<n;e++){const s=t[e-1];(t[e]-s)/Math.abs(s)<h&&f.push(e)}else if(o==="Less than or equal to")for(let e=i;e<n;e++){const s=t[e-1];(t[e]-s)/Math.abs(s)<=h&&f.push(e)}else if(o==="Greater than")for(let e=i;e<n;e++){const s=t[e-1];(t[e]-s)/Math.abs(s)>h&&f.push(e)}else if(o==="Greater than or equal to")for(let e=i;e<n;e++){const s=t[e-1];(t[e]-s)/Math.abs(s)>=h&&f.push(e)}else if(o==="Equal")for(let e=i;e<n;e++){const s=t[e-1];(t[e]-s)/Math.abs(s)==h&&f.push(e)}return f}self.onmessage=t=>{const{bufferY:i,start:n,end:o,comparator:h,value:f}=t.data,e=new Float32Array(i);self.postMessage(l(e,n,o,h,f))}})();
|
|
1062
|
+
`, Pe = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", ut], { type: "text/javascript;charset=utf-8" });
|
|
1063
|
+
function Vt(r) {
|
|
1064
1064
|
let e;
|
|
1065
1065
|
try {
|
|
1066
1066
|
if (e = Pe && (self.URL || self.webkitURL).createObjectURL(Pe), !e) throw "";
|
|
@@ -1072,15 +1072,15 @@ function $t(r) {
|
|
|
1072
1072
|
}), t;
|
|
1073
1073
|
} catch {
|
|
1074
1074
|
return new Worker(
|
|
1075
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
1075
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(ut),
|
|
1076
1076
|
{
|
|
1077
1077
|
name: r?.name
|
|
1078
1078
|
}
|
|
1079
1079
|
);
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
|
-
const
|
|
1083
|
-
`, je = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",
|
|
1082
|
+
const ft = `(function(){"use strict";function k(i,l,u,r,c){const f=[],b=r.length;for(let a=l;a<u;a++){const t=i[a];let e=!1;for(let n=0;n<b;n++){const o=r[n],s=c[n];if(o===0){if(t<s){e=!0;break}}else if(o===1){if(t<=s){e=!0;break}}else if(o===2){if(t>s){e=!0;break}}else if(o===3){if(t>=s){e=!0;break}}else if(t==s){e=!0;break}}e&&f.push(a)}return f}self.onmessage=i=>{const{bufferY:l,start:u,end:r,ops:c,values:f}=i.data,b=new Float32Array(l);self.postMessage(k(b,u,r,c,f))}})();
|
|
1083
|
+
`, je = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", ft], { type: "text/javascript;charset=utf-8" });
|
|
1084
1084
|
function he(r) {
|
|
1085
1085
|
let e;
|
|
1086
1086
|
try {
|
|
@@ -1093,16 +1093,16 @@ function he(r) {
|
|
|
1093
1093
|
}), t;
|
|
1094
1094
|
} catch {
|
|
1095
1095
|
return new Worker(
|
|
1096
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
1096
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(ft),
|
|
1097
1097
|
{
|
|
1098
1098
|
name: r?.name
|
|
1099
1099
|
}
|
|
1100
1100
|
);
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
|
-
const
|
|
1104
|
-
`, We = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",
|
|
1105
|
-
function
|
|
1103
|
+
const ht = `(function(){"use strict";function e(l,t,o,s){const c=t.length;if(o==="ADD")for(let f=0;f<c;f++)l[t[f]]=l[t[f]]+s;else if(o==="SUB")for(let f=0;f<c;f++)l[t[f]]=l[t[f]]-s;else if(o==="MULT")for(let f=0;f<c;f++)l[t[f]]=l[t[f]]*s;else if(o==="DIV")for(let f=0;f<c;f++)l[t[f]]=l[t[f]]/s;else if(o==="ASSIGN")for(let f=0;f<c;f++)l[t[f]]=s}self.onmessage=l=>{const{bufferY:t,indexes:o,operator:s,value:c}=l.data,f=new Float32Array(t);e(f,o,s,c),self.postMessage("Done")}})();
|
|
1104
|
+
`, We = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", ht], { type: "text/javascript;charset=utf-8" });
|
|
1105
|
+
function qt(r) {
|
|
1106
1106
|
let e;
|
|
1107
1107
|
try {
|
|
1108
1108
|
if (e = We && (self.URL || self.webkitURL).createObjectURL(We), !e) throw "";
|
|
@@ -1114,50 +1114,50 @@ function Vt(r) {
|
|
|
1114
1114
|
}), t;
|
|
1115
1115
|
} catch {
|
|
1116
1116
|
return new Worker(
|
|
1117
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
1117
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(ht),
|
|
1118
1118
|
{
|
|
1119
1119
|
name: r?.name
|
|
1120
1120
|
}
|
|
1121
1121
|
);
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1124
|
+
function dt(r, e, t, n, o) {
|
|
1125
1125
|
const i = [], s = n.length;
|
|
1126
1126
|
for (let a = e; a < t; a++) {
|
|
1127
1127
|
const c = r[a];
|
|
1128
|
-
let
|
|
1128
|
+
let d = !1;
|
|
1129
1129
|
for (let f = 0; f < s; f++) {
|
|
1130
|
-
const
|
|
1131
|
-
if (
|
|
1132
|
-
if (c <
|
|
1133
|
-
|
|
1130
|
+
const m = n[f], w = o[f];
|
|
1131
|
+
if (m === 0) {
|
|
1132
|
+
if (c < w) {
|
|
1133
|
+
d = !0;
|
|
1134
1134
|
break;
|
|
1135
1135
|
}
|
|
1136
|
-
} else if (
|
|
1137
|
-
if (c <=
|
|
1138
|
-
|
|
1136
|
+
} else if (m === 1) {
|
|
1137
|
+
if (c <= w) {
|
|
1138
|
+
d = !0;
|
|
1139
1139
|
break;
|
|
1140
1140
|
}
|
|
1141
|
-
} else if (
|
|
1142
|
-
if (c >
|
|
1143
|
-
|
|
1141
|
+
} else if (m === 2) {
|
|
1142
|
+
if (c > w) {
|
|
1143
|
+
d = !0;
|
|
1144
1144
|
break;
|
|
1145
1145
|
}
|
|
1146
|
-
} else if (
|
|
1147
|
-
if (c >=
|
|
1148
|
-
|
|
1146
|
+
} else if (m === 3) {
|
|
1147
|
+
if (c >= w) {
|
|
1148
|
+
d = !0;
|
|
1149
1149
|
break;
|
|
1150
1150
|
}
|
|
1151
|
-
} else if (c ==
|
|
1152
|
-
|
|
1151
|
+
} else if (c == w) {
|
|
1152
|
+
d = !0;
|
|
1153
1153
|
break;
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
|
-
|
|
1156
|
+
d && i.push(a);
|
|
1157
1157
|
}
|
|
1158
1158
|
return i;
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function Jt(r, e, t, n, o) {
|
|
1161
1161
|
const i = [];
|
|
1162
1162
|
if (n === "Less than")
|
|
1163
1163
|
for (let s = e; s < t; s++)
|
|
@@ -1176,7 +1176,7 @@ function qt(r, e, t, n, o) {
|
|
|
1176
1176
|
r[s] - r[s - 1] == o && i.push(s);
|
|
1177
1177
|
return i;
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1179
|
+
function Kt(r, e, t, n, o) {
|
|
1180
1180
|
const i = [];
|
|
1181
1181
|
if (n === "Less than")
|
|
1182
1182
|
for (let s = e; s < t; s++) {
|
|
@@ -1205,7 +1205,7 @@ function Jt(r, e, t, n, o) {
|
|
|
1205
1205
|
}
|
|
1206
1206
|
return i;
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1208
|
+
function Qt(r, e, t, n) {
|
|
1209
1209
|
const o = [];
|
|
1210
1210
|
let i = r[e];
|
|
1211
1211
|
for (let s = e + 1; s <= t; s++) {
|
|
@@ -1214,7 +1214,7 @@ function Kt(r, e, t, n) {
|
|
|
1214
1214
|
}
|
|
1215
1215
|
return o;
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function Zt(r, e, t) {
|
|
1218
1218
|
const n = [];
|
|
1219
1219
|
if (e >= t) return n;
|
|
1220
1220
|
let o = e, i = r[e];
|
|
@@ -1224,38 +1224,38 @@ function Qt(r, e, t) {
|
|
|
1224
1224
|
}
|
|
1225
1225
|
return n.push(o, t - o, i), n;
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1228
|
-
let
|
|
1229
|
-
for (let
|
|
1230
|
-
if (n[
|
|
1231
|
-
const y = t[
|
|
1232
|
-
let
|
|
1233
|
-
for (;
|
|
1234
|
-
n[
|
|
1235
|
-
|
|
1227
|
+
function er(r, e, t, n, o, i, s, a, c, d, f) {
|
|
1228
|
+
let m = 0, w = a;
|
|
1229
|
+
for (let p = i; p <= s; p++)
|
|
1230
|
+
if (n[w] = r[p], o[w] = e[p], w++, m < t.length && p === t[m][0]) {
|
|
1231
|
+
const y = t[m][0], l = t[m][1], u = r[y], g = r[l], h = e[y], b = e[l], S = g - u, k = b - h;
|
|
1232
|
+
let L = u + c;
|
|
1233
|
+
for (; L < g; )
|
|
1234
|
+
n[w] = L, o[w] = d ? h + (L - u) * k / S : f, w++, L += c;
|
|
1235
|
+
m++;
|
|
1236
1236
|
}
|
|
1237
|
-
return
|
|
1237
|
+
return w - a;
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1240
|
-
let c = i,
|
|
1241
|
-
const
|
|
1242
|
-
for (; c < s &&
|
|
1243
|
-
const
|
|
1244
|
-
r[c] <=
|
|
1239
|
+
function tr(r, e, t, n, o, i, s, a) {
|
|
1240
|
+
let c = i, d = 0, f = a;
|
|
1241
|
+
const m = t.length;
|
|
1242
|
+
for (; c < s && d < m; ) {
|
|
1243
|
+
const w = t[d][0];
|
|
1244
|
+
r[c] <= w ? (n[f] = r[c], o[f] = e[c], c++) : (n[f] = w, o[f] = t[d][1], d++), f++;
|
|
1245
1245
|
}
|
|
1246
1246
|
for (; c < s; )
|
|
1247
1247
|
n[f] = r[c], o[f] = e[c], c++, f++;
|
|
1248
|
-
for (;
|
|
1249
|
-
n[f] = t[
|
|
1248
|
+
for (; d < m; )
|
|
1249
|
+
n[f] = t[d][0], o[f] = t[d][1], d++, f++;
|
|
1250
1250
|
return f - a;
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1253
|
-
let c = 0,
|
|
1252
|
+
function rr(r, e, t, n, o, i, s, a) {
|
|
1253
|
+
let c = 0, d = a;
|
|
1254
1254
|
for (let f = i; f <= s; f++)
|
|
1255
|
-
c < t.length && f === t[c] ? c++ : (n[
|
|
1256
|
-
return
|
|
1255
|
+
c < t.length && f === t[c] ? c++ : (n[d] = r[f], o[d] = e[f], d++);
|
|
1256
|
+
return d - a;
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1258
|
+
function nr(r, e, t, n) {
|
|
1259
1259
|
const o = t.length, i = new Array(o);
|
|
1260
1260
|
if (n.isMonth)
|
|
1261
1261
|
for (let s = 0; s < o; s++) {
|
|
@@ -1274,27 +1274,27 @@ function rr(r, e, t, n) {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
return i;
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function sr(r, e, t) {
|
|
1278
1278
|
for (let n = 0; n < t.length; n++) {
|
|
1279
|
-
const { indexes: o, lowerIdx: i, upperIdx: s } = t[n], a = r[i], c = e[i],
|
|
1280
|
-
if (
|
|
1281
|
-
for (let
|
|
1279
|
+
const { indexes: o, lowerIdx: i, upperIdx: s } = t[n], a = r[i], c = e[i], d = r[s], f = e[s], m = d - a, w = f - c;
|
|
1280
|
+
if (m === 0) {
|
|
1281
|
+
for (let p = 0; p < o.length; p++) e[o[p]] = c;
|
|
1282
1282
|
continue;
|
|
1283
1283
|
}
|
|
1284
|
-
for (let
|
|
1285
|
-
const y = o[
|
|
1286
|
-
e[y] = c + (r[y] - a) *
|
|
1284
|
+
for (let p = 0; p < o.length; p++) {
|
|
1285
|
+
const y = o[p];
|
|
1286
|
+
e[y] = c + (r[y] - a) * w / m;
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function or(r, e, t) {
|
|
1291
1291
|
for (let n = 0; n < t.length; n++) {
|
|
1292
1292
|
const o = t[n][0], i = t[n][1], s = t[n][2];
|
|
1293
1293
|
if (i <= o) continue;
|
|
1294
1294
|
const a = r[o], c = r[i] - a;
|
|
1295
1295
|
if (c !== 0)
|
|
1296
|
-
for (let
|
|
1297
|
-
e[
|
|
1296
|
+
for (let d = o; d < i; d++)
|
|
1297
|
+
e[d] = e[d] + s * ((r[d] - a) / c);
|
|
1298
1298
|
}
|
|
1299
1299
|
}
|
|
1300
1300
|
function Ye(r, e, t, n) {
|
|
@@ -1310,7 +1310,7 @@ function Ye(r, e, t, n) {
|
|
|
1310
1310
|
else if (t === "ASSIGN")
|
|
1311
1311
|
for (let i = 0; i < o; i++) r[e[i]] = n;
|
|
1312
1312
|
}
|
|
1313
|
-
const
|
|
1313
|
+
const ir = 1, ge = `qc-utils:calibration:v${ir}`, ar = 720 * 60 * 60 * 1e3, X = 5e4, H = 2e5, J = {
|
|
1314
1314
|
spawnOverheadMs: 50,
|
|
1315
1315
|
// worst-case Windows
|
|
1316
1316
|
inlineThroughput: 5e4,
|
|
@@ -1321,86 +1321,86 @@ const or = 1, ge = `qc-utils:calibration:v${or}`, ir = 720 * 60 * 60 * 1e3, H =
|
|
|
1321
1321
|
measuredAt: 0,
|
|
1322
1322
|
userAgent: "default"
|
|
1323
1323
|
};
|
|
1324
|
-
let R =
|
|
1324
|
+
let R = ur() ?? J, ye = null, j = null;
|
|
1325
1325
|
const de = /* @__PURE__ */ new Set(), pe = {
|
|
1326
1326
|
// Filter ops — read-only scans, cheap kernels
|
|
1327
|
-
[
|
|
1327
|
+
[A.VALUE_THRESHOLD]: {
|
|
1328
1328
|
mode: "calibrated",
|
|
1329
1329
|
weight: 1,
|
|
1330
1330
|
rationale: "O(n) single-pass scan; baseline reference"
|
|
1331
1331
|
},
|
|
1332
|
-
[
|
|
1332
|
+
[A.CHANGE]: {
|
|
1333
1333
|
mode: "calibrated",
|
|
1334
1334
|
weight: 1.1,
|
|
1335
1335
|
rationale: "O(n) with one subtraction per step"
|
|
1336
1336
|
},
|
|
1337
|
-
[
|
|
1337
|
+
[A.RATE_OF_CHANGE]: {
|
|
1338
1338
|
mode: "calibrated",
|
|
1339
1339
|
weight: 1.4,
|
|
1340
1340
|
rationale: "O(n) with division + abs per step"
|
|
1341
1341
|
},
|
|
1342
|
-
[
|
|
1342
|
+
[A.FIND_GAPS]: {
|
|
1343
1343
|
mode: "calibrated",
|
|
1344
1344
|
weight: 0.9,
|
|
1345
1345
|
rationale: "O(n) on X only, mostly empty output"
|
|
1346
1346
|
},
|
|
1347
|
-
[
|
|
1347
|
+
[A.PERSISTENCE]: {
|
|
1348
1348
|
mode: "calibrated",
|
|
1349
1349
|
weight: 1.3,
|
|
1350
1350
|
rationale: "O(n) + chunk-boundary stitch"
|
|
1351
1351
|
},
|
|
1352
|
-
[
|
|
1352
|
+
[A.DATETIME_RANGE]: {
|
|
1353
1353
|
mode: "always-inline",
|
|
1354
1354
|
weight: 0,
|
|
1355
1355
|
rationale: "O(log n) binary search; never worth the worker hop"
|
|
1356
1356
|
},
|
|
1357
|
-
[
|
|
1357
|
+
[A.SELECTION]: {
|
|
1358
1358
|
mode: "always-inline",
|
|
1359
1359
|
weight: 0,
|
|
1360
1360
|
rationale: "Pure history bookkeeping"
|
|
1361
1361
|
},
|
|
1362
1362
|
// Edit ops — mutate Y in place or rebuild arrays
|
|
1363
|
-
[
|
|
1363
|
+
[E.CHANGE_VALUES]: {
|
|
1364
1364
|
mode: "calibrated",
|
|
1365
1365
|
weight: 0.7,
|
|
1366
1366
|
rationale: "O(k) in-place arithmetic on selection"
|
|
1367
1367
|
},
|
|
1368
|
-
[
|
|
1368
|
+
[E.ASSIGN_VALUES_BULK]: {
|
|
1369
1369
|
mode: "always-inline",
|
|
1370
1370
|
weight: 0,
|
|
1371
1371
|
rationale: "Single tight loop, already inline"
|
|
1372
1372
|
},
|
|
1373
|
-
[
|
|
1373
|
+
[E.ASSIGN_DATETIMES_BULK]: {
|
|
1374
1374
|
mode: "always-inline",
|
|
1375
1375
|
weight: 0,
|
|
1376
1376
|
rationale: "Composes delete+add which handle their own dispatch"
|
|
1377
1377
|
},
|
|
1378
|
-
[
|
|
1378
|
+
[E.INTERPOLATE]: {
|
|
1379
1379
|
mode: "calibrated",
|
|
1380
1380
|
weight: 1.5,
|
|
1381
1381
|
rationale: "Linear interp per consecutive group; in-place writes"
|
|
1382
1382
|
},
|
|
1383
|
-
[
|
|
1383
|
+
[E.DRIFT_CORRECTION]: {
|
|
1384
1384
|
mode: "calibrated",
|
|
1385
1385
|
weight: 1.2,
|
|
1386
1386
|
rationale: "O(range total) in-place math; one pass per range"
|
|
1387
1387
|
},
|
|
1388
|
-
[
|
|
1388
|
+
[E.SHIFT_DATETIMES]: {
|
|
1389
1389
|
mode: "calibrated",
|
|
1390
1390
|
weight: 1.1,
|
|
1391
1391
|
rationale: "O(k) per-point shift math; inline skips SAB allocation"
|
|
1392
1392
|
},
|
|
1393
|
-
[
|
|
1393
|
+
[E.ADD_POINTS]: {
|
|
1394
1394
|
mode: "calibrated",
|
|
1395
1395
|
weight: 1.8,
|
|
1396
1396
|
rationale: "Single merge pass over Y/X + insertions; fresh SAB per call"
|
|
1397
1397
|
},
|
|
1398
|
-
[
|
|
1398
|
+
[E.DELETE_POINTS]: {
|
|
1399
1399
|
mode: "calibrated",
|
|
1400
1400
|
weight: 1.4,
|
|
1401
1401
|
rationale: "Single skip-on-delete pass over Y/X; fresh SAB per call"
|
|
1402
1402
|
},
|
|
1403
|
-
[
|
|
1403
|
+
[E.FILL_GAPS]: {
|
|
1404
1404
|
mode: "calibrated",
|
|
1405
1405
|
weight: 1.3,
|
|
1406
1406
|
rationale: "Single copy-with-fills pass; fresh SAB sized to newLength"
|
|
@@ -1436,7 +1436,7 @@ function U(r, e) {
|
|
|
1436
1436
|
predictedWorkerMs: 0,
|
|
1437
1437
|
reason: t.rationale
|
|
1438
1438
|
};
|
|
1439
|
-
const n =
|
|
1439
|
+
const n = cr(r, e);
|
|
1440
1440
|
if (n <= 0)
|
|
1441
1441
|
return {
|
|
1442
1442
|
useWorker: !1,
|
|
@@ -1458,16 +1458,16 @@ function U(r, e) {
|
|
|
1458
1458
|
reason: a ? `worker faster (${s.toFixed(1)} vs ${i.toFixed(1)} ms)` : `inline faster (${i.toFixed(1)} vs ${s.toFixed(1)} ms)`
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1461
|
+
function cr(r, e) {
|
|
1462
1462
|
switch (r) {
|
|
1463
|
-
case
|
|
1464
|
-
case
|
|
1465
|
-
case
|
|
1466
|
-
case
|
|
1463
|
+
case E.CHANGE_VALUES:
|
|
1464
|
+
case E.INTERPOLATE:
|
|
1465
|
+
case E.SHIFT_DATETIMES:
|
|
1466
|
+
case E.DRIFT_CORRECTION:
|
|
1467
1467
|
return e.selectionSize ?? 0;
|
|
1468
|
-
case
|
|
1468
|
+
case E.DELETE_POINTS:
|
|
1469
1469
|
return (e.selectionSize ?? 0) + e.datasetSize * 0.25;
|
|
1470
|
-
case
|
|
1470
|
+
case E.ADD_POINTS: {
|
|
1471
1471
|
const t = Math.max(1, Math.log2(Math.max(e.datasetSize, 2)));
|
|
1472
1472
|
return e.datasetSize + (e.selectionSize ?? 0) * t;
|
|
1473
1473
|
}
|
|
@@ -1475,39 +1475,39 @@ function ar(r, e) {
|
|
|
1475
1475
|
return e.datasetSize;
|
|
1476
1476
|
}
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1478
|
+
function Fr(r) {
|
|
1479
1479
|
return de.add(r), () => de.delete(r);
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1481
|
+
function Br() {
|
|
1482
1482
|
return R;
|
|
1483
1483
|
}
|
|
1484
|
-
function
|
|
1484
|
+
function Pr() {
|
|
1485
1485
|
return ye;
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function jr() {
|
|
1488
1488
|
return Object.keys(pe).map((r) => ({ op: r, ...pe[r] }));
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1490
|
+
function Wr() {
|
|
1491
1491
|
R = J, ye = null;
|
|
1492
1492
|
try {
|
|
1493
1493
|
localStorage.removeItem(ge);
|
|
1494
1494
|
} catch {
|
|
1495
1495
|
}
|
|
1496
1496
|
}
|
|
1497
|
-
async function
|
|
1498
|
-
if (typeof window > "u" || !(r.force || R.measuredAt === 0 || Date.now() - R.measuredAt >
|
|
1497
|
+
async function Yr(r = {}) {
|
|
1498
|
+
if (typeof window > "u" || !(r.force || R.measuredAt === 0 || Date.now() - R.measuredAt > ar)) return R;
|
|
1499
1499
|
if (j) await j;
|
|
1500
1500
|
else {
|
|
1501
|
-
j =
|
|
1501
|
+
j = lr().finally(() => {
|
|
1502
1502
|
j = null;
|
|
1503
1503
|
});
|
|
1504
1504
|
const t = await j;
|
|
1505
|
-
R = t,
|
|
1505
|
+
R = t, fr(t), ye = t;
|
|
1506
1506
|
for (const n of de) n(R);
|
|
1507
1507
|
}
|
|
1508
1508
|
return R;
|
|
1509
1509
|
}
|
|
1510
|
-
async function
|
|
1510
|
+
async function lr() {
|
|
1511
1511
|
if (!(typeof SharedArrayBuffer < "u"))
|
|
1512
1512
|
return {
|
|
1513
1513
|
...J,
|
|
@@ -1517,12 +1517,12 @@ async function cr() {
|
|
|
1517
1517
|
sharedArrayBufferAvailable: !1,
|
|
1518
1518
|
samples: { spawnRoundtripMs: [], inlineScanMs: [], workerScanMs: [] }
|
|
1519
1519
|
};
|
|
1520
|
-
const e = navigator.hardwareConcurrency || 4, t = new Float32Array(
|
|
1521
|
-
for (let l = 0; l <
|
|
1520
|
+
const e = navigator.hardwareConcurrency || 4, t = new Float32Array(X);
|
|
1521
|
+
for (let l = 0; l < X; l++) t[l] = Math.sin(l);
|
|
1522
1522
|
const n = await se(3, () => {
|
|
1523
1523
|
const l = performance.now();
|
|
1524
|
-
return
|
|
1525
|
-
}), o = oe(n), i =
|
|
1524
|
+
return dt(t, 0, X, [2], [0.5]), performance.now() - l;
|
|
1525
|
+
}), o = oe(n), i = X / Math.max(o, 1e-3), s = new SharedArrayBuffer(256 * Float32Array.BYTES_PER_ELEMENT), a = await se(3, async () => {
|
|
1526
1526
|
const l = performance.now();
|
|
1527
1527
|
return await new Promise((u) => {
|
|
1528
1528
|
const g = new he();
|
|
@@ -1536,29 +1536,29 @@ async function cr() {
|
|
|
1536
1536
|
values: [0.5]
|
|
1537
1537
|
});
|
|
1538
1538
|
}), performance.now() - l;
|
|
1539
|
-
}), c = oe(a),
|
|
1540
|
-
|
|
1541
|
-
), f = new Float32Array(
|
|
1542
|
-
for (let l = 0; l <
|
|
1543
|
-
const
|
|
1539
|
+
}), c = oe(a), d = new SharedArrayBuffer(
|
|
1540
|
+
H * Float32Array.BYTES_PER_ELEMENT
|
|
1541
|
+
), f = new Float32Array(d);
|
|
1542
|
+
for (let l = 0; l < H; l++) f[l] = Math.sin(l);
|
|
1543
|
+
const m = await se(3, async () => {
|
|
1544
1544
|
const l = performance.now();
|
|
1545
1545
|
return await new Promise((u) => {
|
|
1546
1546
|
const g = new he();
|
|
1547
1547
|
g.onmessage = () => {
|
|
1548
1548
|
g.terminate(), u();
|
|
1549
1549
|
}, g.postMessage({
|
|
1550
|
-
bufferY:
|
|
1550
|
+
bufferY: d,
|
|
1551
1551
|
start: 0,
|
|
1552
|
-
end:
|
|
1552
|
+
end: H,
|
|
1553
1553
|
ops: [2],
|
|
1554
1554
|
values: [0.5]
|
|
1555
1555
|
});
|
|
1556
1556
|
}), performance.now() - l;
|
|
1557
|
-
}),
|
|
1557
|
+
}), w = Math.max(oe(m) - c, 0.1), p = H / w;
|
|
1558
1558
|
return {
|
|
1559
1559
|
spawnOverheadMs: c,
|
|
1560
1560
|
inlineThroughput: i,
|
|
1561
|
-
workerThroughput:
|
|
1561
|
+
workerThroughput: p,
|
|
1562
1562
|
hwConcurrency: e,
|
|
1563
1563
|
measuredAt: Date.now(),
|
|
1564
1564
|
userAgent: navigator.userAgent,
|
|
@@ -1566,7 +1566,7 @@ async function cr() {
|
|
|
1566
1566
|
samples: {
|
|
1567
1567
|
spawnRoundtripMs: a,
|
|
1568
1568
|
inlineScanMs: n,
|
|
1569
|
-
workerScanMs:
|
|
1569
|
+
workerScanMs: m
|
|
1570
1570
|
}
|
|
1571
1571
|
};
|
|
1572
1572
|
}
|
|
@@ -1581,7 +1581,7 @@ function oe(r) {
|
|
|
1581
1581
|
const e = [...r].sort((n, o) => n - o), t = Math.floor(e.length / 2);
|
|
1582
1582
|
return e.length % 2 ? e[t] : (e[t - 1] + e[t]) / 2;
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1584
|
+
function ur() {
|
|
1585
1585
|
if (typeof localStorage > "u") return null;
|
|
1586
1586
|
try {
|
|
1587
1587
|
const r = localStorage.getItem(ge);
|
|
@@ -1592,7 +1592,7 @@ function lr() {
|
|
|
1592
1592
|
return null;
|
|
1593
1593
|
}
|
|
1594
1594
|
}
|
|
1595
|
-
function
|
|
1595
|
+
function fr(r) {
|
|
1596
1596
|
if (!(typeof localStorage > "u"))
|
|
1597
1597
|
try {
|
|
1598
1598
|
const e = {
|
|
@@ -1607,41 +1607,41 @@ function ur(r) {
|
|
|
1607
1607
|
} catch {
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
|
-
const W = 20 * 1e3,
|
|
1611
|
-
function
|
|
1612
|
-
return
|
|
1610
|
+
const W = 20 * 1e3, hr = typeof SharedArrayBuffer < "u";
|
|
1611
|
+
function M(r, e) {
|
|
1612
|
+
return hr ? e !== void 0 ? new SharedArrayBuffer(r, { maxByteLength: e }) : new SharedArrayBuffer(r) : e !== void 0 ? new ArrayBuffer(r, { maxByteLength: e }) : new ArrayBuffer(r);
|
|
1613
1613
|
}
|
|
1614
1614
|
function Ge(r, e) {
|
|
1615
1615
|
const t = r;
|
|
1616
1616
|
typeof t.grow == "function" ? t.grow(e) : typeof t.resize == "function" && t.resize(e);
|
|
1617
1617
|
}
|
|
1618
|
-
function
|
|
1618
|
+
function dr(r, e) {
|
|
1619
1619
|
if (r.length !== e.length) return !1;
|
|
1620
1620
|
for (let t = 0; t < r.length; t++)
|
|
1621
1621
|
if (r[t] !== e[t]) return !1;
|
|
1622
1622
|
return !0;
|
|
1623
1623
|
}
|
|
1624
|
-
function
|
|
1624
|
+
function ze(r, e) {
|
|
1625
1625
|
switch (r) {
|
|
1626
|
-
case
|
|
1627
|
-
case
|
|
1626
|
+
case E.ADD_POINTS:
|
|
1627
|
+
case E.FILL_GAPS:
|
|
1628
1628
|
return !1;
|
|
1629
1629
|
default:
|
|
1630
1630
|
return !0;
|
|
1631
1631
|
}
|
|
1632
1632
|
}
|
|
1633
|
-
class
|
|
1633
|
+
class Gr {
|
|
1634
1634
|
/** The generated dataset to be used for plotting */
|
|
1635
1635
|
dataset = {
|
|
1636
1636
|
source: {
|
|
1637
1637
|
x: new Float64Array(
|
|
1638
|
-
|
|
1638
|
+
M(
|
|
1639
1639
|
W * Float64Array.BYTES_PER_ELEMENT,
|
|
1640
1640
|
W * Float64Array.BYTES_PER_ELEMENT
|
|
1641
1641
|
)
|
|
1642
1642
|
),
|
|
1643
1643
|
y: new Float32Array(
|
|
1644
|
-
|
|
1644
|
+
M(
|
|
1645
1645
|
W * Float32Array.BYTES_PER_ELEMENT,
|
|
1646
1646
|
W * Float32Array.BYTES_PER_ELEMENT
|
|
1647
1647
|
)
|
|
@@ -1716,10 +1716,10 @@ class Wr {
|
|
|
1716
1716
|
for (; t > n; )
|
|
1717
1717
|
n += W * Float64Array.BYTES_PER_ELEMENT;
|
|
1718
1718
|
if (n * Float64Array.BYTES_PER_ELEMENT > this.dataX.buffer.maxByteLength) {
|
|
1719
|
-
const o =
|
|
1719
|
+
const o = M(
|
|
1720
1720
|
this.dataX.buffer.byteLength,
|
|
1721
1721
|
n * Float64Array.BYTES_PER_ELEMENT
|
|
1722
|
-
), i =
|
|
1722
|
+
), i = M(
|
|
1723
1723
|
this.dataY.buffer.byteLength,
|
|
1724
1724
|
n * Float32Array.BYTES_PER_ELEMENT
|
|
1725
1725
|
), s = new Float64Array(o), a = new Float32Array(i);
|
|
@@ -1800,38 +1800,54 @@ class Wr {
|
|
|
1800
1800
|
*/
|
|
1801
1801
|
async dispatchAction(e, ...t) {
|
|
1802
1802
|
const n = {
|
|
1803
|
-
[
|
|
1804
|
-
[
|
|
1805
|
-
[
|
|
1806
|
-
[
|
|
1807
|
-
[
|
|
1808
|
-
[
|
|
1809
|
-
[
|
|
1810
|
-
[
|
|
1811
|
-
[
|
|
1803
|
+
[E.ADD_POINTS]: this._addDataPoints,
|
|
1804
|
+
[E.CHANGE_VALUES]: this._changeValues,
|
|
1805
|
+
[E.ASSIGN_VALUES_BULK]: this._assignValuesBulk,
|
|
1806
|
+
[E.DELETE_POINTS]: this._deleteDataPointsFromSelection,
|
|
1807
|
+
[E.DRIFT_CORRECTION]: this._driftCorrectionFromSelection,
|
|
1808
|
+
[E.INTERPOLATE]: this._interpolateFromSelection,
|
|
1809
|
+
[E.SHIFT_DATETIMES]: this._shiftFromSelection,
|
|
1810
|
+
[E.ASSIGN_DATETIMES_BULK]: this._assignDatetimesBulk,
|
|
1811
|
+
[E.FILL_GAPS]: this._fillGaps
|
|
1812
1812
|
};
|
|
1813
1813
|
let o = [], i = null;
|
|
1814
1814
|
try {
|
|
1815
|
-
this._isReplaying || (this.redoStack.length = 0)
|
|
1815
|
+
this._isReplaying || (this.redoStack.length = 0);
|
|
1816
|
+
const s = ze(e, t) && this.history[this.history.length - 1]?.method === A.SELECTION ? this.history[this.history.length - 1].selected?.length : void 0;
|
|
1817
|
+
i = {
|
|
1816
1818
|
method: e,
|
|
1817
1819
|
args: t,
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1820
|
+
execution: {
|
|
1821
|
+
startedAt: Date.now(),
|
|
1822
|
+
inFlight: !0,
|
|
1823
|
+
datasetSize: this.dataset.source.x?.length ?? 0,
|
|
1824
|
+
selectionSize: s
|
|
1825
|
+
}
|
|
1826
|
+
}, this.history.push(i), ze(e, t) || this.history[this.history.length - 2]?.method === A.SELECTION && this.history.splice(this.history.length - 2, 1), this._pendingExecutionMode = "inline";
|
|
1827
|
+
const a = await re(async () => await n[e].apply(this, t));
|
|
1828
|
+
o = a.response;
|
|
1829
|
+
const c = this.history.indexOf(i), d = c >= 0 ? this.history[c] : void 0;
|
|
1830
|
+
d && (d.execution = {
|
|
1831
|
+
...d.execution,
|
|
1832
|
+
status: "success",
|
|
1833
|
+
durationMs: a.duration,
|
|
1834
|
+
mode: this._pendingExecutionMode,
|
|
1835
|
+
inFlight: !1
|
|
1836
|
+
});
|
|
1825
1837
|
} catch {
|
|
1826
1838
|
if (i) {
|
|
1827
1839
|
const a = this.history.indexOf(i), c = a >= 0 ? this.history[a] : void 0;
|
|
1828
|
-
c && (c.
|
|
1840
|
+
c && (c.execution = {
|
|
1841
|
+
...c.execution,
|
|
1842
|
+
status: "failed",
|
|
1843
|
+
inFlight: !1
|
|
1844
|
+
});
|
|
1829
1845
|
}
|
|
1830
1846
|
}
|
|
1831
1847
|
return o;
|
|
1832
1848
|
}
|
|
1833
1849
|
async dispatch(e, ...t) {
|
|
1834
|
-
const n = async (o, i) =>
|
|
1850
|
+
const n = async (o, i) => A[o] ? await this.dispatchFilter(o, ...i) : await this.dispatchAction(o, ...i);
|
|
1835
1851
|
if (Array.isArray(e)) {
|
|
1836
1852
|
let o = [];
|
|
1837
1853
|
for (let i = 0; i < e.length; i++) {
|
|
@@ -1845,37 +1861,53 @@ class Wr {
|
|
|
1845
1861
|
/** Filter operations do not transform the data and return a selection */
|
|
1846
1862
|
async dispatchFilter(e, ...t) {
|
|
1847
1863
|
const n = {
|
|
1848
|
-
[
|
|
1849
|
-
[
|
|
1850
|
-
[
|
|
1851
|
-
[
|
|
1852
|
-
[
|
|
1853
|
-
[
|
|
1854
|
-
[
|
|
1864
|
+
[A.FIND_GAPS]: this._findGaps,
|
|
1865
|
+
[A.VALUE_THRESHOLD]: this._valueThreshold,
|
|
1866
|
+
[A.DATETIME_RANGE]: this._datetimeRange,
|
|
1867
|
+
[A.PERSISTENCE]: this._persistence,
|
|
1868
|
+
[A.CHANGE]: this._change,
|
|
1869
|
+
[A.RATE_OF_CHANGE]: this._rateOfChange,
|
|
1870
|
+
[A.SELECTION]: this._selection
|
|
1855
1871
|
};
|
|
1856
1872
|
let o = [], i = null;
|
|
1857
1873
|
try {
|
|
1858
|
-
const s = e ===
|
|
1874
|
+
const s = e === A.SELECTION, a = s && (!t[0] || Array.isArray(t[0]) && t[0].length === 0);
|
|
1859
1875
|
!this._isReplaying && !a && (this.redoStack.length = 0), i = {
|
|
1860
1876
|
method: e,
|
|
1861
1877
|
args: t,
|
|
1862
|
-
|
|
1863
|
-
|
|
1878
|
+
execution: {
|
|
1879
|
+
startedAt: Date.now(),
|
|
1880
|
+
inFlight: !0,
|
|
1881
|
+
datasetSize: this.dataset.source.x?.length ?? 0
|
|
1882
|
+
// `selectionSize` fills in at resolve time from the filter's
|
|
1883
|
+
// produced selection — leave it `undefined` here.
|
|
1884
|
+
}
|
|
1864
1885
|
};
|
|
1865
|
-
const c = this.history[this.history.length - 1],
|
|
1866
|
-
let
|
|
1867
|
-
f ? (
|
|
1868
|
-
const
|
|
1869
|
-
o =
|
|
1870
|
-
const
|
|
1871
|
-
y && (y.
|
|
1886
|
+
const c = this.history[this.history.length - 1], d = !!A[c?.method], f = c?.method === e || d && !s;
|
|
1887
|
+
let m;
|
|
1888
|
+
f ? (m = this.history.length - 1, this.history[m] = i) : (this.history.push(i), m = this.history.length - 1), this._pendingExecutionMode = "inline";
|
|
1889
|
+
const w = await re(async () => await n[e].apply(this, t));
|
|
1890
|
+
o = w.response;
|
|
1891
|
+
const p = this.history.indexOf(i), y = p >= 0 ? this.history[p] : void 0;
|
|
1892
|
+
y && (y.selected = w.response, y.execution = {
|
|
1893
|
+
...y.execution,
|
|
1894
|
+
status: "success",
|
|
1895
|
+
durationMs: w.duration,
|
|
1896
|
+
mode: this._pendingExecutionMode,
|
|
1897
|
+
selectionSize: w.response?.length,
|
|
1898
|
+
inFlight: !1
|
|
1899
|
+
});
|
|
1872
1900
|
} catch (s) {
|
|
1873
1901
|
if (console.log(
|
|
1874
1902
|
`Failed to execute filter operation: ${e} with arguments: `,
|
|
1875
1903
|
t
|
|
1876
1904
|
), console.log(s), i) {
|
|
1877
1905
|
const a = this.history.indexOf(i), c = a >= 0 ? this.history[a] : void 0;
|
|
1878
|
-
c && (c.
|
|
1906
|
+
c && (c.execution = {
|
|
1907
|
+
...c.execution,
|
|
1908
|
+
status: "failed",
|
|
1909
|
+
inFlight: !1
|
|
1910
|
+
});
|
|
1879
1911
|
}
|
|
1880
1912
|
}
|
|
1881
1913
|
return o;
|
|
@@ -1890,23 +1922,23 @@ class Wr {
|
|
|
1890
1922
|
const n = this.history[this.history.length - 2]?.selected;
|
|
1891
1923
|
if (!n || n.length === 0) return [];
|
|
1892
1924
|
const o = n.length;
|
|
1893
|
-
if (!U(
|
|
1925
|
+
if (!U(E.CHANGE_VALUES, {
|
|
1894
1926
|
datasetSize: this.dataset.source.y.length,
|
|
1895
1927
|
selectionSize: o
|
|
1896
1928
|
}).useWorker)
|
|
1897
1929
|
return Ye(this.dataY, n, e, t), [];
|
|
1898
1930
|
this._pendingExecutionMode = "worker";
|
|
1899
|
-
const s = Math.min(navigator.hardwareConcurrency || 1, o), a = Math.ceil(o / s), c = [],
|
|
1931
|
+
const s = Math.min(navigator.hardwareConcurrency || 1, o), a = Math.ceil(o / s), c = [], d = [];
|
|
1900
1932
|
for (let f = 0; f < s; f++) {
|
|
1901
|
-
const
|
|
1902
|
-
if (
|
|
1903
|
-
const
|
|
1904
|
-
|
|
1933
|
+
const m = f * a, w = Math.min((f + 1) * a, o);
|
|
1934
|
+
if (m >= w) break;
|
|
1935
|
+
const p = n.slice(m, w);
|
|
1936
|
+
d.push(
|
|
1905
1937
|
new Promise((y) => {
|
|
1906
|
-
const l = new
|
|
1938
|
+
const l = new qt();
|
|
1907
1939
|
c.push(l), l.postMessage({
|
|
1908
1940
|
bufferY: this.dataY.buffer,
|
|
1909
|
-
indexes:
|
|
1941
|
+
indexes: p,
|
|
1910
1942
|
operator: e,
|
|
1911
1943
|
value: t
|
|
1912
1944
|
}), l.onmessage = (u) => {
|
|
@@ -1915,7 +1947,7 @@ class Wr {
|
|
|
1915
1947
|
})
|
|
1916
1948
|
);
|
|
1917
1949
|
}
|
|
1918
|
-
return await Promise.all(
|
|
1950
|
+
return await Promise.all(d), c.forEach((f) => f.terminate()), [];
|
|
1919
1951
|
}
|
|
1920
1952
|
/**
|
|
1921
1953
|
* Apply an arithmetic operator to Y in-place on the main thread. Thin
|
|
@@ -1988,38 +2020,38 @@ class Wr {
|
|
|
1988
2020
|
lowerIdx: Math.max(0, f[0] - 1),
|
|
1989
2021
|
upperIdx: Math.min(n - 1, f[f.length - 1] + 1)
|
|
1990
2022
|
}));
|
|
1991
|
-
if (!U(
|
|
2023
|
+
if (!U(E.INTERPOLATE, {
|
|
1992
2024
|
datasetSize: n,
|
|
1993
2025
|
selectionSize: e.length
|
|
1994
2026
|
}).useWorker) {
|
|
1995
|
-
|
|
2027
|
+
sr(this.dataX, this.dataY, o);
|
|
1996
2028
|
return;
|
|
1997
2029
|
}
|
|
1998
2030
|
this._pendingExecutionMode = "worker";
|
|
1999
2031
|
const s = Math.min(
|
|
2000
2032
|
navigator.hardwareConcurrency || 1,
|
|
2001
2033
|
o.length
|
|
2002
|
-
), a = Math.ceil(o.length / s), c = [],
|
|
2034
|
+
), a = Math.ceil(o.length / s), c = [], d = [];
|
|
2003
2035
|
for (let f = 0; f < s; f++) {
|
|
2004
|
-
const
|
|
2036
|
+
const m = o.slice(
|
|
2005
2037
|
f * a,
|
|
2006
2038
|
(f + 1) * a
|
|
2007
2039
|
);
|
|
2008
|
-
if (
|
|
2009
|
-
|
|
2010
|
-
new Promise((
|
|
2011
|
-
const
|
|
2012
|
-
c.push(
|
|
2040
|
+
if (m.length === 0) break;
|
|
2041
|
+
d.push(
|
|
2042
|
+
new Promise((w) => {
|
|
2043
|
+
const p = new Wt();
|
|
2044
|
+
c.push(p), p.postMessage({
|
|
2013
2045
|
bufferX: this.dataX.buffer,
|
|
2014
2046
|
bufferY: this.dataY.buffer,
|
|
2015
|
-
groups:
|
|
2016
|
-
}),
|
|
2017
|
-
|
|
2047
|
+
groups: m
|
|
2048
|
+
}), p.onmessage = (y) => {
|
|
2049
|
+
w(y.data);
|
|
2018
2050
|
};
|
|
2019
2051
|
})
|
|
2020
2052
|
);
|
|
2021
2053
|
}
|
|
2022
|
-
await Promise.all(
|
|
2054
|
+
await Promise.all(d), c.forEach((f) => f.terminate());
|
|
2023
2055
|
}
|
|
2024
2056
|
/**
|
|
2025
2057
|
* Dispatch wrapper around `_shift` — reads target indices from
|
|
@@ -2040,11 +2072,11 @@ class Wr {
|
|
|
2040
2072
|
async _shift(e, t, n) {
|
|
2041
2073
|
if (e.length === 0) return [];
|
|
2042
2074
|
const o = n === N.MONTH, i = n === N.YEAR, s = !o && !i ? t * G[n] * 1e3 : 0, a = e.length;
|
|
2043
|
-
if (!U(
|
|
2075
|
+
if (!U(E.SHIFT_DATETIMES, {
|
|
2044
2076
|
datasetSize: this.dataset.source.x.length,
|
|
2045
2077
|
selectionSize: a
|
|
2046
2078
|
}).useWorker) {
|
|
2047
|
-
const h =
|
|
2079
|
+
const h = nr(
|
|
2048
2080
|
this.dataX,
|
|
2049
2081
|
this.dataY,
|
|
2050
2082
|
e,
|
|
@@ -2053,18 +2085,18 @@ class Wr {
|
|
|
2053
2085
|
return await this._deleteDataPoints(e), await this._addDataPoints(h) ?? [];
|
|
2054
2086
|
}
|
|
2055
2087
|
this._pendingExecutionMode = "worker";
|
|
2056
|
-
const
|
|
2057
|
-
for (let h = 0; h <
|
|
2058
|
-
const b = h *
|
|
2059
|
-
if (b >=
|
|
2060
|
-
const k = e.slice(b,
|
|
2088
|
+
const d = M(a * Float64Array.BYTES_PER_ELEMENT), f = M(a * Float32Array.BYTES_PER_ELEMENT), m = Math.min(navigator.hardwareConcurrency || 1, a), w = Math.ceil(a / m), p = [], y = [];
|
|
2089
|
+
for (let h = 0; h < m; h++) {
|
|
2090
|
+
const b = h * w, S = Math.min((h + 1) * w, a);
|
|
2091
|
+
if (b >= S) break;
|
|
2092
|
+
const k = e.slice(b, S);
|
|
2061
2093
|
y.push(
|
|
2062
|
-
new Promise((
|
|
2063
|
-
const _ = new
|
|
2064
|
-
|
|
2094
|
+
new Promise((L) => {
|
|
2095
|
+
const _ = new zt();
|
|
2096
|
+
p.push(_), _.postMessage({
|
|
2065
2097
|
bufferX: this.dataX.buffer,
|
|
2066
2098
|
bufferY: this.dataY.buffer,
|
|
2067
|
-
outputBufferX:
|
|
2099
|
+
outputBufferX: d,
|
|
2068
2100
|
outputBufferY: f,
|
|
2069
2101
|
indexes: k,
|
|
2070
2102
|
outStart: b,
|
|
@@ -2073,13 +2105,13 @@ class Wr {
|
|
|
2073
2105
|
isYear: i,
|
|
2074
2106
|
deltaMs: s
|
|
2075
2107
|
}), _.onmessage = (T) => {
|
|
2076
|
-
|
|
2108
|
+
L(T.data);
|
|
2077
2109
|
};
|
|
2078
2110
|
})
|
|
2079
2111
|
);
|
|
2080
2112
|
}
|
|
2081
|
-
await Promise.all(y),
|
|
2082
|
-
const l = new Float64Array(
|
|
2113
|
+
await Promise.all(y), p.forEach((h) => h.terminate());
|
|
2114
|
+
const l = new Float64Array(d), u = new Float32Array(f), g = new Array(a);
|
|
2083
2115
|
for (let h = 0; h < a; h++)
|
|
2084
2116
|
g[h] = [l[h], u[h]];
|
|
2085
2117
|
return await this._deleteDataPoints(e), await this._addDataPoints(g) ?? [];
|
|
@@ -2103,88 +2135,88 @@ class Wr {
|
|
|
2103
2135
|
async _fillGaps(e, t, n, o, i) {
|
|
2104
2136
|
const s = this.dataX.length;
|
|
2105
2137
|
if (s === 0) return [];
|
|
2106
|
-
const a = e[0] * G[e[1]] * 1e3, c = t[0] * G[t[1]] * 1e3,
|
|
2138
|
+
const a = e[0] * G[e[1]] * 1e3, c = t[0] * G[t[1]] * 1e3, d = this.dataX, f = i?.[0] != null && Number.isFinite(i[0]) ? D(d, i[0]) : 0, m = i?.[1] != null && Number.isFinite(i[1]) ? C(d, i[1]) : s - 1, w = [], p = [];
|
|
2107
2139
|
let y = 0;
|
|
2108
|
-
for (let v = f + 1; v <=
|
|
2109
|
-
if (
|
|
2110
|
-
let
|
|
2111
|
-
for (; O <
|
|
2112
|
-
|
|
2113
|
-
|
|
2140
|
+
for (let v = f + 1; v <= m; v++)
|
|
2141
|
+
if (d[v] - d[v - 1] > a) {
|
|
2142
|
+
let I = 0, O = d[v - 1] + c;
|
|
2143
|
+
for (; O < d[v]; )
|
|
2144
|
+
I++, O += c;
|
|
2145
|
+
I > 0 && (w.push([v - 1, v]), p.push(I), y += I);
|
|
2114
2146
|
}
|
|
2115
2147
|
if (y === 0) return [];
|
|
2116
2148
|
const l = new Array(y);
|
|
2117
2149
|
let u = 0, g = 0;
|
|
2118
|
-
for (let v = 0; v <
|
|
2119
|
-
const
|
|
2120
|
-
for (let O = 1; O <=
|
|
2121
|
-
l[g++] =
|
|
2122
|
-
u +=
|
|
2150
|
+
for (let v = 0; v < w.length; v++) {
|
|
2151
|
+
const x = w[v][0], I = p[v];
|
|
2152
|
+
for (let O = 1; O <= I; O++)
|
|
2153
|
+
l[g++] = x + u + O;
|
|
2154
|
+
u += I;
|
|
2123
2155
|
}
|
|
2124
|
-
const h = s + y, b = h * Float64Array.BYTES_PER_ELEMENT,
|
|
2156
|
+
const h = s + y, b = h * Float64Array.BYTES_PER_ELEMENT, S = h * Float32Array.BYTES_PER_ELEMENT, k = M(
|
|
2125
2157
|
b,
|
|
2126
2158
|
Math.max(this.dataX.buffer.maxByteLength, b)
|
|
2127
|
-
),
|
|
2128
|
-
|
|
2129
|
-
Math.max(this.dataY.buffer.maxByteLength,
|
|
2159
|
+
), L = M(
|
|
2160
|
+
S,
|
|
2161
|
+
Math.max(this.dataY.buffer.maxByteLength, S)
|
|
2130
2162
|
);
|
|
2131
|
-
if (!U(
|
|
2163
|
+
if (!U(E.FILL_GAPS, {
|
|
2132
2164
|
datasetSize: s,
|
|
2133
2165
|
selectionSize: y
|
|
2134
2166
|
}).useWorker) {
|
|
2135
|
-
const v = new Float64Array(k),
|
|
2136
|
-
return
|
|
2167
|
+
const v = new Float64Array(k), x = new Float32Array(L);
|
|
2168
|
+
return er(
|
|
2137
2169
|
this.dataX,
|
|
2138
2170
|
this.dataY,
|
|
2139
|
-
|
|
2171
|
+
w,
|
|
2140
2172
|
v,
|
|
2141
|
-
|
|
2173
|
+
x,
|
|
2142
2174
|
0,
|
|
2143
2175
|
s - 1,
|
|
2144
2176
|
0,
|
|
2145
2177
|
c,
|
|
2146
2178
|
n,
|
|
2147
2179
|
o
|
|
2148
|
-
), this.dataset.source.x = v, this.dataset.source.y =
|
|
2180
|
+
), this.dataset.source.x = v, this.dataset.source.y = x, this._resizeTo(h), l;
|
|
2149
2181
|
}
|
|
2150
2182
|
this._pendingExecutionMode = "worker";
|
|
2151
2183
|
const T = navigator.hardwareConcurrency || 1, be = Math.ceil(s / T), Z = [];
|
|
2152
2184
|
let P = 0;
|
|
2153
2185
|
for (let v = 0; v < T; v++) {
|
|
2154
|
-
const
|
|
2186
|
+
const x = v * be, I = Math.min((v + 1) * be - 1, s - 1), O = [];
|
|
2155
2187
|
let Y = 0;
|
|
2156
|
-
for (; P <
|
|
2157
|
-
O.push(
|
|
2158
|
-
Z.push({ start:
|
|
2188
|
+
for (; P < w.length && w[P][0] <= I; )
|
|
2189
|
+
O.push(w[P]), Y += p[P], P++;
|
|
2190
|
+
Z.push({ start: x, end: I, gapsSegment: O, fillsInSegment: Y });
|
|
2159
2191
|
}
|
|
2160
2192
|
const ee = new Array(T).fill(0);
|
|
2161
2193
|
for (let v = 1; v < T; v++)
|
|
2162
2194
|
ee[v] = ee[v - 1] + Z[v - 1].fillsInSegment;
|
|
2163
|
-
const
|
|
2195
|
+
const Se = [], Ee = [];
|
|
2164
2196
|
for (let v = 0; v < T; v++) {
|
|
2165
|
-
const { start:
|
|
2166
|
-
|
|
2167
|
-
new Promise((
|
|
2168
|
-
const te = new
|
|
2169
|
-
|
|
2197
|
+
const { start: x, end: I, gapsSegment: O } = Z[v], Y = x + ee[v];
|
|
2198
|
+
Ee.push(
|
|
2199
|
+
new Promise((pt) => {
|
|
2200
|
+
const te = new jt();
|
|
2201
|
+
Se.push(te), te.postMessage({
|
|
2170
2202
|
bufferX: this.dataX.buffer,
|
|
2171
2203
|
bufferY: this.dataY.buffer,
|
|
2172
2204
|
outputBufferX: k,
|
|
2173
|
-
outputBufferY:
|
|
2174
|
-
start:
|
|
2175
|
-
end:
|
|
2205
|
+
outputBufferY: L,
|
|
2206
|
+
start: x,
|
|
2207
|
+
end: I,
|
|
2176
2208
|
gapsSegment: O,
|
|
2177
2209
|
startTarget: Y,
|
|
2178
2210
|
fillDelta: c,
|
|
2179
2211
|
interpolate: n,
|
|
2180
2212
|
fillValue: o
|
|
2181
|
-
}), te.onmessage = (
|
|
2182
|
-
|
|
2213
|
+
}), te.onmessage = (wt) => {
|
|
2214
|
+
pt(wt.data);
|
|
2183
2215
|
};
|
|
2184
2216
|
})
|
|
2185
2217
|
);
|
|
2186
2218
|
}
|
|
2187
|
-
return await Promise.all(
|
|
2219
|
+
return await Promise.all(Ee), Se.forEach((v) => v.terminate()), this.dataset.source.x = new Float64Array(k), this.dataset.source.y = new Float32Array(L), this._resizeTo(h), l;
|
|
2188
2220
|
}
|
|
2189
2221
|
/**
|
|
2190
2222
|
* Dispatch wrapper around `_deleteDataPoints` — reads target
|
|
@@ -2208,18 +2240,18 @@ class Wr {
|
|
|
2208
2240
|
*/
|
|
2209
2241
|
async _deleteDataPoints(e) {
|
|
2210
2242
|
const t = this.dataX.length, n = t - e.length;
|
|
2211
|
-
if (!U(
|
|
2243
|
+
if (!U(E.DELETE_POINTS, {
|
|
2212
2244
|
datasetSize: t,
|
|
2213
2245
|
selectionSize: e.length
|
|
2214
2246
|
}).useWorker) {
|
|
2215
|
-
const
|
|
2247
|
+
const p = M(
|
|
2216
2248
|
this.dataX.buffer.byteLength,
|
|
2217
2249
|
this.dataX.buffer.maxByteLength
|
|
2218
|
-
), y =
|
|
2250
|
+
), y = M(
|
|
2219
2251
|
this.dataY.buffer.byteLength,
|
|
2220
2252
|
this.dataY.buffer.maxByteLength
|
|
2221
|
-
), l = new Float64Array(
|
|
2222
|
-
|
|
2253
|
+
), l = new Float64Array(p), u = new Float32Array(y);
|
|
2254
|
+
rr(
|
|
2223
2255
|
this.dataX,
|
|
2224
2256
|
this.dataY,
|
|
2225
2257
|
e,
|
|
@@ -2233,41 +2265,41 @@ class Wr {
|
|
|
2233
2265
|
}
|
|
2234
2266
|
this._pendingExecutionMode = "worker";
|
|
2235
2267
|
const i = navigator.hardwareConcurrency || 1, s = Math.ceil(this.dataX.length / i), a = [], c = [];
|
|
2236
|
-
for (let
|
|
2237
|
-
const y =
|
|
2268
|
+
for (let p = 0; p < i; p++) {
|
|
2269
|
+
const y = p * s, l = Math.min((p + 1) * s - 1, this.dataX.length - 1), u = D(e, y), g = C(e, l), h = e.slice(u, g + 1);
|
|
2238
2270
|
c.push({ start: y, end: l, deleteSegment: h });
|
|
2239
2271
|
}
|
|
2240
|
-
const
|
|
2241
|
-
for (let
|
|
2242
|
-
p
|
|
2243
|
-
const f = [],
|
|
2272
|
+
const d = new Array(i).fill(0);
|
|
2273
|
+
for (let p = 1; p < i; p++)
|
|
2274
|
+
d[p] = d[p - 1] + c[p - 1].deleteSegment.length;
|
|
2275
|
+
const f = [], m = M(
|
|
2244
2276
|
this.dataX.buffer.byteLength,
|
|
2245
2277
|
this.dataX.buffer.maxByteLength
|
|
2246
|
-
),
|
|
2278
|
+
), w = M(
|
|
2247
2279
|
this.dataY.buffer.byteLength,
|
|
2248
2280
|
this.dataY.buffer.maxByteLength
|
|
2249
2281
|
);
|
|
2250
|
-
for (let
|
|
2251
|
-
const { start: y, end: l, deleteSegment: u } = c[
|
|
2282
|
+
for (let p = 0; p < i; p++) {
|
|
2283
|
+
const { start: y, end: l, deleteSegment: u } = c[p], g = y - d[p];
|
|
2252
2284
|
f.push(
|
|
2253
2285
|
new Promise((h) => {
|
|
2254
|
-
const b = new
|
|
2286
|
+
const b = new Pt();
|
|
2255
2287
|
a.push(b), b.postMessage({
|
|
2256
2288
|
bufferX: this.dataX.buffer,
|
|
2257
2289
|
bufferY: this.dataY.buffer,
|
|
2258
|
-
outputBufferX:
|
|
2259
|
-
outputBufferY:
|
|
2290
|
+
outputBufferX: m,
|
|
2291
|
+
outputBufferY: w,
|
|
2260
2292
|
start: y,
|
|
2261
2293
|
end: l,
|
|
2262
2294
|
deleteSegment: u,
|
|
2263
2295
|
startTarget: g
|
|
2264
|
-
}), b.onmessage = (
|
|
2265
|
-
h(
|
|
2296
|
+
}), b.onmessage = (S) => {
|
|
2297
|
+
h(S.data);
|
|
2266
2298
|
};
|
|
2267
2299
|
})
|
|
2268
2300
|
);
|
|
2269
2301
|
}
|
|
2270
|
-
await Promise.all(f), a.forEach((
|
|
2302
|
+
await Promise.all(f), a.forEach((p) => p.terminate()), this.dataset.source.x = new Float64Array(m), this.dataset.source.y = new Float32Array(w), this._resizeTo(n);
|
|
2271
2303
|
}
|
|
2272
2304
|
/**
|
|
2273
2305
|
* Dispatch wrapper around `_driftCorrection` — reads target
|
|
@@ -2298,28 +2330,28 @@ class Wr {
|
|
|
2298
2330
|
if (!e || e.length === 0) return;
|
|
2299
2331
|
const t = this.dataset.source.x, n = navigator.hardwareConcurrency || 1;
|
|
2300
2332
|
let o = 0;
|
|
2301
|
-
for (const [
|
|
2302
|
-
|
|
2303
|
-
if (!U(
|
|
2333
|
+
for (const [m, w] of e)
|
|
2334
|
+
w > m && (o += w - m);
|
|
2335
|
+
if (!U(E.DRIFT_CORRECTION, {
|
|
2304
2336
|
datasetSize: t.length,
|
|
2305
2337
|
selectionSize: o
|
|
2306
2338
|
}).useWorker) {
|
|
2307
|
-
|
|
2339
|
+
or(t, this.dataY, e);
|
|
2308
2340
|
return;
|
|
2309
2341
|
}
|
|
2310
2342
|
this._pendingExecutionMode = "worker";
|
|
2311
2343
|
const s = [];
|
|
2312
|
-
for (const [
|
|
2313
|
-
if (
|
|
2314
|
-
const y = t[
|
|
2344
|
+
for (const [m, w, p] of e) {
|
|
2345
|
+
if (w <= m) continue;
|
|
2346
|
+
const y = t[m], l = t[w] - y;
|
|
2315
2347
|
if (l === 0) continue;
|
|
2316
|
-
const u =
|
|
2317
|
-
for (let h =
|
|
2348
|
+
const u = w - m, g = Math.max(1, Math.ceil(u / n));
|
|
2349
|
+
for (let h = m; h < w; h += g)
|
|
2318
2350
|
s.push({
|
|
2319
2351
|
chunkStart: h,
|
|
2320
|
-
chunkEnd: Math.min(h + g,
|
|
2352
|
+
chunkEnd: Math.min(h + g, w),
|
|
2321
2353
|
startDatetime: y,
|
|
2322
|
-
value:
|
|
2354
|
+
value: p,
|
|
2323
2355
|
extent: l
|
|
2324
2356
|
});
|
|
2325
2357
|
}
|
|
@@ -2328,22 +2360,22 @@ class Wr {
|
|
|
2328
2360
|
{ length: a },
|
|
2329
2361
|
() => []
|
|
2330
2362
|
);
|
|
2331
|
-
s.forEach((
|
|
2332
|
-
const
|
|
2333
|
-
for (const
|
|
2334
|
-
|
|
2335
|
-
new Promise((
|
|
2336
|
-
const
|
|
2337
|
-
|
|
2363
|
+
s.forEach((m, w) => c[w % a].push(m));
|
|
2364
|
+
const d = [], f = [];
|
|
2365
|
+
for (const m of c)
|
|
2366
|
+
m.length !== 0 && f.push(
|
|
2367
|
+
new Promise((w) => {
|
|
2368
|
+
const p = new Yt();
|
|
2369
|
+
d.push(p), p.postMessage({
|
|
2338
2370
|
bufferX: this.dataX.buffer,
|
|
2339
2371
|
bufferY: this.dataY.buffer,
|
|
2340
|
-
jobs:
|
|
2341
|
-
}),
|
|
2342
|
-
|
|
2372
|
+
jobs: m
|
|
2373
|
+
}), p.onmessage = (y) => {
|
|
2374
|
+
w(y.data);
|
|
2343
2375
|
};
|
|
2344
2376
|
})
|
|
2345
2377
|
);
|
|
2346
|
-
await Promise.all(f),
|
|
2378
|
+
await Promise.all(f), d.forEach((m) => m.terminate());
|
|
2347
2379
|
}
|
|
2348
2380
|
/** Traverses the index array and returns groups of consecutive values.
|
|
2349
2381
|
* i.e.: `[0, 1, 3, 4, 6] => [[0, 1], [3, 4], [6]]`
|
|
@@ -2373,19 +2405,19 @@ class Wr {
|
|
|
2373
2405
|
const u = e[l][0], g = C(this.dataX, u) + 1;
|
|
2374
2406
|
o[l] = g + l;
|
|
2375
2407
|
}
|
|
2376
|
-
const i = n * Float64Array.BYTES_PER_ELEMENT, s = n * Float32Array.BYTES_PER_ELEMENT, a =
|
|
2408
|
+
const i = n * Float64Array.BYTES_PER_ELEMENT, s = n * Float32Array.BYTES_PER_ELEMENT, a = M(
|
|
2377
2409
|
i,
|
|
2378
2410
|
Math.max(this.dataX.buffer.maxByteLength, i)
|
|
2379
|
-
), c =
|
|
2411
|
+
), c = M(
|
|
2380
2412
|
s,
|
|
2381
2413
|
Math.max(this.dataY.buffer.maxByteLength, s)
|
|
2382
2414
|
);
|
|
2383
|
-
if (!U(
|
|
2415
|
+
if (!U(E.ADD_POINTS, {
|
|
2384
2416
|
datasetSize: t,
|
|
2385
2417
|
selectionSize: e.length
|
|
2386
2418
|
}).useWorker) {
|
|
2387
2419
|
const l = new Float64Array(a), u = new Float32Array(c);
|
|
2388
|
-
return
|
|
2420
|
+
return tr(
|
|
2389
2421
|
this.dataX,
|
|
2390
2422
|
this.dataY,
|
|
2391
2423
|
e,
|
|
@@ -2399,31 +2431,31 @@ class Wr {
|
|
|
2399
2431
|
this._pendingExecutionMode = "worker";
|
|
2400
2432
|
const f = e.map(
|
|
2401
2433
|
(l) => C(this.dataX, l[0]) + 1
|
|
2402
|
-
),
|
|
2434
|
+
), m = Math.max(
|
|
2403
2435
|
1,
|
|
2404
2436
|
Math.min(navigator.hardwareConcurrency || 1, Math.max(t, 1))
|
|
2405
|
-
),
|
|
2406
|
-
for (let l = 0; l <
|
|
2407
|
-
const u = l *
|
|
2408
|
-
u >= g &&
|
|
2409
|
-
new Promise((
|
|
2410
|
-
const _ = new
|
|
2411
|
-
|
|
2437
|
+
), w = Math.ceil(Math.max(t, 1) / m), p = [], y = [];
|
|
2438
|
+
for (let l = 0; l < m; l++) {
|
|
2439
|
+
const u = l * w, g = Math.min((l + 1) * w, t), h = D(f, u), b = l === m - 1 ? e.length : D(f, g), S = e.slice(h, b), k = u + h;
|
|
2440
|
+
u >= g && S.length === 0 || y.push(
|
|
2441
|
+
new Promise((L) => {
|
|
2442
|
+
const _ = new Gt();
|
|
2443
|
+
p.push(_), _.postMessage({
|
|
2412
2444
|
bufferX: this.dataX.buffer,
|
|
2413
2445
|
bufferY: this.dataY.buffer,
|
|
2414
2446
|
outputBufferX: a,
|
|
2415
2447
|
outputBufferY: c,
|
|
2416
2448
|
origStart: u,
|
|
2417
2449
|
origEnd: g,
|
|
2418
|
-
insertions:
|
|
2450
|
+
insertions: S,
|
|
2419
2451
|
outStart: k
|
|
2420
2452
|
}), _.onmessage = (T) => {
|
|
2421
|
-
|
|
2453
|
+
L(T.data);
|
|
2422
2454
|
};
|
|
2423
2455
|
})
|
|
2424
2456
|
);
|
|
2425
2457
|
}
|
|
2426
|
-
return await Promise.all(y),
|
|
2458
|
+
return await Promise.all(y), p.forEach((l) => l.terminate()), this.dataset.source.x = new Float64Array(a), this.dataset.source.y = new Float32Array(c), this._resizeTo(n), o;
|
|
2427
2459
|
}
|
|
2428
2460
|
// =======================
|
|
2429
2461
|
// FILTER OPERATIONS
|
|
@@ -2446,34 +2478,34 @@ class Wr {
|
|
|
2446
2478
|
[B.GTE]: 3,
|
|
2447
2479
|
[B.E]: 4
|
|
2448
2480
|
}, i = n.map((b) => o[b] ?? 4), s = n.map((b) => e[b]), a = this.dataset.source.y, c = this.dataset.source.x;
|
|
2449
|
-
let
|
|
2481
|
+
let d = 0, f = a.length;
|
|
2450
2482
|
if (f === 0) return [];
|
|
2451
2483
|
if (t != null) {
|
|
2452
|
-
const [b,
|
|
2453
|
-
b != null && Number.isFinite(b) && (
|
|
2484
|
+
const [b, S] = t;
|
|
2485
|
+
b != null && Number.isFinite(b) && (d = D(c, b)), S != null && Number.isFinite(S) && (f = C(c, S) + 1);
|
|
2454
2486
|
}
|
|
2455
|
-
if (f <=
|
|
2456
|
-
const
|
|
2457
|
-
if (!U(
|
|
2458
|
-
datasetSize:
|
|
2487
|
+
if (f <= d) return [];
|
|
2488
|
+
const m = f - d;
|
|
2489
|
+
if (!U(A.VALUE_THRESHOLD, {
|
|
2490
|
+
datasetSize: m
|
|
2459
2491
|
}).useWorker)
|
|
2460
|
-
return
|
|
2492
|
+
return dt(a, d, f, i, s);
|
|
2461
2493
|
this._pendingExecutionMode = "worker";
|
|
2462
|
-
const
|
|
2463
|
-
for (let b = 0; b <
|
|
2464
|
-
const
|
|
2465
|
-
if (
|
|
2494
|
+
const p = Math.min(navigator.hardwareConcurrency || 1, m), y = Math.ceil(m / p), l = [], u = [];
|
|
2495
|
+
for (let b = 0; b < p; b++) {
|
|
2496
|
+
const S = d + b * y, k = Math.min(d + (b + 1) * y, f);
|
|
2497
|
+
if (S >= k) break;
|
|
2466
2498
|
u.push(
|
|
2467
|
-
new Promise((
|
|
2499
|
+
new Promise((L) => {
|
|
2468
2500
|
const _ = new he();
|
|
2469
2501
|
l.push(_), _.postMessage({
|
|
2470
2502
|
bufferY: this.dataY.buffer,
|
|
2471
|
-
start:
|
|
2503
|
+
start: S,
|
|
2472
2504
|
end: k,
|
|
2473
2505
|
ops: i,
|
|
2474
2506
|
values: s
|
|
2475
2507
|
}), _.onmessage = (T) => {
|
|
2476
|
-
|
|
2508
|
+
L(T.data);
|
|
2477
2509
|
};
|
|
2478
2510
|
})
|
|
2479
2511
|
);
|
|
@@ -2482,8 +2514,8 @@ class Wr {
|
|
|
2482
2514
|
l.forEach((b) => b.terminate());
|
|
2483
2515
|
const h = [];
|
|
2484
2516
|
for (let b = 0; b < g.length; b++) {
|
|
2485
|
-
const
|
|
2486
|
-
for (let k = 0; k <
|
|
2517
|
+
const S = g[b];
|
|
2518
|
+
for (let k = 0; k < S.length; k++) h.push(S[k]);
|
|
2487
2519
|
}
|
|
2488
2520
|
return h;
|
|
2489
2521
|
}
|
|
@@ -2499,36 +2531,36 @@ class Wr {
|
|
|
2499
2531
|
let s = 1, a = o.length;
|
|
2500
2532
|
if (n != null) {
|
|
2501
2533
|
const [u, g] = n;
|
|
2502
|
-
u != null && Number.isFinite(u) && (s = Math.max(1,
|
|
2534
|
+
u != null && Number.isFinite(u) && (s = Math.max(1, D(i, u))), g != null && Number.isFinite(g) && (a = C(i, g) + 1);
|
|
2503
2535
|
}
|
|
2504
2536
|
if (a <= s) return [];
|
|
2505
2537
|
const c = a - s;
|
|
2506
|
-
if (!U(
|
|
2538
|
+
if (!U(A.RATE_OF_CHANGE, {
|
|
2507
2539
|
datasetSize: o.length
|
|
2508
2540
|
}).useWorker)
|
|
2509
|
-
return
|
|
2541
|
+
return Kt(o, s, a, e, t);
|
|
2510
2542
|
this._pendingExecutionMode = "worker";
|
|
2511
|
-
const f = Math.min(navigator.hardwareConcurrency || 1, c),
|
|
2543
|
+
const f = Math.min(navigator.hardwareConcurrency || 1, c), m = Math.ceil(c / f), w = [], p = [];
|
|
2512
2544
|
for (let u = 0; u < f; u++) {
|
|
2513
|
-
const g = s + u *
|
|
2545
|
+
const g = s + u * m, h = Math.min(s + (u + 1) * m, a);
|
|
2514
2546
|
if (g >= h) break;
|
|
2515
|
-
|
|
2547
|
+
p.push(
|
|
2516
2548
|
new Promise((b) => {
|
|
2517
|
-
const
|
|
2518
|
-
|
|
2549
|
+
const S = new Vt();
|
|
2550
|
+
w.push(S), S.postMessage({
|
|
2519
2551
|
bufferY: this.dataY.buffer,
|
|
2520
2552
|
start: g,
|
|
2521
2553
|
end: h,
|
|
2522
2554
|
comparator: e,
|
|
2523
2555
|
value: t
|
|
2524
|
-
}),
|
|
2556
|
+
}), S.onmessage = (k) => {
|
|
2525
2557
|
b(k.data);
|
|
2526
2558
|
};
|
|
2527
2559
|
})
|
|
2528
2560
|
);
|
|
2529
2561
|
}
|
|
2530
|
-
const y = await Promise.all(
|
|
2531
|
-
|
|
2562
|
+
const y = await Promise.all(p);
|
|
2563
|
+
w.forEach((u) => u.terminate());
|
|
2532
2564
|
const l = [];
|
|
2533
2565
|
for (let u = 0; u < y.length; u++) {
|
|
2534
2566
|
const g = y[u];
|
|
@@ -2545,7 +2577,7 @@ class Wr {
|
|
|
2545
2577
|
async _datetimeRange(e, t) {
|
|
2546
2578
|
const n = this.dataset.source.x, o = n.length;
|
|
2547
2579
|
if (o === 0) return [];
|
|
2548
|
-
const i = e == null ? 0 :
|
|
2580
|
+
const i = e == null ? 0 : D(n, e), s = t == null ? o - 1 : C(n, t);
|
|
2549
2581
|
if (i > s) return [];
|
|
2550
2582
|
const a = new Array(s - i + 1);
|
|
2551
2583
|
for (let c = i; c <= s; c++) a[c - i] = c;
|
|
@@ -2577,8 +2609,8 @@ class Wr {
|
|
|
2577
2609
|
* the script would grow a phantom SELECTION after every real filter.
|
|
2578
2610
|
*/
|
|
2579
2611
|
async _selection(e) {
|
|
2580
|
-
const t = this.history[this.history.length - 2], n = !!t && t.method !==
|
|
2581
|
-
return !e || !e.length ? (this.history.pop(), o && o.length > 0 && this.history.pop(), e) : (o &&
|
|
2612
|
+
const t = this.history[this.history.length - 2], n = !!t && t.method !== A.SELECTION && !!A[t.method], o = n && Array.isArray(t.selected) ? t.selected : void 0;
|
|
2613
|
+
return !e || !e.length ? (this.history.pop(), o && o.length > 0 && this.history.pop(), e) : (o && dr(o, e) ? this.history.pop() : n && this.history.splice(this.history.length - 2, 1), e);
|
|
2582
2614
|
}
|
|
2583
2615
|
/**
|
|
2584
2616
|
* Find points where the change from the previous value satisfies the comparator, using worker threads.
|
|
@@ -2592,36 +2624,36 @@ class Wr {
|
|
|
2592
2624
|
let s = 1, a = o.length;
|
|
2593
2625
|
if (n != null) {
|
|
2594
2626
|
const [u, g] = n;
|
|
2595
|
-
u != null && Number.isFinite(u) && (s = Math.max(1,
|
|
2627
|
+
u != null && Number.isFinite(u) && (s = Math.max(1, D(i, u))), g != null && Number.isFinite(g) && (a = C(i, g) + 1);
|
|
2596
2628
|
}
|
|
2597
2629
|
if (a <= s) return [];
|
|
2598
2630
|
const c = a - s;
|
|
2599
|
-
if (!U(
|
|
2631
|
+
if (!U(A.CHANGE, {
|
|
2600
2632
|
datasetSize: o.length
|
|
2601
2633
|
}).useWorker)
|
|
2602
|
-
return
|
|
2634
|
+
return Jt(o, s, a, e, t);
|
|
2603
2635
|
this._pendingExecutionMode = "worker";
|
|
2604
|
-
const f = Math.min(navigator.hardwareConcurrency || 1, c),
|
|
2636
|
+
const f = Math.min(navigator.hardwareConcurrency || 1, c), m = Math.ceil(c / f), w = [], p = [];
|
|
2605
2637
|
for (let u = 0; u < f; u++) {
|
|
2606
|
-
const g = s + u *
|
|
2638
|
+
const g = s + u * m, h = Math.min(s + (u + 1) * m, a);
|
|
2607
2639
|
if (g >= h) break;
|
|
2608
|
-
|
|
2640
|
+
p.push(
|
|
2609
2641
|
new Promise((b) => {
|
|
2610
|
-
const
|
|
2611
|
-
|
|
2642
|
+
const S = new $t();
|
|
2643
|
+
w.push(S), S.postMessage({
|
|
2612
2644
|
bufferY: this.dataY.buffer,
|
|
2613
2645
|
start: g,
|
|
2614
2646
|
end: h,
|
|
2615
2647
|
comparator: e,
|
|
2616
2648
|
value: t
|
|
2617
|
-
}),
|
|
2649
|
+
}), S.onmessage = (k) => {
|
|
2618
2650
|
b(k.data);
|
|
2619
2651
|
};
|
|
2620
2652
|
})
|
|
2621
2653
|
);
|
|
2622
2654
|
}
|
|
2623
|
-
const y = await Promise.all(
|
|
2624
|
-
|
|
2655
|
+
const y = await Promise.all(p);
|
|
2656
|
+
w.forEach((u) => u.terminate());
|
|
2625
2657
|
const l = [];
|
|
2626
2658
|
for (let u = 0; u < y.length; u++) {
|
|
2627
2659
|
const g = y[u];
|
|
@@ -2648,38 +2680,38 @@ class Wr {
|
|
|
2648
2680
|
let i = 0, s = o.length;
|
|
2649
2681
|
if (n != null) {
|
|
2650
2682
|
const [u, g] = n;
|
|
2651
|
-
u != null && Number.isFinite(u) && (i =
|
|
2683
|
+
u != null && Number.isFinite(u) && (i = D(o, u)), g != null && Number.isFinite(g) && (s = C(o, g) + 1);
|
|
2652
2684
|
}
|
|
2653
2685
|
if (s <= i) return [];
|
|
2654
2686
|
const a = e * G[t] * 1e3;
|
|
2655
|
-
if (!U(
|
|
2687
|
+
if (!U(A.FIND_GAPS, {
|
|
2656
2688
|
datasetSize: s - i
|
|
2657
2689
|
}).useWorker) {
|
|
2658
|
-
const u =
|
|
2690
|
+
const u = Qt(o, i, s - 1, a), g = /* @__PURE__ */ new Set();
|
|
2659
2691
|
for (let h = 0; h < u.length; h++) g.add(u[h]);
|
|
2660
2692
|
return [...g];
|
|
2661
2693
|
}
|
|
2662
2694
|
this._pendingExecutionMode = "worker";
|
|
2663
|
-
const
|
|
2695
|
+
const d = s - i, f = Math.min(navigator.hardwareConcurrency || 1, d), m = Math.ceil(d / f), w = [], p = [];
|
|
2664
2696
|
for (let u = 0; u < f; u++) {
|
|
2665
|
-
const g = i + u *
|
|
2697
|
+
const g = i + u * m, h = Math.min(i + (u + 1) * m, s);
|
|
2666
2698
|
if (g >= h) break;
|
|
2667
|
-
|
|
2699
|
+
p.push(
|
|
2668
2700
|
new Promise((b) => {
|
|
2669
|
-
const
|
|
2670
|
-
|
|
2701
|
+
const S = new Xt();
|
|
2702
|
+
w.push(S), S.postMessage({
|
|
2671
2703
|
bufferX: this.dataX.buffer,
|
|
2672
2704
|
start: g,
|
|
2673
2705
|
endInclusive: h,
|
|
2674
2706
|
threshold: a
|
|
2675
|
-
}),
|
|
2707
|
+
}), S.onmessage = (k) => {
|
|
2676
2708
|
b(k.data);
|
|
2677
2709
|
};
|
|
2678
2710
|
})
|
|
2679
2711
|
);
|
|
2680
2712
|
}
|
|
2681
|
-
const y = await Promise.all(
|
|
2682
|
-
|
|
2713
|
+
const y = await Promise.all(p);
|
|
2714
|
+
w.forEach((u) => u.terminate());
|
|
2683
2715
|
const l = /* @__PURE__ */ new Set();
|
|
2684
2716
|
for (let u = 0; u < y.length; u++) {
|
|
2685
2717
|
const g = y[u];
|
|
@@ -2707,71 +2739,108 @@ class Wr {
|
|
|
2707
2739
|
let i = 0, s = o.length;
|
|
2708
2740
|
if (t != null) {
|
|
2709
2741
|
const [h, b] = t;
|
|
2710
|
-
h != null && Number.isFinite(h) && (i =
|
|
2742
|
+
h != null && Number.isFinite(h) && (i = D(n, h)), b != null && Number.isFinite(b) && (s = C(n, b) + 1);
|
|
2711
2743
|
}
|
|
2712
2744
|
if (s <= i) return [];
|
|
2713
2745
|
const a = s - i;
|
|
2714
|
-
if (!U(
|
|
2746
|
+
if (!U(A.PERSISTENCE, {
|
|
2715
2747
|
datasetSize: a
|
|
2716
2748
|
}).useWorker) {
|
|
2717
|
-
const h =
|
|
2718
|
-
for (let
|
|
2719
|
-
const k = h[
|
|
2720
|
-
if (
|
|
2721
|
-
for (let _ = 0; _ <
|
|
2749
|
+
const h = Zt(o, i, s), b = [];
|
|
2750
|
+
for (let S = 0; S < h.length; S += 3) {
|
|
2751
|
+
const k = h[S], L = h[S + 1];
|
|
2752
|
+
if (L >= e)
|
|
2753
|
+
for (let _ = 0; _ < L; _++) b.push(k + _);
|
|
2722
2754
|
}
|
|
2723
2755
|
return b;
|
|
2724
2756
|
}
|
|
2725
2757
|
this._pendingExecutionMode = "worker";
|
|
2726
|
-
const
|
|
2727
|
-
for (let h = 0; h <
|
|
2728
|
-
const b = i + h * f,
|
|
2729
|
-
if (b >=
|
|
2730
|
-
|
|
2758
|
+
const d = Math.min(navigator.hardwareConcurrency || 1, a), f = Math.ceil(a / d), m = [], w = [];
|
|
2759
|
+
for (let h = 0; h < d; h++) {
|
|
2760
|
+
const b = i + h * f, S = Math.min(i + (h + 1) * f, s);
|
|
2761
|
+
if (b >= S) break;
|
|
2762
|
+
w.push(
|
|
2731
2763
|
new Promise((k) => {
|
|
2732
|
-
const
|
|
2733
|
-
|
|
2764
|
+
const L = new Ht();
|
|
2765
|
+
m.push(L), L.postMessage({
|
|
2734
2766
|
bufferY: this.dataY.buffer,
|
|
2735
2767
|
start: b,
|
|
2736
|
-
end:
|
|
2737
|
-
}),
|
|
2768
|
+
end: S
|
|
2769
|
+
}), L.onmessage = (_) => {
|
|
2738
2770
|
k(_.data);
|
|
2739
2771
|
};
|
|
2740
2772
|
})
|
|
2741
2773
|
);
|
|
2742
2774
|
}
|
|
2743
|
-
const
|
|
2744
|
-
|
|
2775
|
+
const p = await Promise.all(w);
|
|
2776
|
+
m.forEach((h) => h.terminate());
|
|
2745
2777
|
const y = [], l = [], u = [];
|
|
2746
|
-
for (let h = 0; h <
|
|
2747
|
-
const b =
|
|
2748
|
-
for (let
|
|
2749
|
-
const k = b[
|
|
2750
|
-
T >= 0 && u[T] === _ && y[T] + l[T] === k ? l[T] +=
|
|
2778
|
+
for (let h = 0; h < p.length; h++) {
|
|
2779
|
+
const b = p[h];
|
|
2780
|
+
for (let S = 0; S < b.length; S += 3) {
|
|
2781
|
+
const k = b[S], L = b[S + 1], _ = b[S + 2], T = y.length - 1;
|
|
2782
|
+
T >= 0 && u[T] === _ && y[T] + l[T] === k ? l[T] += L : (y.push(k), l.push(L), u.push(_));
|
|
2751
2783
|
}
|
|
2752
2784
|
}
|
|
2753
2785
|
const g = [];
|
|
2754
2786
|
for (let h = 0; h < y.length; h++) {
|
|
2755
2787
|
const b = l[h];
|
|
2756
2788
|
if (b >= e) {
|
|
2757
|
-
const
|
|
2758
|
-
for (let k = 0; k < b; k++) g.push(
|
|
2789
|
+
const S = y[h];
|
|
2790
|
+
for (let k = 0; k < b; k++) g.push(S + k);
|
|
2759
2791
|
}
|
|
2760
2792
|
}
|
|
2761
2793
|
return g;
|
|
2762
2794
|
}
|
|
2763
2795
|
}
|
|
2764
2796
|
const V = "1", pr = /* @__PURE__ */ new Set([
|
|
2765
|
-
...Object.values(
|
|
2766
|
-
...Object.values(
|
|
2797
|
+
...Object.values(E),
|
|
2798
|
+
...Object.values(A)
|
|
2767
2799
|
]);
|
|
2768
|
-
function
|
|
2800
|
+
function wr(r) {
|
|
2801
|
+
if (!r) return;
|
|
2802
|
+
const e = {}, t = (a) => typeof a == "number" && Number.isFinite(a) ? a : void 0, n = t(r.startedAt);
|
|
2803
|
+
n !== void 0 && (e.startedAt = n), (r.status === "success" || r.status === "failed") && (e.status = r.status);
|
|
2804
|
+
const o = t(r.durationMs);
|
|
2805
|
+
o !== void 0 && (e.durationMs = o), (r.mode === "worker" || r.mode === "inline") && (e.mode = r.mode);
|
|
2806
|
+
const i = t(r.datasetSize);
|
|
2807
|
+
i !== void 0 && (e.datasetSize = i);
|
|
2808
|
+
const s = t(r.selectionSize);
|
|
2809
|
+
return s !== void 0 && (e.selectionSize = s), Object.keys(e).length === 0 ? void 0 : e;
|
|
2810
|
+
}
|
|
2811
|
+
function mr(r, e) {
|
|
2812
|
+
if (r === void 0) return;
|
|
2813
|
+
if (!r || typeof r != "object")
|
|
2814
|
+
throw new Error(`Operation ${e} \`execution\` must be an object when present.`);
|
|
2815
|
+
const t = r, n = {}, o = (i, s) => {
|
|
2816
|
+
if (typeof s != "number" || !Number.isFinite(s))
|
|
2817
|
+
throw new Error(
|
|
2818
|
+
`Operation ${e} \`execution.${i}\` must be a finite number when present.`
|
|
2819
|
+
);
|
|
2820
|
+
};
|
|
2821
|
+
if (t.startedAt !== void 0 && (o("startedAt", t.startedAt), n.startedAt = t.startedAt), t.status !== void 0) {
|
|
2822
|
+
if (t.status !== "success" && t.status !== "failed")
|
|
2823
|
+
throw new Error(
|
|
2824
|
+
`Operation ${e} \`execution.status\` must be "success" or "failed" when present.`
|
|
2825
|
+
);
|
|
2826
|
+
n.status = t.status;
|
|
2827
|
+
}
|
|
2828
|
+
if (t.durationMs !== void 0 && (o("durationMs", t.durationMs), n.durationMs = t.durationMs), t.mode !== void 0) {
|
|
2829
|
+
if (t.mode !== "worker" && t.mode !== "inline")
|
|
2830
|
+
throw new Error(
|
|
2831
|
+
`Operation ${e} \`execution.mode\` must be "worker" or "inline" when present.`
|
|
2832
|
+
);
|
|
2833
|
+
n.mode = t.mode;
|
|
2834
|
+
}
|
|
2835
|
+
return t.datasetSize !== void 0 && (o("datasetSize", t.datasetSize), n.datasetSize = t.datasetSize), t.selectionSize !== void 0 && (o("selectionSize", t.selectionSize), n.selectionSize = t.selectionSize), n;
|
|
2836
|
+
}
|
|
2837
|
+
function zr(r, e) {
|
|
2769
2838
|
const t = r.history.map((n) => {
|
|
2770
2839
|
const o = {
|
|
2771
2840
|
method: n.method,
|
|
2772
2841
|
args: n.args ? [...n.args] : []
|
|
2773
|
-
};
|
|
2774
|
-
return
|
|
2842
|
+
}, i = wr(n.execution);
|
|
2843
|
+
return i && (o.execution = i), o;
|
|
2775
2844
|
});
|
|
2776
2845
|
return {
|
|
2777
2846
|
version: V,
|
|
@@ -2783,7 +2852,7 @@ function Yr(r, e) {
|
|
|
2783
2852
|
operations: t
|
|
2784
2853
|
};
|
|
2785
2854
|
}
|
|
2786
|
-
function
|
|
2855
|
+
function Xr(r) {
|
|
2787
2856
|
if (!r || typeof r != "object")
|
|
2788
2857
|
throw new Error("QC script must be a JSON object.");
|
|
2789
2858
|
const e = r;
|
|
@@ -2813,15 +2882,8 @@ function Gr(r) {
|
|
|
2813
2882
|
const a = {
|
|
2814
2883
|
method: s.method,
|
|
2815
2884
|
args: [...s.args]
|
|
2816
|
-
};
|
|
2817
|
-
|
|
2818
|
-
if (typeof s.timestamp != "number" || !Number.isFinite(s.timestamp))
|
|
2819
|
-
throw new Error(
|
|
2820
|
-
`Operation ${i} \`timestamp\` must be a finite epoch-ms number when present.`
|
|
2821
|
-
);
|
|
2822
|
-
a.timestamp = s.timestamp;
|
|
2823
|
-
}
|
|
2824
|
-
return a;
|
|
2885
|
+
}, c = mr(s.execution, i);
|
|
2886
|
+
return c && (a.execution = c), a;
|
|
2825
2887
|
});
|
|
2826
2888
|
return {
|
|
2827
2889
|
version: V,
|
|
@@ -2833,13 +2895,13 @@ function Gr(r) {
|
|
|
2833
2895
|
operations: n
|
|
2834
2896
|
};
|
|
2835
2897
|
}
|
|
2836
|
-
async function
|
|
2898
|
+
async function Hr(r, e) {
|
|
2837
2899
|
r.history.length = 0, r.redoStack.length = 0, await r.reload();
|
|
2838
2900
|
const t = { applied: 0, failed: [] };
|
|
2839
2901
|
for (let n = 0; n < e.operations.length; n++) {
|
|
2840
2902
|
const o = e.operations[n];
|
|
2841
2903
|
try {
|
|
2842
|
-
await r.dispatch(o.method, ...o.args), r.history[r.history.length - 1]?.status === "failed" ? t.failed.push({
|
|
2904
|
+
await r.dispatch(o.method, ...o.args), r.history[r.history.length - 1]?.execution.status === "failed" ? t.failed.push({
|
|
2843
2905
|
index: n,
|
|
2844
2906
|
method: o.method,
|
|
2845
2907
|
error: "Operation handler reported failure (see console)."
|
|
@@ -2855,58 +2917,58 @@ async function Xr(r, e) {
|
|
|
2855
2917
|
return t;
|
|
2856
2918
|
}
|
|
2857
2919
|
export {
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2920
|
+
Rr as ApiKey,
|
|
2921
|
+
Ir as Collaborator,
|
|
2922
|
+
Ke as DEFAULT_SNACK_DURATION,
|
|
2923
|
+
Ur as DataSource,
|
|
2924
|
+
br as Datastream,
|
|
2925
|
+
E as EnumEditOperations,
|
|
2926
|
+
A as EnumFilterOperations,
|
|
2865
2927
|
B as FilterOperation,
|
|
2866
|
-
|
|
2928
|
+
yt as HydroShareArchive,
|
|
2867
2929
|
W as INCREASE_AMOUNT,
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2930
|
+
bt as Location,
|
|
2931
|
+
gt as LogicalOperation,
|
|
2932
|
+
Tr as OAuthProvider,
|
|
2933
|
+
Gr as ObservationRecord,
|
|
2934
|
+
vr as ObservedProperty,
|
|
2873
2935
|
mt as Operator,
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2936
|
+
Lr as Organization,
|
|
2937
|
+
Or as Payload,
|
|
2938
|
+
St as PermissionAction,
|
|
2877
2939
|
Et as PermissionResource,
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2940
|
+
Ft as Position,
|
|
2941
|
+
gr as PostHydroShareArchive,
|
|
2942
|
+
kr as ProcessingLevel,
|
|
2881
2943
|
V as QC_SCRIPT_VERSION,
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2944
|
+
Ar as ResultQualifier,
|
|
2945
|
+
Er as Sensor,
|
|
2946
|
+
Bt as Snack,
|
|
2947
|
+
Qe as SnackColor,
|
|
2948
|
+
Ze as SnackIcon,
|
|
2949
|
+
et as SnackTitle,
|
|
2950
|
+
Cr as Snackbar,
|
|
2951
|
+
yr as Thing,
|
|
2890
2952
|
N as TimeUnit,
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2953
|
+
Sr as Unit,
|
|
2954
|
+
_r as User,
|
|
2955
|
+
Mr as Workspace,
|
|
2956
|
+
Hr as applyScript,
|
|
2957
|
+
Wr as clearCalibration,
|
|
2958
|
+
Yr as ensureCalibration,
|
|
2959
|
+
D as findFirstGreaterOrEqual,
|
|
2898
2960
|
C as findLastLessOrEqual,
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2961
|
+
xr as formatDate,
|
|
2962
|
+
Dr as formatDuration,
|
|
2963
|
+
Br as getCalibration,
|
|
2964
|
+
Pr as getLastBenchmarkDetail,
|
|
2965
|
+
jr as getOperationTable,
|
|
2904
2966
|
re as measureEllapsedTime,
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2967
|
+
Fr as onCalibrationChange,
|
|
2968
|
+
Xr as parseScript,
|
|
2969
|
+
lr as runBenchmarks,
|
|
2970
|
+
zr as serializeHistory,
|
|
2909
2971
|
U as shouldUseWorker,
|
|
2910
|
-
|
|
2972
|
+
Nr as subtractHours,
|
|
2911
2973
|
G as timeUnitMultipliers
|
|
2912
2974
|
};
|