"use strict";
/* Socket Lib - Built with esbuild */
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var promise_exports = {};
__export(promise_exports, {
  PromiseAll: () => PromiseAll,
  PromiseAllSettled: () => PromiseAllSettled,
  PromiseAny: () => PromiseAny,
  PromiseCtor: () => PromiseCtor,
  PromisePrototypeCatch: () => PromisePrototypeCatch,
  PromisePrototypeFinally: () => PromisePrototypeFinally,
  PromisePrototypeThen: () => PromisePrototypeThen,
  PromiseRace: () => PromiseRace,
  PromiseReject: () => PromiseReject,
  PromiseResolve: () => PromiseResolve,
  PromiseWithResolvers: () => PromiseWithResolvers
});
module.exports = __toCommonJS(promise_exports);
var import_uncurry = require("./uncurry");
const PromiseCtor = Promise;
const PromiseAll = Promise.all.bind(Promise);
const PromiseAllSettled = Promise.allSettled.bind(Promise);
const PromiseAny = Promise.any.bind(Promise);
const PromiseRace = Promise.race.bind(Promise);
const PromiseReject = Promise.reject.bind(Promise);
const PromiseResolve = Promise.resolve.bind(Promise);
const PromiseWithResolvers = Promise.withResolvers?.bind(Promise);
const PromisePrototypeCatch = (0, import_uncurry.uncurryThis)(Promise.prototype.catch);
const PromisePrototypeFinally = (0, import_uncurry.uncurryThis)(Promise.prototype.finally);
const PromisePrototypeThen = (0, import_uncurry.uncurryThis)(Promise.prototype.then);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  PromiseAll,
  PromiseAllSettled,
  PromiseAny,
  PromiseCtor,
  PromisePrototypeCatch,
  PromisePrototypeFinally,
  PromisePrototypeThen,
  PromiseRace,
  PromiseReject,
  PromiseResolve,
  PromiseWithResolvers
});
