{"version":3,"file":"contextTokenOrchestrators.mjs","sources":["../../../src/context/contextTokenOrchestrators.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Maps a per-context token provider object to its write-capable orchestrator.\n *\n * The public `TokenProvider` contract is read-only (`getTokens` only), so the\n * write side of a per-context provider cannot be hung off the provider itself\n * without expanding the public surface. This registry keeps that association\n * Amplify-owned and out of any public type.\n *\n * Weak keys so entries are GC'd with the context/provider. Values are kept\n * opaque (`unknown`) so core carries no dependency on auth's orchestrator type;\n * the reader supplies the concrete type at the call site.\n *\n * @internal\n */\nconst contextTokenOrchestrators = new WeakMap();\n/**\n * Associates a per-context token provider with its write-capable orchestrator.\n *\n * @internal\n */\nexport const registerContextTokenOrchestrator = (provider, orchestrator) => {\n    contextTokenOrchestrators.set(provider, orchestrator);\n};\n/**\n * Returns the orchestrator registered for the given token provider, or\n * `undefined` when the provider is absent or was never registered (the global\n * `Amplify.configure()` path).\n *\n * @internal\n */\nexport const getContextTokenOrchestrator = (provider) => provider\n    ? contextTokenOrchestrators.get(provider)\n    : undefined;\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,yBAAyB,GAAG,IAAI,OAAO,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACY,MAAC,gCAAgC,GAAG,CAAC,QAAQ,EAAE,YAAY,KAAK;AAC5E,IAAI,yBAAyB,CAAC,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,2BAA2B,GAAG,CAAC,QAAQ,KAAK;AACzD,MAAM,yBAAyB,CAAC,GAAG,CAAC,QAAQ;AAC5C,MAAM;;;;"}