UNPKG

prisma

Version:

Prisma is an open-source database toolkit. It includes a JavaScript/TypeScript ORM for Node.js, migrations and a modern GUI to view and edit the data in your database. You can use Prisma in new projects or add it to an existing one.

4 lines • 1.09 MB
{ "version": 3, "sources": ["../../internals/package.json", "../../../node_modules/.pnpm/@prisma+engines-version@6.16.1-1.bb420e667c1820a8c05a38023385f6cc7ef8e83a/node_modules/@prisma/engines-version/package.json", "../../../node_modules/.pnpm/@prisma+engines-version@6.16.1-1.bb420e667c1820a8c05a38023385f6cc7ef8e83a/node_modules/@prisma/engines-version/index.js", "../../../node_modules/.pnpm/min-indent@1.0.1/node_modules/min-indent/index.js", "../../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js", "../../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json", "../../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js", "../../../node_modules/.pnpm/new-github-issue-url@0.2.1/node_modules/new-github-issue-url/index.js", "../../../node_modules/.pnpm/js-levenshtein@1.1.6/node_modules/js-levenshtein/index.js", "../../ts-builders/src/TypeBuilder.ts", "../../ts-builders/src/KeyType.ts", "../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/src/_assert.ts", "../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/src/_u64.ts", "../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/src/cryptoNode.ts", "../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/src/utils.ts", "../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/src/sha3.ts", "../../../node_modules/.pnpm/@paralleldrive+cuid2@2.2.2/node_modules/@paralleldrive/cuid2/src/index.js", "../../../node_modules/.pnpm/@paralleldrive+cuid2@2.2.2/node_modules/@paralleldrive/cuid2/index.js", "../src/runtime/core/extensions/index.ts", "../src/runtime/core/extensions/defineExtension.ts", "../src/runtime/core/extensions/getExtensionContext.ts", "../src/runtime/core/public/index.ts", "../src/runtime/core/public/validator.ts", "../../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs", "../../debug/src/index.ts", "../../internals/src/utils/getVersionFromPackageJson.ts", "../../internals/src/client/getClientEngineType.ts", "../../driver-adapter-utils/src/error.ts", "../../driver-adapter-utils/src/const.ts", "../../../node_modules/.pnpm/strip-indent@4.0.0/node_modules/strip-indent/index.js", "../../internals/src/utils/prismaPostgres.ts", "../../internals/src/logger.ts", "../../internals/src/utils/assertNever.ts", "../../../node_modules/.pnpm/ansi-regex@6.1.0/node_modules/ansi-regex/index.js", "../../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js", "../../internals/src/utils/path.ts", "../../internals/src/utils/tryLoadEnvs.ts", "../../internals/src/dotenvExpand.ts", "../../internals/src/utils/hasOwnProperty.ts", "../../internals/src/utils/mapObjectValues.ts", "../../internals/src/utils/max.ts", "../../internals/src/utils/setClassName.ts", "../../internals/src/warnOnce.ts", "../src/runtime/core/errors/PrismaClientInitializationError.ts", "../src/runtime/core/errors/PrismaClientKnownRequestError.ts", "../src/runtime/core/errors/PrismaClientRustPanicError.ts", "../src/runtime/core/errors/PrismaClientUnknownRequestError.ts", "../src/runtime/core/errors/PrismaClientValidationError.ts", "../../client-common/src/Cache.ts", "../../client-common/src/casing.ts", "../../client-common/src/Dictionary.ts", "../../client-common/src/lazyProperty.ts", "../../client-common/src/runtimeDataModel.ts", "../src/runtime/utils/date.ts", "../../../node_modules/.pnpm/decimal.js@10.5.0/node_modules/decimal.js/decimal.mjs", "../src/runtime/utils/decimalJsLike.ts", "../../dmmf/src/index.ts", "../../dmmf/src/convert.ts", "../../dmmf/src/dmmf.ts", "../src/runtime/utils/createErrorMessageWithContext.ts", "../src/runtime/utils/SourceFileSlice.ts", "../src/runtime/highlight/theme.ts", "../src/runtime/highlight/prism.ts", "../src/runtime/highlight/highlight.ts", "../src/runtime/utils/dedent.ts", "../src/runtime/core/errorRendering/applyValidationError.ts", "../src/runtime/core/errorRendering/applyUnionError.ts", "../src/runtime/core/errorRendering/ObjectFieldSuggestion.ts", "../../ts-builders/src/index.ts", "../../ts-builders/src/Writer.ts", "../src/runtime/core/errorRendering/ArrayField.ts", "../src/runtime/core/errorRendering/base.ts", "../src/runtime/core/errorRendering/FormattedString.ts", "../src/runtime/core/errorRendering/Value.ts", "../src/runtime/core/errorRendering/ArrayValue.ts", "../src/runtime/core/errorRendering/ObjectValue.ts", "../src/runtime/core/errorRendering/ScalarValue.ts", "../src/runtime/core/errorRendering/SuggestionObjectValue.ts", "../src/runtime/core/model/FieldRef.ts", "../src/runtime/core/types/exported/ObjectEnums.ts", "../src/runtime/core/errorRendering/ObjectField.ts", "../src/runtime/core/errorRendering/ArgumentsRenderingTree.ts", "../src/runtime/core/errorRendering/throwValidationException.ts", "../src/runtime/core/model/utils/dmmfToJSModelName.ts", "../src/runtime/core/extensions/resultUtils.ts", "../src/runtime/core/extensions/MergedExtensionsList.ts", "../src/runtime/core/model/Param.ts", "../src/runtime/core/types/exported/Skip.ts", "../src/runtime/core/jsonProtocol/serializeJsonQuery.ts", "../src/runtime/core/metrics/MetricsClient.ts", "../src/runtime/core/runtimeDataModel.ts", "../src/runtime/core/types/exported/TypedSql.ts", "../src/runtime/getPrismaClient.ts", "../../../node_modules/.pnpm/sql-template-tag@5.2.1/node_modules/sql-template-tag/src/index.ts", "../src/runtime/core/compositeProxy/addObjectProperties.ts", "../src/runtime/core/compositeProxy/addProperty.ts", "../src/runtime/core/compositeProxy/cacheProperties.ts", "../src/runtime/core/model/utils/defaultProxyHandlers.ts", "../src/runtime/core/compositeProxy/createCompositeProxy.ts", "../src/runtime/core/compositeProxy/removeProperties.ts", "../src/runtime/core/engines/common/utils/getBatchRequestPayload.ts", "../src/runtime/core/errorRendering/prettyPrintArguments.ts", "../src/runtime/core/errors/utils/prismaGraphQLToJSError.ts", "../../../node_modules/.pnpm/stacktrace-parser@0.1.11/node_modules/stacktrace-parser/dist/stack-trace-parser.esm.js", "../src/runtime/utils/CallSite.ts", "../src/runtime/core/model/aggregates/utils/aggregateMap.ts", "../src/runtime/core/model/aggregates/aggregate.ts", "../src/runtime/core/model/aggregates/count.ts", "../src/runtime/core/model/aggregates/groupBy.ts", "../src/runtime/core/model/applyAggregates.ts", "../src/runtime/core/model/applyFieldsProxy.ts", "../src/runtime/utils/deep-set.ts", "../src/runtime/core/model/applyFluent.ts", "../src/runtime/core/model/applyModel.ts", "../src/runtime/core/model/utils/jsToDMMFModelName.ts", "../src/runtime/core/model/applyModelsAndClientExtensions.ts", "../src/runtime/core/extensions/$extends.ts", "../src/runtime/core/extensions/applyResultExtensions.ts", "../src/runtime/core/extensions/visitQueryResult.ts", "../src/runtime/core/extensions/applyAllResultExtensions.ts", "../src/runtime/core/types/exported/itxClientDenyList.ts", "../src/runtime/utils/deepCloneArgs.ts", "../src/runtime/core/extensions/applyQueryExtensions.ts", "../src/runtime/core/init/checkPlatformCaching.ts", "../src/runtime/core/init/getDatasourceOverrides.ts", "../src/runtime/core/engines/common/utils/maskQuery.ts", "../src/runtime/core/engines/common/utils/normalizeLogs.ts", "../src/runtime/core/engines/common/utils/util.ts", "../src/runtime/core/engines/common/utils/getErrorMessageWithLink.ts", "../../client-engine-runtime/src/utils.ts", "../../client-engine-runtime/src/json-protocol.ts", "../../client-engine-runtime/src/user-facing-error.ts", "../../client-engine-runtime/src/batch.ts", "../../client-engine-runtime/src/interpreter/data-mapper.ts", "../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/trace/span_kind.ts", "../../client-engine-runtime/src/tracing.ts", "../../../node_modules/.pnpm/@bugsnag+cuid@3.2.1/node_modules/@bugsnag/cuid/lib/pad.mjs", "../../../node_modules/.pnpm/@bugsnag+cuid@3.2.1/node_modules/@bugsnag/cuid/lib/fingerprint.mjs", "../../../node_modules/.pnpm/@bugsnag+cuid@3.2.1/node_modules/@bugsnag/cuid/lib/is-cuid.mjs", "../../../node_modules/.pnpm/@bugsnag+cuid@3.2.1/node_modules/@bugsnag/cuid/lib/cuid.mjs", "../../../node_modules/.pnpm/@bugsnag+cuid@3.2.1/node_modules/@bugsnag/cuid/index.esm.mjs", "../../client-engine-runtime/src/interpreter/generators.ts", "../../../node_modules/.pnpm/nanoid@5.1.5/node_modules/nanoid/index.js", "../../../node_modules/.pnpm/nanoid@5.1.5/node_modules/nanoid/url-alphabet/index.js", "../../../node_modules/.pnpm/ulid@3.0.0/node_modules/ulid/dist/node/index.js", "../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm/stringify.js", "../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm/rng.js", "../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm/native.js", "../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm/v4.js", "../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm/v7.js", "../../client-engine-runtime/src/interpreter/in-memory-processing.ts", "../../client-engine-runtime/src/query-plan.ts", "../../client-engine-runtime/src/interpreter/render-query.ts", "../../client-engine-runtime/src/interpreter/serialize-sql.ts", "../../client-engine-runtime/src/interpreter/validation.ts", "../../client-engine-runtime/src/interpreter/query-interpreter.ts", "../../client-engine-runtime/src/crypto.ts", "../../client-engine-runtime/src/transaction-manager/transaction-manager-error.ts", "../../client-engine-runtime/src/transaction-manager/transaction-manager.ts", "../package.json", "../src/runtime/core/engines/client/LocalExecutor.ts", "../../../node_modules/.pnpm/cookie-es@2.0.0/node_modules/cookie-es/dist/index.mjs", "../src/runtime/utils/getRuntime.ts", "../src/runtime/core/init/resolveDatasourceUrl.ts", "../src/runtime/core/errors/PrismaClientError.ts", "../src/runtime/core/engines/data-proxy/errors/DataProxyError.ts", "../src/runtime/core/engines/data-proxy/errors/utils/setRetryable.ts", "../src/runtime/core/engines/data-proxy/errors/InvalidDatasourceError.ts", "../src/runtime/core/engines/common/accelerate/getUrlAndApiKey.ts", "../src/runtime/core/engines/common/accelerate/HeaderBuilder.ts", "../src/runtime/core/engines/data-proxy/utils/EngineTimestamp.ts", "../src/runtime/core/engines/client/RemoteExecutor.ts", "../src/runtime/core/engines/client/WasmQueryCompilerLoader.ts", "../src/runtime/core/engines/client/ClientEngine.ts", "../src/runtime/core/engines/data-proxy/errors/ForcedRetryError.ts", "../src/runtime/core/engines/data-proxy/errors/NotImplementedYetError.ts", "../src/runtime/core/engines/data-proxy/errors/DataProxyAPIError.ts", "../src/runtime/core/engines/data-proxy/errors/SchemaMissingError.ts", "../src/runtime/core/engines/data-proxy/errors/BadRequestError.ts", "../src/runtime/core/engines/data-proxy/errors/EngineHealthcheckTimeoutError.ts", "../src/runtime/core/engines/data-proxy/errors/EngineStartupError.ts", "../src/runtime/core/engines/data-proxy/errors/EngineVersionNotSupportedError.ts", "../src/runtime/core/engines/data-proxy/errors/GatewayTimeoutError.ts", "../src/runtime/core/engines/data-proxy/errors/InteractiveTransactionError.ts", "../src/runtime/core/engines/data-proxy/errors/InvalidRequestError.ts", "../src/runtime/core/engines/data-proxy/errors/NotFoundError.ts", "../src/runtime/core/engines/data-proxy/errors/ServerError.ts", "../src/runtime/core/engines/data-proxy/errors/UnauthorizedError.ts", "../src/runtime/core/engines/data-proxy/errors/UsageExceededError.ts", "../src/runtime/core/engines/data-proxy/errors/utils/responseToError.ts", "../src/runtime/core/engines/data-proxy/utils/backOff.ts", "../src/runtime/core/engines/data-proxy/utils/base64.ts", "../src/runtime/core/engines/data-proxy/utils/checkForbiddenMetrics.ts", "../../engines/package.json", "../src/runtime/core/engines/data-proxy/errors/NetworkError.ts", "../src/runtime/core/engines/data-proxy/utils/request.ts", "../src/runtime/core/engines/data-proxy/utils/getClientVersion.ts", "../src/runtime/core/engines/data-proxy/DataProxyEngine.ts", "../src/runtime/core/init/validateEngineInstanceConfig.ts", "../src/runtime/core/init/getEngineInstance.ts", "../src/runtime/core/init/getPreviewFeatures.ts", "../src/runtime/core/raw-query/rawCommandArgsMapper.ts", "../src/runtime/utils/mssqlPreparedStatement.ts", "../src/runtime/utils/serializeRawParameters.ts", "../src/runtime/core/raw-query/rawQueryArgsMapper.ts", "../src/runtime/core/request/createPrismaPromise.ts", "../src/runtime/core/tracing/TracingHelper.ts", "../src/runtime/core/transaction/utils/createLockCountPromise.ts", "../src/runtime/getLogLevel.ts", "../src/runtime/core/errors/ErrorWithBatchIndex.ts", "../src/runtime/core/jsonProtocol/getBatchId.ts", "../src/runtime/core/jsonProtocol/isWrite.ts", "../src/runtime/DataLoader.ts", "../src/runtime/utils/deserializeRawResults.ts", "../src/runtime/RequestHandler.ts", "../src/runtime/utils/clientVersion.ts", "../src/runtime/utils/validatePrismaClientOptions.ts", "../src/runtime/core/errors/PrismaClientConstructorValidationError.ts", "../src/runtime/utils/waitForBatch.ts", "../src/runtime/strictEnum.ts", "../src/runtime/warnEnvConflicts.ts"], "sourcesContent": ["{\n \"name\": \"@prisma/internals\",\n \"version\": \"6.16.3\",\n \"description\": \"This package is intended for Prisma's internal use\",\n \"main\": \"dist/index.js\",\n \"types\": \"dist/index.d.ts\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/prisma/prisma.git\",\n \"directory\": \"packages/internals\"\n },\n \"homepage\": \"https://www.prisma.io\",\n \"author\": \"Tim Suchanek <suchanek@prisma.io>\",\n \"bugs\": \"https://github.com/prisma/prisma/issues\",\n \"license\": \"Apache-2.0\",\n \"scripts\": {\n \"dev\": \"DEV=true tsx helpers/build.ts\",\n \"build\": \"tsx helpers/build.ts\",\n \"test\": \"dotenv -e ../../.db.env -- jest --silent\",\n \"prepublishOnly\": \"pnpm run build\"\n },\n \"files\": [\n \"README.md\",\n \"dist\",\n \"!**/libquery_engine*\",\n \"!dist/get-generators/engines/*\",\n \"scripts\"\n ],\n \"devDependencies\": {\n \"@babel/helper-validator-identifier\": \"7.25.9\",\n \"@opentelemetry/api\": \"1.9.0\",\n \"@swc/core\": \"1.11.5\",\n \"@swc/jest\": \"0.2.37\",\n \"@types/babel__helper-validator-identifier\": \"7.15.2\",\n \"@types/jest\": \"29.5.14\",\n \"@types/node\": \"18.19.76\",\n \"@types/resolve\": \"1.20.6\",\n \"archiver\": \"6.0.2\",\n \"checkpoint-client\": \"1.1.33\",\n \"cli-truncate\": \"4.0.0\",\n \"dotenv\": \"16.5.0\",\n \"empathic\": \"2.0.0\",\n \"escape-string-regexp\": \"5.0.0\",\n \"execa\": \"5.1.1\",\n \"fast-glob\": \"3.3.3\",\n \"find-up\": \"7.0.0\",\n \"fp-ts\": \"2.16.9\",\n \"fs-extra\": \"11.3.0\",\n \"fs-jetpack\": \"5.1.0\",\n \"global-directory\": \"4.0.0\",\n \"globby\": \"11.1.0\",\n \"identifier-regex\": \"1.0.0\",\n \"indent-string\": \"4.0.0\",\n \"is-windows\": \"1.0.2\",\n \"is-wsl\": \"3.1.0\",\n \"jest\": \"29.7.0\",\n \"jest-junit\": \"16.0.0\",\n \"kleur\": \"4.1.5\",\n \"mock-stdin\": \"1.0.0\",\n \"new-github-issue-url\": \"0.2.1\",\n \"node-fetch\": \"3.3.2\",\n \"npm-packlist\": \"5.1.3\",\n \"open\": \"7.4.2\",\n \"p-map\": \"4.0.0\",\n \"resolve\": \"1.22.10\",\n \"string-width\": \"7.2.0\",\n \"strip-indent\": \"4.0.0\",\n \"temp-dir\": \"2.0.0\",\n \"tempy\": \"1.0.1\",\n \"terminal-link\": \"4.0.0\",\n \"tmp\": \"0.2.3\",\n \"ts-pattern\": \"5.6.2\",\n \"ts-toolbelt\": \"9.6.0\",\n \"typescript\": \"5.4.5\",\n \"yarn\": \"1.22.22\"\n },\n \"dependencies\": {\n \"@prisma/config\": \"workspace:*\",\n \"@prisma/debug\": \"workspace:*\",\n \"@prisma/dmmf\": \"workspace:*\",\n \"@prisma/driver-adapter-utils\": \"workspace:*\",\n \"@prisma/engines\": \"workspace:*\",\n \"@prisma/fetch-engine\": \"workspace:*\",\n \"@prisma/generator\": \"workspace:*\",\n \"@prisma/generator-helper\": \"workspace:*\",\n \"@prisma/get-platform\": \"workspace:*\",\n \"@prisma/prisma-schema-wasm\": \"6.16.1-1.bb420e667c1820a8c05a38023385f6cc7ef8e83a\",\n \"@prisma/schema-engine-wasm\": \"6.16.1-1.bb420e667c1820a8c05a38023385f6cc7ef8e83a\",\n \"@prisma/schema-files-loader\": \"workspace:*\",\n \"arg\": \"5.0.2\",\n \"prompts\": \"2.4.2\"\n },\n \"peerDependencies\": {\n \"typescript\": \">=5.1.0\"\n },\n \"peerDependenciesMeta\": {\n \"typescript\": {\n \"optional\": true\n }\n },\n \"sideEffects\": false\n}", "{\n \"name\": \"@prisma/engines-version\",\n \"version\": \"6.16.1-1.bb420e667c1820a8c05a38023385f6cc7ef8e83a\",\n \"main\": \"index.js\",\n \"types\": \"index.d.ts\",\n \"license\": \"Apache-2.0\",\n \"author\": \"Tim Suchanek <suchanek@prisma.io>\",\n \"prisma\": {\n \"enginesVersion\": \"bb420e667c1820a8c05a38023385f6cc7ef8e83a\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/prisma/engines-wrapper.git\",\n \"directory\": \"packages/engines-version\"\n },\n \"devDependencies\": {\n \"@types/node\": \"18.19.76\",\n \"typescript\": \"4.9.5\"\n },\n \"files\": [\n \"index.js\",\n \"index.d.ts\"\n ],\n \"scripts\": {\n \"build\": \"tsc -d\"\n }\n}", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.enginesVersion = void 0;\nexports.enginesVersion = require('./package.json').prisma.enginesVersion;\n//# sourceMappingURL=index.js.map", "'use strict';\nmodule.exports = string => {\n\tconst match = string.match(/^[ \\t]*(?=\\S)/gm);\n\n\tif (!match) {\n\t\treturn 0;\n\t}\n\n\treturn match.reduce((r, a) => Math.min(r, a.length), Infinity);\n};\n", "'use strict';\n\nmodule.exports = (string, count = 1, options) => {\n\toptions = {\n\t\tindent: ' ',\n\t\tincludeEmptyLines: false,\n\t\t...options\n\t};\n\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`input\\` to be a \\`string\\`, got \\`${typeof string}\\``\n\t\t);\n\t}\n\n\tif (typeof count !== 'number') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`count\\` to be a \\`number\\`, got \\`${typeof count}\\``\n\t\t);\n\t}\n\n\tif (typeof options.indent !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`options.indent\\` to be a \\`string\\`, got \\`${typeof options.indent}\\``\n\t\t);\n\t}\n\n\tif (count === 0) {\n\t\treturn string;\n\t}\n\n\tconst regex = options.includeEmptyLines ? /^/gm : /^(?!\\s*$)/gm;\n\n\treturn string.replace(regex, options.indent.repeat(count));\n};\n", "{\n \"name\": \"dotenv\",\n \"version\": \"16.5.0\",\n \"description\": \"Loads environment variables from .env file\",\n \"main\": \"lib/main.js\",\n \"types\": \"lib/main.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/main.d.ts\",\n \"require\": \"./lib/main.js\",\n \"default\": \"./lib/main.js\"\n },\n \"./config\": \"./config.js\",\n \"./config.js\": \"./config.js\",\n \"./lib/env-options\": \"./lib/env-options.js\",\n \"./lib/env-options.js\": \"./lib/env-options.js\",\n \"./lib/cli-options\": \"./lib/cli-options.js\",\n \"./lib/cli-options.js\": \"./lib/cli-options.js\",\n \"./package.json\": \"./package.json\"\n },\n \"scripts\": {\n \"dts-check\": \"tsc --project tests/types/tsconfig.json\",\n \"lint\": \"standard\",\n \"pretest\": \"npm run lint && npm run dts-check\",\n \"test\": \"tap run --allow-empty-coverage --disable-coverage --timeout=60000\",\n \"test:coverage\": \"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov\",\n \"prerelease\": \"npm test\",\n \"release\": \"standard-version\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git://github.com/motdotla/dotenv.git\"\n },\n \"homepage\": \"https://github.com/motdotla/dotenv#readme\",\n \"funding\": \"https://dotenvx.com\",\n \"keywords\": [\n \"dotenv\",\n \"env\",\n \".env\",\n \"environment\",\n \"variables\",\n \"config\",\n \"settings\"\n ],\n \"readmeFilename\": \"README.md\",\n \"license\": \"BSD-2-Clause\",\n \"devDependencies\": {\n \"@types/node\": \"^18.11.3\",\n \"decache\": \"^4.6.2\",\n \"sinon\": \"^14.0.1\",\n \"standard\": \"^17.0.0\",\n \"standard-version\": \"^9.5.0\",\n \"tap\": \"^19.2.0\",\n \"typescript\": \"^4.8.4\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"browser\": {\n \"fs\": false\n }\n}\n", "const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n const vaultPath = _vaultPath(options)\n\n // Parse .env.vault\n const result = DotenvModule.configDotenv({ path: vaultPath })\n if (!result.parsed) {\n const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n err.code = 'MISSING_DATA'\n throw err\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _warn (message) {\n console.log(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n throw err\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let possibleVaultPath = null\n\n if (options && options.path && options.path.length > 0) {\n if (Array.isArray(options.path)) {\n for (const filepath of options.path) {\n if (fs.existsSync(filepath)) {\n possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n }\n }\n } else {\n possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n }\n } else {\n possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n }\n\n if (fs.existsSync(possibleVaultPath)) {\n return possibleVaultPath\n }\n\n return null\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n const debug = Boolean(options && options.debug)\n if (debug) {\n _debug('Loading env from encrypted .env.vault')\n }\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n const dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n const debug = Boolean(options && options.debug)\n\n if (options && options.encoding) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n\n let optionPaths = [dotenvPath] // default, look for .env\n if (options && options.path) {\n if (!Array.isArray(options.path)) {\n optionPaths = [_resolveHome(options.path)]\n } else {\n optionPaths = [] // reset default\n for (const filepath of options.path) {\n optionPaths.push(_resolveHome(filepath))\n }\n }\n }\n\n // Build the parsed data in a temporary object (because we need to return it). Once we have the final\n // parsed data, we will combine it with process.env (or options.processEnv if provided).\n let lastError\n const parsedAll = {}\n for (const path of optionPaths) {\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n DotenvModule.populate(parsedAll, parsed, options)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${path} ${e.message}`)\n }\n lastError = e\n }\n }\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsedAll, options)\n\n if (lastError) {\n return { parsed: parsedAll, error: lastError }\n } else {\n return { parsed: parsedAll }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n const vaultPath = _vaultPath(options)\n\n // dotenvKey exists but .env.vault file does not exist\n if (!vaultPath) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n } else if (decryptionFailed) {\n const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n err.code = 'DECRYPTION_FAILED'\n throw err\n } else {\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n\n if (typeof parsed !== 'object') {\n const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n err.code = 'OBJECT_REQUIRED'\n throw err\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n }\n }\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n", "'use strict';\n\nmodule.exports = (options = {}) => {\n\tlet repoUrl;\n\tif (options.repoUrl) {\n\t\trepoUrl = options.repoUrl;\n\t} else if (options.user && options.repo) {\n\t\trepoUrl = `https://github.com/${options.user}/${options.repo}`;\n\t} else {\n\t\tthrow new Error('You need to specify either the `repoUrl` option or both the `user` and `repo` options');\n\t}\n\n\tconst url = new URL(`${repoUrl}/issues/new`);\n\n\tconst types = [\n\t\t'body',\n\t\t'title',\n\t\t'labels',\n\t\t'template',\n\t\t'milestone',\n\t\t'assignee',\n\t\t'projects'\n\t];\n\n\tfor (const type of types) {\n\t\tlet value = options[type];\n\t\tif (value === undefined) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (type === 'labels' || type === 'projects') {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthrow new TypeError(`The \\`${type}\\` option should be an array`);\n\t\t\t}\n\n\t\t\tvalue = value.join(',');\n\t\t}\n\n\t\turl.searchParams.set(type, value);\n\t}\n\n\treturn url.toString();\n};\n\n// TODO: Remove this for the next major release\nmodule.exports.default = module.exports;\n", "'use strict';\nmodule.exports = (function()\n{\n function _min(d0, d1, d2, bx, ay)\n {\n return d0 < d1 || d2 < d1\n ? d0 > d2\n ? d2 + 1\n : d0 + 1\n : bx === ay\n ? d1\n : d1 + 1;\n }\n\n return function(a, b)\n {\n if (a === b) {\n return 0;\n }\n\n if (a.length > b.length) {\n var tmp = a;\n a = b;\n b = tmp;\n }\n\n var la = a.length;\n var lb = b.length;\n\n while (la > 0 && (a.charCodeAt(la - 1) === b.charCodeAt(lb - 1))) {\n la--;\n lb--;\n }\n\n var offset = 0;\n\n while (offset < la && (a.charCodeAt(offset) === b.charCodeAt(offset))) {\n offset++;\n }\n\n la -= offset;\n lb -= offset;\n\n if (la === 0 || lb < 3) {\n return lb;\n }\n\n var x = 0;\n var y;\n var d0;\n var d1;\n var d2;\n var d3;\n var dd;\n var dy;\n var ay;\n var bx0;\n var bx1;\n var bx2;\n var bx3;\n\n var vector = [];\n\n for (y = 0; y < la; y++) {\n vector.push(y + 1);\n vector.push(a.charCodeAt(offset + y));\n }\n\n var len = vector.length - 1;\n\n for (; x < lb - 3;) {\n bx0 = b.charCodeAt(offset + (d0 = x));\n bx1 = b.charCodeAt(offset + (d1 = x + 1));\n bx2 = b.charCodeAt(offset + (d2 = x + 2));\n bx3 = b.charCodeAt(offset + (d3 = x + 3));\n dd = (x += 4);\n for (y = 0; y < len; y += 2) {\n dy = vector[y];\n ay = vector[y + 1];\n d0 = _min(dy, d0, d1, bx0, ay);\n d1 = _min(d0, d1, d2, bx1, ay);\n d2 = _min(d1, d2, d3, bx2, ay);\n dd = _min(d2, d3, dd, bx3, ay);\n vector[y] = dd;\n d3 = d2;\n d2 = d1;\n d1 = d0;\n d0 = dy;\n }\n }\n\n for (; x < lb;) {\n bx0 = b.charCodeAt(offset + (d0 = x));\n dd = ++x;\n for (y = 0; y < len; y += 2) {\n dy = vector[y];\n vector[y] = dd = _min(dy, d0, dd, bx0, vector[y + 1]);\n d0 = dy;\n }\n }\n\n return dd;\n };\n})();\n\n", "import { BasicBuilder } from './BasicBuilder'\nimport type { KeyType } from './KeyType'\nimport { Writer } from './Writer'\n\nexport abstract class TypeBuilder implements BasicBuilder {\n // TODO(@SevInf): this should be replaced with precedence system that would\n // automatically add parenthesis where they are needed\n needsParenthesisWhenIndexed = false\n needsParenthesisInKeyof = false\n needsParenthesisInUnion = false\n needsParenthesisInIntersection = false\n\n abstract write(writer: Writer): void\n\n subKey(key: string): KeyType {\n // TODO: since we translating ESM to CommonJS during bundling, we\n // can't handle circular dependencies the same way ESM does. We have to delay KeyType import\n // to resolve it. Once we stop doing this, we can move this import to top of the file.\n const { KeyType } = require('./KeyType')\n return new KeyType(this, key)\n }\n\n writeIndexed(writer: Writer) {\n if (this.needsParenthesisWhenIndexed) {\n writer.write('(')\n }\n\n writer.write(this)\n\n if (this.needsParenthesisWhenIndexed) {\n writer.write(')')\n }\n }\n}\n", "import { TypeBuilder } from './TypeBuilder'\nimport { Writer } from './Writer'\n\nexport class KeyType extends TypeBuilder {\n constructor(\n public baseType: TypeBuilder,\n public key: string,\n ) {\n super()\n }\n write(writer: Writer): void {\n this.baseType.writeIndexed(writer)\n\n writer.write('[').write(`\"${this.key}\"`).write(']')\n }\n}\n\nexport function keyType(baseType: TypeBuilder, key: string) {\n return new KeyType(baseType, key)\n}\n", "/**\n * Internal assertion helpers.\n * @module\n */\n\n/** Asserts something is positive integer. */\nfunction anumber(n: number): void {\n if (!Number.isSafeInteger(n) || n < 0) throw new Error('positive integer expected, got ' + n);\n}\n\n/** Is number an Uint8Array? Copied from utils for perf. */\nfunction isBytes(a: unknown): a is Uint8Array {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n\n/** Asserts something is Uint8Array. */\nfunction abytes(b: Uint8Array | undefined, ...lengths: number[]): void {\n if (!isBytes(b)) throw new Error('Uint8Array expected');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error('Uint8Array expected of length ' + lengths + ', got length=' + b.length);\n}\n\n/** Hash interface. */\nexport type Hash = {\n (data: Uint8Array): Uint8Array;\n blockLen: number;\n outputLen: number;\n create: any;\n};\n\n/** Asserts something is hash */\nfunction ahash(h: Hash): void {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n anumber(h.outputLen);\n anumber(h.blockLen);\n}\n\n/** Asserts a hash instance has not been destroyed / finished */\nfunction aexists(instance: any, checkFinished = true): void {\n if (instance.destroyed) throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished) throw new Error('Hash#digest() has already been called');\n}\n\n/** Asserts output is properly-sized byte array */\nfunction aoutput(out: any, instance: any): void {\n abytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error('digestInto() expects output buffer of length at least ' + min);\n }\n}\n\nexport { anumber, abytes, ahash, aexists, aoutput };\n", "/**\n * Internal helpers for u64. BigUint64Array is too slow as per 2025, so we implement it using Uint32Array.\n * @todo re-check https://issues.chromium.org/issues/42212588\n * @module\n */\nconst U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n\nfunction fromBig(\n n: bigint,\n le = false\n): {\n h: number;\n l: number;\n} {\n if (le) return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\n\nfunction split(lst: bigint[], le = false): Uint32Array[] {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\n\nconst toBig = (h: number, l: number): bigint => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h: number, _l: number, s: number): number => h >>> s;\nconst shrSL = (h: number, l: number, s: number): number => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h: number, l: number, s: number): number => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h: number, l: number, s: number): number => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h: number, l: number, s: number): number => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h: number, l: number, s: number): number => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h: number, l: number): number => l;\nconst rotr32L = (h: number, _l: number): number => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h: number, l: number, s: number): number => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h: number, l: number, s: number): number => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h: number, l: number, s: number): number => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h: number, l: number, s: number): number => (h << (s - 32)) | (l >>> (64 - s));\n\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(\n Ah: number,\n Al: number,\n Bh: number,\n Bl: number\n): {\n h: number;\n l: number;\n} {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al: number, Bl: number, Cl: number): number => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low: number, Ah: number, Bh: number, Ch: number): number =>\n (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al: number, Bl: number, Cl: number, Dl: number): number =>\n (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low: number, Ah: number, Bh: number, Ch: number, Dh: number): number =>\n (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al: number, Bl: number, Cl: number, Dl: number, El: number): number =>\n (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number): number =>\n (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n\n// prettier-ignore\nexport {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\n// prettier-ignore\nconst u64: { fromBig: typeof fromBig; split: typeof split; toBig: (h: number, l: number) => bigint; shrSH: (h: number, _l: number, s: number) => number; shrSL: (h: number, l: number, s: number) => number; rotrSH: (h: number, l: number, s: number) => number; rotrSL: (h: number, l: number, s: number) => number; rotrBH: (h: number, l: number, s: number) => number; rotrBL: (h: number, l: number, s: number) => number; rotr32H: (_h: number, l: number) => number; rotr32L: (h: number, _l: number) => number; rotlSH: (h: number, l: number, s: number) => number; rotlSL: (h: number, l: number, s: number) => number; rotlBH: (h: number, l: number, s: number) => number; rotlBL: (h: number, l: number, s: number) => number; add: typeof add; add3L: (Al: number, Bl: number, Cl: number) => number; add3H: (low: number, Ah: number, Bh: number, Ch: number) => number; add4L: (Al: number, Bl: number, Cl: number, Dl: number) => number; add4H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number) => number; add5H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number) => number; add5L: (Al: number, Bl: number, Cl: number, Dl: number, El: number) => number; } = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n", "/**\n * Internal webcrypto alias.\n * We prefer WebCrypto aka globalThis.crypto, which exists in node.js 16+.\n * Falls back to Node.js built-in crypto for Node.js <=v14.\n * See utils.ts for details.\n * @module\n */\n// @ts-ignore\nimport * as nc from 'node:crypto';\nexport const crypto: any =\n nc && typeof nc === 'object' && 'webcrypto' in nc\n ? (nc.webcrypto as any)\n : nc && typeof nc === 'object' && 'randomBytes' in nc\n ? nc\n : undefined;\n", "/**\n * Utilities for hex, bytes, CSPRNG.\n * @module\n */\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nimport { abytes } from './_assert.js';\n// export { isBytes } from './_assert.js';\n// We can't reuse isBytes from _assert, because somehow this causes huge perf issues\nexport function isBytes(a: unknown): a is Uint8Array {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n\n// prettier-ignore\nexport type TypedArray = Int8Array | Uint8ClampedArray | Uint8Array |\n Uint16Array | Int16Array | Uint32Array | Int32Array;\n\n// Cast array to different type\nexport function u8(arr: TypedArray): Uint8Array {\n return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n}\nexport function u32(arr: TypedArray): Uint32Array {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n}\n\n// Cast array to view\nexport function createView(arr: TypedArray): DataView {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n\n/** The rotate right (circular right shift) operation for uint32 */\nexport function rotr(word: number, shift: number): number {\n return (word << (32 - shift)) | (word >>> shift);\n}\n/** The rotate left (circular left shift) operation for uint32 */\nexport function rotl(word: number, shift: number): number {\n return (word << shift) | ((word >>> (32 - shift)) >>> 0);\n}\n\n/** Is current platform little-endian? Most are. Big-Endian platform: IBM */\nexport const isLE: boolean = /* @__PURE__ */ (() =>\n new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();\n// The byte swap operation for uint32\nexport function byteSwap(word: number): number {\n return (\n ((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff)\n );\n}\n/** Conditionally byte swap if on a big-endian platform */\nexport const byteSwapIfBE: (n: number) => number = isLE\n ? (n: number) => n\n : (n: number) => byteSwap(n);\n\n/** In place byte swap for Uint32Array */\nexport function byteSwap32(arr: Uint32Array): void {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n}\n\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) =>\n i.toString(16).padStart(2, '0')\n);\n/**\n * Convert byte array to hex string.\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes: Uint8Array): string {\n abytes(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 } as const;\nfunction asciiToBase16(ch: number): number | undefined {\n if (ch >= asciis._0 && ch <= asciis._9) return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F) return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f) return ch - (asciis.a - 10); // 'b' => 98-(97-10)\n return;\n}\n\n/**\n * Convert hex string to byte array.\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex: string): Uint8Array {\n if (typeof hex !== 'string') throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2) throw new Error('hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163\n }\n return array;\n}\n\n/**\n * There is no setImmediate in browser and setTimeout is slow.\n * Call of async fn will return Promise, which will be fullfiled only on\n * next scheduler queue processing step and this is exactly what we need.\n */\nexport const nextTick = async (): Promise<void> => {};\n\n/** Returns control to thread each 'tick' ms to avoid blocking. */\nexport async function asyncLoop(\n iters: number,\n tick: number,\n cb: (i: number) => void\n): Promise<void> {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick) continue;\n await nextTick();\n ts += diff;\n }\n}\n\n// Global symbols in both browsers and Node.js since v11\n// See https://github.com/microsoft/TypeScript/issues/31535\ndeclare const TextEncoder: any;\n\n/**\n * Convert JS string to byte array.\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str: string): Uint8Array {\n if (typeof str !== 'string') throw new Error('utf8ToBytes expected string, got ' + typeof str);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n\n/** Accepted input of hash functions. Strings are converted to byte arrays. */\nexport type Input = Uint8Array | string;\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data: Input): Uint8Array {\n if (typeof data === 'string') data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays: Uint8Array[]): Uint8Array {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n\n/** For runtime check if class implements interface */\nexport abstract class Hash<T extends Hash<T>> {\n abstract blockLen: number