"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 get_package_exports = {};
__export(get_package_exports, {
  getPackage: () => getPackage,
  jsGetPackage: () => jsGetPackage
});
module.exports = __toCommonJS(get_package_exports);
var import_manifest = require("../../smol/manifest");
function jsGetPackage(lockfile, name) {
  const idx = lockfile._index[name];
  if (idx === void 0) {
    return void 0;
  }
  if (typeof idx === "number") {
    return lockfile.packages[idx];
  }
  return lockfile.packages[idx[0]];
}
const _smol = (0, import_manifest.getSmolManifest)();
const getPackage = _smol ? _smol.getPackage : jsGetPackage;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  getPackage,
  jsGetPackage
});
