rxjs-rails 2.3.0 → 2.3.9

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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rxjs/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/rx.aggregates.js +115 -27
  4. data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
  5. data/vendor/assets/javascripts/rx.all.compat.js +2751 -2702
  6. data/vendor/assets/javascripts/rx.all.compat.min.js +3 -3
  7. data/vendor/assets/javascripts/rx.all.js +2605 -2589
  8. data/vendor/assets/javascripts/rx.all.min.js +3 -3
  9. data/vendor/assets/javascripts/rx.async.compat.js +41 -22
  10. data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
  11. data/vendor/assets/javascripts/rx.async.js +41 -22
  12. data/vendor/assets/javascripts/rx.async.min.js +1 -1
  13. data/vendor/assets/javascripts/rx.backpressure.js +41 -45
  14. data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
  15. data/vendor/assets/javascripts/rx.binding.js +81 -111
  16. data/vendor/assets/javascripts/rx.binding.min.js +1 -1
  17. data/vendor/assets/javascripts/rx.coincidence.js +567 -486
  18. data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
  19. data/vendor/assets/javascripts/rx.compat.js +1430 -1532
  20. data/vendor/assets/javascripts/rx.compat.min.js +2 -2
  21. data/vendor/assets/javascripts/rx.core.compat.js +76 -127
  22. data/vendor/assets/javascripts/rx.core.compat.min.js +1 -1
  23. data/vendor/assets/javascripts/rx.core.js +76 -127
  24. data/vendor/assets/javascripts/rx.core.min.js +1 -1
  25. data/vendor/assets/javascripts/rx.experimental.js +36 -36
  26. data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
  27. data/vendor/assets/javascripts/rx.joinpatterns.js +281 -281
  28. data/vendor/assets/javascripts/rx.js +1286 -1421
  29. data/vendor/assets/javascripts/rx.lite.compat.js +1443 -1749
  30. data/vendor/assets/javascripts/rx.lite.compat.min.js +2 -2
  31. data/vendor/assets/javascripts/rx.lite.extras.js +133 -205
  32. data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -1
  33. data/vendor/assets/javascripts/rx.lite.js +1319 -1658
  34. data/vendor/assets/javascripts/rx.lite.min.js +2 -2
  35. data/vendor/assets/javascripts/rx.min.js +2 -2
  36. data/vendor/assets/javascripts/rx.testing.js +302 -322
  37. data/vendor/assets/javascripts/rx.testing.min.js +1 -1
  38. data/vendor/assets/javascripts/rx.time.js +90 -75
  39. data/vendor/assets/javascripts/rx.time.min.js +1 -1
  40. data/vendor/assets/javascripts/rx.virtualtime.js +264 -279
  41. data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
  42. metadata +10 -11
@@ -41,7 +41,7 @@
41
41
  defaultSubComparer = Rx.helpers.defaultSubComparer = function (x, y) { return x > y ? 1 : (x < y ? -1 : 0); },
42
42
  defaultKeySerializer = Rx.helpers.defaultKeySerializer = function (x) { return x.toString(); },
43
43
  defaultError = Rx.helpers.defaultError = function (err) { throw err; },
44
- isPromise = Rx.helpers.isPromise = function (p) { return !!p && typeof p.then === 'function' && p.then !== Rx.Observable.prototype.then; },
44
+ isPromise = Rx.helpers.isPromise = function (p) { return !!p && typeof p.then === 'function'; },
45
45
  asArray = Rx.helpers.asArray = function () { return Array.prototype.slice.call(arguments); },
46
46
  not = Rx.helpers.not = function (a) { return !a; };
47
47
 
@@ -1113,67 +1113,64 @@
1113
1113
  return new Scheduler(defaultNow, scheduleNow, scheduleRelative, scheduleAbsolute);
1114
1114
  }());
1115
1115
 
1116
- /**
1117
- * Gets a scheduler that schedules work as soon as possible on the current thread.
1118
- */
1119
- var currentThreadScheduler = Scheduler.currentThread = (function () {
1120
- var queue;
1121
-
1122
- function runTrampoline (q) {
1123
- var item;
1124
- while (q.length > 0) {
1125
- item = q.dequeue();
1126
- if (!item.isCancelled()) {
1127
- // Note, do not schedule blocking work!
1128
- while (item.dueTime - Scheduler.now() > 0) {
1129
- }
1130
- if (!item.isCancelled()) {
1131
- item.invoke();
1132
- }
1133
- }
1134
- }
1116
+ /**
1117
+ * Gets a scheduler that schedules work as soon as possible on the current thread.
1118
+ */
1119
+ var currentThreadScheduler = Scheduler.currentThread = (function () {
1120
+ var queue;
1121
+
1122
+ function runTrampoline (q) {
1123
+ var item;
1124
+ while (q.length > 0) {
1125
+ item = q.dequeue();
1126
+ if (!item.isCancelled()) {
1127
+ // Note, do not schedule blocking work!
1128
+ while (item.dueTime - Scheduler.now() > 0) {
1129
+ }
1130
+ if (!item.isCancelled()) {
1131
+ item.invoke();
1132
+ }
1135
1133
  }
1134
+ }
1135
+ }
1136
1136
 
1137
- function scheduleNow(state, action) {
1138
- return this.scheduleWithRelativeAndState(state, 0, action);
1139
- }
1137
+ function scheduleNow(state, action) {
1138
+ return this.scheduleWithRelativeAndState(state, 0, action);
1139
+ }
1140
1140
 
1141
- function scheduleRelative(state, dueTime, action) {
1142
- var dt = this.now() + Scheduler.normalize(dueTime),
1143
- si = new ScheduledItem(this, state, action, dt),
1144
- t;
1145
- if (!queue) {
1146
- queue = new PriorityQueue(4);
1147
- queue.enqueue(si);
1148
- try {
1149
- runTrampoline(queue);
1150
- } catch (e) {
1151
- throw e;
1152
- } finally {
1153
- queue = null;
1154
- }
1155
- } else {
1156
- queue.enqueue(si);
1157
- }
1158
- return si.disposable;
1159
- }
1141
+ function scheduleRelative(state, dueTime, action) {
1142
+ var dt = this.now() + Scheduler.normalize(dueTime),
1143
+ si = new ScheduledItem(this, state, action, dt);
1160
1144
 
1161
- function scheduleAbsolute(state, dueTime, action) {
1162
- return this.scheduleWithRelativeAndState(state, dueTime - this.now(), action);
1145
+ if (!queue) {
1146
+ queue = new PriorityQueue(4);
1147
+ queue.enqueue(si);
1148
+ try {
1149
+ runTrampoline(queue);
1150
+ } catch (e) {
1151
+ throw e;
1152
+ } finally {
1153
+ queue = null;
1163
1154
  }
1155
+ } else {
1156
+ queue.enqueue(si);
1157
+ }
1158
+ return si.disposable;
1159
+ }
1164
1160
 
1165
- var currentScheduler = new Scheduler(defaultNow, scheduleNow, scheduleRelative, scheduleAbsolute);
1166
- currentScheduler.scheduleRequired = function () { return queue === null; };
1167
- currentScheduler.ensureTrampoline = function (action) {
1168
- if (queue === null) {
1169
- return this.schedule(action);
1170
- } else {
1171
- return action();
1172
- }
1173
- };
1161
+ function scheduleAbsolute(state, dueTime, action) {
1162
+ return this.scheduleWithRelativeAndState(state, dueTime - this.now(), action);
1163
+ }
1174
1164
 
1175
- return currentScheduler;
1176
- }());
1165
+ var currentScheduler = new Scheduler(defaultNow, scheduleNow, scheduleRelative, scheduleAbsolute);
1166
+
1167
+ currentScheduler.scheduleRequired = function () { return !queue; };
1168
+ currentScheduler.ensureTrampoline = function (action) {
1169
+ if (!queue) { this.schedule(action); } else { action(); }
1170
+ };
1171
+
1172
+ return currentScheduler;
1173
+ }());
1177
1174
 
1178
1175
 
1179
1176
  var scheduleMethod, clearMethod = noop;
@@ -2037,13 +2034,11 @@
2037
2034
 
2038
2035
  // Fix subscriber to check for undefined or function returned to decorate as Disposable
2039
2036
  function fixSubscriber(subscriber) {
2040
- if (typeof subscriber === 'undefined') {
2041
- subscriber = disposableEmpty;
2042
- } else if (typeof subscriber === 'function') {
2043
- subscriber = disposableCreate(subscriber);
2044
- }
2037
+ if (subscriber && typeof subscriber.dispose === 'function') { return subscriber; }
2045
2038
 
2046
- return subscriber;
2039
+ return typeof subscriber === 'function' ?
2040
+ disposableCreate(subscriber) :
2041
+ disposableEmpty;
2047
2042
  }
2048
2043
 
2049
2044
  function AnonymousObservable(subscribe) {
@@ -2140,31 +2135,6 @@
2140
2135
  return AutoDetachObserver;
2141
2136
  }(AbstractObserver));
2142
2137
 
2143
- /** @private */
2144
- var GroupedObservable = (function (_super) {
2145
- inherits(GroupedObservable, _super);
2146
-
2147
- function subscribe(observer) {
2148
- return this.underlyingObservable.subscribe(observer);
2149
- }
2150
-
2151
- /**
2152
- * @constructor
2153
- * @private
2154
- */
2155
- function GroupedObservable(key, underlyingObservable, mergedDisposable) {
2156
- _super.call(this, subscribe);
2157
- this.key = key;
2158
- this.underlyingObservable = !mergedDisposable ?
2159
- underlyingObservable :
2160
- new AnonymousObservable(function (observer) {
2161
- return new CompositeDisposable(mergedDisposable.getDisposable(), underlyingObservable.subscribe(observer));
2162
- });
2163
- }
2164
-
2165
- return GroupedObservable;
2166
- }(Observable));
2167
-
2168
2138
  /** @private */
2169
2139
  var InnerSubscription = function (subject, observer) {
2170
2140
  this.subject = subject;
@@ -2416,50 +2386,29 @@
2416
2386
  return AsyncSubject;
2417
2387
  }(Observable));
2418
2388
 
2419
- /** @private */
2420
- var AnonymousSubject = (function (_super) {
2421
- inherits(AnonymousSubject, _super);
2422
-
2423
- function subscribe(observer) {
2424
- return this.observable.subscribe(observer);
2425
- }
2389
+ var AnonymousSubject = Rx.AnonymousSubject = (function (__super__) {
2390
+ inherits(AnonymousSubject, __super__);
2426
2391
 
2427
- /**
2428
- * @private
2429
- * @constructor
2430
- */
2431
- function AnonymousSubject(observer, observable) {
2432
- _super.call(this, subscribe);
2433
- this.observer = observer;
2434
- this.observable = observable;
2435
- }
2392
+ function AnonymousSubject(observer, observable) {
2393
+ this.observer = observer;
2394
+ this.observable = observable;
2395
+ __super__.call(this, this.observable.subscribe.bind(this.observable));
2396
+ }
2436
2397
 
2437
- addProperties(AnonymousSubject.prototype, Observer, {
2438
- /**
2439
- * @private
2440
- * @memberOf AnonymousSubject#
2441
- */
2442
- onCompleted: function () {
2443
- this.observer.onCompleted();
2444
- },
2445
- /**
2446
- * @private
2447
- * @memberOf AnonymousSubject#
2448
- */
2449
- onError: function (exception) {
2450
- this.observer.onError(exception);
2451
- },
2452
- /**
2453
- * @private
2454
- * @memberOf AnonymousSubject#
2455
- */
2456
- onNext: function (value) {
2457
- this.observer.onNext(value);
2458
- }
2459
- });
2398
+ addProperties(AnonymousSubject.prototype, Observer, {
2399
+ onCompleted: function () {
2400
+ this.observer.onCompleted();
2401
+ },
2402
+ onError: function (exception) {
2403
+ this.observer.onError(exception);
2404
+ },
2405
+ onNext: function (value) {
2406
+ this.observer.onNext(value);
2407
+ }
2408
+ });
2460
2409
 
2461
- return AnonymousSubject;
2462
- }(Observable));
2410
+ return AnonymousSubject;
2411
+ }(Observable));
2463
2412
 
2464
2413
  if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
2465
2414
  root.Rx = Rx;
@@ -1 +1 @@
1
- (function(a){function b(){if(this.isDisposed)throw new Error(A)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;X.nonEnumArgs&&a.length&&h(a)&&(a=Z.call(a));var d=X.enumPrototypes&&"function"==typeof a,e=X.enumErrorProps&&(a===R||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(X.nonEnumShadows&&a!==S){var g=a.constructor,i=-1,j=V.length;if(a===(g&&g.prototype))var k=a===stringProto?N:a===R?I:O.call(a),l=W[k];for(;++i<j;)f=V[i],l&&l[f]||!P.call(a,f)||b.push(f)}return b}function e(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function f(a,b){return e(a,b,d)}function g(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function h(a){return a&&"object"==typeof a?O.call(a)==E:!1}function i(a){return"function"==typeof a||!1}function j(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,k=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=k&&"object"!=k))return!1;var l=O.call(a),m=O.call(b);if(l==E&&(l=L),m==E&&(m=L),l!=m)return!1;switch(l){case G:case H:return+a==+b;case K:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case M:case N:return a==String(b)}var n=l==F;if(!n){if(l!=L||!X.nodeClass&&(g(a)||g(b)))return!1;var o=!X.argsObject&&h(a)?Object:a.constructor,p=!X.argsObject&&h(b)?Object:b.constructor;if(!(o==p||P.call(a,"constructor")&&P.call(b,"constructor")||i(o)&&o instanceof o&&i(p)&&p instanceof p||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var q=c.length;q--;)if(c[q]==a)return d[q]==b;var r=0;if(result=!0,c.push(a),d.push(b),n){if(q=a.length,r=b.length,result=r==q)for(;r--;){var s=b[r];if(!(result=j(a[r],s,c,d)))break}}else f(b,function(b,e,f){return P.call(f,e)?(r++,result=P.call(a,e)&&j(a[e],b,c,d)):void 0}),result&&f(a,function(a,b,c){return P.call(c,b)?result=--r>-1:void 0});return c.pop(),d.pop(),result}function k(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:Z.call(a)}function l(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}var m={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},n=m[typeof window]&&window||this,o=m[typeof exports]&&exports&&!exports.nodeType&&exports,p=m[typeof module]&&module&&!module.nodeType&&module,q=p&&p.exports===o&&o,r=m[typeof global]&&global;!r||r.global!==r&&r.window!==r||(n=r);var s={internals:{},config:{Promise:n.Promise},helpers:{}},t=s.helpers.noop=function(){},u=(s.helpers.notDefined=function(a){return"undefined"==typeof a},s.helpers.isScheduler=function(a){return a instanceof s.Scheduler}),v=s.helpers.identity=function(a){return a},w=(s.helpers.pluck=function(a){return function(b){return b[a]}},s.helpers.just=function(a){return function(){return a}},s.helpers.defaultNow=Date.now),x=(s.helpers.defaultComparer=function(a,b){return Y(a,b)},s.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0}),y=(s.helpers.defaultKeySerializer=function(a){return a.toString()},s.helpers.defaultError=function(a){throw a}),z=s.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then&&a.then!==s.Observable.prototype.then},A=(s.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},s.helpers.not=function(a){return!a},"Object has been disposed"),B="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";n.Set&&"function"==typeof(new n.Set)["@@iterator"]&&(B="@@iterator");var C,D={done:!0,value:a},E="[object Arguments]",F="[object Array]",G="[object Boolean]",H="[object Date]",I="[object Error]",J="[object Function]",K="[object Number]",L="[object Object]",M="[object RegExp]",N="[object String]",O=Object.prototype.toString,P=Object.prototype.hasOwnProperty,Q=O.call(arguments)==E,R=Error.prototype,S=Object.prototype,T=S.propertyIsEnumerable;try{C=!(O.call(document)==L&&!({toString:0}+""))}catch(U){C=!0}var V=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],W={};W[F]=W[H]=W[K]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},W[G]=W[N]={constructor:!0,toString:!0,valueOf:!0},W[I]=W[J]=W[M]={constructor:!0,toString:!0},W[L]={constructor:!0};var X={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);X.enumErrorProps=T.call(R,"message")||T.call(R,"name"),X.enumPrototypes=T.call(a,"prototype"),X.nonEnumArgs=0!=c,X.nonEnumShadows=!/valueOf/.test(b)}(1),Q||(h=function(a){return a&&"object"==typeof a?P.call(a,"callee"):!1}),i(/x/)&&(i=function(a){return"function"==typeof a&&O.call(a)==J});var Y=s.internals.isEqual=function(a,b){return j(a,b,[],[])},Z=Array.prototype.slice,$=({}.hasOwnProperty,this.inherits=s.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),_=s.internals.addProperties=function(a){for(var b=Z.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},ab=(s.internals.addRef=function(a,b){return new Ib(function(c){return new db(b.getDisposable(),a.subscribe(c))})},function(a,b){this.id=a,this.value=b});ab.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var bb=s.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},cb=bb.prototype;cb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},cb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},cb.heapify=function(b){if(b===a&&(b=0),!(b>=this.length||0>b)){var c=2*b+1,d=2*b+2,e=b;if(c<this.length&&this.isHigherPriority(c,e)&&(e=c),d<this.length&&this.isHigherPriority(d,e)&&(e=d),e!==b){var f=this.items[b];this.items[b]=this.items[e],this.items[e]=f,this.heapify(e)}}},cb.peek=function(){return this.items[0].value},cb.removeAt=function(a){this.items[a]=this.items[--this.length],delete this.items[this.length],this.heapify()},cb.dequeue=function(){var a=this.peek();return this.removeAt(0),a},cb.enqueue=function(a){var b=this.length++;this.items[b]=new ab(bb.count++,a),this.percolate(b)},cb.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},bb.count=0;var db=s.CompositeDisposable=function(){this.disposables=k(arguments,0),this.isDisposed=!1,this.length=this.disposables.length},eb=db.prototype;eb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},eb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},eb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.disposables.slice(0);this.disposables=[],this.length=0;for(var b=0,c=a.length;c>b;b++)a[b].dispose()}},eb.clear=function(){var a=this.disposables.slice(0);this.disposables=[],this.length=0;for(var b=0,c=a.length;c>b;b++)a[b].dispose()},eb.contains=function(a){return-1!==this.disposables.indexOf(a)},eb.toArray=function(){return this.disposables.slice(0)};var fb=s.Disposable=function(a){this.isDisposed=!1,this.action=a||t};fb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};{var gb=fb.create=function(a){return new fb(a)},hb=fb.empty={dispose:t},ib=function(){function a(a){this.isSingle=a,this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){if(this.current&&this.isSingle)throw new Error("Disposable has already been assigned");var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),jb=s.SingleAssignmentDisposable=function(a){function b(){a.call(this,!0)}return $(b,a),b}(ib),kb=s.SerialDisposable=function(a){function b(){a.call(this,!1)}return $(b,a),b}(ib);s.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?hb:new a(this)},b}()}l.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var lb=s.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||x,this.disposable=new jb};lb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},lb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},lb.prototype.isCancelled=function(){return this.disposable.isDisposed},lb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var mb,nb=s.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){var c=b.first,d=b.second,e=new db,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),hb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new db,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),hb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){return b(),hb}var e=a.prototype;return e.catchException=e["catch"]=function(a){return new sb(this,a)},e.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,function(){b()})},e.schedulePeriodicWithState=function(a,b,c){var d=a,e=setInterval(function(){d=c(d)},b);return gb(function(){clearInterval(e)})},e.schedule=function(a){return this._schedule(a,d)},e.scheduleWithState=function(a,b){return this._schedule(a,b)},e.scheduleWithRelative=function(a,b){return this._scheduleRelative(b,a,d)},e.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},e.scheduleWithAbsolute=function(a,b){return this._scheduleAbsolute(b,a,d)},e.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},e.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},e.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},function(a,c){return b(a,c)})},e.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,function(a,b){a(function(c){b(a,c)})})},e.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},e.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,function(a,b){a(function(c){b(a,c)})})},e.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})},a.now=w,a.normalize=function(a){return 0>a&&(a=0),a},a}(),ob=nb.normalize,pb=(s.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new jb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),nb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=ob(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new nb(w,a,b,c)}()),qb=nb.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-nb.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+nb.normalize(c),g=new lb(this,b,d,f);if(e)e.enqueue(g);else{e=new bb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new nb(w,b,c,d);return f.scheduleRequired=function(){return null===e},f.ensureTrampoline=function(a){return null===e?this.schedule(a):a()},f}(),rb=t;!function(){function a(){if(!n.postMessage||n.importScripts)return!1;var a=!1,b=n.onmessage;return n.onmessage=function(){a=!0},n.postMessage("","*"),n.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(O).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=r&&q&&r.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=r&&q&&r.clearImmediate)&&!c.test(e)&&e;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))mb=process.nextTick;else if("function"==typeof d)mb=d,rb=e;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;n.addEventListener?n.addEventListener("message",b,!1):n.attachEvent("onmessage",b,!1),mb=function(a){var b=h++;g[b]=a,n.postMessage(f+b,"*")}}else if(n.MessageChannel){var i=new n.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},mb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in n&&"onreadystatechange"in n.document.createElement("script")?mb=function(a){var b=n.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},n.document.documentElement.appendChild(b)}:(mb=function(a){return setTimeout(a,0)},rb=clearTimeout)}();var sb=(nb.timeout=function(){function a(a,b){var c=this,d=new jb,e=mb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new db(d,gb(function(){rb(e)}))}function b(a,b,c){var d=this,e=nb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new jb,g=setTimeout(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new db(f,gb(function(){clearTimeout(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new nb(w,a,b,c)}(),function(a){function b(){return this._scheduler.now()}function c(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function d(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function e(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function f(f,g){this._scheduler=f,this._handler=g,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,b,c,d,e)}return $(f,a),f.prototype._clone=function(a){return new f(a,this._handler)},f.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return hb}}},f.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},f.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new jb;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},f}(nb)),tb=s.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return u(a)||(a=pb),new Ib(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),ub=tb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new tb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),vb=tb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new tb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),wb=tb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new tb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),xb=s.internals.Enumerator=function(a){this._next=a};xb.prototype.next=function(){return this._next()},xb.prototype[B]=function(){return this};var yb=s.internals.Enumerable=function(a){this._iterator=a};yb.prototype[B]=function(){return this._iterator()},yb.prototype.concat=function(){var a=this;return new Ib(function(b){var c;try{c=a[B]()}catch(d){return void b.onError()}var e,f=new kb,g=pb.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;z(h)&&(h=observableFromPromise(h));var i=new jb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new db(f,g,gb(function(){e=!0}))})},yb.prototype.catchException=function(){var a=this;return new Ib(function(b){var c;try{c=a[B]()}catch(d){return void b.onError()}var e,f,g=new kb,h=pb.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;z(i)&&(i=observableFromPromise(i));var j=new jb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new db(g,h,gb(function(){e=!0}))})};var zb=(yb.repeat=function(a,b){return null==b&&(b=-1),new yb(function(){var c=b;return new xb(function(){return 0===c?D:(c>0&&c--,{done:!1,value:a})})})},yb.forEach=function(a,b,c){return b||(b=v),new yb(function(){var d=-1;return new xb(function(){return++d<a.length?{done:!1,value:b.call(c,a[d],d,a)}:D})})},s.Observer=function(){});zb.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},zb.prototype.asObserver=function(){return new Db(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},zb.prototype.checked=function(){return new Eb(this)};var Ab=zb.create=function(a,b,c){return a||(a=t),b||(b=y),c||(c=t),new Db(a,b,c)};zb.fromNotifier=function(a){return new Db(function(b){return a(ub(b))},function(b){return a(vb(b))},function(){return a(wb())})},zb.notifyOn=function(a){return new Gb(a,this)};var Bb,Cb=s.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}return $(b,a),b.prototype.onNext=function(a){this.isStopped||this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(zb),Db=s.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return $(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(Cb),Eb=function(a){function b(b){a.call(this),this._observer=b,this._state=0}$(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();try{this._observer.onNext(a)}catch(b){throw b}finally{this._state=0}},c.onError=function(a){this.checkAccess();try{this._observer.onError(a)}catch(b){throw b}finally{this._state=2}},c.onCompleted=function(){this.checkAccess();try{this._observer.onCompleted()}catch(a){throw a}finally{this._state=2}},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(zb),Fb=s.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new kb}return $(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Cb),Gb=function(a){function b(){a.apply(this,arguments)}return $(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(Fb),Hb=s.Observable=function(){function a(a){this._subscribe=a}return Bb=a.prototype,Bb.subscribe=Bb.forEach=function(a,b,c){var d="object"==typeof a?a:Ab(a,b,c);return this._subscribe(d)},a}(),Ib=s.AnonymousObservable=function(a){function b(a){return"undefined"==typeof a?a=hb:"function"==typeof a&&(a=gb(a)),a}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new Jb(a);return qb.scheduleRequired()?qb.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return $(c,a),c}(Hb),Jb=function(a){function b(b){a.call(this),this.observer=b,this.m=new jb}$(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Cb),Kb=(function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new Ib(function(a){return new db(e.getDisposable(),d.subscribe(a))}):d}return $(c,a),c}(Hb),function(a,b){this.subject=a,this.observer=b});Kb.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 Lb=(s.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),hb):(a.onCompleted(),hb):(this.observers.push(a),new Kb(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return $(d,a),_(d.prototype,zb,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Lb(a,b)},d}(Hb),s.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new Kb(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),hb}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return $(d,a),_(d.prototype,zb,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Hb),function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){a.call(this,b),this.observer=c,this.observable=d}return $(c,a),_(c.prototype,zb,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Hb));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(n.Rx=s,define(function(){return s})):o&&p?q?(p.exports=s).Rx=s:o.Rx=s:n.Rx=s}).call(this);
1
+ (function(a){function b(){if(this.isDisposed)throw new Error(A)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;X.nonEnumArgs&&a.length&&h(a)&&(a=Z.call(a));var d=X.enumPrototypes&&"function"==typeof a,e=X.enumErrorProps&&(a===R||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(X.nonEnumShadows&&a!==S){var g=a.constructor,i=-1,j=V.length;if(a===(g&&g.prototype))var k=a===stringProto?N:a===R?I:O.call(a),l=W[k];for(;++i<j;)f=V[i],l&&l[f]||!P.call(a,f)||b.push(f)}return b}function e(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function f(a,b){return e(a,b,d)}function g(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function h(a){return a&&"object"==typeof a?O.call(a)==E:!1}function i(a){return"function"==typeof a||!1}function j(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,k=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=k&&"object"!=k))return!1;var l=O.call(a),m=O.call(b);if(l==E&&(l=L),m==E&&(m=L),l!=m)return!1;switch(l){case G:case H:return+a==+b;case K:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case M:case N:return a==String(b)}var n=l==F;if(!n){if(l!=L||!X.nodeClass&&(g(a)||g(b)))return!1;var o=!X.argsObject&&h(a)?Object:a.constructor,p=!X.argsObject&&h(b)?Object:b.constructor;if(!(o==p||P.call(a,"constructor")&&P.call(b,"constructor")||i(o)&&o instanceof o&&i(p)&&p instanceof p||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var q=c.length;q--;)if(c[q]==a)return d[q]==b;var r=0;if(result=!0,c.push(a),d.push(b),n){if(q=a.length,r=b.length,result=r==q)for(;r--;){var s=b[r];if(!(result=j(a[r],s,c,d)))break}}else f(b,function(b,e,f){return P.call(f,e)?(r++,result=P.call(a,e)&&j(a[e],b,c,d)):void 0}),result&&f(a,function(a,b,c){return P.call(c,b)?result=--r>-1:void 0});return c.pop(),d.pop(),result}function k(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:Z.call(a)}function l(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}var m={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},n=m[typeof window]&&window||this,o=m[typeof exports]&&exports&&!exports.nodeType&&exports,p=m[typeof module]&&module&&!module.nodeType&&module,q=p&&p.exports===o&&o,r=m[typeof global]&&global;!r||r.global!==r&&r.window!==r||(n=r);var s={internals:{},config:{Promise:n.Promise},helpers:{}},t=s.helpers.noop=function(){},u=(s.helpers.notDefined=function(a){return"undefined"==typeof a},s.helpers.isScheduler=function(a){return a instanceof s.Scheduler}),v=s.helpers.identity=function(a){return a},w=(s.helpers.pluck=function(a){return function(b){return b[a]}},s.helpers.just=function(a){return function(){return a}},s.helpers.defaultNow=Date.now),x=(s.helpers.defaultComparer=function(a,b){return Y(a,b)},s.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0}),y=(s.helpers.defaultKeySerializer=function(a){return a.toString()},s.helpers.defaultError=function(a){throw a}),z=s.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},A=(s.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},s.helpers.not=function(a){return!a},"Object has been disposed"),B="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";n.Set&&"function"==typeof(new n.Set)["@@iterator"]&&(B="@@iterator");var C,D={done:!0,value:a},E="[object Arguments]",F="[object Array]",G="[object Boolean]",H="[object Date]",I="[object Error]",J="[object Function]",K="[object Number]",L="[object Object]",M="[object RegExp]",N="[object String]",O=Object.prototype.toString,P=Object.prototype.hasOwnProperty,Q=O.call(arguments)==E,R=Error.prototype,S=Object.prototype,T=S.propertyIsEnumerable;try{C=!(O.call(document)==L&&!({toString:0}+""))}catch(U){C=!0}var V=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],W={};W[F]=W[H]=W[K]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},W[G]=W[N]={constructor:!0,toString:!0,valueOf:!0},W[I]=W[J]=W[M]={constructor:!0,toString:!0},W[L]={constructor:!0};var X={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);X.enumErrorProps=T.call(R,"message")||T.call(R,"name"),X.enumPrototypes=T.call(a,"prototype"),X.nonEnumArgs=0!=c,X.nonEnumShadows=!/valueOf/.test(b)}(1),Q||(h=function(a){return a&&"object"==typeof a?P.call(a,"callee"):!1}),i(/x/)&&(i=function(a){return"function"==typeof a&&O.call(a)==J});var Y=s.internals.isEqual=function(a,b){return j(a,b,[],[])},Z=Array.prototype.slice,$=({}.hasOwnProperty,this.inherits=s.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),_=s.internals.addProperties=function(a){for(var b=Z.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},ab=(s.internals.addRef=function(a,b){return new Ib(function(c){return new db(b.getDisposable(),a.subscribe(c))})},function(a,b){this.id=a,this.value=b});ab.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var bb=s.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},cb=bb.prototype;cb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},cb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},cb.heapify=function(b){if(b===a&&(b=0),!(b>=this.length||0>b)){var c=2*b+1,d=2*b+2,e=b;if(c<this.length&&this.isHigherPriority(c,e)&&(e=c),d<this.length&&this.isHigherPriority(d,e)&&(e=d),e!==b){var f=this.items[b];this.items[b]=this.items[e],this.items[e]=f,this.heapify(e)}}},cb.peek=function(){return this.items[0].value},cb.removeAt=function(a){this.items[a]=this.items[--this.length],delete this.items[this.length],this.heapify()},cb.dequeue=function(){var a=this.peek();return this.removeAt(0),a},cb.enqueue=function(a){var b=this.length++;this.items[b]=new ab(bb.count++,a),this.percolate(b)},cb.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},bb.count=0;var db=s.CompositeDisposable=function(){this.disposables=k(arguments,0),this.isDisposed=!1,this.length=this.disposables.length},eb=db.prototype;eb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},eb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},eb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.disposables.slice(0);this.disposables=[],this.length=0;for(var b=0,c=a.length;c>b;b++)a[b].dispose()}},eb.clear=function(){var a=this.disposables.slice(0);this.disposables=[],this.length=0;for(var b=0,c=a.length;c>b;b++)a[b].dispose()},eb.contains=function(a){return-1!==this.disposables.indexOf(a)},eb.toArray=function(){return this.disposables.slice(0)};var fb=s.Disposable=function(a){this.isDisposed=!1,this.action=a||t};fb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};{var gb=fb.create=function(a){return new fb(a)},hb=fb.empty={dispose:t},ib=function(){function a(a){this.isSingle=a,this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){if(this.current&&this.isSingle)throw new Error("Disposable has already been assigned");var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),jb=s.SingleAssignmentDisposable=function(a){function b(){a.call(this,!0)}return $(b,a),b}(ib),kb=s.SerialDisposable=function(a){function b(){a.call(this,!1)}return $(b,a),b}(ib);s.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?hb:new a(this)},b}()}l.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var lb=s.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||x,this.disposable=new jb};lb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},lb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},lb.prototype.isCancelled=function(){return this.disposable.isDisposed},lb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var mb,nb=s.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){var c=b.first,d=b.second,e=new db,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),hb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new db,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),hb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){return b(),hb}var e=a.prototype;return e.catchException=e["catch"]=function(a){return new sb(this,a)},e.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,function(){b()})},e.schedulePeriodicWithState=function(a,b,c){var d=a,e=setInterval(function(){d=c(d)},b);return gb(function(){clearInterval(e)})},e.schedule=function(a){return this._schedule(a,d)},e.scheduleWithState=function(a,b){return this._schedule(a,b)},e.scheduleWithRelative=function(a,b){return this._scheduleRelative(b,a,d)},e.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},e.scheduleWithAbsolute=function(a,b){return this._scheduleAbsolute(b,a,d)},e.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},e.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},e.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},function(a,c){return b(a,c)})},e.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,function(a,b){a(function(c){b(a,c)})})},e.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},e.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,function(a,b){a(function(c){b(a,c)})})},e.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})},a.now=w,a.normalize=function(a){return 0>a&&(a=0),a},a}(),ob=nb.normalize,pb=(s.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new jb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),nb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=ob(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new nb(w,a,b,c)}()),qb=nb.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-nb.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+nb.normalize(c),g=new lb(this,b,d,f);if(e)e.enqueue(g);else{e=new bb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new nb(w,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),rb=t;!function(){function a(){if(!n.postMessage||n.importScripts)return!1;var a=!1,b=n.onmessage;return n.onmessage=function(){a=!0},n.postMessage("","*"),n.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(O).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=r&&q&&r.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=r&&q&&r.clearImmediate)&&!c.test(e)&&e;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))mb=process.nextTick;else if("function"==typeof d)mb=d,rb=e;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;n.addEventListener?n.addEventListener("message",b,!1):n.attachEvent("onmessage",b,!1),mb=function(a){var b=h++;g[b]=a,n.postMessage(f+b,"*")}}else if(n.MessageChannel){var i=new n.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},mb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in n&&"onreadystatechange"in n.document.createElement("script")?mb=function(a){var b=n.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},n.document.documentElement.appendChild(b)}:(mb=function(a){return setTimeout(a,0)},rb=clearTimeout)}();var sb=(nb.timeout=function(){function a(a,b){var c=this,d=new jb,e=mb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new db(d,gb(function(){rb(e)}))}function b(a,b,c){var d=this,e=nb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new jb,g=setTimeout(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new db(f,gb(function(){clearTimeout(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new nb(w,a,b,c)}(),function(a){function b(){return this._scheduler.now()}function c(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function d(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function e(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function f(f,g){this._scheduler=f,this._handler=g,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,b,c,d,e)}return $(f,a),f.prototype._clone=function(a){return new f(a,this._handler)},f.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return hb}}},f.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},f.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new jb;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},f}(nb)),tb=s.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return u(a)||(a=pb),new Ib(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),ub=tb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new tb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),vb=tb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new tb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),wb=tb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new tb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),xb=s.internals.Enumerator=function(a){this._next=a};xb.prototype.next=function(){return this._next()},xb.prototype[B]=function(){return this};var yb=s.internals.Enumerable=function(a){this._iterator=a};yb.prototype[B]=function(){return this._iterator()},yb.prototype.concat=function(){var a=this;return new Ib(function(b){var c;try{c=a[B]()}catch(d){return void b.onError()}var e,f=new kb,g=pb.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;z(h)&&(h=observableFromPromise(h));var i=new jb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new db(f,g,gb(function(){e=!0}))})},yb.prototype.catchException=function(){var a=this;return new Ib(function(b){var c;try{c=a[B]()}catch(d){return void b.onError()}var e,f,g=new kb,h=pb.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;z(i)&&(i=observableFromPromise(i));var j=new jb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new db(g,h,gb(function(){e=!0}))})};var zb=(yb.repeat=function(a,b){return null==b&&(b=-1),new yb(function(){var c=b;return new xb(function(){return 0===c?D:(c>0&&c--,{done:!1,value:a})})})},yb.forEach=function(a,b,c){return b||(b=v),new yb(function(){var d=-1;return new xb(function(){return++d<a.length?{done:!1,value:b.call(c,a[d],d,a)}:D})})},s.Observer=function(){});zb.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},zb.prototype.asObserver=function(){return new Db(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},zb.prototype.checked=function(){return new Eb(this)};var Ab=zb.create=function(a,b,c){return a||(a=t),b||(b=y),c||(c=t),new Db(a,b,c)};zb.fromNotifier=function(a){return new Db(function(b){return a(ub(b))},function(b){return a(vb(b))},function(){return a(wb())})},zb.notifyOn=function(a){return new Gb(a,this)};var Bb,Cb=s.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}return $(b,a),b.prototype.onNext=function(a){this.isStopped||this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(zb),Db=s.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return $(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(Cb),Eb=function(a){function b(b){a.call(this),this._observer=b,this._state=0}$(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();try{this._observer.onNext(a)}catch(b){throw b}finally{this._state=0}},c.onError=function(a){this.checkAccess();try{this._observer.onError(a)}catch(b){throw b}finally{this._state=2}},c.onCompleted=function(){this.checkAccess();try{this._observer.onCompleted()}catch(a){throw a}finally{this._state=2}},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(zb),Fb=s.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new kb}return $(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Cb),Gb=function(a){function b(){a.apply(this,arguments)}return $(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(Fb),Hb=s.Observable=function(){function a(a){this._subscribe=a}return Bb=a.prototype,Bb.subscribe=Bb.forEach=function(a,b,c){var d="object"==typeof a?a:Ab(a,b,c);return this._subscribe(d)},a}(),Ib=s.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?gb(a):hb}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new Jb(a);return qb.scheduleRequired()?qb.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return $(c,a),c}(Hb),Jb=function(a){function b(b){a.call(this),this.observer=b,this.m=new jb}$(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Cb),Kb=function(a,b){this.subject=a,this.observer=b};Kb.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 Lb=(s.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),hb):(a.onCompleted(),hb):(this.observers.push(a),new Kb(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return $(d,a),_(d.prototype,zb,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Lb(a,b)},d}(Hb),s.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new Kb(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),hb}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return $(d,a),_(d.prototype,zb,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Hb),s.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return $(b,a),_(b.prototype,zb,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(Hb));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(n.Rx=s,define(function(){return s})):o&&p?q?(p.exports=s).Rx=s:o.Rx=s:n.Rx=s}).call(this);
@@ -1,4 +1,4 @@
1
- // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
1
+ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2
2
 
3
3
  ;(function (factory) {
4
4
  var objectTypes = {
@@ -33,39 +33,39 @@
33
33
  }
34
34
  }.call(this, function (root, exp, Rx, undefined) {
35
35
 
36
- // Aliases
37
- var Observable = Rx.Observable,
38
- observableProto = Observable.prototype,
39
- AnonymousObservable = Rx.AnonymousObservable,
40
- observableConcat = Observable.concat,
41
- observableDefer = Observable.defer,
42
- observableEmpty = Observable.empty,
43
- disposableEmpty = Rx.Disposable.empty,
44
- CompositeDisposable = Rx.CompositeDisposable,
45
- SerialDisposable = Rx.SerialDisposable,
46
- SingleAssignmentDisposable = Rx.SingleAssignmentDisposable,
47
- Enumerator = Rx.internals.Enumerator,
48
- Enumerable = Rx.internals.Enumerable,
49
- enumerableFor = Enumerable.forEach,
50
- immediateScheduler = Rx.Scheduler.immediate,
51
- currentThreadScheduler = Rx.Scheduler.currentThread,
52
- slice = Array.prototype.slice,
53
- AsyncSubject = Rx.AsyncSubject,
54
- Observer = Rx.Observer,
55
- inherits = Rx.internals.inherits,
56
- addProperties = Rx.internals.addProperties,
57
- helpers = Rx.helpers,
58
- noop = helpers.noop,
59
- isPromise = helpers.isPromise,
60
- isScheduler = helpers.isScheduler,
61
- observableFromPromise = Observable.fromPromise;
62
-
63
- // Utilities
64
- function argsOrArray(args, idx) {
65
- return args.length === 1 && Array.isArray(args[idx]) ?
66
- args[idx] :
67
- slice.call(args);
68
- }
36
+ // Aliases
37
+ var Observable = Rx.Observable,
38
+ observableProto = Observable.prototype,
39
+ AnonymousObservable = Rx.AnonymousObservable,
40
+ observableConcat = Observable.concat,
41
+ observableDefer = Observable.defer,
42
+ observableEmpty = Observable.empty,
43
+ disposableEmpty = Rx.Disposable.empty,
44
+ CompositeDisposable = Rx.CompositeDisposable,
45
+ SerialDisposable = Rx.SerialDisposable,
46
+ SingleAssignmentDisposable = Rx.SingleAssignmentDisposable,
47
+ Enumerator = Rx.internals.Enumerator,
48
+ Enumerable = Rx.internals.Enumerable,
49
+ enumerableFor = Enumerable.forEach,
50
+ immediateScheduler = Rx.Scheduler.immediate,
51
+ currentThreadScheduler = Rx.Scheduler.currentThread,
52
+ slice = Array.prototype.slice,
53
+ AsyncSubject = Rx.AsyncSubject,
54
+ Observer = Rx.Observer,
55
+ inherits = Rx.internals.inherits,
56
+ addProperties = Rx.internals.addProperties,
57
+ helpers = Rx.helpers,
58
+ noop = helpers.noop,
59
+ isPromise = helpers.isPromise,
60
+ isScheduler = helpers.isScheduler,
61
+ observableFromPromise = Observable.fromPromise;
62
+
63
+ // Utilities
64
+ function argsOrArray(args, idx) {
65
+ return args.length === 1 && Array.isArray(args[idx]) ?
66
+ args[idx] :
67
+ slice.call(args);
68
+ }
69
69
 
70
70
  // Shim in iterator support
71
71
  var $iterator$ = (typeof Symbol === 'function' && Symbol.iterator) ||
@@ -413,7 +413,7 @@
413
413
 
414
414
  return curr;
415
415
  })
416
- .doAction(
416
+ .tap(
417
417
  noop,
418
418
  function (e) { chain && chain.onError(e); },
419
419
  function () { chain && chain.onCompleted(); }
@@ -460,5 +460,5 @@
460
460
 
461
461
  }(Observable));
462
462
 
463
- return Rx;
463
+ return Rx;
464
464
  }));
@@ -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 1===a.length&&Array.isArray(a[b])?a[b]:v.call(a)}function f(a,b){return new r(function(){return new q(function(){return a()?{done:!1,value:b}:{done:!0,value:d}})})}var g=c.Observable,h=g.prototype,i=c.AnonymousObservable,j=g.concat,k=g.defer,l=g.empty,m=c.Disposable.empty,n=c.CompositeDisposable,o=c.SerialDisposable,p=c.SingleAssignmentDisposable,q=c.internals.Enumerator,r=c.internals.Enumerable,s=r.forEach,t=c.Scheduler.immediate,u=c.Scheduler.currentThread,v=Array.prototype.slice,w=c.AsyncSubject,x=c.Observer,y=c.internals.inherits,z=c.internals.addProperties,A=c.helpers,B=A.noop,C=A.isPromise,D=A.isScheduler,E=g.fromPromise,F="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";a.Set&&"function"==typeof(new a.Set)["@@iterator"]&&(F="@@iterator");h.letBind=h.let=function(a){return a(this)},g["if"]=g.ifThen=function(a,b,c){return k(function(){return c||(c=l()),C(b)&&(b=E(b)),C(c)&&(c=E(c)),"function"==typeof c.now&&(c=l(c)),a()?b:c})},g["for"]=g.forIn=function(a,b){return s(a,b).concat()};var G=g["while"]=g.whileDo=function(a,b){return C(b)&&(b=E(b)),f(a,b).concat()};h.doWhile=function(a){return j([this,G(a,this)])},g["case"]=g.switchCase=function(a,b,c){return k(function(){C(c)&&(c=E(c)),c||(c=l()),"function"==typeof c.now&&(c=l(c));var d=b[a()];return C(d)&&(d=E(d)),d||c})},h.expand=function(a,b){D(b)||(b=t);var c=this;return new i(function(d){var e=[],f=new o,g=new n(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new p;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g})},g.forkJoin=function(){var a=e(arguments,0);return new i(function(b){var c=a.length;if(0===c)return b.onCompleted(),m;for(var d=new n,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];C(j)&&(j=E(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},h.forkJoin=function(a,b){var c=this;return new i(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new p,l=new p;return C(a)&&(a=E(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new n(k,l)})},h.manySelect=function(a,b){D(b)||(b=t);var c=this;return k(function(){var d;return c.map(function(a){var b=new H(a);return d&&d.onNext(a),d=b,b}).doAction(B,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)})};var H=function(a){function b(a){var b=this,c=new n;return c.add(u.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeObservable().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new w}return y(c,a),z(c.prototype,x,{onCompleted:function(){this.onNext(g.empty())},onError:function(a){this.onNext(g.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(g);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,d){function e(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:v.call(a)}function f(a,b){return new r(function(){return new q(function(){return a()?{done:!1,value:b}:{done:!0,value:d}})})}var g=c.Observable,h=g.prototype,i=c.AnonymousObservable,j=g.concat,k=g.defer,l=g.empty,m=c.Disposable.empty,n=c.CompositeDisposable,o=c.SerialDisposable,p=c.SingleAssignmentDisposable,q=c.internals.Enumerator,r=c.internals.Enumerable,s=r.forEach,t=c.Scheduler.immediate,u=c.Scheduler.currentThread,v=Array.prototype.slice,w=c.AsyncSubject,x=c.Observer,y=c.internals.inherits,z=c.internals.addProperties,A=c.helpers,B=A.noop,C=A.isPromise,D=A.isScheduler,E=g.fromPromise,F="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";a.Set&&"function"==typeof(new a.Set)["@@iterator"]&&(F="@@iterator");h.letBind=h.let=function(a){return a(this)},g["if"]=g.ifThen=function(a,b,c){return k(function(){return c||(c=l()),C(b)&&(b=E(b)),C(c)&&(c=E(c)),"function"==typeof c.now&&(c=l(c)),a()?b:c})},g["for"]=g.forIn=function(a,b){return s(a,b).concat()};var G=g["while"]=g.whileDo=function(a,b){return C(b)&&(b=E(b)),f(a,b).concat()};h.doWhile=function(a){return j([this,G(a,this)])},g["case"]=g.switchCase=function(a,b,c){return k(function(){C(c)&&(c=E(c)),c||(c=l()),"function"==typeof c.now&&(c=l(c));var d=b[a()];return C(d)&&(d=E(d)),d||c})},h.expand=function(a,b){D(b)||(b=t);var c=this;return new i(function(d){var e=[],f=new o,g=new n(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new p;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g})},g.forkJoin=function(){var a=e(arguments,0);return new i(function(b){var c=a.length;if(0===c)return b.onCompleted(),m;for(var d=new n,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];C(j)&&(j=E(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},h.forkJoin=function(a,b){var c=this;return new i(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new p,l=new p;return C(a)&&(a=E(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new n(k,l)})},h.manySelect=function(a,b){D(b)||(b=t);var c=this;return k(function(){var d;return c.map(function(a){var b=new H(a);return d&&d.onNext(a),d=b,b}).tap(B,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)})};var H=function(a){function b(a){var b=this,c=new n;return c.add(u.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeObservable().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new w}return y(c,a),z(c.prototype,x,{onCompleted:function(){this.onNext(g.empty())},onError:function(a){this.onNext(g.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(g);return c});