local function Y(Y,p,r,b)return function(...)local h,D,g=runExecutor(Y,p,...)if h then r(unpack(g,1,D))else b(g[1])end end end local function p(Y)return next(Y)==nil end local r={Error=Error;Status=makeEnum("\080\114\111\109\105\115\101\046\083\116\097\116\117\115",{"\083\116\097\114\116\101\100";"\082\101\115\111\108\118\101\100","\082\101\106\101\099\116\101\100";"\067\097\110\099\101\108\108\101\100"}),_getTime=os.clock;_timeEvent=(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Heartbeat}r.prototype={}r.__index=r.prototype

local function createAdvancer(traceback, callback, resolve, reject)
	return function(...)
		local ok, resultLength, result = runExecutor(traceback, callback, ...)

		if ok then
			resolve(unpack(result, 1, resultLength))
		else
			reject(result[1])
		end
	end
end

local function isEmpty(t)
	return next(t) == nil
end

local Promise = {
	Error = Error,
	Status = makeEnum("Promise.Status", {"Started", "Resolved", "Rejected", "Cancelled"}),
	_getTime = os.clock,
	_timeEvent = game:GetService("RunService").Heartbeat,
}
Promise.prototype = {}
Promise.__index = Promise.prototype
