"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const _arrayMap = require("./_arrayMap.js");
const _baseClone = require("./_baseClone.js");
const _baseUnset = require("./_baseUnset.js");
const _castPath = require("./_castPath.js");
const _copyObject = require("./_copyObject.js");
const _customOmitClone = require("./_customOmitClone.js");
const _flatRest = require("./_flatRest.js");
const _getAllKeysIn = require("./_getAllKeysIn.js");
var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
var omit = _flatRest.default(function(object, paths) {
  var result = {};
  if (object == null) {
    return result;
  }
  var isDeep = false;
  paths = _arrayMap.default(paths, function(path) {
    path = _castPath.default(path, object);
    isDeep || (isDeep = path.length > 1);
    return path;
  });
  _copyObject.default(object, _getAllKeysIn.default(object), result);
  if (isDeep) {
    result = _baseClone.default(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, _customOmitClone.default);
  }
  var length = paths.length;
  while (length--) {
    _baseUnset.default(result, paths[length]);
  }
  return result;
});
exports.default = omit;
