{"version":3,"file":"env-browser.mjs","sourceRoot":"","sources":["../../src/env-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAclC;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAY;IACjD,OAAO,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,yDAAyD;AACzD,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW,CAAC;AAEjG;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GACtB,OAAO,IAAI,KAAK,QAAQ;IACxB,eAAe,IAAI,IAAI;IACvB,OAAO,IAAI,CAAC,aAAa,KAAK,UAAU;IACxC,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,KAAK,4BAA4B;QACtD,IAAI,CAAC,WAAW,EAAE,IAAI,KAAK,0BAA0B;QACrD,IAAI,CAAC,WAAW,EAAE,IAAI,KAAK,yBAAyB,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAY,KAAK,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAY,KAAK,CAAC;AAEpC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAY,KAAK,CAAC;AAEzC;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAY,KAAK,CAAC;AAE5C;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAY,KAAK,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// Bundlers and test frameworks (e.g. vitest's `define`) may inject a `process.env`\n// object into browser bundles. Declare the minimal shape on globalThis so we can\n// access it type-safely without pulling in @types/node.\n// Using `globalThis.process` (property access) instead of bare `process` avoids\n// ReferenceError when the binding doesn't exist at all.\ndeclare global {\n  // eslint-disable-next-line no-var\n  var process:\n    | { env?: Record<string, string | undefined>; emitWarning?: (warning: string) => void }\n    | undefined;\n}\n\n/**\n * Returns the value of the specified environment variable.\n * In browser environments, this checks for a globally-defined `process.env`\n * which may be injected by bundlers or test frameworks (e.g. vitest's `define`).\n *\n * @internal\n */\nexport function getEnvironmentVariable(name: string): string | undefined {\n  return globalThis.process?.env?.[name];\n}\n\n/**\n * Emits a warning via `process.emitWarning` if available.\n *\n * @internal\n */\nexport function emitNodeWarning(warning: string): void {\n  globalThis.process?.emitWarning?.(warning);\n}\n\n/**\n * A constant that indicates whether the environment the code is running is a Web Browser.\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-no-window\nexport const isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n\n/**\n * A constant that indicates whether the environment the code is running is a Web Worker.\n */\nexport const isWebWorker =\n  typeof self === \"object\" &&\n  \"importScripts\" in self &&\n  typeof self.importScripts === \"function\" &&\n  (self.constructor?.name === \"DedicatedWorkerGlobalScope\" ||\n    self.constructor?.name === \"ServiceWorkerGlobalScope\" ||\n    self.constructor?.name === \"SharedWorkerGlobalScope\");\n\n/**\n * A constant that indicates whether the environment the code is running is Deno.\n */\nexport const isDeno: boolean = false;\n\n/**\n * A constant that indicates whether the environment the code is running is Bun.sh.\n */\nexport const isBun: boolean = false;\n\n/**\n * A constant that indicates whether the environment the code is running is a Node.js compatible environment.\n */\nexport const isNodeLike: boolean = false;\n\n/**\n * A constant that indicates whether the environment the code is running is Node.JS.\n */\nexport const isNodeRuntime: boolean = false;\n\n/**\n * A constant that indicates whether the environment the code is running is in React-Native.\n */\nexport const isReactNative: boolean = false;\n"]}