@blackglory/structures 0.10.20 → 0.10.21
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/README.md +1 -1
- package/dist/es2015/index.min.mjs +1 -1
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +35 -23
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +35 -23
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +1 -1
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +1 -1
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +35 -23
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +35 -23
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +1 -1
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/bit-set.js +11 -19
- package/lib/es2015/bit-set.js.map +1 -1
- package/lib/es2015/typed-bit-set.js +3 -3
- package/lib/es2015/typed-bit-set.js.map +1 -1
- package/lib/es2015/utils/bit-scan.d.ts +1 -0
- package/lib/es2015/utils/bit-scan.js +14 -0
- package/lib/es2015/utils/bit-scan.js.map +1 -0
- package/lib/es2015/utils/trailing-zeros.d.ts +1 -0
- package/lib/es2015/utils/trailing-zeros.js +14 -0
- package/lib/es2015/utils/trailing-zeros.js.map +1 -0
- package/lib/es2018/bit-set.js +11 -19
- package/lib/es2018/bit-set.js.map +1 -1
- package/lib/es2018/typed-bit-set.js +3 -3
- package/lib/es2018/typed-bit-set.js.map +1 -1
- package/lib/es2018/utils/bit-scan.d.ts +1 -0
- package/lib/es2018/utils/bit-scan.js +14 -0
- package/lib/es2018/utils/bit-scan.js.map +1 -0
- package/lib/es2018/utils/trailing-zeros.d.ts +1 -0
- package/lib/es2018/utils/trailing-zeros.js +14 -0
- package/lib/es2018/utils/trailing-zeros.js.map +1 -0
- package/package.json +1 -1
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var go=function(t,e){return(go=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function xo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}go(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function wo(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function To(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function _o(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function So(t){return"function"==typeof t}function Ao(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Io=Ao((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Eo(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Oo=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=wo(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(So(u))try{u()}catch(t){i=t instanceof Io?t.errors:[t]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=wo(c),h=l.next();!h.done;h=l.next()){var f=h.value;try{ko(f)}catch(t){i=null!=i?i:[],t instanceof Io?i=_o(_o([],To(i)),To(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{h&&!h.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new Io(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)ko(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Eo(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Eo(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),Po=Oo.EMPTY;function jo(t){return t instanceof Oo||t&&"closed"in t&&So(t.remove)&&So(t.add)&&So(t.unsubscribe)}function ko(t){So(t)?t():t.unsubscribe()}var No={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Mo=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,_o([t,e],To(n)))};function Bo(){}function Co(t){t()}var zo=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,jo(e)&&e.add(n)):n.destination=Ro,n}return xo(e,t),e.create=function(t,e,n){return new Vo(t,e,n)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Oo),Fo=Function.prototype.bind;function qo(t,e){return Fo.call(t,e)}var Do=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Uo(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Uo(t)}else Uo(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Uo(t)}},t}(),Vo=function(t){function e(e,n,r){var i,o,s=t.call(this)||this;So(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&No.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&qo(e.next,o),error:e.error&&qo(e.error,o),complete:e.complete&&qo(e.complete,o)}):i=e;return s.destination=new Do(i),s}return xo(e,t),e}(zo);function Uo(t){var e;e=t,Mo((function(){throw e}))}var Ro={closed:!0,next:Bo,error:function(t){throw t},complete:Bo},Lo="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ko(t){return t}function Jo(t){return 0===t.length?Ko:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Wo=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof zo||function(t){return t&&So(t.next)&&So(t.error)&&So(t.complete)}(r)&&jo(r)?t:new Vo(t,e,n);return Co((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=Yo(e))((function(e,r){var i=new Vo({next:function(e){try{t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e});n.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Lo]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Jo(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Yo(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function Yo(t){var e;return null!==(e=null!=t?t:No.Promise)&&void 0!==e?e:Promise}function Ho(t){return So(null==t?void 0:t.lift)}function $o(t,e,n,r,i){return new Qo(t,e,n,r,i)}var Qo=function(t){function e(e,n,r,i,o,s){var a=t.call(this,e)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}return xo(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(zo);function Xo(){return t=function(t,e){var n=null;t._refCount++;var r=$o(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)n=null;else{var r=t._connection,i=n;n=null,!r||i&&r!==i||r.unsubscribe(),e.unsubscribe()}}));t.subscribe(r),r.closed||(n=t.connect())},function(e){if(Ho(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")};var t}!function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,Ho(e)&&(r.lift=e.lift),r}xo(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new Oo;var n=this.getSubject();e.add(this.source.subscribe($o(n,void 0,(function(){t._teardown(),n.complete()}),(function(e){t._teardown(),n.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=Oo.EMPTY)}return e},e.prototype.refCount=function(){return Xo()(this)}}(Wo);var Go,Zo,ts={now:function(){return(ts.delegate||performance).now()},delegate:void 0},es={schedule:function(t){var e=requestAnimationFrame,n=cancelAnimationFrame,r=e((function(e){n=void 0,t(e)}));return new Oo((function(){return null==n?void 0:n(r)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=es.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,_o([],To(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,_o([],To(t)))},delegate:void 0};Zo=es.schedule,new Wo((function(t){var e=new Oo,n=Go||ts,r=n.now(),i=function(o){var s=n.now();t.next({timestamp:Go?s:o,elapsed:s-r}),t.closed||e.add(Zo(i))};return e.add(Zo(i)),e}));var ns=Ao((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),rs=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return xo(e,t),e.prototype.lift=function(t){var e=new is(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new ns},e.prototype.next=function(t){var e=this;Co((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=wo(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Co((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Co((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?Po:(this.currentObservers=null,o.push(t),new Oo((function(){e.currentObservers=null,Eo(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new Wo;return t.source=this,t},e.create=function(t,e){return new is(t,e)},e}(Wo),is=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return xo(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:Po},e}(rs);!function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}xo(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){var t=this,e=t.hasError,n=t.thrownError,r=t._value;if(e)throw n;return this._throwIfClosed(),r},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(rs);var os={now:function(){return(os.delegate||Date).now()},delegate:void 0};!function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=os);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}xo(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var s=n.now(),a=0,u=1;u<r.length&&r[u]<=s;u+=2)a=u;a&&r.splice(0,a+1)}}}(rs),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}xo(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e._hasValue,i=e._value,o=e.thrownError,s=e.isStopped,a=e._isComplete;n?t.error(o):(s||a)&&(r&&t.next(i),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,n=e._hasValue,r=e._value;e._isComplete||(this._isComplete=!0,n&&t.prototype.next.call(this,r),t.prototype.complete.call(this))}}(rs);var ss,as=function(t){function e(e,n){return t.call(this)||this}return xo(e,t),e.prototype.schedule=function(t,e){return this},e}(Oo),us=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,_o([t,e],To(n)))},cs=function(t){return clearInterval(t)},ls=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return xo(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),us(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;cs(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=t||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Eo(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(as),hs=1,fs={};function ds(t){return t in fs&&(delete fs[t],!0)}var ys=function(t){var e=hs++;return fs[e]=!0,ss||(ss=Promise.resolve()),ss.then((function(){return ds(e)&&t()})),e},ps=function(t){ds(t)},vs={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=vs.delegate;return((null==n?void 0:n.setImmediate)||ys).apply(void 0,_o([],To(t)))},clearImmediate:function(t){return ps(t)},delegate:void 0},ms=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return xo(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=vs.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(vs.clearImmediate(n),e._scheduled=void 0)},e}(ls),bs=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=os.now,t}(),gs=function(t){function e(e,n){void 0===n&&(n=bs.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return xo(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(bs);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xo(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(gs))(ms),new gs(ls);var xs=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return xo(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(ls);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xo(e,t),e}(gs))(xs);var ws=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return xo(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=es.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(es.cancelAnimationFrame(n),e._scheduled=void 0)},e}(ls);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xo(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(gs))(ws),function(t){function e(e,n){void 0===e&&(e=_s),void 0===n&&(n=1/0);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}xo(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(gs);var Ts,_s=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return xo(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)}return Oo.EMPTY},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(ls);new Wo((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(Ts||(Ts={})),Ao((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),Ao((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),Ao((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),Ao((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),Ao((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new Wo(Bo);class Ss extends mo{constructor(){super(...arguments),this.stateChanges=new rs}get[Symbol.toStringTag](){return this.constructor.name}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const n=this.state;this.stateChanges.next({event:t,oldState:e,newState:n}),r.isEmptyObject(this.schema[n])&&this.stateChanges.complete()}}class As{constructor(t=[]){this.indexToValue=[];const e=[];if(t.length>0)for(const[n,r]of t.entries())e[r]=n;this.valueToIndex=e}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.indexToValue[Symbol.iterator]()}values(){return this.indexToValue[Symbol.iterator]()}has(t){return t in this.valueToIndex}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){if(this.has(t)){const e=this.indexToValue.pop();if(t===e)delete this.valueToIndex[t];else{const n=this.valueToIndex[t];this.indexToValue[n]=e,this.valueToIndex[e]=n,delete this.valueToIndex[t]}return!0}return!1}}class Is{constructor(){this.keyToIndex=[],this.indexToKey=[],this.indexToValue=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.indexToKey.length}get internalArray(){return this.indexToValue}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue[t]]}keys(){return this.indexToKey.values()}values(){return this.indexToValue.values()}getInternalIndexOfKey(t){return this.keyToIndex[t]}has(t){return t in this.keyToIndex}get(t){if(this.has(t)){const e=this.keyToIndex[t];return this.indexToValue[e]}}set(t,e){if(this.has(t)){const n=this.keyToIndex[t];this.indexToValue[n]=e}else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){if(this.has(t)){const e=this.indexToKey.pop(),n=this.indexToValue.pop();if(t===e)delete this.keyToIndex[t];else{const r=this.keyToIndex[t];this.indexToKey[r]=e,this.indexToValue[r]=n,this.keyToIndex[e]=r,delete this.keyToIndex[t]}}}}class Es{constructor(t){this.keyToIndex=[],this.indexToKey=[],co.assert(0===t.length,"array should be empty"),this.indexToValue=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.indexToKey.length}get internalTypedArray(){return this.indexToValue.internalTypedArray}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue.internalTypedArray[t]]}keys(){return this.indexToKey.values()}*values(){for(let t=0;t<this.indexToKey.length;t++)yield this.indexToValue.internalTypedArray[t]}getInternalIndexOfKey(t){return this.keyToIndex[t]}has(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t}get(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t?this.indexToValue.internalTypedArray[e]:void 0}set(t,e){const n=this.keyToIndex[t];if(this.indexToKey[n]===t)this.indexToValue.internalTypedArray[n]=e;else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){const e=this.keyToIndex[t];if(this.indexToKey[e]===t){const n=this.indexToKey.pop(),r=this.indexToValue.pop();t!==n&&(this.indexToKey[e]=n,this.indexToValue.internalTypedArray[e]=r,this.keyToIndex[n]=e)}}}class Os{constructor(t){const e=[];if(t.length>0)for(const[n,r]of t.internalTypedArray.entries())e[r]=n;this.indexToValue=t,this.valueToIndex=e}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}*values(){for(let t=0;t<this.indexToValue.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const e=this.valueToIndex[t];return this.indexToValue.internalTypedArray[e]===t}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){const e=this.valueToIndex[t];if(this.indexToValue.internalTypedArray[e]===t){const n=this.indexToValue.pop();return t!==n&&(this.indexToValue.internalTypedArray[e]=n,this.valueToIndex[n]=e),!0}return!1}}class Ps{constructor(t,{capacity:e=0,growthFactor:n=1.5}={}){this.typedArrayConstructor=t,this._length=0,co.assert(Number.isInteger(e),"capacity must be an integer"),co.assert(e>=0,"capacity must be greater than or equal to 0"),co.assert(n>=1,"growthFactory must be greater than or equal to 1"),this.array=new t(e),this.growthFactor=n}get internalTypedArray(){return this.array}get[Symbol.toStringTag](){return this.constructor.name}get BYTES_PER_ELEMENT(){return this.typedArrayConstructor.BYTES_PER_ELEMENT}get capacity(){return this.array.length}get length(){return this._length}set(t,e){if(t>=this.capacity){const e=js(this.capacity,t+1,this.growthFactor);this.resize(e)}t>=this._length&&(this._length=t+1),this.array[t]=e}get(t){return t<this._length?this.array[t]:void 0}push(...t){const e=this._length+t.length;if(e>this.capacity){const t=js(this.capacity,e,this.growthFactor);this.resize(t)}for(const e of t)this.array[this._length++]=e}pop(){if(this._length>0){const t=this.array[this._length-1];this._length--;const e=js(this.capacity,this.length,this.growthFactor);return this.resize(e),t}}sort(t){const e=this.capacity;this.resize(this.length),this.array.sort(t),this.resize(e)}resize(t){if(this.array.length!==t)if(this.array.length<t){const e=new this.typedArrayConstructor(t);e.set(this.array),this.array=e}else if(this.array.length>t){const e=new this.typedArrayConstructor(t);for(let n=t;n--;)e[n]=this.array[n];this.array=e}}}function js(t,e,n){if(1===n)return e;if(t===e)return e;if(t<e){let r=Math.max(t,1);for(;r<e;)r*=n;return Math.floor(r)}if(0===e)return 0;{let r=t;for(;;){const t=r/n;if(t<e)break;r=t}return Math.floor(r)}}class ks{constructor(t){this.value=t,this.previous=null,this.next=null,this.up=null,this.down=null}}class Ns{constructor(t){this.compare=t,this.head=new ks(null),this.tail=new ks(null),this.height=0,this._size=0,this.head.next=this.tail,this.tail.previous=this.head}get size(){return this._size}*elements(){let t=this.head;for(;t.down;)t=t.down;for(;t.next&&r.isntNull(t.next.value);)t=t.next,yield t}dumpList(){const t=[];let e=this.head;do{t.push([]);let n=e;do{t[t.length-1].push(n.value),n=n.next}while(n)}while(e=e.down);return t}delete(t){let e=this.findNode(t);for(;e;)e.previous.next=e.next,e.next.previous=e.previous,e=e.down;this._size--}has(t){return r.isntNull(this.findNode(t))}findNode(t){let e=this.head;for(;;){for(;e.next&&r.isntNull(e.next.value);){const n=this.compare(e.next.value,t);if(0===n)return e.next;if(!(n<0))break;e=e.next}if(!e.down)return null;e=e.down}}add(t){let e=this.findPreviousNode(t);if(e.next&&r.isntNull(e.next.value)&&0===this.compare(e.next.value,t))return;let n=new ks(t);e.next&&(n.next=e.next,e.next.previous=n),e.next=n,n.previous=e;let i=0;for(;Math.random()<.5;){if(i===this.height){const t=new ks(null),e=new ks(null);t.next=e,t.down=this.head,e.previous=t,e.down=this.tail,this.head.up=t,this.tail.up=e,this.head=t,this.tail=e,this.height++}for(;!e.up;)e=e.previous;e=e.up;const r=new ks(t);e.next&&(r.next=e.next,e.next.previous=r),e.next=r,r.previous=e,r.down=n,n.up=r,n=r,i++}this._size++}findPreviousNode(t){let e=this.head;for(;;){for(;e.next&&r.isntNull(e.next.value);){if(this.compare(e.next.value,t)>=0)break;e=e.next}if(!e.down)return e;e=e.down}}}class Ms{constructor(t){this.skipList=new Ns(t)}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}values(){return lo.map(this.skipList.elements(),(t=>t.value))}has(t){return this.skipList.has(t)}add(t){this.skipList.add(t)}delete(t){this.skipList.delete(t)}}class Bs{constructor(t=32){this.bitsPerElement=t,this.array=[],this.length=0,this._size=0,co.assert(Number.isInteger(t),"The parameter bitsPerElement must be an integer"),co.assert(t>0,"The parameter bitsPerElement must be greater than 0"),co.assert(t<=32,"The mask of bitsPerElement must be less than or equal to 32")}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this._size}[Symbol.iterator](){return this.values()}*values(){if(this.length>0){const t=Math.ceil(this.length/this.bitsPerElement),e=this.bitsPerElement-(t*this.bitsPerElement-this.length),n=t-1;for(let t=0;t<n;t++){let e=this.array[t];for(let n=0;n<this.bitsPerElement;n++)1&e&&(yield t*this.bitsPerElement+n),e>>=1}let r=this.array[t-1];for(let t=0;t<e;t++)1&r&&(yield n*this.bitsPerElement+t),r>>=1}}_dumpBinaryStrings(){const t=[];for(let e=0;e<this.array.length;e++){const n=this.array[e].toString(2);n.length<this.bitsPerElement?t.push("0".repeat(this.bitsPerElement-n.length)+n):t.push(n)}return t}has(t){var e;const[n,r]=this.getPosition(t);return((null!==(e=this.array[n])&&void 0!==e?e:0)&r)===r}add(t){var e;co.assert(t>=0,"value must be greater than or equal to 0"),t>=this.length&&(this.length=t+1);const[n,r]=this.getPosition(t),i=null!==(e=this.array[n])&&void 0!==e?e:0;this.array[n]=i|r;(i&r)!==r&&this._size++}delete(t){var e;const[n,r]=this.getPosition(t),i=null!==(e=this.array[n])&&void 0!==e?e:0;this.array[n]=i&~r;const o=(i&r)===r;return o&&this._size--,o}clear(){for(let t=this.array.length;t--;)this.array[t]=0}getPosition(t){const e=t%this.bitsPerElement;return[(t-e)/this.bitsPerElement,this.getMask(e)]}getMask(t){return 1<<t}}class Cs{constructor(t){this.array=t,this.length=0,this._size=0;const e=8*t.BYTES_PER_ELEMENT;co.assert(Number.isInteger(e),"The parameter bitsPerElement must be an integer"),co.assert(e>0,"The parameter bitsPerElement must be greater than 0"),co.assert(e<=32,"The mask of bitsPerElement must be less than or equal to 32"),this.bitsPerElement=e}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this._size}[Symbol.iterator](){return this.values()}*values(){if(this.length>0){const t=Math.ceil(this.length/this.bitsPerElement),e=this.bitsPerElement-(t*this.bitsPerElement-this.length),n=t-1;for(let t=0;t<n;t++){let e=this.array.internalTypedArray[t];for(let n=0;n<this.bitsPerElement;n++)1&e&&(yield t*this.bitsPerElement+n),e>>=1}let r=this.array.internalTypedArray[t-1];for(let t=0;t<e;t++)1&r&&(yield n*this.bitsPerElement+t),r>>=1}}_dumpBinaryStrings(){const t=[];for(let e=0;e<this.array.length;e++){const n=this.array.internalTypedArray[e].toString(2);n.length<this.bitsPerElement?t.push("0".repeat(this.bitsPerElement-n.length)+n):t.push(n)}return t}has(t){var e;const[n,r]=this.getPosition(t);return((null!==(e=this.array.get(n))&&void 0!==e?e:0)&r)===r}add(t){var e;co.assert(t>=0,"value must be greater than or equal to 0"),t>=this.length&&(this.length=t+1);const[n,r]=this.getPosition(t),i=null!==(e=this.array.get(n))&&void 0!==e?e:0;this.array.set(n,i|r);(i&r)!==r&&this._size++}delete(t){var e;const[n,r]=this.getPosition(t),i=null!==(e=this.array.get(n))&&void 0!==e?e:0;this.array.set(n,i&~r);const o=(i&r)===r;return o&&this._size--,o}clear(){for(let t=this.array.length;t--;)this.array.set(t,0)}getPosition(t){const e=t%this.bitsPerElement;return[(t-e)/this.bitsPerElement,this.getMask(e)]}getMask(t){return 1<<t}}t.BadEventError=bo,t.BitSet=Bs,t.Box=e,t.DynamicTypedArray=Ps,t.Emitter=Bt,t.ExpirableMap=fo,t.FiniteStateMachine=mo,t.HashMap=Ct,t.HashSet=zt,t.LRUMap=ho,t.ObservableFiniteStateMachine=Ss,t.Queue=Ft,t.SortedSet=Ms,t.SparseMap=Is,t.SparseSet=As,t.TLRUMap=yo,t.TrieMap=vo,t.TypedBitSet=Cs,t.TypedSparseMap=Es,t.TypedSparseSet=Os,t.convertArrayToCons=function t([e,...n]){return[e,n.length?t(n):null]},t.convertConsToArray=function t([e,n]){return r.isNull(n)?[e]:[e,...t(n)]},t.sliceArrayLeft=function(t,e){return t.slice(0,e)},t.sliceArrayRight=function(t,e){const n=t.length-e;return t.slice(n>=0?n:0)},t.truncateArrayLeft=function(t,e){t.length>e&&(t.length=e)},t.truncateArrayRight=function(t,e){const n=t.length-e;t.splice(0,n)},Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */var go=function(t,e){return(go=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function xo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}go(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function wo(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function To(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function _o(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function So(t){return"function"==typeof t}function Ao(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Io=Ao((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Eo(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Oo=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=wo(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(So(u))try{u()}catch(t){i=t instanceof Io?t.errors:[t]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=wo(c),h=l.next();!h.done;h=l.next()){var f=h.value;try{ko(f)}catch(t){i=null!=i?i:[],t instanceof Io?i=_o(_o([],To(i)),To(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{h&&!h.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new Io(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)ko(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Eo(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Eo(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),Po=Oo.EMPTY;function jo(t){return t instanceof Oo||t&&"closed"in t&&So(t.remove)&&So(t.add)&&So(t.unsubscribe)}function ko(t){So(t)?t():t.unsubscribe()}var No={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Mo=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,_o([t,e],To(n)))};function Bo(){}function Co(t){t()}var zo=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,jo(e)&&e.add(n)):n.destination=Ro,n}return xo(e,t),e.create=function(t,e,n){return new Vo(t,e,n)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Oo),Fo=Function.prototype.bind;function qo(t,e){return Fo.call(t,e)}var Do=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Uo(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Uo(t)}else Uo(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Uo(t)}},t}(),Vo=function(t){function e(e,n,r){var i,o,s=t.call(this)||this;So(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&No.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&qo(e.next,o),error:e.error&&qo(e.error,o),complete:e.complete&&qo(e.complete,o)}):i=e;return s.destination=new Do(i),s}return xo(e,t),e}(zo);function Uo(t){var e;e=t,Mo((function(){throw e}))}var Ro={closed:!0,next:Bo,error:function(t){throw t},complete:Bo},Lo="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ko(t){return t}function Jo(t){return 0===t.length?Ko:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Wo=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof zo||function(t){return t&&So(t.next)&&So(t.error)&&So(t.complete)}(r)&&jo(r)?t:new Vo(t,e,n);return Co((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=Yo(e))((function(e,r){var i=new Vo({next:function(e){try{t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e});n.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Lo]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Jo(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Yo(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function Yo(t){var e;return null!==(e=null!=t?t:No.Promise)&&void 0!==e?e:Promise}function Ho(t){return So(null==t?void 0:t.lift)}function $o(t,e,n,r,i){return new Qo(t,e,n,r,i)}var Qo=function(t){function e(e,n,r,i,o,s){var a=t.call(this,e)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}return xo(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(zo);function Xo(){return t=function(t,e){var n=null;t._refCount++;var r=$o(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)n=null;else{var r=t._connection,i=n;n=null,!r||i&&r!==i||r.unsubscribe(),e.unsubscribe()}}));t.subscribe(r),r.closed||(n=t.connect())},function(e){if(Ho(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")};var t}!function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,Ho(e)&&(r.lift=e.lift),r}xo(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new Oo;var n=this.getSubject();e.add(this.source.subscribe($o(n,void 0,(function(){t._teardown(),n.complete()}),(function(e){t._teardown(),n.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=Oo.EMPTY)}return e},e.prototype.refCount=function(){return Xo()(this)}}(Wo);var Go,Zo,ts={now:function(){return(ts.delegate||performance).now()},delegate:void 0},es={schedule:function(t){var e=requestAnimationFrame,n=cancelAnimationFrame,r=e((function(e){n=void 0,t(e)}));return new Oo((function(){return null==n?void 0:n(r)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=es.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,_o([],To(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,_o([],To(t)))},delegate:void 0};Zo=es.schedule,new Wo((function(t){var e=new Oo,n=Go||ts,r=n.now(),i=function(o){var s=n.now();t.next({timestamp:Go?s:o,elapsed:s-r}),t.closed||e.add(Zo(i))};return e.add(Zo(i)),e}));var ns=Ao((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),rs=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return xo(e,t),e.prototype.lift=function(t){var e=new is(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new ns},e.prototype.next=function(t){var e=this;Co((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=wo(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Co((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Co((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?Po:(this.currentObservers=null,o.push(t),new Oo((function(){e.currentObservers=null,Eo(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new Wo;return t.source=this,t},e.create=function(t,e){return new is(t,e)},e}(Wo),is=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return xo(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:Po},e}(rs);!function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}xo(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){var t=this,e=t.hasError,n=t.thrownError,r=t._value;if(e)throw n;return this._throwIfClosed(),r},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(rs);var os={now:function(){return(os.delegate||Date).now()},delegate:void 0};!function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=os);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}xo(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var s=n.now(),a=0,u=1;u<r.length&&r[u]<=s;u+=2)a=u;a&&r.splice(0,a+1)}}}(rs),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}xo(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e._hasValue,i=e._value,o=e.thrownError,s=e.isStopped,a=e._isComplete;n?t.error(o):(s||a)&&(r&&t.next(i),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,n=e._hasValue,r=e._value;e._isComplete||(this._isComplete=!0,n&&t.prototype.next.call(this,r),t.prototype.complete.call(this))}}(rs);var ss,as=function(t){function e(e,n){return t.call(this)||this}return xo(e,t),e.prototype.schedule=function(t,e){return this},e}(Oo),us=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,_o([t,e],To(n)))},cs=function(t){return clearInterval(t)},ls=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return xo(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),us(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;cs(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=t||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Eo(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(as),hs=1,fs={};function ds(t){return t in fs&&(delete fs[t],!0)}var ys=function(t){var e=hs++;return fs[e]=!0,ss||(ss=Promise.resolve()),ss.then((function(){return ds(e)&&t()})),e},ps=function(t){ds(t)},vs={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=vs.delegate;return((null==n?void 0:n.setImmediate)||ys).apply(void 0,_o([],To(t)))},clearImmediate:function(t){return ps(t)},delegate:void 0},ms=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return xo(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=vs.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(vs.clearImmediate(n),e._scheduled=void 0)},e}(ls),bs=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=os.now,t}(),gs=function(t){function e(e,n){void 0===n&&(n=bs.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return xo(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(bs);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xo(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(gs))(ms),new gs(ls);var xs=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return xo(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(ls);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xo(e,t),e}(gs))(xs);var ws=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return xo(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=es.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(es.cancelAnimationFrame(n),e._scheduled=void 0)},e}(ls);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xo(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(gs))(ws),function(t){function e(e,n){void 0===e&&(e=_s),void 0===n&&(n=1/0);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}xo(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(gs);var Ts,_s=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return xo(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)}return Oo.EMPTY},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(ls);new Wo((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(Ts||(Ts={})),Ao((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),Ao((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),Ao((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),Ao((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),Ao((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new Wo(Bo);class Ss extends mo{constructor(){super(...arguments),this.stateChanges=new rs}get[Symbol.toStringTag](){return this.constructor.name}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const n=this.state;this.stateChanges.next({event:t,oldState:e,newState:n}),r.isEmptyObject(this.schema[n])&&this.stateChanges.complete()}}class As{constructor(t=[]){this.indexToValue=[];const e=[];if(t.length>0)for(const[n,r]of t.entries())e[r]=n;this.valueToIndex=e}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.indexToValue[Symbol.iterator]()}values(){return this.indexToValue[Symbol.iterator]()}has(t){return t in this.valueToIndex}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){if(this.has(t)){const e=this.indexToValue.pop();if(t===e)delete this.valueToIndex[t];else{const n=this.valueToIndex[t];this.indexToValue[n]=e,this.valueToIndex[e]=n,delete this.valueToIndex[t]}return!0}return!1}}class Is{constructor(){this.keyToIndex=[],this.indexToKey=[],this.indexToValue=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.indexToKey.length}get internalArray(){return this.indexToValue}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue[t]]}keys(){return this.indexToKey.values()}values(){return this.indexToValue.values()}getInternalIndexOfKey(t){return this.keyToIndex[t]}has(t){return t in this.keyToIndex}get(t){if(this.has(t)){const e=this.keyToIndex[t];return this.indexToValue[e]}}set(t,e){if(this.has(t)){const n=this.keyToIndex[t];this.indexToValue[n]=e}else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){if(this.has(t)){const e=this.indexToKey.pop(),n=this.indexToValue.pop();if(t===e)delete this.keyToIndex[t];else{const r=this.keyToIndex[t];this.indexToKey[r]=e,this.indexToValue[r]=n,this.keyToIndex[e]=r,delete this.keyToIndex[t]}}}}class Es{constructor(t){this.keyToIndex=[],this.indexToKey=[],co.assert(0===t.length,"array should be empty"),this.indexToValue=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.indexToKey.length}get internalTypedArray(){return this.indexToValue.internalTypedArray}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue.internalTypedArray[t]]}keys(){return this.indexToKey.values()}*values(){for(let t=0;t<this.indexToKey.length;t++)yield this.indexToValue.internalTypedArray[t]}getInternalIndexOfKey(t){return this.keyToIndex[t]}has(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t}get(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t?this.indexToValue.internalTypedArray[e]:void 0}set(t,e){const n=this.keyToIndex[t];if(this.indexToKey[n]===t)this.indexToValue.internalTypedArray[n]=e;else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){const e=this.keyToIndex[t];if(this.indexToKey[e]===t){const n=this.indexToKey.pop(),r=this.indexToValue.pop();t!==n&&(this.indexToKey[e]=n,this.indexToValue.internalTypedArray[e]=r,this.keyToIndex[n]=e)}}}class Os{constructor(t){const e=[];if(t.length>0)for(const[n,r]of t.internalTypedArray.entries())e[r]=n;this.indexToValue=t,this.valueToIndex=e}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}*values(){for(let t=0;t<this.indexToValue.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const e=this.valueToIndex[t];return this.indexToValue.internalTypedArray[e]===t}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){const e=this.valueToIndex[t];if(this.indexToValue.internalTypedArray[e]===t){const n=this.indexToValue.pop();return t!==n&&(this.indexToValue.internalTypedArray[e]=n,this.valueToIndex[n]=e),!0}return!1}}class Ps{constructor(t,{capacity:e=0,growthFactor:n=1.5}={}){this.typedArrayConstructor=t,this._length=0,co.assert(Number.isInteger(e),"capacity must be an integer"),co.assert(e>=0,"capacity must be greater than or equal to 0"),co.assert(n>=1,"growthFactory must be greater than or equal to 1"),this.array=new t(e),this.growthFactor=n}get internalTypedArray(){return this.array}get[Symbol.toStringTag](){return this.constructor.name}get BYTES_PER_ELEMENT(){return this.typedArrayConstructor.BYTES_PER_ELEMENT}get capacity(){return this.array.length}get length(){return this._length}set(t,e){if(t>=this.capacity){const e=js(this.capacity,t+1,this.growthFactor);this.resize(e)}t>=this._length&&(this._length=t+1),this.array[t]=e}get(t){return t<this._length?this.array[t]:void 0}push(...t){const e=this._length+t.length;if(e>this.capacity){const t=js(this.capacity,e,this.growthFactor);this.resize(t)}for(const e of t)this.array[this._length++]=e}pop(){if(this._length>0){const t=this.array[this._length-1];this._length--;const e=js(this.capacity,this.length,this.growthFactor);return this.resize(e),t}}sort(t){const e=this.capacity;this.resize(this.length),this.array.sort(t),this.resize(e)}resize(t){if(this.array.length!==t)if(this.array.length<t){const e=new this.typedArrayConstructor(t);e.set(this.array),this.array=e}else if(this.array.length>t){const e=new this.typedArrayConstructor(t);for(let n=t;n--;)e[n]=this.array[n];this.array=e}}}function js(t,e,n){if(1===n)return e;if(t===e)return e;if(t<e){let r=Math.max(t,1);for(;r<e;)r*=n;return Math.floor(r)}if(0===e)return 0;{let r=t;for(;;){const t=r/n;if(t<e)break;r=t}return Math.floor(r)}}class ks{constructor(t){this.value=t,this.previous=null,this.next=null,this.up=null,this.down=null}}class Ns{constructor(t){this.compare=t,this.head=new ks(null),this.tail=new ks(null),this.height=0,this._size=0,this.head.next=this.tail,this.tail.previous=this.head}get size(){return this._size}*elements(){let t=this.head;for(;t.down;)t=t.down;for(;t.next&&r.isntNull(t.next.value);)t=t.next,yield t}dumpList(){const t=[];let e=this.head;do{t.push([]);let n=e;do{t[t.length-1].push(n.value),n=n.next}while(n)}while(e=e.down);return t}delete(t){let e=this.findNode(t);for(;e;)e.previous.next=e.next,e.next.previous=e.previous,e=e.down;this._size--}has(t){return r.isntNull(this.findNode(t))}findNode(t){let e=this.head;for(;;){for(;e.next&&r.isntNull(e.next.value);){const n=this.compare(e.next.value,t);if(0===n)return e.next;if(!(n<0))break;e=e.next}if(!e.down)return null;e=e.down}}add(t){let e=this.findPreviousNode(t);if(e.next&&r.isntNull(e.next.value)&&0===this.compare(e.next.value,t))return;let n=new ks(t);e.next&&(n.next=e.next,e.next.previous=n),e.next=n,n.previous=e;let i=0;for(;Math.random()<.5;){if(i===this.height){const t=new ks(null),e=new ks(null);t.next=e,t.down=this.head,e.previous=t,e.down=this.tail,this.head.up=t,this.tail.up=e,this.head=t,this.tail=e,this.height++}for(;!e.up;)e=e.previous;e=e.up;const r=new ks(t);e.next&&(r.next=e.next,e.next.previous=r),e.next=r,r.previous=e,r.down=n,n.up=r,n=r,i++}this._size++}findPreviousNode(t){let e=this.head;for(;;){for(;e.next&&r.isntNull(e.next.value);){if(this.compare(e.next.value,t)>=0)break;e=e.next}if(!e.down)return e;e=e.down}}}class Ms{constructor(t){this.skipList=new Ns(t)}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}values(){return lo.map(this.skipList.elements(),(t=>t.value))}has(t){return this.skipList.has(t)}add(t){this.skipList.add(t)}delete(t){this.skipList.delete(t)}}const Bs=[32,0,1,26,2,23,27,0,3,16,24,30,28,11,0,13,4,7,17,0,25,22,31,15,29,10,12,6,0,21,14,9,5,20,8,19,18];class Cs{constructor(t=31){this.bitsPerElement=t,this.array=[],this.length=0,this._size=0,co.assert(Number.isInteger(t),"The parameter bitsPerElement must be an integer"),co.assert(t>0,"The parameter bitsPerElement must be greater than 0"),co.assert(t<=31,"The mask of bitsPerElement must be less than or equal to 31")}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this._size}[Symbol.iterator](){return this.values()}*values(){if(this.length>0){const e=1+~~(this.length/this.bitsPerElement);for(let n=0;n<e;n++){let e,r=this.array[n],i=0;for(;32!==(e=Bs[(-(t=r)&t)%37]);)yield n*this.bitsPerElement+i+e,i+=e+1,r>>=e+1}}var t}_dumpBinaryStrings(){const t=[];for(let e=0;e<this.array.length;e++){const n=this.array[e].toString(2);n.length<this.bitsPerElement?t.push("0".repeat(this.bitsPerElement-n.length)+n):t.push(n)}return t}has(t){var e;const[n,r]=this.getPosition(t);return((null!==(e=this.array[n])&&void 0!==e?e:0)&r)===r}add(t){var e;co.assert(t>=0,"value must be greater than or equal to 0"),t>=this.length&&(this.length=t+1);const[n,r]=this.getPosition(t),i=null!==(e=this.array[n])&&void 0!==e?e:0;this.array[n]=i|r;(i&r)!==r&&this._size++}delete(t){var e;const[n,r]=this.getPosition(t),i=null!==(e=this.array[n])&&void 0!==e?e:0;this.array[n]=i&~r;const o=(i&r)===r;return o&&this._size--,o}clear(){for(let t=this.array.length;t--;)this.array[t]=0}getPosition(t){const e=t%this.bitsPerElement;return[(t-e)/this.bitsPerElement,this.getMask(e)]}getMask(t){return 1<<t}}class zs{constructor(t){this.array=t,this.length=0,this._size=0;const e=8*t.BYTES_PER_ELEMENT;co.assert(Number.isInteger(e),"The parameter bitsPerElement must be an integer"),co.assert(e>0,"The parameter bitsPerElement must be greater than 0"),co.assert(e<=32,"The mask of bitsPerElement must be less than or equal to 32"),this.bitsPerElement=e}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this._size}[Symbol.iterator](){return this.values()}*values(){if(this.length>0){const t=1+~~(this.length/this.bitsPerElement),e=this.bitsPerElement-(t*this.bitsPerElement-this.length),n=t-1;for(let t=0;t<n;t++){let e=this.array.internalTypedArray[t];for(let n=0;n<this.bitsPerElement;n++)e%2&&(yield t*this.bitsPerElement+n),e>>=1}let r=this.array.internalTypedArray[t-1];for(let t=0;t<e;t++)r%2&&(yield n*this.bitsPerElement+t),r>>=1}}_dumpBinaryStrings(){const t=[];for(let e=0;e<this.array.length;e++){const n=this.array.internalTypedArray[e].toString(2);n.length<this.bitsPerElement?t.push("0".repeat(this.bitsPerElement-n.length)+n):t.push(n)}return t}has(t){var e;const[n,r]=this.getPosition(t);return((null!==(e=this.array.get(n))&&void 0!==e?e:0)&r)===r}add(t){var e;co.assert(t>=0,"value must be greater than or equal to 0"),t>=this.length&&(this.length=t+1);const[n,r]=this.getPosition(t),i=null!==(e=this.array.get(n))&&void 0!==e?e:0;this.array.set(n,i|r);(i&r)!==r&&this._size++}delete(t){var e;const[n,r]=this.getPosition(t),i=null!==(e=this.array.get(n))&&void 0!==e?e:0;this.array.set(n,i&~r);const o=(i&r)===r;return o&&this._size--,o}clear(){for(let t=this.array.length;t--;)this.array.set(t,0)}getPosition(t){const e=t%this.bitsPerElement;return[(t-e)/this.bitsPerElement,this.getMask(e)]}getMask(t){return 1<<t}}t.BadEventError=bo,t.BitSet=Cs,t.Box=e,t.DynamicTypedArray=Ps,t.Emitter=Bt,t.ExpirableMap=fo,t.FiniteStateMachine=mo,t.HashMap=Ct,t.HashSet=zt,t.LRUMap=ho,t.ObservableFiniteStateMachine=Ss,t.Queue=Ft,t.SortedSet=Ms,t.SparseMap=Is,t.SparseSet=As,t.TLRUMap=yo,t.TrieMap=vo,t.TypedBitSet=zs,t.TypedSparseMap=Es,t.TypedSparseSet=Os,t.convertArrayToCons=function t([e,...n]){return[e,n.length?t(n):null]},t.convertConsToArray=function t([e,n]){return r.isNull(n)?[e]:[e,...t(n)]},t.sliceArrayLeft=function(t,e){return t.slice(0,e)},t.sliceArrayRight=function(t,e){const n=t.length-e;return t.slice(n>=0?n:0)},t.truncateArrayLeft=function(t,e){t.length>e&&(t.length=e)},t.truncateArrayRight=function(t,e){const n=t.length-e;t.splice(0,n)},Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=index.umd.min.js.map
|