!function(a,b){"function"==typeof define&&define.amd?define(["q"],function(c){return a.returnExportsGlobal=b(c)}):"object"==typeof exports?module.exports=b(require("q")):a.qflow=b(a.q)}(this,function(a){var b,c,d,e,f,g;return b=function(a){return function(b,c){for(var d=[],e=0;b>e;e++)d.push(c(e));return a.all(d)}}(a),c=function(){return function(a,b){var c=[],d=function(e){return b(e).then(function(b){return c.push(b),a>e+1?d(e+1):c})};return d(0)}}(a),d=function(a){return function(b,c){var d=[];for(var e in b)d.push(c(b[e],e));return a.all(d)}}(a),e=function(a){return function(b,c){var d=[],e=[],f=function(a){return function(b){b&&e.push(a)}};for(var g in b){var h=b[g];d.push(c(h,g).then(f(h)))}return a.all(d).then(function(){return e})}}(a),f=function(a){return function(b){var c=a.defer();return setTimeout(c.resolve,b),c.promise}}(a),g={loopParallel:b,loopSeries:c,eachParallel:d,filterParallel:e,wait:f}});