c.length;e++)if(d=(c[e].src||"").match(uc))b.base_url=d[1],b.ie_compat=d[1]+"angular-ie-compat"+(d[2]||"")+".js",s(b,Ua(d[6])),za(n(c[e]),function(a,c){/^ng:/.exec(c)&&(c=c.substring(3).replace(/-/g,"_"),b[c]=a||!0)});returnb}functionDb(){(Wa=x.jQuery)?(n=Wa,s(Wa.fn,{scope:Eb.scope})):n=Xa;w.element=n}functionra(a,b){if(!q(a))thrownewz("Argument '"+(b||"?")+"' is "+("not a function, got "+(typeofa=="object"?a.constructor.name:typeofa)||"required"));}functionQ(a,b){varc=[];Ya(c,a,b?"\n":
b,c){functiond(d){if(!(dinc)){varg=b[d];if(!g)throwz("Unknown provider for '"+d+"'.");c[d]=e(a,g)}returnc[d]}functione(a,b,c){for(varc=c||[],e=yc(b),j=e.length;j--;)c.unshift(d(e[j]));returnb.apply(a,c)}b=b||Ba;c=c||{};a=a||{};d.invoke=e;d.eager=function(){k(b,function(a,b){a.$eager&&d(b);if(a.$creation)thrownewz("Failed to register service '"+b+"': $creation property is unsupported. Use $eager:true or see release notes.");})};returnd}functionab(a,b){if(ainstanceofArray)returnb.$inject=
c("}]")&&k.shift(),t++;elseif(r==""||r=="\r"||r=="\t"||r=="\n"||r=="\u000b"||r=="\u00a0"){t++;continue}else{varL=r+d(),n=bb[r],p=bb[L];p?(o.push({index:t,text:L,fn:p}),t+=2):n?(o.push({index:t,text:r,fn:n,json:"[,:".indexOf(K)!=-1&&c("+-")}),t+=1):h("Unexpected next character ",t,t+1)}K=r}returno}functionaa(a,b){functionc(a){returnfunction(){varb=a();N.length!==0&&d("is an unexpected token",N[0]);returnb}}functiond(b,c){throwz("Syntax Error: Token '"+c.text+"' "+b+" at column "+(c.index+
1)+" of the expression ["+a+"] starting at ["+a.substring(c.index)+"].");}functione(){if(N.length===0)throwz("Unexpected end of expression: "+a);returnN[0]}functionf(a,b,c,d){if(N.length>0){vare=N[0],g=e.text;if(g==a||g==b||g==c||g==d||!a&&!b&&!c&&!d)returne}return!1}functiong(a,c,e,g){return(a=f(a,c,e,g))?(b&&!a.json&&d("is not valid json",a),N.shift(),a):!1}functionh(a){g(a)||d("is unexpected, expecting ["+a+"]",f())}functioni(a,b){returnfunction(c){returna(c,b(c))}}functionj(a,b,c){returnfunction(d){returnb(d,
i(a.fn,r()):n()}functionn(){vara;if(g("("))a=cb(),h(")");elseif(g("["))a=L();elseif(g("{"))a=ha();else{varb=g();(a=b.fn)||d("not a primary expression",b)}for(;b=g("(","[",".");)b.text==="("?a=Kb(a):b.text==="["?a=v(a):b.text==="."?a=Ca(a):d("IMPOSSIBLE");returna}functionL(){vara=[];if(e().text!="]"){doa.push(ba());while(g(","))}h("]");returnfunction(b){for(varc=[],d=0;d<a.length;d++)c.push(a[d](b));returnc}}functionha(){vara=[];if(e().text!="}"){do{varb=g(),b=b.string||b.text;h(":");
varc=ba();a.push({key:b,value:c})}while(g(","))}h("}");returnfunction(b){for(varc={},d=0;d<a.length;d++){vare=a[d],g=e.value(b);c[e.key]=g}returnc}}varu=Qa(0),N=Dc(a,b),ba=function(){varb=m(),c,e;return(e=g("="))?(b.assign||d("implies assignment but ["+a.substring(0,e.index)+"] can not be assigned to",e),c=m(),function(a){returnb.assign(a,c(a))}):b},Jb=m,Kb=function(a){varb=[];if(e().text!=")"){dob.push(ba());while(g(","))}h(")");returnfunction(c){for(vard=[],e=0;e<b.length;e++)d.push(b[e](c));
e=a(c)||p;returne.apply?e.apply(c,d):e(d[0],d[1],d[2],d[3],d[4])}},Ca=function(a){varb=g().text,c=Lb(b);returns(function(b){returnc(a(b))},{assign:function(c,d){returnMb(a(c),b,d)}})},v=function(a){varb=ba();h("]");returns(function(c){vard=a(c),c=b(c);returnd?d[c]:A},{assign:function(c,d){returna(c)[b(c)]=d}})},cb=function(){for(vara=ba(),b;;)if(b=g("|"))a=j(a,b.fn,l());elsereturna},x=function(a){for(varb=g(),c=b.text.split("."),e,f=0;f<c.length;f++)e=c[f],a&&(a=a[e]);q(a)||d("should be a function",
b);returna},w=function(a){for(varb=x(a),c=[];;)if(g(":"))c.push(ba());else{vard=function(a,d){for(vare=[d],g=0;g<c.length;g++)e.push(c[g](a));returnb.apply(a,e)};returnfunction(){returnd}}};b&&(ba=m,Kb=Ca=v=Jb=cb=x=w=function(){d("is not valid json",{text:a,index:0})});return{assignable:c(Jb),primary:c(n),statements:c(function(){for(vara=[];;)if(N.length>0&&!f("}",")",";","]")&&a.push(cb()),!g(";"))returna.length==1?a[0]:function(b){for(varc,d=0;d<a.length;d++){vare=a[d];e&&(c=e(b))}returnc}}),
validator:c(function(){returnw(db)}),formatter:c(function(){functiona(b){returnfunction(a,c){for(vard=[c],g=0;g<e.length;g++)d.push(e[g](a));returnb.apply(a,d)}}varb=g(),c=ia[b.text],e=[];for(c||d("is not a valid formatter.",b);;)if(b=g(":"))e.push(ba());elsereturnQa({format:a(c.format),parse:a(c.parse)})}),filter:c(l)}}functionMb(a,b,c){for(varb=b.split("."),d=0;b.length>1;d++){vare=b.shift(),f=a[e];f||(f={},a[e]=f);a=f}returna[b.shift()]=c}functionDa(a,b,c){if(!b)returna;for(varb=
returna};h.setUrl=function(a){varb=D;b.match(/#/)||(b+="#");a.match(/#/)||(a+="#");if(b!=a)j.href=a};h.getUrl=function(){returnD=j.href};h.onHashChange=function(b){varc=a.document.documentMode;if("onhashchange"ina&&(y(c)||c>=8))n(a).bind("hashchange",b);else{vard=h.getUrl();h.addPollFn(function(){d!=h.getUrl()&&(b(),d=h.getUrl())})}returnb};varha={},s="";h.cookies=function(a,b){varc,d,g,f;if(a)if(b===A)i.cookie=escape(a)+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT";else{if(u(b))i.cookie=escape(a)+
"="+escape(b),c=a.length+b.length+1,c>4096&&e.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+c+" > 4096 bytes)!"),ha.length>20&&e.warn("Cookie '"+a+"' possibly not set or overflowed because too many cookies were already set ("+ha.length+" > 20 )")}else{if(i.cookie!==s){s=i.cookie;c=s.split("; ");ha={};for(g=0;g<c.length;g++)d=c[g],f=d.indexOf("="),f>0&&(ha[unescape(d.substring(0,f))]=unescape(d.substring(f+1)))}returnha}};h.defer=function(a,b){varc;ta++;c=l(function(){deleteo[c];
c!="false"&&(b[d]=c);returnb}functionXa(a){if(u(a)&&a.charAt(0)!="<")thrownewz("selectors not implemented");returnnewY(a)}functionY(a){if(ainstanceofY)returna;elseif(u(a)){varb=F.createElement("div");b.innerHTML="<div> </div>"+a;b.removeChild(b.firstChild);gb(this,b.childNodes);this.remove()}elsegb(this,a)}functionua(a){ac(a);for(varb=0,a=a.childNodes||[];b<a.length;b++)ua(a[b])}functionac(a){varb=a[Fa],c=Ga[b];c&&(k(c.bind||{},function(b,c){Qc(a,c,b)}),deleteGa[b],a[Fa]=A)}
c=d,d=a.indexOf("}}",d),d=d<0?a.length:d+2,b.push(a.substr(c,d-c)),c=d;c!=a.length&&b.push(a.substr(c,a.length-c));returnb.length===0?[a]:b}functionKa(a){return(a=a.replace(/\n/gm,"").match(/^\{\{(.*)\}\}$/))?a[1]:null}functionva(a,b){varc=b.attr("name"),d,e;if(c){d=aa(c).assignable();e=d.assign;if(!e)thrownewz("Expression '"+c+"' is not assignable.");return{get:function(){returnd(a)},set:function(b){b!==A&&e(a,b)}}}}functionic(a,b){varc=va(a,b),d=b.attr("ng:format")||La,e=aa(d).formatter()();
markInvalid:p};if(!e)throw"Validator named '"+d+"' not found.";h=g.format;i=g.parse;f?a.$watch(f,function(a,b){l=b;c()}):l=f==="";b.data(nb,c);return{get:function(){j&&ka(b,wa,null);try{vard=i(a,b.val());c();returnd}catch(e){j=e,ka(b,wa,e)}},set:function(d){vare=b.val(),d=h(a,d);e!=d&&b.val(d||"");c()}}}functionMa(a){returnfunction(b,c){vard=c.get();!d&&v(a)&&(d=C(a));y(b.get())&&v(d)&&b.set(d)}}functionxa(a,b,c,d,e){returnab("$defer",function(f,g){varh=this,i=b(h,g),j=c(h,g),l=g.attr("ng:change")||
this.$service.invoke(c,a,b)}returnc},$watch:function(a,b){varc=Ib(a,"watch"),d=this.$$watchers,e={fn:Ib(b||p,"listener"),last:Number.NaN,get:c};if(!d)d=this.$$watchers=[];d.unshift(e);returnfunction(){pb.remove(d,e)}},$digest:function(){vara,b,c,d,e,f,g=100,h;if(this.$$phase)throwz(this.$$phase+" already in progress");do{f=!1;h=this;do{h.$$phase="$digest";for(d=h.$$asyncQueue;d.length;)try{h.$eval(d.shift())}catch(i){h.$service("$exceptionHandler")(i)}if(d=h.$$watchers)for(e=d.length;e--;)try{if(a=
a;f=b;h=c;break;case2:case1:q(a)?(f=a,h=b):(g=a,f=b||p);case0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+arguments.length+" arguments.";}e[i].call(this,g,j?this:A,f,h)}});returne}};varTc=x.XMLHttpRequest||function(){try{returnnewActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{returnnewActiveXObject("Msxml2.XMLHTTP.3.0")}catch(b){}try{returnnewActiveXObject("Msxml2.XMLHTTP")}catch(c){}thrownewz("This browser does not support XMLHttpRequest.");
bd=/^mailto:/;X.linky=function(a){if(!a)returna;for(varb=a,c=[],d=wb(c),e,f;a=b.match(ad);)e=a[0],a[2]==a[3]&&(e="mailto:"+e),f=a.index,d.chars(b.substr(0,f)),d.start("a",{href:e}),d.chars(a[0].replace(bd,"")),d.end("a"),b=b.substring(f+a[0].length);d.chars(b);returnnewSa(c.join(""))};varcd=/^\s*[-+]?\d*(\.\d*)?\s*$/;ia.noop=na(da,da);ia.json=na(Q,function(a){returnfa(a||"null")});ia["boolean"]=na(gc,ma);ia.number=na(gc,function(a){if(a==null||cd.exec(a))returna===null||a===""?null:1*a;elsethrow"Not a number";
});ia.list=na(function(a){returna?a.join(", "):a},function(a){varb=[];k((a||"").split(","),function(a){(a=ea(a))&&b.push(a)});returnb});ia.trim=na(function(a){returna?ea(""+a):""});s(db,{noop:function(){returnnull},regexp:function(a,b,c){returna.match(b)?null:c||"Value does not match expected format "+b+"."},number:function(a,b,c){vard=1*a;returnd==a?typeofb!=pa&&d<b?"Value can not be less than "+b+".":typeofb!=pa&&d>c?"Value can not be greater than "+c+".":null:"Not a number"},integer:function(a,
b,c){return(b=db.number(a,b,c))?b:!(""+a).match(/^\s*[\d+]*\s*$/)||a!=Math.round(a)?"Not a whole number":null},date:function(a){varb=(a=/^(\d\d?)\/(\d\d?)\/(\d\d\d\d)$/.exec(a))?newDate(a[3],a[1]-1,a[2]):0;returnb&&b.getFullYear()==a[3]&&b.getMonth()==a[1]-1&&b.getDate()==a[2]?null:"Value is not a date. (Expecting format: 12/31/2009)."},email:function(a){returna.match(/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/)?null:"Email needs to be in username@host.com format."},phone:function(a){returna.match(/^1\(\d\d\d\)\d\d\d-\d\d\d\d$/)?
null:a.match(/^\+\d{2,3}(\(\d{1,5}\))?[\d]+\d$/)?null:"Phone number needs to be in 1(987)654-3210 format in North America or +999 (123) 45678 906 internationally."},url:function(a){returna.match(/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/)?null:"URL needs to be in http://server[:port]/path format."},json:function(a){try{returnfa(a),null}catch(b){returnb.toString()}},asynchronous:function(a,b,c){if(a){vard=this.$element,e=d.data("$asyncValidator");e||
""),e;if(!c)returnob.call(this,a);if(!(e=c.match(gd)))throwz("Expected ng:options in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+c+"'.");varf=W(e[2]||e[1]),g=e[4]||e[6],h=e[5],i=W(e[3]||""),j=W(e[2]?e[1]:g),l=W(e[7]),m=n(F.createElement("option")),o=n(F.createElement("optgroup")),D=!1;returnfunction(c){vare=[[{element:c,label:""}]],r=this,p=va(r,a);k(c.children(),function(a){a.value==""&&(D={label:n(a).text(),id:""})});c.html("");c.bind("change",function(){vara,
f,g,h,i;if(!e)throwz("Expected ng:repeat in form of '_item_ in _collection_' but got '"+a+"'.");f=e[1];g=e[2];e=f.match(/^([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\)$/);if(!e)throwz("'item' in 'item in collection' should be identifier or (key, value) but got '"+keyValue+"'.");h=e[3]||e[1];i=e[2];varj=[],l=[b],k=this;this.$watch(function(a){varb=0,d=j.length,a=a.$eval(g),e=xb(a,!0),f=F.createDocumentFragment(),q=d<e?l[d]:null,p,s;for(sina)if(a.hasOwnProperty(s))b<d?(p=j[b],p[h]=a[s],i&&(p[i]=s),
// Copyright (c) Microsoft Corporation. All rights reserved.
// This code is licensed by Microsoft Corporation under the terms
// of the MICROSOFT REACTIVE EXTENSIONS FOR JAVASCRIPT AND .NET LIBRARIES License.
// See http://go.microsoft.com/fwlink/?LinkId=186234.
(function(){vara;varb;varc=this;vard="Index out of range";if(typeofProvideCustomRxRootObject=="undefined")b=c.Rx={};elseb=ProvideCustomRxRootObject();vare=function(){};varf=function(){returnnewDate().getTime();};varg=function(r0,s0){returnr0===s0;};varh=function(r0){returnr0;};vari=function(r0){return{Dispose:r0};};varj={Dispose:e};b.Disposable={Create:i,Empty:j};vark=b.BooleanDisposable=function(){varr0=false;this.GetIsDisposed=function(){returnr0;};this.Dispose=function(){r0=true;};};varl=function(r0){vars0=false;r0.a++;this.Dispose=function(){vart0=false;if(!r0.b){if(!this.c){this.c=true;r0.a--;if(r0.a==0&&r0.d){r0.b=true;t0=true;}}}if(t0)r0.e.Dispose();};};varm=b.RefCountDisposable=function(r0){this.d=false;this.b=false;this.e=r0;this.a=0;this.Dispose=function(){vars0=false;if(!this.b){if(!this.d){this.d=true;if(this.a==0){this.b=true;s0=true;}}}if(s0)this.e.Dispose();};this.GetDisposable=function(){if(this.b)returnj;elsereturnnewl(this);};};varn=b.CompositeDisposable=function(){varr0=newq();for(vars0=0;s0<arguments.length;s0++)r0.Add(arguments[s0]);vart0=false;this.GetCount=function(){returnr0.GetCount();};this.Add=function(u0){if(!t0)r0.Add(u0);elseu0.Dispose();};this.Remove=function(u0,v0){if(!t0){varw0=r0.Remove(u0);if(!v0&w0)u0.Dispose();}};this.Dispose=function(){if(!t0){t0=true;this.Clear();}};this.Clear=function(){for(varu0=0;u0<r0.GetCount();u0++)r0.GetItem(u0).Dispose();r0.Clear();};};varo=b.MutableDisposable=function(){varr0=false;vars0;this.Get=function(){returns0;},this.Replace=function(t0){if(r0&&t0!==a)t0.Dispose();else{if(s0!==a)s0.Dispose();s0=t0;}};this.Dispose=function(){if(!r0){r0=true;if(s0!==a)s0.Dispose();}};};varp=function(r0){vars0=[];for(vart0=0;t0<r0.length;t0++)s0.push(r0[t0]);returns0;};varq=b.List=function(r0){vars0=[];vart0=0;varu0=r0!==a?r0:g;this.Add=function(v0){s0[t0]=v0;t0++;};this.RemoveAt=function(v0){if(v0<0||v0>=t0)throwd;if(v0==0){s0.shift();t0--;}else{s0.splice(v0,1);t0--;}};this.IndexOf=function(v0){for(varw0=0;w0<t0;w0++){if(u0(v0,s0[w0]))returnw0;}return-1;};this.Remove=function(v0){varw0=this.IndexOf(v0);if(w0==-1)returnfalse;this.RemoveAt(w0);returntrue;};this.Clear=function(){s0=[];t0=0;};this.GetCount=function(){returnt0;};this.GetItem=function(v0){if(v0<0||v0>=t0)throwd;returns0[v0];};this.SetItem=function(v0,w0){if(v0<0||v0>=t0)throwd;s0[v0]=w0;};this.ToArray=function(){varv0=[];for(varw0=0;w0<this.GetCount();w0++)v0.push(this.GetItem(w0));returnv0;};};varr=function(r0){if(r0===null)r0=g;this.f=r0;vars0=4;this.g=newArray(s0);this.h=0;};r.prototype.i=function(r0,s0){returnthis.f(this.g[r0],this.g[s0])<0;};r.prototype.j=function(r0){if(r0>=this.h||r0<0)return;vars0=r0-1>>1;if(s0<0||s0==r0)return;if(this.i(r0,s0)){vart0=this.g[r0];this.g[r0]=this.g[s0];this.g[s0]=t0;this.j(s0);}};r.prototype.k=function(r0){if(r0===a)r0=0;vars0=2*r0+1;vart0=2*r0+2;varu0=r0;if(s0<this.h&&this.i(s0,u0))u0=s0;if(t0<this.h&&this.i(t0,u0))u0=t0;if(u0!=r0){varv0=this.g[r0];this.g[r0]=this.g[u0];this.g[u0]=v0;this.k(u0);}};r.prototype.GetCount=function(){returnthis.h;};r.prototype.Peek=function(){if(this.h==0)throw"Heap is empty.";returnthis.g[0];};r.prototype.Dequeue=function(){varr0=this.Peek();this.g[0]=this.g[--this.h];deletethis.g[this.h];this.k();returnr0;};r.prototype.Enqueue=function(r0){vars0=this.h++;this.g[s0]=r0;this.j(s0);};vars=b.Scheduler=function(r0,s0,t0){this.Schedule=r0;this.ScheduleWithTime=s0;this.Now=t0;this.ScheduleRecursive=function(u0){varv0=this;varw0=newn();varx0;x0=function(){u0(function(){vary0=false;varz0=false;varA0;A0=v0.Schedule(function(){x0();if(y0)w0.Remove(A0);elsez0=true;});if(!z0){w0.Add(A0);y0=true;}});};w0.Add(v0.Schedule(x0));returnw0;};this.ScheduleRecursiveWithTime=function(u0,v0){varw0=this;varx0=newn();vary0;y0=function(){u0(function(z0){varA0=false;varB0=false;varC0;C0=w0.ScheduleWithTime(function(){y0();if(A0)x0.Remove(C0);elseB0=true;},z0);if(!B0){x0.Add(C0);A0=true;}});};x0.Add(w0.ScheduleWithTime(y0,v0));returnx0;};};vart=b.VirtualScheduler=function(r0,s0,t0,u0){varv0=news(function(w0){returnthis.ScheduleWithTime(w0,0);},function(w0,x0){returnthis.ScheduleVirtual(w0,u0(x0));},function(){returnt0(this.l);});v0.ScheduleVirtual=function(w0,x0){vary0=newk();varz0=s0(this.l,x0);varA0=function(){if(!y0.IsDisposed)w0();};varB0=newy(A0,z0);this.m.Enqueue(B0);returny0;};v0.Run=function(){while(this.m.GetCount()>0){varw0=this.m.Dequeue();this.l=w0.n;w0.o();}};v0.RunTo=function(w0){while(this.m.GetCount()>0&&this.f(this.m.Peek().n,w0)<=0){varx0=this.m.Dequeue();this.l=x0.n;x0.o();}};v0.GetTicks=function(){returnthis.l;};v0.l=0;v0.m=newr(function(w0,x0){returnr0(w0.n,x0.n);});v0.f=r0;returnv0;};varu=b.TestScheduler=function(){varr0=newt(function(s0,t0){returns0-t0;},function(s0,t0){returns0+t0;},function(s0){returnnewDate(s0);},function(s0){if(s0<=0)return1;returns0;});returnr0;};varv=news(function(r0){returnthis.ScheduleWithTime(r0,0);},function(r0,s0){vart0=this.Now()+s0;varu0=newy(r0,t0);if(this.m===a){varv0=neww();try{this.m.Enqueue(u0);v0.p();}finally{v0.q();}}elsethis.m.Enqueue(u0);returnu0.r();},f);v.s=function(r0){if(this.m===a){vars0=neww();try{r0();s0.p();}finally{s0.q();}}elser0();};s.CurrentThread=v;varw=function(){v.m=newr(function(r0,s0){try{returnr0.n-s0.n;}catch(t0){debugger;}});this.q=function(){v.m=a;};this.p=function(){while(v.m.GetCount()>0){varr0=v.m.Dequeue();if(!r0.t()){while(r0.n-v.Now()>0);if(!r0.t())r0.o();}}};};varx=0;vary=function(r0,s0){this.u=x++;this.o=r0;this.n=s0;this.v=newk();this.t=function(){returnthis.v.GetIsDisposed();};this.r=function(){returnthis.v;};};varz=news(function(r0){r0();returnj;},function(r0,s0){while(this.Now<s0);r0();},f);s.Immediate=z;varA=news(function(r0){vars0=c.setTimeout(r0,0);returni(function(){c.clearTimeout(s0);});},function(r0,s0){vart0=c.setTimeout(r0,s0);returni(function(){c.clearTimeout(t0);});},f);s.Timeout=A;varB=b.Observer=function(r0,s0,t0){this.OnNext=r0===a?e:r0;this.OnError=s0===a?function(u0){throwu0;}:s0;this.OnCompleted=t0===a?e:t0;this.AsObserver=function(){varu0=this;returnnewB(function(v0){u0.OnNext(v0);},function(v0){u0.OnError(v0);},function(){u0.OnCompleted();});};};varC=B.Create=function(r0,s0,t0){returnnewB(r0,s0,t0);};varD=b.Observable=function(r0){this.w=r0;};varE=D.CreateWithDisposable=function(r0){returnnewD(r0);};varF=D.Create=function(r0){returnE(function(s0){returni(r0(s0));});};varG=function(){returnthis.Select(function(r0){returnr0.Value;});};D.prototype={Subscribe:function(r0,s0,t0){varu0;if(arguments.length==0||arguments.length>1||typeofr0=="function")u0=newB(r0,s0,t0);elseu0=r0;returnthis.x(u0);},x:function(r0){vars0=false;vart0=newo();varu0=this;v.s(function(){varv0=newB(function(w0){if(!s0)r0.OnNext(w0);},function(w0){if(!s0){s0=true;t0.Dispose();r0.OnError(w0);}},function(){if(!s0){s0=true;t0.Dispose();r0.OnCompleted();}});t0.Replace(u0.w(v0));});returnnewn(t0,i(function(){s0=true;}));},Select:function(r0){vars0=this;returnE(function(t0){varu0=0;returns0.Subscribe(newB(function(v0){varw0;try{w0=r0(v0,u0++);}catch(x0){t0.OnError(x0);return;}t0.OnNext(w0);},function(v0){t0.OnError(v0);},function(){t0.OnCompleted();}));});},Let:function(r0,s0){if(s0===a)returnr0(this);vart0=this;returnE(function(u0){varv0=s0();varw0;try{w0=r0(v0);}catch(A0){returnL(A0).Subscribe(u0);}varx0=newo();vary0=newo();varz0=newn(y0,x0);x0.Replace(w0.Subscribe(function(A0){u0.OnNext(A0);},function(A0){u0.OnError(A0);z0.Dispose();},function(){u0.OnCompleted();z0.Dispose();}));y0.Replace(t0.Subscribe(v0));returnz0;});},MergeObservable:function(){varr0=this;returnE(function(s0){vart0=false;varu0=newn();varv0=newo();u0.Add(v0);v0.Replace(r0.Subscribe(function(w0){varx0=newo();u0.Add(x0);x0.Replace(w0.Subscribe(function(y0){s0.OnNext(y0);},function(y0){s0.OnError(y0);},function(){u0.Remove(x0);if(u0.GetCount()==1&&t0)s0.OnCompleted();}));},function(w0){s0.OnError(w0);},function(){t0=true;if(u0.GetCount()==1)s0.OnCompleted();}));returnu0;});},y:function(r0,s0){vart0=p(s0);t0.unshift(this);returnr0(t0);},Concat:function(){returnthis.y(I,arguments);},Merge:function(){returnthis.y(H,arguments);},Catch:function(){returnthis.y(P,arguments);},OnErrorResumeNext:function(){returnthis.y(V,arguments);},Zip:function(r0,s0){vart0=this;returnE(function(u0){varv0=false;varw0=[];varx0=[];vary0=false;varz0=false;varA0=newn();varB0=function(C0){A0.Dispose();w0=a;x0=a;u0.OnError(C0);};A0.Add(t0.Subscribe(function(C0){if(z0){u0.OnCompleted();return;}if(x0.length>0){varD0=x0.shift();varE0;try{E0=s0(C0,D0);}catch(F0){A0.Dispose();u0.OnError(F0);return;}u0.OnNext(E0);}elsew0.push(C0);},B0,function(){if(z0){u0.OnCompleted();return;}y0=true;}));A0.Add(r0.Subscribe(function(C0){if(y0){u0.OnCompleted();return;}if(w0.length>0){varD0=w0.shift();varE0;try{E0=s0(D0,C0);}catch(F0){A0.Dispose();u0.OnError(F0);return;}u0.OnNext(E0);}elsex0.push(C0);},B0,function(){if(y0){u0.OnCompleted();return;}z0=true;}));returnA0;});},CombineLatest:function(r0,s0){vart0=this;returnE(function(u0){varv0=false;varw0=false;varx0=false;vary0;varz0;varA0=false;varB0=false;varC0=newn();varD0=function(E0){C0.Dispose();u0.OnError(E0);};C0.Add(t0.Subscribe(function(E0){if(B0){u0.OnCompleted();return;}if(x0){varF0;try{F0=s0(E0,z0);}catch(G0){C0.Dispose();u0.OnError(G0);return;}u0.OnNext(F0);}y0=E0;w0=true;},D0,function(){if(B0){u0.OnCompleted();return;}A0=true;}));C0.Add(r0.Subscribe(function(E0){if(A0){u0.OnCompleted();return;}if(w0){varF0;try{F0=s0(y0,E0);}catch(G0){C0.Dispose();u0.OnError(G0);return;}u0.OnNext(F0);}z0=E0;x0=true;},D0,function(){if(A0){u0.OnCompleted();return;}B0=true;}));});},Switch:function(){varr0=this;returnE(function(s0){vart0=false;varu0=newo();varv0=newo();v0.Replace(r0.Subscribe(function(w0){if(!t0){varx0=newo();x0.Replace(w0.Subscribe(function(y0){s0.OnNext(y0);},function(y0){v0.Dispose();u0.Dispose();s0.OnError(y0);},function(){u0.Replace(a);if(t0)s0.OnCompleted();}));u0.Replace(x0);}},function(w0){u0.Dispose();s0.OnError(w0);},function(){t0=true;if(u0.Get()===a)s0.OnCompleted();}));returnnewn(v0,u0);});},TakeUntil:function(r0){vars0=this;returnE(function(t0){varu0=newn();u0.Add(r0.Subscribe(function(){t0.OnCompleted();u0.Dispose();},function(v0){t0.OnError(v0);},function(){}));u0.Add(s0.Subscribe(t0));returnu0;});},SkipUntil:function(r0){vars0=this;returnE(function(t0){varu0=true;varv0=newn();v0.Add(r0.Subscribe(function(){u0=false;},function(w0){t0.OnError(w0);},e));v0.Add(s0.Subscribe(newB(function(w0){if(!u0)t0.OnNext(w0);},function(w0){t0.OnError(w0);},function(){if(!u0)t0.OnCompleted();})));returnv0;});},Scan1:function(r0){vars0=this;returnO(function(){vart0;varu0=false;returns0.Select(function(v0){if(u0)t0=r0(t0,v0);else{t0=v0;u0=true;}returnt0;});});},Scan:function(r0,s0){vart0=this;returnO(function(){varu0;varv0=false;returnt0.Select(function(w0){if(v0)u0=s0(u0,w0);else{u0=s0(r0,w0);v0=true;}returnu0;});});},Scan0:function(r0,s0){vart0=this;returnE(function(u0){varv0=r0;varw0=true;returnt0.Subscribe(function(x0){if(w0){w0=false;u0.OnNext(v0);}try{v0=s0(v0,x0);}catch(y0){u0.OnError(y0);return;}u0.OnNext(v0);},function(x0){if(w0)u0.OnNext(v0);u0.OnError(x0);},function(){if(w0)u0.OnNext(v0);u0.OnCompleted();});});},Finally:function(r0){vars0=this;returnF(function(t0){varu0=s0.Subscribe(t0);returnfunction(){try{u0.Dispose();r0();}catch(v0){r0();throwv0;}};});},Do:function(r0,s0,t0){varu0;if(arguments.length==0||arguments.length>1||typeofr0=="function")u0=newB(r0,s0!==a?s0:e,t0);elseu0=r0;varv0=this;returnE(function(w0){returnv0.Subscribe(newB(function(x0){try{u0.OnNext(x0);}catch(y0){w0.OnError(y0);return;}w0.OnNext(x0);},function(x0){if(s0!==a)try{u0.OnError(x0);}catch(y0){w0.OnError(y0);return;}w0.OnError(x0);},function(){if(t0!==a)try{u0.OnCompleted();}catch(x0){w0.OnError(x0);return;}w0.OnCompleted();}));});},Where:function(r0){vars0=this;returnE(function(t0){varu0=0;returns0.Subscribe(newB(function(v0){varw0=false;try{w0=r0(v0,u0++);}catch(x0){t0.OnError(x0);return;}if(w0)t0.OnNext(v0);},function(v0){t0.OnError(v0);},function(){t0.OnCompleted();}));});},Take:function(r0,s0){if(s0===a)s0=z;vart0=this;returnE(function(u0){if(r0<=0){t0.Subscribe().Dispose();returnN(s0).Subscribe(u0);}varv0=r0;returnt0.Subscribe(newB(function(w0){if(v0-->0){u0.OnNext(w0);if(v0==0)u0.OnCompleted();}},function(w0){u0.OnError(w0);},function(){u0.OnCompleted();}));});},GroupBy:function(r0,s0,t0){if(r0===a)r0=h;if(s0===a)s0=h;if(t0===a)t0=function(v0){returnv0.toString();};varu0=this;returnE(function(v0){varw0={};varx0=newo();vary0=newm(x0);x0.Replace(u0.Subscribe(function(z0){varA0;try{A0=r0(z0);}catch(G0){for(varH0inw0)w0[H0].OnError(G0);v0.OnError(G0);return;}varB0=false;varC0;try{varD0=t0(A0);if(w0[D0]===a){C0=newi0();w0[D0]=C0;B0=true;}elseC0=w0[D0];}catch(G0){for(varH0inw0)w0[H0].OnError(G0);v0.OnError(G0);return;}if(B0){varE0=E(function(G0){returnnewn(y0.GetDisposable(),C0.Subscribe(G0));});E0.Key=A0;v0.OnNext(E0);}varF0;try{F0=s0(z0);}catch(G0){for(varH0inw0)w0[H0].OnError(G0);v0.OnError(G0);return;}C0.OnNext(F0);},function(z0){for(varA0inw0)w0[A0].OnError(z0);v0.OnError(z0);},function(){for(varz0inw0)w0[z0].OnCompleted();v0.OnCompleted();}));returny0;});},TakeWhile:function(r0){vars0=this;returnE(function(t0){varu0=true;returns0.Subscribe(newB(function(v0){if(u0){try{u0=r0(v0);}catch(w0){t0.OnError(w0);return;}if(u0)t0.OnNext(v0);elset0.OnCompleted();}},function(v0){t0.OnError(v0);},function(){t0.OnCompleted();}));});},SkipWhile:function(r0){vars0=this;returnE(function(t0){varu0=false;returns0.Subscribe(newB(function(v0){if(!u0)try{u0=!r0(v0);}catch(w0){t0.OnError(w0);return;}if(u0)t0.OnNext(v0);},function(v0){t0.OnError(v0);},function(){t0.OnCompleted();}));});},Skip:function(r0){vars0=this;returnE(function(t0){varu0=r0;returns0.Subscribe(newB(function(v0){if(u0--<=0)t0.OnNext(v0);},function(v0){t0.OnError(v0);},function(){t0.OnCompleted();}));});},SelectMany:function(r0){returnthis.Select(r0).MergeObservable();},TimeInterval:function(r0){if(r0===a)r0=z;vars0=this;returnO(function(){vart0=r0.Now();returns0.Select(function(u0){varv0=r0.Now();varw0=v0-t0;t0=v0;return{Interval:w0,Value:u0};});});},RemoveInterval:G,Timestamp:function(r0){if(r0===a)r0=z;returnthis.Select(function(s0){return{Timestamp:r0.Now(),Value:s0};});},RemoveTimestamp:G,Materialize:function(){varr0=this;returnE(function(s0){returnr0.Subscribe(newB(function(t0){s0.OnNext(newh0("N",t0));},function(t0){s0.OnNext(newh0("E",t0));s0.OnCompleted();},function(){s0.OnNext(newh0("C"));s0.OnCompleted();}));});},Dematerialize:function(){returnthis.SelectMany(function(r0){returnr0;});},AsObservable:function(){varr0=this;returnE(function(s0){returnr0.Subscribe(s0);});},Delay:function(r0,s0){if(s0===a)s0=A;vart0=this;returnE(function(u0){varv0=[];varw0=false;varx0=newo();vary0=t0.Materialize().Timestamp().Subscribe(function(z0){if(z0.Value.Kind=="E"){u0.OnError(z0.Value.Value);v0=[];if(w0)x0.Dispose();return;}v0.push({Timestamp:s0.Now()+r0,Value:z0.Value});if(!w0){x0.Replace(s0.ScheduleRecursiveWithTime(function(A0){varB0;do{B0=a;if(v0.length>0&&v0[0].Timestamp<=s0.Now())B0=v0.shift().Value;if(B0!==a)B0.Accept(u0);}while(B0!==a);if(v0.length>0){A0(Math.max(0,v0[0].Timestamp-s0.Now()));w0=true;}elsew0=false;},r0));w0=true;}});returnnewn(y0,x0);});},Throttle:function(r0,s0){if(s0===a)s0=A;vart0=this;returnE(function(u0){varv0;varw0=false;varx0=newo();vary0=0;varz0=t0.Subscribe(function(A0){w0=true;v0=A0;y0++;varB0=y0;x0.Replace(s0.ScheduleWithTime(function(){if(w0&&y0==B0)u0.OnNext(v0);w0=false;},r0));},function(A0){x0.Dispose();u0.OnError(A0);w0=false;y0++;},function(){x0.Dispose();if(w0)u0.OnNext(v0);u0.OnCompleted();w0=false;y0++;});returnnewn(z0,x0);});},Timeout:function(r0,s0,t0){if(t0===a)t0=A;if(s0===a)s0=L("Timeout",t0);varu0=this;returnE(function(v0){varw0=newo();varx0=newo();vary0=0;varz0=y0;varA0=false;x0.Replace(t0.ScheduleWithTime(function(){A0=y0==z0;if(A0)w0.Replace(s0.Subscribe(v0));},r0));w0.Replace(u0.Subscribe(function(B0){varC0=0;if(!A0){y0++;C0=y0;v0.OnNext(B0);x0.Replace(t0.ScheduleWithTime(function(){A0=y0==C0;if(A0)w0.Replace(s0.Subscribe(v0));},r0));}},function(B0){if(!A0){y0++;v0.OnError(B0);}},function(){if(!A0){y0++;v0.OnCompleted();}}));returnnewn(w0,x0);});},Sample:function(r0,s0){if(s0===a)s0=A;vart0=this;returnE(function(u0){varv0=false;varw0;varx0=false;vary0=newn();y0.Add(Y(r0,s0).Subscribe(function(z0){if(v0){u0.OnNext(w0);v0=false;}if(x0)u0.OnCompleted();},function(z0){u0.OnError(z0);},function(){u0.OnCompleted();}));y0.Add(t0.Subscribe(function(z0){v0=true;w0=z0;},function(z0){u0.OnError(z0);y0.Dispose();},function(){x0=true;}));returny0;});},Repeat:function(r0,s0){vart0=this;if(s0===a)s0=z;if(r0===a)r0=-1;returnE(function(u0){varv0=r0;varw0=newo();varx0=newn(w0);vary0=function(z0){w0.Replace(t0.Subscribe(function(A0){u0.OnNext(A0);},function(A0){u0.OnError(A0);},function(){if(v0>0){v0--;if(v0==0){u0.OnCompleted();return;}}z0();}));};x0.Add(s0.ScheduleRecursive(y0));returnx0;});},Retry:function(r0,s0){vart0=this;if(s0===a)s0=z;if(r0===a)r0=-1;returnE(function(u0){varv0=r0;varw0=newo();varx0=newn(w0);vary0=function(z0){w0.Replace(t0.Subscribe(function(A0){u0.OnNext(A0);},function(A0){if(v0>0){v0--;if(v0==0){u0.OnError(A0);return;}}z0();},function(){u0.OnCompleted();}));};x0.Add(s0.ScheduleRecursive(y0));returnx0;});},BufferWithTime:function(r0,s0,t0){if(t0===a)t0=A;if(s0===a)s0=r0;varu0=this;returnE(function(v0){varw0=newq();varx0=t0.Now();vary0=function(){varC0=[];for(varD0=0;D0<w0.GetCount();D0++){varE0=w0.GetItem(D0);if(E0.Timestamp-x0>=0)C0.push(E0.Value);}returnC0;};varz0=newn();varA0=function(C0){v0.OnError(C0);};varB0=function(){v0.OnNext(y0());v0.OnCompleted();};z0.Add(u0.Subscribe(function(C0){w0.Add({Value:C0,Timestamp:t0.Now()});},A0,B0));z0.Add(a0(r0,s0,t0).Subscribe(function(C0){varD0=y0();varE0=t0.Now()+s0-r0;while(w0.GetCount()>0&&w0.GetItem(0).Timestamp-E0<=0)w0.RemoveAt(0);v0.OnNext(D0);x0=E0;},A0,B0));returnz0;});},BufferWithTimeOrCount:function(r0,s0,t0){if(t0===a)t0=A;varu0=this;returnE(function(v0){varw0=0;varx0=newq();vary0=function(){v0.OnNext(x0.ToArray());x0.Clear();w0++;};varz0=newo();varA0;A0=function(C0){varD0=t0.ScheduleWithTime(function(){varE0=false;varF0=0;if(C0==w0){y0();F0=w0;E0=true;}if(E0)A0(F0);},r0);z0.Replace(D0);};A0(w0);varB0=u0.Subscribe(function(C0){varD0=false;varE0=0;x0.Add(C0);if(x0.GetCount()==s0){y0();E0=w0;D0=true;}if(D0)A0(E0);},function(C0){v0.OnError(C0);x0.Clear();},function(){v0.OnNext(x0.ToArray());w0++;v0.OnCompleted();x0.Clear();});returnnewn(B0,z0);});},BufferWithCount:function(r0,s0){if(s0===a)s0=r0;vart0=this;returnE(function(u0){varv0=[];varw0=0;returnt0.Subscribe(function(x0){if(w0==0)v0.push(x0);elsew0--;vary0=v0.length;if(y0==r0){varz0=v0;v0=[];varA0=Math.min(s0,y0);for(varB0=A0;B0<y0;B0++)v0.push(z0[B0]);w0=Math.max(0,s0-r0);u0.OnNext(z0);}},function(x0){u0.OnError(x0);},function(){if(v0.length>0)u0.OnNext(v0);u0.OnCompleted();});});},StartWith:function(r0,s0){if(!(r0instanceofArray))r0=[r0];if(s0===a)s0=z;vart0=this;returnE(function(u0){varv0=newn();varw0=0;v0.Add(s0.ScheduleRecursive(function(x0){if(w0<r0.length){u0.OnNext(r0[w0]);w0++;x0();}elsev0.Add(t0.Subscribe(u0));}));returnv0;});},DistinctUntilChanged:function(r0,s0){if(r0===a)r0=h;if(s0===a)s0=g;vart0=this;returnE(function(u0){varv0;varw0=false;returnt0.Subscribe(function(x0){vary0;try{y0=r0(x0);}catch(A0){u0.OnError(A0);return;}varz0=false;if(w0)try{z0=s0(v0,y0);}catch(A0){u0.OnError(A0);return;}if(!w0||!z0){w0=true;v0=y0;u0.OnNext(x0);}},function(x0){u0.OnError(x0);},function(){u0.OnCompleted();});});},Publish:function(r0){if(r0===a)returnnewq0(this,newi0());vars0=this;returnE(function(t0){varu0=newq0(s0,newi0());returnnewn(r0(u0).Subscribe(B),u0.Connect());});},Prune:function(r0,s0){if(s0===a)s0=z;if(r0===a)returnnewq0(this,newk0(s0));vart0=this;returnE(function(u0){varv0=newq0(t0,newk0(s0));returnnewn(r0(v0).Subscribe(B),v0.Connect());});},Replay:function(r0,s0,t0,u0){if(u0===a)u0=v;if(r0===a)returnnewq0(this,newm0(s0,t0,u0));varv0=this;returnE(function(w0){varx0=newq0(v0,newm0(s0,t0,u0));returnnewn(r0(x0).Subscribe(B),x0.Connect());});},SkipLast:function(r0){vars0=this;returnE(function(t0){varu0=[];returns0.Subscribe(function(v0){u0.push(v0);if(u0.length>r0)t0.OnNext(u0.shift());},function(v0){t0.OnError(v0);},function(){t0.OnCompleted();});});},TakeLast:function(r0){vars0=this;returnE(function(t0){varu0=[];returns0.Subscribe(function(v0){u0.push(v0);if(u0.length>r0)u0.shift();},function(v0){t0.OnError(v0);},function(){while(u0.length>0)t0.OnNext(u0.shift());t0.OnCompleted();});});}};varH=D.Merge=function(r0,s0){if(s0===a)s0=z;returnJ(r0,s0).MergeObservable();};varI=D.Concat=function(r0,s0){if(s0===a)s0=z;returnE(function(t0){varu0=newo();varv0=0;varw0=s0.ScheduleRecursive(function(x0){if(v0<r0.length){vary0=r0[v0];v0++;varz0=newo();u0.Replace(z0);z0.Replace(y0.Subscribe(function(A0){t0.OnNext(A0);},function(A0){t0.OnError(A0);},x0));}elset0.OnCompleted();});returnnewn(u0,w0);});};varJ=D.FromArray=function(r0,s0){if(s0===a)s0=z;returnE(function(t0){varu0=0;returns0.ScheduleRecursive(function(v0){if(u0<r0.length){t0.OnNext(r0[u0++]);v0();}elset0.OnCompleted();});});};varK=D.Return=function(r0,s0){if(s0===a)s0=z;returnE(function(t0){returns0.Schedule(function(){t0.OnNext(r0);t0.OnCompleted();});});};varL=D.Throw=function(r0,s0){if(s0===a)s0=z;returnE(function(t0){returns0.Schedule(function(){t0.OnError(r0);});});};varM=D.Never=function(){returnE(function(r0){returnj;});};varN=D.Empty=function(r0){if(r0===a)r0=z;returnE(function(s0){returnr0.Schedule(function(){s0.OnCompleted();});});};varO=D.Defer=function(r0){returnE(function(s0){vart0;try{t0=r0();}catch(u0){s0.OnError(u0);returnj;}returnt0.Subscribe(s0);});};varP=D.Catch=function(r0,s0){if(s0===a)s0=z;returnE(function(t0){varu0=newo();varv0=0;varw0=s0.ScheduleRecursive(function(x0){vary0=r0[v0];v0++;varz0=newo();u0.Replace(z0);z0.Replace(y0.Subscribe(function(A0){t0.OnNext(A0);},function(A0){if(v0<r0.length)x0();elset0.OnError(A0);},function(){t0.OnCompleted();}));});returnnewn(u0,w0);});};varQ=D.Using=function(r0,s0){returnE(function(t0){varu0;varv0=j;try{varw0=r0();if(w0!==a)v0=w0;u0=s0(w0);}catch(x0){returnnewn(Throw(x0).Subscribe(t0),v0);}returnnewn(u0.Subscribe(t0),v0);});};varR=D.Range=function(r0,s0,t0){if(t0===a)t0=z;varu0=r0+s0-1;returnT(r0,function(v0){returnv0<=u0;},function(v0){returnv0+1;},h,t0);};varS=D.Repeat=function(r0,s0,t0){if(t0===a)t0=z;if(s0===a)s0=-1;varu0=s0;returnE(function(v0){returnt0.ScheduleRecursive(function(w0){v0.OnNext(r0);if(u0>0){u0--;if(u0==0){v0.OnCompleted();return;}}w0();});});};varT=D.Generate=function(r0,s0,t0,u0,v0){if(v0===a)v0=z;returnE(function(w0){varx0=r0;vary0=true;returnv0.ScheduleRecursive(function(z0){varA0=false;varB0;try{if(y0)y0=false;elsex0=t0(x0);A0=s0(x0);if(A0)B0=u0(x0);}catch(C0){w0.OnError(C0);return;}if(A0){w0.OnNext(B0);z0();}elsew0.OnCompleted();});});};varU=D.GenerateWithTime=function(r0,s0,t0,u0,v0,w0){if(w0===a)w0=A;returnnewE(function(x0){vary0=r0;varz0=true;varA0=false;varB0;varC0;returnw0.ScheduleRecursiveWithTime(function(D0){if(A0)x0.OnNext(B0);try{if(z0)z0=false;elsey0=t0(y0);A0=s0(y0);if(A0){B0=u0(y0);C0=v0(y0);}}catch(E0){x0.OnError(E0);return;}if(A0)D0(C0);elsex0.OnCompleted();},0);});};varV=D.OnErrorResumeNext=function(r0,s0){if(s0===a)s0=z;returnE(function(t0){varu0=newo();varv0=0;varw0=s0.ScheduleRecursive(function(x0){if(v0<r0.length){vary0=r0[v0];v0++;varz0=newo();u0.Replace(z0);z0.Replace(y0.Subscribe(function(A0){t0.OnNext(A0);},x0,x0));}elset0.OnCompleted();});returnnewn(u0,w0);});};varW=D.Amb=function(){varr0=arguments;returnE(function(s0){vart0=newn();varu0=newo();u0.Replace(t0);varv0=false;for(varw0=0;w0<r0.length;w0++){varx0=r0[w0];vary0=newo();varz0=newB(function(A0){if(!v0){t0.Remove(this.z,true);t0.Dispose();u0.Replace(this.z);v0=true;}s0.OnNext(A0);},function(A0){s0.OnError(A0);u0.Dispose();},function(){s0.OnCompleted();u0.Dispose();});z0.z=y0;y0.Replace(x0.Subscribe(z0));t0.Add(y0);}returnu0;});};varX=D.ForkJoin=function(){varr0=arguments;returnE(function(s0){vart0=[];varu0=[];varv0=[];varw0=newn();for(varx0=0;x0<r0.length;x0++)(function(y0){w0.Add(r0[y0].Subscribe(function(z0){t0[y0]=true;v0[y0]=z0;},function(z0){s0.OnError(z0);},function(z0){if(!t0[y0]){s0.OnCompleted();v0=a;t0=a;return;}u0[y0]=true;varA0=true;for(varB0=0;B0<r0.length;B0++){if(!u0[B0])A0=false;}if(A0){s0.OnNext(v0);s0.OnCompleted();v0=a;u0=a;t0=a;}}));})(x0);returnw0;});};varY=D.Interval=function(r0,s0){returna0(r0,r0,s0);};varZ=function(r0){returnMath.max(0,r0);};vara0=D.Timer=function(r0,s0,t0){if(t0===a)t0=A;if(r0===a)returnM();if(r0instanceofDate)returnO(function(){returnD.Timer(r0-newDate(),s0,t0);});varu0=Z(r0);if(s0===a)returnE(function(w0){returnt0.ScheduleWithTime(function(){w0.OnNext(0);w0.OnCompleted();},u0);});varv0=Z(s0);returnE(function(w0){varx0=0;returnt0.ScheduleRecursiveWithTime(function(y0){w0.OnNext(x0++);y0(v0);},u0);});};varb0=D.While=function(r0,s0){returnE(function(t0){varu0=newo();varv0=newn(u0);v0.Add(z.ScheduleRecursive(function(w0){varx0;try{x0=r0();}catch(y0){t0.OnError(y0);return;}if(x0)u0.Replace(s0.Subscribe(function(y0){t0.OnNext(y0);},function(y0){t0.OnError(y0);},function(){w0();}));elset0.OnCompleted();}));returnv0;});};varc0=D.If=function(r0,s0,t0){if(t0===a)t0=N();returnO(function(){returnr0()?s0:t0;});};vard0=D.DoWhile=function(r0,s0){returnI([r0,b0(s0,r0)]);};vare0=D.Case=function(r0,s0,t0,u0){if(u0===a)u0=z;if(t0===a)t0=N(u0);returnO(function(){varv0=s0[r0()];if(v0===a)v0=t0;returnv0;});};varf0=D.For=function(r0,s0){returnE(function(t0){varu0=newn();varv0=0;u0.Add(z.ScheduleRecursive(function(w0){if(v0<r0.length){varx0;try{x0=s0(r0[v0]);}catch(y0){t0.OnError(y0);return;}u0.Add(x0.Subscribe(function(y0){t0.OnNext(y0);},function(y0){t0.OnError(y0);},function(){v0++;w0();}));}elset0.OnCompleted();}));returnu0;});};varg0=D.Let=function(r0,s0){returnO(function(){returns0(r0);});};varh0=b.Notification=function(r0,s0){this.Kind=r0;this.Value=s0;this.toString=function(){returnthis.Kind+": "+this.Value;};this.Accept=function(t0){switch(this.Kind){case"N":t0.OnNext(this.Value);break;case"E":t0.OnError(this.Value);break;case"C":t0.OnCompleted();break;}returnj;};this.w=function(t0){varu0=this.Accept(t0);if(r0=="N")t0.OnCompleted();returnu0;};};h0.prototype=newD;vari0=b.Subject=function(){varr0=newq();vars0=false;this.OnNext=function(t0){if(!s0){varu0=r0.ToArray();for(varv0=0;v0<u0.length;v0++){varw0=u0[v0];w0.OnNext(t0);}}};this.OnError=function(t0){if(!s0){varu0=r0.ToArray();for(varv0=0;v0<u0.length;v0++){varw0=u0[v0];w0.OnError(t0);}s0=true;r0.Clear();}};this.OnCompleted=function(){if(!s0){vart0=r0.ToArray();for(varu0=0;u0<t0.length;u0++){varv0=t0[u0];v0.OnCompleted();}s0=true;r0.Clear();}};this.w=function(t0){if(!s0){r0.Add(t0);returni(function(){r0.Remove(t0);});}elsereturnj;};};i0.prototype=newD;for(varj0inB.prototype)i0.prototype[j0]=B.prototype[j0];vark0=b.AsyncSubject=function(r0){vars0=newq();vart0;varu0=false;if(r0===a)r0=z;this.OnNext=function(v0){if(!u0)t0=newh0("N",v0);};this.OnError=function(v0){if(!u0){t0=newh0("E",v0);varw0=s0.ToArray();for(varx0=0;x0<w0.length;x0++){vary0=w0[x0];if(y0!==a)y0.OnError(v0);}u0=true;s0.Clear();}};this.OnCompleted=function(){if(!u0){if(t0===a)t0=newh0("C");varv0=s0.ToArray();for(varw0=0;w0<v0.length;w0++){varx0=v0[w0];if(x0!==a)t0.w(x0);}u0=true;s0.Clear();}};this.w=function(v0){if(!u0){s0.Add(v0);returni(function(){s0.Remove(v0);});}elsereturnr0.Schedule(function(){t0.w(v0);});};};k0.prototype=newi0;varl0=b.BehaviorSubject=function(r0,s0){vart0=newm0(1,-1,s0);t0.OnNext(r0);returnt0;};varm0=b.ReplaySubject=function(r0,s0,t0){varu0=newq();varv0=newq();varw0=false;if(t0===a)t0=v;varx0=s0>0;vary0=function(z0,A0){v0.Add({Value:newh0(z0,A0),Timestamp:t0.Now()});};this.A=function(){if(r0!==a)while(v0.GetCount()>r0)v0.RemoveAt(0);if(x0)while(v0.GetCount()>0&&t0.Now()-v0.GetItem(0).Timestamp>s0)v0.RemoveAt(0);};this.OnNext=function(z0){if(!w0){varA0=u0.ToArray();for(varB0=0;B0<A0.length;B0++){varC0=A0[B0];C0.OnNext(z0);}y0("N",z0);}};this.OnError=function(z0){if(!w0){varA0=u0.ToArray();for(varB0=0;B0<A0.length;B0++){varC0=A0[B0];C0.OnError(z0);}w0=true;u0.Clear();y0("E",z0);}};this.OnCompleted=function(){if(!w0){varz0=u0.ToArray();for(varA0=0;A0<z0.length;A0++){varB0=z0[A0];B0.OnCompleted();}w0=true;u0.Clear();y0("C");}};this.w=function(z0){varA0=newn0(this,z0);varB0=newn(A0);varC0=this;B0.Add(t0.Schedule(function(){if(!A0.B){C0.A();for(varD0=0;D0<v0.GetCount();D0++)v0.GetItem(D0).Value.Accept(z0);u0.Add(z0);A0.C=true;}}));returnB0;};this.D=function(z0){u0.Remove(z0);};};m0.prototype=newi0;varn0=function(r0,s0){this.E=r0;this.F=s0;this.C=false;this.B=false;this.Dispose=function(){if(this.C)this.E.D(this.F);this.B=true;};};varo0=D.ToAsync=function(r0,s0){if(s0===a)s0=A;returnfunction(){vart0=newk0(s0);varu0=function(){varx0;try{x0=r0.apply(this,arguments);}catch(y0){t0.OnError(y0);return;}t0.OnNext(x0);t0.OnCompleted();};varv0=this;varw0=p(arguments);s0.Schedule(function(){u0.apply(v0,w0);});returnt0;};};varp0=D.Start=function(r0,s0,t0,u0){if(t0===a)t0=[];returno0(r0,u0).apply(s0,t0);};varq0=b.ConnectableObservable=function(r0,s0){if(s0===a)s0=newi0();this.E=s0;this.G=r0;this.H=false;this.Connect=function(){vart0;varu0=false;if(!this.H){this.H=true;varv0=this;t0=newn(i(function(){v0.H=false;}));this.I=t0;t0.Add(r0.Subscribe(this.E));}returnthis.I;};this.w=function(t0){returnthis.E.Subscribe(t0);};this.RefCount=function(){vart0=0;varu0=this;varv0;returnF(function(w0){varx0=false;t0++;x0=t0==1;vary0=u0.Subscribe(w0);if(x0)v0=u0.Connect();returnfunction(){y0.Dispose();t0--;if(t0==0)v0.Dispose();};});};};q0.prototype=newD;})();