"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_node_module = require('../node/module.js');

//#region src/smol/purl.ts
/**
* @file Lazy-loader for socket-btm's `node:smol-purl` binding. `node:smol-purl`
*   is a C++-accelerated PURL (Package URL) parser exposed by socket-btm's smol
*   Node binary. It parses, builds, and validates PURL strings using
*   primordial-cached string ops, with a 10 000-entry result cache. Returns
*   `undefined` on stock Node + non-Node runtimes. Result is cached across
*   calls. Callers fall back to the JS `@socketregistry/packageurl-js` import
*   on the undefined path.
*
* @internal — used by `src/packages/operations.ts` to resolve the
*   `pkg:npm/<name>` parse on `resolveRegistryPackageName`. Most
*   callers should keep using `PackageURL` from
*   `external/@socketregistry/packageurl-js` directly; this loader
*   only matters where the hot path warrants the native acceleration.
*/
let _smolPurl;
let _smolPurlProbed = false;
/**
* Returns `node:smol-purl` when running on the smol Node binary, otherwise
* `undefined`. Result is cached across calls.
*/
/*@__NO_SIDE_EFFECTS__*/
function getSmolPurl() {
	if (!_smolPurlProbed) {
		_smolPurlProbed = true;
		/* c8 ignore start - smol Node binary only. */
		if (/* @__PURE__ */ require_node_module.isNodeBuiltin("node:smol-purl")) _smolPurl = require("node:smol-purl");
	}
	return _smolPurl;
}

//#endregion
exports.getSmolPurl = getSmolPurl;