/** @license Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt **/ var __extends,__assign,__rest,__decorate,__param,__metadata,__awaiter,__generator; (function(l){function m(k,l){return function(m,u){return k[m]=l?l(m,u):u}}var u="object"===typeof global?global:"object"===typeof self?self:"object"===typeof this?this:{};"object"===typeof System&&"function"===typeof System.register?System.register("tslib",[],function(k){l(m(u,k));return{setters:[],execute:function(){}}}):"function"===typeof define&&define.amd?define("tslib",["exports"],function(k){l(m(u,m(k)))}):"object"===typeof module&&"object"===typeof module.exports?l(m(u,m(module.exports))): l(m(u))})(function(l){__extends=function(l,u){function k(){this.constructor=l}for(var m in u)u.hasOwnProperty(m)&&(l[m]=u[m]);l.prototype=null===u?Object.create(u):(k.prototype=u.prototype,new k)};__assign=Object.assign||function(l){for(var m,k=1,E=arguments.length;ku.indexOf(m)&&(k[m]=l[m]);if(null!=l&&"function"=== typeof Object.getOwnPropertySymbols){var w=0;for(m=Object.getOwnPropertySymbols(l);wu.indexOf(m[w])&&(k[m[w]]=l[m[w]])}return k};__decorate=function(l,u,k,E){var m=arguments.length,A=3>m?u:null===E?E=Object.getOwnPropertyDescriptor(u,k):E,F;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)A=Reflect.decorate(l,u,k,E);else for(var v=l.length-1;0<=v;v--)if(F=l[v])A=(3>m?F(A):3v[0]&&k[1]=c.count?f.complete():(f.next(a[b]), f.closed||(c.index=b+1,this.schedule(c)))};a.prototype._subscribe=function(c){var b=this.array,d=b.length,f=this.scheduler;if(f)return f.schedule(a.dispatch,0,{array:b,index:0,count:d,subscriber:c});for(f=0;fe?-1:1;b=e*Math.floor(Math.abs(b));b=0>=b?0:b>Sa?Sa:b}this.arr=a;this.idx=c;this.len=b}b.prototype[I]=function(){return this};b.prototype.next= function(){return this.idx=c.length?f.complete():(f.next(a[b]),c.index=b+1,this.schedule(c)))}; a.prototype._subscribe=function(c){var b=this.arrayLike,d=this.scheduler,f=b.length;if(d)return d.schedule(a.dispatch,0,{arrayLike:b,index:0,length:f,subscriber:c});for(d=0;dc)this.period=0;a&&"function"===typeof a.schedule||(this.scheduler=C)}__extends(a,b);a.create=function(c,b){void 0===c&&(c=0);void 0=== b&&(b=C);return new a(c,b)};a.dispatch=function(c){var a=c.subscriber,b=c.period;a.next(c.index);a.closed||(c.index+=1,this.schedule(c,b))};a.prototype._subscribe=function(c){var b=this.period;c.add(this.scheduler.schedule(a.dispatch,b,{index:0,subscriber:c,period:b}))};return a}(g).create;g.interval=ic;g.merge=ta;var pb=function(){function b(){}b.prototype.call=function(a,c){return c.subscribe(new jc(a))};return b}(),jc=function(b){function a(c){b.call(this,c);this.hasFirst=!1;this.observables=[]; this.subscriptions=[]}__extends(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=c.count?f.complete():(f.next(a),f.closed||(c.index=b+1,c.start=a+1,this.schedule(c)))};a.prototype._subscribe=function(c){var b=0,d=this.start,f=this._count,h=this.scheduler;if(h)return h.schedule(a.dispatch,0,{index:b,count:f,start:d,subscriber:c});do{if(b++>=f){c.complete(); break}c.next(d++);if(c.closed)break}while(1)};return a}(g).create;g.range=nc;var pc=function(b){function a(c,a){b.call(this);this.resourceFactory=c;this.observableFactory=a}__extends(a,b);a.create=function(c,b){return new a(c,b)};a.prototype._subscribe=function(c){var a=this.resourceFactory,b=this.observableFactory,f;try{return f=a(),new oc(c,f,b)}catch(h){c.error(h)}};return a}(g),oc=function(b){function a(c,a,d){b.call(this,c);this.resource=a;this.observableFactory=d;c.add(a);this.tryUse()}__extends(a, b);a.prototype.tryUse=function(){try{var c=this.observableFactory.call(this,this.resource);c&&this.add(q(this,c))}catch(e){this._error(e)}};return a}(t);g.using=pc.create;var qc=function(b){function a(c,a){b.call(this);this.error=c;this.scheduler=a}__extends(a,b);a.create=function(c,b){return new a(c,b)};a.dispatch=function(c){c.subscriber.error(c.error)};a.prototype._subscribe=function(c){var b=this.error,d=this.scheduler;if(d)return d.schedule(a.dispatch,0,{error:b,subscriber:c});c.error(b)};return a}(g).create; g.throw=qc;var rc=function(b){function a(c,a,d){void 0===c&&(c=0);b.call(this);this.period=-1;this.dueTime=0;ga(a)?this.period=1>Number(a)&&1||Number(a):G(a)&&(d=a);G(d)||(d=C);this.scheduler=d;this.dueTime=ba(c)?+c-this.scheduler.now():c}__extends(a,b);a.create=function(c,b,d){void 0===c&&(c=0);return new a(c,b,d)};a.dispatch=function(c){var a=c.index,b=c.period,f=c.subscriber;f.next(a);if(!f.closed){if(-1===b)return f.complete();c.index=a+1;this.schedule(c,b)}};a.prototype._subscribe=function(c){return this.scheduler.schedule(a.dispatch, this.dueTime,{index:0,period:this.period,subscriber:c})};return a}(g).create;g.timer=rc;var wa=function(){function b(a){this.project=a}b.prototype.call=function(a,c){return c.subscribe(new sc(a,this.project))};return b}(),sc=function(b){function a(c,a,d){void 0===d&&(d=Object.create(null));b.call(this,c);this.iterators=[];this.active=0;this.project="function"===typeof a?a:null;this.values=d}__extends(a,b);a.prototype._next=function(c){var a=this.iterators;H(c)?a.push(new tc(c)):"function"===typeof c[I]? a.push(new uc(c[I]())):a.push(new vc(this.destination,this,c))};a.prototype._complete=function(){var c=this.iterators,a=c.length;this.active=a;for(var b=0;bthis.index};b.prototype.hasCompleted=function(){return this.array.length=== this.index};return b}(),vc=function(b){function a(c,a,d){b.call(this,c);this.parent=a;this.observable=d;this.stillUnsubscribed=!0;this.buffer=[];this.isComplete=!1}__extends(a,b);a.prototype[I]=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 0e;e++)try{a=b[e];new r.ActiveXObject(a);break}catch(J){}c=new r.ActiveXObject(a)}catch(J){throw Error("XMLHttpRequest is not supported by your browser");}}return c},crossDomain:!1,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"===typeof c)a.url=c;else for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);this.request=a}__extends(a, b);a.prototype._subscribe=function(c){return new xc(c,this.request)};a.create=function(){var c=function(c){return new a(c)};c.get=rb;c.post=sb;c.delete=tb;c.put=ub;c.getJSON=vb;return c}();return a}(g),xc=function(b){function a(c,a){b.call(this,c);this.request=a;this.done=!1;c=a.headers=a.headers||{};a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");"Content-Type"in c||r.FormData&&a.body instanceof r.FormData||"undefined"===typeof a.body||(c["Content-Type"]="application/x-www-form-urlencoded; charset\x3dUTF-8"); a.body=this.serializeBody(a.body,a.headers["Content-Type"]);this.send()}__extends(a,b);a.prototype.next=function(c){this.done=!0;var a=this.destination;c=new Xa(c,this.xhr,this.request);a.next(c)};a.prototype.send=function(){var c=this.request,a=this.request,b=a.user,f=a.method,h=a.url,g=a.async,l=a.password,p=a.headers,a=a.body,m=k(c.createXHR).call(c);if(m===n)this.error(n.e);else{this.xhr=m;b=b?k(m.open).call(m,f,h,g,b,l):k(m.open).call(m,f,h,g);if(b===n)return this.error(n.e),null;m.timeout=c.timeout; m.responseType=c.responseType;this.setHeaders(m,p);this.setupEvents(m,c);b=a?k(m.send).call(m,a):k(m.send).call(m);if(b===n)return this.error(n.e),null}return m};a.prototype.serializeBody=function(c,a){if(!c||"string"===typeof c||r.FormData&&c instanceof r.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 encodeURI(a)+"\x3d"+encodeURI(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.setupEvents=function(c,a){function b(c){var a=b.subscriber,e=b.progressSubscriber,d=b.request;e&&e.error(c);a.error(new Ya(this,d))}function e(c){var a=e.subscriber,b=e.progressSubscriber,d=e.request;if(4===this.readyState){var f=1223===this.status?204:this.status,h="text"===this.responseType?this.response||this.responseText:this.response;0===f&&(f=h?200:0);200<=f&&300> f?(b&&b.complete(),a.next(c),a.complete()):(b&&b.error(c),a.error(new da("ajax error "+f,this,d)))}}var h=a.progressSubscriber;c.ontimeout=b;b.request=a;b.subscriber=this;b.progressSubscriber=h;if(c.upload&&"withCredentials"in c&&r.XDomainRequest){if(h){var g;g=function(c){g.progressSubscriber.next(c)};c.onprogress=g;g.progressSubscriber=h}var k;k=function(c){var a=k.progressSubscriber,b=k.subscriber,e=k.request;a&&a.error(c);b.error(new da("ajax error",this,e))};c.onerror=k;k.request=a;k.subscriber= this;k.progressSubscriber=h}c.onreadystatechange=e;e.subscriber=this;e.progressSubscriber=h;e.request=a};a.prototype.unsubscribe=function(){var c=this.xhr;!this.done&&c&&4!==c.readyState&&"function"===typeof c.abort&&c.abort();b.prototype.unsubscribe.call(this)};return a}(p),Xa=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;switch(this.responseType){case "json":this.response="response"in a?a.responseType? a.response:JSON.parse(a.response||a.responseText||"null"):JSON.parse(a.responseText||"null");break;case "xml":this.response=a.responseXML;break;default:this.response="response"in a?a.response:a.responseText}}}(),da=function(b){function a(c,a,d){b.call(this,c);this.message=c;this.xhr=a;this.request=d;this.status=a.status}__extends(a,b);return a}(Error),Ya=function(b){function a(c,a){b.call(this,"ajax timeout",c,a)}__extends(a,b);return a}(da);g.ajax=Q.create;var yc=function(b){function a(c,a){b.call(this, c,a);this.scheduler=c;this.work=a}__extends(a,b);a.prototype.schedule=function(c,a){void 0===a&&(a=0);if(0c?1:c;this._windowTime=1>a?1:a}__extends(a,b);a.prototype.next=function(c){var a=this._getNow();this._events.push(new zc(a,c));this._trimBufferThenGetEvents();b.prototype.next.call(this,c)};a.prototype._subscribe=function(c){var a=this._trimBufferThenGetEvents(), b=this.scheduler,f;if(this.closed)throw new O;this.hasError?f=x.EMPTY:this.isStopped?f=x.EMPTY:(this.observers.push(c),f=new Oa(this,c));b&&c.add(c=new na(c,b));for(var b=a.length,h=0;ha&&(g=Math.max(g,h-a));0d)?this.add(c.closeAction=h.schedule(za,a,{subscriber:this,context:c,bufferTimeSpan:a})): (f={bufferTimeSpan:a,bufferCreationInterval:d,subscriber:this,scheduler:h},this.add(c.closeAction=h.schedule(Aa,a,{subscriber:this,context:c})),this.add(h.schedule(xb,d,f)))}__extends(a,b);a.prototype._next=function(c){for(var a=this.contexts,b=a.length,f,h=0;h=b[0].time-f.now();)b.shift().notification.observe(h);0(a||0)?Number.POSITIVE_INFINITY:a;return this.lift(new pd(b,a,c))};var W=function(b){function a(){var a=b.call(this,"argument out of range");this.name=a.name="ArgumentOutOfRangeError";this.stack=a.stack;this.message=a.message}__extends(a,b);return a}(Error),rd=function(){function b(a,c){this.index= a;this.defaultValue=c;if(0>a)throw new W;}b.prototype.call=function(a,c){return c.subscribe(new qd(a,this.index,this.defaultValue))};return b}(),qd=function(b){function a(a,e,d){b.call(this,a);this.index=e;this.defaultValue=d}__extends(a,b);a.prototype._next=function(a){0===this.index--&&(this.destination.next(a),this.destination.complete())};a.prototype._complete=function(){var a=this.destination;0<=this.index&&("undefined"!==typeof this.defaultValue?a.next(this.defaultValue):a.error(new W));a.complete()}; return a}(p);g.prototype.elementAt=function(b,a){return this.lift(new rd(b,a))};var Db=function(){function b(a,c){this.predicate=a;this.thisArg=c}b.prototype.call=function(a,c){return c.subscribe(new sd(a,this.predicate,this.thisArg))};return b}(),sd=function(b){function a(a,e,d){b.call(this,a);this.predicate=e;this.thisArg=d;this.count=0;this.predicate=e}__extends(a,b);a.prototype._next=function(a){var c;try{c=this.predicate.call(this.thisArg,a,this.count++)}catch(d){this.destination.error(d);return}c&& this.destination.next(a)};return a}(p);g.prototype.filter=ha;var Eb=function(){function b(a){this.callback=a}b.prototype.call=function(a,c){return c.subscribe(new td(a,this.callback))};return b}(),td=function(b){function a(a,e){b.call(this,a);this.add(new x(e))}__extends(a,b);return a}(p);g.prototype.finally=Ia;g.prototype._finally=Ia;var ab=function(){function b(a,c,b,d){this.predicate=a;this.source=c;this.yieldIndex=b;this.thisArg=d}b.prototype.call=function(a,c){return c.subscribe(new ud(a,this.predicate, this.source,this.yieldIndex,this.thisArg))};return b}(),ud=function(b){function a(a,e,d,f,h){b.call(this,a);this.predicate=e;this.source=d;this.yieldIndex=f;this.thisArg=h;this.index=0}__extends(a,b);a.prototype.notifyComplete=function(a){var c=this.destination;c.next(a);c.complete()};a.prototype._next=function(a){var c=this.predicate,b=this.thisArg,f=this.index++;try{c.call(b||this,a,f,this.source)&&this.notifyComplete(this.yieldIndex?f:a)}catch(h){this.destination.error(h)}};a.prototype._complete= function(){this.notifyComplete(this.yieldIndex?-1:void 0)};return a}(p);g.prototype.find=function(b,a){if("function"!==typeof b)throw new TypeError("predicate is not a function");return this.lift(new ab(b,this,!1,a))};g.prototype.findIndex=function(b,a){return this.lift(new ab(b,this,!0,a))};var ea=function(b){function a(){var a=b.call(this,"no elements in sequence");this.name=a.name="EmptyError";this.stack=a.stack;this.message=a.message}__extends(a,b);return a}(Error),wd=function(){function b(a, c,b,d){this.predicate=a;this.resultSelector=c;this.defaultValue=b;this.source=d}b.prototype.call=function(a,c){return c.subscribe(new vd(a,this.predicate,this.resultSelector,this.defaultValue,this.source))};return b}(),vd=function(b){function a(a,e,d,f,h){b.call(this,a);this.predicate=e;this.resultSelector=d;this.defaultValue=f;this.source=h;this.index=0;this._emitted=this.hasCompleted=!1}__extends(a,b);a.prototype._next=function(a){var c=this.index++;this.predicate?this._tryPredicate(a,c):this._emit(a, c)};a.prototype._tryPredicate=function(a,b){var c;try{c=this.predicate(a,b,this.source)}catch(f){this.destination.error(f);return}c&&this._emit(a,b)};a.prototype._emit=function(a,b){this.resultSelector?this._tryResultSelector(a,b):this._emitFinal(a)};a.prototype._tryResultSelector=function(a,b){var c;try{c=this.resultSelector(a,b)}catch(f){this.destination.error(f);return}this._emitFinal(c)};a.prototype._emitFinal=function(a){var c=this.destination;this._emitted||(this._emitted=!0,c.next(a),c.complete(), this.hasCompleted=!0)};a.prototype._complete=function(){var a=this.destination;this.hasCompleted||"undefined"===typeof this.defaultValue?this.hasCompleted||a.error(new ea):(a.next(this.defaultValue),a.complete())};return a}(p);g.prototype.first=function(b,a,c){return this.lift(new wd(b,a,c,this))};var xd=function(){function b(){this.size=0;this._values=[];this._keys=[]}b.prototype.get=function(a){a=this._keys.indexOf(a);return-1===a?void 0:this._values[a]};b.prototype.set=function(a,c){var b=this._keys.indexOf(a); -1===b?(this._keys.push(a),this._values.push(c),this.size++):this._values[b]=c;return this};b.prototype.delete=function(a){a=this._keys.indexOf(a);if(-1===a)return!1;this._values.splice(a,1);this._keys.splice(a,1);this.size--;return!0};b.prototype.clear=function(){this._keys.length=0;this.size=this._values.length=0};b.prototype.forEach=function(a,c){for(var b=0;bc?a:c}))};g.prototype.merge=function(){for(var b=[],a=0;ab(a,c)?a:c}:function(a,c){return a=b?this.connection=null:(a._refCount=b-1,1b?this.lift(new db(-1,this)):this.lift(new db(b-1,this))};var de=function(){function b(a,c){this.notifier=a;this.source=c}b.prototype.call=function(a,c){return c.subscribe(new ce(a,this.notifier,this.source))};return b}(),ce=function(b){function a(a,e,d){b.call(this,a);this.notifier=e;this.source=d}__extends(a,b);a.prototype.complete= function(){if(!this.isStopped){var a=this.notifications,e=this.retries,d=this.retriesSubscription;if(e)this.retriesSubscription=this.notifications=null;else{a=new y;e=k(this.notifier)(a);if(e===n)return b.prototype.complete.call(this);d=q(this,e)}this.unsubscribe();this.closed=!1;this.notifications=a;this.retries=e;this.retriesSubscription=d;a.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.notifyNext=function(a,b,d,f,h){a=this.notifications;b=this.retries;d=this.retriesSubscription;this.retriesSubscription=this.retries=this.notifications=null;this.unsubscribe();this.closed=this.isStopped=!1;this.notifications=a;this.retries=b;this.retriesSubscription=d;this.source.subscribe(this)};return a}(t);g.prototype.repeatWhen=function(b){return this.lift(new de(b,this))};var fe=function(){function b(a,c){this.count=a;this.source=c} b.prototype.call=function(a,c){return c.subscribe(new ee(a,this.count,this.source))};return b}(),ee=function(b){function a(a,e,d){b.call(this,a);this.count=e;this.source=d}__extends(a,b);a.prototype.error=function(a){if(!this.isStopped){var c=this.source,d=this.count;if(0===d)return b.prototype.error.call(this,a);-1this.total&&this.destination.next(a)};return a}(p);g.prototype.skip=function(b){return this.lift(new ue(b))};var we=function(){function b(a){this.notifier=a}b.prototype.call=function(a,c){return c.subscribe(new ve(a,this.notifier))};return b}(),ve=function(b){function a(a,e){b.call(this, a);this.isInnerStopped=this.hasValue=!1;this.add(q(this,e))}__extends(a,b);a.prototype._next=function(a){this.hasValue&&b.prototype._next.call(this,a)};a.prototype._complete=function(){this.isInnerStopped?b.prototype._complete.call(this):this.unsubscribe()};a.prototype.notifyNext=function(a,b,d,f,h){this.hasValue=!0};a.prototype.notifyComplete=function(){this.isInnerStopped=!0;this.isStopped&&b.prototype._complete.call(this)};return a}(t);g.prototype.skipUntil=function(b){return this.lift(new we(b))}; var ye=function(){function b(a){this.predicate=a}b.prototype.call=function(a,c){return c.subscribe(new xe(a,this.predicate))};return b}(),xe=function(b){function a(a,e){b.call(this,a);this.predicate=e;this.skipping=!0;this.index=0}__extends(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(e){this.destination.error(e)}};return a}(p); g.prototype.skipWhile=function(b){return this.lift(new ye(b))};g.prototype.startWith=function(){for(var b=[],a=0;ae)this.delayTime=0;d&&"function"===typeof d.schedule||(this.scheduler=fa)}__extends(a,b);a.create=function(b,e,d){void 0===e&&(e=0);void 0=== d&&(d=fa);return new a(b,e,d)};a.dispatch=function(a){return this.add(a.source.subscribe(a.subscriber))};a.prototype._subscribe=function(b){return this.scheduler.schedule(a.dispatch,this.delayTime,{source:this.source,subscriber:b})};return a}(g),Be=function(){function b(a,b){this.scheduler=a;this.delay=b}b.prototype.call=function(a,b){return(new Ae(b,this.delay,this.scheduler)).subscribe(a)};return b}();g.prototype.subscribeOn=function(b,a){void 0===a&&(a=0);return this.lift(new Be(b,a))};var Mb= function(){function b(){}b.prototype.call=function(a,b){return b.subscribe(new Ce(a))};return b}(),Ce=function(b){function a(a){b.call(this,a);this.active=0;this.hasCompleted=!1}__extends(a,b);a.prototype._next=function(a){this.unsubscribeInner();this.active++;this.add(this.innerSubscription=q(this,a))};a.prototype._complete=function(){this.hasCompleted=!0;0===this.active&&this.destination.complete()};a.prototype.unsubscribeInner=function(){this.active=0this.total)throw new W;}b.prototype.call=function(a,b){return b.subscribe(new He(a,this.total))};return b}(),He=function(b){function a(a,e){b.call(this,a);this.total=e;this.count=0}__extends(a,b);a.prototype._next=function(a){var b=this.total,c=++this.count;c<=b&&(this.destination.next(a),c===b&&(this.destination.complete(), this.unsubscribe()))};return a}(p);g.prototype.take=function(b){return 0===b?new L:this.lift(new Ie(b))};var Ke=function(){function b(a){this.total=a;if(0>this.total)throw new W;}b.prototype.call=function(a,b){return b.subscribe(new Je(a,this.total))};return b}(),Je=function(b){function a(a,e){b.call(this,a);this.total=e;this.ring=[];this.count=0}__extends(a,b);a.prototype._next=function(a){var b=this.ring,c=this.total,f=this.count++;b.length=this.total?this.total:this.count,f=this.ring,g=0;gb.index?1:-1:a.delay>b.delay?1:-1};return a}(U),pf=function(b){function a(a){b.call(this,kb,750);this.assertDeepEqual=a;this.hotObservables=[];this.coldObservables=[];this.flushTests=[]}__extends(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,e,d){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,e,d);b=new pa(b,this);this.coldObservables.push(b);return b};a.prototype.createHotObservable=function(b,e,d){if(-1!==b.indexOf("!"))throw Error('hot observable cannot have unsubscription marker "!"');b=a.parseMarbles(b,e,d);b=new jb(b,this);this.hotObservables.push(b);return b};a.prototype.materializeInnerObservable=function(a,b){var c=this,e=[];a.subscribe(function(a){e.push({frame:c.frame- b,notification:z.createNext(a)})},function(a){e.push({frame:c.frame-b,notification:z.createError(a)})},function(){e.push({frame:c.frame-b,notification:z.createComplete()})});return e};a.prototype.expectObservable=function(b,e){var c=this;void 0===e&&(e=null);var f=[],h={actual:f,ready:!1};e=a.parseMarblesAsSubscriptions(e).unsubscribedFrame;var k;this.schedule(function(){k=b.subscribe(function(a){var b=a;a instanceof g&&(b=c.materializeInnerObservable(b,c.frame));f.push({frame:c.frame,notification:z.createNext(b)})}, function(a){f.push({frame:c.frame,notification:z.createError(a)})},function(){f.push({frame:c.frame,notification:z.createComplete()})})},0);e!==Number.POSITIVE_INFINITY&&this.schedule(function(){return k.unsubscribe()},e);this.flushTests.push(h);return{toBe:function(b,c,d){h.ready=!0;h.expected=a.parseMarbles(b,c,d,!0)}}};a.prototype.expectSubscriptions=function(b){var c={actual:b,ready:!1};this.flushTests.push(c);return{toBe:function(b){b="string"===typeof b?[b]:b;c.ready=!0;c.expected=b.map(function(b){return a.parseMarblesAsSubscriptions(b)})}}}; a.prototype.flush=function(){for(var a=this.hotObservables;0 g?new Y(f):new Y(f,g)};a.parseMarbles=function(a,b,d,f){void 0===f&&(f=!1);if(-1!==a.indexOf("!"))throw Error('conventional marble diagrams cannot have the unsubscription marker "!"');for(var c=a.length,e=[],g=a.indexOf("^"),g=-1===g?0:g*-this.frameTimeFactor,k="object"!==typeof b?function(a){return a}:function(a){return f&&b[a]instanceof pa?b[a].messages:b[a]},l=-1,m=0;m