diff --git a/Gruntfile.js b/Gruntfile.js index bfed22f5b..78ee0c846 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -86,7 +86,7 @@ var browsers = [{ // Async 'src/core/linq/observable/frompromise.js', // AsyncSubject, asObservable - 'src/core/linq/observable/topromise.js', + 'src/core/linq/observable/topromise.js', // Creation 'src/core/linq/observable/toarray.js', @@ -150,7 +150,7 @@ var browsers = [{ 'src/core/linq/observable/defaultifempty.js', 'src/core/linq/observable/distinct.js', 'src/core/linq/observable/groupby.js', - 'src/core/linq/observable/groupbyuntil.js', + 'src/core/linq/observable/groupbyuntil.js', 'src/core/linq/observable/select.js', 'src/core/linq/observable/pluck.js', 'src/core/linq/observable/selectmany.js', @@ -213,7 +213,7 @@ var browsers = [{ 'src/core/backpressure/pausablebuffered.js', 'src/core/backpressure/controlled.js', 'src/core/backpressure/controlledobservable.js', - 'src/core/backpressure/controlledsubject.js', + 'src/core/backpressure/controlledsubject.js', // Binding operators 'src/core/linq/observable/multicast.js', // ConnectableObservable @@ -227,7 +227,7 @@ var browsers = [{ 'src/core/subjects/innersubscription.js', 'src/core/subjects/behaviorsubject.js', 'src/core/subjects/replaysubject.js', - 'src/core/linq/connectableobservable.js', + 'src/core/linq/connectableobservable.js', // Coincidence operators 'src/core/internal/dictionary.js', @@ -259,7 +259,7 @@ var browsers = [{ 'src/core/joins/joinobserver.js', 'src/core/linq/observable/and.js', // Pattern 'src/core/linq/observable/then.js', // Pattern - 'src/core/linq/observable/when.js', // CompositeDisposable + 'src/core/linq/observable/when.js', // CompositeDisposable // Time based operators 'src/core/linq/observable/_observabletimerdate.js', // AnonymousObservable @@ -290,7 +290,7 @@ var browsers = [{ 'src/core/linq/observable/takewithtime.js', 'src/core/linq/observable/skipwithtime.js', 'src/core/linq/observable/skipuntilwithtime.js', - 'src/core/linq/observable/takeuntilwithtime.js', + 'src/core/linq/observable/takeuntilwithtime.js', // Experimental Flattening 'src/core/linq/observable/exclusive.js', @@ -298,7 +298,7 @@ var browsers = [{ // Virtual time 'src/core/concurrency/virtualtimescheduler.js', - 'src/core/concurrency/historicalscheduler.js', + 'src/core/concurrency/historicalscheduler.js', 'src/core/anonymousobservable.js', 'src/core/autodetachobserver.js', @@ -354,7 +354,7 @@ var browsers = [{ // Async 'src/core/linq/observable/frompromise.js', // AsyncSubject, asObservable - 'src/core/linq/observable/topromise.js', + 'src/core/linq/observable/topromise.js', // Creation 'src/core/linq/observable/toarray.js', @@ -418,7 +418,7 @@ var browsers = [{ 'src/core/linq/observable/defaultifempty.js', 'src/core/linq/observable/distinct.js', 'src/core/linq/observable/groupby.js', - 'src/core/linq/observable/groupbyuntil.js', + 'src/core/linq/observable/groupbyuntil.js', 'src/core/linq/observable/select.js', 'src/core/linq/observable/pluck.js', 'src/core/linq/observable/selectmany.js', @@ -481,7 +481,7 @@ var browsers = [{ 'src/core/backpressure/pausablebuffered.js', 'src/core/backpressure/controlled.js', 'src/core/backpressure/controlledobservable.js', - 'src/core/backpressure/controlledsubject.js', + 'src/core/backpressure/controlledsubject.js', // Binding operators 'src/core/linq/observable/multicast.js', // ConnectableObservable @@ -495,7 +495,7 @@ var browsers = [{ 'src/core/subjects/innersubscription.js', 'src/core/subjects/behaviorsubject.js', 'src/core/subjects/replaysubject.js', - 'src/core/linq/connectableobservable.js', + 'src/core/linq/connectableobservable.js', // Coincidence operators 'src/core/internal/dictionary.js', @@ -517,7 +517,7 @@ var browsers = [{ 'src/core/linq/observable/expand.js', // immediateScheduler, SerialDisposable, CompositeDisposable, SingleAssignmentDisposable 'src/core/linq/observable/forkjoin.js', // CompositeDisposable 'src/core/linq/observable/forkjoinproto.js', // SingleAssignmentDisposable, CompositeDisposable - 'src/core/linq/observable/manyselect.js', // ImmediateScheduler, CurrentThreadScheduler, select, do, observeOn + 'src/core/linq/observable/manyselect.js', // ImmediateScheduler, CurrentThreadScheduler, select, do, observeOn // Join pattern operators 'src/core/internal/map.js', @@ -527,7 +527,7 @@ var browsers = [{ 'src/core/joins/joinobserver.js', 'src/core/linq/observable/and.js', // Pattern 'src/core/linq/observable/then.js', // Pattern - 'src/core/linq/observable/when.js', // CompositeDisposable + 'src/core/linq/observable/when.js', // CompositeDisposable // Time based operators 'src/core/linq/observable/_observabletimerdate.js', // AnonymousObservable @@ -558,7 +558,7 @@ var browsers = [{ 'src/core/linq/observable/takewithtime.js', 'src/core/linq/observable/skipwithtime.js', 'src/core/linq/observable/skipuntilwithtime.js', - 'src/core/linq/observable/takeuntilwithtime.js', + 'src/core/linq/observable/takeuntilwithtime.js', // Experimental Flattening 'src/core/linq/observable/exclusive.js', @@ -566,7 +566,7 @@ var browsers = [{ // Virtual time 'src/core/concurrency/virtualtimescheduler.js', - 'src/core/concurrency/historicalscheduler.js', + 'src/core/concurrency/historicalscheduler.js', 'src/core/anonymousobservable.js', 'src/core/autodetachobserver.js', @@ -576,7 +576,7 @@ var browsers = [{ 'src/core/subjects/asyncsubject.js', 'src/core/subjects/anonymoussubject.js', 'src/core/exports.js', - 'src/core/outro.js' + 'src/core/outro.js' ], dest: 'dist/rx.all.compat.js' }, @@ -622,7 +622,7 @@ var browsers = [{ // Async 'src/core/linq/observable/frompromise.js', // AsyncSubject, asObservable - 'src/core/linq/observable/topromise.js', + 'src/core/linq/observable/topromise.js', // Creation 'src/core/linq/observable/toarray.js', @@ -753,7 +753,7 @@ var browsers = [{ // Async 'src/core/linq/observable/frompromise.js', // AsyncSubject, asObservable - 'src/core/linq/observable/topromise.js', + 'src/core/linq/observable/topromise.js', // Creation 'src/core/linq/observable/toarray.js', @@ -829,7 +829,7 @@ var browsers = [{ // Experimental Flattening 'src/core/linq/observable/exclusive.js', - 'src/core/linq/observable/exclusivemap.js', + 'src/core/linq/observable/exclusivemap.js', 'src/core/anonymousobservable.js', 'src/core/autodetachobserver.js', @@ -1034,7 +1034,7 @@ var browsers = [{ 'src/core/linq/observable/defer.js', 'src/core/linq/observable/empty.js', 'src/core/linq/observable/from.js', - 'src/core/linq/observable/fromarray.js', + 'src/core/linq/observable/fromarray.js', 'src/core/linq/observable/never.js', 'src/core/linq/observable/of.js', 'src/core/linq/observable/range.js', @@ -1129,7 +1129,7 @@ var browsers = [{ // Experimental Flattening 'src/core/linq/observable/exclusive.js', - 'src/core/linq/observable/exclusivemap.js', + 'src/core/linq/observable/exclusivemap.js', 'src/core/anonymousobservable.js', 'src/core/autodetachobserver.js', @@ -1148,8 +1148,8 @@ var browsers = [{ liteextras: { src: [ 'src/core/license.js', - 'src/core/subintro.js', - 'src/core/liteextrasheader.js', + 'src/core/subintro.js', + 'src/core/liteextrasheader.js', 'src/core/disposables/scheduleddisposable.js', 'src/core/checkedobserver.js', @@ -1166,7 +1166,7 @@ var browsers = [{ // Multiple 'src/core/linq/observable/ambproto.js', - 'src/core/linq/observable/amb.js', + 'src/core/linq/observable/amb.js', 'src/core/linq/observable/onerrorresumenextproto.js', 'src/core/linq/observable/onerrorresumenext.js', @@ -1179,7 +1179,7 @@ var browsers = [{ 'src/core/linq/observable/defaultifempty.js', 'src/core/linq/observable/distinct.js', - 'src/core/suboutro.js' + 'src/core/suboutro.js' ], dest: 'dist/rx.lite.extras.js' }, @@ -1198,7 +1198,7 @@ var browsers = [{ //'src/core/backpressure/windowed.js', //'src/core/backpressure/windowedobservable.js', - 'src/core/suboutro.js' + 'src/core/suboutro.js' ], dest: 'dist/rx.backpressure.js' }, @@ -1240,7 +1240,7 @@ var browsers = [{ 'src/core/linq/observable/find.js', // _findvalue, where 'src/core/linq/observable/findindex.js', // _findvalue, where 'src/core/linq/observable/toset.js', - 'src/core/linq/observable/tomap.js', + 'src/core/linq/observable/tomap.js', 'src/core/suboutro.js' ], dest: 'dist/rx.aggregates.js' @@ -1314,7 +1314,7 @@ var browsers = [{ 'src/core/linq/observable/partition.js', 'src/core/linq/observable/groupby.js', 'src/core/linq/observable/groupbyuntil.js', - 'src/core/linq/groupedobservable.js', + 'src/core/linq/groupedobservable.js', 'src/core/suboutro.js' ], dest: 'dist/rx.coincidence.js' @@ -1428,131 +1428,131 @@ var browsers = [{ options: { banner: '/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/' - }, + }, all: { options: { sourceMap: true, sourceMapName: 'dist/rx.all.map' - }, - files: {'dist/rx.all.min.js': ['dist/rx.all.js'] } + }, + files: {'dist/rx.all.min.js': ['dist/rx.all.js'] } }, allcompat: { options: { sourceMap: true, sourceMapName: 'dist/rx.all.compat.map' - }, - files: {'dist/rx.all.compat.min.js': ['dist/rx.all.compat.js'] } - }, + }, + files: {'dist/rx.all.compat.min.js': ['dist/rx.all.compat.js'] } + }, basic: { options: { sourceMap: true, sourceMapName: 'dist/rx.compat.map' - }, + }, files: {'dist/rx.compat.min.js': ['dist/rx.compat.js'] } }, modern: { options: { sourceMap: true, sourceMapName: 'dist/rx.map' - }, + }, files: {'dist/rx.min.js': ['dist/rx.js'] } }, lite: { options: { sourceMap: true, sourceMapName: 'dist/rx.lite.map' - }, + }, files: {'dist/rx.lite.min.js': ['dist/rx.lite.js'] } }, litecompat: { options: { sourceMap: true, sourceMapName: 'dist/rx.lite.compat.map' - }, + }, files: {'dist/rx.lite.compat.min.js': ['dist/rx.lite.compat.js'] } }, liteextras: { options: { sourceMap: true, sourceMapName: 'dist/rx.lite.extras.map' - }, + }, files: {'dist/rx.lite.extras.min.js': ['dist/rx.lite.extras.js'] } }, backpressure: { options: { sourceMap: true, sourceMapName: 'dist/rx.backpressure.map' - }, + }, files: {'dist/rx.backpressure.min.js': ['dist/rx.backpressure.js'] } - }, + }, aggregates: { options: { sourceMap: true, sourceMapName: 'dist/rx.aggregates.map' - }, + }, files: {'dist/rx.aggregates.min.js': ['dist/rx.aggregates.js'] } }, asyncCompat: { options: { sourceMap: true, sourceMapName: 'dist/rx.async.compat.map' - }, + }, files: {'dist/rx.async.compat.min.js': ['dist/rx.async.compat.js'] } }, asyncModern: { options: { sourceMap: true, sourceMapName: 'dist/rx.async.map' - }, + }, files: {'dist/rx.async.min.js': ['dist/rx.async.js'] } }, binding: { options: { sourceMap: true, sourceMapName: 'dist/rx.binding.map' - }, + }, files: {'dist/rx.binding.min.js': ['dist/rx.binding.js'] } }, coincidence: { options: { sourceMap: true, sourceMapName: 'dist/rx.coincidence.map' - }, + }, files: {'dist/rx.coincidence.min.js': ['dist/rx.coincidence.js'] } }, experimental: { options: { sourceMap: true, sourceMapName: 'dist/rx.experimental.map' - }, + }, files: {'dist/rx.experimental.min.js': ['dist/rx.experimental.js'] } }, joinpatterns: { options: { sourceMap: true, sourceMapName: 'dist/rx.joinpatterns.map' - }, + }, files: {'dist/rx.joinpatterns.min.js': ['dist/rx.joinpatterns.js'] } }, testing: { options: { sourceMap: true, sourceMapName: 'dist/rx.testing.map' - }, + }, files: {'dist/rx.testing.min.js': ['dist/rx.testing.js'] } }, time: { options: { sourceMap: true, sourceMapName: 'dist/rx.time.map' - }, + }, files: {'dist/rx.time.min.js': ['dist/rx.time.js'] } }, virtualtime: { options: { sourceMap: true, sourceMapName: 'dist/rx.virtualtime.map' - }, + }, files: {'dist/rx.virtualtime.min.js': ['dist/rx.virtualtime.js'] } } }, @@ -1684,7 +1684,7 @@ var browsers = [{ grunt.registerTask('nuget-backpressure', 'Register NuGet-BackPressure', function () { createNuGetPackage.call(this, 'nuget/RxJS-BackPressure/RxJS-BackPressure.nuspec'); - }); + }); grunt.registerTask('nuget-binding', 'Register NuGet-Binding', function () { createNuGetPackage.call(this, 'nuget/RxJS-Binding/RxJS-Binding.nuspec'); diff --git a/bower.json b/bower.json index 0f051f966..51713e6bc 100644 --- a/bower.json +++ b/bower.json @@ -13,7 +13,7 @@ "dist/rx.min.js", "dist/rx.compat.js", "dist/rx.compat.map", - "dist/rx.compat.min.js", + "dist/rx.compat.min.js", "dist/rx.aggregates.js", "dist/rx.aggregates.map", "dist/rx.aggregates.min.js", @@ -22,7 +22,7 @@ "dist/rx.async.min.js", "dist/rx.async.compat.js", "dist/rx.async.map.js", - "dist/rx.async.compat.min.js", + "dist/rx.async.compat.min.js", "dist/rx.backpressure.js", "dist/rx.backpressure.map", "dist/rx.backpressure.min.js", @@ -40,7 +40,7 @@ "dist/rx.lite.min.js", "dist/rx.lite.compat.js", "dist/rx.lite.compat.map", - "dist/rx.lite.compat.min.js", + "dist/rx.lite.compat.min.js", "dist/rx.joinpatterns.js", "dist/rx.joinpatterns.map", "dist/rx.joinpatterns.min.js", @@ -67,4 +67,4 @@ "src", "tests" ] -} \ No newline at end of file +} diff --git a/component.json b/component.json index 41c72bd86..23eaf1c82 100644 --- a/component.json +++ b/component.json @@ -6,38 +6,38 @@ "dist/rx.all.compat.js", "dist/rx.all.compat.min.js", "dist/rx.all.js", - "dist/rx.all.min.js", + "dist/rx.all.min.js", "dist/rx.async.js", - "dist/rx.async.min.js", + "dist/rx.async.min.js", "dist/rx.async.compat.js", "dist/rx.async.compat.min.js", "dist/rx.backpressure.js", - "dist/rx.backpressure.min.js", + "dist/rx.backpressure.min.js", "dist/rx.backpressure.js", - "dist/rx.backpressure.min.js", + "dist/rx.backpressure.min.js", "dist/rx.binding.js", - "dist/rx.binding.min.js", + "dist/rx.binding.min.js", "dist/rx.coincidence.js", - "dist/rx.coincidence.min.js", + "dist/rx.coincidence.min.js", "dist/rx.js", - "dist/rx.min.js", + "dist/rx.min.js", "dist/rx.compat.js", - "dist/rx.compat.min.js", + "dist/rx.compat.min.js", "dist/rx.experimental.js", - "dist/rx.experimental.min.js", + "dist/rx.experimental.min.js", "dist/rx.joinpatterns.js", - "dist/rx.joinpatterns.min.js", + "dist/rx.joinpatterns.min.js", "dist/rx.lite.js", - "dist/rx.lite.min.js", + "dist/rx.lite.min.js", "dist/rx.lite.compat.js", - "dist/rx.lite.compat.min.js", + "dist/rx.lite.compat.min.js", "dist/rx.lite.extras.js", - "dist/rx.lite.extras.min.js", + "dist/rx.lite.extras.min.js", "dist/rx.testing.js", - "dist/rx.testing.min.js", + "dist/rx.testing.min.js", "dist/rx.time.js", - "dist/rx.time.min.js", + "dist/rx.time.min.js", "dist/rx.virtualtime.js", - "dist/rx.virtualtime.min.js" + "dist/rx.virtualtime.min.js" ] } diff --git a/dist/rx.aggregates.map b/dist/rx.aggregates.map index b1836a89a..7b6b2ca16 100644 --- a/dist/rx.aggregates.map +++ b/dist/rx.aggregates.map @@ -1 +1 @@ -{"version":3,"file":"rx.aggregates.min.js","sources":["rx.aggregates.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","extremaBy","source","keySelector","comparer","AnonymousObservable","observer","hasValue","lastKey","list","subscribe","x","comparison","key","ex","onError","ex1","push","bind","onNext","onCompleted","firstOnly","length","Error","sequenceContainsNoElements","sequenceEqualArray","first","second","count","len","value","equal","e","elementAtOrDefault","index","hasDefault","defaultValue","argumentOutOfRange","i","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","predicate","thisArg","yieldIndex","shouldRun","Observable","observableProto","prototype","CompositeDisposable","helpers","internals","isEqual","not","defaultComparer","identity","defaultSubComparer","isFunction","isPromise","observableFromPromise","fromPromise","finalValue","aggregate","seed","hasSeed","accumulator","arguments","scan","startWith","reduce","some","any","where","isEmpty","map","every","all","v","select","b","contains","sum","prev","curr","minBy","y","min","maxBy","max","average","cur","s","sequenceEqual","Array","isArray","donel","doner","ql","qr","subscription1","shift","subscription2","exception","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","Set","toSet","add","Map","toMap","elementSelector","m","element","set"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UA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AAO0E,GAChBvF,EAASc,oBAMbnC,EAAKmI,MAOTnE,EAAgBoE,MAAQ,SAAUlH,EAAamH,GAC7C,GAAIpH,GAASf,IACb,OAAO,IAAIkB,GAAoB,SAAUC,GACvC,GAAIiH,GAAI,GAAItI,GAAKmI,GACjB,OAAOlH,GAAOQ,UACZ,SAAUC,GACR,GAAIE,EACJ,KACEA,EAAMV,EAAYQ,GAClB,MAAOqB,GAEP,WADA1B,GAASS,QAAQiB,GAInB,GAAIwF,GAAU7G,CACd,IAAI2G,EACF,IACEE,EAAUF,EAAgB3G,GAC1B,MAAOqB,GAEP,WADA1B,GAASS,QAAQiB,GAKrBuF,EAAEE,IAAI5G,EAAK2G,IAEblH,EAASS,QAAQG,KAAKZ,GACtB,WACEA,EAASa,OAAOoG,GAChBjH,EAASc,oBAMVvB"} \ No newline at end of file +{"version":3,"file":"rx.aggregates.min.js","sources":["rx.aggregates.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","extremaBy","source","keySelector","comparer","AnonymousObservable","observer","hasValue","lastKey","list","subscribe","x","comparison","key","ex","onError","ex1","push","bind","onNext","onCompleted","firstOnly","length","Error","sequenceContainsNoElements","sequenceEqualArray","first","second","count","len","value","equal","e","elementAtOrDefault","index","hasDefault","defaultValue","argumentOutOfRange","i","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","predicate","thisArg","yieldIndex","shouldRun","Observable","observableProto","prototype","CompositeDisposable","helpers","internals","isEqual","not","defaultComparer","identity","defaultSubComparer","isFunction","isPromise","observableFromPromise","fromPromise","finalValue","aggregate","seed","hasSeed","accumulator","arguments","scan","startWith","reduce","some","any","where","isEmpty","map","every","all","v","select","b","contains","sum","prev","curr","minBy","y","min","maxBy","max","average","cur","s","sequenceEqual","Array","isArray","donel","doner","ql","qr","subscription1","shift","subscription2","exception","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","Set","toSet","add","Map","toMap","elementSelector","m","element","set"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,EAAIb,GAuCpC,QAASiB,GAAUC,EAAQC,EAAaC,GACtC,MAAO,IAAIC,GAAoB,SAAUC,GACvC,GAAIC,IAAW,EAAOC,EAAU,KAAMC,IACtC,OAAOP,GAAOQ,UAAU,SAAUC,GAChC,GAAIC,GAAYC,CAChB,KACEA,EAAMV,EAAYQ,GAClB,MAAOG,GAEP,WADAR,GAASS,QAAQD,GAInB,GADAF,EAAa,EACRL,EAIH,IACEK,EAAaR,EAASS,EAAKL,GAC3B,MAAOQ,GAEP,WADAV,GAASS,QAAQC,OANnBT,IAAW,EACXC,EAAUK,CASRD,GAAa,IACfJ,EAAUK,EACVJ,MAEEG,GAAc,GAAKH,EAAKQ,KAAKN,IAChCL,EAASS,QAAQG,KAAKZ,GAAW,WAClCA,EAASa,OAAOV,GAChBH,EAAS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,GACxC,MAAOF,GAAUxD,KAAMyD,EAAWC,GAAS,IAU/CI,EAAgB+D,UAAY,SAAUpE,EAAWC,GAC7C,MAAOF,GAAUxD,KAAMyD,EAAWC,GAAS,IAG3C5D,EAAKgI,MAKThE,EAAgBiE,MAAQ,WACtB,GAAIhH,GAASf,IACb,OAAO,IAAIkB,GAAoB,SAAUC,GACvC,GAAIuF,GAAI,GAAI5G,GAAKgI,GACjB,OAAO/G,GAAOQ,UACZmF,EAAEsB,IAAIjG,KAAK2E,GACXvF,EAASS,QAAQG,KAAKZ,GACtB,WACEA,EAASa,OAAO0E,GAChBvF,EAASc,oBAMbnC,EAAKmI,MAOTnE,EAAgBoE,MAAQ,SAAUlH,EAAamH,GAC7C,GAAIpH,GAASf,IACb,OAAO,IAAIkB,GAAoB,SAAUC,GACvC,GAAIiH,GAAI,GAAItI,GAAKmI,GACjB,OAAOlH,GAAOQ,UACZ,SAAUC,GACR,GAAIE,EACJ,KACEA,EAAMV,EAAYQ,GAClB,MAAOqB,GAEP,WADA1B,GAASS,QAAQiB,GAInB,GAAIwF,GAAU7G,CACd,IAAI2G,EACF,IACEE,EAAUF,EAAgB3G,GAC1B,MAAOqB,GAEP,WADA1B,GAASS,QAAQiB,GAKrBuF,EAAEE,IAAI5G,EAAK2G,IAEblH,EAASS,QAAQG,KAAKZ,GACtB,WACEA,EAASa,OAAOoG,GAChBjH,EAASc,oBAMVvB"} diff --git a/dist/rx.aggregates.min.js b/dist/rx.aggregates.min.js index 5cc82dd0a..675ce1c06 100644 --- a/dist/rx.aggregates.min.js +++ b/dist/rx.aggregates.min.js @@ -1,3 +1,3 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b,c){return new p(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},d.onError.bind(d),function(){d.onNext(g),d.onCompleted()})})}function f(a){if(0===a.length)throw new Error(z);return a[0]}function g(a,b,c){return new p(function(d){var e=0,f=b.length;return a.subscribe(function(a){var g=!1;try{f>e&&(g=c(a,b[e++]))}catch(h){return void d.onError(h)}g||(d.onNext(!1),d.onCompleted())},d.onError.bind(d),function(){d.onNext(e===f),d.onCompleted()})})}function h(a,b,c,d){if(0>b)throw new Error(y);return new p(function(e){var f=b;return a.subscribe(function(a){0===f&&(e.onNext(a),e.onCompleted()),f--},e.onError.bind(e),function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(y))})})}function i(a,b,c){return new p(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(z))})})}function j(a,b,c){return new p(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},d.onError.bind(d),function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(z))})})}function k(a,b,c){return new p(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(z))})})}function l(a,b,c,e){return new p(function(f){var g=0;return a.subscribe(function(d){var h;try{h=b.call(c,d,g,a)}catch(i){return void f.onError(i)}h?(f.onNext(e?g:d),f.onCompleted()):g++},f.onError.bind(f),function(){f.onNext(e?-1:d),f.onCompleted()})})}var m=c.Observable,n=m.prototype,o=c.CompositeDisposable,p=c.AnonymousObservable,q=(c.internals.isEqual,c.helpers),r=q.not,s=q.defaultComparer,t=q.identity,u=q.defaultSubComparer,v=q.isFunction,w=q.isPromise,x=m.fromPromise,y="Argument out of range",z="Sequence contains no elements.";return n.finalValue=function(){var a=this;return new p(function(b){var c,d=!1;return a.subscribe(function(a){d=!0,c=a},b.onError.bind(b),function(){d?(b.onNext(c),b.onCompleted()):b.onError(new Error(z))})})},n.aggregate=function(){var a,b,c;return 2===arguments.length?(a=arguments[0],b=!0,c=arguments[1]):c=arguments[0],b?this.scan(a,c).startWith(a).finalValue():this.scan(c).finalValue()},n.reduce=function(a){var b,c;return 2===arguments.length&&(c=!0,b=arguments[1]),c?this.scan(b,a).startWith(b).finalValue():this.scan(a).finalValue()},n.some=n.any=function(a,b){var c=this;return a?c.where(a,b).any():new p(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},a.onError.bind(a),function(){a.onNext(!1),a.onCompleted()})})},n.isEmpty=function(){return this.any().map(r)},n.every=n.all=function(a,b){return this.where(function(b){return!a(b)},b).any().select(function(a){return!a})},n.contains=function(a,b){return b||(b=s),this.where(function(c){return b(c,a)}).any()},n.count=function(a,b){return a?this.where(a,b).count():this.aggregate(0,function(a){return a+1})},n.sum=function(a,b){return a&&v(a)?this.map(a,b).sum():this.aggregate(0,function(a,b){return a+b})},n.minBy=function(a,b){return b||(b=u),e(this,a,function(a,c){return-1*b(a,c)})},n.min=function(a){return this.minBy(t,a).select(function(a){return f(a)})},n.maxBy=function(a,b){return b||(b=u),e(this,a,b)},n.max=function(a){return this.maxBy(t,a).select(function(a){return f(a)})},n.average=function(a,b){return a?this.select(a,b).average():this.scan({sum:0,count:0},function(a,b){return{sum:a.sum+b,count:a.count+1}}).finalValue().select(function(a){if(0===a.count)throw new Error("The input sequence was empty");return a.sum/a.count})},n.sequenceEqual=function(a,b){var c=this;return b||(b=s),Array.isArray(a)?g(c,a,b):new p(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},d.onError.bind(d),function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});w(a)&&(a=x(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},d.onError.bind(d),function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new o(i,j)})},n.elementAt=function(a){return h(this,a,!1)},n.elementAtOrDefault=function(a,b){return h(this,a,!0,b)},n.single=function(a,b){return a&&v(a)?this.where(a,b).single():i(this,!1)},n.singleOrDefault=function(a,b,c){return a&&v(a)?this.where(a,c).singleOrDefault(null,b):i(this,!0,b)},n.first=function(a,b){return a?this.where(a,b).first():j(this,!1)},n.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):j(this,!0,b)},n.last=function(a,b){return a?this.where(a,b).last():k(this,!1)},n.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):k(this,!0,b)},n.find=function(a,b){return l(this,a,b,!1)},n.findIndex=function(a,b){return l(this,a,b,!0)},a.Set&&(n.toSet=function(){var b=this;return new p(function(c){var d=new a.Set;return b.subscribe(d.add.bind(d),c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})}),a.Map&&(n.toMap=function(b,c){var d=this;return new p(function(e){var f=new a.Map;return d.subscribe(function(a){var d;try{d=b(a)}catch(g){return void e.onError(g)}var h=a;if(c)try{h=c(a)}catch(g){return void e.onError(g)}f.set(d,h)},e.onError.bind(e),function(){e.onNext(f),e.onCompleted()})})}),c}); -//# sourceMappingURL=rx.aggregates.map \ No newline at end of file +//# sourceMappingURL=rx.aggregates.map diff --git a/dist/rx.all.compat.map b/dist/rx.all.compat.map index 5d6fa01cc..4f23e00bf 100644 --- a/dist/rx.all.compat.map +++ b/dist/rx.all.compat.map @@ -1 +1 @@ -{"version":3,"file":"rx.all.compat.min.js","sources":["rx.all.compat.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","numberIsFinite","root","isFinite","isIterable","o","$iterator$","sign","number","isNaN","toLength","len","Math","floor","abs","maxSafeInteger","isCallable","f","observableCatchHandler","source","handler","AnonymousObservable","observer","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","onNext","bind","exception","d","ex","onError","isPromise","observableFromPromise","onCompleted","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","concatAll","arrayIndexOfComparer","array","item","comparer","HashSet","set","flatMap","mergeObservable","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","sequenceContainsNoElements","sequenceEqualArray","equal","elementAtOrDefault","hasDefault","defaultValue","argumentOutOfRange","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","predicate","yieldIndex","shouldRun","toThunk","obj","ctx","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","promise","then","name","next","throw","val","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","relatedTarget","fromElement","toElement","c","charCode","keyChar","fromCharCode","createListener","element","addEventListener","disposableCreate","removeEventListener","attachEvent","innerHandler","detachEvent","createEventListener","el","eventName","disposables","CompositeDisposable","add","combineLatestSource","subject","values","hasValueAll","every","identity","apply","isDone","n","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","window","observableWindowWithBounaries","windowBoundaries","Subject","r","RefCountDisposable","addRef","observableWindowWithClosingSelector","createWindowClose","m","m1","windowClose","take","noop","enumerableWhile","condition","Enumerable","Enumerator","Pattern","patterns","Plan","expression","planCreateObserver","externalSubscriptions","observable","entry","get","JoinObserver","ActivePlan","joinObserverArray","joinObservers","Map","joinObserver","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","newValue","objectTypes","boolean","function","string","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","isScheduler","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","not","asArray","arguments","isFn","Symbol","iterator","Set","doneEnumerator","suportNodeClass","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","sources","prop","xs","getDisposable","Function","that","bound","F","concat","forEach","T","k","TypeError","O","kValue","boxedString","splitString","fun","split","thisp","filter","t","arg","indexOf","searchElement","Number","Infinity","compareTo","other","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","s","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediateScheduler","immediate","scheduleNow","currentThreadScheduler","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","_super","localNow","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","_next","_iterator","currentItem","currentValue","catchException","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_thisArg","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","Observable","_subscribe","subscriber","subscribeNext","subscribeError","subscribeCompleted","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","arr","createWithDisposable","defer","observableFactory","observableThrow","pow","from","iterable","mapFn","objIsIterable","it","observableFromArray","fromArray","generate","initialState","iterate","hasResult","observableNever","ofWithScheduler","never","range","observableReturn","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","combineLatest","unshift","j","falseFactory","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeAll","innerSubscription","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","doAction","tap","onNextFunc","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","refCountDisposable","createWindow","selectConcat","selectorResult","concatMapObserver","selectConcatObserver","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","handleError","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","select","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","finalValue","aggregate","reduce","some","any","isEmpty","all","contains","sum","prev","curr","minBy","min","maxBy","average","cur","sequenceEqual","donel","doner","ql","qr","subscription1","subscription2","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","toSet","toMap","spawn","isGenFun","exit","ret","gen","called","fan","hasCallback","denodify","cb","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasObservers","os","createRemovableDisposable","so","_trim","hasError","windowSize","MAX_VALUE","interval","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","isPrime","candidate","num1","sqrt","num2","getPrime","num","primes","stringHashFn","str","hash","character","charCodeAt","numberHashFn","c2","newEntry","hashCode","_initialize","freeCount","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","dictionaryProto","prime","buckets","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","clear","_findEntry","containskey","join","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","published","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","hasResults","ix","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","manySelect","chain","ChainObservable","g","head","tail","_keys","_values","and","thenDo","activate","deactivate","activePlan","jlen","removeActivePlan","addActivePlan","match","hasValues","firstValues","isCompleted","activePlans","JoinObserverPrototype","when","plans","outObserver","observableinterval","observableTimer","timer","periodOrScheduler","getTime","delay","throttle","hasvalue","windowWithTime","timeShiftOrScheduler","timeShift","createTimer","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","windowWithTimeOrCount","windowId","newId","newWindow","bufferWithTime","bufferWithTimeOrCount","timeInterval","span","sample","intervalOrSampler","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","timeSelector","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","delays","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","throttleWithSelector","throttleDurationSelector","currentid","skipLastWithTime","takeLastWithTime","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","exclusive","hasCurrent","exclusiveMap","VirtualTimeScheduler","notImplemented","toDateTimeOffset","clock","scheduleAbsoluteWithState","scheduleRelativeWithState","toRelative","initialClock","isEnabled","VirtualTimeSchedulerPrototype","runAt","getNext","stop","advanceTo","dueToClock","advanceBy","sleep","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,IAwElE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,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B,mBAAV2d,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvE19B,GAAK8O,GAAKA,GAEV2uB,OAAO,WACH,MAAO3uB,OAEJR,IAAeG,GAElBE,IACCF,GAAWF,QAAUO,IAAIA,GAAKA,GAEjCR,GAAYQ,GAAKA,GAInB9O,GAAK8O,GAAKA,KAGhBlT,KAAKf"} \ No newline at end of file +{"version":3,"file":"rx.all.compat.min.js","sources":["rx.all.compat.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","numberIsFinite","root","isFinite","isIterable","o","$iterator$","sign","number","isNaN","toLength","len","Math","floor","abs","maxSafeInteger","isCallable","f","observableCatchHandler","source","handler","AnonymousObservable","observer","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","onNext","bind","exception","d","ex","onError","isPromise","observableFromPromise","onCompleted","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","concatAll","arrayIndexOfComparer","array","item","comparer","HashSet","set","flatMap","mergeObservable","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","sequenceContainsNoElements","sequenceEqualArray","equal","elementAtOrDefault","hasDefault","defaultValue","argumentOutOfRange","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","predicate","yieldIndex","shouldRun","toThunk","obj","ctx","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","promise","then","name","next","throw","val","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","relatedTarget","fromElement","toElement","c","charCode","keyChar","fromCharCode","createListener","element","addEventListener","disposableCreate","removeEventListener","attachEvent","innerHandler","detachEvent","createEventListener","el","eventName","disposables","CompositeDisposable","add","combineLatestSource","subject","values","hasValueAll","every","identity","apply","isDone","n","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","window","observableWindowWithBounaries","windowBoundaries","Subject","r","RefCountDisposable","addRef","observableWindowWithClosingSelector","createWindowClose","m","m1","windowClose","take","noop","enumerableWhile","condition","Enumerable","Enumerator","Pattern","patterns","Plan","expression","planCreateObserver","externalSubscriptions","observable","entry","get","JoinObserver","ActivePlan","joinObserverArray","joinObservers","Map","joinObserver","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","newValue","objectTypes","boolean","function","string","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","isScheduler","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","not","asArray","arguments","isFn","Symbol","iterator","Set","doneEnumerator","suportNodeClass","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","sources","prop","xs","getDisposable","Function","that","bound","F","concat","forEach","T","k","TypeError","O","kValue","boxedString","splitString","fun","split","thisp","filter","t","arg","indexOf","searchElement","Number","Infinity","compareTo","other","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","s","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediateScheduler","immediate","scheduleNow","currentThreadScheduler","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","_super","localNow","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","_next","_iterator","currentItem","currentValue","catchException","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_thisArg","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","Observable","_subscribe","subscriber","subscribeNext","subscribeError","subscribeCompleted","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","arr","createWithDisposable","defer","observableFactory","observableThrow","pow","from","iterable","mapFn","objIsIterable","it","observableFromArray","fromArray","generate","initialState","iterate","hasResult","observableNever","ofWithScheduler","never","range","observableReturn","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","combineLatest","unshift","j","falseFactory","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeAll","innerSubscription","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","doAction","tap","onNextFunc","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","refCountDisposable","createWindow","selectConcat","selectorResult","concatMapObserver","selectConcatObserver","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","handleError","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","select","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","finalValue","aggregate","reduce","some","any","isEmpty","all","contains","sum","prev","curr","minBy","min","maxBy","average","cur","sequenceEqual","donel","doner","ql","qr","subscription1","subscription2","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","toSet","toMap","spawn","isGenFun","exit","ret","gen","called","fan","hasCallback","denodify","cb","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasObservers","os","createRemovableDisposable","so","_trim","hasError","windowSize","MAX_VALUE","interval","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","isPrime","candidate","num1","sqrt","num2","getPrime","num","primes","stringHashFn","str","hash","character","charCodeAt","numberHashFn","c2","newEntry","hashCode","_initialize","freeCount","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","dictionaryProto","prime","buckets","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","clear","_findEntry","containskey","join","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","published","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","hasResults","ix","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","manySelect","chain","ChainObservable","g","head","tail","_keys","_values","and","thenDo","activate","deactivate","activePlan","jlen","removeActivePlan","addActivePlan","match","hasValues","firstValues","isCompleted","activePlans","JoinObserverPrototype","when","plans","outObserver","observableinterval","observableTimer","timer","periodOrScheduler","getTime","delay","throttle","hasvalue","windowWithTime","timeShiftOrScheduler","timeShift","createTimer","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","windowWithTimeOrCount","windowId","newId","newWindow","bufferWithTime","bufferWithTimeOrCount","timeInterval","span","sample","intervalOrSampler","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","timeSelector","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","delays","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","throttleWithSelector","throttleDurationSelector","currentid","skipLastWithTime","takeLastWithTime","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","exclusive","hasCurrent","exclusiveMap","VirtualTimeScheduler","notImplemented","toDateTimeOffset","clock","scheduleAbsoluteWithState","scheduleRelativeWithState","toRelative","initialClock","isEnabled","VirtualTimeSchedulerPrototype","runAt","getNext","stop","advanceTo","dueToClock","advanceBy","sleep","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,IAwElE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MA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,KAAKuG,SAASO,OAAOzG,MAIlBqiC,GACPzd,GAEqB,mBAAV2d,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvE19B,GAAK8O,GAAKA,GAEV2uB,OAAO,WACH,MAAO3uB,OAEJR,IAAeG,GAElBE,IACCF,GAAWF,QAAUO,IAAIA,GAAKA,GAEjCR,GAAYQ,GAAKA,GAInB9O,GAAK8O,GAAKA,KAGhBlT,KAAKf"} diff --git a/dist/rx.all.compat.min.js b/dist/rx.all.compat.min.js index 32cbd5712..f9d41fb07 100644 --- a/dist/rx.all.compat.min.js +++ b/dist/rx.all.compat.min.js @@ -2,4 +2,4 @@ (function(a){function b(){if(this.isDisposed)throw new Error(xb)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;Ub.nonEnumArgs&&a.length&&h(a)&&(a=Wb.call(a));var d=Ub.enumPrototypes&&"function"==typeof a,e=Ub.enumErrorProps&&(a===Ob||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(Ub.nonEnumShadows&&a!==Pb){var g=a.constructor,i=-1,j=Sb.length;if(a===(g&&g.prototype))var k=a===stringProto?Kb:a===Ob?Fb:Lb.call(a),l=Tb[k];for(;++i-1:void 0});return c.pop(),d.pop(),result}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:Wb.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function n(a){return"number"==typeof a&&fb.isFinite(a)}function o(b){return b[yb]!==a}function p(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function q(a){var b=+a.length;return isNaN(b)?0:0!==b&&n(b)?(b=p(b)*Math.floor(Math.abs(b)),0>=b?0:b>Rc?Rc:b):b}function r(a){return"[object Function]"===Object.prototype.toString.call(a)&&"function"==typeof a}function s(a,b){return new vd(function(c){var d=new hc,e=new ic;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}sb(f)&&(f=Oc(f)),d=new hc,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function t(a,b){var c=this;return new vd(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function u(a,b,c){return a.map(function(a,d){var e=b.call(c,a,d);return sb(e)?Oc(e):e}).concatAll()}function v(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function w(a){this.comparer=a,this.set=[]}function x(a,b,c){return a.map(function(a,d){var e=b.call(c,a,d);return sb(e)?Oc(e):e}).mergeObservable()}function y(a,b,c){return new vd(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},d.onError.bind(d),function(){d.onNext(g),d.onCompleted()})})}function z(a){if(0===a.length)throw new Error(vb);return a[0]}function A(a,b,c){return new vd(function(d){var e=0,f=b.length;return a.subscribe(function(a){var g=!1;try{f>e&&(g=c(a,b[e++]))}catch(h){return void d.onError(h)}g||(d.onNext(!1),d.onCompleted())},d.onError.bind(d),function(){d.onNext(e===f),d.onCompleted()})})}function B(a,b,c,d){if(0>b)throw new Error(wb);return new vd(function(e){var f=b;return a.subscribe(function(a){0===f&&(e.onNext(a),e.onCompleted()),f--},e.onError.bind(e),function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(wb))})})}function C(a,b,c){return new vd(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(vb))})})}function D(a,b,c){return new vd(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},d.onError.bind(d),function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(vb))})})}function E(a,b,c){return new vd(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(vb))})})}function F(b,c,d,e){return new vd(function(f){var g=0;return b.subscribe(function(a){var h;try{h=c.call(d,a,g,b)}catch(i){return void f.onError(i)}h?(f.onNext(e?g:a),f.onCompleted()):g++},f.onError.bind(f),function(){f.onNext(e?-1:a),f.onCompleted()})})}function G(a,b){return Array.isArray(a)?H.call(b,a):K(a)?ad(a.call(b)):L(a)?ad(a):J(a)?observableToThunk(a):sb(a)?I(a):typeof a===_c?a:c(a)||Array.isArray(a)?H.call(b,a):a}function H(a){var b=this;return function(c){function d(a,d){if(!e)try{if(a=G(a,b),typeof a!==_c)return h[d]=a,--g||c(null,h);a.call(b,function(a,b){if(!e){if(a)return e=!0,c(a);h[d]=b,--g||c(null,h)}})}catch(f){e=!0,c(f)}}var e,f=Object.keys(a),g=f.length,h=new a.constructor;if(!g)return void vc.schedule(function(){c(null,h)});for(var i=0,j=f.length;j>i;i++)d(a[f[i]],f[i])}}function I(a){return function(b){a.then(function(a){b(null,a)},b)}}function J(a){return a&&a.prototype.subscribe===_c}function K(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function L(a){return a&&typeof a.next===_c&&typeof a.throw===_c}function c(a){return a&&a.constructor===Object}function M(a){var b=function(){this.cancelBubble=!0},c=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(a||(a=fb.event),!a.target)switch(a.target=a.target||a.srcElement,"mouseover"==a.type&&(a.relatedTarget=a.fromElement),"mouseout"==a.type&&(a.relatedTarget=a.toElement),a.stopPropagation||(a.stopPropagation=b,a.preventDefault=c),a.type){case"keypress":var d="charCode"in a?a.charCode:a.keyCode;10==d?(d=0,a.keyCode=13):13==d||27==d?d=0:3==d&&(d=99),a.charCode=d,a.keyChar=a.charCode?String.fromCharCode(a.charCode):""}return a}function N(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),fc(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(M(a))};return a.attachEvent("on"+b,d),fc(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,fc(function(){a["on"+b]=null})}function O(a,b,c){var d=new cc;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(O(a.item(e),b,c));else a&&d.add(N(a,b,c));return d}function P(a,b,c){return new vd(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(nb))){try{e=c.apply(null,j)}catch(f){return void d.onError(f)}d.onNext(e)}else i&&d.onCompleted()}var f=2,g=[!1,!1],h=!1,i=!1,j=new Array(f);return new cc(a.subscribe(function(a){e(a,0)},d.onError.bind(d),function(){i=!0,d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d)))})}function Q(a,b){return a.groupJoin(this,b,function(){return Qc()},function(a,b){return b})}function R(a){var b=this;return new vd(function(c){var d=new yd,e=new cc,f=new jc(e);return c.onNext(Zb(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),e.add(a.subscribe(function(){d.onCompleted(),d=new yd,c.onNext(Zb(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f})}function S(a){var b=this;return new vd(function(c){var d,e=new ic,f=new cc(e),g=new jc(f),h=new yd;return c.onNext(Zb(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d=function(){var b,f;try{f=a()}catch(i){return void c.onError(i)}b=new hc,e.setDisposable(b),b.setDisposable(f.take(1).subscribe(lb,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new yd,c.onNext(Zb(h,g)),d()}))},d(),g})}function T(b,c){return new Cc(function(){return new Bc(function(){return b()?{done:!1,value:c}:{done:!0,value:a}})})}function U(a){this.patterns=a}function V(a,b){this.expression=a,this.selector=b}function W(a,b,c){var d=a.get(b);if(!d){var e=new sd(b,c);return a.set(b,e),e}return d}function X(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new rd;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function Y(a,b){return new vd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function Z(a,b,c){return new vd(function(d){var e=0,f=a,g=mc(b);return c.scheduleRecursiveWithAbsolute(f,function(a){if(g>0){var b=c.now();f+=g,b>=f&&(f=b+g)}d.onNext(e++),a(f)})})}function $(a,b){return new vd(function(c){return b.scheduleWithRelative(mc(a),function(){c.onNext(0),c.onCompleted()})})}function _(a,b,c){return a===b?new vd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Pc(function(){return Z(c.now()+a,b,c)})}function ab(a,b,c){return new vd(function(d){var e,f=!1,g=new ic,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new hc,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new cc(e,g)})}function bb(a,b,c){return Pc(function(){return ab(a,b-c.now(),c)})}function db(a,b){return new vd(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new cc(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))})}var eb={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},fb=eb[typeof window]&&window||this,gb=eb[typeof exports]&&exports&&!exports.nodeType&&exports,hb=eb[typeof module]&&module&&!module.nodeType&&module,ib=hb&&hb.exports===gb&&gb,jb=eb[typeof global]&&global;!jb||jb.global!==jb&&jb.window!==jb||(fb=jb);var kb={internals:{},config:{Promise:fb.Promise},helpers:{}},lb=kb.helpers.noop=function(){},mb=(kb.helpers.notDefined=function(a){return"undefined"==typeof a},kb.helpers.isScheduler=function(a){return a instanceof kb.Scheduler}),nb=kb.helpers.identity=function(a){return a},ob=(kb.helpers.pluck=function(a){return function(b){return b[a]}},kb.helpers.just=function(a){return function(){return a}},kb.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),pb=kb.helpers.defaultComparer=function(a,b){return Vb(a,b)},qb=kb.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},rb=(kb.helpers.defaultKeySerializer=function(a){return a.toString()},kb.helpers.defaultError=function(a){throw a}),sb=kb.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},tb=(kb.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},kb.helpers.not=function(a){return!a}),ub=kb.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Lb.call(a)}),a}(),vb="Sequence contains no elements.",wb="Argument out of range",xb="Object has been disposed",yb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";fb.Set&&"function"==typeof(new fb.Set)["@@iterator"]&&(yb="@@iterator");var zb=kb.doneEnumerator={done:!0,value:a};kb.iterator=yb;var Ab,Bb="[object Arguments]",Cb="[object Array]",Db="[object Boolean]",Eb="[object Date]",Fb="[object Error]",Gb="[object Function]",Hb="[object Number]",Ib="[object Object]",Jb="[object RegExp]",Kb="[object String]",Lb=Object.prototype.toString,Mb=Object.prototype.hasOwnProperty,Nb=Lb.call(arguments)==Bb,Ob=Error.prototype,Pb=Object.prototype,Qb=Pb.propertyIsEnumerable;try{Ab=!(Lb.call(document)==Ib&&!({toString:0}+""))}catch(Rb){Ab=!0}var Sb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Tb={};Tb[Cb]=Tb[Eb]=Tb[Hb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Tb[Db]=Tb[Kb]={constructor:!0,toString:!0,valueOf:!0},Tb[Fb]=Tb[Gb]=Tb[Jb]={constructor:!0,toString:!0},Tb[Ib]={constructor:!0};var Ub={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Ub.enumErrorProps=Qb.call(Ob,"message")||Qb.call(Ob,"name"),Ub.enumPrototypes=Qb.call(a,"prototype"),Ub.nonEnumArgs=0!=c,Ub.nonEnumShadows=!/valueOf/.test(b)}(1),Nb||(h=function(a){return a&&"object"==typeof a?Mb.call(a,"callee"):!1});var Vb=kb.internals.isEqual=function(a,b){return i(a,b,[],[])},Wb=Array.prototype.slice,Xb=({}.hasOwnProperty,this.inherits=kb.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),Yb=kb.internals.addProperties=function(a){for(var b=Wb.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},Zb=kb.internals.addRef=function(a,b){return new vd(function(c){return new cc(b.getDisposable(),a.subscribe(c))})};Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Wb.call(arguments,1),d=function(){function e(){}if(this instanceof d){e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(Wb.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(Wb.call(arguments)))};return d}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if(null==this)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=0;f>d;){var g;d in e&&(g=e[d],a.call(c,g,d,e)),d++}});var $b=Object("a"),_b="a"!=$b[0]||!(0 in $b);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=_b&&{}.toString.call(this)==Kb?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=Gb)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=_b&&{}.toString.call(this)==Kb?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=Gb)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return{}.toString.call(a)==Cb}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!=d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var ac=kb.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},bc=ac.prototype;bc.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},bc.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},bc.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},dc.toArray=function(){return this.disposables.slice(0)};var ec=kb.Disposable=function(a){this.isDisposed=!1,this.action=a||lb};ec.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var fc=ec.create=function(a){return new ec(a)},gc=ec.empty={dispose:lb},hc=kb.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),ic=kb.SerialDisposable=hc,jc=kb.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?gc:new a(this)},b}();m.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var kc=kb.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||qb,this.disposable=new hc};kc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},kc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},kc.prototype.isCancelled=function(){return this.disposable.isDisposed},kc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var lc=kb.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),gc}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=ob,a.normalize=function(a){return 0>a&&(a=0),a},a}(),mc=lc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new cc,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),gc});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new cc,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),gc});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(lc.prototype),function(){lc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},lc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof fb.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=fb.setInterval(function(){d=c(d)},b);return fc(function(){fb.clearInterval(e)})}}(lc.prototype),function(a){a.catchError=a["catch"]=function(a){return new wc(this,a)}}(lc.prototype);var nc,oc=kb.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new hc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),pc=lc.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=mc(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new lc(ob,a,b,c)}(),qc=lc.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-lc.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+lc.normalize(c),g=new kc(this,b,d,f);if(e)e.enqueue(g);else{e=new ac(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new lc(ob,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),rc=lb,sc=function(){var a,b=lb;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!fb.setTimeout)throw new Error("No concurrency detected!");a=fb.setTimeout,b=fb.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),tc=sc.setTimeout,uc=sc.clearTimeout;!function(){function a(){if(!fb.postMessage||fb.importScripts)return!1;var a=!1,b=fb.onmessage;return fb.onmessage=function(){a=!0},fb.postMessage("","*"),fb.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(Lb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=jb&&ib&&jb.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=jb&&ib&&jb.clearImmediate)&&!c.test(e)&&e;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))nc=process.nextTick;else if("function"==typeof d)nc=d,rc=e;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;fb.addEventListener?fb.addEventListener("message",b,!1):fb.attachEvent("onmessage",b,!1),nc=function(a){var b=h++;g[b]=a,fb.postMessage(f+b,"*")}}else if(fb.MessageChannel){var i=new fb.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},nc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in fb&&"onreadystatechange"in fb.document.createElement("script")?nc=function(a){var b=fb.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},fb.document.documentElement.appendChild(b)}:(nc=function(a){return tc(a,0)},rc=uc)}();var vc=lc.timeout=function(){function a(a,b){var c=this,d=new hc,e=nc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new cc(d,fc(function(){rc(e)}))}function b(a,b,c){var d=this,e=lc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new hc,g=tc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new cc(f,fc(function(){uc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new lc(ob,a,b,c)}(),wc=function(a){function b(){return this._scheduler.now()}function c(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function d(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function e(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function f(f,g){this._scheduler=f,this._handler=g,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,b,c,d,e)}return Xb(f,a),f.prototype._clone=function(a){return new f(a,this._handler)},f.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return gc}}},f.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},f.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new hc;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},f}(lc),xc=kb.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return mb(a)||(a=pc),new vd(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),yc=xc.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new xc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),zc=xc.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new xc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Ac=xc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new xc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Bc=kb.internals.Enumerator=function(a){this._next=a};Bc.prototype.next=function(){return this._next()},Bc.prototype[yb]=function(){return this};var Cc=kb.internals.Enumerable=function(a){this._iterator=a};Cc.prototype[yb]=function(){return this._iterator()},Cc.prototype.concat=function(){var a=this;return new vd(function(b){var c;try{c=a[yb]()}catch(d){return void b.onError()}var e,f=new ic,g=pc.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;sb(h)&&(h=Oc(h));var i=new hc;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new cc(f,g,fc(function(){e=!0}))})},Cc.prototype.catchException=function(){var a=this;return new vd(function(b){var c;try{c=a[yb]()}catch(d){return void b.onError()}var e,f,g=new ic,h=pc.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;sb(i)&&(i=Oc(i));var j=new hc;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new cc(g,h,fc(function(){e=!0}))})};var Dc=Cc.repeat=function(a,b){return null==b&&(b=-1),new Cc(function(){var c=b;return new Bc(function(){return 0===c?zb:(c>0&&c--,{done:!1,value:a})})})},Ec=Cc.of=function(a,b,c){return b||(b=nb),new Cc(function(){var d=-1;return new Bc(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c; if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Ic),Mc=function(a){function b(){a.apply(this,arguments)}return Xb(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(Lc),Nc=kb.Observable=function(){function a(a){this._subscribe=a}return Hc=a.prototype,Hc.subscribe=Hc.forEach=function(a,b,c,d){var e="object"==typeof a?a:4===arguments.length?Gc(a,b,c,d):Gc(a,b,c);return this._subscribe(e)},Hc.subscribeNext=function(a,b){var c=2===arguments.length?Gc(a,null,null,b):Gc(a,null,null);return this._subscribe(c)},Hc.subscribeError=function(a,b){var c=2===arguments.length?Gc(null,a,null,b):Gc(null,a,null);return this._subscribe(c)},Hc.subscribeCompleted=function(a,b){var c=2===arguments.length?Gc(null,null,a,b):Gc(null,null,a);return this._subscribe(c)},a}();Hc.observeOn=function(a){var b=this;return new vd(function(c){return b.subscribe(new Mc(a,c))})},Hc.subscribeOn=function(a){var b=this;return new vd(function(c){var d=new hc,e=new ic;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new m(a,b.subscribe(c)))})),e})};var Oc=Nc.fromPromise=function(a){return Pc(function(){var b=new kb.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};Hc.toPromise=function(a){if(a||(a=kb.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Hc.toArray=function(){var a=this;return new vd(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},Nc.create=Nc.createWithDisposable=function(a){return new vd(a)};var Pc=Nc.defer=function(a){return new vd(function(b){var c;try{c=a()}catch(d){return Vc(d).subscribe(b)}return sb(c)&&(c=Oc(c)),c.subscribe(b)})},Qc=Nc.empty=function(a){return mb(a)||(a=pc),new vd(function(b){return a.schedule(function(){b.onCompleted()})})},Rc=Math.pow(2,53)-1;Nc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!r(b))throw new Error("mapFn when provided must be a function");return mb(d)||(d=qc),new vd(function(e){var f=Object(a),g=o(f),h=g?0:q(f),i=g?f[yb]():null,j=0;return d.scheduleRecursive(function(a){if(h>j||g){var d;if(g){var k=i.next();if(k.done)return void e.onCompleted();d=k.value}else d=f[j];if(b&&r(b))try{d=c?b.call(c,d,j):b(d,j)}catch(l){return void e.onError(l)}e.onNext(d),j++,a()}else e.onCompleted()})})};var Sc=Nc.fromArray=function(a,b){return mb(b)||(b=qc),new vd(function(c){var d=0,e=a.length;return b.scheduleRecursive(function(b){e>d?(c.onNext(a[d++]),b()):c.onCompleted()})})};Nc.generate=function(a,b,c,d,e){return mb(e)||(e=qc),new vd(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})},Nc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Sc(b)};var Tc=(Nc.ofWithScheduler=function(a){for(var b=arguments.length-1,c=new Array(b),d=0;b>d;d++)c[d]=arguments[d+1];return Sc(c,a)},Nc.never=function(){return new vd(function(){return gc})});Nc.range=function(a,b,c){return mb(c)||(c=qc),new vd(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},Nc.repeat=function(a,b,c){return mb(c)||(c=qc),Uc(a,c).repeat(null==b?-1:b)};var Uc=Nc["return"]=Nc.returnValue=Nc.just=function(a,b){return mb(b)||(b=pc),new vd(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})},Vc=Nc["throw"]=Nc.throwException=Nc.throwError=function(a,b){return mb(b)||(b=pc),new vd(function(c){return b.schedule(function(){c.onError(a)})})};Nc.using=function(a,b){return new vd(function(c){var d,e,f=gc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new cc(Vc(g).subscribe(c),f)}return new cc(e.subscribe(c),f)})},Hc.amb=function(a){var b=this;return new vd(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new hc,j=new hc;return sb(a)&&(a=Oc(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new cc(i,j)})},Nc.amb=function(){function a(a,b){return a.amb(b)}for(var b=Tc(),c=j(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},Hc["catch"]=Hc.catchException=function(a){return"function"==typeof a?s(this,a):Wc([this,a])};var Wc=Nc.catchException=Nc["catch"]=function(){return Ec(j(arguments,0)).catchException()};Hc.combineLatest=function(){var a=Wb.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),Xc.apply(this,a)};var Xc=Nc.combineLatest=function(){var a=Wb.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new vd(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(nb))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(nb)&&c.onCompleted()}function e(a){j[a]=!0,j.every(nb)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new hc;sb(f)&&(f=Oc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new cc(m)})};Hc.concat=function(){var a=Wb.call(arguments,0);return a.unshift(this),Yc.apply(this,a)};var Yc=Nc.concat=function(){return Ec(j(arguments,0)).concat()};Hc.concatObservable=Hc.concatAll=function(){return this.merge(1)},Hc.merge=function(a){if("number"!=typeof a)return Zc(this,a);var b=this;return new vd(function(c){function d(a){var b=new hc;f.add(b),sb(a)&&(a=Oc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new cc,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var Zc=Nc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=Wb.call(arguments,1)):(a=pc,b=Wb.call(arguments,0)):(a=pc,b=Wb.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),Sc(b,a).mergeObservable()};Hc.mergeObservable=Hc.mergeAll=function(){var a=this;return new vd(function(b){var c=new cc,d=!1,e=new hc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new hc;c.add(e),sb(a)&&(a=Oc(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},Hc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return $c([this,a])};var $c=Nc.onErrorResumeNext=function(){var a=j(arguments,0);return new vd(function(b){var c=0,d=new ic,e=pc.scheduleRecursive(function(e){var f,g;c0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(nb)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new hc;sb(c)&&(c=Oc(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new cc(j)})},Nc.zip=function(){var a=Wb.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},Nc.zipArray=function(){var a=j(arguments,0);return new vd(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(nb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(nb)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new hc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new cc(h);return j.add(fc(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},Hc.asObservable=function(){return new vd(this.subscribe.bind(this))},Hc.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},Hc.dematerialize=function(){var a=this;return new vd(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},Hc.distinctUntilChanged=function(a,b){var c=this;return a||(a=nb),b||(b=pb),new vd(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},Hc["do"]=Hc.doAction=Hc.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new vd(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b){try{b(c)}catch(d){a.onError(d)}a.onError(c)}else a.onError(c)},function(){if(c){try{c()}catch(b){a.onError(b)}a.onCompleted()}else a.onCompleted()})})},Hc["finally"]=Hc.finallyAction=function(a){var b=this;return new vd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return fc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},Hc.ignoreElements=function(){var a=this;return new vd(function(b){return a.subscribe(lb,b.onError.bind(b),b.onCompleted.bind(b))})},Hc.materialize=function(){var a=this;return new vd(function(b){return a.subscribe(function(a){b.onNext(yc(a))},function(a){b.onNext(zc(a)),b.onCompleted()},function(){b.onNext(Ac()),b.onCompleted()})})},Hc.repeat=function(a){return Dc(this,a).concat()},Hc.retry=function(a){return Dc(this,a).catchException()},Hc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new vd(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},Hc.skipLast=function(a){var b=this;return new vd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},Hc.startWith=function(){var a,b,c=0;return arguments.length&&mb(arguments[0])?(b=arguments[0],c=1):b=pc,a=Wb.call(arguments,c),Ec([Sc(a,b),this]).concat()},Hc.takeLast=function(a){var b=this;return new vd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},Hc.takeLastBuffer=function(a){var b=this;return new vd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},Hc.windowWithCount=function(a,b){var c=this;if(0>=a)throw new Error(wb);if(1===arguments.length&&(b=a),0>=b)throw new Error(wb);return new vd(function(d){var e=new hc,f=new jc(e),g=0,h=[],i=function(){var a=new yd;h.push(a),d.onNext(Zb(a,f))};return i(),e.setDisposable(c.subscribe(function(c){for(var d,e=0,f=h.length;f>e;e++)h[e].onNext(c);var j=g-a+1;j>=0&&j%b===0&&(d=h.shift(),d.onCompleted()),g++,g%b===0&&i()},function(a){for(;h.length>0;)h.shift().onError(a);d.onError(a)},function(){for(;h.length>0;)h.shift().onCompleted();d.onCompleted()})),f})},Hc.selectConcat=Hc.concatMap=function(a,b,c){return b?this.concatMap(function(c,d){var e=a(c,d),f=sb(e)?Oc(e):e;return f.map(function(a){return b(c,a,d)})}):"function"==typeof a?u(this,a,c):u(this,function(){return a})},Hc.concatMapObserver=Hc.selectConcatObserver=function(a,b,c,d){var e=this;return new vd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}sb(c)&&(c=Oc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}sb(c)&&(c=Oc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}sb(a)&&(a=Oc(a)),f.onNext(a),f.onCompleted()})}).concatAll()},Hc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new vd(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},a.onError.bind(a),function(){d||a.onNext(b),a.onCompleted()})})},w.prototype.push=function(a){var b=-1===v(this.set,a,this.comparer);return b&&this.set.push(a),b},Hc.distinct=function(a,b){var c=this;return b||(b=pb),new vd(function(d){var e=new w(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},d.onError.bind(d),d.onCompleted.bind(d))})},Hc.groupBy=function(a,b,c){return this.groupByUntil(a,b,Tc,c)},Hc.groupByUntil=function(a,b,c,d){var e=this;return b||(b=nb),d||(d=pb),new vd(function(f){function g(a){return function(b){b.onError(a)}}var h=new od(0,d),i=new cc,j=new jc(i);return i.add(e.subscribe(function(d){var e;try{e=a(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}var l=!1,m=h.tryGetValue(e);if(m||(m=new yd,h.set(e,m),l=!0),l){var n=new xd(e,m,j),o=new xd(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new hc;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(lb,function(a){h.getValues().forEach(g(a)),f.onError(a)},q))}var r;try{r=b(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}m.onNext(r)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),j})},Hc.select=Hc.map=function(a,b){var c=this;return new vd(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Hc.pluck=function(a){return this.map(function(b){return b[a]})},Hc.selectMany=Hc.flatMap=function(a,b,c){return b?this.flatMap(function(c,d){var e=a(c,d),f=sb(e)?Oc(e):e;return f.map(function(a){return b(c,a,d)})},c):"function"==typeof a?x(this,a,c):x(this,function(){return a})},Hc.flatMapObserver=Hc.selectManyObserver=function(a,b,c,d){var e=this;return new vd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}sb(c)&&(c=Oc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}sb(c)&&(c=Oc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}sb(a)&&(a=Oc(a)),f.onNext(a),f.onCompleted()})}).mergeAll()},Hc.selectSwitch=Hc.flatMapLatest=Hc.switchMap=function(a,b){return this.select(a,b).switchLatest()},Hc.skip=function(a){if(0>a)throw new Error(wb);var b=this;return new vd(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},Hc.skipWhile=function(a,b){var c=this;return new vd(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Hc.take=function(a,b){if(0>a)throw new RangeError(wb);if(0===a)return Qc(b);var c=this;return new vd(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},Hc.takeWhile=function(a,b){var c=this;return new vd(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},Hc.where=Hc.filter=function(a,b){var c=this;return new vd(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},Hc.finalValue=function(){var a=this;return new vd(function(b){var c,d=!1;return a.subscribe(function(a){d=!0,c=a},b.onError.bind(b),function(){d?(b.onNext(c),b.onCompleted()):b.onError(new Error(vb))})})},Hc.aggregate=function(){var a,b,c;return 2===arguments.length?(a=arguments[0],b=!0,c=arguments[1]):c=arguments[0],b?this.scan(a,c).startWith(a).finalValue():this.scan(c).finalValue()},Hc.reduce=function(a){var b,c;return 2===arguments.length&&(c=!0,b=arguments[1]),c?this.scan(b,a).startWith(b).finalValue():this.scan(a).finalValue()},Hc.some=Hc.any=function(a,b){var c=this;return a?c.where(a,b).any():new vd(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},a.onError.bind(a),function(){a.onNext(!1),a.onCompleted()})})},Hc.isEmpty=function(){return this.any().map(tb)},Hc.every=Hc.all=function(a,b){return this.where(function(b){return!a(b)},b).any().select(function(a){return!a})},Hc.contains=function(a,b){return b||(b=pb),this.where(function(c){return b(c,a)}).any()},Hc.count=function(a,b){return a?this.where(a,b).count():this.aggregate(0,function(a){return a+1})},Hc.sum=function(a,b){return a&&ub(a)?this.map(a,b).sum():this.aggregate(0,function(a,b){return a+b})},Hc.minBy=function(a,b){return b||(b=qb),y(this,a,function(a,c){return-1*b(a,c)})},Hc.min=function(a){return this.minBy(nb,a).select(function(a){return z(a)})},Hc.maxBy=function(a,b){return b||(b=qb),y(this,a,b)},Hc.max=function(a){return this.maxBy(nb,a).select(function(a){return z(a)})},Hc.average=function(a,b){return a?this.select(a,b).average():this.scan({sum:0,count:0},function(a,b){return{sum:a.sum+b,count:a.count+1}}).finalValue().select(function(a){if(0===a.count)throw new Error("The input sequence was empty");return a.sum/a.count})},Hc.sequenceEqual=function(a,b){var c=this;return b||(b=pb),Array.isArray(a)?A(c,a,b):new vd(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},d.onError.bind(d),function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});sb(a)&&(a=Oc(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},d.onError.bind(d),function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new cc(i,j)})},Hc.elementAt=function(a){return B(this,a,!1)},Hc.elementAtOrDefault=function(a,b){return B(this,a,!0,b)},Hc.single=function(a,b){return a&&ub(a)?this.where(a,b).single():C(this,!1)},Hc.singleOrDefault=function(a,b,c){return a&&ub(a)?this.where(a,c).singleOrDefault(null,b):C(this,!0,b)},Hc.first=function(a,b){return a?this.where(a,b).first():D(this,!1)},Hc.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):D(this,!0,b)},Hc.last=function(a,b){return a?this.where(a,b).last():E(this,!1)},Hc.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):E(this,!0,b)},Hc.find=function(a,b){return F(this,a,b,!1)},Hc.findIndex=function(a,b){return F(this,a,b,!0)},fb.Set&&(Hc.toSet=function(){var a=this;return new vd(function(b){var c=new fb.Set;return a.subscribe(c.add.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})}),fb.Map&&(Hc.toMap=function(a,b){var c=this;return new vd(function(d){var e=new fb.Map;return c.subscribe(function(c){var f;try{f=a(c)}catch(g){return void d.onError(g)}var h=c;if(b)try{h=b(c)}catch(g){return void d.onError(g)}e.set(f,h)},d.onError.bind(d),function(){d.onNext(e),d.onCompleted()})})});var _c="function",ad=kb.spawn=function(a){var b=K(a);return function(c){function d(a,b){vc.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2&&(b=Wb.call(arguments,1)),a)try{c=g.throw(a)}catch(h){return d(h)}if(!a)try{c=g.next(b)}catch(h){return d(h)}if(c.done)return d(null,c.value);if(c.value=G(c.value,f),typeof c.value!==_c)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var i=!1;try{c.value.call(f,function(){i||(i=!0,e.apply(f,arguments))})}catch(h){vc.schedule(function(){i||(i=!0,e.call(f,h))})}}}var f=this,g=fan;if(b){var h=Wb.call(arguments),i=h.length,j=i&&typeof h[i-1]===_c;c=j?h.pop():error,g=a.apply(this,h)}else c=c||error;e()}};kb.denodify=function(a){return function(){var b,c,d,e=Wb.call(arguments);return e.push(function(){b=arguments,d&&!c&&(c=!0,cb.apply(this,b))}),a.apply(this,e),function(a){d=a,b&&!c&&(c=!0,a.apply(this,b))}}},Nc.start=function(a,b,c){return bd(a,b,c)()};var bd=Nc.toAsync=function(a,b,c){return mb(c)||(c=vc),function(){var d=arguments,e=new zd;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};Nc.fromCallback=function(a,b,c){return function(){var d=Wb.call(arguments,0);return new vd(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Nc.fromNodeCallback=function(a,b,c){return function(){var d=Wb.call(arguments,0);return new vd(function(e){function f(a){if(a)return void e.onError(a);var b=Wb.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},kb.config.useNativeEvents=!1;var cd=fb.angular&&angular.element?angular.element:fb.jQuery?fb.jQuery:fb.Zepto?fb.Zepto:null,dd=!!fb.Ember&&"function"==typeof fb.Ember.addListener,ed=!!fb.Backbone&&!!fb.Backbone.Marionette;Nc.fromEvent=function(a,b,c){if(a.addListener)return fd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!kb.config.useNativeEvents){if(ed)return fd(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(dd)return fd(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c);if(cd){var d=cd(a);return fd(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}}return new vd(function(d){return O(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var fd=Nc.fromEventPattern=function(a,b,c){return new vd(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return fc(function(){b&&b(e,f)})}).publish().refCount()};Nc.startAsync=function(a){var b;try{b=a()}catch(c){return Vc(c)}return Oc(b)};var gd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=gc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=gc)});return new cc(c,d,e)}function c(c,d){this.source=c,this.controller=new yd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return Xb(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Nc);Hc.pausable=function(a){return new gd(this,a)};var hd=function(b){function c(b){var c,d=[],e=P(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new yd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c)}return Xb(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Nc);Hc.pausableBuffered=function(a){return new hd(this,a)},Hc.controlled=function(a){return null==a&&(a=!0),new id(this,a)};var id=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new jd(d),this.source=c.multicast(this.subject).refCount()}return Xb(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Nc),jd=kb.ControlledSubject=function(a){function c(a){return this.subject.subscribe(a)}function d(b){null==b&&(b=!0),a.call(this,c),this.subject=new yd,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=gc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=gc}return Xb(d,a),Yb(d.prototype,Fc,{onCompleted:function(){b.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){b.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){b.call(this);var c=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),c=!0),c&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=gc):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=gc),{numberOfItems:a,returnValue:!1}},request:function(a){b.call(this),this.disposeCurrentRequest();var c=this,d=this._processRequest(a);return a=d.numberOfItems,d.returnValue?gc:(this.requestedCount=a,this.requestedDisposable=fc(function(){c.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=gc},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),d}(Nc);Hc.multicast=function(a,b){var c=this;return"function"==typeof a?new vd(function(d){var e=c.multicast(a());return new cc(b(e).subscribe(d),e.connect())}):new nd(c,a)},Hc.publish=function(a){return a&&ub(a)?this.multicast(function(){return new yd},a):this.multicast(new yd)},Hc.share=function(){return this.publish().refCount()},Hc.publishLast=function(a){return a&&ub(a)?this.multicast(function(){return new zd},a):this.multicast(new zd)},Hc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new ld(b)},a):this.multicast(new ld(a))},Hc.shareValue=function(a){return this.publishValue(a).refCount()},Hc.replay=function(a,b,c,d){return a&&ub(a)?this.multicast(function(){return new md(b,c,d)},a):this.multicast(new md(b,c,d))},Hc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var kd=function(a,b){this.subject=a,this.observer=b};kd.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var ld=kb.BehaviorSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new kd(this,a);var c=this.exception;return c?a.onError(c):a.onCompleted(),gc}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return Xb(d,a),Yb(d.prototype,Fc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=this.observers.slice(0),d=c.length;d>a;a++)c[a].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped){this.value=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(Nc),md=kb.ReplaySubject=function(a){function c(a,b){return fc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var d=new Lc(this.scheduler,a),e=c(this,d);b.call(this),this._trim(this.scheduler.now()),this.observers.push(d);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)d.onNext(this.q[g].value);return this.hasError?(f++,d.onError(this.error)):this.isStopped&&(f++,d.onCompleted()),d.ensureActive(f),e}function e(b,c,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=e||qc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}return Xb(e,a),Yb(e.prototype,Fc,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b.call(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++){var f=c[d];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(Nc),nd=kb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new cc(f.subscribe(c),fc(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c)) }return Xb(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new vd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Nc),od=function(){function b(a){if(a&!1)return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function c(a){var c,d,e;for(c=0;c=a)return d;for(e=1|a;ec;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||pb,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return d(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return d(b.toString());if("function"==typeof b.valueOf){var c=b.valueOf();if("number"==typeof c)return e(c);if("string"==typeof b)return d(c)}if(b.getHashCode)return b.getHashCode();var f=17*a++;return b.getHashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var b,d=c(a);for(this.buckets=new Array(d),this.entries=new Array(d),b=0;d>b;b++)this.buckets[b]=-1,this.entries[b]=f();this.freeList=-1},l.add=function(a,b){return this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=c(2*this.size),b=new Array(a);for(e=0;ee;++e)d[e]=f();for(var g=0;g=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(b){var c=this._findEntry(b);return c>=0?this.entries[c].value:a},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();Hc.join=function(a,b,c,d){var e=this;return new vd(function(f){var g=new cc,h=!1,i=!1,j=0,k=0,l=new od,m=new od;return g.add(e.subscribe(function(a){var c=j++,e=new hc;l.add(c,a),g.add(e);var i,k=function(){l.remove(c)&&0===l.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(n){return void f.onError(n)}e.setDisposable(i.take(1).subscribe(lb,f.onError.bind(f),k)),m.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(i||0===l.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=k++,e=new hc;m.add(b,a),g.add(e);var h,j=function(){m.remove(b)&&0===m.count()&&i&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(n){return void f.onError(n)}e.setDisposable(h.take(1).subscribe(lb,f.onError.bind(f),j)),l.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){i=!0,(h||0===m.count())&&f.onCompleted()})),g})},Hc.groupJoin=function(a,b,c,d){var e=this;return new vd(function(f){function g(a){return function(b){b.onError(a)}}var h=new cc,i=new jc(h),j=new od,k=new od,l=0,m=0;return h.add(e.subscribe(function(a){var c=new yd,e=l++;j.add(e,c);var m;try{m=d(a,Zb(c,i))}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}f.onNext(m),k.getValues().forEach(function(a){c.onNext(a)});var o=new hc;h.add(o);var p,q=function(){j.remove(e)&&c.onCompleted(),h.remove(o)};try{p=b(a)}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}o.setDisposable(p.take(1).subscribe(lb,function(a){j.getValues().forEach(g(a)),f.onError(a)},q))},function(a){j.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=m++;k.add(b,a);var d=new hc;h.add(d);var e,i=function(){k.remove(b),h.remove(d)};try{e=c(a)}catch(l){return j.getValues().forEach(g(l)),void f.onError(l)}d.setDisposable(e.take(1).subscribe(lb,function(a){j.getValues().forEach(g(a)),f.onError(a)},i)),j.getValues().forEach(function(b){b.onNext(a)})},function(a){j.getValues().forEach(g(a)),f.onError(a)})),i})},Hc.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},Hc.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?R.call(this,a):"function"==typeof a?S.call(this,a):Q.call(this,a,b)},Hc.pairwise=function(){var a=this;return new vd(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))})},Hc.partition=function(a,b){var c=this.publish().refCount();return[c.filter(a,b),c.filter(function(c,d,e){return!a.call(b,c,d,e)})]},Hc.letBind=Hc.let=function(a){return a(this)},Nc["if"]=Nc.ifThen=function(a,b,c){return Pc(function(){return c||(c=Qc()),sb(b)&&(b=Oc(b)),sb(c)&&(c=Oc(c)),"function"==typeof c.now&&(c=Qc(c)),a()?b:c})},Nc["for"]=Nc.forIn=function(a,b,c){return Ec(a,b,c).concat()};var pd=Nc["while"]=Nc.whileDo=function(a,b){return sb(b)&&(b=Oc(b)),T(a,b).concat()};Hc.doWhile=function(a){return Yc([this,pd(a,this)])},Nc["case"]=Nc.switchCase=function(a,b,c){return Pc(function(){sb(c)&&(c=Oc(c)),c||(c=Qc()),"function"==typeof c.now&&(c=Qc(c));var d=b[a()];return sb(d)&&(d=Oc(d)),d||c})},Hc.expand=function(a,b){mb(b)||(b=pc);var c=this;return new vd(function(d){var e=[],f=new ic,g=new cc(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new hc;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g})},Nc.forkJoin=function(){var a=j(arguments,0);return new vd(function(b){var c=a.length;if(0===c)return b.onCompleted(),gc;for(var d=new cc,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];sb(j)&&(j=Oc(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},Hc.forkJoin=function(a,b){var c=this;return new vd(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new hc,l=new hc;return sb(a)&&(a=Oc(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new cc(k,l)})},Hc.manySelect=function(a,b){mb(b)||(b=pc);var c=this;return Pc(function(){var d;return c.map(function(a){var b=new qd(a);return d&&d.onNext(a),d=b,b}).tap(lb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)})};var qd=function(a){function b(a){var b=this,c=new cc;return c.add(qc.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeObservable().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new zd}return Xb(c,a),Yb(c.prototype,Fc,{onCompleted:function(){this.onNext(Nc.empty())},onError:function(a){this.onNext(Nc.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(Nc),rd=fb.Map||function(){function b(){this._keys=[],this._values=[]}return b.prototype.get=function(b){var c=this._keys.indexOf(b);return-1!==c?this._values[c]:a},b.prototype.set=function(a,b){var c=this._keys.indexOf(a);-1!==c&&(this._values[c]=b),this._values[this._keys.push(a)-1]=b},b.prototype.forEach=function(a,b){for(var c=0,d=this._keys.length;d>c;c++)a.call(b,this._values[c],this._keys[c])},b}();U.prototype.and=function(a){return new U(this.patterns.concat(a))},U.prototype.thenDo=function(a){return new V(this,a)},V.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(W(a,this.expression.patterns[f],b.onError.bind(b)));var h=new X(e,function(){var a;try{a=d.selector.apply(d,arguments)}catch(c){return void b.onError(c)}b.onNext(a)},function(){for(var a=0,b=e.length;b>a;a++)e[a].removeActivePlan(h);c(h)});for(f=0,g=e.length;g>f;f++)e[f].addActivePlan(h);return h},X.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},X.prototype.match=function(){var a,b,c=!0;for(a=0,b=this.joinObserverArray.length;b>a;a++)if(0===this.joinObserverArray[a].queue.length){c=!1;break}if(c){var d=[],e=!1;for(a=0,b=this.joinObserverArray.length;b>a;a++)d.push(this.joinObserverArray[a].queue[0]),"C"===this.joinObserverArray[a].queue[0].kind&&(e=!0);if(e)this.onCompleted();else{this.dequeue();var f=[];for(a=0,b=d.length;ac;c++)b[c].match()}},c.error=lb,c.completed=lb,c.addActivePlan=function(a){this.activePlans.push(a)},c.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},c.removeActivePlan=function(a){this.activePlans.splice(this.activePlans.indexOf(a),1),0===this.activePlans.length&&this.dispose()},c.dispose=function(){a.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},b}(Ic);Hc.and=function(a){return new U([this,a])},Hc.thenDo=function(a){return new U([this]).thenDo(a)},Nc.when=function(){var a=j(arguments,0);return new vd(function(b){var c=[],d=new rd,e=Gc(b.onNext.bind(b),function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},b.onCompleted.bind(b));try{for(var f=0,g=a.length;g>f;f++)c.push(a[f].activate(d,e,function(a){var d=c.indexOf(a);c.splice(d,1),0===c.length&&b.onCompleted()}))}catch(h){Vc(h).subscribe(b)}var i=new cc;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};var td=Nc.interval=function(a,b){return _(a,a,mb(b)?b:vc)},ud=Nc.timer=function(b,c,d){var e;return mb(d)||(d=vc),c!==a&&"number"==typeof c?e=c:mb(c)&&(d=c),b instanceof Date&&e===a?Y(b.getTime(),d):b instanceof Date&&e!==a?(e=c,Z(b.getTime(),e,d)):e===a?$(b,d):_(b,e,d)};Hc.delay=function(a,b){return mb(b)||(b=vc),a instanceof Date?bb(this,a.getTime(),b):ab(this,a,b)},Hc.throttle=function(a,b){mb(b)||(b=vc);var c=this;return new vd(function(d){var e,f=new ic,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new hc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new cc(i,f)})},Hc.windowWithTime=function(b,c,d){var e,f=this;return c===a&&(e=b),mb(d)||(d=vc),"number"==typeof c?e=c:mb(c)&&(e=b,d=c),new vd(function(a){function c(){var b=new hc,f=!1,g=!1;l.setDisposable(b),j===i?(f=!0,g=!0):i>j?f=!0:g=!0;var n=f?j:i,o=n-m;m=n,f&&(j+=e),g&&(i+=e),b.setDisposable(d.scheduleWithRelative(o,function(){var b;g&&(b=new yd,k.push(b),a.onNext(Zb(b,h))),f&&(b=k.shift(),b.onCompleted()),c()}))}var g,h,i=e,j=b,k=[],l=new ic,m=0;return g=new cc(l),h=new jc(g),k.push(new yd),a.onNext(Zb(k[0],h)),c(),g.add(f.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(b){for(var c=0,d=k.length;d>c;c++)k[c].onError(b);a.onError(b)},function(){for(var b=0,c=k.length;c>b;b++)k[b].onCompleted();a.onCompleted()})),h})},Hc.windowWithTimeOrCount=function(a,b,c){var d=this;return mb(c)||(c=vc),new vd(function(e){var f,g,h,i,j=0,k=new ic,l=0;return g=new cc(k),h=new jc(g),f=function(b){var d=new hc;k.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){var a;b===l&&(j=0,a=++l,i.onCompleted(),i=new yd,e.onNext(Zb(i,h)),f(a))}))},i=new yd,e.onNext(Zb(i,h)),f(0),g.add(d.subscribe(function(a){var c=0,d=!1;i.onNext(a),j++,j===b&&(d=!0,j=0,c=++l,i.onCompleted(),i=new yd,e.onNext(Zb(i,h))),d&&f(c)},function(a){i.onError(a),e.onError(a)},function(){i.onCompleted(),e.onCompleted()})),h})},Hc.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},Hc.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},Hc.timeInterval=function(a){var b=this;return mb(a)||(a=vc),Pc(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},Hc.timestamp=function(a){return mb(a)||(a=vc),this.map(function(b){return{value:b,timestamp:a.now()}})},Hc.sample=function(a,b){return mb(b)||(b=vc),"number"==typeof a?db(this,td(a,b)):db(this,a)},Hc.timeout=function(a,b,c){b||(b=Vc(new Error("Timeout"))),mb(c)||(c=vc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new vd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(sb(b)&&(b=Oc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new hc,j=new ic,k=!1,l=new ic;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new cc(j,l)})},Nc.generateWithAbsoluteTime=function(a,b,c,d,e,f){return mb(f)||(f=vc),new vd(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithAbsolute(f.now(),function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},Nc.generateWithRelativeTime=function(a,b,c,d,e,f){return mb(f)||(f=vc),new vd(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithRelative(0,function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},Hc.delaySubscription=function(a,b){return this.delayWithSelector(ud(a,mb(b)?b:vc),Qc)},Hc.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new vd(function(a){var b=new cc,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new ic,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new hc;b.add(h),h.setDisposable(e.subscribe(function(){a.onNext(c),b.remove(h),g()},a.onError.bind(a),function(){a.onNext(c),b.remove(h),g()}))},a.onError.bind(a),function(){f=!0,h.dispose(),g()}))};return c?h.setDisposable(c.subscribe(function(){i()},a.onError.bind(a),function(){i()})):i(),new cc(h,b)})},Hc.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=Tc()),c||(c=Vc(new Error("Timeout")));var d=this;return new vd(function(e){function f(a){function b(){return k===d}var d=k,f=new hc;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(c.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(c.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new ic,i=new ic,j=new hc;h.setDisposable(j);var k=0,l=!1;return f(a),j.setDisposable(d.subscribe(function(a){if(g()){e.onNext(a);var c;try{c=b(a)}catch(d){return void e.onError(d)}f(sb(c)?Oc(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new cc(h,i)})},Hc.throttleWithSelector=function(a){var b=this;return new vd(function(c){var d,e=!1,f=new ic,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}sb(h)&&(h=Oc(h)),e=!0,d=b,g++;var j=g,k=new hc;f.setDisposable(k),k.setDisposable(h.subscribe(function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()},c.onError.bind(c),function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new cc(h,f)})},Hc.skipLastWithTime=function(a,b){mb(b)||(b=vc);var c=this;return new vd(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},d.onError.bind(d),function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})})},Hc.takeLastWithTime=function(a,b){var c=this;return mb(b)||(b=vc),new vd(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})})},Hc.takeLastBufferWithTime=function(a,b){var c=this;return mb(b)||(b=vc),new vd(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})})},Hc.takeWithTime=function(a,b){var c=this;return mb(b)||(b=vc),new vd(function(d){return new cc(b.scheduleWithRelative(a,d.onCompleted.bind(d)),c.subscribe(d))})},Hc.skipWithTime=function(a,b){var c=this;return mb(b)||(b=vc),new vd(function(d){var e=!1;return new cc(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))})},Hc.skipUntilWithTime=function(a,b){mb(b)||(b=vc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new vd(function(e){var f=!1;return new cc(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},e.onError.bind(e),e.onCompleted.bind(e)))})},Hc.takeUntilWithTime=function(a,b){mb(b)||(b=vc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new vd(function(e){return new cc(b[d](a,e.onCompleted.bind(e)),c.subscribe(e))})},Hc.exclusive=function(){var a=this;return new vd(function(b){var c=!1,d=!1,e=new hc,f=new cc;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,sb(a)&&(a=Oc(a));var e=new hc;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f})},Hc.exclusiveMap=function(a,b){var c=this;return new vd(function(d){var e=0,f=!1,g=!0,h=new hc,i=new cc;return i.add(h),h.setDisposable(c.subscribe(function(c){f||(f=!0,innerSubscription=new hc,i.add(innerSubscription),sb(c)&&(c=Oc(c)),innerSubscription.setDisposable(c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),function(){i.remove(innerSubscription),f=!1,g&&1===i.length&&d.onCompleted()})))},d.onError.bind(d),function(){g=!0,1!==i.length||f||d.onCompleted()})),i})},kb.VirtualTimeScheduler=function(a){function b(){throw new Error("Not implemented")}function c(){return this.toDateTimeOffset(this.clock)}function d(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function e(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function f(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function g(a,b){return b(),gc}function h(b,g){this.clock=b,this.comparer=g,this.isEnabled=!1,this.queue=new ac(1024),a.call(this,c,d,e,f)}Xb(h,a);var i=h.prototype;return i.add=b,i.toDateTimeOffset=b,i.toRelative=b,i.schedulePeriodicWithState=function(a,b,c){var d=new oc(this,a,b,c);return d.start()},i.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},i.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,g)},i.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},i.stop=function(){this.isEnabled=!1},i.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Error(wb);if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},i.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Error(wb);0!==c&&this.advanceTo(b)},i.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Error(wb);this.clock=b},i.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},i.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,g)},i.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(f),c(a,b)}var e=this,f=new kc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},h}(lc),kb.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||qb;a.call(this,d,e)}Xb(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(kb.VirtualTimeScheduler);var vd=kb.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?fc(a):gc}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new wd(a);return qc.scheduleRequired()?qc.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return Xb(c,a),c}(Nc),wd=function(a){function b(b){a.call(this),this.observer=b,this.m=new hc}Xb(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Ic),xd=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new vd(function(a){return new cc(e.getDisposable(),d.subscribe(a))}):d}return Xb(c,a),c}(Nc),yd=kb.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),gc):(a.onCompleted(),gc):(this.observers.push(a),new kd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return Xb(d,a),Yb(d.prototype,Fc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Ad(a,b)},d}(Nc),zd=kb.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new kd(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),gc}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return Xb(d,a),Yb(d.prototype,Fc,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Nc),Ad=kb.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return Xb(b,a),Yb(b.prototype,Fc,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(Nc);"function"==typeof define&&"object"==typeof define.amd&&define.amd?(fb.Rx=kb,define(function(){return kb})):gb&&hb?ib?(hb.exports=kb).Rx=kb:gb.Rx=kb:fb.Rx=kb}).call(this); -//# sourceMappingURL=rx.all.compat.map \ No newline at end of file +//# sourceMappingURL=rx.all.compat.map diff --git a/dist/rx.all.map b/dist/rx.all.map index dd15119f2..458fe4630 100644 --- a/dist/rx.all.map +++ b/dist/rx.all.map @@ -1 +1 @@ -{"version":3,"file":"rx.all.min.js","sources":["rx.all.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","numberIsFinite","root","isFinite","isIterable","o","$iterator$","sign","number","isNaN","toLength","len","Math","floor","abs","maxSafeInteger","isCallable","f","observableCatchHandler","source","handler","AnonymousObservable","observer","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","onNext","bind","exception","d","ex","onError","isPromise","observableFromPromise","onCompleted","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","concatAll","arrayIndexOfComparer","array","item","comparer","HashSet","set","flatMap","mergeObservable","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","sequenceContainsNoElements","sequenceEqualArray","equal","elementAtOrDefault","hasDefault","defaultValue","argumentOutOfRange","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","predicate","yieldIndex","shouldRun","toThunk","obj","ctx","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","promise","then","name","next","throw","val","createListener","element","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","combineLatestSource","subject","values","hasValueAll","every","identity","apply","isDone","n","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","window","observableWindowWithBounaries","windowBoundaries","Subject","r","RefCountDisposable","addRef","observableWindowWithClosingSelector","createWindowClose","m","m1","windowClose","take","noop","enumerableWhile","condition","Enumerable","Enumerator","Pattern","patterns","Plan","expression","planCreateObserver","externalSubscriptions","observable","entry","get","JoinObserver","ActivePlan","joinObserverArray","joinObservers","Map","joinObserver","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","newValue","objectTypes","boolean","function","string","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","isScheduler","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","not","asArray","arguments","isFn","Symbol","iterator","Set","doneEnumerator","suportNodeClass","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","sources","prop","xs","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","indexOf","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","s","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediateScheduler","immediate","scheduleNow","currentThreadScheduler","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","_super","localNow","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","_next","_iterator","concat","currentItem","currentValue","catchException","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_thisArg","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","Observable","_subscribe","forEach","subscriber","subscribeNext","subscribeError","subscribeCompleted","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","TypeError","resolve","reject","v","arr","createWithDisposable","defer","observableFactory","observableThrow","pow","from","iterable","mapFn","objIsIterable","it","observableFromArray","fromArray","generate","initialState","iterate","hasResult","observableNever","ofWithScheduler","never","range","observableReturn","returnValue","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","combineLatest","unshift","filter","j","falseFactory","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeAll","innerSubscription","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","doAction","tap","onNextFunc","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","refCountDisposable","createWindow","selectConcat","selectorResult","concatMapObserver","selectConcatObserver","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","handleError","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","select","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","finalValue","aggregate","reduce","some","any","isEmpty","all","contains","sum","prev","curr","minBy","min","maxBy","average","cur","sequenceEqual","donel","doner","ql","qr","subscription1","subscription2","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","toSet","toMap","spawn","isGenFun","exit","ret","gen","called","fan","hasCallback","denodify","cb","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","innerHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasObservers","os","createRemovableDisposable","so","_trim","hasError","windowSize","Number","MAX_VALUE","interval","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","isPrime","candidate","num1","sqrt","num2","getPrime","num","primes","stringHashFn","str","hash","character","charCodeAt","numberHashFn","c2","newEntry","hashCode","_initialize","freeCount","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","dictionaryProto","prime","buckets","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","clear","_findEntry","containskey","join","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","published","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","hasResults","ix","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","manySelect","chain","ChainObservable","g","head","tail","_keys","_values","and","thenDo","activate","deactivate","activePlan","jlen","removeActivePlan","addActivePlan","match","hasValues","firstValues","isCompleted","activePlans","JoinObserverPrototype","when","plans","outObserver","observableinterval","observableTimer","timer","periodOrScheduler","getTime","delay","throttle","hasvalue","windowWithTime","timeShiftOrScheduler","timeShift","createTimer","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","windowWithTimeOrCount","windowId","newId","newWindow","bufferWithTime","bufferWithTimeOrCount","timeInterval","span","sample","intervalOrSampler","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","timeSelector","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","delays","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","throttleWithSelector","throttleDurationSelector","currentid","skipLastWithTime","takeLastWithTime","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","exclusive","hasCurrent","exclusiveMap","VirtualTimeScheduler","notImplemented","toDateTimeOffset","clock","scheduleAbsoluteWithState","scheduleRelativeWithState","toRelative","initialClock","isEnabled","VirtualTimeSchedulerPrototype","runAt","getNext","stop","advanceTo","dueToClock","advanceBy","sleep","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,IAwElE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EA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B,UAAW,CACnB,GAAIkS,GAAKzzB,KAAKuzB,UAAUzyB,MAAM,EAC9Bd,MAAKuhB,WAAY,EACjBvhB,KAAKgH,UAAYwa,CAEjB,KAAK,GAAI5c,GAAI,EAAGgB,EAAM6tB,EAAG7yB,OAAYgF,EAAJhB,EAASA,IACxC6uB,EAAG7uB,GAAGuC,QAAQqa,EAGhBxhB,MAAKuzB,eAOTzsB,OAAQ,SAAUzG,GAChBN,EAAcgB,KAAKf,MACfA,KAAKuhB,YACTvhB,KAAKK,MAAQA,EACbL,KAAK8I,UAAW,IAKlByN,QAAS,WACPvW,KAAKC,YAAa,EAClBD,KAAKuzB,UAAY,KACjBvzB,KAAKgH,UAAY,KACjBhH,KAAKK,MAAQ,QAIV6iB,GACPV,IAEE+d,GAAmB7tB,GAAG6tB,iBAAoB,SAAUjf,GAGtD,QAASif,GAAiBh6B,EAAU0I,GAClCjP,KAAKuG,SAAWA,EAChBvG,KAAKiP,WAAaA,EAClBqS,EAAUvgB,KAAKf,KAAMA,KAAKiP,WAAWpI,UAAUE,KAAK/G,KAAKiP,aAe3D,MApBA4F,IAAS0rB,EAAkBjf,GAQ3BrM,GAAcsrB,EAAiB1+B,UAAW6e,IACxCpZ,YAAa,WACXtH,KAAKuG,SAASe,eAEhBH,QAAS,SAAUH,GACjBhH,KAAKuG,SAASY,QAAQH,IAExBF,OAAQ,SAAUzG,GAChBL,KAAKuG,SAASO,OAAOzG,MAIlBkgC,GACP/d,GAEqB,mBAAVie,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvEv7B,GAAKuN,GAAKA,GAEV+tB,OAAO,WACH,MAAO/tB,OAEJR,IAAeG,GAElBE,IACCF,GAAWF,QAAUO,IAAIA,GAAKA,GAEjCR,GAAYQ,GAAKA,GAInBvN,GAAKuN,GAAKA,KAGhB3R,KAAKf"} \ No newline at end of file +{"version":3,"file":"rx.all.min.js","sources":["rx.all.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","numberIsFinite","root","isFinite","isIterable","o","$iterator$","sign","number","isNaN","toLength","len","Math","floor","abs","maxSafeInteger","isCallable","f","observableCatchHandler","source","handler","AnonymousObservable","observer","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","onNext","bind","exception","d","ex","onError","isPromise","observableFromPromise","onCompleted","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","concatAll","arrayIndexOfComparer","array","item","comparer","HashSet","set","flatMap","mergeObservable","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","sequenceContainsNoElements","sequenceEqualArray","equal","elementAtOrDefault","hasDefault","defaultValue","argumentOutOfRange","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","predicate","yieldIndex","shouldRun","toThunk","obj","ctx","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","promise","then","name","next","throw","val","createListener","element","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","combineLatestSource","subject","values","hasValueAll","every","identity","apply","isDone","n","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","window","observableWindowWithBounaries","windowBoundaries","Subject","r","RefCountDisposable","addRef","observableWindowWithClosingSelector","createWindowClose","m","m1","windowClose","take","noop","enumerableWhile","condition","Enumerable","Enumerator","Pattern","patterns","Plan","expression","planCreateObserver","externalSubscriptions","observable","entry","get","JoinObserver","ActivePlan","joinObserverArray","joinObservers","Map","joinObserver","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","newValue","objectTypes","boolean","function","string","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","isScheduler","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","not","asArray","arguments","isFn","Symbol","iterator","Set","doneEnumerator","suportNodeClass","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","sources","prop","xs","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","indexOf","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","s","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediateScheduler","immediate","scheduleNow","currentThreadScheduler","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","_super","localNow","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","_next","_iterator","concat","currentItem","currentValue","catchException","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_thisArg","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","Observable","_subscribe","forEach","subscriber","subscribeNext","subscribeError","subscribeCompleted","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","TypeError","resolve","reject","v","arr","createWithDisposable","defer","observableFactory","observableThrow","pow","from","iterable","mapFn","objIsIterable","it","observableFromArray","fromArray","generate","initialState","iterate","hasResult","observableNever","ofWithScheduler","never","range","observableReturn","returnValue","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","combineLatest","unshift","filter","j","falseFactory","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeAll","innerSubscription","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","currentKey","hasCurrentKey","comparerEquals","doAction","tap","onNextFunc","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","refCountDisposable","createWindow","selectConcat","selectorResult","concatMapObserver","selectConcatObserver","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","handleError","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","select","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","finalValue","aggregate","reduce","some","any","isEmpty","all","contains","sum","prev","curr","minBy","min","maxBy","average","cur","sequenceEqual","donel","doner","ql","qr","subscription1","subscription2","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","toSet","toMap","spawn","isGenFun","exit","ret","gen","called","fan","hasCallback","denodify","cb","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","innerHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasObservers","os","createRemovableDisposable","so","_trim","hasError","windowSize","Number","MAX_VALUE","interval","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","isPrime","candidate","num1","sqrt","num2","getPrime","num","primes","stringHashFn","str","hash","character","charCodeAt","numberHashFn","c2","newEntry","hashCode","_initialize","freeCount","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","dictionaryProto","prime","buckets","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","clear","_findEntry","containskey","join","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","published","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","hasResults","ix","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","manySelect","chain","ChainObservable","g","head","tail","_keys","_values","and","thenDo","activate","deactivate","activePlan","jlen","removeActivePlan","addActivePlan","match","hasValues","firstValues","isCompleted","activePlans","JoinObserverPrototype","when","plans","outObserver","observableinterval","observableTimer","timer","periodOrScheduler","getTime","delay","throttle","hasvalue","windowWithTime","timeShiftOrScheduler","timeShift","createTimer","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","windowWithTimeOrCount","windowId","newId","newWindow","bufferWithTime","bufferWithTimeOrCount","timeInterval","span","sample","intervalOrSampler","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","timeSelector","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","delays","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","throttleWithSelector","throttleDurationSelector","currentid","skipLastWithTime","takeLastWithTime","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","exclusive","hasCurrent","exclusiveMap","VirtualTimeScheduler","notImplemented","toDateTimeOffset","clock","scheduleAbsoluteWithState","scheduleRelativeWithState","toRelative","initialClock","isEnabled","VirtualTimeSchedulerPrototype","runAt","getNext","stop","advanceTo","dueToClock","advanceBy","sleep","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,IAwElE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAWgB,GAAa,CACpD,GAAIC,GAAOjB,EAAOkB,YACdC,EAAQ,GACRf,EAASgB,GAAchB,MAE3B,IAAIJ,KAAYiB,GAAQA,EAAKI,WAC3B,GAAIC,GAAYtB,IAAWuB,YAAcC,GAAcxB,IAAWY,GAAaa,GAAaC,GAASnB,KAAKP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,GAAG6tB,iBAAoB,SAAUjf,GAGtD,QAASif,GAAiBh6B,EAAU0I,GAClCjP,KAAKuG,SAAWA,EAChBvG,KAAKiP,WAAaA,EAClBqS,EAAUvgB,KAAKf,KAAMA,KAAKiP,WAAWpI,UAAUE,KAAK/G,KAAKiP,aAe3D,MApBA4F,IAAS0rB,EAAkBjf,GAQ3BrM,GAAcsrB,EAAiB1+B,UAAW6e,IACxCpZ,YAAa,WACXtH,KAAKuG,SAASe,eAEhBH,QAAS,SAAUH,GACjBhH,KAAKuG,SAASY,QAAQH,IAExBF,OAAQ,SAAUzG,GAChBL,KAAKuG,SAASO,OAAOzG,MAIlBkgC,GACP/d,GAEqB,mBAAVie,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvEv7B,GAAKuN,GAAKA,GAEV+tB,OAAO,WACH,MAAO/tB,OAEJR,IAAeG,GAElBE,IACCF,GAAWF,QAAUO,IAAIA,GAAKA,GAEjCR,GAAYQ,GAAKA,GAInBvN,GAAKuN,GAAKA,KAGhB3R,KAAKf"} diff --git a/dist/rx.all.min.js b/dist/rx.all.min.js index d94690b9c..0d27b0178 100644 --- a/dist/rx.all.min.js +++ b/dist/rx.all.min.js @@ -2,4 +2,4 @@ (function(a){function b(){if(this.isDisposed)throw new Error(wb)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;Tb.nonEnumArgs&&a.length&&h(a)&&(a=Vb.call(a));var d=Tb.enumPrototypes&&"function"==typeof a,e=Tb.enumErrorProps&&(a===Nb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(Tb.nonEnumShadows&&a!==Ob){var g=a.constructor,i=-1,j=Rb.length;if(a===(g&&g.prototype))var k=a===stringProto?Jb:a===Nb?Eb:Kb.call(a),l=Sb[k];for(;++i-1:void 0});return c.pop(),d.pop(),result}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:Vb.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function n(a){return"number"==typeof a&&eb.isFinite(a)}function o(b){return b[xb]!==a}function p(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function q(a){var b=+a.length;return isNaN(b)?0:0!==b&&n(b)?(b=p(b)*Math.floor(Math.abs(b)),0>=b?0:b>Oc?Oc:b):b}function r(a){return"[object Function]"===Object.prototype.toString.call(a)&&"function"==typeof a}function s(a,b){return new sd(function(c){var d=new ec,e=new fc;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}rb(f)&&(f=Lc(f)),d=new ec,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function t(a,b){var c=this;return new sd(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function u(a,b,c){return a.map(function(a,d){var e=b.call(c,a,d);return rb(e)?Lc(e):e}).concatAll()}function v(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function w(a){this.comparer=a,this.set=[]}function x(a,b,c){return a.map(function(a,d){var e=b.call(c,a,d);return rb(e)?Lc(e):e}).mergeObservable()}function y(a,b,c){return new sd(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},d.onError.bind(d),function(){d.onNext(g),d.onCompleted()})})}function z(a){if(0===a.length)throw new Error(ub);return a[0]}function A(a,b,c){return new sd(function(d){var e=0,f=b.length;return a.subscribe(function(a){var g=!1;try{f>e&&(g=c(a,b[e++]))}catch(h){return void d.onError(h)}g||(d.onNext(!1),d.onCompleted())},d.onError.bind(d),function(){d.onNext(e===f),d.onCompleted()})})}function B(a,b,c,d){if(0>b)throw new Error(vb);return new sd(function(e){var f=b;return a.subscribe(function(a){0===f&&(e.onNext(a),e.onCompleted()),f--},e.onError.bind(e),function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(vb))})})}function C(a,b,c){return new sd(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(ub))})})}function D(a,b,c){return new sd(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},d.onError.bind(d),function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(ub))})})}function E(a,b,c){return new sd(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(ub))})})}function F(b,c,d,e){return new sd(function(f){var g=0;return b.subscribe(function(a){var h;try{h=c.call(d,a,g,b)}catch(i){return void f.onError(i)}h?(f.onNext(e?g:a),f.onCompleted()):g++},f.onError.bind(f),function(){f.onNext(e?-1:a),f.onCompleted()})})}function G(a,b){return Array.isArray(a)?H.call(b,a):K(a)?Zc(a.call(b)):L(a)?Zc(a):J(a)?observableToThunk(a):rb(a)?I(a):typeof a===Yc?a:c(a)||Array.isArray(a)?H.call(b,a):a}function H(a){var b=this;return function(c){function d(a,d){if(!e)try{if(a=G(a,b),typeof a!==Yc)return h[d]=a,--g||c(null,h);a.call(b,function(a,b){if(!e){if(a)return e=!0,c(a);h[d]=b,--g||c(null,h)}})}catch(f){e=!0,c(f)}}var e,f=Object.keys(a),g=f.length,h=new a.constructor;if(!g)return void sc.schedule(function(){c(null,h)});for(var i=0,j=f.length;j>i;i++)d(a[f[i]],f[i])}}function I(a){return function(b){a.then(function(a){b(null,a)},b)}}function J(a){return a&&a.prototype.subscribe===Yc}function K(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function L(a){return a&&typeof a.next===Yc&&typeof a.throw===Yc}function c(a){return a&&a.constructor===Object}function M(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),cc(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function N(a,b,c){var d=new _b;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(N(a.item(e),b,c));else a&&d.add(M(a,b,c));return d}function O(a,b,c){return new sd(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(mb))){try{e=c.apply(null,j)}catch(f){return void d.onError(f)}d.onNext(e)}else i&&d.onCompleted()}var f=2,g=[!1,!1],h=!1,i=!1,j=new Array(f);return new _b(a.subscribe(function(a){e(a,0)},d.onError.bind(d),function(){i=!0,d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d)))})}function P(a,b){return a.groupJoin(this,b,function(){return Nc()},function(a,b){return b})}function Q(a){var b=this;return new sd(function(c){var d=new vd,e=new _b,f=new gc(e);return c.onNext(Yb(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),e.add(a.subscribe(function(){d.onCompleted(),d=new vd,c.onNext(Yb(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f})}function R(a){var b=this;return new sd(function(c){var d,e=new fc,f=new _b(e),g=new gc(f),h=new vd;return c.onNext(Yb(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d=function(){var b,f;try{f=a()}catch(i){return void c.onError(i)}b=new ec,e.setDisposable(b),b.setDisposable(f.take(1).subscribe(kb,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new vd,c.onNext(Yb(h,g)),d()}))},d(),g})}function S(b,c){return new zc(function(){return new yc(function(){return b()?{done:!1,value:c}:{done:!0,value:a}})})}function T(a){this.patterns=a}function U(a,b){this.expression=a,this.selector=b}function V(a,b,c){var d=a.get(b);if(!d){var e=new pd(b,c);return a.set(b,e),e}return d}function W(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new od;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function X(a,b){return new sd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function Y(a,b,c){return new sd(function(d){var e=0,f=a,g=jc(b);return c.scheduleRecursiveWithAbsolute(f,function(a){if(g>0){var b=c.now();f+=g,b>=f&&(f=b+g)}d.onNext(e++),a(f)})})}function Z(a,b){return new sd(function(c){return b.scheduleWithRelative(jc(a),function(){c.onNext(0),c.onCompleted()})})}function $(a,b,c){return a===b?new sd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Mc(function(){return Y(c.now()+a,b,c)})}function _(a,b,c){return new sd(function(d){var e,f=!1,g=new fc,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new ec,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new _b(e,g)})}function ab(a,b,c){return Mc(function(){return _(a,b-c.now(),c)})}function bb(a,b){return new sd(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new _b(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))})}var db={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},eb=db[typeof window]&&window||this,fb=db[typeof exports]&&exports&&!exports.nodeType&&exports,gb=db[typeof module]&&module&&!module.nodeType&&module,hb=gb&&gb.exports===fb&&fb,ib=db[typeof global]&&global;!ib||ib.global!==ib&&ib.window!==ib||(eb=ib);var jb={internals:{},config:{Promise:eb.Promise},helpers:{}},kb=jb.helpers.noop=function(){},lb=(jb.helpers.notDefined=function(a){return"undefined"==typeof a},jb.helpers.isScheduler=function(a){return a instanceof jb.Scheduler}),mb=jb.helpers.identity=function(a){return a},nb=(jb.helpers.pluck=function(a){return function(b){return b[a]}},jb.helpers.just=function(a){return function(){return a}},jb.helpers.defaultNow=Date.now),ob=jb.helpers.defaultComparer=function(a,b){return Ub(a,b)},pb=jb.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},qb=(jb.helpers.defaultKeySerializer=function(a){return a.toString()},jb.helpers.defaultError=function(a){throw a}),rb=jb.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},sb=(jb.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},jb.helpers.not=function(a){return!a}),tb=jb.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Kb.call(a)}),a}(),ub="Sequence contains no elements.",vb="Argument out of range",wb="Object has been disposed",xb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";eb.Set&&"function"==typeof(new eb.Set)["@@iterator"]&&(xb="@@iterator");var yb=jb.doneEnumerator={done:!0,value:a};jb.iterator=xb;var zb,Ab="[object Arguments]",Bb="[object Array]",Cb="[object Boolean]",Db="[object Date]",Eb="[object Error]",Fb="[object Function]",Gb="[object Number]",Hb="[object Object]",Ib="[object RegExp]",Jb="[object String]",Kb=Object.prototype.toString,Lb=Object.prototype.hasOwnProperty,Mb=Kb.call(arguments)==Ab,Nb=Error.prototype,Ob=Object.prototype,Pb=Ob.propertyIsEnumerable;try{zb=!(Kb.call(document)==Hb&&!({toString:0}+""))}catch(Qb){zb=!0}var Rb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Sb={};Sb[Bb]=Sb[Db]=Sb[Gb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Sb[Cb]=Sb[Jb]={constructor:!0,toString:!0,valueOf:!0},Sb[Eb]=Sb[Fb]=Sb[Ib]={constructor:!0,toString:!0},Sb[Hb]={constructor:!0};var Tb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Tb.enumErrorProps=Pb.call(Nb,"message")||Pb.call(Nb,"name"),Tb.enumPrototypes=Pb.call(a,"prototype"),Tb.nonEnumArgs=0!=c,Tb.nonEnumShadows=!/valueOf/.test(b)}(1),Mb||(h=function(a){return a&&"object"==typeof a?Lb.call(a,"callee"):!1});var Ub=jb.internals.isEqual=function(a,b){return i(a,b,[],[])},Vb=Array.prototype.slice,Wb=({}.hasOwnProperty,this.inherits=jb.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),Xb=jb.internals.addProperties=function(a){for(var b=Vb.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},Yb=jb.internals.addRef=function(a,b){return new sd(function(c){return new _b(b.getDisposable(),a.subscribe(c))})};l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Zb=jb.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},$b=Zb.prototype;$b.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},$b.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},$b.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},ac.toArray=function(){return this.disposables.slice(0)};var bc=jb.Disposable=function(a){this.isDisposed=!1,this.action=a||kb};bc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var cc=bc.create=function(a){return new bc(a)},dc=bc.empty={dispose:kb},ec=jb.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),fc=jb.SerialDisposable=ec,gc=jb.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?dc:new a(this)},b}();m.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var hc=jb.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||pb,this.disposable=new ec};hc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},hc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},hc.prototype.isCancelled=function(){return this.disposable.isDisposed},hc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var ic=jb.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),dc}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=nb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),jc=ic.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new _b,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),dc});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new _b,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),dc});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(ic.prototype),function(){ic.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},ic.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof eb.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=eb.setInterval(function(){d=c(d)},b);return cc(function(){eb.clearInterval(e)})}}(ic.prototype),function(a){a.catchError=a["catch"]=function(a){return new tc(this,a)}}(ic.prototype);var kc,lc=jb.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new ec;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),mc=ic.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=jc(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new ic(nb,a,b,c)}(),nc=ic.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-ic.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+ic.normalize(c),g=new hc(this,b,d,f);if(e)e.enqueue(g);else{e=new Zb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new ic(nb,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),oc=kb,pc=function(){var a,b=kb;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!eb.setTimeout)throw new Error("No concurrency detected!");a=eb.setTimeout,b=eb.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),qc=pc.setTimeout,rc=pc.clearTimeout;!function(){function a(){if(!eb.postMessage||eb.importScripts)return!1;var a=!1,b=eb.onmessage;return eb.onmessage=function(){a=!0},eb.postMessage("","*"),eb.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(Kb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=ib&&hb&&ib.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=ib&&hb&&ib.clearImmediate)&&!c.test(e)&&e;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))kc=process.nextTick;else if("function"==typeof d)kc=d,oc=e;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;eb.addEventListener?eb.addEventListener("message",b,!1):eb.attachEvent("onmessage",b,!1),kc=function(a){var b=h++;g[b]=a,eb.postMessage(f+b,"*")}}else if(eb.MessageChannel){var i=new eb.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},kc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in eb&&"onreadystatechange"in eb.document.createElement("script")?kc=function(a){var b=eb.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},eb.document.documentElement.appendChild(b)}:(kc=function(a){return qc(a,0)},oc=rc)}();var sc=ic.timeout=function(){function a(a,b){var c=this,d=new ec,e=kc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new _b(d,cc(function(){oc(e)}))}function b(a,b,c){var d=this,e=ic.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new ec,g=qc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new _b(f,cc(function(){rc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new ic(nb,a,b,c)}(),tc=function(a){function b(){return this._scheduler.now()}function c(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function d(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function e(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function f(f,g){this._scheduler=f,this._handler=g,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,b,c,d,e)}return Wb(f,a),f.prototype._clone=function(a){return new f(a,this._handler)},f.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return dc}}},f.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},f.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new ec;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},f}(ic),uc=jb.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return lb(a)||(a=mc),new sd(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),vc=uc.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new uc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),wc=uc.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new uc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),xc=uc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new uc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),yc=jb.internals.Enumerator=function(a){this._next=a};yc.prototype.next=function(){return this._next()},yc.prototype[xb]=function(){return this};var zc=jb.internals.Enumerable=function(a){this._iterator=a};zc.prototype[xb]=function(){return this._iterator()},zc.prototype.concat=function(){var a=this;return new sd(function(b){var c;try{c=a[xb]()}catch(d){return void b.onError()}var e,f=new fc,g=mc.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;rb(h)&&(h=Lc(h));var i=new ec;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new _b(f,g,cc(function(){e=!0}))})},zc.prototype.catchException=function(){var a=this;return new sd(function(b){var c;try{c=a[xb]()}catch(d){return void b.onError()}var e,f,g=new fc,h=mc.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;rb(i)&&(i=Lc(i));var j=new ec;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new _b(g,h,cc(function(){e=!0}))})};var Ac=zc.repeat=function(a,b){return null==b&&(b=-1),new zc(function(){var c=b;return new yc(function(){return 0===c?yb:(c>0&&c--,{done:!1,value:a})})})},Bc=zc.of=function(a,b,c){return b||(b=mb),new zc(function(){var d=-1;return new yc(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Fc),Jc=function(a){function b(){a.apply(this,arguments)}return Wb(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(Ic),Kc=jb.Observable=function(){function a(a){this._subscribe=a}return Ec=a.prototype,Ec.subscribe=Ec.forEach=function(a,b,c,d){var e="object"==typeof a?a:4===arguments.length?Dc(a,b,c,d):Dc(a,b,c);return this._subscribe(e)},Ec.subscribeNext=function(a,b){var c=2===arguments.length?Dc(a,null,null,b):Dc(a,null,null);return this._subscribe(c)},Ec.subscribeError=function(a,b){var c=2===arguments.length?Dc(null,a,null,b):Dc(null,a,null);return this._subscribe(c)},Ec.subscribeCompleted=function(a,b){var c=2===arguments.length?Dc(null,null,a,b):Dc(null,null,a);return this._subscribe(c)},a}();Ec.observeOn=function(a){var b=this;return new sd(function(c){return b.subscribe(new Jc(a,c))})},Ec.subscribeOn=function(a){var b=this;return new sd(function(c){var d=new ec,e=new fc;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new m(a,b.subscribe(c)))})),e})};var Lc=Kc.fromPromise=function(a){return Mc(function(){var b=new jb.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};Ec.toPromise=function(a){if(a||(a=jb.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Ec.toArray=function(){var a=this;return new sd(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},Kc.create=Kc.createWithDisposable=function(a){return new sd(a)};var Mc=Kc.defer=function(a){return new sd(function(b){var c;try{c=a()}catch(d){return Sc(d).subscribe(b)}return rb(c)&&(c=Lc(c)),c.subscribe(b)})},Nc=Kc.empty=function(a){return lb(a)||(a=mc),new sd(function(b){return a.schedule(function(){b.onCompleted()})})},Oc=Math.pow(2,53)-1;Kc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!r(b))throw new Error("mapFn when provided must be a function");return lb(d)||(d=nc),new sd(function(e){var f=Object(a),g=o(f),h=g?0:q(f),i=g?f[xb]():null,j=0;return d.scheduleRecursive(function(a){if(h>j||g){var d; if(g){var k=i.next();if(k.done)return void e.onCompleted();d=k.value}else d=f[j];if(b&&r(b))try{d=c?b.call(c,d,j):b(d,j)}catch(l){return void e.onError(l)}e.onNext(d),j++,a()}else e.onCompleted()})})};var Pc=Kc.fromArray=function(a,b){return lb(b)||(b=nc),new sd(function(c){var d=0,e=a.length;return b.scheduleRecursive(function(b){e>d?(c.onNext(a[d++]),b()):c.onCompleted()})})};Kc.generate=function(a,b,c,d,e){return lb(e)||(e=nc),new sd(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})},Kc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Pc(b)};var Qc=(Kc.ofWithScheduler=function(a){for(var b=arguments.length-1,c=new Array(b),d=0;b>d;d++)c[d]=arguments[d+1];return Pc(c,a)},Kc.never=function(){return new sd(function(){return dc})});Kc.range=function(a,b,c){return lb(c)||(c=nc),new sd(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},Kc.repeat=function(a,b,c){return lb(c)||(c=nc),Rc(a,c).repeat(null==b?-1:b)};var Rc=Kc["return"]=Kc.returnValue=Kc.just=function(a,b){return lb(b)||(b=mc),new sd(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})},Sc=Kc["throw"]=Kc.throwException=Kc.throwError=function(a,b){return lb(b)||(b=mc),new sd(function(c){return b.schedule(function(){c.onError(a)})})};Kc.using=function(a,b){return new sd(function(c){var d,e,f=dc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new _b(Sc(g).subscribe(c),f)}return new _b(e.subscribe(c),f)})},Ec.amb=function(a){var b=this;return new sd(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new ec,j=new ec;return rb(a)&&(a=Lc(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new _b(i,j)})},Kc.amb=function(){function a(a,b){return a.amb(b)}for(var b=Qc(),c=j(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},Ec["catch"]=Ec.catchException=function(a){return"function"==typeof a?s(this,a):Tc([this,a])};var Tc=Kc.catchException=Kc["catch"]=function(){return Bc(j(arguments,0)).catchException()};Ec.combineLatest=function(){var a=Vb.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),Uc.apply(this,a)};var Uc=Kc.combineLatest=function(){var a=Vb.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new sd(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(mb))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(mb)&&c.onCompleted()}function e(a){j[a]=!0,j.every(mb)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new ec;rb(f)&&(f=Lc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new _b(m)})};Ec.concat=function(){var a=Vb.call(arguments,0);return a.unshift(this),Vc.apply(this,a)};var Vc=Kc.concat=function(){return Bc(j(arguments,0)).concat()};Ec.concatObservable=Ec.concatAll=function(){return this.merge(1)},Ec.merge=function(a){if("number"!=typeof a)return Wc(this,a);var b=this;return new sd(function(c){function d(a){var b=new ec;f.add(b),rb(a)&&(a=Lc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new _b,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var Wc=Kc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=Vb.call(arguments,1)):(a=mc,b=Vb.call(arguments,0)):(a=mc,b=Vb.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),Pc(b,a).mergeObservable()};Ec.mergeObservable=Ec.mergeAll=function(){var a=this;return new sd(function(b){var c=new _b,d=!1,e=new ec;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new ec;c.add(e),rb(a)&&(a=Lc(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},Ec.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return Xc([this,a])};var Xc=Kc.onErrorResumeNext=function(){var a=j(arguments,0);return new sd(function(b){var c=0,d=new fc,e=mc.scheduleRecursive(function(e){var f,g;c0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(mb)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new ec;rb(c)&&(c=Lc(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new _b(j)})},Kc.zip=function(){var a=Vb.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},Kc.zipArray=function(){var a=j(arguments,0);return new sd(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(mb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(mb)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new ec,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new _b(h);return j.add(cc(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},Ec.asObservable=function(){return new sd(this.subscribe.bind(this))},Ec.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},Ec.dematerialize=function(){var a=this;return new sd(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},Ec.distinctUntilChanged=function(a,b){var c=this;return a||(a=mb),b||(b=ob),new sd(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},Ec["do"]=Ec.doAction=Ec.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new sd(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b){try{b(c)}catch(d){a.onError(d)}a.onError(c)}else a.onError(c)},function(){if(c){try{c()}catch(b){a.onError(b)}a.onCompleted()}else a.onCompleted()})})},Ec["finally"]=Ec.finallyAction=function(a){var b=this;return new sd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return cc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},Ec.ignoreElements=function(){var a=this;return new sd(function(b){return a.subscribe(kb,b.onError.bind(b),b.onCompleted.bind(b))})},Ec.materialize=function(){var a=this;return new sd(function(b){return a.subscribe(function(a){b.onNext(vc(a))},function(a){b.onNext(wc(a)),b.onCompleted()},function(){b.onNext(xc()),b.onCompleted()})})},Ec.repeat=function(a){return Ac(this,a).concat()},Ec.retry=function(a){return Ac(this,a).catchException()},Ec.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new sd(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},Ec.skipLast=function(a){var b=this;return new sd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},Ec.startWith=function(){var a,b,c=0;return arguments.length&&lb(arguments[0])?(b=arguments[0],c=1):b=mc,a=Vb.call(arguments,c),Bc([Pc(a,b),this]).concat()},Ec.takeLast=function(a){var b=this;return new sd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},Ec.takeLastBuffer=function(a){var b=this;return new sd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},Ec.windowWithCount=function(a,b){var c=this;if(0>=a)throw new Error(vb);if(1===arguments.length&&(b=a),0>=b)throw new Error(vb);return new sd(function(d){var e=new ec,f=new gc(e),g=0,h=[],i=function(){var a=new vd;h.push(a),d.onNext(Yb(a,f))};return i(),e.setDisposable(c.subscribe(function(c){for(var d,e=0,f=h.length;f>e;e++)h[e].onNext(c);var j=g-a+1;j>=0&&j%b===0&&(d=h.shift(),d.onCompleted()),g++,g%b===0&&i()},function(a){for(;h.length>0;)h.shift().onError(a);d.onError(a)},function(){for(;h.length>0;)h.shift().onCompleted();d.onCompleted()})),f})},Ec.selectConcat=Ec.concatMap=function(a,b,c){return b?this.concatMap(function(c,d){var e=a(c,d),f=rb(e)?Lc(e):e;return f.map(function(a){return b(c,a,d)})}):"function"==typeof a?u(this,a,c):u(this,function(){return a})},Ec.concatMapObserver=Ec.selectConcatObserver=function(a,b,c,d){var e=this;return new sd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}rb(c)&&(c=Lc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}rb(c)&&(c=Lc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}rb(a)&&(a=Lc(a)),f.onNext(a),f.onCompleted()})}).concatAll()},Ec.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new sd(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},a.onError.bind(a),function(){d||a.onNext(b),a.onCompleted()})})},w.prototype.push=function(a){var b=-1===v(this.set,a,this.comparer);return b&&this.set.push(a),b},Ec.distinct=function(a,b){var c=this;return b||(b=ob),new sd(function(d){var e=new w(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},d.onError.bind(d),d.onCompleted.bind(d))})},Ec.groupBy=function(a,b,c){return this.groupByUntil(a,b,Qc,c)},Ec.groupByUntil=function(a,b,c,d){var e=this;return b||(b=mb),d||(d=ob),new sd(function(f){function g(a){return function(b){b.onError(a)}}var h=new ld(0,d),i=new _b,j=new gc(i);return i.add(e.subscribe(function(d){var e;try{e=a(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}var l=!1,m=h.tryGetValue(e);if(m||(m=new vd,h.set(e,m),l=!0),l){var n=new ud(e,m,j),o=new ud(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new ec;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(kb,function(a){h.getValues().forEach(g(a)),f.onError(a)},q))}var r;try{r=b(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}m.onNext(r)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),j})},Ec.select=Ec.map=function(a,b){var c=this;return new sd(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Ec.pluck=function(a){return this.map(function(b){return b[a]})},Ec.selectMany=Ec.flatMap=function(a,b,c){return b?this.flatMap(function(c,d){var e=a(c,d),f=rb(e)?Lc(e):e;return f.map(function(a){return b(c,a,d)})},c):"function"==typeof a?x(this,a,c):x(this,function(){return a})},Ec.flatMapObserver=Ec.selectManyObserver=function(a,b,c,d){var e=this;return new sd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}rb(c)&&(c=Lc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}rb(c)&&(c=Lc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}rb(a)&&(a=Lc(a)),f.onNext(a),f.onCompleted()})}).mergeAll()},Ec.selectSwitch=Ec.flatMapLatest=Ec.switchMap=function(a,b){return this.select(a,b).switchLatest()},Ec.skip=function(a){if(0>a)throw new Error(vb);var b=this;return new sd(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},Ec.skipWhile=function(a,b){var c=this;return new sd(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Ec.take=function(a,b){if(0>a)throw new RangeError(vb);if(0===a)return Nc(b);var c=this;return new sd(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},Ec.takeWhile=function(a,b){var c=this;return new sd(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},Ec.where=Ec.filter=function(a,b){var c=this;return new sd(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},Ec.finalValue=function(){var a=this;return new sd(function(b){var c,d=!1;return a.subscribe(function(a){d=!0,c=a},b.onError.bind(b),function(){d?(b.onNext(c),b.onCompleted()):b.onError(new Error(ub))})})},Ec.aggregate=function(){var a,b,c;return 2===arguments.length?(a=arguments[0],b=!0,c=arguments[1]):c=arguments[0],b?this.scan(a,c).startWith(a).finalValue():this.scan(c).finalValue()},Ec.reduce=function(a){var b,c;return 2===arguments.length&&(c=!0,b=arguments[1]),c?this.scan(b,a).startWith(b).finalValue():this.scan(a).finalValue()},Ec.some=Ec.any=function(a,b){var c=this;return a?c.where(a,b).any():new sd(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},a.onError.bind(a),function(){a.onNext(!1),a.onCompleted()})})},Ec.isEmpty=function(){return this.any().map(sb)},Ec.every=Ec.all=function(a,b){return this.where(function(b){return!a(b)},b).any().select(function(a){return!a})},Ec.contains=function(a,b){return b||(b=ob),this.where(function(c){return b(c,a)}).any()},Ec.count=function(a,b){return a?this.where(a,b).count():this.aggregate(0,function(a){return a+1})},Ec.sum=function(a,b){return a&&tb(a)?this.map(a,b).sum():this.aggregate(0,function(a,b){return a+b})},Ec.minBy=function(a,b){return b||(b=pb),y(this,a,function(a,c){return-1*b(a,c)})},Ec.min=function(a){return this.minBy(mb,a).select(function(a){return z(a)})},Ec.maxBy=function(a,b){return b||(b=pb),y(this,a,b)},Ec.max=function(a){return this.maxBy(mb,a).select(function(a){return z(a)})},Ec.average=function(a,b){return a?this.select(a,b).average():this.scan({sum:0,count:0},function(a,b){return{sum:a.sum+b,count:a.count+1}}).finalValue().select(function(a){if(0===a.count)throw new Error("The input sequence was empty");return a.sum/a.count})},Ec.sequenceEqual=function(a,b){var c=this;return b||(b=ob),Array.isArray(a)?A(c,a,b):new sd(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},d.onError.bind(d),function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});rb(a)&&(a=Lc(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},d.onError.bind(d),function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new _b(i,j)})},Ec.elementAt=function(a){return B(this,a,!1)},Ec.elementAtOrDefault=function(a,b){return B(this,a,!0,b)},Ec.single=function(a,b){return a&&tb(a)?this.where(a,b).single():C(this,!1)},Ec.singleOrDefault=function(a,b,c){return a&&tb(a)?this.where(a,c).singleOrDefault(null,b):C(this,!0,b)},Ec.first=function(a,b){return a?this.where(a,b).first():D(this,!1)},Ec.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):D(this,!0,b)},Ec.last=function(a,b){return a?this.where(a,b).last():E(this,!1)},Ec.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):E(this,!0,b)},Ec.find=function(a,b){return F(this,a,b,!1)},Ec.findIndex=function(a,b){return F(this,a,b,!0)},eb.Set&&(Ec.toSet=function(){var a=this;return new sd(function(b){var c=new eb.Set;return a.subscribe(c.add.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})}),eb.Map&&(Ec.toMap=function(a,b){var c=this;return new sd(function(d){var e=new eb.Map;return c.subscribe(function(c){var f;try{f=a(c)}catch(g){return void d.onError(g)}var h=c;if(b)try{h=b(c)}catch(g){return void d.onError(g)}e.set(f,h)},d.onError.bind(d),function(){d.onNext(e),d.onCompleted()})})});var Yc="function",Zc=jb.spawn=function(a){var b=K(a);return function(c){function d(a,b){sc.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2&&(b=Vb.call(arguments,1)),a)try{c=g.throw(a)}catch(h){return d(h)}if(!a)try{c=g.next(b)}catch(h){return d(h)}if(c.done)return d(null,c.value);if(c.value=G(c.value,f),typeof c.value!==Yc)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var i=!1;try{c.value.call(f,function(){i||(i=!0,e.apply(f,arguments))})}catch(h){sc.schedule(function(){i||(i=!0,e.call(f,h))})}}}var f=this,g=fan;if(b){var h=Vb.call(arguments),i=h.length,j=i&&typeof h[i-1]===Yc;c=j?h.pop():error,g=a.apply(this,h)}else c=c||error;e()}};jb.denodify=function(a){return function(){var b,c,d,e=Vb.call(arguments);return e.push(function(){b=arguments,d&&!c&&(c=!0,cb.apply(this,b))}),a.apply(this,e),function(a){d=a,b&&!c&&(c=!0,a.apply(this,b))}}},Kc.start=function(a,b,c){return $c(a,b,c)()};var $c=Kc.toAsync=function(a,b,c){return lb(c)||(c=sc),function(){var d=arguments,e=new wd;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};Kc.fromCallback=function(a,b,c){return function(){var d=Vb.call(arguments,0);return new sd(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Kc.fromNodeCallback=function(a,b,c){return function(){var d=Vb.call(arguments,0);return new sd(function(e){function f(a){if(a)return void e.onError(a);var b=Vb.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},jb.config.useNativeEvents=!1;var _c=eb.angular&&angular.element?angular.element:eb.jQuery?eb.jQuery:eb.Zepto?eb.Zepto:null,ad=!!eb.Ember&&"function"==typeof eb.Ember.addListener,bd=!!eb.Backbone&&!!eb.Backbone.Marionette;Kc.fromEvent=function(a,b,c){if(a.addListener)return cd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!jb.config.useNativeEvents){if(bd)return cd(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(ad)return cd(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c);if(_c){var d=_c(a);return cd(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}}return new sd(function(d){return N(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var cd=Kc.fromEventPattern=function(a,b,c){return new sd(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return cc(function(){b&&b(e,f)})}).publish().refCount()};Kc.startAsync=function(a){var b;try{b=a()}catch(c){return Sc(c)}return Lc(b)};var dd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=dc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=dc)});return new _b(c,d,e)}function c(c,d){this.source=c,this.controller=new vd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return Wb(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Kc);Ec.pausable=function(a){return new dd(this,a)};var ed=function(b){function c(b){var c,d=[],e=O(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new vd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c)}return Wb(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Kc);Ec.pausableBuffered=function(a){return new ed(this,a)},Ec.controlled=function(a){return null==a&&(a=!0),new fd(this,a)};var fd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new gd(d),this.source=c.multicast(this.subject).refCount()}return Wb(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Kc),gd=jb.ControlledSubject=function(a){function c(a){return this.subject.subscribe(a)}function d(b){null==b&&(b=!0),a.call(this,c),this.subject=new vd,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=dc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=dc}return Wb(d,a),Xb(d.prototype,Cc,{onCompleted:function(){b.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){b.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){b.call(this);var c=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),c=!0),c&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=dc):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=dc),{numberOfItems:a,returnValue:!1}},request:function(a){b.call(this),this.disposeCurrentRequest();var c=this,d=this._processRequest(a);return a=d.numberOfItems,d.returnValue?dc:(this.requestedCount=a,this.requestedDisposable=cc(function(){c.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=dc},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),d}(Kc);Ec.multicast=function(a,b){var c=this;return"function"==typeof a?new sd(function(d){var e=c.multicast(a());return new _b(b(e).subscribe(d),e.connect())}):new kd(c,a)},Ec.publish=function(a){return a&&tb(a)?this.multicast(function(){return new vd},a):this.multicast(new vd)},Ec.share=function(){return this.publish().refCount()},Ec.publishLast=function(a){return a&&tb(a)?this.multicast(function(){return new wd},a):this.multicast(new wd)},Ec.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new id(b)},a):this.multicast(new id(a))},Ec.shareValue=function(a){return this.publishValue(a).refCount()},Ec.replay=function(a,b,c,d){return a&&tb(a)?this.multicast(function(){return new jd(b,c,d)},a):this.multicast(new jd(b,c,d))},Ec.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var hd=function(a,b){this.subject=a,this.observer=b};hd.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var id=jb.BehaviorSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new hd(this,a);var c=this.exception;return c?a.onError(c):a.onCompleted(),dc}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return Wb(d,a),Xb(d.prototype,Cc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=this.observers.slice(0),d=c.length;d>a;a++)c[a].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped){this.value=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(Kc),jd=jb.ReplaySubject=function(a){function c(a,b){return cc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var d=new Ic(this.scheduler,a),e=c(this,d);b.call(this),this._trim(this.scheduler.now()),this.observers.push(d);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)d.onNext(this.q[g].value);return this.hasError?(f++,d.onError(this.error)):this.isStopped&&(f++,d.onCompleted()),d.ensureActive(f),e}function e(b,c,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=e||nc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}return Wb(e,a),Xb(e.prototype,Cc,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b.call(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++){var f=c[d];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(Kc),kd=jb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new _b(f.subscribe(c),cc(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return Wb(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new sd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Kc),ld=function(){function b(a){if(a&!1)return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function c(a){var c,d,e;for(c=0;c=a)return d;for(e=1|a;ec;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||ob,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return d(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return d(b.toString());if("function"==typeof b.valueOf){var c=b.valueOf();if("number"==typeof c)return e(c);if("string"==typeof b)return d(c)}if(b.getHashCode)return b.getHashCode();var f=17*a++;return b.getHashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var b,d=c(a);for(this.buckets=new Array(d),this.entries=new Array(d),b=0;d>b;b++)this.buckets[b]=-1,this.entries[b]=f();this.freeList=-1},l.add=function(a,b){return this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=c(2*this.size),b=new Array(a);for(e=0;ee;++e)d[e]=f();for(var g=0;g=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(b){var c=this._findEntry(b);return c>=0?this.entries[c].value:a},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();Ec.join=function(a,b,c,d){var e=this;return new sd(function(f){var g=new _b,h=!1,i=!1,j=0,k=0,l=new ld,m=new ld;return g.add(e.subscribe(function(a){var c=j++,e=new ec;l.add(c,a),g.add(e);var i,k=function(){l.remove(c)&&0===l.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(n){return void f.onError(n)}e.setDisposable(i.take(1).subscribe(kb,f.onError.bind(f),k)),m.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(i||0===l.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=k++,e=new ec;m.add(b,a),g.add(e);var h,j=function(){m.remove(b)&&0===m.count()&&i&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(n){return void f.onError(n)}e.setDisposable(h.take(1).subscribe(kb,f.onError.bind(f),j)),l.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){i=!0,(h||0===m.count())&&f.onCompleted()})),g})},Ec.groupJoin=function(a,b,c,d){var e=this;return new sd(function(f){function g(a){return function(b){b.onError(a)}}var h=new _b,i=new gc(h),j=new ld,k=new ld,l=0,m=0;return h.add(e.subscribe(function(a){var c=new vd,e=l++;j.add(e,c);var m;try{m=d(a,Yb(c,i))}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}f.onNext(m),k.getValues().forEach(function(a){c.onNext(a)});var o=new ec;h.add(o);var p,q=function(){j.remove(e)&&c.onCompleted(),h.remove(o)};try{p=b(a)}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}o.setDisposable(p.take(1).subscribe(kb,function(a){j.getValues().forEach(g(a)),f.onError(a)},q))},function(a){j.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=m++;k.add(b,a);var d=new ec;h.add(d);var e,i=function(){k.remove(b),h.remove(d)};try{e=c(a)}catch(l){return j.getValues().forEach(g(l)),void f.onError(l)}d.setDisposable(e.take(1).subscribe(kb,function(a){j.getValues().forEach(g(a)),f.onError(a)},i)),j.getValues().forEach(function(b){b.onNext(a)})},function(a){j.getValues().forEach(g(a)),f.onError(a)})),i})},Ec.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},Ec.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?Q.call(this,a):"function"==typeof a?R.call(this,a):P.call(this,a,b)},Ec.pairwise=function(){var a=this;return new sd(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))})},Ec.partition=function(a,b){var c=this.publish().refCount();return[c.filter(a,b),c.filter(function(c,d,e){return!a.call(b,c,d,e)})]},Ec.letBind=Ec.let=function(a){return a(this)},Kc["if"]=Kc.ifThen=function(a,b,c){return Mc(function(){return c||(c=Nc()),rb(b)&&(b=Lc(b)),rb(c)&&(c=Lc(c)),"function"==typeof c.now&&(c=Nc(c)),a()?b:c})},Kc["for"]=Kc.forIn=function(a,b,c){return Bc(a,b,c).concat()};var md=Kc["while"]=Kc.whileDo=function(a,b){return rb(b)&&(b=Lc(b)),S(a,b).concat()};Ec.doWhile=function(a){return Vc([this,md(a,this)])},Kc["case"]=Kc.switchCase=function(a,b,c){return Mc(function(){rb(c)&&(c=Lc(c)),c||(c=Nc()),"function"==typeof c.now&&(c=Nc(c));var d=b[a()];return rb(d)&&(d=Lc(d)),d||c})},Ec.expand=function(a,b){lb(b)||(b=mc);var c=this;return new sd(function(d){var e=[],f=new fc,g=new _b(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new ec;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g})},Kc.forkJoin=function(){var a=j(arguments,0);return new sd(function(b){var c=a.length;if(0===c)return b.onCompleted(),dc;for(var d=new _b,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];rb(j)&&(j=Lc(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},Ec.forkJoin=function(a,b){var c=this;return new sd(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new ec,l=new ec;return rb(a)&&(a=Lc(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new _b(k,l)})},Ec.manySelect=function(a,b){lb(b)||(b=mc);var c=this;return Mc(function(){var d;return c.map(function(a){var b=new nd(a);return d&&d.onNext(a),d=b,b}).tap(kb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)})};var nd=function(a){function b(a){var b=this,c=new _b;return c.add(nc.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeObservable().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new wd}return Wb(c,a),Xb(c.prototype,Cc,{onCompleted:function(){this.onNext(Kc.empty())},onError:function(a){this.onNext(Kc.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(Kc),od=eb.Map||function(){function b(){this._keys=[],this._values=[]}return b.prototype.get=function(b){var c=this._keys.indexOf(b);return-1!==c?this._values[c]:a},b.prototype.set=function(a,b){var c=this._keys.indexOf(a);-1!==c&&(this._values[c]=b),this._values[this._keys.push(a)-1]=b},b.prototype.forEach=function(a,b){for(var c=0,d=this._keys.length;d>c;c++)a.call(b,this._values[c],this._keys[c])},b}();T.prototype.and=function(a){return new T(this.patterns.concat(a))},T.prototype.thenDo=function(a){return new U(this,a)},U.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(V(a,this.expression.patterns[f],b.onError.bind(b)));var h=new W(e,function(){var a;try{a=d.selector.apply(d,arguments)}catch(c){return void b.onError(c)}b.onNext(a)},function(){for(var a=0,b=e.length;b>a;a++)e[a].removeActivePlan(h);c(h)});for(f=0,g=e.length;g>f;f++)e[f].addActivePlan(h);return h},W.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},W.prototype.match=function(){var a,b,c=!0;for(a=0,b=this.joinObserverArray.length;b>a;a++)if(0===this.joinObserverArray[a].queue.length){c=!1;break}if(c){var d=[],e=!1;for(a=0,b=this.joinObserverArray.length;b>a;a++)d.push(this.joinObserverArray[a].queue[0]),"C"===this.joinObserverArray[a].queue[0].kind&&(e=!0);if(e)this.onCompleted();else{this.dequeue();var f=[];for(a=0,b=d.length;ac;c++)b[c].match()}},c.error=kb,c.completed=kb,c.addActivePlan=function(a){this.activePlans.push(a)},c.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},c.removeActivePlan=function(a){this.activePlans.splice(this.activePlans.indexOf(a),1),0===this.activePlans.length&&this.dispose()},c.dispose=function(){a.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},b}(Fc);Ec.and=function(a){return new T([this,a])},Ec.thenDo=function(a){return new T([this]).thenDo(a)},Kc.when=function(){var a=j(arguments,0);return new sd(function(b){var c=[],d=new od,e=Dc(b.onNext.bind(b),function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},b.onCompleted.bind(b));try{for(var f=0,g=a.length;g>f;f++)c.push(a[f].activate(d,e,function(a){var d=c.indexOf(a);c.splice(d,1),0===c.length&&b.onCompleted()}))}catch(h){Sc(h).subscribe(b)}var i=new _b;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};var qd=Kc.interval=function(a,b){return $(a,a,lb(b)?b:sc)},rd=Kc.timer=function(b,c,d){var e;return lb(d)||(d=sc),c!==a&&"number"==typeof c?e=c:lb(c)&&(d=c),b instanceof Date&&e===a?X(b.getTime(),d):b instanceof Date&&e!==a?(e=c,Y(b.getTime(),e,d)):e===a?Z(b,d):$(b,e,d)};Ec.delay=function(a,b){return lb(b)||(b=sc),a instanceof Date?ab(this,a.getTime(),b):_(this,a,b)},Ec.throttle=function(a,b){lb(b)||(b=sc);var c=this;return new sd(function(d){var e,f=new fc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new ec;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new _b(i,f)})},Ec.windowWithTime=function(b,c,d){var e,f=this;return c===a&&(e=b),lb(d)||(d=sc),"number"==typeof c?e=c:lb(c)&&(e=b,d=c),new sd(function(a){function c(){var b=new ec,f=!1,g=!1;l.setDisposable(b),j===i?(f=!0,g=!0):i>j?f=!0:g=!0;var n=f?j:i,o=n-m;m=n,f&&(j+=e),g&&(i+=e),b.setDisposable(d.scheduleWithRelative(o,function(){var b;g&&(b=new vd,k.push(b),a.onNext(Yb(b,h))),f&&(b=k.shift(),b.onCompleted()),c()}))}var g,h,i=e,j=b,k=[],l=new fc,m=0;return g=new _b(l),h=new gc(g),k.push(new vd),a.onNext(Yb(k[0],h)),c(),g.add(f.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(b){for(var c=0,d=k.length;d>c;c++)k[c].onError(b);a.onError(b)},function(){for(var b=0,c=k.length;c>b;b++)k[b].onCompleted();a.onCompleted()})),h})},Ec.windowWithTimeOrCount=function(a,b,c){var d=this;return lb(c)||(c=sc),new sd(function(e){var f,g,h,i,j=0,k=new fc,l=0;return g=new _b(k),h=new gc(g),f=function(b){var d=new ec;k.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){var a;b===l&&(j=0,a=++l,i.onCompleted(),i=new vd,e.onNext(Yb(i,h)),f(a))}))},i=new vd,e.onNext(Yb(i,h)),f(0),g.add(d.subscribe(function(a){var c=0,d=!1;i.onNext(a),j++,j===b&&(d=!0,j=0,c=++l,i.onCompleted(),i=new vd,e.onNext(Yb(i,h))),d&&f(c)},function(a){i.onError(a),e.onError(a)},function(){i.onCompleted(),e.onCompleted()})),h})},Ec.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},Ec.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},Ec.timeInterval=function(a){var b=this;return lb(a)||(a=sc),Mc(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},Ec.timestamp=function(a){return lb(a)||(a=sc),this.map(function(b){return{value:b,timestamp:a.now()}})},Ec.sample=function(a,b){return lb(b)||(b=sc),"number"==typeof a?bb(this,qd(a,b)):bb(this,a)},Ec.timeout=function(a,b,c){b||(b=Sc(new Error("Timeout"))),lb(c)||(c=sc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new sd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(rb(b)&&(b=Lc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new ec,j=new fc,k=!1,l=new fc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new _b(j,l)})},Kc.generateWithAbsoluteTime=function(a,b,c,d,e,f){return lb(f)||(f=sc),new sd(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithAbsolute(f.now(),function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},Kc.generateWithRelativeTime=function(a,b,c,d,e,f){return lb(f)||(f=sc),new sd(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithRelative(0,function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},Ec.delaySubscription=function(a,b){return this.delayWithSelector(rd(a,lb(b)?b:sc),Nc)},Ec.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new sd(function(a){var b=new _b,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new fc,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new ec;b.add(h),h.setDisposable(e.subscribe(function(){a.onNext(c),b.remove(h),g()},a.onError.bind(a),function(){a.onNext(c),b.remove(h),g()}))},a.onError.bind(a),function(){f=!0,h.dispose(),g()}))};return c?h.setDisposable(c.subscribe(function(){i()},a.onError.bind(a),function(){i()})):i(),new _b(h,b)})},Ec.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=Qc()),c||(c=Sc(new Error("Timeout")));var d=this;return new sd(function(e){function f(a){function b(){return k===d}var d=k,f=new ec;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(c.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(c.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new fc,i=new fc,j=new ec;h.setDisposable(j);var k=0,l=!1;return f(a),j.setDisposable(d.subscribe(function(a){if(g()){e.onNext(a);var c;try{c=b(a)}catch(d){return void e.onError(d)}f(rb(c)?Lc(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new _b(h,i)})},Ec.throttleWithSelector=function(a){var b=this;return new sd(function(c){var d,e=!1,f=new fc,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}rb(h)&&(h=Lc(h)),e=!0,d=b,g++;var j=g,k=new ec;f.setDisposable(k),k.setDisposable(h.subscribe(function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()},c.onError.bind(c),function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new _b(h,f)})},Ec.skipLastWithTime=function(a,b){lb(b)||(b=sc);var c=this;return new sd(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},d.onError.bind(d),function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})})},Ec.takeLastWithTime=function(a,b){var c=this;return lb(b)||(b=sc),new sd(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})})},Ec.takeLastBufferWithTime=function(a,b){var c=this;return lb(b)||(b=sc),new sd(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})})},Ec.takeWithTime=function(a,b){var c=this;return lb(b)||(b=sc),new sd(function(d){return new _b(b.scheduleWithRelative(a,d.onCompleted.bind(d)),c.subscribe(d))})},Ec.skipWithTime=function(a,b){var c=this;return lb(b)||(b=sc),new sd(function(d){var e=!1;return new _b(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))})},Ec.skipUntilWithTime=function(a,b){lb(b)||(b=sc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new sd(function(e){var f=!1;return new _b(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},e.onError.bind(e),e.onCompleted.bind(e)))})},Ec.takeUntilWithTime=function(a,b){lb(b)||(b=sc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new sd(function(e){return new _b(b[d](a,e.onCompleted.bind(e)),c.subscribe(e))})},Ec.exclusive=function(){var a=this;return new sd(function(b){var c=!1,d=!1,e=new ec,f=new _b;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,rb(a)&&(a=Lc(a));var e=new ec;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f})},Ec.exclusiveMap=function(a,b){var c=this;return new sd(function(d){var e=0,f=!1,g=!0,h=new ec,i=new _b;return i.add(h),h.setDisposable(c.subscribe(function(c){f||(f=!0,innerSubscription=new ec,i.add(innerSubscription),rb(c)&&(c=Lc(c)),innerSubscription.setDisposable(c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),function(){i.remove(innerSubscription),f=!1,g&&1===i.length&&d.onCompleted()})))},d.onError.bind(d),function(){g=!0,1!==i.length||f||d.onCompleted()})),i})},jb.VirtualTimeScheduler=function(a){function b(){throw new Error("Not implemented")}function c(){return this.toDateTimeOffset(this.clock)}function d(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function e(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function f(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function g(a,b){return b(),dc}function h(b,g){this.clock=b,this.comparer=g,this.isEnabled=!1,this.queue=new Zb(1024),a.call(this,c,d,e,f)}Wb(h,a);var i=h.prototype;return i.add=b,i.toDateTimeOffset=b,i.toRelative=b,i.schedulePeriodicWithState=function(a,b,c){var d=new lc(this,a,b,c);return d.start()},i.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},i.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,g)},i.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},i.stop=function(){this.isEnabled=!1},i.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Error(vb);if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},i.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Error(vb);0!==c&&this.advanceTo(b)},i.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Error(vb);this.clock=b},i.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},i.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,g)},i.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(f),c(a,b)}var e=this,f=new hc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},h}(ic),jb.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||pb;a.call(this,d,e)}Wb(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(jb.VirtualTimeScheduler);var sd=jb.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?cc(a):dc}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new td(a);return nc.scheduleRequired()?nc.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return Wb(c,a),c}(Kc),td=function(a){function b(b){a.call(this),this.observer=b,this.m=new ec}Wb(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Fc),ud=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new sd(function(a){return new _b(e.getDisposable(),d.subscribe(a))}):d}return Wb(c,a),c}(Kc),vd=jb.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),dc):(a.onCompleted(),dc):(this.observers.push(a),new hd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return Wb(d,a),Xb(d.prototype,Cc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new xd(a,b)},d}(Kc),wd=jb.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new hd(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),dc}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return Wb(d,a),Xb(d.prototype,Cc,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Kc),xd=jb.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return Wb(b,a),Xb(b.prototype,Cc,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(Kc);"function"==typeof define&&"object"==typeof define.amd&&define.amd?(eb.Rx=jb,define(function(){return jb})):fb&&gb?hb?(gb.exports=jb).Rx=jb:fb.Rx=jb:eb.Rx=jb}).call(this); -//# sourceMappingURL=rx.all.map \ No newline at end of file +//# sourceMappingURL=rx.all.map diff --git a/dist/rx.async.compat.map b/dist/rx.async.compat.map index a0dbe98ec..0e5a904d5 100644 --- a/dist/rx.async.compat.map +++ b/dist/rx.async.compat.map @@ -1 +1 @@ -{"version":3,"file":"rx.async.compat.min.js","sources":["rx.async.compat.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","toThunk","obj","ctx","Array","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","isPromise","promiseToThunk","fnString","isObject","done","run","fn","key","finished","results","pending","err","res","e","keys","Object","length","constructor","timeoutScheduler","schedule","i","len","promise","then","prototype","subscribe","name","next","throw","val","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","type","relatedTarget","fromElement","toElement","c","charCode","keyChar","String","fromCharCode","createListener","element","handler","addEventListener","disposableCreate","removeEventListener","attachEvent","innerHandler","detachEvent","createEventListener","el","eventName","disposables","CompositeDisposable","toString","add","item","Observable","observableFromPromise","fromPromise","observableThrow","throwException","AnonymousObservable","AsyncSubject","Disposable","create","Scheduler","immediate","timeout","isScheduler","helpers","slice","spawn","isGenFun","exit","bind","ret","arguments","gen","value","TypeError","called","apply","fan","args","hasCallback","pop","error","denodify","callback","push","cb","start","func","context","scheduler","observableToAsync","toAsync","subject","result","onError","onNext","onCompleted","asObservable","fromCallback","selector","observer","publishLast","refCount","fromNodeCallback","config","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","startAsync","functionAsync"],"mappings":";CAEE,SAAUA,GACR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C,SAAUA,GAAKnF,EAAQsF,IAAI5E,EAAWyE,IACtCnB,EAEJ,IAAIW,EACF,MAAOO,GACL,SAAUC,GAAKP,MAAMC,YAAY7E,EAASU,EAAWyE,IACrD,SAAUA,GAAKP,MAAMQ,eAAepF,EAASU,EAAWyE,IACxDnB,EAEJ,IAAIO,EAAI,CACN,GAAIgB,GAAQhB,EAAGvE,EACf,OAAOkF,GACL,SAAUC,GAAKI,EAAMF,GAAG3E,EAAWyE,IACnC,SAAUA,GAAKI,EAAMD,IAAI5E,EAAWyE,IACpCnB,IAGN,MAAO,IAAI3C,GAAoB,SAAU4C,GACvC,MAAOzD,GACLR,EACAU,EACA,SAAkBlD,GAChB,GAAIJ,GAAUI,CAEd,IAAIwG,EACF,IACE5G,EAAU4G,EAAS5B,WACnB,MAAO9E,GAEP,WADA2G,GAASN,QAAQrG,GAKrB2G,EAASL,OAAOxG,OAEnBoI,UAAUrB,WAUf,IAAIe,GAAmBlE,EAAWkE,iBAAmB,SAAUO,EAAYC,EAAe1B,GACxF,MAAO,IAAI3C,GAAoB,SAAU4C,GACvC,QAAS3D,GAAc9C,GACrB,GAAIkG,GAASlG,CACb,IAAIwG,EACF,IACEN,EAASM,EAAS5B,WAClB,MAAO9E,GAEP,WADA2G,GAASN,QAAQrG,GAIrB2G,EAASL,OAAOF,GAGlB,GAAIxE,GAAcuG,EAAWnF,EAC7B,OAAOH,GAAiB,WAClBuF,GACFA,EAAcpF,EAAcpB,OAG/BsG,UAAUrB,WAkBb,OAVFnD,GAAW2E,WAAa,SAAUC,GAChC,GAAI3H,EACJ,KACEA,EAAU2H,IACV,MAAOpI,GACP,MAAO2D,GAAgB3D,GAEzB,MAAOyD,GAAsBhD,IAGtBrC"} \ No newline at end of file +{"version":3,"file":"rx.async.compat.min.js","sources":["rx.async.compat.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","toThunk","obj","ctx","Array","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","isPromise","promiseToThunk","fnString","isObject","done","run","fn","key","finished","results","pending","err","res","e","keys","Object","length","constructor","timeoutScheduler","schedule","i","len","promise","then","prototype","subscribe","name","next","throw","val","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","type","relatedTarget","fromElement","toElement","c","charCode","keyChar","String","fromCharCode","createListener","element","handler","addEventListener","disposableCreate","removeEventListener","attachEvent","innerHandler","detachEvent","createEventListener","el","eventName","disposables","CompositeDisposable","toString","add","item","Observable","observableFromPromise","fromPromise","observableThrow","throwException","AnonymousObservable","AsyncSubject","Disposable","create","Scheduler","immediate","timeout","isScheduler","helpers","slice","spawn","isGenFun","exit","bind","ret","arguments","gen","value","TypeError","called","apply","fan","args","hasCallback","pop","error","denodify","callback","push","cb","start","func","context","scheduler","observableToAsync","toAsync","subject","result","onError","onNext","onCompleted","asObservable","fromCallback","selector","observer","publishLast","refCount","fromNodeCallback","config","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","startAsync","functionAsync"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,aAAc,W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EACA,SAAkBlD,GAChB,GAAIJ,GAAUI,CAEd,IAAIwG,EACF,IACE5G,EAAU4G,EAAS5B,WACnB,MAAO9E,GAEP,WADA2G,GAASN,QAAQrG,GAKrB2G,EAASL,OAAOxG,OAEnBoI,UAAUrB,WAUf,IAAIe,GAAmBlE,EAAWkE,iBAAmB,SAAUO,EAAYC,EAAe1B,GACxF,MAAO,IAAI3C,GAAoB,SAAU4C,GACvC,QAAS3D,GAAc9C,GACrB,GAAIkG,GAASlG,CACb,IAAIwG,EACF,IACEN,EAASM,EAAS5B,WAClB,MAAO9E,GAEP,WADA2G,GAASN,QAAQrG,GAIrB2G,EAASL,OAAOF,GAGlB,GAAIxE,GAAcuG,EAAWnF,EAC7B,OAAOH,GAAiB,WAClBuF,GACFA,EAAcpF,EAAcpB,OAG/BsG,UAAUrB,WAkBb,OAVFnD,GAAW2E,WAAa,SAAUC,GAChC,GAAI3H,EACJ,KACEA,EAAU2H,IACV,MAAOpI,GACP,MAAO2D,GAAgB3D,GAEzB,MAAOyD,GAAsBhD,IAGtBrC"} diff --git a/dist/rx.async.compat.min.js b/dist/rx.async.compat.min.js index fef6f173d..7960615e3 100644 --- a/dist/rx.async.compat.min.js +++ b/dist/rx.async.compat.min.js @@ -1,3 +1,3 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(a,b){return Array.isArray(a)?e.call(b,a):h(a)?y(a.call(b)):i(a)?y(a):g(a)?observableToThunk(a):isPromise(a)?f(a):typeof a===x?a:j(a)||Array.isArray(a)?e.call(b,a):a}function e(a){var b=this;return function(c){function e(a,e){if(!f)try{if(a=d(a,b),typeof a!==x)return i[e]=a,--h||c(null,i);a.call(b,function(a,b){if(!f){if(a)return f=!0,c(a);i[e]=b,--h||c(null,i)}})}catch(g){f=!0,c(g)}}var f,g=Object.keys(a),h=g.length,i=new a.constructor;if(!h)return void u.schedule(function(){c(null,i)});for(var j=0,k=g.length;k>j;j++)e(a[g[j]],g[j])}}function f(a){return function(b){a.then(function(a){b(null,a)},b)}}function g(a){return a&&a.prototype.subscribe===x}function h(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function i(a){return a&&typeof a.next===x&&typeof a.throw===x}function j(a){return a&&a.constructor===Object}function k(b){var c=function(){this.cancelBubble=!0},d=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(b||(b=a.event),!b.target)switch(b.target=b.target||b.srcElement,"mouseover"==b.type&&(b.relatedTarget=b.fromElement),"mouseout"==b.type&&(b.relatedTarget=b.toElement),b.stopPropagation||(b.stopPropagation=c,b.preventDefault=d),b.type){case"keypress":var e="charCode"in b?b.charCode:b.keyCode;10==e?(e=0,b.keyCode=13):13==e||27==e?e=0:3==e&&(e=99),b.charCode=e,b.keyChar=b.charCode?String.fromCharCode(b.charCode):""}return b}function l(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),s(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(k(a))};return a.attachEvent("on"+b,d),s(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,s(function(){a["on"+b]=null})}function m(a,b,c){var d=new t;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(m(a.item(e),b,c));else a&&d.add(l(a,b,c));return d}var n=c.Observable,o=(n.prototype,n.fromPromise),p=n.throwException,q=c.AnonymousObservable,r=c.AsyncSubject,s=c.Disposable.create,t=c.CompositeDisposable,u=(c.Scheduler.immediate,c.Scheduler.timeout),v=c.helpers.isScheduler,w=Array.prototype.slice,x="function",y=c.spawn=function(a){var b=h(a);return function(c){function e(a,b){u.schedule(c.bind(g,a,b))}function f(a,b){var c;if(arguments.length>2&&(b=w.call(arguments,1)),a)try{c=h.throw(a)}catch(i){return e(i)}if(!a)try{c=h.next(b)}catch(i){return e(i)}if(c.done)return e(null,c.value);if(c.value=d(c.value,g),typeof c.value!==x)f(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var j=!1;try{c.value.call(g,function(){j||(j=!0,f.apply(g,arguments))})}catch(i){u.schedule(function(){j||(j=!0,f.call(g,i))})}}}var g=this,h=fan;if(b){var i=w.call(arguments),j=i.length,k=j&&typeof i[j-1]===x;c=k?i.pop():error,h=a.apply(this,i)}else c=c||error;f()}};c.denodify=function(a){return function(){var b,c,d,e=w.call(arguments);return e.push(function(){b=arguments,d&&!c&&(c=!0,cb.apply(this,b))}),a.apply(this,e),function(a){d=a,b&&!c&&(c=!0,a.apply(this,b))}}},n.start=function(a,b,c){return z(a,b,c)()};var z=n.toAsync=function(a,b,c){return v(c)||(c=u),function(){var d=arguments,e=new r;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};n.fromCallback=function(a,b,c){return function(){var d=w.call(arguments,0);return new q(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},n.fromNodeCallback=function(a,b,c){return function(){var d=w.call(arguments,0);return new q(function(e){function f(a){if(a)return void e.onError(a);var b=w.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},c.config.useNativeEvents=!1;var A=a.angular&&angular.element?angular.element:a.jQuery?a.jQuery:a.Zepto?a.Zepto:null,B=!!a.Ember&&"function"==typeof a.Ember.addListener,C=!!a.Backbone&&!!a.Backbone.Marionette;n.fromEvent=function(a,b,d){if(a.addListener)return D(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d);if(!c.config.useNativeEvents){if(C)return D(function(c){a.on(b,c)},function(c){a.off(b,c)},d);if(B)return D(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},d);if(A){var e=A(a);return D(function(a){e.on(b,a)},function(a){e.off(b,a)},d)}}return new q(function(c){return m(a,b,function(a){var b=a;if(d)try{b=d(arguments)}catch(e){return void c.onError(e)}c.onNext(b)})}).publish().refCount()};var D=n.fromEventPattern=function(a,b,c){return new q(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return s(function(){b&&b(e,f)})}).publish().refCount()};return n.startAsync=function(a){var b;try{b=a()}catch(c){return p(c)}return o(b)},c}); -//# sourceMappingURL=rx.async.compat.map \ No newline at end of file +//# sourceMappingURL=rx.async.compat.map diff --git a/dist/rx.async.map b/dist/rx.async.map index 88071aebd..b84de35cf 100644 --- a/dist/rx.async.map +++ b/dist/rx.async.map @@ -1 +1 @@ -{"version":3,"file":"rx.async.min.js","sources":["rx.async.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","toThunk","obj","ctx","Array","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","isPromise","promiseToThunk","fnString","isObject","done","run","fn","key","finished","results","pending","err","res","e","keys","Object","length","constructor","timeoutScheduler","schedule","i","len","promise","then","prototype","subscribe","name","next","throw","val","createListener","element","handler","addEventListener","disposableCreate","removeEventListener","Error","createEventListener","el","eventName","disposables","CompositeDisposable","toString","add","item","Observable","observableFromPromise","fromPromise","observableThrow","throwException","AnonymousObservable","AsyncSubject","Disposable","create","Scheduler","immediate","timeout","isScheduler","helpers","slice","spawn","isGenFun","exit","bind","ret","arguments","gen","value","TypeError","called","apply","fan","args","hasCallback","pop","error","denodify","callback","push","cb","start","func","context","scheduler","observableToAsync","toAsync","subject","result","onError","onNext","onCompleted","asObservable","fromCallback","selector","observer","publishLast","refCount","fromNodeCallback","config","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","innerHandler","returnValue","startAsync","functionAsync"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,aAAc,WAAY,SAAUE,EAAIR,GAE5C,MADAJ,GAAKY,GAAKpB,EAAQQ,EAAMI,EAASQ,GAC1BZ,EAAKY,KAES,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,GAkBhC,QAASI,GAAQC,EAAKC,GACpB,MAAIC,OAAMC,QAAQH,GAC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AUf,IAAIe,GAAmBlE,EAAWkE,iBAAmB,SAAUO,EAAYC,EAAe1B,GACxF,MAAO,IAAI3C,GAAoB,SAAU4C,GACvC,QAAS0B,GAAc3G,GACrB,GAAI0E,GAAS1E,CACb,IAAIgF,EACF,IACEN,EAASM,EAAS5B,WAClB,MAAOtD,GAEP,WADAmF,GAASN,QAAQ7E,GAIrBmF,EAASL,OAAOF,GAGlB,GAAIkC,GAAcH,EAAWE,EAC7B,OAAOtF,GAAiB,WAClBqF,GACFA,EAAcC,EAAcC,OAG/BJ,UAAUrB,WAkBb,OAVFnD,GAAW6E,WAAa,SAAUC,GAChC,GAAIrG,EACJ,KACEA,EAAUqG,IACV,MAAO9G,GACP,MAAOmC,GAAgBnC,GAEzB,MAAOiC,GAAsBxB,IAGtBrC"} \ No newline at end of file +{"version":3,"file":"rx.async.min.js","sources":["rx.async.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","toThunk","obj","ctx","Array","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","isPromise","promiseToThunk","fnString","isObject","done","run","fn","key","finished","results","pending","err","res","e","keys","Object","length","constructor","timeoutScheduler","schedule","i","len","promise","then","prototype","subscribe","name","next","throw","val","createListener","element","handler","addEventListener","disposableCreate","removeEventListener","Error","createEventListener","el","eventName","disposables","CompositeDisposable","toString","add","item","Observable","observableFromPromise","fromPromise","observableThrow","throwException","AnonymousObservable","AsyncSubject","Disposable","create","Scheduler","immediate","timeout","isScheduler","helpers","slice","spawn","isGenFun","exit","bind","ret","arguments","gen","value","TypeError","called","apply","fan","args","hasCallback","pop","error","denodify","callback","push","cb","start","func","context","scheduler","observableToAsync","toAsync","subject","result","onError","onNext","onCompleted","asObservable","fromCallback","selector","observer","publishLast","refCount","fromNodeCallback","config","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","innerHandler","returnValue","startAsync","functionAsync"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,aAAc,WAAY,SAAUE,EAAIR,GAE5C,MADAJ,GAAKY,GAAKpB,EAAQQ,EAAMI,EAASQ,GAC1BZ,EAAKY,KAES,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,GAkBhC,QAASI,GAAQC,EAAKC,GACpB,MAAIC,OAAMC,QAAQH,GACTI,EAAcP,KAAKI,EAAKD,GAG7BK,EAAoBL,GACfM,EAAgBN,EAAIH,KAAKI,IAG9BM,EAAYP,GACPM,EAAgBN,GAGrBQ,EAAaR,GACRS,kBAAkBT,GAGvBU,UAAUV,GACLW,EAAeX,SAGbA,KAAQY,EACVZ,EAGLa,EAASb,IAAQE,MAAMC,QAAQH,GAC1BI,EAAcP,KAAKI,EAAKD,GAG1BA,EAGT,QAASI,GAAcJ,GACrB,GAAIC,GAAMhB,IAEV,OAAO,UAAU6B,GAef,QAASC,GAAIC,EAAIC,GACf,IAAIC,EACJ,IAGE,GAFAF,EA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AAUC,GAChC,GAAIrG,EACJ,KACEA,EAAUqG,IACV,MAAO9G,GACP,MAAOmC,GAAgBnC,GAEzB,MAAOiC,GAAsBxB,IAGtBrC"} diff --git a/dist/rx.async.min.js b/dist/rx.async.min.js index cacaea688..afcc9adb5 100644 --- a/dist/rx.async.min.js +++ b/dist/rx.async.min.js @@ -1,3 +1,3 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(a,b){return Array.isArray(a)?e.call(b,a):h(a)?x(a.call(b)):i(a)?x(a):g(a)?observableToThunk(a):isPromise(a)?f(a):typeof a===w?a:j(a)||Array.isArray(a)?e.call(b,a):a}function e(a){var b=this;return function(c){function e(a,e){if(!f)try{if(a=d(a,b),typeof a!==w)return i[e]=a,--h||c(null,i);a.call(b,function(a,b){if(!f){if(a)return f=!0,c(a);i[e]=b,--h||c(null,i)}})}catch(g){f=!0,c(g)}}var f,g=Object.keys(a),h=g.length,i=new a.constructor;if(!h)return void t.schedule(function(){c(null,i)});for(var j=0,k=g.length;k>j;j++)e(a[g[j]],g[j])}}function f(a){return function(b){a.then(function(a){b(null,a)},b)}}function g(a){return a&&a.prototype.subscribe===w}function h(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function i(a){return a&&typeof a.next===w&&typeof a.throw===w}function j(a){return a&&a.constructor===Object}function k(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),r(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function l(a,b,c){var d=new s;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(l(a.item(e),b,c));else a&&d.add(k(a,b,c));return d}var m=c.Observable,n=(m.prototype,m.fromPromise),o=m.throwException,p=c.AnonymousObservable,q=c.AsyncSubject,r=c.Disposable.create,s=c.CompositeDisposable,t=(c.Scheduler.immediate,c.Scheduler.timeout),u=c.helpers.isScheduler,v=Array.prototype.slice,w="function",x=c.spawn=function(a){var b=h(a);return function(c){function e(a,b){t.schedule(c.bind(g,a,b))}function f(a,b){var c;if(arguments.length>2&&(b=v.call(arguments,1)),a)try{c=h.throw(a)}catch(i){return e(i)}if(!a)try{c=h.next(b)}catch(i){return e(i)}if(c.done)return e(null,c.value);if(c.value=d(c.value,g),typeof c.value!==w)f(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var j=!1;try{c.value.call(g,function(){j||(j=!0,f.apply(g,arguments))})}catch(i){t.schedule(function(){j||(j=!0,f.call(g,i))})}}}var g=this,h=fan;if(b){var i=v.call(arguments),j=i.length,k=j&&typeof i[j-1]===w;c=k?i.pop():error,h=a.apply(this,i)}else c=c||error;f()}};c.denodify=function(a){return function(){var b,c,d,e=v.call(arguments);return e.push(function(){b=arguments,d&&!c&&(c=!0,cb.apply(this,b))}),a.apply(this,e),function(a){d=a,b&&!c&&(c=!0,a.apply(this,b))}}},m.start=function(a,b,c){return y(a,b,c)()};var y=m.toAsync=function(a,b,c){return u(c)||(c=t),function(){var d=arguments,e=new q;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};m.fromCallback=function(a,b,c){return function(){var d=v.call(arguments,0);return new p(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},m.fromNodeCallback=function(a,b,c){return function(){var d=v.call(arguments,0);return new p(function(e){function f(a){if(a)return void e.onError(a);var b=v.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},c.config.useNativeEvents=!1;var z=a.angular&&angular.element?angular.element:a.jQuery?a.jQuery:a.Zepto?a.Zepto:null,A=!!a.Ember&&"function"==typeof a.Ember.addListener,B=!!a.Backbone&&!!a.Backbone.Marionette;m.fromEvent=function(a,b,d){if(a.addListener)return C(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d);if(!c.config.useNativeEvents){if(B)return C(function(c){a.on(b,c)},function(c){a.off(b,c)},d);if(A)return C(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},d);if(z){var e=z(a);return C(function(a){e.on(b,a)},function(a){e.off(b,a)},d)}}return new p(function(c){return l(a,b,function(a){var b=a;if(d)try{b=d(arguments)}catch(e){return void c.onError(e)}c.onNext(b)})}).publish().refCount()};var C=m.fromEventPattern=function(a,b,c){return new p(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return r(function(){b&&b(e,f)})}).publish().refCount()};return m.startAsync=function(a){var b;try{b=a()}catch(c){return o(c)}return n(b)},c}); -//# sourceMappingURL=rx.async.map \ No newline at end of file +//# sourceMappingURL=rx.async.map diff --git a/dist/rx.backpressure.map b/dist/rx.backpressure.map index 22b4eaee7..6ecb19483 100644 --- a/dist/rx.backpressure.map +++ b/dist/rx.backpressure.map @@ -1 +1 @@ -{"version":3,"file":"rx.backpressure.min.js","sources":["rx.backpressure.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","checkDisposed","isDisposed","Error","objectDisposed","combineLatestSource","source","subject","resultSelector","AnonymousObservable","observer","next","x","i","values","res","hasValue","hasValueAll","every","identity","apply","ex","onError","onNext","isDone","onCompleted","n","Array","CompositeDisposable","subscribe","bind","Observable","observableProto","prototype","Subject","Observer","disposableEmpty","Disposable","empty","disposableCreate","create","inherits","internals","addProperties","Scheduler","timeout","helpers","PausableObservable","_super","conn","publish","subscription","connection","pausable","pauser","distinctUntilChanged","b","connect","dispose","controller","merge","pause","resume","PausableBufferedObservable","previousShouldFire","q","startWith","data","shouldFire","results","length","shift","push","err","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","multicast","refCount","request","numberOfItems","queue","requestedCount","requestedDisposable","error","hasFailed","hasCompleted","controlledDisposable","value","hasRequested","disposeCurrentRequest","_processRequest","returnValue","self","r"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,EAAIb,GAiBpC,QAASiB,KAAkB,GAAId,KAAKe,WAAc,KAAM,IAAIC,OAA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Db,QAAS,SAAUnG,GACfmB,EAAcF,KAAKZ,MACnBA,KAAKyG,uBACL,IAAIG,GAAO5G,KACP6G,EAAI7G,KAAK0G,gBAAgB/G,EAG7B,OADAA,GAASkH,EAAEd,cACNc,EAAEF,YAQI1D,GAPPjD,KAAKiG,eAAiBtG,EACtBK,KAAKkG,oBAAsB9C,EAAiB,WACxCwD,EAAKX,eAAiB,IAGnBjG,KAAKkG,sBAKpBO,sBAAuB,WACnBzG,KAAKkG,oBAAoB3B,UACzBvE,KAAKkG,oBAAsBjD,GAG/BsB,QAAS,WACLvE,KAAKe,YAAa,EAClBf,KAAKmG,MAAQ,KACbnG,KAAKoB,QAAQmD,UACbvE,KAAKkG,oBAAoB3B,aAI1BoB,GACT/C,EAEF,OAAOlC"} \ No newline at end of file +{"version":3,"file":"rx.backpressure.min.js","sources":["rx.backpressure.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","checkDisposed","isDisposed","Error","objectDisposed","combineLatestSource","source","subject","resultSelector","AnonymousObservable","observer","next","x","i","values","res","hasValue","hasValueAll","every","identity","apply","ex","onError","onNext","isDone","onCompleted","n","Array","CompositeDisposable","subscribe","bind","Observable","observableProto","prototype","Subject","Observer","disposableEmpty","Disposable","empty","disposableCreate","create","inherits","internals","addProperties","Scheduler","timeout","helpers","PausableObservable","_super","conn","publish","subscription","connection","pausable","pauser","distinctUntilChanged","b","connect","dispose","controller","merge","pause","resume","PausableBufferedObservable","previousShouldFire","q","startWith","data","shouldFire","results","length","shift","push","err","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","multicast","refCount","request","numberOfItems","queue","requestedCount","requestedDisposable","error","hasFailed","hasCompleted","controlledDisposable","value","hasRequested","disposeCurrentRequest","_processRequest","returnValue","self","r"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EAC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/dist/rx.backpressure.min.js @@ -1,3 +1,3 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(){if(this.isDisposed)throw new Error(r)}function f(a,b,c){return new i(function(d){function e(a,b){k[b]=a;var e;if(g[b]=!0,h||(h=g.every(q))){try{e=c.apply(null,k)}catch(f){return void d.onError(f)}d.onNext(e)}else i&&d.onCompleted()}var f=2,g=[!1,!1],h=!1,i=!1,k=new Array(f);return new j(a.subscribe(function(a){e(a,0)},d.onError.bind(d),function(){i=!0,d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d)))})}var g=c.Observable,h=g.prototype,i=c.AnonymousObservable,j=c.CompositeDisposable,k=c.Subject,l=c.Observer,m=c.Disposable.empty,n=c.Disposable.create,o=c.internals.inherits,p=c.internals.addProperties,q=(c.Scheduler.timeout,c.helpers.identity),r="Object has been disposed",s=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=m,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=m)});return new j(c,d,e)}function c(c,d){this.source=c,this.controller=new k,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return o(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(g);h.pausable=function(a){return new s(this,a)};var t=function(a){function b(a){var b,c=[],e=f(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(b!==d&&e.shouldFire!=b){if(b=e.shouldFire,e.shouldFire)for(;c.length>0;)a.onNext(c.shift())}else b=e.shouldFire,e.shouldFire?a.onNext(e.data):c.push(e.data)},function(b){for(;c.length>0;)a.onNext(c.shift());a.onError(b)},function(){for(;c.length>0;)a.onNext(c.shift());a.onCompleted()});return e}function c(c,d){this.source=c,this.controller=new k,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return o(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(g);h.pausableBuffered=function(a){return new t(this,a)},h.controlled=function(a){return null==a&&(a=!0),new u(this,a)};var u=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new v(d),this.source=c.multicast(this.subject).refCount()}return o(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(g),v=c.ControlledSubject=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new k,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=m,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=m}return o(c,a),p(c.prototype,l,{onCompleted:function(){e.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){e.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){e.call(this);var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=m):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=m),{numberOfItems:a,returnValue:!1}},request:function(a){e.call(this),this.disposeCurrentRequest();var b=this,c=this._processRequest(a);return a=c.numberOfItems,c.returnValue?m:(this.requestedCount=a,this.requestedDisposable=n(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=m},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),c}(g);return c}); -//# sourceMappingURL=rx.backpressure.map \ No newline at end of file +//# sourceMappingURL=rx.backpressure.map diff --git a/dist/rx.binding.map b/dist/rx.binding.map index 234f02440..7bb028974 100644 --- a/dist/rx.binding.map +++ b/dist/rx.binding.map @@ -1 +1 @@ -{"version":3,"file":"rx.binding.min.js","sources":["rx.binding.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","checkDisposed","isDisposed","Error","objectDisposed","Observable","observableProto","prototype","AnonymousObservable","Subject","AsyncSubject","Observer","ScheduledObserver","internals","disposableCreate","Disposable","create","disposableEmpty","empty","CompositeDisposable","currentThreadScheduler","Scheduler","currentThread","isFunction","helpers","inherits","addProperties","multicast","subjectOrSubjectSelector","selector","source","observer","connectable","subscribe","connect","ConnectableObservable","publish","share","refCount","publishLast","publishValue","initialValueOrSelector","initialValue","arguments","length","BehaviorSubject","shareValue","replay","bufferSize","scheduler","ReplaySubject","shareReplay","InnerSubscription","subject","dispose","idx","observers","indexOf","splice","__super__","isStopped","push","onNext","value","ex","exception","onError","onCompleted","hasObservers","i","os","slice","len","error","createRemovableDisposable","so","subscription","_trim","now","n","q","hasError","ensureActive","windowSize","Number","MAX_VALUE","shift","interval","o","hasSubscription","sourceObservable","asObservable","bind","connectableSubscription","count","shouldConnect"],"mappings":";CAEE,SAAUA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KAAKqE,eAKPW,YAAa,WAEX,GADAlE,EAAcF,KAAKZ,OACfA,KAAKyE,UAAT,CACAzE,KAAKyE,WAAY,CACjB,IAAIkB,GAAM3F,KAAK8D,UAAU6B,KACzB3F,MAAK0F,MAAMC,EAEX,KAAK,GADDU,GAAIrG,KAAKqE,UAAUe,MAAM,GACpBF,EAAI,EAAGG,EAAMgB,EAAE5C,OAAY4B,EAAJH,EAASA,IAAK,CAC5C,GAAItC,GAAWyD,EAAEnB,EACjBtC,GAASoC,cACTpC,EAASmD,eAEX/F,KAAKqE,eAKPF,QAAS,WACPnE,KAAKe,YAAa,EAClBf,KAAKqE,UAAY,QAIdN,GACP7C,GAEE8B,EAAwBtC,EAAGsC,sBAAyB,SAAUwB,GAGhE,QAASxB,GAAsBL,EAAQuB,GACrC,GACEuB,GADEa,GAAkB,EAEpBC,EAAmB5D,EAAO6D,cAE5BxG,MAAK+C,QAAU,WAOb,MANKuD,KACHA,GAAkB,EAClBb,EAAe,GAAIzD,GAAoBuE,EAAiBzD,UAAUoB,GAAUvC,EAAiB,WAC3F2E,GAAkB,MAGfb,GAGTjB,EAAU5D,KAAKZ,KAAMkE,EAAQpB,UAAU2D,KAAKvC,IAgB9C,MAjCA5B,GAASU,EAAuBwB,GAoBhCxB,EAAsB5B,UAAU+B,SAAW,WACzC,GAAIuD,GAAyBC,EAAQ,EAAGhE,EAAS3C,IACjD,OAAO,IAAIqB,GAAoB,SAAUuB,GACrC,GAAIgE,GAA4B,MAAVD,EACpBlB,EAAe9C,EAAOG,UAAUF,EAElC,OADAgE,KAAkBF,EAA0B/D,EAAOI,WAC5C,WACL0C,EAAatB,UACD,MAAVwC,GAAeD,EAAwBvC,cAK1CnB,GACP9B,EAEA,OAAOR"} \ No newline at end of file +{"version":3,"file":"rx.binding.min.js","sources":["rx.binding.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","checkDisposed","isDisposed","Error","objectDisposed","Observable","observableProto","prototype","AnonymousObservable","Subject","AsyncSubject","Observer","ScheduledObserver","internals","disposableCreate","Disposable","create","disposableEmpty","empty","CompositeDisposable","currentThreadScheduler","Scheduler","currentThread","isFunction","helpers","inherits","addProperties","multicast","subjectOrSubjectSelector","selector","source","observer","connectable","subscribe","connect","ConnectableObservable","publish","share","refCount","publishLast","publishValue","initialValueOrSelector","initialValue","arguments","length","BehaviorSubject","shareValue","replay","bufferSize","scheduler","ReplaySubject","shareReplay","InnerSubscription","subject","dispose","idx","observers","indexOf","splice","__super__","isStopped","push","onNext","value","ex","exception","onError","onCompleted","hasObservers","i","os","slice","len","error","createRemovableDisposable","so","subscription","_trim","now","n","q","hasError","ensureActive","windowSize","Number","MAX_VALUE","shift","interval","o","hasSubscription","sourceObservable","asObservable","bind","connectableSubscription","count","shouldConnect"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,GAmBhC,QAASI,KAC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B,MAGfb,GAGTjB,EAAU5D,KAAKZ,KAAMkE,EAAQpB,UAAU2D,KAAKvC,IAgB9C,MAjCA5B,GAASU,EAAuBwB,GAoBhCxB,EAAsB5B,UAAU+B,SAAW,WACzC,GAAIuD,GAAyBC,EAAQ,EAAGhE,EAAS3C,IACjD,OAAO,IAAIqB,GAAoB,SAAUuB,GACrC,GAAIgE,GAA4B,MAAVD,EACpBlB,EAAe9C,EAAOG,UAAUF,EAElC,OADAgE,KAAkBF,EAA0B/D,EAAOI,WAC5C,WACL0C,EAAatB,UACD,MAAVwC,GAAeD,EAAwBvC,cAK1CnB,GACP9B,EAEA,OAAOR"} diff --git a/dist/rx.binding.min.js b/dist/rx.binding.min.js index ab5f31c64..5498924b4 100644 --- a/dist/rx.binding.min.js +++ b/dist/rx.binding.min.js @@ -1,3 +1,3 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(){if(this.isDisposed)throw new Error(s)}var e=c.Observable,f=e.prototype,g=c.AnonymousObservable,h=c.Subject,i=c.AsyncSubject,j=c.Observer,k=c.internals.ScheduledObserver,l=c.Disposable.create,m=c.Disposable.empty,n=c.CompositeDisposable,o=c.Scheduler.currentThread,p=c.helpers.isFunction,q=c.internals.inherits,r=c.internals.addProperties,s="Object has been disposed";f.multicast=function(a,b){var c=this;return"function"==typeof a?new g(function(d){var e=c.multicast(a());return new n(b(e).subscribe(d),e.connect())}):new w(c,a)},f.publish=function(a){return a&&p(a)?this.multicast(function(){return new h},a):this.multicast(new h)},f.share=function(){return this.publish().refCount()},f.publishLast=function(a){return a&&p(a)?this.multicast(function(){return new i},a):this.multicast(new i)},f.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new u(b)},a):this.multicast(new u(a))},f.shareValue=function(a){return this.publishValue(a).refCount()},f.replay=function(a,b,c,d){return a&&p(a)?this.multicast(function(){return new v(b,c,d)},a):this.multicast(new v(b,c,d))},f.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var t=function(a,b){this.subject=a,this.observer=b};t.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var u=c.BehaviorSubject=function(a){function b(a){if(d.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new t(this,a);var b=this.exception;return b?a.onError(b):a.onCompleted(),m}function c(c){a.call(this,b),this.value=c,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return q(c,a),r(c.prototype,j,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(d.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=this.observers.slice(0),c=b.length;c>a;a++)b[a].onCompleted();this.observers=[]}},onError:function(a){if(d.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var b=0,c=this.observers.slice(0),e=c.length;e>b;b++)c[b].onError(a);this.observers=[]}},onNext:function(a){if(d.call(this),!this.isStopped){this.value=a;for(var b=0,c=this.observers.slice(0),e=c.length;e>b;b++)c[b].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),c}(e),v=c.ReplaySubject=function(a){function b(a,b){return l(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function c(a){var c=new k(this.scheduler,a),e=b(this,c);d.call(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)c.onNext(this.q[g].value);return this.hasError?(f++,c.onError(this.error)):this.isStopped&&(f++,c.onCompleted()),c.ensureActive(f),e}function e(b,d,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==d?Number.MAX_VALUE:d,this.scheduler=e||o,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,c)}return q(e,a),r(e.prototype,j,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(d.call(this),!this.isStopped){var b=this.scheduler.now();this.q.push({interval:b,value:a}),this._trim(b);for(var c=this.observers.slice(0),e=0,f=c.length;f>e;e++){var g=c[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(d.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var b=this.scheduler.now();this._trim(b);for(var c=this.observers.slice(0),e=0,f=c.length;f>e;e++){var g=c[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(d.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var b=this.observers.slice(0),c=0,e=b.length;e>c;c++){var f=b[c];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(e),w=c.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new n(f.subscribe(c),l(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return q(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new g(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(e);return c}); -//# sourceMappingURL=rx.binding.map \ No newline at end of file +//# sourceMappingURL=rx.binding.map diff --git a/dist/rx.coincidence.map b/dist/rx.coincidence.map index b48995604..c47f8c5b6 100644 --- a/dist/rx.coincidence.map +++ b/dist/rx.coincidence.map @@ -1 +1 @@ -{"version":3,"file":"rx.coincidence.min.js","sources":["rx.coincidence.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","observableWindowWithBounaries","windowBoundaries","source","AnonymousObservable","observer","Subject","d","CompositeDisposable","r","RefCountDisposable","onNext","addRef","add","subscribe","x","err","onError","onCompleted","observableWindowWithClosingSelector","createWindowClose","m","SerialDisposable","ex","m1","windowClose","exception","SingleAssignmentDisposable","setDisposable","take","noop","Observable","observableProto","prototype","empty","observableNever","never","Observer","create","internals","defaultComparer","isEqual","helpers","identity","Dictionary","isPrime","candidate","num1","Math","sqrt","num2","getPrime","min","index","num","primes","length","stringHashFn","str","hash","i","len","character","charCodeAt","numberHashFn","key","c2","newEntry","value","next","hashCode","capacity","comparer","Error","_initialize","freeCount","size","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","obj","Date","valueOf","RegExp","toString","id","dictionaryProto","prime","buckets","Array","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","remove","clear","_findEntry","count","tryGetValue","entry","getValues","results","get","set","containskey","join","right","leftDurationSelector","rightDurationSelector","resultSelector","left","group","leftDone","rightDone","leftId","rightId","leftMap","rightMap","md","duration","expire","e","bind","forEach","v","result","exn","handleError","s","buffer","apply","arguments","selectMany","toArray","windowOpeningsOrClosingSelector","pairwise","previous","hasPrevious","partition","predicate","thisArg","published","publish","refCount","filter","o","groupBy","keySelector","elementSelector","groupByUntil","durationSelector","item","map","groupDisposable","refCountDisposable","fireNewMapEntry","writer","GroupedObservable","durationGroup","element","__super__","underlyingObservable","mergedDisposable","getDisposable","inherits"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa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,OAAOxC"} \ No newline at end of file +{"version":3,"file":"rx.coincidence.min.js","sources":["rx.coincidence.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","observableWindowWithBounaries","windowBoundaries","source","AnonymousObservable","observer","Subject","d","CompositeDisposable","r","RefCountDisposable","onNext","addRef","add","subscribe","x","err","onError","onCompleted","observableWindowWithClosingSelector","createWindowClose","m","SerialDisposable","ex","m1","windowClose","exception","SingleAssignmentDisposable","setDisposable","take","noop","Observable","observableProto","prototype","empty","observableNever","never","Observer","create","internals","defaultComparer","isEqual","helpers","identity","Dictionary","isPrime","candidate","num1","Math","sqrt","num2","getPrime","min","index","num","primes","length","stringHashFn","str","hash","i","len","character","charCodeAt","numberHashFn","key","c2","newEntry","value","next","hashCode","capacity","comparer","Error","_initialize","freeCount","size","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","obj","Date","valueOf","RegExp","toString","id","dictionaryProto","prime","buckets","Array","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","remove","clear","_findEntry","count","tryGetValue","entry","getValues","results","get","set","containskey","join","right","leftDurationSelector","rightDurationSelector","resultSelector","left","group","leftDone","rightDone","leftId","rightId","leftMap","rightMap","md","duration","expire","e","bind","forEach","v","result","exn","handleError","s","buffer","apply","arguments","selectMany","toArray","windowOpeningsOrClosingSelector","pairwise","previous","hasPrevious","partition","predicate","thisArg","published","publish","refCount","filter","o","groupBy","keySelector","elementSelector","groupByUntil","durationSelector","item","map","groupDisposable","refCountDisposable","fireNewMapEntry","writer","GroupedObservable","durationGroup","element","__super__","underlyingObservable","mergedDisposable","getDisposable","inherits"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAm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/rx.coincidence.min.js b/dist/rx.coincidence.min.js index c9ff05b49..474a6a420 100644 --- a/dist/rx.coincidence.min.js +++ b/dist/rx.coincidence.min.js @@ -1,3 +1,3 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b){return a.groupJoin(this,b,function(){return o()},function(a,b){return b})}function f(a){var b=this;return new q(function(c){var d=new m,e=new i,f=new j(e);return c.onNext(r(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),e.add(a.subscribe(function(){d.onCompleted(),d=new m,c.onNext(r(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f})}function g(a){var b=this;return new q(function(c){var d,e=new l,f=new i(e),g=new j(f),h=new m;return c.onNext(r(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d=function(){var b,f;try{f=a()}catch(i){return void c.onError(i)}b=new k,e.setDisposable(b),b.setDisposable(f.take(1).subscribe(t,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new m,c.onNext(r(h,g)),d()}))},d(),g})}var h=c.Observable,i=c.CompositeDisposable,j=c.RefCountDisposable,k=c.SingleAssignmentDisposable,l=c.SerialDisposable,m=c.Subject,n=h.prototype,o=h.empty,p=h.never,q=c.AnonymousObservable,r=(c.Observer.create,c.internals.addRef),s=c.internals.isEqual,t=c.helpers.noop,u=c.helpers.identity,v=function(){function a(a){if(a&!1)return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function b(b){var c,d,e;for(c=0;c=b)return d;for(e=1|b;ec;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||s,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return c(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return c(b.toString());if("function"==typeof b.valueOf){var d=b.valueOf();if("number"==typeof d)return e(d);if("string"==typeof b)return c(d)}if(b.getHashCode)return b.getHashCode();var f=17*a++;return b.getHashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var c,d=b(a);for(this.buckets=new Array(d),this.entries=new Array(d),c=0;d>c;c++)this.buckets[c]=-1,this.entries[c]=f();this.freeList=-1},l.add=function(a,b){return this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=b(2*this.size),c=new Array(a);for(e=0;ee;++e)d[e]=f();for(var g=0;g=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(a){var b=this._findEntry(a);return b>=0?this.entries[b].value:d},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();n.join=function(a,b,c,d){var e=this;return new q(function(f){var g=new i,h=!1,j=!1,l=0,m=0,n=new v,o=new v;return g.add(e.subscribe(function(a){var c=l++,e=new k;n.add(c,a),g.add(e);var i,j=function(){n.remove(c)&&0===n.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(m){return void f.onError(m)}e.setDisposable(i.take(1).subscribe(t,f.onError.bind(f),j)),o.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(j||0===n.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=m++,e=new k;o.add(b,a),g.add(e);var h,i=function(){o.remove(b)&&0===o.count()&&j&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(l){return void f.onError(l)}e.setDisposable(h.take(1).subscribe(t,f.onError.bind(f),i)),n.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){j=!0,(h||0===o.count())&&f.onCompleted()})),g})},n.groupJoin=function(a,b,c,d){var e=this;return new q(function(f){function g(a){return function(b){b.onError(a)}}var h=new i,l=new j(h),n=new v,o=new v,p=0,q=0;return h.add(e.subscribe(function(a){var c=new m,e=p++;n.add(e,c);var i;try{i=d(a,r(c,l))}catch(j){return n.getValues().forEach(g(j)),void f.onError(j)}f.onNext(i),o.getValues().forEach(function(a){c.onNext(a)});var q=new k;h.add(q);var s,u=function(){n.remove(e)&&c.onCompleted(),h.remove(q)};try{s=b(a)}catch(j){return n.getValues().forEach(g(j)),void f.onError(j)}q.setDisposable(s.take(1).subscribe(t,function(a){n.getValues().forEach(g(a)),f.onError(a)},u))},function(a){n.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=q++;o.add(b,a);var d=new k;h.add(d);var e,i=function(){o.remove(b),h.remove(d)};try{e=c(a)}catch(j){return n.getValues().forEach(g(j)),void f.onError(j)}d.setDisposable(e.take(1).subscribe(t,function(a){n.getValues().forEach(g(a)),f.onError(a)},i)),n.getValues().forEach(function(b){b.onNext(a)})},function(a){n.getValues().forEach(g(a)),f.onError(a)})),l})},n.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},n.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?f.call(this,a):"function"==typeof a?g.call(this,a):e.call(this,a,b)},n.pairwise=function(){var a=this;return new q(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))})},n.partition=function(a,b){var c=this.publish().refCount();return[c.filter(a,b),c.filter(function(c,d,e){return!a.call(b,c,d,e)})]},n.groupBy=function(a,b,c){return this.groupByUntil(a,b,p,c)},n.groupByUntil=function(a,b,c,d){var e=this;return b||(b=u),d||(d=s),new q(function(f){function g(a){return function(b){b.onError(a)}}var h=new v(0,d),l=new i,n=new j(l);return l.add(e.subscribe(function(d){var e;try{e=a(d)}catch(i){return h.getValues().forEach(g(i)),void f.onError(i)}var j=!1,o=h.tryGetValue(e);if(o||(o=new m,h.set(e,o),j=!0),j){var p=new w(e,o,n),q=new w(e,o);try{duration=c(q)}catch(i){return h.getValues().forEach(g(i)),void f.onError(i)}f.onNext(p);var r=new k;l.add(r);var s=function(){h.remove(e)&&o.onCompleted(),l.remove(r)};r.setDisposable(duration.take(1).subscribe(t,function(a){h.getValues().forEach(g(a)),f.onError(a)},s))}var u;try{u=b(d)}catch(i){return h.getValues().forEach(g(i)),void f.onError(i)}o.onNext(u)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),n})};var w=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new q(function(a){return new i(e.getDisposable(),d.subscribe(a))}):d}return inherits(c,a),c}(h);return c}); -//# sourceMappingURL=rx.coincidence.map \ No newline at end of file +//# sourceMappingURL=rx.coincidence.map diff --git a/dist/rx.compat.map b/dist/rx.compat.map index 1370b2371..8e80932e4 100644 --- a/dist/rx.compat.map +++ b/dist/rx.compat.map @@ -1 +1 @@ -{"version":3,"file":"rx.compat.min.js","sources":["rx.compat.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","numberIsFinite","root","isFinite","isIterable","o","$iterator$","sign","number","isNaN","toLength","len","Math","floor","abs","maxSafeInteger","isCallable","f","observableCatchHandler","source","handler","AnonymousObservable","observer","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","onNext","bind","exception","d","ex","onError","isPromise","observableFromPromise","onCompleted","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","concatAll","arrayIndexOfComparer","array","item","comparer","HashSet","set","flatMap","mergeObservable","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","isScheduler","notDefined","Scheduler","identity","defaultNow","pluck","property","just","Date","now","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","p","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","CompositeDisposable","getDisposable","Function","that","target","bound","F","self","apply","concat","forEach","T","k","TypeError","O","kValue","boxedString","splitString","every","fun","split","thisp","filter","predicate","results","t","arg","indexOf","searchElement","n","Number","Infinity","max","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","disposables","CompositeDisposablePrototype","add","dispose","shouldDispose","splice","currentDisposables","toArray","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","schedule","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelative","scheduleWithRelativeAndState","scheduleWithAbsolute","scheduleWithAbsoluteAndState","normalize","timeSpan","normalizeTime","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","isDone","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelative","scheduleRecursiveWithRelativeAndState","s","scheduleRecursiveWithAbsolute","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","period","schedulePeriodicWithState","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","immediateScheduler","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediate","scheduleNow","currentThreadScheduler","currentThread","runTrampoline","q","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","addEventListener","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","_super","localNow","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","kind","hasValue","accept","observerOrOnNext","_acceptObservable","_accept","toObservable","notification","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","next","_next","Enumerable","_iterator","cancelable","currentItem","currentValue","catchException","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_thisArg","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","Observable","_subscribe","subscriber","subscribeNext","subscribeError","subscribeCompleted","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","from","iterable","mapFn","list","objIsIterable","it","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","range","observableReturn","returnValue","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","combineLatest","unshift","res","hasValueAll","values","j","falseFactory","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeAll","innerSubscription","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","doAction","tap","onNextFunc","finallyAction","ignoreElements","materialize","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","refCountDisposable","createWindow","Subject","selectConcat","selectorResult","concatMapObserver","selectConcatObserver","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","select","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","running","take","RangeError","observable","takeWhile","shouldRun","exclusive","hasCurrent","g","exclusiveMap","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,G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GAAKA,EAEjCR,EAAYQ,GAAKA,EAInBtE,EAAKsE,GAAKA,IAGhB1I,KAAKf"} \ No newline at end of file +{"version":3,"file":"rx.compat.min.js","sources":["rx.compat.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","numberIsFinite","root","isFinite","isIterable","o","$iterator$","sign","number","isNaN","toLength","len","Math","floor","abs","maxSafeInteger","isCallable","f","observableCatchHandler","source","handler","AnonymousObservable","observer","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","onNext","bind","exception","d","ex","onError","isPromise","observableFromPromise","onCompleted","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","concatAll","arrayIndexOfComparer","array","item","comparer","HashSet","set","flatMap","mergeObservable","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","isScheduler","notDefined","Scheduler","identity","defaultNow","pluck","property","just","Date","now","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","p","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","CompositeDisposable","getDisposable","Function","that","target","bound","F","self","apply","concat","forEach","T","k","TypeError","O","kValue","boxedString","splitString","every","fun","split","thisp","filter","predicate","results","t","arg","indexOf","searchElement","n","Number","Infinity","max","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","disposables","CompositeDisposablePrototype","add","dispose","shouldDispose","splice","currentDisposables","toArray","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","schedule","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelative","scheduleWithRelativeAndState","scheduleWithAbsolute","scheduleWithAbsoluteAndState","normalize","timeSpan","normalizeTime","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","isDone","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelative","scheduleRecursiveWithRelativeAndState","s","scheduleRecursiveWithAbsolute","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","period","schedulePeriodicWithState","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","immediateScheduler","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediate","scheduleNow","currentThreadScheduler","currentThread","runTrampoline","q","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","addEventListener","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","_super","localNow","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","kind","hasValue","accept","observerOrOnNext","_acceptObservable","_accept","toObservable","notification","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","next","_next","Enumerable","_iterator","cancelable","currentItem","currentValue","catchException","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_thisArg","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","Observable","_subscribe","subscriber","subscribeNext","subscribeError","subscribeCompleted","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","from","iterable","mapFn","list","objIsIterable","it","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","range","observableReturn","returnValue","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","combineLatest","unshift","res","hasValueAll","values","j","falseFactory","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeAll","innerSubscription","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","doAction","tap","onNextFunc","finallyAction","ignoreElements","materialize","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","refCountDisposable","createWindow","Subject","selectConcat","selectorResult","concatMapObserver","selectConcatObserver","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","select","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","running","take","RangeError","observable","takeWhile","shouldRun","exclusive","hasCurrent","g","exclusiveMap","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAwElE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAWgB,GAAa,CACpD,GAAIC,GAAOjB,EAAOkB,YACdC,EAAQ,GACRf,EAASgB,GAAchB,MAE3B,IAAIJ,KAAYiB,GAAQA,EAAKI,WAC3B,GAAIC,GAAYtB,IAAWuB,YAAcC,GAAcxB,IAAWY,GAAaa,EAAaC,GAASnB,KAAKP,GACtG2B,EAAUC,GAAaN,EAE7B,QAASH,EAAQf,GACfS,EAAMO,GAAcD,GACdQ,GAAWA,EA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AAKf,KAAMA,KAAKinB,WAAWpgB,UAAUE,KAAK/G,KAAKinB,aAe3D,MApBA7a,IAAS6b,EAAkB1L,GAQ3B/P,GAAcyb,EAAiBpmB,UAAW8Z,IACxCrU,YAAa,WACXtH,KAAKuG,SAASe,eAEhBH,QAAS,SAAUH,GACjBhH,KAAKuG,SAASY,QAAQH,IAExBF,OAAQ,SAAUzG,GAChBL,KAAKuG,SAASO,OAAOzG,MAIlB4nB,GACPvK,IAEqB,mBAAVyK,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvEjjB,EAAKsE,GAAKA,EAEV0e,OAAO,WACH,MAAO1e,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInBtE,EAAKsE,GAAKA,IAGhB1I,KAAKf"} diff --git a/dist/rx.compat.min.js b/dist/rx.compat.min.js index e8624d29c..da21c4880 100644 --- a/dist/rx.compat.min.js +++ b/dist/rx.compat.min.js @@ -1,4 +1,4 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){function b(){if(this.isDisposed)throw new Error(P)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;kb.nonEnumArgs&&a.length&&h(a)&&(a=mb.call(a));var d=kb.enumPrototypes&&"function"==typeof a,e=kb.enumErrorProps&&(a===eb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(kb.nonEnumShadows&&a!==fb){var g=a.constructor,i=-1,j=ib.length;if(a===(g&&g.prototype))var k=a===stringProto?ab:a===eb?X:bb.call(a),l=jb[k];for(;++i-1:void 0});return c.pop(),d.pop(),result}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:mb.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function n(a){return"number"==typeof a&&z.isFinite(a)}function o(b){return b[Q]!==a}function p(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function q(a){var b=+a.length;return isNaN(b)?0:0!==b&&n(b)?(b=p(b)*Math.floor(Math.abs(b)),0>=b?0:b>fc?fc:b):b}function r(a){return"[object Function]"===Object.prototype.toString.call(a)&&"function"==typeof a}function s(a,b){return new pc(function(c){var d=new zb,e=new Ab;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}M(f)&&(f=cc(f)),d=new zb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function t(a,b){var c=this;return new pc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function u(a,b,c){return a.map(function(a,d){var e=b.call(c,a,d);return M(e)?cc(e):e}).concatAll()}function v(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function w(a){this.comparer=a,this.set=[]}function x(a,b,c){return a.map(function(a,d){var e=b.call(c,a,d);return M(e)?cc(e):e}).mergeObservable()}var y={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},z=y[typeof window]&&window||this,A=y[typeof exports]&&exports&&!exports.nodeType&&exports,B=y[typeof module]&&module&&!module.nodeType&&module,C=B&&B.exports===A&&A,D=y[typeof global]&&global;!D||D.global!==D&&D.window!==D||(z=D);var E={internals:{},config:{Promise:z.Promise},helpers:{}},F=E.helpers.noop=function(){},G=(E.helpers.notDefined=function(a){return"undefined"==typeof a},E.helpers.isScheduler=function(a){return a instanceof E.Scheduler}),H=E.helpers.identity=function(a){return a},I=(E.helpers.pluck=function(a){return function(b){return b[a]}},E.helpers.just=function(a){return function(){return a}},E.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),J=E.helpers.defaultComparer=function(a,b){return lb(a,b)},K=E.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},L=(E.helpers.defaultKeySerializer=function(a){return a.toString()},E.helpers.defaultError=function(a){throw a}),M=E.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},N=(E.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},E.helpers.not=function(a){return!a},E.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==bb.call(a)}),a}()),O="Argument out of range",P="Object has been disposed",Q="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";z.Set&&"function"==typeof(new z.Set)["@@iterator"]&&(Q="@@iterator");var R=E.doneEnumerator={done:!0,value:a};E.iterator=Q;var S,T="[object Arguments]",U="[object Array]",V="[object Boolean]",W="[object Date]",X="[object Error]",Y="[object Function]",Z="[object Number]",$="[object Object]",_="[object RegExp]",ab="[object String]",bb=Object.prototype.toString,cb=Object.prototype.hasOwnProperty,db=bb.call(arguments)==T,eb=Error.prototype,fb=Object.prototype,gb=fb.propertyIsEnumerable;try{S=!(bb.call(document)==$&&!({toString:0}+""))}catch(hb){S=!0}var ib=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],jb={};jb[U]=jb[W]=jb[Z]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},jb[V]=jb[ab]={constructor:!0,toString:!0,valueOf:!0},jb[X]=jb[Y]=jb[_]={constructor:!0,toString:!0},jb[$]={constructor:!0};var kb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);kb.enumErrorProps=gb.call(eb,"message")||gb.call(eb,"name"),kb.enumPrototypes=gb.call(a,"prototype"),kb.nonEnumArgs=0!=c,kb.nonEnumShadows=!/valueOf/.test(b)}(1),db||(h=function(a){return a&&"object"==typeof a?cb.call(a,"callee"):!1});var lb=E.internals.isEqual=function(a,b){return i(a,b,[],[])},mb=Array.prototype.slice,nb=({}.hasOwnProperty,this.inherits=E.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),ob=E.internals.addProperties=function(a){for(var b=mb.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},pb=E.internals.addRef=function(a,b){return new pc(function(c){return new ub(b.getDisposable(),a.subscribe(c))})};Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=mb.call(arguments,1),d=function(){function e(){}if(this instanceof d){e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(mb.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(mb.call(arguments)))};return d}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if(null==this)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=0;f>d;){var g;d in e&&(g=e[d],a.call(c,g,d,e)),d++}});var qb=Object("a"),rb="a"!=qb[0]||!(0 in qb);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=rb&&{}.toString.call(this)==ab?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=Y)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=rb&&{}.toString.call(this)==ab?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=Y)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return{}.toString.call(a)==U}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!=d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var sb=E.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},tb=sb.prototype;tb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},tb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},tb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},vb.toArray=function(){return this.disposables.slice(0)};var wb=E.Disposable=function(a){this.isDisposed=!1,this.action=a||F};wb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var xb=wb.create=function(a){return new wb(a)},yb=wb.empty={dispose:F},zb=E.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),Ab=E.SerialDisposable=zb,Bb=E.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?yb:new a(this)},b}();m.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var Cb=E.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||K,this.disposable=new zb};Cb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Cb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Cb.prototype.isCancelled=function(){return this.disposable.isDisposed},Cb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Db=E.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),yb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=I,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Eb=Db.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new ub,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),yb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new ub,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),yb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Db.prototype),function(){Db.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Db.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof z.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=z.setInterval(function(){d=c(d)},b);return xb(function(){z.clearInterval(e)})}}(Db.prototype),function(a){a.catchError=a["catch"]=function(a){return new Mb(this,a)}}(Db.prototype);var Fb,Gb=(E.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new zb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Db.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=Eb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Db(I,a,b,c)}()),Hb=Db.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-Db.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+Db.normalize(c),g=new Cb(this,b,d,f);if(e)e.enqueue(g);else{e=new sb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new Db(I,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Ib=F,Jb=function(){var a,b=F;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!z.setTimeout)throw new Error("No concurrency detected!");a=z.setTimeout,b=z.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Kb=Jb.setTimeout,Lb=Jb.clearTimeout;!function(){function a(){if(!z.postMessage||z.importScripts)return!1;var a=!1,b=z.onmessage;return z.onmessage=function(){a=!0},z.postMessage("","*"),z.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(bb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=D&&C&&D.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=D&&C&&D.clearImmediate)&&!c.test(e)&&e;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Fb=process.nextTick;else if("function"==typeof d)Fb=d,Ib=e;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;z.addEventListener?z.addEventListener("message",b,!1):z.attachEvent("onmessage",b,!1),Fb=function(a){var b=h++;g[b]=a,z.postMessage(f+b,"*")}}else if(z.MessageChannel){var i=new z.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Fb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in z&&"onreadystatechange"in z.document.createElement("script")?Fb=function(a){var b=z.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},z.document.documentElement.appendChild(b)}:(Fb=function(a){return Kb(a,0)},Ib=Lb)}();var Mb=(Db.timeout=function(){function a(a,b){var c=this,d=new zb,e=Fb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new ub(d,xb(function(){Ib(e)}))}function b(a,b,c){var d=this,e=Db.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new zb,g=Kb(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new ub(f,xb(function(){Lb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Db(I,a,b,c)}(),function(a){function b(){return this._scheduler.now()}function c(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function d(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function e(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function f(f,g){this._scheduler=f,this._handler=g,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,b,c,d,e)}return nb(f,a),f.prototype._clone=function(a){return new f(a,this._handler)},f.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return yb}}},f.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},f.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new zb;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},f}(Db)),Nb=E.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return G(a)||(a=Gb),new pc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Ob=Nb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new Nb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Pb=Nb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new Nb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Qb=Nb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Nb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Rb=E.internals.Enumerator=function(a){this._next=a};Rb.prototype.next=function(){return this._next()},Rb.prototype[Q]=function(){return this};var Sb=E.internals.Enumerable=function(a){this._iterator=a};Sb.prototype[Q]=function(){return this._iterator()},Sb.prototype.concat=function(){var a=this;return new pc(function(b){var c;try{c=a[Q]()}catch(d){return void b.onError()}var e,f=new Ab,g=Gb.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;M(h)&&(h=cc(h));var i=new zb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new ub(f,g,xb(function(){e=!0}))})},Sb.prototype.catchException=function(){var a=this;return new pc(function(b){var c;try{c=a[Q]()}catch(d){return void b.onError()}var e,f,g=new Ab,h=Gb.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;M(i)&&(i=cc(i));var j=new zb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new ub(g,h,xb(function(){e=!0}))})};var Tb=Sb.repeat=function(a,b){return null==b&&(b=-1),new Sb(function(){var c=b;return new Rb(function(){return 0===c?R:(c>0&&c--,{done:!1,value:a})})})},Ub=Sb.of=function(a,b,c){return b||(b=H),new Sb(function(){var d=-1;return new Rb(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Yb),ac=function(a){function b(){a.apply(this,arguments)}return nb(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(_b),bc=E.Observable=function(){function a(a){this._subscribe=a}return Xb=a.prototype,Xb.subscribe=Xb.forEach=function(a,b,c,d){var e="object"==typeof a?a:4===arguments.length?Wb(a,b,c,d):Wb(a,b,c);return this._subscribe(e)},Xb.subscribeNext=function(a,b){var c=2===arguments.length?Wb(a,null,null,b):Wb(a,null,null);return this._subscribe(c)},Xb.subscribeError=function(a,b){var c=2===arguments.length?Wb(null,a,null,b):Wb(null,a,null);return this._subscribe(c)},Xb.subscribeCompleted=function(a,b){var c=2===arguments.length?Wb(null,null,a,b):Wb(null,null,a);return this._subscribe(c)},a}();Xb.observeOn=function(a){var b=this;return new pc(function(c){return b.subscribe(new ac(a,c))})},Xb.subscribeOn=function(a){var b=this;return new pc(function(c){var d=new zb,e=new Ab;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new m(a,b.subscribe(c)))})),e})};var cc=bc.fromPromise=function(a){return dc(function(){var b=new E.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};Xb.toPromise=function(a){if(a||(a=E.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Xb.toArray=function(){var a=this;return new pc(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},bc.create=bc.createWithDisposable=function(a){return new pc(a)};var dc=bc.defer=function(a){return new pc(function(b){var c;try{c=a()}catch(d){return jc(d).subscribe(b)}return M(c)&&(c=cc(c)),c.subscribe(b)})},ec=bc.empty=function(a){return G(a)||(a=Gb),new pc(function(b){return a.schedule(function(){b.onCompleted()})})},fc=Math.pow(2,53)-1;bc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!r(b))throw new Error("mapFn when provided must be a function");return G(d)||(d=Hb),new pc(function(e){var f=Object(a),g=o(f),h=g?0:q(f),i=g?f[Q]():null,j=0;return d.scheduleRecursive(function(a){if(h>j||g){var d;if(g){var k=i.next();if(k.done)return void e.onCompleted();d=k.value}else d=f[j];if(b&&r(b))try{d=c?b.call(c,d,j):b(d,j)}catch(l){return void e.onError(l)}e.onNext(d),j++,a()}else e.onCompleted()})})};var gc=bc.fromArray=function(a,b){return G(b)||(b=Hb),new pc(function(c){var d=0,e=a.length;return b.scheduleRecursive(function(b){e>d?(c.onNext(a[d++]),b()):c.onCompleted()})})};bc.generate=function(a,b,c,d,e){return G(e)||(e=Hb),new pc(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})};var hc=bc.never=function(){return new pc(function(){return yb})};bc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return gc(b)};bc.ofWithScheduler=function(a){for(var b=arguments.length-1,c=new Array(b),d=0;b>d;d++)c[d]=arguments[d+1];return gc(c,a)};bc.range=function(a,b,c){return G(c)||(c=Hb),new pc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},bc.repeat=function(a,b,c){return G(c)||(c=Hb),ic(a,c).repeat(null==b?-1:b)};var ic=bc["return"]=bc.returnValue=bc.just=function(a,b){return G(b)||(b=Gb),new pc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})},jc=bc["throw"]=bc.throwException=bc.throwError=function(a,b){return G(b)||(b=Gb),new pc(function(c){return b.schedule(function(){c.onError(a)})})};bc.using=function(a,b){return new pc(function(c){var d,e,f=yb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new ub(jc(g).subscribe(c),f)}return new ub(e.subscribe(c),f)})},Xb.amb=function(a){var b=this;return new pc(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new zb,j=new zb;return M(a)&&(a=cc(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new ub(i,j)})},bc.amb=function(){function a(a,b){return a.amb(b)}for(var b=hc(),c=j(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},Xb["catch"]=Xb.catchException=function(a){return"function"==typeof a?s(this,a):kc([this,a])};var kc=bc.catchException=bc["catch"]=function(){return Ub(j(arguments,0)).catchException()};Xb.combineLatest=function(){var a=mb.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),lc.apply(this,a)};var lc=bc.combineLatest=function(){var a=mb.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new pc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(H))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(H)&&c.onCompleted()}function e(a){j[a]=!0,j.every(H)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new zb;M(f)&&(f=cc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new ub(m)})};Xb.concat=function(){var a=mb.call(arguments,0);return a.unshift(this),mc.apply(this,a)};var mc=bc.concat=function(){return Ub(j(arguments,0)).concat()};Xb.concatObservable=Xb.concatAll=function(){return this.merge(1)},Xb.merge=function(a){if("number"!=typeof a)return nc(this,a);var b=this;return new pc(function(c){function d(a){var b=new zb;f.add(b),M(a)&&(a=cc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new ub,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var nc=bc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=mb.call(arguments,1)):(a=Gb,b=mb.call(arguments,0)):(a=Gb,b=mb.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),gc(b,a).mergeObservable()};Xb.mergeObservable=Xb.mergeAll=function(){var a=this;return new pc(function(b){var c=new ub,d=!1,e=new zb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new zb;c.add(e),M(a)&&(a=cc(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},Xb.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return oc([this,a])};var oc=bc.onErrorResumeNext=function(){var a=j(arguments,0); return new pc(function(b){var c=0,d=new Ab,e=Gb.scheduleRecursive(function(e){var f,g;c0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(H)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new zb;M(c)&&(c=cc(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new ub(j)})},bc.zip=function(){var a=mb.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},bc.zipArray=function(){var a=j(arguments,0);return new pc(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(H))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(H)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new zb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new ub(h);return j.add(xb(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},Xb.asObservable=function(){return new pc(this.subscribe.bind(this))},Xb.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},Xb.dematerialize=function(){var a=this;return new pc(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},Xb.distinctUntilChanged=function(a,b){var c=this;return a||(a=H),b||(b=J),new pc(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},Xb["do"]=Xb.doAction=Xb.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new pc(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b){try{b(c)}catch(d){a.onError(d)}a.onError(c)}else a.onError(c)},function(){if(c){try{c()}catch(b){a.onError(b)}a.onCompleted()}else a.onCompleted()})})},Xb["finally"]=Xb.finallyAction=function(a){var b=this;return new pc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return xb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},Xb.ignoreElements=function(){var a=this;return new pc(function(b){return a.subscribe(F,b.onError.bind(b),b.onCompleted.bind(b))})},Xb.materialize=function(){var a=this;return new pc(function(b){return a.subscribe(function(a){b.onNext(Ob(a))},function(a){b.onNext(Pb(a)),b.onCompleted()},function(){b.onNext(Qb()),b.onCompleted()})})},Xb.repeat=function(a){return Tb(this,a).concat()},Xb.retry=function(a){return Tb(this,a).catchException()},Xb.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new pc(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},Xb.skipLast=function(a){var b=this;return new pc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},Xb.startWith=function(){var a,b,c=0;return arguments.length&&G(arguments[0])?(b=arguments[0],c=1):b=Gb,a=mb.call(arguments,c),Ub([gc(a,b),this]).concat()},Xb.takeLast=function(a){var b=this;return new pc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},Xb.takeLastBuffer=function(a){var b=this;return new pc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},Xb.windowWithCount=function(a,b){var c=this;if(0>=a)throw new Error(O);if(1===arguments.length&&(b=a),0>=b)throw new Error(O);return new pc(function(d){var e=new zb,f=new Bb(e),g=0,h=[],i=function(){var a=new sc;h.push(a),d.onNext(pb(a,f))};return i(),e.setDisposable(c.subscribe(function(c){for(var d,e=0,f=h.length;f>e;e++)h[e].onNext(c);var j=g-a+1;j>=0&&j%b===0&&(d=h.shift(),d.onCompleted()),g++,g%b===0&&i()},function(a){for(;h.length>0;)h.shift().onError(a);d.onError(a)},function(){for(;h.length>0;)h.shift().onCompleted();d.onCompleted()})),f})},Xb.selectConcat=Xb.concatMap=function(a,b,c){return b?this.concatMap(function(c,d){var e=a(c,d),f=M(e)?cc(e):e;return f.map(function(a){return b(c,a,d)})}):"function"==typeof a?u(this,a,c):u(this,function(){return a})},Xb.concatMapObserver=Xb.selectConcatObserver=function(a,b,c,d){var e=this;return new pc(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}M(c)&&(c=cc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}M(c)&&(c=cc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}M(a)&&(a=cc(a)),f.onNext(a),f.onCompleted()})}).concatAll()},Xb.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new pc(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},a.onError.bind(a),function(){d||a.onNext(b),a.onCompleted()})})},w.prototype.push=function(a){var b=-1===v(this.set,a,this.comparer);return b&&this.set.push(a),b},Xb.distinct=function(a,b){var c=this;return b||(b=J),new pc(function(d){var e=new w(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},d.onError.bind(d),d.onCompleted.bind(d))})},Xb.select=Xb.map=function(a,b){var c=this;return new pc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Xb.pluck=function(a){return this.map(function(b){return b[a]})},Xb.selectMany=Xb.flatMap=function(a,b,c){return b?this.flatMap(function(c,d){var e=a(c,d),f=M(e)?cc(e):e;return f.map(function(a){return b(c,a,d)})},c):"function"==typeof a?x(this,a,c):x(this,function(){return a})},Xb.flatMapObserver=Xb.selectManyObserver=function(a,b,c,d){var e=this;return new pc(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}M(c)&&(c=cc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}M(c)&&(c=cc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}M(a)&&(a=cc(a)),f.onNext(a),f.onCompleted()})}).mergeAll()},Xb.selectSwitch=Xb.flatMapLatest=Xb.switchMap=function(a,b){return this.select(a,b).switchLatest()},Xb.skip=function(a){if(0>a)throw new Error(O);var b=this;return new pc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},Xb.skipWhile=function(a,b){var c=this;return new pc(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Xb.take=function(a,b){if(0>a)throw new RangeError(O);if(0===a)return ec(b);var c=this;return new pc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},Xb.takeWhile=function(a,b){var c=this;return new pc(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},Xb.where=Xb.filter=function(a,b){var c=this;return new pc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},Xb.exclusive=function(){var a=this;return new pc(function(b){var c=!1,d=!1,e=new zb,f=new ub;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,M(a)&&(a=cc(a));var e=new zb;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f})},Xb.exclusiveMap=function(a,b){var c=this;return new pc(function(d){var e=0,f=!1,g=!0,h=new zb,i=new ub;return i.add(h),h.setDisposable(c.subscribe(function(c){f||(f=!0,innerSubscription=new zb,i.add(innerSubscription),M(c)&&(c=cc(c)),innerSubscription.setDisposable(c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),function(){i.remove(innerSubscription),f=!1,g&&1===i.length&&d.onCompleted()})))},d.onError.bind(d),function(){g=!0,1!==i.length||f||d.onCompleted()})),i})};var pc=E.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?xb(a):yb}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new qc(a);return Hb.scheduleRequired()?Hb.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return nb(c,a),c}(bc),qc=function(a){function b(b){a.call(this),this.observer=b,this.m=new zb}nb(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Yb),rc=function(a,b){this.subject=a,this.observer=b};rc.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var sc=E.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),yb):(a.onCompleted(),yb):(this.observers.push(a),new rc(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return nb(d,a),ob(d.prototype,Vb,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new tc(a,b)},d}(bc),tc=(E.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new rc(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),yb}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return nb(d,a),ob(d.prototype,Vb,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(bc),E.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return nb(b,a),ob(b.prototype,Vb,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(bc));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(z.Rx=E,define(function(){return E})):A&&B?C?(B.exports=E).Rx=E:A.Rx=E:z.Rx=E}).call(this); -//# sourceMappingURL=rx.compat.map \ No newline at end of file +//# sourceMappingURL=rx.compat.map diff --git a/dist/rx.experimental.map b/dist/rx.experimental.map index 8c824ff9a..708b5c55a 100644 --- a/dist/rx.experimental.map +++ b/dist/rx.experimental.map @@ -1 +1 @@ -{"version":3,"file":"rx.experimental.min.js","sources":["rx.experimental.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","argsOrArray","args","idx","length","Array","isArray","slice","enumerableWhile","condition","source","Enumerable","Enumerator","done","value","Observable","observableProto","prototype","AnonymousObservable","observableConcat","concat","observableDefer","defer","observableEmpty","empty","disposableEmpty","Disposable","CompositeDisposable","SerialDisposable","SingleAssignmentDisposable","internals","enumerableOf","of","immediateScheduler","Scheduler","immediate","currentThreadScheduler","currentThread","AsyncSubject","Observer","inherits","addProperties","helpers","noop","isPromise","isScheduler","observableFromPromise","fromPromise","$iterator$","Symbol","iterator","Set","doneEnumerator","letBind","func","ifThen","thenSource","elseSourceOrScheduler","now","forIn","sources","resultSelector","thisArg","observableWhileDo","whileDo","doWhile","switchCase","selector","defaultSourceOrScheduler","result","expand","scheduler","observer","q","m","d","activeCount","isAcquired","ensureActive","isOwner","setDisposable","scheduleRecursive","self","work","shift","m1","add","subscribe","x","onNext","e","onError","push","bind","remove","onCompleted","forkJoin","allSources","arguments","subscriber","count","group","finished","hasResults","hasCompleted","results","i","dispose","ix","second","first","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","leftSubscription","rightSubscription","left","err","right","manySelect","chain","map","curr","ChainObservable","tap","observeOn","__super__","g","schedule","head","tail","mergeObservable","throwException","v"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,EAAIb,GA8Bp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b,GAAIqC,GAAO,GAAIC,GAAgBtC,EAK/B,OAHAmC,IAASA,EAAMlC,OAAOD,GACtBmC,EAAQE,EAEDA,IAERE,IACCpF,EACA,SAAU+C,GAAKiC,GAASA,EAAMhC,QAAQD,IACtC,WAAciC,GAASA,EAAM5B,gBAE9BiC,UAAUzD,GACVqD,IAAIzD,KAIX,IAAI2D,GAAmB,SAAUG,GAE/B,QAAS1C,GAAWf,GAClB,GAAIU,GAAO/F,KAAM+I,EAAI,GAAIvG,EAMzB,OALAuG,GAAE5C,IAAIlD,EAAuB+F,SAAS,WACpC3D,EAASiB,OAAOP,EAAKkD,MACrBF,EAAE5C,IAAIJ,EAAKmD,KAAKC,kBAAkB/C,UAAUf,OAGvC0D,EAKT,QAASJ,GAAgBM,GACvBH,EAAUlI,KAAKZ,KAAMoG,GACrBpG,KAAKiJ,KAAOA,EACZjJ,KAAKkJ,KAAO,GAAI/F,GAgBlB,MArBAE,GAASsF,EAAiBG,GAQ1BxF,EAAcqF,EAAgB7G,UAAWsB,GACvCwD,YAAa,WACX5G,KAAKsG,OAAO1E,EAAWS,UAEzBmE,QAAS,SAAUD,GACjBvG,KAAKsG,OAAO1E,EAAWwH,eAAe7C,KAExCD,OAAQ,SAAU+C,GAChBrJ,KAAKkJ,KAAK5C,OAAO+C,GACjBrJ,KAAKkJ,KAAKtC,iBAIP+B,GAEP/G,EAEA,OAAOlB"} \ No newline at end of file +{"version":3,"file":"rx.experimental.min.js","sources":["rx.experimental.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","argsOrArray","args","idx","length","Array","isArray","slice","enumerableWhile","condition","source","Enumerable","Enumerator","done","value","Observable","observableProto","prototype","AnonymousObservable","observableConcat","concat","observableDefer","defer","observableEmpty","empty","disposableEmpty","Disposable","CompositeDisposable","SerialDisposable","SingleAssignmentDisposable","internals","enumerableOf","of","immediateScheduler","Scheduler","immediate","currentThreadScheduler","currentThread","AsyncSubject","Observer","inherits","addProperties","helpers","noop","isPromise","isScheduler","observableFromPromise","fromPromise","$iterator$","Symbol","iterator","Set","doneEnumerator","letBind","func","ifThen","thenSource","elseSourceOrScheduler","now","forIn","sources","resultSelector","thisArg","observableWhileDo","whileDo","doWhile","switchCase","selector","defaultSourceOrScheduler","result","expand","scheduler","observer","q","m","d","activeCount","isAcquired","ensureActive","isOwner","setDisposable","scheduleRecursive","self","work","shift","m1","add","subscribe","x","onNext","e","onError","push","bind","remove","onCompleted","forkJoin","allSources","arguments","subscriber","count","group","finished","hasResults","hasCompleted","results","i","dispose","ix","second","first","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","leftSubscription","rightSubscription","left","err","right","manySelect","chain","map","curr","ChainObservable","tap","observeOn","__super__","g","schedule","head","tail","mergeObservable","throwException","v"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,EAAIb,GA8BpC,QAASiB,GA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AAO,GAAIC,GAAgBtC,EAK/B,OAHAmC,IAASA,EAAMlC,OAAOD,GACtBmC,EAAQE,EAEDA,IAERE,IACCpF,EACA,SAAU+C,GAAKiC,GAASA,EAAMhC,QAAQD,IACtC,WAAciC,GAASA,EAAM5B,gBAE9BiC,UAAUzD,GACVqD,IAAIzD,KAIX,IAAI2D,GAAmB,SAAUG,GAE/B,QAAS1C,GAAWf,GAClB,GAAIU,GAAO/F,KAAM+I,EAAI,GAAIvG,EAMzB,OALAuG,GAAE5C,IAAIlD,EAAuB+F,SAAS,WACpC3D,EAASiB,OAAOP,EAAKkD,MACrBF,EAAE5C,IAAIJ,EAAKmD,KAAKC,kBAAkB/C,UAAUf,OAGvC0D,EAKT,QAASJ,GAAgBM,GACvBH,EAAUlI,KAAKZ,KAAMoG,GACrBpG,KAAKiJ,KAAOA,EACZjJ,KAAKkJ,KAAO,GAAI/F,GAgBlB,MArBAE,GAASsF,EAAiBG,GAQ1BxF,EAAcqF,EAAgB7G,UAAWsB,GACvCwD,YAAa,WACX5G,KAAKsG,OAAO1E,EAAWS,UAEzBmE,QAAS,SAAUD,GACjBvG,KAAKsG,OAAO1E,EAAWwH,eAAe7C,KAExCD,OAAQ,SAAU+C,GAChBrJ,KAAKkJ,KAAK5C,OAAO+C,GACjBrJ,KAAKkJ,KAAKtC,iBAIP+B,GAEP/G,EAEA,OAAOlB"} diff --git a/dist/rx.experimental.min.js b/dist/rx.experimental.min.js index e51479805..4759a4a46 100644 --- a/dist/rx.experimental.min.js +++ b/dist/rx.experimental.min.js @@ -1,3 +1,3 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:v.call(a)}function f(a,b){return new r(function(){return new q(function(){return a()?{done:!1,value:b}:{done:!0,value:d}})})}var g=c.Observable,h=g.prototype,i=c.AnonymousObservable,j=g.concat,k=g.defer,l=g.empty,m=c.Disposable.empty,n=c.CompositeDisposable,o=c.SerialDisposable,p=c.SingleAssignmentDisposable,q=c.internals.Enumerator,r=c.internals.Enumerable,s=r.of,t=c.Scheduler.immediate,u=c.Scheduler.currentThread,v=Array.prototype.slice,w=c.AsyncSubject,x=c.Observer,y=c.internals.inherits,z=c.internals.addProperties,A=c.helpers,B=A.noop,C=A.isPromise,D=A.isScheduler,E=g.fromPromise,F="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";a.Set&&"function"==typeof(new a.Set)["@@iterator"]&&(F="@@iterator");c.doneEnumerator={done:!0,value:d};c.iterator=F,h.letBind=h.let=function(a){return a(this)},g["if"]=g.ifThen=function(a,b,c){return k(function(){return c||(c=l()),C(b)&&(b=E(b)),C(c)&&(c=E(c)),"function"==typeof c.now&&(c=l(c)),a()?b:c})},g["for"]=g.forIn=function(a,b,c){return s(a,b,c).concat()};var G=g["while"]=g.whileDo=function(a,b){return C(b)&&(b=E(b)),f(a,b).concat()};h.doWhile=function(a){return j([this,G(a,this)])},g["case"]=g.switchCase=function(a,b,c){return k(function(){C(c)&&(c=E(c)),c||(c=l()),"function"==typeof c.now&&(c=l(c));var d=b[a()];return C(d)&&(d=E(d)),d||c})},h.expand=function(a,b){D(b)||(b=t);var c=this;return new i(function(d){var e=[],f=new o,g=new n(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new p;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g})},g.forkJoin=function(){var a=e(arguments,0);return new i(function(b){var c=a.length;if(0===c)return b.onCompleted(),m;for(var d=new n,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];C(j)&&(j=E(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},h.forkJoin=function(a,b){var c=this;return new i(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new p,l=new p;return C(a)&&(a=E(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new n(k,l)})},h.manySelect=function(a,b){D(b)||(b=t);var c=this;return k(function(){var d;return c.map(function(a){var b=new H(a);return d&&d.onNext(a),d=b,b}).tap(B,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)})};var H=function(a){function b(a){var b=this,c=new n;return c.add(u.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeObservable().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new w}return y(c,a),z(c.prototype,x,{onCompleted:function(){this.onNext(g.empty())},onError:function(a){this.onNext(g.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(g);return c}); -//# sourceMappingURL=rx.experimental.map \ No newline at end of file +//# sourceMappingURL=rx.experimental.map diff --git a/dist/rx.joinpatterns.map b/dist/rx.joinpatterns.map index bf72b78f8..94bfac14b 100644 --- a/dist/rx.joinpatterns.map +++ b/dist/rx.joinpatterns.map @@ -1 +1 @@ -{"version":3,"file":"rx.joinpatterns.min.js","sources":["rx.joinpatterns.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","argsOrArray","args","idx","length","Array","isArray","slice","Pattern","patterns","Plan","expression","selector","planCreateObserver","externalSubscriptions","observable","onError","entry","get","observer","JoinObserver","set","ActivePlan","joinObserverArray","onNext","onCompleted","joinObservers","Map","i","len","joinObserver","Observable","observableProto","prototype","AnonymousObservable","observableThrow","throwException","observerCreate","Observer","create","SingleAssignmentDisposable","CompositeDisposable","AbstractObserver","internals","noop","helpers","inherits","isEqual","Enumerable","Enumerator","iterator","doneEnumerator","_keys","_values","key","indexOf","value","push","forEach","callback","thisArg","and","other","concat","thenDo","activate","deactivate","self","bind","activePlan","result","apply","arguments","e","j","jlen","removeActivePlan","addActivePlan","dequeue","v","queue","shift","match","hasValues","firstValues","isCompleted","kind","values","__super__","source","activePlans","subscription","isDisposed","JoinObserverPrototype","next","notification","exception","error","completed","subscribe","setDisposable","materialize","splice","dispose","right","when","plans","outObserver","err","group","add"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF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,OAtDFV,GAAgB6B,IAAM,SAAU2C,GAC9B,MAAO,IAAIhG,IAASrB,KAAMqH,KAS5BxE,EAAgBgC,OAAS,SAAUpD,GACjC,MAAO,IAAIJ,IAASrB,OAAO6E,OAAOpD,IASpCmB,EAAW0E,KAAO,WAChB,GAAIC,GAAQzG,EAAYuE,UAAW,EACnC,OAAO,IAAItC,GAAoB,SAAUf,GACvC,GAAIuE,MACA5E,EAAwB,GAAIa,GAC5BgF,EAActE,EAChBlB,EAASK,OAAO4C,KAAKjD,GACrB,SAAUyF,GACR9F,EAAsB4C,QAAQ,SAAUqB,GAAKA,EAAE/D,QAAQ4F,KACvDzF,EAASH,QAAQ4F,IAEnBzF,EAASM,YAAY2C,KAAKjD,GAE5B,KACE,IAAK,GAAIS,GAAI,EAAGC,EAAM6E,EAAMtG,OAAYyB,EAAJD,EAASA,IAC3C8D,EAAYjC,KAAKiD,EAAM9E,GAAGqC,SAASnD,EAAuB6F,EAAa,SAAUtC,GAC/E,GAAIlE,GAAMuF,EAAYnC,QAAQc,EAC9BqB,GAAYY,OAAOnG,EAAK,GACD,IAAvBuF,EAAYtF,QAAgBe,EAASM,iBAGzC,MAAOgD,GACPtC,EAAgBsC,GAAG0B,UAAUhF,GAE/B,GAAI0F,GAAQ,GAAIpE,EAMhB,OALA3B,GAAsB4C,QAAQ,SAAU5B,GACtCA,EAAaqE,YACbU,EAAMC,IAAIhF,KAGL+E,KAIFhH"} \ No newline at end of file +{"version":3,"file":"rx.joinpatterns.min.js","sources":["rx.joinpatterns.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","argsOrArray","args","idx","length","Array","isArray","slice","Pattern","patterns","Plan","expression","selector","planCreateObserver","externalSubscriptions","observable","onError","entry","get","observer","JoinObserver","set","ActivePlan","joinObserverArray","onNext","onCompleted","joinObservers","Map","i","len","joinObserver","Observable","observableProto","prototype","AnonymousObservable","observableThrow","throwException","observerCreate","Observer","create","SingleAssignmentDisposable","CompositeDisposable","AbstractObserver","internals","noop","helpers","inherits","isEqual","Enumerable","Enumerator","iterator","doneEnumerator","_keys","_values","key","indexOf","value","push","forEach","callback","thisArg","and","other","concat","thenDo","activate","deactivate","self","bind","activePlan","result","apply","arguments","e","j","jlen","removeActivePlan","addActivePlan","dequeue","v","queue","shift","match","hasValues","firstValues","isCompleted","kind","values","__super__","source","activePlans","subscription","isDisposed","JoinObserverPrototype","next","notification","exception","error","completed","subscribe","setDisposable","materialize","splice","dispose","right","when","plans","outObserver","err","group","add"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,EAAIb,GAqBpC,QAASiB,GAAYC,EAAMC,GACzB,MAAuB,KAAhBD,EAAKE,QAAgBC,MAAMC,QAAQJ,EAAKC,IAC7CD,EAAKC,GACLI,EAAMR,KAAKG,GAmCf,QAASM,GAAQC,GACftB,KAAKsB,SAAWA,EAqBlB,QAAS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,EAAa,SAAUtC,GAC/E,GAAIlE,GAAMuF,EAAYnC,QAAQc,EAC9BqB,GAAYY,OAAOnG,EAAK,GACD,IAAvBuF,EAAYtF,QAAgBe,EAASM,iBAGzC,MAAOgD,GACPtC,EAAgBsC,GAAG0B,UAAUhF,GAE/B,GAAI0F,GAAQ,GAAIpE,EAMhB,OALA3B,GAAsB4C,QAAQ,SAAU5B,GACtCA,EAAaqE,YACbU,EAAMC,IAAIhF,KAGL+E,KAIFhH"} diff --git a/dist/rx.joinpatterns.min.js b/dist/rx.joinpatterns.min.js index 72dcbc230..ae5d004f8 100644 --- a/dist/rx.joinpatterns.min.js +++ b/dist/rx.joinpatterns.min.js @@ -1,3 +1,3 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:t.call(a)}function f(a){this.patterns=a}function g(a,b){this.expression=a,this.selector=b}function h(a,b,c){var d=a.get(b);if(!d){var e=new v(b,c);return a.set(b,e),e}return d}function i(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new u;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}var j=c.Observable,k=j.prototype,l=c.AnonymousObservable,m=j.throwException,n=c.Observer.create,o=c.SingleAssignmentDisposable,p=c.CompositeDisposable,q=c.internals.AbstractObserver,r=c.helpers.noop,s=(c.internals.isEqual,c.internals.inherits),t=(c.internals.Enumerable,c.internals.Enumerator,c.iterator,c.doneEnumerator,Array.prototype.slice),u=a.Map||function(){function a(){this._keys=[],this._values=[]}return a.prototype.get=function(a){var b=this._keys.indexOf(a);return-1!==b?this._values[b]:d},a.prototype.set=function(a,b){var c=this._keys.indexOf(a);-1!==c&&(this._values[c]=b),this._values[this._keys.push(a)-1]=b},a.prototype.forEach=function(a,b){for(var c=0,d=this._keys.length;d>c;c++)a.call(b,this._values[c],this._keys[c])},a}();f.prototype.and=function(a){return new f(this.patterns.concat(a))},f.prototype.thenDo=function(a){return new g(this,a)},g.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(h(a,this.expression.patterns[f],b.onError.bind(b)));var j=new i(e,function(){var a;try{a=d.selector.apply(d,arguments)}catch(c){return void b.onError(c)}b.onNext(a)},function(){for(var a=0,b=e.length;b>a;a++)e[a].removeActivePlan(j);c(j)});for(f=0,g=e.length;g>f;f++)e[f].addActivePlan(j);return j},i.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},i.prototype.match=function(){var a,b,c=!0;for(a=0,b=this.joinObserverArray.length;b>a;a++)if(0===this.joinObserverArray[a].queue.length){c=!1;break}if(c){var d=[],e=!1;for(a=0,b=this.joinObserverArray.length;b>a;a++)d.push(this.joinObserverArray[a].queue[0]),"C"===this.joinObserverArray[a].queue[0].kind&&(e=!0);if(e)this.onCompleted();else{this.dequeue();var f=[];for(a=0,b=d.length;ac;c++)b[c].match()}},c.error=r,c.completed=r,c.addActivePlan=function(a){this.activePlans.push(a)},c.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},c.removeActivePlan=function(a){this.activePlans.splice(this.activePlans.indexOf(a),1),0===this.activePlans.length&&this.dispose()},c.dispose=function(){a.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},b}(q);return k.and=function(a){return new f([this,a])},k.thenDo=function(a){return new f([this]).thenDo(a)},j.when=function(){var a=e(arguments,0);return new l(function(b){var c=[],d=new u,e=n(b.onNext.bind(b),function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},b.onCompleted.bind(b));try{for(var f=0,g=a.length;g>f;f++)c.push(a[f].activate(d,e,function(a){var d=c.indexOf(a);c.splice(d,1),0===c.length&&b.onCompleted()}))}catch(h){m(h).subscribe(b)}var i=new p;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})},c}); -//# sourceMappingURL=rx.joinpatterns.map \ No newline at end of file +//# sourceMappingURL=rx.joinpatterns.map diff --git a/dist/rx.lite.compat.map b/dist/rx.lite.compat.map index ccf27bcbd..33d154daa 100644 --- a/dist/rx.lite.compat.map +++ b/dist/rx.lite.compat.map @@ -1 +1 @@ -{"version":3,"file":"rx.lite.compat.min.js","sources":["rx.lite.compat.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","numberIsFinite","root","isFinite","isIterable","o","$iterator$","sign","number","isNaN","toLength","len","Math","floor","abs","maxSafeInteger","isCallable","f","observableCatchHandler","source","handler","AnonymousObservable","observer","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","onNext","bind","exception","d","ex","onError","isPromise","observableFromPromise","onCompleted","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","concatAll","flatMap","mergeObservable","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","relatedTarget","fromElement","toElement","c","charCode","keyChar","fromCharCode","createListener","element","name","addEventListener","disposableCreate","removeEventListener","attachEvent","innerHandler","detachEvent","createEventListener","el","eventName","disposables","CompositeDisposable","add","item","observableTimerDate","dueTime","scheduler","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","combineLatestSource","subject","next","values","res","hasValueAll","every","identity","apply","isDone","n","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","isScheduler","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","getDisposable","Function","that","bound","F","concat","forEach","T","k","TypeError","O","kValue","boxedString","splitString","fun","split","thisp","filter","predicate","results","t","arg","indexOf","searchElement","Number","Infinity","compareTo","other","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","ScheduledItem","RefCountDisposable","InnerDisposable","disposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","s","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","scheduleMethod","immediateScheduler","immediate","scheduleNow","currentThreadScheduler","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","_next","Enumerable","_iterator","currentItem","currentValue","catchException","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","observerCreate","fromNotifier","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_thisArg","Observable","_subscribe","subscriber","subscribeNext","subscribeError","subscribeCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","from","iterable","mapFn","list","objIsIterable","it","observableFromArray","fromArray","array","never","ofWithScheduler","range","observableReturn","throwException","throwError","handlerOrSecond","observableCatch","combineLatest","unshift","j","falseFactory","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeAll","m","innerSubscription","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","doAction","tap","onNextFunc","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","select","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","take","RangeError","observable","takeWhile","where","fromCallback","func","context","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","Subject","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","timer","periodOrScheduler","getTime","delay","throttle","hasvalue","sample","intervalOrSampler","schedulerMethod","createTimer","myId","original","switched","PausableObservable","_super","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","exclusive","hasCurrent","g","exclusiveMap","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","createRemovableDisposable","so","_trim","hasError","windowSize","MAX_VALUE","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAwElE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAWgB,GAAa,CACpD,GAAIC,GAAOjB,EAAOkB,YACdC,EAAQ,GACRf,EAASgB,GAAchB,MAE3B,IAAIJ,KAAYiB,GAAQA,EAAKI,WAC3B,GAAIC,GAAYtB,IAAWuB,YAAcC,GAAcxB,IAAWY,GAAaa,GAAaC,GAASnB,KAAKP,GACtG2B,EAAUC,GAAaN,EAE7B,QAASH,EAAQf,GACfS,EAAMO,GAAcD,GACdQ,GAAWA,EAAQd,KAASgB,GAAetB,KAAKP,EAAQa,IAC5DZ,EAAOa,KAAKD,GAIlB,MAAOZ,GAGT,QAAS6B,GAAY9B,EAAQ+B,EAAUC,GAKrC,IAJA,GAAIb,GAAQ,GACVc,EAAQD,EAAShC,GACjBI,EAAS6B,EAAM7B,SAERe,EAAQf,GAAQ,CACvB,GAAIS,GAAMoB,EAAMd,EAChB,IAAIY,EAAS/B,EAAOa,GAAMA,EAAKb,MAAY,EACzC,MAGJ,MAAOA,GAGT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ue,WAAY,CACjB,IAAItT,GAAMjL,KAAKyK,UAAUQ,KACzBjL,MAAK0sB,MAAMzhB,EAEX,KAAK,GADD9F,GAAInF,KAAKmsB,UAAUrrB,MAAM,GACpB8D,EAAI,EAAGa,EAAMN,EAAEvE,OAAY6E,EAAJb,EAASA,IAAK,CAC5C,GAAIwB,GAAWjB,EAAEP,EACjBwB,GAASe,cACTf,EAASoZ,eAEXxf,KAAKmsB,eAKPhY,QAAS,WACPnU,KAAKC,YAAa,EAClBD,KAAKmsB,UAAY,QAId1D,GACP1J,GAEqB,mBAAV+N,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvE/nB,EAAKsJ,GAAKA,EAEVwe,OAAO,WACH,MAAOxe,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInBtJ,EAAKsJ,GAAKA,IAGhBvN,KAAKf"} \ No newline at end of file +{"version":3,"file":"rx.lite.compat.min.js","sources":["rx.lite.compat.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","numberIsFinite","root","isFinite","isIterable","o","$iterator$","sign","number","isNaN","toLength","len","Math","floor","abs","maxSafeInteger","isCallable","f","observableCatchHandler","source","handler","AnonymousObservable","observer","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","onNext","bind","exception","d","ex","onError","isPromise","observableFromPromise","onCompleted","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","concatAll","flatMap","mergeObservable","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","relatedTarget","fromElement","toElement","c","charCode","keyChar","fromCharCode","createListener","element","name","addEventListener","disposableCreate","removeEventListener","attachEvent","innerHandler","detachEvent","createEventListener","el","eventName","disposables","CompositeDisposable","add","item","observableTimerDate","dueTime","scheduler","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","combineLatestSource","subject","next","values","res","hasValueAll","every","identity","apply","isDone","n","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","isScheduler","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","getDisposable","Function","that","bound","F","concat","forEach","T","k","TypeError","O","kValue","boxedString","splitString","fun","split","thisp","filter","predicate","results","t","arg","indexOf","searchElement","Number","Infinity","compareTo","other","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","ScheduledItem","RefCountDisposable","InnerDisposable","disposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","s","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","scheduleMethod","immediateScheduler","immediate","scheduleNow","currentThreadScheduler","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","_next","Enumerable","_iterator","currentItem","currentValue","catchException","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","observerCreate","fromNotifier","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_thisArg","Observable","_subscribe","subscriber","subscribeNext","subscribeError","subscribeCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","from","iterable","mapFn","list","objIsIterable","it","observableFromArray","fromArray","array","never","ofWithScheduler","range","observableReturn","throwException","throwError","handlerOrSecond","observableCatch","combineLatest","unshift","j","falseFactory","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeAll","m","innerSubscription","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","doAction","tap","onNextFunc","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","select","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","take","RangeError","observable","takeWhile","where","fromCallback","func","context","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","Subject","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","timer","periodOrScheduler","getTime","delay","throttle","hasvalue","sample","intervalOrSampler","schedulerMethod","createTimer","myId","original","switched","PausableObservable","_super","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","exclusive","hasCurrent","g","exclusiveMap","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","createRemovableDisposable","so","_trim","hasError","windowSize","MAX_VALUE","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAwElE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAWgB,GAAa,CACpD,GAAIC,GAAOjB,EAAOkB,YACdC,EAAQ,GACRf,EAASgB,GAAchB,MAE3B,IAAIJ,KAAYiB,GAAQA,EAAKI,WAC3B,GAAIC,GAAYtB,IAAWuB,YAAcC,GAAcxB,IAAWY,GAAaa,GAAaC,GAASnB,KAAKP,GACtG2B,EAAUC,GAAaN,EAE7B,QAASH,EAAQf,GACfS,EAAMO,GAAcD,GACdQ,GAAWA,EAAQd,KAASgB,GAAetB,KAAKP,EAAQa,IAC5DZ,EAAOa,KAAKD,GAIlB,MAAOZ,GAGT,QAAS6B,GAAY9B,EAAQ+B,EAAUC,GAKrC,IAJA,GAAIb,GAAQ,GACVc,EAAQD,EAAShC,GACjBI,EAAS6B,EAAM7B,SAERe,EAAQf,GAAQ,CAC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,EAASoZ,eAEXxf,KAAKmsB,eAKPhlB,YAAa,WAEX,GADApH,EAAcgB,KAAKf,OACfA,KAAKue,UAAT,CACAve,KAAKue,WAAY,CACjB,IAAItT,GAAMjL,KAAKyK,UAAUQ,KACzBjL,MAAK0sB,MAAMzhB,EAEX,KAAK,GADD9F,GAAInF,KAAKmsB,UAAUrrB,MAAM,GACpB8D,EAAI,EAAGa,EAAMN,EAAEvE,OAAY6E,EAAJb,EAASA,IAAK,CAC5C,GAAIwB,GAAWjB,EAAEP,EACjBwB,GAASe,cACTf,EAASoZ,eAEXxf,KAAKmsB,eAKPhY,QAAS,WACPnU,KAAKC,YAAa,EAClBD,KAAKmsB,UAAY,QAId1D,GACP1J,GAEqB,mBAAV+N,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvE/nB,EAAKsJ,GAAKA,EAEVwe,OAAO,WACH,MAAOxe,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInBtJ,EAAKsJ,GAAKA,IAGhBvN,KAAKf"} diff --git a/dist/rx.lite.compat.min.js b/dist/rx.lite.compat.min.js index 32cabd442..9d7c9b42c 100644 --- a/dist/rx.lite.compat.min.js +++ b/dist/rx.lite.compat.min.js @@ -1,4 +1,4 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){function b(){if(this.isDisposed)throw new Error(X)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;sb.nonEnumArgs&&a.length&&h(a)&&(a=ub.call(a));var d=sb.enumPrototypes&&"function"==typeof a,e=sb.enumErrorProps&&(a===mb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(sb.nonEnumShadows&&a!==nb){var g=a.constructor,i=-1,j=qb.length;if(a===(g&&g.prototype))var k=a===stringProto?ib:a===mb?db:jb.call(a),l=rb[k];for(;++i-1:void 0});return c.pop(),d.pop(),result}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:ub.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(a){return"number"==typeof a&&H.isFinite(a)}function n(b){return b[Y]!==a}function o(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function p(a){var b=+a.length;return isNaN(b)?0:0!==b&&m(b)?(b=o(b)*Math.floor(Math.abs(b)),0>=b?0:b>ic?ic:b):b}function q(a){return"[object Function]"===Object.prototype.toString.call(a)&&"function"==typeof a}function r(a,b){return new Bc(function(c){var d=new Gb,e=new Hb;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}U(f)&&(f=uc(f)),d=new Gb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function s(a,b){var c=this;return new Bc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function t(a,b,c){return a.map(function(a,d){var e=b.call(c,a,d);return U(e)?uc(e):e}).concatAll()}function u(a,b,c){return a.map(function(a,d){var e=b.call(c,a,d);return U(e)?uc(e):e}).mergeObservable()}function v(a){var b=function(){this.cancelBubble=!0},c=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(a||(a=H.event),!a.target)switch(a.target=a.target||a.srcElement,"mouseover"==a.type&&(a.relatedTarget=a.fromElement),"mouseout"==a.type&&(a.relatedTarget=a.toElement),a.stopPropagation||(a.stopPropagation=b,a.preventDefault=c),a.type){case"keypress":var d="charCode"in a?a.charCode:a.keyCode;10==d?(d=0,a.keyCode=13):13==d||27==d?d=0:3==d&&(d=99),a.charCode=d,a.keyChar=a.charCode?String.fromCharCode(a.charCode):""}return a}function w(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Eb(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(v(a))};return a.attachEvent("on"+b,d),Eb(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,Eb(function(){a["on"+b]=null})}function x(a,b,c){var d=new Bb;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(x(a.item(e),b,c));else a&&d.add(w(a,b,c));return d}function y(a,b){return new Bc(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function z(a,b,c){return new Bc(function(d){var e=0,f=a,g=Kb(b);return c.scheduleRecursiveWithAbsolute(f,function(a){if(g>0){var b=c.now();f+=g,b>=f&&(f=b+g)}d.onNext(e++),a(f)})})}function A(a,b){return new Bc(function(c){return b.scheduleWithRelative(Kb(a),function(){c.onNext(0),c.onCompleted()})})}function B(a,b,c){return a===b?new Bc(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):gc(function(){return z(c.now()+a,b,c)})}function C(a,b,c){return new Bc(function(d){var e,f=!1,g=new Hb,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Gb,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new Bb(e,g)})}function D(a,b,c){return gc(function(){return C(a,b-c.now(),c)})}function E(a,b){return new Bc(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Bb(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))})}function F(a,b,c){return new Bc(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(P))){try{e=c.apply(null,j)}catch(f){return void d.onError(f)}d.onNext(e)}else i&&d.onCompleted()}var f=2,g=[!1,!1],h=!1,i=!1,j=new Array(f);return new Bb(a.subscribe(function(a){e(a,0)},d.onError.bind(d),function(){i=!0,d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d)))})}var G={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},H=G[typeof window]&&window||this,I=G[typeof exports]&&exports&&!exports.nodeType&&exports,J=G[typeof module]&&module&&!module.nodeType&&module,K=J&&J.exports===I&&I,L=G[typeof global]&&global;!L||L.global!==L&&L.window!==L||(H=L);var M={internals:{},config:{Promise:H.Promise},helpers:{}},N=M.helpers.noop=function(){},O=(M.helpers.notDefined=function(a){return"undefined"==typeof a},M.helpers.isScheduler=function(a){return a instanceof M.Scheduler}),P=M.helpers.identity=function(a){return a},Q=(M.helpers.pluck=function(a){return function(b){return b[a]}},M.helpers.just=function(a){return function(){return a}},M.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),R=M.helpers.defaultComparer=function(a,b){return tb(a,b)},S=M.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},T=(M.helpers.defaultKeySerializer=function(a){return a.toString()},M.helpers.defaultError=function(a){throw a}),U=M.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},V=(M.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},M.helpers.not=function(a){return!a},M.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==jb.call(a)}),a}()),W="Argument out of range",X="Object has been disposed",Y="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";H.Set&&"function"==typeof(new H.Set)["@@iterator"]&&(Y="@@iterator");var Z=M.doneEnumerator={done:!0,value:a};M.iterator=Y;var $,_="[object Arguments]",ab="[object Array]",bb="[object Boolean]",cb="[object Date]",db="[object Error]",eb="[object Function]",fb="[object Number]",gb="[object Object]",hb="[object RegExp]",ib="[object String]",jb=Object.prototype.toString,kb=Object.prototype.hasOwnProperty,lb=jb.call(arguments)==_,mb=Error.prototype,nb=Object.prototype,ob=nb.propertyIsEnumerable;try{$=!(jb.call(document)==gb&&!({toString:0}+""))}catch(pb){$=!0}var qb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],rb={};rb[ab]=rb[cb]=rb[fb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},rb[bb]=rb[ib]={constructor:!0,toString:!0,valueOf:!0},rb[db]=rb[eb]=rb[hb]={constructor:!0,toString:!0},rb[gb]={constructor:!0};var sb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);sb.enumErrorProps=ob.call(mb,"message")||ob.call(mb,"name"),sb.enumPrototypes=ob.call(a,"prototype"),sb.nonEnumArgs=0!=c,sb.nonEnumShadows=!/valueOf/.test(b)}(1),lb||(h=function(a){return a&&"object"==typeof a?kb.call(a,"callee"):!1});{var tb=M.internals.isEqual=function(a,b){return i(a,b,[],[])},ub=Array.prototype.slice,vb=({}.hasOwnProperty,this.inherits=M.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),wb=M.internals.addProperties=function(a){for(var b=ub.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}};M.internals.addRef=function(a,b){return new Bc(function(c){return new Bb(b.getDisposable(),a.subscribe(c))})}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=ub.call(arguments,1),d=function(){function e(){}if(this instanceof d){e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(ub.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(ub.call(arguments)))};return d}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if(null==this)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=0;f>d;){var g;d in e&&(g=e[d],a.call(c,g,d,e)),d++}});var xb=Object("a"),yb="a"!=xb[0]||!(0 in xb);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=yb&&{}.toString.call(this)==ib?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=eb)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=yb&&{}.toString.call(this)==ib?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=eb)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return{}.toString.call(a)==ab}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!=d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var zb=M.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Ab=zb.prototype;Ab.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Ab.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Ab.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},Cb.toArray=function(){return this.disposables.slice(0)};var Db=M.Disposable=function(a){this.isDisposed=!1,this.action=a||N};Db.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Eb=Db.create=function(a){return new Db(a)},Fb=Db.empty={dispose:N},Gb=M.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),Hb=M.SerialDisposable=Gb,Ib=(M.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Fb:new a(this)},b}(),M.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||S,this.disposable=new Gb});Ib.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Ib.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Ib.prototype.isCancelled=function(){return this.disposable.isDisposed},Ib.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Jb=M.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Fb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=Q,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Kb=Jb.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Bb,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),Fb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Bb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Fb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Jb.prototype),function(){Jb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Jb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof H.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=H.setInterval(function(){d=c(d)},b);return Eb(function(){H.clearInterval(e)})}}(Jb.prototype);var Lb,Mb=Jb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=Kb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Jb(Q,a,b,c)}(),Nb=Jb.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-Jb.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+Jb.normalize(c),g=new Ib(this,b,d,f);if(e)e.enqueue(g);else{e=new zb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new Jb(Q,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Ob=(M.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Gb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),N),Pb=function(){var a,b=N;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!H.setTimeout)throw new Error("No concurrency detected!");a=H.setTimeout,b=H.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Qb=Pb.setTimeout,Rb=Pb.clearTimeout;!function(){function a(){if(!H.postMessage||H.importScripts)return!1;var a=!1,b=H.onmessage;return H.onmessage=function(){a=!0},H.postMessage("","*"),H.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(jb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=L&&K&&L.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=L&&K&&L.clearImmediate)&&!c.test(e)&&e;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Lb=process.nextTick;else if("function"==typeof d)Lb=d,Ob=e;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;H.addEventListener?H.addEventListener("message",b,!1):H.attachEvent("onmessage",b,!1),Lb=function(a){var b=h++;g[b]=a,H.postMessage(f+b,"*")}}else if(H.MessageChannel){var i=new H.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Lb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in H&&"onreadystatechange"in H.document.createElement("script")?Lb=function(a){var b=H.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},H.document.documentElement.appendChild(b)}:(Lb=function(a){return Qb(a,0)},Ob=Rb)}();var Sb=Jb.timeout=function(){function a(a,b){var c=this,d=new Gb,e=Lb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Bb(d,Eb(function(){Ob(e)}))}function b(a,b,c){var d=this,e=Jb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Gb,g=Qb(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Bb(f,Eb(function(){Rb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Jb(Q,a,b,c)}(),Tb=M.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return O(a)||(a=Mb),new Bc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Ub=Tb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new Tb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Vb=Tb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new Tb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Wb=Tb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Tb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Xb=M.internals.Enumerator=function(a){this._next=a};Xb.prototype.next=function(){return this._next()},Xb.prototype[Y]=function(){return this};var Yb=M.internals.Enumerable=function(a){this._iterator=a};Yb.prototype[Y]=function(){return this._iterator()},Yb.prototype.concat=function(){var a=this;return new Bc(function(b){var c;try{c=a[Y]()}catch(d){return void b.onError()}var e,f=new Hb,g=Mb.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;U(h)&&(h=uc(h));var i=new Gb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new Bb(f,g,Eb(function(){e=!0}))})},Yb.prototype.catchException=function(){var a=this;return new Bc(function(b){var c;try{c=a[Y]()}catch(d){return void b.onError()}var e,f,g=new Hb,h=Mb.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;U(i)&&(i=uc(i));var j=new Gb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new Bb(g,h,Eb(function(){e=!0}))})};var Zb=Yb.repeat=function(a,b){return null==b&&(b=-1),new Yb(function(){var c=b;return new Xb(function(){return 0===c?Z:(c>0&&c--,{done:!1,value:a})})})},$b=Yb.of=function(a,b,c){return b||(b=P),new Yb(function(){var d=-1;return new Xb(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(cc);bc.toArray=function(){var a=this;return new Bc(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},ec.create=ec.createWithDisposable=function(a){return new Bc(a)};var gc=ec.defer=function(a){return new Bc(function(b){var c;try{c=a()}catch(d){return lc(d).subscribe(b)}return U(c)&&(c=uc(c)),c.subscribe(b)})},hc=ec.empty=function(a){return O(a)||(a=Mb),new Bc(function(b){return a.schedule(function(){b.onCompleted()})})},ic=Math.pow(2,53)-1;ec.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!q(b))throw new Error("mapFn when provided must be a function");return O(d)||(d=Nb),new Bc(function(e){var f=Object(a),g=n(f),h=g?0:p(f),i=g?f[Y]():null,j=0;return d.scheduleRecursive(function(a){if(h>j||g){var d;if(g){var k=i.next();if(k.done)return void e.onCompleted();d=k.value}else d=f[j];if(b&&q(b))try{d=c?b.call(c,d,j):b(d,j)}catch(l){return void e.onError(l)}e.onNext(d),j++,a()}else e.onCompleted()})})};{var jc=ec.fromArray=function(a,b){return O(b)||(b=Nb),new Bc(function(c){var d=0,e=a.length;return b.scheduleRecursive(function(b){e>d?(c.onNext(a[d++]),b()):c.onCompleted()})})};ec.never=function(){return new Bc(function(){return Fb})}}ec.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return jc(b)};ec.ofWithScheduler=function(a){for(var b=arguments.length-1,c=new Array(b),d=0;b>d;d++)c[d]=arguments[d+1];return jc(c,a)};ec.range=function(a,b,c){return O(c)||(c=Nb),new Bc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},ec.repeat=function(a,b,c){return O(c)||(c=Nb),kc(a,c).repeat(null==b?-1:b)};var kc=ec["return"]=ec.returnValue=ec.just=function(a,b){return O(b)||(b=Mb),new Bc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})},lc=ec["throw"]=ec.throwException=ec.throwError=function(a,b){return O(b)||(b=Mb),new Bc(function(c){return b.schedule(function(){c.onError(a)})})};bc["catch"]=bc.catchException=function(a){return"function"==typeof a?r(this,a):mc([this,a])};var mc=ec.catchException=ec["catch"]=function(){return $b(j(arguments,0)).catchException()};bc.combineLatest=function(){var a=ub.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),nc.apply(this,a)};var nc=ec.combineLatest=function(){var a=ub.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Bc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(P))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(P)&&c.onCompleted()}function e(a){j[a]=!0,j.every(P)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new Gb;U(f)&&(f=uc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new Bb(m)})};bc.concat=function(){var a=ub.call(arguments,0);return a.unshift(this),oc.apply(this,a)};var oc=ec.concat=function(){return $b(j(arguments,0)).concat()};bc.concatObservable=bc.concatAll=function(){return this.merge(1)},bc.merge=function(a){if("number"!=typeof a)return pc(this,a);var b=this;return new Bc(function(c){function d(a){var b=new Gb;f.add(b),U(a)&&(a=uc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Bb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var pc=ec.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=ub.call(arguments,1)):(a=Mb,b=ub.call(arguments,0)):(a=Mb,b=ub.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),jc(b,a).mergeObservable()};bc.mergeObservable=bc.mergeAll=function(){var a=this;return new Bc(function(b){var c=new Bb,d=!1,e=new Gb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Gb;c.add(e),U(a)&&(a=uc(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},bc.skipUntil=function(a){var b=this;return new Bc(function(c){var d=!1,e=new Bb(b.subscribe(function(a){d&&c.onNext(a)},c.onError.bind(c),function(){d&&c.onCompleted()}));U(a)&&(a=uc(a));var f=new Gb;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},c.onError.bind(c),function(){f.dispose()})),e})},bc["switch"]=bc.switchLatest=function(){var a=this;return new Bc(function(b){var c=!1,d=new Hb,e=!1,f=0,g=a.subscribe(function(a){var g=new Gb,h=++f;c=!0,d.setDisposable(g),U(a)&&(a=uc(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},b.onError.bind(b),function(){e=!0,!c&&b.onCompleted()});return new Bb(g,d)})},bc.takeUntil=function(a){var b=this;return new Bc(function(c){return U(a)&&(a=uc(a)),new Bb(b.subscribe(c),a.subscribe(c.onCompleted.bind(c),c.onError.bind(c),N))})},bc.zip=function(){if(Array.isArray(arguments[0]))return s.apply(this,arguments);var a=this,b=ub.call(arguments),c=b.pop();return b.unshift(a),new Bc(function(d){function e(b){var e,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(P)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new Gb; U(c)&&(c=uc(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new Bb(j)})},ec.zip=function(){var a=ub.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},ec.zipArray=function(){var a=j(arguments,0);return new Bc(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(P))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(P)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Gb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new Bb(h);return j.add(Eb(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},bc.asObservable=function(){return new Bc(this.subscribe.bind(this))},bc.dematerialize=function(){var a=this;return new Bc(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},bc.distinctUntilChanged=function(a,b){var c=this;return a||(a=P),b||(b=R),new Bc(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},bc["do"]=bc.doAction=bc.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new Bc(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b){try{b(c)}catch(d){a.onError(d)}a.onError(c)}else a.onError(c)},function(){if(c){try{c()}catch(b){a.onError(b)}a.onCompleted()}else a.onCompleted()})})},bc["finally"]=bc.finallyAction=function(a){var b=this;return new Bc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Eb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},bc.ignoreElements=function(){var a=this;return new Bc(function(b){return a.subscribe(N,b.onError.bind(b),b.onCompleted.bind(b))})},bc.materialize=function(){var a=this;return new Bc(function(b){return a.subscribe(function(a){b.onNext(Ub(a))},function(a){b.onNext(Vb(a)),b.onCompleted()},function(){b.onNext(Wb()),b.onCompleted()})})},bc.repeat=function(a){return Zb(this,a).concat()},bc.retry=function(a){return Zb(this,a).catchException()},bc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new Bc(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},bc.skipLast=function(a){var b=this;return new Bc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},bc.startWith=function(){var a,b,c=0;return arguments.length&&O(arguments[0])?(b=arguments[0],c=1):b=Mb,a=ub.call(arguments,c),$b([jc(a,b),this]).concat()},bc.takeLast=function(a){var b=this;return new Bc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},bc.selectConcat=bc.concatMap=function(a,b,c){return b?this.concatMap(function(c,d){var e=a(c,d),f=U(e)?uc(e):e;return f.map(function(a){return b(c,a,d)})}):"function"==typeof a?t(this,a,c):t(this,function(){return a})},bc.select=bc.map=function(a,b){var c=this;return new Bc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},bc.pluck=function(a){return this.map(function(b){return b[a]})},bc.selectMany=bc.flatMap=function(a,b,c){return b?this.flatMap(function(c,d){var e=a(c,d),f=U(e)?uc(e):e;return f.map(function(a){return b(c,a,d)})},c):"function"==typeof a?u(this,a,c):u(this,function(){return a})},bc.selectSwitch=bc.flatMapLatest=bc.switchMap=function(a,b){return this.select(a,b).switchLatest()},bc.skip=function(a){if(0>a)throw new Error(W);var b=this;return new Bc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},bc.skipWhile=function(a,b){var c=this;return new Bc(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},bc.take=function(a,b){if(0>a)throw new RangeError(W);if(0===a)return hc(b);var c=this;return new Bc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},bc.takeWhile=function(a,b){var c=this;return new Bc(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},bc.where=bc.filter=function(a,b){var c=this;return new Bc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},ec.fromCallback=function(a,b,c){return function(){var d=ub.call(arguments,0);return new Bc(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},ec.fromNodeCallback=function(a,b,c){return function(){var d=ub.call(arguments,0);return new Bc(function(e){function f(a){if(a)return void e.onError(a);var b=ub.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},M.config.useNativeEvents=!1;var qc=H.angular&&angular.element?angular.element:H.jQuery?H.jQuery:H.Zepto?H.Zepto:null,rc=!!H.Ember&&"function"==typeof H.Ember.addListener,sc=!!H.Backbone&&!!H.Backbone.Marionette;ec.fromEvent=function(a,b,c){if(a.addListener)return tc(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!M.config.useNativeEvents){if(sc)return tc(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(rc)return tc(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c);if(qc){var d=qc(a);return tc(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}}return new Bc(function(d){return x(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var tc=ec.fromEventPattern=function(a,b,c){return new Bc(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return Eb(function(){b&&b(e,f)})}).publish().refCount()},uc=ec.fromPromise=function(a){return gc(function(){var b=new M.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};bc.toPromise=function(a){if(a||(a=M.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},ec.startAsync=function(a){var b;try{b=a()}catch(c){return lc(c)}return uc(b)},bc.multicast=function(a,b){var c=this;return"function"==typeof a?new Bc(function(d){var e=c.multicast(a());return new Bb(b(e).subscribe(d),e.connect())}):new vc(c,a)},bc.publish=function(a){return a&&V(a)?this.multicast(function(){return new Ec},a):this.multicast(new Ec)},bc.share=function(){return this.publish().refCount()},bc.publishLast=function(a){return a&&V(a)?this.multicast(function(){return new Fc},a):this.multicast(new Fc)},bc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new Hc(b)},a):this.multicast(new Hc(a))},bc.shareValue=function(a){return this.publishValue(a).refCount()},bc.replay=function(a,b,c,d){return a&&V(a)?this.multicast(function(){return new Ic(b,c,d)},a):this.multicast(new Ic(b,c,d))},bc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var vc=M.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Bb(f.subscribe(c),Eb(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return vb(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Bc(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(ec),wc=ec.interval=function(a,b){return B(a,a,O(b)?b:Sb)};ec.timer=function(b,c,d){var e;return O(d)||(d=Sb),c!==a&&"number"==typeof c?e=c:O(c)&&(d=c),b instanceof Date&&e===a?y(b.getTime(),d):b instanceof Date&&e!==a?(e=c,z(b.getTime(),e,d)):e===a?A(b,d):B(b,e,d)}}bc.delay=function(a,b){return O(b)||(b=Sb),a instanceof Date?D(this,a.getTime(),b):C(this,a,b)},bc.throttle=function(a,b){O(b)||(b=Sb);var c=this;return new Bc(function(d){var e,f=new Hb,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new Gb;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new Bb(i,f)})},bc.timestamp=function(a){return O(a)||(a=Sb),this.map(function(b){return{value:b,timestamp:a.now()}})},bc.sample=function(a,b){return O(b)||(b=Sb),"number"==typeof a?E(this,wc(a,b)):E(this,a)},bc.timeout=function(a,b,c){b||(b=lc(new Error("Timeout"))),O(c)||(c=Sb);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Bc(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(U(b)&&(b=uc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new Gb,j=new Hb,k=!1,l=new Hb;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new Bb(j,l)})};var xc=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Fb,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Fb)});return new Bb(c,d,e)}function c(c,d){this.source=c,this.controller=new Ec,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return vb(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(ec);bc.pausable=function(a){return new xc(this,a)};var yc=function(b){function c(b){var c,d=[],e=F(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new Ec,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c)}return vb(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(ec);bc.pausableBuffered=function(a){return new yc(this,a)},bc.controlled=function(a){return null==a&&(a=!0),new zc(this,a)};var zc=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new Ac(d),this.source=c.multicast(this.subject).refCount()}return vb(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(ec),Ac=M.ControlledSubject=function(a){function c(a){return this.subject.subscribe(a)}function d(b){null==b&&(b=!0),a.call(this,c),this.subject=new Ec,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=Fb,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=Fb}return vb(d,a),wb(d.prototype,_b,{onCompleted:function(){b.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){b.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){b.call(this);var c=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),c=!0),c&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=Fb):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=Fb),{numberOfItems:a,returnValue:!1}},request:function(a){b.call(this),this.disposeCurrentRequest();var c=this,d=this._processRequest(a);return a=d.numberOfItems,d.returnValue?Fb:(this.requestedCount=a,this.requestedDisposable=Eb(function(){c.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=Fb},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),d}(ec);bc.exclusive=function(){var a=this;return new Bc(function(b){var c=!1,d=!1,e=new Gb,f=new Bb;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,U(a)&&(a=uc(a));var e=new Gb;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f})},bc.exclusiveMap=function(a,b){var c=this;return new Bc(function(d){var e=0,f=!1,g=!0,h=new Gb,i=new Bb;return i.add(h),h.setDisposable(c.subscribe(function(c){f||(f=!0,innerSubscription=new Gb,i.add(innerSubscription),U(c)&&(c=uc(c)),innerSubscription.setDisposable(c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),function(){i.remove(innerSubscription),f=!1,g&&1===i.length&&d.onCompleted()})))},d.onError.bind(d),function(){g=!0,1!==i.length||f||d.onCompleted()})),i})};var Bc=M.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Eb(a):Fb}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new Cc(a);return Nb.scheduleRequired()?Nb.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return vb(c,a),c}(ec),Cc=function(a){function b(b){a.call(this),this.observer=b,this.m=new Gb}vb(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(cc),Dc=function(a,b){this.subject=a,this.observer=b};Dc.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var Ec=M.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),Fb):(a.onCompleted(),Fb):(this.observers.push(a),new Dc(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return vb(d,a),wb(d.prototype,_b,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Gc(a,b)},d}(ec),Fc=M.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new Dc(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),Fb}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return vb(d,a),wb(d.prototype,_b,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(ec),Gc=M.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return vb(b,a),wb(b.prototype,_b,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(ec),Hc=M.BehaviorSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new Dc(this,a);var c=this.exception;return c?a.onError(c):a.onCompleted(),Fb}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return vb(d,a),wb(d.prototype,_b,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=this.observers.slice(0),d=c.length;d>a;a++)c[a].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped){this.value=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(ec),Ic=M.ReplaySubject=function(a){function c(a,b){return Eb(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var d=new fc(this.scheduler,a),e=c(this,d);b.call(this),this._trim(this.scheduler.now()),this.observers.push(d);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)d.onNext(this.q[g].value);return this.hasError?(f++,d.onError(this.error)):this.isStopped&&(f++,d.onCompleted()),d.ensureActive(f),e}function e(b,c,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=e||Nb,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}return vb(e,a),wb(e.prototype,_b,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b.call(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++){var f=c[d];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(ec);"function"==typeof define&&"object"==typeof define.amd&&define.amd?(H.Rx=M,define(function(){return M})):I&&J?K?(J.exports=M).Rx=M:I.Rx=M:H.Rx=M}).call(this); -//# sourceMappingURL=rx.lite.compat.map \ No newline at end of file +//# sourceMappingURL=rx.lite.compat.map diff --git a/dist/rx.lite.extras.map b/dist/rx.lite.extras.map index fb83d6980..d1d151baf 100644 --- a/dist/rx.lite.extras.map +++ b/dist/rx.lite.extras.map @@ -1 +1 @@ -{"version":3,"file":"rx.lite.extras.min.js","sources":["rx.lite.extras.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","argsOrArray","args","idx","length","Array","isArray","slice","ScheduledDisposable","scheduler","disposable","isDisposed","arrayIndexOfComparer","array","item","comparer","i","len","HashSet","set","Observable","observableProto","prototype","observableNever","never","observableThrow","throwException","AnonymousObservable","Observer","Subject","internals","helpers","ScheduledObserver","SingleAssignmentDisposable","CompositeDisposable","RefCountDisposable","disposableEmpty","Disposable","empty","immediateScheduler","Scheduler","immediate","addRef","defaultKeySerializer","isPromise","identity","inherits","isScheduler","noop","observableFromPromise","fromPromise","argumentOutOfRange","dispose","parent","schedule","ObserveOnObserver","_super","CheckedObserver","observer","_observer","_state","CheckedObserverPrototype","onNext","value","checkAccess","e","onError","err","onCompleted","Error","__super__","apply","arguments","next","ensureActive","error","completed","observeOn","source","subscribe","subscribeOn","m","d","SerialDisposable","setDisposable","generate","initialState","condition","iterate","resultSelector","currentThreadScheduler","first","state","scheduleRecursive","self","hasResult","result","exception","using","resourceFactory","observableFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","left","right","func","previous","current","acc","items","onErrorResumeNext","second","sources","pos","subscription","cancelable","bind","bufferWithCount","count","skip","windowWithCount","selectMany","x","toArray","where","refCountDisposable","n","q","createWindow","s","push","c","shift","takeLastBuffer","defaultIfEmpty","defaultValue","found","retValue","distinct","keySelector","defaultComparer","hashSet","key"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,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AAQ2D,KAAKnE,GAAW,WAC3BuF,GACDvF,EAASI,OAAOkF,GAEpBtF,EAASU,mBAiBvBlD,EAAQI,UAAUqH,KAAO,SAAS5E,GAChC,GAAImF,GAAoE,KAAzDtI,EAAqBzB,KAAKgC,IAAK4C,EAAO5E,KAAK4B,SAE1D,OADAmI,IAAY/J,KAAKgC,IAAIwH,KAAK5E,GACnBmF,GAeT7H,EAAgB8H,SAAW,SAAUC,EAAarI,GAChD,GAAI+D,GAAS3F,IAEb,OADA4B,KAAaA,EAAWsI,iBACjB,GAAI1H,GAAoB,SAAU+B,GACvC,GAAI4F,GAAU,GAAIpI,GAAQH,EAC1B,OAAO+D,GAAOC,UAAU,SAAUoD,GAChC,GAAIoB,GAAMpB,CAEV,IAAIiB,EACF,IACEG,EAAMH,EAAYjB,GAClB,MAAOlE,GAEP,WADAP,GAASQ,QAAQD,GAIrBqF,EAAQX,KAAKY,IAAQ7F,EAASI,OAAOqE,IAEvCzE,EAASQ,QAAQ2D,KAAKnE,GACtBA,EAASU,YAAYyD,KAAKnE,OAIrB7D"} \ No newline at end of file +{"version":3,"file":"rx.lite.extras.min.js","sources":["rx.lite.extras.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","argsOrArray","args","idx","length","Array","isArray","slice","ScheduledDisposable","scheduler","disposable","isDisposed","arrayIndexOfComparer","array","item","comparer","i","len","HashSet","set","Observable","observableProto","prototype","observableNever","never","observableThrow","throwException","AnonymousObservable","Observer","Subject","internals","helpers","ScheduledObserver","SingleAssignmentDisposable","CompositeDisposable","RefCountDisposable","disposableEmpty","Disposable","empty","immediateScheduler","Scheduler","immediate","addRef","defaultKeySerializer","isPromise","identity","inherits","isScheduler","noop","observableFromPromise","fromPromise","argumentOutOfRange","dispose","parent","schedule","ObserveOnObserver","_super","CheckedObserver","observer","_observer","_state","CheckedObserverPrototype","onNext","value","checkAccess","e","onError","err","onCompleted","Error","__super__","apply","arguments","next","ensureActive","error","completed","observeOn","source","subscribe","subscribeOn","m","d","SerialDisposable","setDisposable","generate","initialState","condition","iterate","resultSelector","currentThreadScheduler","first","state","scheduleRecursive","self","hasResult","result","exception","using","resourceFactory","observableFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","left","right","func","previous","current","acc","items","onErrorResumeNext","second","sources","pos","subscription","cancelable","bind","bufferWithCount","count","skip","windowWithCount","selectMany","x","toArray","where","refCountDisposable","n","q","createWindow","s","push","c","shift","takeLastBuffer","defaultIfEmpty","defaultValue","found","retValue","distinct","keySelector","defaultComparer","hashSet","key"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,EAAIb,GA4BpC,QAASiB,GAAYC,EAAMC,GACzB,MAAuB,KAAhBD,EAAKE,QAAgBC,MAAMC,QAAQJ,EAAKC,IAC7CD,EAAKC,GACLI,EAAMR,KAA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min.js +++ b/dist/rx.lite.extras.min.js @@ -1,3 +1,3 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:C.call(a)}function f(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function g(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function h(a){this.comparer=a,this.set=[]}var i=c.Observable,j=i.prototype,k=i.never,l=i.throwException,m=c.AnonymousObservable,n=c.Observer,o=c.Subject,p=c.internals,q=c.helpers,r=p.ScheduledObserver,s=c.SingleAssignmentDisposable,t=c.CompositeDisposable,u=c.RefCountDisposable,v=c.Disposable.empty,w=c.Scheduler.immediate,x=(q.defaultKeySerializer,c.internals.addRef),y=(q.identity,q.isPromise),z=p.inherits,A=(q.noop,q.isScheduler),B=i.fromPromise,C=Array.prototype.slice,D="Argument out of range";f.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var E=(function(a){function b(b){a.call(this),this._observer=b,this._state=0}z(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();try{this._observer.onNext(a)}catch(b){throw b}finally{this._state=0}},c.onError=function(a){this.checkAccess();try{this._observer.onError(a)}catch(b){throw b}finally{this._state=2}},c.onCompleted=function(){this.checkAccess();try{this._observer.onCompleted()}catch(a){throw a}finally{this._state=2}},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(n),function(a){function b(){a.apply(this,arguments)}return z(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(r));j.observeOn=function(a){var b=this;return new m(function(c){return b.subscribe(new E(a,c))})},j.subscribeOn=function(a){var b=this;return new m(function(c){var d=new s,e=new SerialDisposable;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new f(a,b.subscribe(c)))})),e})},i.generate=function(a,b,c,d,e){return A(e)||(e=currentThreadScheduler),new m(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})},i.using=function(a,b){return new m(function(c){var d,e,f=v;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new t(l(g).subscribe(c),f)}return new t(e.subscribe(c),f)})},j.amb=function(a){var b=this;return new m(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new s,j=new s;return y(a)&&(a=B(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new t(i,j)})},i.amb=function(){function a(a,b){return a.amb(b)}for(var b=k(),c=e(arguments,0),d=0,f=c.length;f>d;d++)b=a(b,c[d]);return b},j.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return F([this,a])};var F=i.onErrorResumeNext=function(){var a=e(arguments,0);return new m(function(b){var c=0,d=new SerialDisposable,e=w.scheduleRecursive(function(e){var f,g;c0})},j.windowWithCount=function(a,b){var c=this;if(0>=a)throw new Error(D);if(1===arguments.length&&(b=a),0>=b)throw new Error(D);return new m(function(d){var e=new s,f=new u(e),g=0,h=[],i=function(){var a=new o;h.push(a),d.onNext(x(a,f))};return i(),e.setDisposable(c.subscribe(function(c){for(var d,e=0,f=h.length;f>e;e++)h[e].onNext(c);var j=g-a+1;j>=0&&j%b===0&&(d=h.shift(),d.onCompleted()),g++,g%b===0&&i()},function(a){for(;h.length>0;)h.shift().onError(a);d.onError(a)},function(){for(;h.length>0;)h.shift().onCompleted();d.onCompleted()})),f})},j.takeLastBuffer=function(a){var b=this;return new m(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},j.defaultIfEmpty=function(a){var b=this;return a===d&&(a=null),new m(function(c){var d=!1;return b.subscribe(function(a){d=!0,c.onNext(a)},c.onError.bind(c),function(){d||c.onNext(a),c.onCompleted()})})},h.prototype.push=function(a){var b=-1===g(this.set,a,this.comparer);return b&&this.set.push(a),b},j.distinct=function(a,b){var c=this;return b||(b=defaultComparer),new m(function(d){var e=new h(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},d.onError.bind(d),d.onCompleted.bind(d))})},c}); -//# sourceMappingURL=rx.lite.extras.map \ No newline at end of file +//# sourceMappingURL=rx.lite.extras.map diff --git a/dist/rx.lite.map b/dist/rx.lite.map index f85cca203..c75238424 100644 --- a/dist/rx.lite.map +++ b/dist/rx.lite.map @@ -1 +1 @@ -{"version":3,"file":"rx.lite.min.js","sources":["rx.lite.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","numberIsFinite","root","isFinite","isIterable","o","$iterator$","sign","number","isNaN","toLength","len","Math","floor","abs","maxSafeInteger","isCallable","f","observableCatchHandler","source","handler","AnonymousObservable","observer","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","onNext","bind","exception","d","ex","onError","isPromise","observableFromPromise","onCompleted","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","concatAll","flatMap","mergeObservable","createListener","element","name","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","item","observableTimerDate","dueTime","scheduler","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","combineLatestSource","subject","next","values","res","hasValueAll","every","identity","apply","isDone","n","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","isScheduler","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","indexOf","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","ScheduledItem","RefCountDisposable","InnerDisposable","disposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","s","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","scheduleMethod","immediateScheduler","immediate","scheduleNow","currentThreadScheduler","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","_next","Enumerable","_iterator","concat","currentItem","currentValue","catchException","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","observerCreate","fromNotifier","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_thisArg","Observable","_subscribe","forEach","subscriber","subscribeNext","subscribeError","subscribeCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","from","iterable","mapFn","list","objIsIterable","it","observableFromArray","fromArray","array","never","ofWithScheduler","range","observableReturn","returnValue","throwException","throwError","handlerOrSecond","observableCatch","combineLatest","unshift","filter","j","falseFactory","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeAll","m","innerSubscription","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","doAction","tap","onNextFunc","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","select","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","predicate","take","RangeError","observable","takeWhile","where","fromCallback","func","context","results","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","innerHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","TypeError","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","Subject","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","timer","periodOrScheduler","getTime","delay","throttle","hasvalue","sample","intervalOrSampler","schedulerMethod","createTimer","myId","original","switched","PausableObservable","_super","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","exclusive","hasCurrent","g","exclusiveMap","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","createRemovableDisposable","so","_trim","hasError","windowSize","Number","MAX_VALUE","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAwElE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAWgB,GAAa,CACpD,GAAIC,GAAOjB,EAAOkB,YACdC,EAAQ,GACRf,EAASgB,GAAchB,MAE3B,IAAIJ,KAAYiB,GAAQA,EAAKI,WAC3B,GAAIC,GAAYtB,IAAWuB,YAAcC,GAAcxB,IAAWY,GAAaa,GAAaC,GAASnB,KAAKP,GACtG2B,EAAUC,GAAaN,EAE7B,QAASH,EAAQf,GACfS,EAAMO,GAAcD,GACdQ,GAAW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C,GAAIwB,GAAWjB,EAAEP,EACjBwB,GAASY,QAAQ6U,GACjBzV,EAAS0W,eAEX9c,KAAK+pB,eAKP5iB,YAAa,WAEX,GADApH,EAAcgB,KAAKf,OACfA,KAAK4b,UAAT,CACA5b,KAAK4b,WAAY,CACjB,IAAIlS,GAAM1J,KAAKkJ,UAAUQ,KACzB1J,MAAKsqB,MAAM5gB,EAEX,KAAK,GADDvE,GAAInF,KAAK+pB,UAAUjpB,MAAM,GACpB8D,EAAI,EAAGa,EAAMN,EAAEvE,OAAY6E,EAAJb,EAASA,IAAK,CAC5C,GAAIwB,GAAWjB,EAAEP,EACjBwB,GAASe,cACTf,EAAS0W,eAEX9c,KAAK+pB,eAKP3Y,QAAS,WACPpR,KAAKC,YAAa,EAClBD,KAAK+pB,UAAY,QAId1D,GACPjK,GAEqB,mBAAVuO,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvE5lB,EAAK+H,GAAKA,EAEV4d,OAAO,WACH,MAAO5d,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInB/H,EAAK+H,GAAKA,IAGhBhM,KAAKf"} \ No newline at end of file +{"version":3,"file":"rx.lite.min.js","sources":["rx.lite.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","numberIsFinite","root","isFinite","isIterable","o","$iterator$","sign","number","isNaN","toLength","len","Math","floor","abs","maxSafeInteger","isCallable","f","observableCatchHandler","source","handler","AnonymousObservable","observer","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","onNext","bind","exception","d","ex","onError","isPromise","observableFromPromise","onCompleted","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","concatAll","flatMap","mergeObservable","createListener","element","name","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","item","observableTimerDate","dueTime","scheduler","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsolute","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","combineLatestSource","subject","next","values","res","hasValueAll","every","identity","apply","isDone","n","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","isScheduler","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","CompositeDisposablePrototype","dispose","shouldDispose","indexOf","splice","currentDisposables","toArray","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","ScheduledItem","RefCountDisposable","InnerDisposable","disposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","s","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","setInterval","clearInterval","scheduleMethod","immediateScheduler","immediate","scheduleNow","currentThreadScheduler","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","_next","Enumerable","_iterator","concat","currentItem","currentValue","catchException","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","asObserver","AnonymousObserver","observerCreate","fromNotifier","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_thisArg","Observable","_subscribe","forEach","subscriber","subscribeNext","subscribeError","subscribeCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","from","iterable","mapFn","list","objIsIterable","it","observableFromArray","fromArray","array","never","ofWithScheduler","range","observableReturn","returnValue","throwException","throwError","handlerOrSecond","observableCatch","combineLatest","unshift","filter","j","falseFactory","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeAll","m","innerSubscription","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","doAction","tap","onNextFunc","finallyAction","ignoreElements","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","select","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","predicate","take","RangeError","observable","takeWhile","where","fromCallback","func","context","results","publishLast","refCount","fromNodeCallback","useNativeEvents","jq","angular","jQuery","Zepto","ember","Ember","addListener","marionette","Backbone","Marionette","fromEvent","fromEventPattern","h","removeListener","on","off","$elem","publish","addHandler","removeHandler","innerHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","TypeError","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","Subject","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","timer","periodOrScheduler","getTime","delay","throttle","hasvalue","sample","intervalOrSampler","schedulerMethod","createTimer","myId","original","switched","PausableObservable","_super","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","controlled","enableQueue","ControlledObservable","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","exclusive","hasCurrent","g","exclusiveMap","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","createRemovableDisposable","so","_trim","hasError","windowSize","Number","MAX_VALUE","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAwElE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAWgB,GAAa,CACpD,GAAIC,GAAOjB,EAAOkB,YACdC,EAAQ,GACRf,EAASgB,GAAchB,MAE3B,IAAIJ,KAAYiB,GAAQA,EAAKI,WAC3B,GAAIC,GAAYtB,IAAWuB,YAAcC,GAAcxB,IAAWY,GAAaa,GAAaC,GAASnB,KAAKP,GACtG2B,EAAUC,GAAaN,EAE7B,QAASH,EAAQf,GACfS,EAAMO,GAAcD,GACdQ,GAAWA,EAAQd,KAASgB,GAAetB,KAAKP,EAAQa,IAC5DZ,EAAOa,KAAKD,GAIlB,MAAOZ,GAGT,QAAS6B,GAAY9B,EAAQ+B,EAAUC,GAKrC,IAJA,GAAIb,GAAQ,GACVc,EAAQD,EAAShC,GACjBI,EAAS6B,EAAM7B,SAERe,EAAQf,GAAQ,CACvB,GAAIS,GAAMoB,EAAMd,EAChB,I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AAK,GADDvE,GAAInF,KAAK+pB,UAAUjpB,MAAM,GACpB8D,EAAI,EAAGa,EAAMN,EAAEvE,OAAY6E,EAAJb,EAASA,IAAK,CAC5C,GAAIwB,GAAWjB,EAAEP,EACjBwB,GAASe,cACTf,EAAS0W,eAEX9c,KAAK+pB,eAKP3Y,QAAS,WACPpR,KAAKC,YAAa,EAClBD,KAAK+pB,UAAY,QAId1D,GACPjK,GAEqB,mBAAVuO,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvE5lB,EAAK+H,GAAKA,EAEV4d,OAAO,WACH,MAAO5d,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInB/H,EAAK+H,GAAKA,IAGhBhM,KAAKf"} diff --git a/dist/rx.lite.min.js b/dist/rx.lite.min.js index c9777a87f..9eb1cc4f3 100644 --- a/dist/rx.lite.min.js +++ b/dist/rx.lite.min.js @@ -1,4 +1,4 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){function b(){if(this.isDisposed)throw new Error(W)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;rb.nonEnumArgs&&a.length&&h(a)&&(a=tb.call(a));var d=rb.enumPrototypes&&"function"==typeof a,e=rb.enumErrorProps&&(a===lb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(rb.nonEnumShadows&&a!==mb){var g=a.constructor,i=-1,j=pb.length;if(a===(g&&g.prototype))var k=a===stringProto?hb:a===lb?cb:ib.call(a),l=qb[k];for(;++i-1:void 0});return c.pop(),d.pop(),result}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:tb.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(a){return"number"==typeof a&&G.isFinite(a)}function n(b){return b[X]!==a}function o(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function p(a){var b=+a.length;return isNaN(b)?0:0!==b&&m(b)?(b=o(b)*Math.floor(Math.abs(b)),0>=b?0:b>fc?fc:b):b}function q(a){return"[object Function]"===Object.prototype.toString.call(a)&&"function"==typeof a}function r(a,b){return new yc(function(c){var d=new Db,e=new Eb;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}T(f)&&(f=rc(f)),d=new Db,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function s(a,b){var c=this;return new yc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function t(a,b,c){return a.map(function(a,d){var e=b.call(c,a,d);return T(e)?rc(e):e}).concatAll()}function u(a,b,c){return a.map(function(a,d){var e=b.call(c,a,d);return T(e)?rc(e):e}).mergeObservable()}function v(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Bb(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function w(a,b,c){var d=new yb;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(w(a.item(e),b,c));else a&&d.add(v(a,b,c));return d}function x(a,b){return new yc(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function y(a,b,c){return new yc(function(d){var e=0,f=a,g=Hb(b);return c.scheduleRecursiveWithAbsolute(f,function(a){if(g>0){var b=c.now();f+=g,b>=f&&(f=b+g)}d.onNext(e++),a(f)})})}function z(a,b){return new yc(function(c){return b.scheduleWithRelative(Hb(a),function(){c.onNext(0),c.onCompleted()})})}function A(a,b,c){return a===b?new yc(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):dc(function(){return y(c.now()+a,b,c)})}function B(a,b,c){return new yc(function(d){var e,f=!1,g=new Eb,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Db,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new yb(e,g)})}function C(a,b,c){return dc(function(){return B(a,b-c.now(),c)})}function D(a,b){return new yc(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new yb(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))})}function E(a,b,c){return new yc(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(O))){try{e=c.apply(null,j)}catch(f){return void d.onError(f)}d.onNext(e)}else i&&d.onCompleted()}var f=2,g=[!1,!1],h=!1,i=!1,j=new Array(f);return new yb(a.subscribe(function(a){e(a,0)},d.onError.bind(d),function(){i=!0,d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d)))})}var F={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},G=F[typeof window]&&window||this,H=F[typeof exports]&&exports&&!exports.nodeType&&exports,I=F[typeof module]&&module&&!module.nodeType&&module,J=I&&I.exports===H&&H,K=F[typeof global]&&global;!K||K.global!==K&&K.window!==K||(G=K);var L={internals:{},config:{Promise:G.Promise},helpers:{}},M=L.helpers.noop=function(){},N=(L.helpers.notDefined=function(a){return"undefined"==typeof a},L.helpers.isScheduler=function(a){return a instanceof L.Scheduler}),O=L.helpers.identity=function(a){return a},P=(L.helpers.pluck=function(a){return function(b){return b[a]}},L.helpers.just=function(a){return function(){return a}},L.helpers.defaultNow=Date.now),Q=L.helpers.defaultComparer=function(a,b){return sb(a,b)},R=L.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},S=(L.helpers.defaultKeySerializer=function(a){return a.toString()},L.helpers.defaultError=function(a){throw a}),T=L.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},U=(L.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},L.helpers.not=function(a){return!a},L.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==ib.call(a)}),a}()),V="Argument out of range",W="Object has been disposed",X="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";G.Set&&"function"==typeof(new G.Set)["@@iterator"]&&(X="@@iterator");var Y=L.doneEnumerator={done:!0,value:a};L.iterator=X;var Z,$="[object Arguments]",_="[object Array]",ab="[object Boolean]",bb="[object Date]",cb="[object Error]",db="[object Function]",eb="[object Number]",fb="[object Object]",gb="[object RegExp]",hb="[object String]",ib=Object.prototype.toString,jb=Object.prototype.hasOwnProperty,kb=ib.call(arguments)==$,lb=Error.prototype,mb=Object.prototype,nb=mb.propertyIsEnumerable;try{Z=!(ib.call(document)==fb&&!({toString:0}+""))}catch(ob){Z=!0}var pb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qb={};qb[_]=qb[bb]=qb[eb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},qb[ab]=qb[hb]={constructor:!0,toString:!0,valueOf:!0},qb[cb]=qb[db]=qb[gb]={constructor:!0,toString:!0},qb[fb]={constructor:!0};var rb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);rb.enumErrorProps=nb.call(lb,"message")||nb.call(lb,"name"),rb.enumPrototypes=nb.call(a,"prototype"),rb.nonEnumArgs=0!=c,rb.nonEnumShadows=!/valueOf/.test(b)}(1),kb||(h=function(a){return a&&"object"==typeof a?jb.call(a,"callee"):!1});{var sb=L.internals.isEqual=function(a,b){return i(a,b,[],[])},tb=Array.prototype.slice,ub=({}.hasOwnProperty,this.inherits=L.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),vb=L.internals.addProperties=function(a){for(var b=tb.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}};L.internals.addRef=function(a,b){return new yc(function(c){return new yb(b.getDisposable(),a.subscribe(c))})}}l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var wb=L.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},xb=wb.prototype;xb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},xb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},xb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},zb.toArray=function(){return this.disposables.slice(0)};var Ab=L.Disposable=function(a){this.isDisposed=!1,this.action=a||M};Ab.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Bb=Ab.create=function(a){return new Ab(a)},Cb=Ab.empty={dispose:M},Db=L.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),Eb=L.SerialDisposable=Db,Fb=(L.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Cb:new a(this)},b}(),L.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||R,this.disposable=new Db});Fb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Fb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Fb.prototype.isCancelled=function(){return this.disposable.isDisposed},Fb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Gb=L.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Cb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=P,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Hb=Gb.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new yb,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),Cb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new yb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Cb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Gb.prototype),function(){Gb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Gb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof G.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=G.setInterval(function(){d=c(d)},b);return Bb(function(){G.clearInterval(e)})}}(Gb.prototype);var Ib,Jb=Gb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=Hb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Gb(P,a,b,c)}(),Kb=Gb.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-Gb.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+Gb.normalize(c),g=new Fb(this,b,d,f);if(e)e.enqueue(g);else{e=new wb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new Gb(P,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Lb=(L.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Db;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),M),Mb=function(){var a,b=M;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!G.setTimeout)throw new Error("No concurrency detected!");a=G.setTimeout,b=G.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Nb=Mb.setTimeout,Ob=Mb.clearTimeout;!function(){function a(){if(!G.postMessage||G.importScripts)return!1;var a=!1,b=G.onmessage;return G.onmessage=function(){a=!0},G.postMessage("","*"),G.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(ib).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=K&&J&&K.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=K&&J&&K.clearImmediate)&&!c.test(e)&&e;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Ib=process.nextTick;else if("function"==typeof d)Ib=d,Lb=e;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;G.addEventListener?G.addEventListener("message",b,!1):G.attachEvent("onmessage",b,!1),Ib=function(a){var b=h++;g[b]=a,G.postMessage(f+b,"*")}}else if(G.MessageChannel){var i=new G.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Ib=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in G&&"onreadystatechange"in G.document.createElement("script")?Ib=function(a){var b=G.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},G.document.documentElement.appendChild(b)}:(Ib=function(a){return Nb(a,0)},Lb=Ob)}();var Pb=Gb.timeout=function(){function a(a,b){var c=this,d=new Db,e=Ib(function(){d.isDisposed||d.setDisposable(b(c,a))});return new yb(d,Bb(function(){Lb(e)}))}function b(a,b,c){var d=this,e=Gb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Db,g=Nb(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new yb(f,Bb(function(){Ob(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Gb(P,a,b,c)}(),Qb=L.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return N(a)||(a=Jb),new yc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Rb=Qb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new Qb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Sb=Qb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new Qb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Tb=Qb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Qb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Ub=L.internals.Enumerator=function(a){this._next=a};Ub.prototype.next=function(){return this._next()},Ub.prototype[X]=function(){return this};var Vb=L.internals.Enumerable=function(a){this._iterator=a};Vb.prototype[X]=function(){return this._iterator()},Vb.prototype.concat=function(){var a=this;return new yc(function(b){var c;try{c=a[X]()}catch(d){return void b.onError()}var e,f=new Eb,g=Jb.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;T(h)&&(h=rc(h));var i=new Db;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new yb(f,g,Bb(function(){e=!0}))})},Vb.prototype.catchException=function(){var a=this;return new yc(function(b){var c;try{c=a[X]()}catch(d){return void b.onError()}var e,f,g=new Eb,h=Jb.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;T(i)&&(i=rc(i));var j=new Db;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new yb(g,h,Bb(function(){e=!0}))})};var Wb=Vb.repeat=function(a,b){return null==b&&(b=-1),new Vb(function(){var c=b;return new Ub(function(){return 0===c?Y:(c>0&&c--,{done:!1,value:a})})})},Xb=Vb.of=function(a,b,c){return b||(b=O),new Vb(function(){var d=-1;return new Ub(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(_b);$b.toArray=function(){var a=this;return new yc(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},bc.create=bc.createWithDisposable=function(a){return new yc(a)};var dc=bc.defer=function(a){return new yc(function(b){var c;try{c=a()}catch(d){return ic(d).subscribe(b)}return T(c)&&(c=rc(c)),c.subscribe(b)})},ec=bc.empty=function(a){return N(a)||(a=Jb),new yc(function(b){return a.schedule(function(){b.onCompleted()})})},fc=Math.pow(2,53)-1;bc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!q(b))throw new Error("mapFn when provided must be a function");return N(d)||(d=Kb),new yc(function(e){var f=Object(a),g=n(f),h=g?0:p(f),i=g?f[X]():null,j=0;return d.scheduleRecursive(function(a){if(h>j||g){var d;if(g){var k=i.next();if(k.done)return void e.onCompleted();d=k.value}else d=f[j];if(b&&q(b))try{d=c?b.call(c,d,j):b(d,j)}catch(l){return void e.onError(l)}e.onNext(d),j++,a()}else e.onCompleted()})})};{var gc=bc.fromArray=function(a,b){return N(b)||(b=Kb),new yc(function(c){var d=0,e=a.length;return b.scheduleRecursive(function(b){e>d?(c.onNext(a[d++]),b()):c.onCompleted()})})};bc.never=function(){return new yc(function(){return Cb})}}bc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return gc(b)};bc.ofWithScheduler=function(a){for(var b=arguments.length-1,c=new Array(b),d=0;b>d;d++)c[d]=arguments[d+1];return gc(c,a)};bc.range=function(a,b,c){return N(c)||(c=Kb),new yc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},bc.repeat=function(a,b,c){return N(c)||(c=Kb),hc(a,c).repeat(null==b?-1:b)};var hc=bc["return"]=bc.returnValue=bc.just=function(a,b){return N(b)||(b=Jb),new yc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})},ic=bc["throw"]=bc.throwException=bc.throwError=function(a,b){return N(b)||(b=Jb),new yc(function(c){return b.schedule(function(){c.onError(a)})})};$b["catch"]=$b.catchException=function(a){return"function"==typeof a?r(this,a):jc([this,a])};var jc=bc.catchException=bc["catch"]=function(){return Xb(j(arguments,0)).catchException()};$b.combineLatest=function(){var a=tb.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),kc.apply(this,a)};var kc=bc.combineLatest=function(){var a=tb.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new yc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(O))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(O)&&c.onCompleted()}function e(a){j[a]=!0,j.every(O)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new Db;T(f)&&(f=rc(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new yb(m)})};$b.concat=function(){var a=tb.call(arguments,0);return a.unshift(this),lc.apply(this,a)};var lc=bc.concat=function(){return Xb(j(arguments,0)).concat()};$b.concatObservable=$b.concatAll=function(){return this.merge(1)},$b.merge=function(a){if("number"!=typeof a)return mc(this,a);var b=this;return new yc(function(c){function d(a){var b=new Db;f.add(b),T(a)&&(a=rc(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new yb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var mc=bc.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=tb.call(arguments,1)):(a=Jb,b=tb.call(arguments,0)):(a=Jb,b=tb.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),gc(b,a).mergeObservable()};$b.mergeObservable=$b.mergeAll=function(){var a=this;return new yc(function(b){var c=new yb,d=!1,e=new Db;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Db;c.add(e),T(a)&&(a=rc(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},$b.skipUntil=function(a){var b=this;return new yc(function(c){var d=!1,e=new yb(b.subscribe(function(a){d&&c.onNext(a)},c.onError.bind(c),function(){d&&c.onCompleted()}));T(a)&&(a=rc(a));var f=new Db;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},c.onError.bind(c),function(){f.dispose()})),e})},$b["switch"]=$b.switchLatest=function(){var a=this;return new yc(function(b){var c=!1,d=new Eb,e=!1,f=0,g=a.subscribe(function(a){var g=new Db,h=++f;c=!0,d.setDisposable(g),T(a)&&(a=rc(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},b.onError.bind(b),function(){e=!0,!c&&b.onCompleted()});return new yb(g,d)})},$b.takeUntil=function(a){var b=this;return new yc(function(c){return T(a)&&(a=rc(a)),new yb(b.subscribe(c),a.subscribe(c.onCompleted.bind(c),c.onError.bind(c),M))})},$b.zip=function(){if(Array.isArray(arguments[0]))return s.apply(this,arguments);var a=this,b=tb.call(arguments),c=b.pop();return b.unshift(a),new yc(function(d){function e(b){var e,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(O)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new Db;T(c)&&(c=rc(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new yb(j)})},bc.zip=function(){var a=tb.call(arguments,0),b=a.shift();return b.zip.apply(b,a)},bc.zipArray=function(){var a=j(arguments,0);return new yc(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(O))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(O)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Db,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new yb(h);return j.add(Bb(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},$b.asObservable=function(){return new yc(this.subscribe.bind(this))},$b.dematerialize=function(){var a=this;return new yc(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},$b.distinctUntilChanged=function(a,b){var c=this;return a||(a=O),b||(b=Q),new yc(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},$b["do"]=$b.doAction=$b.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new yc(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b){try{b(c)}catch(d){a.onError(d)}a.onError(c)}else a.onError(c)},function(){if(c){try{c()}catch(b){a.onError(b)}a.onCompleted()}else a.onCompleted()})})},$b["finally"]=$b.finallyAction=function(a){var b=this;return new yc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Bb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},$b.ignoreElements=function(){var a=this;return new yc(function(b){return a.subscribe(M,b.onError.bind(b),b.onCompleted.bind(b))})},$b.materialize=function(){var a=this;return new yc(function(b){return a.subscribe(function(a){b.onNext(Rb(a))},function(a){b.onNext(Sb(a)),b.onCompleted()},function(){b.onNext(Tb()),b.onCompleted()})})},$b.repeat=function(a){return Wb(this,a).concat()},$b.retry=function(a){return Wb(this,a).catchException()},$b.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new yc(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0) }catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},$b.skipLast=function(a){var b=this;return new yc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},$b.startWith=function(){var a,b,c=0;return arguments.length&&N(arguments[0])?(b=arguments[0],c=1):b=Jb,a=tb.call(arguments,c),Xb([gc(a,b),this]).concat()},$b.takeLast=function(a){var b=this;return new yc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},$b.selectConcat=$b.concatMap=function(a,b,c){return b?this.concatMap(function(c,d){var e=a(c,d),f=T(e)?rc(e):e;return f.map(function(a){return b(c,a,d)})}):"function"==typeof a?t(this,a,c):t(this,function(){return a})},$b.select=$b.map=function(a,b){var c=this;return new yc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},$b.pluck=function(a){return this.map(function(b){return b[a]})},$b.selectMany=$b.flatMap=function(a,b,c){return b?this.flatMap(function(c,d){var e=a(c,d),f=T(e)?rc(e):e;return f.map(function(a){return b(c,a,d)})},c):"function"==typeof a?u(this,a,c):u(this,function(){return a})},$b.selectSwitch=$b.flatMapLatest=$b.switchMap=function(a,b){return this.select(a,b).switchLatest()},$b.skip=function(a){if(0>a)throw new Error(V);var b=this;return new yc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},$b.skipWhile=function(a,b){var c=this;return new yc(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},$b.take=function(a,b){if(0>a)throw new RangeError(V);if(0===a)return ec(b);var c=this;return new yc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},$b.takeWhile=function(a,b){var c=this;return new yc(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},$b.where=$b.filter=function(a,b){var c=this;return new yc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},bc.fromCallback=function(a,b,c){return function(){var d=tb.call(arguments,0);return new yc(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},bc.fromNodeCallback=function(a,b,c){return function(){var d=tb.call(arguments,0);return new yc(function(e){function f(a){if(a)return void e.onError(a);var b=tb.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},L.config.useNativeEvents=!1;var nc=G.angular&&angular.element?angular.element:G.jQuery?G.jQuery:G.Zepto?G.Zepto:null,oc=!!G.Ember&&"function"==typeof G.Ember.addListener,pc=!!G.Backbone&&!!G.Backbone.Marionette;bc.fromEvent=function(a,b,c){if(a.addListener)return qc(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c);if(!L.config.useNativeEvents){if(pc)return qc(function(c){a.on(b,c)},function(c){a.off(b,c)},c);if(oc)return qc(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c);if(nc){var d=nc(a);return qc(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}}return new yc(function(d){return w(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var qc=bc.fromEventPattern=function(a,b,c){return new yc(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return Bb(function(){b&&b(e,f)})}).publish().refCount()},rc=bc.fromPromise=function(a){return dc(function(){var b=new L.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};$b.toPromise=function(a){if(a||(a=L.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},bc.startAsync=function(a){var b;try{b=a()}catch(c){return ic(c)}return rc(b)},$b.multicast=function(a,b){var c=this;return"function"==typeof a?new yc(function(d){var e=c.multicast(a());return new yb(b(e).subscribe(d),e.connect())}):new sc(c,a)},$b.publish=function(a){return a&&U(a)?this.multicast(function(){return new Bc},a):this.multicast(new Bc)},$b.share=function(){return this.publish().refCount()},$b.publishLast=function(a){return a&&U(a)?this.multicast(function(){return new Cc},a):this.multicast(new Cc)},$b.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new Ec(b)},a):this.multicast(new Ec(a))},$b.shareValue=function(a){return this.publishValue(a).refCount()},$b.replay=function(a,b,c,d){return a&&U(a)?this.multicast(function(){return new Fc(b,c,d)},a):this.multicast(new Fc(b,c,d))},$b.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var sc=L.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new yb(f.subscribe(c),Bb(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return ub(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new yc(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(bc),tc=bc.interval=function(a,b){return A(a,a,N(b)?b:Pb)};bc.timer=function(b,c,d){var e;return N(d)||(d=Pb),c!==a&&"number"==typeof c?e=c:N(c)&&(d=c),b instanceof Date&&e===a?x(b.getTime(),d):b instanceof Date&&e!==a?(e=c,y(b.getTime(),e,d)):e===a?z(b,d):A(b,e,d)}}$b.delay=function(a,b){return N(b)||(b=Pb),a instanceof Date?C(this,a.getTime(),b):B(this,a,b)},$b.throttle=function(a,b){N(b)||(b=Pb);var c=this;return new yc(function(d){var e,f=new Eb,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new Db;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new yb(i,f)})},$b.timestamp=function(a){return N(a)||(a=Pb),this.map(function(b){return{value:b,timestamp:a.now()}})},$b.sample=function(a,b){return N(b)||(b=Pb),"number"==typeof a?D(this,tc(a,b)):D(this,a)},$b.timeout=function(a,b,c){b||(b=ic(new Error("Timeout"))),N(c)||(c=Pb);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new yc(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(T(b)&&(b=rc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new Db,j=new Eb,k=!1,l=new Eb;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new yb(j,l)})};var uc=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Cb,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Cb)});return new yb(c,d,e)}function c(c,d){this.source=c,this.controller=new Bc,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return ub(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(bc);$b.pausable=function(a){return new uc(this,a)};var vc=function(b){function c(b){var c,d=[],e=E(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new Bc,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c)}return ub(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(bc);$b.pausableBuffered=function(a){return new vc(this,a)},$b.controlled=function(a){return null==a&&(a=!0),new wc(this,a)};var wc=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new xc(d),this.source=c.multicast(this.subject).refCount()}return ub(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(bc),xc=L.ControlledSubject=function(a){function c(a){return this.subject.subscribe(a)}function d(b){null==b&&(b=!0),a.call(this,c),this.subject=new Bc,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=Cb,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=Cb}return ub(d,a),vb(d.prototype,Yb,{onCompleted:function(){b.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){b.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){b.call(this);var c=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),c=!0),c&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=Cb):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=Cb),{numberOfItems:a,returnValue:!1}},request:function(a){b.call(this),this.disposeCurrentRequest();var c=this,d=this._processRequest(a);return a=d.numberOfItems,d.returnValue?Cb:(this.requestedCount=a,this.requestedDisposable=Bb(function(){c.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=Cb},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),d}(bc);$b.exclusive=function(){var a=this;return new yc(function(b){var c=!1,d=!1,e=new Db,f=new yb;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,T(a)&&(a=rc(a));var e=new Db;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f})},$b.exclusiveMap=function(a,b){var c=this;return new yc(function(d){var e=0,f=!1,g=!0,h=new Db,i=new yb;return i.add(h),h.setDisposable(c.subscribe(function(c){f||(f=!0,innerSubscription=new Db,i.add(innerSubscription),T(c)&&(c=rc(c)),innerSubscription.setDisposable(c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),function(){i.remove(innerSubscription),f=!1,g&&1===i.length&&d.onCompleted()})))},d.onError.bind(d),function(){g=!0,1!==i.length||f||d.onCompleted()})),i})};var yc=L.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Bb(a):Cb}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new zc(a);return Kb.scheduleRequired()?Kb.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return ub(c,a),c}(bc),zc=function(a){function b(b){a.call(this),this.observer=b,this.m=new Db}ub(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(_b),Ac=function(a,b){this.subject=a,this.observer=b};Ac.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var Bc=L.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),Cb):(a.onCompleted(),Cb):(this.observers.push(a),new Ac(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return ub(d,a),vb(d.prototype,Yb,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Dc(a,b)},d}(bc),Cc=L.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new Ac(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),Cb}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return ub(d,a),vb(d.prototype,Yb,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(bc),Dc=L.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return ub(b,a),vb(b.prototype,Yb,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(bc),Ec=L.BehaviorSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new Ac(this,a);var c=this.exception;return c?a.onError(c):a.onCompleted(),Cb}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return ub(d,a),vb(d.prototype,Yb,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=this.observers.slice(0),d=c.length;d>a;a++)c[a].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped){this.value=a;for(var c=0,d=this.observers.slice(0),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(bc),Fc=L.ReplaySubject=function(a){function c(a,b){return Bb(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var d=new cc(this.scheduler,a),e=c(this,d);b.call(this),this._trim(this.scheduler.now()),this.observers.push(d);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)d.onNext(this.q[g].value);return this.hasError?(f++,d.onError(this.error)):this.isStopped&&(f++,d.onCompleted()),d.ensureActive(f),e}function e(b,c,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=e||Kb,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}return ub(e,a),vb(e.prototype,Yb,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b.call(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(b.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=this.observers.slice(0),e=0,f=d.length;f>e;e++){var g=d[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(b.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++){var f=c[d];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(bc);"function"==typeof define&&"object"==typeof define.amd&&define.amd?(G.Rx=L,define(function(){return L})):H&&I?J?(I.exports=L).Rx=L:H.Rx=L:G.Rx=L}).call(this); -//# sourceMappingURL=rx.lite.map \ No newline at end of file +//# sourceMappingURL=rx.lite.map diff --git a/dist/rx.map b/dist/rx.map index 92d313122..08d3f3aa7 100644 --- a/dist/rx.map +++ b/dist/rx.map @@ -1 +1 @@ -{"version":3,"file":"rx.min.js","sources":["rx.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","numberIsFinite","root","isFinite","isIterable","o","$iterator$","sign","number","isNaN","toLength","len","Math","floor","abs","maxSafeInteger","isCallable","f","observableCatchHandler","source","handler","AnonymousObservable","observer","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","onNext","bind","exception","d","ex","onError","isPromise","observableFromPromise","onCompleted","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","concatAll","arrayIndexOfComparer","array","item","comparer","HashSet","set","flatMap","mergeObservable","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","isScheduler","notDefined","Scheduler","identity","defaultNow","pluck","property","just","Date","now","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","p","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","CompositeDisposable","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","disposables","CompositeDisposablePrototype","add","dispose","shouldDispose","indexOf","splice","currentDisposables","toArray","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","schedule","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelative","scheduleWithRelativeAndState","scheduleWithAbsolute","scheduleWithAbsoluteAndState","normalize","timeSpan","normalizeTime","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","isDone","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","self","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelative","scheduleRecursiveWithRelativeAndState","s","scheduleRecursiveWithAbsolute","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","period","schedulePeriodicWithState","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","immediateScheduler","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediate","scheduleNow","currentThreadScheduler","currentThread","runTrampoline","q","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","addEventListener","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","_super","localNow","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","kind","hasValue","accept","observerOrOnNext","_acceptObservable","_accept","toObservable","notification","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","next","_next","Enumerable","_iterator","concat","cancelable","currentItem","currentValue","catchException","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_thisArg","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","apply","Observable","_subscribe","forEach","subscriber","subscribeNext","subscribeError","subscribeCompleted","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","TypeError","resolve","reject","v","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","from","iterable","mapFn","list","objIsIterable","it","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","range","observableReturn","returnValue","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","combineLatest","unshift","res","hasValueAll","every","values","filter","j","falseFactory","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeAll","innerSubscription","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","doAction","tap","onNextFunc","finallyAction","ignoreElements","materialize","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","refCountDisposable","createWindow","Subject","selectConcat","selectorResult","concatMapObserver","selectConcatObserver","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","select","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","predicate","running","take","RangeError","observable","takeWhile","shouldRun","exclusive","hasCurrent","g","exclusiveMap","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAwElE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb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BH,QAAS,SAAUH,GACjBhH,KAAKuG,SAASY,QAAQH,IAExBF,OAAQ,SAAUzG,GAChBL,KAAKuG,SAASO,OAAOzG,MAIlBumB,GACP5K,IAEqB,mBAAV8K,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACvE5hB,EAAKsE,GAAKA,EAEVqd,OAAO,WACH,MAAOrd,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInBtE,EAAKsE,GAAKA,IAGhB1I,KAAKf"} \ No newline at end of file +{"version":3,"file":"rx.min.js","sources":["rx.js"],"names":["undefined","checkDisposed","this","isDisposed","Error","objectDisposed","isObject","value","type","keysIn","object","result","support","nonEnumArgs","length","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","push","nonEnumShadows","objectProto","ctor","constructor","index","shadowedProps","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","argsClass","deepEquals","a","b","stackA","stackB","otherType","otherClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","argsOrArray","args","idx","Array","isArray","arrayInitialize","count","factory","i","IndexedItem","id","ScheduledDisposable","scheduler","disposable","numberIsFinite","root","isFinite","isIterable","o","$iterator$","sign","number","isNaN","toLength","len","Math","floor","abs","maxSafeInteger","isCallable","f","observableCatchHandler","source","handler","AnonymousObservable","observer","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","onNext","bind","exception","d","ex","onError","isPromise","observableFromPromise","onCompleted","zipArray","second","resultSelector","first","left","right","e","concatMap","selector","thisArg","map","x","concatAll","arrayIndexOfComparer","array","item","comparer","HashSet","set","flatMap","mergeObservable","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","isScheduler","notDefined","Scheduler","identity","defaultNow","pluck","property","just","Date","now","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","p","then","asArray","arguments","not","isFn","argumentOutOfRange","Symbol","iterator","Set","doneEnumerator","done","suportNodeClass","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","parent","__","addProperties","obj","sources","prop","addRef","xs","r","CompositeDisposable","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","disposables","CompositeDisposablePrototype","add","dispose","shouldDispose","indexOf","splice","currentDisposables","toArray","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","schedule","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelative","scheduleWithRelativeAndState","scheduleWithAbsolute","scheduleWithAbsoluteAndState","normalize","timeSpan","normalizeTime","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","isDone","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","self","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelative","scheduleRecursiveWithRelativeAndState","s","scheduleRecursiveWithAbsolute","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","period","schedulePeriodicWithState","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","immediateScheduler","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediate","scheduleNow","currentThreadScheduler","currentThread","runTrampoline","q","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","handleId","tasks","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","random","taskId","addEventListener","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","_super","localNow","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","kind","hasValue","accept","observerOrOnNext","_acceptObservable","_accept","toObservable","notification","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","next","_next","Enumerable","_iterator","concat","cancelable","currentItem","currentValue","catchException","lastException","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","observableProto","AbstractObserver","__super__","isStopped","error","completed","fail","_onNext","_onError","_onCompleted","_thisArg","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","apply","Observable","_subscribe","forEach","subscriber","subscribeNext","subscribeError","subscribeCompleted","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","TypeError","resolve","reject","v","arr","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","pow","from","iterable","mapFn","list","objIsIterable","it","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","range","observableReturn","returnValue","throwException","throwError","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","func","previous","acc","handlerOrSecond","observableCatch","combineLatest","unshift","res","hasValueAll","every","values","filter","j","falseFactory","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeAll","innerSubscription","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","zip","queuedValues","queues","compositeDisposable","qIdx","qLen","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","doAction","tap","onNextFunc","finallyAction","ignoreElements","materialize","retry","retryCount","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","refCountDisposable","createWindow","Subject","selectConcat","selectorResult","concatMapObserver","selectConcatObserver","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","select","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","predicate","running","take","RangeError","observable","takeWhile","shouldRun","exclusive","hasCurrent","g","exclusiveMap","fixSubscriber","autoDetachObserver","AutoDetachObserver","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasObservers","os","AnonymousSubject","hv","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,KAAkB,GAAIC,KAAKC,WAAc,KAAM,IAAIC,OAAMC,GAwElE,QAASC,GAASC,GAKhB,GAAIC,SAAcD,EAClB,OAAOA,KAAkB,YAARC,GAA8B,UAARA,KAAqB,EAG9D,QAASC,GAAOC,GACd,GAAIC,KACJ,KAAKL,EAASI,GACZ,MAAOC,EAELC,IAAQC,aAAeH,EAAOI,QAAUC,EAAYL,KACtDA,EAASM,GAAMC,KAAKP,GAEtB,IAAIQ,GAAYN,GAAQO,gBAAmC,kBAAVT,GAC7CU,EAAiBR,GAAQS,iBAAmBX,IAAWY,IAAcZ,YAAkBN,OAE3F,KAAK,GAAImB,KAAOb,GACRQ,GAAoB,aAAPK,GACbH,IAA0B,WAAPG,GAA2B,QAAPA,IAC3CZ,EAAOa,KAAKD,EAIhB,IAAIX,GAAQa,gBAAkBf,IAAWgB,GAAa,CACpD,GAAIC,GAAOjB,EAAOkB,YACdC,EAAQ,GACRf,EAASgB,GAAchB,MAE3B,IA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Vqd,OAAO,WACH,MAAOrd,MAEJR,GAAeG,EAElBE,GACCF,EAAWF,QAAUO,GAAIA,GAAKA,EAEjCR,EAAYQ,GAAKA,EAInBtE,EAAKsE,GAAKA,IAGhB1I,KAAKf"} diff --git a/dist/rx.min.js b/dist/rx.min.js index 7e1382751..f014898f7 100644 --- a/dist/rx.min.js +++ b/dist/rx.min.js @@ -1,4 +1,4 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){function b(){if(this.isDisposed)throw new Error(P)}function c(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function d(a){var b=[];if(!c(a))return b;kb.nonEnumArgs&&a.length&&h(a)&&(a=mb.call(a));var d=kb.enumPrototypes&&"function"==typeof a,e=kb.enumErrorProps&&(a===eb||a instanceof Error);for(var f in a)d&&"prototype"==f||e&&("message"==f||"name"==f)||b.push(f);if(kb.nonEnumShadows&&a!==fb){var g=a.constructor,i=-1,j=ib.length;if(a===(g&&g.prototype))var k=a===stringProto?ab:a===eb?X:bb.call(a),l=jb[k];for(;++i-1:void 0});return c.pop(),d.pop(),result}function j(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:mb.call(a)}function k(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function l(a,b){this.id=a,this.value=b}function m(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function n(a){return"number"==typeof a&&z.isFinite(a)}function o(b){return b[Q]!==a}function p(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function q(a){var b=+a.length;return isNaN(b)?0:0!==b&&n(b)?(b=p(b)*Math.floor(Math.abs(b)),0>=b?0:b>dc?dc:b):b}function r(a){return"[object Function]"===Object.prototype.toString.call(a)&&"function"==typeof a}function s(a,b){return new nc(function(c){var d=new xb,e=new yb;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}M(f)&&(f=ac(f)),d=new xb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e})}function t(a,b){var c=this;return new nc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},d.onError.bind(d),d.onCompleted.bind(d))})}function u(a,b,c){return a.map(function(a,d){var e=b.call(c,a,d);return M(e)?ac(e):e}).concatAll()}function v(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function w(a){this.comparer=a,this.set=[]}function x(a,b,c){return a.map(function(a,d){var e=b.call(c,a,d);return M(e)?ac(e):e}).mergeObservable()}var y={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},z=y[typeof window]&&window||this,A=y[typeof exports]&&exports&&!exports.nodeType&&exports,B=y[typeof module]&&module&&!module.nodeType&&module,C=B&&B.exports===A&&A,D=y[typeof global]&&global;!D||D.global!==D&&D.window!==D||(z=D);var E={internals:{},config:{Promise:z.Promise},helpers:{}},F=E.helpers.noop=function(){},G=(E.helpers.notDefined=function(a){return"undefined"==typeof a},E.helpers.isScheduler=function(a){return a instanceof E.Scheduler}),H=E.helpers.identity=function(a){return a},I=(E.helpers.pluck=function(a){return function(b){return b[a]}},E.helpers.just=function(a){return function(){return a}},E.helpers.defaultNow=Date.now),J=E.helpers.defaultComparer=function(a,b){return lb(a,b)},K=E.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},L=(E.helpers.defaultKeySerializer=function(a){return a.toString()},E.helpers.defaultError=function(a){throw a}),M=E.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},N=(E.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},E.helpers.not=function(a){return!a},E.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==bb.call(a)}),a}()),O="Argument out of range",P="Object has been disposed",Q="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";z.Set&&"function"==typeof(new z.Set)["@@iterator"]&&(Q="@@iterator");var R=E.doneEnumerator={done:!0,value:a};E.iterator=Q;var S,T="[object Arguments]",U="[object Array]",V="[object Boolean]",W="[object Date]",X="[object Error]",Y="[object Function]",Z="[object Number]",$="[object Object]",_="[object RegExp]",ab="[object String]",bb=Object.prototype.toString,cb=Object.prototype.hasOwnProperty,db=bb.call(arguments)==T,eb=Error.prototype,fb=Object.prototype,gb=fb.propertyIsEnumerable;try{S=!(bb.call(document)==$&&!({toString:0}+""))}catch(hb){S=!0}var ib=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],jb={};jb[U]=jb[W]=jb[Z]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},jb[V]=jb[ab]={constructor:!0,toString:!0,valueOf:!0},jb[X]=jb[Y]=jb[_]={constructor:!0,toString:!0},jb[$]={constructor:!0};var kb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);kb.enumErrorProps=gb.call(eb,"message")||gb.call(eb,"name"),kb.enumPrototypes=gb.call(a,"prototype"),kb.nonEnumArgs=0!=c,kb.nonEnumShadows=!/valueOf/.test(b)}(1),db||(h=function(a){return a&&"object"==typeof a?cb.call(a,"callee"):!1});var lb=E.internals.isEqual=function(a,b){return i(a,b,[],[])},mb=Array.prototype.slice,nb=({}.hasOwnProperty,this.inherits=E.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),ob=E.internals.addProperties=function(a){for(var b=mb.call(arguments,1),c=0,d=b.length;d>c;c++){var e=b[c];for(var f in e)a[f]=e[f]}},pb=E.internals.addRef=function(a,b){return new nc(function(c){return new sb(b.getDisposable(),a.subscribe(c))})};l.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var qb=E.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},rb=qb.prototype;rb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},rb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},rb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(bb;b++)a[b].dispose()}},tb.toArray=function(){return this.disposables.slice(0)};var ub=E.Disposable=function(a){this.isDisposed=!1,this.action=a||F};ub.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var vb=ub.create=function(a){return new ub(a)},wb=ub.empty={dispose:F},xb=E.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b,c=this.isDisposed;c||(b=this.current,this.current=a),b&&b.dispose(),c&&a&&a.dispose()},b.dispose=function(){var a;this.isDisposed||(this.isDisposed=!0,a=this.current,this.current=null),a&&a.dispose()},a}(),yb=E.SerialDisposable=xb,zb=E.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?wb:new a(this)},b}();m.prototype.dispose=function(){var a=this;this.scheduler.schedule(function(){a.isDisposed||(a.isDisposed=!0,a.disposable.dispose())})};var Ab=E.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||K,this.disposable=new xb};Ab.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Ab.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Ab.prototype.isCancelled=function(){return this.disposable.isDisposed},Ab.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Bb=E.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),wb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=I,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Cb=Bb.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new sb,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),wb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new sb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c].call(a,b,d,function(a,b){return e?f.remove(i):h=!0,g(b),wb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Bb.prototype),function(){Bb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Bb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof z.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=z.setInterval(function(){d=c(d)},b);return vb(function(){z.clearInterval(e)})}}(Bb.prototype),function(a){a.catchError=a["catch"]=function(a){return new Kb(this,a)}}(Bb.prototype);var Db,Eb=(E.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new xb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Bb.immediate=function(){function a(a,b){return b(this,a)}function b(a,b,c){for(var d=Cb(d);d-this.now()>0;);return c(this,a)}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Bb(I,a,b,c)}()),Fb=Bb.currentThread=function(){function a(a){for(var b;a.length>0;)if(b=a.dequeue(),!b.isCancelled()){for(;b.dueTime-Bb.now()>0;);b.isCancelled()||b.invoke()}}function b(a,b){return this.scheduleWithRelativeAndState(a,0,b)}function c(b,c,d){var f=this.now()+Bb.normalize(c),g=new Ab(this,b,d,f);if(e)e.enqueue(g);else{e=new qb(4),e.enqueue(g);try{a(e)}catch(h){throw h}finally{e=null}}return g.disposable}function d(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}var e,f=new Bb(I,b,c,d);return f.scheduleRequired=function(){return!e},f.ensureTrampoline=function(a){e?a():this.schedule(a)},f}(),Gb=F,Hb=function(){var a,b=F;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!z.setTimeout)throw new Error("No concurrency detected!");a=z.setTimeout,b=z.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Ib=Hb.setTimeout,Jb=Hb.clearTimeout;!function(){function a(){if(!z.postMessage||z.importScripts)return!1;var a=!1,b=z.onmessage;return z.onmessage=function(){a=!0},z.postMessage("","*"),z.onmessage=b,a}function b(a){if("string"==typeof a.data&&a.data.substring(0,f.length)===f){var b=a.data.substring(f.length),c=g[b];c(),delete g[b]}}var c=RegExp("^"+String(bb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),d="function"==typeof(d=D&&C&&D.setImmediate)&&!c.test(d)&&d,e="function"==typeof(e=D&&C&&D.clearImmediate)&&!c.test(e)&&e;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Db=process.nextTick;else if("function"==typeof d)Db=d,Gb=e;else if(a()){var f="ms.rx.schedule"+Math.random(),g={},h=0;z.addEventListener?z.addEventListener("message",b,!1):z.attachEvent("onmessage",b,!1),Db=function(a){var b=h++;g[b]=a,z.postMessage(f+b,"*")}}else if(z.MessageChannel){var i=new z.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Db=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in z&&"onreadystatechange"in z.document.createElement("script")?Db=function(a){var b=z.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},z.document.documentElement.appendChild(b)}:(Db=function(a){return Ib(a,0)},Gb=Jb)}();var Kb=(Bb.timeout=function(){function a(a,b){var c=this,d=new xb,e=Db(function(){d.isDisposed||d.setDisposable(b(c,a))});return new sb(d,vb(function(){Gb(e)}))}function b(a,b,c){var d=this,e=Bb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new xb,g=Ib(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new sb(f,vb(function(){Jb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Bb(I,a,b,c)}(),function(a){function b(){return this._scheduler.now()}function c(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function d(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function e(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function f(f,g){this._scheduler=f,this._handler=g,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,b,c,d,e)}return nb(f,a),f.prototype._clone=function(a){return new f(a,this._handler)},f.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return wb}}},f.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},f.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new xb;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},f}(Bb)),Lb=E.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return G(a)||(a=Eb),new nc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Mb=Lb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new Lb("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Nb=Lb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new Lb("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Ob=Lb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Lb("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Pb=E.internals.Enumerator=function(a){this._next=a};Pb.prototype.next=function(){return this._next()},Pb.prototype[Q]=function(){return this};var Qb=E.internals.Enumerable=function(a){this._iterator=a};Qb.prototype[Q]=function(){return this._iterator()},Qb.prototype.concat=function(){var a=this;return new nc(function(b){var c;try{c=a[Q]()}catch(d){return void b.onError()}var e,f=new yb,g=Eb.scheduleRecursive(function(a){var d;if(!e){try{d=c.next()}catch(g){return void b.onError(g)}if(d.done)return void b.onCompleted();var h=d.value;M(h)&&(h=ac(h));var i=new xb;f.setDisposable(i),i.setDisposable(h.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){a()}))}});return new sb(f,g,vb(function(){e=!0}))})},Qb.prototype.catchException=function(){var a=this;return new nc(function(b){var c;try{c=a[Q]()}catch(d){return void b.onError()}var e,f,g=new yb,h=Eb.scheduleRecursive(function(a){if(!e){var d;try{d=c.next()}catch(h){return void b.onError(h)}if(d.done)return void(f?b.onError(f):b.onCompleted());var i=d.value;M(i)&&(i=ac(i));var j=new xb;g.setDisposable(j),j.setDisposable(i.subscribe(b.onNext.bind(b),function(b){f=b,a()},b.onCompleted.bind(b)))}});return new sb(g,h,vb(function(){e=!0}))})};var Rb=Qb.repeat=function(a,b){return null==b&&(b=-1),new Qb(function(){var c=b;return new Pb(function(){return 0===c?R:(c>0&&c--,{done:!1,value:a})})})},Sb=Qb.of=function(a,b,c){return b||(b=H),new Qb(function(){var d=-1;return new Pb(function(){return++d0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Wb),$b=function(a){function b(){a.apply(this,arguments)}return nb(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b}(Zb),_b=E.Observable=function(){function a(a){this._subscribe=a}return Vb=a.prototype,Vb.subscribe=Vb.forEach=function(a,b,c,d){var e="object"==typeof a?a:4===arguments.length?Ub(a,b,c,d):Ub(a,b,c);return this._subscribe(e)},Vb.subscribeNext=function(a,b){var c=2===arguments.length?Ub(a,null,null,b):Ub(a,null,null);return this._subscribe(c)},Vb.subscribeError=function(a,b){var c=2===arguments.length?Ub(null,a,null,b):Ub(null,a,null);return this._subscribe(c)},Vb.subscribeCompleted=function(a,b){var c=2===arguments.length?Ub(null,null,a,b):Ub(null,null,a);return this._subscribe(c)},a}();Vb.observeOn=function(a){var b=this;return new nc(function(c){return b.subscribe(new $b(a,c))})},Vb.subscribeOn=function(a){var b=this;return new nc(function(c){var d=new xb,e=new yb;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new m(a,b.subscribe(c)))})),e})};var ac=_b.fromPromise=function(a){return bc(function(){var b=new E.AsyncSubject;return a.then(function(a){b.isDisposed||(b.onNext(a),b.onCompleted())},b.onError.bind(b)),b})};Vb.toPromise=function(a){if(a||(a=E.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Vb.toArray=function(){var a=this;return new nc(function(b){var c=[];return a.subscribe(c.push.bind(c),b.onError.bind(b),function(){b.onNext(c),b.onCompleted()})})},_b.create=_b.createWithDisposable=function(a){return new nc(a)};var bc=_b.defer=function(a){return new nc(function(b){var c;try{c=a()}catch(d){return hc(d).subscribe(b)}return M(c)&&(c=ac(c)),c.subscribe(b)})},cc=_b.empty=function(a){return G(a)||(a=Eb),new nc(function(b){return a.schedule(function(){b.onCompleted()})})},dc=Math.pow(2,53)-1;_b.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!r(b))throw new Error("mapFn when provided must be a function");return G(d)||(d=Fb),new nc(function(e){var f=Object(a),g=o(f),h=g?0:q(f),i=g?f[Q]():null,j=0;return d.scheduleRecursive(function(a){if(h>j||g){var d;if(g){var k=i.next();if(k.done)return void e.onCompleted();d=k.value}else d=f[j];if(b&&r(b))try{d=c?b.call(c,d,j):b(d,j)}catch(l){return void e.onError(l)}e.onNext(d),j++,a()}else e.onCompleted()})})};var ec=_b.fromArray=function(a,b){return G(b)||(b=Fb),new nc(function(c){var d=0,e=a.length;return b.scheduleRecursive(function(b){e>d?(c.onNext(a[d++]),b()):c.onCompleted()})})};_b.generate=function(a,b,c,d,e){return G(e)||(e=Fb),new nc(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})};var fc=_b.never=function(){return new nc(function(){return wb})};_b.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return ec(b)};_b.ofWithScheduler=function(a){for(var b=arguments.length-1,c=new Array(b),d=0;b>d;d++)c[d]=arguments[d+1];return ec(c,a)};_b.range=function(a,b,c){return G(c)||(c=Fb),new nc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},_b.repeat=function(a,b,c){return G(c)||(c=Fb),gc(a,c).repeat(null==b?-1:b)};var gc=_b["return"]=_b.returnValue=_b.just=function(a,b){return G(b)||(b=Eb),new nc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})},hc=_b["throw"]=_b.throwException=_b.throwError=function(a,b){return G(b)||(b=Eb),new nc(function(c){return b.schedule(function(){c.onError(a)})})};_b.using=function(a,b){return new nc(function(c){var d,e,f=wb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new sb(hc(g).subscribe(c),f)}return new sb(e.subscribe(c),f)})},Vb.amb=function(a){var b=this;return new nc(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new xb,j=new xb;return M(a)&&(a=ac(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new sb(i,j)})},_b.amb=function(){function a(a,b){return a.amb(b)}for(var b=fc(),c=j(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},Vb["catch"]=Vb.catchException=function(a){return"function"==typeof a?s(this,a):ic([this,a])};var ic=_b.catchException=_b["catch"]=function(){return Sb(j(arguments,0)).catchException()};Vb.combineLatest=function(){var a=mb.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),jc.apply(this,a)};var jc=_b.combineLatest=function(){var a=mb.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new nc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(H))){try{d=b.apply(null,l)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(H)&&c.onCompleted()}function e(a){j[a]=!0,j.every(H)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=k(g,f),i=!1,j=k(g,f),l=new Array(g),m=new Array(g),n=0;g>n;n++)!function(b){var f=a[b],g=new xb;M(f)&&(f=ac(f)),g.setDisposable(f.subscribe(function(a){l[b]=a,d(b)},c.onError.bind(c),function(){e(b)})),m[b]=g}(n);return new sb(m)})};Vb.concat=function(){var a=mb.call(arguments,0);return a.unshift(this),kc.apply(this,a)};var kc=_b.concat=function(){return Sb(j(arguments,0)).concat()};Vb.concatObservable=Vb.concatAll=function(){return this.merge(1)},Vb.merge=function(a){if("number"!=typeof a)return lc(this,a);var b=this;return new nc(function(c){function d(a){var b=new xb;f.add(b),M(a)&&(a=ac(a)),b.setDisposable(a.subscribe(c.onNext.bind(c),c.onError.bind(c),function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new sb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},c.onError.bind(c),function(){g=!0,0===e&&c.onCompleted()})),f})};var lc=_b.merge=function(){var a,b;return arguments[0]?arguments[0].now?(a=arguments[0],b=mb.call(arguments,1)):(a=Eb,b=mb.call(arguments,0)):(a=Eb,b=mb.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),ec(b,a).mergeObservable()};Vb.mergeObservable=Vb.mergeAll=function(){var a=this;return new nc(function(b){var c=new sb,d=!1,e=new xb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new xb;c.add(e),M(a)&&(a=ac(a)),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},b.onError.bind(b),function(){d=!0,1===c.length&&b.onCompleted()})),c})},Vb.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return mc([this,a])};var mc=_b.onErrorResumeNext=function(){var a=j(arguments,0);return new nc(function(b){var c=0,d=new yb,e=Eb.scheduleRecursive(function(e){var f,g;c0})){try{f=h.map(function(a){return a.shift()}),e=c.apply(a,f)}catch(g){return void d.onError(g)}d.onNext(e)}else i.filter(function(a,c){return c!==b}).every(H)&&d.onCompleted()}function f(a){i[a]=!0,i.every(function(a){return a})&&d.onCompleted()}for(var g=b.length,h=k(g,function(){return[]}),i=k(g,function(){return!1}),j=new Array(g),l=0;g>l;l++)!function(a){var c=b[a],g=new xb;M(c)&&(c=ac(c)),g.setDisposable(c.subscribe(function(b){h[a].push(b),e(a)},d.onError.bind(d),function(){f(a)})),j[a]=g}(l);return new sb(j)})},_b.zip=function(){var a=mb.call(arguments,0),b=a.shift(); return b.zip.apply(b,a)},_b.zipArray=function(){var a=j(arguments,0);return new nc(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(H))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(H)?void b.onCompleted():void 0}for(var e=a.length,f=k(e,function(){return[]}),g=k(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new xb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},b.onError.bind(b),function(){d(e)}))}(i);var j=new sb(h);return j.add(vb(function(){for(var a=0,b=f.length;b>a;a++)f[a]=[]})),j})},Vb.asObservable=function(){return new nc(this.subscribe.bind(this))},Vb.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},Vb.dematerialize=function(){var a=this;return new nc(function(b){return a.subscribe(function(a){return a.accept(b)},b.onError.bind(b),b.onCompleted.bind(b))})},Vb.distinctUntilChanged=function(a,b){var c=this;return a||(a=H),b||(b=J),new nc(function(d){var e,f=!1;return c.subscribe(function(c){var g,h=!1;try{g=a(c)}catch(i){return void d.onError(i)}if(f)try{h=b(e,g)}catch(i){return void d.onError(i)}f&&h||(f=!0,e=g,d.onNext(c))},d.onError.bind(d),d.onCompleted.bind(d))})},Vb["do"]=Vb.doAction=Vb.tap=function(a,b,c){var d,e=this;return"function"==typeof a?d=a:(d=a.onNext.bind(a),b=a.onError.bind(a),c=a.onCompleted.bind(a)),new nc(function(a){return e.subscribe(function(b){try{d(b)}catch(c){a.onError(c)}a.onNext(b)},function(c){if(b){try{b(c)}catch(d){a.onError(d)}a.onError(c)}else a.onError(c)},function(){if(c){try{c()}catch(b){a.onError(b)}a.onCompleted()}else a.onCompleted()})})},Vb["finally"]=Vb.finallyAction=function(a){var b=this;return new nc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return vb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})})},Vb.ignoreElements=function(){var a=this;return new nc(function(b){return a.subscribe(F,b.onError.bind(b),b.onCompleted.bind(b))})},Vb.materialize=function(){var a=this;return new nc(function(b){return a.subscribe(function(a){b.onNext(Mb(a))},function(a){b.onNext(Nb(a)),b.onCompleted()},function(){b.onNext(Ob()),b.onCompleted()})})},Vb.repeat=function(a){return Rb(this,a).concat()},Vb.retry=function(a){return Rb(this,a).catchException()},Vb.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new nc(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},e.onError.bind(e),function(){!h&&c&&e.onNext(a),e.onCompleted()})})},Vb.skipLast=function(a){var b=this;return new nc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},c.onError.bind(c),c.onCompleted.bind(c))})},Vb.startWith=function(){var a,b,c=0;return arguments.length&&G(arguments[0])?(b=arguments[0],c=1):b=Eb,a=mb.call(arguments,c),Sb([ec(a,b),this]).concat()},Vb.takeLast=function(a){var b=this;return new nc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})})},Vb.takeLastBuffer=function(a){var b=this;return new nc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},c.onError.bind(c),function(){c.onNext(d),c.onCompleted()})})},Vb.windowWithCount=function(a,b){var c=this;if(0>=a)throw new Error(O);if(1===arguments.length&&(b=a),0>=b)throw new Error(O);return new nc(function(d){var e=new xb,f=new zb(e),g=0,h=[],i=function(){var a=new qc;h.push(a),d.onNext(pb(a,f))};return i(),e.setDisposable(c.subscribe(function(c){for(var d,e=0,f=h.length;f>e;e++)h[e].onNext(c);var j=g-a+1;j>=0&&j%b===0&&(d=h.shift(),d.onCompleted()),g++,g%b===0&&i()},function(a){for(;h.length>0;)h.shift().onError(a);d.onError(a)},function(){for(;h.length>0;)h.shift().onCompleted();d.onCompleted()})),f})},Vb.selectConcat=Vb.concatMap=function(a,b,c){return b?this.concatMap(function(c,d){var e=a(c,d),f=M(e)?ac(e):e;return f.map(function(a){return b(c,a,d)})}):"function"==typeof a?u(this,a,c):u(this,function(){return a})},Vb.concatMapObserver=Vb.selectConcatObserver=function(a,b,c,d){var e=this;return new nc(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}M(c)&&(c=ac(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}M(c)&&(c=ac(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}M(a)&&(a=ac(a)),f.onNext(a),f.onCompleted()})}).concatAll()},Vb.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new nc(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},a.onError.bind(a),function(){d||a.onNext(b),a.onCompleted()})})},w.prototype.push=function(a){var b=-1===v(this.set,a,this.comparer);return b&&this.set.push(a),b},Vb.distinct=function(a,b){var c=this;return b||(b=J),new nc(function(d){var e=new w(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},d.onError.bind(d),d.onCompleted.bind(d))})},Vb.select=Vb.map=function(a,b){var c=this;return new nc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Vb.pluck=function(a){return this.map(function(b){return b[a]})},Vb.flatMapObserver=Vb.selectManyObserver=function(a,b,c,d){var e=this;return new nc(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}M(c)&&(c=ac(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}M(c)&&(c=ac(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}M(a)&&(a=ac(a)),f.onNext(a),f.onCompleted()})}).mergeAll()},Vb.selectMany=Vb.flatMap=function(a,b,c){return b?this.flatMap(function(c,d){var e=a(c,d),f=M(e)?ac(e):e;return f.map(function(a){return b(c,a,d)})},c):"function"==typeof a?x(this,a,c):x(this,function(){return a})},Vb.selectSwitch=Vb.flatMapLatest=Vb.switchMap=function(a,b){return this.select(a,b).switchLatest()},Vb.skip=function(a){if(0>a)throw new Error(O);var b=this;return new nc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},c.onError.bind(c),c.onCompleted.bind(c))})},Vb.skipWhile=function(a,b){var c=this;return new nc(function(d){var e=0,f=!1;return c.subscribe(function(g){if(!f)try{f=!a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f&&d.onNext(g)},d.onError.bind(d),d.onCompleted.bind(d))})},Vb.take=function(a,b){if(0>a)throw new RangeError(O);if(0===a)return cc(b);var c=this;return new nc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},b.onError.bind(b),b.onCompleted.bind(b))})},Vb.takeWhile=function(a,b){var c=this;return new nc(function(d){var e=0,f=!0;return c.subscribe(function(g){if(f){try{f=a.call(b,g,e++,c)}catch(h){return void d.onError(h)}f?d.onNext(g):d.onCompleted()}},d.onError.bind(d),d.onCompleted.bind(d))})},Vb.where=Vb.filter=function(a,b){var c=this;return new nc(function(d){var e=0;return c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}g&&d.onNext(f)},d.onError.bind(d),d.onCompleted.bind(d))})},Vb.exclusive=function(){var a=this;return new nc(function(b){var c=!1,d=!1,e=new xb,f=new sb;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,M(a)&&(a=ac(a));var e=new xb;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f})},Vb.exclusiveMap=function(a,b){var c=this;return new nc(function(d){var e=0,f=!1,g=!0,h=new xb,i=new sb;return i.add(h),h.setDisposable(c.subscribe(function(c){f||(f=!0,innerSubscription=new xb,i.add(innerSubscription),M(c)&&(c=ac(c)),innerSubscription.setDisposable(c.subscribe(function(f){var g;try{g=a.call(b,f,e++,c)}catch(h){return void d.onError(h)}d.onNext(g)},d.onError.bind(d),function(){i.remove(innerSubscription),f=!1,g&&1===i.length&&d.onCompleted()})))},d.onError.bind(d),function(){g=!0,1!==i.length||f||d.onCompleted()})),i})};var nc=E.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?vb(a):wb}function c(d){function e(a){var c=function(){try{e.setDisposable(b(d(e)))}catch(a){if(!e.fail(a))throw a}},e=new oc(a);return Fb.scheduleRequired()?Fb.schedule(c):c(),e}return this instanceof c?void a.call(this,e):new c(d)}return nb(c,a),c}(_b),oc=function(a){function b(b){a.call(this),this.observer=b,this.m=new xb}nb(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){throw c}finally{b||this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){throw b}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){throw a}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.disposable=function(a){return arguments.length?this.getDisposable():setDisposable(a)},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Wb),pc=function(a,b){this.subject=a,this.observer=b};pc.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var qc=E.Subject=function(a){function c(a){return b.call(this),this.isStopped?this.exception?(a.onError(this.exception),wb):(a.onCompleted(),wb):(this.observers.push(a),new pc(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return nb(d,a),ob(d.prototype,Tb,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b.call(this),!this.isStopped){var a=this.observers.slice(0);this.isStopped=!0;for(var c=0,d=a.length;d>c;c++)a[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){if(b.call(this),!this.isStopped)for(var c=this.observers.slice(0),d=0,e=c.length;e>d;d++)c[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new rc(a,b)},d}(_b),rc=(E.AsyncSubject=function(a){function c(a){if(b.call(this),!this.isStopped)return this.observers.push(a),new pc(this,a);var c=this.exception,d=this.hasValue,e=this.value;return c?a.onError(c):d?(a.onNext(e),a.onCompleted()):a.onCompleted(),wb}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return nb(d,a),ob(d.prototype,Tb,{hasObservers:function(){return b.call(this),this.observers.length>0},onCompleted:function(){var a,c,d;if(b.call(this),!this.isStopped){this.isStopped=!0;var e=this.observers.slice(0),f=this.value,g=this.hasValue;if(g)for(c=0,d=e.length;d>c;c++)a=e[c],a.onNext(f),a.onCompleted();else for(c=0,d=e.length;d>c;c++)e[c].onCompleted();this.observers=[]}},onError:function(a){if(b.call(this),!this.isStopped){var c=this.observers.slice(0);this.isStopped=!0,this.exception=a;for(var d=0,e=c.length;e>d;d++)c[d].onError(a);this.observers=[]}},onNext:function(a){b.call(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(_b),E.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this,this.observable.subscribe.bind(this.observable))}return nb(b,a),ob(b.prototype,Tb,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(_b));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(z.Rx=E,define(function(){return E})):A&&B?C?(B.exports=E).Rx=E:A.Rx=E:z.Rx=E}).call(this); -//# sourceMappingURL=rx.map \ No newline at end of file +//# sourceMappingURL=rx.map diff --git a/dist/rx.testing.map b/dist/rx.testing.map index 4ccdf6f0b..adb5e3cad 100644 --- a/dist/rx.testing.map +++ b/dist/rx.testing.map @@ -1 +1 @@ -{"version":3,"file":"rx.testing.min.js","sources":["rx.testing.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","argsOrArray","args","idx","length","Array","isArray","slice","OnNextPredicate","predicate","OnErrorPredicate","Observer","Observable","Notification","VirtualTimeScheduler","Disposable","disposableEmpty","empty","disposableCreate","create","CompositeDisposable","SingleAssignmentDisposable","prototype","inherits","internals","defaultComparer","isEqual","equals","other","kind","value","exception","ReactiveTest","created","subscribed","disposed","onNext","ticks","Recorded","createOnNext","onError","createOnError","onCompleted","createOnCompleted","subscribe","start","end","Subscription","time","comparer","toString","unsubscribe","Number","MAX_VALUE","MockDisposable","scheduler","disposes","push","clock","dispose","MockObserver","_super","messages","MockObserverPrototype","HotObservable","observer","observable","observers","subscriptions","index","indexOf","splice","message","notification","i","len","innerNotification","scheduleAbsoluteWithState","obs","j","jLen","accept","ColdObservable","d","add","scheduleRelativeWithState","TestScheduler","baseComparer","x","y","state","dueTime","action","absolute","relative","toDateTimeOffset","Date","getTime","toRelative","timeSpan","startWithTiming","source","subscription","createObserver","startWithDispose","startWithCreate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B,EAAchE,UAAUkF,iBAAmB,SAAUrF,EAAQgB,GACzD,MAAOhD,MAAKiH,gBAAgBjF,EAAQa,EAAaC,QAASD,EAAaE,WAAYC,IAQvFmD,EAAchE,UAAUmF,gBAAkB,SAAUtF,GAChD,MAAOhC,MAAKiH,gBAAgBjF,EAAQa,EAAaC,QAASD,EAAaE,WAAYF,EAAaG,WAQpGmD,EAAchE,UAAUoF,oBAAsB,WAC1C,GAAI5C,GAAW7D,EAAY0G,UAAW,EACtC,OAAO,IAAI3C,GAAc7E,KAAM2E,IAQnCwB,EAAchE,UAAUsF,qBAAuB,WAC3C,GAAI9C,GAAW7D,EAAY0G,UAAW,EACtC,OAAO,IAAIzB,GAAe/F,KAAM2E,IAOpCwB,EAAchE,UAAUiF,eAAiB,WACrC,MAAO,IAAI3C,GAAazE,OAGrBmG,GACRxE,GAEIjB"} \ No newline at end of file +{"version":3,"file":"rx.testing.min.js","sources":["rx.testing.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","argsOrArray","args","idx","length","Array","isArray","slice","OnNextPredicate","predicate","OnErrorPredicate","Observer","Observable","Notification","VirtualTimeScheduler","Disposable","disposableEmpty","empty","disposableCreate","create","CompositeDisposable","SingleAssignmentDisposable","prototype","inherits","internals","defaultComparer","isEqual","equals","other","kind","value","exception","ReactiveTest","created","subscribed","disposed","onNext","ticks","Recorded","createOnNext","onError","createOnError","onCompleted","createOnCompleted","subscribe","start","end","Subscription","time","comparer","toString","unsubscribe","Number","MAX_VALUE","MockDisposable","scheduler","disposes","push","clock","dispose","MockObserver","_super","messages","MockObserverPrototype","HotObservable","observer","observable","observers","subscriptions","index","indexOf","splice","message","notification","i","len","innerNotification","scheduleAbsoluteWithState","obs","j","jLen","accept","ColdObservable","d","add","scheduleRelativeWithState","TestScheduler","baseComparer","x","y","state","dueTime","action","absolute","relative","toDateTimeOffset","Date","getTime","toRelative","timeSpan","startWithTiming","source","subscription","createObserver","startWithDispose","startWithCreate","createHotObservable","arguments","createColdObservable"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,iBAAkB,WAAY,SAAUE,EAAIR,GAEhD,MADAJ,GAAKY,GAAKpB,EAAQQ,EAAMI,EAASQ,GAC1BZ,EAAKY,KAES,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,aAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,GAgB9B,QAASI,GAAYC,EAAMC,GACvB,MAAuB,KAAhBD,EAAKE,QAAgBC,MAAMC,QAAQJ,EAAKC,IAC3CD,EAAKC,GACLI,EAAMR,KAAKG,GAGrB,QAASM,GAAgBC,GACrBtB,KAAKsB,UAAYA,EAUrB,QAASC,GAAiBD,GACtBtB,KAAKsB,UAAYA,EA/BnB,GAAIE,GAAWd,EAAGc,SACdC,EAAaf,EAAGe,WAChBC,EAAehB,EAAGgB,aAClBC,EAAuBjB,EAAGiB,qBAC1BC,EAAalB,EAAGkB,WAChBC,EAAkBD,EAAWE,MAC7BC,EAAmBH,EAAWI,OAC9BC,EAAsBvB,EAAGuB,oBAEzBb,GAD6BV,EAAGwB,2BACxBhB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3C,UACN3C,IAEX7B,KAAK0D,QACEoB,GAUXqB,EAAchE,UAAUkF,iBAAmB,SAAUrF,EAAQgB,GACzD,MAAOhD,MAAKiH,gBAAgBjF,EAAQa,EAAaC,QAASD,EAAaE,WAAYC,IAQvFmD,EAAchE,UAAUmF,gBAAkB,SAAUtF,GAChD,MAAOhC,MAAKiH,gBAAgBjF,EAAQa,EAAaC,QAASD,EAAaE,WAAYF,EAAaG,WAQpGmD,EAAchE,UAAUoF,oBAAsB,WAC1C,GAAI5C,GAAW7D,EAAY0G,UAAW,EACtC,OAAO,IAAI3C,GAAc7E,KAAM2E,IAQnCwB,EAAchE,UAAUsF,qBAAuB,WAC3C,GAAI9C,GAAW7D,EAAY0G,UAAW,EACtC,OAAO,IAAIzB,GAAe/F,KAAM2E,IAOpCwB,EAAchE,UAAUiF,eAAiB,WACrC,MAAO,IAAI3C,GAAazE,OAGrBmG,GACRxE,GAEIjB"} diff --git a/dist/rx.testing.min.js b/dist/rx.testing.min.js index e62c02ac8..7c2152ea0 100644 --- a/dist/rx.testing.min.js +++ b/dist/rx.testing.min.js @@ -1,3 +1,3 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.virtualtime","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx.all")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:o.call(a)}function e(a){this.predicate=a}function f(a){this.predicate=a}var g=c.Observer,h=c.Observable,i=c.Notification,j=c.VirtualTimeScheduler,k=c.Disposable,l=k.empty,m=k.create,n=c.CompositeDisposable,o=(c.SingleAssignmentDisposable,Array.prototype.slice),p=c.internals.inherits,q=c.internals.isEqual;e.prototype.equals=function(a){return a===this?!0:null==a?!1:"N"!==a.kind?!1:this.predicate(a.value)},f.prototype.equals=function(a){return a===this?!0:null==a?!1:"E"!==a.kind?!1:this.predicate(a.exception)};var r=c.ReactiveTest={created:100,subscribed:200,disposed:1e3,onNext:function(a,b){return"function"==typeof b?new s(a,new e(b)):new s(a,i.createOnNext(b))},onError:function(a,b){return"function"==typeof b?new s(a,new f(b)):new s(a,i.createOnError(b))},onCompleted:function(a){return new s(a,i.createOnCompleted())},subscribe:function(a,b){return new t(a,b)}},s=c.Recorded=function(a,b,c){this.time=a,this.value=b,this.comparer=c||q};s.prototype.equals=function(a){return this.time===a.time&&this.comparer(this.value,a.value)},s.prototype.toString=function(){return this.value.toString()+"@"+this.time};var t=c.Subscription=function(a,b){this.subscribe=a,this.unsubscribe=b||Number.MAX_VALUE};t.prototype.equals=function(a){return this.subscribe===a.subscribe&&this.unsubscribe===a.unsubscribe},t.prototype.toString=function(){return"("+this.subscribe+", "+(this.unsubscribe===Number.MAX_VALUE?"Infinite":this.unsubscribe)+")"};var u=c.MockDisposable=function(a){this.scheduler=a,this.disposes=[],this.disposes.push(this.scheduler.clock)};u.prototype.dispose=function(){this.disposes.push(this.scheduler.clock)};var v=function(a){function b(b){a.call(this),this.scheduler=b,this.messages=[]}p(b,a);var c=b.prototype;return c.onNext=function(a){this.messages.push(new s(this.scheduler.clock,i.createOnNext(a)))},c.onError=function(a){this.messages.push(new s(this.scheduler.clock,i.createOnError(a)))},c.onCompleted=function(){this.messages.push(new s(this.scheduler.clock,i.createOnCompleted()))},b}(g),w=function(a){function b(a){var b=this;this.observers.push(a),this.subscriptions.push(new t(this.scheduler.clock));var c=this.subscriptions.length-1;return m(function(){var d=b.observers.indexOf(a);b.observers.splice(d,1),b.subscriptions[c]=new t(b.subscriptions[c].subscribe,b.scheduler.clock)})}function c(c,d){a.call(this,b);var e,f,g=this;this.scheduler=c,this.messages=d,this.subscriptions=[],this.observers=[];for(var h=0,i=this.messages.length;i>h;h++)e=this.messages[h],f=e.value,function(a){c.scheduleAbsoluteWithState(null,e.time,function(){for(var b=g.observers.slice(0),c=0,d=b.length;d>c;c++)a.accept(b[c]);return l})}(f)}return p(c,a),c}(h),x=function(a){function b(a){var b,c,d=this;this.subscriptions.push(new t(this.scheduler.clock));for(var e=this.subscriptions.length-1,f=new n,g=0,h=this.messages.length;h>g;g++)b=this.messages[g],c=b.value,function(c){f.add(d.scheduler.scheduleRelativeWithState(null,b.time,function(){return c.accept(a),l}))}(c);return m(function(){d.subscriptions[e]=new t(d.subscriptions[e].subscribe,d.scheduler.clock),f.dispose()})}function c(c,d){a.call(this,b),this.scheduler=c,this.messages=d,this.subscriptions=[]}return p(c,a),c}(h);return c.TestScheduler=function(a){function b(a,b){return a>b?1:b>a?-1:0}function c(){a.call(this,0,b)}return p(c,a),c.prototype.scheduleAbsoluteWithState=function(b,c,d){return c<=this.clock&&(c=this.clock+1),a.prototype.scheduleAbsoluteWithState.call(this,b,c,d)},c.prototype.add=function(a,b){return a+b},c.prototype.toDateTimeOffset=function(a){return new Date(a).getTime()},c.prototype.toRelative=function(a){return a},c.prototype.startWithTiming=function(a,b,c,d){var e,f,g=this.createObserver();return this.scheduleAbsoluteWithState(null,b,function(){return e=a(),l}),this.scheduleAbsoluteWithState(null,c,function(){return f=e.subscribe(g),l}),this.scheduleAbsoluteWithState(null,d,function(){return f.dispose(),l}),this.start(),g},c.prototype.startWithDispose=function(a,b){return this.startWithTiming(a,r.created,r.subscribed,b)},c.prototype.startWithCreate=function(a){return this.startWithTiming(a,r.created,r.subscribed,r.disposed)},c.prototype.createHotObservable=function(){var a=d(arguments,0);return new w(this,a)},c.prototype.createColdObservable=function(){var a=d(arguments,0);return new x(this,a)},c.prototype.createObserver=function(){return new v(this)},c}(j),c}); -//# sourceMappingURL=rx.testing.map \ No newline at end of file +//# sourceMappingURL=rx.testing.map diff --git a/dist/rx.time.map b/dist/rx.time.map index 7f49f1c82..b02dfd649 100644 --- a/dist/rx.time.map +++ b/dist/rx.time.map @@ -1 +1 @@ -{"version":3,"file":"rx.time.min.js","sources":["rx.time.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","observableTimerDate","dueTime","scheduler","AnonymousObservable","observer","scheduleWithAbsolute","onNext","onCompleted","observableTimerDateAndPeriod","period","count","d","p","normalizeTime","scheduleRecursiveWithAbsolute","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","source","subscription","active","cancelable","SerialDisposable","exception","q","running","materialize","timestamp","subscribe","notification","shouldRun","value","kind","push","onError","SingleAssignmentDisposable","setDisposable","scheduleRecursiveWithRelative","e","recurseDueTime","result","shouldRecurse","length","shift","accept","Math","max","CompositeDisposable","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","bind","Observable","observableProto","prototype","defer","observableEmpty","empty","observableNever","never","observableThrow","throwException","timeoutScheduler","fromArray","Scheduler","timeout","RefCountDisposable","Subject","addRef","internals","normalize","helpers","isPromise","isScheduler","observableFromPromise","fromPromise","observableinterval","notDefined","interval","observableTimer","timer","periodOrScheduler","Date","getTime","delay","throttle","hasvalue","id","x","currentId","dispose","windowWithTime","timeSpan","timeShiftOrScheduler","timeShift","createTimer","m","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","s","refCountDisposable","groupDisposable","add","i","len","windowWithTimeOrCount","n","windowId","newId","newWindow","bufferWithTime","apply","arguments","selectMany","toArray","bufferWithTimeOrCount","timeInterval","last","map","span","sample","intervalOrSampler","other","Error","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","initialState","condition","iterate","resultSelector","timeSelector","time","first","hasResult","state","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","selector","delays","done","start","error","remove","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","res","throttleWithSelector","throttleDurationSelector","currentid","skipLastWithTime","duration","takeLastWithTime","next","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,EAAIb,GAyBpC,QAASiB,GAAoBC,EAASC,GACpC,MAAO,IAAIC,GAAoB,SAAUC,GACvC,MAAOF,GAAUG,qBAAqBJ,EAAS,WAC7CG,EAASE,OAAO,GAChBF,EAASG,kBAKf,QAASC,GAA6BP,EAASQ,EAAQP,GACrD,MAAO,IAAIC,GAAoB,SAAUC,GACvC,GAAIM,GAAQ,EAAGC,EAAIV,EAASW,EAAIC,EAAcJ,EAC9C,OAAOP,GAAUY,8BAA8BH,EA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AAO,IAAIxF,GAAoB,SAAUC,GACvC,MAAO,IAAIgD,GACTlD,EAAUyI,GAAiB+C,EAAStL,EAASG,YAAYqD,KAAKxD,IAC9DmB,EAAOU,UAAU7B,OAIdR"} \ No newline at end of file +{"version":3,"file":"rx.time.min.js","sources":["rx.time.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","observableTimerDate","dueTime","scheduler","AnonymousObservable","observer","scheduleWithAbsolute","onNext","onCompleted","observableTimerDateAndPeriod","period","count","d","p","normalizeTime","scheduleRecursiveWithAbsolute","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","source","subscription","active","cancelable","SerialDisposable","exception","q","running","materialize","timestamp","subscribe","notification","shouldRun","value","kind","push","onError","SingleAssignmentDisposable","setDisposable","scheduleRecursiveWithRelative","e","recurseDueTime","result","shouldRecurse","length","shift","accept","Math","max","CompositeDisposable","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","bind","Observable","observableProto","prototype","defer","observableEmpty","empty","observableNever","never","observableThrow","throwException","timeoutScheduler","fromArray","Scheduler","timeout","RefCountDisposable","Subject","addRef","internals","normalize","helpers","isPromise","isScheduler","observableFromPromise","fromPromise","observableinterval","notDefined","interval","observableTimer","timer","periodOrScheduler","Date","getTime","delay","throttle","hasvalue","id","x","currentId","dispose","windowWithTime","timeSpan","timeShiftOrScheduler","timeShift","createTimer","m","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","s","refCountDisposable","groupDisposable","add","i","len","windowWithTimeOrCount","n","windowId","newId","newWindow","bufferWithTime","apply","arguments","selectMany","toArray","bufferWithTimeOrCount","timeInterval","last","map","span","sample","intervalOrSampler","other","Error","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","initialState","condition","iterate","resultSelector","timeSelector","time","first","hasResult","state","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","selector","delays","done","start","error","remove","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","res","throttleWithSelector","throttleDurationSelector","currentid","skipLastWithTime","duration","takeLastWithTime","next","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,EAAIb,GAyBpC,QAASiB,GAAoBC,EAASC,GACpC,MAAO,IAAIC,GAAoB,SAAUC,GACvC,MAAOF,GAAUG,qBAAqBJ,EAAS,WAC7CG,EAASE,OAAO,GAChBF,EAASG,kBAKf,QAASC,GAA6BP,EAASQ,EAAQP,GACrD,MAAO,IAAIC,GAAoB,SAAUC,GACvC,GAAIM,GAAQ,EAAGC,EAAIV,EAASW,EAAIC,EAAcJ,EAC9C,OAAOP,GAAUY,8BAA8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BACF,OAAO,IAAIxF,GAAoB,SAAUC,GACvC,MAAO,IAAIgD,GACTlD,EAAUyI,GAAiB+C,EAAStL,EAASG,YAAYqD,KAAKxD,IAC9DmB,EAAOU,UAAU7B,OAIdR"} diff --git a/dist/rx.time.min.js b/dist/rx.time.min.js index f8716a001..1283d4550 100644 --- a/dist/rx.time.min.js +++ b/dist/rx.time.min.js @@ -1,3 +1,3 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b){return new n(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function f(a,b,c){return new n(function(d){var e=0,f=a,g=z(b);return c.scheduleRecursiveWithAbsolute(f,function(a){if(g>0){var b=c.now();f+=g,b>=f&&(f=b+g)}d.onNext(e++),a(f)})})}function g(a,b){return new n(function(c){return b.scheduleWithRelative(z(a),function(){c.onNext(0),c.onCompleted()})})}function h(a,b,c){return a===b?new n(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):o(function(){return f(c.now()+a,b,c)})}function i(a,b,c){return new n(function(d){var e,f=!1,g=new u,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new t,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new v(e,g)})}function j(a,b,c){return o(function(){return i(a,b-c.now(),c)})}function k(a,b){return new n(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new v(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))})}var l=c.Observable,m=l.prototype,n=c.AnonymousObservable,o=l.defer,p=l.empty,q=l.never,r=l.throwException,s=(l.fromArray,c.Scheduler.timeout),t=c.SingleAssignmentDisposable,u=c.SerialDisposable,v=c.CompositeDisposable,w=c.RefCountDisposable,x=c.Subject,y=c.internals.addRef,z=c.Scheduler.normalize,A=c.helpers,B=A.isPromise,C=A.isScheduler,D=l.fromPromise,E=(A.notDefined,l.interval=function(a,b){return h(a,a,C(b)?b:s)}),F=l.timer=function(a,b,c){var i;return C(c)||(c=s),b!==d&&"number"==typeof b?i=b:C(b)&&(c=b),a instanceof Date&&i===d?e(a.getTime(),c):a instanceof Date&&i!==d?(i=b,f(a.getTime(),i,c)):i===d?g(a,c):h(a,i,c)};return m.delay=function(a,b){return C(b)||(b=s),a instanceof Date?j(this,a.getTime(),b):i(this,a,b)},m.throttle=function(a,b){C(b)||(b=s);var c=this;return new n(function(d){var e,f=new u,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new t;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new v(i,f)})},m.windowWithTime=function(a,b,c){var e,f=this;return b===d&&(e=a),C(c)||(c=s),"number"==typeof b?e=b:C(b)&&(e=a,c=b),new n(function(b){function d(){var a=new t,f=!1,g=!1;l.setDisposable(a),j===i?(f=!0,g=!0):i>j?f=!0:g=!0;var n=f?j:i,o=n-m;m=n,f&&(j+=e),g&&(i+=e),a.setDisposable(c.scheduleWithRelative(o,function(){var a;g&&(a=new x,k.push(a),b.onNext(y(a,h))),f&&(a=k.shift(),a.onCompleted()),d()}))}var g,h,i=e,j=a,k=[],l=new u,m=0;return g=new v(l),h=new w(g),k.push(new x),b.onNext(y(k[0],h)),d(),g.add(f.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(a){for(var c=0,d=k.length;d>c;c++)k[c].onError(a);b.onError(a)},function(){for(var a=0,c=k.length;c>a;a++)k[a].onCompleted();b.onCompleted()})),h})},m.windowWithTimeOrCount=function(a,b,c){var d=this;return C(c)||(c=s),new n(function(e){var f,g,h,i,j=0,k=new u,l=0;return g=new v(k),h=new w(g),f=function(b){var d=new t;k.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){var a;b===l&&(j=0,a=++l,i.onCompleted(),i=new x,e.onNext(y(i,h)),f(a))}))},i=new x,e.onNext(y(i,h)),f(0),g.add(d.subscribe(function(a){var c=0,d=!1;i.onNext(a),j++,j===b&&(d=!0,j=0,c=++l,i.onCompleted(),i=new x,e.onNext(y(i,h))),d&&f(c)},function(a){i.onError(a),e.onError(a)},function(){i.onCompleted(),e.onCompleted()})),h})},m.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},m.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},m.timeInterval=function(a){var b=this;return C(a)||(a=s),o(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},m.timestamp=function(a){return C(a)||(a=s),this.map(function(b){return{value:b,timestamp:a.now()}})},m.sample=function(a,b){return C(b)||(b=s),"number"==typeof a?k(this,E(a,b)):k(this,a)},m.timeout=function(a,b,c){b||(b=r(new Error("Timeout"))),C(c)||(c=s);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new n(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(B(b)&&(b=D(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new t,j=new u,k=!1,l=new u;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new v(j,l)})},l.generateWithAbsoluteTime=function(a,b,c,d,e,f){return C(f)||(f=s),new n(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithAbsolute(f.now(),function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},l.generateWithRelativeTime=function(a,b,c,d,e,f){return C(f)||(f=s),new n(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithRelative(0,function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},m.delaySubscription=function(a,b){return this.delayWithSelector(F(a,C(b)?b:s),p)},m.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new n(function(a){var b=new v,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new u,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new t;b.add(h),h.setDisposable(e.subscribe(function(){a.onNext(c),b.remove(h),g()},a.onError.bind(a),function(){a.onNext(c),b.remove(h),g()}))},a.onError.bind(a),function(){f=!0,h.dispose(),g()}))};return c?h.setDisposable(c.subscribe(function(){i()},a.onError.bind(a),function(){i()})):i(),new v(h,b)})},m.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=q()),c||(c=r(new Error("Timeout")));var d=this;return new n(function(e){function f(a){function b(){return k===d}var d=k,f=new t;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(c.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(c.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new u,i=new u,j=new t;h.setDisposable(j);var k=0,l=!1;return f(a),j.setDisposable(d.subscribe(function(a){if(g()){e.onNext(a);var c;try{c=b(a)}catch(d){return void e.onError(d)}f(B(c)?D(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new v(h,i)})},m.throttleWithSelector=function(a){var b=this;return new n(function(c){var d,e=!1,f=new u,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}B(h)&&(h=D(h)),e=!0,d=b,g++;var j=g,k=new t;f.setDisposable(k),k.setDisposable(h.subscribe(function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()},c.onError.bind(c),function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new v(h,f)})},m.skipLastWithTime=function(a,b){C(b)||(b=s);var c=this;return new n(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},d.onError.bind(d),function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})})},m.takeLastWithTime=function(a,b){var c=this;return C(b)||(b=s),new n(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})})},m.takeLastBufferWithTime=function(a,b){var c=this;return C(b)||(b=s),new n(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},d.onError.bind(d),function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})})},m.takeWithTime=function(a,b){var c=this;return C(b)||(b=s),new n(function(d){return new v(b.scheduleWithRelative(a,d.onCompleted.bind(d)),c.subscribe(d))})},m.skipWithTime=function(a,b){var c=this;return C(b)||(b=s),new n(function(d){var e=!1;return new v(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))})},m.skipUntilWithTime=function(a,b){C(b)||(b=s);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new n(function(e){var f=!1;return new v(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},e.onError.bind(e),e.onCompleted.bind(e)))})},m.takeUntilWithTime=function(a,b){C(b)||(b=s);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new n(function(e){return new v(b[d](a,e.onCompleted.bind(e)),c.subscribe(e))})},c}); -//# sourceMappingURL=rx.time.map \ No newline at end of file +//# sourceMappingURL=rx.time.map diff --git a/dist/rx.virtualtime.map b/dist/rx.virtualtime.map index 54681ad3f..d849d3e56 100644 --- a/dist/rx.virtualtime.map +++ b/dist/rx.virtualtime.map @@ -1 +1 @@ -{"version":3,"file":"rx.virtualtime.min.js","sources":["rx.virtualtime.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","Scheduler","PriorityQueue","internals","ScheduledItem","SchedulePeriodicRecursive","disposableEmpty","Disposable","empty","inherits","defaultSubComparer","helpers","VirtualTimeScheduler","__super__","notImplemented","Error","localNow","toDateTimeOffset","clock","scheduleNow","state","action","scheduleAbsoluteWithState","scheduleRelative","dueTime","scheduleRelativeWithState","toRelative","scheduleAbsolute","now","invokeAction","scheduler","initialClock","comparer","isEnabled","queue","VirtualTimeSchedulerPrototype","prototype","add","schedulePeriodicWithState","period","s","start","runAt","next","getNext","invoke","stop","advanceTo","time","dueToClock","argumentOutOfRange","advanceBy","dt","sleep","length","peek","isCancelled","dequeue","run","state1","self","remove","si","enqueue","disposable","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","Date","getTime","timeSpan"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,GAGjC,GAAII,GAAYJ,EAAGI,UAClBC,EAAgBL,EAAGM,UAAUD,cAC7BE,EAAgBP,EAAGM,UAAUC,cAC7BC,EAA6BR,EAAGM,UAAUE,0BAC1CC,EAAkBT,EAAGU,WAAWC,MAChCC,EAAWZ,EAAGM,UAAUM,SACtBC,EAAqBb,EAAGc,QAAQD,kBAqRhC,OAlRFb,GAAGe,qBAAwB,S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GAAG,CAC5B,GAAIX,GAAOxD,KAAK+C,MAAMqB,MACtB,KAAIZ,EAAKa,cAGP,MAAOb,EAFPxD,MAAK+C,MAAMuB,UAKf,MAAO,OAUTtB,EAA8BR,iBAAmB,SAAUH,EAASH,GAClE,MAAOlC,MAAKmC,0BAA0BD,EAAQG,EAASK,IAUzDM,EAA8Bb,0BAA4B,SAAUF,EAAOI,EAASH,GAGlF,QAASqC,GAAI5B,EAAW6B,GAEtB,MADAC,GAAK1B,MAAM2B,OAAOC,GACXzC,EAAOS,EAAW6B,GAJ3B,GAAIC,GAAOzE,KAOP2E,EAAK,GAAI1D,GAAcjB,KAAMiC,EAAOsC,EAAKlC,EAASrC,KAAK6C,SAG3D,OAFA7C,MAAK+C,MAAM6B,QAAQD,GAEZA,EAAGE,YAGLpD,GACPX,GAGFJ,EAAGoE,oBAAuB,SAAUpD,GASlC,QAASoD,GAAoBlC,EAAcC,GACzC,GAAId,GAAwB,MAAhBa,EAAuB,EAAIA,EACnCmC,EAAMlC,GAAYtB,CACtBG,GAAUd,KAAKZ,KAAM+B,EAAOgD,GAX9BzD,EAASwD,EAAqBpD,EAc9B,IAAIsD,GAA2BF,EAAoB7B,SA0BnD,OAlBA+B,GAAyB9B,IAAM,SAAU+B,EAAUC,GACjD,MAAOD,GAAWC,GAGpBF,EAAyBlD,iBAAmB,SAAUmD,GACpD,MAAO,IAAIE,MAAKF,GAAUG,WAS5BJ,EAAyBzC,WAAa,SAAU8C,GAC9C,MAAOA,IAGFP,GACPpE,EAAGe,sBAEIf"} \ No newline at end of file +{"version":3,"file":"rx.virtualtime.min.js","sources":["rx.virtualtime.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","Scheduler","PriorityQueue","internals","ScheduledItem","SchedulePeriodicRecursive","disposableEmpty","Disposable","empty","inherits","defaultSubComparer","helpers","VirtualTimeScheduler","__super__","notImplemented","Error","localNow","toDateTimeOffset","clock","scheduleNow","state","action","scheduleAbsoluteWithState","scheduleRelative","dueTime","scheduleRelativeWithState","toRelative","scheduleAbsolute","now","invokeAction","scheduler","initialClock","comparer","isEnabled","queue","VirtualTimeSchedulerPrototype","prototype","add","schedulePeriodicWithState","period","s","start","runAt","next","getNext","invoke","stop","advanceTo","time","dueToClock","argumentOutOfRange","advanceBy","dt","sleep","length","peek","isCancelled","dequeue","run","state1","self","remove","si","enqueue","disposable","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","Date","getTime","timeSpan"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,GAGjC,GAAII,GAAYJ,EAAGI,UAClBC,EAAgBL,EAAGM,UAAUD,cAC7BE,EAAgBP,EAAGM,UAAUC,cAC7BC,EAA6BR,EAAGM,UAAUE,0BAC1CC,EAAkBT,EAAGU,WAAWC,MAChCC,EAAWZ,EAAGM,UAAUM,SACtBC,EAAqBb,EAAGc,Q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AU,WACtC,KAAOzD,KAAK+C,MAAMoB,OAAS,GAAG,CAC5B,GAAIX,GAAOxD,KAAK+C,MAAMqB,MACtB,KAAIZ,EAAKa,cAGP,MAAOb,EAFPxD,MAAK+C,MAAMuB,UAKf,MAAO,OAUTtB,EAA8BR,iBAAmB,SAAUH,EAASH,GAClE,MAAOlC,MAAKmC,0BAA0BD,EAAQG,EAASK,IAUzDM,EAA8Bb,0BAA4B,SAAUF,EAAOI,EAASH,GAGlF,QAASqC,GAAI5B,EAAW6B,GAEtB,MADAC,GAAK1B,MAAM2B,OAAOC,GACXzC,EAAOS,EAAW6B,GAJ3B,GAAIC,GAAOzE,KAOP2E,EAAK,GAAI1D,GAAcjB,KAAMiC,EAAOsC,EAAKlC,EAASrC,KAAK6C,SAG3D,OAFA7C,MAAK+C,MAAM6B,QAAQD,GAEZA,EAAGE,YAGLpD,GACPX,GAGFJ,EAAGoE,oBAAuB,SAAUpD,GASlC,QAASoD,GAAoBlC,EAAcC,GACzC,GAAId,GAAwB,MAAhBa,EAAuB,EAAIA,EACnCmC,EAAMlC,GAAYtB,CACtBG,GAAUd,KAAKZ,KAAM+B,EAAOgD,GAX9BzD,EAASwD,EAAqBpD,EAc9B,IAAIsD,GAA2BF,EAAoB7B,SA0BnD,OAlBA+B,GAAyB9B,IAAM,SAAU+B,EAAUC,GACjD,MAAOD,GAAWC,GAGpBF,EAAyBlD,iBAAmB,SAAUmD,GACpD,MAAO,IAAIE,MAAKF,GAAUG,WAS5BJ,EAAyBzC,WAAa,SAAU8C,GAC9C,MAAOA,IAGFP,GACPpE,EAAGe,sBAEIf"} diff --git a/dist/rx.virtualtime.min.js b/dist/rx.virtualtime.min.js index 0a1507891..83cfa2817 100644 --- a/dist/rx.virtualtime.min.js +++ b/dist/rx.virtualtime.min.js @@ -1,3 +1,3 @@ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){var d=c.Scheduler,e=c.internals.PriorityQueue,f=c.internals.ScheduledItem,g=c.internals.SchedulePeriodicRecursive,h=c.Disposable.empty,i=c.internals.inherits,j=c.helpers.defaultSubComparer;return c.VirtualTimeScheduler=function(a){function b(){throw new Error("Not implemented")}function c(){return this.toDateTimeOffset(this.clock)}function d(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function j(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function k(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function l(a,b){return b(),h}function m(b,f){this.clock=b,this.comparer=f,this.isEnabled=!1,this.queue=new e(1024),a.call(this,c,d,j,k)}i(m,a);var n=m.prototype;return n.add=b,n.toDateTimeOffset=b,n.toRelative=b,n.schedulePeriodicWithState=function(a,b,c){var d=new g(this,a,b,c);return d.start()},n.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},n.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,l)},n.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},n.stop=function(){this.isEnabled=!1},n.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Error(argumentOutOfRange);if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},n.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Error(argumentOutOfRange);0!==c&&this.advanceTo(b)},n.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Error(argumentOutOfRange);this.clock=b},n.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},n.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,l)},n.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(g),c(a,b)}var e=this,g=new f(this,a,d,b,this.comparer);return this.queue.enqueue(g),g.disposable},m}(d),c.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||j;a.call(this,d,e)}i(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(c.VirtualTimeScheduler),c}); -//# sourceMappingURL=rx.virtualtime.map \ No newline at end of file +//# sourceMappingURL=rx.virtualtime.map diff --git a/doc/api/core/notification.md b/doc/api/core/notification.md index 5f38677c4..a1c8a86f7 100644 --- a/doc/api/core/notification.md +++ b/doc/api/core/notification.md @@ -20,7 +20,7 @@ Represents a notification to an observer. ## _Notification Methods_ ## ### `Rx.Notification.createOnCompleted()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L113-L134 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L113-L134 "View in source") Creates an object that represents an OnCompleted notification to an observer. @@ -34,16 +34,16 @@ var source = Rx.Observable Rx.Notification.createOnCompleted() ]) .dematerialize(); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Completed @@ -56,7 +56,7 @@ var subscription = source.subscribe( * * * ### `Rx.Notification.createOnError(exception)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L85-L107 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L85-L107 "View in source") Creates an object that represents an OnError notification to an observer. @@ -73,16 +73,16 @@ var source = Rx.Observable Rx.Notification.createOnError(new Error('woops')) ]) .dematerialize(); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Error: Error: woops @@ -95,7 +95,7 @@ var subscription = source.subscribe( * * * ### `Rx.Notification.createOnNext(value)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L56-L178 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L56-L178 "View in source") Creates an object that represents an OnNext notification to an observer. @@ -113,16 +113,16 @@ var source = Rx.Observable Rx.Notification.createOnCompleted() ]) .dematerialize(); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 @@ -138,7 +138,7 @@ var subscription = source.subscribe( ## _Notification Instance Methods_ ## ### `Rx.Notification.prototype.accept([observer] | [onNext], [onError], [onCompleted])` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L21-L26 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L21-L26 "View in source") Invokes the delegate corresponding to the notification or the observer's method corresponding to the notification and returns the produced result. @@ -176,7 +176,7 @@ console.log(notification.accept(function (x) { return x; })) * * * ### `Rx.Notification.prototype.toObservable([scheduler])` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L35-L46 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L35-L46 "View in source") Returns an observable sequence with a single notification. @@ -197,10 +197,10 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 @@ -215,10 +215,10 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Error: Error: error! @@ -233,7 +233,7 @@ var subscription = source.subscribe( ## _Notification Properties_ ## ### `exception` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L101 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L101 "View in source") Gets the exception from the OnError notification. @@ -255,7 +255,7 @@ console.log(notification.exception); * * * ### `hasValue` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L6 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L6 "View in source") Determines whether the Notification has a value. Returns `true` for OnNext Notifications, and `false` for OnError and OnCompleted Notifications. @@ -282,7 +282,7 @@ console.log(onCompleted.hasValue); * * * ### `kind` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L7 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L7 "View in source") Gets the kind from the notification which denotes 'N' for OnNext, 'E' for OnError and 'C' for OnCompleted. @@ -304,7 +304,7 @@ console.log(notification.kind); * * * ### `value` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L72 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/notification.js#L72 "View in source") Gets the value from the OnNext notification. @@ -323,4 +323,4 @@ console.log(notification.value); - rx.js -* * * \ No newline at end of file +* * * diff --git a/doc/api/core/observable.md b/doc/api/core/observable.md index 5127dd75a..084c10ef9 100644 --- a/doc/api/core/observable.md +++ b/doc/api/core/observable.md @@ -2,7 +2,7 @@ The Observable object represents a push based collection. -The Observer and Objects interfaces provide a generalized mechanism for push-based notification, also known as the observer design pattern. The Observable object represents the object that sends notifications (the provider); the Observer object represents the class that receives them (the observer). +The Observer and Objects interfaces provide a generalized mechanism for push-based notification, also known as the observer design pattern. The Observable object represents the object that sends notifications (the provider); the Observer object represents the class that receives them (the observer). @@ -51,7 +51,6 @@ The Observer and Objects interfaces provide a generalized mechanism for push-bas - ## `Observable Instance Methods` @@ -183,4 +182,4 @@ The Observer and Objects interfaces provide a generalized mechanism for push-bas - [`windowWithCount`](operators/windowwithcount.md) - [`windowWithTime`](operators/windowwithtime.md) - [`windowWithTimeOrCount`](operators/windowwithtimeorcount.md) -- [`zip`](operators/zipproto.md) \ No newline at end of file +- [`zip`](operators/zipproto.md) diff --git a/doc/api/core/observer.md b/doc/api/core/observer.md index a2be878e5..b25f0d43e 100644 --- a/doc/api/core/observer.md +++ b/doc/api/core/observer.md @@ -2,7 +2,7 @@ The Observer object provides support for push-style iteration over an observable sequence. -The Observer and Objects interfaces provide a generalized mechanism for push-based notification, also known as the observer design pattern. The Observable object represents the object that sends notifications (the provider); the Observer object represents the class that receives them (the observer). +The Observer and Objects interfaces provide a generalized mechanism for push-based notification, also known as the observer design pattern. The Observable object represents the object that sends notifications (the provider); the Observer object represents the class that receives them (the observer). @@ -43,10 +43,10 @@ var observer = Rx.Observer.create( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); } ); @@ -151,7 +151,7 @@ Object.defineProperties(SampleObserver.prototype, { console.log('Completed'); } } - } + } }); var sampleObserver = new SampleObserver(); @@ -177,7 +177,7 @@ If a violation is detected, an Error is thrown from the offending observer metho #### Returns *(Observer)*: An observer that checks callbacks invocations against the observer grammar and, if the checks pass, forwards those to the specified observer. - + #### Example ```js var observer = Rx.Observer.create( @@ -220,7 +220,7 @@ Schedules the invocation of observer methods on the given scheduler. #### Returns *(Observer)*: Observer whose messages are scheduled on the given scheduler. - + #### Example ```js var observer = Rx.Observer.create( @@ -283,7 +283,7 @@ observer.onCompleted(); Notifies the observer that an exception has occurred. #### Arguments -1. `error` *(Any)*: The error that has occurred. +1. `error` *(Any)*: The error that has occurred. #### Example ```js @@ -315,7 +315,7 @@ observer.onError(new Error('error!!')); Notifies the observer of a new element in the sequence. #### Arguments -1. `value` *(Any)*: Next element in the sequence. +1. `value` *(Any)*: Next element in the sequence. #### Example ```js @@ -378,4 +378,4 @@ notifier(Rx.Notification.createOnCompleted()); - rx.js -* * * \ No newline at end of file +* * * diff --git a/doc/api/core/operators/aggregate.md b/doc/api/core/operators/aggregate.md index ee410843f..098415045 100644 --- a/doc/api/core/operators/aggregate.md +++ b/doc/api/core/operators/aggregate.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.aggregate([seed], accumulator)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/aggregate.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/aggregate.js "View in source") Applies an accumulator function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value. For aggregation behavior with incremental intermediate results, see `Rx.Observable.scan`. @@ -23,14 +23,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 3628800 -// => Completed +// => Completed // Without a seed var source = Rx.Observable.range(1, 10).aggregate(function (acc, x) { @@ -42,14 +42,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 55 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/all.md b/doc/api/core/operators/all.md index 58ee9c6ba..598fcc746 100644 --- a/doc/api/core/operators/all.md +++ b/doc/api/core/operators/all.md @@ -1,8 +1,8 @@ ### `Rx.Observable.prototype.all(predicate, [thisArg])` ### `Rx.Observable.prototype.every(predicate, [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/all.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/all.js "View in source") -Determines whether all elements of an observable sequence satisfy a condition. +Determines whether all elements of an observable sequence satisfy a condition. #### Arguments 1. `predicate` *(`Function`)*: A function to test each element for a condition. @@ -23,14 +23,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: true -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/amb.md b/doc/api/core/operators/amb.md index f79309f34..fe6a701bd 100644 --- a/doc/api/core/operators/amb.md +++ b/doc/api/core/operators/amb.md @@ -1,4 +1,4 @@ -### `Rx.Observable.amb(...args)` [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/amb.js "View in source") +### `Rx.Observable.amb(...args)` [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/amb.js "View in source") Propagates the observable sequence or Promise that reacts first. @@ -21,10 +21,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: bar @@ -41,10 +41,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: foo @@ -73,4 +73,4 @@ NuGet Packages: - [`RxJS-Main`](http://www.nuget.org/packages/RxJS-Main/) Unit Tests: -- [`/tests/observable/ambproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/ambproto.js) \ No newline at end of file +- [`/tests/observable/ambproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/ambproto.js) diff --git a/doc/api/core/operators/ambproto.md b/doc/api/core/operators/ambproto.md index d65c03ae5..1552a15e8 100644 --- a/doc/api/core/operators/ambproto.md +++ b/doc/api/core/operators/ambproto.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.amb(rightSource)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/ambproto.js "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/ambproto.js "View in source") Propagates the observable sequence that reacts first. @@ -21,14 +21,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: first -// => Completed +// => Completed ``` ### Location @@ -55,4 +55,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/ambproto.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/ambproto.js) \ No newline at end of file +- [/tests/observable/ambproto.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/ambproto.js) diff --git a/doc/api/core/operators/and.md b/doc/api/core/operators/and.md index b25108029..06a185ccf 100644 --- a/doc/api/core/operators/and.md +++ b/doc/api/core/operators/and.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.and(rightSource)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/and.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/and.js "View in source") Propagates the observable sequence that reacts first. @@ -7,7 +7,7 @@ Propagates the observable sequence that reacts first. 1. `right` *(`Observable`)*: Observable sequence to match with the current sequence. #### Returns -*(`Pattern`)*: Pattern object that matches when both observable sequences have an available value. +*(`Pattern`)*: Pattern object that matches when both observable sequences have an available value. #### Example ```js @@ -22,15 +22,15 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: first // => Next: second -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/any.md b/doc/api/core/operators/any.md index abb84089e..1dfdcb829 100644 --- a/doc/api/core/operators/any.md +++ b/doc/api/core/operators/any.md @@ -1,6 +1,6 @@ ### `Rx.Observable.prototype.any([predicate], [thisArg])` ### `Rx.Observable.prototype.some([predicate], [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/any.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/any.js "View in source") Determines whether any element of an observable sequence satisfies a condition if present, else if any items are in the sequence. There is an alias to this function called `some`. @@ -9,7 +9,7 @@ Determines whether any element of an observable sequence satisfies a condition i 2. `[thisArg]` *(`Any`)*: Object to use as this when executing callback. #### Returns -*(`Observable`)*: An observable sequence containing a single element determining whether all elements in the source sequence pass the test in the specified predicate. +*(`Observable`)*: An observable sequence containing a single element determining whether all elements in the source sequence pass the test in the specified predicate. #### Example ```js @@ -21,14 +21,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: false -// => Completed +// => Completed // With a predicate var source = Rx.Observable.fromArray([1,2,3,4,5]) @@ -39,14 +39,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: true -// => Completed +// => Completed ``` ### Location @@ -70,4 +70,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/any.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/any.js) \ No newline at end of file +- [`/tests/observable/any.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/any.js) diff --git a/doc/api/core/operators/asobservable.md b/doc/api/core/operators/asobservable.md index 8b540a3ed..4f79f0064 100644 --- a/doc/api/core/operators/asobservable.md +++ b/doc/api/core/operators/asobservable.md @@ -1,4 +1,4 @@ -### `Rx.Observable.asObservable()` [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/asobservable.js "View in source") +### `Rx.Observable.asObservable()` [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/asobservable.js "View in source") Hides the identity of an observable sequence. @@ -8,7 +8,6 @@ Hides the identity of an observable sequence. #### Returns *(`Observable`)*: An observable sequence that hides the identity of the source sequence. - #### Example ```js // Create subject @@ -26,10 +25,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 diff --git a/doc/api/core/operators/average.md b/doc/api/core/operators/average.md index ee84853f7..3bc6efdbf 100644 --- a/doc/api/core/operators/average.md +++ b/doc/api/core/operators/average.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.average([selector])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/average.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/average.js "View in source") Computes the average of an observable sequence of values that are in the sequence or obtained by invoking a transform function on each element of the input sequence if present. @@ -19,14 +19,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 4 -// => Completed +// => Completed // With a selector var arr = [ @@ -44,14 +44,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 2 -// => Completed +// => Completed ``` ### Location @@ -75,4 +75,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/average.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/average.js) \ No newline at end of file +- [`/tests/observable/average.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/average.js) diff --git a/doc/api/core/operators/buffer.md b/doc/api/core/operators/buffer.md index 66020971d..c6701197a 100644 --- a/doc/api/core/operators/buffer.md +++ b/doc/api/core/operators/buffer.md @@ -20,7 +20,7 @@ Rx.Observable.prototype.buffer(bufferBoundaries); 2. `[bufferClosingSelector]` *(`Function`)*: A function invoked to define the closing of each produced window. If a closing selector function is specified for the first parameter, this parameter is ignored. #### Returns -*(`Observable`)*: An observable sequence of windows. +*(`Observable`)*: An observable sequence of windows. #### Example ```js @@ -36,16 +36,16 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0,1,2,3 +// => Next: 0,1,2,3 // => Next: 4,5,6,7,8 // => Next: 9,10,11,12,13 -// => Completed +// => Completed /* Using a buffer closing selector */ var win = 0; @@ -59,16 +59,16 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0 +// => Next: 0 // => Next: 1,2,3,4 -// => Next: 5,6,7,8,9,10 -// => Completed +// => Next: 5,6,7,8,9,10 +// => Completed /* Using Openings and Closing Selector */ var openings = Rx.Observable.interval(200); @@ -82,16 +82,16 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 3,4 -// => Next: 7,8 -// => Next: 11,12 -// => Completed +// => Next: 3,4 +// => Next: 7,8 +// => Next: 11,12 +// => Completed ``` ### Location @@ -114,4 +114,4 @@ NuGet Packages: - [`RxJS-Coincidence`](http://www.nuget.org/packages/RxJS-Coincidence/) Unit Tests: -- [`/tests/observable/buffer.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/buffer.js) \ No newline at end of file +- [`/tests/observable/buffer.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/buffer.js) diff --git a/doc/api/core/operators/bufferwithcount.md b/doc/api/core/operators/bufferwithcount.md index 1c3d1d3ca..ae7919477 100644 --- a/doc/api/core/operators/bufferwithcount.md +++ b/doc/api/core/operators/bufferwithcount.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.bufferWithCount(count, [skip])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/bufferwithcount.js"View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/bufferwithcount.js"View in source") Projects each element of an observable sequence into zero or more buffers which are produced based on element count information. @@ -8,7 +8,7 @@ Projects each element of an observable sequence into zero or more buffers which 2. `[skip]` *(`Function`)*: Number of elements to skip between creation of consecutive buffers. If not provided, defaults to the count. #### Returns -*(`Observable`)*: An observable sequence of buffers. +*(`Observable`)*: An observable sequence of buffers. #### Example ```js @@ -21,16 +21,16 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 1,2 -// => Next: 3,4 -// => Next: 5,6 -// => Completed +// => Next: 1,2 +// => Next: 3,4 +// => Next: 5,6 +// => Completed /* Using a skip */ var source = Rx.Observable.range(1, 6) @@ -41,19 +41,19 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 1,2 -// => Next: 2,3 -// => Next: 3,4 -// => Next: 4,5 -// => Next: 5,6 -// => Next: 6 -// => Completed +// => Next: 1,2 +// => Next: 2,3 +// => Next: 3,4 +// => Next: 4,5 +// => Next: 5,6 +// => Next: 6 +// => Completed ``` ### Location @@ -79,4 +79,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/bufferwithcount.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/bufferwithcount.js) \ No newline at end of file +- [`/tests/observable/bufferwithcount.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/bufferwithcount.js) diff --git a/doc/api/core/operators/bufferwithtime.md b/doc/api/core/operators/bufferwithtime.md index 352f199df..8c832e996 100644 --- a/doc/api/core/operators/bufferwithtime.md +++ b/doc/api/core/operators/bufferwithtime.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.bufferWithTime(timeSpan, [timeShift | scheduler], [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/bufferwithtime.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/bufferwithtime.js "View in source") Projects each element of an observable sequence into zero or more buffers which are produced based on timing information. @@ -9,7 +9,7 @@ Projects each element of an observable sequence into zero or more buffers which 3. `[scheduler=Rx.Scheduler.timeout]` *(`Scheduler`)*: Scheduler to run buffer timers on. If not specified, the timeout scheduler is used. #### Returns -*(`Observable`)*: An observable sequence of buffers. +*(`Observable`)*: An observable sequence of buffers. #### Example ```js @@ -23,16 +23,16 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0,1,2,3 -// => Next: 4,5,6,7,8 -// => Next: 9,10,11,12,13 -// => Completed +// => Next: 0,1,2,3 +// => Next: 4,5,6,7,8 +// => Next: 9,10,11,12,13 +// => Completed /* Using a skip */ var source = Rx.Observable.interval(100) @@ -44,16 +44,16 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0,1,2,3,4 -// => Next: 0,1,2,3,4,5 -// => Next: 2,3,4,5,6 -// => Completed +// => Next: 0,1,2,3,4 +// => Next: 0,1,2,3,4,5 +// => Next: 2,3,4,5,6 +// => Completed ``` ### Location @@ -79,4 +79,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/bufferwithtime.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/bufferwithtime.js) \ No newline at end of file +- [`/tests/observable/bufferwithtime.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/bufferwithtime.js) diff --git a/doc/api/core/operators/bufferwithtimeorcount.md b/doc/api/core/operators/bufferwithtimeorcount.md index a9e9fd03b..77a6508b1 100644 --- a/doc/api/core/operators/bufferwithtimeorcount.md +++ b/doc/api/core/operators/bufferwithtimeorcount.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.bufferWithTimeOrCount(timeSpan, count, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/bufferwithtimeorcount.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/bufferwithtimeorcount.js "View in source") Projects each element of an observable sequence into a buffer that is completed when either it's full or a given amount of time has elapsed. @@ -9,7 +9,7 @@ Projects each element of an observable sequence into a buffer that is completed 3. `[scheduler=Rx.Scheduler.timeout]` *(`Scheduler`)*: Scheduler to run buffer timers on. If not specified, the timeout scheduler is used. #### Returns -*(`Observable`)*: An observable sequence of buffers. +*(`Observable`)*: An observable sequence of buffers. #### Example ```js @@ -23,16 +23,16 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0,1,2 -// => Next: 3,4,5 -// => Next: 6,7,8 -// => Completed +// => Next: 0,1,2 +// => Next: 3,4,5 +// => Next: 6,7,8 +// => Completed ``` ### Location @@ -58,4 +58,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/bufferwithtimeorcount.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/bufferwithtimeorcount.js) \ No newline at end of file +- [`/tests/observable/bufferwithtimeorcount.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/bufferwithtimeorcount.js) diff --git a/doc/api/core/operators/case.md b/doc/api/core/operators/case.md index 07f8b54af..0caf1aea1 100644 --- a/doc/api/core/operators/case.md +++ b/doc/api/core/operators/case.md @@ -1,5 +1,5 @@ ### `Rx.Observable.case(selector, sources, [elseSource|scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/case.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/case.js "View in source") Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers Next: 42 -//=> Completed +//=> Next: 42 +//=> Completed ``` ### Location @@ -53,7 +53,7 @@ Dist: - [`rx.experimental.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.experimental.js) Prerequisites: -- If using `rx.expermental.js` +- If using `rx.expermental.js` - [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) | [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) | [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) | [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) NPM Packages: @@ -64,4 +64,4 @@ NuGet Packages: - [`RxJS-Experimental`](http://www.nuget.org/packages/RxJS-Experimental) Unit Tests: -- [`/tests/observable/case.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/case.js) \ No newline at end of file +- [`/tests/observable/case.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/case.js) diff --git a/doc/api/core/operators/catch.md b/doc/api/core/operators/catch.md index 24aea52cf..397a7330a 100644 --- a/doc/api/core/operators/catch.md +++ b/doc/api/core/operators/catch.md @@ -1,5 +1,5 @@ `Rx.Observable.catch(...args)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/catch.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/catch.js "View in source") Continues an observable sequence that is terminated by an exception with the next observable sequence. There is an alias for this method `catchException` for browsers Next: 42 @@ -56,4 +56,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/catchexceptionproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/catchexceptionproto.js) \ No newline at end of file +- [`/tests/observable/catchexceptionproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/catchexceptionproto.js) diff --git a/doc/api/core/operators/catchproto.md b/doc/api/core/operators/catchproto.md index 516f93ef2..664cd2d5e 100644 --- a/doc/api/core/operators/catchproto.md +++ b/doc/api/core/operators/catchproto.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.catch(second | handler)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js#L3107-L3112 "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js#L3107-L3112 "View in source") Continues an observable sequence that is terminated by an exception with the next observable sequence. There is an alias for this method `catchException` for browsers Next: 42 -// => Completed +// => Completed /* Using a handler function */ var source = Rx.Observable.throw(new Error()) @@ -41,14 +41,14 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: true -// => Completed +// => Completed ``` ### Location @@ -75,4 +75,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/catchexceptionproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/catchexceptionproto.js) \ No newline at end of file +- [`/tests/observable/catchexceptionproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/catchexceptionproto.js) diff --git a/doc/api/core/operators/combinelatest.md b/doc/api/core/operators/combinelatest.md index 20986cb3c..c9a337008 100644 --- a/doc/api/core/operators/combinelatest.md +++ b/doc/api/core/operators/combinelatest.md @@ -1,5 +1,5 @@ ### `Rx.Observable.combineLatest(...args, resultSelector)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/combinelatest.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/combinelatest.js "View in source") Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. This can be in the form of an argument list of observables or an array. @@ -8,7 +8,7 @@ Merges the specified observable sequences into one observable sequence by using 1. `resultSelector` *(`Function`)*: Function to invoke whenever either of the sources produces an element. #### Returns -*(`Observable`)*: An observable sequence containing the result of combining elements of the sources using the specified result selector function. +*(`Observable`)*: An observable sequence containing the result of combining elements of the sources using the specified result selector function. #### Example ```js @@ -25,23 +25,23 @@ var source = Rx.Observable.combineLatest( source2, function (s1, s2) { return s1 + ', ' + s2; } ).take(4); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: First: 0, Second: 0 -// => Next: First: 1, Second: 0 -// => Next: First: 1, Second: 1 -// => Next: First: 2, Second: 1 -// => Completed +// => Next: First: 0, Second: 0 +// => Next: First: 1, Second: 0 +// => Next: First: 1, Second: 1 +// => Next: First: 2, Second: 1 +// => Completed ``` ### Location @@ -66,4 +66,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/combinelatestproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/combinelatestproto.js) \ No newline at end of file +- [`/tests/observable/combinelatestproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/combinelatestproto.js) diff --git a/doc/api/core/operators/combinelatestproto.md b/doc/api/core/operators/combinelatestproto.md index 82f76d34c..566d58f8a 100644 --- a/doc/api/core/operators/combinelatestproto.md +++ b/doc/api/core/operators/combinelatestproto.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.combineLatest(...args, resultSelector)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/combinelatestproto.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/combinelatestproto.js "View in source") Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. This can be in the form of an argument list of observables or an array. @@ -8,7 +8,7 @@ Merges the specified observable sequences into one observable sequence by using 1. `resultSelector` *(`Function`)*: Function to invoke whenever either of the sources produces an element. #### Returns -*(`Observable`)*: An observable sequence containing the result of combining elements of the sources using the specified result selector function. +*(`Observable`)*: An observable sequence containing the result of combining elements of the sources using the specified result selector function. #### Example ```js @@ -24,23 +24,23 @@ var source = source1.combineLatest( source2, function (s1, s2) { return s1 + ', ' + s2; } ).take(4); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: First: 0, Second: 0 -// => Next: First: 1, Second: 0 -// => Next: First: 1, Second: 1 -// => Next: First: 2, Second: 1 -// => Completed +// => Next: First: 0, Second: 0 +// => Next: First: 1, Second: 0 +// => Next: First: 1, Second: 1 +// => Next: First: 2, Second: 1 +// => Completed ``` ### Location @@ -65,4 +65,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/combinelatestproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/combinelatestproto.js) \ No newline at end of file +- [`/tests/observable/combinelatestproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/combinelatestproto.js) diff --git a/doc/api/core/operators/concat.md b/doc/api/core/operators/concat.md index cb33f5d8f..bd4124195 100644 --- a/doc/api/core/operators/concat.md +++ b/doc/api/core/operators/concat.md @@ -1,5 +1,5 @@ ### `Rx.Observable.concat(...args)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/concat.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/concat.js "View in source") Concatenates all of the specified observable sequences, as long as the previous observable sequence terminated successfully. @@ -22,10 +22,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 @@ -43,10 +43,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 @@ -79,4 +79,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/concatproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/concatproto.js) \ No newline at end of file +- [`/tests/observable/concatproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/concatproto.js) diff --git a/doc/api/core/operators/concatall.md b/doc/api/core/operators/concatall.md index 139870bb5..e326064fc 100644 --- a/doc/api/core/operators/concatall.md +++ b/doc/api/core/operators/concatall.md @@ -1,12 +1,12 @@ ### `Rx.Observable.prototype.concatAll()` ### `Rx.Observable.prototype.concatObservable()` *DEPRECATED* -[Ⓢ](/src/core/linq/observable/concatobservable.js](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/concatobservable.js "View in source") +[Ⓢ](/src/core/linq/observable/concatobservable.js](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/concatobservable.js "View in source") Concatenates a sequence of observable sequences or promises into a single observable sequence. #### Returns -*(`Observable`)*: The observable sequence that merges the elements of the inner sequences. - +*(`Observable`)*: The observable sequence that merges the elements of the inner sequences. + #### Example ```js var source = Rx.Observable.range(0, 3) @@ -18,22 +18,22 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0 -// => Next: 1 -// => Next: 2 -// => Next: 1 -// => Next: 2 -// => Next: 3 -// => Next: 2 -// => Next: 3 -// => Next: 4 -// => Completed +// => Next: 0 +// => Next: 1 +// => Next: 2 +// => Next: 1 +// => Next: 2 +// => Next: 3 +// => Next: 2 +// => Next: 3 +// => Next: 4 +// => Completed ``` #### Location @@ -58,4 +58,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/concatobservable.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/concatobservable.js) \ No newline at end of file +- [/tests/observable/concatobservable.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/concatobservable.js) diff --git a/doc/api/core/operators/concatmap.md b/doc/api/core/operators/concatmap.md index 6087e61bb..fd1e99aa4 100644 --- a/doc/api/core/operators/concatmap.md +++ b/doc/api/core/operators/concatmap.md @@ -1,6 +1,6 @@ ### `Rx.Observable.prototype.concatMap(selector, [resultSelector])` ### `Rx.Observable.prototype.selectConcat(selector, [resultSelector])` -[Ⓢ]((https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/concatmap.js "View in source") +[Ⓢ]((https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/concatmap.js "View in source") This is an alias for the `selectConcat` method. This can be one of the following: @@ -19,7 +19,7 @@ source.concatMap(function (x, i) { return Promise.resolve(x + i); }, function (x ``` Projects each element of the source observable sequence to the other observable sequence or Promise and merges the resulting observable sequences into one observable sequence. - + ```js source.concatMap(Rx.Observable.fromArray([1,2,3])); source.concatMap(Promise.resolve(42)); @@ -28,9 +28,9 @@ source.concatMap(Promise.resolve(42)); #### Arguments 1. `selector` *(`Function`)*: A transform function to apply to each element or an observable sequence to project each element from the source sequence onto. 2. `[resultSelector]` *(`Function`)*: A transform function to apply to each element of the intermediate sequence. - + #### Returns -*(`Observable`)*: An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element. +*(`Observable`)*: An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element. #### Example ```js @@ -38,7 +38,7 @@ var source = Rx.Observable.range(0, 5) .concatMap(function (x, i) { return Rx.Observable .interval(100) - .take(x).map(function() { return i; }); + .take(x).map(function() { return i; }); }); var subscription = source.subscribe( @@ -46,23 +46,23 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 1 -// => Next: 2 -// => Next: 2 -// => Next: 3 -// => Next: 3 -// => Next: 3 -// => Next: 4 -// => Next: 4 -// => Next: 4 -// => Next: 4 -// => Completed +// => Next: 1 +// => Next: 2 +// => Next: 2 +// => Next: 3 +// => Next: 3 +// => Next: 3 +// => Next: 4 +// => Next: 4 +// => Next: 4 +// => Next: 4 +// => Completed /* Using a promise */ var source = Rx.Observable.fromArray([1,2,3,4]) @@ -75,17 +75,17 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 4 -// => Next: 4 -// => Next: 4 -// => Next: 4 -// => Completed +// => Next: 4 +// => Next: 4 +// => Next: 4 +// => Completed ``` ### Location diff --git a/doc/api/core/operators/concatmapobserver.md b/doc/api/core/operators/concatmapobserver.md index 9cab83706..c5cd85d49 100644 --- a/doc/api/core/operators/concatmapobserver.md +++ b/doc/api/core/operators/concatmapobserver.md @@ -1,6 +1,6 @@ ### `Rx.Observable.prototype.concatMapObserver(onNext, onError, onCompleted, [thisArg])` ### `Rx.Observable.prototype.selectConcatObserver(onNext, onError, onCompleted, [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/concatmapobserver.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/concatmapobserver.js "View in source") Projects each notification of an observable sequence to an observable sequence and concats the resulting observable sequences into one observable sequence. @@ -11,7 +11,7 @@ Projects each notification of an observable sequence to an observable sequence a 2. `onError` *(`Function`)*: A transform function to apply when an error occurs in the source sequence. 3. `onCompleted` *(`Function`)*: A transform function to apply when the end of the source sequence is reached. 4. `[thisArg]` *(`Any`)*: Object to use as `this` when executing the transform functions. - + #### Returns *(`Observable`)*: An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence. @@ -34,16 +34,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 2 -// => Next: 3 -// => Next: 3 -// => Completed +// => Next: 2 +// => Next: 3 +// => Next: 3 +// => Completed ``` ### Location @@ -65,4 +65,4 @@ NuGet Packages: - [`RxJS-Main`](http://www.nuget.org/packages/RxJS-Main/) Unit Tests: -- [`/tests/observable/concatmapobserver.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/concatmapobserver.js) \ No newline at end of file +- [`/tests/observable/concatmapobserver.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/concatmapobserver.js) diff --git a/doc/api/core/operators/concatproto.md b/doc/api/core/operators/concatproto.md index 410f01be6..378b429ef 100644 --- a/doc/api/core/operators/concatproto.md +++ b/doc/api/core/operators/concatproto.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.concat(...args)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/concatproto.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/concatproto.js "View in source") Concatenates all the observable sequences. This takes in either an array or variable arguments to concatenate. @@ -7,29 +7,29 @@ Concatenates all the observable sequences. This takes in either an array or var 1. `args` *(arguments | Array)*: An array or arguments of Observable sequences. #### Returns -*(`Observable`)*: An observable sequence that contains the elements of each given sequence, in sequential order. +*(`Observable`)*: An observable sequence that contains the elements of each given sequence, in sequential order. #### Example ```js var source = Rx.Observable .return(42) .concat(Rx.Observable.return(56), Rx.Observable.return(72)); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 // => Next: 56 // => Next: 72 -// => Completed +// => Completed // With a promise var source = Rx.Observable.just(42) @@ -40,15 +40,15 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 // => Next: 542 -// => Completed +// => Completed ``` ### Location @@ -73,4 +73,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/concatproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/concatproto.js) \ No newline at end of file +- [`/tests/observable/concatproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/concatproto.js) diff --git a/doc/api/core/operators/connect.md b/doc/api/core/operators/connect.md index d9650f805..3f9535b57 100644 --- a/doc/api/core/operators/connect.md +++ b/doc/api/core/operators/connect.md @@ -1,26 +1,26 @@ ### `ConnectableObservable.prototype.connect()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.binding.js#L504 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.binding.js#L504 "View in source") Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established. #### Returns *(Disposable)*: Disposable object used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence. - + #### Example ```js var interval = Rx.Observable.interval(1000); var source = interval .take(2) - .do(function (x) { + .do(function (x) { console.log('Side effect'); }); - + var published = source.publish(); - + published.subscribe(createObserver('SourceA')); published.subscribe(createObserver('SourceB')); - + // Connect the source var connection = published.connect(); @@ -30,21 +30,21 @@ function createObserver(tag) { console.log('Next: ' + tag + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); } - + // => Side effect -// => Next: SourceA0 -// => Next: SourceB0 +// => Next: SourceA0 +// => Next: SourceB0 // => Side effect -// => Next: SourceA1 -// => Next: SourceB1 -// => Completed -// => Completed +// => Next: SourceA1 +// => Next: SourceB1 +// => Completed +// => Completed ``` ### Location @@ -68,4 +68,4 @@ NuGet Packages: - [`RxJS-Binding`](http://www.nuget.org/packages/RxJS-Binding/) Unit Tests: -- [`/tests/observable/connectableobservable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/connectableobservable.js) \ No newline at end of file +- [`/tests/observable/connectableobservable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/connectableobservable.js) diff --git a/doc/api/core/operators/contains.md b/doc/api/core/operators/contains.md index 3dc483074..1c44e70e1 100644 --- a/doc/api/core/operators/contains.md +++ b/doc/api/core/operators/contains.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.contains(value, [comparer])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/contains.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/contains.js "View in source") Determines whether an observable sequence contains a specified element with an optional equality comparer. @@ -15,41 +15,41 @@ Determines whether an observable sequence contains a specified element with an o /* Without a comparer */ var source = Rx.Observable.return(42) .contains(42); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: true -// => Completed +// => Completed /* With a comparer */ var source = Rx.Observable.return({ value: 42 }) .contains( - { value: 42}, + { value: 42}, function (x, y) { return x.value === y.value; } ); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: true -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/controlled.md b/doc/api/core/operators/controlled.md index ab2eb8703..b6ba55e0a 100644 --- a/doc/api/core/operators/controlled.md +++ b/doc/api/core/operators/controlled.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.controlled([enableQueue])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/backpressure/controlled.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/backpressure/controlled.js "View in source") Attaches a controller to the observable sequence with the ability to queue. @@ -12,22 +12,22 @@ Attaches a controller to the observable sequence with the ability to queue. #### Example ```js var source = Rx.Observable.range(0, 10).controlled(); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); source.request(2); // => Next: 0 -// => Next: 1 +// => Next: 1 ``` ### Location @@ -53,4 +53,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/controlled.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/controlled.js) \ No newline at end of file +- [/tests/observable/controlled.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/controlled.js) diff --git a/doc/api/core/operators/count.md b/doc/api/core/operators/count.md index 38932f1f7..5a2202f8c 100644 --- a/doc/api/core/operators/count.md +++ b/doc/api/core/operators/count.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.count([predicate])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/count.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/count.js "View in source") Returns an observable sequence containing a value that represents how many elements in the specified observable sequence satisfy a condition if provided, else the count of items. @@ -16,38 +16,38 @@ Returns an observable sequence containing a value that represents how many eleme ```js /* Without a predicate */ var source = Rx.Observable.range(0, 10).count(); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 10 -// => Completed +// => Completed /* With a predicate */ var source = Rx.Observable.range(0, 10) .count(function (x) { return x % 2 === 0; }); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 5 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/create.md b/doc/api/core/operators/create.md index 0d44213d5..5116e1467 100644 --- a/doc/api/core/operators/create.md +++ b/doc/api/core/operators/create.md @@ -1,5 +1,5 @@ ### `Rx.Observable.create(subscribe)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/create.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/create.js "View in source") Creates an observable sequence from a specified subscribe method implementation. This is an alias for the `createWithDisposable` method @@ -27,10 +27,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 @@ -56,10 +56,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 @@ -91,4 +91,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/create.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/create.js) \ No newline at end of file +- [`/tests/observable/create.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/create.js) diff --git a/doc/api/core/operators/defaultifempty.md b/doc/api/core/operators/defaultifempty.md index a4e93d28d..37f76833d 100644 --- a/doc/api/core/operators/defaultifempty.md +++ b/doc/api/core/operators/defaultifempty.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.defaultIfEmpty([defaultValue])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/defaultifempty.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/defaultifempty.js "View in source") Returns the elements of the specified sequence or the specified value in a singleton sequence if the sequence is empty. @@ -7,43 +7,43 @@ Returns the elements of the specified sequence or the specified value in a singl 1. `[defaultValue=null]` *(`Any`)*: The value to return if the sequence is empty. If not provided, this defaults to null. #### Returns -*(`Observable`)*: An observable sequence that contains the specified default value if the source is empty; otherwise, the elements of the source itself. - +*(`Observable`)*: An observable sequence that contains the specified default value if the source is empty; otherwise, the elements of the source itself. + #### Example ```js /* Without a default value */ var source = Rx.Observable.empty().defaultIfEmpty(); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: null -// => Completed +// => Completed /* With a defaultValue */ var source = Rx.Observable.empty().defaultIfEmpty(false); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: false -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/defer.md b/doc/api/core/operators/defer.md index 24b188303..c6fef63c1 100644 --- a/doc/api/core/operators/defer.md +++ b/doc/api/core/operators/defer.md @@ -1,5 +1,5 @@ ### `Rx.Observable.defer(observableFactory)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/defer.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/defer.js "View in source") Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. @@ -21,10 +21,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 @@ -40,10 +40,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 diff --git a/doc/api/core/operators/delay.md b/doc/api/core/operators/delay.md index e63ded80d..d7ac29391 100644 --- a/doc/api/core/operators/delay.md +++ b/doc/api/core/operators/delay.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.delay(dueTime, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/delay.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/delay.js "View in source") Time shifts the observable sequence by dueTime. The relative time intervals between the values are preserved. @@ -9,46 +9,46 @@ Time shifts the observable sequence by dueTime. The relative time intervals betw #### Returns *(`Observable`)*: Time-shifted sequence. - + #### Example ```js /* Using an absolute time to delay by a second */ var source = Rx.Observable.range(0, 3) .delay(new Date(Date.now() + 1000)); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0 -// => Next: 1 -// => Next: 2 +// => Next: 0 +// => Next: 1 +// => Next: 2 // => Completed /* Using an relatove time to delay by a second */ var source = Rx.Observable.range(0, 3) .delay(1000); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: false -// => Completed +// => Completed ``` ### Location @@ -74,4 +74,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/delay.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/delay.js) \ No newline at end of file +- [`/tests/observable/delay.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/delay.js) diff --git a/doc/api/core/operators/delaywithselector.md b/doc/api/core/operators/delaywithselector.md index 2f5fd9188..195e32c54 100644 --- a/doc/api/core/operators/delaywithselector.md +++ b/doc/api/core/operators/delaywithselector.md @@ -1,38 +1,38 @@ ### `Rx.Observable.delayWithSelector.delay([subscriptionDelay], delayDurationSelector)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/delaywithselector.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/delaywithselector.js "View in source") Time shifts the observable sequence by dueTime. The relative time intervals between the values are preserved. #### Arguments -1. `[subscriptionDelay]` *(`Observable`)*: Sequence indicating the delay for the subscription to the source. +1. `[subscriptionDelay]` *(`Observable`)*: Sequence indicating the delay for the subscription to the source. 2. `delayDurationSelector` *(`Function`)*: Selector function to retrieve a sequence indicating the delay for each given element. #### Returns *(`Observable`)*: Time-shifted sequence. - + #### Example ```js /* With subscriptionDelay */ var source = Rx.Observable .range(0, 3) .delayWithSelector( - Rx.Observable.timer(300), + Rx.Observable.timer(300), function (x) { return Rx.Observable.timer(x * 400); } ) .timeInterval() .map(function (x) { return x.value + ':' + x.interval; }); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0:300 @@ -49,16 +49,16 @@ var source = Rx.Observable }) .timeInterval() .map(function (x) { return x.value + ':' + x.interval; }); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0:0 @@ -90,4 +90,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/delaywithselector.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/delaywithselector.js) \ No newline at end of file +- [`/tests/observable/delaywithselector.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/delaywithselector.js) diff --git a/doc/api/core/operators/dematerialize.md b/doc/api/core/operators/dematerialize.md index e9ad8e33e..1dbe86c00 100644 --- a/doc/api/core/operators/dematerialize.md +++ b/doc/api/core/operators/dematerialize.md @@ -1,11 +1,11 @@ ### `Rx.Observable.prototype.dematerialize()` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/dematerialize.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/dematerialize.js "View in source") Dematerializes the explicit notification values of an observable sequence as implicit notifications. #### Returns *(`Observable`)*: An observable sequence exhibiting the behavior corresponding to the source sequence's notification values. - + #### Example ```js var source = Rx.Observable @@ -14,20 +14,20 @@ var source = Rx.Observable Rx.Notification.createOnError(new Error('woops')) ]) .dematerialize(); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 -// => Error: Error: woops +// => Error: Error: woops ``` ### Location diff --git a/doc/api/core/operators/distinct.md b/doc/api/core/operators/distinct.md index d9ebe5d60..5b824f4ce 100644 --- a/doc/api/core/operators/distinct.md +++ b/doc/api/core/operators/distinct.md @@ -1,7 +1,7 @@ ### `Rx.Observable.prototype.distinct([keySelector], [keySerializer])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/distinct.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/distinct.js "View in source") -Returns an observable sequence that contains only distinct elements according to the keySelector and the comparer. Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large. +Returns an observable sequence that contains only distinct elements according to the keySelector and the comparer. Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large. #### Arguments 1. `[keySelector]` *(`Function`)*: A function to compute the comparison key for each element. @@ -23,15 +23,15 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 // => Next: 24 -// => Completed +// => Completed /* With key selector */ var source = Rx.Observable.fromArray([ @@ -44,15 +44,15 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: { value: 42 } // => Next: { value: 24 } -// => Completed +// => Completed ``` ### Location @@ -76,4 +76,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/distinct.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/distinct.js) \ No newline at end of file +- [`/tests/observable/distinct.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/distinct.js) diff --git a/doc/api/core/operators/distinctuntilchanged.md b/doc/api/core/operators/distinctuntilchanged.md index f800eae9a..80beb8873 100644 --- a/doc/api/core/operators/distinctuntilchanged.md +++ b/doc/api/core/operators/distinctuntilchanged.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.distinctUntilChanged([keySelector], [comparer])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/distinctuntilchanged.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/distinctuntilchanged.js "View in source") Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer. @@ -23,15 +23,15 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 // => Next: 24 -// => Completed +// => Completed /* With key selector */ var source = Rx.Observable.fromArray([ @@ -44,15 +44,15 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: { value: 42 } // => Next: { value: 24 } -// => Completed +// => Completed ``` ### Location @@ -76,4 +76,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/distinctuntilchanged.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/distinctuntilchanged.js) \ No newline at end of file +- [`/tests/observable/distinctuntilchanged.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/distinctuntilchanged.js) diff --git a/doc/api/core/operators/do.md b/doc/api/core/operators/do.md index ce84f464b..1b0db106f 100644 --- a/doc/api/core/operators/do.md +++ b/doc/api/core/operators/do.md @@ -1,7 +1,7 @@ ### `Rx.Observable.prototype.do([observer] | [onNext], [onError], [onCompleted])` ### `Rx.Observable.prototype.tap([observer] | [onNext], [onError], [onCompleted])` ### `Rx.Observable.prototype.doAction([observer] | [onNext], [onError], [onCompleted])` *DEPRECATED* -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/do.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/do.js "View in source") Invokes an action for each element in the observable sequence and invokes an action upon graceful or exceptional termination of the observable sequence. @@ -33,10 +33,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Do Next: 0 @@ -46,7 +46,7 @@ var subscription = source.subscribe( // => Do Next: 2 // => Next: 2 // => Do Completed -// => Completed +// => Completed /* Using an observer */ var observer = Rx.Observer.create( @@ -63,10 +63,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Do Next: 0 @@ -76,7 +76,7 @@ var subscription = source.subscribe( // => Do Next: 2 // => Next: 2 // => Do Completed -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/dowhile.md b/doc/api/core/operators/dowhile.md index 700642e41..cd1b17cfd 100644 --- a/doc/api/core/operators/dowhile.md +++ b/doc/api/core/operators/dowhile.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.doWhile(condition)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/dowhile.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/dowhile.js "View in source") Repeats source as long as condition holds emulating a do while loop. @@ -21,15 +21,15 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 // => Next: 42 -// => Completed +// => Completed ``` ### Location @@ -52,4 +52,4 @@ NuGet Packages: - [`RxJS-Experimental`](http://www.nuget.org/packages/RxJS-Experimental) Unit Tests: -- [`/tests/observable/dowhile.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/dowhile.js) \ No newline at end of file +- [`/tests/observable/dowhile.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/dowhile.js) diff --git a/doc/api/core/operators/elementat.md b/doc/api/core/operators/elementat.md index 400a2b013..0871fcaf0 100644 --- a/doc/api/core/operators/elementat.md +++ b/doc/api/core/operators/elementat.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.elementAt(index)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/elementat.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/elementat.js "View in source") Returns the element at a specified index in a sequence. @@ -20,14 +20,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 2 -// => Completed +// => Completed /* Not found */ var source = Rx.Observable.fromArray([1,2,3,4]) @@ -38,10 +38,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Error: Error: Argument out of range diff --git a/doc/api/core/operators/elementatordefault.md b/doc/api/core/operators/elementatordefault.md index 6a1645c3b..811aed920 100644 --- a/doc/api/core/operators/elementatordefault.md +++ b/doc/api/core/operators/elementatordefault.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.elementAtOrDefault(index, [defaultValue])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/elementatordefault.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/elementatordefault.js "View in source") Returns the element at a specified index in a sequence. @@ -21,14 +21,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 2 -// => Completed +// => Completed /* Not found */ var source = Rx.Observable.fromArray([1,2,3,4]) @@ -39,14 +39,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 -// => Completed +// => Completed ``` ### Location @@ -69,4 +69,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/elementatordefault.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/elementatordefault.js) \ No newline at end of file +- [`/tests/observable/elementatordefault.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/elementatordefault.js) diff --git a/doc/api/core/operators/empty.md b/doc/api/core/operators/empty.md index cd7e17438..d4b42db30 100644 --- a/doc/api/core/operators/empty.md +++ b/doc/api/core/operators/empty.md @@ -1,5 +1,5 @@ ### `Rx.Observable.empty([scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/empty.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/empty.js "View in source") Returns an empty observable sequence, using the specified scheduler to send out the single OnCompleted message. @@ -18,10 +18,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Completed @@ -52,4 +52,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/empty.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/empty.js) \ No newline at end of file +- [/tests/observable/empty.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/empty.js) diff --git a/doc/api/core/operators/expand.md b/doc/api/core/operators/expand.md index 8ee166b6c..31c99a757 100644 --- a/doc/api/core/operators/expand.md +++ b/doc/api/core/operators/expand.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.expand(selector, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/expand.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/expand.js "View in source") Expands an observable sequence by recursively invoking selector. @@ -21,18 +21,18 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 42 -// => Next: 84 -// => Next: 126 -// => Next: 168 -// => Next: 210 -// => Completed +// => Next: 42 +// => Next: 84 +// => Next: 126 +// => Next: 168 +// => Next: 210 +// => Completed ``` ### Location @@ -56,4 +56,4 @@ NuGet Packages: - [`RxJS-Experimental`](http://www.nuget.org/packages/RxJS-Experimental) Unit Tests: -- [`/tests/observable/expand.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/expand.js) \ No newline at end of file +- [`/tests/observable/expand.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/expand.js) diff --git a/doc/api/core/operators/finally.md b/doc/api/core/operators/finally.md index 310a6a772..0170ca60d 100644 --- a/doc/api/core/operators/finally.md +++ b/doc/api/core/operators/finally.md @@ -1,6 +1,6 @@ ### `Rx.Observable.prototype.finally(action)` ### `Rx.Observable.prototype.finallyAction(action)` *DEPRECATED* -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/finally.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/finally.js "View in source") Invokes a specified action after the source observable sequence terminates gracefully or exceptionally. There is an alias called `finallyAction` for browsers Error: Error -// => Finally +// => Finally ``` ### Location @@ -59,4 +59,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/finally.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/finally.js) \ No newline at end of file +- [`/tests/observable/finally.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/finally.js) diff --git a/doc/api/core/operators/find.md b/doc/api/core/operators/find.md index 299ef88e2..1237a2a66 100644 --- a/doc/api/core/operators/find.md +++ b/doc/api/core/operators/find.md @@ -1,7 +1,7 @@ ### `Rx.Observable.prototype.find(predicate, [thisArg])` [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/find.js) Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire Observable sequence. - + #### Arguments 1. `predicate` *(`Function`)*: A function to test each source element for a condition; The callback is called with the following information: 1. the value of the element @@ -27,14 +27,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 -// => Completed +// => Completed /* Not found */ var array = [1,2,3,4]; @@ -49,14 +49,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: undefined -// => Completed +// => Completed ``` ### Location @@ -80,4 +80,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/find.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/find.js) \ No newline at end of file +- [`/tests/observable/find.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/find.js) diff --git a/doc/api/core/operators/findindex.md b/doc/api/core/operators/findindex.md index 0a0b68284..77bb2f07e 100644 --- a/doc/api/core/operators/findindex.md +++ b/doc/api/core/operators/findindex.md @@ -1,8 +1,8 @@ ### `Rx.Observable.prototype.findIndex(predicate, [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/findindex.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/findindex.js "View in source") Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire Observable sequence. - + #### Arguments 1. `predicate` *(`Function`)*: A function to test each source element for a condition; The callback is called with the following information: 1. the value of the element @@ -28,14 +28,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 -// => Completed +// => Completed /* Not found */ var array = [1,2,3,4]; @@ -50,14 +50,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: -1 -// => Completed +// => Completed ``` ### Location @@ -81,4 +81,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/findindex.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/findindex.js) \ No newline at end of file +- [`/tests/observable/findindex.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/findindex.js) diff --git a/doc/api/core/operators/first.md b/doc/api/core/operators/first.md index 1b742e94a..ecd647797 100644 --- a/doc/api/core/operators/first.md +++ b/doc/api/core/operators/first.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.first([predicate], [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/first.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/first.js "View in source") Returns the first element of an observable sequence that satisfies the condition in the predicate if present else the first item in the sequence. @@ -11,7 +11,7 @@ Returns the first element of an observable sequence that satisfies the condition 2. `[thisArg]` *(`Any`)*: Object to use as `this` when executing the predicate. #### Returns -*(`Observable`)*: An observable sequence that contains elements from the input sequence that satisfy the condition. +*(`Observable`)*: An observable sequence that contains elements from the input sequence that satisfy the condition. #### Example ```js @@ -24,13 +24,13 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Error: Error: Sequence contains no elements. +// => Error: Error: Sequence contains no elements. /* Without a predicate */ var source = Rx.Observable.range(0, 10) @@ -41,10 +41,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 @@ -59,14 +59,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 -// => Completed +// => Completed ``` ### Location @@ -90,4 +90,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/first.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/first.js) \ No newline at end of file +- [`/tests/observable/first.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/first.js) diff --git a/doc/api/core/operators/firstordefault.md b/doc/api/core/operators/firstordefault.md index 998958d96..7e0ff48a3 100644 --- a/doc/api/core/operators/firstordefault.md +++ b/doc/api/core/operators/firstordefault.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.firstOrDefault(predicate, [defaultValue], [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/firstordefault.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/firstordefault.js "View in source") Returns the first element of an observable sequence that satisfies the condition in the predicate, or a default value if no such element exists. @@ -12,7 +12,7 @@ Returns the first element of an observable sequence that satisfies the condition 3. `[thisArg]` *(`Any`)*: Object to use as `this` when executing the predicate. #### Returns -*(`Observable`)*: An observable sequence that contains elements from the input sequence that satisfy the condition. +*(`Observable`)*: An observable sequence that contains elements from the input sequence that satisfy the condition. #### Example ```js @@ -25,10 +25,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 @@ -43,14 +43,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 -// => Completed +// => Completed ``` ### Location @@ -74,4 +74,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/firstordefault.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/firstordefault.js) \ No newline at end of file +- [`/tests/observable/firstordefault.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/firstordefault.js) diff --git a/doc/api/core/operators/flatmaplatest.md b/doc/api/core/operators/flatmaplatest.md index 0111067f1..53785b161 100644 --- a/doc/api/core/operators/flatmaplatest.md +++ b/doc/api/core/operators/flatmaplatest.md @@ -1,6 +1,6 @@ ### `Rx.Observable.prototype.flatMapLatest(selector, [thisArg])` ### `Rx.Observable.prototype.selectSwitch(selector, [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/flatmaplatest.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/flatmaplatest.js "View in source") Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. @@ -10,16 +10,16 @@ 2. the index of the element 3. the Observable object being subscribed 2. `[thisArg]` *(`Any`)*: Object to use as `this` when executing the predicate. - + #### Returns -*(`Observable`)*: An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received. +*(`Observable`)*: An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received. #### Example ```js var source = Rx.Observable .range(1, 2) .flatMapLatest(function (x) { - return Rx.Observable.range(x, 2); + return Rx.Observable.range(x, 2); }); var subscription = source.subscribe( @@ -27,14 +27,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 3 -// => Completed +// => Next: 3 +// => Completed ``` ### Location @@ -62,4 +62,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/flatmaplatest.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/flatmaplatest.js) \ No newline at end of file +- [`/tests/observable/flatmaplatest.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/flatmaplatest.js) diff --git a/doc/api/core/operators/flatpmapobserver.md b/doc/api/core/operators/flatpmapobserver.md index bdd987e16..f81d15470 100644 --- a/doc/api/core/operators/flatpmapobserver.md +++ b/doc/api/core/operators/flatpmapobserver.md @@ -1,6 +1,6 @@ ### `Rx.Observable.prototype.flatMapObserver(onNext, onError, onCompleted, [thisArg])` ### `Rx.Observable.prototype.selectManyObserver(onNext, onError, onCompleted, [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/selectmanyobserver.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/selectmanyobserver.js "View in source") Projects each notification of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. @@ -11,7 +11,7 @@ Projects each notification of an observable sequence to an observable sequence a 2. `onError` *(`Function`)*: A transform function to apply when an error occurs in the source sequence. 3. `onCompleted` *(`Function`)*: A transform function to apply when the end of the source sequence is reached. 4. `[thisArg]` *(`Any`)*: Object to use as `this` when executing the transform functions. - + #### Returns *(`Observable`)*: An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence. @@ -34,16 +34,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 2 -// => Next: 3 -// => Next: 3 -// => Completed +// => Next: 2 +// => Next: 3 +// => Next: 3 +// => Completed ``` ### Location diff --git a/doc/api/core/operators/for.md b/doc/api/core/operators/for.md index e5349c5b9..6addc2b8a 100644 --- a/doc/api/core/operators/for.md +++ b/doc/api/core/operators/for.md @@ -1,5 +1,5 @@ ### `Rx.Observable.for(sources, resultSelector)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/for.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/for.js "View in source") Concatenates the observable sequences or Promises obtained by running the specified result selector for each element in source. There is an alias for this method called `forIn` for browsers Next: 1 @@ -52,10 +52,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 @@ -75,7 +75,7 @@ Dist: - [`rx.experimental.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.experimental.js) Prerequisites: -- If using `rx.expermental.js` +- If using `rx.expermental.js` - [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) | [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) | [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) | [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) NPM Packages: diff --git a/doc/api/core/operators/forkjoin.md b/doc/api/core/operators/forkjoin.md index e590a54db..2683ed43a 100644 --- a/doc/api/core/operators/forkjoin.md +++ b/doc/api/core/operators/forkjoin.md @@ -1,5 +1,5 @@ ### `Rx.Observable.forkJoin(...args)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/forkjoin.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/forkjoin.js "View in source") Runs all observable sequences in parallel and collect their last elements. @@ -24,10 +24,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: [42, 9, 3, 56] @@ -55,4 +55,4 @@ NuGet Packages: - [`RxJS-Experimental`](http://www.nuget.org/packages/RxJS-Experimental) Unit Tests: -- [`/tests/observable/forkjoin.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/forkjoin.js) \ No newline at end of file +- [`/tests/observable/forkjoin.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/forkjoin.js) diff --git a/doc/api/core/operators/forkjoinproto.md b/doc/api/core/operators/forkjoinproto.md index 38e054150..7c1685deb 100644 --- a/doc/api/core/operators/forkjoinproto.md +++ b/doc/api/core/operators/forkjoinproto.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.forkJoin(second, resultSelector)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/forkjoinproto.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/forkjoinproto.js "View in source") Runs two observable sequences in parallel and combines their last elements. @@ -8,7 +8,7 @@ Runs two observable sequences in parallel and combines their last elements. 2. `resultSelector` *(`Any`)*: The default value if no such element exists. If not specified, defaults to null. #### Returns -*(`Observable`)*: An observable sequence that contains elements from the input sequence that satisfy the condition. +*(`Observable`)*: An observable sequence that contains elements from the input sequence that satisfy the condition. #### Example ```js @@ -16,7 +16,7 @@ var source1 = Rx.Observable.return(42); var source2 = Rx.Observable.range(0, 3); var source = source1.forkJoin(source2, function (s1, s2) { - return s1 + s2; + return s1 + s2; }); var subscription = source.subscribe( @@ -24,10 +24,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 44 @@ -55,4 +55,4 @@ NuGet Packages: - [`RxJS-Experimental`](http://www.nuget.org/packages/RxJS-Experimental) Unit Tests: -- [`/tests/observable/forkjoinproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/forkjoinproto.js) \ No newline at end of file +- [`/tests/observable/forkjoinproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/forkjoinproto.js) diff --git a/doc/api/core/operators/from.md b/doc/api/core/operators/from.md index 587b9f41b..493914ebc 100644 --- a/doc/api/core/operators/from.md +++ b/doc/api/core/operators/from.md @@ -1,5 +1,5 @@ ### `Rx.Observable.from(iterable, [mapFn], [thisArg], [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/from.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/from.js "View in source") This method creates a new Observable sequence from an array-like or iterable object. @@ -24,16 +24,16 @@ f(1, 2, 3).subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 // => Next: 2 // => Next: 3 -// => Completed +// => Completed // Any iterable object... // Set @@ -43,16 +43,15 @@ Rx.Observable.from(s).subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); - }); + console.log('Completed'); + }); // => Next: foo // => Next: window // => Completed - // Map var m = new Map([[1, 2], [2, 4], [4, 8]]); Rx.Observable.from(m).subscribe( @@ -60,16 +59,15 @@ Rx.Observable.from(m).subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); - }); -// => Next: [1, 2] + console.log('Completed'); + }); +// => Next: [1, 2] // => Next: [2, 4] // => Next: [4, 8] -// => Completed - +// => Completed // String Rx.Observable.from("foo").subscribe( @@ -77,16 +75,15 @@ Rx.Observable.from("foo").subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); - }); -// => Next: f + console.log('Completed'); + }); +// => Next: f // => Next: o // => Next: o -// => Completed - +// => Completed // Using an arrow function as the map function to // manipulate the elements @@ -95,16 +92,15 @@ Rx.Observable.from([1, 2, 3], function (x) { return x + x; }).subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 2 +// => Next: 2 // => Next: 4 // => Next: 6 -// => Completed - +// => Completed // Generate a sequence of numbers Rx.Observable.from({length: 5}, function(v, k) { return k; }).subscribe( @@ -112,17 +108,17 @@ Rx.Observable.from({length: 5}, function(v, k) { return k; }).subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0 +// => Next: 0 // => Next: 1 // => Next: 2 // => Next: 3 // => Next: 4 -// => Completed +// => Completed ``` ### Location @@ -150,4 +146,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/from.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/from.js) \ No newline at end of file +- [`/tests/observable/from.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/from.js) diff --git a/doc/api/core/operators/fromarray.md b/doc/api/core/operators/fromarray.md index 513d91b2b..9dd3a0f3c 100644 --- a/doc/api/core/operators/fromarray.md +++ b/doc/api/core/operators/fromarray.md @@ -1,5 +1,5 @@ ### `Rx.Observable.fromArray(array, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/fromarray.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/fromarray.js "View in source") Converts an array to an observable sequence, using an optional scheduler to enumerate the array. @@ -21,10 +21,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 @@ -58,4 +58,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/fromarray.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/fromarray.js) \ No newline at end of file +- [`/tests/observable/fromarray.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/fromarray.js) diff --git a/doc/api/core/operators/fromcallback.md b/doc/api/core/operators/fromcallback.md index d6a06a29e..4a8aa0e43 100644 --- a/doc/api/core/operators/fromcallback.md +++ b/doc/api/core/operators/fromcallback.md @@ -1,7 +1,7 @@ -### `Rx.Observable.fromCallback(func, [context], [selector])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/fromcallback.js "View in source") +### `Rx.Observable.fromCallback(func, [context], [selector])` +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/fromcallback.js "View in source") -Converts a callback function to an observable sequence. +Converts a callback function to an observable sequence. #### Arguments 1. `func` *(`Function`)*: Function with a callback as the last parameter to convert to an Observable sequence. @@ -27,10 +27,10 @@ var subscription = source.subscribe( console.log('Next: ' + result); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: true @@ -64,4 +64,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/fromcallback.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/fromcallback.js) \ No newline at end of file +- [/tests/observable/fromcallback.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/fromcallback.js) diff --git a/doc/api/core/operators/fromevent.md b/doc/api/core/operators/fromevent.md index 0f1832c6d..c11155444 100644 --- a/doc/api/core/operators/fromevent.md +++ b/doc/api/core/operators/fromevent.md @@ -1,5 +1,5 @@ ### `Rx.Observable.fromEvent(element, eventName, [selector])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/fromevent.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/fromevent.js "View in source") Creates an observable sequence by adding an event listener to the matching DOMElement, jQuery element, Zepto Element, Angular element, Ember.js element or EventEmitter. @@ -27,10 +27,10 @@ var subscription = source.subscribe( console.log('Next: Clicked!'); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); input.trigger('click'); @@ -48,7 +48,7 @@ var eventEmitter = new EventEmitter(); var source = Rx.Observable.fromEvent( eventEmitter, - 'data', + 'data', function (args) { return { foo: args[0], bar: args[1] }; }); @@ -58,10 +58,10 @@ var subscription = source.subscribe( console.log('Next: foo -' x.foo + ', bar -' + x.bar); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); eventEmitter.emit('data', 'baz', 'quux'); diff --git a/doc/api/core/operators/fromeventpattern.md b/doc/api/core/operators/fromeventpattern.md index dd1fddebe..a756853f9 100644 --- a/doc/api/core/operators/fromeventpattern.md +++ b/doc/api/core/operators/fromeventpattern.md @@ -1,5 +1,5 @@ ### `Rx.Observable.fromEventPattern(addHandler, removeHandler, [selector])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/fromeventpattern.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/fromeventpattern.js "View in source") Creates an observable sequence by using the addHandler and removeHandler functions to add and remove the handlers, with an optional selector function to project the event arguments. @@ -32,10 +32,10 @@ var subscription = source.subscribe( console.log('Next: Clicked!'); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); input.trigger('click'); @@ -64,10 +64,10 @@ require(['dojo/on', 'dojo/dom', 'rx', 'rx.async', 'rx.binding'], function (on, d console.log('Next: Clicked!'); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); on.emit(input, 'click'); @@ -101,13 +101,12 @@ var subscription = source.subscribe( console.log('Next: ' + result); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); - e.emit('data', 'foo', 'bar'); // => Next: foo,bar ``` diff --git a/doc/api/core/operators/fromnodecallback.md b/doc/api/core/operators/fromnodecallback.md index 1b613880b..445dac92f 100644 --- a/doc/api/core/operators/fromnodecallback.md +++ b/doc/api/core/operators/fromnodecallback.md @@ -1,5 +1,5 @@ ### `Rx.Observable.fromNodeCallback(func, [context], [selector])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/fromnodecallback.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/fromnodecallback.js "View in source") Converts a Node.js callback style function to an observable sequence. This must be in function (err, ...) format. @@ -28,10 +28,10 @@ var subscription = source.subscribe( console.log('Next: success!'); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: success! @@ -63,4 +63,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/fromnodecallback.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/fromnodecallback.js) \ No newline at end of file +- [/tests/observable/fromnodecallback.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/fromnodecallback.js) diff --git a/doc/api/core/operators/frompromise.md b/doc/api/core/operators/frompromise.md index b8159f3ab..ee3e9d913 100644 --- a/doc/api/core/operators/frompromise.md +++ b/doc/api/core/operators/frompromise.md @@ -1,5 +1,5 @@ ### `Rx.Observable.fromPromise(promise)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/frompromise.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/frompromise.js "View in source") Converts a Promises/A+ spec compliant Promise and/or ES6 compliant Promise to an Observable sequence. @@ -24,10 +24,10 @@ var subscription1 = source1.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 @@ -45,10 +45,10 @@ var subscription2 = source2.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Error: Error: reject diff --git a/doc/api/core/operators/generate.md b/doc/api/core/operators/generate.md index 072678630..74874959f 100644 --- a/doc/api/core/operators/generate.md +++ b/doc/api/core/operators/generate.md @@ -1,5 +1,5 @@ ### `Rx.Observable.generate(initialState, condition, iterate, resultSelector, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/generate.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/generate.js "View in source") Converts an array to an observable sequence, using an optional scheduler to enumerate the array. @@ -27,10 +27,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 @@ -61,4 +61,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/generate.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/generate.js) \ No newline at end of file +- [/tests/observable/generate.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/generate.js) diff --git a/doc/api/core/operators/generatewithabsolutetime.md b/doc/api/core/operators/generatewithabsolutetime.md index 1865c6d4b..6679196dd 100644 --- a/doc/api/core/operators/generatewithabsolutetime.md +++ b/doc/api/core/operators/generatewithabsolutetime.md @@ -1,5 +1,5 @@ ### `Rx.Observable.generateWithAbsoluteTime(initialState, condition, iterate, resultSelector, timeSelector, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/generatewithabsolutetime.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/generatewithabsolutetime.js "View in source") Generates an observable sequence by iterating a state from an initial state until the condition fails. @@ -16,7 +16,7 @@ Generates an observable sequence by iterating a state from an initial state unti #### Example ```js -// Generate a value with an absolute time with an offset of 100ms multipled by value +// Generate a value with an absolute time with an offset of 100ms multipled by value var source = Rx.Observable.generate( 1, function (x) { return x < 4; }, @@ -30,10 +30,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: {value: 1, interval: 100} @@ -62,4 +62,4 @@ NuGet Packages: - [`RxJS-Time`](https://www.npmjs.org/package/RxJS-Time) Unit Tests: -- [/tests/observable/generatewithabsolutetime.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/generatewithabsolutetime.js) \ No newline at end of file +- [/tests/observable/generatewithabsolutetime.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/generatewithabsolutetime.js) diff --git a/doc/api/core/operators/generatewithrelativetime.md b/doc/api/core/operators/generatewithrelativetime.md index 7fec15aa5..0cc66db07 100644 --- a/doc/api/core/operators/generatewithrelativetime.md +++ b/doc/api/core/operators/generatewithrelativetime.md @@ -1,5 +1,5 @@ ### `Rx.Observable.generateWithRelativeTime(initialState, condition, iterate, resultSelector, timeSelector, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/generatewithrelativetime.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/generatewithrelativetime.js "View in source") Generates an observable sequence by iterating a state from an initial state until the condition fails. @@ -16,7 +16,7 @@ Generates an observable sequence by iterating a state from an initial state unti #### Example ```js -// Generate a value with an absolute time with an offset of 100ms multipled by value +// Generate a value with an absolute time with an offset of 100ms multipled by value var source = Rx.Observable.generateWithRelativeTime( 1, function (x) { return x < 4; }, @@ -30,10 +30,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: {value: 1, interval: 100} @@ -55,7 +55,7 @@ Dist: Prerequisites: - if `rx.time.js` - [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) | [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) -- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.lite.js) | [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.lite.compat.js) +- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.lite.js) | [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.lite.compat.js) NPM Packages: - [`rx`](https://www.npmjs.org/package/rx) diff --git a/doc/api/core/operators/groupby.md b/doc/api/core/operators/groupby.md index a84645114..14c9ef5a5 100644 --- a/doc/api/core/operators/groupby.md +++ b/doc/api/core/operators/groupby.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.groupBy(keySelector, [elementSelector], [comparer])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/groupby.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/groupby.js "View in source") Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function. @@ -9,7 +9,7 @@ Groups the elements of an observable sequence according to a specified key selec 3. `[comparer]` *(`Any`)*: Used to compare objects. If not specified, the default comparer is used. #### Returns -*(`Observable`)*: A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. +*(`Observable`)*: A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. #### Example ```js @@ -34,24 +34,24 @@ var source = Rx.Observable.fromArray(codes) var subscription = source.subscribe( function (obs) { // Print the count - obs.count().subscribe(function (x) { - console.log('Count: ' + x); + obs.count().subscribe(function (x) { + console.log('Count: ' + x); }); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Count: 2 -// => Count: 2 -// => Count: 2 -// => Count: 2 -// => Count: 1 -// => Count: 1 -// => Completed +// => Count: 2 +// => Count: 2 +// => Count: 2 +// => Count: 2 +// => Count: 1 +// => Count: 1 +// => Completed ``` ### Location @@ -72,4 +72,4 @@ NuGet Packages: - [`RxJS-Coincidence`](http://www.nuget.org/packages/RxJS-Coincidence/) Unit Tests: -- [`/tests/observable/groupby.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/groupby.js) \ No newline at end of file +- [`/tests/observable/groupby.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/groupby.js) diff --git a/doc/api/core/operators/groupbyuntil.md b/doc/api/core/operators/groupbyuntil.md index 624f00633..d8ecce81f 100644 --- a/doc/api/core/operators/groupbyuntil.md +++ b/doc/api/core/operators/groupbyuntil.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.groupByUntil(keySelector, [elementSelector], durationSelector, [comparer])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/groupbyuntil.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/groupbyuntil.js "View in source") Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function. @@ -10,7 +10,7 @@ Groups the elements of an observable sequence according to a specified key selec 4. `[comparer]` *(`Any`)*: Used to compare objects. If not specified, the default comparer is used. #### Returns -*(`Observable`)*: A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. +*(`Observable`)*: A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. If a group's lifetime expires, a new group with the same key value can be created once an element with such a key value is encoutered. @@ -42,21 +42,21 @@ var subscription = source.subscribe( obs.count().subscribe(function (x) { console.log('Count: ' + x); }); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Count: 2 -// => Count: 2 -// => Count: 1 -// => Count: 1 -// => Count: 1 -// => Count: 1 -// => Count: 1 -// => Count: 1 -// => Completed +// => Count: 2 +// => Count: 2 +// => Count: 1 +// => Count: 1 +// => Count: 1 +// => Count: 1 +// => Count: 1 +// => Count: 1 +// => Completed ``` ### Location @@ -77,4 +77,4 @@ NuGet Packages: - [`RxJS-Coincidence`](http://www.nuget.org/packages/RxJS-Coincidence/) Unit Tests: -- [`/tests/observable/groupby.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/groupby.js) \ No newline at end of file +- [`/tests/observable/groupby.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/groupby.js) diff --git a/doc/api/core/operators/groupjoin.md b/doc/api/core/operators/groupjoin.md index 75dd26482..41fadf101 100644 --- a/doc/api/core/operators/groupjoin.md +++ b/doc/api/core/operators/groupjoin.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.groupJoin(right, leftDurationSelector, rightDurationSelector, resultSelector)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/groupjoin.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/groupjoin.js "View in source") Correlates the elements of two sequences based on overlapping durations, and groups the results. @@ -8,7 +8,7 @@ Correlates the elements of two sequences based on overlapping durations, and gro 2. `leftDurationSelector` *(`Function`)*: A function to select the duration (expressed as an observable sequence) of each element of the left observable sequence, used to determine overlap. 3. `rightDurationSelector` *(`Function`)*: A function to select the duration (expressed as an observable sequence) of each element of the right observable sequence, used to determine overlap. 4. `resultSelector` *(`Any`)*: A function invoked to compute a result element for any element of the left sequence with overlapping elements from the right observable sequence. It has the following arguments - 1. *(`Any`)* An element of the left sequence. + 1. *(`Any`)* An element of the left sequence. 2. *(`Observable`)* An observable sequence with elements from the right sequence that overlap with the left sequence's element. #### Returns @@ -26,9 +26,9 @@ var source = xs.groupJoin( ys, function () { return Rx.Observable.timer(0); }, function () { return Rx.Observable.timer(0); }, - function (x, yy) { - return yy.select(function (y) { - return x + y; + function (x, yy) { + return yy.select(function (y) { + return x + y; }) }).mergeAll().take(5); @@ -37,18 +37,18 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: first0second0 -// => Next: first1second1 -// => Next: first2second2 -// => Next: first3second3 -// => Next: first4second4 -// => Completed +// => Next: first0second0 +// => Next: first1second1 +// => Next: first2second2 +// => Next: first3second3 +// => Next: first4second4 +// => Completed ``` ### Location @@ -69,4 +69,4 @@ NuGet Packages: - [`RxJS-Coincidence`](http://www.nuget.org/packages/RxJS-Coincidence/) Unit Tests: -- [`/tests/observable/groupjoin.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/groupjoin.js) \ No newline at end of file +- [`/tests/observable/groupjoin.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/groupjoin.js) diff --git a/doc/api/core/operators/if.md b/doc/api/core/operators/if.md index 1844c2bab..c17014f60 100644 --- a/doc/api/core/operators/if.md +++ b/doc/api/core/operators/if.md @@ -1,6 +1,6 @@ ### `Rx.Observable.if(condition, thenSource, [elseSource])` ### `Rx.Observable.ifThen(condition, thenSource, [elseSource])` *DEPRECATED* -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/if.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/if.js "View in source") Determines whether an observable collection contains values. There is an alias for this method called `ifThen` for browsers Next: 42 @@ -50,10 +50,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 56 @@ -79,4 +79,4 @@ NuGet Packages: - [`RxJS-Experimental`](http://www.nuget.org/packages/RxJS-Experimental) Unit Tests: -- [/tests/observable/if.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/if.js) \ No newline at end of file +- [/tests/observable/if.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/if.js) diff --git a/doc/api/core/operators/ignoreelements.md b/doc/api/core/operators/ignoreelements.md index 51e0b6d69..e7f9e90af 100644 --- a/doc/api/core/operators/ignoreelements.md +++ b/doc/api/core/operators/ignoreelements.md @@ -1,10 +1,10 @@ ### `Rx.Observable.prototype.ignoreElements()` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/ignoreelements.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/ignoreelements.js "View in source") Ignores all elements in an observable sequence leaving only the termination messages. #### Returns -*(`Observable`)*: An empty observable sequence that signals termination, successful or exceptional, of the source sequence. +*(`Observable`)*: An empty observable sequence that signals termination, successful or exceptional, of the source sequence. #### Example ```js @@ -16,10 +16,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Completed @@ -47,4 +47,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/ignoreelements.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/ignoreelements.js) \ No newline at end of file +- [`/tests/observable/ignoreelements.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/ignoreelements.js) diff --git a/doc/api/core/operators/interval.md b/doc/api/core/operators/interval.md index 962258b2e..0dbad6d29 100644 --- a/doc/api/core/operators/interval.md +++ b/doc/api/core/operators/interval.md @@ -1,5 +1,5 @@ ### `Rx.Observable.interval(period, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/interval.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/interval.js "View in source") Returns an observable sequence that produces a value after each period. @@ -22,15 +22,15 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: {value: 0, interval: 500} // => Next: {value: 1, interval: 500} -// => Next: {value: 2, interval: 500} +// => Next: {value: 2, interval: 500} // => Completed ``` @@ -58,4 +58,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/interval.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/interval.js) \ No newline at end of file +- [/tests/observable/interval.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/interval.js) diff --git a/doc/api/core/operators/isempty.md b/doc/api/core/operators/isempty.md index b012f0adf..b3c67db1d 100644 --- a/doc/api/core/operators/isempty.md +++ b/doc/api/core/operators/isempty.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.isEmpty()` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/isempty.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/isempty.js "View in source") Determines whether an observable sequence is empty. @@ -17,14 +17,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: false -// => Completed +// => Completed /* Empty */ var source = Rx.Observable.empty() @@ -35,14 +35,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: true -// => Completed +// => Completed ``` ### Location @@ -66,4 +66,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/isempty.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/isempty.js) \ No newline at end of file +- [`/tests/observable/isempty.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/isempty.js) diff --git a/doc/api/core/operators/join.md b/doc/api/core/operators/join.md index 569081a88..458b76331 100644 --- a/doc/api/core/operators/join.md +++ b/doc/api/core/operators/join.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.join(right, leftDurationSelector, rightDurationSelector, resultSelector)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/join.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/join.js "View in source") Correlates the elements of two sequences based on overlapping durations. @@ -13,7 +13,7 @@ Correlates the elements of two sequences based on overlapping durations. #### Returns *(`Observable`)*: An observable sequence that contains result elements computed from source elements that have an overlapping duration. - + #### Example ```js var xs = Rx.Observable.interval(100) @@ -36,18 +36,18 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: first0second0 -// => Next: first1second1 -// => Next: first2second2 -// => Next: first3second3 -// => Next: first4second4 -// => Completed +// => Next: first0second0 +// => Next: first1second1 +// => Next: first2second2 +// => Next: first3second3 +// => Next: first4second4 +// => Completed ``` ### Location @@ -68,4 +68,4 @@ NuGet Packages: - [`RxJS-Coincidence`](http://www.nuget.org/packages/RxJS-Coincidence/) Unit Tests: -- [`/tests/observable/join.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/join.js) \ No newline at end of file +- [`/tests/observable/join.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/join.js) diff --git a/doc/api/core/operators/last.md b/doc/api/core/operators/last.md index 9ae355df0..6a7037770 100644 --- a/doc/api/core/operators/last.md +++ b/doc/api/core/operators/last.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.last([predicate], [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/last.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/last.js "View in source") Returns the last element of an observable sequence that satisfies the condition in the predicate if specified, else the last element. @@ -24,10 +24,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Error: Error: Sequence contains no elements. @@ -41,14 +41,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 9 -// => Completed +// => Completed /* With predicate */ var source = Rx.Observable.range(0, 10) @@ -61,14 +61,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 8 -// => Completed +// => Completed ``` ### Location @@ -92,4 +92,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/last.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/last.js) \ No newline at end of file +- [`/tests/observable/last.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/last.js) diff --git a/doc/api/core/operators/lastordefault.md b/doc/api/core/operators/lastordefault.md index 263399fda..14dc0eb63 100644 --- a/doc/api/core/operators/lastordefault.md +++ b/doc/api/core/operators/lastordefault.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.lastOrDefault([predicate], [defaultValue], [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/lastordefault.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/lastordefault.js "View in source") Returns the last element of an observable sequence that satisfies the condition in the predicate if specified, else the last element. @@ -25,10 +25,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 @@ -43,14 +43,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 9 -// => Completed +// => Completed /* With predicate */ var source = Rx.Observable.range(0, 10) @@ -63,14 +63,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 8 -// => Completed +// => Completed ``` ### Location @@ -94,4 +94,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/lastordefault.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/lastordefault.js) \ No newline at end of file +- [`/tests/observable/lastordefault.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/lastordefault.js) diff --git a/doc/api/core/operators/let.md b/doc/api/core/operators/let.md index b25bf25be..7b65a9f1c 100644 --- a/doc/api/core/operators/let.md +++ b/doc/api/core/operators/let.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.let(func)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/let.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/let.js "View in source") Returns an observable sequence that is the result of invoking the selector on the source sequence, without sharing subscriptions. @@ -22,10 +22,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); var subscription = source.subscribe( @@ -33,19 +33,19 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 1 -// => Next: 2 -// => Next: 3 -// => Next: 1 -// => Next: 2 -// => Next: 3 -// => Completed +// => Next: 1 +// => Next: 2 +// => Next: 3 +// => Next: 1 +// => Next: 2 +// => Next: 3 +// => Completed ``` ### Location @@ -69,4 +69,4 @@ NuGet Packages: - [`RxJS-Experimental`](http://www.nuget.org/packages/RxJS-Experimental) Unit Tests: -- [`/tests/observable/let.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/let.js) \ No newline at end of file +- [`/tests/observable/let.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/let.js) diff --git a/doc/api/core/operators/manyselect.md b/doc/api/core/operators/manyselect.md index a81b4a6e2..2212ec6bc 100644 --- a/doc/api/core/operators/manyselect.md +++ b/doc/api/core/operators/manyselect.md @@ -1,12 +1,12 @@ ### `Rx.Observable.prototype.manySelect(selector, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/manyselect.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/manyselect.js "View in source") Comonadic bind operator. #### Arguments 1. `selector` *(`Function`)*: A transform function to apply to each element. 2. `[scheduler=Rx.Scheduler.immediate]` *(`Scheduler`)*: Scheduler used to execute the operation. If not specified, defaults to the `Rx.Scheduler.immediate` scheduler. - + #### Returns *(`Observable`)*: An observable sequence which results from the comonadic bind operation. @@ -21,16 +21,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 // => Next: 1 // => Next: 2 -// => Completed +// => Completed ``` ### Location @@ -54,4 +54,4 @@ NuGet Packages: - [`RxJS-Experimental`](http://www.nuget.org/packages/RxJS-Experimental) Unit Tests: -- [`/tests/observable/manyselect.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/manyselect.js) \ No newline at end of file +- [`/tests/observable/manyselect.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/manyselect.js) diff --git a/doc/api/core/operators/max.md b/doc/api/core/operators/max.md index 3f3e04a28..74e3d1a8b 100644 --- a/doc/api/core/operators/max.md +++ b/doc/api/core/operators/max.md @@ -1,11 +1,11 @@ ### `Rx.Observable.prototype.max([comparer])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/max.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/max.js "View in source") Returns the maximum value in an observable sequence according to the specified comparer. #### Arguments 1. `[comparer]` *(`Function`)*: Comparer used to compare elements. - + #### Returns *(`Observable`)*: An observable sequence containing a single element with the maximum element in the source sequence. @@ -20,14 +20,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 9 -// => Completed +// => Completed /* With a comparer */ function comparer (x, y) { @@ -47,14 +47,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 9 -// => Completed +// => Completed ``` ### Location @@ -78,4 +78,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/max.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/max.js) \ No newline at end of file +- [`/tests/observable/max.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/max.js) diff --git a/doc/api/core/operators/maxby.md b/doc/api/core/operators/maxby.md index b3a147ed2..abe3590c5 100644 --- a/doc/api/core/operators/maxby.md +++ b/doc/api/core/operators/maxby.md @@ -1,15 +1,15 @@ ### `Rx.Observable.prototype.maxBy(keySelector, [comparer])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/maxby.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/maxby.js "View in source") Returns the maximum value in an observable sequence according to the specified comparer. #### Arguments 1. `keySelector` *(`Function`)*: Key selector function. 2. `[comparer]` *(`Function`)*: Comparer used to compare elements. - + #### Returns *(`Observable`)*: An observable sequence containing a list of zero or more elements that have a maximum key value. - + #### Example ```js /* Without comparer */ @@ -21,14 +21,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 9,9 -// => Completed +// => Completed ``` ### Location @@ -52,4 +52,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/maxby.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/maxby.js) \ No newline at end of file +- [`/tests/observable/maxby.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/maxby.js) diff --git a/doc/api/core/operators/merge.md b/doc/api/core/operators/merge.md index aff262829..7622df680 100644 --- a/doc/api/core/operators/merge.md +++ b/doc/api/core/operators/merge.md @@ -1,7 +1,7 @@ ### `Rx.Observable.merge([scheduler], ...args)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/merge.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/merge.js "View in source") -Merges all the observable sequences and Promises into a single observable sequence. +Merges all the observable sequences and Promises into a single observable sequence. #### Arguments 1. `[scheduler]` *(Scheduler=Rx.Scheduler.timeout)*: Scheduler to run the timer on. If not specified, Rx.Scheduler.immediate is used. @@ -23,23 +23,22 @@ var source = Rx.Observable.merge( source1, source2); - var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 100 // => Next: 150 // => Next: 100 // => Next: 150 -// => Next: 100 +// => Next: 100 // => Completed ``` @@ -66,4 +65,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/merge.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/merge.js) \ No newline at end of file +- [/tests/observable/merge.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/merge.js) diff --git a/doc/api/core/operators/mergeall.md b/doc/api/core/operators/mergeall.md index 4cb518e64..ca95ac06c 100644 --- a/doc/api/core/operators/mergeall.md +++ b/doc/api/core/operators/mergeall.md @@ -1,12 +1,12 @@ ### `Rx.Observable.prototype.mergeAll()` ### `Rx.Observable.prototype.mergeObservable()` *DEPRECATED* -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/mergeobservable.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/mergeobservable.js "View in source") Merges an observable sequence of observable sequences into an observable sequence. #### Returns -*(`Observable`)*: The observable sequence that merges the elements of the inner sequences. - +*(`Observable`)*: The observable sequence that merges the elements of the inner sequences. + #### Example ```js var source = Rx.Observable.range(0, 3) @@ -18,22 +18,22 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0 -// => Next: 1 -// => Next: 1 -// => Next: 2 -// => Next: 2 -// => Next: 2 -// => Next: 3 -// => Next: 3 -// => Next: 4 -// => Completed +// => Next: 0 +// => Next: 1 +// => Next: 1 +// => Next: 2 +// => Next: 2 +// => Next: 2 +// => Next: 3 +// => Next: 3 +// => Next: 4 +// => Completed ``` ### Location @@ -61,4 +61,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/mergeobservable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/mergeobservable.js) \ No newline at end of file +- [`/tests/observable/mergeobservable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/mergeobservable.js) diff --git a/doc/api/core/operators/mergeproto.md b/doc/api/core/operators/mergeproto.md index 71d8a3991..f78823327 100644 --- a/doc/api/core/operators/mergeproto.md +++ b/doc/api/core/operators/mergeproto.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.merge(maxConcurrent | other)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/mergeproto.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/mergeproto.js "View in source") Merges an observable sequence of observable sequences into an observable sequence, limiting the number of concurrent subscriptions to inner sequences. Or merges two observable sequences into a single observable sequence. @@ -7,10 +7,10 @@ Or merges two observable sequences into a single observable sequence. #### Arguments 1. `maxConcurrent` *(`Function`)*: Maximum number of inner observable sequences being subscribed to concurrently. 1. `other` *(`Observable`)*: The second observable sequence to merge into the first. - + #### Returns -*(`Observable`)*: The observable sequence that merges the elements of the inner sequences. - +*(`Observable`)*: The observable sequence that merges the elements of the inner sequences. + #### Example ```js /* Merge two sequences */ @@ -29,18 +29,18 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: Second: 0 -// => Next: First: 0 -// => Next: Second: 1 -// => Next: Second: 2 -// => Next: First: 1 -// => Completed +// => Next: Second: 0 +// => Next: First: 0 +// => Next: Second: 1 +// => Next: Second: 2 +// => Next: First: 1 +// => Completed /* Use max concurrency */ var source = Rx.Observable.range(0, 3) @@ -52,22 +52,22 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0 -// => Next: 1 -// => Next: 2 -// => Next: 1 -// => Next: 2 -// => Next: 3 -// => Next: 2 -// => Next: 3 -// => Next: 4 -// => Completed +// => Next: 0 +// => Next: 1 +// => Next: 2 +// => Next: 1 +// => Next: 2 +// => Next: 3 +// => Next: 2 +// => Next: 3 +// => Next: 4 +// => Completed ``` ### Location @@ -97,4 +97,4 @@ NuGet Packages: Unit Tests: - [`/tests/observable/mergeproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/mergeproto.js) -* * * \ No newline at end of file +* * * diff --git a/doc/api/core/operators/min.md b/doc/api/core/operators/min.md index cd8f85e2b..01f16f2c7 100644 --- a/doc/api/core/operators/min.md +++ b/doc/api/core/operators/min.md @@ -1,14 +1,14 @@ ### `Rx.Observable.prototype.min([comparer])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/min.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/min.js "View in source") Returns the minimum element in an observable sequence according to the optional comparer else a default greater than less than check. #### Arguments 1. `[comparer]` *(`Function`)*: Comparer used to compare elements. - + #### Returns *(`Observable`)*: An observable sequence containing a single element with the minimum element in the source sequence. - + #### Example ```js /* Without comparer */ @@ -20,14 +20,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 -// => Completed +// => Completed /* With a comparer */ function comparer (x, y) { @@ -47,14 +47,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 -// => Completed +// => Completed ``` ### Location @@ -78,4 +78,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/min.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/min.js) \ No newline at end of file +- [`/tests/observable/min.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/min.js) diff --git a/doc/api/core/operators/minby.md b/doc/api/core/operators/minby.md index f55632f78..7f373c20f 100644 --- a/doc/api/core/operators/minby.md +++ b/doc/api/core/operators/minby.md @@ -1,12 +1,12 @@ ### `Rx.Observable.prototype.minBy(keySelector, [comparer])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/minby.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/minby.js "View in source") Returns the elements in an observable sequence with the minimum key value according to the specified comparer. #### Arguments 1. `keySelector` *(`Function`)*: Key selector function. 2. `[comparer]` *(`Function`)*: Comparer used to compare elements. - + #### Returns *(`Observable`)*: An observable sequence containing a list of zero or more elements that have a minimum key value. @@ -21,14 +21,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1,1 -// => Completed +// => Completed ``` ### Location @@ -52,4 +52,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/minby.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/minby.js) \ No newline at end of file +- [`/tests/observable/minby.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/minby.js) diff --git a/doc/api/core/operators/multicast.md b/doc/api/core/operators/multicast.md index b309581aa..846b4af23 100644 --- a/doc/api/core/operators/multicast.md +++ b/doc/api/core/operators/multicast.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.multicast(subject | subjectSelector, [selector])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/multicast.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/multicast.js "View in source") Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. Each subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's @@ -12,22 +12,22 @@ invocation. For specializations with fixed subject types, see `publish`, `share` #### Returns *(`Observable`)*: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. - + #### Example ```js var subject = new Rx.Subject(); var source = Rx.Observable.range(0, 3) .multicast(subject); -var observer = Rx.Observer.create( +var observer = Rx.Observer.create( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); } ); @@ -38,13 +38,13 @@ var connected = source.connect(); subscription.dispose(); -// => Next: 0 -// => Next: 0 -// => Next: 1 -// => Next: 1 -// => Next: 2 -// => Next: 2 -// => Completed +// => Next: 0 +// => Next: 0 +// => Next: 1 +// => Next: 1 +// => Next: 2 +// => Next: 2 +// => Completed ``` ### Location @@ -56,7 +56,7 @@ Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) - [`rx.binding.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.binding.js) -- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) +- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) Prerequisites: @@ -72,4 +72,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/multicast.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/multicast.js) \ No newline at end of file +- [`/tests/observable/multicast.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/multicast.js) diff --git a/doc/api/core/operators/never.md b/doc/api/core/operators/never.md index ef518ef48..da60f16ac 100644 --- a/doc/api/core/operators/never.md +++ b/doc/api/core/operators/never.md @@ -1,7 +1,7 @@ ### `Rx.Observable.never()` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/never.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/never.js "View in source") -Returns a non-terminating observable sequence, which can be used to denote an infinite duration (e.g. when using reactive joins). +Returns a non-terminating observable sequence, which can be used to denote an infinite duration (e.g. when using reactive joins). #### Returns *(`Observable`)*: An observable sequence whose observers will never get called. @@ -16,10 +16,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); ``` @@ -46,4 +46,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/never.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/never.js) \ No newline at end of file +- [/tests/observable/never.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/never.js) diff --git a/doc/api/core/operators/observeon.md b/doc/api/core/operators/observeon.md index 6ec593fc3..815c9e6d1 100644 --- a/doc/api/core/operators/observeon.md +++ b/doc/api/core/operators/observeon.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.observeOn(scheduler)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/observeon.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/observeon.js "View in source") Wraps the source sequence in order to run its observer callbacks on the specified scheduler. @@ -9,8 +9,8 @@ This only invokes observer callbacks on a scheduler. In case the subscription an 1. `scheduler` *(`Scheduler`)*: Scheduler to notify observers on. #### Returns -*(`Observable`)*: The source sequence whose observations happen on the specified scheduler. - +*(`Observable`)*: The source sequence whose observations happen on the specified scheduler. + #### Example ```js /* Change from immediate scheduler to timeout */ @@ -22,14 +22,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 -// => Completed +// => Completed ``` ### Location @@ -40,9 +40,9 @@ File: Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) -- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) +- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) - [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) -- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) +- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) Prerequisites: diff --git a/doc/api/core/operators/of.md b/doc/api/core/operators/of.md index 2d4d5faab..8d67e69ba 100644 --- a/doc/api/core/operators/of.md +++ b/doc/api/core/operators/of.md @@ -1,5 +1,5 @@ ### `Rx.Observable.of(...args)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/of.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/of.js "View in source") Converts arguments to an observable sequence. @@ -18,10 +18,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 @@ -57,4 +57,4 @@ NuGet Packages: Unit Tests: - [`/tests/observable/of.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/of.js) -* * * \ No newline at end of file +* * * diff --git a/doc/api/core/operators/ofwithscheduler.md b/doc/api/core/operators/ofwithscheduler.md index 047a4f226..2fa3a4058 100644 --- a/doc/api/core/operators/ofwithscheduler.md +++ b/doc/api/core/operators/ofwithscheduler.md @@ -1,5 +1,5 @@ ### `Rx.Observable.ofWithScheduler([scheduler], ...args)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/of.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/of.js "View in source") Converts arguments to an observable sequence, using an optional scheduler to enumerate the arguments. @@ -19,10 +19,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 diff --git a/doc/api/core/operators/onerrorresumenext.md b/doc/api/core/operators/onerrorresumenext.md index 3cfdf413e..bc438a866 100644 --- a/doc/api/core/operators/onerrorresumenext.md +++ b/doc/api/core/operators/onerrorresumenext.md @@ -1,5 +1,5 @@ ### `Rx.Observable.onErrorResumeNext(...args)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/onerrorresumenext.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/onerrorresumenext.js "View in source") Continues an observable sequence that is terminated normally or by an exception with the next observable sequence or Promise. @@ -7,7 +7,7 @@ Continues an observable sequence that is terminated normally or by an exception 1. `args` *(Array|arguments)*: Observable sequences to concatenate. #### Returns -*(`Observable`)*: An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally. +*(`Observable`)*: An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally. #### Example ```js @@ -22,14 +22,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/onerrorresumenextproto.md b/doc/api/core/operators/onerrorresumenextproto.md index a26ac437b..0528aa219 100644 --- a/doc/api/core/operators/onerrorresumenextproto.md +++ b/doc/api/core/operators/onerrorresumenextproto.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.onErrorResumeNext(second)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/onerrorresumenextproto.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/onerrorresumenextproto.js "View in source") Continues an observable sequence that is terminated normally or by an exception with the next observable sequence or Promise. @@ -19,14 +19,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 -// => Completed +// => Completed ``` ### Location @@ -37,7 +37,7 @@ File: Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) -- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) +- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) - [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) - [`rx.lite.extras.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.extras.js) diff --git a/doc/api/core/operators/pausable.md b/doc/api/core/operators/pausable.md index dfdc73ef0..2c73c2eec 100644 --- a/doc/api/core/operators/pausable.md +++ b/doc/api/core/operators/pausable.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.pausable(pauser)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/backpressure/pausable.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/backpressure/pausable.js "View in source") Pauses the underlying observable sequence based upon the observable sequence which yields true/false. Note that this only works on hot observables. @@ -13,16 +13,16 @@ Pauses the underlying observable sequence based upon the observable sequence whi ```js var pauser = new Rx.Subject(); var source = Rx.Observable.fromEvent(document, 'mousemove').pausable(pauser); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // To begin the flow @@ -58,4 +58,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/pausable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/pausable.js) \ No newline at end of file +- [`/tests/observable/pausable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/pausable.js) diff --git a/doc/api/core/operators/pausablebuffered.md b/doc/api/core/operators/pausablebuffered.md index 2757ffe08..1c7f9a0ef 100644 --- a/doc/api/core/operators/pausablebuffered.md +++ b/doc/api/core/operators/pausablebuffered.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.pausableBuffered(pauser)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/backpressure/pausablebuffered.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/backpressure/pausablebuffered.js "View in source") Pauses the underlying observable sequence based upon the observable sequence which yields true/false, and yields the values that were buffered while paused. Note that this only works on hot observables. @@ -13,16 +13,16 @@ Pauses the underlying observable sequence based upon the observable sequence whi ```js var pauser = new Rx.Subject(); var source = Rx.Observable.interval(1000).pausableBuffered(pauser); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // To begin the flow diff --git a/doc/api/core/operators/pluck.md b/doc/api/core/operators/pluck.md index af922d5c6..ba0de6b75 100644 --- a/doc/api/core/operators/pluck.md +++ b/doc/api/core/operators/pluck.md @@ -1,11 +1,11 @@ ### `Rx.Observable.prototype.pluck(property)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/pluck.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/pluck.js "View in source") Projects each element of an observable sequence into a new form by incorporating the element's index. This is an alias for the `select` method. #### Arguments 1. `property` *(`String`)*: The property to pluck. - + #### Returns *(`Observable`)*: Returns a new Observable sequence of property values. @@ -24,16 +24,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 // => Next: 1 // => Next: 2 -// => Completed +// => Completed ``` ### Location @@ -44,7 +44,7 @@ File: Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) -- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) +- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) - [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) - [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) @@ -61,4 +61,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/pluck.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/pluck.js) \ No newline at end of file +- [`/tests/observable/pluck.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/pluck.js) diff --git a/doc/api/core/operators/publish.md b/doc/api/core/operators/publish.md index 8440c8191..f73e572aa 100644 --- a/doc/api/core/operators/publish.md +++ b/doc/api/core/operators/publish.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.publish([selector])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/publish.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/publish.js "View in source") Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence. @@ -7,10 +7,10 @@ This operator is a specialization of `multicast` using a regular `Rx.Subject`. #### Arguments 1. `[selector]` *(`Function`)*: Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all notifications of the source from the time of the subscription on. - + #### Returns *(ConnectableObservable)*: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. - + #### Example ```js /* Without publish */ @@ -18,51 +18,51 @@ var interval = Rx.Observable.interval(1000); var source = interval .take(2) - .do(function (x) { + .do(function (x) { console.log('Side effect'); }); - + source.subscribe(createObserver('SourceA')); source.subscribe(createObserver('SourceB')); - + function createObserver(tag) { return Rx.Observer.create( function (x) { console.log('Next: ' + tag + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); } // => Side effect -// => Next: SourceA0 +// => Next: SourceA0 // => Side effect -// => Next: SourceB0 +// => Next: SourceB0 // => Side effect -// => Next: SourceA1 +// => Next: SourceA1 // => Completed // => Side effect -// => Next: SourceB1 -// => Completed +// => Next: SourceB1 +// => Completed /* With publish */ var interval = Rx.Observable.interval(1000); var source = interval .take(2) - .doAction(function (x) { + .doAction(function (x) { console.log('Side effect'); }); - + var published = source.publish(); - + published.subscribe(createObserver('SourceA')); published.subscribe(createObserver('SourceB')); - + var connection = published.connect(); function createObserver(tag) { @@ -71,20 +71,20 @@ function createObserver(tag) { console.log('Next: ' + tag + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); } -// => Side effect -// => Next: SourceA0 -// => Next: SourceB0 -// => Side effect -// => Next: SourceA1 +// => Side effect +// => Next: SourceA0 +// => Next: SourceB0 +// => Side effect +// => Next: SourceA1 // => Next: SourceB1 -// => Completed +// => Completed ``` ### Location @@ -96,7 +96,7 @@ Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) - [`rx.binding.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.binding.js) -- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) +- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) Prerequisites: diff --git a/doc/api/core/operators/publishlast.md b/doc/api/core/operators/publishlast.md index a16a0e7e6..cb4e5531b 100644 --- a/doc/api/core/operators/publishlast.md +++ b/doc/api/core/operators/publishlast.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.publishLast([selector])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/publishlast.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/publishlast.js "View in source") Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence containing only the last notification. @@ -10,22 +10,22 @@ This operator is a specialization of `multicast` using a `Rx.AsyncSubject`. #### Returns *(ConnectableObservable)*: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. - + #### Example ```js var interval = Rx.Observable.interval(1000); var source = interval .take(2) - .doAction(function (x) { + .doAction(function (x) { console.log('Side effect'); }); - + var published = source.publishLast(); - + published.subscribe(createObserver('SourceA')); published.subscribe(createObserver('SourceB')); - + var connection = published.connect(); function createObserver(tag) { @@ -34,19 +34,19 @@ function createObserver(tag) { console.log('Next: ' + tag + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); } // => Side effect // => Side effect -// => Next: SourceA1 +// => Next: SourceA1 +// => Completed +// => Next: SourceB1 // => Completed -// => Next: SourceB1 -// => Completed ``` ### Location @@ -58,7 +58,7 @@ Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) - [`rx.binding.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.binding.js) -- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) +- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) Prerequisites: diff --git a/doc/api/core/operators/publishvalue.md b/doc/api/core/operators/publishvalue.md index 2fc40b604..a4a14279b 100644 --- a/doc/api/core/operators/publishvalue.md +++ b/doc/api/core/operators/publishvalue.md @@ -1,31 +1,31 @@ ### `Rx.Observable.prototype.publishValue([selector])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/publishvalue.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/publishvalue.js "View in source") Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initialValue. - + This operator is a specialization of `multicast` using a `Rx.BehaviorSubject`. #### Arguments 1. `[selector]` *(`Function`)*: Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive immediately receive the initial value, followed by all notifications of the source from the time of the subscription on. - + #### Returns *(ConnectableObservable)*: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. - + #### Example ```js var interval = Rx.Observable.interval(1000); var source = interval .take(2) - .doAction(function (x) { + .doAction(function (x) { console.log('Side effect'); }); - + var published = source.publishValue(42); - + published.subscribe(createObserver('SourceA')); published.subscribe(createObserver('SourceB')); - + var connection = published.connect(); function createObserver(tag) { @@ -34,23 +34,23 @@ function createObserver(tag) { console.log('Next: ' + tag + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); } -// => Next: SourceA42 -// => Next: SourceB42 +// => Next: SourceA42 +// => Next: SourceB42 // => Side effect -// => Next: SourceA0 -// => Next: SourceB0 +// => Next: SourceA0 +// => Next: SourceB0 // => Side effect -// => Next: SourceA1 -// => Next: SourceB1 -// => Completed -// => Completed +// => Next: SourceA1 +// => Next: SourceB1 +// => Completed +// => Completed ``` ### Location @@ -62,7 +62,7 @@ Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) - [`rx.binding.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.binding.js) -- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) +- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) Prerequisites: @@ -78,4 +78,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/publishvalue.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/publishvalue.js) \ No newline at end of file +- [`/tests/observable/publishvalue.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/publishvalue.js) diff --git a/doc/api/core/operators/range.md b/doc/api/core/operators/range.md index dc154c711..93c24848b 100644 --- a/doc/api/core/operators/range.md +++ b/doc/api/core/operators/range.md @@ -1,5 +1,5 @@ ### `Rx.Observable.range(start, count, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/range.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/range.js "View in source") Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages. @@ -9,7 +9,7 @@ Generates an observable sequence of integral numbers within a specified range, u 3. `[scheduler=Rx.Scheduler.currentThread]` *(`Scheduler`)*: Scheduler to run the generator loop on. If not specified, defaults to Scheduler.currentThread. #### Returns -*(`Observable`)*: An observable sequence that contains a range of sequential integral numbers. +*(`Observable`)*: An observable sequence that contains a range of sequential integral numbers. #### Example ```js @@ -20,16 +20,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0 +// => Next: 0 // => Next: 1 -// => Next: 2 -// => Completed +// => Next: 2 +// => Completed ``` ### Location @@ -55,4 +55,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/range.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/range.js) \ No newline at end of file +- [/tests/observable/range.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/range.js) diff --git a/doc/api/core/operators/reduce.md b/doc/api/core/operators/reduce.md index abcb71c9d..3a8dd8d6e 100644 --- a/doc/api/core/operators/reduce.md +++ b/doc/api/core/operators/reduce.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.reduce(accumulator, [seed])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/reduce.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/reduce.js "View in source") Applies an accumulator function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value. @@ -8,7 +8,7 @@ For aggregation behavior with incremental intermediate results, see the `scan` m #### Arguments 1. `accumulator` *(`Function`)*: An accumulator function to be invoked on each element. 2. `[seed]` *(`Any`)*: The initial accumulator value. - + #### Returns *(`Observable`)*: An observable sequence containing a single element with the final accumulator value. @@ -24,14 +24,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 6 -// => Completed +// => Completed ``` ### Location @@ -55,4 +55,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/reduce.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/reduce.js) \ No newline at end of file +- [`/tests/observable/reduce.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/reduce.js) diff --git a/doc/api/core/operators/refcount.md b/doc/api/core/operators/refcount.md index eebeb85ba..17e3cdcf6 100644 --- a/doc/api/core/operators/refcount.md +++ b/doc/api/core/operators/refcount.md @@ -1,23 +1,23 @@ ### `ConnectableObservable.prototype.refCount()` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/connectableobservable.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/connectableobservable.js "View in source") Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. - + #### Returns *(`Observable`)*: An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. - + #### Example ```js var interval = Rx.Observable.interval(1000); var source = interval .take(2) - .doAction(function (x) { + .doAction(function (x) { console.log('Side effect'); }); - + var published = source.publish().refCount(); - + published.subscribe(createObserver('SourceA')); published.subscribe(createObserver('SourceB')); @@ -27,21 +27,21 @@ function createObserver(tag) { console.log('Next: ' + tag + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); } // => Side effect -// => Next: SourceA0 -// => Next: SourceB0 +// => Next: SourceA0 +// => Next: SourceB0 // => Side effect -// => Next: SourceA1 -// => Next: SourceB1 -// => Completed -// => Completed +// => Next: SourceA1 +// => Next: SourceB1 +// => Completed +// => Completed ``` ### Location @@ -52,7 +52,7 @@ Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) - [`rx.binding.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.binding.js) -- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) +- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) Prerequisites: @@ -66,4 +66,4 @@ NuGet Packages: - [`RxJS-Binding`](http://www.nuget.org/packages/RxJS-Binding/) Unit Tests: -- [`/tests/observable/connectableobservable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/connectableobservable.js) \ No newline at end of file +- [`/tests/observable/connectableobservable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/connectableobservable.js) diff --git a/doc/api/core/operators/repeat.md b/doc/api/core/operators/repeat.md index 838bc7645..fad16a1f5 100644 --- a/doc/api/core/operators/repeat.md +++ b/doc/api/core/operators/repeat.md @@ -1,5 +1,5 @@ ### `Rx.Observable.repeat(value, [repeatCount], [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/repeat.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/repeat.js "View in source") Generates an observable sequence that repeats the given element the specified number of times, using the specified scheduler to send out observer messages. @@ -20,16 +20,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -//=> Next: 42 +//=> Next: 42 // => Next: 42 // => Next: 42 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/repeatproto.md b/doc/api/core/operators/repeatproto.md index 4016de094..46392551d 100644 --- a/doc/api/core/operators/repeatproto.md +++ b/doc/api/core/operators/repeatproto.md @@ -1,13 +1,13 @@ ### `Rx.Observable.prototype.repeat(repeatCount)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/repeatproto.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/repeatproto.js "View in source") Repeats the observable sequence a specified number of times. If the repeat count is not specified, the sequence repeats indefinitely. - + #### Arguments 1. `repeatCount` *(`Number`)*: Number of times to repeat the sequence. If not provided, repeats the sequence indefinitely. - + #### Returns -*(`Observable`)*: The observable sequence producing the elements of the given sequence repeatedly. +*(`Observable`)*: The observable sequence producing the elements of the given sequence repeatedly. #### Example ```js @@ -19,19 +19,19 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 1 -// => Next: 2 -// => Next: 3 -// => Next: 1 -// => Next: 2 -// => Next: 3 -// => Completed +// => Next: 1 +// => Next: 2 +// => Next: 3 +// => Next: 1 +// => Next: 2 +// => Next: 3 +// => Completed ``` ### Location @@ -42,7 +42,7 @@ File: Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) -- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) +- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) - [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) - [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) @@ -59,4 +59,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/repeatproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/repeatproto.js) \ No newline at end of file +- [`/tests/observable/repeatproto.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/repeatproto.js) diff --git a/doc/api/core/operators/replay.md b/doc/api/core/operators/replay.md index bc9cff987..3d40898eb 100644 --- a/doc/api/core/operators/replay.md +++ b/doc/api/core/operators/replay.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.replay([selector], [bufferSize], [window], [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/replay.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/replay.js "View in source") Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer. @@ -10,7 +10,7 @@ This operator is a specialization of `multicast` using a `Rx.ReplaySubject`. 2. `[bufferSize]` *(`Number`)*: Maximum element count of the replay buffer. 3. `[window]` *(`Number`)*: Maximum time length of the replay buffer in milliseconds. 4. `[scheduler]` *(`Scheduler`)*: Scheduler where connected observers within the selector function will be invoked on. - + #### Returns *(`Observable`)*: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. @@ -20,15 +20,15 @@ var interval = Rx.Observable.interval(1000); var source = interval .take(2) - .do(function (x) { + .do(function (x) { console.log('Side effect'); }); - + var published = source .replay(function (x) { - return x.take(2).repeat(2); + return x.take(2).repeat(2); }, 3); - + published.subscribe(createObserver('SourceA')); published.subscribe(createObserver('SourceB')); @@ -38,27 +38,27 @@ function createObserver(tag) { console.log('Next: ' + tag + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); } -// => Side effect -// => Next: SourceA0 -// => Side effect -// => Next: SourceB0 -// => Side effect -// => Next: SourceA1 -// => Next: SourceA0 -// => Next: SourceA1 -// => Completed -// => Side effect -// => Next: SourceB1 -// => Next: SourceB0 -// => Next: SourceB1 -// => Completed +// => Side effect +// => Next: SourceA0 +// => Side effect +// => Next: SourceB0 +// => Side effect +// => Next: SourceA1 +// => Next: SourceA0 +// => Next: SourceA1 +// => Completed +// => Side effect +// => Next: SourceB1 +// => Next: SourceB0 +// => Next: SourceB1 +// => Completed ``` ### Location @@ -70,7 +70,7 @@ Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) - [`rx.binding.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.binding.js) -- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) +- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) Prerequisites: @@ -86,4 +86,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/replay.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/replay.js) \ No newline at end of file +- [`/tests/observable/replay.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/replay.js) diff --git a/doc/api/core/operators/retry.md b/doc/api/core/operators/retry.md index 918eac8af..18913791f 100644 --- a/doc/api/core/operators/retry.md +++ b/doc/api/core/operators/retry.md @@ -1,14 +1,14 @@ ### `Rx.Observable.prototype.retry([retryCount])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/retry.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/retry.js "View in source") Repeats the source observable sequence the specified number of times or until it successfully terminates. If the retry count is not specified, it retries indefinitely. Note if you encounter an error and want it to retry once, then you must use .retry(2). #### Arguments 1. `[retryCount]` *(`Number`)*: Number of times to retry the sequence. If not provided, retry the sequence indefinitely. - + #### Returns -*(`Observable`)*: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. +*(`Observable`)*: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. #### Example ```js @@ -29,14 +29,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/return.md b/doc/api/core/operators/return.md index 5a494b3ea..72d9b7fb9 100644 --- a/doc/api/core/operators/return.md +++ b/doc/api/core/operators/return.md @@ -1,5 +1,5 @@ ### `Rx.Observable.return(value, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/return.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/return.js "View in source") Returns an observable sequence that contains a single element, using the specified scheduler to send out observer messages. @@ -21,14 +21,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 42 -// => Completed +// => Next: 42 +// => Completed ``` ### Location @@ -54,4 +54,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/return.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/return.js) \ No newline at end of file +- [/tests/observable/return.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/return.js) diff --git a/doc/api/core/operators/sample.md b/doc/api/core/operators/sample.md index aff03eac1..5dffca4e8 100644 --- a/doc/api/core/operators/sample.md +++ b/doc/api/core/operators/sample.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.sample(interval | sampleObservable)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/sample.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/sample.js "View in source") Samples the observable sequence at each interval. @@ -7,7 +7,7 @@ Samples the observable sequence at each interval. 1. `[interval]` *(`Number`)*: Interval at which to sample (specified as an integer denoting milliseconds) 2. `[sampleObservable]` *(`Observable`)*: Sampler Observable. 3. `[scheduler=Rx.Scheduler.timeout]` *(`Scheduler`)*: Scheduler to run the sampling timer on. If not specified, the timeout scheduler is used. - + #### Returns *(`Observable`)*: Sampled observable sequence. @@ -23,15 +23,15 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 3 // => Next: 8 -// => Completed +// => Completed /* With a sampler */ var source = Rx.Observable.interval(1000) @@ -43,10 +43,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 3 diff --git a/doc/api/core/operators/scan.md b/doc/api/core/operators/scan.md index 2aad05d3b..abfb963ab 100644 --- a/doc/api/core/operators/scan.md +++ b/doc/api/core/operators/scan.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.scan([seed], accumulator)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/scan.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/scan.js "View in source") Applies an accumulator function over an observable sequence and returns each intermediate result. The optional seed value is used as the initial accumulator value. @@ -8,7 +8,7 @@ For aggregation behavior with no intermediate results, see `Rx.Observable#aggreg #### Arguments 1. `[seed]` *(`Any`)*: The initial accumulator value. 2. `accumulator` *(`Function`)*: An accumulator function to be invoked on each element. - + #### Returns *(`Observable`)*: An observable sequence which results from the comonadic bind operation. @@ -26,16 +26,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 // => Next: 3 // => Next: 6 -// => Completed +// => Completed /* With a seed */ var source = Rx.Observable.range(1, 3) @@ -50,16 +50,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 // => Next: 2 // => Next: 6 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/select.md b/doc/api/core/operators/select.md index cec077353..0b27393f8 100644 --- a/doc/api/core/operators/select.md +++ b/doc/api/core/operators/select.md @@ -1,6 +1,6 @@ ### `Rx.Observable.prototype.select(selector, [thisArg])` ### `Rx.Observable.prototype.map(selector, [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/select.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/select.js "View in source") Projects each element of an observable sequence into a new form by incorporating the element's index. This is an alias for the `select` method. @@ -10,7 +10,7 @@ Projects each element of an observable sequence into a new form by incorporating 2. the index of the element 3. the Observable object being subscribed 2. `[thisArg]` *(`Any`)*: Object to use as `this` when executing the predicate. - + #### Returns *(`Observable`)*: An observable sequence which results from the comonadic bind operation. @@ -26,16 +26,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 // => Next: 4 // => Next: 9 -// => Completed +// => Completed ``` ### Location @@ -60,4 +60,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/select.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/select.js) \ No newline at end of file +- [`/tests/observable/select.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/select.js) diff --git a/doc/api/core/operators/selectmany.md b/doc/api/core/operators/selectmany.md index 468e47792..003b7fcf4 100644 --- a/doc/api/core/operators/selectmany.md +++ b/doc/api/core/operators/selectmany.md @@ -1,6 +1,6 @@ ### `Rx.Observable.prototype.flatMap(selector, [resultSelector])` ### `Rx.Observable.prototype.selectMany(selector, [resultSelector])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/selectmany.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/selectmany.js "View in source") One of the following: @@ -19,7 +19,7 @@ source.selectMany(function (x, i) { return Promise.resolve(x + i); }, function ( ``` Projects each element of the source observable sequence to the other observable sequence or Promise and merges the resulting observable sequences into one observable sequence. - + ```js source.selectMany(Rx.Observable.fromArray([1,2,3])); source.selectMany(Promise.resolve(42)); @@ -28,16 +28,16 @@ source.selectMany(Promise.resolve(42)); #### Arguments 1. `selector` *(`Function`)*: A transform function to apply to each element or an observable sequence to project each element from the source sequence onto. 2. `[resultSelector]` *(`Function`)*: A transform function to apply to each element of the intermediate sequence. - + #### Returns -*(`Observable`)*: An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element. +*(`Observable`)*: An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element. #### Example ```js var source = Rx.Observable .range(1, 2) .selectMany(function (x) { - return Rx.Observable.range(x, 2); + return Rx.Observable.range(x, 2); }); var subscription = source.subscribe( @@ -45,17 +45,17 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 1 -// => Next: 2 -// => Next: 2 -// => Next: 3 -// => Completed +// => Next: 1 +// => Next: 2 +// => Next: 2 +// => Next: 3 +// => Completed /* Using a promise */ var source = Rx.Observable.fromArray([1,2,3,4]) @@ -68,17 +68,17 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 4 -// => Next: 4 -// => Next: 4 -// => Next: 4 -// => Completed +// => Next: 4 +// => Next: 4 +// => Next: 4 +// => Completed ``` ### Location diff --git a/doc/api/core/operators/sequenceequal.md b/doc/api/core/operators/sequenceequal.md index c64f6efa3..c17521779 100644 --- a/doc/api/core/operators/sequenceequal.md +++ b/doc/api/core/operators/sequenceequal.md @@ -1,14 +1,14 @@ ### `Rx.Observable.prototype.sequenceEqual(second, [comparer])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/sequenceequal.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/sequenceequal.js "View in source") Determins whether two sequences are equal by comparing the elements pairwise using a specified equality comparer. #### Arguments 1. `second` *(`Observable` | `Promise` | `Array`)*: Second observable sequence, Promise or array to compare. 2. `[comparer]` *(`Function`)*: Comparer used to compare elements of both sequences. - + #### Returns -*(`Observable`)*: An observable sequence that contains a single element which indicates whether both sequences are of equal length and their corresponding elements are equal according to the specified equality comparer. +*(`Observable`)*: An observable sequence that contains a single element which indicates whether both sequences are of equal length and their corresponding elements are equal according to the specified equality comparer. #### Example ```js @@ -22,14 +22,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: true -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/share.md b/doc/api/core/operators/share.md index 3d849f140..b9fd0c462 100644 --- a/doc/api/core/operators/share.md +++ b/doc/api/core/operators/share.md @@ -1,13 +1,13 @@ ### `Rx.Observable.prototype.share()` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/share.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/share.js "View in source") -Returns an observable sequence that shares a single subscription to the underlying sequence. +Returns an observable sequence that shares a single subscription to the underlying sequence. This operator is a specialization of `publish` which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. #### Returns *(`Observable`)*: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - + #### Example ```js /* Without share */ @@ -15,36 +15,36 @@ var interval = Rx.Observable.interval(1000); var source = interval .take(2) - .doAction(function (x) { + .doAction(function (x) { console.log('Side effect'); }); - + source.subscribe(createObserver('SourceA')); source.subscribe(createObserver('SourceB')); - + function createObserver(tag) { return Rx.Observer.create( function (x) { console.log('Next: ' + tag + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); } // => Side effect -// => Next: SourceA0 +// => Next: SourceA0 // => Side effect -// => Next: SourceB0 +// => Next: SourceB0 // => Side effect -// => Next: SourceA1 +// => Next: SourceA1 // => Completed // => Side effect -// => Next: SourceB1 -// => Completed +// => Next: SourceB1 +// => Completed /* With share */ var interval = Rx.Observable.interval(1000); @@ -52,17 +52,17 @@ var interval = Rx.Observable.interval(1000); var source = interval .take(2) .do( - function (x) { + function (x) { console.log('Side effect'); }); - + var published = source.share(); - -// When the number of observers subscribed to published observable goes from + +// When the number of observers subscribed to published observable goes from // 0 to 1, we connect to the underlying observable sequence. published.subscribe(createObserver('SourceA')); // When the second subscriber is added, no additional subscriptions are added to the -// underlying observable sequence. As a result the operations that result in side +// underlying observable sequence. As a result the operations that result in side // effects are not repeated per subscriber. published.subscribe(createObserver('SourceB')); @@ -72,20 +72,20 @@ function createObserver(tag) { console.log('Next: ' + tag + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); } -// => Side effect -// => Next: SourceA0 -// => Next: SourceB0 -// => Side effect -// => Next: SourceA1 +// => Side effect +// => Next: SourceA0 +// => Next: SourceB0 +// => Side effect +// => Next: SourceA1 // => Next: SourceB1 -// => Completed +// => Completed ``` ### Location @@ -97,7 +97,7 @@ Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) - [`rx.binding.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.binding.js) -- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) +- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) Prerequisites: diff --git a/doc/api/core/operators/sharereplay.md b/doc/api/core/operators/sharereplay.md index 77f7cf005..e5a9a743b 100644 --- a/doc/api/core/operators/sharereplay.md +++ b/doc/api/core/operators/sharereplay.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.shareReplay([bufferSize], [window], [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/sharereplay.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/sharereplay.js "View in source") Returns an observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer. @@ -9,7 +9,7 @@ This operator is a specialization of `replay` that connects to the connectable o 1. `[bufferSize]` *(`Number`)*: Maximum element count of the replay buffer. 2. `[window]` *(`Number`)*: Maximum time length of the replay buffer in milliseconds. 3. `[scheduler]` *(`Scheduler`)*: Scheduler where connected observers within the selector function will be invoked on. - + #### Returns *(`Observable`)*: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. @@ -19,35 +19,35 @@ var interval = Rx.Observable.interval(1000); var source = interval .take(4) - .doAction(function (x) { + .doAction(function (x) { console.log('Side effect'); }); - + var published = source .shareReplay(3); - + published.subscribe(createObserver('SourceA')); published.subscribe(createObserver('SourceB')); -// Creating a third subscription after the previous two subscriptions have -// completed. Notice that no side effects result from this subscription, -// because the notifications are cached and replayed. +// Creating a third subscription after the previous two subscriptions have +// completed. Notice that no side effects result from this subscription, +// because the notifications are cached and replayed. Rx.Observable .return(true) .delay(6000) .flatMap(published) .subscribe(createObserver('SourceC')); - + function createObserver(tag) { return Rx.Observer.create( function (x) { console.log('Next: ' + tag + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); } @@ -68,7 +68,7 @@ function createObserver(tag) { // => Next: SourceC1 // => Next: SourceC2 // => Next: SourceC3 -// => Completed +// => Completed ``` ### Location @@ -80,7 +80,7 @@ Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) - [`rx.binding.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.binding.js) -- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) +- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) Prerequisites: diff --git a/doc/api/core/operators/sharevalue.md b/doc/api/core/operators/sharevalue.md index 68e531386..963635ea8 100644 --- a/doc/api/core/operators/sharevalue.md +++ b/doc/api/core/operators/sharevalue.md @@ -1,25 +1,25 @@ ### `Rx.Observable.prototype.shareValue(value)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/sharevalue.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/sharevalue.js "View in source") Returns an observable sequence that shares a single subscription to the underlying sequence and starts with initialValue. - + This operator is a specialization of `publishValue` which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. #### Returns *(`Observable`)*: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - + #### Example ```js var interval = Rx.Observable.interval(1000); var source = interval .take(2) - .doAction(function (x) { + .doAction(function (x) { console.log('Side effect'); }); - + var published = source.shareValue(42); - + published.subscribe(createObserver('SourceA')); published.subscribe(createObserver('SourceB')); @@ -29,23 +29,23 @@ function createObserver(tag) { console.log('Next: ' + tag + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); } -// => Next: SourceA42 -// => Next: SourceB42 +// => Next: SourceA42 +// => Next: SourceB42 // => Side effect -// => Next: SourceA0 -// => Next: SourceB0 +// => Next: SourceA0 +// => Next: SourceB0 // => Side effect -// => Next: SourceA1 -// => Next: SourceB1 -// => Completed -// => Completed +// => Next: SourceA1 +// => Next: SourceB1 +// => Completed +// => Completed ``` ### Location @@ -57,7 +57,7 @@ Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) - [`rx.binding.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.binding.js) -- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) +- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) Prerequisites: @@ -73,4 +73,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/publishvalue.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/publishvalue.js) \ No newline at end of file +- [`/tests/observable/publishvalue.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/publishvalue.js) diff --git a/doc/api/core/operators/single.md b/doc/api/core/operators/single.md index c8bff63c1..8cde35319 100644 --- a/doc/api/core/operators/single.md +++ b/doc/api/core/operators/single.md @@ -1,8 +1,8 @@ ### `Rx.Observable.prototype.single([predicate], [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/single.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/single.js "View in source") Returns the only element of an observable sequence that satisfies the condition in the optional predicate, and reports an exception if there is not exactly one element in the observable sequence. - + #### Arguments 1. `[predicate]` *(`Function`)*: A predicate function to evaluate for elements in the source sequence. The callback is called with the following information: 1. the value of the element @@ -24,13 +24,13 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Error: Error: Sequence contains no elements. +// => Error: Error: Sequence contains no elements. /* Without a predicate */ var source = Rx.Observable.return(42) @@ -41,10 +41,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 @@ -59,14 +59,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 -// => Completed +// => Completed /* More than one match */ var source = Rx.Observable.range(0, 10) @@ -77,10 +77,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Error: Error: Sequence contains more than one element' @@ -107,4 +107,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/single.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/single.js) \ No newline at end of file +- [`/tests/observable/single.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/single.js) diff --git a/doc/api/core/operators/singleordefault.md b/doc/api/core/operators/singleordefault.md index fe48bb456..4547e2fa8 100644 --- a/doc/api/core/operators/singleordefault.md +++ b/doc/api/core/operators/singleordefault.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.singleOrDefault(predicate, [defaultValue], [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/singleordefault.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/singleordefault.js "View in source") Returns the first element of an observable sequence that satisfies the condition in the predicate, or a default value if no such element exists. @@ -12,7 +12,7 @@ Returns the first element of an observable sequence that satisfies the condition 3. `[thisArg]` *(`Any`)*: Object to use as `this` when executing the predicate. #### Returns -*(`Observable`)*: An observable sequence that contains elements from the input sequence that satisfy the condition. +*(`Observable`)*: An observable sequence that contains elements from the input sequence that satisfy the condition. #### Example ```js @@ -25,10 +25,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 @@ -43,14 +43,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 -// => Completed +// => Completed ``` ### Location @@ -74,4 +74,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/singleordefault.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/singleordefault.js) \ No newline at end of file +- [`/tests/observable/singleordefault.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/singleordefault.js) diff --git a/doc/api/core/operators/skip.md b/doc/api/core/operators/skip.md index 0ec086896..20cd1a923 100644 --- a/doc/api/core/operators/skip.md +++ b/doc/api/core/operators/skip.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.skip(count)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/skip.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/skip.js "View in source") Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. @@ -7,7 +7,7 @@ Bypasses a specified number of elements in an observable sequence and then retur 1. `count` *(`Number`)*: The number of elements to skip before returning the remaining elements. #### Returns -*(`Observable`)*: An observable sequence that contains the elements that occur after the specified index in the input sequence. +*(`Observable`)*: An observable sequence that contains the elements that occur after the specified index in the input sequence. #### Example ```js @@ -19,15 +19,15 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 3 // => Next: 4 -// => Completed +// => Completed ``` ### Location @@ -38,7 +38,7 @@ File: Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) -- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) +- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) - [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) - [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) diff --git a/doc/api/core/operators/skiplast.md b/doc/api/core/operators/skiplast.md index ff2b098c1..65b86f196 100644 --- a/doc/api/core/operators/skiplast.md +++ b/doc/api/core/operators/skiplast.md @@ -1,16 +1,16 @@ ### `Rx.Observable.prototype.skipLast(count)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/skiplast.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/skiplast.js "View in source") Bypasses a specified number of elements at the end of an observable sequence. -This operator accumulates a queue with a length enough to store the first `count` elements. As more elements are received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed. +This operator accumulates a queue with a length enough to store the first `count` elements. As more elements are received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed. #### Arguments 1. `count` *(`Number`)*: Number of elements to bypass at the end of the source sequence. #### Returns -*(`Observable`)*: An observable sequence containing the source sequence elements except for the bypassed ones at the end. - +*(`Observable`)*: An observable sequence containing the source sequence elements except for the bypassed ones at the end. + #### Example ```js var source = Rx.Observable.range(0, 5) @@ -21,15 +21,15 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 // => Next: 1 -// => Completed +// => Completed ``` ### Location @@ -40,7 +40,7 @@ File: Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) -- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) +- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) - [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) - [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) @@ -57,4 +57,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/skiplast.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/skiplast.js) \ No newline at end of file +- [`/tests/observable/skiplast.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/skiplast.js) diff --git a/doc/api/core/operators/skiplastwithtime.md b/doc/api/core/operators/skiplastwithtime.md index 82e233487..238113af2 100644 --- a/doc/api/core/operators/skiplastwithtime.md +++ b/doc/api/core/operators/skiplastwithtime.md @@ -1,9 +1,9 @@ ### `Rx.Observable.prototype.skipLastWithTime(duration)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/skiplastwithtime.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/skiplastwithtime.js "View in source") Bypasses a specified number of elements at the end of an observable sequence. -This operator accumulates a queue with a length enough to store the first `count` elements. As more elements are received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed. +This operator accumulates a queue with a length enough to store the first `count` elements. As more elements are received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed. #### Arguments 1. `duration` *(`Number`)*: Duration for skipping elements from the end of the sequence. @@ -11,29 +11,29 @@ This operator accumulates a queue with a length enough to store the first `count #### Returns *(`Observable`)*: An observable sequence with the elements skipped during the specified duration from the end of the source sequence. - + #### Example ```js var source = Rx.Observable.timer(0, 1000) .take(10) .skipLastWithTime(5000); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 // => Next: 1 // => Next: 3 // => Next: 4 -// => Completed +// => Completed ``` ### Location @@ -61,4 +61,4 @@ NuGet Packages: - [`RxJS-Time`](http://www.nuget.org/packages/RxJS-Time/) Unit Tests: -- [`/tests/observable/skiplastwithtime.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/skiplastwithtime.js) \ No newline at end of file +- [`/tests/observable/skiplastwithtime.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/skiplastwithtime.js) diff --git a/doc/api/core/operators/skipuntil.md b/doc/api/core/operators/skipuntil.md index cb8a13eff..a28370914 100644 --- a/doc/api/core/operators/skipuntil.md +++ b/doc/api/core/operators/skipuntil.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.skipUntil(other)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/skipuntil.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/skipuntil.js "View in source") Returns the values from the source observable sequence only after the other observable sequence produces a value. @@ -7,7 +7,7 @@ Returns the values from the source observable sequence only after the other obse 1. `other` *(`Observable` | `Promise`)*: The observable sequence or Promise that triggers propagation of elements of the source sequence. #### Returns -*(`Observable`)*: An observable sequence containing the elements of the source sequence starting from the point the other sequence triggered propagation. +*(`Observable`)*: An observable sequence containing the elements of the source sequence starting from the point the other sequence triggered propagation. #### Example ```js @@ -19,16 +19,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 6 // => Next: 7 // => Next: 8 -// => Completed +// => Completed ``` ### Location @@ -53,4 +53,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/skipuntil.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/skipuntil.js) \ No newline at end of file +- [`/tests/observable/skipuntil.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/skipuntil.js) diff --git a/doc/api/core/operators/skipuntilwithtime.md b/doc/api/core/operators/skipuntilwithtime.md index 8741635d8..be22cf1fb 100644 --- a/doc/api/core/operators/skipuntilwithtime.md +++ b/doc/api/core/operators/skipuntilwithtime.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.skipUntilWithTime(startTime, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/skipuntil.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/skipuntil.js "View in source") Skips elements from the observable source sequence until the specified start time, using the specified scheduler to run timers. @@ -10,7 +10,7 @@ Errors produced by the source sequence are always forwarded to the result sequen 2. [`scheduler = Rx.Scheduler.timeout`] *(`Scheduler`)*: Scheduler to run the timer on. If not specified, defaults to Rx.Scheduler.timeout. #### Returns -*(`Observable`)*: An observable sequence with the elements skipped until the specified start time. +*(`Observable`)*: An observable sequence with the elements skipped until the specified start time. #### Example ```js @@ -23,16 +23,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 6 // => Next: 7 // => Next: 8 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/skipwhile.md b/doc/api/core/operators/skipwhile.md index c50bfe051..f829b71c0 100644 --- a/doc/api/core/operators/skipwhile.md +++ b/doc/api/core/operators/skipwhile.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.skipWhile(predicate, [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/skipwhile.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/skipwhile.js "View in source") Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. @@ -11,8 +11,8 @@ Bypasses elements in an observable sequence as long as a specified condition is 2. `[thisArg]` *(`Any`)*: Object to use as this when executing callback. #### Returns -*(`Observable`)*: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. - +*(`Observable`)*: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. + #### Example ```js // With a predicate @@ -24,16 +24,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 3 // => Next: 4 // => Next: 5 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/start.md b/doc/api/core/operators/start.md index cbfd653b9..349d49ad6 100644 --- a/doc/api/core/operators/start.md +++ b/doc/api/core/operators/start.md @@ -1,5 +1,5 @@ ### `Rx.Observable.start(func, [scheduler], [context])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/start.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/start.js "View in source") Invokes the specified function asynchronously on the specified scheduler, surfacing the result through an observable sequence. @@ -17,9 +17,9 @@ var context = { value: 42 }; var source = Rx.Observable.start( function () { - return this.value; - }, - Rx.Scheduler.timeout, + return this.value; + }, + Rx.Scheduler.timeout, context ); @@ -28,14 +28,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 42 -// => Completed +// => Next: 42 +// => Completed ``` ### Location @@ -63,4 +63,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/start.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/start.js) \ No newline at end of file +- [/tests/observable/start.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/start.js) diff --git a/doc/api/core/operators/startasync.md b/doc/api/core/operators/startasync.md index 32322baa8..026110eb4 100644 --- a/doc/api/core/operators/startasync.md +++ b/doc/api/core/operators/startasync.md @@ -1,5 +1,5 @@ ### `Rx.Observable.startAsync(functionAsync)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/startasync.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/startasync.js "View in source") Invokes the asynchronous function, surfacing the result through an observable sequence. @@ -11,7 +11,7 @@ Invokes the asynchronous function, surfacing the result through an observable se #### Example ```js -var source = Rx.Observable.startAsync(function () { +var source = Rx.Observable.startAsync(function () { return RSVP.Promise.resolve(42); }); @@ -20,14 +20,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 42 -// => Completed +// => Next: 42 +// => Completed ``` ### Location @@ -54,4 +54,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/startasync.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/startasync.js) \ No newline at end of file +- [/tests/observable/startasync.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/startasync.js) diff --git a/doc/api/core/operators/startwith.md b/doc/api/core/operators/startwith.md index f8f144d4e..efbf73da2 100644 --- a/doc/api/core/operators/startwith.md +++ b/doc/api/core/operators/startwith.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.startWith([scheduler] ...args)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/startwith.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/startwith.js "View in source") Prepends a sequence of values to an observable sequence with an optional scheduler and an argument list of values to prepend. @@ -20,17 +20,17 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 // => Next: 2 // => Next: 3 // => Next: 4 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/subscribe.md b/doc/api/core/operators/subscribe.md index 8185f2006..041809aac 100644 --- a/doc/api/core/operators/subscribe.md +++ b/doc/api/core/operators/subscribe.md @@ -1,6 +1,6 @@ ### `Rx.Observable.prototype.subscribe([observer] | [onNext], [onError], [onCompleted], [thisArg])` ### `Rx.Observable.prototype.forEach([observer] | [onNext], [onError], [onCompleted], [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/observable.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/observable.js "View in source") Subscribes an observer to the observable sequence. @@ -12,7 +12,7 @@ Subscribes an observer to the observable sequence. 4. `[thisArg]` *(`Any`)*: Object to use as this when executing callback. #### Returns -*(Disposable)*: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. +*(Disposable)*: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. #### Example ```js @@ -32,10 +32,10 @@ var observer = Rx.Observer.create( console.log('Next: %s', x); }, function (err) { - console.log('Error: %s', err); + console.log('Error: %s', err); }, function () { - console.log('Completed'); + console.log('Completed'); }); var source = Rx.Observable.range(0, 3) @@ -54,10 +54,10 @@ var subscription = source.subscribe( console.log('Next: %s', x); }, function (err) { - console.log('Error: %s', err); + console.log('Error: %s', err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 @@ -72,10 +72,10 @@ var subscription = source.subscribe( this.log('Next: %s', x); }, function (err) { - this.log('Error: %s', err); + this.log('Error: %s', err); }, function () { - this.log('Completed'); + this.log('Completed'); }, console); // => Next: 0 @@ -105,4 +105,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/core/observable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/core/observable.js) \ No newline at end of file +- [`/tests/core/observable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/core/observable.js) diff --git a/doc/api/core/operators/subscribecompleted.md b/doc/api/core/operators/subscribecompleted.md index c38fdcd31..27eaa7d53 100644 --- a/doc/api/core/operators/subscribecompleted.md +++ b/doc/api/core/operators/subscribecompleted.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.subscribeCompleted(onCompleted, [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/observable.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/observable.js "View in source") Subscribes a function to invoke upon graceful termination of the observable sequence. @@ -8,7 +8,7 @@ Subscribes a function to invoke upon graceful termination of the observable sequ 2. `[thisArg]` *(`Any`)*: Object to use as this when executing callback. #### Returns -*(Disposable)*: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. +*(Disposable)*: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. #### Example ```js @@ -55,4 +55,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/core/observable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/core/observable.js) \ No newline at end of file +- [`/tests/core/observable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/core/observable.js) diff --git a/doc/api/core/operators/subscribeerror.md b/doc/api/core/operators/subscribeerror.md index b971ca951..a49e5766a 100644 --- a/doc/api/core/operators/subscribeerror.md +++ b/doc/api/core/operators/subscribeerror.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.subscribeError(onError, [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/observable.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/observable.js "View in source") Subscribes a function to invoke upon exceptional termination of the observable sequence. @@ -8,7 +8,7 @@ Subscribes a function to invoke upon exceptional termination of the observable s 2. `[thisArg]` *(`Any`)*: Object to use as this when executing callback. #### Returns -*(Disposable)*: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. +*(Disposable)*: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. #### Example ```js @@ -55,4 +55,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/core/observable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/core/observable.js) \ No newline at end of file +- [`/tests/core/observable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/core/observable.js) diff --git a/doc/api/core/operators/subscribenext.md b/doc/api/core/operators/subscribenext.md index 43d9123ff..23da5af48 100644 --- a/doc/api/core/operators/subscribenext.md +++ b/doc/api/core/operators/subscribenext.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.subscribeNext(onNext, [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/observable.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/observable.js "View in source") Subscribes a function to invoke for each element in the observable sequence. @@ -8,7 +8,7 @@ Subscribes a function to invoke for each element in the observable sequence. 2. `[thisArg]` *(`Any`)*: Object to use as this when executing callback. #### Returns -*(Disposable)*: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. +*(Disposable)*: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. #### Example ```js @@ -59,4 +59,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/core/observable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/core/observable.js) \ No newline at end of file +- [`/tests/core/observable.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/core/observable.js) diff --git a/doc/api/core/operators/subscribeon.md b/doc/api/core/operators/subscribeon.md index e5de66ba6..846e631ca 100644 --- a/doc/api/core/operators/subscribeon.md +++ b/doc/api/core/operators/subscribeon.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.subscribeOn(scheduler)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/subscribeon.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/subscribeon.js "View in source") Wraps the source sequence in order to run its subscription and unsubscription logic on the specified scheduler. @@ -9,8 +9,8 @@ This only performs the side-effects of subscription and unsubscription on the sp 1. `scheduler` *(`Scheduler`)*: Scheduler to notify observers on. #### Returns -*(`Observable`)*: The source sequence whose observations happen on the specified scheduler. - +*(`Observable`)*: The source sequence whose observations happen on the specified scheduler. + #### Example ```js var observable = Rx.Observable.create(function (observer) { @@ -36,14 +36,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/sum.md b/doc/api/core/operators/sum.md index 1d88a371e..efe2e8275 100644 --- a/doc/api/core/operators/sum.md +++ b/doc/api/core/operators/sum.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.sum([keySelector], [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/sum.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/sum.js "View in source") Computes the sum of a sequence of values that are obtained by invoking an optional transform function on each element of the input sequence, else if not specified computes the sum on each item in the sequence. @@ -11,7 +11,7 @@ Computes the sum of a sequence of values that are obtained by invoking an option #### Returns *(`Observable`)*: An observable sequence containing a single element with the sum of the values in the source sequence. - + #### Example ```js /* Without a selector */ @@ -23,14 +23,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 55 -// => Completed +// => Completed /* With a selector */ var array = [ @@ -50,14 +50,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 6 -// => Completed +// => Completed ``` ### Location @@ -81,4 +81,4 @@ NuGet Packages: - [`RxJS-Aggregates`](http://www.nuget.org/packages/RxJS-Aggregates/) Unit Tests: -- [`/tests/observable/sum.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/sum.js) \ No newline at end of file +- [`/tests/observable/sum.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/sum.js) diff --git a/doc/api/core/operators/switch.md b/doc/api/core/operators/switch.md index de26bceb0..7d3c1e979 100644 --- a/doc/api/core/operators/switch.md +++ b/doc/api/core/operators/switch.md @@ -1,12 +1,12 @@ ### `Rx.Observable.prototype.switch()` ### `Rx.Observable.prototype.switchLatest()` *DEPRECATED* -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/switchlatest.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/switchlatest.js "View in source") Transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. There is an alias for this method called `switchLatest` for browsers Next: 0 +// => Next: 0 // => Next: 1 // => Next: 2 // => Next: 3 -// => Next: 4 -// => Completed +// => Next: 4 +// => Completed ``` ### Location @@ -58,4 +58,4 @@ NuGet Packages: Unit Tests: - [`/tests/observable/switch.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/switch.js) -* * * \ No newline at end of file +* * * diff --git a/doc/api/core/operators/take.md b/doc/api/core/operators/take.md index 508a3f960..4e1de979b 100644 --- a/doc/api/core/operators/take.md +++ b/doc/api/core/operators/take.md @@ -1,14 +1,14 @@ ### `Rx.Observable.prototype.take(count, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/take.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/take.js "View in source") Returns a specified number of contiguous elements from the start of an observable sequence, using the specified scheduler for the edge case of `take(0)`. - + #### Arguments 1. `count` *(`Number`)*: The number of elements to return. 2. `[schduler]` *(`Scheduler`)*: Scheduler used to produce an onCompleted message in case `count` is set to 0. #### Returns -*(`Observable`)*: An observable sequence that contains the elements that occur after the specified index in the input sequence. +*(`Observable`)*: An observable sequence that contains the elements that occur after the specified index in the input sequence. #### Example ```js @@ -20,16 +20,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 // => Next: 1 // => Next: 2 -// => Completed +// => Completed ``` ### Location @@ -40,7 +40,7 @@ File: Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) -- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) +- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) - [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) - [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) @@ -57,4 +57,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/take.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/take.js) \ No newline at end of file +- [`/tests/observable/take.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/take.js) diff --git a/doc/api/core/operators/takelast.md b/doc/api/core/operators/takelast.md index 296ad31a6..ffc8f4702 100644 --- a/doc/api/core/operators/takelast.md +++ b/doc/api/core/operators/takelast.md @@ -1,16 +1,16 @@ ### `Rx.Observable.prototype.takeLast(count)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takelast.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takelast.js "View in source") Returns a specified number of contiguous elements from the end of an observable sequence, using an optional scheduler to drain the queue. - + This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. #### Arguments 1. `count` *(`Number`)*: Number of elements to bypass at the end of the source sequence. #### Returns -*(`Observable`)*: An observable sequence containing the source sequence elements except for the bypassed ones at the end. - +*(`Observable`)*: An observable sequence containing the source sequence elements except for the bypassed ones at the end. + #### Example ```js var source = Rx.Observable.range(0, 5) @@ -21,16 +21,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 2 // => Next: 3 // => Next: 4 -// => Completed +// => Completed ``` ### Location @@ -41,7 +41,7 @@ File: Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) -- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) +- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) - [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) - [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) diff --git a/doc/api/core/operators/takelastbuffer.md b/doc/api/core/operators/takelastbuffer.md index 206bbcb8a..189f7a5b7 100644 --- a/doc/api/core/operators/takelastbuffer.md +++ b/doc/api/core/operators/takelastbuffer.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.takeLastBuffer(count)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takelastbuffer.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takelastbuffer.js "View in source") Returns an array with the specified number of contiguous elements from the end of an observable sequence. @@ -8,7 +8,7 @@ Returns an array with the specified number of contiguous elements from the end o #### Returns *(`Observable`)*: An observable sequence containing a single array with the specified number of elements from the end of the source sequence. - + #### Example ```js var source = Rx.Observable.range(0, 5) @@ -19,14 +19,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 2,3,4 -// => Completed +// => Completed ``` ### Location @@ -37,7 +37,7 @@ File: Dist: - [`rx.all.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.js) - [`rx.all.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.all.compat.js) -- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) +- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) - [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) - [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) diff --git a/doc/api/core/operators/takelastbufferwithtime.md b/doc/api/core/operators/takelastbufferwithtime.md index ab49dafad..2e0351c9c 100644 --- a/doc/api/core/operators/takelastbufferwithtime.md +++ b/doc/api/core/operators/takelastbufferwithtime.md @@ -1,37 +1,37 @@ ### `Rx.Observable.prototype.takeLastBufferWithTime(duration, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takelastbufferwithtime.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takelastbufferwithtime.js "View in source") Returns an array with the elements within the specified duration from the end of the observable source sequence, using the specified scheduler to run timers. -This operator accumulates a queue with a length enough to store elements received during the initial duration window. As more elements are received, elements older than the specified duration are taken from the queue and produced on the result sequence. This causes elements to be delayed with duration. - +This operator accumulates a queue with a length enough to store elements received during the initial duration window. As more elements are received, elements older than the specified duration are taken from the queue and produced on the result sequence. This causes elements to be delayed with duration. + #### Arguments 1. `duration` *(`Number`)*: Duration for taking elements from the end of the sequence. 2. `[scheduler=Rx.Scheduler.timeout]` *(`Scheduler`)*: Scheduler to run the timer on. If not specified, defaults to timeout scheduler. #### Returns *(`Observable`)*: An observable sequence containing a single array with the elements taken during the specified duration from the end of the source sequence. - + #### Example ```js var source = Rx.Observable .timer(0, 1000) .take(10) .takeLastBufferWithTime(5000); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 5,6,7,8,9 -// => Completed +// => Completed ``` ### Location @@ -61,4 +61,4 @@ NuGet Packages: Unit Tests: - [`/tests/observable/takelastbufferwithtime.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/takelastbufferwithtime.js) -* * * \ No newline at end of file +* * * diff --git a/doc/api/core/operators/takelastwithtime.md b/doc/api/core/operators/takelastwithtime.md index f3caf603a..96eb5efe4 100644 --- a/doc/api/core/operators/takelastwithtime.md +++ b/doc/api/core/operators/takelastwithtime.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.takeLastWithTime(duration, [timeScheduler], [loopScheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takelastwithtime.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takelastwithtime.js "View in source") Returns elements within the specified duration from the end of the observable source sequence, using the specified schedulers to run timers and to drain the collected elements. @@ -10,22 +10,22 @@ Returns elements within the specified duration from the end of the observable so #### Returns *(`Observable`)*: An observable sequence with the elements taken during the specified duration from the end of the source sequence. - + #### Example ```js var source = Rx.Observable.timer(0, 1000) .take(10) .takeLastWithTime(5000); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 5 @@ -33,7 +33,7 @@ var subscription = source.subscribe( // => Next: 7 // => Next: 8 // => Next: 9 -// => Completed +// => Completed ``` ### Location @@ -61,4 +61,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/skipuntilwithtime.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/takelastwithtime.js) \ No newline at end of file +- [`/tests/observable/skipuntilwithtime.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/takelastwithtime.js) diff --git a/doc/api/core/operators/takeuntil.md b/doc/api/core/operators/takeuntil.md index f98cf7ec4..4bf26fc99 100644 --- a/doc/api/core/operators/takeuntil.md +++ b/doc/api/core/operators/takeuntil.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.takeUntil(other)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takeuntil.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takeuntil.js "View in source") Returns the values from the source observable sequence until the other observable sequence or Promise produces a value. @@ -7,7 +7,7 @@ Returns the values from the source observable sequence until the other observabl 1. `other` *(`Observable` | `Promise`)*: Observable sequence or Promise that terminates propagation of elements of the source sequence. #### Returns -*(`Observable`)*: An observable sequence containing the elements of the source sequence up to the point the other sequence or Promise interrupted further propagation. +*(`Observable`)*: An observable sequence containing the elements of the source sequence up to the point the other sequence or Promise interrupted further propagation. #### Example ```js @@ -19,10 +19,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 @@ -30,7 +30,7 @@ var subscription = source.subscribe( // => Next: 2 // => Next: 3 // => Next: 4 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/takeuntilwithtime.md b/doc/api/core/operators/takeuntilwithtime.md index 898b892e3..84b23e63a 100644 --- a/doc/api/core/operators/takeuntilwithtime.md +++ b/doc/api/core/operators/takeuntilwithtime.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.takeUntilWithTime(other)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takeuntil.js "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takeuntil.js "View in source") Returns the values from the source observable sequence until the other observable sequence produces a value. @@ -8,7 +8,7 @@ Returns the values from the source observable sequence until the other observabl 2. [`scheduler`] *(`Scheduler`)*: Scheduler to run the timer on. #### Returns -*(`Observable`)*: An observable sequence with the elements taken until the specified end time. +*(`Observable`)*: An observable sequence with the elements taken until the specified end time. #### Example ```js @@ -20,10 +20,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 @@ -31,7 +31,7 @@ var subscription = source.subscribe( // => Next: 2 // => Next: 3 // => Next: 4 -// => Completed +// => Completed ``` ### Location @@ -58,4 +58,4 @@ NuGet Packages: - [`RxJS-Time`](http://www.nuget.org/packages/RxJS-Time/) Unit Tests: -- [`/tests/observable/takeuntilwithtime.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/takeuntilwithtime.js) \ No newline at end of file +- [`/tests/observable/takeuntilwithtime.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/takeuntilwithtime.js) diff --git a/doc/api/core/operators/takewhile.md b/doc/api/core/operators/takewhile.md index 7d8fc560b..e06df3356 100644 --- a/doc/api/core/operators/takewhile.md +++ b/doc/api/core/operators/takewhile.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.takeWhile(predicate, [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takewhile.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/takewhile.js "View in source") Returns elements from an observable sequence as long as a specified condition is true. @@ -11,8 +11,8 @@ Returns elements from an observable sequence as long as a specified condition is 2. `[thisArg]` *(`Any`)*: Object to use as this when executing callback. #### Returns -*(`Observable`)*: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. - +*(`Observable`)*: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. + #### Example ```js // With a predicate @@ -24,16 +24,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 // => Next: 1 // => Next: 2 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/throttle.md b/doc/api/core/operators/throttle.md index 2645683a9..0375ce3d1 100644 --- a/doc/api/core/operators/throttle.md +++ b/doc/api/core/operators/throttle.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.throttle(dueTime, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/throttle.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/throttle.js "View in source") Ignores values from an observable sequence which are followed by another value before dueTime. @@ -8,8 +8,8 @@ Ignores values from an observable sequence which are followed by another value b 2. `[scheduler=Rx.Scheduler.timeout]` *(`Any`)*: Scheduler to run the throttle timers on. If not specified, the timeout scheduler is used. #### Returns -*(`Observable`)*: The throttled sequence. - +*(`Observable`)*: The throttled sequence. + #### Example ```js var times = [ @@ -22,7 +22,7 @@ var times = [ // Delay each item by time and project value; var source = Rx.Observable.for( - times, + times, function (item) { return Rx.Observable .return(item.value) @@ -35,16 +35,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 // => Next: 2 // => Next: 4 -// => Completed +// => Completed ``` ### Location @@ -72,4 +72,4 @@ NuGet Packages: - [`RxJS-Time`](http://www.nuget.org/packages/RxJS-Time/) Unit Tests: -- [`/tests/observable/throttle.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/throttle.js) \ No newline at end of file +- [`/tests/observable/throttle.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/throttle.js) diff --git a/doc/api/core/operators/throttlewithselector.md b/doc/api/core/operators/throttlewithselector.md index 2196e418b..6fb08fb49 100644 --- a/doc/api/core/operators/throttlewithselector.md +++ b/doc/api/core/operators/throttlewithselector.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.throttleWithSelector(throttleSelector)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/throttlewithselector.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/throttlewithselector.js "View in source") Ignores values from an observable sequence which are followed by another value before dueTime. @@ -7,8 +7,8 @@ Ignores values from an observable sequence which are followed by another value b 1. `dueTime` *(`Number`)*: Selector function to retrieve a sequence indicating the throttle duration for each given element. #### Returns -*(`Observable`)*: The throttled sequence. - +*(`Observable`)*: The throttled sequence. + #### Example ```js var array = [ @@ -27,22 +27,21 @@ var source = Rx.Observable.for( .throttleWithSelector(function (x) { return Rx.Observable.timer(700); }); - var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0 // => Next: 3 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/throw.md b/doc/api/core/operators/throw.md index 66b731dd0..d322d13bb 100644 --- a/doc/api/core/operators/throw.md +++ b/doc/api/core/operators/throw.md @@ -1,5 +1,5 @@ ### `Rx.Observable.throw(exception, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.time.js#L133-L152 "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.time.js#L133-L152 "View in source") Returns an observable sequence that terminates with an exception, using the specified scheduler to send out the single onError message. @@ -11,7 +11,7 @@ There is an alias to this method called `throwException` for browsers Error: Error: error! @@ -55,4 +55,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [/tests/observable/throw.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/throw.js) \ No newline at end of file +- [/tests/observable/throw.js](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/throw.js) diff --git a/doc/api/core/operators/timeinterval.md b/doc/api/core/operators/timeinterval.md index b1fa1a887..a1ab1839f 100644 --- a/doc/api/core/operators/timeinterval.md +++ b/doc/api/core/operators/timeinterval.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.timeInterval([scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/timeinterval.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/timeinterval.js "View in source") Records the time interval between consecutive values in an observable sequence. @@ -15,16 +15,16 @@ var source = Rx.Observable.timer(0, 1000) .timeInterval() .map(function (x) { return x.value + ':' + x.interval; }) .take(5); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0:0 @@ -32,7 +32,7 @@ var subscription = source.subscribe( // => Next: 2:1000 // => Next: 3:1000 // => Next: 4:1000 -// => Completed +// => Completed ``` ### Location @@ -59,4 +59,4 @@ NuGet Packages: - [`RxJS-Time`](http://www.nuget.org/packages/RxJS-Time/) Unit Tests: -- [`/tests/observable/timeinterval.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/timeinterval.js) \ No newline at end of file +- [`/tests/observable/timeinterval.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/timeinterval.js) diff --git a/doc/api/core/operators/timeout.md b/doc/api/core/operators/timeout.md index 528a0bff8..0ffdc8649 100644 --- a/doc/api/core/operators/timeout.md +++ b/doc/api/core/operators/timeout.md @@ -18,16 +18,16 @@ var source = Rx.Observable .return(42) .delay(5000) .timeout(200); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Error: Error: Timeout @@ -37,16 +37,16 @@ var source = Rx.Observable .return(42) .delay(5000) .timeout(200, Rx.Observable.empty()); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Completed @@ -76,4 +76,4 @@ NuGet Packages: - [`RxJS-Time`](http://www.nuget.org/packages/RxJS-Time/) Unit Tests: -- [`/tests/observable/timeout.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/timeout.js) \ No newline at end of file +- [`/tests/observable/timeout.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/timeout.js) diff --git a/doc/api/core/operators/timeoutwithselector.md b/doc/api/core/operators/timeoutwithselector.md index 50850a51d..5ef5d881f 100644 --- a/doc/api/core/operators/timeoutwithselector.md +++ b/doc/api/core/operators/timeoutwithselector.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.timeoutwithselector([firstTimeout], timeoutDurationSelector, [other])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/timeoutwithselector.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/timeoutwithselector.js "View in source") Returns the source observable sequence, switching to the other observable sequence if a timeout is signaled. @@ -26,25 +26,25 @@ var source = Rx.Observable return Rx.Observable.timer(x); }) .map(function (x, i) { return i; }) - .timeoutWithSelector(function (x) { - return Rx.Observable.timer(400); + .timeoutWithSelector(function (x) { + return Rx.Observable.timer(400); }); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0 -// => Next: 1 -// => Next: 2 -// => Error: Error: Timeout +// => Next: 0 +// => Next: 1 +// => Next: 2 +// => Error: Error: Timeout /* With no other */ var array = [ @@ -59,25 +59,25 @@ var source = Rx.Observable return Rx.Observable.timer(x); }) .map(function (x, i) { return i; }) - .timeoutWithSelector(Rx.Observable.timer(250), function (x) { - return Rx.Observable.timer(400); + .timeoutWithSelector(Rx.Observable.timer(250), function (x) { + return Rx.Observable.timer(400); }); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0 -// => Next: 1 -// => Next: 2 -// => Error: Error: Timeout +// => Next: 0 +// => Next: 1 +// => Next: 2 +// => Error: Error: Timeout /* With other */ var array = [ @@ -92,24 +92,24 @@ var source = Rx.Observable return Rx.Observable.timer(x); }) .map(function (x, i) { return i; }) - .timeoutWithSelector(Rx.Observable.timer(250), function (x) { - return Rx.Observable.timer(400); + .timeoutWithSelector(Rx.Observable.timer(250), function (x) { + return Rx.Observable.timer(400); }, Rx.Observable.return(42)); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0 -// => Next: 1 -// => Next: 2 +// => Next: 0 +// => Next: 1 +// => Next: 2 // => Next: 42 // => Completed ``` @@ -138,4 +138,4 @@ NuGet Packages: - [`RxJS-Time`](http://www.nuget.org/packages/RxJS-Time/) Unit Tests: -- [`/tests/observable/timeoutwithselector.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/timeoutwithselector.js) \ No newline at end of file +- [`/tests/observable/timeoutwithselector.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/timeoutwithselector.js) diff --git a/doc/api/core/operators/timer.md b/doc/api/core/operators/timer.md index dd3fc87a2..4f18e8ac0 100644 --- a/doc/api/core/operators/timer.md +++ b/doc/api/core/operators/timer.md @@ -1,7 +1,7 @@ ### `Rx.Observable.timer(dueTime, [period], [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/timer.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/timer.js "View in source") -Returns an observable sequence that produces a value after dueTime has elapsed and then after each period. Note for `rx.lite.js`, only +Returns an observable sequence that produces a value after dueTime has elapsed and then after each period. Note for `rx.lite.js`, only relative time is supported. ### Arguments @@ -23,16 +23,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 200 // => Next: 100 // => Next: 100 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/timestamp.md b/doc/api/core/operators/timestamp.md index ad1692808..5dd0765ee 100644 --- a/doc/api/core/operators/timestamp.md +++ b/doc/api/core/operators/timestamp.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.timestamp([scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/timestamp.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/timestamp.js "View in source") Records the timestamp for each value in an observable sequence. @@ -15,16 +15,16 @@ var source = Rx.Observable.timer(0, 1000) .timestamp() .map(function (x) { return x.value + ':' + x.timestamp; }) .take(5); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0:1378690776351 @@ -59,4 +59,4 @@ NuGet Packages: - [`RxJS-Time`](http://www.nuget.org/packages/RxJS-Time/) Unit Tests: -- [`/tests/observable/timestamp.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/timestamp.js) \ No newline at end of file +- [`/tests/observable/timestamp.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/timestamp.js) diff --git a/doc/api/core/operators/toarray.md b/doc/api/core/operators/toarray.md index a2da680d3..2908a9b36 100644 --- a/doc/api/core/operators/toarray.md +++ b/doc/api/core/operators/toarray.md @@ -1,26 +1,26 @@ ### `Rx.Observable.prototype.toArray()` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/toarray.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/toarray.js "View in source") Creates a list from an observable sequence. #### Returns -*(`Observable`)*: An observable sequence containing a single element with a list containing all the elements of the source sequence. +*(`Observable`)*: An observable sequence containing a single element with a list containing all the elements of the source sequence. #### Example ```js var source = Rx.Observable.timer(0, 1000) .take(5) .toArray(); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: [0,1,2,3,4] diff --git a/doc/api/core/operators/toasync.md b/doc/api/core/operators/toasync.md index 392b1c61b..ab6b69a7a 100644 --- a/doc/api/core/operators/toasync.md +++ b/doc/api/core/operators/toasync.md @@ -1,5 +1,5 @@ ### `Rx.Observable.toAsync(func, [scheduler], [context])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/toasync.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/toasync.js "View in source") Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler. @@ -25,14 +25,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 7 -// => Completed +// => Completed ``` ### Location diff --git a/doc/api/core/operators/tomap.md b/doc/api/core/operators/tomap.md index 344bc4a9f..cbb4537ea 100644 --- a/doc/api/core/operators/tomap.md +++ b/doc/api/core/operators/tomap.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.toMap(keySelector, [elementSelector])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/tomap.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/tomap.js "View in source") Converts the observable sequence to a Map if it exists. Note that this only works in an ES6 environment or polyfilled. @@ -15,7 +15,7 @@ Converts the observable sequence to a Map if it exists. Note that this only wor var source = Rx.Observable.timer(0, 1000) .take(5) .toMap(function (x) { return x * 2; }, function (x) { return x * 4; }); - + var subscription = source.subscribe( function (x) { var arr = []; @@ -23,10 +23,10 @@ var subscription = source.subscribe( console.log('Next: ' + arr); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: [0,0,2,4,4,8,6,12,8,16] diff --git a/doc/api/core/operators/toset.md b/doc/api/core/operators/toset.md index e421ef84d..c87b6fd6e 100644 --- a/doc/api/core/operators/toset.md +++ b/doc/api/core/operators/toset.md @@ -1,17 +1,17 @@ ### `Rx.Observable.prototype.toSet()` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/toset.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/toset.js "View in source") Creates an observable sequence with a single item of a Set created from the observable sequence. Note that this only works in an ES6 environment or polyfilled. #### Returns -*(`Observable`)*: An observable sequence containing a single element with a Set containing all the elements of the source sequence. +*(`Observable`)*: An observable sequence containing a single element with a Set containing all the elements of the source sequence. #### Example ```js var source = Rx.Observable.timer(0, 1000) .take(5) .toSet(); - + var subscription = source.subscribe( function (x) { var arr = []; @@ -19,10 +19,10 @@ var subscription = source.subscribe( console.log('Next: ' + arr); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: [0,1,2,3,4] diff --git a/doc/api/core/operators/using.md b/doc/api/core/operators/using.md index 649b0a18b..31e4323f7 100644 --- a/doc/api/core/operators/using.md +++ b/doc/api/core/operators/using.md @@ -1,5 +1,5 @@ ### `Rx.Observable.using(resourceFactory, observableFactory)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/using.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/using.js "View in source") Constructs an observable sequence that depends on a resource object, whose lifetime is tied to the resulting observable sequence's lifetime. @@ -48,14 +48,14 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 -// => Completed +// => Completed subscription.dispose(); diff --git a/doc/api/core/operators/when.md b/doc/api/core/operators/when.md index 842fd023a..a63114d3d 100644 --- a/doc/api/core/operators/when.md +++ b/doc/api/core/operators/when.md @@ -1,5 +1,5 @@ ### `Rx.Observable.when(...args)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/when.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/when.js "View in source") A series of plans (specified as an Array of as a series of arguments) created by use of the Then operator on patterns. @@ -7,7 +7,7 @@ A series of plans (specified as an Array of as a series of arguments) created by 1. `args` *(arguments|Array)*: A series of plans (specified as an Array of as a series of arguments) created by use of the then operator on patterns. #### Returns -*(`Observable`)*: Observable sequence with the results form matching several patterns. +*(`Observable`)*: Observable sequence with the results form matching several patterns. #### Example ```js @@ -22,16 +22,15 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); - // => Next: second // => Next: first -// => Completed +// => Completed ``` ### Location @@ -56,4 +55,4 @@ NuGet Packages: - [`RxJS-JoinPatterns`](http://www.nuget.org/packages/RxJS-JoinPatterns) Unit Tests: -- [`/tests/observable/when.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/when.js) \ No newline at end of file +- [`/tests/observable/when.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/when.js) diff --git a/doc/api/core/operators/where.md b/doc/api/core/operators/where.md index 49502fa64..cf29ea752 100644 --- a/doc/api/core/operators/where.md +++ b/doc/api/core/operators/where.md @@ -1,8 +1,8 @@ ### `Rx.Observable.prototype.filter(predicate, [thisArg])` ### `Rx.Observable.prototype.where(predicate, [thisArg])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/where.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/where.js "View in source") -Filters the elements of an observable sequence based on a predicate. +Filters the elements of an observable sequence based on a predicate. #### Arguments 1. `predicate` *(`Function`)*: A function to test each source element for a condition. The callback is called with the following information: @@ -12,7 +12,7 @@ Filters the elements of an observable sequence based on a predicate. 2. `[thisArg]` *(`Any`)*: Object to use as `this` when executing the predicate. #### Returns -*(`Observable`)*: An observable sequence that contains elements from the input sequence that satisfy the condition. +*(`Observable`)*: An observable sequence that contains elements from the input sequence that satisfy the condition. #### Example ```js @@ -26,16 +26,16 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0 -// => Next: 2 -// => Next: 4 -// => Completed +// => Next: 0 +// => Next: 2 +// => Next: 4 +// => Completed ``` ### Location @@ -63,4 +63,4 @@ NuGet Packages: - [`RxJS-Lite`](http://www.nuget.org/packages/RxJS-Lite/) Unit Tests: -- [`/tests/observable/where.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/where.js) \ No newline at end of file +- [`/tests/observable/where.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/where.js) diff --git a/doc/api/core/operators/while.md b/doc/api/core/operators/while.md index 491b78dd1..396104373 100644 --- a/doc/api/core/operators/while.md +++ b/doc/api/core/operators/while.md @@ -1,6 +1,6 @@ ### `Rx.Observable.while(condition, source)` ### `Rx.Observable.whileDo(condition, source)` *DEPRECATED* -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/while.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/while.js "View in source") Repeats source as long as condition holds emulating a while loop. There is an alias for this method called 'whileDo' for browsers Next: 42 // => Next: 42 // => Next: 42 -// => Completed +// => Completed ``` ### Location @@ -57,4 +56,4 @@ NuGet Packages: - [`RxJS-Experimental`](http://www.nuget.org/packages/RxJS-Experimental) Unit Tests: -- [`/tests/observable/while.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/while.js) \ No newline at end of file +- [`/tests/observable/while.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/while.js) diff --git a/doc/api/core/operators/window.md b/doc/api/core/operators/window.md index bf48b77bc..9e7a13078 100644 --- a/doc/api/core/operators/window.md +++ b/doc/api/core/operators/window.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.window([windowOpenings], [windowBoundaries], windowClosingSelector)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/window.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/window.js "View in source") Projects each element of an observable sequence into zero or more windows. @@ -15,8 +15,8 @@ Rx.Observable.prototype.window(windowBoundaries); ``` #### Arguments -1. `[windowOpenings]` *(`Observable`)*: Observable sequence whose elements denote the creation of new windows -2.`[windowBoundaries]` *(`Observable`)*: Sequence of window boundary markers. The current window is closed and a new window is opened upon receiving a boundary marker. +1. `[windowOpenings]` *(`Observable`)*: Observable sequence whose elements denote the creation of new windows +2.`[windowBoundaries]` *(`Observable`)*: Sequence of window boundary markers. The current window is closed and a new window is opened upon receiving a boundary marker. 3. `windowClosingSelector` *(`Function`)*: A function invoked to define the closing of each produced window. #### Returns @@ -38,16 +38,16 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0,1,2,3,4 -// => Next: 5,6,7,8,9,10 -// => Next: 11,12,13,14,15 -// => Completed +// => Next: 0,1,2,3,4 +// => Next: 5,6,7,8,9,10 +// => Next: 11,12,13,14,15 +// => Completed /* With window opening and window closing selector */ var win = 0; @@ -62,16 +62,16 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0,1,2 -// => Next: 3,4,5,6 -// => Next: 7,8,9,10,11,12 -// => Completed +// => Next: 0,1,2 +// => Next: 3,4,5,6 +// => Next: 7,8,9,10,11,12 +// => Completed /* With openings and closings */ var openings = Rx.Observable.timer(0, 200); @@ -86,16 +86,16 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0,1,2 -// => Next: 4,5 -// => Next: 8,9 -// => Completed +// => Next: 0,1,2 +// => Next: 4,5 +// => Next: 8,9 +// => Completed ``` ### Location @@ -119,4 +119,4 @@ NuGet Packages: - [`RxJS-Coincidence`](http://www.nuget.org/packages/RxJS-Coincidence/) Unit Tests: -- [`/tests/observable/window.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/window.js) \ No newline at end of file +- [`/tests/observable/window.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/window.js) diff --git a/doc/api/core/operators/windowwithcount.md b/doc/api/core/operators/windowwithcount.md index 76937692c..0104e3b12 100644 --- a/doc/api/core/operators/windowwithcount.md +++ b/doc/api/core/operators/windowwithcount.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.windowWithCount(count, [skip])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/windowwithcount.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/windowwithcount.js "View in source") Projects each element of an observable sequence into zero or more windows which are produced based on element count information. @@ -8,7 +8,7 @@ Projects each element of an observable sequence into zero or more windows which 2. `[skip]` *(`Number`)*: Number of elements to skip between creation of consecutive windows. If not provided, defaults to the count. #### Returns -*(`Observable`)*: An observable sequence of windows. +*(`Observable`)*: An observable sequence of windows. #### Example ```js @@ -22,42 +22,42 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 1,2 -// => Next: 3,4 -// => Next: 5,6 -// => Next: -// => Completed +// => Next: 1,2 +// => Next: 3,4 +// => Next: 5,6 +// => Next: +// => Completed /* Using a skip */ var source = Rx.Observable.range(1, 6) .windowWithCount(2, 1) - .selectMany(function (x) { return x.toArray(); }); + .selectMany(function (x) { return x.toArray(); }); var subscription = source.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 1,2 -// => Next: 2,3 -// => Next: 3,4 -// => Next: 4,5 -// => Next: 5,6 -// => Next: 6 -// => Next: -// => Completed +// => Next: 1,2 +// => Next: 2,3 +// => Next: 3,4 +// => Next: 4,5 +// => Next: 5,6 +// => Next: 6 +// => Next: +// => Completed ``` ### Location diff --git a/doc/api/core/operators/windowwithtime.md b/doc/api/core/operators/windowwithtime.md index c29dd9c16..57fc1e273 100644 --- a/doc/api/core/operators/windowwithtime.md +++ b/doc/api/core/operators/windowwithtime.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.windowWithTime(timeSpan, [timeShift | scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/windowwithtime.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/windowwithtime.js "View in source") Projects each element of an observable sequence into zero or more buffers which are produced based on timing information. @@ -9,7 +9,7 @@ Projects each element of an observable sequence into zero or more buffers which 3. `[scheduler=Rx.Scheduler.timeout]` *(`Scheduler`)*: Scheduler to run buffer timers on. If not specified, the timeout scheduler is used. #### Returns -*(`Observable`)*: An observable sequence of buffers. +*(`Observable`)*: An observable sequence of buffers. #### Example ```js @@ -26,27 +26,27 @@ var subscription = source.subscribe( console.log('Child Next: ' + x.toString()); }, function (err) { - console.log('Child Error: ' + err); + console.log('Child Error: ' + err); }, function () { - console.log('Child Completed'); + console.log('Child Completed'); } ); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Child Next: 0,1,2,3 -// => Child Completed -// => Completed -// => Child Next: 4,5,6,7,8 -// => Child Completed -// => Child Next: 9,10,11,12,13 -// => Child Completed +// => Child Next: 0,1,2,3 +// => Child Completed +// => Completed +// => Child Next: 4,5,6,7,8 +// => Child Completed +// => Child Next: 9,10,11,12,13 +// => Child Completed /* Using a skip */ var source = Rx.Observable.interval(100) @@ -61,27 +61,27 @@ var subscription = source.subscribe( console.log('Child Next: ' + x.toString()); }, function (err) { - console.log('Child Error: ' + err); + console.log('Child Error: ' + err); }, function () { - console.log('Child Completed'); + console.log('Child Completed'); } ); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Completed +// => Completed // => Child Next: 0,1,2,3,4 -// => Child Completed +// => Child Completed // => Child Next: 0,1,2,3,4,5 -// => Child Completed +// => Child Completed // => Child Next: 1,2,3,4,5,6 -// => Child Completed +// => Child Completed ``` ### Location @@ -104,4 +104,4 @@ NuGet Packages: - [`RxJS-Time`](http://www.nuget.org/packages/RxJS-Time/) Unit Tests: -- [`/tests/observable/windowwithtime.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/windowwithtime.js) \ No newline at end of file +- [`/tests/observable/windowwithtime.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/windowwithtime.js) diff --git a/doc/api/core/operators/windowwithtimeorcount.md b/doc/api/core/operators/windowwithtimeorcount.md index c5d780fde..5f6799081 100644 --- a/doc/api/core/operators/windowwithtimeorcount.md +++ b/doc/api/core/operators/windowwithtimeorcount.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.windowWithTimeOrCount(timeSpan, count, [scheduler])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/windowwithtimeorcount.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/windowwithtimeorcount.js "View in source") Projects each element of an observable sequence into a window that is completed when either it's full or a given amount of time has elapsed. @@ -9,7 +9,7 @@ Projects each element of an observable sequence into a window that is completed 3. `[scheduler=Rx.Scheduler.timeout]` *(`Scheduler`)*: Scheduler to run windows timers on. If not specified, the timeout scheduler is used. #### Returns -*(`Observable`)*: An observable sequence of windows. +*(`Observable`)*: An observable sequence of windows. #### Example ```js @@ -24,16 +24,16 @@ var subscription = source.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); -// => Next: 0,1,2 -// => Next: 3,4,5 -// => Next: 6,7,8 -// => Completed +// => Next: 0,1,2 +// => Next: 3,4,5 +// => Next: 6,7,8 +// => Completed ``` ### Location @@ -56,4 +56,4 @@ NuGet Packages: - [`RxJS-Time`](http://www.nuget.org/packages/RxJS-Time/) Unit Tests: -- [`/tests/observable/windowwithtimeorcount.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/windowwithtimeorcount.js) \ No newline at end of file +- [`/tests/observable/windowwithtimeorcount.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/tests/observable/windowwithtimeorcount.js) diff --git a/doc/api/core/operators/zip.md b/doc/api/core/operators/zip.md index c34d8d8d7..ea0932974 100644 --- a/doc/api/core/operators/zip.md +++ b/doc/api/core/operators/zip.md @@ -1,5 +1,5 @@ ### `Rx.Observable.zip(...args)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/zip.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/zip.js "View in source") Merges the specified observable sequences or Promises into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. @@ -16,22 +16,22 @@ var range = Rx.Observable.range(0, 5); var source = Observable.zip( range, - range.skip(1), - range.skip(2), + range.skip(1), + range.skip(2), function (s1, s2, s3) { return s1 + ':' + s2 + ':' + s3; } ); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0:1:2 @@ -50,16 +50,16 @@ var source = Observable.zip( return s1 + ':' + s2 + ':' + s3; } ); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0:1:2 diff --git a/doc/api/core/operators/ziparray.md b/doc/api/core/operators/ziparray.md index c7c43a7f9..7af60810d 100644 --- a/doc/api/core/operators/ziparray.md +++ b/doc/api/core/operators/ziparray.md @@ -1,5 +1,5 @@ ### `Rx.Observable.zipArray(...args)` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/ziparray.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/ziparray.js "View in source") Merges the specified observable sequences into one observable sequence by emitting a list with the elements of the observable sequences at corresponding indexes. @@ -14,22 +14,22 @@ Merges the specified observable sequences into one observable sequence by emitti var range = Rx.Observable.range(0, 5); var source = Rx.Observable.zipArray([1,2,3], function (x) { return x * x; }); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 1 -// => Next: 4 -// => Next: 9 -// => Completed +// => Next: 4 +// => Next: 9 +// => Completed ``` ### Location diff --git a/doc/api/core/operators/zipproto.md b/doc/api/core/operators/zipproto.md index 878817c76..048b00228 100644 --- a/doc/api/core/operators/zipproto.md +++ b/doc/api/core/operators/zipproto.md @@ -1,5 +1,5 @@ ### `Rx.Observable.prototype.zip(...args, [resultSelector])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/zipproto.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/zipproto.js "View in source") Merges the specified observable sequences or Promises into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index. @@ -10,7 +10,7 @@ The last element in the arguments must be a function to invoke for each series o 2. `[resultSelector]` *(`Any`)*: Function to invoke for each series of elements at corresponding indexes in the sources, used only if the first parameter is not an array. #### Returns -*(`Observable`)*: An observable sequence containing the result of combining elements of the sources using the specified result selector function. +*(`Observable`)*: An observable sequence containing the result of combining elements of the sources using the specified result selector function. #### Example ```js @@ -18,22 +18,22 @@ The last element in the arguments must be a function to invoke for each series o var range = Rx.Observable.range(0, 5); var source = range.zip( - range.skip(1), - range.skip(2), + range.skip(1), + range.skip(2), function (s1, s2, s3) { return s1 + ':' + s2 + ':' + s3; } ); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0:1:2 @@ -50,16 +50,16 @@ var source = Rx.Observable.range(0, 3) function (s1, s2) { return s1 + ':' + s2; }); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 0:3 diff --git a/doc/api/disposables/compositedisposable.md b/doc/api/disposables/compositedisposable.md index 5ff858279..d76fbea48 100644 --- a/doc/api/disposables/compositedisposable.md +++ b/doc/api/disposables/compositedisposable.md @@ -45,7 +45,7 @@ disposables.dispose(); ## _CompositeDisposable Constructor_ ## ### `Rx.CompositeDisposable(...args)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L5-L9 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L5-L9 "View in source") Initializes a new instance of the `Rx.CompositeDisposable` class from a group of disposables. @@ -79,7 +79,7 @@ disposables.dispose(); ## _CompositeDisposable Instance Methods_ ## ### `Rx.CompositeDisposable.prototype.add(item)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L17-L24 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L17-L24 "View in source") Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. @@ -108,7 +108,7 @@ disposables.dispose(); * * * ### `Rx.CompositeDisposable.prototype.clear()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L65-L72 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L65-L72 "View in source") Removes and disposes all disposables from the CompositeDisposable, but does not dispose the CompositeDisposable. @@ -138,9 +138,9 @@ console.log(disposables.length); * * * ### `Rx.CompositeDisposable.prototype.contains(item)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L79-L81 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L79-L81 "View in source") -Determines whether the CompositeDisposable contains a specific disposable. +Determines whether the CompositeDisposable contains a specific disposable. #### Arguments 1. `item` *(Disposable)*: Disposable to search for. @@ -170,9 +170,9 @@ console.log(disposables.contains(d1)); * * * ### `Rx.CompositeDisposable.prototype.dispose()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L49-L60 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L49-L60 "View in source") -Disposes all disposables in the group and removes them from the group. +Disposes all disposables in the group and removes them from the group. #### Example @@ -202,9 +202,9 @@ console.log(disposables.length); * * * ### `Rx.CompositeDisposable.prototype.remove(item)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L31-L44 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L31-L44 "View in source") -Removes and disposes the first occurrence of a disposable from the CompositeDisposable. +Removes and disposes the first occurrence of a disposable from the CompositeDisposable. #### Arguments 1. `item` *(Disposable)*: Disposable to remove. @@ -234,7 +234,7 @@ console.log(disposables.remove(d1)); * * * ### `Rx.CompositeDisposable.prototype.rxcompositedisposableprototypetoarray()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L87-L89 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L87-L89 "View in source") Converts the existing CompositeDisposable to an array of disposables @@ -269,7 +269,7 @@ console.log(array.length); ## _CompositeDisposable Instance Properties_ ## ### `isDisposed` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L7 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L7 "View in source") Gets a value that indicates whether the object is disposed. @@ -300,7 +300,7 @@ console.log(disposables.isDisposed); * * * ### `length` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L8 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/compositedisposable.js#L8 "View in source") Gets the number of disposables in the CompositeDisposable. @@ -328,4 +328,4 @@ console.log(disposables.length); - rx.js -* * * \ No newline at end of file +* * * diff --git a/doc/api/disposables/disposable.md b/doc/api/disposables/disposable.md index c3771ba2e..9415f4742 100644 --- a/doc/api/disposables/disposable.md +++ b/doc/api/disposables/disposable.md @@ -31,7 +31,7 @@ disposable.dispose(); ## _Class Methods_ ## ### `Rx.Disposable.create(action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/disposable.js#L25 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/disposable.js#L25 "View in source") Creates a disposable object that invokes the specified action when disposed. @@ -60,7 +60,7 @@ disposable.dispose(); ## _Disposable Class Properties_ ## ### `Rx.Disposable.empty` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/disposable.js#L130 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/disposable.js#L130 "View in source") Gets the disposable that does nothing when disposed. @@ -84,7 +84,7 @@ disposable.dispose(); // Does nothing ## _Disposable Instance Methods_ ## ### `Rx.Disposable.prototype.dispose()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/disposable.js#L13-L18 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/disposable.js#L13-L18 "View in source") Performs the task of cleaning up resources. @@ -103,4 +103,4 @@ disposable.dispose(); - rx.js -* * * \ No newline at end of file +* * * diff --git a/doc/api/disposables/refcountdisposable.md b/doc/api/disposables/refcountdisposable.md index 199f82799..a88b32406 100644 --- a/doc/api/disposables/refcountdisposable.md +++ b/doc/api/disposables/refcountdisposable.md @@ -47,7 +47,7 @@ console.log(refCountDisposable.isDisposed); ## _RefCountDisposable Constructor_ ## ### `Rx.RefCountDisposable(disposable)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/rxrefcountdisposable.js#L7-L10 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/rxrefcountdisposable.js#L7-L10 "View in source") Initializes a new instance of the `Rx.RefCountDisposable` class with the specified disposable @@ -75,7 +75,7 @@ console.log(refCountDisposable.isDisposed); ## _RefCountDisposable Instance Methods_ ## ### `Rx.RefCountDisposable.prototype.dispose()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/rxrefcountdisposable.js#L30-L35 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/rxrefcountdisposable.js#L30-L35 "View in source") Disposes the underlying disposable only when all dependent disposables have been disposed. @@ -112,9 +112,9 @@ console.log(refCountDisposable.isDisposed); * * * ### `Rx.RefCountDisposable.prototype.getDisposable()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/rxrefcountdisposable.js#L18-L20 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/rxrefcountdisposable.js#L18-L20 "View in source") -Returns a dependent disposable that when disposed decreases the refcount on the underlying disposable. +Returns a dependent disposable that when disposed decreases the refcount on the underlying disposable. #### Returns *(Disposable)*: A dependent disposable contributing to the reference count that manages the underlying disposable's lifetime. @@ -153,7 +153,7 @@ console.log(refCountDisposable.isDisposed); ## _RefCountDisposable Instance Properties_ ## ### `isDisposed` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/rxrefcountdisposable.js#L8 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/rxrefcountdisposable.js#L8 "View in source") Gets a value that indicates whether the object is disposed. @@ -181,4 +181,4 @@ console.log(refCountDisposable.isDisposed); - rx.js -* * * \ No newline at end of file +* * * diff --git a/doc/api/disposables/serialdisposable.md b/doc/api/disposables/serialdisposable.md index bd32368ae..866d4c1e3 100644 --- a/doc/api/disposables/serialdisposable.md +++ b/doc/api/disposables/serialdisposable.md @@ -44,7 +44,7 @@ serialDisposable.dispose(); ## _SerialDisposable Constructor_ ## ### `Rx.SerialDisposable()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/serialdisposable.js#L5-L8 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/serialdisposable.js#L5-L8 "View in source") Initializes a new instance of the `Rx.SerialDisposable` class. @@ -65,7 +65,7 @@ console.log(serialDisposable.isDisposed); ## _SerialDisposable Instance Methods_ ## ### `Rx.SerialDisposable.prototype.dispose()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/serialdisposable.js#L50-L60 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/serialdisposable.js#L50-L60 "View in source") Disposes the underlying disposable as well as all future replacements. @@ -97,9 +97,9 @@ var d2 = Rx.Disposable.create(function () { * * * ### `Rx.SerialDisposable.prototype.getDisposable()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/serialdisposable.js#L16-L18 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/serialdisposable.js#L16-L18 "View in source") -Gets the underlying disposable. +Gets the underlying disposable. #### Returns *(Disposable)*: The underlying disposable. @@ -127,9 +127,9 @@ console.log(d === disposable); * * * ### `Rx.SerialDisposable.prototype.setDisposable(value)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/serialdisposable.js#L24-L36 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/serialdisposable.js#L24-L36 "View in source") -Sets the underlying disposable. +Sets the underlying disposable. #### Arguments 1. `value` *(Disposable)*: The new underlying disposable. @@ -165,7 +165,7 @@ serialDisposable.setDisposable(d2); ## _SerialDisposable Instance Properties_ ## ### `isDisposed` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/serialdisposable.js#L6 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/serialdisposable.js#L6 "View in source") Gets a value that indicates whether the object is disposed. @@ -193,4 +193,4 @@ console.log(serialDisposable.isDisposed); - rx.js -* * * \ No newline at end of file +* * * diff --git a/doc/api/disposables/singleassignmentdisposable.md b/doc/api/disposables/singleassignmentdisposable.md index 8f2e9e8de..c546de96a 100644 --- a/doc/api/disposables/singleassignmentdisposable.md +++ b/doc/api/disposables/singleassignmentdisposable.md @@ -37,7 +37,7 @@ singleDisposable.dispose(); ## _SingleAssignmentDisposable Constructor_ ## ### `Rx.SingleAssignmentDisposable()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/singleassignmentdisposable.js#L7-L10 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/singleassignmentdisposable.js#L7-L10 "View in source") Initializes a new instance of the `Rx.SingleAssignmentDisposable` class. @@ -58,7 +58,7 @@ console.log(singleDisposable.isDisposed); ## _SingleAssignmentDisposable Instance Methods_ ## ### `Rx.SingleAssignmentDisposable.prototype.dispose()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/singleassignmentdisposable.js#L47-L57 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/singleassignmentdisposable.js#L47-L57 "View in source") Disposes the underlying disposable. @@ -90,9 +90,9 @@ console.log(singleDisposable.isDisposed); * * * ### `Rx.SingleAssignmentDisposable.prototype.getDisposable()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/singleassignmentdisposable.js#L18-L20 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/singleassignmentdisposable.js#L18-L20 "View in source") -Gets the underlying disposable. After disposal, the result of getting this method is undefined. +Gets the underlying disposable. After disposal, the result of getting this method is undefined. #### Returns *(Disposable)*: The underlying disposable. @@ -120,9 +120,9 @@ console.log(d === disposable); * * * ### `Rx.SingleAssignmentDisposable.prototype.setDisposable(value)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/singleassignmentdisposable.js#L31-L42 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/singleassignmentdisposable.js#L31-L42 "View in source") -Sets the underlying disposable. +Sets the underlying disposable. #### Arguments 1. `value` *(Disposable)*: The new underlying disposable. @@ -160,7 +160,7 @@ try { ## _SingleAssignmentDisposable Instance Properties_ ## ### `isDisposed` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/singleassignmentdisposable.js#L8 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/singleassignmentdisposable.js#L8 "View in source") Gets a value that indicates whether the object is disposed. @@ -188,4 +188,4 @@ console.log(singleDisposable.isDisposed); - rx.js -* * * \ No newline at end of file +* * * diff --git a/doc/api/helpers/readme.md b/doc/api/helpers/readme.md index 6ca01fa65..5dc4ae7ae 100644 --- a/doc/api/helpers/readme.md +++ b/doc/api/helpers/readme.md @@ -27,7 +27,7 @@ The default equality comparer, used when a comparer is not supplied to a functio #### Returns *(Boolean)*: `true` if equal; else `false`. -#### Example +#### Example ```js var comparer = Rx.helpers.defaultComparer; @@ -56,7 +56,7 @@ The default comparer to determine whether one object is greater, less than or eq #### Returns *(Number)*: Returns `1` if `x` is greater than `y`, `-1` if `y` is greater than `x`, and `0` if the objects are equal. -#### Example +#### Example ```js var comparer = Rx.helpers.defaultSubcomparer; @@ -86,14 +86,14 @@ Throws the specified error #### Arguments 1. `err` *(Any)*: The error to throw -#### Example +#### Example ```js var defaultError = Rx.helpers.defaultError; // Returns its value defaultError(new Error('woops')) -// => Error: woops +// => Error: woops ``` * * * @@ -108,7 +108,7 @@ A function which returns its value unmodified. #### Returns *(Any)*: The value given as the parameter. -#### Example +#### Example ```js var identity = Rx.helpers.identity; @@ -131,7 +131,7 @@ A function which takes an argument and returns a function, when invoked, returns #### Returns *(Function)*: A function, when invoked, returns the value. -#### Example +#### Example ```js var just = Rx.helpers.just; @@ -154,7 +154,7 @@ A function which determines whether the object is a `Promise`. #### Returns *(Boolean)*: `true` if the object is a `Promise` else `false` -#### Example +#### Example ```js var isPromise = Rx.helpers.isPromise; @@ -171,7 +171,7 @@ console.log(isPromise(p)); A function which does nothing -#### Example +#### Example ```js var noop = Rx.helpers.noop; @@ -192,7 +192,7 @@ Plucks a property from the object. #### Returns *(Boolean)*: `true` if equal; else `false`. -#### Example +#### Example ```js var pluck = Rx.helpers.pluck; diff --git a/doc/api/schedulers/historicalscheduler.md b/doc/api/schedulers/historicalscheduler.md index 021d3b75c..3196d36d3 100644 --- a/doc/api/schedulers/historicalscheduler.md +++ b/doc/api/schedulers/historicalscheduler.md @@ -1,5 +1,5 @@ ### `Rx.HistoricalScheduler` class -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/historicalscheduler.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/historicalscheduler.js "View in source") Provides a virtual time scheduler that uses a `Date` for absolute time and time spans for relative time. This inherits from the `Rx.VirtualTimeScheduler` class. @@ -35,28 +35,28 @@ while (initialDate <= 60000) { } // Subscription set -s.subscribe(function (x) { - console.log('value: ', x.value); - console.log('date: ', x.date.toGMTString()); +s.subscribe(function (x) { + console.log('value: ', x.value); + console.log('date: ', x.date.toGMTString()); }); // Run it scheduler.start(); -// => value: 0 -// => date: Thu, 1 Jan 1970 00:00:00 UTC -// => value: 2013 -// => date: Thu, 1 Jan 1970 00:00:10 UTC -// => value: 5896 -// => date: Thu, 1 Jan 1970 00:00:20 UTC -// => value: 5415 -// => date: Thu, 1 Jan 1970 00:00:30 UTC -// => value: 13411 -// => date: Thu, 1 Jan 1970 00:00:40 UTC -// => value: 15518 -// => date: Thu, 1 Jan 1970 00:00:50 UTC -// => value: 51076 -// => date: Thu, 1 Jan 1970 00:01:00 UTC +// => value: 0 +// => date: Thu, 1 Jan 1970 00:00:00 UTC +// => value: 2013 +// => date: Thu, 1 Jan 1970 00:00:10 UTC +// => value: 5896 +// => date: Thu, 1 Jan 1970 00:00:20 UTC +// => value: 5415 +// => date: Thu, 1 Jan 1970 00:00:30 UTC +// => value: 13411 +// => date: Thu, 1 Jan 1970 00:00:40 UTC +// => value: 15518 +// => date: Thu, 1 Jan 1970 00:00:50 UTC +// => value: 51076 +// => date: Thu, 1 Jan 1970 00:01:00 UTC ``` ### Location @@ -88,7 +88,7 @@ Unit Tests: ## _HistoricalScheduler Constructor_ ## ### `Rx.HistoricalScheduler([initialClock], [comparer])` -[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/historicalscheduler.js "View in source") +[Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/historicalscheduler.js "View in source") Creates a new historical scheduler with the specified initial clock value. @@ -107,5 +107,5 @@ function comparer (x, y) { var scheduler = new Rx.HistoricalScheduler( new Date(0), /* initial clock of 0 */ comparer /* comparer for determining order */ -); +); ``` diff --git a/doc/api/schedulers/scheduler.md b/doc/api/schedulers/scheduler.md index 1c05f6009..e02bda4ff 100644 --- a/doc/api/schedulers/scheduler.md +++ b/doc/api/schedulers/scheduler.md @@ -8,7 +8,7 @@ The follow example shows the basic usage of an `Rx.Scheduler`. ```js var disposable = Rx.Scheduler.timeout.scheduleWithState( - 'world', + 'world', function (x) { console.log('hello ' + x); } @@ -59,7 +59,7 @@ var disposable = Rx.Scheduler.timeout.scheduleWithState( ## _Scheduler Constructor_ ## ### `Rx.Scheduler(now, schedule, scheduleRelative, scheduleAbsolute)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L5-L9 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L5-L9 "View in source") Initializes a new instance of the `Rx.Scheduler`. This is meant for Scheduler implementers and not normal usage. @@ -103,7 +103,7 @@ function scheduleRelative(state, dueTime, action) { disposable.setDisposable(action(scheduler, state)); } }, dt); - + return new CompositeDisposable(disposable, disposableCreate(function () { window.clearTimeout(id); })); @@ -137,14 +137,14 @@ var handle = timeoutScheduler.schedule(function () { ## _Scheduler Instance Methods_ ## ### `Rx.Scheduler.prototype.catch(handler)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L65-L72 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L65-L72 "View in source") Returns a scheduler that wraps the original scheduler, adding exception handling for scheduled actions. There is an alias of `catchException` for browsers < IE9. #### Arguments 1. `handler` *(Function)*: Handler that's run if an exception is caught. The exception will be rethrown if the handler returns `false`. -#### Returns +#### Returns *(Scheduler)*: Wrapper around the original scheduler, enforcing exception handling. #### Example @@ -165,7 +165,7 @@ function inherits (ctor, superCtor) { inherits (SchedulerError, Error); function SchedulerError(message) { - Error.call(this, message); + Error.call(this, message); } var scheduler = Rx.Scheduler.timeout; @@ -175,11 +175,11 @@ var catchScheduler = scheduler.catchException(function (e) { // Throws no exception var d1 = catchScheduler.schedule(function () { - throw new SchedulerError('woops'); + throw new SchedulerError('woops'); }); var d2 = catchScheduler.schedule(function () { - throw new Error('woops'); + throw new Error('woops'); }); // => Uncaught Error: woops @@ -192,11 +192,11 @@ var d2 = catchScheduler.schedule(function () { * * * ### `Rx.Scheduler.prototype.now()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L17-L24 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L17-L24 "View in source") Gets the current time according to the Scheduler implementation. -#### Returns +#### Returns *(Number)*: The current time according to the Scheduler implementation. #### Example @@ -217,7 +217,7 @@ console.log(now); ### Standard Scheduling ### ### `Rx.Scheduler.prototype.schedule(action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L112-114 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L112-114 "View in source") Schedules an action to be executed. @@ -231,7 +231,7 @@ Schedules an action to be executed. ```js var disposable = Rx.Scheduler.immediate.schedule(function () { - console.log('hello'); + console.log('hello'); }); // => hello @@ -247,7 +247,7 @@ disposable.dispose(); * * * ### `Rx.Scheduler.prototype.scheduleWithState(state, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L122-124 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L122-124 "View in source") Schedules an action to be executed with state. @@ -262,7 +262,7 @@ Schedules an action to be executed with state. ```js var disposable = Rx.Scheduler.immediate.scheduleWithState('world', function (x) { - console.log('hello ' + x); + console.log('hello ' + x); }); // => hello world @@ -278,9 +278,9 @@ disposable.dispose(); * * * ### `Rx.Scheduler.prototype.scheduleWithAbsolute(duetime, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L153-155 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L153-155 "View in source") -Schedules an action to be executed at the specified absolute due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. +Schedules an action to be executed at the specified absolute due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. #### Arguments 1. `dueTime` *(Number)*: Absolute time at which to execute the action. @@ -295,7 +295,7 @@ Schedules an action to be executed at the specified absolute due time. Note this var disposable = Rx.Scheduler.timeout.scheduleWithAbsolute( Date.now() + 5000, /* 5 seconds in the future */ function () { - console.log('hello'); + console.log('hello'); } ); @@ -309,9 +309,9 @@ var disposable = Rx.Scheduler.timeout.scheduleWithAbsolute( * * * ### `Rx.Scheduler.prototype.scheduleWithAbsoluteAndState(state, duetime, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L164-166 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L164-166 "View in source") -Schedules an action to be executed at the specified absolute due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. +Schedules an action to be executed at the specified absolute due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. #### Arguments 1. `state` *(Any)*: State passed to the action to be executed. @@ -328,7 +328,7 @@ var disposable = Rx.Scheduler.timeout.scheduleWithAbsolute( 'world', Date.now() + 5000, /* 5 seconds in the future */ function (x) { - console.log('hello ' + x); + console.log('hello ' + x); } ); @@ -342,9 +342,9 @@ var disposable = Rx.Scheduler.timeout.scheduleWithAbsolute( * * * ### `Rx.Scheduler.prototype.scheduleWithRelative(duetime, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L132-134 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L132-134 "View in source") -Schedules an action to be executed after the specified relative due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. +Schedules an action to be executed after the specified relative due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. #### Arguments 1. `dueTime` *(Number)*: Relative time at which to execute the action. @@ -359,7 +359,7 @@ Schedules an action to be executed after the specified relative due time. Note t var disposable = Rx.Scheduler.timeout.scheduleWithRelative( 5000, /* 5 seconds in the future */ function () { - console.log('hello'); + console.log('hello'); } ); @@ -373,9 +373,9 @@ var disposable = Rx.Scheduler.timeout.scheduleWithRelative( * * * ### `Rx.Scheduler.prototype.scheduleWithRelativeAndState(state, duetime, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L164-166 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L164-166 "View in source") -Schedules an action to be executed at the specified relative due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. +Schedules an action to be executed at the specified relative due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. #### Arguments 1. `state` *(Any)*: State passed to the action to be executed. @@ -392,7 +392,7 @@ var disposable = Rx.Scheduler.timeout.scheduleWithAbsolute( 'world', 5000, /* 5 seconds in the future */ function (x) { - console.log('hello ' + x); + console.log('hello ' + x); } ); @@ -408,7 +408,7 @@ var disposable = Rx.Scheduler.timeout.scheduleWithAbsolute( ### Recursive Scheduling ### ### `Rx.Scheduler.prototype.scheduleRecursive(action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L173-179 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L173-179 "View in source") Schedules an action to be executed recursively. @@ -428,7 +428,7 @@ var disposable = Rx.Scheduler.immediate.scheduleRecursive( console.log(i); if (++i < 3) { self(i); - } + } } ); @@ -444,7 +444,7 @@ var disposable = Rx.Scheduler.immediate.scheduleRecursive( * * * ### `Rx.Scheduler.prototype.scheduleRecursiveWithState(state, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L122-124 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L122-124 "View in source") Schedules an action to be executed with state. @@ -459,12 +459,12 @@ Schedules an action to be executed with state. ```js var disposable = Rx.Scheduler.immediate.scheduleRecursiveWithState( - 0, + 0, function (i, self) { console.log(i); if (++i < 3) { self(i); - } + } } ); @@ -480,9 +480,9 @@ var disposable = Rx.Scheduler.immediate.scheduleRecursiveWithState( * * * ### `Rx.Scheduler.prototype.scheduleRecursiveWithAbsolute(duetime, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L226-232 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L226-232 "View in source") -Schedules an action to be executed recursively at a specified absolute due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. +Schedules an action to be executed recursively at a specified absolute due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. #### Arguments 1. `dueTime` *(Number)*: Absolute time at which to execute the action for the first time. @@ -503,7 +503,7 @@ var disposable = Rx.Scheduler.timeout.scheduleRecursiveWithAbsolute( if (++i < 3) { // Schedule mutliplied by a second by position self(Date.now() + (i * 1000)); - } + } } ); @@ -519,9 +519,9 @@ var disposable = Rx.Scheduler.timeout.scheduleRecursiveWithAbsolute( * * * ### `Rx.Scheduler.prototype.scheduleRecursiveWithAbsoluteAndState(state, duetime, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L241-L245 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L241-L245 "View in source") -Schedules an action to be executed recursively at a specified absolute due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. +Schedules an action to be executed recursively at a specified absolute due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. #### Arguments 1. `state` *(Any)*: State passed to the action to be executed. @@ -542,7 +542,7 @@ var disposable = Rx.Scheduler.timeout.scheduleRecursiveWithAbsoluteAndState( if (++i < 3) { // Schedule mutliplied by a second by position self(i, Date.now() + (i * 1000)); - } + } } ); @@ -558,9 +558,9 @@ var disposable = Rx.Scheduler.timeout.scheduleRecursiveWithAbsoluteAndState( * * * ### `Rx.Scheduler.prototype.scheduleRecursiveWithRelative(duetime, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L199-L205 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L199-L205 "View in source") -Schedules an action to be executed recursively at a specified relative due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. +Schedules an action to be executed recursively at a specified relative due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. #### Arguments 1. `dueTime` *(Number)*: Relative time at which to execute the action for the first time. @@ -581,7 +581,7 @@ var disposable = Rx.Scheduler.timeout.scheduleRecursiveWithRelative( if (++i < 3) { // Schedule mutliplied by a second by position self(i * 1000); - } + } } ); @@ -597,9 +597,9 @@ var disposable = Rx.Scheduler.timeout.scheduleRecursiveWithRelative( * * * ### `Rx.Scheduler.prototype.scheduleRecursiveWithAbsoluteAndState(state, duetime, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L214-218 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L214-218 "View in source") -Schedules an action to be executed recursively at a specified relative due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. +Schedules an action to be executed recursively at a specified relative due time. Note this only works with the built-in `Rx.Scheduler.timeout` scheduler, as the rest will throw an exception as the framework does not allow for blocking. #### Arguments 1. `state` *(Any)*: State passed to the action to be executed. @@ -620,7 +620,7 @@ var disposable = Rx.Scheduler.timeout.scheduleRecursiveWithRelativeAndState( if (++i < 3) { // Schedule mutliplied by a second by position self(i, i * 1000); - } + } } ); @@ -638,9 +638,9 @@ var disposable = Rx.Scheduler.timeout.scheduleRecursiveWithRelativeAndState( ### Periodic Scheduling ### ### `Rx.Scheduler.prototype.schedulePeriodic(period, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L85-L89 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L85-L89 "View in source") - Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using `window.setInterval` for the base implementation. + Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using `window.setInterval` for the base implementation. #### Arguments 1. `period` *(Number)*: Period for running the work periodically in ms. @@ -655,7 +655,7 @@ var disposable = Rx.Scheduler.timeout.scheduleRecursiveWithRelativeAndState( var i = 0; var disposable = Rx.Scheduler.timeout.schedulePeriodic( - 1000, /* 1 second */ + 1000, /* 1 second */ function () { console.log(i); @@ -678,7 +678,7 @@ var disposable = Rx.Scheduler.timeout.schedulePeriodic( * * * ### `Rx.Scheduler.prototype.schedulePeriodicWithState(state, period, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L98-L104 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L98-L104 "View in source") Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using `window.setInterval` for the base implementation. @@ -695,7 +695,7 @@ Schedules a periodic piece of work by dynamically discovering the scheduler's ca ```js var disposable = Rx.Scheduler.timeout.schedulePeriodicWithState( 0, - 1000, /* 1 second */ + 1000, /* 1 second */ function (i) { console.log(i); @@ -722,7 +722,7 @@ var disposable = Rx.Scheduler.timeout.schedulePeriodicWithState( ## _Scheduler Class Methods_ ## ### `Rx.Scheduler.normalize(dueTime)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L255-L260 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/scheduler.js#L255-L260 "View in source") Normalizes the specified time span value to a positive value. @@ -753,7 +753,7 @@ console.log(r1); ## _Scheduler Class Properties_ ## ### `Rx.Scheduler.currentThread` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/currentthreadscheduler.js#L4-L68 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/currentthreadscheduler.js#L4-L68 "View in source") Gets a scheduler that schedules work as soon as possible on the current thread. This implementation does not support relative and absolute scheduling due to thread blocking required. @@ -777,7 +777,7 @@ var disposable = scheduler.scheduleWithState( * * * ### `Rx.Scheduler.immediate` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/immediatescheduler.js#L6-L22 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/immediatescheduler.js#L6-L22 "View in source") Gets a scheduler that schedules work immediately on the current thread. @@ -807,9 +807,9 @@ var disposable = scheduler.scheduleRecursiveWithState( * * * ### `Rx.Scheduler.timeout` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/timeoutscheduler.js#L88-L125 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/disposables/timeoutscheduler.js#L88-L125 "View in source") -Gets a scheduler that schedules work via a timed callback based upon platform. +Gets a scheduler that schedules work via a timed callback based upon platform. For all schedule calls, it defaults to: @@ -836,4 +836,4 @@ var disposable = scheduler.scheduleWithState( - rx.js -* * * \ No newline at end of file +* * * diff --git a/doc/api/schedulers/virtualtimescheduler.md b/doc/api/schedulers/virtualtimescheduler.md index 15c7259c7..96d4e3e1e 100644 --- a/doc/api/schedulers/virtualtimescheduler.md +++ b/doc/api/schedulers/virtualtimescheduler.md @@ -27,7 +27,7 @@ scheduler.add = function (absolute, relative) { }; /** - * Converts an absolute time to a number + * Converts an absolute time to a number * @param {Number} The absolute time in ms * @returns {Number} The absolute time in ms */ @@ -36,7 +36,7 @@ scheduler.toDateTimeOffset = function (absolute) { }; /** - * Converts the time span number/Date to a relative virtual time value. + * Converts the time span number/Date to a relative virtual time value. * @param {Number} timeSpan TimeSpan value to convert. * @return {Number} Corresponding relative virtual time value. */ @@ -99,7 +99,7 @@ console.log(scheduler.clock); ## _VirtualTimeScheduler Constructor_ ## ### `Rx.VirtualTimeScheduler(initialClock, comparer)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L38-L44 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L38-L44 "View in source") Creates a new virtual time scheduler with the specified initial clock value and absolute time comparer. @@ -118,7 +118,7 @@ function comparer (x, y) { var scheduler = new Rx.VirtualTimeScheduler( 0, /* initial clock of 0 */ comparer /* comparer for determining order */ -); +); ``` ### Location @@ -130,7 +130,7 @@ var scheduler = new Rx.VirtualTimeScheduler( ## _VirtualTimeScheduler Instance Methods_ ## ### `Rx.VirtualTimeScheduler.prototype.advanceBy(time)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L166-L176 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L166-L176 "View in source") Advances the scheduler's clock by the specified relative time, running all work scheduled for that timespan. @@ -161,7 +161,7 @@ console.log(scheduler.clock); * * * ### `Rx.VirtualTimeScheduler.prototype.advanceTo(time)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L136-L160 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L136-L160 "View in source") Advances the scheduler's clock to the specified time, running all work till that point. @@ -182,7 +182,6 @@ scheduler.scheduleAbsolute(200, function () { console.log('world'); }); - scheduler.advanceBy(300); // => hello // => world @@ -198,9 +197,9 @@ console.log(scheduler.clock); * * * ### `Rx.VirtualTimeScheduler.prototype.scheduleAbsolute(dueTime, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L216-L218 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L216-L218 "View in source") -Schedules an action to be executed at dueTime. +Schedules an action to be executed at dueTime. #### Arguments 1. `dueTime` *(Any)*: Absolute time at which to execute the action. @@ -223,7 +222,6 @@ scheduler.scheduleAbsolute(200, function () { console.log('world'); }); - scheduler.advanceBy(300); // => hello // => world @@ -239,9 +237,9 @@ console.log(scheduler.clock); * * * ### `Rx.VirtualTimeScheduler.prototype.scheduleAbsoluteWithState(state, dueTime, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L227-L236 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L227-L236 "View in source") -Schedules an action to be executed at dueTime. +Schedules an action to be executed at dueTime. #### Arguments 1. `state`: *(Any)*: State passed to the action to be executed. @@ -265,7 +263,6 @@ scheduler.scheduleAbsoluteWithState(200, function () { console.log('goodnight ' + x); }, 'moon'); - scheduler.start(); // => hello world // => goodnight moon @@ -281,9 +278,9 @@ console.log(scheduler.clock); * * * ### `Rx.VirtualTimeScheduler.prototype.scheduleRelative(dueTime, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L100-L102 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L100-L102 "View in source") -Schedules an action to be executed at dueTime. +Schedules an action to be executed at dueTime. #### Arguments 1. `dueTime` *(Any)*: Relative time after which to execute the action. @@ -321,9 +318,9 @@ console.log(scheduler.clock); * * * ### `Rx.VirtualTimeScheduler.prototype.scheduleRelativeWithState(state, dueTime, action)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L89-L92 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L89-L92 "View in source") -Schedules an action to be executed at dueTime. +Schedules an action to be executed at dueTime. #### Arguments 1. `state`: *(Any)*: State passed to the action to be executed. @@ -347,7 +344,6 @@ scheduler.scheduleRelativeWithState('moon', 200, function () { console.log('goodnight ' + x); }); - scheduler.start(); // => hello world // => goodnight moon @@ -363,9 +359,9 @@ console.log(scheduler.clock); * * * ### `Rx.VirtualTimeScheduler.prototype.sleep(time)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L182-L190 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L182-L190 "View in source") -Advances the scheduler's clock by the specified relative time. +Advances the scheduler's clock by the specified relative time. #### Arguments 1. `time` *(Any)*: Relative time to advance the scheduler's clock by. @@ -389,9 +385,9 @@ console.log(scheduler.clock); * * * ### `Rx.VirtualTimeScheduler.prototype.start()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L107-L123 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L107-L123 "View in source") -Starts the virtual time scheduler. +Starts the virtual time scheduler. #### Example ```js @@ -407,7 +403,6 @@ scheduler.scheduleRelativeWithState('moon', 200, function () { console.log('goodnight ' + x); }); - scheduler.start(); // => hello world // => goodnight moon @@ -423,9 +418,9 @@ console.log(scheduler.clock); * * * ### `Rx.VirtualTimeScheduler.prototype.stop()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L128-L130 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/concurrency/virtualtimescheduler.js#L128-L130 "View in source") -Stops the virtual time scheduler. +Stops the virtual time scheduler. #### Example ```js @@ -445,7 +440,6 @@ scheduler.scheduleRelative(100, function () { console.log('hello world'); }); - scheduler.start(); // => hello world ``` @@ -459,7 +453,7 @@ scheduler.start(); ## _VirtualTimeScheduler Abstract Protected Methods_ ## ### `Rx.VirtualTimeScheduler.prototype.add(absolute, relative)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/asyncsubject.js#L54 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/asyncsubject.js#L54 "View in source") Adds a relative time value to an absolute time value. This method is used in several methods including `scheduleRelativeWithState`, `advanceBy` and `sleep`. @@ -487,7 +481,7 @@ scheduler.add = function (absolute, relative) { * * * ### `Rx.VirtualTimeScheduler.prototype.toDateTimeOffset(absolute)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/asyncsubject.js#L61 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/asyncsubject.js#L61 "View in source") Converts an absolute time to a number. This is used directly in the `now` method on the `Rx.Scheduler` @@ -515,9 +509,9 @@ scheduler.toDateTimeOffset = function (absolute) { * * * ### `Rx.VirtualTimeScheduler.prototype.toRelative(timeSpan)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/asyncsubject.js#L61 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/asyncsubject.js#L61 "View in source") -Converts the time span number/Date to a relative virtual time value. +Converts the time span number/Date to a relative virtual time value. ### Arguments 1. `timeSpan` *(Any)*: The time span number value to convert. This is used directly in `scheduleWithRelativeAndState` and `scheduleWithAbsoluteAndState`. @@ -541,5 +535,3 @@ scheduler.toRelative = function (timeSpan) { - rx.virtualtime.js * * * - - diff --git a/doc/api/subjects/asyncsubject.md b/doc/api/subjects/asyncsubject.md index 7ccb861d5..05e95b939 100644 --- a/doc/api/subjects/asyncsubject.md +++ b/doc/api/subjects/asyncsubject.md @@ -25,10 +25,10 @@ var subscription = subject.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 3 @@ -53,7 +53,7 @@ var subscription = subject.subscribe( ## _AsyncSubject Constructor_ ## ### `Rx.AsyncSubject()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/asyncsubject.js#L33-L42 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/asyncsubject.js#L33-L42 "View in source") Creates a subject that can only receive one value and that value is cached for all future observations. @@ -63,16 +63,16 @@ var subject = new Rx.AsyncSubject(); subject.onNext(42); subject.onCompleted(); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => 42 @@ -88,23 +88,23 @@ var subscription = source.subscribe( ## _AsyncSubject Instance Methods_ ## ### `Rx.AsyncSubject.prototype.dispose()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/asyncsubject.js#L111-L116 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/asyncsubject.js#L111-L116 "View in source") Unsubscribe all observers and release resources. #### Example ```js var subject = new Rx.AsyncSubject(); - + var subscription = subject.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); subject.onNext(42); @@ -121,7 +121,7 @@ try { console.log(e.message); } -// => Object has been disposed +// => Object has been disposed ``` ### Location @@ -131,7 +131,7 @@ try { * * * ### `Rx.AsyncSubject.prototype.hasObservers()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/asyncsubject.js#L49-L51 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/asyncsubject.js#L49-L51 "View in source") Indicates whether the subject has observers subscribed to it. @@ -145,16 +145,16 @@ var subject = new Rx.AsyncSubject(); console.log(subject.hasObservers()); // => false - + var subscription = subject.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); console.log(subject.hasObservers()); @@ -167,4 +167,3 @@ console.log(subject.hasObservers()); - rx.js * * * - diff --git a/doc/api/subjects/behaviorsubject.md b/doc/api/subjects/behaviorsubject.md index 1390c0c2d..97c90a214 100644 --- a/doc/api/subjects/behaviorsubject.md +++ b/doc/api/subjects/behaviorsubject.md @@ -17,10 +17,10 @@ var subscription = subject.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 42 @@ -50,7 +50,7 @@ subject.onCompleted(); ## _BehaviorSubject Constructor_ ## ### `Rx.BehaviorSubject(initialValue)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/behaviorsubject.js#L30-L37 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/behaviorsubject.js#L30-L37 "View in source") Initializes a new instance of the `Rx.BehaviorSubject` class which creates a subject that caches its last value and starts with the specified value. @@ -61,18 +61,17 @@ Initializes a new instance of the `Rx.BehaviorSubject` class which creates a sub ```js var subject = new Rx.BehaviorSubject(56); - subject.onCompleted(); - + var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: 56 @@ -93,23 +92,23 @@ subject.onCompleted(); ## _BehaviorSubject Instance Methods_ ## ### `Rx.BehaviorSubject.prototype.dispose()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/behaviorsubject.js#L97-L102 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/behaviorsubject.js#L97-L102 "View in source") Unsubscribe all observers and release resources. #### Example ```js var subject = new Rx.BehaviorSubject(); - + var subscription = subject.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); subject.onNext(42); @@ -126,7 +125,7 @@ try { console.log(e.message); } -// => Object has been disposed +// => Object has been disposed ``` ### Location @@ -136,7 +135,7 @@ try { * * * ### `Rx.BehaviorSubject.prototype.hasObservers()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/behaviorsubject.js#L44-L46 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/behaviorsubject.js#L44-L46 "View in source") Indicates whether the subject has observers subscribed to it. @@ -150,16 +149,16 @@ var subject = new Rx.BehaviorSubject(); console.log(subject.hasObservers()); // => false - + var subscription = subject.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); console.log(subject.hasObservers()); @@ -172,4 +171,3 @@ console.log(subject.hasObservers()); = rx.binding.js * * * - diff --git a/doc/api/subjects/replaysubject.md b/doc/api/subjects/replaysubject.md index a9d6b8753..c1ee0ed31 100644 --- a/doc/api/subjects/replaysubject.md +++ b/doc/api/subjects/replaysubject.md @@ -20,10 +20,10 @@ var subscription = subject.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: b @@ -51,7 +51,7 @@ subject.onNext('d'); ## _ReplaySubject Constructor_ ## ### `Rx.ReplaySubject([bufferSize], [windowSize], [scheduler])` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/replaysubject.js#L53-L64 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/replaysubject.js#L53-L64 "View in source") Initializes a new instance of the `Rx.ReplaySubject` class with the specified buffer size, window and scheduler. @@ -63,7 +63,7 @@ Initializes a new instance of the `Rx.ReplaySubject` class with the specified bu #### Example ```js var subject = new Rx.ReplaySubject( - 2 /* buffer size */, + 2 /* buffer size */, null /* unlimited time buffer */, Rx.Scheduler.timeout); @@ -76,10 +76,10 @@ var subscription = subject.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); // => Next: b @@ -98,23 +98,23 @@ subject.onNext('d'); ## _ReplaySubject Instance Methods_ ## ### `Rx.ReplaySubject.prototype.dispose()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/ReplaySubject.js#L147-L150 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/ReplaySubject.js#L147-L150 "View in source") Unsubscribe all observers and release resources. #### Example ```js var subject = new Rx.ReplaySubject(); - + var subscription = subject.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); subject.onNext(42); @@ -131,7 +131,7 @@ try { console.log(e.message); } -// => Object has been disposed +// => Object has been disposed ``` ### Location @@ -141,7 +141,7 @@ try { * * * ### `Rx.ReplaySubject.prototype.hasObservers()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/ReplaySubject.js#L71-L73 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/ReplaySubject.js#L71-L73 "View in source") Indicates whether the subject has observers subscribed to it. @@ -155,16 +155,16 @@ var subject = new Rx.ReplaySubject(); console.log(subject.hasObservers()); // => false - + var subscription = subject.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); console.log(subject.hasObservers()); @@ -177,4 +177,3 @@ console.log(subject.hasObservers()); - rx.binding.js * * * - diff --git a/doc/api/subjects/subject.md b/doc/api/subjects/subject.md index a8f395393..b1358d8c0 100644 --- a/doc/api/subjects/subject.md +++ b/doc/api/subjects/subject.md @@ -16,10 +16,10 @@ var subscription = subject.subscribe( console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); subject.onNext(42); @@ -56,7 +56,7 @@ subject.onCompleted(); ## _Subject Constructor_ ## ### `Rx.Subject()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/subject.js#L26-L31 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/subject.js#L26-L31 "View in source") Creates a subject. @@ -69,10 +69,10 @@ var subscription = source.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); subject.onNext(42); @@ -91,7 +91,7 @@ subject.onCompleted(); ## _Subject Class Methods_ ## ### `Rx.Subject.create(observer, observable)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/subject.js#L101-L103 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/subject.js#L101-L103 "View in source") Creates a subject from the specified observer and observable. @@ -124,7 +124,7 @@ var observer = Rx.Observer.create( // Create observable to handle the messages var observable = Rx.Observable.create(function (obs) { - + worker.onmessage = function (data) { obs.onNext(data); }; @@ -135,7 +135,7 @@ var observable = Rx.Observable.create(function (obs) { return function () { worker.close(); - }; + }; }); var subject = Rx.Subject.create(observer, observable); @@ -145,10 +145,10 @@ var subscription = subject.subscribe( console.log('Next: ' + x); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); subject.onNext(42); @@ -165,23 +165,23 @@ subject.onNext(42); ## _Subject Instance Methods_ ## ### `Rx.Subject.prototype.dispose()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/subject.js#L89-L92 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/subject.js#L89-L92 "View in source") Unsubscribe all observers and release resources. #### Example ```js var subject = new Rx.Subject(); - + var subscription = subject.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); subject.onNext(42); @@ -198,7 +198,7 @@ try { console.log(e.message); } -// => Object has been disposed +// => Object has been disposed ``` ### Location @@ -208,7 +208,7 @@ try { * * * ### `Rx.Subject.prototype.hasObservers()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/subject.js#L38-L40 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/subjects/subject.js#L38-L40 "View in source") Indicates whether the subject has observers subscribed to it. @@ -221,16 +221,16 @@ var subject = new Rx.Subject(); console.log(subject.hasObservers()); // => false - + var subscription = subject.subscribe( function (x) { console.log('Next: ' + x.toString()); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); console.log(subject.hasObservers()); @@ -242,4 +242,3 @@ console.log(subject.hasObservers()); - rx.js * * * - diff --git a/doc/api/testing/reactivetest.md b/doc/api/testing/reactivetest.md index d365ff569..3c9f71205 100644 --- a/doc/api/testing/reactivetest.md +++ b/doc/api/testing/reactivetest.md @@ -20,7 +20,7 @@ This class contains test utility methods such as create notifications for testin ## _ReactiveTest Class Methods_ ## ### `Rx.ReactiveTest.onCompleted(ticks)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/reactivetest.js#L89-L91 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/reactivetest.js#L89-L91 "View in source") Factory method for an OnCompleted notification record at a given time. @@ -57,7 +57,7 @@ collectionAssert(res, [ * * * ### `Rx.ReactiveTest.onError(ticks, exception)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/reactivetest.js#L77-L82 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/reactivetest.js#L77-L82 "View in source") Factory method for an OnError notification record at a given time with a given error. @@ -66,7 +66,7 @@ Factory method for an OnError notification record at a given time with a given e 2. `exception` *(Error | Function)*: Recorded exception stored in the OnError notification or a predicate #### Returns -*(Recorded)*: Recorded OnError notification. +*(Recorded)*: Recorded OnError notification. #### Example @@ -100,7 +100,7 @@ collectionAssert(res, [ * * * ### `Rx.ReactiveTest.onNext(ticks, value)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/reactivetest.js#L61-L66 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/reactivetest.js#L61-L66 "View in source") Factory method for an OnNext notification record at a given time with a given error. @@ -109,7 +109,7 @@ Factory method for an OnNext notification record at a given time with a given er 2. `value` *(Any | Function)*: Recorded exception stored in the OnNext notification or a predicate #### Returns -*(Recorded)*: Recorded OnNext notification. +*(Recorded)*: Recorded OnNext notification. #### Example @@ -145,7 +145,7 @@ collectionAssert(res, [ ## _ReactiveTest Class Fields_ ## ### `Rx.ReactiveTest.created` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/reactivetest.js#L45 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/reactivetest.js#L45 "View in source") Default virtual time used for creation of observable sequences in unit tests. This has a value of `100`. @@ -175,7 +175,7 @@ var res = scheduler.startWithTiming( * * * ### `Rx.ReactiveTest.disposed` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/reactivetest.js#L49 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/reactivetest.js#L49 "View in source") Default virtual time used to dispose subscriptions in unit tests. This has a value of `1000`. @@ -205,7 +205,7 @@ var res = scheduler.startWithTiming( * * * ### `Rx.ReactiveTest.subscribed` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/reactivetest.js#L47 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/reactivetest.js#L47 "View in source") Default virtual time used to subscribe to observable sequences in unit tests. This has a value of `200`. @@ -232,4 +232,4 @@ var res = scheduler.startWithTiming( - rx.testing.js -* * * \ No newline at end of file +* * * diff --git a/doc/api/testing/recorded.md b/doc/api/testing/recorded.md index c4a7f1bfa..0f048f592 100644 --- a/doc/api/testing/recorded.md +++ b/doc/api/testing/recorded.md @@ -20,7 +20,7 @@ Record of a value including the virtual time it was produced on. ## _Recorded Constructor_ ## ### `Rx.Recorded(time, value, [comparer])` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/recorded.js#L9-L13 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/recorded.js#L9-L13 "View in source") Creates a new object recording the production of the specified value at the given virtual time. @@ -49,7 +49,7 @@ console.log(recorded.value); ## _Recorded Instance Methods_ ## ### `Rx.Recorded.prototype.equals(other)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/recorded.js#L21-L23 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/recorded.js#L21-L23 "View in source") Checks whether the given recorded object is equal to the current instance. @@ -80,12 +80,12 @@ console.log(r1.equals(r3)); * * * ### `Rx.Recorded.prototype.toString()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/recorded.js#L30-L32 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/recorded.js#L30-L32 "View in source") Returns a string representation of the current Recorded value. #### Returns -*(String)*: String representation of the current Recorded value. +*(String)*: String representation of the current Recorded value. #### Example @@ -105,7 +105,7 @@ console.log(r1.toString()); ## _Recorded Instance Properties_ ## ### `time` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/recorded.js#L10 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/recorded.js#L10 "View in source") Gets the virtual time the value was produced on. @@ -128,7 +128,7 @@ console.log(r1.time); * * * ### `value` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/recorded.js#L11 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/recorded.js#L11 "View in source") Gets the recorded value. diff --git a/doc/api/testing/subscription.md b/doc/api/testing/subscription.md index 3e8a1d4ea..0e640c284 100644 --- a/doc/api/testing/subscription.md +++ b/doc/api/testing/subscription.md @@ -20,7 +20,7 @@ Records information about subscriptions to and unsubscriptions from observable s ## _Subscription Constructor_ ## ### `Rx.Subscription(subscribe, unsubscribe)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/subscription.js#L8-L11 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/subscription.js#L8-L11 "View in source") Creates a new subscription object with the given virtual subscription and unsubscription time. @@ -48,7 +48,7 @@ console.log(recorded.unsubscribe); ## _Subscription Instance Methods_ ## ### `Rx.Subscription.prototype.equals(other)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/subscription.js#L18-L20 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/subscription.js#L18-L20 "View in source") Checks whether the given subscription is equal to the current instance. @@ -79,12 +79,12 @@ console.log(s1.equals(s3)); * * * ### `Rx.Subscription.prototype.toString()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/subscription.js#L30-L32 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/subscription.js#L30-L32 "View in source") Returns a string representation of the current Subscription value. #### Returns -*(String)*: String representation of the current Subscription value. +*(String)*: String representation of the current Subscription value. #### Example @@ -108,7 +108,7 @@ console.log(s2.toString()); ## _Subscription Instance Properties_ ## ### `subscribe` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/subscription.js#L8 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/subscription.js#L8 "View in source") Gets the subscription virtual time. @@ -131,7 +131,7 @@ console.log(s1.subscribe); * * * ### `unsubscribe` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/subscription.js#L9 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/subscription.js#L9 "View in source") Gets the unsubscription virtual time. diff --git a/doc/api/testing/testscheduler.md b/doc/api/testing/testscheduler.md index bceba1af7..377a70c5f 100644 --- a/doc/api/testing/testscheduler.md +++ b/doc/api/testing/testscheduler.md @@ -49,7 +49,7 @@ var xs = scheduler.createHotObservable( // Note we'll start at 200 for subscribe, hence missing the 150 mark var res = scheduler.startWithCreate(function () { - return xs.map(function (x) { return x * x }); + return xs.map(function (x) { return x * x }); }); // Implement collection assertion @@ -87,7 +87,7 @@ collectionAssert.assertEqual(xs.subscriptions, [ ## _TestScheduler Constructor_ ## ### `Rx.TestScheduler()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L10-L12 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L10-L12 "View in source") Creates a new virtual time test scheduler. @@ -108,7 +108,7 @@ var xs = scheduler.createHotObservable( // Note we'll start at 200 for subscribe, hence missing the 150 mark var res = scheduler.startWithCreate(function () { - return xs.map(function (x) { return x * x }); + return xs.map(function (x) { return x * x }); }); // Implement collection assertion @@ -133,7 +133,7 @@ collectionAssert.assertEqual(xs.subscriptions, [ ## _TestScheduler Instance Methods_ ## ### `Rx.TestScheduler.prototype.createColdObservable(...args)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L118-L121 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L118-L121 "View in source") Creates a cold observable using the specified timestamped notification messages. @@ -160,7 +160,7 @@ var xs = scheduler.createColdObservable( // Note we'll start at 200 for subscribe var res = scheduler.startWithCreate(function () { - return xs.filter(function (x) { return x % 2 === 0; }); + return xs.filter(function (x) { return x % 2 === 0; }); }); // Implement collection assertion @@ -182,7 +182,7 @@ collectionAssert.assertEqual(xs.subscriptions, [ * * * ### `Rx.TestScheduler.prototype.createHotObservable(...args)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L108-L111 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L108-L111 "View in source") Creates a hot observable using the specified timestamped notification messages. @@ -209,7 +209,7 @@ var xs = scheduler.createHotObservable( // Note we'll start at 200 for subscribe, hence missing the 150 mark var res = scheduler.startWithCreate(function () { - return xs.map(function (x) { return x * x }); + return xs.map(function (x) { return x * x }); }); // Implement collection assertion @@ -232,7 +232,7 @@ collectionAssert.assertEqual(xs.subscriptions, [ * * * ### `Rx.TestScheduler.prototype.createObserver()` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L127-L129 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L127-L129 "View in source") Creates an observer that records received notification messages and timestamps those. @@ -276,7 +276,7 @@ collectionAssert.assertEqual(res.messages, [ * * * ### `Rx.TestScheduler.prototype.startWithCreate(create)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L99-L101 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L99-L101 "View in source") Starts the test scheduler and uses default virtual times to invoke the factory function, to subscribe to the resulting sequence, and to dispose the subscription. @@ -303,7 +303,7 @@ var xs = scheduler.createColdObservable( // Note we'll start at 200 for subscribe var res = scheduler.startWithCreate(function () { - return xs.filter(function (x) { return x % 2 === 0; }); + return xs.filter(function (x) { return x % 2 === 0; }); }); // Implement collection assertion @@ -325,7 +325,7 @@ collectionAssert.assertEqual(xs.subscriptions, [ * * * ### `Rx.TestScheduler.prototype.startWithDispose(create, disposed)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L90-L92 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L90-L92 "View in source") Starts the test scheduler and uses the specified virtual time to dispose the subscription to the sequence obtained through the factory function. Default virtual times are used for factory invocation and sequence subscription. @@ -355,7 +355,7 @@ var xs = scheduler.createHotObservable( // Note we'll start at 200 for subscribe, hence missing the 150 mark var res = scheduler.startWithDispose( function () { - return xs.map(function (x) { return x * x }); + return xs.map(function (x) { return x * x }); }, 215 /* Dispose at 215 */ ); @@ -379,7 +379,7 @@ collectionAssert.assertEqual(xs.subscriptions, [ * * * ### `Rx.TestScheduler.prototype.startWithTiming(create, created, subscribed, disposed)` -# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L65-L81 "View in source") +# [Ⓢ](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/testing/testscheduler.js#L65-L81 "View in source") Starts the test scheduler and uses the specified virtual times to invoke the factory function, subscribe to the resulting sequence, and dispose the subscription. @@ -411,7 +411,7 @@ var xs = scheduler.createHotObservable( // Note we'll start at 200 for subscribe, hence missing the 150 mark var res = scheduler.startWithTiming( function () { - return xs.map(function (x) { return x * x }); + return xs.map(function (x) { return x * x }); }, 100, /* Create at 100 */ 200, /* Subscribe at 200 */ @@ -435,4 +435,4 @@ collectionAssert.assertEqual(xs.subscriptions, [ - rx.testing.js -* * * \ No newline at end of file +* * * diff --git a/doc/gettingstarted/categories.md b/doc/gettingstarted/categories.md index b7065e607..4f13829cf 100644 --- a/doc/gettingstarted/categories.md +++ b/doc/gettingstarted/categories.md @@ -185,10 +185,10 @@ This topic lists all major operators implemented by the [`Observable`](https://g Primitives
    -
  1. empty
  2. -
  3. never
  4. +
  5. empty
  6. +
  7. never
  8. return
  9. -
  10. throw
  11. +
  12. throw
diff --git a/doc/gettingstarted/creating.md b/doc/gettingstarted/creating.md index aeb550530..0430b258a 100644 --- a/doc/gettingstarted/creating.md +++ b/doc/gettingstarted/creating.md @@ -4,7 +4,7 @@ You do not need to implement the `Observable` class manually to create an observ ## Creating a sequence from scratch ## -Before getting into many operators, let's look at how to create an `Observable` from scratch using the [`Rx.Observable.create`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#rxobservablecreatesubscribe) method. +Before getting into many operators, let's look at how to create an `Observable` from scratch using the [`Rx.Observable.create`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#rxobservablecreatesubscribe) method. First, we need to ensure we reference the core `rx.js` file. @@ -48,7 +48,7 @@ For most operations, this is completely overkill, but shows the very basics of h ## Creating and subscribing to a simple sequence ## -The following sample uses the [`range`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#rxobservablerangestart-count-scheduler) operator of the `Observable` type to create a simple observable collection of numbers. The observer subscribes to this collection using the Subscribe method of the Observable class, and provides actions that are delegates which handle `onNext`, `onError` and `onCompleted`. In our example, it creates a sequence of integers that starts with x and produces y sequential numbers afterwards. +The following sample uses the [`range`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#rxobservablerangestart-count-scheduler) operator of the `Observable` type to create a simple observable collection of numbers. The observer subscribes to this collection using the Subscribe method of the Observable class, and provides actions that are delegates which handle `onNext`, `onError` and `onCompleted`. In our example, it creates a sequence of integers that starts with x and produces y sequential numbers afterwards. As soon as the subscription happens, the values are sent to the observer. The `onNext` function then prints out the values. @@ -75,7 +75,7 @@ When an observer subscribes to an observable sequence, the `subscribe` method ma Notice that the [`subscribe`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#rxobservableprototypesubscribeobserver--onnext-onerror-oncompleted) method returns a `Disposable`, so that you can unsubscribe to a sequence and dispose of it easily. When you invoke the `dispose` method on the observable sequence, the observer will stop listening to the observable for data. Normally, you do not need to explicitly call `dispose` unless you need to unsubscribe early, or when the source observable sequence has a longer life span than the observer. Subscriptions in Rx are designed for fire-and-forget scenarios without the usage of a finalizer. Note that the default behavior of the Observable operators is to dispose of the subscription as soon as possible (i.e, when an `onCompleted` or `onError` messages is published). For example, the code will subscribe x to both sequences a and b. If a throws an error, x will immediately be unsubscribed from b. ```js -var x = Rx.Observable.zip(a, b, function (a1, b1) { return a1 + b1; }).subscribe(); +var x = Rx.Observable.zip(a, b, function (a1, b1) { return a1 + b1; }).subscribe(); ``` You can also tweak the code sample to use the Create operator of the Observer type, which creates and returns an observer from specified OnNext, OnError, and OnCompleted action delegates. You can then pass this observer to the Subscribe method of the Observable type. The following sample shows how to do this. @@ -131,11 +131,10 @@ var subscription = source.subscribe( console.log(x.value + ': ' + x.timestamp); }); - /* Output may be similar to this */ // Current time: 1382560697820 -// 0: 1382560702820 -// 1: 1382560703820 +// 0: 1382560702820 +// 1: 1382560703820 // 2: 1382560704820 ``` @@ -183,7 +182,7 @@ First, we need to ensure we reference the proper files if in the browser. Note And now to the example. ```js -var source = Rx.Observable.interval(1000); +var source = Rx.Observable.interval(1000); var subscription1 = source.subscribe( function (x) { console.log('Observer 1: onNext: ' + x); }, @@ -200,31 +199,31 @@ setTimeout(function () { subscription2.dispose(); }, 5000); -// => Observer 1: onNext: 0 -// => Observer 2: onNext: 0 -// => Observer 1: onNext: 1 -// => Observer 2: onNext: 1 -// => Observer 1: onNext: 2 -// => Observer 2: onNext: 2 -// => Observer 1: onNext: 3 -// => Observer 2: onNext: 3 +// => Observer 1: onNext: 0 +// => Observer 2: onNext: 0 +// => Observer 1: onNext: 1 +// => Observer 2: onNext: 1 +// => Observer 1: onNext: 2 +// => Observer 2: onNext: 2 +// => Observer 1: onNext: 3 +// => Observer 2: onNext: 3 ``` In the following example, we convert the previous cold observable sequence source to a hot one using the [`publish`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#rxobservableprototypepublishselector) operator, which returns a `ConnectableObservable` instance we name `hot`. The [`publish`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#rxobservableprototypepublishselector) operator provides a mechanism to share subscriptions by broadcasting a single subscription to multiple subscribers. The `hot` variable acts as a proxy by subscribing to `source` and, as it receives values from `source`, pushing them to its own subscribers. To establish a subscription to the backing source and start receiving values, we use the [`ConnectableObservable.prototype.connect`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#connectableobservableprototypeconnect) method. Since `ConnectableObservable` inherits `Observable`, we can use `subscribe` to subscribe to this hot sequence even before it starts running. Notice that in the example, the hot sequence has not been started when `subscription1` subscribes to it. Therefore, no value is pushed to the subscriber. After calling Connect, values are then pushed to `subscription1`. After a delay of 3 seconds, `subscription2` subscribes to `hot` and starts receiving the values immediately from the current position (3 in this case) until the end. The output looks like this: ``` -// => Current time: 1382562433256 -// => Current Time after 1st subscription: 1382562433260 -// => Current Time after connect: 1382562436261 -// => Observer 1: onNext: 0 -// => Observer 1: onNext: 1 -// => Current Time after 2nd subscription: 1382562439262 -// => Observer 1: onNext: 2 -// => Observer 2: onNext: 2 -// => Observer 1: onNext: 3 -// => Observer 2: onNext: 3 -// => Observer 1: onNext: 4 -// => Observer 2: onNext: 4 +// => Current time: 1382562433256 +// => Current Time after 1st subscription: 1382562433260 +// => Current Time after connect: 1382562436261 +// => Observer 1: onNext: 0 +// => Observer 1: onNext: 1 +// => Current Time after 2nd subscription: 1382562439262 +// => Observer 1: onNext: 2 +// => Observer 2: onNext: 2 +// => Observer 1: onNext: 3 +// => Observer 2: onNext: 3 +// => Observer 1: onNext: 4 +// => Observer 2: onNext: 4 ``` First, we need to ensure we reference the proper files if in the browser. Note that the RxJS NPM Package already includes all operators by default. @@ -241,7 +240,7 @@ Now onto the example! console.log('Current time: ' + Date.now()); // Creates a sequence -var source = Rx.Observable.interval(1000); +var source = Rx.Observable.interval(1000); // Convert the sequence into a hot sequence var hot = source.publish(); @@ -256,8 +255,8 @@ console.log('Current Time after 1st subscription: ' + Date.now()); // Idle for 3 seconds setTimeout(function () { - - // Hot is connected to source and starts pushing value to subscribers + + // Hot is connected to source and starts pushing value to subscribers hot.connect(); console.log('Current Time after connect: ' + Date.now()); @@ -270,7 +269,7 @@ setTimeout(function () { var subscription2 = hot.subscribe( function (x) { console.log('Observer 2: onNext: ' + x); }, function (e) { console.log('Observer 2: onError: ' + e.message); }, - function () { console.log('Observer 2: onCompleted'); }); + function () { console.log('Observer 2: onCompleted'); }); }, 3000); }, 3000); diff --git a/doc/gettingstarted/creatingquerying.md b/doc/gettingstarted/creatingquerying.md index 9dd48984a..08874cbf9 100644 --- a/doc/gettingstarted/creatingquerying.md +++ b/doc/gettingstarted/creatingquerying.md @@ -6,4 +6,4 @@ This section describes how you can create and subscribe to an observable sequenc 2. [Bridging to Events](events.md) 3. [Bridging to Callbacks and Promises](callbacks.md) 4. [Querying Observable Sequences](querying.md) -5. [Operators by Category](categories.md) \ No newline at end of file +5. [Operators by Category](categories.md) diff --git a/doc/gettingstarted/events.md b/doc/gettingstarted/events.md index 9c2653b4a..97f763596 100644 --- a/doc/gettingstarted/events.md +++ b/doc/gettingstarted/events.md @@ -11,7 +11,7 @@ The following sample creates a simple DOM event handler for the mouse move event ```js var result = document.getElementById('result'); -document.addEventListener('mousemove', function (e) { +document.addEventListener('mousemove', function (e) { result.innerHTML = e.clientX + ', ' + e.clientY; }, false); ``` @@ -34,7 +34,7 @@ Notice that in this sample, move becomes an observable sequence in which we can Cleaning up of the event handler is taken care of by the `Disposable` object returned by the `subscribe` method. Calling `dispose` will release all resources being used by the sequence including the underlying event handler. This essentially takes care of unsubscribing to an event on your behalf. -The `fromEvent` method also supports adding event handlers to multiple items, for example a DOM NodeList. This example will add the 'click' to each element in the list. +The `fromEvent` method also supports adding event handlers to multiple items, for example a DOM NodeList. This example will add the 'click' to each element in the list. ``` var result = document.getElementById('result'); @@ -127,10 +127,10 @@ require(['dojo/on', 'dojo/dom', 'rx', 'rx.async', 'rx.binding'], function (on, d console.log('Next: Clicked!'); }, function (err) { - console.log('Error: ' + err); + console.log('Error: ' + err); }, function () { - console.log('Completed'); + console.log('Completed'); }); on.emit(input, 'click'); diff --git a/doc/gettingstarted/exploring.md b/doc/gettingstarted/exploring.md index 84807db59..30d6b04c2 100644 --- a/doc/gettingstarted/exploring.md +++ b/doc/gettingstarted/exploring.md @@ -6,7 +6,7 @@ The `Observable` / `Observer` objects are available in the core distribution of ## `Observable` / `Observer` ## -Rx exposes asynchronous and event-based data sources as push-based, observable sequences abstracted by the [`Observable`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md) object in the core distribution of RxJS. It represents a data source that can be observed, meaning that it can send data to anyone who is interested. +Rx exposes asynchronous and event-based data sources as push-based, observable sequences abstracted by the [`Observable`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md) object in the core distribution of RxJS. It represents a data source that can be observed, meaning that it can send data to anyone who is interested. As described in [What is RxJS](what.md), the other half of the push model is represented by the [`Observer`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observer.md) object, which represents an observer who registers an interest through a subscription. Items are subsequently handed to the observer from the observable sequence to which it subscribes. @@ -17,8 +17,8 @@ Observers support three publication events, reflected by the object's methods. T The following lists the `Observable` / `Observer` objects in addition to the `Disposable` object. ```js -/** - * Defines a method to release allocated resources. +/** + * Defines a method to release allocated resources. */ function Disposable() { } @@ -27,7 +27,6 @@ function Disposable() { } */ Disposable.prototype.dispose = function () { ... } - /** * Defines a provider for push-based notification. */ @@ -41,7 +40,6 @@ function Observable() { } */ Observable.prototype.subscribe = function (observer) { ... } - /** * Provides a mechanism for receiving push-based notifications. */ @@ -54,7 +52,7 @@ function Observer() { } */ Observer.prototype.onNext = function (value) { ... }; -/** +/** * Notifies the observer that the provider has experienced an error condition. * * @param {Error} error An object that provides additional information about the error. @@ -98,4 +96,4 @@ Concepts - [Querying Observable Sequences](querying.md) Other Resources -- [Creating and Querying Observable Sequences](creatingquerying.md) \ No newline at end of file +- [Creating and Querying Observable Sequences](creatingquerying.md) diff --git a/doc/gettingstarted/operators.md b/doc/gettingstarted/operators.md index 555149710..83594c86a 100644 --- a/doc/gettingstarted/operators.md +++ b/doc/gettingstarted/operators.md @@ -10,7 +10,7 @@ For example, let's see how we might implement the [_.where](http://lodash.com/do ```js Rx.Observable.prototype.whereProperties = function (properties) { - var source = this, + var source = this, comparer = Rx.Internals.equals; return Rx.Observable.filterByProperties(function (observer) { @@ -47,7 +47,7 @@ Many existing operators, such as this, instead could be built using other basic ```js Rx.Observable.prototype.flatMap = function (selector) { - return this.map(selector).mergeObservable(); + return this.map(selector).mergeObservable(); }; ``` @@ -105,8 +105,8 @@ test('filterProperties should yield with match', function () { collectionAssert.assertEqual(input.subscriptions, [ subscribe(200, 230) - ]); -}); + ]); +}); ``` In order for this to be successfully tested, we should check for when there is no data, empty, single matches, multiple matches and so forth. @@ -115,5 +115,3 @@ In order for this to be successfully tested, we should check for when there is n **Resources** - [Testing and Debugging](testing.md) - - diff --git a/doc/gettingstarted/querying.md b/doc/gettingstarted/querying.md index f85f1d39f..ab0e388d3 100644 --- a/doc/gettingstarted/querying.md +++ b/doc/gettingstarted/querying.md @@ -104,8 +104,8 @@ var points = move.map(function (e) { }); points.subscribe( - function (pos) { - console.log('Mouse at point ' + pos.x + ', ' + pos.y); + function (pos) { + console.log('Mouse at point ' + pos.x + ', ' + pos.y); }); ``` @@ -137,12 +137,12 @@ var subscription = resultSeq.subscribe( ## Filtering ## In the following example, we use the [`generate`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#rxobservablegenerateinitialstate-condition-iterate-resultselector-scheduler) operator to create a simple observable sequence of numbers. The `generate` operator has several versions including with relative and absolute time scheduling. In our example, it takes an initial state (0 in our example), a conditional function to terminate (fewer than 10 times), an iterator (+1), a result selector (a square function of the current value), and prints out only those smaller than 5 using the [`filter`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#rxobservableprototypefilterpredicate-thisarg) or [`where`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#rxobservableprototypewherepredicate-thisarg) operators. - + ```js var seq = Rx.Observable.generate( - 0, - function (i) { return i < 10; }, - function (i) { return i + 1; }, + 0, + function (i) { return i < 10; }, + function (i) { return i + 1; }, function (i) { return i * i; }); var source = seq.filter(function (n) { return n < 5; }); @@ -178,7 +178,7 @@ var movesub = overfirstbisector.subscribe(function (pos) { console.log('mouse at You can use the Buffer operators to perform time-based operations. -Buffering an observable sequence means that an observable sequence’s values are put into a buffer based on either a specified timespan or by a count threshold. This is especially helpful in situations when you expect a tremendous amount of data to be pushed out by the sequence, and the subscriber does not have the resource to process these values. By buffering the results based on time or count, and only returning a sequence of values when the criteria is exceeded (or when the source sequence has completed), the subscriber can process OnNext calls at its own pace. +Buffering an observable sequence means that an observable sequence’s values are put into a buffer based on either a specified timespan or by a count threshold. This is especially helpful in situations when you expect a tremendous amount of data to be pushed out by the sequence, and the subscriber does not have the resource to process these values. By buffering the results based on time or count, and only returning a sequence of values when the criteria is exceeded (or when the source sequence has completed), the subscriber can process OnNext calls at its own pace. In the following example, we first create a simple sequence of integers for every second. We then use the `bufferWithCount` operator and specify that each buffer will hold 5 items from the sequence. The `onNext` is called when the buffer is full. We then tally the sum of the buffer using calling `Array.reduce`. The buffer is automatically flushed and another cycle begins. The printout will be 10, 35, 60… in which 10=0+1+2+3+4, 35=5+6+7+8+9, and so on. diff --git a/doc/gettingstarted/schedulers.md b/doc/gettingstarted/schedulers.md index 410471dba..31faca4cb 100644 --- a/doc/gettingstarted/schedulers.md +++ b/doc/gettingstarted/schedulers.md @@ -24,7 +24,7 @@ var obs = Rx.Observable.generate( function (x) { return x; }); ``` -This will queue up on the observer quickly. We can improve this code by using the observeOn operator, which allows you to specify the context that you want to use to send pushed notifications (onNext) to observers. By default, the [`observeOn`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/observeon.md) operator ensures that `onNext` will be called as many times as possible on the current thread. You can use its overloads and redirect the `onNext` outputs to a different context. In addition, you can use the [`subscribeOn`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/subscribeon.md) operator to return a proxy observable that delegates actions to a specific scheduler. For example, for a UI-intensive application, you can delegate all background operations to be performed on a scheduler running in the background by using `subscribeOn` and passing to it the `TimeoutScheduler`. +This will queue up on the observer quickly. We can improve this code by using the observeOn operator, which allows you to specify the context that you want to use to send pushed notifications (onNext) to observers. By default, the [`observeOn`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/observeon.md) operator ensures that `onNext` will be called as many times as possible on the current thread. You can use its overloads and redirect the `onNext` outputs to a different context. In addition, you can use the [`subscribeOn`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/subscribeon.md) operator to return a proxy observable that delegates actions to a specific scheduler. For example, for a UI-intensive application, you can delegate all background operations to be performed on a scheduler running in the background by using `subscribeOn` and passing to it the `TimeoutScheduler`. The following example will schedule any onNext notifications on the current Dispatcher, so that any value pushed out is sent on the UI thread. This is especially beneficial to Silverlight developers who use RxJS. @@ -95,11 +95,11 @@ To make things a little easier when you are creating your own operators, or usin Historical Data Operations Rx.HistoricalScheduler - + Unit Testing Rx.TestScheduler - + ## See Also diff --git a/doc/gettingstarted/subjects.md b/doc/gettingstarted/subjects.md index a61211dcd..2fee6b5a4 100644 --- a/doc/gettingstarted/subjects.md +++ b/doc/gettingstarted/subjects.md @@ -2,7 +2,7 @@ The [`Subject`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/subjects/subject.md) class inherits both [`Observable`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md) and [`Observer`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observer.md), in the sense that it is both an observer and an observable. You can use a subject to subscribe all the observers, and then subscribe the subject to a backend data source. In this way, the subject can act as a proxy for a group of subscribers and a source. You can use subjects to implement a custom observable with caching, buffering and time shifting. In addition, you can use subjects to broadcast data to multiple subscribers. -By default, subjects do not perform any synchronization across threads. They do not take a scheduler but rather assume that all serialization and grammatical correctness are handled by the caller of the subject. A subject simply broadcasts to all subscribed observers in the thread-safe list of subscribers. Doing so has the advantage of reducing overhead and improving performance. +By default, subjects do not perform any synchronization across threads. They do not take a scheduler but rather assume that all serialization and grammatical correctness are handled by the caller of the subject. A subject simply broadcasts to all subscribed observers in the thread-safe list of subscribers. Doing so has the advantage of reducing overhead and improving performance. ## Using Subjects ## @@ -35,7 +35,7 @@ The following example illustrates the proxy and broadcast nature of a `Subject`. ```js // Every second -var source = Rx.Observable.interval(1000); +var source = Rx.Observable.interval(1000); var subject = new Rx.Subject(); @@ -55,19 +55,19 @@ setTimeout(function () { // Clean up subject.onCompleted(); subSubject1.dispose(); - subSubject2.dispose(); + subSubject2.dispose(); }, 5000); -// => Value published to observer #1: 0 -// => Value published to observer #2: 0 -// => Value published to observer #1: 1 -// => Value published to observer #2: 1 -// => Value published to observer #1: 2 -// => Value published to observer #2: 2 -// => Value published to observer #1: 3 -// => Value published to observer #2: 3 -// => onCompleted -// => onCompleted +// => Value published to observer #1: 0 +// => Value published to observer #2: 0 +// => Value published to observer #1: 1 +// => Value published to observer #2: 1 +// => Value published to observer #1: 2 +// => Value published to observer #2: 2 +// => Value published to observer #1: 3 +// => Value published to observer #2: 3 +// => onCompleted +// => onCompleted ``` diff --git a/doc/gettingstarted/testing.md b/doc/gettingstarted/testing.md index e61d52eca..824520683 100644 --- a/doc/gettingstarted/testing.md +++ b/doc/gettingstarted/testing.md @@ -58,15 +58,15 @@ test('buffer should join strings', function () { var results = scheduler.startWithTiming( function () { - return input.buffer(function () { + return input.buffer(function () { return input.throttle(100, scheduler); }) .map(function (b) { return b.join(','); }); - }, + }, 50, // created - 150, // subscribed + 150, // subscribed 600 // disposed ); @@ -80,8 +80,8 @@ test('buffer should join strings', function () { subscribe(150, 500), subscribe(150, 400), subscribe(400, 500) - ]); -}); + ]); +}); ``` ## Debugging your Rx application ## @@ -97,14 +97,14 @@ var seq1 = Rx.Observable.interval(1000) .do(function (x) { console.log('buffer is full')) .subscribe(function (x) { console.log('Sum of the buffer is ' + x.reduce(function (acc, x) { return acc + x; }, 0)); }); -// => 0 -// => 1 -// => 2 -// => 3 -// => 4 -// => buffer is full +// => 0 +// => 1 +// => 2 +// => 3 +// => 4 +// => buffer is full // => Sum of the buffer is 10 -// ... +// ... ``` As you can see from this sample, a subscription is on the recipient end of a series of chained observable sequences. At first, we create an observable sequence of integers separate by a second using the Interval operator. Then, we put 5 items into a buffer using the Buffer operator, and send them out as another sequence only when the buffer is full. Lastly, this is handed over to the Subscribe operator. Data propagate down all these intermediate sequences until they are pushed to the observer. In the same way, subscriptions are propagated in the reverse direction to the source sequence. By inserting the `do` operator in the middle of such propagations, you can "spy" on such data flow just like you use console.log perform debugging. @@ -117,19 +117,19 @@ console.log('Current time: ' + Date.now()); var source = Rx.Observable.timer(5000, 1000) .timestamp(); -var subscription = source.subscribe(function (x) { - console.log(x.value + ': ' + x.timestamp); +var subscription = source.subscribe(function (x) { + console.log(x.value + ': ' + x.timestamp); }); /* Output will look similar to this */ -// => Current time: 1382646947400 -// => 0: 1382646952400 +// => Current time: 1382646947400 +// => 0: 1382646952400 // => 1: 1382646953400 -// => 2: 1382646954400 -// => 3: 1382646955400 -// => 4: 1382646956400 -// => 5: 1382646957400 -// => 6: 1382646958400 +// => 2: 1382646954400 +// => 3: 1382646955400 +// => 4: 1382646956400 +// => 5: 1382646957400 +// => 6: 1382646958400 ``` By using the `timestamp` operator, we have verified that the first item is indeed pushed out 5 seconds after the sequence, and each item is published 1 second later. diff --git a/doc/gettingstarted/what.md b/doc/gettingstarted/what.md index 1bc9dc1a4..832a68c5b 100644 --- a/doc/gettingstarted/what.md +++ b/doc/gettingstarted/what.md @@ -9,7 +9,7 @@ Using RxJS, you can represent multiple asynchronous data streams (that come from Because observable sequences are data streams, you can query them using standard query operators implemented by the Observable extension methods. Thus you can filter, project, aggregate, compose and perform time-based operations on multiple events easily by using these standard query operators. In addition, there are a number of other reactive stream specific operators that allow powerful queries to be written. Cancellation, exceptions, and synchronization are also handled gracefully by using the extension methods provided by Rx. RxJS complements and interoperates smoothly with both synchronous data streams such as Arrays, Sets and Maps and single-value asynchronous computations such as Promises as the following diagram shows: - + @@ -34,4 +34,3 @@ On the other hand, in reactive programming, the application is offered more info This is the push pattern employed by Reactive Extensions for JavaScript. This is similar to joining a book club in which you register your interest in a particular genre, and books that match your interest are automatically sent to you as they are published. You do not need to stand in a line to acquire something that you want. Employing a push pattern is especially helpful in heavy UI environment in which the UI thread cannot be blocked while the application is waiting for some events, which is essential in JavaScript environments which has its own set of asynchronous requirements. In summary, by using RxJS, you can make your application more responsive. The push model implemented by Rx is represented by the observable pattern of `Observable`/`Observer`. The `Observable` will notify all the observers automatically of any state changes. To register an interest through a subscription, you use the `subscribe` method of `Observable`, which takes on an `Observer` and returns a `Disposable` object. This gives you the ability to track your subscription and be able to dispose the subscription. You can essentially treat the observable sequence (such as a sequence of mouseover events) as if it were a normal collection. RxJS’s built-in query implementation over observable sequences allows developers to compose complex event processing queries over push-based sequences such as events, callbacks, Promises, HTML5 Geolocation APIs, and much much more.. For more information on these two interfaces, see Exploring The Major Concepts in RxJS. - diff --git a/doc/howdoi/angular.md b/doc/howdoi/angular.md index 2228e22b7..7e1548413 100644 --- a/doc/howdoi/angular.md +++ b/doc/howdoi/angular.md @@ -13,13 +13,13 @@ Scopes provide the ability to observe change mutations on the scope through the var scope = $rootScope; scope.name = 'Reactive Extensions'; scope.counter = 0; - + scope.$watch('name', function(newValue, oldValue) { scope.counter = scope.counter + 1; scope.oldValue = oldValue; scope.newValue = newValue; }); - + scope.name = 'RxJS'; // Process All the Watchers @@ -57,11 +57,11 @@ scope.data = []; // Watch for name change and throttle it for 1 second and then query a service Rx.Observable.$watch(scope, 'name') - .throttle(1000) + .throttle(1000) .map(function (e) { return e.newValue; }) - .do(function () { + .do(function () { // Set loading and reset data scope.isLoading = true; scope.data = []; @@ -84,7 +84,7 @@ $http.get('/someUrl') .then(successCallback, errCallback); ``` -Using the Reactive Extensions for JavaScript, we can also integrate using the `Rx.Observable.fromPromise` bridge available in RxJS version 2.2+. We simply +Using the Reactive Extensions for JavaScript, we can also integrate using the `Rx.Observable.fromPromise` bridge available in RxJS version 2.2+. We simply ```js // Query data @@ -107,4 +107,4 @@ observable.subscribe( ); ``` -These are just only the beginnings of what you can do with the Reactive Extensions for JavaScript and AngularJS. \ No newline at end of file +These are just only the beginnings of what you can do with the Reactive Extensions for JavaScript and AngularJS. diff --git a/doc/howdoi/createcustomoperators.md b/doc/howdoi/createcustomoperators.md index f64178a24..eb57e2f6c 100644 --- a/doc/howdoi/createcustomoperators.md +++ b/doc/howdoi/createcustomoperators.md @@ -1,9 +1,7 @@ # Creating Your Own Custom Operators - - Final Result ```js -``` \ No newline at end of file +``` diff --git a/doc/howdoi/eventemitter.md b/doc/howdoi/eventemitter.md index edeadafa2..2dd8e5dec 100644 --- a/doc/howdoi/eventemitter.md +++ b/doc/howdoi/eventemitter.md @@ -66,7 +66,7 @@ Emitter.prototype.off = function (name, handler) { Emitter.prototype.dispose = function () { var subjects = this.subjects; - for (var prop in subjects) { + for (var prop in subjects) { if (hasOwnProp.call(subjects, prop)) { subjects[prop].dispose(); } @@ -76,7 +76,7 @@ Emitter.prototype.dispose = function () { }; ``` -Then we can use it much as we did above. As the call to `subscribe` returns a subscription, we might want to hand that back to the user instead of providing an off method. So, we could rewrite the above where we call the `on` method to `listen` and we return a subscription handle to the user to stop listening. +Then we can use it much as we did above. As the call to `subscribe` returns a subscription, we might want to hand that back to the user instead of providing an off method. So, we could rewrite the above where we call the `on` method to `listen` and we return a subscription handle to the user to stop listening. ```js var hasOwnProp = {}.hasOwnProperty; @@ -103,7 +103,7 @@ Emitter.prototype.listen = function (name, handler) { Emitter.prototype.dispose = function () { var subjects = this.subjects; - for (var prop in subjects) { + for (var prop in subjects) { if (hasOwnProp.call(subjects, prop)) { subjects[prop].dispose(); } @@ -128,4 +128,3 @@ emitter.emit('data', 'foo'); // Destroy the subscription subscription.dispose(); ``` - diff --git a/doc/howdoi/jquery.md b/doc/howdoi/jquery.md index 09f121f67..c1e298e4d 100644 --- a/doc/howdoi/jquery.md +++ b/doc/howdoi/jquery.md @@ -1,6 +1,6 @@ # How do I work with jQuery and RxJS # -The [jQuery](http://jquery.com) project and RxJS play very well together as libraries. In fact, we supply bindings directly for RxJS to jQuery should you want to wrap animations, events, Ajax calls and more using Observables in [RxJS-jQuery](https://github.com/Reactive-Extensions/RxJS-jQuery). The bindings library provides many handy features for bridging the world to Observables. If you're interested in that library, go ahead and use it. +The [jQuery](http://jquery.com) project and RxJS play very well together as libraries. In fact, we supply bindings directly for RxJS to jQuery should you want to wrap animations, events, Ajax calls and more using Observables in [RxJS-jQuery](https://github.com/Reactive-Extensions/RxJS-jQuery). The bindings library provides many handy features for bridging the world to Observables. If you're interested in that library, go ahead and use it. ## Using RxJS with Rx-jQuery ## @@ -18,7 +18,7 @@ Now we can start using the bindings! For example, we can listen to a `click` ev ```js $( "#go" ).clickAsObservable().flatMap(function () { - + return $( "#block" ).animateAsObservable({ width: "70%", opacity: 0.4, @@ -68,7 +68,7 @@ We could go a step further and create our own jQuery plugin which handles events * @returns {Observable} An observable sequence of events from the specified element and the specified event. */ jQuery.fn.toObservable = function (eventName, selector) { - return Rx.Observable.fromEvent(this, eventName, selector); + return Rx.Observable.fromEvent(this, eventName, selector); }; ``` diff --git a/doc/howdoi/wrap.md b/doc/howdoi/wrap.md index e26cc18f2..cb9ed02c1 100644 --- a/doc/howdoi/wrap.md +++ b/doc/howdoi/wrap.md @@ -36,10 +36,10 @@ function watchPosition(geolocationOptions) { var watchId = window.navigator.geolocation.watchPosition( function successHandler (loc) { observer.onNext(loc); - }, + }, function errorHandler (err) { observer.onError(err); - }, + }, geolocationOptions); return function () { @@ -49,7 +49,7 @@ function watchPosition(geolocationOptions) { } ``` -We need to also be aware of ensuring we're not adding too many watchPosition calls as we compose it together with other observable sequences. To do that, we'll need to utilize the [`publish`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#rxobservableprototypepublishselector) and [`refCount`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#connectableobservableprototyperefcount) methods from rx.binding.js. +We need to also be aware of ensuring we're not adding too many watchPosition calls as we compose it together with other observable sequences. To do that, we'll need to utilize the [`publish`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#rxobservableprototypepublishselector) and [`refCount`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md#connectableobservableprototyperefcount) methods from rx.binding.js. Our final result should look like the following: @@ -59,10 +59,10 @@ function watchPosition(geolocationOptions) { var watchId = window.navigator.geolocation.watchPosition( function successHandler (loc) { observer.onNext(loc); - }, + }, function errorHandler (err) { observer.onError(err); - }, + }, geolocationOptions); return function () { @@ -99,4 +99,4 @@ var subscription = source.subscribe( function () { console.log('Completed'); }); -``` \ No newline at end of file +``` diff --git a/doc/libraries/rx.aggregates.md b/doc/libraries/rx.aggregates.md index ddd9812f7..9bbeca9c5 100644 --- a/doc/libraries/rx.aggregates.md +++ b/doc/libraries/rx.aggregates.md @@ -5,7 +5,7 @@ The Reactive Extensions for JavaScript has a number of aggregation operators inc ## Details ## Files: -- [`rx.aggregates.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.aggregates.js) +- [`rx.aggregates.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.aggregates.js) NPM Packages: - [`rx`](https://www.npmjs.org/package/rx) diff --git a/doc/libraries/rx.backpressure.md b/doc/libraries/rx.backpressure.md index 8702e2458..394a6f2ac 100644 --- a/doc/libraries/rx.backpressure.md +++ b/doc/libraries/rx.backpressure.md @@ -29,4 +29,3 @@ NuGet Dependencies: - [`controlled`](../api/core/operators/controlled.md) - [`pausable`](../api/core/operators/pausable.md) - [`pausableBuffered`](../api/core/operators/pausablebuffered.md) - diff --git a/doc/libraries/rx.binding.md b/doc/libraries/rx.binding.md index 47ad0119b..37940de4d 100644 --- a/doc/libraries/rx.binding.md +++ b/doc/libraries/rx.binding.md @@ -41,4 +41,3 @@ NuGet Dependencies: - [`Rx.BehaviorSubject`](../api/core/observable.mdapi/subjects/behaviorsubject.md) - [`Rx.ReplaySubject`](../api/core/observable.mdapi/subjects/replaysubject.md) - diff --git a/doc/libraries/rx.coincidence.md b/doc/libraries/rx.coincidence.md index 4b96b4dd5..620894496 100644 --- a/doc/libraries/rx.coincidence.md +++ b/doc/libraries/rx.coincidence.md @@ -30,4 +30,4 @@ NuGet Dependencies: - [`join`](../api/core/operators/join.md) - [`pairwise`](../api/core/operators/pairwise.md) - [`partition`](../api/core/operators/partition.md) -- [`window`](../api/core/operators/window.md) \ No newline at end of file +- [`window`](../api/core/operators/window.md) diff --git a/doc/libraries/rx.joinpatterns.md b/doc/libraries/rx.joinpatterns.md index 8a036648f..8d2a322ff 100644 --- a/doc/libraries/rx.joinpatterns.md +++ b/doc/libraries/rx.joinpatterns.md @@ -30,4 +30,4 @@ NuGet Dependencies: - [`and`](../api/core/operators/and.md) ### `Pattern Instance Methods` -- [`then`](../api/core/operators/thendo.md) \ No newline at end of file +- [`then`](../api/core/operators/thendo.md) diff --git a/doc/libraries/rx.lite.md b/doc/libraries/rx.lite.md index 2270f3148..87cca738a 100644 --- a/doc/libraries/rx.lite.md +++ b/doc/libraries/rx.lite.md @@ -7,7 +7,7 @@ This comes with both `rx.lite.js` which is for use in modern development environ ## Details ## Files: -- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) +- [`rx.lite.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.js) - [`rx.lite.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/rx.lite.compat.js) NPM Packages: diff --git a/doc/libraries/rx.md b/doc/libraries/rx.md index 6cbd6beb9..d44e8e341 100644 --- a/doc/libraries/rx.md +++ b/doc/libraries/rx.md @@ -7,7 +7,7 @@ This comes with both `rx.js` which is for use in modern development environments ## Details ## Files: -- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) +- [`rx.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.js) - [`rx.compat.js`](https://github.com/Reactive-Extensions/RxJS/blob/master/dist/rx.compat.js) NPM Packages: diff --git a/doc/libraries/rx.time.md b/doc/libraries/rx.time.md index b01454774..03021c9da 100644 --- a/doc/libraries/rx.time.md +++ b/doc/libraries/rx.time.md @@ -29,7 +29,6 @@ NuGet Dependencies: - [`interval`](../api/core/operators/generatewithrelativetime.md) - [`timer`](../api/core/operators/timer.md) - ### `Observable Instance Methods` - [`bufferWithTime`](../api/core/operators/bufferwithtime.md) - [`bufferWithTimeOrCount`](../api/core/operators/bufferwithtimeorcount.md) diff --git a/doc/mapping/asyncjs.md b/doc/mapping/asyncjs.md index fc22e05d9..94d342399 100644 --- a/doc/mapping/asyncjs.md +++ b/doc/mapping/asyncjs.md @@ -79,7 +79,7 @@ Rx.Observable ); ``` -* * * +* * * ## `async.map` ## @@ -180,7 +180,7 @@ Rx.Observable ## `async.reject` ## The `async.reject` method is the opposite of filter. Removes values that pass an async truth test. - + #### async version #### In this example, we'll determine whether the file exists by calling `fs.exists` for each file given and have the results returned as an array. @@ -226,7 +226,7 @@ Rx.Observable ## `async.reduce` ## The `async.reduce` method reduces a list of values into a single value using an async iterator to return each successive step. Memo is the initial state of the reduction. This function only operates in series. For performance reasons, it may make sense to split a call to this function into a parallel map, then use the normal `Array.prototype.reduce` on the results. This function is for situations where each step in the reduction needs to be async, if you can get the data before reducing it then it's probably a good idea to do so. - + #### async version #### In this example, we'll determine whether the file exists by calling `fs.exists` for each file given and have the results returned as an array. @@ -270,8 +270,8 @@ Rx.Observable ## `async.detect` ## -The `async.detect` method returns the first value in a list that passes an async truth test. The iterator is applied in parallel, meaning the first iterator to return true will fire the detect callback with that result. - +The `async.detect` method returns the first value in a list that passes an async truth test. The iterator is applied in parallel, meaning the first iterator to return true will fire the detect callback with that result. + #### async version #### In this example, we'll get the first file that matches. @@ -315,7 +315,7 @@ Rx.Observable ## `async.some` ## The `async.some` method returns `true` if at least one element in the array satisfies an async test. The callback for each iterator call only accepts a single argument of true or false, it does not accept an error argument first! This is in-line with the way node libraries work with truth tests like fs.exists. Once any iterator call returns true, the main callback is immediately called. - + #### async version #### In this example, we'll determine whether the file exists by calling `fs.exists` for each file given and have the results returned as an array. @@ -355,7 +355,7 @@ Rx.Observable ## `async.every` ## The `async.every` method returns `true` if every element in the array satisfies an async test. The callback for each iterator call only accepts a single argument of true or false, it does not accept an error argument first! This is in-line with the way node libraries work with truth tests like fs.exists. - + #### async version #### In this example, we'll determine whether the file exists by calling `fs.exists` for each file given and have the results returned as an array. @@ -397,7 +397,7 @@ Rx.Observable ## `async.concat` ## The `async.concat` method applies an iterator to each item in a list, concatenating the results. Returns the concatenated list. The iterators are called in parallel, and the results are concatenated as they return. - + #### async version #### In this example, we'll determine whether the file exists by calling `fs.exists` for each file given and have the results returned as an array. @@ -442,7 +442,7 @@ Rx.Observable The `async.series` runs an array of functions in series, each one running once the previous function has completed. If any functions in the series pass an error to its callback, no more functions are run and the callback for the series is immediately called with the value of the error. Once the tasks have completed, the results are passed to the final callback as an array. It is also possible to use an object instead of an array. Each property will be run as a function and the results will be passed to the final callback as an object instead of an array. This can be a more readable way of handling results from async.series. - + #### async version #### In this example we'll run some examples with both an array or an object. @@ -465,7 +465,6 @@ function(err, results){ // results is now equal to ['one', 'two'] }); - // an example using an object instead of an array async.series({ one: function(callback){ @@ -486,7 +485,7 @@ function(err, results) { #### RxJS version #### -We can achieve the same functionality of `async.series` with an array by simply calling fromArray and calling `flatMap` to give us the observable of the current. Then we'll call `reduce` to add each item to a new array to return. +We can achieve the same functionality of `async.series` with an array by simply calling fromArray and calling `flatMap` to give us the observable of the current. Then we'll call `reduce` to add each item to a new array to return. ```js var Rx = require('rx'); @@ -575,7 +574,7 @@ wrapObject({ The `async.parallel` runs an array of functions in parallel, without waiting until the previous function has completed. If any of the functions pass an error to its callback, the main callback is immediately called with the value of the error. Once the tasks have completed, the results are passed to the final callback as an array. It is also possible to use an object instead of an array. Each property will be run as a function and the results will be passed to the final callback as an object instead of an array. This can be a more readable way of handling results from async.parallel. - + #### async version #### In this example we'll run some examples with both an array or an object. @@ -602,8 +601,6 @@ function(err, results){ // the second function had a shorter timeout. }); - - // an example using an object instead of an array async.parallel({ one: function(callback){ @@ -675,7 +672,7 @@ function wrapObjectParallel (obj) { newObj[key] = x; - return newObj; + return newObj; }, {}) }); } @@ -701,7 +698,7 @@ wrapObjectParallel({ ## `async.whilst` ## The `async.whilst` method repeatedly call function, while test returns true. Calls the callback when stopped, or an error occurs. - + #### async version #### In this example we'll just run a keep calling the callback while the count is less than 5. @@ -752,7 +749,7 @@ Rx.Observable.while( ## `async.doWhilst` ## The `async.doWhilst` method is a post check version of `whilst`. To reflect the difference in the order of operations test and fn arguments are switched. `doWhils`t is to `whilst` as `do while` is to `while` in plain JavaScript. - + #### async version #### In this example we'll just run a keep calling the callback while the count is less than 5. @@ -797,7 +794,7 @@ var source = Rx.Observable.return(42).doWhile( ## `async.nextTick` ## The `async.nextTick` method calls the callback on a later loop around the event loop. In node.js this just calls process.nextTick, in the browser it falls back to setImmediate(callback) if available, otherwise setTimeout(callback, 0), which means other higher priority events may precede the execution of the callback. - + #### async version #### In this example we'll just run a keep calling the callback while the count is less than 5. @@ -837,7 +834,7 @@ call_order.push('one'); ## `async.waterfall` ## The `async.waterfall` method runs an array of functions in series, each passing their results to the next in the array. However, if any of the functions pass an error to the callback, the next function is not executed and the main callback is immediately called with the error. - + #### async version #### In this example, we'll check whether a file exists, then rename it and finally return its [stats](http://nodejs.org/api/fs.html#fs_class_fs_stats). @@ -903,7 +900,7 @@ var async = { }(series[i])); } - return acc; + return acc; }); } } @@ -955,7 +952,7 @@ obs.subscribe( The [`async.compose`](https://github.com/caolan/async#composefn1-fn2) method creates a function which is a composition of the passed asynchronous functions. Each function consumes the return value of the function that follows. Composing functions f(), g() and h() would produce the result of f(g(h())), only this version uses callbacks to obtain the return values. Each function is executed with the `this` binding of the composed function. - + #### async version #### In this example, we'll chain together two functions, one to add 1 to a supplied argument, and then chain it to another to multiply the result by 3. @@ -1027,4 +1024,4 @@ add1(4) // => 15 ``` -* * * \ No newline at end of file +* * * diff --git a/doc/mapping/baconjs.md b/doc/mapping/baconjs.md index caa7fc9a4..65f41ea2b 100644 --- a/doc/mapping/baconjs.md +++ b/doc/mapping/baconjs.md @@ -11,13 +11,13 @@ Bacon.js has two main concepts, Event Streams and Properties, which we will map ## Event Streams ## -In Bacon.js (and RxJS for that matter), an EventStream represents a stream of events. It is an Observable object, meaning that you can listen to events in the stream using, for instance, the onValue method with a callback. +In Bacon.js (and RxJS for that matter), an EventStream represents a stream of events. It is an Observable object, meaning that you can listen to events in the stream using, for instance, the onValue method with a callback. -### Creating Event Streams ### +### Creating Event Streams ### #### Bacon.js #### -Because Bacon.js is optimized for jQuery and Zepto, you can use the `$.fn.asEventStream` method to easily bind to create event streams. +Because Bacon.js is optimized for jQuery and Zepto, you can use the `$.fn.asEventStream` method to easily bind to create event streams. For example we can get the clickable element, listen to the `click` event, and then we can subscribe via the `onValue` method to capture the clicks. @@ -34,18 +34,18 @@ The support goes above just standard support, but also selectors and an optional ```js $("#my-div").asEventStream("click", ".more-specific-selector") -$("#my-div").asEventStream("click", ".more-specific-selector", function(event, args) { - return args[0]; +$("#my-div").asEventStream("click", ".more-specific-selector", function(event, args) { + return args[0]; }); -$("#my-div").asEventStream("click", function (event, args) { - return args[0] +$("#my-div").asEventStream("click", function (event, args) { + return args[0] }); ``` #### RxJS #### -It's very similar in RxJS core. Until recently, this feature was reserved for external libraries such as [RxJS-jQuery](https://github.com/Reactive-Extensions/RxJS-jQuery), [RxJS-DOM](https://github.com/Reactive-Extensions/RxJS-DOM), [RxJS-Dojo](https://github.com/Reactive-Extensions/RxJS-Dojo) and [RxJS-MooTools](https://github.com/Reactive-Extensions/RxJS-MooTools). RxJS 2.2 introduced two ways to bind to events with `fromEvent` and `fromEventPattern` so that bridge libraries are strictly not as necessary as they used to be. +It's very similar in RxJS core. Until recently, this feature was reserved for external libraries such as [RxJS-jQuery](https://github.com/Reactive-Extensions/RxJS-jQuery), [RxJS-DOM](https://github.com/Reactive-Extensions/RxJS-DOM), [RxJS-Dojo](https://github.com/Reactive-Extensions/RxJS-Dojo) and [RxJS-MooTools](https://github.com/Reactive-Extensions/RxJS-MooTools). RxJS 2.2 introduced two ways to bind to events with `fromEvent` and `fromEventPattern` so that bridge libraries are strictly not as necessary as they used to be. For example, we can recreate the binding to the clickable element for the `click` event, and then call `subscribe` with a function which listens for each time the clickable is clicked. @@ -64,7 +64,7 @@ var Rx = require('rx'), var e = new EventEmitter(); -Rx.Observable.fromEvent(e, 'data', +Rx.Observable.fromEvent(e, 'data', function (args) { return { first: args[0], second: args[1] }; }) @@ -142,4 +142,4 @@ var minus = Rx.Observable.fromEvent($("#minus"), "click").map(just(-1)); var both = plus.merge(minus); both.subscribe (function (x) { /* returns 1 or -1 */ }); -``` \ No newline at end of file +``` diff --git a/doc/readme.md b/doc/readme.md index 7d115e1d3..cc8cfe21c 100644 --- a/doc/readme.md +++ b/doc/readme.md @@ -4,11 +4,11 @@ Reactive Extensions (Rx) is a library for composing asynchronous and event-based Data sequences can take many forms, such as a stream of data from a file or web service, web services requests, system notifications, or a series of events such as user input. -Reactive Extensions represents all these data sequences as observable sequences. An application can subscribe to these observable sequences to receive asynchronous notifications as new data arrive. +Reactive Extensions represents all these data sequences as observable sequences. An application can subscribe to these observable sequences to receive asynchronous notifications as new data arrive. RxJS has no dependencies which complements and interoperates smoothly with both synchronous data streams such as iterable objects in JavaScript and single-value asynchronous computations such as Promises as the following diagram shows: -
+
Single return valueMutiple return values
diff --git a/nuget/RxJS-Aggregates/RxJS-Aggregates.nuspec b/nuget/RxJS-Aggregates/RxJS-Aggregates.nuspec index 334447387..4b241598c 100644 --- a/nuget/RxJS-Aggregates/RxJS-Aggregates.nuspec +++ b/nuget/RxJS-Aggregates/RxJS-Aggregates.nuspec @@ -23,4 +23,4 @@ - \ No newline at end of file + diff --git a/nuget/RxJS-All/RxJS-All.nuspec b/nuget/RxJS-All/RxJS-All.nuspec index ba3e053a2..c2f85c4d3 100644 --- a/nuget/RxJS-All/RxJS-All.nuspec +++ b/nuget/RxJS-All/RxJS-All.nuspec @@ -26,4 +26,4 @@ - \ No newline at end of file + diff --git a/nuget/RxJS-Async/RxJS-Async.nuspec b/nuget/RxJS-Async/RxJS-Async.nuspec index 478ce37f3..f96a27f53 100644 --- a/nuget/RxJS-Async/RxJS-Async.nuspec +++ b/nuget/RxJS-Async/RxJS-Async.nuspec @@ -23,8 +23,8 @@ - + - \ No newline at end of file + diff --git a/nuget/RxJS-BackPressure/RxJS-BackPressure.nuspec b/nuget/RxJS-BackPressure/RxJS-BackPressure.nuspec index 4e720ff54..e0fc5d7c0 100644 --- a/nuget/RxJS-BackPressure/RxJS-BackPressure.nuspec +++ b/nuget/RxJS-BackPressure/RxJS-BackPressure.nuspec @@ -21,8 +21,8 @@ - + - \ No newline at end of file + diff --git a/nuget/RxJS-Binding/RxJS-Binding.nuspec b/nuget/RxJS-Binding/RxJS-Binding.nuspec index 48aeb01f0..54cbcda33 100644 --- a/nuget/RxJS-Binding/RxJS-Binding.nuspec +++ b/nuget/RxJS-Binding/RxJS-Binding.nuspec @@ -22,4 +22,4 @@ - \ No newline at end of file + diff --git a/nuget/RxJS-Coincidence/RxJS-Coincidence.nuspec b/nuget/RxJS-Coincidence/RxJS-Coincidence.nuspec index f09a349dc..e39919ead 100644 --- a/nuget/RxJS-Coincidence/RxJS-Coincidence.nuspec +++ b/nuget/RxJS-Coincidence/RxJS-Coincidence.nuspec @@ -21,6 +21,6 @@ - + - \ No newline at end of file + diff --git a/nuget/RxJS-Complete/RxJS-Complete.nuspec b/nuget/RxJS-Complete/RxJS-Complete.nuspec index de4abf96e..debc2553f 100644 --- a/nuget/RxJS-Complete/RxJS-Complete.nuspec +++ b/nuget/RxJS-Complete/RxJS-Complete.nuspec @@ -23,10 +23,10 @@ - - + + - + - \ No newline at end of file + diff --git a/nuget/RxJS-Experimental/RxJS-Experimental.nuspec b/nuget/RxJS-Experimental/RxJS-Experimental.nuspec index 74390d63f..b2622d4cf 100644 --- a/nuget/RxJS-Experimental/RxJS-Experimental.nuspec +++ b/nuget/RxJS-Experimental/RxJS-Experimental.nuspec @@ -21,6 +21,6 @@ - + - \ No newline at end of file + diff --git a/nuget/RxJS-JoinPatterns/RxJS-JoinPatterns.nuspec b/nuget/RxJS-JoinPatterns/RxJS-JoinPatterns.nuspec index 4cccc93f0..3264e4c1f 100644 --- a/nuget/RxJS-JoinPatterns/RxJS-JoinPatterns.nuspec +++ b/nuget/RxJS-JoinPatterns/RxJS-JoinPatterns.nuspec @@ -21,6 +21,6 @@ - + - \ No newline at end of file + diff --git a/nuget/RxJS-Lite/RxJS-Lite.nuspec b/nuget/RxJS-Lite/RxJS-Lite.nuspec index abfd7f330..51ec9c053 100644 --- a/nuget/RxJS-Lite/RxJS-Lite.nuspec +++ b/nuget/RxJS-Lite/RxJS-Lite.nuspec @@ -18,7 +18,7 @@ - + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff --git a/nuget/RxJS-Main/RxJS-Main.nuspec b/nuget/RxJS-Main/RxJS-Main.nuspec index 6837fbc33..243619608 100644 --- a/nuget/RxJS-Main/RxJS-Main.nuspec +++ b/nuget/RxJS-Main/RxJS-Main.nuspec @@ -18,8 +18,8 @@ - + - \ No newline at end of file + diff --git a/nuget/RxJS-Testing/RxJS-Testing.nuspec b/nuget/RxJS-Testing/RxJS-Testing.nuspec index f794a4809..4b86ae2f1 100644 --- a/nuget/RxJS-Testing/RxJS-Testing.nuspec +++ b/nuget/RxJS-Testing/RxJS-Testing.nuspec @@ -22,6 +22,6 @@ - + - \ No newline at end of file + diff --git a/nuget/RxJS-Time/RxJS-Time.nuspec b/nuget/RxJS-Time/RxJS-Time.nuspec index 17fc05d71..d24bf171f 100644 --- a/nuget/RxJS-Time/RxJS-Time.nuspec +++ b/nuget/RxJS-Time/RxJS-Time.nuspec @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/nuget/RxJS-VirtualTime/RxJS-VirtualTime.nuspec b/nuget/RxJS-VirtualTime/RxJS-VirtualTime.nuspec index f772a3371..5ff269ef0 100644 --- a/nuget/RxJS-VirtualTime/RxJS-VirtualTime.nuspec +++ b/nuget/RxJS-VirtualTime/RxJS-VirtualTime.nuspec @@ -21,6 +21,6 @@ - + - \ No newline at end of file + diff --git a/readme.md b/readme.md index 6fe9cad05..c8e3ddf58 100644 --- a/readme.md +++ b/readme.md @@ -1,390 +1,390 @@ -[![Build Status](https://travis-ci.org/Reactive-Extensions/RxJS.png)](https://travis-ci.org/Reactive-Extensions/RxJS) -[![GitHub version](http://img.shields.io/github/tag/reactive-extensions/rxjs.svg)](https://github.com/Reactive-Extensions/RxJS) -[![NPM version](http://img.shields.io/npm/v/rx.svg)](https://npmjs.org/package/rx) -[![Downloads](http://img.shields.io/npm/dm/rx.svg)](https://npmjs.org/package/rx) -[![NuGet](http://img.shields.io/nuget/v/RxJS-All.svg)](http://www.nuget.org/packages/RxJS-All/) -[![Code Climate](https://codeclimate.com/github/Reactive-Extensions/RxJS/badges/gpa.svg)](https://codeclimate.com/github/Reactive-Extensions/RxJS) -[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) - -**[The Need to go Reactive](#the-need-to-go-reactive)** | -**[About the Reactive Extensions](#about-the-reactive-extensions)** | -**[Batteries Included](#batteries-included)** | -**[Why RxJS?](#why-rxjs)** | -**[Dive In!](#dive-in)** | -**[Resources](#resources)** | -**[Getting Started](#getting-started)** | -**[What about my libraries?](#what-about-my-libraries)** | -**[Compatibility](#compatibility)** | -**[Contributing](#contributing)** | -**[License](#license)** - -# The Reactive Extensions for JavaScript (RxJS) 2.3... # -*...is a set of libraries to compose asynchronous and event-based programs using observable collections and [Array#extras](http://blogs.msdn.com/b/ie/archive/2010/12/13/ecmascript-5-part-2-array-extras.aspx) style composition in JavaScript* - -The project is actively developed by [Microsoft Open Technologies, Inc.](http://msopentech.com/), in collaboration with a community of open source developers. - -## The Need to go Reactive ## - -Reactive Programming is a hot topic as of late, especially with such things as the [Reactive Manifesto](http://www.reactivemanifesto.org/). Applications, especially on the web have changed over the years from being a simple static page, to DHTML with animations, to the Ajax revolution. Each time, we're adding more complexity, more data, and asynchronous behavior to our applications. How do we manage it all? How do we scale it? By moving towards "Reactive Architectures" which are event-driven, resilient and responsive. With the Reactive Extensions, you have all the tools you need to help build these systems. - -## About the Reactive Extensions ## - -The Reactive Extensions for JavaScript (RxJS) is a set of libraries for composing asynchronous and event-based programs using observable sequences and fluent query operators that many of you already know by [Array#extras](http://blogs.msdn.com/b/ie/archive/2010/12/13/ecmascript-5-part-2-array-extras.aspx) in JavaScript. Using RxJS, developers represent asynchronous data streams with Observables, query asynchronous data streams using our many operators, and parameterize the concurrency in the asynchronous data streams using Schedulers. Simply put, RxJS = Observables + Operators + Schedulers. - -Whether you are authoring a web-based application in JavaScript or a server-side application in Node.js, you have to deal with asynchronous and event-based programming as a matter of course. Although some patterns are emerging such as the Promise pattern, handling exceptions, cancellation, and synchronization is difficult and error-prone. - -Using RxJS, you can represent multiple asynchronous data streams (that come from diverse sources, e.g., stock quote, tweets, computer events, web service requests, etc.), and subscribe to the event stream using the Observer object. The Observable notifies the subscribed Observer instance whenever an event occurs. - -Because observable sequences are data streams, you can query them using standard query operators implemented by the Observable type. Thus you can filter, project, aggregate, compose and perform time-based operations on multiple events easily by using these our many operators. In addition, there are a number of other reactive stream specific operators that allow powerful queries to be written. Cancellation, exceptions, and synchronization are also handled gracefully by using the methods on the Observable object. - -But the best news of all is that you already know how to program like this. Take for example the following JavaScript code, where we get some stock data and then manipulate and then iterate the results. - -```js -/* Get stock data somehow */ -var source = getStockData(); - -source - .filter(function (quote) { - return quote.price > 30; - }) - .map(function (quote) { - return quote.price; - }) - .forEach(function (price) { - console.log('Prices higher than $30: $' + price); - }); -``` - -Now what if this data were to come as some sort of event, for example a stream, such as as a WebSocket, then we could pretty much write the same query to iterate our data, with very little change. - -```js -/* Get stock data somehow */ -var source = getAsyncStockData(); - -var subscription = source - .filter(function (quote) { - return quote.price > 30; - }) - .map(function (quote) { - return quote.price; - }) - .subscribe( - function (price) { - console.log('Prices higher than $30: $' + price); - }, - function (err) { - console.log('Something went wrong: ' + err.message); - }); - -/* When we're done */ -subscription.dispose(); -``` - -The only difference is that we can handle the errors inline with our subscription. And when we're no longer interested in receiving the data as it comes streaming in, we call `dispose` on our subscription. - -## Batteries Included ## - -Sure, there are a lot of libraries to get started with RxJS? Confused on where to get started? Start out with the complete set of operators with [`rx.all.js`](doc/libraries/rx.complete.md), then you can reduce it to the number of operators that you really need, and perhaps stick with something as small as [`rx.lite.js`](doc/libraries/rx.lite.md). - -This set of libraries include: - -- [`rx.all.js`](doc/libraries/rx.complete.md) - complete version of RxJS with all operators, minus the testing operators, and comes with a compat file for older browsers. -- [`rx.lite.js`](doc/libraries/rx.lite.md) - lite version with event bindings, creation, time and standard query operators with a compat file for older browsers. For most operations, this is the file you'll want to use unless you want the full power of RxJS. -- [`rx.lite.extras.js`](doc/libraries/rx.lite.extras.md) - the operators missing from rx.lite.js that can be found in rx.js. -- [`rx.js`](doc/libraries/rx.md) - core library for ES5 compliant browsers and runtimes plus compatibility for older browsers. -- [`rx.aggregates.js`](doc/libraries/rx.aggregates.md) - aggregation event processing query operations -- [`rx.async.js`](doc/libraries/rx.async.md) - async operations such as events, callbacks and promises plus a compat file for older browsers. -- [`rx.backpressure.js`](doc/libraries/rx.backpressure.md) - backpressure operators such as pause/resume and controlled. -- [`rx.binding.js`](doc/libraries/rx.binding.md) - binding operators including multicast, publish, publishLast, publishValue, and replay -- [`rx.coincidence.js`](doc/libraries/rx.coincidence.md) - reactive coincidence join event processing query operations -- [`rx.experimental.js`](doc/libraries/rx.experimental.md) - experimental operators including imperative operators and forkJoin -- [`rx.joinpatterns.js`](doc/libraries/rx.joinpatterns.md) - join patterns event processing query operations -- [`rx.testing.js`](doc/libraries/rx.testing.md) - used to write unit tests for complex event processing queries -- [`rx.time.js`](doc/libraries/rx.time.md) - time-based event processing query operations -- [`rx.virtualtime.j`s](doc/libraries/rx.virtualtime.md) - virtual-time-based schedulers - -## Why RxJS? ## - -One question you may ask yourself, is why RxJS? What about Promises? Promises are good for solving asynchronous operations such as querying a service with an XMLHttpRequest, where the expected behavior is one value and then completion. The Reactive Extensions for JavaScript unifies both the world of Promises, callbacks as well as evented data such as DOM Input, Web Workers, Web Sockets. Once we have unified these concepts, this enables rich composition. - -To give you an idea about rich composition, we can create an autocompletion service which takes the user input from a text input and then query a service, making sure not to flood the service with calls for every key stroke, but instead allow to go at a more natural pace. - -First, we'll reference the JavaScript files, including jQuery, although RxJS has no dependencies on jQuery... -```html - - -``` -Next, we'll get the user input from an input, listening to the keyup event by using the `Rx.Observable.fromEvent` method. This will either use the event binding from [jQuery](http://jquery.com), [Zepto](http://zeptojs.com/), [AngularJS](https://angularjs.org/) and [Ember.js](http://emberjs.com/) if available, and if not, falls back to the native event binding. This gives you consistent ways of thinking of events depending on your framework, so there are no surprises. - -```js -var $input = $('#input'), - $results = $('#results'); - -/* Only get the value from each key up */ -var keyups = Rx.Observable.fromEvent($input, 'keyup') - .map(function (e) { - return e.target.value; - }) - .filter(function (text) { - return text.length > 2; - }); - -/* Now throttle/debounce the input for 500ms */ -var throttled = keyups - .throttle(500 /* ms */); - -/* Now get only distinct values, so we eliminate the arrows and other control characters */ -var distinct = throttled - .distinctUntilChanged(); -``` - -Now, let's query Wikipedia! In RxJS, we can instantly bind to any [Promises A+](https://github.com/promises-aplus/promises-spec) implementation through the `Rx.Observable.fromPromise` method or by just directly returning it, and we wrap it for you. - -```js -function searchWikipedia (term) { - return $.ajax({ - url: 'http://en.wikipedia.org/w/api.php', - dataType: 'jsonp', - data: { - action: 'opensearch', - format: 'json', - search: term - } - }).promise(); -} -``` - -Once that is created, now we can tie together the distinct throttled input and then query the service. In this case, we'll call `flatMapLatest` to get the value and ensure that we're not introducing any out of order sequence calls. - -```js -var suggestions = distinct - .flatMapLatest(searchWikipedia); -``` - -Finally, we call the subscribe method on our observable sequence to start pulling data. - -```js -suggestions.subscribe( function (data) { - var res = data[1]; - - /* Do something with the data like binding */ - $results.empty(); - - $.each(res, function (_, value) { - $('
  • ' + value + '
  • ').appendTo($results); - }); -}, function (error) { - /* handle any errors */ - $results.empty(); - - $('
  • Error: ' + error + '
  • ').appendTo($results); -}); -``` - -And there you have it! - -## Dive In! ## - -You can find the documentation [here](https://github.com/Reactive-Extensions/RxJS/tree/master/doc) as well as examples [here](https://github.com/Reactive-Extensions/RxJS/tree/master/examples) and plenty of [unit tests](https://github.com/Reactive-Extensions/RxJS/tree/master/tests). - -## Resources - -- Contact us - - [Tech Blog](http://blogs.msdn.com/b/rxteam) - - [Twitter @ReactiveX](https://twitter.com/ReactiveX) - - [Twitter @OpenAtMicrosoft](http://twitter.com/OpenAtMicrosoft) - - [IRC #reactivex](http://webchat.freenode.net/#reactivex) - - [JabbR rx](https://jabbr.net/#/rooms/rx) - - [StackOverflow rxjs](http://stackoverflow.com/questions/tagged/rxjs) - - [Google Group rxjs](https://groups.google.com/forum/#!forum/rxjs) - -- Tutorials - - [The introduction to Reactive Programming you've been missing](https://gist.github.com/staltz/868e7e9bc2a7b8c1f754) - - [2 minute introduction to Rx](https://medium.com/@andrestaltz/2-minute-introduction-to-rx-24c8ca793877) - - [Learn RxJS](https://github.com/jhusain/learnrx) - - [RxJS Koans](https://github.com/mattpodwysocki/RxJSKoans) - - [Rx Workshop](http://rxworkshop.codeplex.com/) - - [Reactive Programming and MVC](http://aaronstacy.com/writings/reactive-programming-and-mvc/) - -- Reference Material - - [Rx Marbles](http://rxmarbles.com/) - - [RxJS GitBook](http://xgrommx.github.io/rx-book/) - - [Intro to Rx](http://introtorx.com/) - - [101 Rx Samples Wiki](http://rxwiki.wikidot.com/101samples) - - [Rx Design Guidelines](http://go.microsoft.com/fwlink/?LinkID=205219) - - [Beginners Guide to Rx](http://msdn.microsoft.com/en-us/data/gg577611) - -- Required Reading - - [Reactive Manifesto](http://www.reactivemanifesto.org/) - -- Examples - - [React RxJS Autocomplete](https://github.com/eliseumds/react-autocomplete) - - [React RxJS TODO MVC](https://github.com/fdecampredon/react-rxjs-todomvc) - - [Ninya.io - Angular + RxJS + rx.angular.js](https://github.com/ninya-io/ninya.io) - [Site](http://stackwho.herokuapp.com/) - - [Reactive Trader](https://github.com/AdaptiveConsulting/ReactiveTrader) - [Site](https://reactivetrader.azurewebsites.net/) - -- Presentations - - Don't Cross the Streams - Cascadia.js 2012 [slides/demos](http://www.slideshare.net/mattpodwysocki/cascadiajs-dont-cross-the-streams) | [video](http://www.youtube.com/watch?v=FqBq4uoiG0M) - - Curing Your Asynchronous Blues - Strange Loop 2013 [slides/demos](https://github.com/Reactive-Extensions/StrangeLoop2013) | [video](http://www.infoq.com/presentations/rx-event-processing) - - Streaming and event-based programming using FRP and RxJS - FutureJS 2014 [slides/demos](https://github.com/Reactive-Extensions/FutureJS) | [video](https://www.youtube.com/watch?v=zlERo_JMGCw) - - [Tyrannosaurus Rx](http://yobriefca.se/presentations/tyrannosaurus-rx.pdf) - [James Hughes](http://twitter.com/kouphax) - - Taming Asynchronous Workflows with Functional Reactive Programming - EuroClojure - [Leonardo Borges](https://twitter.com/leonardo_borges) [slides](http://www.slideshare.net/borgesleonardo/functional-reactive-programming-compositional-event-systems) | [video](http://www.slideshare.net/borgesleonardo/functional-reactive-programming-compositional-event-systems) - -- Videos - - [Hello RxJS - Channel 9](http://channel9.msdn.com/Blogs/Charles/Introducing-RxJS-Reactive-Extensions-for-JavaScript) - - [MIX 2011](http://channel9.msdn.com/events/MIX/MIX11/HTM07) - - [RxJS Today and Tomorrow - Channel 9](http://channel9.msdn.com/Blogs/Charles/Matthew-Podwysocki-and-Bart-J-F-De-Smet-RxJS-Today-and-Tomorrow) - - [Reactive Extensions Videos on Channel 9](http://channel9.msdn.com/Tags/reactive+extensions) - - [Asynchronous JavaScript at Netflix - Netflix JavaScript Talks - Jafar Husain](https://www.youtube.com/watch?v=XRYN2xt11Ek) - - [Asynchronous JavaScript at Netflix - MountainWest JavaScript 2014 - Jafar Husain](https://www.youtube.com/watch?v=XE692Clb5LU) - - [Asynchronous JavaScript at Netflix - HTML5DevConf - Jafar Husain](https://www.youtube.com/watch?v=5uxSu-F5Kj0) - - [Adding Even More Fun to Functional Programming With RXJS - Ryan Anklam](https://www.youtube.com/watch?v=8EExNfm0gt4) - - [Reactive Angular - Devoxx France 2014 - Martin Gontovnikas](http://parleys.com/play/53677646e4b0593229b85841/chapter0/about) - - [Reactive Game Programming for the Discerning Hipster - JSConf 2014 - Bodil Stokke](https://www.youtube.com/watch?v=x8mmAu7ZR9Y) - -- Podcasts - - [.NET Rocks #907](http://dotnetrocks.com/default.aspx?showNum=907) - - [JavaScript Jabber #83](http://javascriptjabber.com/083-jsj-frp-and-rxjs-with-matthew-podwysocki/) - -- Articles - - [Your Mouse is a Database](http://queue.acm.org/detail.cfm?id=2169076) - -- Books - - [Intro to Rx](http://www.amazon.com/Introduction-to-Rx-ebook/dp/B008GM3YPM/) - - [Programming Reactive Extensions and LINQ](http://www.amazon.com/Programming-Reactive-Extensions-Jesse-Liberty/dp/1430237473/) - -## Getting Started - -There are a number of ways to get started with RxJS. The files are available on [cdnjs](http://cdnjs.com/libraries/rxjs/) and [jsDelivr](http://www.jsdelivr.com/#!rxjs). - -### Download the Source - -```bash -git clone https://github.com/Reactive-Extensions/rxjs.git -cd ./rxjs -``` - -### Installing with [NPM](https://npmjs.org/) - -```bash` -npm install rx -npm install -g rx -``` - -### Using with Node.js and Ringo.js - -```js -var Rx = require('rx'); -``` - -### Installing with [Bower](http://bower.io/) - -```bash -bower install rxjs -``` - -### Installing with [Jam](http://jamjs.org/) - - jam install rx - -### Installing All of RxJS via [NuGet](http://nuget.org/) - - Install-Package RxJS-All - -### Install individual packages via [NuGet](http://nuget.org/): - - Install-Package RxJS-All - Install-Package RxJS-Lite - Install-Package RxJS-Main - Install-Package RxJS-Aggregates - Install-Package RxJS-Async - Install-Package RxJS-BackPressure - Install-Package RxJS-Binding - Install-Package RxJS-Coincidence - Install-Package RxJS-Experimental - Install-Package RxJS-JoinPatterns - Install-Package RxJS-Testing - Install-Package RxJS-Time - -### In a Browser: - -```html - - - - - - - - -``` - -### Along with a number of our extras for RxJS: - -```html - - - - - - - - - - -``` - -### Using RxJS with an AMD loader such as Require.js - -```js -require({ - 'paths': { - 'rx': 'path/to/rx.js' - } -}, -['rx'], function(Rx) { - var obs = Rx.Observable.return(42); - obs.subscribe(function (x) { console.log(x); }); -}); -``` - -## What about my libraries? ## - -The Reactive Extensions for JavaScript have no external dependencies any library, so they'll work well with just about any library. We provide bridges and support for various libraries including: - -- [AngularJS](https://github.com/Reactive-Extensions/rx.angular.js) -- [HTML DOM](https://github.com/Reactive-Extensions/RxJS-DOM) -- [jQuery (1.4+)](https://github.com/Reactive-Extensions/RxJS-jQuery) -- [MooTools](https://github.com/Reactive-Extensions/RxJS-MooTools) -- [Dojo 1.7+](https://github.com/Reactive-Extensions/RxJS-Dojo) -- [ExtJS](https://github.com/Reactive-Extensions/RxJS-ExtJS) - -In addition, we have support for [common Node.js functions](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/nodejs/nodejs.md) such as binding to callbacks and the `EventEmitter` class. - -## Compatibility ## - -RxJS has been thoroughly tested against all major browsers and supports IE6+, Chrome 4+, FireFox 1+, and Node.js v0.4+. - -## Contributing ## - -There are lots of ways to contribute to the project, and we appreciate our [contributors](https://github.com/Reactive-Extensions/RxJS/wiki/Contributors). If you wish to contribute, check out our [style guide](https://github.com/Reactive-Extensions/RxJS/wiki/Reactive-Extensions-for-JavaScript-%28RxJS%29-Style-Guide). - -You can contribute by reviewing and sending feedback on code checkins, suggesting and trying out new features as they are implemented, submit bugs and help us verify fixes as they are checked in, as well as submit code fixes or code contributions of your own. Note that all code submissions will be rigorously reviewed and tested by the Rx Team, and only those that meet an extremely high bar for both quality and design/roadmap appropriateness will be merged into the source. - -## License ## - -Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. -Microsoft Open Technologies would like to thank its contributors, a list -of whom are at https://github.com/Reactive-Extensions/RxJS/wiki/Contributors. - -Licensed under the Apache License, Version 2.0 (the "License"); you -may not use this file except in compliance with the License. You may -obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing permissions -and limitations under the License. +[![Build Status](https://travis-ci.org/Reactive-Extensions/RxJS.png)](https://travis-ci.org/Reactive-Extensions/RxJS) +[![GitHub version](http://img.shields.io/github/tag/reactive-extensions/rxjs.svg)](https://github.com/Reactive-Extensions/RxJS) +[![NPM version](http://img.shields.io/npm/v/rx.svg)](https://npmjs.org/package/rx) +[![Downloads](http://img.shields.io/npm/dm/rx.svg)](https://npmjs.org/package/rx) +[![NuGet](http://img.shields.io/nuget/v/RxJS-All.svg)](http://www.nuget.org/packages/RxJS-All/) +[![Code Climate](https://codeclimate.com/github/Reactive-Extensions/RxJS/badges/gpa.svg)](https://codeclimate.com/github/Reactive-Extensions/RxJS) +[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) + +**[The Need to go Reactive](#the-need-to-go-reactive)** | +**[About the Reactive Extensions](#about-the-reactive-extensions)** | +**[Batteries Included](#batteries-included)** | +**[Why RxJS?](#why-rxjs)** | +**[Dive In!](#dive-in)** | +**[Resources](#resources)** | +**[Getting Started](#getting-started)** | +**[What about my libraries?](#what-about-my-libraries)** | +**[Compatibility](#compatibility)** | +**[Contributing](#contributing)** | +**[License](#license)** + +# The Reactive Extensions for JavaScript (RxJS) 2.3... # +*...is a set of libraries to compose asynchronous and event-based programs using observable collections and [Array#extras](http://blogs.msdn.com/b/ie/archive/2010/12/13/ecmascript-5-part-2-array-extras.aspx) style composition in JavaScript* + +The project is actively developed by [Microsoft Open Technologies, Inc.](http://msopentech.com/), in collaboration with a community of open source developers. + +## The Need to go Reactive ## + +Reactive Programming is a hot topic as of late, especially with such things as the [Reactive Manifesto](http://www.reactivemanifesto.org/). Applications, especially on the web have changed over the years from being a simple static page, to DHTML with animations, to the Ajax revolution. Each time, we're adding more complexity, more data, and asynchronous behavior to our applications. How do we manage it all? How do we scale it? By moving towards "Reactive Architectures" which are event-driven, resilient and responsive. With the Reactive Extensions, you have all the tools you need to help build these systems. + +## About the Reactive Extensions ## + +The Reactive Extensions for JavaScript (RxJS) is a set of libraries for composing asynchronous and event-based programs using observable sequences and fluent query operators that many of you already know by [Array#extras](http://blogs.msdn.com/b/ie/archive/2010/12/13/ecmascript-5-part-2-array-extras.aspx) in JavaScript. Using RxJS, developers represent asynchronous data streams with Observables, query asynchronous data streams using our many operators, and parameterize the concurrency in the asynchronous data streams using Schedulers. Simply put, RxJS = Observables + Operators + Schedulers. + +Whether you are authoring a web-based application in JavaScript or a server-side application in Node.js, you have to deal with asynchronous and event-based programming as a matter of course. Although some patterns are emerging such as the Promise pattern, handling exceptions, cancellation, and synchronization is difficult and error-prone. + +Using RxJS, you can represent multiple asynchronous data streams (that come from diverse sources, e.g., stock quote, tweets, computer events, web service requests, etc.), and subscribe to the event stream using the Observer object. The Observable notifies the subscribed Observer instance whenever an event occurs. + +Because observable sequences are data streams, you can query them using standard query operators implemented by the Observable type. Thus you can filter, project, aggregate, compose and perform time-based operations on multiple events easily by using these our many operators. In addition, there are a number of other reactive stream specific operators that allow powerful queries to be written. Cancellation, exceptions, and synchronization are also handled gracefully by using the methods on the Observable object. + +But the best news of all is that you already know how to program like this. Take for example the following JavaScript code, where we get some stock data and then manipulate and then iterate the results. + +```js +/* Get stock data somehow */ +var source = getStockData(); + +source + .filter(function (quote) { + return quote.price > 30; + }) + .map(function (quote) { + return quote.price; + }) + .forEach(function (price) { + console.log('Prices higher than $30: $' + price); + }); +``` + +Now what if this data were to come as some sort of event, for example a stream, such as as a WebSocket, then we could pretty much write the same query to iterate our data, with very little change. + +```js +/* Get stock data somehow */ +var source = getAsyncStockData(); + +var subscription = source + .filter(function (quote) { + return quote.price > 30; + }) + .map(function (quote) { + return quote.price; + }) + .subscribe( + function (price) { + console.log('Prices higher than $30: $' + price); + }, + function (err) { + console.log('Something went wrong: ' + err.message); + }); + +/* When we're done */ +subscription.dispose(); +``` + +The only difference is that we can handle the errors inline with our subscription. And when we're no longer interested in receiving the data as it comes streaming in, we call `dispose` on our subscription. + +## Batteries Included ## + +Sure, there are a lot of libraries to get started with RxJS? Confused on where to get started? Start out with the complete set of operators with [`rx.all.js`](doc/libraries/rx.complete.md), then you can reduce it to the number of operators that you really need, and perhaps stick with something as small as [`rx.lite.js`](doc/libraries/rx.lite.md). + +This set of libraries include: + +- [`rx.all.js`](doc/libraries/rx.complete.md) - complete version of RxJS with all operators, minus the testing operators, and comes with a compat file for older browsers. +- [`rx.lite.js`](doc/libraries/rx.lite.md) - lite version with event bindings, creation, time and standard query operators with a compat file for older browsers. For most operations, this is the file you'll want to use unless you want the full power of RxJS. +- [`rx.lite.extras.js`](doc/libraries/rx.lite.extras.md) - the operators missing from rx.lite.js that can be found in rx.js. +- [`rx.js`](doc/libraries/rx.md) - core library for ES5 compliant browsers and runtimes plus compatibility for older browsers. +- [`rx.aggregates.js`](doc/libraries/rx.aggregates.md) - aggregation event processing query operations +- [`rx.async.js`](doc/libraries/rx.async.md) - async operations such as events, callbacks and promises plus a compat file for older browsers. +- [`rx.backpressure.js`](doc/libraries/rx.backpressure.md) - backpressure operators such as pause/resume and controlled. +- [`rx.binding.js`](doc/libraries/rx.binding.md) - binding operators including multicast, publish, publishLast, publishValue, and replay +- [`rx.coincidence.js`](doc/libraries/rx.coincidence.md) - reactive coincidence join event processing query operations +- [`rx.experimental.js`](doc/libraries/rx.experimental.md) - experimental operators including imperative operators and forkJoin +- [`rx.joinpatterns.js`](doc/libraries/rx.joinpatterns.md) - join patterns event processing query operations +- [`rx.testing.js`](doc/libraries/rx.testing.md) - used to write unit tests for complex event processing queries +- [`rx.time.js`](doc/libraries/rx.time.md) - time-based event processing query operations +- [`rx.virtualtime.j`s](doc/libraries/rx.virtualtime.md) - virtual-time-based schedulers + +## Why RxJS? ## + +One question you may ask yourself, is why RxJS? What about Promises? Promises are good for solving asynchronous operations such as querying a service with an XMLHttpRequest, where the expected behavior is one value and then completion. The Reactive Extensions for JavaScript unifies both the world of Promises, callbacks as well as evented data such as DOM Input, Web Workers, Web Sockets. Once we have unified these concepts, this enables rich composition. + +To give you an idea about rich composition, we can create an autocompletion service which takes the user input from a text input and then query a service, making sure not to flood the service with calls for every key stroke, but instead allow to go at a more natural pace. + +First, we'll reference the JavaScript files, including jQuery, although RxJS has no dependencies on jQuery... +```html + + +``` +Next, we'll get the user input from an input, listening to the keyup event by using the `Rx.Observable.fromEvent` method. This will either use the event binding from [jQuery](http://jquery.com), [Zepto](http://zeptojs.com/), [AngularJS](https://angularjs.org/) and [Ember.js](http://emberjs.com/) if available, and if not, falls back to the native event binding. This gives you consistent ways of thinking of events depending on your framework, so there are no surprises. + +```js +var $input = $('#input'), + $results = $('#results'); + +/* Only get the value from each key up */ +var keyups = Rx.Observable.fromEvent($input, 'keyup') + .map(function (e) { + return e.target.value; + }) + .filter(function (text) { + return text.length > 2; + }); + +/* Now throttle/debounce the input for 500ms */ +var throttled = keyups + .throttle(500 /* ms */); + +/* Now get only distinct values, so we eliminate the arrows and other control characters */ +var distinct = throttled + .distinctUntilChanged(); +``` + +Now, let's query Wikipedia! In RxJS, we can instantly bind to any [Promises A+](https://github.com/promises-aplus/promises-spec) implementation through the `Rx.Observable.fromPromise` method or by just directly returning it, and we wrap it for you. + +```js +function searchWikipedia (term) { + return $.ajax({ + url: 'http://en.wikipedia.org/w/api.php', + dataType: 'jsonp', + data: { + action: 'opensearch', + format: 'json', + search: term + } + }).promise(); +} +``` + +Once that is created, now we can tie together the distinct throttled input and then query the service. In this case, we'll call `flatMapLatest` to get the value and ensure that we're not introducing any out of order sequence calls. + +```js +var suggestions = distinct + .flatMapLatest(searchWikipedia); +``` + +Finally, we call the subscribe method on our observable sequence to start pulling data. + +```js +suggestions.subscribe( function (data) { + var res = data[1]; + + /* Do something with the data like binding */ + $results.empty(); + + $.each(res, function (_, value) { + $('
  • ' + value + '
  • ').appendTo($results); + }); +}, function (error) { + /* handle any errors */ + $results.empty(); + + $('
  • Error: ' + error + '
  • ').appendTo($results); +}); +``` + +And there you have it! + +## Dive In! ## + +You can find the documentation [here](https://github.com/Reactive-Extensions/RxJS/tree/master/doc) as well as examples [here](https://github.com/Reactive-Extensions/RxJS/tree/master/examples) and plenty of [unit tests](https://github.com/Reactive-Extensions/RxJS/tree/master/tests). + +## Resources + +- Contact us + - [Tech Blog](http://blogs.msdn.com/b/rxteam) + - [Twitter @ReactiveX](https://twitter.com/ReactiveX) + - [Twitter @OpenAtMicrosoft](http://twitter.com/OpenAtMicrosoft) + - [IRC #reactivex](http://webchat.freenode.net/#reactivex) + - [JabbR rx](https://jabbr.net/#/rooms/rx) + - [StackOverflow rxjs](http://stackoverflow.com/questions/tagged/rxjs) + - [Google Group rxjs](https://groups.google.com/forum/#!forum/rxjs) + +- Tutorials + - [The introduction to Reactive Programming you've been missing](https://gist.github.com/staltz/868e7e9bc2a7b8c1f754) + - [2 minute introduction to Rx](https://medium.com/@andrestaltz/2-minute-introduction-to-rx-24c8ca793877) + - [Learn RxJS](https://github.com/jhusain/learnrx) + - [RxJS Koans](https://github.com/mattpodwysocki/RxJSKoans) + - [Rx Workshop](http://rxworkshop.codeplex.com/) + - [Reactive Programming and MVC](http://aaronstacy.com/writings/reactive-programming-and-mvc/) + +- Reference Material + - [Rx Marbles](http://rxmarbles.com/) + - [RxJS GitBook](http://xgrommx.github.io/rx-book/) + - [Intro to Rx](http://introtorx.com/) + - [101 Rx Samples Wiki](http://rxwiki.wikidot.com/101samples) + - [Rx Design Guidelines](http://go.microsoft.com/fwlink/?LinkID=205219) + - [Beginners Guide to Rx](http://msdn.microsoft.com/en-us/data/gg577611) + +- Required Reading + - [Reactive Manifesto](http://www.reactivemanifesto.org/) + +- Examples + - [React RxJS Autocomplete](https://github.com/eliseumds/react-autocomplete) + - [React RxJS TODO MVC](https://github.com/fdecampredon/react-rxjs-todomvc) + - [Ninya.io - Angular + RxJS + rx.angular.js](https://github.com/ninya-io/ninya.io) - [Site](http://stackwho.herokuapp.com/) + - [Reactive Trader](https://github.com/AdaptiveConsulting/ReactiveTrader) - [Site](https://reactivetrader.azurewebsites.net/) + +- Presentations + - Don't Cross the Streams - Cascadia.js 2012 [slides/demos](http://www.slideshare.net/mattpodwysocki/cascadiajs-dont-cross-the-streams) | [video](http://www.youtube.com/watch?v=FqBq4uoiG0M) + - Curing Your Asynchronous Blues - Strange Loop 2013 [slides/demos](https://github.com/Reactive-Extensions/StrangeLoop2013) | [video](http://www.infoq.com/presentations/rx-event-processing) + - Streaming and event-based programming using FRP and RxJS - FutureJS 2014 [slides/demos](https://github.com/Reactive-Extensions/FutureJS) | [video](https://www.youtube.com/watch?v=zlERo_JMGCw) + - [Tyrannosaurus Rx](http://yobriefca.se/presentations/tyrannosaurus-rx.pdf) - [James Hughes](http://twitter.com/kouphax) + - Taming Asynchronous Workflows with Functional Reactive Programming - EuroClojure - [Leonardo Borges](https://twitter.com/leonardo_borges) [slides](http://www.slideshare.net/borgesleonardo/functional-reactive-programming-compositional-event-systems) | [video](http://www.slideshare.net/borgesleonardo/functional-reactive-programming-compositional-event-systems) + +- Videos + - [Hello RxJS - Channel 9](http://channel9.msdn.com/Blogs/Charles/Introducing-RxJS-Reactive-Extensions-for-JavaScript) + - [MIX 2011](http://channel9.msdn.com/events/MIX/MIX11/HTM07) + - [RxJS Today and Tomorrow - Channel 9](http://channel9.msdn.com/Blogs/Charles/Matthew-Podwysocki-and-Bart-J-F-De-Smet-RxJS-Today-and-Tomorrow) + - [Reactive Extensions Videos on Channel 9](http://channel9.msdn.com/Tags/reactive+extensions) + - [Asynchronous JavaScript at Netflix - Netflix JavaScript Talks - Jafar Husain](https://www.youtube.com/watch?v=XRYN2xt11Ek) + - [Asynchronous JavaScript at Netflix - MountainWest JavaScript 2014 - Jafar Husain](https://www.youtube.com/watch?v=XE692Clb5LU) + - [Asynchronous JavaScript at Netflix - HTML5DevConf - Jafar Husain](https://www.youtube.com/watch?v=5uxSu-F5Kj0) + - [Adding Even More Fun to Functional Programming With RXJS - Ryan Anklam](https://www.youtube.com/watch?v=8EExNfm0gt4) + - [Reactive Angular - Devoxx France 2014 - Martin Gontovnikas](http://parleys.com/play/53677646e4b0593229b85841/chapter0/about) + - [Reactive Game Programming for the Discerning Hipster - JSConf 2014 - Bodil Stokke](https://www.youtube.com/watch?v=x8mmAu7ZR9Y) + +- Podcasts + - [.NET Rocks #907](http://dotnetrocks.com/default.aspx?showNum=907) + - [JavaScript Jabber #83](http://javascriptjabber.com/083-jsj-frp-and-rxjs-with-matthew-podwysocki/) + +- Articles + - [Your Mouse is a Database](http://queue.acm.org/detail.cfm?id=2169076) + +- Books + - [Intro to Rx](http://www.amazon.com/Introduction-to-Rx-ebook/dp/B008GM3YPM/) + - [Programming Reactive Extensions and LINQ](http://www.amazon.com/Programming-Reactive-Extensions-Jesse-Liberty/dp/1430237473/) + +## Getting Started + +There are a number of ways to get started with RxJS. The files are available on [cdnjs](http://cdnjs.com/libraries/rxjs/) and [jsDelivr](http://www.jsdelivr.com/#!rxjs). + +### Download the Source + +```bash +git clone https://github.com/Reactive-Extensions/rxjs.git +cd ./rxjs +``` + +### Installing with [NPM](https://npmjs.org/) + +```bash` +npm install rx +npm install -g rx +``` + +### Using with Node.js and Ringo.js + +```js +var Rx = require('rx'); +``` + +### Installing with [Bower](http://bower.io/) + +```bash +bower install rxjs +``` + +### Installing with [Jam](http://jamjs.org/) + + jam install rx + +### Installing All of RxJS via [NuGet](http://nuget.org/) + + Install-Package RxJS-All + +### Install individual packages via [NuGet](http://nuget.org/): + + Install-Package RxJS-All + Install-Package RxJS-Lite + Install-Package RxJS-Main + Install-Package RxJS-Aggregates + Install-Package RxJS-Async + Install-Package RxJS-BackPressure + Install-Package RxJS-Binding + Install-Package RxJS-Coincidence + Install-Package RxJS-Experimental + Install-Package RxJS-JoinPatterns + Install-Package RxJS-Testing + Install-Package RxJS-Time + +### In a Browser: + +```html + + + + + + + + +``` + +### Along with a number of our extras for RxJS: + +```html + + + + + + + + + + +``` + +### Using RxJS with an AMD loader such as Require.js + +```js +require({ + 'paths': { + 'rx': 'path/to/rx.js' + } +}, +['rx'], function(Rx) { + var obs = Rx.Observable.return(42); + obs.subscribe(function (x) { console.log(x); }); +}); +``` + +## What about my libraries? ## + +The Reactive Extensions for JavaScript have no external dependencies any library, so they'll work well with just about any library. We provide bridges and support for various libraries including: + +- [AngularJS](https://github.com/Reactive-Extensions/rx.angular.js) +- [HTML DOM](https://github.com/Reactive-Extensions/RxJS-DOM) +- [jQuery (1.4+)](https://github.com/Reactive-Extensions/RxJS-jQuery) +- [MooTools](https://github.com/Reactive-Extensions/RxJS-MooTools) +- [Dojo 1.7+](https://github.com/Reactive-Extensions/RxJS-Dojo) +- [ExtJS](https://github.com/Reactive-Extensions/RxJS-ExtJS) + +In addition, we have support for [common Node.js functions](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/nodejs/nodejs.md) such as binding to callbacks and the `EventEmitter` class. + +## Compatibility ## + +RxJS has been thoroughly tested against all major browsers and supports IE6+, Chrome 4+, FireFox 1+, and Node.js v0.4+. + +## Contributing ## + +There are lots of ways to contribute to the project, and we appreciate our [contributors](https://github.com/Reactive-Extensions/RxJS/wiki/Contributors). If you wish to contribute, check out our [style guide](https://github.com/Reactive-Extensions/RxJS/wiki/Reactive-Extensions-for-JavaScript-%28RxJS%29-Style-Guide). + +You can contribute by reviewing and sending feedback on code checkins, suggesting and trying out new features as they are implemented, submit bugs and help us verify fixes as they are checked in, as well as submit code fixes or code contributions of your own. Note that all code submissions will be rigorously reviewed and tested by the Rx Team, and only those that meet an extremely high bar for both quality and design/roadmap appropriateness will be merged into the source. + +## License ## + +Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +Microsoft Open Technologies would like to thank its contributors, a list +of whom are at https://github.com/Reactive-Extensions/RxJS/wiki/Contributors. + +Licensed under the Apache License, Version 2.0 (the "License"); you +may not use this file except in compliance with the License. You may +obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions +and limitations under the License. diff --git a/tests/rx.aggregates.html b/tests/rx.aggregates.html index b8e2963c9..1bfc4b38e 100644 --- a/tests/rx.aggregates.html +++ b/tests/rx.aggregates.html @@ -10,12 +10,11 @@ - - - + + + - @@ -36,12 +35,12 @@ - + - - - - - + + + + + - \ No newline at end of file + diff --git a/tests/rx.all.compat.html b/tests/rx.all.compat.html index 648d45917..c77c19b2c 100644 --- a/tests/rx.all.compat.html +++ b/tests/rx.all.compat.html @@ -81,19 +81,19 @@ return result; }; }()); - } - + } + - + - + @@ -105,7 +105,7 @@ - + @@ -200,13 +200,13 @@ - + - - - - - + + + + + @@ -221,7 +221,7 @@ - + @@ -231,7 +231,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -251,10 +251,10 @@ - + - + @@ -263,14 +263,14 @@ - + - + @@ -280,10 +280,10 @@ - + - + - \ No newline at end of file + diff --git a/tests/rx.all.html b/tests/rx.all.html index ff398f6f9..7d8d5637f 100644 --- a/tests/rx.all.html +++ b/tests/rx.all.html @@ -11,7 +11,7 @@ - + - + @@ -106,7 +106,7 @@ - + @@ -203,13 +203,13 @@ - + - - - - - + + + + + @@ -219,12 +219,12 @@ - + - + @@ -234,7 +234,7 @@ - + @@ -242,9 +242,9 @@ - - - + + + @@ -254,10 +254,10 @@ - + - + @@ -266,7 +266,7 @@ - + @@ -287,6 +287,6 @@ - + - \ No newline at end of file + diff --git a/tests/rx.async.compat.html b/tests/rx.async.compat.html index b532696eb..3fe9e2fff 100644 --- a/tests/rx.async.compat.html +++ b/tests/rx.async.compat.html @@ -11,9 +11,9 @@ - - - + + + @@ -24,6 +24,6 @@ - + - \ No newline at end of file + diff --git a/tests/rx.async.html b/tests/rx.async.html index 736c70fc3..94451c4de 100644 --- a/tests/rx.async.html +++ b/tests/rx.async.html @@ -11,9 +11,9 @@ - - - + + + - + - \ No newline at end of file + diff --git a/tests/rx.backpressure.html b/tests/rx.backpressure.html index c3ade1fb5..377400235 100644 --- a/tests/rx.backpressure.html +++ b/tests/rx.backpressure.html @@ -10,15 +10,14 @@ - - - + + + - - \ No newline at end of file + diff --git a/tests/rx.binding.html b/tests/rx.binding.html index 79c1e671c..1edda7616 100644 --- a/tests/rx.binding.html +++ b/tests/rx.binding.html @@ -9,9 +9,9 @@
    - - - + + + @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/tests/rx.coincidence.html b/tests/rx.coincidence.html index 099fb267f..dc9a97397 100644 --- a/tests/rx.coincidence.html +++ b/tests/rx.coincidence.html @@ -9,11 +9,11 @@
    - - - - - + + + + + @@ -22,8 +22,8 @@ - + - \ No newline at end of file + diff --git a/tests/rx.experimental.html b/tests/rx.experimental.html index 8db99e74a..f6432c864 100644 --- a/tests/rx.experimental.html +++ b/tests/rx.experimental.html @@ -10,9 +10,9 @@ - - - + + + @@ -27,4 +27,4 @@ - \ No newline at end of file + diff --git a/tests/rx.html b/tests/rx.html index ce908be1e..dd4e9a206 100644 --- a/tests/rx.html +++ b/tests/rx.html @@ -81,21 +81,21 @@ return result; }; }()); - } - + } + - + - - - + + + - + @@ -107,7 +107,7 @@ - + @@ -180,4 +180,4 @@ - \ No newline at end of file + diff --git a/tests/rx.joinpatterns.html b/tests/rx.joinpatterns.html index 8b5af6a21..136d5c093 100644 --- a/tests/rx.joinpatterns.html +++ b/tests/rx.joinpatterns.html @@ -9,12 +9,12 @@
    - - - + + + - \ No newline at end of file + diff --git a/tests/rx.lite.compat.html b/tests/rx.lite.compat.html index c62c2fa2e..e91c017d6 100644 --- a/tests/rx.lite.compat.html +++ b/tests/rx.lite.compat.html @@ -82,20 +82,20 @@ return result; }; }()); - } - + } + - - + + - - + + - + @@ -109,7 +109,7 @@ - + @@ -170,8 +170,8 @@ - - + + @@ -181,8 +181,8 @@ - - + + @@ -192,4 +192,4 @@ - \ No newline at end of file + diff --git a/tests/rx.lite.extras.html b/tests/rx.lite.extras.html index 56b88b2d1..f1b597abb 100644 --- a/tests/rx.lite.extras.html +++ b/tests/rx.lite.extras.html @@ -81,16 +81,16 @@ return result; }; }()); - } - + } + - - - + + + @@ -111,10 +111,10 @@ - + - \ No newline at end of file + diff --git a/tests/rx.lite.html b/tests/rx.lite.html index 092e2d8c9..6aab607b6 100644 --- a/tests/rx.lite.html +++ b/tests/rx.lite.html @@ -9,11 +9,11 @@
    - - + + - - + + - + @@ -110,7 +110,7 @@ - + @@ -171,8 +171,8 @@ - - + + @@ -182,8 +182,8 @@ - - + + @@ -193,4 +193,4 @@ - \ No newline at end of file + diff --git a/tests/rx.modern.html b/tests/rx.modern.html index 5e4916521..1b8eef50e 100644 --- a/tests/rx.modern.html +++ b/tests/rx.modern.html @@ -9,11 +9,11 @@
    - + - - - + + + - + @@ -108,7 +108,7 @@ - + @@ -183,4 +183,4 @@ - \ No newline at end of file + diff --git a/tests/rx.time.html b/tests/rx.time.html index ca540d4a4..b2163a050 100644 --- a/tests/rx.time.html +++ b/tests/rx.time.html @@ -9,9 +9,9 @@
    - - - + + + @@ -21,14 +21,14 @@ - + - + @@ -40,4 +40,4 @@ - \ No newline at end of file + diff --git a/tests/rx.virtualtime.html b/tests/rx.virtualtime.html index 3fd74544e..995183bf8 100644 --- a/tests/rx.virtualtime.html +++ b/tests/rx.virtualtime.html @@ -9,12 +9,12 @@
    - - + + - \ No newline at end of file + diff --git a/tests/vendor/es6-shim.map b/tests/vendor/es6-shim.map index b782ca3ae..5e720a6c8 100644 --- a/tests/vendor/es6-shim.map +++ b/tests/vendor/es6-shim.map @@ -1 +1 @@ -{"version":3,"sources":["es6-shim.js"],"names":["undefined","isCallableWithoutNew","func","e","supportsSubclassing","C","f","Sub","apply","this","arguments","__proto__","Object","setPrototypeOf","prototype","create","constructor","value","arePropertyDescriptorsSupported","defineProperty","startsWithRejectsRegex","rejectsRegex","String","startsWith","getGlobal","Function","main","globals","global_isFinite","isFinite","supportsDescriptors","startsWithIsCompliant","_slice","Array","slice","_indexOf","indexOf","_toString","toString","_hasOwnProperty","hasOwnProperty","ArrayIterator","object","name","force","configurable","enumerable","writable","defineProperties","map","keys","forEach","method","properties","Type","$iterator$","Symbol","iterator","Set","addIterator","impl","o","isArguments","str","call","result","length","callee","emulateES6construct","ES","TypeIsObject","TypeError","_es6construct","IsCallable","CheckObjectCoercible","x","optMessage","ToObject","ToInt32","ToUint32","ToInteger","number","Number","isNaN","Math","floor","abs","ToLength","len","MAX_SAFE_INTEGER","SameValue","a","b","SameValueZero","IsIterable","GetIterator","it","IteratorNext","next","Construct","args","obj","numberConversion","roundToEven","n","w","packIEEE754","v","ebits","fbits","bias","s","ln","i","bits","bytes","pow","Infinity","min","log","LN2","push","reverse","join","parseInt","unpackIEEE754","j","NaN","unpackFloat64","packFloat64","unpackFloat32","packFloat32","conversions","toFloat32","num","Float32Array","float32array","fromCodePoint","_","points","RangeError","fromCharCode","raw","callSite","substitutions","cooked","rawValue","literalsegments","stringElements","nextIndex","nextKey","nextSeg","nextSub","originalFromCodePoint","StringShims","repeat","times","half","thisStr","searchStr","startArg","start","max","endsWith","thisLen","posArg","pos","end","contains","searchString","position","codePointAt","first","charCodeAt","isEnd","second","hasStringTrimBug","trim","originalStringTrim","ws","trimRegexp","RegExp","replace","StringIterator","_s","_i","done","substr","ArrayShims","from","iterable","mapFn","list","hasThisArg","thisArg","usingIterator","iterationValue","of","arrayFromSwallowsNegativeLengths","array","kind","retval","ArrayPrototypeShims","copyWithin","target","to","fin","count","direction","fill","O","relativeStart","relativeEnd","find","predicate","findIndex","values","entries","getPrototypeOf","maxSafeInteger","MIN_SAFE_INTEGER","EPSILON","parseFloat","isInteger","isSafeInteger","item","idx","getPropertyDescriptor","subject","pd","getOwnPropertyDescriptor","proto","getPropertyNames","getOwnPropertyNames","addProperty","property","assign","source","reduce","key","is","magic","set","checkArgs","polyfill","FAKENULL","gpo","spo","p","originalObjectKeys","MathShims","acosh","sqrt","asinh","atanh","cbrt","negate","clz32","cosh","exp","expm1","hypot","y","anyNaN","allZero","anyInfinity","numbers","every","arg","sort","largest","divided","sum","log2","LOG2E","log10","LOG10E","log1p","sign","sinh","tanh","trunc","imul","ah","al","bh","bl","fround","PromiseShim","Promise","Promise$prototype","IsPromise","promise","_promiseConstructor","_status","PromiseCapability","capability","resolver","resolve","reject","setTimeout","makeZeroTimeout","window","postMessage","timeouts","messageName","setZeroTimeout","fn","handleMessage","event","data","stopPropagation","shift","addEventListener","makePromiseAsap","P","task","then","enqueue","setImmediate","bind","process","nextTick","triggerPromiseReactions","reactions","reaction","handler","updateResult","updatePromiseFromPotentialThenable","promiseResolutionHandler","onFulfilled","onRejected","_resolveReactions","_rejectReactions","resolution","_result","reason","@@create","_promiseAllResolver","index","remaining","all","nextPromise","resolveElement","race","resolutionHandler","resolveReaction","rejectReaction","promiseSupportsSubclassing","S","promiseIgnoresNonFunctionThenCallbacks","ex","fastkey","type","emptyObject","collectionShims","Map","empty","MapEntry","prev","isRemoved","MapIterator","head","_head","_es6map","_storage","_size","adder","nextItem","Map$prototype","get","fkey","entry","has","delete","clear","callback","context","SetShim","_es6set","[[SetData]]","add","Set$prototype","ensureMap","m","k","size","entireSet","M","define","amd"],"mappings":"CAKA,SAAUA,GACR,YAEA,IAAIC,GAAuB,SAASC,GAClC,IAAMA,IACN,MAAOC,GAAK,MAAO,OACnB,MAAO,MAGT,IAAIC,GAAsB,SAASC,EAAGC,GAEpC,IACE,GAAIC,GAAM,WAAaF,EAAEG,MAAMC,KAAMC,WACrC,KAAKH,EAAII,UAAW,CAAE,M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OC,IAAK,CAC9CD,OAAO3W,OACF,CACLA"} \ No newline at end of file +{"version":3,"sources":["es6-shim.js"],"names":["undefined","isCallableWithoutNew","func","e","supportsSubclassing","C","f","Sub","apply","this","arguments","__proto__","Object","setPrototypeOf","prototype","create","constructor","value","arePropertyDescriptorsSupported","defineProperty","startsWithRejectsRegex","rejectsRegex","String","startsWith","getGlobal","Function","main","globals","global_isFinite","isFinite","supportsDescriptors","startsWithIsCompliant","_slice","Array","slice","_indexOf","indexOf","_toString","toString","_hasOwnProperty","hasOwnProperty","ArrayIterator","object","name","force","configurable","enumerable","writable","defineProperties","map","keys","forEach","method","properties","Type","$iterator$","Symbol","iterator","Set","addIterator","impl","o","isArguments","str","call","result","length","callee","emulateES6construct","ES","TypeIsObject","TypeError","_es6construct","IsCallable","CheckObjectCoercible","x","optMessage","ToObject","ToInt32","ToUint32","ToInteger","number","Number","isNaN","Math","floor","abs","ToLength","len","MAX_SAFE_INTEGER","SameValue","a","b","SameValueZero","IsIterable","GetIterator","it","IteratorNext","next","Construct","args","obj","numberConversion","roundToEven","n","w","packIEEE754","v","ebits","fbits","bias","s","ln","i","bits","bytes","pow","Infinity","min","log","LN2","push","reverse","join","parseInt","unpackIEEE754","j","NaN","unpackFloat64","packFloat64","unpackFloat32","packFloat32","conversions","toFloat32","num","Float32Array","float32array","fromCodePoint","_","points","RangeError","fromCharCode","raw","callSite","substitutions","cooked","rawValue","literalsegments","stringElements","nextIndex","nextKey","nextSeg","nextSub","originalFromCodePoint","StringShims","repeat","times","half","thisStr","searchStr","startArg","start","max","endsWith","thisLen","posArg","pos","end","contains","searchString","position","codePointAt","first","charCodeAt","isEnd","second","hasStringTrimBug","trim","originalStringTrim","ws","trimRegexp","RegExp","replace","StringIterator","_s","_i","done","substr","ArrayShims","from","iterable","mapFn","list","hasThisArg","thisArg","usingIterator","iterationValue","of","arrayFromSwallowsNegativeLengths","array","kind","retval","ArrayPrototypeShims","copyWithin","target","to","fin","count","direction","fill","O","relativeStart","relativeEnd","find","predicate","findIndex","values","entries","getPrototypeOf","maxSafeInteger","MIN_SAFE_INTEGER","EPSILON","parseFloat","isInteger","isSafeInteger","item","idx","getPropertyDescriptor","subject","pd","getOwnPropertyDescriptor","proto","getPropertyNames","getOwnPropertyNames","addProperty","property","assign","source","reduce","key","is","magic","set","checkArgs","polyfill","FAKENULL","gpo","spo","p","originalObjectKeys","MathShims","acosh","sqrt","asinh","atanh","cbrt","negate","clz32","cosh","exp","expm1","hypot","y","anyNaN","allZero","anyInfinity","numbers","every","arg","sort","largest","divided","sum","log2","LOG2E","log10","LOG10E","log1p","sign","sinh","tanh","trunc","imul","ah","al","bh","bl","fround","PromiseShim","Promise","Promise$prototype","IsPromise","promise","_promiseConstructor","_status","PromiseCapability","capability","resolver","resolve","reject","setTimeout","makeZeroTimeout","window","postMessage","timeouts","messageName","setZeroTimeout","fn","handleMessage","event","data","stopPropagation","shift","addEventListener","makePromiseAsap","P","task","then","enqueue","setImmediate","bind","process","nextTick","triggerPromiseReactions","reactions","reaction","handler","updateResult","updatePromiseFromPotentialThenable","promiseResolutionHandler","onFulfilled","onRejected","_resolveReactions","_rejectReactions","resolution","_result","reason","@@create","_promiseAllResolver","index","remaining","all","nextPromise","resolveElement","race","resolutionHandler","resolveReaction","rejectReaction","promiseSupportsSubclassing","S","promiseIgnoresNonFunctionThenCallbacks","ex","fastkey","type","emptyObject","collectionShims","Map","empty","MapEntry","prev","isRemoved","MapIterator","head","_head","_es6map","_storage","_size","adder","nextItem","Map$prototype","get","fkey","entry","has","delete","clear","callback","context","SetShim","_es6set","[[SetData]]","add","Set$prototype","ensureMap","m","k","size","entireSet","M","define","amd"],"mappings":"CAKA,SAAUA,GACR,YAEA,IAAIC,GAAuB,SAASC,GAClC,IAAMA,IACN,MAAOC,GAAK,MAAO,OACnB,MAAO,MAGT,IAAIC,GAAsB,SAASC,EAAGC,GAEpC,IACE,GAAIC,GAAM,WAAaF,EAAEG,MAAMC,KAAMC,WACrC,KAAKH,EAAII,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W,YAAcA,OAAOC,IAAK,CAC9CD,OAAO3W,OACF,CACLA"} diff --git a/tests/vendor/qunit-1.11.0.css b/tests/vendor/qunit-1.11.0.css index d7fc0c8ec..854cf5e24 100644 --- a/tests/vendor/qunit-1.11.0.css +++ b/tests/vendor/qunit-1.11.0.css @@ -17,7 +17,6 @@ #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } #qunit-tests { font-size: smaller; } - /** Resets */ #qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter { @@ -25,7 +24,6 @@ padding: 0; } - /** Header */ #qunit-header { @@ -218,7 +216,6 @@ #qunit-banner.qunit-fail { background-color: #EE5757; } - /** Result */ #qunit-testresult { diff --git a/ts/rx-lite.d.ts b/ts/rx-lite.d.ts index 4b5acb81d..662a69861 100644 --- a/ts/rx-lite.d.ts +++ b/ts/rx-lite.d.ts @@ -309,30 +309,30 @@ declare module Rx { selectConcat(sequence: Observable): Observable; /** - * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then + * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then * transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. * @param selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. * @param [thisArg] Object to use as this when executing callback. - * @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences + * @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences * and that at any point in time produces the elements of the most recent inner observable sequence that has been received. */ selectSwitch(selector: (value: T, index: number, source: Observable) => TResult, thisArg?: any): Observable; /** - * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then + * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then * transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. * @param selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. * @param [thisArg] Object to use as this when executing callback. - * @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences + * @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences * and that at any point in time produces the elements of the most recent inner observable sequence that has been received. */ flatMapLatest(selector: (value: T, index: number, source: Observable) => TResult, thisArg?: any): Observable; // alias for selectSwitch /** - * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then + * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then * transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. * @param selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. * @param [thisArg] Object to use as this when executing callback. * @since 2.2.28 - * @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences + * @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences * and that at any point in time produces the elements of the most recent inner observable sequence that has been received. */ switchMap(selector: (value: T, index: number, source: Observable) => TResult, thisArg?: any): Observable; // alias for selectSwitch @@ -356,7 +356,7 @@ declare module Rx { * Converts an existing observable sequence to an ES6 Compatible Promise * @example * var promise = Rx.Observable.return(42).toPromise(RSVP.Promise); - * + * * // With config * Rx.config.Promise = RSVP.Promise; * var promise = Rx.Observable.return(42).toPromise(); @@ -445,7 +445,7 @@ declare module Rx { /** * Converts an iterable into an Observable sequence - * + * * @example * var res = Rx.Observable.fromIterable(new Map()); * var res = Rx.Observable.fromIterable(function* () { yield 42; }); @@ -458,7 +458,7 @@ declare module Rx { /** * Converts an iterable into an Observable sequence - * + * * @example * var res = Rx.Observable.fromIterable(new Map()); * var res = Rx.Observable.fromIterable(new Set(), Rx.Scheduler.timeout); @@ -472,7 +472,7 @@ declare module Rx { /** * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. - * + * * @example * var res = Rx.Observable.of(1, 2, 3); * @since 2.2.28 @@ -481,7 +481,7 @@ declare module Rx { of(...values: T[]): Observable; /** - * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. + * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. * @example * var res = Rx.Observable.ofWithScheduler(Rx.Scheduler.timeout, 1, 2, 3); * @since 2.2.28 diff --git a/ts/rx.aggregates.d.ts b/ts/rx.aggregates.d.ts index 001d1b993..a3a8e15e1 100644 --- a/ts/rx.aggregates.d.ts +++ b/ts/rx.aggregates.d.ts @@ -58,4 +58,4 @@ declare module Rx { declare module "rx.aggregates" { export = Rx; -} \ No newline at end of file +} diff --git a/ts/rx.all.ts b/ts/rx.all.ts index c546477b8..a4264859c 100644 --- a/ts/rx.all.ts +++ b/ts/rx.all.ts @@ -3,18 +3,18 @@ // Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// /// declare module "rx.all" { export = Rx; -} \ No newline at end of file +} diff --git a/ts/rx.async-tests.ts b/ts/rx.async-tests.ts index 4f8c102c4..6fe10526c 100644 --- a/ts/rx.async-tests.ts +++ b/ts/rx.async-tests.ts @@ -81,4 +81,4 @@ module Rx.Tests.Async { function startAsync() { var o: Rx.Observable = Rx.Observable.startAsync(() => >null); } -} \ No newline at end of file +} diff --git a/ts/rx.async.d.ts b/ts/rx.async.d.ts index 783f31d52..f1af9a600 100644 --- a/ts/rx.async.d.ts +++ b/ts/rx.async.d.ts @@ -40,4 +40,4 @@ declare module Rx { declare module "rx.async" { export = Rx; -} \ No newline at end of file +} diff --git a/ts/rx.backpressure.d.ts b/ts/rx.backpressure.d.ts index 9c5e8abd5..67f1868e9 100644 --- a/ts/rx.backpressure.d.ts +++ b/ts/rx.backpressure.d.ts @@ -8,4 +8,4 @@ declare module "rx.backpressure" { export = Rx; -} \ No newline at end of file +} diff --git a/ts/rx.binding-lite.d.ts b/ts/rx.binding-lite.d.ts index f896e260d..164932a22 100644 --- a/ts/rx.binding-lite.d.ts +++ b/ts/rx.binding-lite.d.ts @@ -43,10 +43,10 @@ declare module Rx { /** * Returns an observable sequence that shares a single subscription to the underlying sequence. * This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - * + * * @example * var res = source.share(); - * + * * @returns An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. */ share(): Observable; @@ -57,10 +57,10 @@ declare module Rx { /** * Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue. * This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - * + * * @example * var res = source.shareValue(42); - * + * * @param initialValue Initial value received by observers upon subscription. * @returns An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. */ diff --git a/ts/rx.binding.d.ts b/ts/rx.binding.d.ts index b93411a52..2bd4c5b01 100644 --- a/ts/rx.binding.d.ts +++ b/ts/rx.binding.d.ts @@ -8,4 +8,4 @@ declare module "rx.binding" { export = Rx; -} \ No newline at end of file +} diff --git a/ts/rx.coincidence-lite.d.ts b/ts/rx.coincidence-lite.d.ts index 801e42168..ca1cc7347 100644 --- a/ts/rx.coincidence-lite.d.ts +++ b/ts/rx.coincidence-lite.d.ts @@ -9,24 +9,24 @@ declare module Rx { interface Observable { /** - * Returns a new observable that triggers on the second and subsequent triggerings of the input observable. - * The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as a pair. + * Returns a new observable that triggers on the second and subsequent triggerings of the input observable. + * The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as a pair. * The argument passed to the N-1th triggering is held in hidden internal state until the Nth triggering occurs. * @returns An observable that triggers on successive pairs of observations from the input observable as an array. */ pairwise(): Observable; - /** + /** * Returns two observables which partition the observations of the source by the given function. - * The first will trigger observations for those values for which the predicate returns true. - * The second will trigger observations for those values where the predicate returns false. - * The predicate is executed once for each subscribed observer. - * Both also propagate all error observations arising from the source and each completes + * The first will trigger observations for those values for which the predicate returns true. + * The second will trigger observations for those values where the predicate returns false. + * The predicate is executed once for each subscribed observer. + * Both also propagate all error observations arising from the source and each completes * when the source completes. - * @param predicate + * @param predicate * The function to determine which output Observable will trigger a particular observation. * @returns - * An array of observables. The first triggers when the predicate returns true, + * An array of observables. The first triggers when the predicate returns true, * and the second triggers when the predicate returns false. */ partition(predicate: (value: T, index: number, source: Observable) => boolean, thisArg: any): Observable[]; diff --git a/ts/rx.coincidence.d.ts b/ts/rx.coincidence.d.ts index 87fa6a55b..d06166224 100644 --- a/ts/rx.coincidence.d.ts +++ b/ts/rx.coincidence.d.ts @@ -33,4 +33,4 @@ declare module Rx { declare module "rx.coincidence" { export = Rx; -} \ No newline at end of file +} diff --git a/ts/rx.experimental.d.ts b/ts/rx.experimental.d.ts index 60aec86e1..e80ca0329 100644 --- a/ts/rx.experimental.d.ts +++ b/ts/rx.experimental.d.ts @@ -29,13 +29,13 @@ declare module Rx { /** * Repeats source as long as condition holds emulating a do while loop. * @param condition The condition which determines if the source will be repeated. - * @returns An observable sequence which is repeated as long as the condition holds. + * @returns An observable sequence which is repeated as long as the condition holds. */ doWhile(condition: () => boolean): Observable; /** * Expands an observable sequence by recursively invoking selector. - * + * * @param selector Selector function to invoke for each produced element, resulting in another sequence to which the selector will be invoked recursively again. * @param [scheduler] Scheduler on which to perform the expansion. If not provided, this defaults to the current thread scheduler. * @returns An observable sequence containing all the elements produced by the recursive expansion. @@ -64,7 +64,7 @@ declare module Rx { interface ObservableStatic { /** * Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers (sources: T[], resultSelector: (item: T) => Observable): Observable; @@ -132,7 +132,7 @@ declare module Rx { * There is an alias for this method called 'forIn' for browsers (sources: T[], resultSelector: (item: T) => Observable): Observable; @@ -141,7 +141,7 @@ declare module Rx { * There is an alias for this method called 'whileDo' for browsers (condition: () => boolean, source: Observable): Observable; while(condition: () => boolean, source: IPromise): Observable; @@ -151,7 +151,7 @@ declare module Rx { * There is an alias for this method called 'whileDo' for browsers (condition: () => boolean, source: Observable): Observable; whileDo(condition: () => boolean, source: IPromise): Observable; @@ -159,14 +159,14 @@ declare module Rx { /** * Uses selector to determine which source in sources to use. * There is an alias 'switchCase' for browsers (selector: () => string, sources: { [key: string]: Observable; }, elseSource: Observable): Observable; case(selector: () => string, sources: { [key: string]: IPromise; }, elseSource: Observable): Observable; @@ -176,16 +176,16 @@ declare module Rx { /** * Uses selector to determine which source in sources to use. * There is an alias 'switchCase' for browsers (selector: () => string, sources: { [key: string]: Observable; }, scheduler?: IScheduler): Observable; case(selector: () => string, sources: { [key: string]: IPromise; }, scheduler?: IScheduler): Observable; @@ -193,14 +193,14 @@ declare module Rx { /** * Uses selector to determine which source in sources to use. * There is an alias 'switchCase' for browsers (selector: () => number, sources: { [key: number]: Observable; }, elseSource: Observable): Observable; case(selector: () => number, sources: { [key: number]: IPromise; }, elseSource: Observable): Observable; @@ -210,16 +210,16 @@ declare module Rx { /** * Uses selector to determine which source in sources to use. * There is an alias 'switchCase' for browsers (selector: () => number, sources: { [key: number]: Observable; }, scheduler?: IScheduler): Observable; case(selector: () => number, sources: { [key: number]: IPromise; }, scheduler?: IScheduler): Observable; @@ -227,14 +227,14 @@ declare module Rx { /** * Uses selector to determine which source in sources to use. * There is an alias 'switchCase' for browsers (selector: () => string, sources: { [key: string]: Observable; }, elseSource: Observable): Observable; switchCase(selector: () => string, sources: { [key: string]: IPromise; }, elseSource: Observable): Observable; @@ -244,16 +244,16 @@ declare module Rx { /** * Uses selector to determine which source in sources to use. * There is an alias 'switchCase' for browsers (selector: () => string, sources: { [key: string]: Observable; }, scheduler?: IScheduler): Observable; switchCase(selector: () => string, sources: { [key: string]: IPromise; }, scheduler?: IScheduler): Observable; @@ -261,14 +261,14 @@ declare module Rx { /** * Uses selector to determine which source in sources to use. * There is an alias 'switchCase' for browsers (selector: () => number, sources: { [key: number]: Observable; }, elseSource: Observable): Observable; switchCase(selector: () => number, sources: { [key: number]: IPromise; }, elseSource: Observable): Observable; @@ -278,23 +278,23 @@ declare module Rx { /** * Uses selector to determine which source in sources to use. * There is an alias 'switchCase' for browsers (selector: () => number, sources: { [key: number]: Observable; }, scheduler?: IScheduler): Observable; switchCase(selector: () => number, sources: { [key: number]: IPromise; }, scheduler?: IScheduler): Observable; /** * Runs all observable sequences in parallel and collect their last elements. - * + * * @example * res = Rx.Observable.forkJoin([obs1, obs2]); * @param sources Array of source sequences or promises. @@ -305,7 +305,7 @@ declare module Rx { /** * Runs all observable sequences in parallel and collect their last elements. - * + * * @example * res = Rx.Observable.forkJoin(obs1, obs2, ...); * @param args Source sequences or promises. @@ -318,4 +318,4 @@ declare module Rx { declare module "rx.experimental" { export = Rx; -} \ No newline at end of file +} diff --git a/ts/rx.joinpatterns.d.ts b/ts/rx.joinpatterns.d.ts index 929c66a6f..05774f14f 100644 --- a/ts/rx.joinpatterns.d.ts +++ b/ts/rx.joinpatterns.d.ts @@ -57,4 +57,4 @@ declare module Rx { declare module "rx.joinpatterns" { export = Rx; -} \ No newline at end of file +} diff --git a/ts/rx.lite.d.ts b/ts/rx.lite.d.ts index 046ef527d..f9f076750 100644 --- a/ts/rx.lite.d.ts +++ b/ts/rx.lite.d.ts @@ -47,4 +47,4 @@ declare module Rx { declare module "rx.lite" { export = Rx; -} \ No newline at end of file +} diff --git a/ts/rx.testing.d.ts b/ts/rx.testing.d.ts index 0adc83e50..b1ae250dd 100644 --- a/ts/rx.testing.d.ts +++ b/ts/rx.testing.d.ts @@ -59,4 +59,4 @@ declare module Rx { declare module "rx.testing" { export = Rx; -} \ No newline at end of file +} diff --git a/ts/rx.time.d.ts b/ts/rx.time.d.ts index 6efd7d9cf..ed21cf915 100644 --- a/ts/rx.time.d.ts +++ b/ts/rx.time.d.ts @@ -32,4 +32,4 @@ declare module Rx { declare module "rx.time" { export = Rx; -} \ No newline at end of file +} diff --git a/ts/rx.virtualtime.d.ts b/ts/rx.virtualtime.d.ts index 50a1bb39b..7b67d1c88 100644 --- a/ts/rx.virtualtime.d.ts +++ b/ts/rx.virtualtime.d.ts @@ -36,4 +36,4 @@ declare module Rx { declare module "rx.virtualtime" { export = Rx; -} \ No newline at end of file +}
    Single return valueMutiple return values