rxjs-rails 2.2.13 → 2.2.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rxjs/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/rx.aggregates.js +2 -2
  4. data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
  5. data/vendor/assets/javascripts/rx.async.compat.js +23 -47
  6. data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
  7. data/vendor/assets/javascripts/rx.async.js +23 -47
  8. data/vendor/assets/javascripts/rx.async.min.js +1 -1
  9. data/vendor/assets/javascripts/rx.backpressure.js +81 -0
  10. data/vendor/assets/javascripts/rx.backpressure.min.js +1 -0
  11. data/vendor/assets/javascripts/rx.binding.js +4 -4
  12. data/vendor/assets/javascripts/rx.binding.min.js +1 -1
  13. data/vendor/assets/javascripts/rx.coincidence.js +3 -3
  14. data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
  15. data/vendor/assets/javascripts/rx.compat.js +536 -386
  16. data/vendor/assets/javascripts/rx.compat.min.js +2 -2
  17. data/vendor/assets/javascripts/rx.experimental.js +5 -6
  18. data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
  19. data/vendor/assets/javascripts/rx.joinpatterns.js +4 -4
  20. data/vendor/assets/javascripts/rx.joinpatterns.min.js +1 -1
  21. data/vendor/assets/javascripts/rx.lite.compat.js +554 -403
  22. data/vendor/assets/javascripts/rx.lite.compat.min.js +2 -2
  23. data/vendor/assets/javascripts/rx.lite.js +554 -403
  24. data/vendor/assets/javascripts/rx.lite.min.js +2 -2
  25. data/vendor/assets/javascripts/rx.min.js +2 -2
  26. data/vendor/assets/javascripts/rx.node.js +1 -0
  27. data/vendor/assets/javascripts/rx.testing.js +2 -7
  28. data/vendor/assets/javascripts/rx.testing.min.js +1 -1
  29. data/vendor/assets/javascripts/rx.time.js +2 -3
  30. data/vendor/assets/javascripts/rx.time.min.js +1 -1
  31. data/vendor/assets/javascripts/rx.virtualtime.js +5 -5
  32. data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
  33. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5cd9cfa7ff886d2879628f84d0ee022db47f2313
4
- data.tar.gz: 3b02e3507e069380447e0e52e3e6db6043c274cb
3
+ metadata.gz: c11f2cafb0135d11223fc137900dddac1060c36e
4
+ data.tar.gz: 08472b373d3dfd97ac6260df5890f694efbc892d
5
5
  SHA512:
6
- metadata.gz: 9afd1e426823cbb75251925ce7939cac33ba72437ed048185f21351fb9c1c50a73ae05e04f6df03de349073895f6acb62bdb5065e353d95d6ff6c05747003a1f
7
- data.tar.gz: 51c444ba1fba49125874a50b7989fb32da4328ae65100dc8ba7b33ee24b5649cec41a3a127067420ef1a9d78ed7b80ed83dc0141ab4a1b5b80adfc4cc4359a74
6
+ metadata.gz: 29107e403bcd749e7962388b11fc6e03e5732dd33f8abd8cf59810e3cbb29a0723417ce6637ebec376f19ec95748cb52777513204db52728214b41958e2d0478
7
+ data.tar.gz: 53573da1e17c94cd22a4e13d540719c94cf8609e60afff6ea564925dc935cac84df00adc45255f568caaa8c4044b8c6d10093102227e8659ad454a578803d206
@@ -1,6 +1,6 @@
1
1
  module Rxjs
2
2
  module Rails
3
- VERSION = "2.2.13"
3
+ VERSION = "2.2.14"
4
4
  end
5
5
  end
6
6
 
@@ -37,8 +37,8 @@
37
37
  var Observable = Rx.Observable,
38
38
  observableProto = Observable.prototype,
39
39
  CompositeDisposable = Rx.CompositeDisposable,
40
- AnonymousObservable = Rx.Internals.AnonymousObservable,
41
- isEqual = Rx.Internals.isEqual;
40
+ AnonymousObservable = Rx.AnonymousObservable,
41
+ isEqual = Rx.internals.isEqual;
42
42
 
43
43
  // Defaults
44
44
  var argumentOutOfRange = 'Argument out of range';
@@ -1 +1 @@
1
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b){return t(a,b)}function f(a){return a}function g(a,b){return a>b?1:b>a?-1:0}function h(a,b,c){return new s(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return d.onError(j),void 0}if(h=0,e)try{h=c(i,f)}catch(k){return d.onError(k),void 0}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},d.onError.bind(d),function(){d.onNext(g),d.onCompleted()})})}function i(a){if(0===a.length)throw new Error(v);return a[0]}function j(a,b,c){return new s(function(d){var e=0,f=b.length;return a.subscribe(function(a){var g=!1;try{f>e&&(g=c(a,b[e++]))}catch(h){return d.onError(h),void 0}g||(d.onNext(!1),d.onCompleted())},d.onError.bind(d),function(){d.onNext(e===f),d.onCompleted()})})}function k(a,b,c,d){if(0>b)throw new Error(u);return new s(function(e){var f=b;return a.subscribe(function(a){0===f&&(e.onNext(a),e.onCompleted()),f--},e.onError.bind(e),function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(u))})})}function l(a,b,c){return new s(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(v))})})}function m(a,b,c){return new s(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},d.onError.bind(d),function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(v))})})}function n(a,b,c){return new s(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(v))})})}function o(a,b,c,e){return new s(function(f){var g=0;return a.subscribe(function(d){var h;try{h=b.call(c,d,g,a)}catch(i){return f.onError(i),void 0}h?(f.onNext(e?g:d),f.onCompleted()):g++},f.onError.bind(f),function(){f.onNext(e?-1:d),f.onCompleted()})})}var p=c.Observable,q=p.prototype,r=c.CompositeDisposable,s=c.Internals.AnonymousObservable,t=c.Internals.isEqual,u="Argument out of range",v="Sequence contains no elements.";return q.aggregate=function(){var a,b,c;return 2===arguments.length?(a=arguments[0],b=!0,c=arguments[1]):c=arguments[0],b?this.scan(a,c).startWith(a).finalValue():this.scan(c).finalValue()},q.reduce=function(a){var b,c;return 2===arguments.length&&(c=!0,b=arguments[1]),c?this.scan(b,a).startWith(b).finalValue():this.scan(a).finalValue()},q.some=q.any=function(a,b){var c=this;return a?c.where(a,b).any():new s(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},a.onError.bind(a),function(){a.onNext(!1),a.onCompleted()})})},q.isEmpty=function(){return this.any().select(function(a){return!a})},q.every=q.all=function(a,b){return this.where(function(b){return!a(b)},b).any().select(function(a){return!a})},q.contains=function(a,b){return b||(b=e),this.where(function(c){return b(c,a)}).any()},q.count=function(a,b){return a?this.where(a,b).count():this.aggregate(0,function(a){return a+1})},q.sum=function(a,b){return a?this.select(a,b).sum():this.aggregate(0,function(a,b){return a+b})},q.minBy=function(a,b){return b||(b=g),h(this,a,function(a,c){return-1*b(a,c)})},q.min=function(a){return this.minBy(f,a).select(function(a){return i(a)})},q.maxBy=function(a,b){return b||(b=g),h(this,a,b)},q.max=function(a){return this.maxBy(f,a).select(function(a){return i(a)})},q.average=function(a,b){return a?this.select(a,b).average():this.scan({sum:0,count:0},function(a,b){return{sum:a.sum+b,count:a.count+1}}).finalValue().select(function(a){if(0===a.count)throw new Error("The input sequence was empty");return a.sum/a.count})},q.sequenceEqual=function(a,b){var c=this;return b||(b=e),Array.isArray(a)?j(c,a,b):new s(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return d.onError(i),void 0}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},d.onError.bind(d),function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))}),j=a.subscribe(function(a){var c,f;if(g.length>0){f=g.shift();try{c=b(f,a)}catch(i){return d.onError(i),void 0}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},d.onError.bind(d),function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new r(i,j)})},q.elementAt=function(a){return k(this,a,!1)},q.elementAtOrDefault=function(a,b){return k(this,a,!0,b)},q.single=function(a,b){return a?this.where(a,b).single():l(this,!1)},q.singleOrDefault=function(a,b,c){return a?this.where(a,c).singleOrDefault(null,b):l(this,!0,b)},q.first=function(a,b){return a?this.where(a,b).first():m(this,!1)},q.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):m(this,!0,b)},q.last=function(a,b){return a?this.where(a,b).last():n(this,!1)},q.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):n(this,!0,b)},q.find=function(a,b){return o(this,a,b,!1)},q.findIndex=function(a,b){return o(this,a,b,!0)},c});
1
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b){return t(a,b)}function f(a){return a}function g(a,b){return a>b?1:b>a?-1:0}function h(a,b,c){return new s(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return d.onError(j),void 0}if(h=0,e)try{h=c(i,f)}catch(k){return d.onError(k),void 0}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},d.onError.bind(d),function(){d.onNext(g),d.onCompleted()})})}function i(a){if(0===a.length)throw new Error(v);return a[0]}function j(a,b,c){return new s(function(d){var e=0,f=b.length;return a.subscribe(function(a){var g=!1;try{f>e&&(g=c(a,b[e++]))}catch(h){return d.onError(h),void 0}g||(d.onNext(!1),d.onCompleted())},d.onError.bind(d),function(){d.onNext(e===f),d.onCompleted()})})}function k(a,b,c,d){if(0>b)throw new Error(u);return new s(function(e){var f=b;return a.subscribe(function(a){0===f&&(e.onNext(a),e.onCompleted()),f--},e.onError.bind(e),function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(u))})})}function l(a,b,c){return new s(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(v))})})}function m(a,b,c){return new s(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},d.onError.bind(d),function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(v))})})}function n(a,b,c){return new s(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(v))})})}function o(a,b,c,e){return new s(function(f){var g=0;return a.subscribe(function(d){var h;try{h=b.call(c,d,g,a)}catch(i){return f.onError(i),void 0}h?(f.onNext(e?g:d),f.onCompleted()):g++},f.onError.bind(f),function(){f.onNext(e?-1:d),f.onCompleted()})})}var p=c.Observable,q=p.prototype,r=c.CompositeDisposable,s=c.AnonymousObservable,t=c.internals.isEqual,u="Argument out of range",v="Sequence contains no elements.";return q.aggregate=function(){var a,b,c;return 2===arguments.length?(a=arguments[0],b=!0,c=arguments[1]):c=arguments[0],b?this.scan(a,c).startWith(a).finalValue():this.scan(c).finalValue()},q.reduce=function(a){var b,c;return 2===arguments.length&&(c=!0,b=arguments[1]),c?this.scan(b,a).startWith(b).finalValue():this.scan(a).finalValue()},q.some=q.any=function(a,b){var c=this;return a?c.where(a,b).any():new s(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},a.onError.bind(a),function(){a.onNext(!1),a.onCompleted()})})},q.isEmpty=function(){return this.any().select(function(a){return!a})},q.every=q.all=function(a,b){return this.where(function(b){return!a(b)},b).any().select(function(a){return!a})},q.contains=function(a,b){return b||(b=e),this.where(function(c){return b(c,a)}).any()},q.count=function(a,b){return a?this.where(a,b).count():this.aggregate(0,function(a){return a+1})},q.sum=function(a,b){return a?this.select(a,b).sum():this.aggregate(0,function(a,b){return a+b})},q.minBy=function(a,b){return b||(b=g),h(this,a,function(a,c){return-1*b(a,c)})},q.min=function(a){return this.minBy(f,a).select(function(a){return i(a)})},q.maxBy=function(a,b){return b||(b=g),h(this,a,b)},q.max=function(a){return this.maxBy(f,a).select(function(a){return i(a)})},q.average=function(a,b){return a?this.select(a,b).average():this.scan({sum:0,count:0},function(a,b){return{sum:a.sum+b,count:a.count+1}}).finalValue().select(function(a){if(0===a.count)throw new Error("The input sequence was empty");return a.sum/a.count})},q.sequenceEqual=function(a,b){var c=this;return b||(b=e),Array.isArray(a)?j(c,a,b):new s(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return d.onError(i),void 0}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},d.onError.bind(d),function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))}),j=a.subscribe(function(a){var c,f;if(g.length>0){f=g.shift();try{c=b(f,a)}catch(i){return d.onError(i),void 0}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},d.onError.bind(d),function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new r(i,j)})},q.elementAt=function(a){return k(this,a,!1)},q.elementAtOrDefault=function(a,b){return k(this,a,!0,b)},q.single=function(a,b){return a?this.where(a,b).single():l(this,!1)},q.singleOrDefault=function(a,b,c){return a?this.where(a,c).singleOrDefault(null,b):l(this,!0,b)},q.first=function(a,b){return a?this.where(a,b).first():m(this,!1)},q.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):m(this,!0,b)},q.last=function(a,b){return a?this.where(a,b).last():n(this,!1)},q.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):n(this,!0,b)},q.find=function(a,b){return o(this,a,b,!1)},q.findIndex=function(a,b){return o(this,a,b,!0)},c});
@@ -36,12 +36,14 @@
36
36
  // Aliases
37
37
  var Observable = Rx.Observable,
38
38
  observableProto = Observable.prototype,
39
- AnonymousObservable = Rx.Internals.AnonymousObservable,
40
- AsyncSubject = Rx.AsyncSubject,
41
- disposableCreate = Rx.Disposable.create,
42
- CompositeDisposable= Rx.CompositeDisposable,
43
- immediateScheduler = Rx.Scheduler.immediate,
44
- slice = Array.prototype.slice;
39
+ observableFromPromise = Observable.fromPromise,
40
+ observableThrow = Observable.throwException,
41
+ AnonymousObservable = Rx.AnonymousObservable,
42
+ AsyncSubject = Rx.AsyncSubject,
43
+ disposableCreate = Rx.Disposable.create,
44
+ CompositeDisposable= Rx.CompositeDisposable,
45
+ immediateScheduler = Rx.Scheduler.immediate,
46
+ slice = Array.prototype.slice;
45
47
 
46
48
  /**
47
49
  * Invokes the specified function asynchronously on the specified scheduler, surfacing the result through an observable sequence.
@@ -352,46 +354,20 @@
352
354
  }).publish().refCount();
353
355
  };
354
356
 
355
- /**
356
- * Converts a Promise to an Observable sequence
357
- * @param {Promise} A Promises A+ implementation instance.
358
- * @returns {Observable} An Observable sequence which wraps the existing promise success and failure.
359
- */
360
- Observable.fromPromise = function (promise) {
361
- return new AnonymousObservable(function (observer) {
362
- promise.then(
363
- function (value) {
364
- observer.onNext(value);
365
- observer.onCompleted();
366
- },
367
- function (reason) {
368
- observer.onError(reason);
369
- });
370
- });
371
- };
372
- /*
373
- * Converts an existing observable sequence to an ES6 Compatible Promise
374
- * @example
375
- * var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);
376
- * @param {Function} The constructor of the promise
377
- * @returns {Promise} An ES6 compatible promise with the last value from the observable sequence.
378
- */
379
- observableProto.toPromise = function (promiseCtor) {
380
- var source = this;
381
- return new promiseCtor(function (resolve, reject) {
382
- // No cancellation can be done
383
- var value, hasValue = false;
384
- source.subscribe(function (v) {
385
- value = v;
386
- hasValue = true;
387
- }, function (err) {
388
- reject(err);
389
- }, function () {
390
- if (hasValue) {
391
- resolve(value);
392
- }
393
- });
394
- });
395
- };
357
+ /**
358
+ * Invokes the asynchronous function, surfacing the result through an observable sequence.
359
+ * @param {Function} functionAsync Asynchronous function which returns a Promise to run.
360
+ * @returns {Observable} An observable sequence exposing the function's result value, or an exception.
361
+ */
362
+ Observable.startAsync = function (functionAsync) {
363
+ var promise;
364
+ try {
365
+ promise = functionAsync();
366
+ } catch (e) {
367
+ return observableThrow(e);
368
+ }
369
+ return observableFromPromise(promise);
370
+ }
371
+
396
372
  return Rx;
397
373
  }));
@@ -1 +1 @@
1
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(a){var b=function(){this.cancelBubble=!0},c=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(a||(a=window.event),!a.target)switch(a.target=a.target||a.srcElement,"mouseover"==a.type&&(a.relatedTarget=a.fromElement),"mouseout"==a.type&&(a.relatedTarget=a.toElement),a.stopPropagation||(a.stopPropagation=b,a.preventDefault=c),a.type){case"keypress":var d="charCode"in a?a.charCode:a.keyCode;10==d?(d=0,a.keyCode=13):13==d||27==d?d=0:3==d&&(d=99),a.charCode=d,a.keyChar=a.charCode?String.fromCharCode(a.charCode):""}return a}function e(a,b,c){if(a.addListener)return a.addListener(b,c),k(function(){a.removeListener(b,c)});if(a.addEventListener)return a.addEventListener(b,c,!1),k(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var e=function(a){c(d(a))};return a.attachEvent("on"+b,e),k(function(){a.detachEvent("on"+b,e)})}return a["on"+b]=c,k(function(){a["on"+b]=null})}function f(a,b,c){var d=new l;if(a&&a.length)for(var g=0,h=a.length;h>g;g++)d.add(f(a[g],b,c));else a&&d.add(e(a,b,c));return d}var g=c.Observable,h=g.prototype,i=c.Internals.AnonymousObservable,j=c.AsyncSubject,k=c.Disposable.create,l=c.CompositeDisposable,m=c.Scheduler.immediate,n=Array.prototype.slice;g.start=function(a,b,c){return o(a,b,c)()};var o=g.toAsync=function(a,b,c){return b||(b=timeoutScheduler),function(){var d=arguments,e=new j;return b.schedule(function(){var b;try{b=a.apply(c,d)}catch(f){return e.onError(f),void 0}e.onNext(b),e.onCompleted()}),e.asObservable()}};return g.fromCallback=function(a,b,c,d){return b||(b=m),function(){var e=n.call(arguments,0);return new i(function(f){return b.schedule(function(){function b(a){var b=a;if(d)try{b=d(arguments)}catch(c){return f.onError(c),void 0}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},g.fromNodeCallback=function(a,b,c,d){return b||(b=m),function(){var e=n.call(arguments,0);return new i(function(f){return b.schedule(function(){function b(a){if(a)return f.onError(a),void 0;var b=n.call(arguments,1);if(d)try{b=d(b)}catch(c){return f.onError(c),void 0}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},g.fromEvent=function(a,b,c){return new i(function(d){return f(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e),void 0}d.onNext(b)})}).publish().refCount()},g.fromEventPattern=function(a,b,c){return new i(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e),void 0}d.onNext(b)}var f=a(e);return k(function(){b&&b(e,f)})}).publish().refCount()},g.fromPromise=function(a){return new i(function(b){a.then(function(a){b.onNext(a),b.onCompleted()},function(a){b.onError(a)})})},h.toPromise=function(a){var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},function(a){c(a)},function(){e&&a(d)})})},c});
1
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(a){var b=function(){this.cancelBubble=!0},c=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(a||(a=window.event),!a.target)switch(a.target=a.target||a.srcElement,"mouseover"==a.type&&(a.relatedTarget=a.fromElement),"mouseout"==a.type&&(a.relatedTarget=a.toElement),a.stopPropagation||(a.stopPropagation=b,a.preventDefault=c),a.type){case"keypress":var d="charCode"in a?a.charCode:a.keyCode;10==d?(d=0,a.keyCode=13):13==d||27==d?d=0:3==d&&(d=99),a.charCode=d,a.keyChar=a.charCode?String.fromCharCode(a.charCode):""}return a}function e(a,b,c){if(a.addListener)return a.addListener(b,c),l(function(){a.removeListener(b,c)});if(a.addEventListener)return a.addEventListener(b,c,!1),l(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var e=function(a){c(d(a))};return a.attachEvent("on"+b,e),l(function(){a.detachEvent("on"+b,e)})}return a["on"+b]=c,l(function(){a["on"+b]=null})}function f(a,b,c){var d=new m;if(a&&a.length)for(var g=0,h=a.length;h>g;g++)d.add(f(a[g],b,c));else a&&d.add(e(a,b,c));return d}var g=c.Observable,h=(g.prototype,g.fromPromise),i=g.throwException,j=c.AnonymousObservable,k=c.AsyncSubject,l=c.Disposable.create,m=c.CompositeDisposable,n=c.Scheduler.immediate,o=Array.prototype.slice;g.start=function(a,b,c){return p(a,b,c)()};var p=g.toAsync=function(a,b,c){return b||(b=timeoutScheduler),function(){var d=arguments,e=new k;return b.schedule(function(){var b;try{b=a.apply(c,d)}catch(f){return e.onError(f),void 0}e.onNext(b),e.onCompleted()}),e.asObservable()}};return g.fromCallback=function(a,b,c,d){return b||(b=n),function(){var e=o.call(arguments,0);return new j(function(f){return b.schedule(function(){function b(a){var b=a;if(d)try{b=d(arguments)}catch(c){return f.onError(c),void 0}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},g.fromNodeCallback=function(a,b,c,d){return b||(b=n),function(){var e=o.call(arguments,0);return new j(function(f){return b.schedule(function(){function b(a){if(a)return f.onError(a),void 0;var b=o.call(arguments,1);if(d)try{b=d(b)}catch(c){return f.onError(c),void 0}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},g.fromEvent=function(a,b,c){return new j(function(d){return f(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e),void 0}d.onNext(b)})}).publish().refCount()},g.fromEventPattern=function(a,b,c){return new j(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e),void 0}d.onNext(b)}var f=a(e);return l(function(){b&&b(e,f)})}).publish().refCount()},g.startAsync=function(a){var b;try{b=a()}catch(c){return i(c)}return h(b)},c});
@@ -36,12 +36,14 @@
36
36
  // Aliases
37
37
  var Observable = Rx.Observable,
38
38
  observableProto = Observable.prototype,
39
- AnonymousObservable = Rx.Internals.AnonymousObservable,
40
- AsyncSubject = Rx.AsyncSubject,
41
- disposableCreate = Rx.Disposable.create,
42
- CompositeDisposable= Rx.CompositeDisposable,
43
- immediateScheduler = Rx.Scheduler.immediate,
44
- slice = Array.prototype.slice;
39
+ observableFromPromise = Observable.fromPromise,
40
+ observableThrow = Observable.throwException,
41
+ AnonymousObservable = Rx.AnonymousObservable,
42
+ AsyncSubject = Rx.AsyncSubject,
43
+ disposableCreate = Rx.Disposable.create,
44
+ CompositeDisposable= Rx.CompositeDisposable,
45
+ immediateScheduler = Rx.Scheduler.immediate,
46
+ slice = Array.prototype.slice;
45
47
 
46
48
  /**
47
49
  * Invokes the specified function asynchronously on the specified scheduler, surfacing the result through an observable sequence.
@@ -282,46 +284,20 @@
282
284
  }).publish().refCount();
283
285
  };
284
286
 
285
- /**
286
- * Converts a Promise to an Observable sequence
287
- * @param {Promise} A Promises A+ implementation instance.
288
- * @returns {Observable} An Observable sequence which wraps the existing promise success and failure.
289
- */
290
- Observable.fromPromise = function (promise) {
291
- return new AnonymousObservable(function (observer) {
292
- promise.then(
293
- function (value) {
294
- observer.onNext(value);
295
- observer.onCompleted();
296
- },
297
- function (reason) {
298
- observer.onError(reason);
299
- });
300
- });
301
- };
302
- /*
303
- * Converts an existing observable sequence to an ES6 Compatible Promise
304
- * @example
305
- * var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);
306
- * @param {Function} The constructor of the promise
307
- * @returns {Promise} An ES6 compatible promise with the last value from the observable sequence.
308
- */
309
- observableProto.toPromise = function (promiseCtor) {
310
- var source = this;
311
- return new promiseCtor(function (resolve, reject) {
312
- // No cancellation can be done
313
- var value, hasValue = false;
314
- source.subscribe(function (v) {
315
- value = v;
316
- hasValue = true;
317
- }, function (err) {
318
- reject(err);
319
- }, function () {
320
- if (hasValue) {
321
- resolve(value);
322
- }
323
- });
324
- });
325
- };
287
+ /**
288
+ * Invokes the asynchronous function, surfacing the result through an observable sequence.
289
+ * @param {Function} functionAsync Asynchronous function which returns a Promise to run.
290
+ * @returns {Observable} An observable sequence exposing the function's result value, or an exception.
291
+ */
292
+ Observable.startAsync = function (functionAsync) {
293
+ var promise;
294
+ try {
295
+ promise = functionAsync();
296
+ } catch (e) {
297
+ return observableThrow(e);
298
+ }
299
+ return observableFromPromise(promise);
300
+ }
301
+
326
302
  return Rx;
327
303
  }));
@@ -1 +1 @@
1
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(a,b,c){return a.addListener?(a.addListener(b,c),j(function(){a.removeListener(b,c)})):a.addEventListener?(a.addEventListener(b,c,!1),j(function(){a.removeEventListener(b,c,!1)})):void 0}function e(a,b,c){var f=new k;if(a&&a.length)for(var g=0,h=a.length;h>g;g++)f.add(e(a[g],b,c));else a&&f.add(d(a,b,c));return f}var f=c.Observable,g=f.prototype,h=c.Internals.AnonymousObservable,i=c.AsyncSubject,j=c.Disposable.create,k=c.CompositeDisposable,l=c.Scheduler.immediate,m=Array.prototype.slice;f.start=function(a,b,c){return n(a,b,c)()};var n=f.toAsync=function(a,b,c){return b||(b=timeoutScheduler),function(){var d=arguments,e=new i;return b.schedule(function(){var b;try{b=a.apply(c,d)}catch(f){return e.onError(f),void 0}e.onNext(b),e.onCompleted()}),e.asObservable()}};return f.fromCallback=function(a,b,c,d){return b||(b=l),function(){var e=m.call(arguments,0);return new h(function(f){return b.schedule(function(){function b(a){var b=a;if(d)try{b=d(arguments)}catch(c){return f.onError(c),void 0}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},f.fromNodeCallback=function(a,b,c,d){return b||(b=l),function(){var e=m.call(arguments,0);return new h(function(f){return b.schedule(function(){function b(a){if(a)return f.onError(a),void 0;var b=m.call(arguments,1);if(d)try{b=d(b)}catch(c){return f.onError(c),void 0}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},f.fromEvent=function(a,b,c){return new h(function(d){return e(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e),void 0}d.onNext(b)})}).publish().refCount()},f.fromEventPattern=function(a,b,c){return new h(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e),void 0}d.onNext(b)}var f=a(e);return j(function(){b&&b(e,f)})}).publish().refCount()},f.fromPromise=function(a){return new h(function(b){a.then(function(a){b.onNext(a),b.onCompleted()},function(a){b.onError(a)})})},g.toPromise=function(a){var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},function(a){c(a)},function(){e&&a(d)})})},c});
1
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(a,b,c){return a.addListener?(a.addListener(b,c),k(function(){a.removeListener(b,c)})):a.addEventListener?(a.addEventListener(b,c,!1),k(function(){a.removeEventListener(b,c,!1)})):void 0}function e(a,b,c){var f=new l;if(a&&a.length)for(var g=0,h=a.length;h>g;g++)f.add(e(a[g],b,c));else a&&f.add(d(a,b,c));return f}var f=c.Observable,g=(f.prototype,f.fromPromise),h=f.throwException,i=c.AnonymousObservable,j=c.AsyncSubject,k=c.Disposable.create,l=c.CompositeDisposable,m=c.Scheduler.immediate,n=Array.prototype.slice;f.start=function(a,b,c){return o(a,b,c)()};var o=f.toAsync=function(a,b,c){return b||(b=timeoutScheduler),function(){var d=arguments,e=new j;return b.schedule(function(){var b;try{b=a.apply(c,d)}catch(f){return e.onError(f),void 0}e.onNext(b),e.onCompleted()}),e.asObservable()}};return f.fromCallback=function(a,b,c,d){return b||(b=m),function(){var e=n.call(arguments,0);return new i(function(f){return b.schedule(function(){function b(a){var b=a;if(d)try{b=d(arguments)}catch(c){return f.onError(c),void 0}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},f.fromNodeCallback=function(a,b,c,d){return b||(b=m),function(){var e=n.call(arguments,0);return new i(function(f){return b.schedule(function(){function b(a){if(a)return f.onError(a),void 0;var b=n.call(arguments,1);if(d)try{b=d(b)}catch(c){return f.onError(c),void 0}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},f.fromEvent=function(a,b,c){return new i(function(d){return e(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e),void 0}d.onNext(b)})}).publish().refCount()},f.fromEventPattern=function(a,b,c){return new i(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e),void 0}d.onNext(b)}var f=a(e);return k(function(){b&&b(e,f)})}).publish().refCount()},f.startAsync=function(a){var b;try{b=a()}catch(c){return h(c)}return g(b)},c});
@@ -0,0 +1,81 @@
1
+ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2
+
3
+ ;(function (factory) {
4
+ var objectTypes = {
5
+ 'boolean': false,
6
+ 'function': true,
7
+ 'object': true,
8
+ 'number': false,
9
+ 'string': false,
10
+ 'undefined': false
11
+ };
12
+
13
+ var root = (objectTypes[typeof window] && window) || this,
14
+ freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports,
15
+ freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
16
+ moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
17
+ freeGlobal = objectTypes[typeof global] && global;
18
+
19
+ if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) {
20
+ root = freeGlobal;
21
+ }
22
+
23
+ // Because of build optimizers
24
+ if (typeof define === 'function' && define.amd) {
25
+ define(['rx', 'exports'], function (Rx, exports) {
26
+ root.Rx = factory(root, exports, Rx);
27
+ return root.Rx;
28
+ });
29
+ } else if (typeof module === 'object' && module && module.exports === freeExports) {
30
+ module.exports = factory(root, module.exports, require('./rx'));
31
+ } else {
32
+ root.Rx = factory(root, {}, root.Rx);
33
+ }
34
+ }.call(this, function (root, exp, Rx, undefined) {
35
+
36
+ // References
37
+ var Observable = Rx.Observable,
38
+ observableProto = Observable.prototype,
39
+ AnonymousObservable = Rx.Internals.AnonymousObservable,
40
+ Subject = Rx.Subject,
41
+ Observer = Rx.Observer,
42
+ disposableEmpty = Rx.Disposable.empty,
43
+ disposableCreate = Rx.Disposable.create,
44
+ inherits = Rx.Internals.inherits,
45
+ addProperties = Rx.Internals.addProperties,
46
+ timeoutScheduler = Rx.Scheduler.timeout;
47
+
48
+ var objectDisposed = 'Object has been disposed';
49
+ function checkDisposed() {
50
+ if (this.isDisposed) { throw new Error(objectDisposed); }
51
+ }
52
+
53
+ /**
54
+ * Pauses the underlying observable sequence based upon the observable sequence which yields true/false.
55
+ * @example
56
+ * var pauser = new Rx.Subject();
57
+ * var source = Rx.Observable.interval(100).pausable(pauser);
58
+ * @param {Observable} pauser The observable sequence used to pause the underlying sequence.
59
+ * @returns {Observable} The observable sequence which is paused based upon the pauser.
60
+ */
61
+ observableProto.pausable = function (pauser) {
62
+ var self = this;
63
+ return new AnonymousObservable(function (observer) {
64
+ var conn = self.publish(),
65
+ subscription = conn.subscribe(observer),
66
+ connection = disposableEmpty;
67
+
68
+ var pausable = pauser.distinctUntilChanged().subscribe(function (b) {
69
+ if (b) {
70
+ connection = conn.connect();
71
+ } else {
72
+ connection.dispose();
73
+ connection = disposableEmpty;
74
+ }
75
+ });
76
+
77
+ return new CompositeDisposable(subscription, connection, pausable);
78
+ });
79
+ };
80
+ return Rx;
81
+ }));
@@ -0,0 +1 @@
1
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){{var d=c.Observable,e=d.prototype,f=c.Internals.AnonymousObservable,g=(c.Subject,c.Observer,c.Disposable.empty);c.Disposable.create,c.Internals.inherits,c.Internals.addProperties,c.Scheduler.timeout}return e.pausable=function(a){var b=this;return new f(function(c){var d=b.publish(),e=d.subscribe(c),f=g,h=a.distinctUntilChanged().subscribe(function(a){a?f=d.connect():(f.dispose(),f=g)});return new CompositeDisposable(e,f,h)})},c});
@@ -35,17 +35,17 @@
35
35
 
36
36
  var Observable = Rx.Observable,
37
37
  observableProto = Observable.prototype,
38
- AnonymousObservable = Rx.Internals.AnonymousObservable,
38
+ AnonymousObservable = Rx.AnonymousObservable,
39
39
  Subject = Rx.Subject,
40
40
  AsyncSubject = Rx.AsyncSubject,
41
41
  Observer = Rx.Observer,
42
- ScheduledObserver = Rx.Internals.ScheduledObserver,
42
+ ScheduledObserver = Rx.internals.ScheduledObserver,
43
43
  disposableCreate = Rx.Disposable.create,
44
44
  disposableEmpty = Rx.Disposable.empty,
45
45
  CompositeDisposable = Rx.CompositeDisposable,
46
46
  currentThreadScheduler = Rx.Scheduler.currentThread,
47
- inherits = Rx.Internals.inherits,
48
- addProperties = Rx.Internals.addProperties;
47
+ inherits = Rx.internals.inherits,
48
+ addProperties = Rx.internals.addProperties;
49
49
 
50
50
  // Utilities
51
51
  var objectDisposed = 'Object has been disposed';
@@ -1 +1 @@
1
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(){if(this.isDisposed)throw new Error(r)}var e=c.Observable,f=e.prototype,g=c.Internals.AnonymousObservable,h=c.Subject,i=c.AsyncSubject,j=c.Observer,k=c.Internals.ScheduledObserver,l=c.Disposable.create,m=c.Disposable.empty,n=c.CompositeDisposable,o=c.Scheduler.currentThread,p=c.Internals.inherits,q=c.Internals.addProperties,r="Object has been disposed";f.multicast=function(a,b){var c=this;return"function"==typeof a?new g(function(d){var e=c.multicast(a());return new n(b(e).subscribe(d),e.connect())}):new v(c,a)},f.publish=function(a){return a?this.multicast(function(){return new h},a):this.multicast(new h)},f.share=function(){return this.publish(null).refCount()},f.publishLast=function(a){return a?this.multicast(function(){return new i},a):this.multicast(new i)},f.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new t(b)},a):this.multicast(new t(a))},f.shareValue=function(a){return this.publishValue(a).refCount()},f.replay=function(a,b,c,d){return a?this.multicast(function(){return new u(b,c,d)},a):this.multicast(new u(b,c,d))},f.replayWhileObserved=function(a,b,c){return this.replay(null,a,b,c).refCount()};var s=function(a,b){this.subject=a,this.observer=b};s.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var t=c.BehaviorSubject=function(a){function b(a){if(d.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new s(this,a);var b=this.exception;return b?a.onError(b):a.onCompleted(),m}function c(c){a.call(this,b),this.value=c,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return p(c,a),q(c.prototype,j,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(d.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var b=0,c=a.length;c>b;b++)a[b].onCompleted();this.observers=[]}},onError:function(a){if(d.call(this),!this.isStopped){var b=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var c=0,e=b.length;e>c;c++)b[c].onError(a);this.observers=[]}},onNext:function(a){if(d.call(this),!this.isStopped){this.value=a;for(var b=this.observers.slice(0),c=0,e=b.length;e>c;c++)b[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),c}(e),u=c.ReplaySubject=function(a){function b(a,b){this.subject=a,this.observer=b}function c(a){var c=new k(this.scheduler,a),e=new b(this,c);d.call(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)c.onNext(this.q[g].value);return this.hasError?(f++,c.onError(this.error)):this.isStopped&&(f++,c.onCompleted()),c.ensureActive(f),e}function e(b,d,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==d?Number.MAX_VALUE:d,this.scheduler=e||o,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,c)}return b.prototype.dispose=function(){if(this.observer.dispose(),!this.subject.isDisposed){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1)}},p(e,a),q(e.prototype,j,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){var b;if(d.call(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var e=this.observers.slice(0),f=0,g=e.length;g>f;f++)b=e[f],b.onNext(a),b.ensureActive()}},onError:function(a){var b;if(d.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var e=this.observers.slice(0),f=0,g=e.length;g>f;f++)b=e[f],b.onError(a),b.ensureActive();this.observers=[]}},onCompleted:function(){var a;if(d.call(this),!this.isStopped){this.isStopped=!0;var b=this.scheduler.now();this._trim(b);for(var c=this.observers.slice(0),e=0,f=c.length;f>e;e++)a=c[e],a.onCompleted(),a.ensureActive();this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(e),v=c.ConnectableObservable=function(a){function b(b,c){function d(a){return e.subject.subscribe(a)}var e={subject:c,source:b.asObservable(),hasSubscription:!1,subscription:null};this.connect=function(){return e.hasSubscription||(e.hasSubscription=!0,e.subscription=new n(e.source.subscribe(e.subject),l(function(){e.hasSubscription=!1}))),e.subscription},a.call(this,d)}return p(b,a),b.prototype.connect=function(){return this.connect()},b.prototype.refCount=function(){var a=null,b=0,c=this;return new g(function(d){var e,f;return b++,e=1===b,f=c.subscribe(d),e&&(a=c.connect()),l(function(){f.dispose(),b--,0===b&&a.dispose()})})},b}(e);return c});
1
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(){if(this.isDisposed)throw new Error(r)}var e=c.Observable,f=e.prototype,g=c.AnonymousObservable,h=c.Subject,i=c.AsyncSubject,j=c.Observer,k=c.internals.ScheduledObserver,l=c.Disposable.create,m=c.Disposable.empty,n=c.CompositeDisposable,o=c.Scheduler.currentThread,p=c.internals.inherits,q=c.internals.addProperties,r="Object has been disposed";f.multicast=function(a,b){var c=this;return"function"==typeof a?new g(function(d){var e=c.multicast(a());return new n(b(e).subscribe(d),e.connect())}):new v(c,a)},f.publish=function(a){return a?this.multicast(function(){return new h},a):this.multicast(new h)},f.share=function(){return this.publish(null).refCount()},f.publishLast=function(a){return a?this.multicast(function(){return new i},a):this.multicast(new i)},f.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new t(b)},a):this.multicast(new t(a))},f.shareValue=function(a){return this.publishValue(a).refCount()},f.replay=function(a,b,c,d){return a?this.multicast(function(){return new u(b,c,d)},a):this.multicast(new u(b,c,d))},f.replayWhileObserved=function(a,b,c){return this.replay(null,a,b,c).refCount()};var s=function(a,b){this.subject=a,this.observer=b};s.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var t=c.BehaviorSubject=function(a){function b(a){if(d.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new s(this,a);var b=this.exception;return b?a.onError(b):a.onCompleted(),m}function c(c){a.call(this,b),this.value=c,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return p(c,a),q(c.prototype,j,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(d.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var b=0,c=a.length;c>b;b++)a[b].onCompleted();this.observers=[]}},onError:function(a){if(d.call(this),!this.isStopped){var b=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var c=0,e=b.length;e>c;c++)b[c].onError(a);this.observers=[]}},onNext:function(a){if(d.call(this),!this.isStopped){this.value=a;for(var b=this.observers.slice(0),c=0,e=b.length;e>c;c++)b[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),c}(e),u=c.ReplaySubject=function(a){function b(a,b){this.subject=a,this.observer=b}function c(a){var c=new k(this.scheduler,a),e=new b(this,c);d.call(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)c.onNext(this.q[g].value);return this.hasError?(f++,c.onError(this.error)):this.isStopped&&(f++,c.onCompleted()),c.ensureActive(f),e}function e(b,d,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==d?Number.MAX_VALUE:d,this.scheduler=e||o,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,c)}return b.prototype.dispose=function(){if(this.observer.dispose(),!this.subject.isDisposed){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1)}},p(e,a),q(e.prototype,j,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){var b;if(d.call(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var e=this.observers.slice(0),f=0,g=e.length;g>f;f++)b=e[f],b.onNext(a),b.ensureActive()}},onError:function(a){var b;if(d.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var e=this.observers.slice(0),f=0,g=e.length;g>f;f++)b=e[f],b.onError(a),b.ensureActive();this.observers=[]}},onCompleted:function(){var a;if(d.call(this),!this.isStopped){this.isStopped=!0;var b=this.scheduler.now();this._trim(b);for(var c=this.observers.slice(0),e=0,f=c.length;f>e;e++)a=c[e],a.onCompleted(),a.ensureActive();this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(e),v=c.ConnectableObservable=function(a){function b(b,c){function d(a){return e.subject.subscribe(a)}var e={subject:c,source:b.asObservable(),hasSubscription:!1,subscription:null};this.connect=function(){return e.hasSubscription||(e.hasSubscription=!0,e.subscription=new n(e.source.subscribe(e.subject),l(function(){e.hasSubscription=!1}))),e.subscription},a.call(this,d)}return p(b,a),b.prototype.connect=function(){return this.connect()},b.prototype.refCount=function(){var a=null,b=0,c=this;return new g(function(d){var e,f;return b++,e=1===b,f=c.subscribe(d),e&&(a=c.connect()),l(function(){f.dispose(),b--,0===b&&a.dispose()})})},b}(e);return c});
@@ -41,13 +41,13 @@
41
41
  Subject = Rx.Subject,
42
42
  observableProto = Observable.prototype,
43
43
  observableEmpty = Observable.empty,
44
- AnonymousObservable = Rx.Internals.AnonymousObservable,
44
+ AnonymousObservable = Rx.AnonymousObservable,
45
45
  observerCreate = Rx.Observer.create,
46
- addRef = Rx.Internals.addRef;
46
+ addRef = Rx.internals.addRef,
47
+ defaultComparer = Rx.internals.isEqual;
47
48
 
48
49
  // defaults
49
50
  function noop() { }
50
- function defaultComparer(x, y) { return x === y; }
51
51
 
52
52
  // Real Dictionary
53
53
  var primes = [1, 3, 7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139, 524287, 1048573, 2097143, 4194301, 8388593, 16777213, 33554393, 67108859, 134217689, 268435399, 536870909, 1073741789, 2147483647];
@@ -1 +1 @@
1
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(){}function f(a,b){return a===b}function g(a){if(a&!1)return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function h(a){var b,c,d;for(b=0;b<y.length;++b)if(c=y[b],c>=a)return c;for(d=1|a;d<y[y.length-1];){if(g(d))return d;d+=2}return a}function i(a){var b=757602046;if(!a.length)return b;for(var c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function j(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function k(){return{key:null,value:null,next:0,hashCode:0}}function l(a,b){return a.groupJoin(this,b,function(){return v()},function(a,b){return b})}function m(a){var b=this;return new w(function(c){var d=new t,e=new p,f=new q(e);return c.onNext(x(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),e.add(a.subscribe(function(){d.onCompleted(),d=new t,c.onNext(x(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f})}function n(a){var b=this;return new w(function(c){var d,f=new s,g=new p(f),h=new q(g),i=new t;return c.onNext(x(i,h)),g.add(b.subscribe(function(a){i.onNext(a)},function(a){i.onError(a),c.onError(a)},function(){i.onCompleted(),c.onCompleted()})),d=function(){var b,g;try{g=a()}catch(j){return c.onError(j),void 0}b=new r,f.setDisposable(b),b.setDisposable(g.take(1).subscribe(e,function(a){i.onError(a),c.onError(a)},function(){i.onCompleted(),i=new t,c.onNext(x(i,h)),d()}))},d(),h})}var o=c.Observable,p=c.CompositeDisposable,q=c.RefCountDisposable,r=c.SingleAssignmentDisposable,s=c.SerialDisposable,t=c.Subject,u=o.prototype,v=o.empty,w=c.Internals.AnonymousObservable,x=(c.Observer.create,c.Internals.addRef),y=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],z="no such key",A="duplicate key",B=function(){var a=0;return function(b){if(null==b)throw new Error(z);if("string"==typeof b)return i(b);if("number"==typeof b)return j(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return b.getTime();if(b.getHashCode)return b.getHashCode();var c=17*a++;return b.getHashCode=function(){return c},c}}(),C=function(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||f,this.freeCount=0,this.size=0,this.freeList=-1};return C.prototype._initialize=function(a){var b,c=h(a);for(this.buckets=new Array(c),this.entries=new Array(c),b=0;c>b;b++)this.buckets[b]=-1,this.entries[b]=k();this.freeList=-1},C.prototype.count=function(){return this.size},C.prototype.add=function(a,b){return this._insert(a,b,!0)},C.prototype._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&B(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(A);return this.entries[g].value=b,void 0}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},C.prototype._resize=function(){var a=h(2*this.size),b=new Array(a);for(d=0;d<b.length;++d)b[d]=-1;var c=new Array(a);for(d=0;d<this.size;++d)c[d]=this.entries[d];for(var d=this.size;a>d;++d)c[d]=k();for(var e=0;e<this.size;++e){var f=c[e].hashCode%a;c[e].next=b[f],b[f]=e}this.buckets=b,this.entries=c},C.prototype.remove=function(a){if(this.buckets)for(var b=2147483647&B(a),c=b%this.buckets.length,d=-1,e=this.buckets[c];e>=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},C.prototype.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a<this.size;++a)this.entries[a]=k();this.freeList=-1,this.size=0}},C.prototype._findEntry=function(a){if(this.buckets)for(var b=2147483647&B(a),c=this.buckets[b%this.buckets.length];c>=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},C.prototype.count=function(){return this.size-this.freeCount},C.prototype.tryGetValue=function(a){var b=this._findEntry(a);return b>=0?this.entries[b].value:d},C.prototype.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c<this.size;c++)this.entries[c].hashCode>=0&&(b[a++]=this.entries[c].value);return b},C.prototype.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(z)},C.prototype.set=function(a,b){this._insert(a,b,!1)},C.prototype.containskey=function(a){return this._findEntry(a)>=0},u.join=function(a,b,c,d){var f=this;return new w(function(g){var h=new p,i=!1,j=0,k=new C,l=!1,m=0,n=new C;return h.add(f.subscribe(function(a){var c,f,l,m,o=j++,p=new r;k.add(o,a),h.add(p),f=function(){return k.remove(o)&&0===k.count()&&i&&g.onCompleted(),h.remove(p)};try{c=b(a)}catch(q){return g.onError(q),void 0}p.setDisposable(c.take(1).subscribe(e,g.onError.bind(g),function(){f()})),m=n.getValues();for(var s=0;s<m.length;s++){try{l=d(a,m[s])}catch(t){return g.onError(t),void 0}g.onNext(l)}},g.onError.bind(g),function(){i=!0,(l||0===k.count())&&g.onCompleted()})),h.add(a.subscribe(function(a){var b,f,i,j,o=m++,p=new r;n.add(o,a),h.add(p),f=function(){return n.remove(o)&&0===n.count()&&l&&g.onCompleted(),h.remove(p)};try{b=c(a)}catch(q){return g.onError(q),void 0}p.setDisposable(b.take(1).subscribe(e,g.onError.bind(g),function(){f()})),j=k.getValues();for(var s=0;s<j.length;s++){try{i=d(j[s],a)}catch(q){return g.onError(q),void 0}g.onNext(i)}},g.onError.bind(g),function(){l=!0,(i||0===n.count())&&g.onCompleted()})),h})},u.groupJoin=function(a,b,c,d){var e=this;return new w(function(f){var g=function(){},h=new p,i=new q(h),j=new C,k=new C,l=0,m=0;return h.add(e.subscribe(function(a){var c=new t,e=l++;j.add(e,c);var m,n,o,p,q;try{q=d(a,x(c,i))}catch(s){for(o=j.getValues(),m=0,n=o.length;n>m;m++)o[m].onError(s);return f.onError(s),void 0}for(f.onNext(q),p=k.getValues(),m=0,n=p.length;n>m;m++)c.onNext(p[m]);var u=new r;h.add(u);var v,w=function(){j.remove(e)&&c.onCompleted(),h.remove(u)};try{v=b(a)}catch(s){for(o=j.getValues(),m=0,n=j.length;n>m;m++)o[m].onError(s);return f.onError(s),void 0}u.setDisposable(v.take(1).subscribe(g,function(a){for(o=j.getValues(),m=0,n=o.length;n>m;m++)o[m].onError(a);f.onError(a)},w))},function(a){for(var b=j.getValues(),c=0,d=b.length;d>c;c++)b[c].onError(a);f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b,d,e,i=m++;k.add(i,a);var l=new r;h.add(l);var n,o=function(){k.remove(i),h.remove(l)};try{n=c(a)}catch(p){for(b=j.getValues(),d=0,e=j.length;e>d;d++)b[d].onError(p);return f.onError(p),void 0}for(l.setDisposable(n.take(1).subscribe(g,function(a){for(b=j.getValues(),d=0,e=j.length;e>d;d++)b[d].onError(a);f.onError(a)},o)),b=j.getValues(),d=0,e=b.length;e>d;d++)b[d].onNext(a)},function(a){for(var b=j.getValues(),c=0,d=b.length;d>c;c++)b[c].onError(a);f.onError(a)})),i})},u.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},u.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?m.call(this,a):"function"==typeof a?n.call(this,a):l.call(this,a,b)},c});
1
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(){}function f(a){if(a&!1)return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function g(a){var b,c,d;for(b=0;b<y.length;++b)if(c=y[b],c>=a)return c;for(d=1|a;d<y[y.length-1];){if(f(d))return d;d+=2}return a}function h(a){var b=757602046;if(!a.length)return b;for(var c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function i(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function j(){return{key:null,value:null,next:0,hashCode:0}}function k(a,b){return a.groupJoin(this,b,function(){return u()},function(a,b){return b})}function l(a){var b=this;return new v(function(c){var d=new s,e=new o,f=new p(e);return c.onNext(w(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),e.add(a.subscribe(function(){d.onCompleted(),d=new s,c.onNext(w(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f})}function m(a){var b=this;return new v(function(c){var d,f=new r,g=new o(f),h=new p(g),i=new s;return c.onNext(w(i,h)),g.add(b.subscribe(function(a){i.onNext(a)},function(a){i.onError(a),c.onError(a)},function(){i.onCompleted(),c.onCompleted()})),d=function(){var b,g;try{g=a()}catch(j){return c.onError(j),void 0}b=new q,f.setDisposable(b),b.setDisposable(g.take(1).subscribe(e,function(a){i.onError(a),c.onError(a)},function(){i.onCompleted(),i=new s,c.onNext(w(i,h)),d()}))},d(),h})}var n=c.Observable,o=c.CompositeDisposable,p=c.RefCountDisposable,q=c.SingleAssignmentDisposable,r=c.SerialDisposable,s=c.Subject,t=n.prototype,u=n.empty,v=c.AnonymousObservable,w=(c.Observer.create,c.internals.addRef),x=c.internals.isEqual,y=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],z="no such key",A="duplicate key",B=function(){var a=0;return function(b){if(null==b)throw new Error(z);if("string"==typeof b)return h(b);if("number"==typeof b)return i(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return b.getTime();if(b.getHashCode)return b.getHashCode();var c=17*a++;return b.getHashCode=function(){return c},c}}(),C=function(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||x,this.freeCount=0,this.size=0,this.freeList=-1};return C.prototype._initialize=function(a){var b,c=g(a);for(this.buckets=new Array(c),this.entries=new Array(c),b=0;c>b;b++)this.buckets[b]=-1,this.entries[b]=j();this.freeList=-1},C.prototype.count=function(){return this.size},C.prototype.add=function(a,b){return this._insert(a,b,!0)},C.prototype._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&B(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(A);return this.entries[g].value=b,void 0}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},C.prototype._resize=function(){var a=g(2*this.size),b=new Array(a);for(d=0;d<b.length;++d)b[d]=-1;var c=new Array(a);for(d=0;d<this.size;++d)c[d]=this.entries[d];for(var d=this.size;a>d;++d)c[d]=j();for(var e=0;e<this.size;++e){var f=c[e].hashCode%a;c[e].next=b[f],b[f]=e}this.buckets=b,this.entries=c},C.prototype.remove=function(a){if(this.buckets)for(var b=2147483647&B(a),c=b%this.buckets.length,d=-1,e=this.buckets[c];e>=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},C.prototype.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a<this.size;++a)this.entries[a]=j();this.freeList=-1,this.size=0}},C.prototype._findEntry=function(a){if(this.buckets)for(var b=2147483647&B(a),c=this.buckets[b%this.buckets.length];c>=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},C.prototype.count=function(){return this.size-this.freeCount},C.prototype.tryGetValue=function(a){var b=this._findEntry(a);return b>=0?this.entries[b].value:d},C.prototype.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c<this.size;c++)this.entries[c].hashCode>=0&&(b[a++]=this.entries[c].value);return b},C.prototype.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(z)},C.prototype.set=function(a,b){this._insert(a,b,!1)},C.prototype.containskey=function(a){return this._findEntry(a)>=0},t.join=function(a,b,c,d){var f=this;return new v(function(g){var h=new o,i=!1,j=0,k=new C,l=!1,m=0,n=new C;return h.add(f.subscribe(function(a){var c,f,l,m,o=j++,p=new q;k.add(o,a),h.add(p),f=function(){return k.remove(o)&&0===k.count()&&i&&g.onCompleted(),h.remove(p)};try{c=b(a)}catch(r){return g.onError(r),void 0}p.setDisposable(c.take(1).subscribe(e,g.onError.bind(g),function(){f()})),m=n.getValues();for(var s=0;s<m.length;s++){try{l=d(a,m[s])}catch(t){return g.onError(t),void 0}g.onNext(l)}},g.onError.bind(g),function(){i=!0,(l||0===k.count())&&g.onCompleted()})),h.add(a.subscribe(function(a){var b,f,i,j,o=m++,p=new q;n.add(o,a),h.add(p),f=function(){return n.remove(o)&&0===n.count()&&l&&g.onCompleted(),h.remove(p)};try{b=c(a)}catch(r){return g.onError(r),void 0}p.setDisposable(b.take(1).subscribe(e,g.onError.bind(g),function(){f()})),j=k.getValues();for(var s=0;s<j.length;s++){try{i=d(j[s],a)}catch(r){return g.onError(r),void 0}g.onNext(i)}},g.onError.bind(g),function(){l=!0,(i||0===n.count())&&g.onCompleted()})),h})},t.groupJoin=function(a,b,c,d){var e=this;return new v(function(f){var g=function(){},h=new o,i=new p(h),j=new C,k=new C,l=0,m=0;return h.add(e.subscribe(function(a){var c=new s,e=l++;j.add(e,c);var m,n,o,p,r;try{r=d(a,w(c,i))}catch(t){for(o=j.getValues(),m=0,n=o.length;n>m;m++)o[m].onError(t);return f.onError(t),void 0}for(f.onNext(r),p=k.getValues(),m=0,n=p.length;n>m;m++)c.onNext(p[m]);var u=new q;h.add(u);var v,x=function(){j.remove(e)&&c.onCompleted(),h.remove(u)};try{v=b(a)}catch(t){for(o=j.getValues(),m=0,n=j.length;n>m;m++)o[m].onError(t);return f.onError(t),void 0}u.setDisposable(v.take(1).subscribe(g,function(a){for(o=j.getValues(),m=0,n=o.length;n>m;m++)o[m].onError(a);f.onError(a)},x))},function(a){for(var b=j.getValues(),c=0,d=b.length;d>c;c++)b[c].onError(a);f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b,d,e,i=m++;k.add(i,a);var l=new q;h.add(l);var n,o=function(){k.remove(i),h.remove(l)};try{n=c(a)}catch(p){for(b=j.getValues(),d=0,e=j.length;e>d;d++)b[d].onError(p);return f.onError(p),void 0}for(l.setDisposable(n.take(1).subscribe(g,function(a){for(b=j.getValues(),d=0,e=j.length;e>d;d++)b[d].onError(a);f.onError(a)},o)),b=j.getValues(),d=0,e=b.length;e>d;d++)b[d].onNext(a)},function(a){for(var b=j.getValues(),c=0,d=b.length;d>c;c++)b[c].onError(a);f.onError(a)})),i})},t.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},t.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?l.call(this,a):"function"==typeof a?m.call(this,a):k.call(this,a,b)},c});