import { optionalImportEntrypoints } from "./import_constants.js";
import { import_map_exports } from "./import_map.js";
import { load as load$1 } from "@langchain/core/load";
//#region src/load/index.ts
/**
* Load a LangChain module from a serialized text representation.
* NOTE: This functionality is currently in beta.
* Loaded classes may change independently of semver.
*
* **WARNING — insecure deserialization risk.** This function instantiates
* classes and invokes constructors based on the contents of `text`. Never
* call this on untrusted or user-supplied input. Only deserialize data that
* originates from a trusted source you control.
*
* See `@langchain/core/load` {@link LoadOptions} for detailed security
* guidance on `secretsFromEnv`, `secretsMap`, and import maps.
*
* @param text Serialized text representation of the module.
* @param secretsMap
* @param optionalImportsMap
* @param additionalImportsMap
* @param secretsFromEnv
* @returns A loaded instance of a LangChain module.
*/
async function load(text, secretsMap = {}, optionalImportsMap = {}, additionalImportsMap = {}, secretsFromEnv) {
	return load$1(text, {
		secretsMap,
		optionalImportsMap,
		optionalImportEntrypoints,
		importMap: {
			...import_map_exports,
			...additionalImportsMap
		},
		secretsFromEnv
	});
}
//#endregion
export { load };

//# sourceMappingURL=index.js.map