From a8df4d8f05578ede7fa70b9a94aa3e512943fc30 Mon Sep 17 00:00:00 2001 From: pubkey <8926560+pubkey@users.noreply.github.com> Date: Thu, 23 Mar 2023 14:20:40 +0100 Subject: [PATCH] 5.0.2 --- dist/es5node/leader-election-web-lock.js | 2 +- dist/esbrowser/leader-election-web-lock.js | 2 +- dist/esnode/leader-election-web-lock.js | 2 +- dist/lib/browser.js | 2 +- dist/lib/browser.min.js | 2 +- dist/lib/leader-election-web-lock.js | 2 +- docs/e2e.js | 2 +- docs/iframe.js | 2 +- docs/index.js | 2 +- docs/leader-iframe.js | 2 +- docs/worker.js | 2 +- package.json | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dist/es5node/leader-election-web-lock.js b/dist/es5node/leader-election-web-lock.js index f90a0b7b..051a5013 100644 --- a/dist/es5node/leader-election-web-lock.js +++ b/dist/es5node/leader-election-web-lock.js @@ -87,7 +87,7 @@ LeaderElectionWebLock.prototype = { this._wKMC.res(); } if (this._wKMC.c) { - this._wKMC.c.abort(); + this._wKMC.c.abort('LeaderElectionWebLock.die() called'); } return ret; } diff --git a/dist/esbrowser/leader-election-web-lock.js b/dist/esbrowser/leader-election-web-lock.js index 6e997553..c88d4820 100644 --- a/dist/esbrowser/leader-election-web-lock.js +++ b/dist/esbrowser/leader-election-web-lock.js @@ -81,7 +81,7 @@ LeaderElectionWebLock.prototype = { this._wKMC.res(); } if (this._wKMC.c) { - this._wKMC.c.abort(); + this._wKMC.c.abort('LeaderElectionWebLock.die() called'); } return ret; } diff --git a/dist/esnode/leader-election-web-lock.js b/dist/esnode/leader-election-web-lock.js index 6e997553..c88d4820 100644 --- a/dist/esnode/leader-election-web-lock.js +++ b/dist/esnode/leader-election-web-lock.js @@ -81,7 +81,7 @@ LeaderElectionWebLock.prototype = { this._wKMC.res(); } if (this._wKMC.c) { - this._wKMC.c.abort(); + this._wKMC.c.abort('LeaderElectionWebLock.die() called'); } return ret; } diff --git a/dist/lib/browser.js b/dist/lib/browser.js index 2c677e99..b925836f 100644 --- a/dist/lib/browser.js +++ b/dist/lib/browser.js @@ -489,7 +489,7 @@ LeaderElectionWebLock.prototype = { this._wKMC.res(); } if (this._wKMC.c) { - this._wKMC.c.abort(); + this._wKMC.c.abort('LeaderElectionWebLock.die() called'); } return ret; } diff --git a/dist/lib/browser.min.js b/dist/lib/browser.min.js index 45e5b690..a83d0f90 100644 --- a/dist/lib/browser.min.js +++ b/dist/lib/browser.min.js @@ -1 +1 @@ -!function o(r,i,s){function a(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return a(r[t][1][e]||e)},n,n.exports,o,r,i,s)}return i[t].exports}for(var u="function"==typeof require&&require,e=0;e=t&&e.fn(n.data)})},r=i.method.microSeconds(),i._prepP?i._prepP.then(function(){i._iL=!0,i.method.onMessage(i._state,o,r)}):(i._iL=!0,i.method.onMessage(i._state,o,r)))}function h(e,t,n){e._addEL[t]=e._addEL[t].filter(function(e){return e!==n});t=e;t._iL&&!d(t)&&(t._iL=!1,e=t.method.microSeconds(),t.method.onMessage(t._state,null,e))}(n.BroadcastChannel=o)._pubkey=!0,o.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return l(this,"message",e)},postInternal:function(e){return l(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};h(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,f(this,"message",t)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds();f(this,e,{time:n,fn:t})},removeEventListener:function(e,t){var n=this._addEL[e].find(function(e){return e.fn===t});h(this,e,n)},close:function(){var e,t=this;if(!this.closed)return u.delete(this),this.closed=!0,e=this._prepP||i.PROMISE_RESOLVED_VOID,this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(e){return e()}))}).then(function(){return t.method.close(t._state)})},get type(){return this.method.type},get isClosed(){return this.closed}}},{"./method-chooser.js":8,"./options.js":13,"./util.js":14}],2:[function(e,t,n){"use strict";var e=e("./index.es5.js"),o=e.BroadcastChannel,e=e.createLeaderElection;window.BroadcastChannel2=o,window.createLeaderElection=e},{"./index.es5.js":3}],3:[function(e,t,n){"use strict";e=e("./index.js");t.exports={BroadcastChannel:e.BroadcastChannel,createLeaderElection:e.createLeaderElection,clearNodeFolder:e.clearNodeFolder,enforceOptions:e.enforceOptions,beLeader:e.beLeader}},{"./index.js":4}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BroadcastChannel",{enumerable:!0,get:function(){return o.BroadcastChannel}}),Object.defineProperty(n,"OPEN_BROADCAST_CHANNELS",{enumerable:!0,get:function(){return o.OPEN_BROADCAST_CHANNELS}}),Object.defineProperty(n,"beLeader",{enumerable:!0,get:function(){return i.beLeader}}),Object.defineProperty(n,"clearNodeFolder",{enumerable:!0,get:function(){return o.clearNodeFolder}}),Object.defineProperty(n,"createLeaderElection",{enumerable:!0,get:function(){return r.createLeaderElection}}),Object.defineProperty(n,"enforceOptions",{enumerable:!0,get:function(){return o.enforceOptions}});var o=e("./broadcast-channel.js"),r=e("./leader-election.js"),i=e("./leader-election-util.js")},{"./broadcast-channel.js":1,"./leader-election-util.js":5,"./leader-election.js":7}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.beLeader=function(t){t.isLeader=!0,t._hasLeader=!0;function e(e){"leader"===e.context&&"apply"===e.action&&r(t,"tell"),"leader"!==e.context||"tell"!==e.action||t._dpLC||(t._dpLC=!0,t._dpL(),r(t,"tell"))}var n=(0,o.add)(function(){return t.die()});t._unl.push(n);return t.broadcastChannel.addEventListener("internal",e),t._lstns.push(e),r(t,"tell")},n.sendLeaderMessage=r;var o=e("unload");function r(e,t){t={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(t)}},{unload:19}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LeaderElectionWebLock=void 0;function o(e,t){var n=this;(this.broadcastChannel=e)._befC.push(function(){return n.die()}),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=(0,r.randomToken)(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name}var r=e("./util.js"),i=e("./leader-election-util.js");(n.LeaderElectionWebLock=o).prototype={hasLeader:function(){var t=this;return navigator.locks.query().then(function(e){e=e.held?e.held.filter(function(e){return e.name===t.lN}):[];return!!(e&&0s.token&&n(),"tell"===e.action)&&(n(),s._hasLeader=!0)}),r=i?4*s._options.responseTime:s._options.responseTime,(0,u.sendLeaderMessage)(s,"apply").then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).then(function(){return(0,u.sendLeaderMessage)(s,"apply")}).then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return s.broadcastChannel.removeEventListener("internal",o),!t&&(0,u.beLeader)(s).then(function(){return!0})}));var t,n,e,o,r}).then(function(){s._aplQC=s._aplQC-1}),this._aplQ.then(function(){return s.isLeader}))},awaitLeadership:function(){return this._aLP||(this._aLP=function(r){if(r.isLeader)return a.PROMISE_RESOLVED_VOID;return new Promise(function(e){var t=!1;function n(){t||(t=!0,r.broadcastChannel.removeEventListener("internal",o),e(!0))}r.applyOnce().then(function(){r.isLeader&&n()});(function e(){return(0,a.sleep)(r._options.fallbackInterval).then(function(){if(!r.isDead&&!t)return r.isLeader?void n():r.applyOnce(!0).then(function(){(r.isLeader?n:e)()})})})();var o=function(e){"leader"===e.context&&"death"===e.action&&(r._hasLeader=!1,r.applyOnce().then(function(){r.isLeader&&n()}))};r.broadcastChannel.addEventListener("internal",o),r._lstns.push(o)})}(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(e){return t.broadcastChannel.removeEventListener("internal",e)}),this._lstns=[],this._unl.forEach(function(e){return e.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,(0,u.sendLeaderMessage)(this,"death")}}},{"./leader-election-util.js":5,"./leader-election-web-lock.js":6,"./util.js":14}],8:[function(e,t,n){"use strict";e("@babel/runtime/helpers/typeof");Object.defineProperty(n,"__esModule",{value:!0}),n.chooseMethod=function(t){var e=[].concat(t.methods,s).filter(Boolean);if(t.type){if("simulate"===t.type)return i.SimulateMethod;var n=e.find(function(e){return e.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(e){return"idb"!==e.type}));n=e.find(function(e){return e.canBeUsed()});{if(n)return n;throw new Error("No usable method found in "+JSON.stringify(s.map(function(e){return e.type})))}};var n=e("./methods/native.js"),o=e("./methods/indexed-db.js"),r=e("./methods/localstorage.js"),i=e("./methods/simulate.js");var s=[n.NativeMethod,o.IndexedDBMethod,r.LocalstorageMethod]},{"./methods/indexed-db.js":9,"./methods/localstorage.js":10,"./methods/native.js":11,"./methods/simulate.js":12,"@babel/runtime/helpers/typeof":15}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TRANSACTION_SETTINGS=n.IndexedDBMethod=void 0,n.averageResponseTime=E,n.canBeUsed=y,n.cleanOldMessages=v,n.close=g,n.commitIndexedDBTransaction=d,n.create=_,n.createDatabase=u,n.getAllMessages=function(e){var n=e.transaction(c,"readonly",l),o=n.objectStore(c),r=[];return new Promise(function(t){o.openCursor().onsuccess=function(e){e=e.target.result;e?(r.push(e.value),e.continue()):(d(n),t(r))}})},n.getIdb=a,n.getMessagesHigherThan=h,n.getOldMessages=m,n.microSeconds=void 0,n.onMessage=L,n.postMessage=w,n.removeMessagesById=p,n.type=void 0,n.writeMessage=f;var r=e("../util.js"),i=e("oblivious-set"),s=e("../options.js"),e=r.microSeconds,o=(n.microSeconds=e,"pubkey.broadcast-channel-0-"),c="messages",l={durability:"relaxed"};n.TRANSACTION_SETTINGS=l;function a(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function d(e){e.commit&&e.commit()}function u(e){var n=a().open(o+e);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(c,{keyPath:"id",autoIncrement:!0})},new Promise(function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}})}function f(e,t,n){var o={uuid:t,time:(new Date).getTime(),data:n},r=e.transaction([c],"readwrite",l);return new Promise(function(e,t){r.oncomplete=function(){return e()},r.onerror=function(e){return t(e)},r.objectStore(c).add(o),d(r)})}function h(e,o){var r,i=e.transaction(c,"readonly",l),s=i.objectStore(c),a=[],u=IDBKeyRange.bound(o+1,1/0);return s.getAll?(r=s.getAll(u),new Promise(function(t,n){r.onerror=function(e){return n(e)},r.onsuccess=function(e){t(e.target.result)}})):new Promise(function(t,n){var e=function(){try{return u=IDBKeyRange.bound(o+1,1/0),s.openCursor(u)}catch(e){return s.openCursor()}}();e.onerror=function(e){return n(e)},e.onsuccess=function(e){e=e.target.result;e?e.value.idn.lastCursorId&&(n.lastCursorId=e.id),e}).filter(function(e){return t=n,(e=e).uuid!==t.uuid&&!(t.eMIs.has(e.id)||e.data.time=t&&e.fn(n.data)})},r=i.method.microSeconds(),i._prepP?i._prepP.then(function(){i._iL=!0,i.method.onMessage(i._state,o,r)}):(i._iL=!0,i.method.onMessage(i._state,o,r)))}function h(e,t,n){e._addEL[t]=e._addEL[t].filter(function(e){return e!==n});t=e;t._iL&&!d(t)&&(t._iL=!1,e=t.method.microSeconds(),t.method.onMessage(t._state,null,e))}(n.BroadcastChannel=o)._pubkey=!0,o.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return l(this,"message",e)},postInternal:function(e){return l(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};h(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,f(this,"message",t)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds();f(this,e,{time:n,fn:t})},removeEventListener:function(e,t){var n=this._addEL[e].find(function(e){return e.fn===t});h(this,e,n)},close:function(){var e,t=this;if(!this.closed)return u.delete(this),this.closed=!0,e=this._prepP||i.PROMISE_RESOLVED_VOID,this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(e){return e()}))}).then(function(){return t.method.close(t._state)})},get type(){return this.method.type},get isClosed(){return this.closed}}},{"./method-chooser.js":8,"./options.js":13,"./util.js":14}],2:[function(e,t,n){"use strict";var e=e("./index.es5.js"),o=e.BroadcastChannel,e=e.createLeaderElection;window.BroadcastChannel2=o,window.createLeaderElection=e},{"./index.es5.js":3}],3:[function(e,t,n){"use strict";e=e("./index.js");t.exports={BroadcastChannel:e.BroadcastChannel,createLeaderElection:e.createLeaderElection,clearNodeFolder:e.clearNodeFolder,enforceOptions:e.enforceOptions,beLeader:e.beLeader}},{"./index.js":4}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BroadcastChannel",{enumerable:!0,get:function(){return o.BroadcastChannel}}),Object.defineProperty(n,"OPEN_BROADCAST_CHANNELS",{enumerable:!0,get:function(){return o.OPEN_BROADCAST_CHANNELS}}),Object.defineProperty(n,"beLeader",{enumerable:!0,get:function(){return i.beLeader}}),Object.defineProperty(n,"clearNodeFolder",{enumerable:!0,get:function(){return o.clearNodeFolder}}),Object.defineProperty(n,"createLeaderElection",{enumerable:!0,get:function(){return r.createLeaderElection}}),Object.defineProperty(n,"enforceOptions",{enumerable:!0,get:function(){return o.enforceOptions}});var o=e("./broadcast-channel.js"),r=e("./leader-election.js"),i=e("./leader-election-util.js")},{"./broadcast-channel.js":1,"./leader-election-util.js":5,"./leader-election.js":7}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.beLeader=function(t){t.isLeader=!0,t._hasLeader=!0;function e(e){"leader"===e.context&&"apply"===e.action&&r(t,"tell"),"leader"!==e.context||"tell"!==e.action||t._dpLC||(t._dpLC=!0,t._dpL(),r(t,"tell"))}var n=(0,o.add)(function(){return t.die()});t._unl.push(n);return t.broadcastChannel.addEventListener("internal",e),t._lstns.push(e),r(t,"tell")},n.sendLeaderMessage=r;var o=e("unload");function r(e,t){t={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(t)}},{unload:19}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LeaderElectionWebLock=void 0;function o(e,t){var n=this;(this.broadcastChannel=e)._befC.push(function(){return n.die()}),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=(0,r.randomToken)(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name}var r=e("./util.js"),i=e("./leader-election-util.js");(n.LeaderElectionWebLock=o).prototype={hasLeader:function(){var t=this;return navigator.locks.query().then(function(e){e=e.held?e.held.filter(function(e){return e.name===t.lN}):[];return!!(e&&0s.token&&n(),"tell"===e.action)&&(n(),s._hasLeader=!0)}),r=i?4*s._options.responseTime:s._options.responseTime,(0,u.sendLeaderMessage)(s,"apply").then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).then(function(){return(0,u.sendLeaderMessage)(s,"apply")}).then(function(){return Promise.race([(0,a.sleep)(r),e.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return s.broadcastChannel.removeEventListener("internal",o),!t&&(0,u.beLeader)(s).then(function(){return!0})}));var t,n,e,o,r}).then(function(){s._aplQC=s._aplQC-1}),this._aplQ.then(function(){return s.isLeader}))},awaitLeadership:function(){return this._aLP||(this._aLP=function(r){if(r.isLeader)return a.PROMISE_RESOLVED_VOID;return new Promise(function(e){var t=!1;function n(){t||(t=!0,r.broadcastChannel.removeEventListener("internal",o),e(!0))}r.applyOnce().then(function(){r.isLeader&&n()});(function e(){return(0,a.sleep)(r._options.fallbackInterval).then(function(){if(!r.isDead&&!t)return r.isLeader?void n():r.applyOnce(!0).then(function(){(r.isLeader?n:e)()})})})();var o=function(e){"leader"===e.context&&"death"===e.action&&(r._hasLeader=!1,r.applyOnce().then(function(){r.isLeader&&n()}))};r.broadcastChannel.addEventListener("internal",o),r._lstns.push(o)})}(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(e){return t.broadcastChannel.removeEventListener("internal",e)}),this._lstns=[],this._unl.forEach(function(e){return e.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,(0,u.sendLeaderMessage)(this,"death")}}},{"./leader-election-util.js":5,"./leader-election-web-lock.js":6,"./util.js":14}],8:[function(e,t,n){"use strict";e("@babel/runtime/helpers/typeof");Object.defineProperty(n,"__esModule",{value:!0}),n.chooseMethod=function(t){var e=[].concat(t.methods,s).filter(Boolean);if(t.type){if("simulate"===t.type)return i.SimulateMethod;var n=e.find(function(e){return e.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(e){return"idb"!==e.type}));n=e.find(function(e){return e.canBeUsed()});{if(n)return n;throw new Error("No usable method found in "+JSON.stringify(s.map(function(e){return e.type})))}};var n=e("./methods/native.js"),o=e("./methods/indexed-db.js"),r=e("./methods/localstorage.js"),i=e("./methods/simulate.js");var s=[n.NativeMethod,o.IndexedDBMethod,r.LocalstorageMethod]},{"./methods/indexed-db.js":9,"./methods/localstorage.js":10,"./methods/native.js":11,"./methods/simulate.js":12,"@babel/runtime/helpers/typeof":15}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TRANSACTION_SETTINGS=n.IndexedDBMethod=void 0,n.averageResponseTime=E,n.canBeUsed=y,n.cleanOldMessages=v,n.close=g,n.commitIndexedDBTransaction=d,n.create=_,n.createDatabase=u,n.getAllMessages=function(e){var n=e.transaction(c,"readonly",l),o=n.objectStore(c),r=[];return new Promise(function(t){o.openCursor().onsuccess=function(e){e=e.target.result;e?(r.push(e.value),e.continue()):(d(n),t(r))}})},n.getIdb=a,n.getMessagesHigherThan=h,n.getOldMessages=m,n.microSeconds=void 0,n.onMessage=L,n.postMessage=w,n.removeMessagesById=p,n.type=void 0,n.writeMessage=f;var r=e("../util.js"),i=e("oblivious-set"),s=e("../options.js"),e=r.microSeconds,o=(n.microSeconds=e,"pubkey.broadcast-channel-0-"),c="messages",l={durability:"relaxed"};n.TRANSACTION_SETTINGS=l;function a(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function d(e){e.commit&&e.commit()}function u(e){var n=a().open(o+e);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(c,{keyPath:"id",autoIncrement:!0})},new Promise(function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}})}function f(e,t,n){var o={uuid:t,time:(new Date).getTime(),data:n},r=e.transaction([c],"readwrite",l);return new Promise(function(e,t){r.oncomplete=function(){return e()},r.onerror=function(e){return t(e)},r.objectStore(c).add(o),d(r)})}function h(e,o){var r,i=e.transaction(c,"readonly",l),s=i.objectStore(c),a=[],u=IDBKeyRange.bound(o+1,1/0);return s.getAll?(r=s.getAll(u),new Promise(function(t,n){r.onerror=function(e){return n(e)},r.onsuccess=function(e){t(e.target.result)}})):new Promise(function(t,n){var e=function(){try{return u=IDBKeyRange.bound(o+1,1/0),s.openCursor(u)}catch(e){return s.openCursor()}}();e.onerror=function(e){return n(e)},e.onsuccess=function(e){e=e.target.result;e?e.value.idn.lastCursorId&&(n.lastCursorId=e.id),e}).filter(function(e){return t=n,(e=e).uuid!==t.uuid&&!(t.eMIs.has(e.id)||e.data.time