{"version":3,"file":"typedi.min.mjs","sources":["../esm5/error/container-registry-error.error.js","../esm5/container-registry.class.js","../esm5/token.class.js","../esm5/error/service-not-found.error.js","../esm5/error/cannot-instantiate-value.error.js","../esm5/constants/empty.const.js","../esm5/constants/builtins.const.js","../esm5/error/cannot-instantiate-builtin-error.js","../esm5/constants/service-defaults.const.js","../esm5/constants/type-stamps.const.js","../esm5/utils/resolve-to-type-wrapper.util.js","../esm5/utils/is-inject-identifier.util.js","../esm5/utils/is-lazy-reference.util.js","../esm5/utils/wrap-resolvable-dependency.js","../esm5/constants/host-container.const.js","../esm5/visitor-collection.class.js","../esm5/container-instance.class.js","../esm5/utils/format-class-name.js","../esm5/decorators/service.decorator.js","../esm5/decorators/js-service.decorator.js","../esm5/functions/host-container.function.js","../esm5/functions/lazy.function.js","../esm5/functions/resolution-constraints.functions.js"],"sourcesContent":["/**\n * An error thrown from operations within the {@link ContainerRegistry}.\n *\n * @group Errors\n *\n * @see {@link ContainerRegistry}\n */\nexport class ContainerRegistryError extends Error {\n    constructor() {\n        super(...arguments);\n        this.name = 'ContainerRegistryError';\n    }\n}\n//# sourceMappingURL=container-registry-error.error.js.map","import { ContainerInstance } from './container-instance.class';\nimport { ContainerRegistryError } from './error/container-registry-error.error';\n/**\n * The container registry is responsible for holding the default and every\n * created container instance for later access.\n *\n * _Note: This class is for internal use and its API may break in minor or\n * patch releases without warning._\n */\nexport class ContainerRegistry {\n    /**\n     * Registers the given container instance or throws an error.\n     *\n     * _Note: This function is auto-called when a Container instance is created,\n     * it doesn't need to be called manually!_\n     *\n     * @param container the container to add to the registry\n     *\n     * @throws ContainerRegistryError\n     * This exception is thrown in the following scenarios:\n     *   - If the item being registered is not a container.\n     *   - A container with the same ID already exists in the registry.\n     */\n    static registerContainer(container) {\n        if (container instanceof ContainerInstance === false) {\n            throw new ContainerRegistryError('Only ContainerInstance instances can be registered.');\n        }\n        if (ContainerRegistry.containerMap.has(container.id)) {\n            throw new ContainerRegistryError('Cannot register container with same ID.');\n        }\n        ContainerRegistry.containerMap.set(container.id, container);\n    }\n    /**\n     * Returns true if a container exists with the given ID or false otherwise.\n     *\n     * @param container the ID of the container\n     *\n     * @returns Whether a container with the specified ID could be\n     * found in the registry.\n     */\n    static hasContainer(id) {\n        return ContainerRegistry.containerMap.has(id);\n    }\n    /**\n     * Returns the container for requested ID or throws an error if no container\n     * is registered with the given ID.\n     *\n     * @param container the ID of the container\n     *\n     * @throws ContainerRegistryError\n     * This exception is thrown when a container with\n     * the given ID does not exist in the registry.\n     */\n    static getContainer(id) {\n        const registeredContainer = this.containerMap.get(id);\n        if (registeredContainer === undefined) {\n            throw new ContainerRegistryError('No container is registered with the given ID.');\n        }\n        return registeredContainer;\n    }\n    /**\n     * Removes the given container from the registry and disposes all services\n     * registered only in this container.\n     *\n     * This function throws an error if no\n     *   - container exists with the given ID\n     *   - any of the registered services threw an error during it's disposal\n     *\n     * @param container the container to remove from the registry\n     *\n     * @throws ContainerRegistryError\n     * This exception is thrown when a container with\n     * the specified ID does not exist in the registry.\n     *\n     * @throws Error\n     *\n     */\n    static async removeContainer(container) {\n        const registeredContainer = ContainerRegistry.containerMap.get(container.id);\n        if (registeredContainer === undefined) {\n            throw new ContainerRegistryError('No container is registered with the given ID.');\n        }\n        /** We remove the container first. */\n        ContainerRegistry.containerMap.delete(container.id);\n        /** We dispose all registered classes in the container. */\n        await registeredContainer.dispose();\n    }\n}\n/**\n * The list of all known container. Created containers are automatically added\n * to this list. Two container cannot be registered with the same ID.\n *\n * This map doesn't contains the default container.\n */\nContainerRegistry.containerMap = new Map();\n//# sourceMappingURL=container-registry.class.js.map","/**\n * Used to create unique typed service identifier.\n * Useful when service has only interface, but don't have a class.\n */\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nexport class Token {\n    /**\n     * @param name Token name, optional and only used for debugging purposes.\n     */\n    constructor(name) {\n        this.name = name;\n    }\n}\n//# sourceMappingURL=token.class.js.map","import { Token } from '../token.class';\n/**\n * Thrown when requested service was not found.\n *\n * @group Errors\n */\nexport class ServiceNotFoundError extends Error {\n    get message() {\n        return (`Service with \"${this.normalizedIdentifier}\" identifier was not found in the container. ` +\n            `Register it before usage via explicitly calling the \"Container.set\" function or using the \"@Service()\" decorator.`);\n    }\n    constructor(identifier) {\n        super();\n        this.name = 'ServiceNotFoundError';\n        /** Normalized identifier name used in the error message. */\n        this.normalizedIdentifier = '<UNKNOWN_IDENTIFIER>';\n        if (typeof identifier === 'string') {\n            this.normalizedIdentifier = identifier;\n        }\n        else if (identifier instanceof Token) {\n            this.normalizedIdentifier = `Token<${identifier.name || 'UNSET_NAME'}>`;\n        }\n        else if (identifier && (identifier.name || identifier.prototype?.name)) {\n            this.normalizedIdentifier = `MaybeConstructable<${identifier.name ?? identifier.prototype?.name}>`;\n        }\n    }\n}\n//# sourceMappingURL=service-not-found.error.js.map","import { Token } from '../token.class';\n/**\n * Thrown when DI cannot inject value into property decorated by `@Inject` decorator.\n *\n * @group Errors\n */\nexport class CannotInstantiateValueError extends Error {\n    get message() {\n        return (`Cannot instantiate the requested value for the \"${this.normalizedIdentifier}\" identifier. ` +\n            `The related metadata doesn't contain a factory or a type to instantiate.`);\n    }\n    constructor(identifier) {\n        super();\n        this.name = 'CannotInstantiateValueError';\n        /** Normalized identifier name used in the error message. */\n        this.normalizedIdentifier = '<UNKNOWN_IDENTIFIER>';\n        // TODO: Extract this to a helper function and share between this and NotFoundError.\n        if (typeof identifier === 'string') {\n            this.normalizedIdentifier = identifier;\n        }\n        else if (identifier instanceof Token) {\n            this.normalizedIdentifier = `Token<${identifier.name || 'UNSET_NAME'}>`;\n        }\n        else if (identifier && (identifier.name || identifier.prototype?.name)) {\n            this.normalizedIdentifier =\n                `MaybeConstructable<${identifier.name}>` ||\n                    `MaybeConstructable<${identifier.prototype?.name}>`;\n        }\n    }\n}\n//# sourceMappingURL=cannot-instantiate-value.error.js.map","/**\n * Indicates that a service has not been initialized yet.\n *\n * _Note: This value is for internal use only._\n */\nexport const EMPTY_VALUE = Symbol('EMPTY_VALUE');\n//# sourceMappingURL=empty.const.js.map","/**\n * A list of functions representing built-in types.\n * @ignore @internal\n *\n * @privateRemarks\n * When these are used as dependencies for a service which does not\n * have a corresponding factory, TypeDI will throw an error.\n * This is because, while these functions *are* valid constructors,\n * in most cases they won't create what the caller expected when\n * instantiated.\n * Furthermore, they won't resolve in the context of the container.\n */\nexport const BUILT_INS = [String, Object, Boolean, Symbol, Array, Number];\n//# sourceMappingURL=builtins.const.js.map","import { CannotInstantiateValueError } from './cannot-instantiate-value.error';\n/**\n * Thrown when DI encounters a service depending on a built-in type (Number, String) with no factory.\n *\n * @group Errors\n */\nexport class CannotInstantiateBuiltInError extends CannotInstantiateValueError {\n    get message() {\n        return super.message + ` If your service requires built-in or unresolvable types, please use a factory.`;\n    }\n}\n//# sourceMappingURL=cannot-instantiate-builtin-error.js.map","import { EMPTY_VALUE } from './empty.const';\n/**\n * An object containing default values for services.\n * @ignore @internal\n *\n * @remarks\n * This can then be merged in to passed-in services to provide them  with\n * default configuration where an option has not been explicitly specified.\n */\nexport const SERVICE_METADATA_DEFAULTS = {\n    multiple: false,\n    eager: false,\n    scope: 'container',\n    value: EMPTY_VALUE,\n    factory: undefined,\n};\n//# sourceMappingURL=service-defaults.const.js.map","/**\n * A stamp signifying that an object is a `LazyReference`.\n * @ignore @internal\n */\nexport const LAZY_REFERENCE = Symbol('LAZY_REFERENCE');\n/**\n * A stamp signifying that an object is a `InjectedFactory`.\n * @ignore @internal\n */\nexport const INJECTED_FACTORY = Symbol('INJECTED_FACTORY');\n//# sourceMappingURL=type-stamps.const.js.map","import { Token } from '../token.class';\nimport { isInjectedFactory } from './is-inject-identifier.util';\nimport { isLazyReference } from './is-lazy-reference.util';\n/**\n * Helper function used in the injection-related decorators to resolve the received identifier to\n * an eager type when possible or to a lazy type when cyclic dependencies are possibly involved.\n *\n * @param typeOrIdentifier a service identifier or a function returning a type acting as service identifier or nothing\n * @param target the class definition of the target of the decorator\n */\nexport function resolveToTypeWrapper(typeOrIdentifier) {\n    /**\n     * ? We want to error out as soon as possible when looking up services to inject, however\n     * ? we cannot determine the type at decorator execution when cyclic dependencies are involved\n     * ? because calling the received `() => MyType` function right away would cause a JS error:\n     * ? \"Cannot access 'MyType' before initialization\", so we need to execute the function in the handler,\n     * ? when the classes are already created. To overcome this, we use a wrapper:\n     * ?  - the lazyType is executed in the handler so we never have a JS error\n     * ?  - the eagerType is checked when decorator is running and an error is raised if an unknown type is encountered\n     */\n    let typeWrapper;\n    /** If requested type is explicitly set via a string ID or token, we set it explicitly. */\n    if (typeOrIdentifier &&\n        (typeof typeOrIdentifier === 'string' ||\n            typeOrIdentifier instanceof Token ||\n            typeof typeOrIdentifier === 'function')) {\n        typeWrapper = { eagerType: typeOrIdentifier, lazyType: () => typeOrIdentifier, isFactory: false };\n    }\n    else if (typeof typeOrIdentifier === 'object' && isInjectedFactory(typeOrIdentifier)) {\n        /** If requested type is an injected factory, we set it explicitly. */\n        typeWrapper = { eagerType: null, factory: typeOrIdentifier, isFactory: true };\n    }\n    else if (typeOrIdentifier && isLazyReference(typeOrIdentifier)) {\n        /** If requested type is explicitly set via a LazyReference, we set it explicitly. */\n        /** We set eagerType to null, preventing the raising of the CannotInjectValueError in decorators.  */\n        typeWrapper = { eagerType: null, lazyType: () => typeOrIdentifier.get(), isFactory: false };\n    }\n    return typeWrapper;\n}\n//# sourceMappingURL=resolve-to-type-wrapper.util.js.map","import { INJECTED_FACTORY } from '../constants/type-stamps.const';\n/** Check if the specified object is an InjectedFactory. */\nexport function isInjectedFactory(x) {\n    return x[INJECTED_FACTORY] === true;\n}\n//# sourceMappingURL=is-inject-identifier.util.js.map","import { LAZY_REFERENCE } from '../constants/type-stamps.const';\nexport function isLazyReference(x) {\n    return x[LAZY_REFERENCE] === true;\n}\n//# sourceMappingURL=is-lazy-reference.util.js.map","import { resolveToTypeWrapper } from './resolve-to-type-wrapper.util';\nexport function wrapDependencyAsResolvable(dependency) {\n    let constraints;\n    let typeWrapper;\n    if (Array.isArray(dependency)) {\n        /** The dependency is a [ID, options] pair. Let's parse it as such. */\n        const [id, options] = dependency;\n        /** Perform some very basic sanity checking on the pair. */\n        if (id == null || options == null) {\n            // TODO: make this more descriptive\n            throw Error('The dependency pair was not instantiated correctly.');\n        }\n        if (typeof options === 'number') {\n            constraints = options;\n        }\n        typeWrapper = resolveToTypeWrapper(id);\n    }\n    else {\n        /** The dependency is an injectable identifier. */\n        typeWrapper = resolveToTypeWrapper(dependency);\n    }\n    return {\n        constraints,\n        typeWrapper,\n    };\n}\n//# sourceMappingURL=wrap-resolvable-dependency.js.map","import { Token } from '../token.class';\n/**\n * A special identifier which can be used to get the container\n * the service is currently being executed under.\n *\n * @example\n * Here is an example:\n * ```ts\n * @Service([\n *   HostContainer()\n * ])\n * class MyService {\n *   constructor (private container: ContainerInstance) { }\n * }\n * ```\n *\n * @see {@link HostContainer}\n */\nexport const HOST_CONTAINER = new Token('Host Container');\n//# sourceMappingURL=host-container.const.js.map","import { defaultContainer } from './container-instance.class';\n/**\n * A collection of individual visitor objects, combined into a collection.\n * This class implements the {@link ContainerTreeVisitor} interface\n * (modulo {@link ContainerTreeVisitor.visitContainer}).\n *\n * When an event is dispatched upon the collection, all attached\n * visitors will be notified in the order in which they were\n * added to the collection.\n * @experimental\n *\n * @example\n * ```ts\n * const collection = new VisitorCollection();\n *\n * // Add our visitor to the collection.\n * collection.addVisitor(new MyVisitor());\n *\n * // Dispatch an event onto the collection,\n * // which will be broadcast to all attached visitors.\n * collection.visitChildContainer(Container.ofChild('hello'));\n * ```\n *\n * @group Tree Visitors\n */\nexport class VisitorCollection {\n    constructor() {\n        /** Whether the instance is disposed. */\n        this.disposed = false;\n        /** The visitors stored within the collection. */\n        this.visitors = [];\n        /**\n         * A flag stating whether any visitors are currently present in the collection.\n         * If not, all notifications will be ignored.\n         *\n         * This is mostly for optimisation.\n         */\n        this.anyVisitorsPresent = false;\n    }\n    /**\n     * A flag which states whether any visitors should be notified.\n     * If the collection has been disposed or no visitors are present,\n     * this evaluates to `false`.\n     */\n    get notifyVisitors() {\n        return !this.disposed && this.anyVisitorsPresent;\n    }\n    /**\n     * Iterate the list of visitors, excluding any which have been disposed.\n     * Does not perform any iteration if no visitors are present.\n     *\n     * @param callback A function to call for each visitor in the collection.\n     */\n    forEach(callback) {\n        if (this.notifyVisitors) {\n            this.visitors.forEach(visitor => {\n                /** If the visitor has been disposed since the last iteration, free it from the store. */\n                if (visitor.disposed) {\n                    this.removeVisitor(visitor);\n                    return;\n                }\n                /** Disposed visitors should not be notified. */\n                callback(visitor);\n            });\n        }\n    }\n    visitChildContainer(child) {\n        this.forEach(visitor => visitor.visitChildContainer?.(child));\n    }\n    visitOrphanedContainer(container) {\n        this.forEach(visitor => visitor.visitOrphanedContainer?.(container));\n    }\n    visitNewService(serviceOptions) {\n        this.forEach(visitor => visitor.visitNewService?.(serviceOptions));\n    }\n    visitRetrieval(identifier, options) {\n        this.forEach(visitor => visitor.visitRetrieval?.(identifier, options));\n    }\n    /**\n     * Add a visitor to the collection.\n     * @experimental\n     *\n     * @param visitor The visitor to append to the collection.\n     * @param container The container to initialise the container on.\n     */\n    addVisitor(visitor, container) {\n        /** If the visitor is already present, do not add another. */\n        if (this.visitors.includes(visitor)) {\n            return false;\n        }\n        if ('visitOrphanedContainer' in visitor && container !== defaultContainer) {\n            /**\n             * Orphaned container events are only dispatched on the default container.\n             * Therefore, we need to create a proxy that forwards this event from the\n             * default container to this visitor.\n             */\n            VisitorCollection.forwardOrphanedContainerEvents(visitor);\n        }\n        this.visitors.push(visitor);\n        /**\n         * Mark the collection as having visitors present, so\n         * it doesn't ignore any events passed to it.\n         */\n        if (!this.anyVisitorsPresent) {\n            this.anyVisitorsPresent = true;\n        }\n        /**\n         * Directly call the visitor's \"visitContainer\" method\n         * to initialise it upon the given container.\n         *\n         * Implementation detail: We don't provide any sort of protection against\n         * this being called again on a different container.\n         * The visitor would be able to handle that themselves, as the API states\n         * that any call to `visitContainer` means that the visitor was added\n         * to a container.\n         */\n        const isAllowedToAttachVisitor = visitor.visitContainer?.(container);\n        /**\n         * If a false-y return value was returned to signal that the visitor\n         * should not be attached to the given container, immediately remove it.\n         */\n        if (!isAllowedToAttachVisitor) {\n            this.removeVisitor(visitor);\n            return false;\n        }\n        return true;\n    }\n    /**\n     * Remove a visitor from the collection,\n     * if it was already present.\n     * @experimental\n     *\n     * @param visitor The visitor to remove from the collection.\n     */\n    removeVisitor(visitor) {\n        const indexOfVisitor = this.visitors.indexOf(visitor);\n        if (indexOfVisitor === -1) {\n            return false;\n        }\n        /** Remove the element from the array via \"splice\". */\n        this.visitors.splice(indexOfVisitor, 1);\n        /** Re-evalute the length of the visitors array and recompute anyVisitorsPresent. */\n        if (this.visitors.length === 0) {\n            this.anyVisitorsPresent = false;\n        }\n        return true;\n    }\n    /**\n     * Forward any orphaned container events to the visitor\n     * through a proxy visitor attached to the default container.\n     *\n     * This is used when a visitor implements the {@link ContainerTreeVisitor.visitOrphanedContainer}\n     * handler, but the visitor was attached to a non-default container instance.\n     */\n    static forwardOrphanedContainerEvents(upstreamVisitor) {\n        const proxyVisitor = {\n            get disposed() {\n                return upstreamVisitor.disposed;\n            },\n            dispose() {\n                /** Should we forward the dispose upstream here? */\n                this.disposed = true;\n            },\n            visitOrphanedContainer(container) {\n                if (!this.disposed) {\n                    upstreamVisitor.visitOrphanedContainer?.(container);\n                }\n            },\n            visitContainer(container) {\n                return container === defaultContainer;\n            },\n        };\n        return defaultContainer.acceptTreeVisitor(proxyVisitor);\n    }\n    dispose() {\n        /** Prevent duplicate calls to dispose. */\n        if (this.disposed) {\n            return;\n        }\n        this.disposed = true;\n        /** Notify all containers of disposal. */\n        // eslint-disable-next-line @typescript-eslint/no-misused-promises -- who cares??\n        this.forEach(visitor => visitor.dispose());\n    }\n}\n//# sourceMappingURL=visitor-collection.class.js.map","import { ContainerRegistry } from './container-registry.class';\nimport { ServiceNotFoundError } from './error/service-not-found.error';\nimport { CannotInstantiateValueError } from './error/cannot-instantiate-value.error';\nimport { Token } from './token.class';\nimport { EMPTY_VALUE } from './constants/empty.const';\nimport { BUILT_INS } from './constants/builtins.const';\nimport { CannotInstantiateBuiltInError } from './error/cannot-instantiate-builtin-error';\nimport { SERVICE_METADATA_DEFAULTS } from './constants/service-defaults.const';\nimport { wrapDependencyAsResolvable } from './utils/wrap-resolvable-dependency';\nimport { HOST_CONTAINER } from './constants/host-container.const';\nimport { VisitorCollection } from './visitor-collection.class';\n/**\n * A static variable containing \"throwIfDisposed\".\n *\n * @example\n * ```ts\n * this[THROW_IF_DISPOSED]();\n * ```\n *\n * This is done instead of:\n *\n * ```ts\n * this.throwIfDisposed();\n * ```\n *\n * The former version reduces the bundle size, as the variable name can be mangled safely.\n */\nconst THROW_IF_DISPOSED = 'throwIfDisposed';\n/**\n * A list of IDs which, when passed to `.has`, always return true.\n *\n * This is used to facilitate the implementation of virtual tokens such as\n * HostContainer which are not actually present in the container.\n *\n * In these situations, returning `false` on a .has check would not be spec-compliant,\n * and would expose internal implementation details regarding the container.\n */\nconst ALWAYS_RESOLVABLE = [\n    /**\n     * Provide compatibility with the `HostContainer()` API.\n     */\n    HOST_CONTAINER,\n];\n/**\n * An instance of a TypeDI container.\n *\n * A container allows you to get, set, and modify dependencies in-place.\n * You can also attach individual services to a container, using them\n * to store services for later execution.\n *\n * @example\n * ```ts\n * const container = defaultContainer.ofChild('my-new-container');\n *\n * @Service({ container })\n * class MyService { }\n * ```\n */\nexport class ContainerInstance {\n    /**\n     * Create a ContainerInstance.\n     *\n     * @param id The ID of the container to create.\n     * @param parent The parent of the container to create.\n     * The parent is used for resolving identifiers which are\n     * not present in this container.\n     */\n    constructor(id, parent) {\n        this.parent = parent;\n        /** Metadata for all registered services in this container. */\n        this.metadataMap = new Map();\n        /**\n         * Services registered with 'multiple: true' are saved as simple services\n         * with a generated token and the mapping between the original ID and the\n         * generated one is stored here. This is handled like this to allow simplifying\n         * the inner workings of the service instance.\n         */\n        this.multiServiceIds = new Map();\n        /**\n         * Indicates if the container has been disposed or not.\n         * Any function call should fail when called after being disposed.\n         */\n        this.disposed = false;\n        /**\n         * The currently-present visitors attached to the container.\n         * These are conjoined into a container of individual visitors,\n         * which implements the standard ContainerTreeVisitor interface,\n         * and individual listeners can be added and removed at will.\n         *\n         * @see {@link ContainerTreeVisitor}\n         * @see {@link VisitorCollection}\n         */\n        this.visitor = new VisitorCollection();\n        /**\n         * Whether the container is currently retrieving an identifier\n         * which visitors should not be notified of.\n         *\n         * This is used to prevent {@link ContainerInstance.getManyOrNull}\n         * from notifying visitors that it is retrieving a masked token,\n         * which is used to store services of `{ multiple: true }`.\n         */\n        this.isRetrievingPrivateToken = false;\n        this.id = id;\n    }\n    /**\n     * Checks if the service with given name or type is registered service container.\n     * Optionally, parameters can be passed in case if instance is initialized in the container for the first time.\n     *\n     * If recursive mode is enabled, the symbol is not available locally, and we have a parent,\n     * we tell the parent to search its tree recursively too.\n     * If the container tree is substantial, this operation may affect performance.\n     *\n     * @param identifier The identifier of the service to look up.\n     *\n     * @returns Whether the identifier is present in the current container, or its parent.\n     *\n     * @throws Error\n     * This exception is thrown if the container has been disposed.\n     */\n    has(identifier, recursive = true) {\n        this[THROW_IF_DISPOSED]();\n        if (ALWAYS_RESOLVABLE.includes(identifier)) {\n            return true;\n        }\n        const location = this.getIdentifierLocation(identifier);\n        if (recursive && location === \"parent\" /* ServiceIdentifierLocation.Parent */) {\n            return true;\n        }\n        return location === \"local\" /* ServiceIdentifierLocation.Local */;\n    }\n    /**\n     * Return the location of the given identifier.\n     * If recursive mode is enabled, the symbol is not available locally, and we have a parent,\n     * we tell the parent to search its tree recursively too.\n     * If the container tree is substantial, this operation may affect performance.\n     *\n     * @param identifier The identifier of the service to look up.\n     *\n     * @returns A {@link ServiceIdentifierLocation}.\n     *  - If the identifier cannot be found, {@link ServiceIdentifierLocation.None | None}.\n     *  - If the identifier is found locally, {@link ServiceIdentifierLocation.Local | Local}.\n     *  - If the identifier is found upstream, {@link ServiceIdentifierLocation.Parent | Parent}.\n     *\n     * @throws Error\n     * This exception is thrown if the container has been disposed.\n     */\n    getIdentifierLocation(identifier) {\n        this[THROW_IF_DISPOSED]();\n        if (this.metadataMap.has(identifier) || this.multiServiceIds.has(identifier)) {\n            return \"local\" /* ServiceIdentifierLocation.Local */;\n        }\n        // If we have a parent container, see if that has the identifier.\n        // todo: should we always use true here?\n        if (this.parent && this.parent.has(identifier, true)) {\n            return \"parent\" /* ServiceIdentifierLocation.Parent */;\n        }\n        return \"none\" /* ServiceIdentifierLocation.None */;\n    }\n    /**\n     * Get the value for the identifier in the current container.\n     * If the identifier cannot be resolved locally, the parent tree\n     * (if present) is recursively searched until a match is found\n     * (or the tree is exhausted).\n     *\n     * @param identifier The identifier to get the value of.\n     *\n     * @returns The value of the identifier in the current scope.\n     *\n     * @throws ServiceNotFoundError\n     * This exception is thrown if the identifier cannot be found in the tree.\n     *\n     * @throws Error\n     * This exception is thrown if the container has been disposed.\n     */\n    get(identifier, recursive) {\n        const response = this.getOrNull(identifier, recursive);\n        if (response === null) {\n            throw new ServiceNotFoundError(identifier);\n        }\n        return response;\n    }\n    /**\n     * Resolve the metadata for the given identifier.  Returns null if no metadata could be found.\n     *\n     * @param identifier The identifier to resolve metadata for.\n     * @param recursive Whether the lookup operation is recursive.\n     *\n     * @returns\n     * If the identifier is found, a tuple is returned consisting of the following:\n     *   1. The metadata for the given identifier, if found.\n     *   2. The location from where the metadata was returned.\n     *   {@link ServiceIdentifierLocation.Parent} is returned if the identifier was found upstream.\n     *\n     * If an identifier cannot be found, `null` is returned.\n     *\n     * @throws Error\n     * This exception is thrown if the container has been disposed.\n     */\n    resolveMetadata(identifier, recursive) {\n        this[THROW_IF_DISPOSED]();\n        /**\n         * Firstly, ascertain the location of the identifier.\n         * If it is located on the parent, we shall yield to the parent's .get.\n         */\n        const location = this.getIdentifierLocation(identifier);\n        switch (location) {\n            case \"none\" /* ServiceIdentifierLocation.None */:\n                return null;\n            case \"local\" /* ServiceIdentifierLocation.Local */:\n                return [this.metadataMap.get(identifier), location];\n            case \"parent\" /* ServiceIdentifierLocation.Parent */:\n                /** Don't perform any parent lookups if we're not recursively scanning the tree. */\n                if (recursive) {\n                    /**\n                     * Unpack the possibly-resolved metadata object from the parent.\n                     * We don't directly return the parent's resolveMetadata call here as that would\n                     * return \"ServiceIdentifierLocation.Local\" if it was resolved on the parent.\n                     */\n                    const possibleResolution = this.parent?.resolveMetadata(identifier, true);\n                    return possibleResolution ? [possibleResolution[0], \"parent\" /* ServiceIdentifierLocation.Parent */] : null;\n                }\n                return null;\n        }\n    }\n    /**\n     * Retrieves the service with given name or type from the service container.\n     * Optionally, parameters can be passed in case if instance is initialized in the container for the first time.\n     *\n     * @param identifier The identifier to get the value of.\n     *\n     * @returns The resolved value for the given metadata, or `null` if it could not be found.\n     *\n     * @throws Error\n     * This exception is thrown if the container has been disposed.\n     */\n    getOrNull(identifier, recursive = true) {\n        this[THROW_IF_DISPOSED]();\n        /**\n         * Use the internal flag as a guide to whether we should\n         * notify visitors of this retrieval.\n         */\n        const notifyVisitors = !this.isRetrievingPrivateToken;\n        const partialVisitRetrievalOptions = { recursive, many: false };\n        /**\n         * Provide compatibility with the `HostContainer()` API.\n         */\n        if (identifier === HOST_CONTAINER) {\n            if (notifyVisitors) {\n                this.visitor.visitRetrieval(identifier, {\n                    ...partialVisitRetrievalOptions,\n                    location: \"local\" /* ServiceIdentifierLocation.Local */,\n                });\n            }\n            return this;\n        }\n        const maybeResolvedMetadata = this.resolveMetadata(identifier, recursive);\n        if (maybeResolvedMetadata === null) {\n            if (notifyVisitors) {\n                /** Notify our listeners that the identifier wasn't found. */\n                this.visitor.visitRetrieval(identifier, {\n                    ...partialVisitRetrievalOptions,\n                    location: \"none\" /* ServiceIdentifierLocation.None */,\n                });\n            }\n            return null;\n        }\n        /**\n         * At this point, we have narrowed the location of the identifier\n         * down to ServiceIdentifierLocation.Local.\n         * Therefore, the symbol exists locally.\n         *\n         * To preserve compatibility with TypeDI, if the identifier exists on\n         * the parent but not locally, we still treat it as if it were resolved locally.\n         */\n        const [baseMetadata, location] = maybeResolvedMetadata;\n        const isUpstreamMetadata = location === \"parent\" /* ServiceIdentifierLocation.Parent */;\n        /**\n         * To preserve compatibility with TypeDI, if the identifier metadata was loaded\n         * from the parent, we then import it into this container.\n         * The objects are also cloned to prevent mutations from affecting this instance.\n         * <https://github.com/typestack/typedi/blob/8da3ef286299bca6bd7ddf4082268f422f700630/src/container-instance.class.ts#L94>\n         */\n        if (isUpstreamMetadata) {\n            let value;\n            /**\n             * If the type cannot be reconstructed  (i.e. it's a static value, possibly set via\n             * {@link ContainerInstance.setValue}), do not erase the type in the new metadata.\n             *\n             * Furthermore, do not erase the value if the imported service is a singleton.\n             * This mirrors the behaviour of the prior implementation.\n             */\n            const isReconstructable = baseMetadata.factory != null || baseMetadata.type != null;\n            if (!isReconstructable || baseMetadata.scope === 'singleton') {\n                value = baseMetadata.value;\n            }\n            else {\n                value = EMPTY_VALUE;\n            }\n            const newServiceMetadata = {\n                ...baseMetadata,\n                /**\n                 * If the service is a singleton, we'll import its value directly into this container.\n                 * Otherwise, we set the value to the well-known placeholder.\n                 */\n                value,\n            };\n            /**\n             * If the service is a singleton, return it directly from the global container.\n             * We can safely assume it exists there.\n             */\n            if (newServiceMetadata.scope === 'singleton') {\n                return defaultContainer.getOrNull(identifier, recursive);\n            }\n            /**\n             * If it's not a singleton, import it into the current container,\n             * and then recursively call .getOrNull which takes the local path\n             * instead of dealing with upstream metadata.\n             */\n            const newServiceID = this.set(newServiceMetadata, [...baseMetadata.dependencies]);\n            /**\n             * Cache the value in a variable so we're able to wrap the call in the\n             * {@link ContainerInstance.isRetrievingPrivateToken} flag to prevent\n             * notifying visitors.\n             */\n            this.isRetrievingPrivateToken = true;\n            const resolvedValue = this.getOrNull(newServiceID, recursive);\n            /** Reset the flag to its original value. */\n            this.isRetrievingPrivateToken = false;\n            this.visitor.visitRetrieval(identifier, {\n                ...partialVisitRetrievalOptions,\n                location: \"parent\" /* ServiceIdentifierLocation.Parent */,\n            });\n            return resolvedValue;\n        }\n        /**\n         * Notify our listeners that the identifier was found.\n         * We do this *after* the above importing code as otherwise, we would have to\n         * set the {@link ContainerInstance.isRetrievingPrivateToken} flag.\n         */\n        if (notifyVisitors) {\n            this.visitor.visitRetrieval(identifier, {\n                ...partialVisitRetrievalOptions,\n                location,\n            });\n        }\n        let metadata = baseMetadata;\n        /** Firstly, we shall check if the service is a singleton.  If it is, load it from the global registry. */\n        if (baseMetadata?.scope === 'singleton') {\n            metadata = defaultContainer.metadataMap.get(identifier);\n        }\n        /** This should never happen as multi services are masked with custom token in Container.set. */\n        if (metadata && metadata.multiple === true) {\n            /* istanbul ignore next */\n            throw Error(`Cannot resolve multiple values for ${identifier.toString()} service!`);\n        }\n        /** Otherwise it's returned from the current / parent container. */\n        if (metadata) {\n            return this.getServiceValue(metadata);\n        }\n        return null;\n    }\n    /**\n     * Gets all instances registered in the container of the given service identifier.\n     * Used when service are defined with the `{ multiple: true }` option.\n     *\n     * @example\n     * ```ts\n     * Container.set({ id: 'key', value: 1, dependencies: [ ], multiple: true });\n     * Container.set({ id: 'key', value: 2, dependencies: [ ], multiple: true });\n     * Container.set({ id: 'key', value: 3, dependencies: [ ], multiple: true });\n     *\n     * const [one, two, three] = Container.getMany('key');\n     * ```\n     *\n     * @param identifier The identifier to resolve.\n     *\n     * @returns An array containing the service instances for the given\n     * identifier.\n     *\n     * @throws ServiceNotFoundError\n     * This exception is thrown if a value could not be found for the given identifier.\n     *\n     * @throws Error\n     * This exception is thrown if the container has been disposed.\n     */\n    getMany(identifier, recursive) {\n        const response = this.getManyOrNull(identifier, recursive);\n        if (response === null) {\n            throw new ServiceNotFoundError(identifier);\n        }\n        return response;\n    }\n    /**\n     * Gets all instances registered in the container of the given service identifier.\n     * Used when service are defined with the `{ multiple: true }` option.\n     *\n     * @example\n     * Here's an example:\n     * ```ts\n     * assert(container.getManyOrNull(UNKNOWN_TOKEN) === null);\n     * assert(Array.isArray(container.getManyOrNull(KNOWN_TOKEN)));\n     * ```\n     *\n     * @param identifier The identifier to resolve.\n     *\n     * @see {@link ContainerInstance.getMany}\n     *\n     * @returns An array containing the service instances for the given identifier.\n     * If none can be found, `null` is returned.\n     *\n     * @throws Error\n     * This exception is thrown if the container has been disposed.\n     */\n    getManyOrNull(identifier, recursive = true) {\n        this[THROW_IF_DISPOSED]();\n        let idMap = undefined;\n        let location = \"none\" /* ServiceIdentifierLocation.None */;\n        if (!this.multiServiceIds.has(identifier)) {\n            /** If this container has no knowledge of the identifier, then we check the parent (if we have one). */\n            if (recursive && this.parent && this.parent.multiServiceIds.has(identifier)) {\n                /** It looks like it does! Let's use that instead. */\n                idMap = this.parent.multiServiceIds.get(identifier);\n                location = \"parent\" /* ServiceIdentifierLocation.Parent */;\n            }\n        }\n        else {\n            idMap = this.multiServiceIds.get(identifier);\n            if (idMap) {\n                location = \"local\" /* ServiceIdentifierLocation.Local */;\n            }\n        }\n        /** Notify listeners we have retrieved a service. */\n        this.visitor.visitRetrieval(identifier, {\n            recursive,\n            many: true,\n            location,\n        });\n        /** If no IDs could be found, return null. */\n        if (!idMap) {\n            return null;\n        }\n        const isRetrievingSingleton = idMap.scope === 'singleton';\n        const targetContainer = isRetrievingSingleton ? defaultContainer : this;\n        /**\n         * Prevent {@link ContainerInstance.getOrNull} from notifying\n         * visitors that we are retrieving a masked token.\n         */\n        targetContainer.isRetrievingPrivateToken = true;\n        /**\n         * If the service is registered as a singleton, we load it from the global container.\n         * Otherwise, the local registry is used.\n         */\n        const subject = (generatedId) => targetContainer.get(generatedId, targetContainer === defaultContainer ? undefined : recursive);\n        const mapped = idMap.tokens.map(subject);\n        /** Restore the flag we set above to its original value. */\n        targetContainer.isRetrievingPrivateToken = false;\n        return mapped;\n    }\n    set(serviceOptions, precompiledDependencies) {\n        this.throwIfDisposed();\n        /**\n         * Check if the identifier being set is a virtual one,\n         * such as HostContainer.\n         * If so, we can't reasonably allow this service to be set.\n         */\n        if (ALWAYS_RESOLVABLE.includes(serviceOptions.id)) {\n            throw Error('Virtual identifiers can not be overriden.');\n        }\n        /**\n         * If the service is marked as singleton, we set it in the default container.\n         * (And avoid an infinite loop via checking if we are in the default container or not.)\n         */\n        if (serviceOptions['scope'] === 'singleton' && defaultContainer !== this) {\n            /**\n             * 1. The (as any) cast above is for performance: why bother putting the arguments\n             * together if we can very quickly determine if the argument is of type object?\n             * If we did this return below, we'd be wasting a newly-constructed object, PLUS\n             * a few function calls to helpers like resolveToTypeWrapper.\n             *\n             * 2. Below, we trick TypeScript into thinking we're using the 1st overload here.\n             * However, we haven't actually checked the types of each argument.\n             * This is, of course, left to ContainerInstance#set.\n             */\n            // todo: should we really be binding to defaultContainer here?\n            return defaultContainer.set(serviceOptions, precompiledDependencies);\n        }\n        /**\n         * The dependencies of the object are either delivered in a pre-compiled list of TypeWrapper objects (from @Service),\n         * or from the dependencies list of the service options object, which must then be compiled to a list of type wrappers.\n         */\n        const dependencies = precompiledDependencies ??\n            serviceOptions?.dependencies?.map(wrapDependencyAsResolvable) ??\n            [];\n        const newMetadata = {\n            /**\n             * Typescript cannot understand that if ID doesn't exists then type must exists based on the\n             * typing so we need to explicitly cast this to a `ServiceIdentifier`\n             */\n            id: (serviceOptions.id ?? serviceOptions.type),\n            type: null,\n            ...SERVICE_METADATA_DEFAULTS,\n            /** We allow overriding the above options via the received config object. */\n            ...serviceOptions,\n            // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n            /**\n             * We override the service options with the provided dependencies here, as if we have type wrapped\n             * dependencies only, we'll obviously want to overwrite anything in the options with those.\n             * Additionally, this fixes test cases such as #151.\n             */\n            /** @ts-ignore TypeScript is actually broken here. We've told it dependencies is of type TypeWrapper[], but it still doesn't like it? */\n            dependencies: dependencies,\n        };\n        this.visitor.visitNewService(newMetadata);\n        /** If the incoming metadata is marked as multiple we mask the ID and continue saving as single value. */\n        if (newMetadata.multiple) {\n            const maskedToken = new Token(`MultiMaskToken-${newMetadata.id.toString()}`);\n            const existingMultiGroup = this.multiServiceIds.get(newMetadata.id);\n            if (existingMultiGroup) {\n                existingMultiGroup.tokens.push(maskedToken);\n            }\n            else {\n                this.multiServiceIds.set(newMetadata.id, { scope: newMetadata.scope, tokens: [maskedToken] });\n            }\n            /**\n             * We mask the original metadata with this generated ID, mark the service\n             * as  and continue multiple: false and continue. Marking it as\n             * non-multiple is important otherwise Container.get would refuse to\n             * resolve the value.\n             */\n            newMetadata.id = maskedToken;\n            newMetadata.multiple = false;\n        }\n        // todo: sort this out\n        // I've removed the legacy \"extend service if it already exists\"\n        // behaviour for now.\n        // const existingMetadata = this.metadataMap.get(newMetadata.id);\n        /** This service hasn't been registered yet, so we register it. */\n        this.metadataMap.set(newMetadata.id, newMetadata);\n        /**\n         * If the service is eager, we need to create an instance immediately except\n         * when the service is also marked as transient. In that case we ignore\n         * the eager flag to prevent creating a service what cannot be disposed later.\n         */\n        if (newMetadata.eager && newMetadata.scope !== 'transient') {\n            this.get(newMetadata.id);\n        }\n        return newMetadata.id;\n    }\n    /**\n     * Add a value to the container.\n     *\n     * @example\n     * ```ts\n     * // We can simplify this:\n     * Container.set({ id: 'key', value: 'test', dependencies: [ ] });\n     * // To this:\n     * Container.setValue('key', 'test');\n     * ```\n     *\n     * @param id The ID of the new value to set inside the container.\n     * Must be either a string or a Token.\n     *\n     * @param value The value to set the ID to.\n     *\n     * @returns The identifier of the given service in the container.\n     * This can then be passed to {@link ContainerInstance.get | .get} to resolve the identifier.\n     */\n    setValue(id, value) {\n        if (typeof id !== 'string' && !(id instanceof Token)) {\n            throw Error('The ID passed to setValue must either be a string or a Token.');\n        }\n        return this.set({ id, value }, []);\n    }\n    /**\n     * Removes services with the given list of service identifiers.\n     *\n     * @param identifierOrIdentifierArray The list of service identifiers to remove from the container.\n     *\n     * @example\n     * Here's an example:\n     * ```ts\n     * const NAME = new Token<string>();\n     *\n     * // Set a new identifier in the container:\n     * defaultContainer.setValue(NAME, 'Joanna');\n     * assert(defaultContainer.get(NAME) === 'Joanna');\n     *\n     * // Now remove it, making the container forget it ever existed:\n     * defaultContainer.remove(NAME);\n     * assert(defaultContainer.getOrNull(NAME) === null);\n     * ```\n     *\n     * @returns The current {@link ContainerInstance} instance.\n     *\n     * @throws Error\n     * This exception is thrown if the container has been disposed.\n     */\n    remove(identifierOrIdentifierArray) {\n        this[THROW_IF_DISPOSED]();\n        if (Array.isArray(identifierOrIdentifierArray)) {\n            identifierOrIdentifierArray.forEach(id => this.remove(id));\n        }\n        else {\n            const serviceMetadata = this.metadataMap.get(identifierOrIdentifierArray);\n            if (serviceMetadata) {\n                this.disposeServiceInstance(serviceMetadata);\n                this.metadataMap.delete(identifierOrIdentifierArray);\n            }\n        }\n        return this;\n    }\n    /**\n     * Gets a separate container instance for the given instance id.\n     * Optionally, a parent can be passed, which will act as an upstream resolver for the container.\n     *\n     * @remarks This is functionally equivalent to {@link ContainerInstance.of}.\n     * However, it allows container creation from a static interface.\n     *\n     * @example\n     * ```ts\n     * // Create a container which has the default container as its parent:\n     * ContainerInstance.of('my-new-container');\n     *\n     * // Create a container without a parent:\n     * ContainerInstance.of('my-new-container-without-a-parent', null);\n     *\n     * // Create a container with a separate container:\n     * ContainerInstance.of('my-new-special-container', myOtherContainer);\n     * ```\n     *\n     * @param containerId The ID of the container to resolve or create.  Defaults to \"default\".\n     * @param parent The parent of the container, or null to explicitly signal that one should not be provided.\n     * Defaults to the default container.\n     * @param options The options to supplement how the container is created.\n     *\n     * @see {@link CreateContainerOptions}\n     *\n     * @returns The newly-created {@link ContainerInstance}, or the pre-existing container with the same name\n     * if one already exists.\n     */\n    static of(containerId = 'default', parent = defaultContainer, options) {\n        if (containerId === 'default') {\n            return defaultContainer;\n        }\n        // todo: test parent= default arg\n        let container;\n        const conflictDefinition = options?.conflictDefinition ?? 'rejectAll';\n        /**\n         * If a conflict definition is passed without an accompanying strategy,\n         * we default to `throw`. This makes the API more consistent.\n         */\n        const onConflict = options?.onConflict ?? (options?.conflictDefinition ? 'throw' : 'returnExisting');\n        const onFree = options?.onFree ?? 'returnNew';\n        if (ContainerRegistry.hasContainer(containerId)) {\n            container = ContainerRegistry.getContainer(containerId);\n            /**\n             * Test whether the container matches according to the conflict\n             * definition given by the caller.\n             */\n            const containerMatches = conflictDefinition === 'allowSameParent'\n                ? container.parent === parent\n                : /**\n                   * To shave a few bytes off the output, we emit false here, as that should\n                   * always happen if the value is 'rejectAll' (and we've narrowed it to that).\n                   */\n                    false;\n            if (!containerMatches) {\n                /** Note: 'returnExisting' is deliberarely ignored here, as that is the default logic. */\n                if (onConflict === 'null') {\n                    /**\n                     * The cast here is correct.\n                     * TypeScript isn't smart enough to understand that, if 'onConflict' is 'null'\n                     * and the container already exists, we're allowed to return null to the caller.\n                     */\n                    return null;\n                }\n                else if (onConflict === 'throw') {\n                    throw Error(`A container with the specified name (\"${String(containerId)}\") already exists.`);\n                }\n            }\n        }\n        else {\n            if (onFree === 'null') {\n                /** As above: The cast here is correct. */\n                return null;\n            }\n            else if (onFree === 'throw') {\n                throw Error(`A container with the specified name (\"${String(containerId)}) does not already exist.`);\n            }\n            /**\n             * This is deprecated functionality, for now we create the container if it's doesn't exists.\n             * This will be reworked when container inheritance is reworked.\n             */\n            container = new ContainerInstance(containerId, parent ?? undefined);\n            if (parent === null) {\n                /**\n                 * To keep an understandable API surface, visitors attached to\n                 * the default container are notified of the new orphaned service here.\n                 * _Note: Orphaned container notifications are only sent for newly-created containers, not duplicate .of calls._\n                 */\n                defaultContainer.visitor.visitOrphanedContainer(container);\n            }\n            // todo: move this into ContainerInstance ctor\n            ContainerRegistry.registerContainer(container);\n        }\n        return container;\n    }\n    /**\n     * Gets a separate container instance for the given instance id.\n     *\n     * @param containerId The ID of the container to resolve or create.  Defaults to \"default\".\n     *\n     * @example\n     * ```\n     * const newContainer = Container.of('foo');\n     *\n     * @Service({ container: newContainer }, [])\n     * class MyService {}\n     * ```\n     *\n     * @returns The newly-created {@link ContainerInstance}, or the pre-existing container\n     * with the same name if one already exists.\n     */\n    of(containerId, options) {\n        // Todo: make this get the constructor at runtime to aid\n        // extension of the class.\n        /** _Note: The visitor API is not called here, as that is handled in the static method._ */\n        return ContainerInstance.of(containerId, defaultContainer, options);\n    }\n    /**\n     * Create a registry with the specified ID, with this instance as its parent.\n     *\n     * @param containerId The ID of the container to resolve or create.  Defaults to \"default\".\n     *\n     * @returns The newly-created {@link ContainerInstance}, or the pre-existing container\n     * with the same name if one already exists.\n     *\n     * @throws Error\n     * This exception is thrown if the container has been disposed.\n     */\n    ofChild(containerId, options) {\n        this[THROW_IF_DISPOSED]();\n        const newContainer = ContainerInstance.of(containerId, this, options);\n        if (newContainer) {\n            this.visitor.visitChildContainer(newContainer);\n        }\n        return newContainer;\n    }\n    /**\n     * Completely resets the container by removing all previously registered services from it.\n     *\n     * @throws Error\n     * This exception is thrown if the container has been disposed.\n     */\n    reset(options = {\n        strategy: \"resetValue\" /* ContainerResetStrategy.ResetValue */,\n    }) {\n        this[THROW_IF_DISPOSED]();\n        switch (options.strategy) {\n            case \"resetValue\" /* ContainerResetStrategy.ResetValue */:\n                this.metadataMap.forEach(service => this.disposeServiceInstance(service));\n                break;\n            case \"resetServices\" /* ContainerResetStrategy.ResetServices */:\n                this.metadataMap.forEach(service => this.disposeServiceInstance(service));\n                this.metadataMap.clear();\n                this.multiServiceIds.clear();\n                break;\n            default:\n                throw Error('Received invalid reset strategy.');\n        }\n        return this;\n    }\n    /**\n     * Dispose the container, rendering it unable to perform any further injection or storage.\n     *\n     * @remarks\n     * It is currently not advised to dispose of the default container.\n     * This would result in resolution issues in your application.\n     *\n     * @example\n     * ```ts\n     * const appContainer = Container.of('app');\n     *\n     * appContainer.dispose().then(\n     *   () => console.log('The container has been disposed.')\n     * );\n     *\n     * appContainer.disposed === true;\n     *\n     * // This will throw an error:\n     * appContainer.get(\n     *   new Token<unknown>('test')\n     * );\n     * ```\n     *\n     * @returns A promise that resolves when the disposal process is complete.\n     *\n     * @throws Error\n     * This exception is thrown if the container has been disposed.\n     */\n    async dispose() {\n        // eslint-disable-next-line @typescript-eslint/require-await\n        this[THROW_IF_DISPOSED]();\n        this.reset({ strategy: 'resetServices' });\n        /** We mark the container as disposed, forbidding any further interaction with it. */\n        this.disposed = true;\n        /** Also dispose visitors. */\n        this.visitor.dispose();\n    }\n    throwIfDisposed() {\n        if (this.disposed) {\n            // TODO: Use custom error.\n            throw Error('Cannot use container after it has been disposed.');\n        }\n    }\n    /**\n     * Gets the value belonging to passed in {@link ServiceMetadata} instance.\n     *\n     * @remarks\n     * - If {@link ServiceMetadata.value | serviceMetadata.value} is present, it is immediately returned.\n     * - Alternatively, the requested type is resolved to the appropriate value,\n     * which is then saved to {@link ServiceMetadata.value | serviceMetadata.value} and returned.\n     */\n    getServiceValue(serviceMetadata) {\n        let value = EMPTY_VALUE;\n        /**\n         * The \"serviceMetadata.factory\" property lookup is inlined into a variable here\n         * as its value will never change, and it reduces the final size of the bundle.\n         */\n        const { factory: factoryMeta } = serviceMetadata;\n        /**\n         * If the service value has been set to anything prior to this call we return that value.\n         * NOTE: This part builds on the assumption that transient dependencies has no value set ever.\n         */\n        if (serviceMetadata.value !== EMPTY_VALUE) {\n            return serviceMetadata.value;\n        }\n        /** If both factory and type is missing, we cannot resolve the requested ID. */\n        if (!factoryMeta && !serviceMetadata.type) {\n            throw new CannotInstantiateValueError(serviceMetadata.id);\n        }\n        /**\n         * If a factory is defined it takes priority over creating an instance via `new`.\n         * The return value of the factory is not checked, we believe by design that the user knows what he/she is doing.\n         */\n        if (factoryMeta) {\n            /**\n             * If we received the factory in the [Constructable<Factory>, \"functionName\"] format, we need to create the\n             * factory first and then call the specified function on it.\n             */\n            if (Array.isArray(factoryMeta)) {\n                const [factoryServiceId, factoryServiceMethod] = factoryMeta;\n                /** Try to get the factory from TypeDI first, if failed, fall back to simply initiating the class. */\n                const factoryInstance = this.getOrNull(factoryServiceId) ?? new factoryServiceId();\n                value = factoryInstance[factoryServiceMethod](this, serviceMetadata.id);\n            }\n            else {\n                /** If only a simple function was provided we simply call it. */\n                value = factoryMeta(this, serviceMetadata.id);\n            }\n        }\n        /**\n         * If no factory was provided and only then, we create the instance from the type if it was set.\n         */\n        if (!factoryMeta && serviceMetadata.type) {\n            const constructableTargetType = serviceMetadata.type;\n            const parameters = this.getConstructorParameters(serviceMetadata, true);\n            value = new constructableTargetType(...parameters);\n        }\n        /** If this is not a transient service, and we resolved something, then we set it as the value. */\n        if (serviceMetadata.scope !== 'transient' && value !== EMPTY_VALUE) {\n            serviceMetadata.value = value;\n        }\n        if (value === EMPTY_VALUE) {\n            /** This branch should never execute, but better to be safe than sorry. */\n            throw new CannotInstantiateValueError(serviceMetadata.id);\n        }\n        return value;\n    }\n    getConstructorParameters({ dependencies }, guardBuiltIns) {\n        /**\n         * Firstly, check if the metadata declares any dependencies.\n         */\n        if (dependencies.length === 0) {\n            return [];\n        }\n        /**\n         * We do not type-check the identifiers array here as we are the only ones\n         * aware of the reflective key.\n         * Therefore, it can be safely assumed that if the key is present, the correct\n         * data will also be present.\n         */\n        return dependencies.map(wrapper => this.resolveResolvable(wrapper));\n    }\n    /**\n     * Resolve a {@link Resolvable} object in the current container.\n     *\n     * @param resolvable The {@link Resolvable} to resolve.\n     *\n     * @returns The resolved value of the item.\n     */\n    resolveResolvable(resolvable) {\n        const identifier = this.resolveTypeWrapper(resolvable.typeWrapper);\n        if (resolvable.constraints) {\n            const { constraints } = resolvable;\n            let resolvedIdentifier;\n            /**\n             * For the individual bit flags, we don't care about the return from `&`.\n             * All that matters is that, if it doesn't return 0, the flag is activated.\n             *\n             * Implementation note: as an optimisation, we use double negative to cast\n             * the result to boolean instead of an explicit `Boolean` call here.\n             * To clarify, the \"!!\" does the *exact* same thing as `Boolean`.\n             */\n            const isOptional = !!(constraints & 2 /* ResolutionConstraintFlag.Optional */);\n            const isSkipSelf = !!(constraints & 4 /* ResolutionConstraintFlag.SkipSelf */);\n            const isSelf = !!(constraints & 8 /* ResolutionConstraintFlag.Self */);\n            const isMany = !!(constraints & 1 /* ResolutionConstraintFlag.Many */);\n            /** SkipSelf() and Self() are incompatible. */\n            if (isSkipSelf && isSelf) {\n                throw Error('SkipSelf() and Self() cannot be used at the same time.');\n            }\n            /** If SkipSelf is declared, make sure we actually *have* a parent. */\n            if (isSkipSelf && !this.parent) {\n                throw Error(`The SkipSelf() flag was enabled, but the subject container does not have a parent.`);\n            }\n            /**\n             * If SkipSelf() is provided, use the parent container for lookups instead.\n             * If not, we use the current container.\n             */\n            const targetContainer = isSkipSelf ? this.parent : this;\n            /** If Self() is used, do not use recursion. */\n            const recursive = !isSelf ?? undefined;\n            /**\n             * Set up some state registers for various flag configurations.\n             */\n            const identifierIsPresent = targetContainer.has(identifier, recursive);\n            /**\n             * Straight away, check if optional was declared.\n             * If it was not and the symbol was not found, throw an error.\n             * However, if it *was*, simply return `null` as expected.\n             */\n            if (!identifierIsPresent) {\n                if (isOptional) {\n                    return null;\n                }\n                throw new ServiceNotFoundError(identifier);\n            }\n            if (isMany) {\n                /** If we're in isMany mode, resolve the identifier via `getMany`. */\n                resolvedIdentifier = targetContainer.getMany(identifier, recursive);\n            }\n            else {\n                resolvedIdentifier = targetContainer.get(identifier, recursive);\n            }\n            return resolvedIdentifier;\n        }\n        /** If no constraints were found, fallback to default behaviour. */\n        return this.get(identifier);\n    }\n    resolveTypeWrapper(wrapper, guardBuiltIns = false) {\n        /**\n         * Reminder: The type wrapper is either resolvable to:\n         *   1. An eager type containing the id of the service, or...\n         *   2. A lazy type containing a function that must be called to resolve the id.\n         *\n         * Therefore, if the eager type does not exist, the lazy type should.\n         */\n        /** ESLint removes the cast, which causes a compilation error: */\n        // eslint-disable-next-line\n        const resolved = wrapper.eagerType ?? wrapper.lazyType?.();\n        if (resolved == null) {\n            throw Error(`The wrapped value could not be resolved.`);\n        }\n        if (guardBuiltIns && BUILT_INS.includes(resolved)) {\n            throw new CannotInstantiateBuiltInError(resolved?.name ?? resolved);\n        }\n        /**\n         * We also need to search the graph recursively.\n         * This is in-line with prior behaviour, ensuring that services\n         * from upstream containers can be resolved correctly.\n         */\n        return resolved;\n    }\n    /**\n     * Check if the given service is able to be destroyed and, if so, destroys it in-place.\n     * @deprecated\n     *\n     * @remarks\n     * If the service contains a method named `destroy`, it is called.\n     * However, the value it returns is ignored.\n     *\n     * @param serviceMetadata the service metadata containing the instance to destroy\n     * @param force when true the service will be always destroyed even if it's cannot be re-created\n     */\n    disposeServiceInstance(serviceMetadata, force = false) {\n        this[THROW_IF_DISPOSED]();\n        /** We reset value only if we can re-create it (aka type or factory exists). */\n        const shouldResetValue = force || !!serviceMetadata.type || !!serviceMetadata.factory;\n        if (shouldResetValue) {\n            /** If we wound a function named destroy we call it without any params. */\n            if (typeof (serviceMetadata?.value)['dispose'] === 'function') {\n                try {\n                    serviceMetadata.value.dispose();\n                }\n                catch (error) {\n                    /** We simply ignore the errors from the destroy function. */\n                }\n            }\n            serviceMetadata.value = EMPTY_VALUE;\n        }\n    }\n    /**\n     * Add a visitor to the container.\n     * @experimental\n     *\n     * @param visitor The visitor to add to this container.\n     *\n     * @see {@link ContainerTreeVisitor}\n     *\n     * @returns Whether the operation was successful.\n     */\n    acceptTreeVisitor(visitor) {\n        return this.visitor.addVisitor(visitor, this);\n    }\n    /**\n     * Remove a visitor from the container.\n     * No-op if the visitor was never attached to the container.\n     * @experimental\n     *\n     * @param visitor The visitor to remove from the container.\n     *\n     * @see {@link ContainerTreeVisitor}\n     *\n     * @returns Whether the operation was successful.\n     */\n    detachTreeVisitor(visitor) {\n        return this.visitor.removeVisitor(visitor);\n    }\n    /** Iterate over each service in the container. */\n    [Symbol.iterator]() {\n        return this.metadataMap.entries();\n    }\n}\n/**\n * The default global container. By default services are registered into this\n * container when registered via `Container.set()` or `@Service` decorator.\n */\nContainerInstance.defaultContainer = new ContainerInstance('default');\n/**\n * Keep a reference to the default container which we then utilise\n * in {@link ContainerInstance}.  This reduces the final size of the bundle,\n * as we are referencing a static variable instead of continuously\n * looking up a property.\n */\nnull;\nexport const { defaultContainer } = ContainerInstance;\n/**\n * Register the default container in ContainerRegistry.\n * We don't use `ContainerInstance.of` here we don't need to check\n * if a container with the \"default\" ID already exists: it never will.\n */\nContainerRegistry.registerContainer(defaultContainer);\n//# sourceMappingURL=container-instance.class.js.map","export function formatClassName(ctor) {\n    return String(ctor['name'] || ctor);\n}\n//# sourceMappingURL=format-class-name.js.map","import { ContainerInstance } from '../container-instance.class';\nimport { formatClassName } from '../utils/format-class-name';\nimport { SERVICE_METADATA_DEFAULTS } from '../constants/service-defaults.const';\nimport { BUILT_INS } from '../constants/builtins.const';\nimport { CannotInstantiateBuiltInError } from '../error/cannot-instantiate-builtin-error';\nimport { wrapDependencyAsResolvable } from '../utils/wrap-resolvable-dependency';\nimport { CannotInstantiateValueError } from '../error/cannot-instantiate-value.error';\nexport function Service(optionsOrDependencies, maybeDependencies) {\n    return targetConstructor => {\n        if (optionsOrDependencies == null || targetConstructor == null) {\n            // todo: more info in these error messages!!!\n            throw Error('The required configuration was not passed.');\n        }\n        /** A list of dependencies resolved from the arguments provided to the function. */\n        let resolvedDependencies;\n        if (Array.isArray(optionsOrDependencies)) {\n            /**\n             * If our first argument is an array, then the user has not specified any options,\n             * and has instead filled the slot with a list of dependencies.\n             */\n            resolvedDependencies = optionsOrDependencies;\n        }\n        else if (Array.isArray(maybeDependencies)) {\n            resolvedDependencies = maybeDependencies;\n        }\n        else if ('dependencies' in optionsOrDependencies) {\n            /**\n             * The first argument is of type `ServiceOptions<T>` with dependencies.\n             * We can access its \"dependencies\" property and then map the unwrapped types.\n             */\n            resolvedDependencies = optionsOrDependencies.dependencies;\n        }\n        if (!resolvedDependencies) {\n            /** At this point we have exhausted all options, so throw. */\n            throw Error('The dependencies provided were not able to be resolved.');\n        }\n        const wrappedDependencies = resolvedDependencies.map(wrapDependencyAsResolvable);\n        /**\n         * A default list of options for this service.\n         * These are used when the options are not explicitly provided to the function.\n         * However, if options are passed, these are merged in as defaults.\n         */\n        let metadata = {\n            id: targetConstructor,\n            type: targetConstructor,\n            ...SERVICE_METADATA_DEFAULTS,\n            container: ContainerInstance.defaultContainer,\n        };\n        if (!Array.isArray(optionsOrDependencies)) {\n            metadata = { ...metadata, ...optionsOrDependencies };\n            /**\n             * Remove the decorators from the options forcibly.\n             * Otherwise, our type-wrapped dependencies passed to ContainerInstance.set are ignored.\n             */\n            delete metadata.dependencies;\n        }\n        const { id, container } = metadata;\n        /**\n         * If the target is already registered, `@Service` has been called twice on the same constructor.\n         * Throw an error, as not doing so would raise ambiguity regarding the implementation.\n         * This is most likely user error, as the function should __never__ be called twice.\n         */\n        if (container.has(id) && !metadata.multiple) {\n            throw Error(`@Service() has been called twice upon ${formatClassName(targetConstructor)}, or you have used an ID twice.`);\n        }\n        /**\n         * Check any available eager types immediately, so we can quickly raise an error\n         * if they are invalid, instead of when the service is injected.\n         */\n        wrappedDependencies.forEach(({ typeWrapper }, index) => {\n            const { eagerType } = typeWrapper;\n            if (eagerType !== null) {\n                const type = typeof typeWrapper;\n                if (type !== 'function' && type !== 'object' && type !== 'string') {\n                    throw new CannotInstantiateValueError(`The identifier provided at index ${index} for service ${formatClassName(targetConstructor)} is invalid.`);\n                }\n                else if (metadata.factory == null && BUILT_INS.includes(eagerType)) {\n                    /**\n                     * Ensure the service does not contain built-in types (Number, Symbol, Object, etc.)\n                     * without also holding a factory to manually create an instance of the constructor.\n                     */\n                    throw new CannotInstantiateBuiltInError(eagerType?.name ?? eagerType);\n                }\n            }\n        });\n        /**\n         * The `.set(Omit<ServiceOptions<unknown>, \"dependencies\">, TypeWrapper[])` overload is used here.\n         * TypeScript downcasts the metadata to the type above.\n         *\n         * By default, this is set to `defaultContainer`.\n         * Therefore, it will be bound to that.\n         */\n        container.set(metadata, wrappedDependencies);\n    };\n}\n//# sourceMappingURL=service.decorator.js.map","import { Service } from './service.decorator';\nexport function JSService(optionsOrDependencies, dependenciesOrConstructor, maybeConstructor) {\n    let constructor;\n    if (typeof dependenciesOrConstructor === 'function') {\n        // eslint-disable-next-line\n        constructor = dependenciesOrConstructor;\n        Service(optionsOrDependencies)(constructor);\n    }\n    else if (maybeConstructor) {\n        constructor = maybeConstructor;\n        Service(optionsOrDependencies, dependenciesOrConstructor)(constructor);\n    }\n    if (!constructor) {\n        throw Error('The JSService overload was not used correctly.');\n    }\n    return constructor;\n}\n//# sourceMappingURL=js-service.decorator.js.map","import { HOST_CONTAINER } from '../constants/host-container.const';\n/**\n * A special identifier which can be used to get the container\n * the service is currently being executed under.\n * Optionally, combined with resolution contraints such as SkipSelf,\n * this could be used to attain a reference to parent containers.\n *\n * @example\n * An example of this can be found below:\n * ```ts\n * @Service([\n *   HostContainer()\n * ])\n * export class MyService {\n *   constructor (private container: ContainerInstance) { }\n * }\n * ```\n */\nexport function HostContainer() {\n    return HOST_CONTAINER;\n}\n//# sourceMappingURL=host-container.function.js.map","import { LAZY_REFERENCE } from '../constants/type-stamps.const';\n/**\n * Create a lazy reference to a value.\n * This is typically used to signal to `@InjectAll` that a reference must\n * not be eagerly loaded, e.g. in the case of cyclic dependencies.\n */\nexport function Lazy(fn) {\n    return { get: () => fn(), [LAZY_REFERENCE]: true };\n}\n//# sourceMappingURL=lazy.function.js.map","/**\n * If the identifier cannot be found, substitute it with `null`.\n * @experimental\n *\n * The constraints supported are listed in {@link ResolutionConstraintFlag}.\n *\n * @example\n * This function can be used to construct a bitmask for use\n * in the dependencies array of a service.\n * While this can be used publicly, it is mainly for use\n * within TypeDI; it allows you to configure specific constraints\n * for use when resolving a specific service.\n *\n * ```ts\n * const constraintBitMask = Optional() | Self();\n *\n * if (constraintBitMask & ResolutionConstraintFlag.Optional) {\n *   console.log('The dependency is optional.');\n * }\n * ```\n *\n * @group Resolution Constraints\n *\n * @see {@link ResolutionConstraintFlag}\n *\n * @group Resolution Constraints\n *\n * @returns The resolution constraint bit-flag for Optional.\n */\nexport function Optional() {\n    return 2 /* ResolutionConstraintFlag.Optional */;\n}\n/**\n * Do not ascend the container tree to resolve this identifier.\n * @experimental\n *\n * The constraints supported are listed in {@link ResolutionConstraintFlag}.\n *\n * @example\n * This function can be used to construct a bitmask for use\n * in the dependencies array of a service.\n * While this can be used publicly, it is mainly for use\n * within TypeDI; it allows you to configure specific constraints\n * for use when resolving a specific service.\n *\n * ```ts\n * const constraintBitMask = Self();\n *\n * if (constraintBitMask & ResolutionConstraintFlag.Self) {\n *   console.log('The dependency will not be resolved recursively.');\n * }\n * ```\n *\n * @group Resolution Constraints\n *\n * @see {@link ResolutionConstraintFlag}\n *\n * @group Resolution Constraints\n *\n * @returns The resolution constraint bit-flag for Self.\n */\nexport function Self() {\n    return 8 /* ResolutionConstraintFlag.Self */;\n}\n/**\n * Begin searching from the parent container to resolve this identifier.\n * @experimental\n *\n * The constraints supported are listed in {@link ResolutionConstraintFlag}.\n *\n * @example\n * This function can be used to construct a bitmask for use\n * in the dependencies array of a service.\n * While this can be used publicly, it is mainly for use\n * within TypeDI; it allows you to configure specific constraints\n * for use when resolving a specific service.\n *\n * ```ts\n * const constraintBitMask = SkipSelf();\n *\n * if (constraintBitMask & ResolutionConstraintFlag.Self) {\n *   console.log('The dependency will be resolved recursively from the parent.');\n * }\n * ```\n *\n * @see {@link ResolutionConstraintFlag}\n *\n * @group Resolution Constraints\n *\n * @returns The resolution constraint bit-flag for SkipSelf.\n */\nexport function SkipSelf() {\n    return 4 /* ResolutionConstraintFlag.SkipSelf */;\n}\n/**\n * Resolve multiple services for this identifier via `getMany`.\n * @experimental\n *\n * The constraints supported are listed in {@link ResolutionConstraintFlag}.\n *\n * @example\n * This function can be used to construct a bitmask for use\n * in the dependencies array of a service.\n * While this can be used publicly, it is mainly for use\n * within TypeDI; it allows you to configure specific constraints\n * for use when resolving a specific service.\n *\n * ```ts\n * const constraintBitMask = Many() | SkipSelf();\n *\n * if (constraintBitMask & ResolutionConstraintFlag.Many) {\n *   console.log('The dependency will be resolved via \"getMany\".');\n * }\n * ```\n *\n * @see {@link ResolutionConstraintFlag}\n *\n * @group Resolution Constraints\n *\n * @returns The resolution constraint bit-flag for SkipSelf.\n */\nexport function Many() {\n    return 1 /* ResolutionConstraintFlag.Many */;\n}\n//# sourceMappingURL=resolution-constraints.functions.js.map"],"names":["ContainerRegistryError","Error","constructor","super","arguments","this","name","ContainerRegistry","static","container","ContainerInstance","containerMap","has","id","set","registeredContainer","get","undefined","delete","dispose","Map","Token","ServiceNotFoundError","message","normalizedIdentifier","identifier","prototype","CannotInstantiateValueError","EMPTY_VALUE","Symbol","BUILT_INS","String","Object","Boolean","Array","Number","CannotInstantiateBuiltInError","SERVICE_METADATA_DEFAULTS","multiple","eager","scope","value","factory","LAZY_REFERENCE","INJECTED_FACTORY","resolveToTypeWrapper","typeOrIdentifier","typeWrapper","eagerType","lazyType","isFactory","x","isLazyReference","wrapDependencyAsResolvable","dependency","constraints","isArray","options","HOST_CONTAINER","VisitorCollection","disposed","visitors","anyVisitorsPresent","notifyVisitors","forEach","callback","visitor","removeVisitor","visitChildContainer","child","visitOrphanedContainer","visitNewService","serviceOptions","visitRetrieval","addVisitor","includes","defaultContainer","forwardOrphanedContainerEvents","push","isAllowedToAttachVisitor","visitContainer","indexOfVisitor","indexOf","splice","length","upstreamVisitor","proxyVisitor","acceptTreeVisitor","THROW_IF_DISPOSED","ALWAYS_RESOLVABLE","parent","metadataMap","multiServiceIds","isRetrievingPrivateToken","recursive","location","getIdentifierLocation","response","getOrNull","resolveMetadata","possibleResolution","partialVisitRetrievalOptions","many","maybeResolvedMetadata","baseMetadata","type","newServiceMetadata","newServiceID","dependencies","resolvedValue","metadata","toString","getServiceValue","getMany","getManyOrNull","idMap","targetContainer","mapped","tokens","map","generatedId","precompiledDependencies","throwIfDisposed","newMetadata","maskedToken","existingMultiGroup","setValue","remove","identifierOrIdentifierArray","serviceMetadata","disposeServiceInstance","containerId","conflictDefinition","onConflict","onFree","hasContainer","getContainer","registerContainer","of","ofChild","newContainer","reset","strategy","service","clear","async","factoryMeta","factoryServiceId","factoryServiceMethod","constructableTargetType","getConstructorParameters","guardBuiltIns","wrapper","resolveResolvable","resolvable","resolveTypeWrapper","resolvedIdentifier","isOptional","isSkipSelf","isSelf","isMany","resolved","force","error","detachTreeVisitor","iterator","entries","formatClassName","ctor","Service","optionsOrDependencies","maybeDependencies","targetConstructor","resolvedDependencies","wrappedDependencies","index","JSService","dependenciesOrConstructor","maybeConstructor","HostContainer","Lazy","fn","Optional","Self","SkipSelf","Many"],"mappings":"AAOO,MAAMA,UAA+BC,MACxCC,cACIC,SAASC,WACTC,KAAKC,KAAO,wBACf,ECFE,MAAMC,EAcTC,yBAAyBC,GACrB,GAAIA,aAAqBC,IAAsB,EAC3C,MAAM,IAAIV,EAAuB,uDAErC,GAAIO,EAAkBI,aAAaC,IAAIH,EAAUI,IAC7C,MAAM,IAAIb,EAAuB,2CAErCO,EAAkBI,aAAaG,IAAIL,EAAUI,GAAIJ,EACpD,CASDD,oBAAoBK,GAChB,OAAON,EAAkBI,aAAaC,IAAIC,EAC7C,CAWDL,oBAAoBK,GAChB,MAAME,EAAsBV,KAAKM,aAAaK,IAAIH,GAClD,QAA4BI,IAAxBF,EACA,MAAM,IAAIf,EAAuB,iDAErC,OAAOe,CACV,CAkBDP,6BAA6BC,GACzB,MAAMM,EAAsBR,EAAkBI,aAAaK,IAAIP,EAAUI,IACzE,QAA4BI,IAAxBF,EACA,MAAM,IAAIf,EAAuB,iDAGrCO,EAAkBI,aAAaO,OAAOT,EAAUI,UAE1CE,EAAoBI,SAC7B,EAQLZ,EAAkBI,aAAe,IAAIS,ICzF9B,MAAMC,EAITnB,YAAYI,GACRD,KAAKC,KAAOA,CACf,ECLE,MAAMgB,UAA6BrB,MAClCsB,cACA,MAAQ,iBAAiBlB,KAAKmB,oLAEjC,CACDtB,YAAYuB,GACRtB,QACAE,KAAKC,KAAO,uBAEZD,KAAKmB,qBAAuB,uBACF,iBAAfC,EACPpB,KAAKmB,qBAAuBC,EAEvBA,aAAsBJ,EAC3BhB,KAAKmB,qBAAuB,SAASC,EAAWnB,MAAQ,gBAEnDmB,IAAeA,EAAWnB,MAAQm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