rxjs-rails 2.5.2 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rxjs/rails/version.rb +1 -1
- data/vendor/assets/javascripts/rx.aggregates.js +367 -284
- data/vendor/assets/javascripts/rx.aggregates.map +1 -1
- data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
- data/vendor/assets/javascripts/rx.all.compat.js +2405 -2438
- data/vendor/assets/javascripts/rx.all.compat.map +1 -1
- data/vendor/assets/javascripts/rx.all.compat.min.js +4 -4
- data/vendor/assets/javascripts/rx.all.js +2380 -2395
- data/vendor/assets/javascripts/rx.all.map +1 -1
- data/vendor/assets/javascripts/rx.all.min.js +4 -4
- data/vendor/assets/javascripts/rx.async.compat.js +311 -333
- data/vendor/assets/javascripts/rx.async.compat.map +1 -1
- data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
- data/vendor/assets/javascripts/rx.async.js +280 -327
- data/vendor/assets/javascripts/rx.async.map +1 -1
- data/vendor/assets/javascripts/rx.async.min.js +1 -1
- data/vendor/assets/javascripts/rx.backpressure.js +208 -176
- data/vendor/assets/javascripts/rx.backpressure.map +1 -1
- data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
- data/vendor/assets/javascripts/rx.binding.js +44 -27
- data/vendor/assets/javascripts/rx.binding.map +1 -1
- data/vendor/assets/javascripts/rx.binding.min.js +1 -1
- data/vendor/assets/javascripts/rx.coincidence.js +220 -453
- data/vendor/assets/javascripts/rx.coincidence.map +1 -1
- data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
- data/vendor/assets/javascripts/rx.compat.js +1366 -1173
- data/vendor/assets/javascripts/rx.compat.map +1 -1
- data/vendor/assets/javascripts/rx.compat.min.js +3 -2
- data/vendor/assets/javascripts/rx.core.binding.js +823 -0
- data/vendor/assets/javascripts/rx.core.binding.map +1 -0
- data/vendor/assets/javascripts/rx.core.binding.min.js +3 -0
- data/vendor/assets/javascripts/rx.core.js +1281 -0
- data/vendor/assets/javascripts/rx.core.map +1 -0
- data/vendor/assets/javascripts/rx.core.min.js +3 -0
- data/vendor/assets/javascripts/rx.core.testing.js +1242 -0
- data/vendor/assets/javascripts/rx.core.testing.map +1 -0
- data/vendor/assets/javascripts/rx.core.testing.min.js +3 -0
- data/vendor/assets/javascripts/rx.experimental.js +85 -123
- data/vendor/assets/javascripts/rx.experimental.map +1 -1
- data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
- data/vendor/assets/javascripts/rx.joinpatterns.js +48 -37
- data/vendor/assets/javascripts/rx.joinpatterns.map +1 -1
- data/vendor/assets/javascripts/rx.joinpatterns.min.js +1 -1
- data/vendor/assets/javascripts/rx.js +1367 -1174
- data/vendor/assets/javascripts/rx.lite.compat.js +1621 -1403
- data/vendor/assets/javascripts/rx.lite.compat.map +1 -1
- data/vendor/assets/javascripts/rx.lite.compat.min.js +3 -3
- data/vendor/assets/javascripts/rx.lite.extras.compat.js +119 -89
- data/vendor/assets/javascripts/rx.lite.extras.compat.map +1 -1
- data/vendor/assets/javascripts/rx.lite.extras.compat.min.js +1 -1
- data/vendor/assets/javascripts/rx.lite.extras.js +119 -89
- data/vendor/assets/javascripts/rx.lite.extras.map +1 -1
- data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -1
- data/vendor/assets/javascripts/rx.lite.js +1583 -1390
- data/vendor/assets/javascripts/rx.lite.map +1 -1
- data/vendor/assets/javascripts/rx.lite.min.js +3 -3
- data/vendor/assets/javascripts/rx.map +1 -1
- data/vendor/assets/javascripts/rx.min.js +3 -2
- data/vendor/assets/javascripts/rx.sorting.js +23 -27
- data/vendor/assets/javascripts/rx.sorting.map +1 -1
- data/vendor/assets/javascripts/rx.sorting.min.js +1 -1
- data/vendor/assets/javascripts/rx.testing.js +11 -15
- data/vendor/assets/javascripts/rx.testing.map +1 -1
- data/vendor/assets/javascripts/rx.testing.min.js +1 -1
- data/vendor/assets/javascripts/rx.time.js +117 -133
- data/vendor/assets/javascripts/rx.time.map +1 -1
- data/vendor/assets/javascripts/rx.time.min.js +1 -1
- data/vendor/assets/javascripts/rx.virtualtime.js +120 -39
- data/vendor/assets/javascripts/rx.virtualtime.map +1 -1
- data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
- metadata +12 -3
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rx.core.testing.min.js","sources":["rx.core.testing.js"],"names":["factory","objectTypes","function","object","freeExports","exports","nodeType","freeSelf","self","Object","freeWindow","window","freeModule","module","freeGlobal","global","root","this","define","amd","Rx","require","call","exp","undefined","keysIn","result","isObject","support","nonEnumArgs","length","isArguments","slice","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","Error","key","push","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","a","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","ctorB","isFunction","size","pop","IndexedItem","id","OnNextPredicate","predicate","OnErrorPredicate","MockPromise","scheduler","messages","subscriptions","observers","i","len","message","notification","innerNotification","scheduleAbsoluteWithState","time","obs","j","jLen","accept","disposableEmpty","supportNodeClass","Observer","Observable","Disposable","empty","disposableCreate","create","CompositeDisposable","SingleAssignmentDisposable","Scheduler","ScheduledItem","internals","SchedulePeriodicRecursive","inherits","notImplemented","helpers","defaultComparer","isEqual","Notification","kind","exception","acceptObservable","_accept","_acceptObservable","observerOrOnNext","onError","onCompleted","toObservable","isScheduler","immediateScheduler","AnonymousObservable","observer","scheduleWithState","_","createOnNext","onNext","createOnError","e","createOnCompleted","funcClass","supportsArgsClass","arguments","propertyIsEnumerable","document","toLocaleString","valueOf","x","y","test","tick","command","recurse","_period","_state","_action","_cancel","dispose","state","period","action","_scheduler","start","d","setDisposable","scheduleRecursiveWithRelativeAndState","bind","compareTo","other","c","PriorityQueue","capacity","items","Array","priorityProto","isHigherPriority","left","right","percolate","parent","temp","heapify","first","peek","removeAt","dequeue","enqueue","item","count","remove","VirtualTimeScheduler","__super__","localNow","toDateTimeOffset","clock","scheduleNow","scheduleRelative","dueTime","scheduleRelativeWithState","toRelative","scheduleAbsolute","now","invokeAction","initialClock","comparer","isEnabled","queue","VirtualTimeSchedulerPrototype","add","schedulePeriodicWithState","s","runAt","next","getNext","invoke","stop","advanceTo","dueToClock","ArgumentOutOfRangeError","advanceBy","dt","sleep","isCancelled","run","state1","si","disposable","equals","ReactiveTest","created","subscribed","disposed","ticks","Recorded","error","subscribe","end","Subscription","unsubscribe","Number","MAX_VALUE","MockDisposable","disposes","MockObserver","MockObserverPrototype","then","onResolved","onRejected","newPromise","retValue","idx","indexOf","splice","err","HotObservable","observable","ColdObservable","TestScheduler","baseComparer","absolute","relative","Date","getTime","timeSpan","startWithTiming","source","subscription","createObserver","startWithDispose","startWithCreate","createHotObservable","args","isArray","createColdObservable","createResolvedPromise","createRejectedPromise","reason"],"mappings":";CAEE,SAAUA,GACV,GAAIC,IACFC,YAAY,EACZC,QAAU,GAIVC,EAAcH,QAAmBI,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAWN,QAAmBO,QAASA,KAAKC,QAAUD,KACtDE,EAAaT,QAAmBU,UAAWA,QAAUA,OAAOF,QAAUE,OACtEC,EAAaX,QAAmBY,UAAWA,SAAWA,OAAOP,UAAYO,OAEzEC,GADgBF,GAAcA,EAAWP,UAAYD,GAAeA,EACvDA,GAAeQ,GAA+B,gBAAVG,SAAsBA,QAAUA,OAAON,QAAUM,QAEhGC,EAAOA,EAAOF,GAAgBJ,KAAgBO,MAAQA,KAAKN,SAAYD,GAAeH,GAAYU,IAG9E,mBAAXC,SAAyBA,OAAOC,IACvCD,QAAQ,aAAc,SAAUE,EAAIf,GAChC,MAAOL,GAAQgB,EAAMX,EAASe,KAET,gBAAXP,SAAuBA,QAAUA,OAAOR,UAAYD,EAClES,OA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EAAc3N,UAAU6O,sBAAwB,SAAU3C,EAAO4C,GAC/D,MAAO,IAAIhM,GAAY5E,MAAOG,EAAGyN,aAAatG,QAAQ0G,EAAO4C,MAO/DnB,EAAc3N,UAAUqO,eAAiB,WACvC,MAAO,IAAIxB,IAAa3O,OAGnByP,GACNnE,IAEInL"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
|
2
|
+
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.core"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx.core")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){var b=[];if(!Y(a))return b;X.nonEnumArgs&&a.length&&Z(a)&&(a=slice.call(a));var c=X.enumPrototypes&&"function"==typeof a,d=X.enumErrorProps&&(a===R||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(X.nonEnumShadows&&a!==S){var f=a.constructor,g=-1,h=D;if(a===(f&&f.prototype))var i=a===T?N:a===R?I:O.call(a),j=W[i];for(;++g<h;)e=C[g],j&&j[e]||!P.call(a,e)||b.push(e)}return b}function f(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function g(a,b){return f(a,b,e)}function h(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function i(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var j=O.call(a),k=O.call(b);if(j==E&&(j=L),k==E&&(k=L),j!=k)return!1;switch(j){case G:case H:return+a==+b;case K:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case M:case N:return a==String(b)}var l=j==F;if(!l){if(j!=L||!X.nodeClass&&(h(a)||h(b)))return!1;var m=!X.argsObject&&Z(a)?Object:a.constructor,n=!X.argsObject&&Z(b)?Object:b.constructor;if(!(m==n||P.call(a,"constructor")&&P.call(b,"constructor")||isFunction(m)&&m instanceof m&&isFunction(n)&&n instanceof n||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var o=c.length;o--;)if(c[o]==a)return d[o]==b;var p=0,q=!0;if(c.push(a),d.push(b),l){if(o=a.length,p=b.length,q=p==o)for(;p--;){var r=b[p];if(!(q=i(a[p],r,c,d)))break}}else g(b,function(b,e,f){return P.call(f,e)?(p++,q=P.call(a,e)&&i(a[e],b,c,d)):void 0}),q&&g(a,function(a,b,c){return P.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function j(a,b){this.id=a,this.value=b}function k(a){this.predicate=a}function l(a){this.predicate=a}function m(a,b){var c=this;this.scheduler=a,this.messages=b,this.subscriptions=[],this.observers=[];for(var d=0,e=this.messages.length;e>d;d++){var f=this.messages[d],g=f.value;!function(b){a.scheduleAbsoluteWithState(null,f.time,function(){for(var a=c.observers.slice(0),d=0,e=a.length;e>d;d++)b.accept(a[d]);return r})}(g)}}var n,o=c.Observer,p=c.Observable,q=c.Disposable,r=q.empty,s=q.create,t=c.CompositeDisposable,u=c.SingleAssignmentDisposable,v=c.Scheduler,w=c.internals.ScheduledItem,x=c.internals.SchedulePeriodicRecursive,y=c.internals.inherits,z=c.helpers.notImplemented,A=c.helpers.defaultComparer=function(a,b){return $(a,b)},B=c.Notification=function(){function a(a,b,c,d,e,f){this.kind=a,this.value=b,this.exception=c,this._accept=d,this._acceptObservable=e,this.toString=f}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 isScheduler(a)||(a=immediateScheduler),new AnonymousObservable(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),C=(B.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){return new B("N",d,null,a,b,c)}}(),B.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){return new B("E",null,d,a,b,c)}}(),B.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new B("C",null,null,a,b,c)}}(),["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]),D=C.length,E="[object Arguments]",F="[object Array]",G="[object Boolean]",H="[object Date]",I="[object Error]",J="[object Function]",K="[object Number]",L="[object Object]",M="[object RegExp]",N="[object String]",O=Object.prototype.toString,P=Object.prototype.hasOwnProperty,Q=O.call(arguments)==E,R=Error.prototype,S=Object.prototype,T=String.prototype,U=S.propertyIsEnumerable;try{n=!(O.call(document)==L&&!({toString:0}+""))}catch(V){n=!0}var W={};W[F]=W[H]=W[K]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},W[G]=W[N]={constructor:!0,toString:!0,valueOf:!0},W[I]=W[J]=W[M]={constructor:!0,toString:!0},W[L]={constructor:!0};var X={};!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);X.enumErrorProps=U.call(R,"message")||U.call(R,"name"),X.enumPrototypes=U.call(a,"prototype"),X.nonEnumArgs=0!=c,X.nonEnumShadows=!/valueOf/.test(b)}(1);var Y=c.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Z=function(a){return a&&"object"==typeof a?O.call(a)==E:!1};Q||(Z=function(a){return a&&"object"==typeof a?P.call(a,"callee"):!1});var $=c.internals.isEqual=function(a,b){return i(a,b,[],[])},x=c.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 u;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}();j.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var _=c.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},ab=_.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(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},ab.peek=function(){return this.items[0].value},ab.removeAt=function(a){this.items[a]=this.items[--this.length],this.items[this.length]=d,this.heapify()},ab.dequeue=function(){var a=this.peek();return this.removeAt(0),a},ab.enqueue=function(a){var b=this.length++;this.items[b]=new j(_.count++,a),this.percolate(b)},ab.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},_.count=0;var bb=c.VirtualTimeScheduler=function(a){function b(){return this.toDateTimeOffset(this.clock)}function c(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function d(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function e(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function f(a,b){return b(),r}function g(f,g){this.clock=f,this.comparer=g,this.isEnabled=!1,this.queue=new _(1024),a.call(this,b,c,d,e)}y(g,a);var h=g.prototype;return h.add=z,h.toDateTimeOffset=z,h.toRelative=z,h.schedulePeriodicWithState=function(a,b,c){var d=new x(this,a,b,c);return d.start()},h.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},h.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,f)},h.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)}},h.stop=function(){this.isEnabled=!1},h.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new ArgumentOutOfRangeError;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}},h.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new ArgumentOutOfRangeError;0!==c&&this.advanceTo(b)},h.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new ArgumentOutOfRangeError;this.clock=b},h.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},h.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,f)},h.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(f),c(a,b)}var e=this,f=new w(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},g}(v);k.prototype.equals=function(a){return a===this?!0:null==a?!1:"N"!==a.kind?!1:this.predicate(a.value)},l.prototype.equals=function(a){return a===this?!0:null==a?!1:"E"!==a.kind?!1:this.predicate(a.exception)};var cb=c.ReactiveTest={created:100,subscribed:200,disposed:1e3,onNext:function(a,b){return"function"==typeof b?new db(a,new k(b)):new db(a,B.createOnNext(b))},onError:function(a,b){return"function"==typeof b?new db(a,new l(b)):new db(a,B.createOnError(b))},onCompleted:function(a){return new db(a,B.createOnCompleted())},subscribe:function(a,b){return new eb(a,b)}},db=c.Recorded=function(a,b,c){this.time=a,this.value=b,this.comparer=c||A};db.prototype.equals=function(a){return this.time===a.time&&this.comparer(this.value,a.value)},db.prototype.toString=function(){return this.value.toString()+"@"+this.time};var eb=c.Subscription=function(a,b){this.subscribe=a,this.unsubscribe=b||Number.MAX_VALUE};eb.prototype.equals=function(a){return this.subscribe===a.subscribe&&this.unsubscribe===a.unsubscribe},eb.prototype.toString=function(){return"("+this.subscribe+", "+(this.unsubscribe===Number.MAX_VALUE?"Infinite":this.unsubscribe)+")"};var fb=c.MockDisposable=function(a){this.scheduler=a,this.disposes=[],this.disposes.push(this.scheduler.clock)};fb.prototype.dispose=function(){this.disposes.push(this.scheduler.clock)};var gb=function(a){function b(b){a.call(this),this.scheduler=b,this.messages=[]}y(b,a);var c=b.prototype;return c.onNext=function(a){this.messages.push(new db(this.scheduler.clock,B.createOnNext(a)))},c.onError=function(a){this.messages.push(new db(this.scheduler.clock,B.createOnError(a)))},c.onCompleted=function(){this.messages.push(new db(this.scheduler.clock,B.createOnCompleted()))},b}(o);m.prototype.then=function(a,b){var e=this;this.subscriptions.push(new eb(this.scheduler.clock));var f,g=this.subscriptions.length-1,h=c.Observer.create(function(b){var i=a(b);if(i&&"function"==typeof i.then)f=i;else{var j=e.scheduler.clock;f=new m(e.scheduler,[c.ReactiveTest.onNext(j,d),c.ReactiveTest.onCompleted(j)])}var k=e.observers.indexOf(h);e.observers.splice(k,1),e.subscriptions[g]=new eb(e.subscriptions[g].subscribe,e.scheduler.clock)},function(a){b(a);var c=e.observers.indexOf(h);e.observers.splice(c,1),e.subscriptions[g]=new eb(e.subscriptions[g].subscribe,e.scheduler.clock)});return this.observers.push(h),f||new m(this.scheduler,this.messages)};var hb=function(a){function b(a){var b=this;this.observers.push(a),this.subscriptions.push(new eb(this.scheduler.clock));var c=this.subscriptions.length-1;return s(function(){var d=b.observers.indexOf(a);b.observers.splice(d,1),b.subscriptions[c]=new eb(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 r})}(f)}return y(c,a),c}(p),ib=function(a){function b(a){var b,c,d=this;this.subscriptions.push(new eb(this.scheduler.clock));for(var e=this.subscriptions.length-1,f=new t,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),r}))}(c);return s(function(){d.subscriptions[e]=new eb(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 y(c,a),c}(p);return c.TestScheduler=function(a){function b(a,b){return a>b?1:b>a?-1:0}function d(){a.call(this,0,b)}return y(d,a),d.prototype.scheduleAbsoluteWithState=function(b,c,d){return c<=this.clock&&(c=this.clock+1),a.prototype.scheduleAbsoluteWithState.call(this,b,c,d)},d.prototype.add=function(a,b){return a+b},d.prototype.toDateTimeOffset=function(a){return new Date(a).getTime()},d.prototype.toRelative=function(a){return a},d.prototype.startWithTiming=function(a,b,c,d){var e,f,g=this.createObserver();return this.scheduleAbsoluteWithState(null,b,function(){return e=a(),r}),this.scheduleAbsoluteWithState(null,c,function(){return f=e.subscribe(g),r}),this.scheduleAbsoluteWithState(null,d,function(){return f.dispose(),r}),this.start(),g},d.prototype.startWithDispose=function(a,b){return this.startWithTiming(a,cb.created,cb.subscribed,b)},d.prototype.startWithCreate=function(a){return this.startWithTiming(a,cb.created,cb.subscribed,cb.disposed)},d.prototype.createHotObservable=function(){var a,b=arguments.length;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new hb(this,a)},d.prototype.createColdObservable=function(){var a,b=arguments.length;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new ib(this,a)},d.prototype.createResolvedPromise=function(a,b){return new m(this,[c.ReactiveTest.onNext(a,b),c.ReactiveTest.onCompleted(a)])},d.prototype.createRejectedPromise=function(a,b){return new m(this,[c.ReactiveTest.onError(a,b)])},d.prototype.createObserver=function(){return new gb(this)},d}(bb),c});
|
3
|
+
//# sourceMappingURL=rx.core.testing.map
|
@@ -1,35 +1,31 @@
|
|
1
1
|
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
|
2
2
|
|
3
3
|
;(function (factory) {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
'number': false,
|
9
|
-
'string': false,
|
10
|
-
'undefined': false
|
11
|
-
};
|
4
|
+
var objectTypes = {
|
5
|
+
'function': true,
|
6
|
+
'object': true
|
7
|
+
};
|
12
8
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
var
|
10
|
+
freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports,
|
11
|
+
freeSelf = objectTypes[typeof self] && self.Object && self,
|
12
|
+
freeWindow = objectTypes[typeof window] && window && window.Object && window,
|
13
|
+
freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
|
14
|
+
moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
|
15
|
+
freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
|
18
16
|
|
19
|
-
|
20
|
-
root = freeGlobal;
|
21
|
-
}
|
17
|
+
var root = root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
|
22
18
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
19
|
+
// Because of build optimizers
|
20
|
+
if (typeof define === 'function' && define.amd) {
|
21
|
+
define(['./rx'], function (Rx, exports) {
|
22
|
+
return factory(root, exports, Rx);
|
23
|
+
});
|
24
|
+
} else if (typeof module === 'object' && module && module.exports === freeExports) {
|
25
|
+
module.exports = factory(root, module.exports, require('./rx'));
|
26
|
+
} else {
|
27
|
+
root.Rx = factory(root, {}, root.Rx);
|
28
|
+
}
|
33
29
|
}.call(this, function (root, exp, Rx, undefined) {
|
34
30
|
|
35
31
|
// Aliases
|
@@ -57,9 +53,29 @@
|
|
57
53
|
helpers = Rx.helpers,
|
58
54
|
noop = helpers.noop,
|
59
55
|
isPromise = helpers.isPromise,
|
56
|
+
isFunction = helpers.isFunction,
|
60
57
|
isScheduler = Rx.Scheduler.isScheduler,
|
61
58
|
observableFromPromise = Observable.fromPromise;
|
62
59
|
|
60
|
+
var errorObj = {e: {}};
|
61
|
+
var tryCatchTarget;
|
62
|
+
function tryCatcher() {
|
63
|
+
try {
|
64
|
+
return tryCatchTarget.apply(this, arguments);
|
65
|
+
} catch (e) {
|
66
|
+
errorObj.e = e;
|
67
|
+
return errorObj;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
function tryCatch(fn) {
|
71
|
+
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
|
72
|
+
tryCatchTarget = fn;
|
73
|
+
return tryCatcher;
|
74
|
+
}
|
75
|
+
function thrower(e) {
|
76
|
+
throw e;
|
77
|
+
}
|
78
|
+
|
63
79
|
// Shim in iterator support
|
64
80
|
var $iterator$ = (typeof Symbol === 'function' && Symbol.iterator) ||
|
65
81
|
'_es6shim_iterator_';
|
@@ -80,15 +96,28 @@
|
|
80
96
|
|
81
97
|
Rx.helpers.iterator = $iterator$;
|
82
98
|
|
99
|
+
var WhileEnumerable = (function(__super__) {
|
100
|
+
inherits(WhileEnumerable, __super__);
|
101
|
+
function WhileEnumerable(c, s) {
|
102
|
+
this.c = c;
|
103
|
+
this.s = s;
|
104
|
+
}
|
105
|
+
WhileEnumerable.prototype[$iterator$] = function () {
|
106
|
+
var self = this;
|
107
|
+
return {
|
108
|
+
next: function () {
|
109
|
+
return self.c() ?
|
110
|
+
{ done: false, value: self.s } :
|
111
|
+
{ done: true, value: void 0 };
|
112
|
+
}
|
113
|
+
};
|
114
|
+
};
|
115
|
+
return WhileEnumerable;
|
116
|
+
}(Enumerable));
|
117
|
+
|
83
118
|
function enumerableWhile(condition, source) {
|
84
|
-
return new
|
85
|
-
|
86
|
-
return condition() ?
|
87
|
-
{ done: false, value: source } :
|
88
|
-
{ done: true, value: undefined };
|
89
|
-
});
|
90
|
-
});
|
91
|
-
}
|
119
|
+
return new WhileEnumerable(condition, source);
|
120
|
+
}
|
92
121
|
|
93
122
|
/**
|
94
123
|
* Returns an observable sequence that is the result of invoking the selector on the source sequence, without sharing subscriptions.
|
@@ -102,7 +131,7 @@
|
|
102
131
|
};
|
103
132
|
|
104
133
|
/**
|
105
|
-
* Determines whether an observable collection contains values.
|
134
|
+
* Determines whether an observable collection contains values.
|
106
135
|
*
|
107
136
|
* @example
|
108
137
|
* 1 - res = Rx.Observable.if(condition, obs1);
|
@@ -113,7 +142,7 @@
|
|
113
142
|
* @param {Observable} [elseSource] The observable sequence or Promise that will be run if the condition function returns false. If this is not provided, it defaults to Rx.Observabe.Empty with the specified scheduler.
|
114
143
|
* @returns {Observable} An observable sequence which is either the thenSource or elseSource.
|
115
144
|
*/
|
116
|
-
Observable['if'] =
|
145
|
+
Observable['if'] = function (condition, thenSource, elseSourceOrScheduler) {
|
117
146
|
return observableDefer(function () {
|
118
147
|
elseSourceOrScheduler || (elseSourceOrScheduler = observableEmpty());
|
119
148
|
|
@@ -163,25 +192,19 @@
|
|
163
192
|
|
164
193
|
/**
|
165
194
|
* Uses selector to determine which source in sources to use.
|
166
|
-
|
167
|
-
*
|
168
|
-
* @example
|
169
|
-
* 1 - res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 });
|
170
|
-
* 1 - res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
|
171
|
-
* 1 - res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
|
172
|
-
*
|
195
|
+
|
173
196
|
* @param {Function} selector The function which extracts the value for to test in a case statement.
|
174
197
|
* @param {Array} sources A object which has keys which correspond to the case statement labels.
|
175
198
|
* @param {Observable} [elseSource] The observable sequence or Promise that will be run if the sources are not matched. If this is not provided, it defaults to Rx.Observabe.empty with the specified scheduler.
|
176
199
|
*
|
177
200
|
* @returns {Observable} An observable sequence which is determined by a case statement.
|
178
201
|
*/
|
179
|
-
Observable['case'] =
|
202
|
+
Observable['case'] = function (selector, sources, defaultSourceOrScheduler) {
|
180
203
|
return observableDefer(function () {
|
181
204
|
isPromise(defaultSourceOrScheduler) && (defaultSourceOrScheduler = observableFromPromise(defaultSourceOrScheduler));
|
182
205
|
defaultSourceOrScheduler || (defaultSourceOrScheduler = observableEmpty());
|
183
206
|
|
184
|
-
|
207
|
+
isScheduler(defaultSourceOrScheduler) && (defaultSourceOrScheduler = observableEmpty(defaultSourceOrScheduler));
|
185
208
|
|
186
209
|
var result = sources[selector()];
|
187
210
|
isPromise(result) && (result = observableFromPromise(result));
|
@@ -405,7 +428,7 @@
|
|
405
428
|
* @param {Object} scheduler Scheduler used to execute the operation. If not specified, defaults to the ImmediateScheduler.
|
406
429
|
* @returns {Observable} An observable sequence which results from the comonadic bind operation.
|
407
430
|
*/
|
408
|
-
observableProto.manySelect = function (selector, scheduler) {
|
431
|
+
observableProto.manySelect = observableProto.extend = function (selector, scheduler) {
|
409
432
|
isScheduler(scheduler) || (scheduler = immediateScheduler);
|
410
433
|
var source = this;
|
411
434
|
return observableDefer(function () {
|
@@ -455,7 +478,7 @@
|
|
455
478
|
this.onNext(Observable.empty());
|
456
479
|
},
|
457
480
|
onError: function (e) {
|
458
|
-
this.onNext(Observable
|
481
|
+
this.onNext(Observable['throw'](e));
|
459
482
|
},
|
460
483
|
onNext: function (v) {
|
461
484
|
this.tail.onNext(v);
|
@@ -467,14 +490,14 @@
|
|
467
490
|
|
468
491
|
}(Observable));
|
469
492
|
|
470
|
-
|
493
|
+
/**
|
471
494
|
* Performs a exclusive waiting for the first to finish before subscribing to another observable.
|
472
495
|
* Observables that come in between subscriptions will be dropped on the floor.
|
473
496
|
* @returns {Observable} A exclusive observable with only the results that happen when subscribed.
|
474
497
|
*/
|
475
|
-
observableProto.
|
498
|
+
observableProto.switchFirst = function () {
|
476
499
|
var sources = this;
|
477
|
-
return new AnonymousObservable(function (
|
500
|
+
return new AnonymousObservable(function (o) {
|
478
501
|
var hasCurrent = false,
|
479
502
|
isStopped = false,
|
480
503
|
m = new SingleAssignmentDisposable(),
|
@@ -493,92 +516,31 @@
|
|
493
516
|
g.add(innerSubscription);
|
494
517
|
|
495
518
|
innerSubscription.setDisposable(innerSource.subscribe(
|
496
|
-
|
497
|
-
|
519
|
+
function (x) { o.onNext(x); },
|
520
|
+
function (e) { o.onError(e); },
|
498
521
|
function () {
|
499
522
|
g.remove(innerSubscription);
|
500
523
|
hasCurrent = false;
|
501
|
-
|
502
|
-
observer.onCompleted();
|
503
|
-
}
|
524
|
+
isStopped && g.length === 1 && o.onCompleted();
|
504
525
|
}));
|
505
526
|
}
|
506
527
|
},
|
507
|
-
|
528
|
+
function (e) { o.onError(e); },
|
508
529
|
function () {
|
509
530
|
isStopped = true;
|
510
|
-
|
511
|
-
observer.onCompleted();
|
512
|
-
}
|
531
|
+
!hasCurrent && g.length === 1 && o.onCompleted();
|
513
532
|
}));
|
514
533
|
|
515
534
|
return g;
|
516
535
|
}, this);
|
517
536
|
};
|
518
537
|
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
* @param {Function} selector Selector to invoke for every item in the current subscription.
|
523
|
-
* @param {Any} [thisArg] An optional context to invoke with the selector parameter.
|
524
|
-
* @returns {Observable} An exclusive observable with only the results that happen when subscribed.
|
525
|
-
*/
|
526
|
-
observableProto.exclusiveMap = function (selector, thisArg) {
|
527
|
-
var sources = this,
|
528
|
-
selectorFunc = bindCallback(selector, thisArg, 3);
|
529
|
-
return new AnonymousObservable(function (observer) {
|
530
|
-
var index = 0,
|
531
|
-
hasCurrent = false,
|
532
|
-
isStopped = true,
|
533
|
-
m = new SingleAssignmentDisposable(),
|
534
|
-
g = new CompositeDisposable();
|
535
|
-
|
536
|
-
g.add(m);
|
537
|
-
|
538
|
-
m.setDisposable(sources.subscribe(
|
539
|
-
function (innerSource) {
|
540
|
-
|
541
|
-
if (!hasCurrent) {
|
542
|
-
hasCurrent = true;
|
543
|
-
|
544
|
-
innerSubscription = new SingleAssignmentDisposable();
|
545
|
-
g.add(innerSubscription);
|
546
|
-
|
547
|
-
isPromise(innerSource) && (innerSource = observableFromPromise(innerSource));
|
548
|
-
|
549
|
-
innerSubscription.setDisposable(innerSource.subscribe(
|
550
|
-
function (x) {
|
551
|
-
var result;
|
552
|
-
try {
|
553
|
-
result = selectorFunc(x, index++, innerSource);
|
554
|
-
} catch (e) {
|
555
|
-
observer.onError(e);
|
556
|
-
return;
|
557
|
-
}
|
558
|
-
|
559
|
-
observer.onNext(result);
|
560
|
-
},
|
561
|
-
function (e) { observer.onError(e); },
|
562
|
-
function () {
|
563
|
-
g.remove(innerSubscription);
|
564
|
-
hasCurrent = false;
|
565
|
-
|
566
|
-
if (isStopped && g.length === 1) {
|
567
|
-
observer.onCompleted();
|
568
|
-
}
|
569
|
-
}));
|
570
|
-
}
|
571
|
-
},
|
572
|
-
function (e) { observer.onError(e); },
|
573
|
-
function () {
|
574
|
-
isStopped = true;
|
575
|
-
if (g.length === 1 && !hasCurrent) {
|
576
|
-
observer.onCompleted();
|
577
|
-
}
|
578
|
-
}));
|
579
|
-
return g;
|
580
|
-
}, this);
|
581
|
-
};
|
538
|
+
observableProto.flatMapFirst = observableProto.selectManyFirst = function(selector, resultSelector, thisArg) {
|
539
|
+
return new FlatMapObservable(this, selector, resultSelector, thisArg).switchFirst();
|
540
|
+
};
|
582
541
|
|
583
|
-
|
542
|
+
Rx.Observable.prototype.flatMapWithMaxConcurrent = function(limit, selector, resultSelector, thisArg) {
|
543
|
+
return new FlatMapObservable(this, selector, resultSelector, thisArg).merge(limit);
|
544
|
+
};
|
545
|
+
return Rx;
|
584
546
|
}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rx.experimental.min.js","sources":["rx.experimental.js"],"names":["factory","objectTypes","
|
1
|
+
{"version":3,"file":"rx.experimental.min.js","sources":["rx.experimental.js"],"names":["factory","objectTypes","function","object","freeExports","exports","nodeType","freeSelf","self","Object","freeWindow","window","freeModule","module","freeGlobal","global","root","this","define","amd","Rx","require","call","exp","undefined","enumerableWhile","condition","source","WhileEnumerable","Observable","observableProto","prototype","AnonymousObservable","observableConcat","concat","observableDefer","defer","observableEmpty","empty","disposableEmpty","Disposable","CompositeDisposable","SerialDisposable","SingleAssignmentDisposable","Enumerable","internals","Enumerator","enumerableOf","of","immediateScheduler","Scheduler","immediate","currentThreadScheduler","currentThread","AsyncSubject","Array","slice","Observer","inherits","addProperties","bindCallback","helpers","noop","isPromise","isScheduler","isFunction","observableFromPromise","fromPromise","$iterator$","Symbol","iterator","Set","doneEnumerator","done","value","isIterable","o","isArrayLike","length","__super__","c","s","next","letBind","func","thenSource","elseSourceOrScheduler","now","forIn","sources","resultSelector","thisArg","observableWhileDo","whileDo","doWhile","selector","defaultSourceOrScheduler","result","expand","scheduler","observer","q","m","d","activeCount","isAcquired","ensureActive","isOwner","setDisposable","scheduleRecursive","work","shift","m1","add","subscribe","x","onNext","e","onError","push","bind","remove","onCompleted","forkJoin","allSources","isArray","arguments","i","len","subscriber","count","group","finished","hasResults","hasCompleted","results","idx","dispose","ix","second","first","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","leftSubscription","rightSubscription","left","err","right","manySelect","extend","chain","map","curr","ChainObservable","tap","observeOn","g","schedule","head","tail","mergeAll","v","switchFirst","hasCurrent","isStopped","innerSource","innerSubscription","flatMapFirst","selectManyFirst","FlatMapObservable","flatMapWithMaxConcurrent","limit","merge"],"mappings":";CAEE,SAAUA,GACV,GAAIC,IACFC,YAAY,EACZC,QAAU,GAIVC,EAAcH,QAAmBI,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAWN,QAAmBO,QAASA,KAAKC,QAAUD,KACtDE,EAAaT,QAAmBU,UAAWA,QAAUA,OAAOF,QAAUE,OACtEC,EAAaX,QAAmBY,UAAWA,SAAWA,OAAOP,UAAYO,OAEzEC,GADgBF,GAAcA,EAAWP,UAAYD,GAAeA,EACvDA,GAAeQ,GAA+B,gBAAVG,SAAsBA,QAAUA,OAAON,QAAUM,QAEhGC,EAAOA,EAAOF,GAAgBJ,KAAgBO,MAAQA,KAAKN,SAAYD,GAAeH,GAAYU,IAGhF,mBAAXC,SAAyBA,OAAOC,IACzCD,QAAQ,QAAS,SAAUE,EAAIf,GAC7B,MAAOL,GAAQgB,EAAMX,EAASe,KAEL,gBAAXP,SAAuBA,QAAUA,OAAOR,UAAYD,EACpES,OAAOR,QAAUL,EAAQgB,EAAMH,OAAOR,QAASgB,QAAQ,SAEvDL,EAAKI,GAAKpB,EAAQgB,KAAUA,EAAKI,MAEnCE,KAAKL,KAAM,SAAUD,EAAMO,EAAKH,EAAII,GAyFpC,QAASC,GAAgBC,EAAWC,GAClC,MAAO,IAAIC,GAAgBF,EAAWC,GAvFxC,GAAIE,GAAaT,EAAGS,WAClBC,EAAkBD,EAAWE,UAC7BC,EAAsBZ,EAAGY,oBACzBC,EAAmBJ,EAAWK,OAC9BC,EAAkBN,EAAWO,MAC7BC,EAAkBR,EAAWS,MAC7BC,EAAkBnB,EAAGoB,WAAWF,MAChCG,EAAsBrB,EAAGqB,oBACzBC,EAAmBtB,EAAGsB,iBACtBC,EAA6BvB,EAAGuB,2BAEhCC,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,IAAIC,GAAoB,GAAI/H,EAC5BqH,GAAE/C,IAAIyD,GAENA,EAAkB9D,cAAc6D,EAAYvD,UAC1C,SAAUC,GAAKvC,EAAEwC,OAAOD,IACxB,SAAUE,GAAKzC,EAAE0C,QAAQD,IACzB,WACE2C,EAAEvC,OAAOiD,GACTH,GAAa,EACbC,GAA0B,IAAbR,EAAElF,QAAgBF,EAAE8C,mBAIzC,SAAUL,GAAKzC,EAAE0C,QAAQD,IACzB,WACEmD,GAAY,GACXD,GAA2B,IAAbP,EAAElF,QAAgBF,EAAE8C,iBAGhCsC,GACN/I,OAGPa,EAAgB6I,aAAe7I,EAAgB8I,gBAAkB,SAAS7E,EAAUL,EAAgBC,GAChG,MAAO,IAAIkF,mBAAkB5J,KAAM8E,EAAUL,EAAgBC,GAAS2E,eAG1ElJ,EAAGS,WAAWE,UAAU+I,yBAA2B,SAASC,EAAOhF,EAAUL,EAAgBC,GACzF,MAAO,IAAIkF,mBAAkB5J,KAAM8E,EAAUL,EAAgBC,GAASqF,MAAMD,IAEvE3J"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
|
2
|
-
(function(a){var b={"
|
2
|
+
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a,b){return new D(a,b)}var f=c.Observable,g=f.prototype,h=c.AnonymousObservable,i=f.concat,j=f.defer,k=f.empty,l=c.Disposable.empty,m=c.CompositeDisposable,n=c.SerialDisposable,o=c.SingleAssignmentDisposable,p=(c.internals.Enumerator,c.internals.Enumerable),q=p.of,r=c.Scheduler.immediate,s=c.Scheduler.currentThread,t=(Array.prototype.slice,c.AsyncSubject),u=c.Observer,v=c.internals.inherits,w=(c.internals.bindCallback,c.internals.addProperties),x=c.helpers,y=x.noop,z=x.isPromise,A=(x.isFunction,c.Scheduler.isScheduler),B=f.fromPromise,C="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";a.Set&&"function"==typeof(new a.Set)["@@iterator"]&&(C="@@iterator");c.doneEnumerator={done:!0,value:d},c.helpers.isIterable=function(a){return a[C]!==d},c.helpers.isArrayLike=function(a){return a&&a.length!==d};c.helpers.iterator=C;var D=function(a){function b(a,b){this.c=a,this.s=b}return v(b,a),b.prototype[C]=function(){var a=this;return{next:function(){return a.c()?{done:!1,value:a.s}:{done:!0,value:void 0}}}},b}(p);g.letBind=g.let=function(a){return a(this)},f["if"]=function(a,b,c){return j(function(){return c||(c=k()),z(b)&&(b=B(b)),z(c)&&(c=B(c)),"function"==typeof c.now&&(c=k(c)),a()?b:c})},f["for"]=f.forIn=function(a,b,c){return q(a,b,c).concat()};var E=f["while"]=f.whileDo=function(a,b){return z(b)&&(b=B(b)),e(a,b).concat()};g.doWhile=function(a){return i([this,E(a,this)])},f["case"]=function(a,b,c){return j(function(){z(c)&&(c=B(c)),c||(c=k()),A(c)&&(c=k(c));var d=b[a()];return z(d)&&(d=B(d)),d||c})},g.expand=function(a,b){A(b)||(b=r);var c=this;return new h(function(d){var e=[],f=new n,g=new m(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 o;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},this)},f.forkJoin=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new h(function(b){var c=a.length;if(0===c)return b.onCompleted(),l;for(var d=new m,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];z(j)&&(j=B(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})},g.forkJoin=function(a,b){var c=this;return new h(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new o,l=new o;return z(a)&&(a=B(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 m(k,l)},c)},g.manySelect=g.extend=function(a,b){A(b)||(b=r);var c=this;return j(function(){var d;return c.map(function(a){var b=new F(a);return d&&d.onNext(a),d=b,b}).tap(y,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)},c)};var F=function(a){function b(a){var b=this,c=new m;return c.add(s.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeAll().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new t}return v(c,a),w(c.prototype,u,{onCompleted:function(){this.onNext(f.empty())},onError:function(a){this.onNext(f["throw"](a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(f);return g.switchFirst=function(){var a=this;return new h(function(b){var c=!1,d=!1,e=new o,f=new m;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,z(a)&&(a=B(a));var e=new o;f.add(e),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},function(a){b.onError(a)},function(){d=!0,!c&&1===f.length&&b.onCompleted()})),f},this)},g.flatMapFirst=g.selectManyFirst=function(a,b,c){return new FlatMapObservable(this,a,b,c).switchFirst()},c.Observable.prototype.flatMapWithMaxConcurrent=function(a,b,c,d){return new FlatMapObservable(this,b,c,d).merge(a)},c});
|
3
3
|
//# sourceMappingURL=rx.experimental.map
|
@@ -1,35 +1,31 @@
|
|
1
1
|
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
|
2
2
|
|
3
3
|
;(function (factory) {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
'number': false,
|
9
|
-
'string': false,
|
10
|
-
'undefined': false
|
11
|
-
};
|
4
|
+
var objectTypes = {
|
5
|
+
'function': true,
|
6
|
+
'object': true
|
7
|
+
};
|
12
8
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
var
|
10
|
+
freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports,
|
11
|
+
freeSelf = objectTypes[typeof self] && self.Object && self,
|
12
|
+
freeWindow = objectTypes[typeof window] && window && window.Object && window,
|
13
|
+
freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
|
14
|
+
moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
|
15
|
+
freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
|
18
16
|
|
19
|
-
|
20
|
-
root = freeGlobal;
|
21
|
-
}
|
17
|
+
var root = root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
|
22
18
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
19
|
+
// Because of build optimizers
|
20
|
+
if (typeof define === 'function' && define.amd) {
|
21
|
+
define(['./rx'], function (Rx, exports) {
|
22
|
+
return factory(root, exports, Rx);
|
23
|
+
});
|
24
|
+
} else if (typeof module === 'object' && module && module.exports === freeExports) {
|
25
|
+
module.exports = factory(root, module.exports, require('./rx'));
|
26
|
+
} else {
|
27
|
+
root.Rx = factory(root, {}, root.Rx);
|
28
|
+
}
|
33
29
|
}.call(this, function (root, exp, Rx, undefined) {
|
34
30
|
|
35
31
|
// Aliases
|
@@ -47,30 +43,45 @@
|
|
47
43
|
Enumerable = Rx.internals.Enumerable,
|
48
44
|
Enumerator = Rx.internals.Enumerator,
|
49
45
|
$iterator$ = Rx.iterator,
|
50
|
-
doneEnumerator = Rx.doneEnumerator
|
46
|
+
doneEnumerator = Rx.doneEnumerator,
|
47
|
+
bindCallback = Rx.internals.bindCallback;
|
51
48
|
|
52
|
-
/** @private */
|
53
49
|
var Map = root.Map || (function () {
|
54
|
-
|
55
50
|
function Map() {
|
56
|
-
this.
|
51
|
+
this.size = 0;
|
57
52
|
this._values = [];
|
53
|
+
this._keys = [];
|
58
54
|
}
|
59
55
|
|
56
|
+
Map.prototype['delete'] = function (key) {
|
57
|
+
var i = this._keys.indexOf(key);
|
58
|
+
if (i === -1) { return false }
|
59
|
+
this._values.splice(i, 1);
|
60
|
+
this._keys.splice(i, 1);
|
61
|
+
this.size--;
|
62
|
+
return true;
|
63
|
+
};
|
64
|
+
|
60
65
|
Map.prototype.get = function (key) {
|
61
66
|
var i = this._keys.indexOf(key);
|
62
|
-
return i
|
67
|
+
return i === -1 ? undefined : this._values[i];
|
63
68
|
};
|
64
69
|
|
65
70
|
Map.prototype.set = function (key, value) {
|
66
71
|
var i = this._keys.indexOf(key);
|
67
|
-
i
|
68
|
-
|
72
|
+
if (i === -1) {
|
73
|
+
this._keys.push(key);
|
74
|
+
this._values.push(value);
|
75
|
+
this.size++;
|
76
|
+
} else {
|
77
|
+
this._values[i] = value;
|
78
|
+
}
|
79
|
+
return this;
|
69
80
|
};
|
70
81
|
|
71
|
-
Map.prototype.forEach = function (
|
72
|
-
for (var i = 0
|
73
|
-
|
82
|
+
Map.prototype.forEach = function (cb, thisArg) {
|
83
|
+
for (var i = 0; i < this.size; i++) {
|
84
|
+
cb.call(thisArg, this._values[i], this._keys[i]);
|
74
85
|
}
|
75
86
|
};
|
76
87
|
|
@@ -309,5 +320,5 @@
|
|
309
320
|
});
|
310
321
|
};
|
311
322
|
|
312
|
-
|
323
|
+
return Rx;
|
313
324
|
}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rx.joinpatterns.min.js","sources":["rx.joinpatterns.js"],"names":["factory","objectTypes","
|
1
|
+
{"version":3,"file":"rx.joinpatterns.min.js","sources":["rx.joinpatterns.js"],"names":["factory","objectTypes","function","object","freeExports","exports","nodeType","freeSelf","self","Object","freeWindow","window","freeModule","module","freeGlobal","global","root","this","define","amd","Rx","require","call","exp","undefined","Pattern","patterns","Plan","expression","selector","planCreateObserver","externalSubscriptions","observable","onError","entry","get","observer","JoinObserver","set","ActivePlan","joinObserverArray","onNext","onCompleted","joinObservers","Map","i","len","length","joinObserver","Observable","observableProto","prototype","AnonymousObservable","observableThrow","throwError","observerCreate","Observer","create","SingleAssignmentDisposable","CompositeDisposable","AbstractObserver","internals","noop","helpers","inherits","isEqual","Enumerable","Enumerator","iterator","doneEnumerator","bindCallback","size","_values","_keys","key","indexOf","splice","value","push","forEach","cb","thisArg","and","other","concat","thenDo","activate","deactivate","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","slice","error","completed","subscribe","setDisposable","materialize","dispose","right","when","plans","Array","isArray","o","outObserver","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YnC,QAAQc,EAC9BqB,GAAYlC,OAAOyD,EAAK,GACD,IAAvBvB,EAAY/D,QAAgBkF,EAAEvF,iBAGlC,MAAOmD,GACPxC,EAAgBwC,GAAG2B,UAAUS,GAE/B,GAAIK,GAAQ,GAAI3E,EAMhB,OALA5B,GAAsBgD,QAAQ,SAAU/B,GACtCA,EAAawE,YACbc,EAAMC,IAAIvF,KAGLsF,KAIJlH"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
|
2
|
-
(function(a){var b={"
|
2
|
+
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(h,c,b)}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(a){this.patterns=a}function f(a,b){this.expression=a,this.selector=b}function g(a,b,c){var d=a.get(b);if(!d){var e=new t(b,c);return a.set(b,e),e}return d}function h(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new s;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}var i=c.Observable,j=i.prototype,k=c.AnonymousObservable,l=i.throwError,m=c.Observer.create,n=c.SingleAssignmentDisposable,o=c.CompositeDisposable,p=c.internals.AbstractObserver,q=c.helpers.noop,r=(c.internals.isEqual,c.internals.inherits),s=(c.internals.Enumerable,c.internals.Enumerator,c.iterator,c.doneEnumerator,c.internals.bindCallback,a.Map||function(){function a(){this.size=0,this._values=[],this._keys=[]}return a.prototype["delete"]=function(a){var b=this._keys.indexOf(a);return-1===b?!1:(this._values.splice(b,1),this._keys.splice(b,1),this.size--,!0)},a.prototype.get=function(a){var b=this._keys.indexOf(a);return-1===b?d:this._values[b]},a.prototype.set=function(a,b){var c=this._keys.indexOf(a);return-1===c?(this._keys.push(a),this._values.push(b),this.size++):this._values[c]=b,this},a.prototype.forEach=function(a,b){for(var c=0;c<this.size;c++)a.call(b,this._values[c],this._keys[c])},a}());e.prototype.and=function(a){return new e(this.patterns.concat(a))},e.prototype.thenDo=function(a){return new f(this,a)},f.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,i=this.expression.patterns.length;i>f;f++)e.push(g(a,this.expression.patterns[f],b.onError.bind(b)));var j=new h(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,i=e.length;i>f;f++)e[f].addActivePlan(j);return j},h.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},h.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;a<d.length;a++)f.push(d[a].value);this.onNext.apply(this,f)}}};var t=function(a){function b(b,c){a.call(this),this.source=b,this.onError=c,this.queue=[],this.activePlans=[],this.subscription=new n,this.isDisposed=!1}r(b,a);var c=b.prototype;return c.next=function(a){if(!this.isDisposed){if("E"===a.kind)return this.onError(a.exception);this.queue.push(a);for(var b=this.activePlans.slice(0),c=0,d=b.length;d>c;c++)b[c].match()}},c.error=q,c.completed=q,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}(p);return j.and=function(a){return new e([this,a])},j.thenDo=function(a){return new e([this]).thenDo(a)},i.when=function(){var a,b=arguments.length;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new k(function(b){var c=[],d=new s,e=m(function(a){b.onNext(a)},function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},function(){b.onCompleted()});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){l(h).subscribe(b)}var i=new o;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})},c});
|
3
3
|
//# sourceMappingURL=rx.joinpatterns.map
|