rxjs-compat.umd.min.js 130 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. /*
  2. *****************************************************************************
  3. Copyright (c) Microsoft Corporation. All rights reserved.
  4. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  5. this file except in compliance with the License. You may obtain a copy of the
  6. License at http://www.apache.org/licenses/LICENSE-2.0
  7. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  8. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  9. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  10. MERCHANTABLITY OR NON-INFRINGEMENT.
  11. See the Apache Version 2.0 License for specific language governing permissions
  12. and limitations under the License.
  13. *****************************************************************************/
  14. (function(m,h){"object"===typeof exports&&"undefined"!==typeof module?h(exports):"function"===typeof define&&define.amd?define("rxjs",["exports"],h):h(m.rxjs={})})(this,function(m){function h(b,a){function c(){this.constructor=b}sd(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}function P(b){return"function"===typeof b}function Q(b){setTimeout(function(){throw b;},0)}function wa(b){return null!==b&&"object"===typeof b}function Sa(b){return b.reduce(function(a,c){return a.concat(c instanceof
  15. ca?c.errors:c)},[])}function xa(b){for(;b;){var a=b.destination,c=b.isStopped;if(b.closed||c)return!1;b=a&&a instanceof l?a:null}return!0}function D(){}function ya(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return Ta(b)}function Ta(b){return b?1===b.length?b[0]:function(a){return b.reduce(function(c,a){return a(c)},a)}:D}function Ua(b){b||(b=C.Promise||Promise);if(!b)throw Error("no Promise impl found");return b}function za(){return function(b){return b.lift(new td(b))}}function Va(b,
  16. a,c,d){return function(e){return e.lift(new ud(b,a,c,d))}}function R(b){return b?vd(b):da}function vd(b){return new g(function(a){return b.schedule(function(){return a.complete()})})}function w(b){return b&&"function"===typeof b.schedule}function Aa(b,a){return new g(function(c){var d=new r,e=0;d.add(a.schedule(function(){e===b.length?c.complete():(c.next(b[e++]),c.closed||d.add(this.schedule()))}));return d})}function ea(b,a){return a?Aa(b,a):new g(Wa(b))}function fa(){for(var b=[],a=0;a<arguments.length;a++)b[a]=
  17. arguments[a];a=b[b.length-1];return w(a)?(b.pop(),Aa(b,a)):ea(b)}function ma(b,a){return a?new g(function(c){return a.schedule(wd,0,{error:b,subscriber:c})}):new g(function(c){return c.error(b)})}function wd(b){b.subscriber.error(b.error)}function Xa(b,a){void 0===a&&(a=0);return function(c){return c.lift(new xd(b,a))}}function Ya(b){return b in Ba?(delete Ba[b],!0):!1}function S(b){return b}function A(b,a){return function(c){if("function"!==typeof b)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");
  18. return c.lift(new yd(b,a))}}function Za(b,a,c){if(a)if(w(a))c=a;else return function(){for(var d=[],e=0;e<arguments.length;e++)d[e]=arguments[e];return Za(b,c).apply(void 0,d).pipe(A(function(c){return x(c)?a.apply(void 0,c):a(c)}))};return function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var f=this,k,y={context:f,subject:k,callbackFunc:b,scheduler:c};return new g(function(d){if(c)return c.schedule(zd,0,{args:a,subscriber:d,params:y});if(!k){k=new T;try{b.apply(f,a.concat([function(){for(var c=
  19. [],a=0;a<arguments.length;a++)c[a]=arguments[a];k.next(1>=c.length?c[0]:c);k.complete()}]))}catch(L){xa(k)?k.error(L):console.warn(L)}}return k.subscribe(d)})}}function zd(b){var a=this,c=b.args,d=b.subscriber;b=b.params;var e=b.callbackFunc,f=b.context,k=b.scheduler,g=b.subject;if(!g){g=b.subject=new T;try{e.apply(f,c.concat([function(){for(var c=[],b=0;b<arguments.length;b++)c[b]=arguments[b];a.add(k.schedule(Ad,0,{value:1>=c.length?c[0]:c,subject:g}))}]))}catch(z){g.error(z)}}this.add(g.subscribe(d))}
  20. function Ad(b){var a=b.subject;a.next(b.value);a.complete()}function $a(b,a,c){if(a)if(w(a))c=a;else return function(){for(var d=[],e=0;e<arguments.length;e++)d[e]=arguments[e];return $a(b,c).apply(void 0,d).pipe(A(function(c){return x(c)?a.apply(void 0,c):a(c)}))};return function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var f={subject:void 0,args:a,callbackFunc:b,scheduler:c,context:this};return new g(function(d){var e=f.context,k=f.subject;if(c)return c.schedule(Bd,0,{params:f,
  21. subscriber:d,context:e});if(!k){k=f.subject=new T;try{b.apply(e,a.concat([function(){for(var c=[],a=0;a<arguments.length;a++)c[a]=arguments[a];(a=c.shift())?k.error(a):(k.next(1>=c.length?c[0]:c),k.complete())}]))}catch(L){xa(k)?k.error(L):console.warn(L)}}return k.subscribe(d)})}}function Bd(b){var a=this,c=b.params,d=b.subscriber;b=b.context;var e=c.callbackFunc,f=c.args,k=c.scheduler,g=c.subject;if(!g){g=c.subject=new T;try{e.apply(b,f.concat([function(){for(var c=[],b=0;b<arguments.length;b++)c[b]=
  22. arguments[b];(b=c.shift())?a.add(k.schedule(ab,0,{err:b,subject:g})):a.add(k.schedule(Cd,0,{value:1>=c.length?c[0]:c,subject:g}))}]))}catch(z){this.add(k.schedule(ab,0,{err:z,subject:g}))}}this.add(g.subscribe(d))}function Cd(b){var a=b.subject;a.next(b.value);a.complete()}function ab(b){b.subject.error(b.err)}function bb(b){return!!b&&"function"!==typeof b.subscribe&&"function"===typeof b.then}function n(b,a,c,d,e){void 0===e&&(e=new G(b,c,d));if(!e.closed)return a instanceof g?a.subscribe(e):cb(a)(e)}
  23. function Dd(b,a){return new g(function(c){var d=new r;d.add(a.schedule(function(){var e=b[U]();d.add(e.subscribe({next:function(b){d.add(a.schedule(function(){return c.next(b)}))},error:function(b){d.add(a.schedule(function(){return c.error(b)}))},complete:function(){d.add(a.schedule(function(){return c.complete()}))}}))}));return d})}function Ed(b,a){return new g(function(c){var d=new r;d.add(a.schedule(function(){return b.then(function(b){d.add(a.schedule(function(){c.next(b);d.add(a.schedule(function(){return c.complete()}))}))},
  24. function(b){d.add(a.schedule(function(){return c.error(b)}))})}));return d})}function Fd(b,a){if(!b)throw Error("Iterable cannot be null");return new g(function(c){var d=new r,e;d.add(function(){e&&"function"===typeof e.return&&e.return()});d.add(a.schedule(function(){e=b[E]();d.add(a.schedule(function(){if(!c.closed){var a,b;try{var d=e.next();a=d.value;b=d.done}catch(z){c.error(z);return}b?c.complete():(c.next(a),this.schedule())}}))}));return d})}function Gd(b,a){if(null!=b){if(b&&"function"===
  25. typeof b[U])return Dd(b,a);if(bb(b))return Ed(b,a);if(db(b))return Aa(b,a);if(b&&"function"===typeof b[E]||"string"===typeof b)return Fd(b,a)}throw new TypeError((null!==b&&typeof b||b)+" is not observable");}function F(b,a){return a?Gd(b,a):b instanceof g?b:new g(cb(b))}function H(b,a,c){void 0===c&&(c=Number.POSITIVE_INFINITY);if("function"===typeof a)return function(d){return d.pipe(H(function(c,d){return F(b(c,d)).pipe(A(function(b,e){return a(c,b,d,e)}))},c))};"number"===typeof a&&(c=a);return function(a){return a.lift(new Hd(b,
  26. c))}}function na(b){void 0===b&&(b=Number.POSITIVE_INFINITY);return H(S,b)}function Ca(){return na(1)}function V(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return Ca()(fa.apply(void 0,b))}function Da(b){return new g(function(a){var c;try{c=b()}catch(d){a.error(d);return}return(c?F(c):R()).subscribe(a)})}function oa(b,a){return new g(function(c){var d=b.length;if(0===d)c.complete();else for(var e=Array(d),f=0,k=0,g=function(g){var y=F(b[g]),h=!1;c.add(y.subscribe({next:function(c){h||
  27. (h=!0,k++);e[g]=c},error:function(a){return c.error(a)},complete:function(){f++;f!==d&&h||(k===d&&c.next(a?a.reduce(function(c,a,b){return c[a]=e[b],c},{}):e),c.complete())}}))},h=0;h<d;h++)g(h)})}function eb(b,a,c,d){P(c)&&(d=c,c=void 0);return d?eb(b,a,c).pipe(A(function(c){return x(c)?d.apply(void 0,c):d(c)})):new g(function(d){fb(b,a,function(c){1<arguments.length?d.next(Array.prototype.slice.call(arguments)):d.next(c)},d,c)})}function fb(b,a,c,d,e){var f;if(b&&"function"===typeof b.addEventListener&&
  28. "function"===typeof b.removeEventListener)b.addEventListener(a,c,e),f=function(){return b.removeEventListener(a,c,e)};else if(b&&"function"===typeof b.on&&"function"===typeof b.off)b.on(a,c),f=function(){return b.off(a,c)};else if(b&&"function"===typeof b.addListener&&"function"===typeof b.removeListener)b.addListener(a,c),f=function(){return b.removeListener(a,c)};else if(b&&b.length)for(var k=0,g=b.length;k<g;k++)fb(b[k],a,c,d,e);else throw new TypeError("Invalid event target");d.add(f)}function gb(b,
  29. a,c){return c?gb(b,a).pipe(A(function(a){return x(a)?c.apply(void 0,a):c(a)})):new g(function(c){var d=function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];return c.next(1===a.length?a[0]:a)},f;try{f=b(d)}catch(k){c.error(k);return}if(P(a))return function(){return a(d,f)}})}function Ld(b){var a=b.subscriber,c=b.condition;if(!a.closed){if(b.needIterate)try{b.state=b.iterate(b.state)}catch(f){a.error(f);return}else b.needIterate=!0;if(c){var d=void 0;try{d=c(b.state)}catch(f){a.error(f);
  30. return}if(!d){a.complete();return}if(a.closed)return}var e;try{e=b.resultSelector(b.state)}catch(f){a.error(f);return}if(!a.closed&&(a.next(e),!a.closed))return this.schedule(b)}}function I(b){return!x(b)&&0<=b-parseFloat(b)+1}function Md(b){var a=b.subscriber,c=b.counter;b=b.period;a.next(c);this.schedule({subscriber:a,counter:c+1,period:b},b)}function Ea(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];var a=Number.POSITIVE_INFINITY,c=null,d=b[b.length-1];w(d)?(c=b.pop(),1<b.length&&
  31. "number"===typeof b[b.length-1]&&(a=b.pop())):"number"===typeof d&&(a=b.pop());return null===c&&1===b.length&&b[0]instanceof g?b[0]:na(a)(ea(b,c))}function Fa(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];if(0===b.length)return da;var c=b[0],d=b.slice(1);return 1===b.length&&x(c)?Fa.apply(void 0,c):new g(function(a){var b=function(){return a.add(Fa.apply(void 0,d).subscribe(a))};return F(c).subscribe({next:function(c){a.next(c)},error:b,complete:b})})}function Nd(b){var a=b.keys,c=b.index,
  32. d=b.subscriber,e=b.subscription;b=b.obj;if(!d.closed)if(c<a.length){var f=a[c];d.next([f,b[f]]);e.add(this.schedule({keys:a,index:c+1,subscriber:d,subscription:e,obj:b}))}else d.complete()}function Od(b,a){function c(){return!c.pred.apply(c.thisArg,arguments)}c.pred=b;c.thisArg=a;return c}function M(b,a){return function(c){return c.lift(new Pd(b,a))}}function hb(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];if(1===b.length)if(x(b[0]))b=b[0];else return b[0];return ea(b,void 0).lift(new Qd)}
  33. function Rd(b){var a=b.start,c=b.index,d=b.subscriber;c>=b.count?d.complete():(d.next(a),d.closed||(b.index=c+1,b.start=a+1,this.schedule(b)))}function ib(b,a,c){void 0===b&&(b=0);var d=-1;I(a)?d=1>Number(a)&&1||Number(a):w(a)&&(c=a);w(c)||(c=q);return new g(function(a){var e=I(b)?b:+b-c.now();return c.schedule(Sd,e,{index:0,period:d,subscriber:a})})}function Sd(b){var a=b.index,c=b.period,d=b.subscriber;d.next(a);if(!d.closed){if(-1===c)return d.complete();b.index=a+1;this.schedule(b,c)}}function Ga(){for(var b=
  34. [],a=0;a<arguments.length;a++)b[a]=arguments[a];a=b[b.length-1];"function"===typeof a&&b.pop();return ea(b,void 0).lift(new jb(a))}function Td(b,a){void 0===a&&(a=null);return new N({method:"GET",url:b,headers:a})}function Ud(b,a,c){return new N({method:"POST",url:b,body:a,headers:c})}function Vd(b,a){return new N({method:"DELETE",url:b,headers:a})}function Wd(b,a,c){return new N({method:"PUT",url:b,body:a,headers:c})}function Xd(b,a,c){return new N({method:"PATCH",url:b,body:a,headers:c})}function Yd(b,
  35. a){return Zd(new N({method:"GET",url:b,responseType:"json",headers:a}))}function kb(b,a){switch(b){case "json":return b="response"in a?a.responseType?a.response:JSON.parse(a.response||a.responseText||"null"):JSON.parse(a.responseText||"null"),b;case "xml":return a.responseXML;default:return"response"in a?a.response:a.responseText}}function lb(b){return new mb(b)}function nb(b){void 0===b&&(b=q);return A(function(a){return new ob(a,b.now())})}function W(b,a){var c=!1;2<=arguments.length&&(c=!0);return function(d){return d.lift(new $d(b,
  36. a,c))}}function pb(b){void 0===b&&(b=q);return function(a){return Da(function(){return a.pipe(W(function(c,a){c=c.current;return{value:a,current:b.now(),last:c}},{current:b.now(),value:void 0,last:void 0}),A(function(c){return new qb(c.value,c.current-c.last)}))})}}function rb(b,a){void 0===a&&(a=pa);return function(c){return c.lift(new ae(b,a.leading,a.trailing))}}function sb(b,a){for(var c=0,d=a.length;c<d;c++)for(var e=a[c],f=Object.getOwnPropertyNames(e.prototype),k=0,g=f.length;k<g;k++){var h=
  37. f[k];b.prototype[h]=e.prototype[h]}}function Ha(b){return function(a){return a.lift(new be(b))}}function tb(b,a){void 0===a&&(a=q);return Ha(function(){return ib(b,a)})}function ub(b){return function(a){return a.lift(new ce(b))}}function vb(b,a){void 0===a&&(a=null);return function(c){return c.lift(new de(b,a))}}function wb(b){var a=arguments.length,c=q;w(arguments[arguments.length-1])&&(c=arguments[arguments.length-1],a--);var d=null;2<=a&&(d=arguments[1]);var e=Number.POSITIVE_INFINITY;3<=a&&(e=
  38. arguments[2]);return function(a){return a.lift(new ee(b,d,e,c))}}function xb(b){var a=b.subscriber,c=b.context;c&&a.closeContext(c);a.closed||(b.context=a.openContext(),b.context.closeAction=this.schedule(b,b.bufferTimeSpan))}function fe(b){var a=b.bufferCreationInterval,c=b.bufferTimeSpan,d=b.subscriber,e=b.scheduler,f=d.openContext();d.closed||(d.add(f.closeAction=e.schedule(yb,c,{subscriber:d,context:f})),this.schedule(b,a))}function yb(b){b.subscriber.closeContext(b.context)}function zb(b,a){return function(c){return c.lift(new ge(b,
  39. a))}}function Ab(b){return function(a){return a.lift(new he(b))}}function Bb(b){return function(a){var c=new ie(b);a=a.lift(c);return c.caught=a}}function Cb(b){return function(a){return a.lift(new qa(b))}}function Ia(b,a){return H(b,a,1)}function Db(b,a){return Ia(function(){return b},a)}function Eb(b){return function(a){return a.lift(new je(b,a))}}function Fb(b){return function(a){return a.lift(new ke(b))}}function Gb(b,a){void 0===a&&(a=q);return function(c){return c.lift(new le(b,a))}}function me(b){b.debouncedNext()}
  40. function X(b){void 0===b&&(b=null);return function(a){return a.lift(new ne(b))}}function Hb(b,a){void 0===a&&(a=q);var c=b instanceof Date&&!isNaN(+b)?+b-a.now():Math.abs(b);return function(b){return b.lift(new oe(c,a))}}function Ib(b,a){return a?function(c){return(new pe(c,a)).lift(new Jb(b))}:function(c){return c.lift(new Jb(b))}}function Kb(){return function(b){return b.lift(new qe)}}function Lb(b,a){return function(c){return c.lift(new re(b,a))}}function Ja(b,a){return function(c){return c.lift(new se(b,
  41. a))}}function Mb(b,a){return Ja(function(c,d){return a?a(c[b],d[b]):c[b]===d[b]})}function ra(b){void 0===b&&(b=te);return function(a){return a.lift(new ue(b))}}function te(){return new ga}function sa(b){return function(a){return 0===b?R():a.lift(new ve(b))}}function Nb(b,a){if(0>b)throw new Y;var c=2<=arguments.length;return function(d){return d.pipe(M(function(c,a){return a===b}),sa(1),c?X(a):ra(function(){return new Y}))}}function Ob(b,a){return function(c){return c.lift(new we(b,a,c))}}function Pb(){return function(b){return b.lift(new xe)}}
  42. function Ka(b,a){return a?function(c){return c.pipe(Ka(function(c,e){return F(b(c,e)).pipe(A(function(b,d){return a(c,b,e,d)}))}))}:function(c){return c.lift(new ye(b))}}function Qb(b,a,c){void 0===a&&(a=Number.POSITIVE_INFINITY);void 0===c&&(c=void 0);a=1>(a||0)?Number.POSITIVE_INFINITY:a;return function(d){return d.lift(new ze(b,a,c))}}function Rb(b){return function(a){return a.lift(new Ae(b))}}function Sb(b,a){if("function"!==typeof b)throw new TypeError("predicate is not a function");return function(c){return c.lift(new Tb(b,
  43. c,!1,a))}}function Ub(b,a){return function(c){return c.lift(new Tb(b,c,!0,a))}}function Vb(b,a){var c=2<=arguments.length;return function(d){return d.pipe(b?M(function(c,a){return b(c,a,d)}):S,sa(1),c?X(a):ra(function(){return new ga}))}}function Wb(){return function(b){return b.lift(new Be)}}function Xb(){return function(b){return b.lift(new Ce)}}function ha(b){return function(a){return 0===b?R():a.lift(new De(b))}}function Yb(b,a){var c=2<=arguments.length;return function(d){return d.pipe(b?M(function(c,
  44. a){return b(c,a,d)}):S,ha(1),c?X(a):ra(function(){return new ga}))}}function Zb(b){return function(a){return a.lift(new Ee(b))}}function $b(){return function(b){return b.lift(new Fe)}}function Z(b,a){return 2<=arguments.length?function(c){return ya(W(b,a),ha(1),X(a))(c)}:function(c){return ya(W(function(c,a,f){return b(c,a,f+1)}),ha(1))(c)}}function ac(b){return Z("function"===typeof b?function(a,c){return 0<b(a,c)?a:c}:function(a,c){return a>c?a:c})}function bc(b,a,c){void 0===c&&(c=Number.POSITIVE_INFINITY);
  45. if("function"===typeof a)return H(function(){return b},a,c);"number"===typeof a&&(c=a);return H(function(){return b},c)}function cc(b,a,c){void 0===c&&(c=Number.POSITIVE_INFINITY);return function(d){return d.lift(new Ge(b,a,c))}}function dc(b){return Z("function"===typeof b?function(a,c){return 0>b(a,c)?a:c}:function(a,c){return a<c?a:c})}function J(b,a){return function(c){var d;d="function"===typeof b?b:function(){return b};if("function"===typeof a)return c.lift(new He(d,a));var e=Object.create(c,
  46. Ie);e.source=c;e.subjectFactory=d;return e}}function ec(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];1===b.length&&x(b[0])&&(b=b[0]);return function(c){return c.lift(new Je(b))}}function fc(){return function(b){return b.lift(new Ke)}}function gc(b,a){return function(c){return[M(b,a)(c),M(Od(b,a))(c)]}}function hc(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];var c=b.length;if(0===c)throw Error("list of properties cannot be empty.");return function(a){return A(Le(b,c))(a)}}
  47. function Le(b,a){return function(c){var d=c;for(c=0;c<a;c++)if(d=d[b[c]],"undefined"===typeof d)return;return d}}function ic(b){return b?J(function(){return new u},b):J(new u)}function jc(b){return function(a){return J(new kc(b))(a)}}function lc(){return function(b){return J(new T)(b)}}function mc(b,a,c,d){c&&"function"!==typeof c&&(d=c);var e="function"===typeof c?c:void 0,f=new aa(b,a,d);return function(c){return J(function(){return f},e)(c)}}function nc(){for(var b=[],a=0;a<arguments.length;a++)b[a]=
  48. arguments[a];return function(c){1===b.length&&x(b[0])&&(b=b[0]);return c.lift.call(hb.apply(void 0,[c].concat(b)))}}function oc(b){void 0===b&&(b=-1);return function(a){return 0===b?R():0>b?a.lift(new pc(-1,a)):a.lift(new pc(b-1,a))}}function qc(b){return function(a){return a.lift(new Me(b))}}function rc(b){void 0===b&&(b=-1);return function(a){return a.lift(new Ne(b,a))}}function sc(b){return function(a){return a.lift(new Oe(b,a))}}function tc(b){return function(a){return a.lift(new Pe(b))}}function uc(b,
  49. a){void 0===a&&(a=q);return function(c){return c.lift(new Qe(b,a))}}function Re(b){var a=b.period;b.subscriber.notifyNext();this.schedule(b,a)}function vc(b,a){return function(c){return c.lift(new Se(b,a))}}function Te(){return new u}function wc(){return function(b){return za()(J(Te)(b))}}function La(b,a,c){var d;d=b&&"object"===typeof b?b:{bufferSize:b,windowTime:a,refCount:!1,scheduler:c};return function(c){return c.lift(Ue(d))}}function Ue(b){var a=b.bufferSize,c=void 0===a?Number.POSITIVE_INFINITY:
  50. a,a=b.windowTime,d=void 0===a?Number.POSITIVE_INFINITY:a,e=b.refCount,f=b.scheduler,k,g=0,h,l=!1,t=!1;return function(a){g++;if(!k||l)l=!1,k=new aa(c,d,f),h=a.subscribe({next:function(c){k.next(c)},error:function(c){l=!0;k.error(c)},complete:function(){t=!0;h=void 0;k.complete()}});var b=k.subscribe(this);this.add(function(){g--;b.unsubscribe();h&&!t&&e&&0===g&&(h.unsubscribe(),k=h=void 0)})}}function xc(b){return function(a){return a.lift(new Ve(b,a))}}function yc(b){return function(a){return a.lift(new We(b))}}
  51. function zc(b){return function(a){return a.lift(new Xe(b))}}function Ac(b){return function(a){return a.lift(new Ye(b))}}function Bc(b){return function(a){return a.lift(new Ze(b))}}function Cc(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];var c=b[b.length-1];return w(c)?(b.pop(),function(a){return V(b,a,c)}):function(c){return V(b,c)}}function Dc(b,a){void 0===a&&(a=0);return function(c){return c.lift(new $e(b,a))}}function ba(b,a){return"function"===typeof a?function(c){return c.pipe(ba(function(c,
  52. e){return F(b(c,e)).pipe(A(function(b,d){return a(c,b,e,d)}))}))}:function(c){return c.lift(new af(b))}}function Ec(){return ba(S)}function Fc(b,a){return a?ba(function(){return b},a):ba(function(){return b})}function Gc(b){return function(a){return a.lift(new bf(b))}}function Hc(b,a){void 0===a&&(a=!1);return function(c){return c.lift(new cf(b,a))}}function Ic(b,a,c){return function(d){return d.lift(new df(b,a,c))}}function Jc(b,a,c){void 0===a&&(a=q);void 0===c&&(c=pa);return function(d){return d.lift(new ef(b,
  53. a,c.leading,c.trailing))}}function ff(b){b.subscriber.clearThrottle()}function Ma(b,a,c){void 0===c&&(c=q);return function(d){var e=b instanceof Date&&!isNaN(+b),f=e?+b-c.now():Math.abs(b);return d.lift(new gf(f,e,a,c))}}function Kc(b,a){void 0===a&&(a=q);return Ma(b,ma(new Lc),a)}function hf(b,a,c){if(0===c)return[a];b.push(a);return b}function Mc(){return Z(hf,[])}function Nc(b){return function(a){return a.lift(new jf(b))}}function Oc(b,a){void 0===a&&(a=0);return function(c){return c.lift(new kf(b,
  54. a))}}function Pc(b,a,c,d){var e=q,f=null,k=Number.POSITIVE_INFINITY;w(d)&&(e=d);w(c)?e=c:I(c)&&(k=c);w(a)?e=a:I(a)&&(f=a);return function(c){return c.lift(new lf(b,f,k,e))}}function mf(b){var a=b.subscriber,c=b.windowTimeSpan,d=b.window;d&&a.closeWindow(d);b.window=a.openWindow();this.schedule(b,c)}function nf(b){var a=b.windowTimeSpan,c=b.subscriber,d=b.scheduler,e=b.windowCreationInterval,f=c.openWindow(),k={action:this,subscription:null};k.subscription=d.schedule(Qc,a,{subscriber:c,window:f,context:k});
  55. this.add(k.subscription);this.schedule(b,e)}function Qc(b){var a=b.subscriber,c=b.window;(b=b.context)&&b.action&&b.subscription&&b.action.remove(b.subscription);a.closeWindow(c)}function Rc(b,a){return function(c){return c.lift(new of(b,a))}}function Sc(b){return function(a){return a.lift(new pf(b))}}function Tc(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return function(c){var a;"function"===typeof b[b.length-1]&&(a=b.pop());return c.lift(new qf(b,a))}}function Uc(b){return function(a){return a.lift(new jb(b))}}
  56. function Vc(b){return Bb(b)(this)}function Wc(b,a,c){return Ic(b,a,c)(this)}function Xc(b){return Rb(b)(this)}function Yc(b){return b(this)}function Zc(b,a){void 0===a&&(a=Number.POSITIVE_INFINITY);return H(b,a)(this)}function $c(b,a){void 0===a&&(a=Number.POSITIVE_INFINITY);return bc(b,a)(this)}function ad(){return Ec()(this)}var sd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c])},rf=Object.assign||
  57. function(b){for(var a,c=1,d=arguments.length;c<d;c++){a=arguments[c];for(var e in a)Object.prototype.hasOwnProperty.call(a,e)&&(b[e]=a[e])}return b},Na=!1,C={Promise:void 0,set useDeprecatedSynchronousErrorHandling(b){b?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):Na&&console.log("RxJS: Back to a better error behavior. Thank you. \x3c3");Na=b},get useDeprecatedSynchronousErrorHandling(){return Na}},ta={closed:!0,next:function(b){},
  58. error:function(b){if(C.useDeprecatedSynchronousErrorHandling)throw b;Q(b)},complete:function(){}},x=function(){return Array.isArray||function(b){return b&&"number"===typeof b.length}}(),ca=function(){function b(a){Error.call(this);this.message=a?a.length+" errors occurred during unsubscription:\n"+a.map(function(c,a){return a+1+") "+c.toString()}).join("\n "):"";this.name="UnsubscriptionError";this.errors=a;return this}b.prototype=Object.create(Error.prototype);return b}(),r=function(){function b(a){this.closed=
  59. !1;this._subscriptions=this._parentOrParents=null;a&&(this._unsubscribe=a)}b.prototype.unsubscribe=function(){var a;if(!this.closed){var c=this._parentOrParents,d=this._unsubscribe,e=this._subscriptions;this.closed=!0;this._subscriptions=this._parentOrParents=null;if(c instanceof b)c.remove(this);else if(null!==c)for(var f=0;f<c.length;++f)c[f].remove(this);if(P(d))try{d.call(this)}catch(k){a=k instanceof ca?Sa(k.errors):[k]}if(x(e))for(f=-1,c=e.length;++f<c;)if(d=e[f],wa(d))try{d.unsubscribe()}catch(k){a=
  60. a||[],k instanceof ca?a=a.concat(Sa(k.errors)):a.push(k)}if(a)throw new ca(a);}};b.prototype.add=function(a){var c=a;if(!a)return b.EMPTY;switch(typeof a){case "function":c=new b(a);case "object":if(c===this||c.closed||"function"!==typeof c.unsubscribe)return c;if(this.closed)return c.unsubscribe(),c;c instanceof b||(a=c,c=new b,c._subscriptions=[a]);break;default:throw Error("unrecognized teardown "+a+" added to Subscription.");}a=c._parentOrParents;if(null===a)c._parentOrParents=this;else if(a instanceof
  61. b){if(a===this)return c;c._parentOrParents=[a,this]}else if(-1===a.indexOf(this))a.push(this);else return c;a=this._subscriptions;null===a?this._subscriptions=[c]:a.push(c);return c};b.prototype.remove=function(a){var c=this._subscriptions;c&&(a=c.indexOf(a),-1!==a&&c.splice(a,1))};b.EMPTY=function(a){a.closed=!0;return a}(new b);return b}(),ia="function"===typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),l=function(b){function a(c,d,e){var f=b.call(this)||this;f.syncErrorValue=
  62. null;f.syncErrorThrown=!1;f.syncErrorThrowable=!1;f.isStopped=!1;switch(arguments.length){case 0:f.destination=ta;break;case 1:if(!c){f.destination=ta;break}if("object"===typeof c){c instanceof a?(f.syncErrorThrowable=c.syncErrorThrowable,f.destination=c,c.add(f)):(f.syncErrorThrowable=!0,f.destination=new bd(f,c));break}default:f.syncErrorThrowable=!0,f.destination=new bd(f,c,d,e)}return f}h(a,b);a.prototype[ia]=function(){return this};a.create=function(c,b,e){c=new a(c,b,e);c.syncErrorThrowable=
  63. !1;return c};a.prototype.next=function(c){this.isStopped||this._next(c)};a.prototype.error=function(c){this.isStopped||(this.isStopped=!0,this._error(c))};a.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())};a.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,b.prototype.unsubscribe.call(this))};a.prototype._next=function(c){this.destination.next(c)};a.prototype._error=function(c){this.destination.error(c);this.unsubscribe()};a.prototype._complete=function(){this.destination.complete();
  64. this.unsubscribe()};a.prototype._unsubscribeAndRecycle=function(){var c=this._parentOrParents;this._parentOrParents=null;this.unsubscribe();this.isStopped=this.closed=!1;this._parentOrParents=c;return this};return a}(r),bd=function(b){function a(c,a,e,f){var d=b.call(this)||this;d._parentSubscriber=c;var g;c=d;P(a)?g=a:a&&(g=a.next,e=a.error,f=a.complete,a!==ta&&(c=Object.create(a),P(c.unsubscribe)&&d.add(c.unsubscribe.bind(c)),c.unsubscribe=d.unsubscribe.bind(d)));d._context=c;d._next=g;d._error=
  65. e;d._complete=f;return d}h(a,b);a.prototype.next=function(c){if(!this.isStopped&&this._next){var a=this._parentSubscriber;C.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable?this.__tryOrSetError(a,this._next,c)&&this.unsubscribe():this.__tryOrUnsub(this._next,c)}};a.prototype.error=function(c){if(!this.isStopped){var a=this._parentSubscriber,b=C.useDeprecatedSynchronousErrorHandling;if(this._error)b&&a.syncErrorThrowable?this.__tryOrSetError(a,this._error,c):this.__tryOrUnsub(this._error,
  66. c),this.unsubscribe();else if(a.syncErrorThrowable)b?(a.syncErrorValue=c,a.syncErrorThrown=!0):Q(c),this.unsubscribe();else{this.unsubscribe();if(b)throw c;Q(c)}}};a.prototype.complete=function(){var c=this;if(!this.isStopped){var a=this._parentSubscriber;if(this._complete){var b=function(){return c._complete.call(c._context)};C.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable?this.__tryOrSetError(a,b):this.__tryOrUnsub(b)}this.unsubscribe()}};a.prototype.__tryOrUnsub=function(c,a){try{c.call(this._context,
  67. a)}catch(e){this.unsubscribe();if(C.useDeprecatedSynchronousErrorHandling)throw e;Q(e)}};a.prototype.__tryOrSetError=function(c,a,b){if(!C.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{a.call(this._context,b)}catch(f){return C.useDeprecatedSynchronousErrorHandling?(c.syncErrorValue=f,c.syncErrorThrown=!0):Q(f),!0}return!1};a.prototype._unsubscribe=function(){var c=this._parentSubscriber;this._parentSubscriber=this._context=null;c.unsubscribe()};return a}(l),U="function"===typeof Symbol&&
  68. Symbol.observable||"@@observable",g=function(){function b(a){this._isScalar=!1;a&&(this._subscribe=a)}b.prototype.lift=function(a){var c=new b;c.source=this;c.operator=a;return c};b.prototype.subscribe=function(a,c,b){var d=this.operator;a:{if(a){if(a instanceof l)break a;if(a[ia]){a=a[ia]();break a}}a=a||c||b?new l(a,c,b):new l(ta)}d?a.add(d.call(a,this.source)):a.add(this.source||C.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a));if(C.useDeprecatedSynchronousErrorHandling&&
  69. a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a};b.prototype._trySubscribe=function(a){try{return this._subscribe(a)}catch(c){C.useDeprecatedSynchronousErrorHandling&&(a.syncErrorThrown=!0,a.syncErrorValue=c),xa(a)?a.error(c):console.warn(c)}};b.prototype.forEach=function(a,c){var b=this;c=Ua(c);return new c(function(c,d){var e;e=b.subscribe(function(c){try{a(c)}catch(z){d(z),e&&e.unsubscribe()}},d,c)})};b.prototype._subscribe=function(a){var c=this.source;
  70. return c&&c.subscribe(a)};b.prototype[U]=function(){return this};b.prototype.pipe=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return 0===a.length?this:Ta(a)(this)};b.prototype.toPromise=function(a){var c=this;a=Ua(a);return new a(function(a,b){var d;c.subscribe(function(c){return d=c},function(c){return b(c)},function(){return a(d)})})};b.create=function(a){return new b(a)};return b}(),K=function(){function b(){Error.call(this);this.message="object unsubscribed";this.name=
  71. "ObjectUnsubscribedError";return this}b.prototype=Object.create(Error.prototype);return b}(),cd=function(b){function a(c,a){var d=b.call(this)||this;d.subject=c;d.subscriber=a;d.closed=!1;return d}h(a,b);a.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var c=this.subject,a=c.observers;this.subject=null;!a||0===a.length||c.isStopped||c.closed||(c=a.indexOf(this.subscriber),-1!==c&&a.splice(c,1))}};return a}(r),dd=function(b){function a(c){var a=b.call(this,c)||this;a.destination=
  72. c;return a}h(a,b);return a}(l),u=function(b){function a(){var c=b.call(this)||this;c.observers=[];c.closed=!1;c.isStopped=!1;c.hasError=!1;c.thrownError=null;return c}h(a,b);a.prototype[ia]=function(){return new dd(this)};a.prototype.lift=function(c){var a=new ua(this,this);a.operator=c;return a};a.prototype.next=function(c){if(this.closed)throw new K;if(!this.isStopped)for(var a=this.observers,b=a.length,a=a.slice(),f=0;f<b;f++)a[f].next(c)};a.prototype.error=function(c){if(this.closed)throw new K;
  73. this.hasError=!0;this.thrownError=c;this.isStopped=!0;for(var a=this.observers,b=a.length,a=a.slice(),f=0;f<b;f++)a[f].error(c);this.observers.length=0};a.prototype.complete=function(){if(this.closed)throw new K;this.isStopped=!0;for(var c=this.observers,a=c.length,c=c.slice(),b=0;b<a;b++)c[b].complete();this.observers.length=0};a.prototype.unsubscribe=function(){this.closed=this.isStopped=!0;this.observers=null};a.prototype._trySubscribe=function(c){if(this.closed)throw new K;return b.prototype._trySubscribe.call(this,
  74. c)};a.prototype._subscribe=function(c){if(this.closed)throw new K;if(this.hasError)return c.error(this.thrownError),r.EMPTY;if(this.isStopped)return c.complete(),r.EMPTY;this.observers.push(c);return new cd(this,c)};a.prototype.asObservable=function(){var c=new g;c.source=this;return c};a.create=function(c,a){return new ua(c,a)};return a}(g),ua=function(b){function a(c,a){var d=b.call(this)||this;d.destination=c;d.source=a;return d}h(a,b);a.prototype.next=function(c){var a=this.destination;a&&a.next&&
  75. a.next(c)};a.prototype.error=function(c){var a=this.destination;a&&a.error&&this.destination.error(c)};a.prototype.complete=function(){var c=this.destination;c&&c.complete&&this.destination.complete()};a.prototype._subscribe=function(c){return this.source?this.source.subscribe(c):r.EMPTY};return a}(u),td=function(){function b(a){this.connectable=a}b.prototype.call=function(a,c){var b=this.connectable;b._refCount++;a=new sf(a,b);c=c.subscribe(a);a.closed||(a.connection=b.connect());return c};return b}(),
  76. sf=function(b){function a(c,a){c=b.call(this,c)||this;c.connectable=a;return c}h(a,b);a.prototype._unsubscribe=function(){var c=this.connectable;if(c){this.connectable=null;var a=c._refCount;0>=a?this.connection=null:(c._refCount=a-1,1<a?this.connection=null:(a=this.connection,c=c._connection,this.connection=null,!c||a&&c!==a||c.unsubscribe()))}else this.connection=null};return a}(l),ed=function(b){function a(c,a){var d=b.call(this)||this;d.source=c;d.subjectFactory=a;d._refCount=0;d._isComplete=
  77. !1;return d}h(a,b);a.prototype._subscribe=function(c){return this.getSubject().subscribe(c)};a.prototype.getSubject=function(){var c=this._subject;if(!c||c.isStopped)this._subject=this.subjectFactory();return this._subject};a.prototype.connect=function(){var c=this._connection;c||(this._isComplete=!1,c=this._connection=new r,c.add(this.source.subscribe(new tf(this.getSubject(),this))),c.closed&&(this._connection=null,c=r.EMPTY));return c};a.prototype.refCount=function(){return za()(this)};return a}(g),
  78. Ie=function(){var b=ed.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:b._subscribe},_isComplete:{value:b._isComplete,writable:!0},getSubject:{value:b.getSubject},connect:{value:b.connect},refCount:{value:b.refCount}}}(),tf=function(b){function a(c,a){c=b.call(this,c)||this;c.connectable=a;return c}h(a,b);a.prototype._error=function(c){this._unsubscribe();b.prototype._error.call(this,c)};
  79. a.prototype._complete=function(){this.connectable._isComplete=!0;this._unsubscribe();b.prototype._complete.call(this)};a.prototype._unsubscribe=function(){var c=this.connectable;if(c){this.connectable=null;var a=c._connection;c._refCount=0;c._subject=null;c._connection=null;a&&a.unsubscribe()}};return a}(dd);(function(b){function a(c,a){c=b.call(this,c)||this;c.connectable=a;return c}h(a,b);a.prototype._unsubscribe=function(){var c=this.connectable;if(c){this.connectable=null;var a=c._refCount;0>=
  80. a?this.connection=null:(c._refCount=a-1,1<a?this.connection=null:(a=this.connection,c=c._connection,this.connection=null,!c||a&&c!==a||c.unsubscribe()))}else this.connection=null};return a})(l);var ud=function(){function b(a,c,b,e){this.keySelector=a;this.elementSelector=c;this.durationSelector=b;this.subjectSelector=e}b.prototype.call=function(a,c){return c.subscribe(new uf(a,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))};return b}(),uf=function(b){function a(c,
  81. a,e,f,k){c=b.call(this,c)||this;c.keySelector=a;c.elementSelector=e;c.durationSelector=f;c.subjectSelector=k;c.groups=null;c.attemptedToUnsubscribe=!1;c.count=0;return c}h(a,b);a.prototype._next=function(c){var a;try{a=this.keySelector(c)}catch(e){this.error(e);return}this._group(c,a)};a.prototype._group=function(c,a){var b=this.groups;b||(b=this.groups=new Map);var d=b.get(a),k;if(this.elementSelector)try{k=this.elementSelector(c)}catch(y){this.error(y)}else k=c;if(!d&&(d=this.subjectSelector?this.subjectSelector():
  82. new u,b.set(a,d),c=new fd(a,d,this),this.destination.next(c),this.durationSelector)){c=void 0;try{c=this.durationSelector(new fd(a,d))}catch(y){this.error(y);return}this.add(c.subscribe(new vf(a,d,this)))}d.closed||d.next(k)};a.prototype._error=function(c){var a=this.groups;a&&(a.forEach(function(a,b){a.error(c)}),a.clear());this.destination.error(c)};a.prototype._complete=function(){var c=this.groups;c&&(c.forEach(function(c,a){c.complete()}),c.clear());this.destination.complete()};a.prototype.removeGroup=
  83. function(c){this.groups.delete(c)};a.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&b.prototype.unsubscribe.call(this))};return a}(l),vf=function(b){function a(c,a,e){var d=b.call(this,a)||this;d.key=c;d.group=a;d.parent=e;return d}h(a,b);a.prototype._next=function(c){this.complete()};a.prototype._unsubscribe=function(){var c=this.parent,a=this.key;this.key=this.parent=null;c&&c.removeGroup(a)};return a}(l),fd=function(b){function a(c,a,e){var d=b.call(this)||
  84. this;d.key=c;d.groupSubject=a;d.refCountSubscription=e;return d}h(a,b);a.prototype._subscribe=function(c){var a=new r,b=this.refCountSubscription,f=this.groupSubject;b&&!b.closed&&a.add(new wf(b));a.add(f.subscribe(c));return a};return a}(g),wf=function(b){function a(c){var a=b.call(this)||this;a.parent=c;c.count++;return a}h(a,b);a.prototype.unsubscribe=function(){var c=this.parent;c.closed||this.closed||(b.prototype.unsubscribe.call(this),--c.count,0===c.count&&c.attemptedToUnsubscribe&&c.unsubscribe())};
  85. return a}(r),kc=function(b){function a(c){var a=b.call(this)||this;a._value=c;return a}h(a,b);Object.defineProperty(a.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0});a.prototype._subscribe=function(c){var a=b.prototype._subscribe.call(this,c);a&&!a.closed&&c.next(this._value);return a};a.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new K;return this._value};a.prototype.next=function(c){b.prototype.next.call(this,
  86. this._value=c)};return a}(u),ja=function(b){function a(c,a){var d=b.call(this,c,a)||this;d.scheduler=c;d.work=a;d.pending=!1;return d}h(a,b);a.prototype.schedule=function(c,a){void 0===a&&(a=0);if(this.closed)return this;this.state=c;c=this.id;var b=this.scheduler;null!=c&&(this.id=this.recycleAsyncId(b,c,a));this.pending=!0;this.delay=a;this.id=this.id||this.requestAsyncId(b,this.id,a);return this};a.prototype.requestAsyncId=function(c,a,b){void 0===b&&(b=0);return setInterval(c.flush.bind(c,this),
  87. b)};a.prototype.recycleAsyncId=function(c,a,b){void 0===b&&(b=0);if(null!==b&&this.delay===b&&!1===this.pending)return a;clearInterval(a)};a.prototype.execute=function(c,a){if(this.closed)return Error("executing a cancelled action");this.pending=!1;if(c=this._execute(c,a))return c;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))};a.prototype._execute=function(c,a){a=!1;var b=void 0;try{this.work(c)}catch(f){a=!0,b=!!f&&f||Error(f)}if(a)return this.unsubscribe(),
  88. b};a.prototype._unsubscribe=function(){var c=this.id,a=this.scheduler,b=a.actions,f=b.indexOf(this);this.state=this.work=null;this.pending=!1;this.scheduler=null;-1!==f&&b.splice(f,1);null!=c&&(this.id=this.recycleAsyncId(a,c,null));this.delay=null};return a}(function(b){function a(c,a){return b.call(this)||this}h(a,b);a.prototype.schedule=function(c,a){return this};return a}(r)),xf=function(b){function a(c,a){var d=b.call(this,c,a)||this;d.scheduler=c;d.work=a;return d}h(a,b);a.prototype.schedule=
  89. function(c,a){void 0===a&&(a=0);if(0<a)return b.prototype.schedule.call(this,c,a);this.delay=a;this.state=c;this.scheduler.flush(this);return this};a.prototype.execute=function(c,a){return 0<a||this.closed?b.prototype.execute.call(this,c,a):this._execute(c,a)};a.prototype.requestAsyncId=function(c,a,e){void 0===e&&(e=0);return null!==e&&0<e||null===e&&0<this.delay?b.prototype.requestAsyncId.call(this,c,a,e):c.flush(this)};return a}(ja),gd=function(){function b(a,c){void 0===c&&(c=b.now);this.SchedulerAction=
  90. a;this.now=c}b.prototype.schedule=function(a,c,b){void 0===c&&(c=0);return(new this.SchedulerAction(this,a)).schedule(b,c)};b.now=function(){return Date.now()};return b}(),O=function(b){function a(c,d){void 0===d&&(d=gd.now);var e=b.call(this,c,function(){return a.delegate&&a.delegate!==e?a.delegate.now():d()})||this;e.actions=[];e.active=!1;e.scheduled=void 0;return e}h(a,b);a.prototype.schedule=function(c,d,e){void 0===d&&(d=0);return a.delegate&&a.delegate!==this?a.delegate.schedule(c,d,e):b.prototype.schedule.call(this,
  91. c,d,e)};a.prototype.flush=function(c){var a=this.actions;if(this.active)a.push(c);else{var b;this.active=!0;do if(b=c.execute(c.state,c.delay))break;while(c=a.shift());this.active=!1;if(b){for(;c=a.shift();)c.unsubscribe();throw b;}}};return a}(gd),hd=new (function(b){function a(){return null!==b&&b.apply(this,arguments)||this}h(a,b);return a}(O))(xf),da=new g(function(b){return b.complete()}),Wa=function(b){return function(a){for(var c=0,d=b.length;c<d&&!a.closed;c++)a.next(b[c]);a.complete()}},
  92. id;(function(b){b.NEXT="N";b.ERROR="E";b.COMPLETE="C"})(id||(id={}));var v=function(){function b(a,c,b){this.kind=a;this.value=c;this.error=b;this.hasValue="N"===a}b.prototype.observe=function(a){switch(this.kind){case "N":return a.next&&a.next(this.value);case "E":return a.error&&a.error(this.error);case "C":return a.complete&&a.complete()}};b.prototype.do=function(a,c,b){switch(this.kind){case "N":return a&&a(this.value);case "E":return c&&c(this.error);case "C":return b&&b()}};b.prototype.accept=
  93. function(a,c,b){return a&&"function"===typeof a.next?this.observe(a):this.do(a,c,b)};b.prototype.toObservable=function(){switch(this.kind){case "N":return fa(this.value);case "E":return ma(this.error);case "C":return R()}throw Error("unexpected notification kind value");};b.createNext=function(a){return"undefined"!==typeof a?new b("N",a):b.undefinedValueNotification};b.createError=function(a){return new b("E",void 0,a)};b.createComplete=function(){return b.completeNotification};b.completeNotification=
  94. new b("C");b.undefinedValueNotification=new b("N",void 0);return b}(),xd=function(){function b(a,c){void 0===c&&(c=0);this.scheduler=a;this.delay=c}b.prototype.call=function(a,c){return c.subscribe(new jd(a,this.scheduler,this.delay))};return b}(),jd=function(b){function a(c,a,e){void 0===e&&(e=0);c=b.call(this,c)||this;c.scheduler=a;c.delay=e;return c}h(a,b);a.dispatch=function(c){c.notification.observe(c.destination);this.unsubscribe()};a.prototype.scheduleMessage=function(c){this.destination.add(this.scheduler.schedule(a.dispatch,
  95. this.delay,new yf(c,this.destination)))};a.prototype._next=function(c){this.scheduleMessage(v.createNext(c))};a.prototype._error=function(c){this.scheduleMessage(v.createError(c));this.unsubscribe()};a.prototype._complete=function(){this.scheduleMessage(v.createComplete());this.unsubscribe()};return a}(l),yf=function(){return function(b,a){this.notification=b;this.destination=a}}(),aa=function(b){function a(c,a,e){void 0===c&&(c=Number.POSITIVE_INFINITY);void 0===a&&(a=Number.POSITIVE_INFINITY);var d=
  96. b.call(this)||this;d.scheduler=e;d._events=[];d._infiniteTimeWindow=!1;d._bufferSize=1>c?1:c;d._windowTime=1>a?1:a;a===Number.POSITIVE_INFINITY?(d._infiniteTimeWindow=!0,d.next=d.nextInfiniteTimeWindow):d.next=d.nextTimeWindow;return d}h(a,b);a.prototype.nextInfiniteTimeWindow=function(c){var a=this._events;a.push(c);a.length>this._bufferSize&&a.shift();b.prototype.next.call(this,c)};a.prototype.nextTimeWindow=function(c){this._events.push(new zf(this._getNow(),c));this._trimBufferThenGetEvents();
  97. b.prototype.next.call(this,c)};a.prototype._subscribe=function(c){var a=this._infiniteTimeWindow,b=a?this._events:this._trimBufferThenGetEvents(),f=this.scheduler,k=b.length,g;if(this.closed)throw new K;this.isStopped||this.hasError?g=r.EMPTY:(this.observers.push(c),g=new cd(this,c));f&&c.add(c=new jd(c,f));if(a)for(a=0;a<k&&!c.closed;a++)c.next(b[a]);else for(a=0;a<k&&!c.closed;a++)c.next(b[a].value);this.hasError?c.error(this.thrownError):this.isStopped&&c.complete();return g};a.prototype._getNow=
  98. function(){return(this.scheduler||hd).now()};a.prototype._trimBufferThenGetEvents=function(){for(var c=this._getNow(),a=this._bufferSize,b=this._windowTime,f=this._events,k=f.length,g=0;g<k&&!(c-f[g].time<b);)g++;k>a&&(g=Math.max(g,k-a));0<g&&f.splice(0,g);return f};return a}(u),zf=function(){return function(b,a){this.time=b;this.value=a}}(),T=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.value=null;c.hasNext=!1;c.hasCompleted=!1;return c}h(a,b);a.prototype._subscribe=function(c){return this.hasError?
  99. (c.error(this.thrownError),r.EMPTY):this.hasCompleted&&this.hasNext?(c.next(this.value),c.complete(),r.EMPTY):b.prototype._subscribe.call(this,c)};a.prototype.next=function(c){this.hasCompleted||(this.value=c,this.hasNext=!0)};a.prototype.error=function(c){this.hasCompleted||b.prototype.error.call(this,c)};a.prototype.complete=function(){this.hasCompleted=!0;this.hasNext&&b.prototype.next.call(this,this.value);b.prototype.complete.call(this)};return a}(u),Af=1,Bf=Promise.resolve(),Ba={},kd={setImmediate:function(b){var a=
  100. Af++;Ba[a]=!0;Bf.then(function(){return Ya(a)&&b()});return a},clearImmediate:function(b){Ya(b)}},Cf=function(b){function a(c,a){var d=b.call(this,c,a)||this;d.scheduler=c;d.work=a;return d}h(a,b);a.prototype.requestAsyncId=function(c,a,e){void 0===e&&(e=0);if(null!==e&&0<e)return b.prototype.requestAsyncId.call(this,c,a,e);c.actions.push(this);return c.scheduled||(c.scheduled=kd.setImmediate(c.flush.bind(c,null)))};a.prototype.recycleAsyncId=function(c,a,e){void 0===e&&(e=0);if(null!==e&&0<e||null===
  101. e&&0<this.delay)return b.prototype.recycleAsyncId.call(this,c,a,e);0===c.actions.length&&(kd.clearImmediate(a),c.scheduled=void 0)};return a}(ja),va=new (function(b){function a(){return null!==b&&b.apply(this,arguments)||this}h(a,b);a.prototype.flush=function(c){this.active=!0;this.scheduled=void 0;var a=this.actions,b,f=-1,k=a.length;c=c||a.shift();do if(b=c.execute(c.state,c.delay))break;while(++f<k&&(c=a.shift()));this.active=!1;if(b){for(;++f<k&&(c=a.shift());)c.unsubscribe();throw b;}};return a}(O))(Cf),
  102. q=new O(ja),Df=function(b){function a(c,a){var d=b.call(this,c,a)||this;d.scheduler=c;d.work=a;return d}h(a,b);a.prototype.requestAsyncId=function(c,a,e){void 0===e&&(e=0);if(null!==e&&0<e)return b.prototype.requestAsyncId.call(this,c,a,e);c.actions.push(this);return c.scheduled||(c.scheduled=requestAnimationFrame(function(){return c.flush(null)}))};a.prototype.recycleAsyncId=function(c,a,e){void 0===e&&(e=0);if(null!==e&&0<e||null===e&&0<this.delay)return b.prototype.recycleAsyncId.call(this,c,a,
  103. e);0===c.actions.length&&(cancelAnimationFrame(a),c.scheduled=void 0)};return a}(ja),Ef=new (function(b){function a(){return null!==b&&b.apply(this,arguments)||this}h(a,b);a.prototype.flush=function(c){this.active=!0;this.scheduled=void 0;var a=this.actions,b,f=-1,k=a.length;c=c||a.shift();do if(b=c.execute(c.state,c.delay))break;while(++f<k&&(c=a.shift()));this.active=!1;if(b){for(;++f<k&&(c=a.shift());)c.unsubscribe();throw b;}};return a}(O))(Df),md=function(b){function a(c,a){void 0===c&&(c=ld);
  104. void 0===a&&(a=Number.POSITIVE_INFINITY);var d=b.call(this,c,function(){return d.frame})||this;d.maxFrames=a;d.frame=0;d.index=-1;return d}h(a,b);a.prototype.flush=function(){for(var c=this.actions,a=this.maxFrames,b,f;(f=c[0])&&f.delay<=a&&!(c.shift(),this.frame=f.delay,b=f.execute(f.state,f.delay)););if(b){for(;f=c.shift();)f.unsubscribe();throw b;}};a.frameTimeFactor=10;return a}(O),ld=function(b){function a(c,a,e){void 0===e&&(e=c.index+=1);var d=b.call(this,c,a)||this;d.scheduler=c;d.work=a;
  105. d.index=e;d.active=!0;d.index=c.index=e;return d}h(a,b);a.prototype.schedule=function(c,d){void 0===d&&(d=0);if(!this.id)return b.prototype.schedule.call(this,c,d);this.active=!1;var e=new a(this.scheduler,this.work);this.add(e);return e.schedule(c,d)};a.prototype.requestAsyncId=function(c,b,e){void 0===e&&(e=0);this.delay=c.frame+e;c=c.actions;c.push(this);c.sort(a.sortActions);return!0};a.prototype.recycleAsyncId=function(c,a,b){};a.prototype._execute=function(c,a){if(!0===this.active)return b.prototype._execute.call(this,
  106. c,a)};a.sortActions=function(c,a){return c.delay===a.delay?c.index===a.index?0:c.index>a.index?1:-1:c.delay>a.delay?1:-1};return a}(ja),Y=function(){function b(){Error.call(this);this.message="argument out of range";this.name="ArgumentOutOfRangeError";return this}b.prototype=Object.create(Error.prototype);return b}(),ga=function(){function b(){Error.call(this);this.message="no elements in sequence";this.name="EmptyError";return this}b.prototype=Object.create(Error.prototype);return b}(),Lc=function(){function b(){Error.call(this);
  107. this.message="Timeout has occurred";this.name="TimeoutError";return this}b.prototype=Object.create(Error.prototype);return b}(),yd=function(){function b(a,c){this.project=a;this.thisArg=c}b.prototype.call=function(a,c){return c.subscribe(new Ff(a,this.project,this.thisArg))};return b}(),Ff=function(b){function a(c,a,e){c=b.call(this,c)||this;c.project=a;c.count=0;c.thisArg=e||c;return c}h(a,b);a.prototype._next=function(c){var a;try{a=this.project.call(this.thisArg,c,this.count++)}catch(e){this.destination.error(e);
  108. return}this.destination.next(a)};return a}(l),p=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}h(a,b);a.prototype.notifyNext=function(c,a,b,f,k){this.destination.next(a)};a.prototype.notifyError=function(c,a){this.destination.error(c)};a.prototype.notifyComplete=function(c){this.destination.complete()};return a}(l),G=function(b){function a(c,a,e){var d=b.call(this)||this;d.parent=c;d.outerValue=a;d.outerIndex=e;d.index=0;return d}h(a,b);a.prototype._next=function(c){this.parent.notifyNext(this.outerValue,
  109. c,this.outerIndex,this.index++,this)};a.prototype._error=function(c){this.parent.notifyError(c,this);this.unsubscribe()};a.prototype._complete=function(){this.parent.notifyComplete(this);this.unsubscribe()};return a}(l),Gf=function(b){return function(a){b.then(function(c){a.closed||(a.next(c),a.complete())},function(c){return a.error(c)}).then(null,Q);return a}},E;E="function"===typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";var Hf=function(b){return function(a){var c=b[E]();do{var d=
  110. c.next();if(d.done){a.complete();break}a.next(d.value);if(a.closed)break}while(1);"function"===typeof c.return&&a.add(function(){c.return&&c.return()});return a}},If=function(b){return function(a){var c=b[U]();if("function"!==typeof c.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return c.subscribe(a)}},db=function(b){return b&&"number"===typeof b.length&&"function"!==typeof b},cb=function(b){if(b&&"function"===typeof b[U])return If(b);if(db(b))return Wa(b);
  111. if(bb(b))return Gf(b);if(b&&"function"===typeof b[E])return Hf(b);b=wa(b)?"an invalid object":"'"+b+"'";throw new TypeError("You provided "+b+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.");},nd={},qa=function(){function b(a){this.resultSelector=a}b.prototype.call=function(a,c){return c.subscribe(new Jf(a,this.resultSelector))};return b}(),Jf=function(b){function a(c,a){c=b.call(this,c)||this;c.resultSelector=a;c.active=0;c.values=[];c.observables=[];return c}
  112. h(a,b);a.prototype._next=function(c){this.values.push(nd);this.observables.push(c)};a.prototype._complete=function(){var c=this.observables,a=c.length;if(0===a)this.destination.complete();else{this.toRespond=this.active=a;for(var b=0;b<a;b++){var f=c[b];this.add(n(this,f,f,b))}}};a.prototype.notifyComplete=function(c){0===--this.active&&this.destination.complete()};a.prototype.notifyNext=function(c,a,b,f,k){c=this.values;f=c[b];f=this.toRespond?f===nd?--this.toRespond:this.toRespond:0;c[b]=a;0===
  113. f&&(this.resultSelector?this._tryResultSelector(c):this.destination.next(c.slice()))};a.prototype._tryResultSelector=function(c){var a;try{a=this.resultSelector.apply(this,c)}catch(e){this.destination.error(e);return}this.destination.next(a)};return a}(p),Hd=function(){function b(a,c){void 0===c&&(c=Number.POSITIVE_INFINITY);this.project=a;this.concurrent=c}b.prototype.call=function(a,c){return c.subscribe(new Kf(a,this.project,this.concurrent))};return b}(),Kf=function(b){function a(c,a,e){void 0===
  114. e&&(e=Number.POSITIVE_INFINITY);c=b.call(this,c)||this;c.project=a;c.concurrent=e;c.hasCompleted=!1;c.buffer=[];c.active=0;c.index=0;return c}h(a,b);a.prototype._next=function(c){this.active<this.concurrent?this._tryNext(c):this.buffer.push(c)};a.prototype._tryNext=function(c){var a,b=this.index++;try{a=this.project(c,b)}catch(f){this.destination.error(f);return}this.active++;this._innerSub(a,c,b)};a.prototype._innerSub=function(c,a,b){a=new G(this,a,b);b=this.destination;b.add(a);c=n(this,c,void 0,
  115. void 0,a);c!==a&&b.add(c)};a.prototype._complete=function(){this.hasCompleted=!0;0===this.active&&0===this.buffer.length&&this.destination.complete();this.unsubscribe()};a.prototype.notifyNext=function(c,a,b,f,k){this.destination.next(a)};a.prototype.notifyComplete=function(c){var a=this.buffer;this.remove(c);this.active--;0<a.length?this._next(a.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()};return a}(p),Lf=new g(D),Pd=function(){function b(a,c){this.predicate=a;this.thisArg=
  116. c}b.prototype.call=function(a,c){return c.subscribe(new Mf(a,this.predicate,this.thisArg))};return b}(),Mf=function(b){function a(c,a,e){c=b.call(this,c)||this;c.predicate=a;c.thisArg=e;c.count=0;return c}h(a,b);a.prototype._next=function(c){var a;try{a=this.predicate.call(this.thisArg,c,this.count++)}catch(e){this.destination.error(e);return}a&&this.destination.next(c)};return a}(l),Qd=function(){function b(){}b.prototype.call=function(a,c){return c.subscribe(new Nf(a))};return b}(),Nf=function(b){function a(c){c=
  117. b.call(this,c)||this;c.hasFirst=!1;c.observables=[];c.subscriptions=[];return c}h(a,b);a.prototype._next=function(c){this.observables.push(c)};a.prototype._complete=function(){var c=this.observables,a=c.length;if(0===a)this.destination.complete();else{for(var b=0;b<a&&!this.hasFirst;b++){var f=c[b],f=n(this,f,f,b);this.subscriptions&&this.subscriptions.push(f);this.add(f)}this.observables=null}};a.prototype.notifyNext=function(c,a,b,f,k){if(!this.hasFirst){this.hasFirst=!0;for(c=0;c<this.subscriptions.length;c++)c!==
  118. b&&(f=this.subscriptions[c],f.unsubscribe(),this.remove(f));this.subscriptions=null}this.destination.next(a)};return a}(p),jb=function(){function b(a){this.resultSelector=a}b.prototype.call=function(a,c){return c.subscribe(new Of(a,this.resultSelector))};return b}(),Of=function(b){function a(c,a,e){void 0===e&&(e=Object.create(null));c=b.call(this,c)||this;c.iterators=[];c.active=0;c.resultSelector="function"===typeof a?a:null;c.values=e;return c}h(a,b);a.prototype._next=function(c){var a=this.iterators;
  119. x(c)?a.push(new Pf(c)):"function"===typeof c[E]?a.push(new Qf(c[E]())):a.push(new Rf(this.destination,this,c))};a.prototype._complete=function(){var c=this.iterators,a=c.length;this.unsubscribe();if(0===a)this.destination.complete();else{this.active=a;for(var b=0;b<a;b++){var f=c[b];f.stillUnsubscribed?this.destination.add(f.subscribe(f,b)):this.active--}}};a.prototype.notifyInactive=function(){this.active--;0===this.active&&this.destination.complete()};a.prototype.checkIterators=function(){for(var c=
  120. this.iterators,a=c.length,b=this.destination,f=0;f<a;f++){var k=c[f];if("function"===typeof k.hasValue&&!k.hasValue())return}for(var g=!1,h=[],f=0;f<a;f++){var k=c[f],l=k.next();k.hasCompleted()&&(g=!0);if(l.done){b.complete();return}h.push(l.value)}this.resultSelector?this._tryresultSelector(h):b.next(h);g&&b.complete()};a.prototype._tryresultSelector=function(c){var a;try{a=this.resultSelector.apply(this,c)}catch(e){this.destination.error(e);return}this.destination.next(a)};return a}(l),Qf=function(){function b(a){this.iterator=
  121. a;this.nextResult=a.next()}b.prototype.hasValue=function(){return!0};b.prototype.next=function(){var a=this.nextResult;this.nextResult=this.iterator.next();return a};b.prototype.hasCompleted=function(){var a=this.nextResult;return a&&a.done};return b}(),Pf=function(){function b(a){this.array=a;this.length=this.index=0;this.length=a.length}b.prototype[E]=function(){return this};b.prototype.next=function(a){a=this.index++;var c=this.array;return a<this.length?{value:c[a],done:!1}:{value:null,done:!0}};
  122. b.prototype.hasValue=function(){return this.array.length>this.index};b.prototype.hasCompleted=function(){return this.array.length===this.index};return b}(),Rf=function(b){function a(c,a,e){c=b.call(this,c)||this;c.parent=a;c.observable=e;c.stillUnsubscribed=!0;c.buffer=[];c.isComplete=!1;return c}h(a,b);a.prototype[E]=function(){return this};a.prototype.next=function(){var c=this.buffer;return 0===c.length&&this.isComplete?{value:null,done:!0}:{value:c.shift(),done:!1}};a.prototype.hasValue=function(){return 0<
  123. this.buffer.length};a.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete};a.prototype.notifyComplete=function(){0<this.buffer.length?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()};a.prototype.notifyNext=function(c,a,b,f,k){this.buffer.push(a);this.parent.checkIterators()};a.prototype.subscribe=function(c,a){return n(this,this.observable,this,a)};return a}(p),Sf="undefined"!==typeof self&&"undefined"!==typeof WorkerGlobalScope&&self instanceof
  124. WorkerGlobalScope&&self,Tf="undefined"!==typeof global&&global,B="undefined"!==typeof window&&window||Tf||Sf;if(!B)throw Error("RxJS could not find any global context (window, self, global)");var Zd=A(function(b,a){return b.response}),N=function(b){function a(c){var a=b.call(this)||this,e={async:!0,createXHR:function(){var c;if(this.crossDomain)if(B.XMLHttpRequest)c=new B.XMLHttpRequest;else if(B.XDomainRequest)c=new B.XDomainRequest;else throw Error("CORS is not supported by your browser");else if(B.XMLHttpRequest)c=
  125. new B.XMLHttpRequest;else{var a=void 0;try{for(var b=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],d=0;3>d;d++)try{a=b[d];new B.ActiveXObject(a);break}catch(t){}c=new B.ActiveXObject(a)}catch(t){throw Error("XMLHttpRequest is not supported by your browser");}}return c},crossDomain:!0,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"===typeof c)e.url=c;else for(var f in c)c.hasOwnProperty(f)&&(e[f]=c[f]);a.request=e;return a}h(a,b);a.prototype._subscribe=
  126. function(c){return new Uf(c,this.request)};a.create=function(){var c=function(c){return new a(c)};c.get=Td;c.post=Ud;c.delete=Vd;c.put=Wd;c.patch=Xd;c.getJSON=Yd;return c}();return a}(g),Uf=function(b){function a(c,a){c=b.call(this,c)||this;c.request=a;c.done=!1;var d=a.headers=a.headers||{};a.crossDomain||c.getHeader(d,"X-Requested-With")||(d["X-Requested-With"]="XMLHttpRequest");c.getHeader(d,"Content-Type")||B.FormData&&a.body instanceof B.FormData||"undefined"===typeof a.body||(d["Content-Type"]=
  127. "application/x-www-form-urlencoded; charset\x3dUTF-8");a.body=c.serializeBody(a.body,c.getHeader(a.headers,"Content-Type"));c.send();return c}h(a,b);a.prototype.next=function(c){this.done=!0;var a=this.xhr,b=this.request,f=this.destination,k;try{k=new Oa(c,a,b)}catch(y){return f.error(y)}f.next(k)};a.prototype.send=function(){var c=this.request,a=this.request,b=a.user,f=a.method,k=a.url,g=a.async,h=a.password,l=a.headers,a=a.body;try{var t=this.xhr=c.createXHR();this.setupEvents(t,c);b?t.open(f,k,
  128. g,b,h):t.open(f,k,g);g&&(t.timeout=c.timeout,t.responseType=c.responseType);"withCredentials"in t&&(t.withCredentials=!!c.withCredentials);this.setHeaders(t,l);a?t.send(a):t.send()}catch(Id){this.error(Id)}};a.prototype.serializeBody=function(c,a){if(!c||"string"===typeof c||B.FormData&&c instanceof B.FormData)return c;if(a){var b=a.indexOf(";");-1!==b&&(a=a.substring(0,b))}switch(a){case "application/x-www-form-urlencoded":return Object.keys(c).map(function(a){return encodeURIComponent(a)+"\x3d"+
  129. encodeURIComponent(c[a])}).join("\x26");case "application/json":return JSON.stringify(c);default:return c}};a.prototype.setHeaders=function(c,a){for(var b in a)a.hasOwnProperty(b)&&c.setRequestHeader(b,a[b])};a.prototype.getHeader=function(c,a){for(var b in c)if(b.toLowerCase()===a.toLowerCase())return c[b]};a.prototype.setupEvents=function(c,a){function b(c){var a=b.subscriber,d=b.progressSubscriber,e=b.request;d&&d.error(c);var f;try{f=new Pa(this,e)}catch(Qa){f=Qa}a.error(f)}function d(c){}function k(c){var a=
  130. k.subscriber,b=k.progressSubscriber,d=k.request;if(4===this.readyState){var e=1223===this.status?204:this.status,f="text"===this.responseType?this.response||this.responseText:this.response;0===e&&(e=f?200:0);if(400>e)b&&b.complete(),a.next(c),a.complete();else{b&&b.error(c);c=void 0;try{c=new ka("ajax error "+e,this,d)}catch(Vf){c=Vf}a.error(c)}}}var g=a.progressSubscriber;c.ontimeout=b;b.request=a;b.subscriber=this;b.progressSubscriber=g;if(c.upload&&"withCredentials"in c){if(g){var h;h=function(c){h.progressSubscriber.next(c)};
  131. B.XDomainRequest?c.onprogress=h:c.upload.onprogress=h;h.progressSubscriber=g}var l;l=function(c){var a=l.progressSubscriber,b=l.subscriber,d=l.request;a&&a.error(c);var e;try{e=new ka("ajax error",this,d)}catch(Qa){e=Qa}b.error(e)};c.onerror=l;l.request=a;l.subscriber=this;l.progressSubscriber=g}c.onreadystatechange=d;d.subscriber=this;d.progressSubscriber=g;d.request=a;c.onload=k;k.subscriber=this;k.progressSubscriber=g;k.request=a};a.prototype.unsubscribe=function(){var c=this.xhr;!this.done&&c&&
  132. 4!==c.readyState&&"function"===typeof c.abort&&c.abort();b.prototype.unsubscribe.call(this)};return a}(l),Oa=function(){return function(b,a,c){this.originalEvent=b;this.xhr=a;this.request=c;this.status=a.status;this.responseType=a.responseType||c.responseType;this.response=kb(this.responseType,a)}}(),ka=function(){function b(a,c,b){Error.call(this);this.message=a;this.name="AjaxError";this.xhr=c;this.request=b;this.status=c.status;this.responseType=c.responseType||b.responseType;this.response=kb(this.responseType,
  133. c);return this}b.prototype=Object.create(Error.prototype);return b}(),Pa=function(b,a){ka.call(this,"ajax timeout",b,a);this.name="AjaxTimeoutError";return this},od=N.create,Wf={url:"",deserializer:function(b){return JSON.parse(b.data)},serializer:function(b){return JSON.stringify(b)}},mb=function(b){function a(c,a){var d=b.call(this)||this;if(c instanceof g)d.destination=a,d.source=c;else{a=d._config=rf({},Wf);d._output=new u;if("string"===typeof c)a.url=c;else for(var f in c)c.hasOwnProperty(f)&&
  134. (a[f]=c[f]);if(!a.WebSocketCtor&&WebSocket)a.WebSocketCtor=WebSocket;else if(!a.WebSocketCtor)throw Error("no WebSocket constructor can be found");d.destination=new aa}return d}h(a,b);a.prototype.lift=function(c){var b=new a(this._config,this.destination);b.operator=c;b.source=this;return b};a.prototype._resetState=function(){this._socket=null;this.source||(this.destination=new aa);this._output=new u};a.prototype.multiplex=function(c,a,b){var d=this;return new g(function(e){try{d.next(c())}catch(z){e.error(z)}var f=
  135. d.subscribe(function(c){try{b(c)&&e.next(c)}catch(L){e.error(L)}},function(c){return e.error(c)},function(){return e.complete()});return function(){try{d.next(a())}catch(z){e.error(z)}f.unsubscribe()}})};a.prototype._connectSocket=function(){var c=this,a=this._config,b=a.WebSocketCtor,f=a.protocol,k=a.url,a=a.binaryType,g=this._output,h=null;try{this._socket=h=f?new b(k,f):new b(k),a&&(this._socket.binaryType=a)}catch(t){g.error(t);return}var m=new r(function(){c._socket=null;h&&1===h.readyState&&
  136. h.close()});h.onopen=function(a){if(c._socket){var b=c._config.openObserver;b&&b.next(a);a=c.destination;c.destination=l.create(function(a){if(1===h.readyState)try{var b=c._config.serializer;h.send(b(a))}catch(Kd){c.destination.error(Kd)}},function(a){var b=c._config.closingObserver;b&&b.next(void 0);a&&a.code?h.close(a.code,a.reason):g.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }"));c._resetState()},
  137. function(){var a=c._config.closingObserver;a&&a.next(void 0);h.close();c._resetState()});a&&a instanceof aa&&m.add(a.subscribe(c.destination))}else h.close(),c._resetState()};h.onerror=function(a){c._resetState();g.error(a)};h.onclose=function(a){c._resetState();var b=c._config.closeObserver;b&&b.next(a);a.wasClean?g.complete():g.error(a)};h.onmessage=function(a){try{var b=c._config.deserializer;g.next(b(a))}catch(Jd){g.error(Jd)}}};a.prototype._subscribe=function(c){var a=this,b=this.source;if(b)return b.subscribe(c);
  138. this._socket||this._connectSocket();this._output.subscribe(c);c.add(function(){var c=a._socket;0===a._output.observers.length&&(c&&1===c.readyState&&c.close(),a._resetState())});return c};a.prototype.unsubscribe=function(){var c=this._socket;c&&1===c.readyState&&c.close();this._resetState();b.prototype.unsubscribe.call(this)};return a}(ua),Xf=function(b){function a(c,a,e){void 0===a&&(a=0);void 0===e&&(e=va);var d=b.call(this)||this;d.source=c;d.delayTime=a;d.scheduler=e;if(!I(a)||0>a)d.delayTime=
  139. 0;e&&"function"===typeof e.schedule||(d.scheduler=va);return d}h(a,b);a.create=function(c,b,e){void 0===b&&(b=0);void 0===e&&(e=va);return new a(c,b,e)};a.dispatch=function(c){return this.add(c.source.subscribe(c.subscriber))};a.prototype._subscribe=function(c){return this.scheduler.schedule(a.dispatch,this.delayTime,{source:this.source,subscriber:c})};return a}(g),ob=function(){return function(b,a){this.value=b;this.timestamp=a}}(),$d=function(){function b(a,c,b){void 0===b&&(b=!1);this.accumulator=
  140. a;this.seed=c;this.hasSeed=b}b.prototype.call=function(a,c){return c.subscribe(new Yf(a,this.accumulator,this.seed,this.hasSeed))};return b}(),Yf=function(b){function a(c,a,e,f){c=b.call(this,c)||this;c.accumulator=a;c._seed=e;c.hasSeed=f;c.index=0;return c}h(a,b);Object.defineProperty(a.prototype,"seed",{get:function(){return this._seed},set:function(c){this.hasSeed=!0;this._seed=c},enumerable:!0,configurable:!0});a.prototype._next=function(c){if(this.hasSeed)return this._tryNext(c);this.seed=c;
  141. this.destination.next(c)};a.prototype._tryNext=function(c){var a=this.index++,b;try{b=this.accumulator(this.seed,c,a)}catch(f){this.destination.error(f)}this.seed=b;this.destination.next(b)};return a}(l),qb=function(){return function(b,a){this.value=b;this.interval=a}}(),pa={leading:!0,trailing:!1},ae=function(){function b(a,c,b){this.durationSelector=a;this.leading=c;this.trailing=b}b.prototype.call=function(a,c){return c.subscribe(new Zf(a,this.durationSelector,this.leading,this.trailing))};return b}(),
  142. Zf=function(b){function a(c,a,e,f){var d=b.call(this,c)||this;d.destination=c;d.durationSelector=a;d._leading=e;d._trailing=f;d._hasValue=!1;return d}h(a,b);a.prototype._next=function(c){this._hasValue=!0;this._sendValue=c;this._throttled||(this._leading?this.send():this.throttle(c))};a.prototype.send=function(){var c=this._sendValue;this._hasValue&&(this.destination.next(c),this.throttle(c));this._hasValue=!1;this._sendValue=null};a.prototype.throttle=function(c){(c=this.tryDurationSelector(c))&&
  143. this.add(this._throttled=n(this,c))};a.prototype.tryDurationSelector=function(c){try{return this.durationSelector(c)}catch(d){return this.destination.error(d),null}};a.prototype.throttlingDone=function(){var c=this._throttled,a=this._trailing;c&&c.unsubscribe();this._throttled=null;a&&this.send()};a.prototype.notifyNext=function(c,a,b,f,g){this.throttlingDone()};a.prototype.notifyComplete=function(){this.throttlingDone()};return a}(p);g.bindCallback=Za;g.bindNodeCallback=$a;g.combineLatest=function(){for(var b=
  144. [],a=0;a<arguments.length;a++)b[a]=arguments[a];var c=a=null;w(b[b.length-1])&&(c=b.pop());"function"===typeof b[b.length-1]&&(a=b.pop());1===b.length&&x(b[0])&&(b=b[0]);return ea(b,c).lift(new qa(a))};g.concat=V;g.defer=Da;g.empty=R;g.forkJoin=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];if(1===b.length){var c=b[0];if(x(c))return oa(c,null);if(wa(c)&&Object.getPrototypeOf(c)===Object.prototype)return b=Object.keys(c),oa(b.map(function(a){return c[a]}),b)}if("function"===typeof b[b.length-
  145. 1]){var d=b.pop(),b=1===b.length&&x(b[0])?b[0]:b;return oa(b,null).pipe(A(function(c){return d.apply(void 0,c)}))}return oa(b,null)};g.from=F;g.fromEvent=eb;g.fromEventPattern=gb;g.fromPromise=F;g.generate=function(b,a,c,d,e){var f,k;1==arguments.length?(k=b.initialState,a=b.condition,c=b.iterate,f=b.resultSelector||S,e=b.scheduler):void 0===d||w(d)?(k=b,f=S,e=d):(k=b,f=d);return new g(function(b){var d=k;if(e)return e.schedule(Ld,0,{subscriber:b,iterate:c,condition:a,resultSelector:f,state:d});do{if(a){var g=
  146. void 0;try{g=a(d)}catch(t){b.error(t);break}if(!g){b.complete();break}}g=void 0;try{g=f(d)}catch(t){b.error(t);break}b.next(g);if(b.closed)break;try{d=c(d)}catch(t){b.error(t);break}}while(1)})};g.if=function(b,a,c){void 0===a&&(a=da);void 0===c&&(c=da);return Da(function(){return b()?a:c})};g.interval=function(b,a){void 0===b&&(b=0);void 0===a&&(a=q);if(!I(b)||0>b)b=0;a&&"function"===typeof a.schedule||(a=q);return new g(function(c){c.add(a.schedule(Md,b,{subscriber:c,counter:0,period:b}));return c})};
  147. g.merge=Ea;g.race=hb;g.never=function(){return Lf};g.of=fa;g.onErrorResumeNext=Fa;g.pairs=function(b,a){return a?new g(function(c){var d=Object.keys(b),e=new r;e.add(a.schedule(Nd,0,{keys:d,index:0,subscriber:c,subscription:e,obj:b}));return e}):new g(function(c){for(var a=Object.keys(b),e=0;e<a.length&&!c.closed;e++){var f=a[e];b.hasOwnProperty(f)&&c.next([f,b[f]])}c.complete()})};g.range=function(b,a,c){void 0===b&&(b=0);return new g(function(d){void 0===a&&(a=b,b=0);var e=0,f=b;if(c)return c.schedule(Rd,
  148. 0,{index:e,count:a,start:b,subscriber:d});do{if(e++>=a){d.complete();break}d.next(f++);if(d.closed)break}while(1)})};g.using=function(b,a){return new g(function(c){var d;try{d=b()}catch(k){c.error(k);return}var e;try{e=a(d)}catch(k){c.error(k);return}var f=(e?F(e):da).subscribe(c);return function(){f.unsubscribe();d&&d.unsubscribe()}})};g.throw=ma;g.throwError=ma;g.timer=ib;g.zip=Ga;var $f=Object.freeze({ajax:od,AjaxResponse:Oa,AjaxError:ka,AjaxTimeoutError:Pa});g.ajax=od;var ag=Object.freeze({webSocket:lb,
  149. WebSocketSubject:mb});g.webSocket=lb;var be=function(){function b(a){this.durationSelector=a}b.prototype.call=function(a,c){return c.subscribe(new bg(a,this.durationSelector))};return b}(),bg=function(b){function a(c,a){c=b.call(this,c)||this;c.durationSelector=a;c.hasValue=!1;return c}h(a,b);a.prototype._next=function(c){this.value=c;this.hasValue=!0;if(!this.throttled){var a=void 0;try{var b=this.durationSelector,a=b(c)}catch(f){return this.destination.error(f)}c=n(this,a);!c||c.closed?this.clearThrottle():
  150. this.add(this.throttled=c)}};a.prototype.clearThrottle=function(){var c=this.value,a=this.hasValue,b=this.throttled;b&&(this.remove(b),this.throttled=null,b.unsubscribe());a&&(this.value=null,this.hasValue=!1,this.destination.next(c))};a.prototype.notifyNext=function(c,a,b,f){this.clearThrottle()};a.prototype.notifyComplete=function(){this.clearThrottle()};return a}(p),ce=function(){function b(a){this.closingNotifier=a}b.prototype.call=function(a,c){return c.subscribe(new cg(a,this.closingNotifier))};
  151. return b}(),cg=function(b){function a(c,a){c=b.call(this,c)||this;c.buffer=[];c.add(n(c,a));return c}h(a,b);a.prototype._next=function(c){this.buffer.push(c)};a.prototype.notifyNext=function(c,a,b,f,g){c=this.buffer;this.buffer=[];this.destination.next(c)};return a}(p),de=function(){function b(a,c){this.bufferSize=a;this.subscriberClass=(this.startBufferEvery=c)&&a!==c?dg:eg}b.prototype.call=function(a,c){return c.subscribe(new this.subscriberClass(a,this.bufferSize,this.startBufferEvery))};return b}(),
  152. eg=function(b){function a(c,a){c=b.call(this,c)||this;c.bufferSize=a;c.buffer=[];return c}h(a,b);a.prototype._next=function(c){var a=this.buffer;a.push(c);a.length==this.bufferSize&&(this.destination.next(a),this.buffer=[])};a.prototype._complete=function(){var c=this.buffer;0<c.length&&this.destination.next(c);b.prototype._complete.call(this)};return a}(l),dg=function(b){function a(c,a,e){c=b.call(this,c)||this;c.bufferSize=a;c.startBufferEvery=e;c.buffers=[];c.count=0;return c}h(a,b);a.prototype._next=
  153. function(c){var a=this.bufferSize,b=this.startBufferEvery,f=this.buffers,g=this.count;this.count++;0===g%b&&f.push([]);for(b=f.length;b--;)g=f[b],g.push(c),g.length===a&&(f.splice(b,1),this.destination.next(g))};a.prototype._complete=function(){for(var c=this.buffers,a=this.destination;0<c.length;){var e=c.shift();0<e.length&&a.next(e)}b.prototype._complete.call(this)};return a}(l),ee=function(){function b(a,c,b,e){this.bufferTimeSpan=a;this.bufferCreationInterval=c;this.maxBufferSize=b;this.scheduler=
  154. e}b.prototype.call=function(a,c){return c.subscribe(new fg(a,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))};return b}(),gg=function(){return function(){this.buffer=[]}}(),fg=function(b){function a(c,a,e,f,g){c=b.call(this,c)||this;c.bufferTimeSpan=a;c.bufferCreationInterval=e;c.maxBufferSize=f;c.scheduler=g;c.contexts=[];f=c.openContext();c.timespanOnly=null==e||0>e;if(c.timespanOnly)c.add(f.closeAction=g.schedule(xb,a,{subscriber:c,context:f,bufferTimeSpan:a}));
  155. else{var d={bufferTimeSpan:a,bufferCreationInterval:e,subscriber:c,scheduler:g};c.add(f.closeAction=g.schedule(yb,a,{subscriber:c,context:f}));c.add(g.schedule(fe,e,d))}return c}h(a,b);a.prototype._next=function(c){for(var a=this.contexts,b=a.length,f,g=0;g<b;g++){var h=a[g],l=h.buffer;l.push(c);l.length==this.maxBufferSize&&(f=h)}if(f)this.onBufferFull(f)};a.prototype._error=function(c){this.contexts.length=0;b.prototype._error.call(this,c)};a.prototype._complete=function(){for(var c=this.contexts,
  156. a=this.destination;0<c.length;){var e=c.shift();a.next(e.buffer)}b.prototype._complete.call(this)};a.prototype._unsubscribe=function(){this.contexts=null};a.prototype.onBufferFull=function(c){this.closeContext(c);c=c.closeAction;c.unsubscribe();this.remove(c);if(!this.closed&&this.timespanOnly){c=this.openContext();var a=this.bufferTimeSpan;this.add(c.closeAction=this.scheduler.schedule(xb,a,{subscriber:this,context:c,bufferTimeSpan:a}))}};a.prototype.openContext=function(){var c=new gg;this.contexts.push(c);
  157. return c};a.prototype.closeContext=function(c){this.destination.next(c.buffer);var a=this.contexts;0<=(a?a.indexOf(c):-1)&&a.splice(a.indexOf(c),1)};return a}(l),ge=function(){function b(a,c){this.openings=a;this.closingSelector=c}b.prototype.call=function(a,c){return c.subscribe(new hg(a,this.openings,this.closingSelector))};return b}(),hg=function(b){function a(c,a,e){c=b.call(this,c)||this;c.openings=a;c.closingSelector=e;c.contexts=[];c.add(n(c,a));return c}h(a,b);a.prototype._next=function(c){for(var a=
  158. this.contexts,b=a.length,f=0;f<b;f++)a[f].buffer.push(c)};a.prototype._error=function(c){for(var a=this.contexts;0<a.length;){var e=a.shift();e.subscription.unsubscribe();e.buffer=null;e.subscription=null}this.contexts=null;b.prototype._error.call(this,c)};a.prototype._complete=function(){for(var c=this.contexts;0<c.length;){var a=c.shift();this.destination.next(a.buffer);a.subscription.unsubscribe();a.buffer=null;a.subscription=null}this.contexts=null;b.prototype._complete.call(this)};a.prototype.notifyNext=
  159. function(c,a,b,f,g){c?this.closeBuffer(c):this.openBuffer(a)};a.prototype.notifyComplete=function(c){this.closeBuffer(c.context)};a.prototype.openBuffer=function(c){try{var a=this.closingSelector.call(this,c);a&&this.trySubscribe(a)}catch(e){this._error(e)}};a.prototype.closeBuffer=function(c){var a=this.contexts;if(a&&c){var b=c.subscription;this.destination.next(c.buffer);a.splice(a.indexOf(c),1);this.remove(b);b.unsubscribe()}};a.prototype.trySubscribe=function(a){var c=this.contexts,b=new r,f=
  160. {buffer:[],subscription:b};c.push(f);a=n(this,a,f);!a||a.closed?this.closeBuffer(f):(a.context=f,this.add(a),b.add(a))};return a}(p),he=function(){function b(a){this.closingSelector=a}b.prototype.call=function(a,c){return c.subscribe(new ig(a,this.closingSelector))};return b}(),ig=function(b){function a(a,d){a=b.call(this,a)||this;a.closingSelector=d;a.subscribing=!1;a.openBuffer();return a}h(a,b);a.prototype._next=function(a){this.buffer.push(a)};a.prototype._complete=function(){var a=this.buffer;
  161. a&&this.destination.next(a);b.prototype._complete.call(this)};a.prototype._unsubscribe=function(){this.buffer=null;this.subscribing=!1};a.prototype.notifyNext=function(a,b,e,f,g){this.openBuffer()};a.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()};a.prototype.openBuffer=function(){var a=this.closingSubscription;a&&(this.remove(a),a.unsubscribe());(a=this.buffer)&&this.destination.next(a);this.buffer=[];var b;try{var e=this.closingSelector;b=e()}catch(f){return this.error(f)}this.closingSubscription=
  162. a=new r;this.add(a);this.subscribing=!0;a.add(n(this,b));this.subscribing=!1};return a}(p),ie=function(){function b(a){this.selector=a}b.prototype.call=function(a,c){return c.subscribe(new jg(a,this.selector,this.caught))};return b}(),jg=function(b){function a(a,d,e){a=b.call(this,a)||this;a.selector=d;a.caught=e;return a}h(a,b);a.prototype.error=function(a){if(!this.isStopped){var c=void 0;try{c=this.selector(a,this.caught)}catch(e){b.prototype.error.call(this,e);return}this._unsubscribeAndRecycle();
  163. a=new G(this,void 0,void 0);this.add(a);c=n(this,c,void 0,void 0,a);c!==a&&this.add(c)}};return a}(p),je=function(){function b(a,c){this.predicate=a;this.source=c}b.prototype.call=function(a,c){return c.subscribe(new kg(a,this.predicate,this.source))};return b}(),kg=function(b){function a(a,d,e){a=b.call(this,a)||this;a.predicate=d;a.source=e;a.count=0;a.index=0;return a}h(a,b);a.prototype._next=function(a){this.predicate?this._tryPredicate(a):this.count++};a.prototype._tryPredicate=function(a){var c;
  164. try{c=this.predicate(a,this.index++,this.source)}catch(e){this.destination.error(e);return}c&&this.count++};a.prototype._complete=function(){this.destination.next(this.count);this.destination.complete()};return a}(l),ke=function(){function b(a){this.durationSelector=a}b.prototype.call=function(a,c){return c.subscribe(new lg(a,this.durationSelector))};return b}(),lg=function(b){function a(a,d){a=b.call(this,a)||this;a.durationSelector=d;a.hasValue=!1;a.durationSubscription=null;return a}h(a,b);a.prototype._next=
  165. function(a){try{var c=this.durationSelector.call(this,a);c&&this._tryNext(a,c)}catch(e){this.destination.error(e)}};a.prototype._complete=function(){this.emitValue();this.destination.complete()};a.prototype._tryNext=function(a,b){var c=this.durationSubscription;this.value=a;this.hasValue=!0;c&&(c.unsubscribe(),this.remove(c));(c=n(this,b))&&!c.closed&&this.add(this.durationSubscription=c)};a.prototype.notifyNext=function(a,b,e,f,g){this.emitValue()};a.prototype.notifyComplete=function(){this.emitValue()};
  166. a.prototype.emitValue=function(){if(this.hasValue){var a=this.value,d=this.durationSubscription;d&&(this.durationSubscription=null,d.unsubscribe(),this.remove(d));this.value=null;this.hasValue=!1;b.prototype._next.call(this,a)}};return a}(p),le=function(){function b(a,c){this.dueTime=a;this.scheduler=c}b.prototype.call=function(a,c){return c.subscribe(new mg(a,this.dueTime,this.scheduler))};return b}(),mg=function(b){function a(a,d,e){a=b.call(this,a)||this;a.dueTime=d;a.scheduler=e;a.debouncedSubscription=
  167. null;a.lastValue=null;a.hasValue=!1;return a}h(a,b);a.prototype._next=function(a){this.clearDebounce();this.lastValue=a;this.hasValue=!0;this.add(this.debouncedSubscription=this.scheduler.schedule(me,this.dueTime,this))};a.prototype._complete=function(){this.debouncedNext();this.destination.complete()};a.prototype.debouncedNext=function(){this.clearDebounce();if(this.hasValue){var a=this.lastValue;this.lastValue=null;this.hasValue=!1;this.destination.next(a)}};a.prototype.clearDebounce=function(){var a=
  168. this.debouncedSubscription;null!==a&&(this.remove(a),a.unsubscribe(),this.debouncedSubscription=null)};return a}(l),ne=function(){function b(a){this.defaultValue=a}b.prototype.call=function(a,c){return c.subscribe(new ng(a,this.defaultValue))};return b}(),ng=function(b){function a(a,d){a=b.call(this,a)||this;a.defaultValue=d;a.isEmpty=!0;return a}h(a,b);a.prototype._next=function(a){this.isEmpty=!1;this.destination.next(a)};a.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue);
  169. this.destination.complete()};return a}(l),oe=function(){function b(a,c){this.delay=a;this.scheduler=c}b.prototype.call=function(a,c){return c.subscribe(new og(a,this.delay,this.scheduler))};return b}(),og=function(b){function a(a,d,e){a=b.call(this,a)||this;a.delay=d;a.scheduler=e;a.queue=[];a.active=!1;a.errored=!1;return a}h(a,b);a.dispatch=function(a){for(var c=a.source,b=c.queue,f=a.scheduler,g=a.destination;0<b.length&&0>=b[0].time-f.now();)b.shift().notification.observe(g);0<b.length?(c=Math.max(0,
  170. b[0].time-f.now()),this.schedule(a,c)):(this.unsubscribe(),c.active=!1)};a.prototype._schedule=function(c){this.active=!0;this.destination.add(c.schedule(a.dispatch,this.delay,{source:this,destination:this.destination,scheduler:c}))};a.prototype.scheduleNotification=function(a){if(!0!==this.errored){var c=this.scheduler;a=new pg(c.now()+this.delay,a);this.queue.push(a);!1===this.active&&this._schedule(c)}};a.prototype._next=function(a){this.scheduleNotification(v.createNext(a))};a.prototype._error=
  171. function(a){this.errored=!0;this.queue=[];this.destination.error(a);this.unsubscribe()};a.prototype._complete=function(){this.scheduleNotification(v.createComplete());this.unsubscribe()};return a}(l),pg=function(){return function(b,a){this.time=b;this.notification=a}}(),Jb=function(){function b(a){this.delayDurationSelector=a}b.prototype.call=function(a,c){return c.subscribe(new qg(a,this.delayDurationSelector))};return b}(),qg=function(b){function a(a,d){a=b.call(this,a)||this;a.delayDurationSelector=
  172. d;a.completed=!1;a.delayNotifierSubscriptions=[];a.index=0;return a}h(a,b);a.prototype.notifyNext=function(a,b,e,f,g){this.destination.next(a);this.removeSubscription(g);this.tryComplete()};a.prototype.notifyError=function(a,b){this._error(a)};a.prototype.notifyComplete=function(a){(a=this.removeSubscription(a))&&this.destination.next(a);this.tryComplete()};a.prototype._next=function(a){var c=this.index++;try{var b=this.delayDurationSelector(a,c);b&&this.tryDelay(b,a)}catch(f){this.destination.error(f)}};
  173. a.prototype._complete=function(){this.completed=!0;this.tryComplete();this.unsubscribe()};a.prototype.removeSubscription=function(a){a.unsubscribe();var c=this.delayNotifierSubscriptions.indexOf(a);-1!==c&&this.delayNotifierSubscriptions.splice(c,1);return a.outerValue};a.prototype.tryDelay=function(a,b){(a=n(this,a,b))&&!a.closed&&(this.destination.add(a),this.delayNotifierSubscriptions.push(a))};a.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()};
  174. return a}(p),pe=function(b){function a(a,d){var c=b.call(this)||this;c.source=a;c.subscriptionDelay=d;return c}h(a,b);a.prototype._subscribe=function(a){this.subscriptionDelay.subscribe(new rg(a,this.source))};return a}(g),rg=function(b){function a(a,d){var c=b.call(this)||this;c.parent=a;c.source=d;c.sourceSubscribed=!1;return c}h(a,b);a.prototype._next=function(a){this.subscribeToSource()};a.prototype._error=function(a){this.unsubscribe();this.parent.error(a)};a.prototype._complete=function(){this.unsubscribe();
  175. this.subscribeToSource()};a.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))};return a}(l),qe=function(){function b(){}b.prototype.call=function(a,c){return c.subscribe(new sg(a))};return b}(),sg=function(b){function a(a){return b.call(this,a)||this}h(a,b);a.prototype._next=function(a){a.observe(this.destination)};return a}(l),re=function(){function b(a,c){this.keySelector=a;this.flushes=c}b.prototype.call=
  176. function(a,c){return c.subscribe(new tg(a,this.keySelector,this.flushes))};return b}(),tg=function(b){function a(a,d,e){a=b.call(this,a)||this;a.keySelector=d;a.values=new Set;e&&a.add(n(a,e));return a}h(a,b);a.prototype.notifyNext=function(a,b,e,f,g){this.values.clear()};a.prototype.notifyError=function(a,b){this._error(a)};a.prototype._next=function(a){this.keySelector?this._useKeySelector(a):this._finalizeNext(a,a)};a.prototype._useKeySelector=function(a){var c,b=this.destination;try{c=this.keySelector(a)}catch(f){b.error(f);
  177. return}this._finalizeNext(c,a)};a.prototype._finalizeNext=function(a,b){var c=this.values;c.has(a)||(c.add(a),this.destination.next(b))};return a}(p),se=function(){function b(a,c){this.compare=a;this.keySelector=c}b.prototype.call=function(a,c){return c.subscribe(new ug(a,this.compare,this.keySelector))};return b}(),ug=function(b){function a(a,d,e){a=b.call(this,a)||this;a.keySelector=e;a.hasKey=!1;"function"===typeof d&&(a.compare=d);return a}h(a,b);a.prototype.compare=function(a,b){return a===b};
  178. a.prototype._next=function(a){var c;try{var b=this.keySelector;c=b?b(a):a}catch(k){return this.destination.error(k)}b=!1;if(this.hasKey)try{var f=this.compare,b=f(this.key,c)}catch(k){return this.destination.error(k)}else this.hasKey=!0;b||(this.key=c,this.destination.next(a))};return a}(l),ue=function(){function b(a){this.errorFactory=a}b.prototype.call=function(a,c){return c.subscribe(new vg(a,this.errorFactory))};return b}(),vg=function(b){function a(a,d){a=b.call(this,a)||this;a.errorFactory=
  179. d;a.hasValue=!1;return a}h(a,b);a.prototype._next=function(a){this.hasValue=!0;this.destination.next(a)};a.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var a=void 0;try{a=this.errorFactory()}catch(d){a=d}this.destination.error(a)};return a}(l),ve=function(){function b(a){this.total=a;if(0>this.total)throw new Y;}b.prototype.call=function(a,c){return c.subscribe(new wg(a,this.total))};return b}(),wg=function(b){function a(a,d){a=b.call(this,a)||this;a.total=d;
  180. a.count=0;return a}h(a,b);a.prototype._next=function(a){var c=this.total,b=++this.count;b<=c&&(this.destination.next(a),b===c&&(this.destination.complete(),this.unsubscribe()))};return a}(l),we=function(){function b(a,c,b){this.predicate=a;this.thisArg=c;this.source=b}b.prototype.call=function(a,c){return c.subscribe(new xg(a,this.predicate,this.thisArg,this.source))};return b}(),xg=function(b){function a(a,d,e,f){a=b.call(this,a)||this;a.predicate=d;a.thisArg=e;a.source=f;a.index=0;a.thisArg=e||
  181. a;return a}h(a,b);a.prototype.notifyComplete=function(a){this.destination.next(a);this.destination.complete()};a.prototype._next=function(a){var c=!1;try{c=this.predicate.call(this.thisArg,a,this.index++,this.source)}catch(e){this.destination.error(e);return}c||this.notifyComplete(!1)};a.prototype._complete=function(){this.notifyComplete(!0)};return a}(l),xe=function(){function b(){}b.prototype.call=function(a,c){return c.subscribe(new yg(a))};return b}(),yg=function(b){function a(a){a=b.call(this,
  182. a)||this;a.hasCompleted=!1;a.hasSubscription=!1;return a}h(a,b);a.prototype._next=function(a){this.hasSubscription||(this.hasSubscription=!0,this.add(n(this,a)))};a.prototype._complete=function(){this.hasCompleted=!0;this.hasSubscription||this.destination.complete()};a.prototype.notifyComplete=function(a){this.remove(a);this.hasSubscription=!1;this.hasCompleted&&this.destination.complete()};return a}(p),ye=function(){function b(a){this.project=a}b.prototype.call=function(a,c){return c.subscribe(new zg(a,
  183. this.project))};return b}(),zg=function(b){function a(a,d){a=b.call(this,a)||this;a.project=d;a.hasSubscription=!1;a.hasCompleted=!1;a.index=0;return a}h(a,b);a.prototype._next=function(a){this.hasSubscription||this.tryNext(a)};a.prototype.tryNext=function(a){var c,b=this.index++;try{c=this.project(a,b)}catch(f){this.destination.error(f);return}this.hasSubscription=!0;this._innerSub(c,a,b)};a.prototype._innerSub=function(a,b,e){b=new G(this,b,e);e=this.destination;e.add(b);a=n(this,a,void 0,void 0,
  184. b);a!==b&&e.add(a)};a.prototype._complete=function(){this.hasCompleted=!0;this.hasSubscription||this.destination.complete();this.unsubscribe()};a.prototype.notifyNext=function(a,b,e,f,g){this.destination.next(b)};a.prototype.notifyError=function(a){this.destination.error(a)};a.prototype.notifyComplete=function(a){this.destination.remove(a);this.hasSubscription=!1;this.hasCompleted&&this.destination.complete()};return a}(p),ze=function(){function b(a,c,b){this.project=a;this.concurrent=c;this.scheduler=
  185. b}b.prototype.call=function(a,c){return c.subscribe(new Ag(a,this.project,this.concurrent,this.scheduler))};return b}(),Ag=function(b){function a(a,d,e,f){a=b.call(this,a)||this;a.project=d;a.concurrent=e;a.scheduler=f;a.index=0;a.active=0;a.hasCompleted=!1;e<Number.POSITIVE_INFINITY&&(a.buffer=[]);return a}h(a,b);a.dispatch=function(a){a.subscriber.subscribeToProjection(a.result,a.value,a.index)};a.prototype._next=function(c){var b=this.destination;if(b.closed)this._complete();else{var e=this.index++;
  186. if(this.active<this.concurrent){b.next(c);try{var f=this.project,g=f(c,e);this.scheduler?this.destination.add(this.scheduler.schedule(a.dispatch,0,{subscriber:this,result:g,value:c,index:e})):this.subscribeToProjection(g,c,e)}catch(y){b.error(y)}}else this.buffer.push(c)}};a.prototype.subscribeToProjection=function(a,b,e){this.active++;this.destination.add(n(this,a,b,e))};a.prototype._complete=function(){(this.hasCompleted=!0,0===this.active)&&this.destination.complete();this.unsubscribe()};a.prototype.notifyNext=
  187. function(a,b,e,f,g){this._next(b)};a.prototype.notifyComplete=function(a){var c=this.buffer;this.destination.remove(a);this.active--;c&&0<c.length&&this._next(c.shift());this.hasCompleted&&0===this.active&&this.destination.complete()};return a}(p),Ae=function(){function b(a){this.callback=a}b.prototype.call=function(a,c){return c.subscribe(new Bg(a,this.callback))};return b}(),Bg=function(b){function a(a,d){a=b.call(this,a)||this;a.add(new r(d));return a}h(a,b);return a}(l),Tb=function(){function b(a,
  188. c,b,e){this.predicate=a;this.source=c;this.yieldIndex=b;this.thisArg=e}b.prototype.call=function(a,c){return c.subscribe(new Cg(a,this.predicate,this.source,this.yieldIndex,this.thisArg))};return b}(),Cg=function(b){function a(a,d,e,f,g){a=b.call(this,a)||this;a.predicate=d;a.source=e;a.yieldIndex=f;a.thisArg=g;a.index=0;return a}h(a,b);a.prototype.notifyComplete=function(a){var c=this.destination;c.next(a);c.complete();this.unsubscribe()};a.prototype._next=function(a){var c=this.predicate,b=this.thisArg,
  189. f=this.index++;try{c.call(b||this,a,f,this.source)&&this.notifyComplete(this.yieldIndex?f:a)}catch(k){this.destination.error(k)}};a.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)};return a}(l),Be=function(){function b(){}b.prototype.call=function(a,c){return c.subscribe(new Dg(a))};return b}(),Dg=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}h(a,b);a.prototype._next=function(a){};return a}(l),Ce=function(){function b(){}b.prototype.call=function(a,
  190. c){return c.subscribe(new Eg(a))};return b}(),Eg=function(b){function a(a){return b.call(this,a)||this}h(a,b);a.prototype.notifyComplete=function(a){var c=this.destination;c.next(a);c.complete()};a.prototype._next=function(a){this.notifyComplete(!1)};a.prototype._complete=function(){this.notifyComplete(!0)};return a}(l),De=function(){function b(a){this.total=a;if(0>this.total)throw new Y;}b.prototype.call=function(a,c){return c.subscribe(new Fg(a,this.total))};return b}(),Fg=function(b){function a(a,
  191. d){a=b.call(this,a)||this;a.total=d;a.ring=[];a.count=0;return a}h(a,b);a.prototype._next=function(a){var c=this.ring,b=this.total,f=this.count++;c.length<b?c.push(a):c[f%b]=a};a.prototype._complete=function(){var a=this.destination,b=this.count;if(0<b)for(var e=this.count>=this.total?this.total:this.count,f=this.ring,g=0;g<e;g++){var h=b++%e;a.next(f[h])}a.complete()};return a}(l),Ee=function(){function b(a){this.value=a}b.prototype.call=function(a,c){return c.subscribe(new Gg(a,this.value))};return b}(),
  192. Gg=function(b){function a(a,d){a=b.call(this,a)||this;a.value=d;return a}h(a,b);a.prototype._next=function(a){this.destination.next(this.value)};return a}(l),Fe=function(){function b(){}b.prototype.call=function(a,c){return c.subscribe(new Hg(a))};return b}(),Hg=function(b){function a(a){return b.call(this,a)||this}h(a,b);a.prototype._next=function(a){this.destination.next(v.createNext(a))};a.prototype._error=function(a){var c=this.destination;c.next(v.createError(a));c.complete()};a.prototype._complete=
  193. function(){var a=this.destination;a.next(v.createComplete());a.complete()};return a}(l),Ge=function(){function b(a,c,b){this.accumulator=a;this.seed=c;this.concurrent=b}b.prototype.call=function(a,c){return c.subscribe(new Ig(a,this.accumulator,this.seed,this.concurrent))};return b}(),Ig=function(b){function a(a,d,e,f){a=b.call(this,a)||this;a.accumulator=d;a.acc=e;a.concurrent=f;a.hasValue=!1;a.hasCompleted=!1;a.buffer=[];a.active=0;a.index=0;return a}h(a,b);a.prototype._next=function(a){if(this.active<
  194. this.concurrent){var c=this.index++,b=this.destination,f=void 0;try{var g=this.accumulator,f=g(this.acc,a,c)}catch(y){return b.error(y)}this.active++;this._innerSub(f,a,c)}else this.buffer.push(a)};a.prototype._innerSub=function(a,b,e){b=new G(this,b,e);e=this.destination;e.add(b);a=n(this,a,void 0,void 0,b);a!==b&&e.add(a)};a.prototype._complete=function(){this.hasCompleted=!0;0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete());
  195. this.unsubscribe()};a.prototype.notifyNext=function(a,b,e,f,g){a=this.destination;this.acc=b;this.hasValue=!0;a.next(b)};a.prototype.notifyComplete=function(a){var c=this.buffer;this.destination.remove(a);this.active--;0<c.length?this._next(c.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())};return a}(p),He=function(){function b(a,c){this.subjectFactory=a;this.selector=c}b.prototype.call=function(a,c){var b=this.selector,
  196. e=this.subjectFactory();a=b(e).subscribe(a);a.add(c.subscribe(e));return a};return b}(),Je=function(){function b(a){this.nextSources=a}b.prototype.call=function(a,c){return c.subscribe(new Jg(a,this.nextSources))};return b}(),Jg=function(b){function a(a,d){var c=b.call(this,a)||this;c.destination=a;c.nextSources=d;return c}h(a,b);a.prototype.notifyError=function(a,b){this.subscribeToNextSource()};a.prototype.notifyComplete=function(a){this.subscribeToNextSource()};a.prototype._error=function(a){this.subscribeToNextSource();
  197. this.unsubscribe()};a.prototype._complete=function(){this.subscribeToNextSource();this.unsubscribe()};a.prototype.subscribeToNextSource=function(){var a=this.nextSources.shift();if(a){var b=new G(this,void 0,void 0),e=this.destination;e.add(b);a=n(this,a,void 0,void 0,b);a!==b&&e.add(a)}else this.destination.complete()};return a}(p),Ke=function(){function b(){}b.prototype.call=function(a,c){return c.subscribe(new Kg(a))};return b}(),Kg=function(b){function a(a){a=b.call(this,a)||this;a.hasPrev=!1;
  198. return a}h(a,b);a.prototype._next=function(a){var c;this.hasPrev?c=[this.prev,a]:this.hasPrev=!0;this.prev=a;c&&this.destination.next(c)};return a}(l),pc=function(){function b(a,c){this.count=a;this.source=c}b.prototype.call=function(a,c){return c.subscribe(new Lg(a,this.count,this.source))};return b}(),Lg=function(b){function a(a,d,e){a=b.call(this,a)||this;a.count=d;a.source=e;return a}h(a,b);a.prototype.complete=function(){if(!this.isStopped){var a=this.source,d=this.count;if(0===d)return b.prototype.complete.call(this);
  199. -1<d&&(this.count=d-1);a.subscribe(this._unsubscribeAndRecycle())}};return a}(l),Me=function(){function b(a){this.notifier=a}b.prototype.call=function(a,c){return c.subscribe(new Mg(a,this.notifier,c))};return b}(),Mg=function(b){function a(a,d,e){a=b.call(this,a)||this;a.notifier=d;a.source=e;a.sourceIsBeingSubscribedTo=!0;return a}h(a,b);a.prototype.notifyNext=function(a,b,e,f,g){this.sourceIsBeingSubscribedTo=!0;this.source.subscribe(this)};a.prototype.notifyComplete=function(a){if(!1===this.sourceIsBeingSubscribedTo)return b.prototype.complete.call(this)};
  200. a.prototype.complete=function(){this.sourceIsBeingSubscribedTo=!1;if(!this.isStopped){this.retries||this.subscribeToRetries();if(!this.retriesSubscription||this.retriesSubscription.closed)return b.prototype.complete.call(this);this._unsubscribeAndRecycle();this.notifications.next()}};a.prototype._unsubscribe=function(){var a=this.notifications,b=this.retriesSubscription;a&&(a.unsubscribe(),this.notifications=null);b&&(b.unsubscribe(),this.retriesSubscription=null);this.retries=null};a.prototype._unsubscribeAndRecycle=
  201. function(){var a=this._unsubscribe;this._unsubscribe=null;b.prototype._unsubscribeAndRecycle.call(this);this._unsubscribe=a;return this};a.prototype.subscribeToRetries=function(){this.notifications=new u;var a;try{var d=this.notifier;a=d(this.notifications)}catch(e){return b.prototype.complete.call(this)}this.retries=a;this.retriesSubscription=n(this,a)};return a}(p),Ne=function(){function b(a,c){this.count=a;this.source=c}b.prototype.call=function(a,c){return c.subscribe(new Ng(a,this.count,this.source))};
  202. return b}(),Ng=function(b){function a(a,d,e){a=b.call(this,a)||this;a.count=d;a.source=e;return a}h(a,b);a.prototype.error=function(a){if(!this.isStopped){var c=this.source,e=this.count;if(0===e)return b.prototype.error.call(this,a);-1<e&&(this.count=e-1);c.subscribe(this._unsubscribeAndRecycle())}};return a}(l),Oe=function(){function b(a,c){this.notifier=a;this.source=c}b.prototype.call=function(a,c){return c.subscribe(new Og(a,this.notifier,this.source))};return b}(),Og=function(b){function a(a,
  203. d,e){a=b.call(this,a)||this;a.notifier=d;a.source=e;return a}h(a,b);a.prototype.error=function(a){if(!this.isStopped){var c=this.errors,e=this.retries,f=this.retriesSubscription;if(e)this.retriesSubscription=this.errors=null;else{c=new u;try{var g=this.notifier,e=g(c)}catch(y){return b.prototype.error.call(this,y)}f=n(this,e)}this._unsubscribeAndRecycle();this.errors=c;this.retries=e;this.retriesSubscription=f;c.next(a)}};a.prototype._unsubscribe=function(){var a=this.errors,b=this.retriesSubscription;
  204. a&&(a.unsubscribe(),this.errors=null);b&&(b.unsubscribe(),this.retriesSubscription=null);this.retries=null};a.prototype.notifyNext=function(a,b,e,f,g){a=this._unsubscribe;this._unsubscribe=null;this._unsubscribeAndRecycle();this._unsubscribe=a;this.source.subscribe(this)};return a}(p),Pe=function(){function b(a){this.notifier=a}b.prototype.call=function(a,c){a=new Pg(a);c=c.subscribe(a);c.add(n(a,this.notifier));return c};return b}(),Pg=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||
  205. this;a.hasValue=!1;return a}h(a,b);a.prototype._next=function(a){this.value=a;this.hasValue=!0};a.prototype.notifyNext=function(a,b,e,f,g){this.emitValue()};a.prototype.notifyComplete=function(){this.emitValue()};a.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))};return a}(p),Qe=function(){function b(a,c){this.period=a;this.scheduler=c}b.prototype.call=function(a,c){return c.subscribe(new Qg(a,this.period,this.scheduler))};return b}(),Qg=function(b){function a(a,
  206. d,e){a=b.call(this,a)||this;a.period=d;a.scheduler=e;a.hasValue=!1;a.add(e.schedule(Re,d,{subscriber:a,period:d}));return a}h(a,b);a.prototype._next=function(a){this.lastValue=a;this.hasValue=!0};a.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))};return a}(l),Se=function(){function b(a,c){this.compareTo=a;this.comparator=c}b.prototype.call=function(a,c){return c.subscribe(new Rg(a,this.compareTo,this.comparator))};return b}(),Rg=function(b){function a(a,
  207. d,e){var c=b.call(this,a)||this;c.compareTo=d;c.comparator=e;c._a=[];c._b=[];c._oneComplete=!1;c.destination.add(d.subscribe(new Sg(a,c)));return c}h(a,b);a.prototype._next=function(a){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(a),this.checkValues())};a.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0;this.unsubscribe()};a.prototype.checkValues=function(){for(var a=this._a,b=this._b,e=this.comparator;0<a.length&&
  208. 0<b.length;){var f=a.shift(),g=b.shift(),h=!1;try{h=e?e(f,g):f===g}catch(z){this.destination.error(z)}h||this.emit(!1)}};a.prototype.emit=function(a){var c=this.destination;c.next(a);c.complete()};a.prototype.nextB=function(a){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(a),this.checkValues())};a.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0};return a}(l),Sg=function(b){function a(a,d){a=b.call(this,a)||
  209. this;a.parent=d;return a}h(a,b);a.prototype._next=function(a){this.parent.nextB(a)};a.prototype._error=function(a){this.parent.error(a);this.unsubscribe()};a.prototype._complete=function(){this.parent.completeB();this.unsubscribe()};return a}(l),Ve=function(){function b(a,c){this.predicate=a;this.source=c}b.prototype.call=function(a,c){return c.subscribe(new Tg(a,this.predicate,this.source))};return b}(),Tg=function(b){function a(a,d,e){a=b.call(this,a)||this;a.predicate=d;a.source=e;a.seenValue=
  210. !1;a.index=0;return a}h(a,b);a.prototype.applySingleValue=function(a){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=a)};a.prototype._next=function(a){var c=this.index++;this.predicate?this.tryNext(a,c):this.applySingleValue(a)};a.prototype.tryNext=function(a,b){try{this.predicate(a,b,this.source)&&this.applySingleValue(a)}catch(e){this.destination.error(e)}};a.prototype._complete=function(){var a=this.destination;0<this.index?
  211. (a.next(this.seenValue?this.singleValue:void 0),a.complete()):a.error(new ga)};return a}(l),We=function(){function b(a){this.total=a}b.prototype.call=function(a,c){return c.subscribe(new Ug(a,this.total))};return b}(),Ug=function(b){function a(a,d){a=b.call(this,a)||this;a.total=d;a.count=0;return a}h(a,b);a.prototype._next=function(a){++this.count>this.total&&this.destination.next(a)};return a}(l),Xe=function(){function b(a){this._skipCount=a;if(0>this._skipCount)throw new Y;}b.prototype.call=function(a,
  212. c){return 0===this._skipCount?c.subscribe(new l(a)):c.subscribe(new Vg(a,this._skipCount))};return b}(),Vg=function(b){function a(a,d){a=b.call(this,a)||this;a._skipCount=d;a._count=0;a._ring=Array(d);return a}h(a,b);a.prototype._next=function(a){var c=this._skipCount,b=this._count++;if(b<c)this._ring[b]=a;else{var c=b%c,b=this._ring,f=b[c];b[c]=a;this.destination.next(f)}};return a}(l),Ye=function(){function b(a){this.notifier=a}b.prototype.call=function(a,c){return c.subscribe(new Wg(a,this.notifier))};
  213. return b}(),Wg=function(b){function a(a,d){a=b.call(this,a)||this;a.hasValue=!1;var c=new G(a,void 0,void 0);a.add(c);a.innerSubscription=c;d=n(a,d,void 0,void 0,c);d!==c&&(a.add(d),a.innerSubscription=d);return a}h(a,b);a.prototype._next=function(a){this.hasValue&&b.prototype._next.call(this,a)};a.prototype.notifyNext=function(a,b,e,f,g){this.hasValue=!0;this.innerSubscription&&this.innerSubscription.unsubscribe()};a.prototype.notifyComplete=function(){};return a}(p),Ze=function(){function b(a){this.predicate=
  214. a}b.prototype.call=function(a,c){return c.subscribe(new Xg(a,this.predicate))};return b}(),Xg=function(b){function a(a,d){a=b.call(this,a)||this;a.predicate=d;a.skipping=!0;a.index=0;return a}h(a,b);a.prototype._next=function(a){var c=this.destination;this.skipping&&this.tryCallPredicate(a);this.skipping||c.next(a)};a.prototype.tryCallPredicate=function(a){try{this.skipping=!!this.predicate(a,this.index++)}catch(d){this.destination.error(d)}};return a}(l),$e=function(){function b(a,c){this.scheduler=
  215. a;this.delay=c}b.prototype.call=function(a,c){return(new Xf(c,this.delay,this.scheduler)).subscribe(a)};return b}(),af=function(){function b(a){this.project=a}b.prototype.call=function(a,c){return c.subscribe(new Yg(a,this.project))};return b}(),Yg=function(b){function a(a,d){a=b.call(this,a)||this;a.project=d;a.index=0;return a}h(a,b);a.prototype._next=function(a){var c,b=this.index++;try{c=this.project(a,b)}catch(f){this.destination.error(f);return}this._innerSub(c,a,b)};a.prototype._innerSub=function(a,
  216. b,e){var c=this.innerSubscription;c&&c.unsubscribe();b=new G(this,b,e);e=this.destination;e.add(b);this.innerSubscription=n(this,a,void 0,void 0,b);this.innerSubscription!==b&&e.add(this.innerSubscription)};a.prototype._complete=function(){var a=this.innerSubscription;a&&!a.closed||b.prototype._complete.call(this);this.unsubscribe()};a.prototype._unsubscribe=function(){this.innerSubscription=null};a.prototype.notifyComplete=function(a){this.destination.remove(a);this.innerSubscription=null;this.isStopped&&
  217. b.prototype._complete.call(this)};a.prototype.notifyNext=function(a,b,e,f,g){this.destination.next(b)};return a}(p),bf=function(){function b(a){this.notifier=a}b.prototype.call=function(a,c){a=new Zg(a);var b=n(a,this.notifier);return b&&!a.seenValue?(a.add(b),c.subscribe(a)):a};return b}(),Zg=function(b){function a(a){a=b.call(this,a)||this;a.seenValue=!1;return a}h(a,b);a.prototype.notifyNext=function(a,b,e,f,g){this.seenValue=!0;this.complete()};a.prototype.notifyComplete=function(){};return a}(p),
  218. cf=function(){function b(a,c){this.predicate=a;this.inclusive=c}b.prototype.call=function(a,c){return c.subscribe(new $g(a,this.predicate,this.inclusive))};return b}(),$g=function(b){function a(a,d,e){a=b.call(this,a)||this;a.predicate=d;a.inclusive=e;a.index=0;return a}h(a,b);a.prototype._next=function(a){var c=this.destination,b;try{b=this.predicate(a,this.index++)}catch(f){c.error(f);return}this.nextOrComplete(a,b)};a.prototype.nextOrComplete=function(a,b){var c=this.destination;b?c.next(a):(this.inclusive&&
  219. c.next(a),c.complete())};return a}(l),df=function(){function b(a,c,b){this.nextOrObserver=a;this.error=c;this.complete=b}b.prototype.call=function(a,c){return c.subscribe(new ah(a,this.nextOrObserver,this.error,this.complete))};return b}(),ah=function(b){function a(a,d,e,f){a=b.call(this,a)||this;a._tapNext=D;a._tapError=D;a._tapComplete=D;a._tapError=e||D;a._tapComplete=f||D;P(d)?(a._context=a,a._tapNext=d):d&&(a._context=d,a._tapNext=d.next||D,a._tapError=d.error||D,a._tapComplete=d.complete||D);
  220. return a}h(a,b);a.prototype._next=function(a){try{this._tapNext.call(this._context,a)}catch(d){this.destination.error(d);return}this.destination.next(a)};a.prototype._error=function(a){try{this._tapError.call(this._context,a)}catch(d){this.destination.error(d);return}this.destination.error(a)};a.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(c){this.destination.error(c);return}return this.destination.complete()};return a}(l),ef=function(){function b(a,b,d,e){this.duration=
  221. a;this.scheduler=b;this.leading=d;this.trailing=e}b.prototype.call=function(a,b){return b.subscribe(new bh(a,this.duration,this.scheduler,this.leading,this.trailing))};return b}(),bh=function(b){function a(a,d,e,f,g){a=b.call(this,a)||this;a.duration=d;a.scheduler=e;a.leading=f;a.trailing=g;a._hasTrailingValue=!1;a._trailingValue=null;return a}h(a,b);a.prototype._next=function(a){this.throttled?this.trailing&&(this._trailingValue=a,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(ff,
  222. this.duration,{subscriber:this})),this.leading?this.destination.next(a):this.trailing&&(this._trailingValue=a,this._hasTrailingValue=!0))};a.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue);this.destination.complete()};a.prototype.clearThrottle=function(){var a=this.throttled;a&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),a.unsubscribe(),this.remove(a),this.throttled=
  223. null)};return a}(l),gf=function(){function b(a,b,d,e){this.waitFor=a;this.absoluteTimeout=b;this.withObservable=d;this.scheduler=e}b.prototype.call=function(a,b){return b.subscribe(new ch(a,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))};return b}(),ch=function(b){function a(a,d,e,f,g){a=b.call(this,a)||this;a.absoluteTimeout=d;a.waitFor=e;a.withObservable=f;a.scheduler=g;a.action=null;a.scheduleTimeout();return a}h(a,b);a.dispatchTimeout=function(a){var b=a.withObservable;
  224. a._unsubscribeAndRecycle();a.add(n(a,b))};a.prototype.scheduleTimeout=function(){var b=this.action;b?this.action=b.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(a.dispatchTimeout,this.waitFor,this))};a.prototype._next=function(a){this.absoluteTimeout||this.scheduleTimeout();b.prototype._next.call(this,a)};a.prototype._unsubscribe=function(){this.withObservable=this.scheduler=this.action=null};return a}(p),jf=function(){function b(a){this.windowBoundaries=a}b.prototype.call=
  225. function(a,b){a=new dh(a);b=b.subscribe(a);b.closed||a.add(n(a,this.windowBoundaries));return b};return b}(),dh=function(b){function a(a){var c=b.call(this,a)||this;c.window=new u;a.next(c.window);return c}h(a,b);a.prototype.notifyNext=function(a,b,e,f,g){this.openWindow()};a.prototype.notifyError=function(a,b){this._error(a)};a.prototype.notifyComplete=function(a){this._complete()};a.prototype._next=function(a){this.window.next(a)};a.prototype._error=function(a){this.window.error(a);this.destination.error(a)};
  226. a.prototype._complete=function(){this.window.complete();this.destination.complete()};a.prototype._unsubscribe=function(){this.window=null};a.prototype.openWindow=function(){var a=this.window;a&&a.complete();var a=this.destination,b=this.window=new u;a.next(b)};return a}(p),kf=function(){function b(a,b){this.windowSize=a;this.startWindowEvery=b}b.prototype.call=function(a,b){return b.subscribe(new eh(a,this.windowSize,this.startWindowEvery))};return b}(),eh=function(b){function a(a,d,e){var c=b.call(this,
  227. a)||this;c.destination=a;c.windowSize=d;c.startWindowEvery=e;c.windows=[new u];c.count=0;a.next(c.windows[0]);return c}h(a,b);a.prototype._next=function(a){for(var b=0<this.startWindowEvery?this.startWindowEvery:this.windowSize,c=this.destination,f=this.windowSize,g=this.windows,h=g.length,l=0;l<h&&!this.closed;l++)g[l].next(a);a=this.count-f+1;0<=a&&0===a%b&&!this.closed&&g.shift().complete();0!==++this.count%b||this.closed||(b=new u,g.push(b),c.next(b))};a.prototype._error=function(a){var b=this.windows;
  228. if(b)for(;0<b.length&&!this.closed;)b.shift().error(a);this.destination.error(a)};a.prototype._complete=function(){var a=this.windows;if(a)for(;0<a.length&&!this.closed;)a.shift().complete();this.destination.complete()};a.prototype._unsubscribe=function(){this.count=0;this.windows=null};return a}(l),lf=function(){function b(a,b,d,e){this.windowTimeSpan=a;this.windowCreationInterval=b;this.maxWindowSize=d;this.scheduler=e}b.prototype.call=function(a,b){return b.subscribe(new fh(a,this.windowTimeSpan,
  229. this.windowCreationInterval,this.maxWindowSize,this.scheduler))};return b}(),gh=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a._numberOfNextedValues=0;return a}h(a,b);a.prototype.next=function(a){this._numberOfNextedValues++;b.prototype.next.call(this,a)};Object.defineProperty(a.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0});return a}(u),fh=function(b){function a(a,d,e,f,g){var c=b.call(this,a)||this;c.destination=
  230. a;c.windowTimeSpan=d;c.windowCreationInterval=e;c.maxWindowSize=f;c.scheduler=g;c.windows=[];a=c.openWindow();null!==e&&0<=e?(f={windowTimeSpan:d,windowCreationInterval:e,subscriber:c,scheduler:g},c.add(g.schedule(Qc,d,{subscriber:c,window:a,context:null})),c.add(g.schedule(nf,e,f))):c.add(g.schedule(mf,d,{subscriber:c,window:a,windowTimeSpan:d}));return c}h(a,b);a.prototype._next=function(a){for(var b=this.windows,c=b.length,f=0;f<c;f++){var g=b[f];g.closed||(g.next(a),g.numberOfNextedValues>=this.maxWindowSize&&
  231. this.closeWindow(g))}};a.prototype._error=function(a){for(var b=this.windows;0<b.length;)b.shift().error(a);this.destination.error(a)};a.prototype._complete=function(){for(var a=this.windows;0<a.length;){var b=a.shift();b.closed||b.complete()}this.destination.complete()};a.prototype.openWindow=function(){var a=new gh;this.windows.push(a);this.destination.next(a);return a};a.prototype.closeWindow=function(a){a.complete();var b=this.windows;b.splice(b.indexOf(a),1)};return a}(l),of=function(){function b(a,
  232. b){this.openings=a;this.closingSelector=b}b.prototype.call=function(a,b){return b.subscribe(new hh(a,this.openings,this.closingSelector))};return b}(),hh=function(b){function a(a,d,e){a=b.call(this,a)||this;a.openings=d;a.closingSelector=e;a.contexts=[];a.add(a.openSubscription=n(a,d,d));return a}h(a,b);a.prototype._next=function(a){var b=this.contexts;if(b)for(var c=b.length,f=0;f<c;f++)b[f].window.next(a)};a.prototype._error=function(a){var c=this.contexts;this.contexts=null;if(c)for(var e=c.length,
  233. f=-1;++f<e;){var g=c[f];g.window.error(a);g.subscription.unsubscribe()}b.prototype._error.call(this,a)};a.prototype._complete=function(){var a=this.contexts;this.contexts=null;if(a)for(var d=a.length,e=-1;++e<d;){var f=a[e];f.window.complete();f.subscription.unsubscribe()}b.prototype._complete.call(this)};a.prototype._unsubscribe=function(){var a=this.contexts;this.contexts=null;if(a)for(var b=a.length,e=-1;++e<b;){var f=a[e];f.window.unsubscribe();f.subscription.unsubscribe()}};a.prototype.notifyNext=
  234. function(a,b,e,f,g){if(a===this.openings){a=void 0;try{var c=this.closingSelector;a=c(b)}catch(z){return this.error(z)}b=new u;c=new r;e={window:b,subscription:c};this.contexts.push(e);a=n(this,a,e);a.closed?this.closeWindow(this.contexts.length-1):(a.context=e,c.add(a));this.destination.next(b)}else this.closeWindow(this.contexts.indexOf(a))};a.prototype.notifyError=function(a){this.error(a)};a.prototype.notifyComplete=function(a){a!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(a.context))};
  235. a.prototype.closeWindow=function(a){if(-1!==a){var b=this.contexts,c=b[a],f=c.window,c=c.subscription;b.splice(a,1);f.complete();c.unsubscribe()}};return a}(p),pf=function(){function b(a){this.closingSelector=a}b.prototype.call=function(a,b){return b.subscribe(new ih(a,this.closingSelector))};return b}(),ih=function(b){function a(a,d){var c=b.call(this,a)||this;c.destination=a;c.closingSelector=d;c.openWindow();return c}h(a,b);a.prototype.notifyNext=function(a,b,e,f,g){this.openWindow(g)};a.prototype.notifyError=
  236. function(a,b){this._error(a)};a.prototype.notifyComplete=function(a){this.openWindow(a)};a.prototype._next=function(a){this.window.next(a)};a.prototype._error=function(a){this.window.error(a);this.destination.error(a);this.unsubscribeClosingNotification()};a.prototype._complete=function(){this.window.complete();this.destination.complete();this.unsubscribeClosingNotification()};a.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()};a.prototype.openWindow=
  237. function(a){void 0===a&&(a=null);a&&(this.remove(a),a.unsubscribe());(a=this.window)&&a.complete();a=this.window=new u;this.destination.next(a);var b;try{var c=this.closingSelector;b=c()}catch(f){this.destination.error(f);this.window.error(f);return}this.add(this.closingNotification=n(this,b))};return a}(p),qf=function(){function b(a,b){this.observables=a;this.project=b}b.prototype.call=function(a,b){return b.subscribe(new jh(a,this.observables,this.project))};return b}(),jh=function(b){function a(a,
  238. d,e){a=b.call(this,a)||this;a.observables=d;a.project=e;a.toRespond=[];e=d.length;a.values=Array(e);for(var c=0;c<e;c++)a.toRespond.push(c);for(c=0;c<e;c++){var g=d[c];a.add(n(a,g,g,c))}return a}h(a,b);a.prototype.notifyNext=function(a,b,e,f,g){this.values[e]=b;a=this.toRespond;0<a.length&&(e=a.indexOf(e),-1!==e&&a.splice(e,1))};a.prototype.notifyComplete=function(){};a.prototype._next=function(a){0===this.toRespond.length&&(a=[a].concat(this.values),this.project?this._tryProject(a):this.destination.next(a))};
  239. a.prototype._tryProject=function(a){var b;try{b=this.project.apply(this,a)}catch(e){this.destination.error(e);return}this.destination.next(b)};return a}(p),kh=Object.freeze({audit:Ha,auditTime:tb,buffer:ub,bufferCount:vb,bufferTime:wb,bufferToggle:zb,bufferWhen:Ab,catchError:Bb,combineAll:Cb,combineLatest:function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];var c=null;"function"===typeof b[b.length-1]&&(c=b.pop());1===b.length&&x(b[0])&&(b=b[0].slice());return function(a){return a.lift.call(F([a].concat(b)),
  240. new qa(c))}},concat:function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return function(a){return a.lift.call(V.apply(void 0,[a].concat(b)))}},concatAll:Ca,concatMap:Ia,concatMapTo:Db,count:Eb,debounce:Fb,debounceTime:Gb,defaultIfEmpty:X,delay:Hb,delayWhen:Ib,dematerialize:Kb,distinct:Lb,distinctUntilChanged:Ja,distinctUntilKeyChanged:Mb,elementAt:Nb,endWith:function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return function(a){return V(a,fa.apply(void 0,b))}},every:Ob,
  241. exhaust:Pb,exhaustMap:Ka,expand:Qb,filter:M,finalize:Rb,find:Sb,findIndex:Ub,first:Vb,groupBy:Va,ignoreElements:Wb,isEmpty:Xb,last:Yb,map:A,mapTo:Zb,materialize:$b,max:ac,merge:function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return function(a){return a.lift.call(Ea.apply(void 0,[a].concat(b)))}},mergeAll:na,mergeMap:H,flatMap:H,mergeMapTo:bc,mergeScan:cc,min:dc,multicast:J,observeOn:Xa,onErrorResumeNext:ec,pairwise:fc,partition:gc,pluck:hc,publish:ic,publishBehavior:jc,publishLast:lc,
  242. publishReplay:mc,race:nc,reduce:Z,repeat:oc,repeatWhen:qc,retry:rc,retryWhen:sc,refCount:za,sample:tc,sampleTime:uc,scan:W,sequenceEqual:vc,share:wc,shareReplay:La,single:xc,skip:yc,skipLast:zc,skipUntil:Ac,skipWhile:Bc,startWith:Cc,subscribeOn:Dc,switchAll:Ec,switchMap:ba,switchMapTo:Fc,take:sa,takeLast:ha,takeUntil:Gc,takeWhile:Hc,tap:Ic,throttle:rb,throttleTime:Jc,throwIfEmpty:ra,timeInterval:pb,timeout:Kc,timeoutWith:Ma,timestamp:nb,toArray:Mc,window:Nc,windowCount:Oc,windowTime:Pc,windowToggle:Rc,
  243. windowWhen:Sc,withLatestFrom:Tc,zip:function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return function(a){return a.lift.call(Ga.apply(void 0,[a].concat(b)))}},zipAll:Uc});g.prototype.buffer=function(b){return ub(b)(this)};g.prototype.bufferCount=function(b,a){void 0===a&&(a=null);return vb(b,a)(this)};g.prototype.bufferTime=function(b){var a=arguments.length,c=q;w(arguments[arguments.length-1])&&(c=arguments[arguments.length-1],a--);var d=null;2<=a&&(d=arguments[1]);var e=Number.POSITIVE_INFINITY;
  244. 3<=a&&(e=arguments[2]);return wb(b,d,e,c)(this)};g.prototype.bufferToggle=function(b,a){return zb(b,a)(this)};g.prototype.bufferWhen=function(b){return Ab(b)(this)};g.prototype.catch=Vc;g.prototype._catch=Vc;g.prototype.combineAll=function(b){return Cb(b)(this)};g.prototype.combineLatest=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];a=null;"function"===typeof b[b.length-1]&&(a=b.pop());1===b.length&&x(b[0])&&(b=b[0].slice());return this.lift.call(fa.apply(void 0,[this].concat(b)),
  245. new qa(a))};g.prototype.concat=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return this.lift.call(V.apply(void 0,[this].concat(b)))};g.prototype.concatAll=function(){return Ca()(this)};g.prototype.concatMap=function(b){return Ia(b)(this)};g.prototype.concatMapTo=function(b){return Db(b)(this)};g.prototype.count=function(b){return Eb(b)(this)};g.prototype.dematerialize=function(){return Kb()(this)};g.prototype.debounce=function(b){return Fb(b)(this)};g.prototype.debounceTime=
  246. function(b,a){void 0===a&&(a=q);return Gb(b,a)(this)};g.prototype.defaultIfEmpty=function(b){void 0===b&&(b=null);return X(b)(this)};g.prototype.delay=function(b,a){void 0===a&&(a=q);return Hb(b,a)(this)};g.prototype.delayWhen=function(b,a){return Ib(b,a)(this)};g.prototype.distinct=function(b,a){return Lb(b,a)(this)};g.prototype.distinctUntilChanged=function(b,a){return Ja(b,a)(this)};g.prototype.distinctUntilKeyChanged=function(b,a){return Mb(b,a)(this)};g.prototype.do=Wc;g.prototype._do=Wc;g.prototype.exhaust=
  247. function(){return Pb()(this)};g.prototype.exhaustMap=function(b){return Ka(b)(this)};g.prototype.expand=function(b,a,c){void 0===a&&(a=Number.POSITIVE_INFINITY);void 0===c&&(c=void 0);a=1>(a||0)?Number.POSITIVE_INFINITY:a;return Qb(b,a,c)(this)};g.prototype.elementAt=function(b,a){return Nb.apply(void 0,arguments)(this)};g.prototype.filter=function(b,a){return M(b,a)(this)};g.prototype.finally=Xc;g.prototype._finally=Xc;g.prototype.find=function(b,a){return Sb(b,a)(this)};g.prototype.findIndex=function(b,
  248. a){return Ub(b,a)(this)};g.prototype.first=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return Vb.apply(void 0,b)(this)};g.prototype.groupBy=function(b,a,c,d){return Va(b,a,c,d)(this)};g.prototype.ignoreElements=function(){return Wb()(this)};g.prototype.isEmpty=function(){return Xb()(this)};g.prototype.audit=function(b){return Ha(b)(this)};g.prototype.auditTime=function(b,a){void 0===a&&(a=q);return tb(b,a)(this)};g.prototype.last=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=
  249. arguments[a];return Yb.apply(void 0,b)(this)};g.prototype.let=Yc;g.prototype.letBind=Yc;g.prototype.every=function(b,a){return Ob(b,a)(this)};g.prototype.map=function(b,a){return A(b,a)(this)};g.prototype.mapTo=function(b){return Zb(b)(this)};g.prototype.materialize=function(){return $b()(this)};g.prototype.max=function(b){return ac(b)(this)};g.prototype.merge=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return this.lift.call(Ea.apply(void 0,[this].concat(b)))};g.prototype.mergeAll=
  250. function(b){void 0===b&&(b=Number.POSITIVE_INFINITY);return na(b)(this)};g.prototype.mergeMap=Zc;g.prototype.flatMap=Zc;g.prototype.flatMapTo=$c;g.prototype.mergeMapTo=$c;g.prototype.mergeScan=function(b,a,c){void 0===c&&(c=Number.POSITIVE_INFINITY);return cc(b,a,c)(this)};g.prototype.min=function(b){return dc(b)(this)};g.prototype.multicast=function(b,a){return J(b,a)(this)};g.prototype.observeOn=function(b,a){void 0===a&&(a=0);return Xa(b,a)(this)};g.prototype.onErrorResumeNext=function(){for(var b=
  251. [],a=0;a<arguments.length;a++)b[a]=arguments[a];return ec.apply(void 0,b)(this)};g.prototype.pairwise=function(){return fc()(this)};g.prototype.partition=function(b,a){return gc(b,a)(this)};g.prototype.pluck=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return hc.apply(void 0,b)(this)};g.prototype.publish=function(b){return ic(b)(this)};g.prototype.publishBehavior=function(b){return jc(b)(this)};g.prototype.publishReplay=function(b,a,c,d){return mc(b,a,c,d)(this)};g.prototype.publishLast=
  252. function(){return lc()(this)};g.prototype.race=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return nc.apply(void 0,b)(this)};g.prototype.reduce=function(b,a){return 2<=arguments.length?Z(b,a)(this):Z(b)(this)};g.prototype.repeat=function(b){void 0===b&&(b=-1);return oc(b)(this)};g.prototype.repeatWhen=function(b){return qc(b)(this)};g.prototype.retry=function(b){void 0===b&&(b=-1);return rc(b)(this)};g.prototype.retryWhen=function(b){return sc(b)(this)};g.prototype.sample=
  253. function(b){return tc(b)(this)};g.prototype.sampleTime=function(b,a){void 0===a&&(a=q);return uc(b,a)(this)};g.prototype.scan=function(b,a){return 2<=arguments.length?W(b,a)(this):W(b)(this)};g.prototype.sequenceEqual=function(b,a){return vc(b,a)(this)};g.prototype.share=function(){return wc()(this)};g.prototype.shareReplay=function(b,a,c){return b&&"object"===typeof b?La(b)(this):La(b,a,c)(this)};g.prototype.single=function(b){return xc(b)(this)};g.prototype.skip=function(b){return yc(b)(this)};
  254. g.prototype.skipLast=function(b){return zc(b)(this)};g.prototype.skipUntil=function(b){return Ac(b)(this)};g.prototype.skipWhile=function(b){return Bc(b)(this)};g.prototype.startWith=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return Cc.apply(void 0,b)(this)};g.prototype.subscribeOn=function(b,a){void 0===a&&(a=0);return Dc(b,a)(this)};g.prototype.switch=ad;g.prototype._switch=ad;g.prototype.switchMap=function(b){return ba(b)(this)};g.prototype.switchMapTo=function(b){return Fc(b)(this)};
  255. g.prototype.take=function(b){return sa(b)(this)};g.prototype.takeLast=function(b){return ha(b)(this)};g.prototype.takeUntil=function(b){return Gc(b)(this)};g.prototype.takeWhile=function(b){return Hc(b)(this)};g.prototype.throttle=function(b,a){void 0===a&&(a=pa);return rb(b,a)(this)};g.prototype.throttleTime=function(b,a,c){void 0===a&&(a=q);void 0===c&&(c=pa);return Jc(b,a,c)(this)};g.prototype.timeInterval=function(b){void 0===b&&(b=q);return pb(b)(this)};g.prototype.timeout=function(b,a){void 0===
  256. a&&(a=q);return Kc(b,a)(this)};g.prototype.timeoutWith=function(b,a,c){void 0===c&&(c=q);return Ma(b,a,c)(this)};g.prototype.timestamp=function(b){void 0===b&&(b=q);return nb(b)(this)};g.prototype.toArray=function(){return Mc()(this)};g.prototype.window=function(b){return Nc(b)(this)};g.prototype.windowCount=function(b,a){void 0===a&&(a=0);return Oc(b,a)(this)};g.prototype.windowTime=function(b,a,c,d){var e=q,f=null,g=Number.POSITIVE_INFINITY;w(d)&&(e=d);w(c)?e=c:I(c)&&(g=c);w(a)?e=a:I(a)&&(f=a);
  257. return Pc(b,f,g,e)(this)};g.prototype.windowToggle=function(b,a){return Rc(b,a)(this)};g.prototype.windowWhen=function(b){return Sc(b)(this)};g.prototype.withLatestFrom=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return Tc.apply(void 0,b)(this)};g.prototype.zip=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return this.lift.call(Ga.apply(void 0,[this].concat(b)))};g.prototype.zipAll=function(b){return Uc(b)(this)};var la=function(){return function(b,
  258. a){void 0===a&&(a=Number.POSITIVE_INFINITY);this.subscribedFrame=b;this.unsubscribedFrame=a}}(),pd=function(){function b(){this.subscriptions=[]}b.prototype.logSubscribedFrame=function(){this.subscriptions.push(new la(this.scheduler.now()));return this.subscriptions.length-1};b.prototype.logUnsubscribedFrame=function(a){var b=this.subscriptions;b[a]=new la(b[a].subscribedFrame,this.scheduler.now())};return b}(),Ra=function(b){function a(a,d){var c=b.call(this,function(a){var b=this,c=b.logSubscribedFrame(),
  259. d=new r;d.add(new r(function(){b.logUnsubscribedFrame(c)}));b.scheduleMessages(a);return d})||this;c.messages=a;c.subscriptions=[];c.scheduler=d;return c}h(a,b);a.prototype.scheduleMessages=function(a){for(var b=this.messages.length,c=0;c<b;c++){var f=this.messages[c];a.add(this.scheduler.schedule(function(a){a.message.notification.observe(a.subscriber)},f.frame,{message:f,subscriber:a}))}};return a}(g);sb(Ra,[pd]);var qd=function(b){function a(a,d){var c=b.call(this)||this;c.messages=a;c.subscriptions=
  260. [];c.scheduler=d;return c}h(a,b);a.prototype._subscribe=function(a){var c=this,e=c.logSubscribedFrame(),f=new r;f.add(new r(function(){c.logUnsubscribedFrame(e)}));f.add(b.prototype._subscribe.call(this,a));return f};a.prototype.setup=function(){for(var a=this,b=a.messages.length,e=0;e<b;e++)(function(){var b=a.messages[e];a.scheduler.schedule(function(){b.notification.observe(a)},b.frame)})()};return a}(u);sb(qd,[pd]);var rd=function(b){function a(a){var c=b.call(this,ld,750)||this;c.assertDeepEqual=
  261. a;c.hotObservables=[];c.coldObservables=[];c.flushTests=[];c.runMode=!1;return c}h(a,b);a.prototype.createTime=function(b){b=b.indexOf("|");if(-1===b)throw Error('marble diagram for time should have a completion marker "|"');return b*a.frameTimeFactor};a.prototype.createColdObservable=function(b,d,e){if(-1!==b.indexOf("^"))throw Error('cold observable cannot have subscription offset "^"');if(-1!==b.indexOf("!"))throw Error('cold observable cannot have unsubscription marker "!"');b=a.parseMarbles(b,
  262. d,e,void 0,this.runMode);b=new Ra(b,this);this.coldObservables.push(b);return b};a.prototype.createHotObservable=function(b,d,e){if(-1!==b.indexOf("!"))throw Error('hot observable cannot have unsubscription marker "!"');b=a.parseMarbles(b,d,e,void 0,this.runMode);b=new qd(b,this);this.hotObservables.push(b);return b};a.prototype.materializeInnerObservable=function(a,b){var c=this,d=[];a.subscribe(function(a){d.push({frame:c.frame-b,notification:v.createNext(a)})},function(a){d.push({frame:c.frame-
  263. b,notification:v.createError(a)})},function(){d.push({frame:c.frame-b,notification:v.createComplete()})});return d};a.prototype.expectObservable=function(b,d){var c=this;void 0===d&&(d=null);var f=[],h={actual:f,ready:!1};d=a.parseMarblesAsSubscriptions(d,this.runMode);var l=d.unsubscribedFrame,m;this.schedule(function(){m=b.subscribe(function(a){var b=a;a instanceof g&&(b=c.materializeInnerObservable(b,c.frame));f.push({frame:c.frame,notification:v.createNext(b)})},function(a){f.push({frame:c.frame,
  264. notification:v.createError(a)})},function(){f.push({frame:c.frame,notification:v.createComplete()})})},d.subscribedFrame===Number.POSITIVE_INFINITY?0:d.subscribedFrame);l!==Number.POSITIVE_INFINITY&&this.schedule(function(){return m.unsubscribe()},l);this.flushTests.push(h);var n=this.runMode;return{toBe:function(b,c,d){h.ready=!0;h.expected=a.parseMarbles(b,c,d,!0,n)}}};a.prototype.expectSubscriptions=function(b){var c={actual:b,ready:!1};this.flushTests.push(c);var e=this.runMode;return{toBe:function(b){b=
  265. "string"===typeof b?[b]:b;c.ready=!0;c.expected=b.map(function(b){return a.parseMarblesAsSubscriptions(b,e)})}}};a.prototype.flush=function(){for(var a=this,d=this.hotObservables;0<d.length;)d.shift().setup();b.prototype.flush.call(this);this.flushTests=this.flushTests.filter(function(b){return b.ready?(a.assertDeepEqual(b.actual,b.expected),!1):!0})};a.parseMarblesAsSubscriptions=function(a,b){var c=this;void 0===b&&(b=!1);if("string"!==typeof a)return new la(Number.POSITIVE_INFINITY);for(var d=
  266. a.length,g=-1,h=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,m=0,n=function(d){var e=m,f=function(a){e+=a*c.frameTimeFactor},k=a[d];switch(k){case " ":b||f(1);break;case "-":f(1);break;case "(":g=m;f(1);break;case ")":g=-1;f(1);break;case "^":if(h!==Number.POSITIVE_INFINITY)throw Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");h=-1<g?g:m;f(1);break;case "!":if(l!==Number.POSITIVE_INFINITY)throw Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");
  267. l=-1<g?g:m;break;default:if(b&&k.match(/^[0-9]$/)&&(0===d||" "===a[d-1])){var n=a.slice(d).match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /);if(n){d+=n[0].length-1;var k=parseFloat(n[1]),q=void 0;switch(n[2]){case "ms":q=k;break;case "s":q=1E3*k;break;case "m":q=6E4*k}f(q/p.frameTimeFactor);break}}throw Error("there can only be '^' and '!' markers in a subscription marble diagram. Found instead '"+k+"'.");}m=e;r=d},p=this,r,q=0;q<d;q++)n(q),q=r;return 0>l?new la(h):new la(h,l)};a.parseMarbles=function(a,b,
  268. e,f,g){var c=this;void 0===f&&(f=!1);void 0===g&&(g=!1);if(-1!==a.indexOf("!"))throw Error('conventional marble diagrams cannot have the unsubscription marker "!"');for(var d=a.length,h=[],k=g?a.replace(/^[ ]+/,"").indexOf("^"):a.indexOf("^"),l=-1===k?0:k*-this.frameTimeFactor,m="object"!==typeof b?function(a){return a}:function(a){return f&&b[a]instanceof Ra?b[a].messages:b[a]},n=-1,k=function(b){var d=l,f=function(a){d+=a*c.frameTimeFactor},k=void 0,p=a[b];switch(p){case " ":g||f(1);break;case "-":f(1);
  269. break;case "(":n=l;f(1);break;case ")":n=-1;f(1);break;case "|":k=v.createComplete();f(1);break;case "^":f(1);break;case "#":k=v.createError(e||"error");f(1);break;default:if(g&&p.match(/^[0-9]$/)&&(0===b||" "===a[b-1])){var t=a.slice(b).match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /);if(t){b+=t[0].length-1;var p=parseFloat(t[1]),u=void 0;switch(t[2]){case "ms":u=p;break;case "s":u=1E3*p;break;case "m":u=6E4*p}f(u/q.frameTimeFactor);break}}k=v.createNext(m(p));f(1)}k&&h.push({frame:-1<n?n:l,notification:k});
  270. l=d;r=b},q=this,r,p=0;p<d;p++)k(p),p=r;return h};a.prototype.run=function(b){var c=a.frameTimeFactor,e=this.maxFrames;a.frameTimeFactor=1;this.maxFrames=Number.POSITIVE_INFINITY;this.runMode=!0;O.delegate=this;var f={cold:this.createColdObservable.bind(this),hot:this.createHotObservable.bind(this),flush:this.flush.bind(this),expectObservable:this.expectObservable.bind(this),expectSubscriptions:this.expectSubscriptions.bind(this)};try{var g=b(f);this.flush();return g}finally{a.frameTimeFactor=c,this.maxFrames=
  271. e,this.runMode=!1,O.delegate=void 0}};return a}(md),lh=Object.freeze({TestScheduler:rd}),mh={asap:va,queue:hd,animationFrame:Ef,async:q},nh={rxSubscriber:ia,observable:U,iterator:E};m.testing=lh;m.ajax=$f;m.webSocket=ag;m.operators=kh;m.Scheduler=mh;m.Symbol=nh;m.Observable=g;m.Subject=u;m.AnonymousSubject=ua;m.config=C;m.Subscription=r;m.ReplaySubject=aa;m.BehaviorSubject=kc;m.Notification=v;m.EmptyError=ga;m.ArgumentOutOfRangeError=Y;m.ObjectUnsubscribedError=K;m.UnsubscriptionError=ca;m.pipe=ya;
  272. m.TestScheduler=rd;m.Subscriber=l;m.AsyncSubject=T;m.ConnectableObservable=ed;m.TimeoutError=Lc;m.VirtualTimeScheduler=md;m.AjaxResponse=Oa;m.AjaxError=ka;m.AjaxTimeoutError=Pa;m.TimeInterval=qb;m.Timestamp=ob;Object.defineProperty(m,"__esModule",{value:!0})});
  273. //# sourceMappingURL=rxjs-compat.umd.min.js.map