import _arrayPush_default from "./_arrayPush.js";
import _isFlattenable_default from "./_isFlattenable.js";
function baseFlatten(r, i, a, o, s) {
	var c = -1, l = r.length;
	for (a ||= _isFlattenable_default, s ||= []; ++c < l;) {
		var u = r[c];
		i > 0 && a(u) ? i > 1 ? baseFlatten(u, i - 1, a, o, s) : _arrayPush_default(s, u) : o || (s[s.length] = u);
	}
	return s;
}
var _baseFlatten_default = baseFlatten;
export { _baseFlatten_default as default };
