@cccsaurora/clue-ui 1.6.0-dev.517.1 → 1.6.0-dev.535.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/{ActionForm-Sj0KtEYj.js → ActionForm-C1D2_1Pg.js} +3 -3
- package/{AnnotationDetails-B1NQ-B4f.js → AnnotationDetails-C683Hvym.js} +1 -1
- package/{AnnotationPreview-Cw3JUL8k.js → AnnotationPreview-Bm9e2UgC.js} +1 -1
- package/{ClueEnrichContext-Dpv_xiDv.js → ClueEnrichContext-DmERFjhQ.js} +1 -1
- package/components/AnnotationDetailPopover.js +1 -1
- package/components/AnnotationDetails.js +2 -2
- package/components/AnnotationPreview.js +1 -1
- package/components/EnrichedCard.js +1 -1
- package/components/EnrichedChip.js +2 -2
- package/components/EnrichedTypography.js +2 -2
- package/components/RetryFailedEnrichments.js +1 -1
- package/components/SourcePicker.js +1 -1
- package/components/actions/ActionForm.js +1 -1
- package/components/actions/ExecutePopover.js +1 -1
- package/components/actions/ResultModal.js +1 -1
- package/components/display/graph/index.js +1 -1
- package/components/display/graph/visualizations/cloud/index.js +2 -2
- package/components/display/graph/visualizations/tree/BundleLine.js +1 -1
- package/components/display/markdown/index.js +152 -72
- package/components/enrichment/EnrichPopover.js +1 -1
- package/components/fetchers/Fetcher.js +1 -1
- package/components/group/GroupControl.js +1 -1
- package/components/stats/QueryStatus.js +1 -1
- package/{index-CVUD9o3t.js → d3-CwtkB99t.js} +15024 -10621
- package/database/index.js +2 -2
- package/database/replication.js +2 -2
- package/hooks/ClueActionContext.js +2 -2
- package/hooks/ClueDatabaseContext.js +1 -1
- package/hooks/ClueEnrichContext.js +2 -2
- package/hooks/ClueFetcherContext.js +1 -1
- package/hooks/ClueGroupContext.js +1 -1
- package/hooks/CluePopupContext.js +2 -2
- package/hooks/ClueProvider.js +3 -3
- package/hooks/selectors.js +2 -2
- package/hooks/useActionResult.js +1 -1
- package/hooks/useAnnotations.js +2 -2
- package/hooks/useClue.js +1 -1
- package/hooks/useClueActions.js +1 -1
- package/hooks/useClueTypeConfig.js +1 -1
- package/hooks/useErrors.js +1 -1
- package/hooks/useFetcherResult.js +1 -1
- package/icons/Action.js +2 -2
- package/icons/Assessment.js +1 -1
- package/icons/Context.js +1 -1
- package/icons/Opinion.js +1 -1
- package/{index-29cEmZLo.js → index-Bx5giDpY.js} +727 -247
- package/{index-DieKGFn1.js → index-D1tw5sJ1.js} +20 -9
- package/{index-BCzfYx7I.js → index-DzbOfIT_.js} +9 -7
- package/main.js +5 -5
- package/package.json +31 -31
- package/{replication-DwPGDesg.js → replication-Bxa4yXXZ.js} +111 -42
- package/utils/time.js +8 -8
|
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var _hashFn, _keyMap, _unpack, _options, _root, _local, _operators, _iteratees, _yieldedValues, _getNext, _a, _source, _predicate, _projection, _options2, _operators2, _result, _buffer, _compiled, _options3, _condition;
|
|
12
|
-
import { a as api, j as joinAllUri, u as uri } from "./index-
|
|
12
|
+
import { a as api, j as joinAllUri, u as uri } from "./index-Bx5giDpY.js";
|
|
13
13
|
import { ClueReplicationError } from "./database/errors.js";
|
|
14
14
|
import { REPLICATORS } from "./database/globals.js";
|
|
15
15
|
import { l as last$1 } from "./last-CUCl67Im.js";
|
|
@@ -827,7 +827,7 @@ function errorToPlainJson(err) {
|
|
|
827
827
|
return ret;
|
|
828
828
|
}
|
|
829
829
|
var _lastNow = 0;
|
|
830
|
-
function now$
|
|
830
|
+
function now$2() {
|
|
831
831
|
var ret = Date.now();
|
|
832
832
|
ret = ret + 0.01;
|
|
833
833
|
if (ret <= _lastNow) {
|
|
@@ -850,7 +850,7 @@ var RXJS_SHARE_REPLAY_DEFAULTS = {
|
|
|
850
850
|
bufferSize: 1,
|
|
851
851
|
refCount: true
|
|
852
852
|
};
|
|
853
|
-
var RXDB_VERSION = "16.
|
|
853
|
+
var RXDB_VERSION = "16.21.1";
|
|
854
854
|
var RXDB_UTILS_GLOBAL = {};
|
|
855
855
|
var PREMIUM_FLAG_HASH = "6da4936d1425ff3a5c44c02342c6daf791d266be3ae8479b8ec59e261df41b93";
|
|
856
856
|
var NON_PREMIUM_COLLECTION_LIMIT = 16;
|
|
@@ -5166,7 +5166,7 @@ async function writeSingle(instance, writeRow, context) {
|
|
|
5166
5166
|
}
|
|
5167
5167
|
}
|
|
5168
5168
|
function stackCheckpoints(checkpoints) {
|
|
5169
|
-
return Object.assign({}, ...checkpoints);
|
|
5169
|
+
return Object.assign({}, ...checkpoints.filter((x) => !!x));
|
|
5170
5170
|
}
|
|
5171
5171
|
function throwIfIsStorageWriteError(collection, documentId, writeData, error) {
|
|
5172
5172
|
if (error) {
|
|
@@ -5433,7 +5433,7 @@ function getWrappedStorageInstance(database, storageInstance, rxJsonSchema) {
|
|
|
5433
5433
|
async bulkWrite(rows, context) {
|
|
5434
5434
|
var databaseToken = database.token;
|
|
5435
5435
|
var toStorageWriteRows = new Array(rows.length);
|
|
5436
|
-
var time = now$
|
|
5436
|
+
var time = now$2();
|
|
5437
5437
|
for (var index = 0; index < rows.length; index++) {
|
|
5438
5438
|
var writeRow = rows[index];
|
|
5439
5439
|
var document2 = flatCloneDocWithMeta(writeRow.document);
|
|
@@ -6701,7 +6701,7 @@ var defaultCacheReplacementPolicyMonad = (tryToKeepMax, unExecutedLifetime) => (
|
|
|
6701
6701
|
if (queryCache._map.size < tryToKeepMax) {
|
|
6702
6702
|
return;
|
|
6703
6703
|
}
|
|
6704
|
-
var minUnExecutedLifetime = now$
|
|
6704
|
+
var minUnExecutedLifetime = now$2() - unExecutedLifetime;
|
|
6705
6705
|
var maybeUncache = [];
|
|
6706
6706
|
var queriesInCache = Array.from(queryCache._map.values());
|
|
6707
6707
|
for (var rxQuery of queriesInCache) {
|
|
@@ -6884,7 +6884,7 @@ function createWeakRefFallback(obj) {
|
|
|
6884
6884
|
}
|
|
6885
6885
|
var RxQuerySingleResult = /* @__PURE__ */ (function() {
|
|
6886
6886
|
function RxQuerySingleResult2(query, docsDataFromStorageInstance, count) {
|
|
6887
|
-
this.time = now$
|
|
6887
|
+
this.time = now$2();
|
|
6888
6888
|
this.query = query;
|
|
6889
6889
|
this.count = count;
|
|
6890
6890
|
this.documents = mapDocumentsDataToCacheDocs(this.query.collection._docCache, docsDataFromStorageInstance);
|
|
@@ -6947,7 +6947,7 @@ var RxQueryBase = /* @__PURE__ */ (function() {
|
|
|
6947
6947
|
function RxQueryBase2(op, mangoQuery, collection, other = {}) {
|
|
6948
6948
|
this.id = newQueryID();
|
|
6949
6949
|
this._execOverDatabaseCount = 0;
|
|
6950
|
-
this._creationTime = now$
|
|
6950
|
+
this._creationTime = now$2();
|
|
6951
6951
|
this._lastEnsureEqual = 0;
|
|
6952
6952
|
this.uncached = false;
|
|
6953
6953
|
this.refCount$ = new BehaviorSubject(null);
|
|
@@ -6984,14 +6984,17 @@ var RxQueryBase = /* @__PURE__ */ (function() {
|
|
|
6984
6984
|
this._execOverDatabaseCount = this._execOverDatabaseCount + 1;
|
|
6985
6985
|
if (this.op === "count") {
|
|
6986
6986
|
var preparedQuery = this.getPreparedQuery();
|
|
6987
|
-
var
|
|
6988
|
-
if (
|
|
6987
|
+
var countResult = await this.collection.storageInstance.count(preparedQuery);
|
|
6988
|
+
if (countResult.mode === "slow" && !this.collection.database.allowSlowCount) {
|
|
6989
6989
|
throw newRxError("QU14", {
|
|
6990
6990
|
collection: this.collection,
|
|
6991
6991
|
queryObj: this.mangoQuery
|
|
6992
6992
|
});
|
|
6993
6993
|
} else {
|
|
6994
|
-
return
|
|
6994
|
+
return {
|
|
6995
|
+
result: countResult.count,
|
|
6996
|
+
counter: this.collection._changeEventBuffer.getCounter()
|
|
6997
|
+
};
|
|
6995
6998
|
}
|
|
6996
6999
|
}
|
|
6997
7000
|
if (this.op === "findByIds") {
|
|
@@ -7016,12 +7019,16 @@ var RxQueryBase = /* @__PURE__ */ (function() {
|
|
|
7016
7019
|
ret.set(doc.primary, doc);
|
|
7017
7020
|
});
|
|
7018
7021
|
}
|
|
7019
|
-
return
|
|
7022
|
+
return {
|
|
7023
|
+
result: ret,
|
|
7024
|
+
counter: this.collection._changeEventBuffer.getCounter()
|
|
7025
|
+
};
|
|
7020
7026
|
}
|
|
7021
|
-
var
|
|
7022
|
-
return
|
|
7023
|
-
|
|
7024
|
-
|
|
7027
|
+
var result = await queryCollection(this);
|
|
7028
|
+
return {
|
|
7029
|
+
result: result.docs,
|
|
7030
|
+
counter: result.counter
|
|
7031
|
+
};
|
|
7025
7032
|
};
|
|
7026
7033
|
_proto.exec = async function exec(throwIfMissing) {
|
|
7027
7034
|
if (throwIfMissing && this.op !== "findOne") {
|
|
@@ -7217,14 +7224,11 @@ async function _ensureEqual(rxQuery) {
|
|
|
7217
7224
|
if (rxQuery.collection.awaitBeforeReads.size > 0) {
|
|
7218
7225
|
await Promise.all(Array.from(rxQuery.collection.awaitBeforeReads).map((fn) => fn()));
|
|
7219
7226
|
}
|
|
7220
|
-
if (rxQuery.collection.database.closed || _isResultsInSync(rxQuery)) {
|
|
7221
|
-
return false;
|
|
7222
|
-
}
|
|
7223
7227
|
rxQuery._ensureEqualQueue = rxQuery._ensureEqualQueue.then(() => __ensureEqual(rxQuery));
|
|
7224
7228
|
return rxQuery._ensureEqualQueue;
|
|
7225
7229
|
}
|
|
7226
7230
|
function __ensureEqual(rxQuery) {
|
|
7227
|
-
rxQuery._lastEnsureEqual = now$
|
|
7231
|
+
rxQuery._lastEnsureEqual = now$2();
|
|
7228
7232
|
if (
|
|
7229
7233
|
// db is closed
|
|
7230
7234
|
rxQuery.collection.database.closed || // nothing happened since last run
|
|
@@ -7273,8 +7277,9 @@ function __ensureEqual(rxQuery) {
|
|
|
7273
7277
|
}
|
|
7274
7278
|
}
|
|
7275
7279
|
if (mustReExec) {
|
|
7276
|
-
return rxQuery._execOverDatabase().then((
|
|
7277
|
-
|
|
7280
|
+
return rxQuery._execOverDatabase().then((result) => {
|
|
7281
|
+
var newResultData = result.result;
|
|
7282
|
+
rxQuery._latestChangeEvent = result.counter;
|
|
7278
7283
|
if (typeof newResultData === "number") {
|
|
7279
7284
|
if (!rxQuery._result || newResultData !== rxQuery._result.count) {
|
|
7280
7285
|
ret = true;
|
|
@@ -7330,7 +7335,10 @@ async function queryCollection(rxQuery) {
|
|
|
7330
7335
|
var queryResult = await collection.storageInstance.query(preparedQuery);
|
|
7331
7336
|
docs = queryResult.documents;
|
|
7332
7337
|
}
|
|
7333
|
-
return
|
|
7338
|
+
return {
|
|
7339
|
+
docs,
|
|
7340
|
+
counter: collection._changeEventBuffer.getCounter()
|
|
7341
|
+
};
|
|
7334
7342
|
}
|
|
7335
7343
|
function isFindOneByIdQuery(primaryPath, query) {
|
|
7336
7344
|
if (!query.skip && query.selector && Object.keys(query.selector).length === 1 && query.selector[primaryPath]) {
|
|
@@ -7640,7 +7648,7 @@ async function removeCollectionStorages(storage, databaseInternalStorage, databa
|
|
|
7640
7648
|
var writeRows = relevantCollectionMetaDocs.map((doc) => {
|
|
7641
7649
|
var writeDoc = flatCloneDocWithMeta(doc);
|
|
7642
7650
|
writeDoc._deleted = true;
|
|
7643
|
-
writeDoc._meta.lwt = now$
|
|
7651
|
+
writeDoc._meta.lwt = now$2();
|
|
7644
7652
|
writeDoc._rev = createRevision(databaseInstanceToken, doc);
|
|
7645
7653
|
return {
|
|
7646
7654
|
previous: doc,
|
|
@@ -8624,7 +8632,7 @@ function _tryIdleCall(idleQueue) {
|
|
|
8624
8632
|
}, 0);
|
|
8625
8633
|
}, 0);
|
|
8626
8634
|
}
|
|
8627
|
-
class ObliviousSet {
|
|
8635
|
+
let ObliviousSet$1 = class ObliviousSet {
|
|
8628
8636
|
constructor(ttl) {
|
|
8629
8637
|
__publicField(this, "ttl");
|
|
8630
8638
|
__publicField(this, "map", /* @__PURE__ */ new Map());
|
|
@@ -8639,21 +8647,21 @@ class ObliviousSet {
|
|
|
8639
8647
|
return this.map.has(value);
|
|
8640
8648
|
}
|
|
8641
8649
|
add(value) {
|
|
8642
|
-
this.map.set(value, now());
|
|
8650
|
+
this.map.set(value, now$1());
|
|
8643
8651
|
if (!this._to) {
|
|
8644
8652
|
this._to = true;
|
|
8645
8653
|
setTimeout(() => {
|
|
8646
8654
|
this._to = false;
|
|
8647
|
-
removeTooOldValues(this);
|
|
8655
|
+
removeTooOldValues$1(this);
|
|
8648
8656
|
}, 0);
|
|
8649
8657
|
}
|
|
8650
8658
|
}
|
|
8651
8659
|
clear() {
|
|
8652
8660
|
this.map.clear();
|
|
8653
8661
|
}
|
|
8654
|
-
}
|
|
8655
|
-
function removeTooOldValues(obliviousSet) {
|
|
8656
|
-
const olderThen = now() - obliviousSet.ttl;
|
|
8662
|
+
};
|
|
8663
|
+
function removeTooOldValues$1(obliviousSet) {
|
|
8664
|
+
const olderThen = now$1() - obliviousSet.ttl;
|
|
8657
8665
|
const iterator2 = obliviousSet.map[Symbol.iterator]();
|
|
8658
8666
|
while (true) {
|
|
8659
8667
|
const next = iterator2.next().value;
|
|
@@ -8669,7 +8677,7 @@ function removeTooOldValues(obliviousSet) {
|
|
|
8669
8677
|
}
|
|
8670
8678
|
}
|
|
8671
8679
|
}
|
|
8672
|
-
function now() {
|
|
8680
|
+
function now$1() {
|
|
8673
8681
|
return Date.now();
|
|
8674
8682
|
}
|
|
8675
8683
|
var USED_DATABASE_NAMES = /* @__PURE__ */ new Set();
|
|
@@ -8690,7 +8698,7 @@ var RxDatabaseBase = /* @__PURE__ */ (function() {
|
|
|
8690
8698
|
this.observable$ = this.eventBulks$.pipe(mergeMap((changeEventBulk) => rxChangeEventBulkToRxChangeEvents(changeEventBulk)));
|
|
8691
8699
|
this.storageToken = PROMISE_RESOLVE_FALSE;
|
|
8692
8700
|
this.storageTokenDocument = PROMISE_RESOLVE_FALSE;
|
|
8693
|
-
this.emittedEventBulkIds = new ObliviousSet(60 * 1e3);
|
|
8701
|
+
this.emittedEventBulkIds = new ObliviousSet$1(60 * 1e3);
|
|
8694
8702
|
this.name = name;
|
|
8695
8703
|
this.token = token;
|
|
8696
8704
|
this.storage = storage;
|
|
@@ -9133,7 +9141,7 @@ async function setCheckpoint(state, direction, checkpoint) {
|
|
|
9133
9141
|
if (previousCheckpointDoc) {
|
|
9134
9142
|
newDoc.checkpointData = stackCheckpoints([previousCheckpointDoc.checkpointData, newDoc.checkpointData]);
|
|
9135
9143
|
}
|
|
9136
|
-
newDoc._meta.lwt = now$
|
|
9144
|
+
newDoc._meta.lwt = now$2();
|
|
9137
9145
|
newDoc._rev = createRevision(await state.checkpointKey, previousCheckpointDoc);
|
|
9138
9146
|
if (state.events.canceled.getValue()) {
|
|
9139
9147
|
return;
|
|
@@ -9289,7 +9297,7 @@ async function getMetaWriteRow(state, newMasterDocState, previous, isResolvedCon
|
|
|
9289
9297
|
if (isResolvedConflict) {
|
|
9290
9298
|
newMeta.isResolvedConflict = isResolvedConflict;
|
|
9291
9299
|
}
|
|
9292
|
-
newMeta._meta.lwt = now$
|
|
9300
|
+
newMeta._meta.lwt = now$2();
|
|
9293
9301
|
newMeta.id = getComposedPrimaryKeyOfDocumentData(state.input.metaInstance.schema, newMeta);
|
|
9294
9302
|
newMeta._rev = createRevision(await state.checkpointKey, previous);
|
|
9295
9303
|
var ret = {
|
|
@@ -9451,7 +9459,7 @@ async function startReplicationDownstream(state) {
|
|
|
9451
9459
|
_rev: getDefaultRevision()
|
|
9452
9460
|
} : {
|
|
9453
9461
|
_meta: {
|
|
9454
|
-
lwt: now$
|
|
9462
|
+
lwt: now$2()
|
|
9455
9463
|
},
|
|
9456
9464
|
_rev: getDefaultRevision(),
|
|
9457
9465
|
_attachments: state.hasAttachments && masterState._attachments ? masterState._attachments : {}
|
|
@@ -9534,7 +9542,7 @@ async function resolveConflictError(state, input, forkState) {
|
|
|
9534
9542
|
_rev: getDefaultRevision(),
|
|
9535
9543
|
_attachments: flatClone(forkState._attachments)
|
|
9536
9544
|
});
|
|
9537
|
-
resolvedDoc._meta.lwt = now$
|
|
9545
|
+
resolvedDoc._meta.lwt = now$2();
|
|
9538
9546
|
resolvedDoc._rev = createRevision(await state.checkpointKey, forkState);
|
|
9539
9547
|
return resolvedDoc;
|
|
9540
9548
|
}
|
|
@@ -9644,7 +9652,7 @@ async function startReplicationUpstream(state) {
|
|
|
9644
9652
|
state.events.active.up.next(true);
|
|
9645
9653
|
state.streamQueue.up = state.streamQueue.up.then(async () => {
|
|
9646
9654
|
var docs = [];
|
|
9647
|
-
var checkpoint
|
|
9655
|
+
var checkpoint;
|
|
9648
9656
|
while (openTasks.length > 0) {
|
|
9649
9657
|
var taskWithTime = ensureNotFalsy(openTasks.shift());
|
|
9650
9658
|
if (taskWithTime.time < initialSyncStartTime) {
|
|
@@ -9985,6 +9993,63 @@ var NativeMethod = {
|
|
|
9985
9993
|
averageResponseTime: averageResponseTime$3,
|
|
9986
9994
|
microSeconds: microSeconds$3
|
|
9987
9995
|
};
|
|
9996
|
+
class ObliviousSet2 {
|
|
9997
|
+
constructor(ttl) {
|
|
9998
|
+
__publicField(this, "ttl");
|
|
9999
|
+
__publicField(this, "map", /* @__PURE__ */ new Map());
|
|
10000
|
+
/**
|
|
10001
|
+
* Creating calls to setTimeout() is expensive,
|
|
10002
|
+
* so we only do that if there is not timeout already open.
|
|
10003
|
+
*/
|
|
10004
|
+
__publicField(this, "_to", false);
|
|
10005
|
+
this.ttl = ttl;
|
|
10006
|
+
}
|
|
10007
|
+
has(value) {
|
|
10008
|
+
const valueTime = this.map.get(value);
|
|
10009
|
+
if (typeof valueTime === "undefined") {
|
|
10010
|
+
return false;
|
|
10011
|
+
}
|
|
10012
|
+
if (valueTime < now() - this.ttl) {
|
|
10013
|
+
this.map.delete(value);
|
|
10014
|
+
return false;
|
|
10015
|
+
}
|
|
10016
|
+
return true;
|
|
10017
|
+
}
|
|
10018
|
+
add(value) {
|
|
10019
|
+
this.map.delete(value);
|
|
10020
|
+
this.map.set(value, now());
|
|
10021
|
+
if (!this._to) {
|
|
10022
|
+
this._to = true;
|
|
10023
|
+
setTimeout(() => {
|
|
10024
|
+
this._to = false;
|
|
10025
|
+
removeTooOldValues(this);
|
|
10026
|
+
}, 0);
|
|
10027
|
+
}
|
|
10028
|
+
}
|
|
10029
|
+
clear() {
|
|
10030
|
+
this.map.clear();
|
|
10031
|
+
}
|
|
10032
|
+
}
|
|
10033
|
+
function removeTooOldValues(obliviousSet) {
|
|
10034
|
+
const olderThen = now() - obliviousSet.ttl;
|
|
10035
|
+
const iterator2 = obliviousSet.map[Symbol.iterator]();
|
|
10036
|
+
while (true) {
|
|
10037
|
+
const next = iterator2.next().value;
|
|
10038
|
+
if (!next) {
|
|
10039
|
+
break;
|
|
10040
|
+
}
|
|
10041
|
+
const value = next[0];
|
|
10042
|
+
const time = next[1];
|
|
10043
|
+
if (time < olderThen) {
|
|
10044
|
+
obliviousSet.map.delete(value);
|
|
10045
|
+
} else {
|
|
10046
|
+
break;
|
|
10047
|
+
}
|
|
10048
|
+
}
|
|
10049
|
+
}
|
|
10050
|
+
function now() {
|
|
10051
|
+
return Date.now();
|
|
10052
|
+
}
|
|
9988
10053
|
function fillOptionsWithDefaults$1() {
|
|
9989
10054
|
var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9990
10055
|
var options = JSON.parse(JSON.stringify(originalOptions));
|
|
@@ -10167,7 +10232,7 @@ function create$2(channelName, options) {
|
|
|
10167
10232
|
* contains all messages that have been emitted before
|
|
10168
10233
|
* @type {ObliviousSet}
|
|
10169
10234
|
*/
|
|
10170
|
-
eMIs: new
|
|
10235
|
+
eMIs: new ObliviousSet2(options.idb.ttl * 2),
|
|
10171
10236
|
// ensures we do not read messages in parallel
|
|
10172
10237
|
writeBlockPromise: PROMISE_RESOLVED_VOID,
|
|
10173
10238
|
messagesCallback: null,
|
|
@@ -10312,7 +10377,7 @@ function create$1(channelName, options) {
|
|
|
10312
10377
|
throw new Error("BroadcastChannel: localstorage cannot be used");
|
|
10313
10378
|
}
|
|
10314
10379
|
var uuid = randomToken();
|
|
10315
|
-
var eMIs = new
|
|
10380
|
+
var eMIs = new ObliviousSet2(options.localstorage.removeTimeout);
|
|
10316
10381
|
var state = {
|
|
10317
10382
|
channelName,
|
|
10318
10383
|
uuid,
|
|
@@ -10757,7 +10822,7 @@ LeaderElectionWebLock.prototype = {
|
|
|
10757
10822
|
_this3._wKMC.res = res;
|
|
10758
10823
|
_this3._wKMC.rej = rej;
|
|
10759
10824
|
});
|
|
10760
|
-
this._wLMP = new Promise(function(res) {
|
|
10825
|
+
this._wLMP = new Promise(function(res, reject) {
|
|
10761
10826
|
navigator.locks.request(_this3.lN, {
|
|
10762
10827
|
signal: _this3._wKMC.c.signal
|
|
10763
10828
|
}, function() {
|
|
@@ -10765,7 +10830,11 @@ LeaderElectionWebLock.prototype = {
|
|
|
10765
10830
|
beLeader(_this3);
|
|
10766
10831
|
res();
|
|
10767
10832
|
return returnPromise;
|
|
10768
|
-
})["catch"](function() {
|
|
10833
|
+
})["catch"](function(err) {
|
|
10834
|
+
if (_this3._wKMC.rej) {
|
|
10835
|
+
_this3._wKMC.rej(err);
|
|
10836
|
+
}
|
|
10837
|
+
reject(err);
|
|
10769
10838
|
});
|
|
10770
10839
|
});
|
|
10771
10840
|
}
|
|
@@ -11792,7 +11861,7 @@ export {
|
|
|
11792
11861
|
mergeMap as aG,
|
|
11793
11862
|
newRxError as aH,
|
|
11794
11863
|
newRxTypeError as aI,
|
|
11795
|
-
now$
|
|
11864
|
+
now$2 as aJ,
|
|
11796
11865
|
objectPathMonad as aK,
|
|
11797
11866
|
operate as aL,
|
|
11798
11867
|
overwritable as aM,
|
package/utils/time.js
CHANGED
|
@@ -9,7 +9,7 @@ function requireDayjs_min() {
|
|
|
9
9
|
!(function(t, e) {
|
|
10
10
|
module.exports = e();
|
|
11
11
|
})(dayjs_min, (function() {
|
|
12
|
-
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|
|
|
12
|
+
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
|
|
13
13
|
var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
|
|
14
14
|
return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
|
|
15
15
|
} }, m = function(t2, e2, n2) {
|
|
@@ -268,9 +268,9 @@ function requireDayjs_min() {
|
|
|
268
268
|
}, m2.toString = function() {
|
|
269
269
|
return this.$d.toUTCString();
|
|
270
270
|
}, M2;
|
|
271
|
-
})(),
|
|
272
|
-
return O.prototype =
|
|
273
|
-
|
|
271
|
+
})(), Y = _.prototype;
|
|
272
|
+
return O.prototype = Y, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach((function(t2) {
|
|
273
|
+
Y[t2[1]] = function(e2) {
|
|
274
274
|
return this.$g(e2, t2[0], t2[1]);
|
|
275
275
|
};
|
|
276
276
|
})), O.extend = function(t2, e2) {
|
|
@@ -294,7 +294,7 @@ function requireDuration() {
|
|
|
294
294
|
!(function(t, s) {
|
|
295
295
|
module.exports = s();
|
|
296
296
|
})(duration$1, (function() {
|
|
297
|
-
var t, s, n = 1e3, i = 6e4, e = 36e5, r = 864e5, o =
|
|
297
|
+
var t, s, n = 1e3, i = 6e4, e = 36e5, r = 864e5, o = 31536e6, u = 2628e6, d = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, a = /\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g, h = { years: o, months: u, days: r, hours: e, minutes: i, seconds: n, milliseconds: 1, weeks: 6048e5 }, c = function(t2) {
|
|
298
298
|
return t2 instanceof g;
|
|
299
299
|
}, f = function(t2, s2, n2) {
|
|
300
300
|
return new g(t2, n2, s2.$l);
|
|
@@ -317,7 +317,7 @@ function requireDuration() {
|
|
|
317
317
|
i2.$d[m(s3)] = t2[s3];
|
|
318
318
|
})), this.calMilliseconds(), this;
|
|
319
319
|
if ("string" == typeof t2) {
|
|
320
|
-
var e2 = t2.match(
|
|
320
|
+
var e2 = t2.match(d);
|
|
321
321
|
if (e2) {
|
|
322
322
|
var r2 = e2.slice(2).map((function(t3) {
|
|
323
323
|
return null != t3 ? Number(t3) : 0;
|
|
@@ -335,7 +335,7 @@ function requireDuration() {
|
|
|
335
335
|
}), 0);
|
|
336
336
|
}, y2.parseFromMilliseconds = function() {
|
|
337
337
|
var t2 = this.$ms;
|
|
338
|
-
this.$d.years = $(t2 /
|
|
338
|
+
this.$d.years = $(t2 / o), t2 %= o, this.$d.months = $(t2 / u), t2 %= u, this.$d.days = $(t2 / r), t2 %= r, this.$d.hours = $(t2 / e), t2 %= e, this.$d.minutes = $(t2 / i), t2 %= i, this.$d.seconds = $(t2 / n), t2 %= n, this.$d.milliseconds = t2;
|
|
339
339
|
}, y2.toISOString = function() {
|
|
340
340
|
var t2 = v(this.$d.years, "Y"), s2 = v(this.$d.months, "M"), n2 = +this.$d.days || 0;
|
|
341
341
|
this.$d.weeks && (n2 += 7 * this.$d.weeks);
|
|
@@ -347,7 +347,7 @@ function requireDuration() {
|
|
|
347
347
|
return this.toISOString();
|
|
348
348
|
}, y2.format = function(t2) {
|
|
349
349
|
var n2 = t2 || "YYYY-MM-DDTHH:mm:ss", i2 = { Y: this.$d.years, YY: s.s(this.$d.years, 2, "0"), YYYY: s.s(this.$d.years, 4, "0"), M: this.$d.months, MM: s.s(this.$d.months, 2, "0"), D: this.$d.days, DD: s.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: s.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: s.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: s.s(this.$d.seconds, 2, "0"), SSS: s.s(this.$d.milliseconds, 3, "0") };
|
|
350
|
-
return n2.replace(
|
|
350
|
+
return n2.replace(a, (function(t3, s2) {
|
|
351
351
|
return s2 || String(i2[t3]);
|
|
352
352
|
}));
|
|
353
353
|
}, y2.as = function(t2) {
|