Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AA4E318BCC for ; Thu, 3 Mar 2016 00:50:00 +0000 (UTC) Received: (qmail 60415 invoked by uid 500); 3 Mar 2016 00:50:00 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 60384 invoked by uid 500); 3 Mar 2016 00:50:00 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 60365 invoked by uid 99); 3 Mar 2016 00:50:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Mar 2016 00:50:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 088E2C0D98 for ; Thu, 3 Mar 2016 00:50:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.472 X-Spam-Level: * X-Spam-Status: No, score=1.472 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.329, WEIRD_QUOTING=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 0ukKNARhjA6C for ; Thu, 3 Mar 2016 00:49:48 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 124485F396 for ; Thu, 3 Mar 2016 00:49:48 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 17A4CE08E0 for ; Thu, 3 Mar 2016 00:49:47 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id EE3963A06E1 for ; Thu, 3 Mar 2016 00:49:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1733397 [3/3] - in /cordova/site/public: ./ announcements/2016/02/16/ announcements/2016/03/ announcements/2016/03/02/ blog/ static/css/ static/js/ Date: Thu, 03 Mar 2016 00:49:45 -0000 To: commits@cordova.apache.org From: steven@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160303004946.EE3963A06E1@svn01-us-west.apache.org> Modified: cordova/site/public/static/css/main.css URL: http://svn.apache.org/viewvc/cordova/site/public/static/css/main.css?rev=1733397&r1=1733396&r2=1733397&view=diff ============================================================================== --- cordova/site/public/static/css/main.css (original) +++ cordova/site/public/static/css/main.css Thu Mar 3 00:49:45 2016 @@ -7810,4 +7810,3 @@ html[lang="ru"] .docs #home ul li { .artwork .button a:hover { color: #4cc2e4; } - Modified: cordova/site/public/static/js/index.js URL: http://svn.apache.org/viewvc/cordova/site/public/static/js/index.js?rev=1733397&r1=1733396&r2=1733397&view=diff ============================================================================== --- cordova/site/public/static/js/index.js (original) +++ cordova/site/public/static/js/index.js Thu Mar 3 00:49:45 2016 @@ -77,6 +77,8 @@ function checkNotification() { var dates = []; if (lastVisit != "") { + dates.push('Wed, 02 Mar 2016 00:00:00 -0800'); + dates.push('Wed, 02 Mar 2016 00:00:00 -0800'); dates.push('Tue, 16 Feb 2016 00:00:00 -0800'); dates.push('Tue, 09 Feb 2016 00:00:00 -0800'); dates.push('Thu, 04 Feb 2016 00:00:00 -0800'); Modified: cordova/site/public/static/js/plugins.js URL: http://svn.apache.org/viewvc/cordova/site/public/static/js/plugins.js?rev=1733397&r1=1733396&r2=1733397&view=diff ============================================================================== --- cordova/site/public/static/js/plugins.js (original) +++ cordova/site/public/static/js/plugins.js Thu Mar 3 00:49:45 2016 @@ -1,23 +1,8 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;olength;1=0){return xs.splice(i,1)}},fold:function(xs,seed,f){for(var i=0,x;i5){return"[..]"}return"["+_.map(_.toString,obj).toString()+"]"}else if((obj!=null?obj.toString:void 0)!=null&&obj.toString!==Object.prototype.toString){return obj.toString()}else if(typeof obj==="object"){if(recursionDepth>5){return"{..}"}internals=function(){var results=[];for(key in obj){if(!hasProp.call(obj,key))continue;value=function(){var error;try{return obj[key]}catch(error){return error}}();results.push(_.toString(key)+":"+_.toString(value))}return results}();return"{"+internals+"}"}else{return obj}}finally{recursionD epth--}}};var recursionDepth=0;Bacon._=_;var UpdateBarrier=Bacon.UpdateBarrier=function(){var rootEvent;var waiterObs=[];var waiters={};var afters=[];var aftersIndex=0;var flushed={};var afterTransaction=function(f){if(rootEvent){return afters.push(f)}else{return f()}};var whenDoneWith=function(obs,f){if(rootEvent){var obsWaiters=waiters[obs.id];if(!(typeof obsWaiters!=="undefined"&&obsWaiters!==null)){obsWaiters=waiters[obs.id]=[f];return waiterObs.push(obs)}else{return obsWaiters.push(f)}}else{return f()}};var flush=function(){while(waiterObs.length>0){flushWaiters(0,true)}flushed={}};var flushWaiters=function(index,deps){var obs=waiterObs[index];var obsId=obs.id;var obsWaiters=waiters[obsId];waiterObs.splice(index,1);delete waiters[obsId];if(deps&&waiterObs.length>0){flushDepsOf(obs)}for(var i=0,f;i0};return{whenDoneWith:whenDoneWith,hasWaiters:hasWaiters ,inTransaction:inTransaction,currentEventId:currentEventId,wrappedSubscribe:wrappedSubscribe,afterTransaction:afterTransaction}}();function Source(obs,sync){var lazy=arguments.length<=2||arguments[2]===undefined?false:arguments[2];this.obs=obs;this.sync=sync;this.lazy=lazy;this.queue=[]}extend(Source.prototype,{_isSource:true,subscribe:function(sink){return this.obs.dispatcher.subscribe(sink)},toString:function(){return this.obs.toString()},markEnded:function(){this.ended=true;return true},consume:function(){if(this.lazy){return{value:_.always(this.queue[0])}}else{return this.queue[0]}},push:function(x){this.queue=[x];return[x]},mayHave:function(){return true},hasAtLeast:function(){return this.queue.length},flatten:true});function ConsumingSource(){Source.apply(this,arguments)}inherit(ConsumingSource,Source);extend(ConsumingSource.prototype,{consume:function(){return this.queue.shift()},push:function(x){return this.queue.push(x)},mayHave:function(c){return!this.ended||this.queue.len gth>=c},hasAtLeast:function(c){return this.queue.length>=c},flatten:false});function BufferingSource(obs){Source.call(this,obs,true)}inherit(BufferingSource,Source);extend(BufferingSource.prototype,{consume:function(){var values=this.queue;this.queue=[];return{value:function(){return values}}},push:function(x){return this.queue.push(x.value())},hasAtLeast:function(){return true}});Source.isTrigger=function(s){if(s!=null?s._isSource:void 0){return s.sync}else{return s!=null?s._isEventStream:void 0}};Source.fromObservable=function(s){if(s!=null?s._isSource:void 0){return s}else if(s!=null?s._isProperty:void 0){return new Source(s,false)}else{return new ConsumingSource(s,true)}};function Desc(context,method,args){this.context=context;this.method=method;this.args=args}extend(Desc.prototype,{_isDesc:true,deps:function(){if(!this.cached){this.cached=findDeps([this.context].concat(this.args))}return this.cached},toString:function(){return _.toString(this.context)+"."+_.toString(this.method )+"("+_.map(_.toString,this.args)+")"}});var describe=function(context,method){var ref=context||method;if(ref&&ref._isDesc){return context||method}else{for(var _len=arguments.length,args=Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){args[_key-2]=arguments[_key]}return new Desc(context,method,args)}};var withDesc=function(desc,obs){obs.desc=desc;return obs};var findDeps=function(x){if(isArray(x)){return _.flatMap(findDeps,x)}else if(isObservable(x)){return[x]}else if(typeof x!=="undefined"&&x!==null?x._isSource:undefined){return[x.obs]}else{return[]}};Bacon.Desc=Desc;Bacon.Desc.empty=new Bacon.Desc("","",[]);var withMethodCallSupport=function(wrapped){return function(f){for(var _len2=arguments.length,args=Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){args[_key2-1]=arguments[_key2]}if(typeof f==="object"&&args.length){var context=f;var methodName=args[0];f=function(){return context[methodName].apply(context,arguments)};args=args.slice(1)}return wrapped.apply(undefined,[f].co ncat(args))}};var makeFunctionArgs=function(args){args=Array.prototype.slice.call(args);return makeFunction_.apply(undefined,args)};var partiallyApplied=function(f,applied){return function(){for(var _len3=arguments.length,args=Array(_len3),_key3=0;_key3<_len3;_key3++){args[_key3]=arguments[_key3]}return f.apply(undefined,applied.concat(args))}};var toSimpleExtractor=function(args){return function(key){return function(value){if(!(typeof value!=="undefined"&&value!==null)){return}else{var fieldValue=value[key];if(_.isFunction(fieldValue)){return fieldValue.apply(value,args)}else{return fieldValue}}}}};var toFieldExtractor=function(f,args){var parts=f.slice(1).split(".");var partFuncs=_.map(toSimpleExtractor(args),parts);return function(value){for(var i=0,f;i1&&f.charAt(0)==="."};var makeFunction_=withMethodCallSupport(function(f){for(var _len4=arguments.l ength,args=Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){args[_key4-1]=arguments[_key4]}if(_.isFunction(f)){if(args.length){return partiallyApplied(f,args)}else{return f}}else if(isFieldKey(f)){return toFieldExtractor(f,args)}else{return _.always(f)}});var makeFunction=function(f,args){return makeFunction_.apply(undefined,[f].concat(args))};var convertArgsToFunction=function(obs,f,args,method){if(typeof f!=="undefined"&&f!==null?f._isProperty:undefined){var sampled=f.sampledBy(obs,function(p,s){return[p,s]});return method.call(sampled,function(_ref){var p=_ref[0];var s=_ref[1];return p}).map(function(_ref2){var p=_ref2[0];var s=_ref2[1];return s})}else{f=makeFunction(f,args);return method.call(obs,f)}};var toCombinator=function(f){if(_.isFunction(f)){return f}else if(isFieldKey(f)){var key=toFieldKey(f);return function(left,right){return left[key](right)}}else{throw new Exception("not a function or a field key: "+f)}};var toFieldKey=function(f){return f.slice(1)};function So me(value){this.value=value}extend(Some.prototype,{_isSome:true,getOrElse:function(){return this.value},get:function(){return this.value},filter:function(f){if(f(this.value)){return new Some(this.value)}else{return None}},map:function(f){return new Some(f(this.value))},forEach:function(f){return f(this.value)},isDefined:true,toArray:function(){return[this.value]},inspect:function(){return"Some("+this.value+")"},toString:function(){return this.inspect()}});var None={_isNone:true,getOrElse:function(value){return value},filter:function(){return None},map:function(){return None},forEach:function(){},isDefined:false,toArray:function(){return[]},inspect:function(){return"None"},toString:function(){return this.inspect()}};var toOption=function(v){if((typeof v!=="undefined"&&v!==null?v._isSome:undefined)||(typeof v!=="undefined"&&v!==null?v._isNone:undefined)){return v}else{return new Some(v)}};Bacon.noMore="";Bacon.more="";var eventIdCounter=0;function Event(){this.id=++event IdCounter}Event.prototype._isEvent=true;Event.prototype.isEvent=function(){return true};Event.prototype.isEnd=function(){return false};Event.prototype.isInitial=function(){return false};Event.prototype.isNext=function(){return false};Event.prototype.isError=function(){return false};Event.prototype.hasValue=function(){return false};Event.prototype.filter=function(){return true};Event.prototype.inspect=function(){return this.toString()};Event.prototype.log=function(){return this.toString()};function Next(valueF,eager){if(!(this instanceof Next)){return new Next(valueF,eager)}Event.call(this);if(!eager&&_.isFunction(valueF)||(valueF!=null?valueF._isNext:void 0)){this.valueF=valueF;this.valueInternal=void 0}else{this.valueF=void 0;this.valueInternal=valueF}}inherit(Next,Event);Next.prototype.isNext=function(){return true};Next.prototype.hasValue=function(){return true};Next.prototype.value=function(){var ref;if((ref=this.valueF)!=null?ref._isNext:void 0){this.valueInternal=this.valueF.v alue();this.valueF=void 0}else if(this.valueF){this.valueInternal=this.valueF();this.valueF=void 0}return this.valueInternal};Next.prototype.fmap=function(f){var event,value;if(this.valueInternal){value=this.valueInternal;return this.apply(function(){return f(value)})}else{event=this;return this.apply(function(){return f(event.value())})}};Next.prototype.apply=function(value){return new Next(value)};Next.prototype.filter=function(f){return f(this.value())};Next.prototype.toString=function(){return _.toString(this.value())};Next.prototype.log=function(){return this.value()};Next.prototype._isNext=true;function Initial(valueF,eager){if(!(this instanceof Initial)){return new Initial(valueF,eager)}Next.call(this,valueF,eager)}inherit(Initial,Next);Initial.prototype._isInitial=true;Initial.prototype.isInitial=function(){return true};Initial.prototype.isNext=function(){return false};Initial.prototype.apply=function(value){return new Initial(value)};Initial.prototype.toNext=function(){retu rn new Next(this)};function End(){if(!(this instanceof End)){return new End}Event.call(this)}inherit(End,Event);End.prototype.isEnd=function(){return true};End.prototype.fmap=function(){return this};End.prototype.apply=function(){return this};End.prototype.toString=function(){return""};function Error(error){if(!(this instanceof Error)){return new Error(error)}this.error=error;Event.call(this)}inherit(Error,Event);Error.prototype.isError=function(){return true};Error.prototype.fmap=function(){return this};Error.prototype.apply=function(){return this};Error.prototype.toString=function(){return" "+_.toString(this.error)};Bacon.Event=Event;Bacon.Initial=Initial;Bacon.Next=Next;Bacon.End=End;Bacon.Error=Error;var initialEvent=function(value){return new Initial(value,true)};var nextEvent=function(value){return new Next(value,true)};var endEvent=function(){return new End};var toEvent=function(x){if(x&&x._isEvent){return x}else{return nextEvent(x)}};var idCounter=0;var registerO bs=function(){};function Observable(desc){this.desc=desc;this.id=++idCounter;this.initialDesc=this.desc}extend(Observable.prototype,{_isObservable:true,subscribe:function(sink){return UpdateBarrier.wrappedSubscribe(this,sink)},subscribeInternal:function(sink){return this.dispatcher.subscribe(sink)},onValue:function(){var f=makeFunctionArgs(arguments);return this.subscribe(function(event){if(event.hasValue()){return f(event.value())}})},onValues:function(f){return this.onValue(function(args){return f.apply(undefined,args)})},onError:function(){var f=makeFunctionArgs(arguments);return this.subscribe(function(event){if(event.isError()){return f(event.error)}})},onEnd:function(){var f=makeFunctionArgs(arguments);return this.subscribe(function(event){if(event.isEnd()){return f()}})},name:function(name){this._name=name;return this},withDescription:function(){this.desc=describe.apply(undefined,arguments);return this},toString:function(){if(this._name){return this._name}else{return this.des c.toString()}},internalDeps:function(){return this.initialDesc.deps()}});Observable.prototype.assign=Observable.prototype.onValue;Observable.prototype.forEach=Observable.prototype.onValue;Observable.prototype.inspect=Observable.prototype.toString;Bacon.Observable=Observable;function CompositeUnsubscribe(){var ss=arguments.length<=0||arguments[0]===undefined?[]:arguments[0];this.unsubscribe=_.bind(this.unsubscribe,this);this.unsubscribed=false;this.subscriptions=[];this.starting=[];for(var i=0,s;i0};Dispatcher.prototype.removeSub=function(subscription){this.s ubscriptions=_.without(subscription,this.subscriptions);return this.subscriptions};Dispatcher.prototype.push=function(event){if(event.isEnd()){this.ended=true}return UpdateBarrier.inTransaction(event,this,this.pushIt,[event])};Dispatcher.prototype.pushToSubscriptions=function(event){try{var tmp=this.subscriptions;var len=tmp.length;for(var i=0;i0){pats.push(pat)}i=i+2}if(!sources.length){return Bacon.never()}sources=_.map(Source.fromObservable,sources);var needsBarrier=_.any(sources,function(s){return s.flatten})&&containsDuplicateDeps(_.map(function(s){return s.obs},sources));var desc=new Bacon.Desc(Bacon,"when",patterns);var resultStream=new EventStream(desc,function(sink){var triggers=[];var ends=false;var match=function(p){for(var i1=0,i;i10){var reply=Bacon.more;var trigger=triggers.pop();for(var i1=0,p;i11?_len8-1:0),_key8=1;_key8<_len8;_key8++){args[_key8-1]=arguments[_key8]}return convertArgsToFunction(this,p,args,function(f){return withDesc(new Bacon.Desc(this,"map",[f]),this.withHandler(function(event){return this.push(event.fmap(f))}))})};var argumentsToObservables=function(args){if(isArray(args[0])){return args[0]}else{return Array.prototype.slice.call(args)}};var argumentsToObservablesAndFunction=function(args){if(_.isFunction(args[0])){return[argumentsToObservables(Array.prototype.slice.call(args,1)),args[0]]}else{return[argumentsToObservables(Array.prototype.slice.call(args,0,args.length-1)),_.last(args)]}};Bacon.combineAsArray=function(){var streams=argumentsToObservables(arguments);for(var index=0,stream;index0){var valuesToPush=this.values;this.values=[];var reply=this.push(nextEvent(valuesToPush));if(this.end!=null){return this.push(this.end)}else if(reply!==Bacon.noMore){return onFlush(this)}}else{if(this.end!=null){return this.push(this.end)}}},schedule:function(){var _this6=this;if(!this.scheduled){return this.scheduled=delay(function(){return _this6.flush()})}}};var reply=Bacon.more;if(!_.isFunction(delay)){var delayMs=delay;delay=function(f){return Bacon.scheduler.setTimeout(f,delayMs)}}return withDesc(new Bacon.Desc(this,"buffer",[]),this.withHandler(function(event){var _this7=this;buffer.push=function(event){return _this7.push(event)};if(event.isError()){reply=this.push(event)}else if(event.isEnd()){buffer.end=event;if(!buffer.scheduled){buffer.flush()}}else{buffer.values.push(event.value());onInput(buffer)}return reply}))};Bacon.Observable.prototype.filter=function(f){assertObservableIsProperty(f);for(var _ len11=arguments.length,args=Array(_len11>1?_len11-1:0),_key11=1;_key11<_len11;_key11++){args[_key11-1]=arguments[_key11]}return convertArgsToFunction(this,f,args,function(f){return withDesc(new Bacon.Desc(this,"filter",[f]),this.withHandler(function(event){if(event.filter(f)){return this.push(event)}else{return Bacon.more}}))})};Bacon.once=function(value){return new EventStream(new Desc(Bacon,"once",[value]),function(sink){sink(toEvent(value));sink(endEvent());return nop})};Bacon.EventStream.prototype.concat=function(right){var left=this;return new EventStream(new Bacon.Desc(left,"concat",[right]),function(sink){var unsubRight=nop;var unsubLeft=left.dispatcher.subscribe(function(e){if(e.isEnd()){unsubRight=right.dispatcher.subscribe(sink);return unsubRight}else{return sink(e)}});return function(){return unsubLeft(),unsubRight()}})};Bacon.Observable.prototype.flatMap=function(){return flatMap_(this,makeSpawner(arguments))};Bacon.Observable.prototype.flatMapFirst=function(){return fla tMap_(this,makeSpawner(arguments),true)};var makeSpawner=function(args){if(args.length===1&&isObservable(args[0])){return _.always(args[0])}else{return makeFunctionArgs(args)}};var makeObservable=function(x){if(isObservable(x)){return x}else{return Bacon.once(x)}};var flatMap_=function(root,f,firstOnly,limit){var rootDep=[root];var childDeps=[];var desc=new Bacon.Desc(root,"flatMap"+(firstOnly?"First":""),[f]);var result=new EventStream(desc,function(sink){var composite=new CompositeUnsubscribe;var queue=[];var spawn=function(event){var child=makeObservable(f(event.value()));childDeps.push(child);return composite.add(function(unsubAll,unsubMe){return child.dispatcher.subscribe(function(event){if(event.isEnd()){_.remove(child,childDeps);checkQueue();checkEnd(unsubMe);return Bacon.noMore}else{if(typeof event!=="undefined"&&event!==null?event._isInitial:undefined){event=event.toNext()}var reply=sink(event);if(reply===Bacon.noMore){unsubAll()}return reply}})})};var checkQueue=function() {var event=queue.shift();if(event){return spawn(event)}};var checkEnd=function(unsub){unsub();if(composite.empty()){return sink(endEvent())}};composite.add(function(__,unsubRoot){return root.dispatcher.subscribe(function(event){if(event.isEnd()){return checkEnd(unsubRoot)}else if(event.isError()){return sink(event)}else if(firstOnly&&composite.count()>1){return Bacon.more}else{if(composite.unsubscribed){return Bacon.noMore}if(limit&&composite.count()>limit){return queue.push(event)}else{return spawn(event)}}})});return composite.unsubscribe});result.internalDeps=function(){if(childDeps.length){return rootDep.concat(childDeps)}else{return rootDep}};return result};Bacon.Observable.prototype.flatMapWithConcurrencyLimit=function(limit){for(var _len12=arguments.length,args=Array(_len12>1?_len12-1:0),_key12=1;_key12<_len12;_key12++){args[_key12-1]=arguments[_key12]}var desc=new Bacon.Desc(this,"flatMapWithConcurrencyLimit",[limit].concat(args));return withDesc(desc,flatMap_(this,makeSpawn er(args),false,limit))};Bacon.Observable.prototype.flatMapConcat=function(){var desc=new Bacon.Desc(this,"flatMapConcat",Array.prototype.slice.call(arguments,0));return withDesc(desc,this.flatMapWithConcurrencyLimit.apply(this,[1].concat(_slice.call(arguments))))};Bacon.later=function(delay,value){return withDesc(new Bacon.Desc(Bacon,"later",[delay,value]),Bacon.fromBinder(function(sink){var sender=function(){return sink([value,endEvent()])};var id=Bacon.scheduler.setTimeout(sender,delay);return function(){return Bacon.scheduler.clearTimeout(id)}}))};Bacon.Observable.prototype.bufferingThrottle=function(minimumInterval){var desc=new Bacon.Desc(this,"bufferingThrottle",[minimumInterval]);return withDesc(desc,this.flatMapConcat(function(x){return Bacon.once(x).concat(Bacon.later(minimumInterval).filter(false))}))};Bacon.Property.prototype.bufferingThrottle=function(){return Bacon.Observable.prototype.bufferingThrottle.apply(this,arguments).toProperty()};function Bus(){if(!(this instan ceof Bus)){return new Bus}this.unsubAll=_.bind(this.unsubAll,this);this.subscribeAll=_.bind(this.subscribeAll,this);this.guardedSink=_.bind(this.guardedSink,this);this.sink=undefined;this.subscriptions=[];this.ended=false;EventStream.call(this,new Bacon.Desc(Bacon,"Bus",[]),this.subscribeAll)}inherit(Bus,EventStream);extend(Bus.prototype,{unsubAll:function(){var iterable=this.subscriptions;for(var i=0,sub;i1?_len13-1:0),_key13=1;_key13<_len13;_key13++){args[_key13-1]=arguments[_key13]}return withDesc(new Bacon.Desc(Bacon,desc,[f].concat(args)),Bacon.combineAsArray(args).flatMap(stream))})};Bacon.fromCallback=liftCallback("fromCallback",function(f){for(var _len14=arguments.length,args=Array(_len14>1?_len14-1:0),_key14=1;_key14<_len14;_key14++){args[_key14-1]=arguments[_key14]}return Bacon.fromBinder(function(handler){makeFunction(f,args)(handler);return nop},function(value){return[value,endEvent()]})});Bacon.fromNodeCallback=liftCallback("fromNodeCallback",function(f){for(var _len15=arguments.length,args=Array(_len15>1?_len15-1:0),_key15=1;_key15<_len15;_key15++){args[_key15-1]=arguments[_key15]}return Bacon.fromBinder(function(handler){makeFunction(f,args)(handler);return nop},function(error,value){if(error){return[new Error(error),e ndEvent()]}return[value,endEvent()]})});Bacon.combineTemplate=function(template){function current(ctxStack){return ctxStack[ctxStack.length-1]}function setValue(ctxStack,key,value){current(ctxStack)[key]=value;return value}function applyStreamValue(key,index){return function(ctxStack,values){return setValue(ctxStack,key,values[index])}}function constantValue(key,value){return function(ctxStack){return setValue(ctxStack,key,value)}}function mkContext(template){return isArray(template)?[]:{}}function pushContext(key,value){return function(ctxStack){var newContext=mkContext(value);setValue(ctxStack,key,newContext);return ctxStack.push(newContext)}}function compile(key,value){if(isObservable(value)){streams.push(value);return funcs.push(applyStreamValue(key,streams.length-1))}else if(value&&(value.constructor==Object||value.constructor==Array)){var popContext=function(ctxStack){return ctxStack.pop()};funcs.push(pushContext(key,value));compileTemplate(value);return funcs.push(popContext) }else{return funcs.push(constantValue(key,value))}}function combinator(values){var rootContext=mkContext(template);var ctxStack=[rootContext];for(var i=0,f;i1?_len17-1:0),_key17=1;_key17<_len17;_key17++){args[_key17-1]=arguments[_key17]}return convertArgsToFunction(this,f,args,function(f){return withDesc(new Bacon.Desc(this,"endOnError",[]),this.withHandler(function(event){if(event.isError()&&f(event.error)){this.push(event);return this.push(endEvent())}else{return this.push(event)}}))})};Observable.prototype.errors=function(){return withDesc(new Bacon.Desc(this,"errors",[]),this.filter(function(){return false}))};Bacon.Observable.prototype.take=function(count){if(count<=0){return Bacon.never()}return withDesc(new Bacon.Desc(this,"take",[count]),this.withHandler(function(event){if(!event.hasValue()){return this.push(event)}else{count--;if(count>0){return this.push(event)}else{if(count ===0){this.push(event)}this.push(endEvent());return Bacon.noMore}}}))};Bacon.Observable.prototype.first=function(){return withDesc(new Bacon.Desc(this,"first",[]),this.take(1))};Bacon.Observable.prototype.mapError=function(){var f=makeFunctionArgs(arguments);return withDesc(new Bacon.Desc(this,"mapError",[f]),this.withHandler(function(event){if(event.isError()){return this.push(nextEvent(f(event.error)))}else{return this.push(event)}}))};Bacon.Observable.prototype.flatMapError=function(fn){var desc=new Bacon.Desc(this,"flatMapError",[fn]);return withDesc(desc,this.mapError(function(err){return new Error(err)}).flatMap(function(x){if(x instanceof Error){return fn(x.error)}else{return Bacon.once(x)}}))};Bacon.EventStream.prototype.sampledBy=function(sampler,combinator){return withDesc(new Bacon.Desc(this,"sampledBy",[sampler,combinator]),this.toProperty().sampledBy(sampler,combinator))};Bacon.Property.prototype.sampledBy=function(sampler,combinator){var lazy=false;if(typeof combinator !=="undefined"&&combinator!==null){combinator=toCombinator(combinator)}else{lazy=true;combinator=function(f){return f.value()}}var thisSource=new Source(this,false,lazy);var samplerSource=new Source(sampler,true,lazy);var stream=Bacon.when([thisSource,samplerSource],combinator);var result=sampler._isProperty?stream.toProperty():stream;return withDesc(new Bacon.Desc(this,"sampledBy",[sampler,combinator]),result)};Bacon.Property.prototype.sample=function(interval){return withDesc(new Bacon.Desc(this,"sample",[interval]),this.sampledBy(Bacon.interval(interval,{})))};Bacon.Observable.prototype.map=function(p){if(p&&p._isProperty){return p.sampledBy(this,former)}else{for(var _len18=arguments.length,args=Array(_len18>1?_len18-1:0),_key18=1;_key18<_len18;_key18++){args[_key18-1]=arguments[_key18]}return convertArgsToFunction(this,p,args,function(f){return withDesc(new Bacon.Desc(this,"map",[f]),this.withHandler(function(event){return this.push(event.fmap(f))}))})}};Bacon.Observable.prototy pe.fold=function(seed,f){return withDesc(new Bacon.Desc(this,"fold",[seed,f]),this.scan(seed,f).sampledBy(this.filter(false).mapEnd().toProperty()))};Observable.prototype.reduce=Observable.prototype.fold;var eventMethods=[["addEventListener","removeEventListener"],["addListener","removeListener"],["on","off"],["bind","unbind"]];var findHandlerMethods=function(target){var pair;for(var i=0;i0)){finished=true;return this.push(event)}}else{if(event.hasValue()){error=null;finished=true}return this.push(event)}})}if(finished){return null}else if(error){var context={error:error.e rror,retriesDone:maxRetries-retries};var pause=Bacon.later(delay(context)).filter(false);retries=retries-1;return pause.concat(Bacon.once().flatMap(valueStream))}else{return valueStream()}}))};Bacon.sequentially=function(delay,values){var index=0;return withDesc(new Bacon.Desc(Bacon,"sequentially",[delay,values]),Bacon.fromPoll(delay,function(){var value=values[index++];if(index0){count--;return Bacon.more}else{return this.push(event)}}))};Bacon.EventStream.prototype.skipUntil=function(starter){var started=starter.take(1).map(true).toProperty(false);return withDesc(new Bacon.Desc(this,"skipUntil",[starter]),this.filter(started))};Bacon.EventStream.prototype.skipWhile=function(f){ass ertObservableIsProperty(f);var ok=false;for(var _len20=arguments.length,args=Array(_len20>1?_len20-1:0),_key20=1;_key20<_len20;_key20++){args[_key20-1]=arguments[_key20]}return convertArgsToFunction(this,f,args,function(f){return withDesc(new Bacon.Desc(this,"skipWhile",[f]),this.withHandler(function(event){if(ok||!event.hasValue()||!f(event.value())){if(event.hasValue()){ok=true}return this.push(event)}else{return Bacon.more}}))})};Bacon.Observable.prototype.slidingWindow=function(n){var minValues=arguments.length<=1||arguments[1]===undefined?0:arguments[1];return withDesc(new Bacon.Desc(this,"slidingWindow",[n,minValues]),this.scan([],function(window,value){return window.concat([value]).slice(-n)}).filter(function(values){return values.length>=minValues}))};var spies=[];var registerObs=function(obs){if(spies.length){if(!registerObs.running){try{registerObs.running=true;spies.forEach(function(spy){spy(obs)})}finally{delete registerObs.running}}}};Bacon.spy=function(spy){return spie s.push(spy)};Bacon.Property.prototype.startWith=function(seed){return withDesc(new Bacon.Desc(this,"startWith",[seed]),this.scan(seed,function(prev,next){return next}))};Bacon.EventStream.prototype.startWith=function(seed){return withDesc(new Bacon.Desc(this,"startWith",[seed]),Bacon.once(seed).concat(this))};Bacon.Observable.prototype.takeWhile=function(f){assertObservableIsProperty(f);for(var _len21=arguments.length,args=Array(_len21>1?_len21-1:0),_key21=1;_key21<_len21;_key21++){args[_key21-1]=arguments[_key21]}return convertArgsToFunction(this,f,args,function(f){return withDesc(new Bacon.Desc(this,"takeWhile",[f]),this.withHandler(function(event){if(event.filter(f)){return this.push(event)}else{this.push(endEvent());return Bacon.noMore}}))})};Bacon.EventStream.prototype.throttle=function(delay){return withDesc(new Bacon.Desc(this,"throttle",[delay]),this.bufferWithTime(delay).map(function(values){return values[values.length-1]}))};Bacon.Property.prototype.throttle=function(delay ){return this.delayChanges(new Bacon.Desc(this,"throttle",[delay]),function(changes){return changes.throttle(delay); - [... 31 lines stripped ...] --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org