{"version":3,"file":"shared.cjs","names":["createEnvInternal","arkenv"],"sources":["../src/shared.ts"],"sourcesContent":["import type { $ } from \"@repo/scope\";\nimport type { Dict, SchemaShape } from \"@repo/types\";\nimport type { EnvSchema } from \"arkenv\";\nimport type { type as at, distill } from \"arktype\";\nimport { createEnvInternal } from \"./create-env\";\nimport type { MergeExtends } from \"./types\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Shared entry point).\n */\nexport function createEnv<\n\tconst TSchema extends SchemaShape = {},\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Dict<string>;\n\t},\n): Readonly<distill.Out<at.infer<TSchema, $>> & MergeExtends<TExtends>> {\n\tconst isServer = typeof window === \"undefined\";\n\treturn createEnvInternal(schema, options, {\n\t\tisServer,\n\t\tisShared: true,\n\t}) as any;\n}\n\nexport { type } from \"arkenv\";\n\nconst arkenv = createEnv;\nexport default arkenv;\n"],"mappings":"4LAUA,SAAgB,EAIf,EACA,EAIuE,CAEvE,OAAOA,EAAAA,EAAkB,EAAQ,EAAS,CACzC,SAFgB,OAAO,OAAW,IAGlC,SAAU,GACV,CAAC,CAKH,MAAMC,EAAS"}