VimUnDo[]8JZF[Ll", reduce(source, function(value, result) {''''PB\@_PN( 'use strict';5_ PO( "use strict';5_  'vPU module.exports = concat "var slicer = Array.prototype.slicefunction append(left, right) { /**C Returns sequences of items in the `left` sequence followed by the items in the `right` sequence. **/4 return convert({}, function(self, next, initial) {. accumulate(left, function(value, result) {J return value && value.is === end ? accumulate(right, next, result) :< next(value, result) }, initial) })},function concat(left, right /*, ...rest*/) { /**J Returns a sequence representing the concatenation of the elements in the) supplied arguments, in the given order.J print(concat([ 1 ], [ 2, 3 ], [ 4, 5, 6 ])) // =>  **/ switch (arguments.length) { case 1: return left& case 2: return append(left, right)9 default: return slicer.call(arguments).reduce(append) }}module.exports = concat5_ vPW}module.exports = concat5_ vPYmodule.exports = concat5_ vP\module.exports = capturek5_ vP]5_  vPd var end = require("./end")5_   vPg var errors = require("./end")5_  vPh var error = require("./end")5_  vP  *  5_  vP + Creates safe version of given `sequences`5_   vP / Creates and safe version of given `sequences`5_   vP 6 Creates and return safe version of given `sequences`5_ 6 vP 7 Creates and returns safe version of given `sequences`5_ 4 vP 4 Creates and returns safe version of given `source`5_ J vP J Creates and returns safe version of given `source` sequence, by allowing5_  vP  `recover` function 5_ vP   a source.5_  vP   a `source.5_ vPI Capture any boxed errors that occur while reducing a given `source` and5_ vP2 `recover` reduction using the provided function.5_  vP  a `source`.5_5 vP 5 a `source`. This is a mechanism for error handling 5_ vP% that represent 5_8 vP78 that representing IO operations like (XHR / WebSockets5_ vPN5_ vPNP Allows you to bake error handling and recovery into your reductions -- crucial5_ vPO, for live data sources like XHR or Sockets.5_PIM/*jshint asi: true undef: true es5: true node: true browser: true devel: true5_  PI9 forin: true latedef: false globalstrict: true */5_" PI 5_ #!"P> 5_"$#PA var er5_#%$Py 5_$&%PӅ 5_%'& Pӆ if ()5_&('PӋ if (caught)5_')(Pӌ if (caught) {}5_(*)PӍ 5_)+*Pӗ if (caught) {return accumulated() return accumulated()5_*,+Pә( if (caught) { return accumulated()} }5_+-,PӜ* if (caught) { return accumulated() }5_,.-PӞ return accumulated() }5_-/.PӠ( if (value && value.is === error) {5_.0/Pӣ var caught = false5_/10PӨ if (caught) {5_021PӪ return accumulated()5_132Pӯ }'else if (value && value.is === error) {- else if (value && value.is === error) {5_243 Pӵ var error = false5_354PӸ if (error) {5_465PӺ return error5_576!P 5_687P failure = accumulated()5_798$P% failure = accumulated(result)5_8:9P failure = accumulated()5_9;:#P$ failure = accumulated(value)5_:<;#P 5_;=<P next(value, result)5_<>=P# returns next(value, result)5_=?>P " return next(value, result)5_>@?P next(value, result)5_?A@P# returns next(value, result)5_@BAP# 5_ACBP' var accumulated = require()5_BDCP(  var accumulated = require("")5_CEDPD!  5_DFEPQ! var failure = false5_EGFPS! var failure = null5_FHGPU! var failure = void()5_GIH-PY!- // If error has already being captured 5_HKIP\! if (failure) {5_ILJKPb! if (failure) return failure! return failure5_KMLPe / } else if (value && value.is === error) {5_LNMPh  } else {5_MONPi  } else 5_NPOPk! else return next(value, result)!" return next(value, result)5_OQP Pm & else return next(value, result)5_PRQPn }5_QSRPt  5_RTS6PԜ 6 // If value is an error indicator invoke handler5_SUT0PԶ 0 // If value is an error indicator forward 5_TVUCP C // If value is an error then continue accumulation of recover5_UWVP" !5_VXWP;var error = require("./error")5_WYXP"!5_XZYP"var isError = require()5_Y[ZP"var isError = require("")5_Z\[P"- else if (value && value.is === error) {5_[]\P" else if (is === error) {5_\^] P"# else if (isError === error) {5_]_^P" else if (isError()) {5_^b_&P "> accumulate(recover(value.value, result), next, result)5__c`bP"*var accumulated = require("./accumulated")5_bdc$P"&var reduced = require("./accumulated")5_cedP"% failure = accumulated(result)5_dweP-"8 return convert(source, function(self, next, initial) {5_exfwP|"5_w~xP|5_xy~P|# "5_~P|# return reducible()5_P|# return reducible(function())5_P|#! return reducible(function() {})5_ P|$"var convert = require("./convert")5_"P|$$var reducible = require("./convert")5_P|$(var accumulate = require("./accumulate")5_"P| $$var reduce = require("./accumulate")5_P|$ return reducible(function() {5_(P|% $5_ P|% reduce()5_P|%, return reducible(function(next, initial) {5_P|% reduce(source, function)5_2P|%3 reduce(source, function reduceCapturedSource())5_4P|%6 reduce(source, function reduceCapturedSource() {})5_1P|&4 reduce(source, function reduceCapturedSource() {5_P|&A reduce(source, function reduceCapturedSource(result, value) {5_ P|&M var value = reduce(source, function reduceCapturedSource(result, value) {5_ P|' &5_ P}' return next()5_P}' result = next()5_P}m( '5_ P}q( when()5_P}s( when(data)5_P}v( return when(data)5_ P}y( return when(data, function()5_"P}y(# return when(data, function() {}5_P}z) }5_"P})" return when(data, function() {5_P}) return when(data, null5_P} })5_P}( return when(data, null, 5_&P}(& return when(data, null, function()5_(P}() return when(data, null, function() {}5_P}) }5_$P})( return when(data, null, function() {5_.P})2 return when(data, null, function onfailure() {5_+P}). return when(data, null, function error() {5_%P})3 return when(data, null, function error(error) {5_P}*)5_P}*var when = require()5_P}!*var when = require("")5_ P}+ *5_P}+ return reduced()5_P}+ return reduced(recover())5_#P}+$ return reduced(recover(error))5_P}+ })5_:P}, +5_P~ - ,5_P~-5_P~ var state = initial5_ P~. -5_P~ / .5_1P~)/2 return reduced(recover(error), next, result)5_%P~=0 /5_)P~X0) // Reduce captured `source` sequence 5_BP~a0L var data = reduce(source, function reduceCapturedSource(result, value) {5_ P~d0 var state = initial5_P~g state = result5_DP~k"/D // Reduce captured `source` sequence and accumulate result into 5_P~u#0 }, initial)5_P~0 // outer variable.5_P~0 var result = initial5_ P~0G var data = reduce(source, function reduceCapturedSource(_, value) {5_ P~0" result = next(result, value)5_P~0 return result5_P~0! state = next(result, value)5_(P~0( // outer variable. That way even if 5_KP~0L // Reduce captured `source` sequence and accumulate result into `result`5_(P~$0( // outer variable. That way even if 5_P~15_P~15 return when(data, null, function onerror(error) {5_P~1 5_ P~1 // Returns either result or 5_-P~14 // Returns either result or reduction of recover5_5P15 // Returns either result or reduction of `recover5_-P 1: // Returns either result or reduction of `recover`-ed 5_LP1L // Returns either result or reduction of value returned by `recover`-ed 5_P2 // function5_P%2 // function if 5_P*2$ // function if source had error.5_!P+2' // function if source had an error.5_'P,2( // function if source had an `error.5_)P.2) // function if source had an `error`.5_IPG25_"PU31 return reduced(recover(error), next, state)5_PZ3 //5_)Pd&38 return reduced(recover(error, state), next, state)5_Pl3 // `state` initial 5_""1vP!#%!#46 return convert(null, function(self, next, initial) { var failure = void(0)0 accumulate(source, function(value, result) {8 // If error has already being captured then return! if (failure) return failureE // If value is an error then continue accumulation of recovered // sequence. else if (isError(value)) {! failure = reduced(result)8 accumulate(recover(value, result), next, result) return failure }) // Otherwise just forward messages.% else return next(value, result) }, initial) })5_"""vP'!"5_""vP$#var isError = require("./is-error")5_""vP"var reduced = require("./reduced")5_ !!vP##var isError = require("./is-error")5_#!!vP)#%var isReduced = require("./is-error")5_!!vP*'var isReduced = require("./is-reduced")5_ vP+"1 return reduced(recover(error), next, state)5_ vP" "use strict";&var reducible = require("./reducible") var reduce = require("./reduce")#var when = require("eventual/when")#function capture(source, recover) { /**G Creates and returns safe version of given `source` sequence, by usingI `recover` function to recover from errors that may occur while reducingM a `source`. This is a mechanism for error handling and recovery for streamsM that representing IO operations like (XHR / WebSockets etc...) where errors may occur. **/; return reducible(function reduceCaptured(next, initial) {K // Reduce captured `source` sequence and accumulate result into `state`I // outer variable. That way even if `source` errors `state` will hold& // accumulated state before error. var state = initialI var result = reduce(source, function reduceCapturedSource(_, value) { state = next(state, value) return state })H // Returns either result or reduction of value returned by `recover`J // function if source had an `error`. Note that reduction happens withK // `state` initial value as it's supposed to continue sequence form the // error point.7 return when(result, null, function onerror(error) {0 return reduce(recover(error), next, state) }) })}module.exports = capture5_  vP""var convert = require("./convert")5_" vP,"$var reducible = require("./convert")5_ vP # "5_!!vP$#5_""vP $var reducer = require()5_""vP $var reducer = require("")5_ ""vP $var capture = reducer5_ ""vP $var capture = reducer()5_ ""vP $!var capture = reducer(function())5_ """vP $$var capture = reducer(function() {})5_ ##vP %"var capture = reducer(function() {5_ '##vP! %Fvar capture = reducer(function(source, recover, next, value, result) {5_ ##vP' &  %5_ $$vP. & if ()5_ $$vP0 & if (isError())5_ $$vP1 & if (isError(value))5_ !$$vP: &" if (isError(value)) accumulate()5_ )$$vP> &+ if (isError(value)) accumulate(recover())5_ 8$$vPJ &8 if (isError(value)) accumulate(recover(value, result))5_ 7$$vPL- &8 if (isError(value)) accumulate(recover(value, result))5_ $$vPc '  &5_ %%vPj ' else 5_ %%vPl ' else next()5_  %%vP >var capture = reducer(function(recover, next, value, result) {5_   $$vP F if (isError(value)) accumulate(recover(value, result), next, result)5_   ##vP  else next(ever)5_  ""vP })5_ !!vP#6 return convert(null, function(self, next, initial) {5_!!vP#6 return reducer(null, function(self, next, initial) {5_ !!vP3#0 return reducer(function(self, next, initial) {5_ v P24"var reducer = require("./reducer")5_  vP78"* return reducer(function(next, initial) {5_PA"&var reducible = require("./reducible")5_!vPB"(var accumulate = require("./accumulate")5_.!vPB"0var accumulate = require("reducible/accumulate")5_+!vPB"-var accumulate = require("reducible/reduced")5_!vPB",var accumulate = require("reducible/reduce")5_ !vPB ""var reduced = require("./reduced")5_! !vPB9"#var isError = require("./is-error")5_ "!!vPB"0 accumulate(source, function(value, result) {5_!#" !vPB:"- reduced(source, function(value, result) {5_"$#!vPB;"8 accumulate(recover(value, result), next, result)5_#%$!vPB%<", return reducible(function(next, initial) {5_$&%!vPB0>"8 return reducible(function accumulator(next, initial) {5_%'&.!vPBU?"? return reducible(function captureAccumulator(next, initial) {5_&'!vPB[@", reduce(source, function(value, result) {5_ vPp5_ vPu5_ vPv5_  vPz if (isError(value)) {5_ vP{& if (isError(value)) accumulate()5_% vP~/ if (isError(value)) accumulate(recover())5_- vPց< if (isError(value)) accumulate(recover(value, result))5_ &&vPq ' if (isError(value)) {4 accumulate(recover(value, result), next, result)5_ ''vPs (  ) }5_ ''vP{ ) if (isError(value)) 5_ &&vP} )0accumulate(recover(value, result), next, result) )F if (isError(value)) accumulate(recover(value, result), next, result)5_ %%vP 5_ %%vPՁ ' else result = next(ever)5_ %%vPՅ '# else result = next(value, result)5_ "&&vPՉ. '  ( return result5_ ''vP՗ ( )/*5_''vP՜) ** /5_'''vP՟/'()')**/5_  ((vPձ *  + console.log()5_ ((vPշ0 + console.log(value, result)5_!!vP(5_""vP# $ var isReduced5_P}, })5_BP},G var data = reduce(source, function reduceCapturedSource(_, value) {5_ P},! state = next(result, value)5_P~, state = next(state, value)5_xz~yP|" # when()5_y{zP|# when(reduce())5_z|{P|#" when(reduce(source, function()))5_{}| P|#% when(reduce(source, function() {}))5_|}"P|#" when(reduce(source, function() { }))5_egwfP0"8 return reducible(null, function(self, next, initial) {5_fhgP0"2 return reducible(function(self, next, initial) {5_gih"P0", return reducible(function(next, initial) {5_hji P0"$var reducible = require("./convert")5_ikj"P0"&var reducible = require("./reducible")5_jlkP1" else return next(result)5_kolP1"% else return next(result, value)5_lpmo/P1"> accumulate(recover(value, result), function(), result)5_oqp5P1"A accumulate(recover(value, result), function() {}, result)5_prq7P1"B accumulate(recover(value, result), function() { }, result)5_qsr8P1"H accumulate(recover(value, result), function() { next()}, result)5_rts>P1"I accumulate(recover(value, result), function() { next() }, result)5_sut4P1"V accumulate(recover(value, result), function(value, result) { next() }, result)5_tvuJP1"c accumulate(recover(value, result), function(value, result) { next(result, value) }, result)5_uvEP1"j accumulate(recover(value, result), function(value, result) { return next(result, value) }, result)5_lnom/P1"> accumulate(recover(value, result), function(), result)5_mn4P1"D accumulate(recover(value, result), function(next, ), result)5__ab`P5_`aP!! failure = reduced(result)5_IKJP]! returnif (failure) 5_ "!P4E return accumulate(recover(value.value, result), next, result)5