local P={}function P.Shuffle(P)local z={}for g=#P,1,-1 do local q=math.random(1,g)P[g],P[q]=P[q],P[g]table.insert(z,P[g])end return z end function P.DeepCopy(z)local g={}for z,q in pairs(z)do if type(q)=="\116\097\098\108\101"then g[z]=P.DeepCopy(q)else g[z]=q end end return g end function P.Reverse(P)local z={}for g=#P,1,-1 do z[(#P-g)+1]=P[g]end return z end function P.Reconcile(z,g)for g,q in pairs(g)do if type(g)=="\115\116\114\105\110\103"then if z[g]==nil then if type(q)=="\116\097\098\108\101"then z[g]=P.DeepCopy(q)else z[g]=q end elseif type(z[g])=="\116\097\098\108\101"and type(q)=="\116\097\098\108\101"then P.Reconcile(z[g],q)end end end end function P.Merge(...)local P={}for z,g in ipairs({...})do if type(g)=="\116\097\098\108\101"then for z,g in pairs(g)do P[#P+1]=g end end end return P end function P.MergeDictionaries(...)local P={}for z,g in pairs({...})do for z,g in pairs(g)do P[z]=g end end return P end return P
--DEFINE MODULE--
local Table = {}



--PUBLIC FUNCTIONS--
function Table.Shuffle(Input)
	local Output = {}

	for Key = #Input, 1, -1 do
		local RandomPosition = math.random(1, Key)

		Input[Key], Input[RandomPosition] = Input[RandomPosition], Input[Key]
		table.insert(Output, Input[Key])
	end

	return Output
end

function Table.DeepCopy(Input)
	local Output = {}

	for Key, Value in pairs(Input) do
		if type(Value) == "table" then
			Output[Key] = Table.DeepCopy(Value)
		else
			Output[Key] = Value
		end
	end

	return Output
end

function Table.Reverse(Input)
	local Output = {}

	for Key = #Input, 1, -1 do
		Output[#Input - Key + 1] = Input[Key]
	end

	return Output
end

function Table.Reconcile(Target, Template)
	for Key, Value in pairs(Template) do
		if type(Key) == "string" then -- Only string keys will be reconciled
			if Target[Key] == nil then
				if type(Value) == "table" then
					Target[Key] = Table.DeepCopy(Value)
				else
					Target[Key] = Value
				end
			elseif type(Target[Key]) == "table" and type(Value) == "table" then
				Table.Reconcile(Target[Key], Value)
			end
		end
	end
end

function Table.Merge(...)
	local Output = {}

	for i, TableToMerge in ipairs({...}) do
		if type(TableToMerge) == "table" then
			for Key, Value in pairs(TableToMerge) do
				Output[#Output + 1] = Value
			end
		end
	end

	return Output
end

function Table.MergeDictionaries(...)
	local Output = {}

	for i, Dictionary in pairs({...}) do
		for Index, Value in pairs(Dictionary) do
			Output[Index] = Value
		end
	end

	return Output
end



--RETURN MODULE--
return Table