local Q=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local M=require(Q:WaitForChild("\078\101\118\101\114\109\111\114\101",2))local J=M("\083\116\100")local w={}w.Std=J for Q,M in pairs(J)do w[Q]=M end local v={RegisteredLibs=w}function v.FindLib(M,Q)if M.RegisteredLibs~=nil then local J=M.RegisteredLibs[Q]if J~=nil then return J end J=M.RegisteredLibs[string.lower(Q)]if J~=nil then return J end for M,J in pairs(M.RegisteredLibs)do if string.lower(M)==string.lower(Q)then return J end end error("\076\105\098\114\097\114\121 "..(Q.." \110\111\116 \102\111\117\110\100"))return nil end end return v
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local require = require(ReplicatedStorage:WaitForChild("Nevermore", 2))
local std = require("Std")

local dedupedModules = {}

dedupedModules["Std"] = std

for name, libModule in pairs(std) do
    dedupedModules[name] = libModule
end

local module = {
    RegisteredLibs = dedupedModules
}

function module:FindLib(libName)
    if self.RegisteredLibs ~= nil then
        -- First try
        local foundLib = self.RegisteredLibs[libName]
        if foundLib ~= nil then
            return foundLib
        end

        -- Take another shot
        foundLib = self.RegisteredLibs[string.lower(libName)]
        if foundLib ~= nil then
            return foundLib
        end

        -- Last try
        for libKey, libValue in pairs(self.RegisteredLibs) do
            if string.lower(libKey) == string.lower(libName) then
                return libValue
            end
        end
        error("Library " .. libName .. " not found")
        return nil
    end
end

return module