rxjs-rails 2.2.26 → 2.2.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +11 -8
  3. data/lib/rxjs/rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
  5. data/vendor/assets/javascripts/rx.all.compat.js +2 -0
  6. data/vendor/assets/javascripts/rx.all.compat.min.js +3 -3
  7. data/vendor/assets/javascripts/rx.all.js +2 -0
  8. data/vendor/assets/javascripts/rx.all.min.js +3 -3
  9. data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
  10. data/vendor/assets/javascripts/rx.async.min.js +1 -1
  11. data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
  12. data/vendor/assets/javascripts/rx.binding.min.js +1 -1
  13. data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
  14. data/vendor/assets/javascripts/rx.compat.js +2 -0
  15. data/vendor/assets/javascripts/rx.compat.min.js +2 -2
  16. data/vendor/assets/javascripts/rx.core.compat.js +2 -0
  17. data/vendor/assets/javascripts/rx.core.compat.min.js +1 -1
  18. data/vendor/assets/javascripts/rx.core.js +2 -0
  19. data/vendor/assets/javascripts/rx.core.min.js +1 -1
  20. data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
  21. data/vendor/assets/javascripts/rx.joinpatterns.min.js +1 -1
  22. data/vendor/assets/javascripts/rx.js +2 -0
  23. data/vendor/assets/javascripts/rx.lite.compat.js +2 -0
  24. data/vendor/assets/javascripts/rx.lite.compat.min.js +2 -2
  25. data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -1
  26. data/vendor/assets/javascripts/rx.lite.js +2 -0
  27. data/vendor/assets/javascripts/rx.lite.min.js +2 -2
  28. data/vendor/assets/javascripts/rx.min.js +2 -2
  29. data/vendor/assets/javascripts/rx.testing.min.js +1 -1
  30. data/vendor/assets/javascripts/rx.time.min.js +1 -1
  31. data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
  32. metadata +10 -11
@@ -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){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 f(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(e(d))return d;d+=2}return a}function g(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 h(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function i(){return{key:null,value:null,next:0,hashCode:0}}function j(a,b){return a.groupJoin(this,b,function(){return t()},function(a,b){return b})}function k(a){var b=this;return new u(function(c){var d=new r,e=new n,f=new o(e);return c.onNext(v(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 r,c.onNext(v(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f})}function l(a){var b=this;return new u(function(c){var d,e=new q,f=new n(e),g=new o(f),h=new r;return c.onNext(v(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d=function(){var b,f;try{f=a()}catch(i){return void c.onError(i)}b=new p,e.setDisposable(b),b.setDisposable(f.take(1).subscribe(x,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new r,c.onNext(v(h,g)),d()}))},d(),g})}var m=c.Observable,n=c.CompositeDisposable,o=c.RefCountDisposable,p=c.SingleAssignmentDisposable,q=c.SerialDisposable,r=c.Subject,s=m.prototype,t=m.empty,u=c.AnonymousObservable,v=(c.Observer.create,c.internals.addRef),w=c.internals.isEqual,x=c.helpers.noop,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 g(b);if("number"==typeof b)return h(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||w,this.freeCount=0,this.size=0,this.freeList=-1};return C.prototype._initialize=function(a){var b,c=f(a);for(this.buckets=new Array(c),this.entries=new Array(c),b=0;c>b;b++)this.buckets[b]=-1,this.entries[b]=i();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 void(this.entries[g].value=b)}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=f(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]=i();for(var e=0;e<this.size;++e){var g=c[e].hashCode%a;c[e].next=b[g],b[g]=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]=i();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},s.join=function(a,b,c,d){var e=this;return new u(function(f){var g=new n,h=!1,i=0,j=new C,k=!1,l=0,m=new C;return g.add(e.subscribe(function(a){var c,e,k,l,n=i++,o=new p;j.add(n,a),g.add(o),e=function(){return j.remove(n)&&0===j.count()&&h&&f.onCompleted(),g.remove(o)};try{c=b(a)}catch(q){return void f.onError(q)}o.setDisposable(c.take(1).subscribe(x,f.onError.bind(f),function(){e()})),l=m.getValues();for(var r=0;r<l.length;r++){try{k=d(a,l[r])}catch(s){return void f.onError(s)}f.onNext(k)}},f.onError.bind(f),function(){h=!0,(k||0===j.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b,e,h,i,n=l++,o=new p;m.add(n,a),g.add(o),e=function(){return m.remove(n)&&0===m.count()&&k&&f.onCompleted(),g.remove(o)};try{b=c(a)}catch(q){return void f.onError(q)}o.setDisposable(b.take(1).subscribe(x,f.onError.bind(f),function(){e()})),i=j.getValues();for(var r=0;r<i.length;r++){try{h=d(i[r],a)}catch(q){return void f.onError(q)}f.onNext(h)}},f.onError.bind(f),function(){k=!0,(h||0===m.count())&&f.onCompleted()})),g})},s.groupJoin=function(a,b,c,d){var e=this;return new u(function(f){var g=function(){},h=new n,i=new o(h),j=new C,k=new C,l=0,m=0;return h.add(e.subscribe(function(a){var c=new r,e=l++;j.add(e,c);var m,n,o,q,s;try{s=d(a,v(c,i))}catch(t){for(o=j.getValues(),m=0,n=o.length;n>m;m++)o[m].onError(t);return void f.onError(t)}for(f.onNext(s),q=k.getValues(),m=0,n=q.length;n>m;m++)c.onNext(q[m]);var u=new p;h.add(u);var w,x=function(){j.remove(e)&&c.onCompleted(),h.remove(u)};try{w=b(a)}catch(t){for(o=j.getValues(),m=0,n=j.length;n>m;m++)o[m].onError(t);return void f.onError(t)}u.setDisposable(w.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 p;h.add(l);var n,o=function(){k.remove(i),h.remove(l)};try{n=c(a)}catch(q){for(b=j.getValues(),d=0,e=j.length;e>d;d++)b[d].onError(q);return void f.onError(q)}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})},s.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},s.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?k.call(this,a):"function"==typeof a?l.call(this,a):j.call(this,a,b)},s.pairwise=function(){var a=this;return new u(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))})},s.partition=function(a,b){var c=this.publish().refCount();return[c.filter(a,b),c.filter(function(c,d,e){return!a.call(b,c,d,e)})]},c});
1
+ (function(t){var e={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},n=e[typeof window]&&window||this,r=e[typeof exports]&&exports&&!exports.nodeType&&exports,i=e[typeof module]&&module&&!module.nodeType&&module,o=(i&&i.exports===r&&r,e[typeof global]&&global);!o||o.global!==o&&o.window!==o||(n=o),"function"==typeof define&&define.amd?define(["rx","exports"],function(e,r){return n.Rx=t(n,r,e),n.Rx}):"object"==typeof module&&module&&module.exports===r?module.exports=t(n,module.exports,require("./rx")):n.Rx=t(n,{},n.Rx)}).call(this,function(t,e,n,r){function i(t){if(false&t)return 2===t;for(var e=Math.sqrt(t),n=3;e>=n;){if(0===t%n)return!1;n+=2}return!0}function o(t){var e,n,r;for(e=0;D.length>e;++e)if(n=D[e],n>=t)return n;for(r=1|t;D[D.length-1]>r;){if(i(r))return r;r+=2}return t}function s(t){var e=757602046;if(!t.length)return e;for(var n=0,r=t.length;r>n;n++){var i=t.charCodeAt(n);e=(e<<5)-e+i,e&=e}return e}function u(t){var e=668265261;return t=61^t^t>>>16,t+=t<<3,t^=t>>>4,t*=e,t^=t>>>15}function c(){return{key:null,value:null,next:0,hashCode:0}}function a(t,e){return t.groupJoin(this,e,function(){return w()},function(t,e){return e})}function h(t){var e=this;return new g(function(n){var r=new m,i=new p,o=new d(i);return n.onNext(E(r,o)),i.add(e.subscribe(function(t){r.onNext(t)},function(t){r.onError(t),n.onError(t)},function(){r.onCompleted(),n.onCompleted()})),i.add(t.subscribe(function(){r.onCompleted(),r=new m,n.onNext(E(r,o))},function(t){r.onError(t),n.onError(t)},function(){r.onCompleted(),n.onCompleted()})),o})}function l(t){var e=this;return new g(function(n){var i,o=new b,s=new p(o),u=new d(s),c=new m;return n.onNext(E(c,u)),s.add(e.subscribe(function(t){c.onNext(t)},function(t){c.onError(t),n.onError(t)},function(){c.onCompleted(),n.onCompleted()})),i=function(){var e,s;try{s=t()}catch(a){return n.onError(a),r}e=new v,o.setDisposable(e),e.setDisposable(s.take(1).subscribe(C,function(t){c.onError(t),n.onError(t)},function(){c.onCompleted(),c=new m,n.onNext(E(c,u)),i()}))},i(),u})}var f=n.Observable,p=n.CompositeDisposable,d=n.RefCountDisposable,v=n.SingleAssignmentDisposable,b=n.SerialDisposable,m=n.Subject,y=f.prototype,w=f.empty,g=n.AnonymousObservable,E=(n.Observer.create,n.internals.addRef),x=n.internals.isEqual,C=n.helpers.noop,D=[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],S="no such key",N="duplicate key",A=function(){var t=0;return function(e){if(null==e)throw Error(S);if("string"==typeof e)return s(e);if("number"==typeof e)return u(e);if("boolean"==typeof e)return e===!0?1:0;if(e instanceof Date)return e.getTime();if(e.getHashCode)return e.getHashCode();var n=17*t++;return e.getHashCode=function(){return n},n}}(),_=function(t,e){if(0>t)throw Error("out of range");t>0&&this._initialize(t),this.comparer=e||x,this.freeCount=0,this.size=0,this.freeList=-1};return _.prototype._initialize=function(t){var e,n=o(t);for(this.buckets=Array(n),this.entries=Array(n),e=0;n>e;e++)this.buckets[e]=-1,this.entries[e]=c();this.freeList=-1},_.prototype.count=function(){return this.size},_.prototype.add=function(t,e){return this._insert(t,e,!0)},_.prototype._insert=function(t,e,n){this.buckets||this._initialize(0);for(var i,o=2147483647&A(t),s=o%this.buckets.length,u=this.buckets[s];u>=0;u=this.entries[u].next)if(this.entries[u].hashCode===o&&this.comparer(this.entries[u].key,t)){if(n)throw Error(N);return this.entries[u].value=e,r}this.freeCount>0?(i=this.freeList,this.freeList=this.entries[i].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),s=o%this.buckets.length),i=this.size,++this.size),this.entries[i].hashCode=o,this.entries[i].next=this.buckets[s],this.entries[i].key=t,this.entries[i].value=e,this.buckets[s]=i},_.prototype._resize=function(){var t=o(2*this.size),e=Array(t);for(r=0;e.length>r;++r)e[r]=-1;var n=Array(t);for(r=0;this.size>r;++r)n[r]=this.entries[r];for(var r=this.size;t>r;++r)n[r]=c();for(var i=0;this.size>i;++i){var s=n[i].hashCode%t;n[i].next=e[s],e[s]=i}this.buckets=e,this.entries=n},_.prototype.remove=function(t){if(this.buckets)for(var e=2147483647&A(t),n=e%this.buckets.length,r=-1,i=this.buckets[n];i>=0;i=this.entries[i].next){if(this.entries[i].hashCode===e&&this.comparer(this.entries[i].key,t))return 0>r?this.buckets[n]=this.entries[i].next:this.entries[r].next=this.entries[i].next,this.entries[i].hashCode=-1,this.entries[i].next=this.freeList,this.entries[i].key=null,this.entries[i].value=null,this.freeList=i,++this.freeCount,!0;r=i}return!1},_.prototype.clear=function(){var t,e;if(!(0>=this.size)){for(t=0,e=this.buckets.length;e>t;++t)this.buckets[t]=-1;for(t=0;this.size>t;++t)this.entries[t]=c();this.freeList=-1,this.size=0}},_.prototype._findEntry=function(t){if(this.buckets)for(var e=2147483647&A(t),n=this.buckets[e%this.buckets.length];n>=0;n=this.entries[n].next)if(this.entries[n].hashCode===e&&this.comparer(this.entries[n].key,t))return n;return-1},_.prototype.count=function(){return this.size-this.freeCount},_.prototype.tryGetValue=function(t){var e=this._findEntry(t);return e>=0?this.entries[e].value:r},_.prototype.getValues=function(){var t=0,e=[];if(this.entries)for(var n=0;this.size>n;n++)this.entries[n].hashCode>=0&&(e[t++]=this.entries[n].value);return e},_.prototype.get=function(t){var e=this._findEntry(t);if(e>=0)return this.entries[e].value;throw Error(S)},_.prototype.set=function(t,e){this._insert(t,e,!1)},_.prototype.containskey=function(t){return this._findEntry(t)>=0},y.join=function(t,e,n,i){var o=this;return new g(function(s){var u=new p,c=!1,a=0,h=new _,l=!1,f=0,d=new _;return u.add(o.subscribe(function(t){var n,o,l,f,p=a++,b=new v;h.add(p,t),u.add(b),o=function(){return h.remove(p)&&0===h.count()&&c&&s.onCompleted(),u.remove(b)};try{n=e(t)}catch(m){return s.onError(m),r}b.setDisposable(n.take(1).subscribe(C,s.onError.bind(s),function(){o()})),f=d.getValues();for(var y=0;f.length>y;y++){try{l=i(t,f[y])}catch(w){return s.onError(w),r}s.onNext(l)}},s.onError.bind(s),function(){c=!0,(l||0===h.count())&&s.onCompleted()})),u.add(t.subscribe(function(t){var e,o,c,a,p=f++,b=new v;d.add(p,t),u.add(b),o=function(){return d.remove(p)&&0===d.count()&&l&&s.onCompleted(),u.remove(b)};try{e=n(t)}catch(m){return s.onError(m),r}b.setDisposable(e.take(1).subscribe(C,s.onError.bind(s),function(){o()})),a=h.getValues();for(var y=0;a.length>y;y++){try{c=i(a[y],t)}catch(m){return s.onError(m),r}s.onNext(c)}},s.onError.bind(s),function(){l=!0,(c||0===d.count())&&s.onCompleted()})),u})},y.groupJoin=function(t,e,n,i){var o=this;return new g(function(s){var u=function(){},c=new p,a=new d(c),h=new _,l=new _,f=0,b=0;return c.add(o.subscribe(function(t){var n=new m,o=f++;h.add(o,n);var p,d,b,y,w;try{w=i(t,E(n,a))}catch(g){for(b=h.getValues(),p=0,d=b.length;d>p;p++)b[p].onError(g);return s.onError(g),r}for(s.onNext(w),y=l.getValues(),p=0,d=y.length;d>p;p++)n.onNext(y[p]);var x=new v;c.add(x);var C,D=function(){h.remove(o)&&n.onCompleted(),c.remove(x)};try{C=e(t)}catch(g){for(b=h.getValues(),p=0,d=h.length;d>p;p++)b[p].onError(g);return s.onError(g),r}x.setDisposable(C.take(1).subscribe(u,function(t){for(b=h.getValues(),p=0,d=b.length;d>p;p++)b[p].onError(t);s.onError(t)},D))},function(t){for(var e=h.getValues(),n=0,r=e.length;r>n;n++)e[n].onError(t);s.onError(t)},s.onCompleted.bind(s))),c.add(t.subscribe(function(t){var e,i,o,a=b++;l.add(a,t);var f=new v;c.add(f);var p,d=function(){l.remove(a),c.remove(f)};try{p=n(t)}catch(m){for(e=h.getValues(),i=0,o=h.length;o>i;i++)e[i].onError(m);return s.onError(m),r}for(f.setDisposable(p.take(1).subscribe(u,function(t){for(e=h.getValues(),i=0,o=h.length;o>i;i++)e[i].onError(t);s.onError(t)},d)),e=h.getValues(),i=0,o=e.length;o>i;i++)e[i].onNext(t)},function(t){for(var e=h.getValues(),n=0,r=e.length;r>n;n++)e[n].onError(t);s.onError(t)})),a})},y.buffer=function(){return this.window.apply(this,arguments).selectMany(function(t){return t.toArray()})},y.window=function(t,e){return 1===arguments.length&&"function"!=typeof arguments[0]?h.call(this,t):"function"==typeof t?l.call(this,t):a.call(this,t,e)},y.pairwise=function(){var t=this;return new g(function(e){var n,r=!1;return t.subscribe(function(t){r?e.onNext([n,t]):r=!0,n=t},e.onError.bind(e),e.onCompleted.bind(e))})},y.partition=function(t,e){var n=this.publish().refCount();return[n.filter(t,e),n.filter(function(n,r,i){return!t.call(e,n,r,i)})]},n});
@@ -32,6 +32,8 @@
32
32
  // Defaults
33
33
  var noop = Rx.helpers.noop = function () { },
34
34
  identity = Rx.helpers.identity = function (x) { return x; },
35
+ pluck = Rx.helpers.pluck = function (property) { return function (x) { return x[property]; }; },
36
+ just = Rx.helpers.just = function (value) { return function () { return value; }; },
35
37
  defaultNow = Rx.helpers.defaultNow = (function () { return !!Date.now ? Date.now : function () { return +new Date; }; }()),
36
38
  defaultComparer = Rx.helpers.defaultComparer = function (x, y) { return isEqual(x, y); },
37
39
  defaultSubComparer = Rx.helpers.defaultSubComparer = function (x, y) { return x > y ? 1 : (x < y ? -1 : 0); },
@@ -1,2 +1,2 @@
1
- (function(a){function b(){if(this.isDisposed)throw new Error(H)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;cb.nonEnumArgs&&a.length&&h(a)&&(a=eb.call(a));var d=cb.enumPrototypes&&"function"==typeof a,e=cb.enumErrorProps&&(a===Y||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(cb.nonEnumShadows&&a!==Z){var g=a.constructor,i=-1,j=ab.length;if(a===(g&&g.prototype))var k=a===stringProto?U:a===Y?P:V.call(a),l=bb[k];for(;++i<j;)f=ab[i],l&&l[f]||!W.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?V.call(a)==L:!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=V.call(a),m=V.call(b);if(l==L&&(l=S),m==L&&(m=S),l!=m)return!1;switch(l){case N:case O:return+a==+b;case R:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case T:case U:return a==String(b)}var n=l==M;if(!n){if(l!=S||!cb.nodeClass&&(g(a)||g(b)))return!1;var o=!cb.argsObject&&h(a)?Object:a.constructor,p=!cb.argsObject&&h(b)?Object:b.constructor;if(!(o==p||W.call(a,"constructor")&&W.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 W.call(f,e)?(r++,result=W.call(a,e)&&j(a[e],b,c,d)):void 0}),result&&f(a,function(a,b,c){return W.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]:eb.call(a)}function l(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function m(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function n(a,b){return new ec(function(c){var d=new tb,e=new ub;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}F(f)&&(f=Vb(f)),d=new tb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function o(a,b){var c=this;return new ec(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function p(a){return this.map(function(b,c){var d=a(b,c);return F(d)?Vb(d):d}).concatAll()}function q(a){return this.select(function(b,c){var d=a(b,c);return F(d)?Vb(d):d}).mergeObservable()}var r={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},s=r[typeof window]&&window||this,t=r[typeof exports]&&exports&&!exports.nodeType&&exports,u=r[typeof module]&&module&&!module.nodeType&&module,v=u&&u.exports===t&&t,w=r[typeof global]&&global;!w||w.global!==w&&w.window!==w||(s=w);var x={internals:{},config:{Promise:s.Promise},helpers:{}},y=x.helpers.noop=function(){},z=x.helpers.identity=function(a){return a},A=x.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}(),B=x.helpers.defaultComparer=function(a,b){return db(a,b)},C=x.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},D=x.helpers.defaultKeySerializer=function(a){return a.toString()},E=x.helpers.defaultError=function(a){throw a},F=x.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then&&a.then!==x.Observable.prototype.then},G=(x.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},x.helpers.not=function(a){return!a},"Argument out of range"),H="Object has been disposed",I="object"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";s.Set&&"function"==typeof(new s.Set)["@@iterator"]&&(I="@@iterator");var J,K={done:!0,value:a},L="[object Arguments]",M="[object Array]",N="[object Boolean]",O="[object Date]",P="[object Error]",Q="[object Function]",R="[object Number]",S="[object Object]",T="[object RegExp]",U="[object String]",V=Object.prototype.toString,W=Object.prototype.hasOwnProperty,X=V.call(arguments)==L,Y=Error.prototype,Z=Object.prototype,$=Z.propertyIsEnumerable;try{J=!(V.call(document)==S&&!({toString:0}+""))}catch(_){J=!0}var ab=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bb={};bb[M]=bb[O]=bb[R]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},bb[N]=bb[U]={constructor:!0,toString:!0,valueOf:!0},bb[P]=bb[Q]=bb[T]={constructor:!0,toString:!0},bb[S]={constructor:!0};var cb={};!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);cb.enumErrorProps=$.call(Y,"message")||$.call(Y,"name"),cb.enumPrototypes=$.call(a,"prototype"),cb.nonEnumArgs=0!=c,cb.nonEnumShadows=!/valueOf/.test(b)}(1),X||(h=function(a){return a&&"object"==typeof a?W.call(a,"callee"):!1}),i(/x/)&&(i=function(a){return"function"==typeof a&&V.call(a)==Q});var db=x.internals.isEqual=function(a,b){return j(a,b,[],[])},eb=Array.prototype.slice,fb=({}.hasOwnProperty,this.inherits=x.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),gb=x.internals.addProperties=function(a){for(var b=eb.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},hb=x.internals.addRef=function(a,b){return new ec(function(c){return new nb(b.getDisposable(),a.subscribe(c))})};Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=eb.call(arguments,1),d=function(){function e(){}if(this instanceof d){e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(eb.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(eb.call(arguments)))};return d});var ib=Object("a"),jb="a"!=ib[0]||!(0 in ib);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=jb&&{}.toString.call(this)==U?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=Q)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=jb&&{}.toString.call(this)==U?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=Q)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==M}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!=d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1});var kb=function(a,b){this.id=a,this.value=b};kb.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var lb=x.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},mb=lb.prototype;mb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},mb.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)}}},mb.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)}}},mb.peek=function(){return this.items[0].value},mb.removeAt=function(a){this.items[a]=this.items[--this.length],delete this.items[this.length],this.heapify()},mb.dequeue=function(){var a=this.peek();return this.removeAt(0),a},mb.enqueue=function(a){var b=this.length++;this.items[b]=new kb(lb.count++,a),this.percolate(b)},mb.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},lb.count=0;var nb=x.CompositeDisposable=function(){this.disposables=k(arguments,0),this.isDisposed=!1,this.length=this.disposables.length},ob=nb.prototype;ob.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},ob.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},ob.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()}},ob.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()},ob.contains=function(a){return-1!==this.disposables.indexOf(a)},ob.toArray=function(){return this.disposables.slice(0)};var pb=x.Disposable=function(a){this.isDisposed=!1,this.action=a||y};pb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var qb=pb.create=function(a){return new pb(a)},rb=pb.empty={dispose:y},sb=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}(),tb=x.SingleAssignmentDisposable=function(a){function b(){a.call(this,!0)}return fb(b,a),b}(sb),ub=x.SerialDisposable=function(a){function b(){a.call(this,!1)}return fb(b,a),b}(sb),vb=x.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?rb:new a(this)},b}();m.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var wb=x.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||C,this.disposable=new tb};wb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},wb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},wb.prototype.isCancelled=function(){return this.disposable.isDisposed},wb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var xb,yb=x.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 nb,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),rb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new nb,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),rb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){return b(),rb}var e=a.prototype;return e.catchException=e["catch"]=function(a){return new Db(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 qb(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=A,a.normalize=function(a){return 0>a&&(a=0),a},a}(),zb=yb.normalize,Ab=(x.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 tb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),yb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=zb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new yb(A,a,b,c)}()),Bb=yb.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-yb.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()+yb.normalize(c),g=new wb(this,b,d,f);if(e)e.enqueue(g);else{e=new lb(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 yb(A,b,c,d);return f.scheduleRequired=function(){return null===e},f.ensureTrampoline=function(a){return null===e?this.schedule(a):a()},f}(),Cb=y;!function(){function a(){if(!s.postMessage||s.importScripts)return!1;var a=!1,b=s.onmessage;return s.onmessage=function(){a=!0},s.postMessage("","*"),s.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(V).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=w&&v&&w.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=w&&v&&w.clearImmediate)&&!c.test(e)&&e;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))xb=process.nextTick;else if("function"==typeof d)xb=d,Cb=e;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;s.addEventListener?s.addEventListener("message",b,!1):s.attachEvent("onmessage",b,!1),xb=function(a){var b=h++;g[b]=a,s.postMessage(f+b,"*")}}else if(s.MessageChannel){var i=new s.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},xb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?xb=function(a){var b=s.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},s.document.documentElement.appendChild(b)}:(xb=function(a){return setTimeout(a,0)},Cb=clearTimeout)}();var Db=(yb.timeout=function(){function a(a,b){var c=this,d=new tb,e=xb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new nb(d,qb(function(){Cb(e)}))}function b(a,b,c){var d=this,e=yb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new tb,g=setTimeout(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new nb(f,qb(function(){clearTimeout(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new yb(A,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 fb(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 rb}}},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 tb;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}(yb)),Eb=x.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}var b=a.prototype;return b.accept=function(a,b,c){return 1===arguments.length&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},b.toObservable=function(a){var b=this;return a||(a=Ab),new ec(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Fb=Eb.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 Eb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Gb=Eb.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 Eb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Hb=Eb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Eb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Ib=x.internals.Enumerator=function(a){this._next=a};Ib.prototype.next=function(){return this._next()},Ib.prototype[I]=function(){return this};var Jb=x.internals.Enumerable=function(a){this._iterator=a};Jb.prototype[I]=function(){return this._iterator()},Jb.prototype.concat=function(){var a=this;return new ec(function(b){var c;try{c=a[I]()}catch(d){return void b.onError()}var e,f=new ub,g=Ab.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;F(h)&&(h=Vb(h));var i=new tb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new nb(f,g,qb(function(){e=!0}))})},Jb.prototype.catchException=function(){var a=this;return new ec(function(b){var c;try{c=a[I]()}catch(d){return void b.onError()}var e,f,g=new ub,h=Ab.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;F(i)&&(i=Vb(i));var j=new tb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new nb(g,h,qb(function(){e=!0}))})};var Kb=Jb.repeat=function(a,b){return null==b&&(b=-1),new Jb(function(){var c=b;return new Ib(function(){return 0===c?K:(c>0&&c--,{done:!1,value:a})})})},Lb=Jb.forEach=function(a,b,c){return b||(b=z),new Jb(function(){var d=-1;return new Ib(function(){return++d<a.length?{done:!1,value:b.call(c,a[d],d,a)}:K})})},Mb=x.Observer=function(){};Mb.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},Mb.prototype.asObserver=function(){return new Qb(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},Mb.prototype.checked=function(){return new Rb(this)};var Nb=Mb.create=function(a,b,c){return a||(a=y),b||(b=E),c||(c=y),new Qb(a,b,c)};Mb.fromNotifier=function(a){return new Qb(function(b){return a(Fb(b))},function(b){return a(Gb(b))},function(){return a(Hb())})},Mb.notifyOn=function(a){return new Tb(a,this)};var Ob,Pb=x.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}return fb(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}(Mb),Qb=x.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return fb(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}(Pb),Rb=function(a){function b(b){a.call(this),this._observer=b,this._state=0}fb(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}(Mb),Sb=x.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 ub}return fb(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}(Pb),Tb=function(a){function b(){a.apply(this,arguments)}return fb(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}(Sb),Ub=x.Observable=function(){function a(a){this._subscribe=a}return Ob=a.prototype,Ob.subscribe=Ob.forEach=function(a,b,c){var d="object"==typeof a?a:Nb(a,b,c);return this._subscribe(d)},a}();Ob.observeOn=function(a){var b=this;return new ec(function(c){return b.subscribe(new Tb(a,c))})},Ob.subscribeOn=function(a){var b=this;return new ec(function(c){var d=new tb,e=new ub;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new m(a,b.subscribe(c)))})),e})};var Vb=Ub.fromPromise=function(a){return new ec(function(b){return a.then(function(a){b.onNext(a),b.onCompleted()},function(a){b.onError(a)}),function(){a&&a.abort&&a.abort()}})};Ob.toPromise=function(a){if(a||(a=x.config.Promise),!a)throw new Error("Promise type not provided nor in Rx.config.Promise");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)})})},Ob.toArray=function(){var a=this;return new ec(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},Ub.create=Ub.createWithDisposable=function(a){return new ec(a)};var Wb=(Ub.defer=function(a){return new ec(function(b){var c;try{c=a()}catch(d){return $b(d).subscribe(b)}return F(c)&&(c=Vb(c)),c.subscribe(b)})},Ub.empty=function(a){return a||(a=Ab),new ec(function(b){return a.schedule(function(){b.onCompleted()})})}),Xb=Ub.fromArray=function(a,b){return b||(b=Bb),new ec(function(c){var d=0;return b.scheduleRecursive(function(b){d<a.length?(c.onNext(a[d++]),b()):c.onCompleted()})})};Ub.fromIterable=function(a,b){return b||(b=Bb),new ec(function(c){var d;try{d=a[I]()}catch(e){return void c.onError(e)}return b.scheduleRecursive(function(a){var b;try{b=d.next()}catch(e){return void c.onError(e)}b.done?c.onCompleted():(c.onNext(b.value),a())})})},Ub.generate=function(a,b,c,d,e){return e||(e=Bb),new ec(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})};var Yb=Ub.never=function(){return new ec(function(){return rb})};Ub.range=function(a,b,c){return c||(c=Bb),new ec(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},Ub.repeat=function(a,b,c){return c||(c=Bb),null==b&&(b=-1),Zb(a,c).repeat(b)};var Zb=Ub["return"]=Ub.returnValue=function(a,b){return b||(b=Ab),new ec(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})},$b=Ub["throw"]=Ub.throwException=function(a,b){return b||(b=Ab),new ec(function(c){return b.schedule(function(){c.onError(a)})})};Ub.using=function(a,b){return new ec(function(c){var d,e,f=rb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new nb($b(g).subscribe(c),f)}return new nb(e.subscribe(c),f)})},Ob.amb=function(a){var b=this;return new ec(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new tb,j=new tb;return F(a)&&(a=Vb(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new nb(i,j)})},Ub.amb=function(){function a(a,b){return a.amb(b)}for(var b=Yb(),c=k(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},Ob["catch"]=Ob.catchException=function(a){return"function"==typeof a?n(this,a):_b([this,a])};var _b=Ub.catchException=Ub["catch"]=function(){var a=k(arguments,0);return Lb(a).catchException()};Ob.combineLatest=function(){var a=eb.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),ac.apply(this,a)};var ac=Ub.combineLatest=function(){var a=eb.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new ec(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(z))){try{d=b.apply(null,k)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(z)&&c.onCompleted()}function e(a){j[a]=!0,j.every(z)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=l(g,f),i=!1,j=l(g,f),k=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new tb;F(f)&&(f=Vb(f)),g.setDisposable(f.subscribe(function(a){k[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new nb(m)})};Ob.concat=function(){var a=eb.call(arguments,0);return a.unshift(this),bc.apply(this,a)};var bc=Ub.concat=function(){var a=k(arguments,0);return Lb(a).concat()};Ob.concatObservable=Ob.concatAll=function(){return this.merge(1)},Ob.merge=function(a){if("number"!=typeof a)return cc(this,a);var b=this;return new ec(function(c){var d=0,e=new nb,f=!1,g=[],h=function(a){var b=new tb;e.add(b),F(a)&&(a=Vb(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){var a;e.remove(b),g.length>0?(a=g.shift(),h(a)):(d--,f&&0===d&&c.onCompleted())}))};return e.add(b.subscribe(function(b){a>d?(d++,h(b)):g.push(b)},c.onError.bind(c),function(){f=!0,0===d&&c.onCompleted()})),e})};var cc=Ub.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=eb.call(arguments,1)):(a=Ab,b=eb.call(arguments,0)):(a=Ab,b=eb.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),Xb(b,a).mergeObservable()};Ob.mergeObservable=Ob.mergeAll=function(){var a=this;return new ec(function(b){var c=new nb,d=!1,e=new tb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new tb;c.add(e),F(a)&&(a=Vb(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},Ob.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return dc([this,a])};var dc=Ub.onErrorResumeNext=function(){var a=k(arguments,0);return new ec(function(b){var c=0,d=new ub,e=Ab.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],F(f)&&(f=Vb(f)),g=new tb,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),function(){e()},function(){e()}))):b.onCompleted()});return new nb(d,e)})};Ob.skipUntil=function(a){var b=this;return new ec(function(c){var d=!1,e=new nb(b.subscribe(function(a){d&&c.onNext(a)},c.onError.bind(c),function(){d&&c.onCompleted()}));F(a)&&(a=Vb(a));var f=new tb;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},c.onError.bind(c),function(){f.dispose()})),e})},Ob["switch"]=Ob.switchLatest=function(){var a=this;return new ec(function(b){var c=!1,d=new ub,e=!1,f=0,g=a.subscribe(function(a){var g=new tb,h=++f;c=!0,d.setDisposable(g),F(a)&&(a=Vb(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},b.onError.bind(b),function(){e=!0,c||b.onCompleted()});return new nb(g,d)})},Ob.takeUntil=function(a){var b=this;return new ec(function(c){return F(a)&&(a=Vb(a)),new nb(b.subscribe(c),a.subscribe(c.onCompleted.bind(c),c.onError.bind(c),y))})},Ob.zip=function(){if(Array.isArray(arguments[0]))return o.apply(this,arguments);var a=this,b=eb.call(arguments),c=b.pop();return b.unshift(a),new ec(function(d){function e(b){var e,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(z)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=l(g,function(){return[]}),i=l(g,function(){return!1}),j=new Array(g),k=0;g>k;k++)!function(a){var c=b[a],g=new tb;F(c)&&(c=Vb(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(k);return new nb(j)})},Ub.zip=function(){var a=eb.call(arguments,0),b=a.shift();return b.zip.apply(b,a)
2
- },Ub.zipArray=function(){var a=k(arguments,0);return new ec(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(z))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(z)?void b.onCompleted():void 0}for(var e=a.length,f=l(e,function(){return[]}),g=l(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new tb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new nb(h);return j.add(qb(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},Ob.asObservable=function(){var a=this;return new ec(function(b){return a.subscribe(b)})},Ob.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},Ob.dematerialize=function(){var a=this;return new ec(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},Ob.distinctUntilChanged=function(a,b){var c=this;return a||(a=z),b||(b=B),new ec(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},Ob["do"]=Ob.doAction=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new ec(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b){try{b(c)}catch(d){a.onError(d)}a.onError(c)}else a.onError(c)},function(){if(c){try{c()}catch(b){a.onError(b)}a.onCompleted()}else a.onCompleted()})})},Ob["finally"]=Ob.finallyAction=function(a){var b=this;return new ec(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return qb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},Ob.ignoreElements=function(){var a=this;return new ec(function(b){return a.subscribe(y,b.onError.bind(b),b.onCompleted.bind(b))})},Ob.materialize=function(){var a=this;return new ec(function(b){return a.subscribe(function(a){b.onNext(Fb(a))},function(a){b.onNext(Gb(a)),b.onCompleted()},function(){b.onNext(Hb()),b.onCompleted()})})},Ob.repeat=function(a){return Kb(this,a).concat()},Ob.retry=function(a){return Kb(this,a).catchException()},Ob.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new ec(function(e){var f,g,h;return d.subscribe(function(d){try{h||(h=!0),f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},Ob.skipLast=function(a){var b=this;return new ec(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},Ob.startWith=function(){var a,b,c=0;return arguments.length&&"now"in Object(arguments[0])?(b=arguments[0],c=1):b=Ab,a=eb.call(arguments,c),Lb([Xb(a,b),this]).concat()},Ob.takeLast=function(a,b){return this.takeLastBuffer(a).selectMany(function(a){return Xb(a,b)})},Ob.takeLastBuffer=function(a){var b=this;return new ec(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},Ob.windowWithCount=function(a,b){var c=this;if(0>=a)throw new Error(G);if(1===arguments.length&&(b=a),0>=b)throw new Error(G);return new ec(function(d){var e=new tb,f=new vb(e),g=0,h=[],i=function(){var a=new ic;h.push(a),d.onNext(hb(a,f))};return i(),e.setDisposable(c.subscribe(function(c){for(var d,e=0,f=h.length;f>e;e++)h[e].onNext(c);var j=g-a+1;j>=0&&j%b===0&&(d=h.shift(),d.onCompleted()),g++,g%b===0&&i()},function(a){for(;h.length>0;)h.shift().onError(a);d.onError(a)},function(){for(;h.length>0;)h.shift().onCompleted();d.onCompleted()})),f})},Ob.selectConcat=Ob.concatMap=function(a,b){return b?this.concatMap(function(c,d){var e=a(c,d),f=F(e)?Vb(e):e;return f.map(function(a){return b(c,a,d)})}):"function"==typeof a?p.call(this,a):p.call(this,function(){return a})},Ob.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new ec(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},a.onError.bind(a),function(){d||a.onNext(b),a.onCompleted()})})},Ob.distinct=function(a,b){var c=this;return a||(a=z),b||(b=D),new ec(function(d){var e={};return c.subscribe(function(c){var f,g,h,i=!1;try{f=a(c),g=b(f)}catch(j){return void d.onError(j)}for(h in e)if(g===h){i=!0;break}i||(e[g]=null,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},Ob.groupBy=function(a,b,c){return this.groupByUntil(a,b,function(){return Yb()},c)},Ob.groupByUntil=function(a,b,c,d){var e=this;return b||(b=z),d||(d=D),new ec(function(f){var g={},h=new nb,i=new vb(h);return h.add(e.subscribe(function(e){var j,k,l,m,n,o,p,q,r,s;try{o=a(e),p=d(o)}catch(t){for(s in g)g[s].onError(t);return void f.onError(t)}m=!1;try{r=g[p],r||(r=new ic,g[p]=r,m=!0)}catch(t){for(s in g)g[s].onError(t);return void f.onError(t)}if(m){n=new gc(o,r,i),k=new gc(o,r);try{j=c(k)}catch(t){for(s in g)g[s].onError(t);return void f.onError(t)}f.onNext(n),q=new tb,h.add(q);var u=function(){p in g&&(delete g[p],r.onCompleted()),h.remove(q)};q.setDisposable(j.take(1).subscribe(y,function(a){for(s in g)g[s].onError(a);f.onError(a)},function(){u()}))}try{l=b(e)}catch(t){for(s in g)g[s].onError(t);return void f.onError(t)}r.onNext(l)},function(a){for(var b in g)g[b].onError(a);f.onError(a)},function(){for(var a in g)g[a].onCompleted();f.onCompleted()})),i})},Ob.select=Ob.map=function(a,b){var c=this;return new ec(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Ob.pluck=function(a){return this.select(function(b){return b[a]})},Ob.selectMany=Ob.flatMap=function(a,b){return b?this.selectMany(function(c,d){var e=a(c,d),f=F(e)?Vb(e):e;return f.select(function(a){return b(c,a,d)})}):"function"==typeof a?q.call(this,a):q.call(this,function(){return a})},Ob.selectSwitch=Ob.flatMapLatest=function(a,b){return this.select(a,b).switchLatest()},Ob.skip=function(a){if(0>a)throw new Error(G);var b=this;return new ec(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},Ob.skipWhile=function(a,b){var c=this;return new ec(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Ob.take=function(a,b){if(0>a)throw new Error(G);if(0===a)return Wb(b);var c=this;return new ec(function(b){var d=a;return c.subscribe(function(a){d>0&&(d--,b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},Ob.takeWhile=function(a,b){var c=this;return new ec(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},Ob.where=Ob.filter=function(a,b){var c=this;return new ec(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})};var ec=x.AnonymousObservable=function(a){function b(a){return"undefined"==typeof a?a=rb:"function"==typeof a&&(a=qb(a)),a}function c(d){function e(a){var c=new fc(a);if(Bb.scheduleRequired())Bb.schedule(function(){try{c.setDisposable(b(d(c)))}catch(a){if(!c.fail(a))throw a}});else try{c.setDisposable(b(d(c)))}catch(e){if(!c.fail(e))throw e}return c}return this instanceof c?void a.call(this,e):new c(d)}return fb(c,a),c}(Ub),fc=function(a){function b(b){a.call(this),this.observer=b,this.m=new tb}fb(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}(Pb),gc=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 ec(function(a){return new nb(e.getDisposable(),d.subscribe(a))}):d}return fb(c,a),c}(Ub),hc=function(a,b){this.subject=a,this.observer=b};hc.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 ic=x.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),rb):(a.onCompleted(),rb):(this.observers.push(a),new hc(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return fb(d,a),gb(d.prototype,Mb,{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 jc(a,b)},d}(Ub),jc=(x.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new hc(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(),rb}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return fb(d,a),gb(d.prototype,Mb,{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}(Ub),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 fb(c,a),gb(c.prototype,Mb,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Ub));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(s.Rx=x,define(function(){return x})):t&&u?v?(u.exports=x).Rx=x:t.Rx=x:s.Rx=x}).call(this);
1
+ (function(t){function e(){if(this.isDisposed)throw Error(k)}function n(t){var e=typeof t;return t&&("function"==e||"object"==e)||!1}function r(t){var e=[];if(!n(t))return e;ne.nonEnumArgs&&t.length&&u(t)&&(t=ie.call(t));var r=ne.enumPrototypes&&"function"==typeof t,i=ne.enumErrorProps&&(t===X||t instanceof Error);for(var o in t)r&&"prototype"==o||i&&("message"==o||"name"==o)||e.push(o);if(ne.nonEnumShadows&&t!==Z){var s=t.constructor,c=-1,a=te.length;if(t===(s&&s.prototype))var h=t===stringProto?Q:t===X?I:$.call(t),l=ee[h];for(;a>++c;)o=te[c],l&&l[o]||!K.call(t,o)||e.push(o)}return e}function i(t,e,n){for(var r=-1,i=n(t),o=i.length;o>++r;){var s=i[r];if(e(t[s],s,t)===!1)break}return t}function o(t,e){return i(t,e,r)}function s(t){return"function"!=typeof t.toString&&"string"==typeof(t+"")}function u(t){return t&&"object"==typeof t?$.call(t)==V:!1}function c(t){return"function"==typeof t||!1}function a(e,n,r,i){if(e===n)return 0!==e||1/e==1/n;var h=typeof e,l=typeof n;if(e===e&&(null==e||null==n||"function"!=h&&"object"!=h&&"function"!=l&&"object"!=l))return!1;var f=$.call(e),p=$.call(n);if(f==V&&(f=H),p==V&&(p=H),f!=p)return!1;switch(f){case z:case M:return+e==+n;case B:return e!=+e?n!=+n:0==e?1/e==1/n:e==+n;case U:case Q:return e==n+""}var d=f==L;if(!d){if(f!=H||!ne.nodeClass&&(s(e)||s(n)))return!1;var v=!ne.argsObject&&u(e)?Object:e.constructor,b=!ne.argsObject&&u(n)?Object:n.constructor;if(!(v==b||K.call(e,"constructor")&&K.call(n,"constructor")||c(v)&&v instanceof v&&c(b)&&b instanceof b||!("constructor"in e&&"constructor"in n)))return!1}r||(r=[]),i||(i=[]);for(var m=r.length;m--;)if(r[m]==e)return i[m]==n;var y=0;if(result=!0,r.push(e),i.push(n),d){if(m=e.length,y=n.length,result=y==m)for(;y--;){var w=n[y];if(!(result=a(e[y],w,r,i)))break}}else o(n,function(n,o,s){return K.call(s,o)?(y++,result=K.call(e,o)&&a(e[o],n,r,i)):t}),result&&o(e,function(e,n,r){return K.call(r,n)?result=--y>-1:t});return r.pop(),i.pop(),result}function h(t,e){return 1===t.length&&Array.isArray(t[e])?t[e]:ie.call(t)}function l(t,e){for(var n=Array(t),r=0;t>r;r++)n[r]=e();return n}function f(t,e){this.scheduler=t,this.disposable=e,this.isDisposed=!1}function p(e,n){return new on(function(r){var i=new we,o=new ge;return o.setDisposable(i),i.setDisposable(e.subscribe(r.onNext.bind(r),function(e){var i,s;try{s=n(e)}catch(u){return r.onError(u),t}R(s)&&(s=$e(s)),i=new we,o.setDisposable(i),i.setDisposable(s.subscribe(r))},r.onCompleted.bind(r))),o})}function d(e,n){var r=this;return new on(function(i){var o=0,s=e.length;return r.subscribe(function(r){if(s>o){var u,c=e[o++];try{u=n(r,c)}catch(a){return i.onError(a),t}i.onNext(u)}else i.onCompleted()},i.onError.bind(i),i.onCompleted.bind(i))})}function v(t){return this.map(function(e,n){var r=t(e,n);return R(r)?$e(r):r}).concatAll()}function b(t){return this.select(function(e,n){var r=t(e,n);return R(r)?$e(r):r}).mergeObservable()}var m={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},y=m[typeof window]&&window||this,w=m[typeof exports]&&exports&&!exports.nodeType&&exports,g=m[typeof module]&&module&&!module.nodeType&&module,E=g&&g.exports===w&&w,x=m[typeof global]&&global;!x||x.global!==x&&x.window!==x||(y=x);var C={internals:{},config:{Promise:y.Promise},helpers:{}},D=C.helpers.noop=function(){},S=C.helpers.identity=function(t){return t},A=(C.helpers.pluck=function(t){return function(e){return e[t]}},C.helpers.just=function(t){return function(){return t}},C.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),N=C.helpers.defaultComparer=function(t,e){return re(t,e)},_=C.helpers.defaultSubComparer=function(t,e){return t>e?1:e>t?-1:0},O=C.helpers.defaultKeySerializer=function(t){return""+t},W=C.helpers.defaultError=function(t){throw t},R=C.helpers.isPromise=function(t){return!!t&&"function"==typeof t.then&&t.then!==C.Observable.prototype.then};C.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},C.helpers.not=function(t){return!t};var j="Argument out of range",k="Object has been disposed",q="object"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";y.Set&&"function"==typeof(new y.Set)["@@iterator"]&&(q="@@iterator");var P,T={done:!0,value:t},V="[object Arguments]",L="[object Array]",z="[object Boolean]",M="[object Date]",I="[object Error]",F="[object Function]",B="[object Number]",H="[object Object]",U="[object RegExp]",Q="[object String]",$=Object.prototype.toString,K=Object.prototype.hasOwnProperty,J=$.call(arguments)==V,X=Error.prototype,Z=Object.prototype,G=Z.propertyIsEnumerable;try{P=!($.call(document)==H&&!({toString:0}+""))}catch(Y){P=!0}var te=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ee={};ee[L]=ee[M]=ee[B]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},ee[z]=ee[Q]={constructor:!0,toString:!0,valueOf:!0},ee[I]=ee[F]=ee[U]={constructor:!0,toString:!0},ee[H]={constructor:!0};var ne={};(function(){var t=function(){this.x=1},e=[];t.prototype={valueOf:1,y:1};for(var n in new t)e.push(n);for(n in arguments);ne.enumErrorProps=G.call(X,"message")||G.call(X,"name"),ne.enumPrototypes=G.call(t,"prototype"),ne.nonEnumArgs=0!=n,ne.nonEnumShadows=!/valueOf/.test(e)})(1),J||(u=function(t){return t&&"object"==typeof t?K.call(t,"callee"):!1}),c(/x/)&&(c=function(t){return"function"==typeof t&&$.call(t)==F});var re=C.internals.isEqual=function(t,e){return a(t,e,[],[])},ie=Array.prototype.slice;({}).hasOwnProperty;var oe=this.inherits=C.internals.inherits=function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n},se=C.internals.addProperties=function(t){for(var e=ie.call(arguments,1),n=0,r=e.length;r>n;n++){var i=e[n];for(var o in i)t[o]=i[o]}},ue=C.internals.addRef=function(t,e){return new on(function(n){return new pe(e.getDisposable(),t.subscribe(n))})};Function.prototype.bind||(Function.prototype.bind=function(t){var e=this,n=ie.call(arguments,1),r=function(){function i(){}if(this instanceof r){i.prototype=e.prototype;var o=new i,s=e.apply(o,n.concat(ie.call(arguments)));return Object(s)===s?s:o}return e.apply(t,n.concat(ie.call(arguments)))};return r});var ce=Object("a"),ae="a"!=ce[0]||!(0 in ce);Array.prototype.every||(Array.prototype.every=function(t){var e=Object(this),n=ae&&{}.toString.call(this)==Q?this.split(""):e,r=n.length>>>0,i=arguments[1];if({}.toString.call(t)!=F)throw new TypeError(t+" is not a function");for(var o=0;r>o;o++)if(o in n&&!t.call(i,n[o],o,e))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(t){var e=Object(this),n=ae&&{}.toString.call(this)==Q?this.split(""):e,r=n.length>>>0,i=Array(r),o=arguments[1];if({}.toString.call(t)!=F)throw new TypeError(t+" is not a function");for(var s=0;r>s;s++)s in n&&(i[s]=t.call(o,n[s],s,e));return i}),Array.prototype.filter||(Array.prototype.filter=function(t){for(var e,n=[],r=Object(this),i=0,o=r.length>>>0;o>i;i++)e=r[i],i in r&&t.call(arguments[1],e,i,r)&&n.push(e);return n}),Array.isArray||(Array.isArray=function(t){return Object.prototype.toString.call(t)==L}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var e=Object(this),n=e.length>>>0;if(0===n)return-1;var r=0;if(arguments.length>1&&(r=Number(arguments[1]),r!==r?r=0:0!==r&&1/0!=r&&r!==-1/0&&(r=(r>0||-1)*Math.floor(Math.abs(r)))),r>=n)return-1;for(var i=r>=0?r:Math.max(n-Math.abs(r),0);n>i;i++)if(i in e&&e[i]===t)return i;return-1});var he=function(t,e){this.id=t,this.value=e};he.prototype.compareTo=function(t){var e=this.value.compareTo(t.value);return 0===e&&(e=this.id-t.id),e};var le=C.internals.PriorityQueue=function(t){this.items=Array(t),this.length=0},fe=le.prototype;fe.isHigherPriority=function(t,e){return 0>this.items[t].compareTo(this.items[e])},fe.percolate=function(t){if(!(t>=this.length||0>t)){var e=t-1>>1;if(!(0>e||e===t)&&this.isHigherPriority(t,e)){var n=this.items[t];this.items[t]=this.items[e],this.items[e]=n,this.percolate(e)}}},fe.heapify=function(e){if(e===t&&(e=0),!(e>=this.length||0>e)){var n=2*e+1,r=2*e+2,i=e;if(this.length>n&&this.isHigherPriority(n,i)&&(i=n),this.length>r&&this.isHigherPriority(r,i)&&(i=r),i!==e){var o=this.items[e];this.items[e]=this.items[i],this.items[i]=o,this.heapify(i)}}},fe.peek=function(){return this.items[0].value},fe.removeAt=function(t){this.items[t]=this.items[--this.length],delete this.items[this.length],this.heapify()},fe.dequeue=function(){var t=this.peek();return this.removeAt(0),t},fe.enqueue=function(t){var e=this.length++;this.items[e]=new he(le.count++,t),this.percolate(e)},fe.remove=function(t){for(var e=0;this.length>e;e++)if(this.items[e].value===t)return this.removeAt(e),!0;return!1},le.count=0;var pe=C.CompositeDisposable=function(){this.disposables=h(arguments,0),this.isDisposed=!1,this.length=this.disposables.length},de=pe.prototype;de.add=function(t){this.isDisposed?t.dispose():(this.disposables.push(t),this.length++)},de.remove=function(t){var e=!1;if(!this.isDisposed){var n=this.disposables.indexOf(t);-1!==n&&(e=!0,this.disposables.splice(n,1),this.length--,t.dispose())}return e},de.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this.disposables.slice(0);this.disposables=[],this.length=0;for(var e=0,n=t.length;n>e;e++)t[e].dispose()}},de.clear=function(){var t=this.disposables.slice(0);this.disposables=[],this.length=0;for(var e=0,n=t.length;n>e;e++)t[e].dispose()},de.contains=function(t){return-1!==this.disposables.indexOf(t)},de.toArray=function(){return this.disposables.slice(0)};var ve=C.Disposable=function(t){this.isDisposed=!1,this.action=t||D};ve.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var be=ve.create=function(t){return new ve(t)},me=ve.empty={dispose:D},ye=function(){function t(t){this.isSingle=t,this.isDisposed=!1,this.current=null}var e=t.prototype;return e.getDisposable=function(){return this.current},e.setDisposable=function(t){if(this.current&&this.isSingle)throw Error("Disposable has already been assigned");var e,n=this.isDisposed;n||(e=this.current,this.current=t),e&&e.dispose(),n&&t&&t.dispose()},e.dispose=function(){var t;this.isDisposed||(this.isDisposed=!0,t=this.current,this.current=null),t&&t.dispose()},t}(),we=C.SingleAssignmentDisposable=function(t){function e(){t.call(this,!0)}return oe(e,t),e}(ye),ge=C.SerialDisposable=function(t){function e(){t.call(this,!1)}return oe(e,t),e}(ye),Ee=C.RefCountDisposable=function(){function t(t){this.disposable=t,this.disposable.count++,this.isInnerDisposed=!1}function e(t){this.underlyingDisposable=t,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return t.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()))},e.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},e.prototype.getDisposable=function(){return this.isDisposed?me:new t(this)},e}();f.prototype.dispose=function(){var t=this;this.scheduler.schedule(function(){t.isDisposed||(t.isDisposed=!0,t.disposable.dispose())})};var xe=C.internals.ScheduledItem=function(t,e,n,r,i){this.scheduler=t,this.state=e,this.action=n,this.dueTime=r,this.comparer=i||_,this.disposable=new we};xe.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},xe.prototype.compareTo=function(t){return this.comparer(this.dueTime,t.dueTime)},xe.prototype.isCancelled=function(){return this.disposable.isDisposed},xe.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Ce=C.Scheduler=function(){function t(t,e,n,r){this.now=t,this._schedule=e,this._scheduleRelative=n,this._scheduleAbsolute=r}function e(t,e){var n=e.first,r=e.second,i=new pe,o=function(e){r(e,function(e){var n=!1,r=!1,s=t.scheduleWithState(e,function(t,e){return n?i.remove(s):r=!0,o(e),me});r||(i.add(s),n=!0)})};return o(n),i}function n(t,e,n){var r=e.first,i=e.second,o=new pe,s=function(e){i(e,function(e,r){var i=!1,u=!1,c=t[n].call(t,e,r,function(t,e){return i?o.remove(c):u=!0,s(e),me});u||(o.add(c),i=!0)})};return s(r),o}function r(t,e){return e(),me}var i=t.prototype;return i.catchException=i["catch"]=function(t){return new Oe(this,t)},i.schedulePeriodic=function(t,e){return this.schedulePeriodicWithState(null,t,function(){e()})},i.schedulePeriodicWithState=function(t,e,n){var r=t,i=setInterval(function(){r=n(r)},e);return be(function(){clearInterval(i)})},i.schedule=function(t){return this._schedule(t,r)},i.scheduleWithState=function(t,e){return this._schedule(t,e)},i.scheduleWithRelative=function(t,e){return this._scheduleRelative(e,t,r)},i.scheduleWithRelativeAndState=function(t,e,n){return this._scheduleRelative(t,e,n)},i.scheduleWithAbsolute=function(t,e){return this._scheduleAbsolute(e,t,r)},i.scheduleWithAbsoluteAndState=function(t,e,n){return this._scheduleAbsolute(t,e,n)},i.scheduleRecursive=function(t){return this.scheduleRecursiveWithState(t,function(t,e){t(function(){e(t)})})},i.scheduleRecursiveWithState=function(t,n){return this.scheduleWithState({first:t,second:n},function(t,n){return e(t,n)})},i.scheduleRecursiveWithRelative=function(t,e){return this.scheduleRecursiveWithRelativeAndState(e,t,function(t,e){t(function(n){e(t,n)})})},i.scheduleRecursiveWithRelativeAndState=function(t,e,r){return this._scheduleRelative({first:t,second:r},e,function(t,e){return n(t,e,"scheduleWithRelativeAndState")})},i.scheduleRecursiveWithAbsolute=function(t,e){return this.scheduleRecursiveWithAbsoluteAndState(e,t,function(t,e){t(function(n){e(t,n)})})},i.scheduleRecursiveWithAbsoluteAndState=function(t,e,r){return this._scheduleAbsolute({first:t,second:r},e,function(t,e){return n(t,e,"scheduleWithAbsoluteAndState")})},t.now=A,t.normalize=function(t){return 0>t&&(t=0),t},t}(),De=Ce.normalize;C.internals.SchedulePeriodicRecursive=function(){function t(t,e){e(0,this._period);try{this._state=this._action(this._state)}catch(n){throw this._cancel.dispose(),n}}function e(t,e,n,r){this._scheduler=t,this._state=e,this._period=n,this._action=r}return e.prototype.start=function(){var e=new we;return this._cancel=e,e.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,t.bind(this))),e},e}();var Se,Ae=Ce.immediate=function(){function t(t,e){return e(this,t)}function e(t,e,n){for(var r=De(r);r-this.now()>0;);return n(this,t)}function n(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new Ce(A,t,e,n)}(),Ne=Ce.currentThread=function(){function t(t){for(var e;t.length>0;)if(e=t.dequeue(),!e.isCancelled()){for(;e.dueTime-Ce.now()>0;);e.isCancelled()||e.invoke()}}function e(t,e){return this.scheduleWithRelativeAndState(t,0,e)}function n(e,n,r){var o=this.now()+Ce.normalize(n),s=new xe(this,e,r,o);if(i)i.enqueue(s);else{i=new le(4),i.enqueue(s);try{t(i)}catch(u){throw u}finally{i=null}}return s.disposable}function r(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}var i,o=new Ce(A,e,n,r);return o.scheduleRequired=function(){return null===i},o.ensureTrampoline=function(t){return null===i?this.schedule(t):t()},o}(),_e=D;(function(){function t(){if(!y.postMessage||y.importScripts)return!1;var t=!1,e=y.onmessage;return y.onmessage=function(){t=!0},y.postMessage("","*"),y.onmessage=e,t}function e(t){if("string"==typeof t.data&&t.data.substring(0,o.length)===o){var e=t.data.substring(o.length),n=s[e];n(),delete s[e]}}var n=RegExp("^"+($+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),r="function"==typeof(r=x&&E&&x.setImmediate)&&!n.test(r)&&r,i="function"==typeof(i=x&&E&&x.clearImmediate)&&!n.test(i)&&i;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Se=process.nextTick;else if("function"==typeof r)Se=r,_e=i;else if(t()){var o="ms.rx.schedule"+Math.random(),s={},u=0;y.addEventListener?y.addEventListener("message",e,!1):y.attachEvent("onmessage",e,!1),Se=function(t){var e=u++;s[e]=t,y.postMessage(o+e,"*")}}else if(y.MessageChannel){var c=new y.MessageChannel,a={},h=0;c.port1.onmessage=function(t){var e=t.data,n=a[e];n(),delete a[e]},Se=function(t){var e=h++;a[e]=t,c.port2.postMessage(e)}}else"document"in y&&"onreadystatechange"in y.document.createElement("script")?Se=function(t){var e=y.document.createElement("script");e.onreadystatechange=function(){t(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},y.document.documentElement.appendChild(e)}:(Se=function(t){return setTimeout(t,0)},_e=clearTimeout)})(),Ce.timeout=function(){function t(t,e){var n=this,r=new we,i=Se(function(){r.isDisposed||r.setDisposable(e(n,t))});return new pe(r,be(function(){_e(i)}))}function e(t,e,n){var r=this,i=Ce.normalize(e);if(0===i)return r.scheduleWithState(t,n);var o=new we,s=setTimeout(function(){o.isDisposed||o.setDisposable(n(r,t))},i);return new pe(o,be(function(){clearTimeout(s)}))}function n(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new Ce(A,t,e,n)}();var Oe=function(t){function e(){return this._scheduler.now()}function n(t,e){return this._scheduler.scheduleWithState(t,this._wrap(e))}function r(t,e,n){return this._scheduler.scheduleWithRelativeAndState(t,e,this._wrap(n))}function i(t,e,n){return this._scheduler.scheduleWithAbsoluteAndState(t,e,this._wrap(n))}function o(o,s){this._scheduler=o,this._handler=s,this._recursiveOriginal=null,this._recursiveWrapper=null,t.call(this,e,n,r,i)}return oe(o,t),o.prototype._clone=function(t){return new o(t,this._handler)},o.prototype._wrap=function(t){var e=this;return function(n,r){try{return t(e._getRecursiveWrapper(n),r)}catch(i){if(!e._handler(i))throw i;return me}}},o.prototype._getRecursiveWrapper=function(t){if(this._recursiveOriginal!==t){this._recursiveOriginal=t;var e=this._clone(t);e._recursiveOriginal=t,e._recursiveWrapper=e,this._recursiveWrapper=e}return this._recursiveWrapper},o.prototype.schedulePeriodicWithState=function(t,e,n){var r=this,i=!1,o=new we;return o.setDisposable(this._scheduler.schedulePeriodicWithState(t,e,function(t){if(i)return null;try{return n(t)}catch(e){if(i=!0,!r._handler(e))throw e;return o.dispose(),null}})),o},o}(Ce),We=C.Notification=function(){function t(t,e){this.hasValue=null==e?!1:e,this.kind=t}var e=t.prototype;return e.accept=function(t,e,n){return 1===arguments.length&&"object"==typeof t?this._acceptObservable(t):this._accept(t,e,n)},e.toObservable=function(t){var e=this;return t||(t=Ae),new on(function(n){return t.schedule(function(){e._acceptObservable(n),"N"===e.kind&&n.onCompleted()})})},t}(),Re=We.createOnNext=function(){function t(t){return t(this.value)}function e(t){return t.onNext(this.value)}function n(){return"OnNext("+this.value+")"}return function(r){var i=new We("N",!0);return i.value=r,i._accept=t,i._acceptObservable=e,i.toString=n,i}}(),je=We.createOnError=function(){function t(t,e){return e(this.exception)}function e(t){return t.onError(this.exception)}function n(){return"OnError("+this.exception+")"}return function(r){var i=new We("E");return i.exception=r,i._accept=t,i._acceptObservable=e,i.toString=n,i}}(),ke=We.createOnCompleted=function(){function t(t,e,n){return n()}function e(t){return t.onCompleted()}function n(){return"OnCompleted()"}return function(){var r=new We("C");return r._accept=t,r._acceptObservable=e,r.toString=n,r}}(),qe=C.internals.Enumerator=function(t){this._next=t};qe.prototype.next=function(){return this._next()},qe.prototype[q]=function(){return this};var Pe=C.internals.Enumerable=function(t){this._iterator=t};Pe.prototype[q]=function(){return this._iterator()},Pe.prototype.concat=function(){var e=this;return new on(function(n){var r;try{r=e[q]()}catch(i){return n.onError(),t}var o,s=new ge,u=Ae.scheduleRecursive(function(e){var i;if(!o){try{i=r.next()}catch(u){return n.onError(u),t}if(i.done)return n.onCompleted(),t;var c=i.value;R(c)&&(c=$e(c));var a=new we;s.setDisposable(a),a.setDisposable(c.subscribe(n.onNext.bind(n),n.onError.bind(n),function(){e()}))}});return new pe(s,u,be(function(){o=!0}))})},Pe.prototype.catchException=function(){var e=this;return new on(function(n){var r;try{r=e[q]()}catch(i){return n.onError(),t}var o,s,u=new ge,c=Ae.scheduleRecursive(function(e){if(!o){var i;try{i=r.next()}catch(c){return n.onError(c),t}if(i.done)return s?n.onError(s):n.onCompleted(),t;var a=i.value;R(a)&&(a=$e(a));var h=new we;u.setDisposable(h),h.setDisposable(a.subscribe(n.onNext.bind(n),function(t){s=t,e()},n.onCompleted.bind(n)))}});return new pe(u,c,be(function(){o=!0}))})};var Te=Pe.repeat=function(t,e){return null==e&&(e=-1),new Pe(function(){var n=e;return new qe(function(){return 0===n?T:(n>0&&n--,{done:!1,value:t})})})},Ve=Pe.forEach=function(t,e,n){return e||(e=S),new Pe(function(){var r=-1;return new qe(function(){return++r<t.length?{done:!1,value:e.call(n,t[r],r,t)}:T})})},Le=C.Observer=function(){};Le.prototype.toNotifier=function(){var t=this;return function(e){return e.accept(t)}},Le.prototype.asObserver=function(){return new Fe(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},Le.prototype.checked=function(){return new Be(this)};var ze=Le.create=function(t,e,n){return t||(t=D),e||(e=W),n||(n=D),new Fe(t,e,n)};Le.fromNotifier=function(t){return new Fe(function(e){return t(Re(e))},function(e){return t(je(e))},function(){return t(ke())})},Le.notifyOn=function(t){return new Ue(t,this)};var Me,Ie=C.internals.AbstractObserver=function(t){function e(){this.isStopped=!1,t.call(this)}return oe(e,t),e.prototype.onNext=function(t){this.isStopped||this.next(t)},e.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.error(t))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.error(t),!0)},e}(Le),Fe=C.AnonymousObserver=function(t){function e(e,n,r){t.call(this),this._onNext=e,this._onError=n,this._onCompleted=r}return oe(e,t),e.prototype.next=function(t){this._onNext(t)},e.prototype.error=function(t){this._onError(t)},e.prototype.completed=function(){this._onCompleted()},e}(Ie),Be=function(t){function e(e){t.call(this),this._observer=e,this._state=0}oe(e,t);var n=e.prototype;return n.onNext=function(t){this.checkAccess();try{this._observer.onNext(t)}catch(e){throw e}finally{this._state=0}},n.onError=function(t){this.checkAccess();try{this._observer.onError(t)}catch(e){throw e}finally{this._state=2}},n.onCompleted=function(){this.checkAccess();try{this._observer.onCompleted()}catch(t){throw t}finally{this._state=2}},n.checkAccess=function(){if(1===this._state)throw Error("Re-entrancy detected");if(2===this._state)throw Error("Observer completed");0===this._state&&(this._state=1)},e}(Le),He=C.internals.ScheduledObserver=function(e){function n(t,n){e.call(this),this.scheduler=t,this.observer=n,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new ge}return oe(n,e),n.prototype.next=function(t){var e=this;this.queue.push(function(){e.observer.onNext(t)})},n.prototype.error=function(t){var e=this;this.queue.push(function(){e.observer.onError(t)})},n.prototype.completed=function(){var t=this;this.queue.push(function(){t.observer.onCompleted()})},n.prototype.ensureActive=function(){var e=!1,n=this;!this.hasFaulted&&this.queue.length>0&&(e=!this.isAcquired,this.isAcquired=!0),e&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(e){var r;if(!(n.queue.length>0))return n.isAcquired=!1,t;r=n.queue.shift();try{r()}catch(i){throw n.queue=[],n.hasFaulted=!0,i}e()}))},n.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposable.dispose()},n}(Ie),Ue=function(t){function e(){t.apply(this,arguments)}return oe(e,t),e.prototype.next=function(e){t.prototype.next.call(this,e),this.ensureActive()},e.prototype.error=function(e){t.prototype.error.call(this,e),this.ensureActive()},e.prototype.completed=function(){t.prototype.completed.call(this),this.ensureActive()},e}(He),Qe=C.Observable=function(){function t(t){this._subscribe=t}return Me=t.prototype,Me.subscribe=Me.forEach=function(t,e,n){var r="object"==typeof t?t:ze(t,e,n);return this._subscribe(r)},t}();Me.observeOn=function(t){var e=this;return new on(function(n){return e.subscribe(new Ue(t,n))})},Me.subscribeOn=function(t){var e=this;return new on(function(n){var r=new we,i=new ge;return i.setDisposable(r),r.setDisposable(t.schedule(function(){i.setDisposable(new f(t,e.subscribe(n)))})),i})};var $e=Qe.fromPromise=function(t){return new on(function(e){return t.then(function(t){e.onNext(t),e.onCompleted()},function(t){e.onError(t)}),function(){t&&t.abort&&t.abort()}})};Me.toPromise=function(t){if(t||(t=C.config.Promise),!t)throw Error("Promise type not provided nor in Rx.config.Promise");var e=this;return new t(function(t,n){var r,i=!1;e.subscribe(function(t){r=t,i=!0},function(t){n(t)},function(){i&&t(r)})})},Me.toArray=function(){var t=this;return new on(function(e){var n=[];return t.subscribe(n.push.bind(n),e.onError.bind(e),function(){e.onNext(n),e.onCompleted()})})},Qe.create=Qe.createWithDisposable=function(t){return new on(t)},Qe.defer=function(t){return new on(function(e){var n;try{n=t()}catch(r){return Ge(r).subscribe(e)}return R(n)&&(n=$e(n)),n.subscribe(e)})};var Ke=Qe.empty=function(t){return t||(t=Ae),new on(function(e){return t.schedule(function(){e.onCompleted()})})},Je=Qe.fromArray=function(t,e){return e||(e=Ne),new on(function(n){var r=0;return e.scheduleRecursive(function(e){t.length>r?(n.onNext(t[r++]),e()):n.onCompleted()})})};Qe.fromIterable=function(e,n){return n||(n=Ne),new on(function(r){var i;try{i=e[q]()}catch(o){return r.onError(o),t}return n.scheduleRecursive(function(e){var n;try{n=i.next()}catch(o){return r.onError(o),t}n.done?r.onCompleted():(r.onNext(n.value),e())})})},Qe.generate=function(e,n,r,i,o){return o||(o=Ne),new on(function(s){var u=!0,c=e;return o.scheduleRecursive(function(e){var o,a;try{u?u=!1:c=r(c),o=n(c),o&&(a=i(c))}catch(h){return s.onError(h),t}o?(s.onNext(a),e()):s.onCompleted()})})};var Xe=Qe.never=function(){return new on(function(){return me})};Qe.range=function(t,e,n){return n||(n=Ne),new on(function(r){return n.scheduleRecursiveWithState(0,function(n,i){e>n?(r.onNext(t+n),i(n+1)):r.onCompleted()})})},Qe.repeat=function(t,e,n){return n||(n=Ne),null==e&&(e=-1),Ze(t,n).repeat(e)};var Ze=Qe["return"]=Qe.returnValue=function(t,e){return e||(e=Ae),new on(function(n){return e.schedule(function(){n.onNext(t),n.onCompleted()})})},Ge=Qe["throw"]=Qe.throwException=function(t,e){return e||(e=Ae),new on(function(n){return e.schedule(function(){n.onError(t)})})};Qe.using=function(t,e){return new on(function(n){var r,i,o=me;try{r=t(),r&&(o=r),i=e(r)}catch(s){return new pe(Ge(s).subscribe(n),o)}return new pe(i.subscribe(n),o)})},Me.amb=function(t){var e=this;return new on(function(n){function r(){o||(o=s,a.dispose())}function i(){o||(o=u,c.dispose())}var o,s="L",u="R",c=new we,a=new we;return R(t)&&(t=$e(t)),c.setDisposable(e.subscribe(function(t){r(),o===s&&n.onNext(t)},function(t){r(),o===s&&n.onError(t)},function(){r(),o===s&&n.onCompleted()})),a.setDisposable(t.subscribe(function(t){i(),o===u&&n.onNext(t)},function(t){i(),o===u&&n.onError(t)},function(){i(),o===u&&n.onCompleted()})),new pe(c,a)})},Qe.amb=function(){function t(t,e){return t.amb(e)}for(var e=Xe(),n=h(arguments,0),r=0,i=n.length;i>r;r++)e=t(e,n[r]);return e},Me["catch"]=Me.catchException=function(t){return"function"==typeof t?p(this,t):Ye([this,t])};var Ye=Qe.catchException=Qe["catch"]=function(){var t=h(arguments,0);return Ve(t).catchException()};Me.combineLatest=function(){var t=ie.call(arguments);return Array.isArray(t[0])?t[0].unshift(this):t.unshift(this),tn.apply(this,t)};var tn=Qe.combineLatest=function(){var e=ie.call(arguments),n=e.pop();return Array.isArray(e[0])&&(e=e[0]),new on(function(r){function i(e){var i;if(c[e]=!0,a||(a=c.every(S))){try{i=n.apply(null,f)}catch(o){return r.onError(o),t}r.onNext(i)}else h.filter(function(t,n){return n!==e}).every(S)&&r.onCompleted()}function o(t){h[t]=!0,h.every(S)&&r.onCompleted()}for(var s=function(){return!1},u=e.length,c=l(u,s),a=!1,h=l(u,s),f=Array(u),p=Array(u),d=0;u>d;d++)(function(t){var n=e[t],s=new we;R(n)&&(n=$e(n)),s.setDisposable(n.subscribe(function(e){f[t]=e,i(t)},r.onError.bind(r),function(){o(t)})),p[t]=s})(d);return new pe(p)})};Me.concat=function(){var t=ie.call(arguments,0);return t.unshift(this),en.apply(this,t)};var en=Qe.concat=function(){var t=h(arguments,0);return Ve(t).concat()};Me.concatObservable=Me.concatAll=function(){return this.merge(1)},Me.merge=function(t){if("number"!=typeof t)return nn(this,t);var e=this;return new on(function(n){var r=0,i=new pe,o=!1,s=[],u=function(t){var e=new we;i.add(e),R(t)&&(t=$e(t)),e.setDisposable(t.subscribe(n.onNext.bind(n),n.onError.bind(n),function(){var t;i.remove(e),s.length>0?(t=s.shift(),u(t)):(r--,o&&0===r&&n.onCompleted())}))};return i.add(e.subscribe(function(e){t>r?(r++,u(e)):s.push(e)},n.onError.bind(n),function(){o=!0,0===r&&n.onCompleted()})),i})};var nn=Qe.merge=function(){var t,e;return arguments[0]?arguments[0].now?(t=arguments[0],e=ie.call(arguments,1)):(t=Ae,e=ie.call(arguments,0)):(t=Ae,e=ie.call(arguments,1)),Array.isArray(e[0])&&(e=e[0]),Je(e,t).mergeObservable()};Me.mergeObservable=Me.mergeAll=function(){var t=this;return new on(function(e){var n=new pe,r=!1,i=new we;return n.add(i),i.setDisposable(t.subscribe(function(t){var i=new we;n.add(i),R(t)&&(t=$e(t)),i.setDisposable(t.subscribe(function(t){e.onNext(t)},e.onError.bind(e),function(){n.remove(i),r&&1===n.length&&e.onCompleted()}))},e.onError.bind(e),function(){r=!0,1===n.length&&e.onCompleted()})),n})},Me.onErrorResumeNext=function(t){if(!t)throw Error("Second observable is required");return rn([this,t])};var rn=Qe.onErrorResumeNext=function(){var t=h(arguments,0);return new on(function(e){var n=0,r=new ge,i=Ae.scheduleRecursive(function(i){var o,s;t.length>n?(o=t[n++],R(o)&&(o=$e(o)),s=new we,r.setDisposable(s),s.setDisposable(o.subscribe(e.onNext.bind(e),function(){i()},function(){i()}))):e.onCompleted()});return new pe(r,i)})};Me.skipUntil=function(t){var e=this;return new on(function(n){var r=!1,i=new pe(e.subscribe(function(t){r&&n.onNext(t)},n.onError.bind(n),function(){r&&n.onCompleted()}));R(t)&&(t=$e(t));var o=new we;return i.add(o),o.setDisposable(t.subscribe(function(){r=!0,o.dispose()},n.onError.bind(n),function(){o.dispose()})),i})},Me["switch"]=Me.switchLatest=function(){var t=this;return new on(function(e){var n=!1,r=new ge,i=!1,o=0,s=t.subscribe(function(t){var s=new we,u=++o;n=!0,r.setDisposable(s),R(t)&&(t=$e(t)),s.setDisposable(t.subscribe(function(t){o===u&&e.onNext(t)},function(t){o===u&&e.onError(t)},function(){o===u&&(n=!1,i&&e.onCompleted())}))},e.onError.bind(e),function(){i=!0,n||e.onCompleted()});return new pe(s,r)})},Me.takeUntil=function(t){var e=this;return new on(function(n){return R(t)&&(t=$e(t)),new pe(e.subscribe(n),t.subscribe(n.onCompleted.bind(n),n.onError.bind(n),D))})},Me.zip=function(){if(Array.isArray(arguments[0]))return d.apply(this,arguments);var e=this,n=ie.call(arguments),r=n.pop();return n.unshift(e),new on(function(i){function o(n){var o,s;if(c.every(function(t){return t.length>0})){try{s=c.map(function(t){return t.shift()}),o=r.apply(e,s)}catch(u){return i.onError(u),t}i.onNext(o)}else a.filter(function(t,e){return e!==n}).every(S)&&i.onCompleted()}function s(t){a[t]=!0,a.every(function(t){return t})&&i.onCompleted()}for(var u=n.length,c=l(u,function(){return[]}),a=l(u,function(){return!1}),h=Array(u),f=0;u>f;f++)(function(t){var e=n[t],r=new we;R(e)&&(e=$e(e)),r.setDisposable(e.subscribe(function(e){c[t].push(e),o(t)},i.onError.bind(i),function(){s(t)})),h[t]=r})(f);return new pe(h)})},Qe.zip=function(){var t=ie.call(arguments,0),e=t.shift();return e.zip.apply(e,t)
2
+ },Qe.zipArray=function(){var e=h(arguments,0);return new on(function(n){function r(e){if(s.every(function(t){return t.length>0})){var r=s.map(function(t){return t.shift()});n.onNext(r)}else if(u.filter(function(t,n){return n!==e}).every(S))return n.onCompleted(),t}function i(e){return u[e]=!0,u.every(S)?(n.onCompleted(),t):t}for(var o=e.length,s=l(o,function(){return[]}),u=l(o,function(){return!1}),c=Array(o),a=0;o>a;a++)(function(t){c[t]=new we,c[t].setDisposable(e[t].subscribe(function(e){s[t].push(e),r(t)},n.onError.bind(n),function(){i(t)}))})(a);var h=new pe(c);return h.add(be(function(){for(var t=0,e=s.length;e>t;t++)s[t]=[]})),h})},Me.asObservable=function(){var t=this;return new on(function(e){return t.subscribe(e)})},Me.bufferWithCount=function(t,e){return"number"!=typeof e&&(e=t),this.windowWithCount(t,e).selectMany(function(t){return t.toArray()}).where(function(t){return t.length>0})},Me.dematerialize=function(){var t=this;return new on(function(e){return t.subscribe(function(t){return t.accept(e)},e.onError.bind(e),e.onCompleted.bind(e))})},Me.distinctUntilChanged=function(e,n){var r=this;return e||(e=S),n||(n=N),new on(function(i){var o,s=!1;return r.subscribe(function(r){var u,c=!1;try{u=e(r)}catch(a){return i.onError(a),t}if(s)try{c=n(o,u)}catch(a){return i.onError(a),t}s&&c||(s=!0,o=u,i.onNext(r))},i.onError.bind(i),i.onCompleted.bind(i))})},Me["do"]=Me.doAction=function(t,e,n){var r,i=this;return"function"==typeof t?r=t:(r=t.onNext.bind(t),e=t.onError.bind(t),n=t.onCompleted.bind(t)),new on(function(t){return i.subscribe(function(e){try{r(e)}catch(n){t.onError(n)}t.onNext(e)},function(n){if(e){try{e(n)}catch(r){t.onError(r)}t.onError(n)}else t.onError(n)},function(){if(n){try{n()}catch(e){t.onError(e)}t.onCompleted()}else t.onCompleted()})})},Me["finally"]=Me.finallyAction=function(t){var e=this;return new on(function(n){var r;try{r=e.subscribe(n)}catch(i){throw t(),i}return be(function(){try{r.dispose()}catch(e){throw e}finally{t()}})})},Me.ignoreElements=function(){var t=this;return new on(function(e){return t.subscribe(D,e.onError.bind(e),e.onCompleted.bind(e))})},Me.materialize=function(){var t=this;return new on(function(e){return t.subscribe(function(t){e.onNext(Re(t))},function(t){e.onNext(je(t)),e.onCompleted()},function(){e.onNext(ke()),e.onCompleted()})})},Me.repeat=function(t){return Te(this,t).concat()},Me.retry=function(t){return Te(this,t).catchException()},Me.scan=function(){var e,n,r=!1,i=this;return 2===arguments.length?(r=!0,e=arguments[0],n=arguments[1]):n=arguments[0],new on(function(o){var s,u,c;return i.subscribe(function(i){try{c||(c=!0),s?u=n(u,i):(u=r?n(e,i):i,s=!0)}catch(a){return o.onError(a),t}o.onNext(u)},o.onError.bind(o),function(){!c&&r&&o.onNext(e),o.onCompleted()})})},Me.skipLast=function(t){var e=this;return new on(function(n){var r=[];return e.subscribe(function(e){r.push(e),r.length>t&&n.onNext(r.shift())},n.onError.bind(n),n.onCompleted.bind(n))})},Me.startWith=function(){var t,e,n=0;return arguments.length&&"now"in Object(arguments[0])?(e=arguments[0],n=1):e=Ae,t=ie.call(arguments,n),Ve([Je(t,e),this]).concat()},Me.takeLast=function(t,e){return this.takeLastBuffer(t).selectMany(function(t){return Je(t,e)})},Me.takeLastBuffer=function(t){var e=this;return new on(function(n){var r=[];return e.subscribe(function(e){r.push(e),r.length>t&&r.shift()},n.onError.bind(n),function(){n.onNext(r),n.onCompleted()})})},Me.windowWithCount=function(t,e){var n=this;if(0>=t)throw Error(j);if(1===arguments.length&&(e=t),0>=e)throw Error(j);return new on(function(r){var i=new we,o=new Ee(i),s=0,u=[],c=function(){var t=new an;u.push(t),r.onNext(ue(t,o))};return c(),i.setDisposable(n.subscribe(function(n){for(var r,i=0,o=u.length;o>i;i++)u[i].onNext(n);var a=s-t+1;a>=0&&0===a%e&&(r=u.shift(),r.onCompleted()),s++,0===s%e&&c()},function(t){for(;u.length>0;)u.shift().onError(t);r.onError(t)},function(){for(;u.length>0;)u.shift().onCompleted();r.onCompleted()})),o})},Me.selectConcat=Me.concatMap=function(t,e){return e?this.concatMap(function(n,r){var i=t(n,r),o=R(i)?$e(i):i;return o.map(function(t){return e(n,t,r)})}):"function"==typeof t?v.call(this,t):v.call(this,function(){return t})},Me.defaultIfEmpty=function(e){var n=this;return e===t&&(e=null),new on(function(t){var r=!1;return n.subscribe(function(e){r=!0,t.onNext(e)},t.onError.bind(t),function(){r||t.onNext(e),t.onCompleted()})})},Me.distinct=function(e,n){var r=this;return e||(e=S),n||(n=O),new on(function(i){var o={};return r.subscribe(function(r){var s,u,c,a=!1;try{s=e(r),u=n(s)}catch(h){return i.onError(h),t}for(c in o)if(u===c){a=!0;break}a||(o[u]=null,i.onNext(r))},i.onError.bind(i),i.onCompleted.bind(i))})},Me.groupBy=function(t,e,n){return this.groupByUntil(t,e,function(){return Xe()},n)},Me.groupByUntil=function(e,n,r,i){var o=this;return n||(n=S),i||(i=O),new on(function(s){var u={},c=new pe,a=new Ee(c);return c.add(o.subscribe(function(o){var h,l,f,p,d,v,b,m,y,w;try{v=e(o),b=i(v)}catch(g){for(w in u)u[w].onError(g);return s.onError(g),t}p=!1;try{y=u[b],y||(y=new an,u[b]=y,p=!0)}catch(g){for(w in u)u[w].onError(g);return s.onError(g),t}if(p){d=new un(v,y,a),l=new un(v,y);try{h=r(l)}catch(g){for(w in u)u[w].onError(g);return s.onError(g),t}s.onNext(d),m=new we,c.add(m);var E=function(){b in u&&(delete u[b],y.onCompleted()),c.remove(m)};m.setDisposable(h.take(1).subscribe(D,function(t){for(w in u)u[w].onError(t);s.onError(t)},function(){E()}))}try{f=n(o)}catch(g){for(w in u)u[w].onError(g);return s.onError(g),t}y.onNext(f)},function(t){for(var e in u)u[e].onError(t);s.onError(t)},function(){for(var t in u)u[t].onCompleted();s.onCompleted()})),a})},Me.select=Me.map=function(e,n){var r=this;return new on(function(i){var o=0;return r.subscribe(function(s){var u;try{u=e.call(n,s,o++,r)}catch(c){return i.onError(c),t}i.onNext(u)},i.onError.bind(i),i.onCompleted.bind(i))})},Me.pluck=function(t){return this.select(function(e){return e[t]})},Me.selectMany=Me.flatMap=function(t,e){return e?this.selectMany(function(n,r){var i=t(n,r),o=R(i)?$e(i):i;return o.select(function(t){return e(n,t,r)})}):"function"==typeof t?b.call(this,t):b.call(this,function(){return t})},Me.selectSwitch=Me.flatMapLatest=function(t,e){return this.select(t,e).switchLatest()},Me.skip=function(t){if(0>t)throw Error(j);var e=this;return new on(function(n){var r=t;return e.subscribe(function(t){0>=r?n.onNext(t):r--},n.onError.bind(n),n.onCompleted.bind(n))})},Me.skipWhile=function(e,n){var r=this;return new on(function(i){var o=0,s=!1;return r.subscribe(function(u){if(!s)try{s=!e.call(n,u,o++,r)}catch(c){return i.onError(c),t}s&&i.onNext(u)},i.onError.bind(i),i.onCompleted.bind(i))})},Me.take=function(t,e){if(0>t)throw Error(j);if(0===t)return Ke(e);var n=this;return new on(function(e){var r=t;return n.subscribe(function(t){r>0&&(r--,e.onNext(t),0===r&&e.onCompleted())},e.onError.bind(e),e.onCompleted.bind(e))})},Me.takeWhile=function(e,n){var r=this;return new on(function(i){var o=0,s=!0;return r.subscribe(function(u){if(s){try{s=e.call(n,u,o++,r)}catch(c){return i.onError(c),t}s?i.onNext(u):i.onCompleted()}},i.onError.bind(i),i.onCompleted.bind(i))})},Me.where=Me.filter=function(e,n){var r=this;return new on(function(i){var o=0;return r.subscribe(function(s){var u;try{u=e.call(n,s,o++,r)}catch(c){return i.onError(c),t}u&&i.onNext(s)},i.onError.bind(i),i.onCompleted.bind(i))})};var on=C.AnonymousObservable=function(e){function n(e){return e===t?e=me:"function"==typeof e&&(e=be(e)),e}function r(i){function o(t){var e=new sn(t);if(Ne.scheduleRequired())Ne.schedule(function(){try{e.setDisposable(n(i(e)))}catch(t){if(!e.fail(t))throw t}});else try{e.setDisposable(n(i(e)))}catch(r){if(!e.fail(r))throw r}return e}return this instanceof r?(e.call(this,o),t):new r(i)}return oe(r,e),r}(Qe),sn=function(t){function e(e){t.call(this),this.observer=e,this.m=new we}oe(e,t);var n=e.prototype;return n.next=function(t){var e=!1;try{this.observer.onNext(t),e=!0}catch(n){throw n}finally{e||this.dispose()}},n.error=function(t){try{this.observer.onError(t)}catch(e){throw e}finally{this.dispose()}},n.completed=function(){try{this.observer.onCompleted()}catch(t){throw t}finally{this.dispose()}},n.setDisposable=function(t){this.m.setDisposable(t)},n.getDisposable=function(){return this.m.getDisposable()},n.disposable=function(t){return arguments.length?this.getDisposable():setDisposable(t)},n.dispose=function(){t.prototype.dispose.call(this),this.m.dispose()},e}(Ie),un=function(t){function e(t){return this.underlyingObservable.subscribe(t)}function n(n,r,i){t.call(this,e),this.key=n,this.underlyingObservable=i?new on(function(t){return new pe(i.getDisposable(),r.subscribe(t))}):r}return oe(n,t),n}(Qe),cn=function(t,e){this.subject=t,this.observer=e};cn.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var t=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(t,1),this.observer=null}};var an=C.Subject=function(t){function n(t){return e.call(this),this.isStopped?this.exception?(t.onError(this.exception),me):(t.onCompleted(),me):(this.observers.push(t),new cn(this,t))}function r(){t.call(this,n),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return oe(r,t),se(r.prototype,Le,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(e.call(this),!this.isStopped){var t=this.observers.slice(0);this.isStopped=!0;for(var n=0,r=t.length;r>n;n++)t[n].onCompleted();this.observers=[]}},onError:function(t){if(e.call(this),!this.isStopped){var n=this.observers.slice(0);this.isStopped=!0,this.exception=t;for(var r=0,i=n.length;i>r;r++)n[r].onError(t);this.observers=[]}},onNext:function(t){if(e.call(this),!this.isStopped)for(var n=this.observers.slice(0),r=0,i=n.length;i>r;r++)n[r].onNext(t)},dispose:function(){this.isDisposed=!0,this.observers=null}}),r.create=function(t,e){return new hn(t,e)},r}(Qe);C.AsyncSubject=function(t){function n(t){if(e.call(this),!this.isStopped)return this.observers.push(t),new cn(this,t);var n=this.exception,r=this.hasValue,i=this.value;return n?t.onError(n):r?(t.onNext(i),t.onCompleted()):t.onCompleted(),me}function r(){t.call(this,n),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return oe(r,t),se(r.prototype,Le,{hasObservers:function(){return e.call(this),this.observers.length>0},onCompleted:function(){var t,n,r;if(e.call(this),!this.isStopped){this.isStopped=!0;var i=this.observers.slice(0),o=this.value,s=this.hasValue;if(s)for(n=0,r=i.length;r>n;n++)t=i[n],t.onNext(o),t.onCompleted();else for(n=0,r=i.length;r>n;n++)i[n].onCompleted();this.observers=[]}},onError:function(t){if(e.call(this),!this.isStopped){var n=this.observers.slice(0);this.isStopped=!0,this.exception=t;for(var r=0,i=n.length;i>r;r++)n[r].onError(t);this.observers=[]}},onNext:function(t){e.call(this),this.isStopped||(this.value=t,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),r}(Qe);var hn=function(t){function e(t){return this.observable.subscribe(t)}function n(n,r){t.call(this,e),this.observer=n,this.observable=r}return oe(n,t),se(n.prototype,Le,{onCompleted:function(){this.observer.onCompleted()},onError:function(t){this.observer.onError(t)},onNext:function(t){this.observer.onNext(t)}}),n}(Qe);"function"==typeof define&&"object"==typeof define.amd&&define.amd?(y.Rx=C,define(function(){return C})):w&&g?E?(g.exports=C).Rx=C:w.Rx=C:y.Rx=C}).call(this);
@@ -32,6 +32,8 @@
32
32
  // Defaults
33
33
  var noop = Rx.helpers.noop = function () { },
34
34
  identity = Rx.helpers.identity = function (x) { return x; },
35
+ pluck = Rx.helpers.pluck = function (property) { return function (x) { return x[property]; }; },
36
+ just = Rx.helpers.just = function (value) { return function () { return value; }; },
35
37
  defaultNow = Rx.helpers.defaultNow = (function () { return !!Date.now ? Date.now : function () { return +new Date; }; }()),
36
38
  defaultComparer = Rx.helpers.defaultComparer = function (x, y) { return isEqual(x, y); },
37
39
  defaultSubComparer = Rx.helpers.defaultSubComparer = function (x, y) { return x > y ? 1 : (x < y ? -1 : 0); },
@@ -1 +1 @@
1
- (function(a){function b(){if(this.isDisposed)throw new Error(z)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;W.nonEnumArgs&&a.length&&h(a)&&(a=Y.call(a));var d=W.enumPrototypes&&"function"==typeof a,e=W.enumErrorProps&&(a===Q||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(W.nonEnumShadows&&a!==R){var g=a.constructor,i=-1,j=U.length;if(a===(g&&g.prototype))var k=a===stringProto?M:a===Q?H:N.call(a),l=V[k];for(;++i<j;)f=U[i],l&&l[f]||!O.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?N.call(a)==D:!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=N.call(a),m=N.call(b);if(l==D&&(l=K),m==D&&(m=K),l!=m)return!1;switch(l){case F:case G:return+a==+b;case J:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case L:case M:return a==String(b)}var n=l==E;if(!n){if(l!=K||!W.nodeClass&&(g(a)||g(b)))return!1;var o=!W.argsObject&&h(a)?Object:a.constructor,p=!W.argsObject&&h(b)?Object:b.constructor;if(!(o==p||O.call(a,"constructor")&&O.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 O.call(f,e)?(r++,result=O.call(a,e)&&j(a[e],b,c,d)):void 0}),result&&f(a,function(a,b,c){return O.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]:Y.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.identity=function(a){return a},v=s.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}(),w=(s.helpers.defaultComparer=function(a,b){return X(a,b)},s.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0}),x=(s.helpers.defaultKeySerializer=function(a){return a.toString()},s.helpers.defaultError=function(a){throw a}),y=s.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then&&a.then!==s.Observable.prototype.then},z=(s.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},s.helpers.not=function(a){return!a},"Object has been disposed"),A="object"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";n.Set&&"function"==typeof(new n.Set)["@@iterator"]&&(A="@@iterator");var B,C={done:!0,value:a},D="[object Arguments]",E="[object Array]",F="[object Boolean]",G="[object Date]",H="[object Error]",I="[object Function]",J="[object Number]",K="[object Object]",L="[object RegExp]",M="[object String]",N=Object.prototype.toString,O=Object.prototype.hasOwnProperty,P=N.call(arguments)==D,Q=Error.prototype,R=Object.prototype,S=R.propertyIsEnumerable;try{B=!(N.call(document)==K&&!({toString:0}+""))}catch(T){B=!0}var U=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],V={};V[E]=V[G]=V[J]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},V[F]=V[M]={constructor:!0,toString:!0,valueOf:!0},V[H]=V[I]=V[L]={constructor:!0,toString:!0},V[K]={constructor:!0};var W={};!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);W.enumErrorProps=S.call(Q,"message")||S.call(Q,"name"),W.enumPrototypes=S.call(a,"prototype"),W.nonEnumArgs=0!=c,W.nonEnumShadows=!/valueOf/.test(b)}(1),P||(h=function(a){return a&&"object"==typeof a?O.call(a,"callee"):!1}),i(/x/)&&(i=function(a){return"function"==typeof a&&N.call(a)==I});{var X=s.internals.isEqual=function(a,b){return j(a,b,[],[])},Y=Array.prototype.slice,Z=({}.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=Y.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}};s.internals.addRef=function(a,b){return new Jb(function(c){return new eb(b.getDisposable(),a.subscribe(c))})}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Y.call(arguments,1),d=function(){function e(){}if(this instanceof d){e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(Y.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(Y.call(arguments)))};return d});var _=Object("a"),ab="a"!=_[0]||!(0 in _);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=ab&&{}.toString.call(this)==M?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=I)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=ab&&{}.toString.call(this)==M?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=I)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==E}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!=d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1});var bb=function(a,b){this.id=a,this.value=b};bb.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var cb=s.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},db=cb.prototype;db.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},db.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)}}},db.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)}}},db.peek=function(){return this.items[0].value},db.removeAt=function(a){this.items[a]=this.items[--this.length],delete this.items[this.length],this.heapify()},db.dequeue=function(){var a=this.peek();return this.removeAt(0),a},db.enqueue=function(a){var b=this.length++;this.items[b]=new bb(cb.count++,a),this.percolate(b)},db.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},cb.count=0;var eb=s.CompositeDisposable=function(){this.disposables=k(arguments,0),this.isDisposed=!1,this.length=this.disposables.length},fb=eb.prototype;fb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},fb.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},fb.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()}},fb.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()},fb.contains=function(a){return-1!==this.disposables.indexOf(a)},fb.toArray=function(){return this.disposables.slice(0)};var gb=s.Disposable=function(a){this.isDisposed=!1,this.action=a||t};gb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};{var hb=gb.create=function(a){return new gb(a)},ib=gb.empty={dispose:t},jb=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}(),kb=s.SingleAssignmentDisposable=function(a){function b(){a.call(this,!0)}return Z(b,a),b}(jb),lb=s.SerialDisposable=function(a){function b(){a.call(this,!1)}return Z(b,a),b}(jb);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?ib:new a(this)},b}()}l.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var mb=s.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||w,this.disposable=new kb};mb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},mb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},mb.prototype.isCancelled=function(){return this.disposable.isDisposed},mb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var nb,ob=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 eb,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),ib});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new eb,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),ib});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){return b(),ib}var e=a.prototype;return e.catchException=e["catch"]=function(a){return new tb(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 hb(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=v,a.normalize=function(a){return 0>a&&(a=0),a},a}(),pb=ob.normalize,qb=(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 kb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),ob.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=pb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new ob(v,a,b,c)}()),rb=ob.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-ob.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()+ob.normalize(c),g=new mb(this,b,d,f);if(e)e.enqueue(g);else{e=new cb(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 ob(v,b,c,d);return f.scheduleRequired=function(){return null===e},f.ensureTrampoline=function(a){return null===e?this.schedule(a):a()},f}(),sb=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(N).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))nb=process.nextTick;else if("function"==typeof d)nb=d,sb=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),nb=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]},nb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in n&&"onreadystatechange"in n.document.createElement("script")?nb=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)}:(nb=function(a){return setTimeout(a,0)},sb=clearTimeout)}();var tb=(ob.timeout=function(){function a(a,b){var c=this,d=new kb,e=nb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new eb(d,hb(function(){sb(e)}))}function b(a,b,c){var d=this,e=ob.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new kb,g=setTimeout(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new eb(f,hb(function(){clearTimeout(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new ob(v,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 Z(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 ib}}},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 kb;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}(ob)),ub=s.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}var b=a.prototype;return b.accept=function(a,b,c){return 1===arguments.length&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},b.toObservable=function(a){var b=this;return a||(a=qb),new Jb(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),vb=ub.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 ub("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),wb=ub.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 ub("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),xb=ub.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new ub("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),yb=s.internals.Enumerator=function(a){this._next=a};yb.prototype.next=function(){return this._next()},yb.prototype[A]=function(){return this};var zb=s.internals.Enumerable=function(a){this._iterator=a};zb.prototype[A]=function(){return this._iterator()},zb.prototype.concat=function(){var a=this;return new Jb(function(b){var c;try{c=a[A]()}catch(d){return void b.onError()}var e,f=new lb,g=qb.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;y(h)&&(h=observableFromPromise(h));var i=new kb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new eb(f,g,hb(function(){e=!0}))})},zb.prototype.catchException=function(){var a=this;return new Jb(function(b){var c;try{c=a[A]()}catch(d){return void b.onError()}var e,f,g=new lb,h=qb.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;y(i)&&(i=observableFromPromise(i));var j=new kb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new eb(g,h,hb(function(){e=!0}))})};var Ab=(zb.repeat=function(a,b){return null==b&&(b=-1),new zb(function(){var c=b;return new yb(function(){return 0===c?C:(c>0&&c--,{done:!1,value:a})})})},zb.forEach=function(a,b,c){return b||(b=u),new zb(function(){var d=-1;return new yb(function(){return++d<a.length?{done:!1,value:b.call(c,a[d],d,a)}:C})})},s.Observer=function(){});Ab.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},Ab.prototype.asObserver=function(){return new Eb(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},Ab.prototype.checked=function(){return new Fb(this)};var Bb=Ab.create=function(a,b,c){return a||(a=t),b||(b=x),c||(c=t),new Eb(a,b,c)};Ab.fromNotifier=function(a){return new Eb(function(b){return a(vb(b))},function(b){return a(wb(b))},function(){return a(xb())})},Ab.notifyOn=function(a){return new Hb(a,this)};var Cb,Db=s.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}return Z(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}(Ab),Eb=s.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return Z(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}(Db),Fb=function(a){function b(b){a.call(this),this._observer=b,this._state=0}Z(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}(Ab),Gb=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 lb}return Z(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}(Db),Hb=function(a){function b(){a.apply(this,arguments)}return Z(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}(Gb),Ib=s.Observable=function(){function a(a){this._subscribe=a}return Cb=a.prototype,Cb.subscribe=Cb.forEach=function(a,b,c){var d="object"==typeof a?a:Bb(a,b,c);return this._subscribe(d)},a}(),Jb=s.AnonymousObservable=function(a){function b(a){return"undefined"==typeof a?a=ib:"function"==typeof a&&(a=hb(a)),a}function c(d){function e(a){var c=new Kb(a);if(rb.scheduleRequired())rb.schedule(function(){try{c.setDisposable(b(d(c)))}catch(a){if(!c.fail(a))throw a}});else try{c.setDisposable(b(d(c)))}catch(e){if(!c.fail(e))throw e}return c}return this instanceof c?void a.call(this,e):new c(d)}return Z(c,a),c}(Ib),Kb=function(a){function b(b){a.call(this),this.observer=b,this.m=new kb}Z(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}(Db),Lb=(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 Jb(function(a){return new eb(e.getDisposable(),d.subscribe(a))}):d}return Z(c,a),c}(Ib),function(a,b){this.subject=a,this.observer=b});Lb.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 Mb=(s.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),ib):(a.onCompleted(),ib):(this.observers.push(a),new Lb(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return Z(d,a),$(d.prototype,Ab,{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 Mb(a,b)},d}(Ib),s.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new Lb(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(),ib}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return Z(d,a),$(d.prototype,Ab,{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}(Ib),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 Z(c,a),$(c.prototype,Ab,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Ib));"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(t){function e(){if(this.isDisposed)throw Error(A)}function n(t){var e=typeof t;return t&&("function"==e||"object"==e)||!1}function i(t){var e=[];if(!n(t))return e;G.nonEnumArgs&&t.length&&u(t)&&(t=U.call(t));var i=G.enumPrototypes&&"function"==typeof t,r=G.enumErrorProps&&(t===H||t instanceof Error);for(var s in t)i&&"prototype"==s||r&&("message"==s||"name"==s)||e.push(s);if(G.nonEnumShadows&&t!==L){var o=t.constructor,c=-1,h=K.length;if(t===(o&&o.prototype))var a=t===stringProto?M:t===H?N:F.call(t),l=Q[a];for(;h>++c;)s=K[c],l&&l[s]||!z.call(t,s)||e.push(s)}return e}function r(t,e,n){for(var i=-1,r=n(t),s=r.length;s>++i;){var o=r[i];if(e(t[o],o,t)===!1)break}return t}function s(t,e){return r(t,e,i)}function o(t){return"function"!=typeof t.toString&&"string"==typeof(t+"")}function u(t){return t&&"object"==typeof t?F.call(t)==j:!1}function c(t){return"function"==typeof t||!1}function h(e,n,i,r){if(e===n)return 0!==e||1/e==1/n;var a=typeof e,l=typeof n;if(e===e&&(null==e||null==n||"function"!=a&&"object"!=a&&"function"!=l&&"object"!=l))return!1;var p=F.call(e),f=F.call(n);if(p==j&&(p=T),f==j&&(f=T),p!=f)return!1;switch(p){case W:case P:return+e==+n;case k:return e!=+e?n!=+n:0==e?1/e==1/n:e==+n;case I:case M:return e==n+""}var d=p==C;if(!d){if(p!=T||!G.nodeClass&&(o(e)||o(n)))return!1;var v=!G.argsObject&&u(e)?Object:e.constructor,b=!G.argsObject&&u(n)?Object:n.constructor;if(!(v==b||z.call(e,"constructor")&&z.call(n,"constructor")||c(v)&&v instanceof v&&c(b)&&b instanceof b||!("constructor"in e&&"constructor"in n)))return!1}i||(i=[]),r||(r=[]);for(var y=i.length;y--;)if(i[y]==e)return r[y]==n;var m=0;if(result=!0,i.push(e),r.push(n),d){if(y=e.length,m=n.length,result=m==y)for(;m--;){var g=n[m];if(!(result=h(e[m],g,i,r)))break}}else s(n,function(n,s,o){return z.call(o,s)?(m++,result=z.call(e,s)&&h(e[s],n,i,r)):t}),result&&s(e,function(e,n,i){return z.call(i,n)?result=--m>-1:t});return i.pop(),r.pop(),result}function a(t,e){return 1===t.length&&Array.isArray(t[e])?t[e]:U.call(t)}function l(t,e){this.scheduler=t,this.disposable=e,this.isDisposed=!1}var p={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},f=p[typeof window]&&window||this,d=p[typeof exports]&&exports&&!exports.nodeType&&exports,v=p[typeof module]&&module&&!module.nodeType&&module,b=v&&v.exports===d&&d,y=p[typeof global]&&global;!y||y.global!==y&&y.window!==y||(f=y);var m={internals:{},config:{Promise:f.Promise},helpers:{}},g=m.helpers.noop=function(){},w=m.helpers.identity=function(t){return t},S=(m.helpers.pluck=function(t){return function(e){return e[t]}},m.helpers.just=function(t){return function(){return t}},m.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),_=(m.helpers.defaultComparer=function(t,e){return J(t,e)},m.helpers.defaultSubComparer=function(t,e){return t>e?1:e>t?-1:0}),D=(m.helpers.defaultKeySerializer=function(t){return""+t},m.helpers.defaultError=function(t){throw t}),x=m.helpers.isPromise=function(t){return!!t&&"function"==typeof t.then&&t.then!==m.Observable.prototype.then};m.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},m.helpers.not=function(t){return!t};var A="Object has been disposed",E="object"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";f.Set&&"function"==typeof(new f.Set)["@@iterator"]&&(E="@@iterator");var O,R={done:!0,value:t},j="[object Arguments]",C="[object Array]",W="[object Boolean]",P="[object Date]",N="[object Error]",q="[object Function]",k="[object Number]",T="[object Object]",I="[object RegExp]",M="[object String]",F=Object.prototype.toString,z=Object.prototype.hasOwnProperty,V=F.call(arguments)==j,H=Error.prototype,L=Object.prototype,$=L.propertyIsEnumerable;try{O=!(F.call(document)==T&&!({toString:0}+""))}catch(B){O=!0}var K=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Q={};Q[C]=Q[P]=Q[k]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Q[W]=Q[M]={constructor:!0,toString:!0,valueOf:!0},Q[N]=Q[q]=Q[I]={constructor:!0,toString:!0},Q[T]={constructor:!0};var G={};(function(){var t=function(){this.x=1},e=[];t.prototype={valueOf:1,y:1};for(var n in new t)e.push(n);for(n in arguments);G.enumErrorProps=$.call(H,"message")||$.call(H,"name"),G.enumPrototypes=$.call(t,"prototype"),G.nonEnumArgs=0!=n,G.nonEnumShadows=!/valueOf/.test(e)})(1),V||(u=function(t){return t&&"object"==typeof t?z.call(t,"callee"):!1}),c(/x/)&&(c=function(t){return"function"==typeof t&&F.call(t)==q});var J=m.internals.isEqual=function(t,e){return h(t,e,[],[])},U=Array.prototype.slice;({}).hasOwnProperty;var X=this.inherits=m.internals.inherits=function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n},Y=m.internals.addProperties=function(t){for(var e=U.call(arguments,1),n=0,i=e.length;i>n;n++){var r=e[n];for(var s in r)t[s]=r[s]}};m.internals.addRef=function(t,e){return new ke(function(n){return new re(e.getDisposable(),t.subscribe(n))})},Function.prototype.bind||(Function.prototype.bind=function(t){var e=this,n=U.call(arguments,1),i=function(){function r(){}if(this instanceof i){r.prototype=e.prototype;var s=new r,o=e.apply(s,n.concat(U.call(arguments)));return Object(o)===o?o:s}return e.apply(t,n.concat(U.call(arguments)))};return i});var Z=Object("a"),te="a"!=Z[0]||!(0 in Z);Array.prototype.every||(Array.prototype.every=function(t){var e=Object(this),n=te&&{}.toString.call(this)==M?this.split(""):e,i=n.length>>>0,r=arguments[1];if({}.toString.call(t)!=q)throw new TypeError(t+" is not a function");for(var s=0;i>s;s++)if(s in n&&!t.call(r,n[s],s,e))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(t){var e=Object(this),n=te&&{}.toString.call(this)==M?this.split(""):e,i=n.length>>>0,r=Array(i),s=arguments[1];if({}.toString.call(t)!=q)throw new TypeError(t+" is not a function");for(var o=0;i>o;o++)o in n&&(r[o]=t.call(s,n[o],o,e));return r}),Array.prototype.filter||(Array.prototype.filter=function(t){for(var e,n=[],i=Object(this),r=0,s=i.length>>>0;s>r;r++)e=i[r],r in i&&t.call(arguments[1],e,r,i)&&n.push(e);return n}),Array.isArray||(Array.isArray=function(t){return Object.prototype.toString.call(t)==C}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var e=Object(this),n=e.length>>>0;if(0===n)return-1;var i=0;if(arguments.length>1&&(i=Number(arguments[1]),i!==i?i=0:0!==i&&1/0!=i&&i!==-1/0&&(i=(i>0||-1)*Math.floor(Math.abs(i)))),i>=n)return-1;for(var r=i>=0?i:Math.max(n-Math.abs(i),0);n>r;r++)if(r in e&&e[r]===t)return r;return-1});var ee=function(t,e){this.id=t,this.value=e};ee.prototype.compareTo=function(t){var e=this.value.compareTo(t.value);return 0===e&&(e=this.id-t.id),e};var ne=m.internals.PriorityQueue=function(t){this.items=Array(t),this.length=0},ie=ne.prototype;ie.isHigherPriority=function(t,e){return 0>this.items[t].compareTo(this.items[e])},ie.percolate=function(t){if(!(t>=this.length||0>t)){var e=t-1>>1;if(!(0>e||e===t)&&this.isHigherPriority(t,e)){var n=this.items[t];this.items[t]=this.items[e],this.items[e]=n,this.percolate(e)}}},ie.heapify=function(e){if(e===t&&(e=0),!(e>=this.length||0>e)){var n=2*e+1,i=2*e+2,r=e;if(this.length>n&&this.isHigherPriority(n,r)&&(r=n),this.length>i&&this.isHigherPriority(i,r)&&(r=i),r!==e){var s=this.items[e];this.items[e]=this.items[r],this.items[r]=s,this.heapify(r)}}},ie.peek=function(){return this.items[0].value},ie.removeAt=function(t){this.items[t]=this.items[--this.length],delete this.items[this.length],this.heapify()},ie.dequeue=function(){var t=this.peek();return this.removeAt(0),t},ie.enqueue=function(t){var e=this.length++;this.items[e]=new ee(ne.count++,t),this.percolate(e)},ie.remove=function(t){for(var e=0;this.length>e;e++)if(this.items[e].value===t)return this.removeAt(e),!0;return!1},ne.count=0;var re=m.CompositeDisposable=function(){this.disposables=a(arguments,0),this.isDisposed=!1,this.length=this.disposables.length},se=re.prototype;se.add=function(t){this.isDisposed?t.dispose():(this.disposables.push(t),this.length++)},se.remove=function(t){var e=!1;if(!this.isDisposed){var n=this.disposables.indexOf(t);-1!==n&&(e=!0,this.disposables.splice(n,1),this.length--,t.dispose())}return e},se.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this.disposables.slice(0);this.disposables=[],this.length=0;for(var e=0,n=t.length;n>e;e++)t[e].dispose()}},se.clear=function(){var t=this.disposables.slice(0);this.disposables=[],this.length=0;for(var e=0,n=t.length;n>e;e++)t[e].dispose()},se.contains=function(t){return-1!==this.disposables.indexOf(t)},se.toArray=function(){return this.disposables.slice(0)};var oe=m.Disposable=function(t){this.isDisposed=!1,this.action=t||g};oe.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var ue=oe.create=function(t){return new oe(t)},ce=oe.empty={dispose:g},he=function(){function t(t){this.isSingle=t,this.isDisposed=!1,this.current=null}var e=t.prototype;return e.getDisposable=function(){return this.current},e.setDisposable=function(t){if(this.current&&this.isSingle)throw Error("Disposable has already been assigned");var e,n=this.isDisposed;n||(e=this.current,this.current=t),e&&e.dispose(),n&&t&&t.dispose()},e.dispose=function(){var t;this.isDisposed||(this.isDisposed=!0,t=this.current,this.current=null),t&&t.dispose()},t}(),ae=m.SingleAssignmentDisposable=function(t){function e(){t.call(this,!0)}return X(e,t),e}(he),le=m.SerialDisposable=function(t){function e(){t.call(this,!1)}return X(e,t),e}(he);m.RefCountDisposable=function(){function t(t){this.disposable=t,this.disposable.count++,this.isInnerDisposed=!1}function e(t){this.underlyingDisposable=t,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return t.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()))},e.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},e.prototype.getDisposable=function(){return this.isDisposed?ce:new t(this)},e}(),l.prototype.dispose=function(){var t=this;this.scheduler.schedule(function(){t.isDisposed||(t.isDisposed=!0,t.disposable.dispose())})};var pe=m.internals.ScheduledItem=function(t,e,n,i,r){this.scheduler=t,this.state=e,this.action=n,this.dueTime=i,this.comparer=r||_,this.disposable=new ae};pe.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},pe.prototype.compareTo=function(t){return this.comparer(this.dueTime,t.dueTime)},pe.prototype.isCancelled=function(){return this.disposable.isDisposed},pe.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var fe=m.Scheduler=function(){function t(t,e,n,i){this.now=t,this._schedule=e,this._scheduleRelative=n,this._scheduleAbsolute=i}function e(t,e){var n=e.first,i=e.second,r=new re,s=function(e){i(e,function(e){var n=!1,i=!1,o=t.scheduleWithState(e,function(t,e){return n?r.remove(o):i=!0,s(e),ce});i||(r.add(o),n=!0)})};return s(n),r}function n(t,e,n){var i=e.first,r=e.second,s=new re,o=function(e){r(e,function(e,i){var r=!1,u=!1,c=t[n].call(t,e,i,function(t,e){return r?s.remove(c):u=!0,o(e),ce});u||(s.add(c),r=!0)})};return o(i),s}function i(t,e){return e(),ce}var r=t.prototype;return r.catchException=r["catch"]=function(t){return new ge(this,t)},r.schedulePeriodic=function(t,e){return this.schedulePeriodicWithState(null,t,function(){e()})},r.schedulePeriodicWithState=function(t,e,n){var i=t,r=setInterval(function(){i=n(i)},e);return ue(function(){clearInterval(r)})},r.schedule=function(t){return this._schedule(t,i)},r.scheduleWithState=function(t,e){return this._schedule(t,e)},r.scheduleWithRelative=function(t,e){return this._scheduleRelative(e,t,i)},r.scheduleWithRelativeAndState=function(t,e,n){return this._scheduleRelative(t,e,n)},r.scheduleWithAbsolute=function(t,e){return this._scheduleAbsolute(e,t,i)},r.scheduleWithAbsoluteAndState=function(t,e,n){return this._scheduleAbsolute(t,e,n)},r.scheduleRecursive=function(t){return this.scheduleRecursiveWithState(t,function(t,e){t(function(){e(t)})})},r.scheduleRecursiveWithState=function(t,n){return this.scheduleWithState({first:t,second:n},function(t,n){return e(t,n)})},r.scheduleRecursiveWithRelative=function(t,e){return this.scheduleRecursiveWithRelativeAndState(e,t,function(t,e){t(function(n){e(t,n)})})},r.scheduleRecursiveWithRelativeAndState=function(t,e,i){return this._scheduleRelative({first:t,second:i},e,function(t,e){return n(t,e,"scheduleWithRelativeAndState")})},r.scheduleRecursiveWithAbsolute=function(t,e){return this.scheduleRecursiveWithAbsoluteAndState(e,t,function(t,e){t(function(n){e(t,n)})})},r.scheduleRecursiveWithAbsoluteAndState=function(t,e,i){return this._scheduleAbsolute({first:t,second:i},e,function(t,e){return n(t,e,"scheduleWithAbsoluteAndState")})},t.now=S,t.normalize=function(t){return 0>t&&(t=0),t},t}(),de=fe.normalize;m.internals.SchedulePeriodicRecursive=function(){function t(t,e){e(0,this._period);try{this._state=this._action(this._state)}catch(n){throw this._cancel.dispose(),n}}function e(t,e,n,i){this._scheduler=t,this._state=e,this._period=n,this._action=i}return e.prototype.start=function(){var e=new ae;return this._cancel=e,e.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,t.bind(this))),e},e}();var ve,be=fe.immediate=function(){function t(t,e){return e(this,t)}function e(t,e,n){for(var i=de(i);i-this.now()>0;);return n(this,t)}function n(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new fe(S,t,e,n)}(),ye=fe.currentThread=function(){function t(t){for(var e;t.length>0;)if(e=t.dequeue(),!e.isCancelled()){for(;e.dueTime-fe.now()>0;);e.isCancelled()||e.invoke()}}function e(t,e){return this.scheduleWithRelativeAndState(t,0,e)}function n(e,n,i){var s=this.now()+fe.normalize(n),o=new pe(this,e,i,s);if(r)r.enqueue(o);else{r=new ne(4),r.enqueue(o);try{t(r)}catch(u){throw u}finally{r=null}}return o.disposable}function i(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}var r,s=new fe(S,e,n,i);return s.scheduleRequired=function(){return null===r},s.ensureTrampoline=function(t){return null===r?this.schedule(t):t()},s}(),me=g;(function(){function t(){if(!f.postMessage||f.importScripts)return!1;var t=!1,e=f.onmessage;return f.onmessage=function(){t=!0},f.postMessage("","*"),f.onmessage=e,t}function e(t){if("string"==typeof t.data&&t.data.substring(0,s.length)===s){var e=t.data.substring(s.length),n=o[e];n(),delete o[e]}}var n=RegExp("^"+(F+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),i="function"==typeof(i=y&&b&&y.setImmediate)&&!n.test(i)&&i,r="function"==typeof(r=y&&b&&y.clearImmediate)&&!n.test(r)&&r;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))ve=process.nextTick;else if("function"==typeof i)ve=i,me=r;else if(t()){var s="ms.rx.schedule"+Math.random(),o={},u=0;f.addEventListener?f.addEventListener("message",e,!1):f.attachEvent("onmessage",e,!1),ve=function(t){var e=u++;o[e]=t,f.postMessage(s+e,"*")}}else if(f.MessageChannel){var c=new f.MessageChannel,h={},a=0;c.port1.onmessage=function(t){var e=t.data,n=h[e];n(),delete h[e]},ve=function(t){var e=a++;h[e]=t,c.port2.postMessage(e)}}else"document"in f&&"onreadystatechange"in f.document.createElement("script")?ve=function(t){var e=f.document.createElement("script");e.onreadystatechange=function(){t(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},f.document.documentElement.appendChild(e)}:(ve=function(t){return setTimeout(t,0)},me=clearTimeout)})(),fe.timeout=function(){function t(t,e){var n=this,i=new ae,r=ve(function(){i.isDisposed||i.setDisposable(e(n,t))});return new re(i,ue(function(){me(r)}))}function e(t,e,n){var i=this,r=fe.normalize(e);if(0===r)return i.scheduleWithState(t,n);var s=new ae,o=setTimeout(function(){s.isDisposed||s.setDisposable(n(i,t))},r);return new re(s,ue(function(){clearTimeout(o)}))}function n(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new fe(S,t,e,n)}();var ge=function(t){function e(){return this._scheduler.now()}function n(t,e){return this._scheduler.scheduleWithState(t,this._wrap(e))}function i(t,e,n){return this._scheduler.scheduleWithRelativeAndState(t,e,this._wrap(n))}function r(t,e,n){return this._scheduler.scheduleWithAbsoluteAndState(t,e,this._wrap(n))}function s(s,o){this._scheduler=s,this._handler=o,this._recursiveOriginal=null,this._recursiveWrapper=null,t.call(this,e,n,i,r)}return X(s,t),s.prototype._clone=function(t){return new s(t,this._handler)},s.prototype._wrap=function(t){var e=this;return function(n,i){try{return t(e._getRecursiveWrapper(n),i)}catch(r){if(!e._handler(r))throw r;return ce}}},s.prototype._getRecursiveWrapper=function(t){if(this._recursiveOriginal!==t){this._recursiveOriginal=t;var e=this._clone(t);e._recursiveOriginal=t,e._recursiveWrapper=e,this._recursiveWrapper=e}return this._recursiveWrapper},s.prototype.schedulePeriodicWithState=function(t,e,n){var i=this,r=!1,s=new ae;return s.setDisposable(this._scheduler.schedulePeriodicWithState(t,e,function(t){if(r)return null;try{return n(t)}catch(e){if(r=!0,!i._handler(e))throw e;return s.dispose(),null}})),s},s}(fe),we=m.Notification=function(){function t(t,e){this.hasValue=null==e?!1:e,this.kind=t}var e=t.prototype;return e.accept=function(t,e,n){return 1===arguments.length&&"object"==typeof t?this._acceptObservable(t):this._accept(t,e,n)},e.toObservable=function(t){var e=this;return t||(t=be),new ke(function(n){return t.schedule(function(){e._acceptObservable(n),"N"===e.kind&&n.onCompleted()})})},t}(),Se=we.createOnNext=function(){function t(t){return t(this.value)}function e(t){return t.onNext(this.value)}function n(){return"OnNext("+this.value+")"}return function(i){var r=new we("N",!0);return r.value=i,r._accept=t,r._acceptObservable=e,r.toString=n,r}}(),_e=we.createOnError=function(){function t(t,e){return e(this.exception)}function e(t){return t.onError(this.exception)}function n(){return"OnError("+this.exception+")"}return function(i){var r=new we("E");return r.exception=i,r._accept=t,r._acceptObservable=e,r.toString=n,r}}(),De=we.createOnCompleted=function(){function t(t,e,n){return n()}function e(t){return t.onCompleted()}function n(){return"OnCompleted()"}return function(){var i=new we("C");return i._accept=t,i._acceptObservable=e,i.toString=n,i}}(),xe=m.internals.Enumerator=function(t){this._next=t};xe.prototype.next=function(){return this._next()},xe.prototype[E]=function(){return this};var Ae=m.internals.Enumerable=function(t){this._iterator=t};Ae.prototype[E]=function(){return this._iterator()},Ae.prototype.concat=function(){var e=this;return new ke(function(n){var i;try{i=e[E]()}catch(r){return n.onError(),t}var s,o=new le,u=be.scheduleRecursive(function(e){var r;if(!s){try{r=i.next()}catch(u){return n.onError(u),t}if(r.done)return n.onCompleted(),t;var c=r.value;x(c)&&(c=observableFromPromise(c));var h=new ae;o.setDisposable(h),h.setDisposable(c.subscribe(n.onNext.bind(n),n.onError.bind(n),function(){e()}))}});return new re(o,u,ue(function(){s=!0}))})},Ae.prototype.catchException=function(){var e=this;return new ke(function(n){var i;try{i=e[E]()}catch(r){return n.onError(),t}var s,o,u=new le,c=be.scheduleRecursive(function(e){if(!s){var r;try{r=i.next()}catch(c){return n.onError(c),t}if(r.done)return o?n.onError(o):n.onCompleted(),t;var h=r.value;x(h)&&(h=observableFromPromise(h));var a=new ae;u.setDisposable(a),a.setDisposable(h.subscribe(n.onNext.bind(n),function(t){o=t,e()},n.onCompleted.bind(n)))}});return new re(u,c,ue(function(){s=!0}))})},Ae.repeat=function(t,e){return null==e&&(e=-1),new Ae(function(){var n=e;return new xe(function(){return 0===n?R:(n>0&&n--,{done:!1,value:t})})})},Ae.forEach=function(t,e,n){return e||(e=w),new Ae(function(){var i=-1;return new xe(function(){return++i<t.length?{done:!1,value:e.call(n,t[i],i,t)}:R})})};var Ee=m.Observer=function(){};Ee.prototype.toNotifier=function(){var t=this;return function(e){return e.accept(t)}},Ee.prototype.asObserver=function(){return new Ce(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},Ee.prototype.checked=function(){return new We(this)};var Oe=Ee.create=function(t,e,n){return t||(t=g),e||(e=D),n||(n=g),new Ce(t,e,n)};Ee.fromNotifier=function(t){return new Ce(function(e){return t(Se(e))},function(e){return t(_e(e))},function(){return t(De())})},Ee.notifyOn=function(t){return new Ne(t,this)};var Re,je=m.internals.AbstractObserver=function(t){function e(){this.isStopped=!1,t.call(this)}return X(e,t),e.prototype.onNext=function(t){this.isStopped||this.next(t)},e.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.error(t))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.error(t),!0)},e}(Ee),Ce=m.AnonymousObserver=function(t){function e(e,n,i){t.call(this),this._onNext=e,this._onError=n,this._onCompleted=i}return X(e,t),e.prototype.next=function(t){this._onNext(t)},e.prototype.error=function(t){this._onError(t)},e.prototype.completed=function(){this._onCompleted()},e}(je),We=function(t){function e(e){t.call(this),this._observer=e,this._state=0}X(e,t);var n=e.prototype;return n.onNext=function(t){this.checkAccess();try{this._observer.onNext(t)}catch(e){throw e}finally{this._state=0}},n.onError=function(t){this.checkAccess();try{this._observer.onError(t)}catch(e){throw e}finally{this._state=2}},n.onCompleted=function(){this.checkAccess();try{this._observer.onCompleted()}catch(t){throw t}finally{this._state=2}},n.checkAccess=function(){if(1===this._state)throw Error("Re-entrancy detected");if(2===this._state)throw Error("Observer completed");0===this._state&&(this._state=1)},e}(Ee),Pe=m.internals.ScheduledObserver=function(e){function n(t,n){e.call(this),this.scheduler=t,this.observer=n,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new le}return X(n,e),n.prototype.next=function(t){var e=this;this.queue.push(function(){e.observer.onNext(t)})},n.prototype.error=function(t){var e=this;this.queue.push(function(){e.observer.onError(t)})},n.prototype.completed=function(){var t=this;this.queue.push(function(){t.observer.onCompleted()})},n.prototype.ensureActive=function(){var e=!1,n=this;!this.hasFaulted&&this.queue.length>0&&(e=!this.isAcquired,this.isAcquired=!0),e&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(e){var i;if(!(n.queue.length>0))return n.isAcquired=!1,t;i=n.queue.shift();try{i()}catch(r){throw n.queue=[],n.hasFaulted=!0,r}e()}))},n.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposable.dispose()},n}(je),Ne=function(t){function e(){t.apply(this,arguments)}return X(e,t),e.prototype.next=function(e){t.prototype.next.call(this,e),this.ensureActive()},e.prototype.error=function(e){t.prototype.error.call(this,e),this.ensureActive()},e.prototype.completed=function(){t.prototype.completed.call(this),this.ensureActive()},e}(Pe),qe=m.Observable=function(){function t(t){this._subscribe=t}return Re=t.prototype,Re.subscribe=Re.forEach=function(t,e,n){var i="object"==typeof t?t:Oe(t,e,n);return this._subscribe(i)},t}(),ke=m.AnonymousObservable=function(e){function n(e){return e===t?e=ce:"function"==typeof e&&(e=ue(e)),e}function i(r){function s(t){var e=new Te(t);if(ye.scheduleRequired())ye.schedule(function(){try{e.setDisposable(n(r(e)))}catch(t){if(!e.fail(t))throw t}});else try{e.setDisposable(n(r(e)))}catch(i){if(!e.fail(i))throw i}return e}return this instanceof i?(e.call(this,s),t):new i(r)}return X(i,e),i}(qe),Te=function(t){function e(e){t.call(this),this.observer=e,this.m=new ae}X(e,t);var n=e.prototype;return n.next=function(t){var e=!1;try{this.observer.onNext(t),e=!0}catch(n){throw n}finally{e||this.dispose()}},n.error=function(t){try{this.observer.onError(t)}catch(e){throw e}finally{this.dispose()}},n.completed=function(){try{this.observer.onCompleted()}catch(t){throw t}finally{this.dispose()}},n.setDisposable=function(t){this.m.setDisposable(t)},n.getDisposable=function(){return this.m.getDisposable()},n.disposable=function(t){return arguments.length?this.getDisposable():setDisposable(t)},n.dispose=function(){t.prototype.dispose.call(this),this.m.dispose()},e}(je);(function(t){function e(t){return this.underlyingObservable.subscribe(t)}function n(n,i,r){t.call(this,e),this.key=n,this.underlyingObservable=r?new ke(function(t){return new re(r.getDisposable(),i.subscribe(t))}):i}return X(n,t),n})(qe);var Ie=function(t,e){this.subject=t,this.observer=e};Ie.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var t=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(t,1),this.observer=null}},m.Subject=function(t){function n(t){return e.call(this),this.isStopped?this.exception?(t.onError(this.exception),ce):(t.onCompleted(),ce):(this.observers.push(t),new Ie(this,t))}function i(){t.call(this,n),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return X(i,t),Y(i.prototype,Ee,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(e.call(this),!this.isStopped){var t=this.observers.slice(0);this.isStopped=!0;for(var n=0,i=t.length;i>n;n++)t[n].onCompleted();this.observers=[]}},onError:function(t){if(e.call(this),!this.isStopped){var n=this.observers.slice(0);this.isStopped=!0,this.exception=t;for(var i=0,r=n.length;r>i;i++)n[i].onError(t);this.observers=[]}},onNext:function(t){if(e.call(this),!this.isStopped)for(var n=this.observers.slice(0),i=0,r=n.length;r>i;i++)n[i].onNext(t)},dispose:function(){this.isDisposed=!0,this.observers=null}}),i.create=function(t,e){return new Me(t,e)},i}(qe),m.AsyncSubject=function(t){function n(t){if(e.call(this),!this.isStopped)return this.observers.push(t),new Ie(this,t);var n=this.exception,i=this.hasValue,r=this.value;return n?t.onError(n):i?(t.onNext(r),t.onCompleted()):t.onCompleted(),ce}function i(){t.call(this,n),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return X(i,t),Y(i.prototype,Ee,{hasObservers:function(){return e.call(this),this.observers.length>0},onCompleted:function(){var t,n,i;if(e.call(this),!this.isStopped){this.isStopped=!0;var r=this.observers.slice(0),s=this.value,o=this.hasValue;if(o)for(n=0,i=r.length;i>n;n++)t=r[n],t.onNext(s),t.onCompleted();else for(n=0,i=r.length;i>n;n++)r[n].onCompleted();this.observers=[]}},onError:function(t){if(e.call(this),!this.isStopped){var n=this.observers.slice(0);this.isStopped=!0,this.exception=t;for(var i=0,r=n.length;r>i;i++)n[i].onError(t);this.observers=[]}},onNext:function(t){e.call(this),this.isStopped||(this.value=t,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),i}(qe);var Me=function(t){function e(t){return this.observable.subscribe(t)}function n(n,i){t.call(this,e),this.observer=n,this.observable=i}return X(n,t),Y(n.prototype,Ee,{onCompleted:function(){this.observer.onCompleted()},onError:function(t){this.observer.onError(t)},onNext:function(t){this.observer.onNext(t)}}),n}(qe);"function"==typeof define&&"object"==typeof define.amd&&define.amd?(f.Rx=m,define(function(){return m})):d&&v?b?(v.exports=m).Rx=m:d.Rx=m:f.Rx=m}).call(this);
@@ -32,6 +32,8 @@
32
32
  // Defaults
33
33
  var noop = Rx.helpers.noop = function () { },
34
34
  identity = Rx.helpers.identity = function (x) { return x; },
35
+ pluck = Rx.helpers.pluck = function (property) { return function (x) { return x[property]; }; },
36
+ just = Rx.helpers.just = function (value) { return function () { return value; }; },
35
37
  defaultNow = Rx.helpers.defaultNow = Date.now,
36
38
  defaultComparer = Rx.helpers.defaultComparer = function (x, y) { return isEqual(x, y); },
37
39
  defaultSubComparer = Rx.helpers.defaultSubComparer = function (x, y) { return x > y ? 1 : (x < y ? -1 : 0); },