UNPKG

ember-source

Version:

A JavaScript framework for creating ambitious web applications

1 lines 2 MB
{"version":3,"sources":["license.js","loader.js","@ember/-internals/browser-environment/index.js","@ember/-internals/container/index.js","@ember/-internals/deprecations/index.js","@ember/-internals/environment/index.js","@ember/-internals/error-handling/index.js","@ember/-internals/glimmer/index.js","@ember/-internals/meta/index.js","@ember/-internals/meta/lib/meta.js","@ember/-internals/metal/index.js","@ember/-internals/owner/index.js","@ember/-internals/routing/index.js","@ember/-internals/runtime/index.js","@ember/-internals/runtime/lib/ext/rsvp.js","@ember/-internals/runtime/lib/mixins/-proxy.js","@ember/-internals/runtime/lib/mixins/action_handler.js","@ember/-internals/runtime/lib/mixins/comparable.js","@ember/-internals/runtime/lib/mixins/container_proxy.js","@ember/-internals/runtime/lib/mixins/registry_proxy.js","@ember/-internals/runtime/lib/mixins/target_action_support.js","@ember/-internals/string/index.js","@ember/-internals/utility-types/index.js","@ember/-internals/utils/index.js","@ember/-internals/views/index.js","@ember/-internals/views/lib/compat/attrs.js","@ember/-internals/views/lib/compat/fallback-view-registry.js","@ember/-internals/views/lib/component_lookup.js","@ember/-internals/views/lib/mixins/action_support.js","@ember/-internals/views/lib/mixins/child_views_support.js","@ember/-internals/views/lib/mixins/class_names_support.js","@ember/-internals/views/lib/mixins/view_state_support.js","@ember/-internals/views/lib/mixins/view_support.js","@ember/-internals/views/lib/system/action_manager.js","@ember/-internals/views/lib/system/event_dispatcher.js","@ember/-internals/views/lib/system/utils.js","@ember/-internals/views/lib/views/core_view.js","@ember/-internals/views/lib/views/states.js","@ember/application/index.js","@ember/application/instance.js","@ember/application/lib/lazy_load.js","@ember/application/namespace.js","@ember/array/-internals.js","@ember/array/index.js","@ember/array/lib/make-array.js","@ember/array/mutable.js","@ember/array/proxy.js","@ember/canary-features/index.js","@ember/component/helper.js","@ember/component/index.js","@ember/component/template-only.js","@ember/controller/index.js","@ember/debug/container-debug-adapter.js","@ember/debug/data-adapter.js","@ember/debug/index.js","@ember/debug/lib/capture-render-tree.js","@ember/debug/lib/deprecate.js","@ember/debug/lib/handlers.js","@ember/debug/lib/inspect.js","@ember/debug/lib/testing.js","@ember/debug/lib/warn.js","@ember/deprecated-features/index.js","@ember/destroyable/index.js","@ember/engine/index.js","@ember/engine/instance.js","@ember/engine/lib/engine-parent.js","@ember/enumerable/index.js","@ember/enumerable/mutable.js","@ember/helper/index.js","@ember/instrumentation/index.js","@ember/modifier/index.js","@ember/object/-internals.js","@ember/object/compat.js","@ember/object/computed.js","@ember/object/core.js","@ember/object/evented.js","@ember/object/events.js","@ember/object/index.js","@ember/object/internals.js","@ember/object/lib/computed/computed_macros.js","@ember/object/lib/computed/reduce_computed_macros.js","@ember/object/mixin.js","@ember/object/observable.js","@ember/object/observers.js","@ember/object/promise-proxy-mixin.js","@ember/object/proxy.js","@ember/owner/index.js","@ember/renderer/index.js","@ember/routing/-internals.js","@ember/routing/hash-location.js","@ember/routing/history-location.js","@ember/routing/index.js","@ember/routing/lib/cache.js","@ember/routing/lib/controller_for.js","@ember/routing/lib/dsl.js","@ember/routing/lib/engines.js","@ember/routing/lib/generate_controller.js","@ember/routing/lib/location-utils.js","@ember/routing/lib/query_params.js","@ember/routing/lib/route-info.js","@ember/routing/lib/router_state.js","@ember/routing/lib/routing-service.js","@ember/routing/lib/utils.js","@ember/routing/location.js","@ember/routing/none-location.js","@ember/routing/route-info.js","@ember/routing/route.js","@ember/routing/router-service.js","@ember/routing/router.js","@ember/routing/transition.js","@ember/runloop/-private/backburner.js","@ember/runloop/index.js","@ember/service/index.js","@ember/template-compilation/index.js","@ember/template-factory/index.js","@ember/template/index.js","@ember/test/adapter.js","@ember/test/index.js","@ember/utils/index.js","@ember/utils/lib/compare.js","@ember/utils/lib/is-equal.js","@ember/utils/lib/is_blank.js","@ember/utils/lib/is_empty.js","@ember/utils/lib/is_none.js","@ember/utils/lib/is_present.js","@ember/utils/lib/type-of.js","@ember/version/index.js","@glimmer/debug.js","@glimmer/destroyable.js","@glimmer/encoder.js","@glimmer/env.js","@glimmer/global-context.js","@glimmer/manager.js","@glimmer/node.js","@glimmer/opcode-compiler.js","@glimmer/owner.js","@glimmer/program.js","@glimmer/reference.js","@glimmer/runtime.js","@glimmer/tracking/index.js","@glimmer/tracking/primitives/cache.js","@glimmer/util.js","@glimmer/validator.js","@glimmer/vm.js","@glimmer/wire-format.js","@simple-dom/document.js","backburner.js.js","dag-map.js","ember-babel.js","ember-testing/index.js","ember-testing/lib/adapters/adapter.js","ember-testing/lib/adapters/qunit.js","ember-testing/lib/ext/application.js","ember-testing/lib/ext/rsvp.js","ember-testing/lib/helpers.js","ember-testing/lib/helpers/and_then.js","ember-testing/lib/helpers/current_path.js","ember-testing/lib/helpers/current_route_name.js","ember-testing/lib/helpers/current_url.js","ember-testing/lib/helpers/pause_test.js","ember-testing/lib/helpers/visit.js","ember-testing/lib/helpers/wait.js","ember-testing/lib/initializers.js","ember-testing/lib/public-api.js","ember-testing/lib/setup_for_testing.js","ember-testing/lib/test.js","ember-testing/lib/test/adapter.js","ember-testing/lib/test/helpers.js","ember-testing/lib/test/on_inject_helpers.js","ember-testing/lib/test/pending_requests.js","ember-testing/lib/test/promise.js","ember-testing/lib/test/run.js","ember-testing/lib/test/waiters.js","ember/index.js","ember/version.js","route-recognizer.js","router_js.js","rsvp.js"],"sourcesContent":["/*!\n * @overview Ember - JavaScript Application Framework\n * @copyright Copyright 2011 Tilde Inc. and contributors\n * Portions Copyright 2006-2011 Strobe Inc.\n * Portions Copyright 2008-2011 Apple Inc. All rights reserved.\n * @license Licensed under MIT license\n * See https://raw.github.com/emberjs/ember.js/master/LICENSE\n * @version 5.10.0-alpha.4\n */","/* eslint-disable no-var */\n/* globals global globalThis self */\n/* eslint-disable-next-line no-unused-vars */\nvar define, require;\n(function () {\n var globalObj = typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : null;\n if (globalObj === null) {\n throw new Error('unable to locate global object');\n }\n if (typeof globalObj.define === 'function' && typeof globalObj.require === 'function') {\n define = globalObj.define;\n require = globalObj.require;\n return;\n }\n var registry = Object.create(null);\n var seen = Object.create(null);\n function missingModule(name, referrerName) {\n if (referrerName) {\n throw new Error('Could not find module ' + name + ' required by: ' + referrerName);\n } else {\n throw new Error('Could not find module ' + name);\n }\n }\n function internalRequire(_name, referrerName) {\n var name = _name;\n var mod = registry[name];\n if (!mod) {\n name = name + '/index';\n mod = registry[name];\n }\n var exports = seen[name];\n if (exports !== undefined) {\n return exports;\n }\n exports = seen[name] = {};\n if (!mod) {\n missingModule(_name, referrerName);\n }\n var deps = mod.deps;\n var callback = mod.callback;\n var reified = new Array(deps.length);\n for (var i = 0; i < deps.length; i++) {\n if (deps[i] === 'exports') {\n reified[i] = exports;\n } else if (deps[i] === 'require') {\n reified[i] = require;\n } else {\n reified[i] = require(deps[i], name);\n }\n }\n callback.apply(this, reified);\n return exports;\n }\n require = function (name) {\n return internalRequire(name, null);\n };\n define = function (name, deps, callback) {\n registry[name] = {\n deps: deps,\n callback: callback\n };\n };\n\n // setup `require` module\n require['default'] = require;\n require.has = function registryHas(moduleName) {\n return Boolean(registry[moduleName]) || Boolean(registry[moduleName + '/index']);\n };\n require._eak_seen = require.entries = registry;\n})();","define(\"@ember/-internals/browser-environment/index\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.window = _exports.userAgent = _exports.location = _exports.isFirefox = _exports.isChrome = _exports.history = _exports.hasDOM = void 0;\n // check if window exists and actually is the global\n var hasDom = _exports.hasDOM = typeof self === 'object' && self !== null && self.Object === Object && typeof Window !== 'undefined' && self.constructor === Window && typeof document === 'object' && document !== null && self.document === document && typeof location === 'object' && location !== null && self.location === location && typeof history === 'object' && history !== null && self.history === history && typeof navigator === 'object' && navigator !== null && self.navigator === navigator && typeof navigator.userAgent === 'string';\n const window = _exports.window = hasDom ? self : null;\n const location$1 = _exports.location = hasDom ? self.location : null;\n const history$1 = _exports.history = hasDom ? self.history : null;\n const userAgent = _exports.userAgent = hasDom ? self.navigator.userAgent : 'Lynx (textmode)';\n const isChrome = _exports.isChrome = hasDom ? typeof chrome === 'object' && !(typeof opera === 'object') : false;\n const isFirefox = _exports.isFirefox = hasDom ? /Firefox|FxiOS/.test(userAgent) : false;\n});","define(\"@ember/-internals/container/index\", [\"exports\", \"@ember/-internals/utils\", \"@ember/debug\", \"@ember/-internals/owner\"], function (_exports, _utils, _debug, _owner) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.Registry = _exports.INIT_FACTORY = _exports.Container = void 0;\n _exports.getFactoryFor = getFactoryFor;\n _exports.privatize = privatize;\n _exports.setFactoryFor = setFactoryFor;\n let leakTracking;\n let containers;\n if (true /* DEBUG */) {\n // requires v8\n // chrome --js-flags=\"--allow-natives-syntax --expose-gc\"\n // node --allow-natives-syntax --expose-gc\n try {\n if (typeof gc === 'function') {\n leakTracking = (() => {\n // avoid syntax errors when --allow-natives-syntax not present\n let GetWeakSetValues = new Function('weakSet', 'return %GetWeakSetValues(weakSet, 0)');\n containers = new WeakSet();\n return {\n hasContainers() {\n gc();\n return GetWeakSetValues(containers).length > 0;\n },\n reset() {\n let values = GetWeakSetValues(containers);\n for (let i = 0; i < values.length; i++) {\n containers.delete(values[i]);\n }\n }\n };\n })();\n }\n } catch (_e) {\n // ignore\n }\n }\n /**\n A container used to instantiate and cache objects.\n \n Every `Container` must be associated with a `Registry`, which is referenced\n to determine the factory and options that should be used to instantiate\n objects.\n \n The public API for `Container` is still in flux and should not be considered\n stable.\n \n @private\n @class Container\n */\n class Container {\n constructor(registry, options = {}) {\n this.registry = registry;\n this.owner = options.owner || null;\n this.cache = (0, _utils.dictionary)(options.cache || null);\n this.factoryManagerCache = (0, _utils.dictionary)(options.factoryManagerCache || null);\n this.isDestroyed = false;\n this.isDestroying = false;\n if (true /* DEBUG */) {\n this.validationCache = (0, _utils.dictionary)(options.validationCache || null);\n if (containers !== undefined) {\n containers.add(this);\n }\n }\n }\n /**\n @private\n @property registry\n @type Registry\n @since 1.11.0\n */\n /**\n @private\n @property cache\n @type InheritingDict\n */\n /**\n @private\n @property validationCache\n @type InheritingDict\n */\n /**\n Given a fullName return a corresponding instance.\n The default behavior is for lookup to return a singleton instance.\n The singleton is scoped to the container, allowing multiple containers\n to all have their own locally scoped singletons.\n ```javascript\n let registry = new Registry();\n let container = registry.container();\n registry.register('api:twitter', Twitter);\n let twitter = container.lookup('api:twitter');\n twitter instanceof Twitter; // => true\n // by default the container will return singletons\n let twitter2 = container.lookup('api:twitter');\n twitter2 instanceof Twitter; // => true\n twitter === twitter2; //=> true\n ```\n If singletons are not wanted, an optional flag can be provided at lookup.\n ```javascript\n let registry = new Registry();\n let container = registry.container();\n registry.register('api:twitter', Twitter);\n let twitter = container.lookup('api:twitter', { singleton: false });\n let twitter2 = container.lookup('api:twitter', { singleton: false });\n twitter === twitter2; //=> false\n ```\n @private\n @method lookup\n @param {String} fullName\n @param {RegisterOptions} [options]\n @return {any}\n */\n lookup(fullName, options) {\n if (this.isDestroyed) {\n throw new Error(`Cannot call \\`.lookup('${fullName}')\\` after the owner has been destroyed`);\n }\n (true && !(this.registry.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.registry.isValidFullName(fullName)));\n return lookup(this, this.registry.normalize(fullName), options);\n }\n /**\n A depth first traversal, destroying the container, its descendant containers and all\n their managed objects.\n @private\n @method destroy\n */\n destroy() {\n this.isDestroying = true;\n destroyDestroyables(this);\n }\n finalizeDestroy() {\n resetCache(this);\n this.isDestroyed = true;\n }\n /**\n Clear either the entire cache or just the cache for a particular key.\n @private\n @method reset\n @param {String} fullName optional key to reset; if missing, resets everything\n */\n reset(fullName) {\n if (this.isDestroyed) return;\n if (fullName === undefined) {\n destroyDestroyables(this);\n resetCache(this);\n } else {\n resetMember(this, this.registry.normalize(fullName));\n }\n }\n /**\n Returns an object that can be used to provide an owner to a\n manually created instance.\n @private\n @method ownerInjection\n @returns { Object }\n */\n ownerInjection() {\n let injection = {};\n (0, _owner.setOwner)(injection, this.owner);\n return injection;\n }\n /**\n Given a fullName, return the corresponding factory. The consumer of the factory\n is responsible for the destruction of any factory instances, as there is no\n way for the container to ensure instances are destroyed when it itself is\n destroyed.\n @public\n @method factoryFor\n @param {String} fullName\n @return {any}\n */\n factoryFor(fullName) {\n if (this.isDestroyed) {\n throw new Error(`Cannot call \\`.factoryFor('${fullName}')\\` after the owner has been destroyed`);\n }\n let normalizedName = this.registry.normalize(fullName);\n (true && !(this.registry.isValidFullName(normalizedName)) && (0, _debug.assert)('fullName must be a proper full name', this.registry.isValidFullName(normalizedName)));\n return factoryFor(this, normalizedName, fullName);\n }\n }\n _exports.Container = Container;\n if (true /* DEBUG */) {\n Container._leakTracking = leakTracking;\n }\n /*\n * Wrap a factory manager in a proxy which will not permit properties to be\n * set on the manager.\n */\n function wrapManagerInDeprecationProxy(manager) {\n let validator = {\n set(_obj, prop) {\n throw new Error(`You attempted to set \"${String(prop)}\" on a factory manager created by container#factoryFor. A factory manager is a read-only construct.`);\n }\n };\n // Note:\n // We have to proxy access to the manager here so that private property\n // access doesn't cause the above errors to occur.\n let m = manager;\n let proxiedManager = {\n class: m.class,\n create(props) {\n return m.create(props);\n }\n };\n return new Proxy(proxiedManager, validator);\n }\n function isSingleton(container, fullName) {\n return container.registry.getOption(fullName, 'singleton') !== false;\n }\n function isInstantiatable(container, fullName) {\n return container.registry.getOption(fullName, 'instantiate') !== false;\n }\n function lookup(container, fullName, options = {}) {\n let normalizedName = fullName;\n if (options.singleton === true || options.singleton === undefined && isSingleton(container, fullName)) {\n let cached = container.cache[normalizedName];\n if (cached !== undefined) {\n return cached;\n }\n }\n return instantiateFactory(container, normalizedName, fullName, options);\n }\n function factoryFor(container, normalizedName, fullName) {\n let cached = container.factoryManagerCache[normalizedName];\n if (cached !== undefined) {\n return cached;\n }\n let factory = container.registry.resolve(normalizedName);\n if (factory === undefined) {\n return;\n }\n if (true /* DEBUG */ && factory && typeof factory._onLookup === 'function') {\n factory._onLookup(fullName);\n }\n let manager = new InternalFactoryManager(container, factory, fullName, normalizedName);\n if (true /* DEBUG */) {\n manager = wrapManagerInDeprecationProxy(manager);\n }\n container.factoryManagerCache[normalizedName] = manager;\n return manager;\n }\n function isSingletonClass(container, fullName, {\n instantiate,\n singleton\n }) {\n return singleton !== false && !instantiate && isSingleton(container, fullName) && !isInstantiatable(container, fullName);\n }\n function isSingletonInstance(container, fullName, {\n instantiate,\n singleton\n }) {\n return singleton !== false && instantiate !== false && (singleton === true || isSingleton(container, fullName)) && isInstantiatable(container, fullName);\n }\n function isFactoryClass(container, fullname, {\n instantiate,\n singleton\n }) {\n return instantiate === false && (singleton === false || !isSingleton(container, fullname)) && !isInstantiatable(container, fullname);\n }\n function isFactoryInstance(container, fullName, {\n instantiate,\n singleton\n }) {\n return instantiate !== false && (singleton === false || !isSingleton(container, fullName)) && isInstantiatable(container, fullName);\n }\n function instantiateFactory(container, normalizedName, fullName, options) {\n let factoryManager = factoryFor(container, normalizedName, fullName);\n if (factoryManager === undefined) {\n return;\n }\n // SomeClass { singleton: true, instantiate: true } | { singleton: true } | { instantiate: true } | {}\n // By default majority of objects fall into this case\n if (isSingletonInstance(container, fullName, options)) {\n let instance = container.cache[normalizedName] = factoryManager.create();\n // if this lookup happened _during_ destruction (emits a deprecation, but\n // is still possible) ensure that it gets destroyed\n if (container.isDestroying) {\n if (typeof instance.destroy === 'function') {\n instance.destroy();\n }\n }\n return instance;\n }\n // SomeClass { singleton: false, instantiate: true }\n if (isFactoryInstance(container, fullName, options)) {\n return factoryManager.create();\n }\n // SomeClass { singleton: true, instantiate: false } | { instantiate: false } | { singleton: false, instantiation: false }\n if (isSingletonClass(container, fullName, options) || isFactoryClass(container, fullName, options)) {\n return factoryManager.class;\n }\n throw new Error('Could not create factory');\n }\n function destroyDestroyables(container) {\n let cache = container.cache;\n let keys = Object.keys(cache);\n for (let key of keys) {\n let value = cache[key];\n (true && !(value) && (0, _debug.assert)('has cached value', value));\n if (value.destroy) {\n value.destroy();\n }\n }\n }\n function resetCache(container) {\n container.cache = (0, _utils.dictionary)(null);\n container.factoryManagerCache = (0, _utils.dictionary)(null);\n }\n function resetMember(container, fullName) {\n let member = container.cache[fullName];\n delete container.factoryManagerCache[fullName];\n if (member) {\n delete container.cache[fullName];\n if (member.destroy) {\n member.destroy();\n }\n }\n }\n const INIT_FACTORY = _exports.INIT_FACTORY = Symbol('INIT_FACTORY');\n function getFactoryFor(obj) {\n // SAFETY: since we know `obj` is an `object`, we also know we can safely ask\n // whether a key is set on it.\n return obj[INIT_FACTORY];\n }\n function setFactoryFor(obj, factory) {\n // SAFETY: since we know `obj` is an `object`, we also know we can safely set\n // a key it safely at this location. (The only way this could be blocked is if\n // someone has gone out of their way to use `Object.defineProperty()` with our\n // internal-only symbol and made it `writable: false`.)\n obj[INIT_FACTORY] = factory;\n }\n class InternalFactoryManager {\n constructor(container, factory, fullName, normalizedName) {\n this.container = container;\n this.owner = container.owner;\n this.class = factory;\n this.fullName = fullName;\n this.normalizedName = normalizedName;\n this.madeToString = undefined;\n this.injections = undefined;\n }\n toString() {\n if (this.madeToString === undefined) {\n this.madeToString = this.container.registry.makeToString(this.class, this.fullName);\n }\n return this.madeToString;\n }\n create(options) {\n let {\n container\n } = this;\n if (container.isDestroyed) {\n throw new Error(`Cannot create new instances after the owner has been destroyed (you attempted to create ${this.fullName})`);\n }\n let props = options ? {\n ...options\n } : {};\n (0, _owner.setOwner)(props, container.owner);\n setFactoryFor(props, this);\n if (true /* DEBUG */) {\n let lazyInjections;\n let validationCache = this.container.validationCache;\n // Ensure that all lazy injections are valid at instantiation time\n if (!validationCache[this.fullName] && this.class && typeof this.class._lazyInjections === 'function') {\n lazyInjections = this.class._lazyInjections();\n lazyInjections = this.container.registry.normalizeInjectionsHash(lazyInjections);\n this.container.registry.validateInjections(lazyInjections);\n }\n validationCache[this.fullName] = true;\n (true && !(typeof this.class.create === 'function') && (0, _debug.assert)(`Failed to create an instance of '${this.normalizedName}'. Most likely an improperly defined class or an invalid module export.`, typeof this.class.create === 'function'));\n }\n return this.class.create(props);\n }\n }\n const VALID_FULL_NAME_REGEXP = /^[^:]+:[^:]+$/;\n /**\n A registry used to store factory and option information keyed\n by type.\n \n A `Registry` stores the factory and option information needed by a\n `Container` to instantiate and cache objects.\n \n The API for `Registry` is still in flux and should not be considered stable.\n \n @private\n @class Registry\n @since 1.11.0\n */\n class Registry {\n constructor(options = {}) {\n this.fallback = options.fallback || null;\n this.resolver = options.resolver || null;\n this.registrations = (0, _utils.dictionary)(options.registrations || null);\n this._normalizeCache = (0, _utils.dictionary)(null);\n this._resolveCache = (0, _utils.dictionary)(null);\n this._failSet = new Set();\n this._options = (0, _utils.dictionary)(null);\n this._typeOptions = (0, _utils.dictionary)(null);\n }\n /**\n A backup registry for resolving registrations when no matches can be found.\n @private\n @property fallback\n @type Registry\n */\n /**\n An object that has a `resolve` method that resolves a name.\n @private\n @property resolver\n @type Resolver\n */\n /**\n @private\n @property registrations\n @type InheritingDict\n */\n /**\n @private\n @property _normalizeCache\n @type InheritingDict\n */\n /**\n @private\n @property _resolveCache\n @type InheritingDict\n */\n /**\n @private\n @property _options\n @type InheritingDict\n */\n /**\n @private\n @property _typeOptions\n @type InheritingDict\n */\n /**\n Creates a container based on this registry.\n @private\n @method container\n @param {Object} options\n @return {Container} created container\n */\n container(options) {\n return new Container(this, options);\n }\n register(fullName, factory, options = {}) {\n (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName)));\n (true && !(factory !== undefined) && (0, _debug.assert)(`Attempting to register an unknown factory: '${fullName}'`, factory !== undefined));\n let normalizedName = this.normalize(fullName);\n (true && !(!this._resolveCache[normalizedName]) && (0, _debug.assert)(`Cannot re-register: '${fullName}', as it has already been resolved.`, !this._resolveCache[normalizedName]));\n this._failSet.delete(normalizedName);\n this.registrations[normalizedName] = factory;\n this._options[normalizedName] = options;\n }\n /**\n Unregister a fullName\n ```javascript\n let registry = new Registry();\n registry.register('model:user', User);\n registry.resolve('model:user').create() instanceof User //=> true\n registry.unregister('model:user')\n registry.resolve('model:user') === undefined //=> true\n ```\n @private\n @method unregister\n @param {String} fullName\n */\n unregister(fullName) {\n (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName)));\n let normalizedName = this.normalize(fullName);\n delete this.registrations[normalizedName];\n delete this._resolveCache[normalizedName];\n delete this._options[normalizedName];\n this._failSet.delete(normalizedName);\n }\n /**\n Given a fullName return the corresponding factory.\n By default `resolve` will retrieve the factory from\n the registry.\n ```javascript\n let registry = new Registry();\n registry.register('api:twitter', Twitter);\n registry.resolve('api:twitter') // => Twitter\n ```\n Optionally the registry can be provided with a custom resolver.\n If provided, `resolve` will first provide the custom resolver\n the opportunity to resolve the fullName, otherwise it will fallback\n to the registry.\n ```javascript\n let registry = new Registry();\n registry.resolver = function(fullName) {\n // lookup via the module system of choice\n };\n // the twitter factory is added to the module system\n registry.resolve('api:twitter') // => Twitter\n ```\n @private\n @method resolve\n @param {String} fullName\n @return {Function} fullName's factory\n */\n resolve(fullName) {\n let factory = resolve(this, this.normalize(fullName));\n if (factory === undefined && this.fallback !== null) {\n factory = this.fallback.resolve(fullName);\n }\n return factory;\n }\n /**\n A hook that can be used to describe how the resolver will\n attempt to find the factory.\n For example, the default Ember `.describe` returns the full\n class name (including namespace) where Ember's resolver expects\n to find the `fullName`.\n @private\n @method describe\n @param {String} fullName\n @return {string} described fullName\n */\n describe(fullName) {\n if (this.resolver !== null && this.resolver.lookupDescription) {\n return this.resolver.lookupDescription(fullName);\n } else if (this.fallback !== null) {\n return this.fallback.describe(fullName);\n } else {\n return fullName;\n }\n }\n /**\n A hook to enable custom fullName normalization behavior\n @private\n @method normalizeFullName\n @param {String} fullName\n @return {string} normalized fullName\n */\n normalizeFullName(fullName) {\n if (this.resolver !== null && this.resolver.normalize) {\n return this.resolver.normalize(fullName);\n } else if (this.fallback !== null) {\n return this.fallback.normalizeFullName(fullName);\n } else {\n return fullName;\n }\n }\n /**\n Normalize a fullName based on the application's conventions\n @private\n @method normalize\n @param {String} fullName\n @return {string} normalized fullName\n */\n normalize(fullName) {\n return this._normalizeCache[fullName] || (this._normalizeCache[fullName] = this.normalizeFullName(fullName));\n }\n /**\n @method makeToString\n @private\n @param {any} factory\n @param {string} fullName\n @return {function} toString function\n */\n makeToString(factory, fullName) {\n if (this.resolver !== null && this.resolver.makeToString) {\n return this.resolver.makeToString(factory, fullName);\n } else if (this.fallback !== null) {\n return this.fallback.makeToString(factory, fullName);\n } else {\n return typeof factory === 'string' ? factory : factory.name ?? '(unknown class)';\n }\n }\n /**\n Given a fullName check if the container is aware of its factory\n or singleton instance.\n @private\n @method has\n @param {String} fullName\n @param {Object} [options]\n @param {String} [options.source] the fullname of the request source (used for local lookups)\n @return {Boolean}\n */\n has(fullName) {\n if (!this.isValidFullName(fullName)) {\n return false;\n }\n return has(this, this.normalize(fullName));\n }\n /**\n Allow registering options for all factories of a type.\n ```javascript\n let registry = new Registry();\n let container = registry.container();\n // if all of type `connection` must not be singletons\n registry.optionsForType('connection', { singleton: false });\n registry.register('connection:twitter', TwitterConnection);\n registry.register('connection:facebook', FacebookConnection);\n let twitter = container.lookup('connection:twitter');\n let twitter2 = container.lookup('connection:twitter');\n twitter === twitter2; // => false\n let facebook = container.lookup('connection:facebook');\n let facebook2 = container.lookup('connection:facebook');\n facebook === facebook2; // => false\n ```\n @private\n @method optionsForType\n @param {String} type\n @param {Object} options\n */\n optionsForType(type, options) {\n this._typeOptions[type] = options;\n }\n getOptionsForType(type) {\n let optionsForType = this._typeOptions[type];\n if (optionsForType === undefined && this.fallback !== null) {\n optionsForType = this.fallback.getOptionsForType(type);\n }\n return optionsForType;\n }\n /**\n @private\n @method options\n @param {String} fullName\n @param {Object} options\n */\n options(fullName, options) {\n let normalizedName = this.normalize(fullName);\n this._options[normalizedName] = options;\n }\n getOptions(fullName) {\n let normalizedName = this.normalize(fullName);\n let options = this._options[normalizedName];\n if (options === undefined && this.fallback !== null) {\n options = this.fallback.getOptions(fullName);\n }\n return options;\n }\n getOption(fullName, optionName) {\n let options = this._options[fullName];\n if (options !== undefined && options[optionName] !== undefined) {\n return options[optionName];\n }\n let type = fullName.split(':')[0];\n (true && !(type) && (0, _debug.assert)('has type', type)); // split always will have at least one value\n options = this._typeOptions[type];\n if (options && options[optionName] !== undefined) {\n return options[optionName];\n } else if (this.fallback !== null) {\n return this.fallback.getOption(fullName, optionName);\n }\n return undefined;\n }\n /**\n @private\n @method knownForType\n @param {String} type the type to iterate over\n */\n knownForType(type) {\n let localKnown = (0, _utils.dictionary)(null);\n let registeredNames = Object.keys(this.registrations);\n for (let fullName of registeredNames) {\n let itemType = fullName.split(':')[0];\n if (itemType === type) {\n localKnown[fullName] = true;\n }\n }\n let fallbackKnown, resolverKnown;\n if (this.fallback !== null) {\n fallbackKnown = this.fallback.knownForType(type);\n }\n if (this.resolver !== null && this.resolver.knownForType) {\n resolverKnown = this.resolver.knownForType(type);\n }\n return Object.assign({}, fallbackKnown, localKnown, resolverKnown);\n }\n isValidFullName(fullName) {\n return VALID_FULL_NAME_REGEXP.test(fullName);\n }\n }\n _exports.Registry = Registry;\n if (true /* DEBUG */) {\n const proto = Registry.prototype;\n proto.normalizeInjectionsHash = function (hash) {\n let injections = [];\n for (let key in hash) {\n if (Object.prototype.hasOwnProperty.call(hash, key)) {\n let value = hash[key];\n (true && !(value) && (0, _debug.assert)('has value', value));\n let {\n specifier\n } = value;\n (true && !(this.isValidFullName(specifier)) && (0, _debug.assert)(`Expected a proper full name, given '${specifier}'`, this.isValidFullName(specifier)));\n injections.push({\n property: key,\n specifier\n });\n }\n }\n return injections;\n };\n proto.validateInjections = function (injections) {\n if (!injections) {\n return;\n }\n for (let injection of injections) {\n let {\n specifier\n } = injection;\n (true && !(this.has(specifier)) && (0, _debug.assert)(`Attempting to inject an unknown injection: '${specifier}'`, this.has(specifier)));\n }\n };\n }\n function resolve(registry, _normalizedName) {\n let normalizedName = _normalizedName;\n let cached = registry._resolveCache[normalizedName];\n if (cached !== undefined) {\n return cached;\n }\n if (registry._failSet.has(normalizedName)) {\n return;\n }\n let resolved;\n if (registry.resolver) {\n resolved = registry.resolver.resolve(normalizedName);\n }\n if (resolved === undefined) {\n resolved = registry.registrations[normalizedName];\n }\n if (resolved === undefined) {\n registry._failSet.add(normalizedName);\n } else {\n registry._resolveCache[normalizedName] = resolved;\n }\n return resolved;\n }\n function has(registry, fullName) {\n return registry.resolve(fullName) !== undefined;\n }\n const privateNames = (0, _utils.dictionary)(null);\n const privateSuffix = `${Math.random()}${Date.now()}`.replace('.', '');\n function privatize([fullName]) {\n (true && !(arguments.length === 1 && fullName) && (0, _debug.assert)('has a single string argument', arguments.length === 1 && fullName));\n let name = privateNames[fullName];\n if (name) {\n return name;\n }\n let [type, rawName] = fullName.split(':');\n return privateNames[fullName] = (0, _utils.intern)(`${type}:${rawName}-${privateSuffix}`);\n }\n});","define(\"@ember/-internals/deprecations/index\", [\"exports\", \"@ember/-internals/environment\", \"@ember/version\", \"@ember/debug\"], function (_exports, _environment, _version, _debug) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.DEPRECATIONS = void 0;\n _exports.deprecateUntil = deprecateUntil;\n _exports.emberVersionGte = emberVersionGte;\n _exports.isRemoved = isRemoved;\n function isEnabled(options) {\n return Object.hasOwnProperty.call(options.since, 'enabled') || _environment.ENV._ALL_DEPRECATIONS_ENABLED;\n }\n let numEmberVersion = parseFloat(_environment.ENV._OVERRIDE_DEPRECATION_VERSION ?? _version.VERSION);\n /* until must only be a minor version or major version */\n function emberVersionGte(until, emberVersion = numEmberVersion) {\n let significantUntil = until.replace(/(\\.0+)/g, '');\n return emberVersion >= parseFloat(significantUntil);\n }\n function isRemoved(options) {\n return emberVersionGte(options.until);\n }\n function deprecation(options) {\n return {\n options,\n test: !isEnabled(options),\n isEnabled: isEnabled(options) || isRemoved(options),\n isRemoved: isRemoved(options)\n };\n }\n /*\n To add a deprecation, you must add a new entry to the `DEPRECATIONS` object.\n The entry should be an object with the following properties:\n \n * `id` (required): A string that uniquely identifies the deprecation. This\n should be a short, descriptive name, typically dasherized.\n * `for` (required): The string `ember-source` -- every deprecation from this\n package is for `ember-source`.\n * `since` (required): An object with `available` and `enabled`. `available` is\n the first version of Ember that the deprecation is available in. `enabled` is\n the version of Ember that the deprecation was first enabled. This is used as\n a feature flag deprecations. For public APIs, the `enabled` value is added\n only once the deprecation RFC is [Ready for Release](https://github.com/emberjs/rfcs#ready-for-release).\n * `until` (required): The version of Ember that the deprecation will be removed\n * `url` (required): A URL to the deprecation guide for the deprecation. This\n URL can be constructed in advance of the deprecation being added to the\n [deprecation app](https://github.com/ember-learn/deprecation-app) by\n following this format: `https://deprecations.emberjs.com/deprecations/{{id}}`.\n \n For example:\n `deprecate` should then be called using the entry from the `DEPRECATIONS` object.\n \n ```ts\n import { DEPRECATIONS } from '@ember/-internals/deprecations';\n //...\n \n deprecateUntil(message, DEPRECATIONS.MY_DEPRECATION);\n ```\n \n `expectDeprecation` should also use the DEPRECATIONS object, but it should be noted\n that it uses `isEnabled` instead of `test` because the expectations of `expectDeprecation`\n are the opposite of `test`.\n \n ```ts\n expectDeprecation(\n () => {\n assert.equal(foo, bar(), 'foo is equal to bar'); // something that triggers the deprecation\n },\n /matchesMessage/,\n DEPRECATIONS.MY_DEPRECATION.isEnabled\n );\n ```\n \n Tests can be conditionally run based on whether a deprecation is enabled or not:\n \n ```ts\n [`${testUnless(DEPRECATIONS.MY_DEPRECATION.isRemoved)} specific deprecated feature tested only in this test`]\n ```\n \n This test will be skipped when the MY_DEPRECATION is removed.\n When adding a deprecation, we need to guard all the code that will eventually be removed, including tests.\n For tests that are not specifically testing the deprecated feature, we need to figure out how to\n test the behavior without encountering the deprecated feature, just as users would.\n */\n const DEPRECATIONS = _exports.DEPRECATIONS = {\n DEPRECATE_IMPLICIT_ROUTE_MODEL: deprecation({\n id: 'deprecate-implicit-route-model',\n for: 'ember-source',\n since: {\n available: '5.3.0',\n enabled: '5.3.0'\n },\n until: '6.0.0',\n url: 'https://deprecations.emberjs.com/v5.x/#toc_deprecate-implicit-route-model'\n }),\n DEPRECATE_TEMPLATE_ACTION: deprecation({\n id: 'template-action',\n url: 'https://deprecations.emberjs.com/id/template-action',\n until: '6.0.0',\n for: 'ember-source',\n since: {\n available: '5.9.0'\n }\n }),\n DEPRECATE_COMPONENT_TEMPLATE_RESOLVING: deprecation({\n id: 'component-template-resolving',\n url: 'https://deprecations.emberjs.com/id/component-template-resolving',\n until: '6.0.0',\n for: 'ember-source',\n since: {\n available: '5.9.0'\n }\n })\n };\n function deprecateUntil(message, deprecation) {\n const {\n options\n } = deprecation;\n (true && !(Boolean(options.for === 'ember-source')) && (0, _debug.assert)('deprecateUntil must only be called for ember-source', Boolean(options.for === 'ember-source')));\n if (deprecation.isRemoved) {\n throw new Error(`The API deprecated by ${options.id} was removed in ember-source ${options.until}. The message was: ${message}. Please see ${options.url} for more details.`);\n }\n (true && !(deprecation.test) && (0, _debug.deprecate)(message, deprecation.test, options));\n }\n});","define(\"@ember/-internals/environment/index\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.context = _exports.ENV = void 0;\n _exports.getENV = getENV;\n _exports.getLookup = getLookup;\n _exports.global = void 0;\n _exports.setLookup = setLookup;\n // from lodash to catch fake globals\n function checkGlobal(value) {\n return value && value.Object === Object ? value : undefined;\n }\n // element ids can ruin global miss checks\n function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n }\n // export real global\n var global$1 = _exports.global = checkGlobal(checkElementIdShadowing(typeof global === 'object' && global)) || checkGlobal(typeof self === 'object' && self) || checkGlobal(typeof window === 'object' && window) || typeof mainContext !== 'undefined' && mainContext ||\n // set before strict mode in Ember loader/wrapper\n new Function('return this')(); // eval outside of strict mode\n\n // legacy imports/exports/lookup stuff (should we keep this??)\n const context = _exports.context = function (global, Ember) {\n return Ember === undefined ? {\n imports: global,\n exports: global,\n lookup: global\n } : {\n // import jQuery\n imports: Ember.imports || global,\n // export Ember\n exports: Ember.exports || global,\n // search for Namespaces\n lookup: Ember.lookup || global\n };\n }(global$1, global$1.Ember);\n function getLookup() {\n return context.lookup;\n }\n function setLookup(value) {\n context.lookup = value;\n }\n\n /**\n The hash of environment variables used to control various configuration\n settings. To specify your own or override default settings, add the\n desired properties to a global hash named `EmberENV` (or `ENV` for\n backwards compatibility with earlier versions of Ember). The `EmberENV`\n hash must be created before loading Ember.\n \n @class EmberENV\n @type Object\n @public\n */\n const ENV = _exports.ENV = {\n ENABLE_OPTIONAL_FEATURES: false,\n /**\n Determines whether Ember should add to `Array`\n native object prototypes, a few extra methods in order to provide a more\n friendly API.\n We generally recommend leaving this option set to true however, if you need\n to turn it off, you can add the configuration property\n `EXTEND_PROTOTYPES` to `EmberENV` and set it to `false`.\n Note, when disabled (the default configuration for Ember Addons), you will\n instead have to access all methods and functions from the Ember\n namespace.\n @property EXTEND_PROTOTYPES\n @type Boolean\n @default true\n @for EmberENV\n @public\n */\n EXTEND_PROTOTYPES: {\n Array: true\n },\n /**\n The `LOG_STACKTRACE_ON_DEPRECATION` property, when true, tells Ember to log\n a full stack trace during deprecation warnings.\n @property LOG_STACKTRACE_ON_DEPRECATION\n @type Boolean\n @default true\n @for EmberENV\n @public\n */\n LOG_STACKTRACE_ON_DEPRECATION: true,\n /**\n The `LOG_VERSION` property, when true, tells Ember to log versions of all\n dependent libraries in use.\n @property LOG_VERSION\n @type Boolean\n @default true\n @for EmberENV\n @public\n */\n LOG_VERSION: true,\n RAISE_ON_DEPRECATION: false,\n STRUCTURED_PROFILE: false,\n /**\n Whether to perform extra bookkeeping needed to make the `captureRenderTree`\n API work.\n This has to be set before the ember JavaScript code is evaluated. This is\n usually done by setting `window.EmberENV = { _DEBUG_RENDER_TREE: true };`\n before the \"vendor\" `<script>` tag in `index.html`.\n Setting the flag after Ember is already loaded will not work correctly. It\n may appear to work somewhat, but fundamentally broken.\n This is not intended to be set directly. Ember Inspector will enable the\n flag on behalf of the user as needed.\n This flag is always on in development mode.\n The flag is off by default in production mode, due to the cost associated\n with the the bookkeeping work.\n The expected flow is that Ember Inspector will ask the user to refresh the\n page after enabling the feature. It could also offer a feature where the\n user add some domains to the \"always on\" list. In either case, Ember\n Inspector will inject the code on the page to set the flag if needed.\n @property _DEBUG_RENDER_TREE\n @for EmberENV\n @type Boolean\n @default false\n @private\n */\n _DEBUG_RENDER_TREE: true /* DEBUG */,\n /**\n Whether to force all deprecations to be enabled. This is used internally by\n Ember to enable deprecations in tests. It is not intended to be set in\n projects.\n @property _ALL_DEPRECATIONS_ENABLED\n @for EmberENV\n @type Boolean\n @default false\n @private\n */\n _ALL_DEPRECATIONS_ENABLED: false,\n /**\n Override the version of ember-source used to determine when deprecations \"break\".\n This is used internally by Ember to test with deprecated features \"removed\".\n This is never intended to be set by projects.\n @property _OVERRIDE_DEPRECATION_VERSION\n @for EmberENV\n @type string | null\n @default null\n @private\n */\n _OVERRIDE_DEPRECATION_VERSION: null,\n /**\n Whether the app defaults to using async observers.\n This is not intended to be set directly, as the implementation may change in\n the future. Use `@ember/optional-features` instead.\n @property _DEFAULT_ASYNC_OBSERVERS\n @for EmberENV\n @type Boolean\n @default false\n @private\n */\n _DEFAULT_ASYNC_OBSERVERS: false,\n /**\n Whether the app still has default record-loading behavior in the model\n hook from RFC https://rfcs.emberjs.com/id/0774-implicit-record-route-loading\n This will also remove the default store property from the route.\n This is not intended to be set directly, as the implementation may change in\n the future. Use `@ember/optional-features` instead.\n @property _NO_IMPLICIT_ROUTE_MODEL\n @for EmberENV\n @type Boolean\n @default false\n @private\n */\n _NO_IMPLICIT_ROUTE_MODEL: false,\n /**\n Controls the maximum number of scheduled rerenders without \"settling\". In general,\n applications should not need to modify this environment variable, but please\n open an issue so that we can determine if a better default value is needed.\n @property _RERENDER_LOOP_LIMIT\n @for EmberENV\n @type number\n @default 1000\n @private\n */\n _RERENDER_LOOP_LIMIT: 1000,\n EMBER_LOAD_HOOKS: {},\n FEATURES: {}\n };\n (Embe