text: import{b as t}from"./tslib.es6-c4a4947b.js";import{b as e,d as r,l as n,n as i,o,p as s}from"./mergeMap-64c6f393.js";import{a as c}from"./concat-981db672.js";import{N as a}from"./Notification-9e07e457.js";import{a as u}from"./timer-a781bf0e.js";function h(t){return t instanceof Date&&!isNaN(+t)}function p(t,e){void 0===e&&(e=u);var r=h(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new f(r,e))}}var f=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.delay,this.scheduler))},t}(),l=function(e){function r(t,r,n){var i=e.call(this,t)||this;return i.delay=r,i.scheduler=n,i.queue=[],i.active=!1,i.errored=!1,i}return t(r,e),r.dispatch=function(t){for(var e=t.source,r=e.queue,n=t.scheduler,i=t.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(i);if(r.length>0){var o=Math.max(0,r[0].time-n.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},r.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(r.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},r.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,r=new d(e.now()+this.delay,t);this.queue.push(r),!1===this.active&&this._schedule(e)}},r.prototype._next=function(t){this.scheduleNotification(a.createNext(t))},r.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},r.prototype._complete=function(){this.scheduleNotification(a.createComplete()),this.unsubscribe()},r}(e),d=function(){return function(t,e){this.time=t,this.notification=e}}();function y(t,e){return function(r){return r.lift(new v(t,e))}}var v=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new m(t,this.compare,this.keySelector))},t}(),m=function(e){function r(t,r,n){var i=e.call(this,t)||this;return i.keySelector=n,i.hasKey=!1,"function"==typeof r&&(i.compare=r),i}return t(r,e),r.prototype.compare=function(t,e){return t===e},r.prototype._next=function(t){var e;try{var r=this.keySelector;e=r?r(t):t}catch(t){return this.destination.error(t)}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;n||(this.key=e,this.destination.next(t))},r}(e);function b(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return r(n)?(t.pop(),function(e){return c(t,e,n)}):function(e){return c(t,e)}}function _(t){return function(e){return e.lift(new x(t))}}var x=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var r=new w(t),i=n(r,this.notifier);return i&&!r.seenValue?(r.add(i),e.subscribe(r)):r},t}(),w=function(e){function r(t){var r=e.call(this,t)||this;return r.seenValue=!1,r}return t(r,e),r.prototype.notifyNext=function(t,e,r,n,i){this.seenValue=!0,this.complete()},r.prototype.notifyComplete=function(){},r}(i);function N(t,e,r){return function(n){return n.lift(new j(t,e,r))}}var j=function(){function t(t,e,r){this.nextOrObserver=t,this.error=e,this.complete=r}return t.prototype.call=function(t,e){return e.subscribe(new g(t,this.nextOrObserver,this.error,this.complete))},t}(),g=function(e){function r(t,r,n,i){var c=e.call(this,t)||this;return c._tapNext=o,c._tapError=o,c._tapComplete=o,c._tapError=n||o,c._tapComplete=i||o,s(r)?(c._context=c,c._tapNext=r):r&&(c._context=r,c._tapNext=r.next||o,c._tapError=r.error||o,c._tapComplete=r.complete||o),c}return t(r,e),r.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},r.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},r.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},r}(e);function C(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var r;"function"==typeof t[t.length-1]&&(r=t.pop());var n=t;return e.lift(new k(n,r))}}var k=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new O(t,this.observables,this.project))},t}(),O=function(e){function r(t,r,i){var o=e.call(this,t)||this;o.observables=r,o.project=i,o.toRespond=[];var s=r.length;o.values=new Array(s);for(var c=0;c<s;c++)o.toRespond.push(c);for(c=0;c<s;c++){var a=r[c];o.add(n(o,a,a,c))}return o}return t(r,e),r.prototype.notifyNext=function(t,e,r,n,i){this.values[r]=e;var o=this.toRespond;if(o.length>0){var s=o.indexOf(r);-1!==s&&o.splice(s,1)}},r.prototype.notifyComplete=function(){},r.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},r.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},r}(i);export{N as a,p as b,y as d,h as i,b as s,_ as t,C as w};
  //# sourceMappingURL=withLatestFrom-853e2e94.js.map
  