rxjs
Version:
Reactive Extensions for modern JavaScript
119 lines (117 loc) • 88 kB
JavaScript
/**
@license
Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt
**/
/**
@license
Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt
**/
/*
*****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*****************************************************************************/
(function(g,w){"object"===typeof exports&&"undefined"!==typeof module?w(exports):"function"===typeof define&&define.amd?define("rxjs",["exports"],w):w(g.rxjs={})})(this,function(g){function w(b,a){function c(){this.constructor=b}if("function"!==typeof a&&null!==a)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");Ra(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}function Xd(b,a){var c={},d;for(d in b)Object.prototype.hasOwnProperty.call(b,
d)&&0>a.indexOf(d)&&(c[d]=b[d]);if(null!=b&&"function"===typeof Object.getOwnPropertySymbols){var e=0;for(d=Object.getOwnPropertySymbols(b);e<d.length;e++)0>a.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(b,d[e])&&(c[d[e]]=b[d[e]])}return c}function Yd(b,a,c,d){function e(a){return a instanceof c?a:new c(function(b){b(a)})}return new (c||(c=Promise))(function(c,h){function f(a){try{v(d.next(a))}catch(y){h(y)}}function k(a){try{v(d["throw"](a))}catch(y){h(y)}}function v(a){a.done?c(a.value):
e(a.value).then(f,k)}v((d=d.apply(b,a||[])).next())})}function Sa(b,a){function c(a){return function(b){return d([a,b])}}function d(c){if(f)throw new TypeError("Generator is already executing.");for(;e;)try{if(f=1,h&&(l=c[0]&2?h["return"]:c[0]?h["throw"]||((l=h["return"])&&l.call(h),0):h.next)&&!(l=l.call(h,c[1])).done)return l;if(h=0,l)c=[c[0]&2,l.value];switch(c[0]){case 0:case 1:l=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++;h=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();
continue;default:if(!(l=e.trys,l=0<l.length&&l[l.length-1])&&(6===c[0]||2===c[0])){e=0;continue}if(3===c[0]&&(!l||c[1]>l[0]&&c[1]<l[3]))e.label=c[1];else if(6===c[0]&&e.label<l[1])e.label=l[1],l=c;else if(l&&e.label<l[2])e.label=l[2],e.ops.push(c);else{l[2]&&e.ops.pop();e.trys.pop();continue}}c=a.call(b,e)}catch(r){c=[6,r],h=0}finally{f=l=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}var e={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},f,h,l,k;return k=
{next:c(0),"throw":c(1),"return":c(2)},"function"===typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k}function F(b){var a="function"===typeof Symbol&&Symbol.iterator,c=a&&b[a],d=0;if(c)return c.call(b);if(b&&"number"===typeof b.length)return{next:function(){b&&d>=b.length&&(b=void 0);return{value:b&&b[d++],done:!b}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.");}function z(b,a){var c="function"===typeof Symbol&&b[Symbol.iterator];if(!c)return b;b=
c.call(b);var d,e=[],f;try{for(;(void 0===a||0<a--)&&!(d=b.next()).done;)e.push(d.value)}catch(h){f={error:h}}finally{try{d&&!d.done&&(c=b["return"])&&c.call(b)}finally{if(f)throw f.error;}}return e}function A(b,a,c){if(c||2===arguments.length)for(var d=0,e=a.length,f;d<e;d++)!f&&d in a||(f||(f=Array.prototype.slice.call(a,0,d)),f[d]=a[d]);return b.concat(f||Array.prototype.slice.call(a))}function da(b){return this instanceof da?(this.v=b,this):new da(b)}function Zd(b,a,c){function d(a){k[a]&&(v[a]=
function(b){return new Promise(function(c,d){1<g.push([a,b,c,d])||e(a,b)})})}function e(a,b){try{var c=k[a](b);c.value instanceof da?Promise.resolve(c.value.v).then(f,h):l(g[0][2],c)}catch(t){l(g[0][3],t)}}function f(a){e("next",a)}function h(a){e("throw",a)}function l(a,b){(a(b),g.shift(),g.length)&&e(g[0][0],g[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var k=c.apply(b,a||[]),v,g=[];return v={},d("next"),d("throw"),d("return"),v[Symbol.asyncIterator]=
function(){return this},v}function $d(b){function a(a){e[a]=b[a]&&function(d){return new Promise(function(e,f){d=b[a](d);c(e,f,d.done,d.value)})}}function c(a,b,c,d){Promise.resolve(d).then(function(b){a({value:b,done:c})},b)}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var d=b[Symbol.asyncIterator],e;return d?d.call(b):(b="function"===typeof F?F(b):b[Symbol.iterator](),e={},a("next"),a("throw"),a("return"),e[Symbol.asyncIterator]=function(){return this},e)}
function p(b){return"function"===typeof b}function S(b){b=b(function(a){Error.call(a);a.stack=Error().stack});b.prototype=Object.create(Error.prototype);return b.prototype.constructor=b}function P(b,a){b&&(a=b.indexOf(a),0<=a&&b.splice(a,1))}function Gb(b){return b instanceof D||b&&"closed"in b&&p(b.remove)&&p(b.add)&&p(b.unsubscribe)}function Hb(b){ea.setTimeout(function(){var a=T.onUnhandledError;if(a)a(b);else throw b;})}function B(){}function K(b,a,c){return{kind:b,value:a,error:c}}function Ca(b){if(T.useDeprecatedSynchronousErrorHandling){var a=
!W;a&&(W={errorThrown:!1,error:null});b();if(a&&(a=W,b=a.errorThrown,a=a.error,W=null,b))throw a;}else b()}function Ta(b,a){return function(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];try{b.apply(void 0,A([],z(a)))}catch(e){T.useDeprecatedSynchronousErrorHandling?T.useDeprecatedSynchronousErrorHandling&&W&&(W.errorThrown=!0,W.error=e):Hb(e)}}}function Ib(b){throw b;}function Ua(b,a){var c=T.onStoppedNotification;c&&ea.setTimeout(function(){return c(b,a)})}function E(b){return b}function Va(){for(var b=
[],a=0;a<arguments.length;a++)b[a]=arguments[a];return Jb(b)}function Jb(b){return 0===b.length?E:1===b.length?b[0]:function(a){return b.reduce(function(a,b){return b(a)},a)}}function Kb(b){var a;return null!==(a=null!==b&&void 0!==b?b:T.Promise)&&void 0!==a?a:Promise}function ae(b){var a;(a=b&&b instanceof ma)||(a=b&&p(b.next)&&p(b.error)&&p(b.complete)&&Gb(b));return a}function n(b){return function(a){if(p(null===a||void 0===a?void 0:a.lift))return a.lift(function(a){try{return b(a,this)}catch(d){this.error(d)}});
throw new TypeError("Unable to lift unknown Observable type");}}function Wa(){return n(function(b,a){var c=null;b._refCount++;var d=new m(a,void 0,void 0,void 0,function(){if(!b||0>=b._refCount||0<--b._refCount)c=null;else{var d=b._connection,f=c;c=null;!d||f&&d!==f||d.unsubscribe();a.unsubscribe()}});b.subscribe(d);d.closed||(c=b.connect())})}function Lb(b){var a=U.schedule;return new q(function(c){var d=new D,e=b||Da,f=e.now(),h=function(l){var k=e.now();c.next({timestamp:b?k:l,elapsed:k-f});c.closed||
d.add(a(h))};d.add(a(h));return d})}function Mb(b){return b in Xa?(delete Xa[b],!0):!1}function be(b){return new q(function(a){return b.schedule(function(){return a.complete()})})}function Ea(b){return b&&p(b.schedule)}function na(b){return p(b[b.length-1])?b.pop():void 0}function Q(b){return Ea(b[b.length-1])?b.pop():void 0}function Nb(b){return Symbol.asyncIterator&&p(null===b||void 0===b?void 0:b[Symbol.asyncIterator])}function Ob(b){return new TypeError("You provided "+(null!==b&&"object"===typeof b?
"an invalid object":"'"+b+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Pb(b){return p(null===b||void 0===b?void 0:b[Ya])}function Qb(b){return Zd(this,arguments,function(){var a,c,d,e;return Sa(this,function(f){switch(f.label){case 0:a=b.getReader(),f.label=1;case 1:f.trys.push([1,,9,10]),f.label=2;case 2:return[4,da(a.read())];case 3:return c=f.sent(),d=c.value,(e=c.done)?[4,da(void 0)]:[3,5];case 4:return[2,
f.sent()];case 5:return[4,da(d)];case 6:return[4,f.sent()];case 7:return f.sent(),[3,2];case 8:return[3,10];case 9:return a.releaseLock(),[7];case 10:return[2]}})})}function u(b){if(b instanceof q)return b;if(null!=b){if(p(b[oa]))return ce(b);if(Za(b))return de(b);if(p(null===b||void 0===b?void 0:b.then))return ee(b);if(Nb(b))return Rb(b);if(Pb(b))return fe(b);if(p(null===b||void 0===b?void 0:b.getReader))return Rb(Qb(b))}throw Ob(b);}function ce(b){return new q(function(a){var c=b[oa]();if(p(c.subscribe))return c.subscribe(a);
throw new TypeError("Provided object does not correctly implement Symbol.observable");})}function de(b){return new q(function(a){for(var c=0;c<b.length&&!a.closed;c++)a.next(b[c]);a.complete()})}function ee(b){return new q(function(a){b.then(function(b){a.closed||(a.next(b),a.complete())},function(b){return a.error(b)}).then(null,Hb)})}function fe(b){return new q(function(a){var c,d;try{for(var e=F(b),f=e.next();!f.done;f=e.next())if(a.next(f.value),a.closed)return}catch(h){c={error:h}}finally{try{f&&
!f.done&&(d=e.return)&&d.call(e)}finally{if(c)throw c.error;}}a.complete()})}function Rb(b){return new q(function(a){ge(b,a).catch(function(b){return a.error(b)})})}function ge(b,a){var c,d,e,f;return Yd(this,void 0,void 0,function(){var h,l;return Sa(this,function(k){switch(k.label){case 0:k.trys.push([0,5,6,11]),c=$d(b),k.label=1;case 1:return[4,c.next()];case 2:if(d=k.sent(),d.done)return[3,4];h=d.value;a.next(h);if(a.closed)return[2];k.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return l=
k.sent(),e={error:l},[3,11];case 6:return k.trys.push([6,,9,10]),d&&!d.done&&(f=c.return)?[4,f.call(c)]:[3,8];case 7:k.sent(),k.label=8;case 8:return[3,10];case 9:if(e)throw e.error;return[7];case 10:return[7];case 11:return a.complete(),[2]}})})}function G(b,a,c,d,e){void 0===d&&(d=0);void 0===e&&(e=!1);a=a.schedule(function(){c();e?b.add(this.schedule(null,d)):this.unsubscribe()},d);b.add(a);if(!e)return a}function pa(b,a){void 0===a&&(a=0);return n(function(c,d){c.subscribe(new m(d,function(c){return G(d,
b,function(){return d.next(c)},a)},function(){return G(d,b,function(){return d.complete()},a)},function(c){return G(d,b,function(){return d.error(c)},a)}))})}function qa(b,a){void 0===a&&(a=0);return n(function(c,d){d.add(b.schedule(function(){return c.subscribe(d)},a))})}function he(b,a){return new q(function(c){var d=0;return a.schedule(function(){d===b.length?c.complete():(c.next(b[d++]),c.closed||this.schedule())})})}function Sb(b,a){return new q(function(c){var d;G(c,a,function(){d=b[Ya]();G(c,
a,function(){var a,b,h;try{a=d.next(),b=a.value,h=a.done}catch(l){c.error(l);return}h?c.complete():c.next(b)},0,!0)});return function(){return p(null===d||void 0===d?void 0:d.return)&&d.return()}})}function Tb(b,a){if(!b)throw Error("Iterable cannot be null");return new q(function(c){G(c,a,function(){var d=b[Symbol.asyncIterator]();G(c,a,function(){d.next().then(function(a){a.done?c.complete():c.next(a.value)})},0,!0)})})}function Ub(b,a){if(null!=b){if(p(b[oa]))return u(b).pipe(qa(a),pa(a));if(Za(b))return he(b,
a);if(p(null===b||void 0===b?void 0:b.then))return u(b).pipe(qa(a),pa(a));if(Nb(b))return Tb(b,a);if(Pb(b))return Sb(b,a);if(p(null===b||void 0===b?void 0:b.getReader))return Tb(Qb(b),a)}throw Ob(b);}function L(b,a){return a?Ub(b,a):u(b)}function $a(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];a=Q(b);return L(b,a)}function Vb(b,a){var c=p(b)?b:function(){return b},d=function(a){return a.error(c())};return new q(a?function(b){return a.schedule(d,0,b)}:d)}function Fa(b,a){var c,d,e,f=
b.kind,h=b.value;b=b.error;if("string"!==typeof f)throw new TypeError('Invalid notification, missing "kind"');"N"===f?null===(c=a.next)||void 0===c?void 0:c.call(a,h):"E"===f?null===(d=a.error)||void 0===d?void 0:d.call(a,b):null===(e=a.complete)||void 0===e?void 0:e.call(a)}function ab(b){return b instanceof Date&&!isNaN(b)}function bb(b,a){b=ab(b)?{first:b}:"number"===typeof b?{each:b}:b;var c=b.first,d=b.each,e=b.with,f=void 0===e?ie:e,e=b.scheduler,h=void 0===e?null!==a&&void 0!==a?a:I:e;a=b.meta;
var l=void 0===a?null:a;if(null==c&&null==d)throw new TypeError("No timeout provided.");return n(function(a,b){var e,k,g=null,v=0,t=function(a){k=G(b,h,function(){try{e.unsubscribe(),u(f({meta:l,lastValue:g,seen:v})).subscribe(b)}catch(je){b.error(je)}},a)};e=a.subscribe(new m(b,function(a){null===k||void 0===k?void 0:k.unsubscribe();v++;b.next(g=a);0<d&&t(d)},void 0,void 0,function(){(null===k||void 0===k?0:k.closed)||(null===k||void 0===k?void 0:k.unsubscribe());g=null}));t(null!=c?"number"===typeof c?
c:+c-h.now():d)})}function ie(b){throw new Wb(b);}function N(b,a){return n(function(c,d){var e=0;c.subscribe(new m(d,function(c){d.next(b.call(a,c,e++))}))})}function X(b){return N(function(a){return ke(a)?b.apply(void 0,A([],z(a))):b(a)})}function Ga(b,a,c,d){if(c)if(Ea(c))d=c;else return function(){for(var e=[],f=0;f<arguments.length;f++)e[f]=arguments[f];return Ga(b,a,d).apply(this,e).pipe(X(c))};return d?function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];return Ga(b,a).apply(this,
c).pipe(qa(d),pa(d))}:function(){for(var c=this,d=[],h=0;h<arguments.length;h++)d[h]=arguments[h];var l=new cb,k=!0;return new q(function(e){e=l.subscribe(e);if(k){var f=k=!1,h=!1;a.apply(c,A(A([],z(d)),[function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];if(b&&(c=a.shift(),null!=c)){l.error(c);return}l.next(1<a.length?a:a[0]);h=!0;f&&l.complete()}]));h&&l.complete();f=!0}return e})}}function Xb(b){if(1===b.length){var a=b[0];if(le(a))return{args:a,keys:null};if(a&&"object"===typeof a&&
me(a)===ne)return b=oe(a),{args:b.map(function(b){return a[b]}),keys:b}}return{args:b,keys:null}}function Yb(b,a){return b.reduce(function(b,d,e){return b[d]=a[e],b},{})}function Zb(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];var c=Q(b),a=na(b),b=Xb(b),d=b.args,e=b.keys;if(0===d.length)return L([],c);c=new q($b(d,c,e?function(a){return Yb(e,a)}:E));return a?c.pipe(X(a)):c}function $b(b,a,c){void 0===c&&(c=E);return function(d){ac(a,function(){for(var e=b.length,f=Array(e),h=e,l=e,
k=function(e){ac(a,function(){var k=!1;L(b[e],a).subscribe(new m(d,function(a){f[e]=a;k||(k=!0,l--);l||d.next(c(f.slice()))},function(){--h||d.complete()}))},d)},g=0;g<e;g++)k(g)},d)}}function ac(b,a,c){b?G(c,b,a):a()}function db(b,a,c,d,e,f,h,l){var k=[],g=0,r=0,y=!1,x=function(a){return g<d?R(a):k.push(a)},R=function(b){f&&a.next(b);g++;var l=!1;u(c(b,r++)).subscribe(new m(a,function(b){null===e||void 0===e?void 0:e(b);f?x(b):a.next(b)},function(){l=!0},void 0,function(){if(l)try{g--;for(var b=
function(){var b=k.shift();h?G(a,h,function(){return R(b)}):R(b)};k.length&&g<d;)b();!y||k.length||g||a.complete()}catch(J){a.error(J)}}))};b.subscribe(new m(a,x,function(){y=!0;!y||k.length||g||a.complete()}));return function(){null===l||void 0===l?void 0:l()}}function H(b,a,c){void 0===c&&(c=Infinity);if(p(a))return H(function(c,e){return N(function(b,d){return a(c,b,e,d)})(u(b(c,e)))},c);"number"===typeof a&&(c=a);return n(function(a,e){return db(a,e,b,c)})}function ra(b){void 0===b&&(b=Infinity);
return H(E,b)}function Ha(){return ra(1)}function sa(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return Ha()(L(b,Q(b)))}function ta(b){return new q(function(a){u(b()).subscribe(a)})}function eb(b,a,c,d){p(c)&&(d=c,c=void 0);if(d)return eb(b,a,c).pipe(X(d));d=z(pe(b)?qe.map(function(d){return function(e){return b[d](a,e,c)}}):re(b)?se.map(bc(b,a)):te(b)?ue.map(bc(b,a)):[],2);var e=d[0],f=d[1];if(!e&&Za(b))return H(function(b){return eb(b,a,c)})(u(b));if(!e)throw new TypeError("Invalid event target");
return new q(function(a){var b=function(){for(var b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];return a.next(1<b.length?b:b[0])};e(b);return function(){return f(b)}})}function bc(b,a){return function(c){return function(d){return b[c](a,d)}}}function re(b){return p(b.addListener)&&p(b.removeListener)}function te(b){return p(b.on)&&p(b.off)}function pe(b){return p(b.addEventListener)&&p(b.removeEventListener)}function cc(b,a,c){return c?cc(b,a).pipe(X(c)):new q(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=b(d);return p(a)?function(){return a(d,f)}:void 0})}function Y(b,a,c){void 0===b&&(b=0);void 0===c&&(c=fb);var d=-1;null!=a&&(Ea(a)?c=a:d=a);return new q(function(a){var e=ab(b)?+b-c.now():b;0>e&&(e=0);var h=0;return c.schedule(function(){a.closed||(a.next(h++),0<=d?this.schedule(void 0,d):a.complete())},e)})}function dc(b,a){void 0===b&&(b=0);void 0===a&&(a=I);0>b&&(b=0);return Y(b,b,a)}function Z(b){return 1===
b.length&&ve(b[0])?b[0]:b}function ec(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];var c=Z(b);return n(function(a,b){var d=A([a],z(c)),e=function(){if(!b.closed)if(0<d.length){var a=void 0;try{a=u(d.shift())}catch(v){e();return}var c=new m(b,void 0,B,B);b.add(a.subscribe(c));c.add(e)}else b.complete()};e()})}function fc(b,a){return function(c,d){return!b.call(a,c,d)}}function O(b,a){return n(function(c,d){var e=0;c.subscribe(new m(d,function(c){return b.call(a,c,e++)&&d.next(c)}))})}
function gc(b){return function(a){for(var c=[],d=function(d){c.push(u(b[d]).subscribe(new m(a,function(b){if(c){for(var e=0;e<c.length;e++)e!==d&&c[e].unsubscribe();c=null}a.next(b)})))},e=0;c&&!a.closed&&e<b.length;e++)d(e)}}function gb(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];var c=na(b),d=Z(b);return d.length?new q(function(a){var b=d.map(function(){return[]}),e=d.map(function(){return!1});a.add(function(){b=e=null});for(var l=function(f){u(d[f]).subscribe(new m(a,function(d){b[f].push(d);
b.every(function(a){return a.length})&&(d=b.map(function(a){return a.shift()}),a.next(c?c.apply(void 0,A([],z(d))):d),b.some(function(a,b){return!a.length&&e[b]})&&a.complete())},function(){e[f]=!0;!b[f].length&&a.complete()}))},k=0;!a.closed&&k<d.length;k++)l(k);return function(){b=e=null}}):M}function hb(b){return n(function(a,c){var d=!1,e=null,f=null,h=!1,l=function(){null===f||void 0===f?void 0:f.unsubscribe();f=null;if(d){d=!1;var a=e;e=null;c.next(a)}h&&c.complete()},k=function(){f=null;h&&
c.complete()};a.subscribe(new m(c,function(a){d=!0;e=a;f||u(b(a)).subscribe(f=new m(c,l,k))},function(){h=!0;d&&f&&!f.closed||c.complete()}))})}function hc(b,a){void 0===a&&(a=I);return hb(function(){return Y(b,a)})}function ic(b){return n(function(a,c){var d=[];a.subscribe(new m(c,function(a){return d.push(a)},function(){c.next(d);c.complete()}));b.subscribe(new m(c,function(){var a=d;d=[];c.next(a)},B));return function(){d=null}})}function jc(b,a){void 0===a&&(a=null);a=null!==a&&void 0!==a?a:b;
return n(function(c,d){var e=[],f=0;c.subscribe(new m(d,function(c){var h,k,g,r,y=null;0===f++%a&&e.push([]);try{for(var x=F(e),m=x.next();!m.done;m=x.next()){var t=m.value;t.push(c);b<=t.length&&(y=null!==y&&void 0!==y?y:[],y.push(t))}}catch(J){h={error:J}}finally{try{m&&!m.done&&(k=x.return)&&k.call(x)}finally{if(h)throw h.error;}}if(y)try{for(var fa=F(y),n=fa.next();!n.done;n=fa.next())t=n.value,P(e,t),d.next(t)}catch(J){g={error:J}}finally{try{n&&!n.done&&(r=fa.return)&&r.call(fa)}finally{if(g)throw g.error;
}}},function(){var a,b;try{for(var c=F(e),f=c.next();!f.done;f=c.next())d.next(f.value)}catch(r){a={error:r}}finally{try{f&&!f.done&&(b=c.return)&&b.call(c)}finally{if(a)throw a.error;}}d.complete()},void 0,function(){e=null}))})}function kc(b){for(var a,c,d=[],e=1;e<arguments.length;e++)d[e-1]=arguments[e];var f=null!==(a=Q(d))&&void 0!==a?a:I,h=null!==(c=d[0])&&void 0!==c?c:null,l=d[1]||Infinity;return n(function(a,c){var d=[],e=!1,k=function(a){var b=a.buffer;a.subs.unsubscribe();P(d,a);c.next(b);
e&&g()},g=function(){if(d){var a=new D;c.add(a);var e={buffer:[],subs:a};d.push(e);G(a,f,function(){return k(e)},b)}};null!==h&&0<=h?G(c,f,g,h,!0):e=!0;g();var v=new m(c,function(a){var b,c,e=d.slice();try{for(var f=F(e),h=f.next();!h.done;h=f.next()){var g=h.value,v=g.buffer;v.push(a);l<=v.length&&k(g)}}catch(xe){b={error:xe}}finally{try{h&&!h.done&&(c=f.return)&&c.call(f)}finally{if(b)throw b.error;}}},function(){for(;null===d||void 0===d?0:d.length;)c.next(d.shift().buffer);null===v||void 0===
v?void 0:v.unsubscribe();c.complete();c.unsubscribe()},void 0,function(){return d=null});a.subscribe(v)})}function lc(b,a){return n(function(c,d){var e=[];u(b).subscribe(new m(d,function(b){var c=[];e.push(c);var f=new D;f.add(u(a(b)).subscribe(new m(d,function(){P(e,c);d.next(c);f.unsubscribe()},B)))},B));c.subscribe(new m(d,function(a){var b,c;try{for(var d=F(e),f=d.next();!f.done;f=d.next())f.value.push(a)}catch(r){b={error:r}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(b)throw b.error;
}}},function(){for(;0<e.length;)d.next(e.shift());d.complete()}))})}function mc(b){return n(function(a,c){var d=null,e=null,f=function(){null===e||void 0===e?void 0:e.unsubscribe();var a=d;d=[];a&&c.next(a);u(b()).subscribe(e=new m(c,f,B))};f();a.subscribe(new m(c,function(a){return null===d||void 0===d?void 0:d.push(a)},function(){d&&c.next(d);c.complete()},void 0,function(){return d=e=null}))})}function ib(b){return n(function(a,c){var d=null,e=!1,f,d=a.subscribe(new m(c,void 0,void 0,function(h){f=
u(b(h,ib(b)(a)));d?(d.unsubscribe(),d=null,f.subscribe(c)):e=!0}));e&&(d.unsubscribe(),d=null,f.subscribe(c))})}function nc(b,a,c,d,e){return function(f,h){var l=c,k=a,g=0;f.subscribe(new m(h,function(a){var c=g++;k=l?b(k,a,c):(l=!0,a);d&&h.next(k)},e&&function(){l&&h.next(k);h.complete()}))}}function ga(b,a){return n(nc(b,a,2<=arguments.length,!1,!0))}function jb(){return n(function(b,a){ga(ye,[])(b).subscribe(a)})}function oc(b,a){return Va(jb(),H(function(a){return b(a)}),a?X(a):E)}function Ia(b){return oc(Zb,
b)}function kb(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return(a=na(b))?Va(kb.apply(void 0,A([],z(b))),X(a)):n(function(a,d){$b(A([a],z(Z(b))))(d)})}function pc(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return kb.apply(void 0,A([],z(b)))}function Ja(b,a){return p(a)?H(b,a,1):H(b,1)}function qc(b,a){return p(a)?Ja(function(){return b},a):Ja(function(){return b})}function rc(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];var c=Q(b);return n(function(a,
e){Ha()(L(A([a],z(b)),c)).subscribe(e)})}function sc(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return rc.apply(void 0,A([],z(b)))}function ze(b){return new q(function(a){return b.subscribe(a)})}function Ka(b,a){void 0===a&&(a=Ae);var c=a.connector;return n(function(a,e){var d=c();L(b(ze(d))).subscribe(e);e.add(a.subscribe(d))})}function tc(b){return ga(function(a,c,d){return!b||b(c,d)?a+1:a},0)}function uc(b){return n(function(a,c){var d=!1,e=null,f=null,h=function(){null===f||void 0===
f?void 0:f.unsubscribe();f=null;if(d){d=!1;var a=e;e=null;c.next(a)}};a.subscribe(new m(c,function(a){null===f||void 0===f?void 0:f.unsubscribe();d=!0;e=a;f=new m(c,h,B);u(b(a)).subscribe(f)},function(){h();c.complete()},void 0,function(){e=f=null}))})}function vc(b,a){void 0===a&&(a=I);return n(function(c,d){function e(){var c=l+b,e=a.now();e<c?(f=this.schedule(void 0,c-e),d.add(f)):k()}var f=null,h=null,l=null,k=function(){if(f){f.unsubscribe();f=null;var a=h;h=null;d.next(a)}};c.subscribe(new m(d,
function(c){h=c;l=a.now();f||(f=a.schedule(e,b),d.add(f))},function(){k();d.complete()},void 0,function(){h=f=null}))})}function ua(b){return n(function(a,c){var d=!1;a.subscribe(new m(c,function(a){d=!0;c.next(a)},function(){d||c.next(b);c.complete()}))})}function aa(b){return 0>=b?function(){return M}:n(function(a,c){var d=0;a.subscribe(new m(c,function(a){++d<=b&&(c.next(a),b<=d&&c.complete())}))})}function lb(){return n(function(b,a){b.subscribe(new m(a,B))})}function mb(b){return N(function(){return b})}
function La(b,a){return a?function(c){return sa(a.pipe(aa(1),lb()),c.pipe(La(b)))}:H(function(a,d){return b(a,d).pipe(aa(1),mb(a))})}function wc(b,a){void 0===a&&(a=I);var c=Y(b,a);return La(function(){return c})}function xc(){return n(function(b,a){b.subscribe(new m(a,function(b){return Fa(b,a)}))})}function yc(b,a){return n(function(c,d){var e=new Set;c.subscribe(new m(d,function(a){var c=b?b(a):a;e.has(c)||(e.add(c),d.next(a))}));null===a||void 0===a?void 0:a.subscribe(new m(d,function(){return e.clear()},
B))})}function nb(b,a){void 0===a&&(a=E);b=null!==b&&void 0!==b?b:Be;return n(function(c,d){var e,f=!0;c.subscribe(new m(d,function(c){var h=a(c);if(f||!b(e,h))f=!1,e=h,d.next(c)}))})}function Be(b,a){return b===a}function zc(b,a){return nb(function(c,d){return a?a(c[b],d[b]):c[b]===d[b]})}function va(b){void 0===b&&(b=Ce);return n(function(a,c){var d=!1;a.subscribe(new m(c,function(a){d=!0;c.next(a)},function(){return d?c.complete():c.error(b())}))})}function Ce(){return new ba}function Ac(b,a){if(0>
b)throw new ob;var c=2<=arguments.length;return function(d){return d.pipe(O(function(a,c){return c===b}),aa(1),c?ua(a):va(function(){return new ob}))}}function Bc(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return function(a){return sa(a,$a.apply(void 0,A([],z(b))))}}function Cc(b,a){return n(function(c,d){var e=0;c.subscribe(new m(d,function(f){b.call(a,f,e++,c)||(d.next(!1),d.complete())},function(){d.next(!0);d.complete()}))})}function Ma(){return n(function(b,a){var c=!1,d=null;
b.subscribe(new m(a,function(b){d||(d=u(b).subscribe(new m(a,void 0,function(){d=null;c&&a.complete()})))},function(){c=!0;!d&&a.complete()}))})}function pb(b,a){return a?function(c){return c.pipe(pb(function(c,e){return u(b(c,e)).pipe(N(function(b,d){return a(c,b,e,d)}))}))}:n(function(a,d){var c=0,f=null,h=!1;a.subscribe(new m(d,function(a){f||(f=new m(d,void 0,function(){f=null;h&&d.complete()}),u(b(a,c++)).subscribe(f))},function(){h=!0;!f&&d.complete()}))})}function Dc(b,a,c){void 0===a&&(a=
Infinity);a=1>(a||0)?Infinity:a;return n(function(d,e){return db(d,e,b,a,void 0,!0,c)})}function Ec(b){return n(function(a,c){try{a.subscribe(c)}finally{c.add(b)}})}function Fc(b,a){return n(Gc(b,a,"value"))}function Gc(b,a,c){var d="index"===c;return function(c,f){var e=0;c.subscribe(new m(f,function(h){var l=e++;b.call(a,h,l,c)&&(f.next(d?l:h),f.complete())},function(){f.next(d?-1:void 0);f.complete()}))}}function Hc(b,a){return n(Gc(b,a,"index"))}function Ic(b,a){var c=2<=arguments.length;return function(d){return d.pipe(b?
O(function(a,c){return b(a,c,d)}):E,aa(1),c?ua(a):va(function(){return new ba}))}}function Jc(b,a,c,d){return n(function(e,f){function h(a,b){var c=new q(function(a){y.activeGroups++;var c=b.subscribe(a);return function(){c.unsubscribe();0===--y.activeGroups&&y.teardownAttempted&&y.unsubscribe()}});c.key=a;return c}var l;a&&"function"!==typeof a?(c=a.duration,l=a.element,d=a.connector):l=a;var k=new Map,g=function(a){k.forEach(a);a(f)},r=function(a){return g(function(b){return b.error(a)})},y=new De(f,
function(a){try{var e=b(a),g=k.get(e);if(!g){k.set(e,g=d?d():new C);var v=h(e,g);f.next(v);if(c){var x=new m(g,function(){g.complete();null===x||void 0===x?void 0:x.unsubscribe()},void 0,void 0,function(){return k.delete(e)});y.add(u(c(v)).subscribe(x))}}g.next(l?l(a):a)}catch(J){r(J)}},function(){return g(function(a){return a.complete()})},r,function(){return k.clear()});e.subscribe(y)})}function Kc(){return n(function(b,a){b.subscribe(new m(a,function(){a.next(!1);a.complete()},function(){a.next(!0);
a.complete()}))})}function qb(b){return 0>=b?function(){return M}:n(function(a,c){var d=[];a.subscribe(new m(c,function(a){d.push(a);b<d.length&&d.shift()},function(){var a,b;try{for(var h=F(d),l=h.next();!l.done;l=h.next())c.next(l.value)}catch(k){a={error:k}}finally{try{l&&!l.done&&(b=h.return)&&b.call(h)}finally{if(a)throw a.error;}}c.complete()},void 0,function(){d=null}))})}function Lc(b,a){var c=2<=arguments.length;return function(d){return d.pipe(b?O(function(a,c){return b(a,c,d)}):E,qb(1),
c?ua(a):va(function(){return new ba}))}}function Mc(){return n(function(b,a){b.subscribe(new m(a,function(b){a.next(Na.createNext(b))},function(){a.next(Na.createComplete());a.complete()},function(b){a.next(Na.createError(b));a.complete()}))})}function Nc(b){return ga(p(b)?function(a,c){return 0<b(a,c)?a:c}:function(a,b){return a>b?a:b})}function Oc(b,a,c){void 0===c&&(c=Infinity);if(p(a))return H(function(){return b},a,c);"number"===typeof a&&(c=a);return H(function(){return b},c)}function Pc(b,
a,c){void 0===c&&(c=Infinity);return n(function(d,e){var f=a;return db(d,e,function(a,c){return b(f,a,c)},c,function(a){f=a},!1,void 0,function(){return f=null})})}function Qc(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];var c=Q(b),d="number"===typeof b[b.length-1]?b.pop():Infinity,b=Z(b);return n(function(a,f){ra(d)(L(A([a],z(b)),c)).subscribe(f)})}function Rc(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return Qc.apply(void 0,A([],z(b)))}function Sc(b){return ga(p(b)?
function(a,c){return 0>b(a,c)?a:c}:function(a,b){return a<b?a:b})}function Oa(b,a){var c=p(b)?b:function(){return b};return p(a)?Ka(a,{connector:c}):function(a){return new Pa(a,c)}}function Tc(){return n(function(b,a){var c,d=!1;b.subscribe(new m(a,function(b){var e=c;c=b;d&&a.next([e,b]);d=!0}))})}function Uc(){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 N(function(a){var d=a;for(a=0;a<c;a++)if(d=null===
d||void 0===d?void 0:d[b[a]],"undefined"===typeof d)return;return d})}function Vc(b){return b?function(a){return Ka(b)(a)}:function(a){return Oa(new C)(a)}}function Wc(b){return function(a){var c=new Xc(b);return new Pa(a,function(){return c})}}function Yc(){return function(b){var a=new cb;return new Pa(b,function(){return a})}}function Zc(b,a,c,d){c&&!p(c)&&(d=c);var e=p(c)?c:void 0;return function(c){return Oa(new ha(b,a,d),e)(c)}}function rb(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];
return b.length?n(function(a,d){gc(A([a],z(b)))(d)}):E}function $c(b){var a,c=Infinity,d;null!=b&&("object"===typeof b?(a=b.count,c=void 0===a?Infinity:a,d=b.delay):c=b);return 0>=c?function(){return M}:n(function(a,b){var e=0,f,k=function(){null===f||void 0===f?void 0:f.unsubscribe();f=null;if(null!=d){var a="number"===typeof d?Y(d):u(d(e)),c=new m(b,function(){c.unsubscribe();g()});a.subscribe(c)}else g()},g=function(){var d=!1;f=a.subscribe(new m(b,void 0,function(){++e<c?f?k():d=!0:b.complete()}));
d&&k()};g()})}function ad(b){return n(function(a,c){var d,e=!1,f,h=!1,l=!1,k=function(){f||(f=new C,b(f).subscribe(new m(c,function(){d?g():e=!0},function(){h=!0;l&&h&&c.complete()})));return f},g=function(){l=!1;d=a.subscribe(new m(c,void 0,function(){(l=!0,h)&&(c.complete(),!0)||k().next()}));e&&(d.unsubscribe(),d=null,e=!1,g())};g()})}function bd(b){void 0===b&&(b=Infinity);b=b&&"object"===typeof b?b:{count:b};var a=b.count,c=void 0===a?Infinity:a,d=b.delay;b=b.resetOnSuccess;var e=void 0===b?
!1:b;return 0>=c?E:n(function(a,b){var f=0,h,g=function(){var l=!1;h=a.subscribe(new m(b,function(a){e&&(f=0);b.next(a)},void 0,function(a){if(f++<c){var e=function(){h?(h.unsubscribe(),h=null,g()):l=!0};if(null!=d){a="number"===typeof d?Y(d):u(d(a,f));var k=new m(b,function(){k.unsubscribe();e()},function(){b.complete()});a.subscribe(k)}else e()}else b.error(a)}));l&&(h.unsubscribe(),h=null,g())};g()})}function cd(b){return n(function(a,c){var d,e=!1,f,h=function(){d=a.subscribe(new m(c,void 0,void 0,
function(a){f||(f=new C,b(f).subscribe(new m(c,function(){return d?h():e=!0})));f&&f.next(a)}));e&&(d.unsubscribe(),d=null,e=!1,h())};h()})}function sb(b){return n(function(a,c){var d=!1,e=null;a.subscribe(new m(c,function(a){d=!0;e=a}));b.subscribe(new m(c,function(){if(d){d=!1;var a=e;e=null;c.next(a)}},B))})}function dd(b,a){void 0===a&&(a=I);return sb(dc(b,a))}function tb(b,a){return n(nc(b,a,2<=arguments.length,!0))}function ed(b,a){void 0===a&&(a=function(a,b){return a===b});return n(function(c,
d){var e={buffer:[],complete:!1},f={buffer:[],complete:!1},h=function(b,c){var e=new m(d,function(e){var f=c.buffer,h=c.complete;0===f.length?h?(d.next(!1),d.complete()):b.buffer.push(e):a(e,f.shift())||(d.next(!1),d.complete())},function(){b.complete=!0;var a=c.buffer;c.complete&&(d.next(0===a.length),d.complete());null===e||void 0===e?void 0:e.unsubscribe()});return e};c.subscribe(h(e,f));b.subscribe(h(f,e))})}function ub(b){void 0===b&&(b={});var a=b.connector,c=void 0===a?function(){return new C}:
a,a=b.resetOnError,d=void 0===a?!0:a,a=b.resetOnComplete,e=void 0===a?!0:a;b=b.resetOnRefCountZero;var f=void 0===b?!0:b;return function(a){var b=null,h=null,g=null,r=0,y=!1,m=!1,R=function(){null===h||void 0===h?void 0:h.unsubscribe();h=null},t=function(){R();b=g=null;y=m=!1},fa=function(){var a=b;t();null===a||void 0===a?void 0:a.unsubscribe()};return n(function(a,l){r++;m||y||R();var k=g=null!==g&&void 0!==g?g:c();l.add(function(){r--;0!==r||m||y||(h=vb(fa,f))});k.subscribe(l);b||(b=new wa({next:function(a){return k.next(a)},
error:function(a){m=!0;R();h=vb(t,d,a);k.error(a)},complete:function(){y=!0;R();h=vb(t,e);k.complete()}}),L(a).subscribe(b))})(a)}}function vb(b,a){for(var c=[],d=2;d<arguments.length;d++)c[d-2]=arguments[d];return!0===a?(b(),null):!1===a?null:a.apply(void 0,A([],z(c))).pipe(aa(1)).subscribe(function(){return b()})}function fd(b,a,c){var d,e,f,h=!1;b&&"object"===typeof b?(f=null!==(d=b.bufferSize)&&void 0!==d?d:Infinity,a=null!==(e=b.windowTime)&&void 0!==e?e:Infinity,h=!!b.refCount,c=b.scheduler):
f=null!==b&&void 0!==b?b:Infinity;return ub({connector:function(){return new ha(f,a,c)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:h})}function gd(b){return n(function(a,c){var d=!1,e,f=!1,h=0;a.subscribe(new m(c,function(l){f=!0;if(!b||b(l,h++,a))d&&c.error(new hd("Too many matching values")),d=!0,e=l},function(){d?(c.next(e),c.complete()):c.error(f?new id("No matching values"):new ba)}))})}function jd(b){return O(function(a,c){return b<=c})}function kd(b){return 0>=b?E:n(function(a,
c){var d=Array(b),e=0;a.subscribe(new m(c,function(a){var f=e++;if(f<b)d[f]=a;else{var f=f%b,l=d[f];d[f]=a;c.next(l)}}));return function(){d=null}})}function ld(b){return n(function(a,c){var d=!1,e=new m(c,function(){null===e||void 0===e?void 0:e.unsubscribe();d=!0},B);u(b).subscribe(e);a.subscribe(new m(c,function(a){return d&&c.next(a)}))})}function md(b){return n(function(a,c){var d=!1,e=0;a.subscribe(new m(c,function(a){return(d||(d=!b(a,e++)))&&c.next(a)}))})}function nd(){for(var b=[],a=0;a<
arguments.length;a++)b[a]=arguments[a];var c=Q(b);return n(function(a,e){(c?sa(b,a,c):sa(b,a)).subscribe(e)})}function ia(b,a){return n(function(c,d){var e=null,f=0,h=!1;c.subscribe(new m(d,function(c){null===e||void 0===e?void 0:e.unsubscribe();var l=0,g=f++;u(b(c,g)).subscribe(e=new m(d,function(b){return d.next(a?a(c,b,g,l++):b)},function(){e=null;h&&!e&&d.complete()}))},function(){(h=!0,!e)&&d.complete()}))})}function od(){return ia(E)}function pd(b,a){return p(a)?ia(function(){return b},a):ia(function(){return b})}
function qd(b,a){return n(function(c,d){var e=a;ia(function(a,c){return b(e,a,c)},function(a,b){return e=b,b})(c).subscribe(d);return function(){e=null}})}function rd(b){return n(function(a,c){u(b).subscribe(new m(c,function(){return c.complete()},B));!c.closed&&a.subscribe(c)})}function sd(b,a){void 0===a&&(a=!1);return n(function(c,d){var e=0;c.subscribe(new m(d,function(c){var f=b(c,e++);(f||a)&&d.next(c);!f&&d.complete()}))})}function td(b,a,c){var d=p(b)||a||c?{next:b,error:a,complete:c}:b;return d?
n(function(a,b){var c;null===(c=d.subscribe)||void 0===c?void 0:c.call(d);var e=!0;a.subscribe(new m(b,function(a){var c;null===(c=d.next)||void 0===c?void 0:c.call(d,a);b.next(a)},function(){var a;e=!1;null===(a=d.complete)||void 0===a?void 0:a.call(d);b.complete()},function(a){var c;e=!1;null===(c=d.error)||void 0===c?void 0:c.call(d,a);b.error(a)},function(){var a,b;e&&(null===(a=d.unsubscribe)||void 0===a?void 0:a.call(d));null===(b=d.finalize)||void 0===b?void 0:b.call(d)}))}):E}function wb(b,
a){void 0===a&&(a=ud);return n(function(c,d){var e=a.leading,f=a.trailing,h=!1,l=null,g=null,v=!1,r=function(){null===g||void 0===g?void 0:g.unsubscribe();g=null;f&&(n(),v&&d.complete())},y=function(){g=null;v&&d.complete()},n=function(){if(h){h=!1;var a=l;l=null;d.next(a);!v&&(g=u(b(a)).subscribe(new m(d,r,y)))}};c.subscribe(new m(d,function(a){h=!0;l=a;(!g||g.closed)&&(e?n():g=u(b(a)).subscribe(new m(d,r,y)))},function(){v=!0;f&&h&&g&&!g.closed||d.complete()}))})}function vd(b,a,c){void 0===a&&
(a=I);void 0===c&&(c=ud);var d=Y(b,a);return wb(function(){return d},c)}function wd(b){void 0===b&&(b=I);return function(a){return ta(function(){return a.pipe(tb(function(a,d){a=a.current;return{value:d,current:b.now(),last:a}},{current:b.now(),value:void 0,last:void 0}),N(function(a){return new Ee(a.value,a.current-a.last)}))})}}function xd(b,a,c){var d,e;c=null!==c&&void 0!==c?c:fb;ab(b)?d=b:"number"===typeof b&&(e=b);if(a)b=function(){return a};else throw new TypeError("No observable provided to switch to");
if(null==d&&null==e)throw new TypeError("No timeout provided.");return bb({first:d,each:e,scheduler:c,with:b})}function yd(b){void 0===b&&(b=ja);return N(function(a){return{value:a,timestamp:b.now()}})}function zd(b){return n(function(a,c){var d=new C;c.next(d.asObservable());var e=function(a){d.error(a);c.error(a)};a.subscribe(new m(c,function(a){return null===d||void 0===d?void 0:d.next(a)},function(){d.complete();c.complete()},e));b.subscribe(new m(c,function(){d.complete();c.next(d=new C)},B,
e));return function(){null===d||void 0===d?void 0:d.unsubscribe();d=null}})}function Ad(b,a){void 0===a&&(a=0);var c=0<a?a:b;return n(function(a,e){var d=[new C],h=0;e.next(d[0].asObservable());a.subscribe(new m(e,function(a){var f,g;try{for(var l=F(d),m=l.next();!m.done;m=l.next())m.value.next(a)}catch(x){f={error:x}}finally{try{m&&!m.done&&(g=l.return)&&g.call(l)}finally{if(f)throw f.error;}}a=h-b+1;0<=a&&0===a%c&&d.shift().complete();0===++h%c&&(a=new C,d.push(a),e.next(a.asObservable()))},function(){for(;0<
d.length;)d.shift().complete();e.complete()},function(a){for(;0<d.length;)d.shift().error(a);e.error(a)},function(){d=null}))})}function Bd(b){for(var a,c,d=[],e=1;e<arguments.length;e++)d[e-1]=arguments[e];var f=null!==(a=Q(d))&&void 0!==a?a:I,h=null!==(c=d[0])&&void 0!==c?c:null,g=d[1]||Infinity;return n(function(a,c){var d=[],e=!1,l=function(a){var b=a.subs;a.window.complete();b.unsubscribe();P(d,a);e&&k()},k=function(){if(d){var a=new D;c.add(a);var e=new C,h={window:e,subs:a,seen:0};d.push(h);
c.next(e.asObservable());G(a,f,function(){return l(h)},b)}};null!==h&&0<=h?G(c,f,k,h,!0):e=!0;k();var v=function(a){d.slice().forEach(function(b){return a(b.window)});a(c);c.unsubscribe()};a.subscribe(new m(c,function(a){d.slice().forEach(function(b){b.window.next(a);g<=++b.seen&&l(b)})},function(){return v(function(a){return a.complete()})},function(a){return v(function(b){return b.error(a)})}));return function(){d=null}})}function Cd(b,a){return n(function(c,d){var e=[],f=function(a){for(;0<e.length;)e.shift().error(a);
d.error(a)};u(b).subscribe(new m(d,function(b){var c=new C;e.push(c);var h=new D,g;try{g=u(a(b))}catch(r){f(r);return}d.next(c.asObservable());h.add(g.subscribe(new m(d,function(){P(e,c);c.complete();h.unsubscribe()},B,f)))},B));c.subscribe(new m(d,function(a){var b,c,d=e.slice();try{for(var f=F(d),h=f.next();!h.done;h=f.next())h.value.next(a)}catch(x){b={error:x}}finally{try{h&&!h.done&&(c=f.return)&&c.call(f)}finally{if(b)throw b.error;}}},function(){for(;0<e.length;)e.shift().complete();d.complete()},
f,function(){for(;0<e.length;)e.shift().unsubscribe()}))})}function Dd(b){return n(function(a,c){var d,e,f=function(a){d.error(a);c.error(a)},h=function(){null===e||void 0===e?void 0:e.unsubscribe();null===d||void 0===d?void 0:d.complete();d=new C;c.next(d.asObservable());var a;try{a=u(b())}catch(k){f(k);return}a.subscribe(e=new m(c,h,h,f))};h();a.subscribe(new m(c,function(a){return d.next(a)},function(){d.complete();c.complete()},f,function(){null===e||void 0===e?void 0:e.unsubscribe();d=null}))})}
function Ed(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];var c=na(b);return n(function(a,e){for(var d=b.length,h=Array(d),g=b.map(function(){return!1}),k=!1,v=function(a){u(b[a]).subscribe(new m(e,function(b){h[a]=b;k||g[a]||(g[a]=!0,(k=g.every(E))&&(g=null))},B))},r=0;r<d;r++)v(r);a.subscribe(new m(e,function(a){k&&(a=A([a],z(h)),e.next(c?c.apply(void 0,A([],z(a))):a))}))})}function Fd(b){return oc(gb,b)}function Gd(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return n(function(a,
d){gb.apply(void 0,A([a],z(b))).subscribe(d)})}function Hd(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];return Gd.apply(void 0,A([],z(b)))}function Id(b,a){for(var c=0,d=a.length;c<d;c++)for(var e=a[c],f=Object.getOwnPropertyNames(e.prototype),h=0,g=f.length;h<g;h++){var k=f[h];b.prototype[k]=e.prototype[k]}}function Jd(b){switch(b.responseType){case "json":return"response"in b?b.response:JSON.parse(b.responseText);case "document":return b.responseXML;default:return"response"in b?b.response:
b.responseText}}function Fe(b,a){return ca({method:"GET",url:b,headers:a})}function Ge(b,a,c){return ca({method:"POST",url:b,body:a,headers:c})}function He(b,a){return ca({method:"DELETE",url:b,headers:a})}function Ie(b,a,c){return ca({method:"PUT",url:b,body:a,headers:c})}function Je(b,a,c){return ca({method:"PATCH",url:b,body:a,headers:c})}function Ke(b,a){return Le(ca({method:"GET",url:b,headers:a}))}function Me(b){return new q(function(a){var c,d,e=V({async:!0,crossDomain:!1,withCredentials:!1,
method:"GET",timeout:0,responseType:"json"},b),f=e.queryParams,h=e.body,g=e.headers,k=e.url;if(!k)throw new TypeError("url is required");if(f){var m;if(k.includes("?")){k=k.split("?");if(2<k.length)throw new TypeError("invalid url");m=new URLSearchParams(k[1]);(new URLSearchParams(f)).forEach(function(a,b){return m.set(b,a)});k=k[0]+"?"+m}else m=new URLSearchParams(f),k=k+"?"+m}f={};if(g)for(var r in g)g.hasOwnProperty(r)&&(f[r.toLowerCase()]=g[r]);var n=e.crossDomain;n||"x-requested-with"in f||(f["x-requested-with"]=
"XMLHttpRequest");var x=e.xsrfCookieName,g=e.xsrfHeaderName;(e.withCredentials||!n)&&x&&g&&(n=null!==(d=null===(c=null===document||void 0===document?void 0:document.cookie.match(new RegExp("(^|;\\s*)("+x+")\x3d([^;]*)")))||void 0===c?void 0:c.pop())&&void 0!==d?d:"")&&(f[g]=n);c=Ne(h,f);var p=V(V({},e),{url:k,headers:f,body:c}),t;t=b.createXHR?b.createXHR():new XMLHttpRequest;var q=b.progressSubscriber,e=b.includeDownloadProgress,e=void 0===e?!1:e;d=b.includeUploadProgress;d=void 0===d?!1:d;h=function(b,
c){t.addEventListener(b,function(){var b,d=c();null===(b=null===q||void 0===q?void 0:q.error)||void 0===b?void 0:b.call(q,d);a.error(d)})};h("timeout",function(){return new Kd(t,p)});h("abort",function(){return new xa("aborted",t,p)});var u=function(b,c,d){b.addEventListener(c,function(b){a.next(new xb(b,t,p,d+"_"+b.type))})};d&&[yb,zb,Ld].forEach(function(a){return u(t.upload,a,Oe)});q&&[yb,zb].forEach(function(a){return t.upload.addEventListener(a,function(a){var b;return null===(b=null===q||void 0===
q?void 0:q.next)||void 0===b?void 0:b.call(q,a)})});e&&[yb,zb].forEach(function(a){return u(t,a,Md)});var J=function(b){a.error(new xa("ajax error"+(b?" "+b:""),t,p))};t.addEventListener("error",function(a){var b;null===(b=null===q||void 0===q?void 0:q.error)||void 0===b?void 0:b.call(q,a);J()});t.addEventListener(Ld,function(b){var c,d,e=t.status;if(400>e){null===(c=null===q||void 0===q?void 0:q.complete)||void 0===c?void 0:c.call(q);c=void 0;try{c=new xb(b,t,p,Md+"_"+b.type)}catch(we){a.error(we);
return}a.next(c);a.complete()}else null===(d=null===q||void 0===q?void 0:q.error)||void 0===d?void 0:d.call(q,b),J(e)});e=p.user;d=p.method;h=p.async;e?t.open(d,k,h,e,p.password):t.open(d,k,h);h&&(t.timeout=p.timeout,t.responseType=p.responseType);"withCredentials"in t&&(t.withCredentials=p.withCredentials);for(r in f)f.hasOwnProperty(r)&&t.setRequestHeader(r,f[r]);c?t.send(c):t.send();return function(){t&&4!==t.readyState&&t.abort()}})}function Ne(b,a){var c;if(!b||"string"===typeof b||"undefined"!==
typeof FormData&&b instanceof FormData||"undefined"!==typeof URLSearchParams&&b instanceof URLSearchParams||Ab(b,"ArrayBuffer")||Ab(b,"File")||Ab(b,"Blob")||"undefined"!==typeof ReadableStream&&b instanceof ReadableStream)return b;if("undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView(b))return b.buffer;if("object"===typeof b)return a["content-type"]=null!==(c=a["content-type"])&&void 0!==c?c:"application/json;charset\x3dutf-8",JSON.stringify(b);throw new TypeError("Unknown body type");}function Ab(b,
a){return Pe.call(b)==="[object "+a+"]"}var Ra=function(b,a){Ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])};return Ra(b,a)},V=function(){V=Object.assign||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};return V.apply(this,arguments)},Qa=S(function(b){return function(a){b(this);
this.message=a?a.length+" errors occurred during unsubscription:\n"+a.map(function(a,b){return b+1+") "+a.toString()}).join("\n "):"";this.name="UnsubscriptionError";this.errors=a}}),D=function(){function b(a){this.initialTeardown=a;this.closed=!1;this._teardowns=this._parentage=null}b.prototype.unsubscribe=function(){var a,b,d,e,f;if(!this.closed){this.closed=!0;var h=this._parentage;if(h)if(this._parentage=null,Array.isArray(h))try{for(var g=F(h),k=g.next();!k.done;k=g.next())k.value.remove(this)}catch(x){a=
{error:x}}finally{try{k&&!k.done&&(b=g.return)&&b.call(g)}finally{if(a)throw a.error;}}else h.remove(this);a=this.initialTeardown;if(p(a))try{a()}catch(x){f=x instanceof Qa?x.errors:[x]}if(a=this._teardowns){this._teardowns=null;try{for(var m=F(a),r=m.next();!r.done;r=m.next()){var n=r.value;try{a=n,p(a)?a():a.unsubscribe()}catch(x){f=null!==f&&void 0!==f?f:[],x instanceof Qa?f=A(A([],z(f)),z(x.errors)):f.push(x)}}}catch(x){d={error:x}}finally{try{r&&!r.done&&(e=m.return)&&e.call(m)}finally{if(d)throw d.error;
}}}if(f)throw new Qa(f);}};b.prototype.add=function(a){var c;if(a&&a!==this)if(this.closed)p(a)?a():a.unsubscribe();else{if(a instanceof b){if(a.closed||a._hasParent(this))return;a._addParent(this)}(this._teardowns=null!==(c=this._teardowns)&&void 0!==c?c:[]).push(a)}};b.prototype._hasParent=function(a){var b=this._parentage;return b===a||Array.isArray(b)&&b.includes(a)};b.prototype._addParent=function(a){var b=this._parentage;this._parentage=Array.isArray(b)?(b.push(a),b):b?[b,a]:a};b.prototype._removeParent=
function(a){var b=this._parentage;b===a?this._parentage=null:Array.isArray(b)&&P(b,a)};b.prototype.remove=function(a){var c=this._teardowns;c&&P(c,a);a instanceof b&&a._removeParent(this)};b.EMPTY=function(){var a=new b;a.closed=!0;return a}();return b}(),Nd=D.EMPTY,T={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ea={setTimeout:function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];a=ea.delegate;
return((null===a||void 0===a?void 0:a.setTimeout)||setTimeout).apply(void 0,A([],z(b)))},clearTimeout:function(b){var a=ea.delegate;return((null===a||void 0===a?void 0:a.clearTimeout)||clearTimeout)(b)},delegate:void 0},ya=K("C",void 0,void 0),W=null,ma=function(b){function a(a){var c=b.call(this)||this;c.isStopped=!1;a?(c.destination=a,Gb(a)&&a.add(c)):c.destination=Qe;return c}w(a,b);a.create=function(a,b,e){return new wa(a,b,e)};a.prototype.next=function(a){this.isStopped?Ua(K("N",a,void 0),this):
this._next(a)};a.prototype.error=function(a){this.isStopped?Ua(K("E",void 0,a),this):(this.isStopped=!0,this._error(a))};a.prototype.complete=function(){this.isStopped?Ua(ya,this):(this.isStopped=!0,this._complete())};a.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,b.prototype.unsubscribe.call(this),this.destination=null)};a.prototype._next=function(a){this.destination.next(a)};a.prototype._error=function(a){try{this.destination.error(a)}finally{this.unsubscribe()}};a.prototype._complete=
function(){try{this.destination.complete()}finally{this.unsubscribe()}};return a}(D),wa=function(b){function a(a,d,e){var c=b.call(this)||this,h;p(a)?h=a:a&&(h=a.next,d=a.error,e=a.complete,c&&T.useDeprecatedNextContext&&(a=Object.create(a),a.unsubscribe=function(){return c.unsubscribe()}),h=null===h||void 0===h?void 0:h.bind(a),d=null===d||void 0===d?void 0:d.bind(a),e=null===e||void 0===e?void 0:e.bind(a));c.destination={next:h?Ta(h,c):B,error:Ta(null!==d&&void 0!==d?d:Ib,c),complete:e?Ta(e,c):
B};return c}w(a,b);return a}(ma),Qe={closed:!0,next:B,error:Ib,complete:B},oa="function"===typeof Symbol&&Symbol.observable||"@@observable",q=function(){function b(a){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,b,d){var c=this,f=ae(a)?a:new wa(a,b,d);Ca(function(){var a=c.operator,b=c.source;f.add(a?a.call(f,b):b?c._subscribe(f):c._trySubscribe(f))});return f};b.prototype._trySubscribe=function(a){try{return this._subscribe(a)}catch(c){a.error(c)}};
b.prototype.forEach=function(a,b){var c=this;b=Kb(b);return new b(function(b,d){var e=new wa({next:function(b){try{a(b)}catch(k){d(k),e.unsubscribe()}},error:d,complete:b});c.subscribe(e)})};b.prototype._subscribe=function(a){var b;return null===(b=this.source)||void 0===b?void 0:b.subscribe(a)};b.prototype[oa]=function(){return this};b.prototype.pipe=function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];return Jb(a)(this)};b.prototype.toPromise