local function E(e,Z)Z=Z or{}if Z[e]then return Z[e]end if type(e)=="\116\097\098\108\101"then local B={}Z[e]=B for e,J in pairs(e)do B[E(e,Z)]=E(J,Z)end return setmetatable(B,E(getmetatable(e),Z))else return e end end Table.deepCopy=E
--- Deep copies a table including metatables
-- @function Table.deepCopy
-- @tparam table table Table to deep copy
-- @treturn table New table
local function deepCopy(target, _context)
	_context = _context or {}
	if _context[target] then
		return _context[target]
	end

	if type(target) == "table" then
		local new = {}
		_context[target] = new
		for index, value in pairs(target) do
			new[deepCopy(index, _context)] = deepCopy(value, _context)
		end
		return setmetatable(new, deepCopy(getmetatable(target), _context))
	else
		return target
	end
end
Table.deepCopy = deepCopy
