{"version":3,"file":"flow-CvoX2Xd6.js","sources":["../../../node_modules/lodash/_createFlow.js","../../../node_modules/lodash/flow.js"],"sourcesContent":["var LodashWrapper = require('./_LodashWrapper'),\n flatRest = require('./_flatRest'),\n getData = require('./_getData'),\n getFuncName = require('./_getFuncName'),\n isArray = require('./isArray'),\n isLaziable = require('./_isLaziable');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_FLAG = 8,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256;\n\n/**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\nfunction createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n}\n\nmodule.exports = createFlow;\n","var createFlow = require('./_createFlow');\n\n/**\n * Creates a function that returns the result of invoking the given functions\n * with the `this` binding of the created function, where each successive\n * invocation is supplied the return value of the previous.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flowRight\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flow([_.add, square]);\n * addSquare(1, 2);\n * // => 9\n */\nvar flow = createFlow();\n\nmodule.exports = flow;\n"],"names":["LodashWrapper","require$$0","flatRest","require$$1","getData","require$$2","getFuncName","require$$3","isArray","require$$4","isLaziable","require$$5","FUNC_ERROR_TEXT","WRAP_CURRY_FLAG","WRAP_PARTIAL_FLAG","WRAP_ARY_FLAG","WRAP_REARG_FLAG","createFlow","fromRight","funcs","length","index","prereq","func","wrapper","funcName","data","args","value","result","_createFlow","flow","flow_1"],"mappings":"wOAAA,IAAIA,EAAgBC,EAA2B,EAC3CC,EAAWC,EAAsB,EACjCC,EAAUC,EAAqB,EAC/BC,EAAcC,EAAyB,EACvCC,EAAUC,EAAoB,EAC9BC,EAAaC,EAAwB,EAGrCC,EAAkB,sBAGlBC,EAAkB,EAClBC,EAAoB,GACpBC,EAAgB,IAChBC,EAAkB,IAStB,SAASC,EAAWC,EAAW,CAC7B,OAAOhB,EAAS,SAASiB,EAAO,CAC9B,IAAIC,EAASD,EAAM,OACfE,EAAQD,EACRE,EAAStB,EAAc,UAAU,KAKrC,IAHIkB,GACFC,EAAM,QAAS,EAEVE,KAAS,CACd,IAAIE,EAAOJ,EAAME,CAAK,EACtB,GAAI,OAAOE,GAAQ,WACjB,MAAM,IAAI,UAAUX,CAAe,EAErC,GAAIU,GAAU,CAACE,GAAWlB,EAAYiB,CAAI,GAAK,UAC7C,IAAIC,EAAU,IAAIxB,EAAc,CAAA,EAAI,EAAI,CAEh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